var CLOSURE_NO_DEPS = true;
window.polymerSkipLoadingFontRoboto = true;
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//     You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//     See the License for the specific language governing permissions and
// limitations under the License.

!function(){var a={},b={},c={};!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=x}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==v.indexOf(b[c]))return;if("direction"==c&&-1==w.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i<j;){var k=(i+j)/2,l=f(a,c,k);if(Math.abs(e-l)<1e-5)return f(b,d,k);l<e?i=k:j=k}return f(b,d,k)}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return(c+=b*d)-c%d}}function k(a){C||(C=document.createElement("div").style),C.animationTimingFunction="",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");return b}function l(a){if("linear"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);if(c)return j(Number(c[1]),A);var d=G.exec(a);return d?j(Number(d[1]),{start:y,middle:z,end:A}[d[2]]):B[a]||x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return H;var d=c.delay+a+c.endDelay;return b<Math.min(c.delay,d)?I:b>=Math.min(c.delay+a,d)?J:K}function p(a,b,c,d,e){switch(d){case I:return"backwards"==b||"both"==b?0:null;case K:return c-e;case J:return"forwards"==b||"both"==b?a:null;case H:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==I&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==J||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===J&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if("normal"!==a&&"reverse"!==a){var e=b;"alternate-reverse"===a&&(e+=1),d="normal",e!==1/0&&e%2!=0&&(d="reverse")}return"normal"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),x=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+a);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,y),"step-middle":j(1,z),"step-end":j(1,A)},C=null,D="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E=new RegExp("cubic-bezier\\("+D+","+D+","+D+","+D+"\\)"),F=/steps\(\s*(\d+)\s*\)/,G=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,H=0,I=1,J=2,K=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(a),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return"display"===a||0===a.lastIndexOf("animation",0)||0===a.lastIndexOf("transition",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g<f;g++)e={},e.offset="offset"in a?a.offset:1==f?1:g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function g(b){function c(){var a=d.length;null==d[a-1].offset&&(d[a-1].offset=1),a>1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e<a;e++){var f=d[e].offset;if(null!=f){for(var g=1;g<e-b;g++)d[b+g].offset=c+(f-c)*g/(e-b);b=e,c=f}}}if(null==b)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||(b=f(b));for(var d=b.map(function(b){var c={};for(var d in b){var f=b[d];if("offset"==d){if(null!=f){if(f=Number(f),!isFinite(f))throw new TypeError("Keyframe offsets must be numbers.");if(f<0||f>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==d){if("add"==f||"accumulate"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=f)throw new TypeError("Invalid composite mode "+f+".")}else f="easing"==d?a.normalizeEasing(f):""+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing="linear"),c}),g=!0,h=-1/0,i=0;i<d.length;i++){var j=d[i].offset;if(null!=j){if(j<h)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");h=j}else g=!1}return d=d.filter(function(a){return a.offset>=0&&a.offset<=1}),g||c(),d}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},i=document.createElementNS("http://www.w3.org/1999/xhtml","div"),j={thin:"1px",medium:"3px",thick:"5px"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:j,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(a),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g<h&&(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,1))},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(a),function(){if(document.documentElement.animate){var c=document.documentElement.animate([],0),d=!0;if(c&&(d=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(a){void 0===c[a]&&(d=!0)})),!d)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=g,i=g+1,j=f[h].offset,k=f[i].offset,l=j,m=k;0==g&&(l=-1/0,0==k&&(i=h)),g==f.length-2&&(m=1/0,1==j&&(h=i)),d.push({applyFrom:l,applyTo:m,startOffset:f[h].offset,endOffset:f[i].offset,easingFunction:a.parseEasingFunction(f[h].easing),property:e,interpolation:b.propertyInterpolation(e,f[h].value,f[i].value)})}return d.sort(function(a,b){return a.startOffset-b.startOffset}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return c>=a.applyFrom&&c<a.applyTo}).forEach(function(d){var e=c-d.startOffset,f=d.endOffset-d.startOffset,g=0==f?0:d.easingFunction(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(a,b),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){e(a,b,d(c[f]))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(a,b),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateIterationProgress(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return null!==(h=i(a))},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._target=c,k._totalDuration=i._totalDuration,k._id=g,k}}(a,b),function(a,b){a.apply=function(b,c,d){b.style[a.propertyName(c)]=d},a.clear=function(b,c){b.style[a.propertyName(c)]=""}}(b),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(b),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return d<.5?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(b),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();-1===a.indexOf(this)&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);-1!==b&&a.splice(b,1)}}}(a,b),function(a,b,c){function d(a){var b=j;j=[],a<q.currentTime&&(a=q.currentTime),q._animations.sort(e),q._animations=h(a,!0,q._animations)[0],b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c,d){p=!0,n=!1,b.timeline.currentTime=a,m=!1;var e=[],f=[],g=[],h=[];return d.forEach(function(b){b._tick(a,c),b._inEffect?(f.push(b._effect),b._markTarget()):(e.push(b._effect),b._unmarkTarget()),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;b._inTimeline=d,d?g.push(b):h.push(b)}),o.push.apply(o,e),o.push.apply(o,f),m&&requestAnimationFrame(function(){}),p=!1,[g,h]}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.applyDirtiedAnimation(d),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.applyDirtiedAnimation=function(a){if(!p){a._markTarget();var c=a._targetAnimations();c.sort(e),h(b.timeline.currentTime,!1,c.slice())[1].forEach(function(a){var b=q._animations.indexOf(a);-1!==b&&q._animations.splice(b,1)}),g()}};var o=[],p=!1,q=new f;b.timeline=q}(a,b),function(a){function b(a,b){var c=a.exec(b);if(c)return c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);if(c)return[c[0],c[1].replace(/^\s*/,"")]}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],!(g=b(d,e))||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,c<=0))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){return a(c)||[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}if(""==c)return d}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;k<j;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(b),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);return c?(d.inset=!0,c):(c=a.consumeLengthOrPercent(b))?(d.lengths.push(c[0]),c):(c=a.consumeColor(b),c?(d.color=c[0],c):void 0)}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);if(e&&e[0].length)return[d,e[1]]}function c(c){var d=a.consumeRepeated(b,/^,/,c);if(d&&""==d[1])return d[0]}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(b),function(a,b){function c(a){return a.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a))return Number(a)}function f(a,b){return[a,b,c]}function g(a,b){if(0!=a)return i(0,1/0)(a,b)}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a){var b=a.trim().split(/\s*[\s,]\s*/);if(0!==b.length){for(var c=[],d=0;d<b.length;d++){var f=e(b[d]);if(void 0===f)return;c.push(f)}return c}}function k(a,b){if(a.length==b.length)return[a,b,function(a){return a.map(c).join(" ")}]}function l(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(j,k,["stroke-dasharray"]),a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,l,["z-index"]),a.parseNumber=e,a.parseNumberList=j,a.mergeNumbers=f,a.numberToString=c}(b),function(a,b){function c(a,b){if("visible"==a||"visible"==b)return[0,1,function(c){return c<=0?a:c>=1?b:"visible"}]}a.addPropertiesHandler(String,c,["visibility"])}(b),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(b),function(a,b){function c(a){function b(){var b=h.exec(a);g=b?b[0]:void 0}function c(){var a=Number(g);return b(),a}function d(){if("("!==g)return c();b();var a=f();return")"!==g?NaN:(b(),a)}function e(){for(var a=d();"*"===g||"/"===g;){var c=g;b();var e=d();"*"===c?a*=e:a/=e}return a}function f(){for(var a=e();"+"===g||"-"===g;){var c=g;b();var d=e();"+"===c?a+=d:a-=d}return a}var g,h=/([\+\-\w\.]+|[\(\)\*\/])/g;return b(),f()}function d(a,b){if("0"==(b=b.trim().toLowerCase())&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var d={};b=b.replace(a,function(a){return d[a]=null,"U"+a});for(var e="U("+a.source+")",f=b.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+e,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),g=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],h=0;h<g.length;)g[h].test(f)?(f=f.replace(g[h],"$1"),h=0):h++;if("D"==f){for(var i in d){var j=c(b.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(e,"g"),"*0"));if(!isFinite(j))return;d[i]=j}return d}}}function e(a,b){return f(a,b,!0)}function f(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var g="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",h=d.bind(null,new RegExp(g,"g")),i=d.bind(null,new RegExp(g+"|%","g")),j=d.bind(null,/deg|rad|grad|turn/g);a.parseLength=h,a.parseLengthOrPercent=i,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,i),a.parseAngle=j,a.mergeDimensions=f;var k=a.consumeParenthesised.bind(null,h),l=a.consumeRepeated.bind(void 0,k,/^/),m=a.consumeRepeated.bind(void 0,l,/^,/);a.consumeSizePairList=m;var n=function(a){var b=m(a);if(b&&""==b[1])return b[0]},o=a.mergeNestedRepeated.bind(void 0,e," "),p=a.mergeNestedRepeated.bind(void 0,o,",");a.mergeNonNegativeSizePair=o,a.addPropertiesHandler(n,p,["background-size"]),a.addPropertiesHandler(i,e,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(i,f,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(b),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(b),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if("none"==(b=b.toLowerCase().trim()))return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(void 0===(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r]))return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]);return a.composeMatrix(b[0],b[1],b[2],c,b[4]).map(f).join(",")}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"]),a.transformToSvgMatrix=function(b){var c=a.transformListToMatrix(e(b));return"matrix("+f(c[0])+" "+f(c[1])+" "+f(c[4])+" "+f(c[5])+" "+f(c[12])+" "+f(c[13])+")"}}(b),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b),e[b]=a})}var d={},e={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a},a.unprefixedPropertyName=function(a){return e[a]||a}}(b)}(),function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(a),function(a,b,c){function d(a){var c=b.timeline;c.currentTime=a,c._discardAnimations(),0==c._animations.length?f=!1:requestAnimationFrame(d)}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(c){b.timeline._updateAnimationsPromises(),a(c),b.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(a){}try{window.document.timeline=g}catch(a){}}(0,c),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b<this.effect.children.length;b++)this.effect.children[b]._animation=a,this._childAnimations[b]._setExternalAnimation(a)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var a=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(c){var d=b.timeline._play(c);this._childAnimations.push(d),d.playbackRate=this.playbackRate,this._paused&&d.pause(),c._animation=this.effect._animation,this._arrangeChildren(d,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c))}.bind(this))}},_arrangeChildren:function(a,b){null===this.startTime?a.currentTime=this.currentTime-b/this.playbackRate:a.startTime!==this.startTime+b/this.playbackRate&&(a.startTime=this.startTime+b/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(a,b){this._resolveFinishedPromise=function(){a(this)},this._rejectFinishedPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._readyPromise=new Promise(function(a,b){this._resolveReadyPromise=function(){a(this)},this._rejectReadyPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(a){this._animation.onfinish="function"==typeof a?function(b){b.target=this,a.call(this,b)}.bind(this):a},get oncancel(){return this._animation.oncancel},set oncancel(a){this._animation.oncancel="function"==typeof a?function(b){b.target=this,a.call(this,b)}.bind(this):a},get currentTime(){this._updatePromises();var a=this._animation.currentTime;return this._updatePromises(),a},set currentTime(a){this._updatePromises(),this._animation.currentTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.currentTime=a-c}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(a){this._updatePromises(),this._animation.startTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.startTime=a+c}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(a){this._updatePromises();var b=this.currentTime;this._animation.playbackRate=a,this._forEachChild(function(b){b.playbackRate=a}),null!==b&&(this.currentTime=b),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),b.awaitStartTime(this),this._forEachChild(function(a){var b=a.currentTime;a.play(),a.currentTime=b}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(a){a.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var a=this.currentTime;this._animation.reverse(),this._forEachChild(function(a){a.reverse()}),null!==a&&(this.currentTime=a),this._updatePromises()},addEventListener:function(a,b){var c=b;"function"==typeof b&&(c=function(a){a.target=this,b.call(this,a)}.bind(this),b._wrapper=c),this._animation.addEventListener(a,c)},removeEventListener:function(a,b){this._animation.removeEventListener(a,b&&b._wrapper||b)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(b){var c=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(a){b.call(this,a,c),this.effect instanceof window.SequenceEffect&&(c+=a.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var d=this.effect._timing,e=this.currentTime;null!==e&&(e=a.calculateIterationProgress(a.calculateActiveDuration(d),e,d)),(null==e||isNaN(e))&&this._removeChildAnimations()}}},window.Animation=b.Animation}(a,c),function(a,b,c){function d(b){this._frames=a.normalizeKeyframes(b)}function e(){for(var a=!1;i.length;)i.shift()._updateChildren(),a=!0;return a}var f=function(a){if(a._animation=void 0,a instanceof window.SequenceEffect||a instanceof window.GroupEffect)for(var b=0;b<a.children.length;b++)f(a.children[b])};b.removeMulti=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d._parent?(-1==b.indexOf(d._parent)&&b.push(d._parent),d._parent.children.splice(d._parent.children.indexOf(d),1),d._parent=null,f(d)):d._animation&&d._animation.effect==d&&(d._animation.cancel(),d._animation.effect=new KeyframeEffect(null,[]),d._animation._callback&&(d._animation._callback._animation=null),d._animation._rebuildUnderlyingAnimation(),f(d))}for(c=0;c<b.length;c++)b[c]._rebuild()},b.KeyframeEffect=function(b,c,e,f){return this.target=b,this._parent=null,e=a.numericTimingToObject(e),this._timingInput=a.cloneTimingInput(e),this._timing=a.normalizeTimingInput(e),this.timing=a.makeTiming(e,!1,this),this.timing._effect=this,"function"==typeof c?(a.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=c):this._normalizedKeyframes=new d(c),this._keyframes=c,this.activeDuration=a.calculateActiveDuration(this._timing),this._id=f,this},b.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(a){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=a,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var b=new KeyframeEffect(this.target,[],a.cloneTimingInput(this._timingInput),this._id);return b._normalizedKeyframes=this._normalizedKeyframes,b._keyframes=this._keyframes,b},remove:function(){b.removeMulti([this])}};var g=Element.prototype.animate;Element.prototype.animate=function(a,c){var d="";return c&&c.id&&(d=c.id),b.timeline._play(new b.KeyframeEffect(this,a,c,d))};var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");b.newUnderlyingAnimationForKeyframeEffect=function(a){if(a){var b=a.target||h,c=a._keyframes;"function"==typeof c&&(c=[]);var d=a._timingInput;d.id=a._id}else var b=h,c=[],d=0;return g.apply(b,[c,d])},b.bindAnimationForKeyframeEffect=function(a){a.effect&&"function"==typeof a.effect._normalizedKeyframes&&b.bindAnimationForCustomEffect(a)};var i=[];b.awaitStartTime=function(a){null===a.startTime&&a._isGroup&&(0==i.length&&requestAnimationFrame(e),i.push(a))};var j=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){b.timeline._updateAnimationsPromises();var a=j.apply(this,arguments);return e()&&(a=j.apply(this,arguments)),b.timeline._updateAnimationsPromises(),a}}),window.KeyframeEffect=b.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(a){return null!==a.effect&&a.effect.target==this}.bind(this))}}(a,c),function(a,b,c){function d(a){a._registered||(a._registered=!0,g.push(a),h||(h=!0,requestAnimationFrame(e)))}function e(a){var b=g;g=[],b.sort(function(a,b){return a._sequenceNumber-b._sequenceNumber}),b=b.filter(function(a){a();var b=a._animation?a._animation.playState:"idle";return"running"!=b&&"pending"!=b&&(a._registered=!1),a._registered}),g.push.apply(g,b),g.length?(h=!0,requestAnimationFrame(e)):h=!1}var f=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);b.bindAnimationForCustomEffect=function(b){var c,e=b.effect.target,g="function"==typeof b.effect.getFrames();c=g?b.effect.getFrames():b.effect._onsample;var h=b.effect.timing,i=null;h=a.normalizeTimingInput(h);var j=function(){var d=j._animation?j._animation.currentTime:null;null!==d&&(d=a.calculateIterationProgress(a.calculateActiveDuration(h),d,h),isNaN(d)&&(d=null)),d!==i&&(g?c(d,e,b.effect):c(d,b.effect,b.effect._animation)),i=d};j._animation=b,j._registered=!1,j._sequenceNumber=f++,b._callback=j,d(j)};var g=[],h=!1;b.Animation.prototype._register=function(){this._callback&&d(this._callback)}}(a,c),function(a,b,c){function d(a){return a._timing.delay+a.activeDuration+a._timing.endDelay}function e(b,c,d){this._id=d,this._parent=null,this.children=b||[],this._reparent(this.children),c=a.numericTimingToObject(c),this._timingInput=a.cloneTimingInput(c),this._timing=a.normalizeTimingInput(c,!0),this.timing=a.makeTiming(c,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){e.apply(this,arguments)},window.GroupEffect=function(){e.apply(this,arguments)},e.prototype={_isAncestor:function(a){for(var b=this;null!==b;){if(b==a)return!0;b=b._parent}return!1},_rebuild:function(){for(var a=this;a;)"auto"===a.timing.duration&&(a._timing.duration=a.activeDuration),a=a._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(a){b.removeMulti(a);for(var c=0;c<a.length;c++)a[c]._parent=this},_putChild:function(a,b){for(var c=b?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",d=0;d<a.length;d++)if(this._isAncestor(a[d]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:c};for(var d=0;d<a.length;d++)b?this.children.push(a[d]):this.children.unshift(a[d]);this._reparent(a),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var b=a.cloneTimingInput(this._timingInput),c=[],d=0;d<this.children.length;d++)c.push(this.children[d].clone());return this instanceof GroupEffect?new GroupEffect(c,b):new SequenceEffect(c,b)},remove:function(){b.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a+=d(b)}),Math.max(a,0)}}),window.GroupEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a=Math.max(a,d(b))}),a}}),b.newUnderlyingAnimationForGroup=function(c){var d,e=null,f=function(b){var c=d._wrapper;if(c&&"pending"!=c.playState&&c.effect)return null==b?void c._removeChildAnimations():0==b&&c.playbackRate<0&&(e||(e=a.normalizeTimingInput(c.effect.timing)),b=a.calculateIterationProgress(a.calculateActiveDuration(e),-1,e),isNaN(b)||null==b)?(c._forEachChild(function(a){a.currentTime=-1}),void c._removeChildAnimations()):void 0},g=new KeyframeEffect(null,[],c._timing,c._id);return g.onsample=f,d=b.timeline._play(g)},b.bindAnimationForGroup=function(a){a._animation._wrapper=a,a._isGroup=!0,b.awaitStartTime(a),a._constructChildAnimations(),a._setExternalAnimation(a)},b.groupChildDuration=d}(a,c)}();(()=>{var vve=Object.create;var BM=Object.defineProperty,xve=Object.defineProperties,bve=Object.getOwnPropertyDescriptor,wve=Object.getOwnPropertyDescriptors,Sve=Object.getOwnPropertyNames,hdt=Object.getOwnPropertySymbols,Mve=Object.getPrototypeOf,pdt=Object.prototype.hasOwnProperty,Eve=Object.prototype.propertyIsEnumerable;var TI=Math.pow,fdt=(e,t,r)=>t in e?BM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ia=(e,t)=>{for(var r in t||(t={}))pdt.call(t,r)&&fdt(e,r,t[r]);if(hdt)for(var r of hdt(t))Eve.call(t,r)&&fdt(e,r,t[r]);return e},yh=(e,t)=>xve(e,wve(t));var Ex=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var M=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zs=(e,t)=>{for(var r in t)BM(e,r,{get:t[r],enumerable:!0})},ddt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sve(t))!pdt.call(e,i)&&i!==r&&BM(e,i,{get:()=>t[i],enumerable:!(n=bve(t,i))||n.enumerable});return e};var Ee=(e,t,r)=>(r=e!=null?vve(Mve(e)):{},ddt(t||!e||!e.__esModule?BM(r,"default",{value:e,enumerable:!0}):r,e)),Ut=e=>ddt(BM({},"__esModule",{value:!0}),e);var Ri=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});var Hdt=H((p_r,PI)=>{var mdt,gdt,_dt,ydt,vdt,xdt,bdt,wdt,Sdt,Mdt,Edt,Tdt,Cdt,CI,hG,Adt,Pdt,Idt,Tx,Ldt,kdt,Rdt,Ndt,Ddt,Odt,zdt,Fdt,Bdt,AI;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof PI=="object"&&typeof PI.exports=="object"?e(r(t,r(PI.exports))):e(r(t));function r(n,i){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(o,a){return n[o]=i?i(o,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])};mdt=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(n,i);function o(){this.constructor=n}n.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)},gdt=Object.assign||function(n){for(var i,o=1,a=arguments.length;o<a;o++){i=arguments[o];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},_dt=function(n,i){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(n);s<a.length;s++)i.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(n,a[s])&&(o[a[s]]=n[a[s]]);return o},ydt=function(n,i,o,a){var s=arguments.length,l=s<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,o):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,i,o,a);else for(var u=n.length-1;u>=0;u--)(c=n[u])&&(l=(s<3?c(l):s>3?c(i,o,l):c(i,o))||l);return s>3&&l&&Object.defineProperty(i,o,l),l},vdt=function(n,i){return function(o,a){i(o,a,n)}},xdt=function(n,i,o,a,s,l){function c(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var u=a.kind,h=u==="getter"?"get":u==="setter"?"set":"value",f=!i&&n?a.static?n:n.prototype:null,p=i||(f?Object.getOwnPropertyDescriptor(f,a.name):{}),d,g=!1,_=o.length-1;_>=0;_--){var y={};for(var x in a)y[x]=x==="access"?{}:a[x];for(var x in a.access)y.access[x]=a.access[x];y.addInitializer=function(S){if(g)throw new TypeError("Cannot add initializers after decoration has completed");l.push(c(S||null))};var b=(0,o[_])(u==="accessor"?{get:p.get,set:p.set}:p[h],y);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=c(b.get))&&(p.get=d),(d=c(b.set))&&(p.set=d),(d=c(b.init))&&s.push(d)}else(d=c(b))&&(u==="field"?s.push(d):p[h]=d)}f&&Object.defineProperty(f,a.name,p),g=!0},bdt=function(n,i,o){for(var a=arguments.length>2,s=0;s<i.length;s++)o=a?i[s].call(n,o):i[s].call(n);return a?o:void 0},wdt=function(n){return typeof n=="symbol"?n:"".concat(n)},Sdt=function(n,i,o){return typeof i=="symbol"&&(i=i.description?"[".concat(i.description,"]"):""),Object.defineProperty(n,"name",{configurable:!0,value:o?"".concat(o," ",i):i})},Mdt=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Edt=function(n,i,o,a){function s(l){return l instanceof o?l:new o(function(c){c(l)})}return new(o||(o=Promise))(function(l,c){function u(p){try{f(a.next(p))}catch(d){c(d)}}function h(p){try{f(a.throw(p))}catch(d){c(d)}}function f(p){p.done?l(p.value):s(p.value).then(u,h)}f((a=a.apply(n,i||[])).next())})},Tdt=function(n,i){var o={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(f){return function(p){return h([f,p])}}function h(f){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,f[0]&&(o=0)),o;)try{if(a=1,s&&(l=f[0]&2?s.return:f[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,f[1])).done)return l;switch(s=0,l&&(f=[f[0]&2,l.value]),f[0]){case 0:case 1:l=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,s=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(l=o.trys,!(l=l.length>0&&l[l.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!l||f[1]>l[0]&&f[1]<l[3])){o.label=f[1];break}if(f[0]===6&&o.label<l[1]){o.label=l[1],l=f;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(f);break}l[2]&&o.ops.pop(),o.trys.pop();continue}f=i.call(n,o)}catch(p){f=[6,p],s=0}finally{a=l=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Cdt=function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&AI(i,n,o)},AI=Object.create?function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}:function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]},CI=function(n){var i=typeof Symbol=="function"&&Symbol.iterator,o=i&&n[i],a=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},hG=function(n,i){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,l=[],c;try{for(;(i===void 0||i-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(u){c={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(c)throw c.error}}return l},Adt=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(hG(arguments[i]));return n},Pdt=function(){for(var n=0,i=0,o=arguments.length;i<o;i++)n+=arguments[i].length;for(var a=Array(n),s=0,i=0;i<o;i++)for(var l=arguments[i],c=0,u=l.length;c<u;c++,s++)a[s]=l[c];return a},Idt=function(n,i,o){if(o||arguments.length===2)for(var a=0,s=i.length,l;a<s;a++)(l||!(a in i))&&(l||(l=Array.prototype.slice.call(i,0,a)),l[a]=i[a]);return n.concat(l||Array.prototype.slice.call(i))},Tx=function(n){return this instanceof Tx?(this.v=n,this):new Tx(n)},Ldt=function(n,i,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,i||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(g){a[g]&&(s[g]=function(_){return new Promise(function(y,x){l.push([g,_,y,x])>1||u(g,_)})})}function u(g,_){try{h(a[g](_))}catch(y){d(l[0][3],y)}}function h(g){g.value instanceof Tx?Promise.resolve(g.value.v).then(f,p):d(l[0][2],g)}function f(g){u("next",g)}function p(g){u("throw",g)}function d(g,_){g(_),l.shift(),l.length&&u(l[0][0],l[0][1])}},kdt=function(n){var i,o;return i={},a("next"),a("throw",function(s){throw s}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(s,l){i[s]=n[s]?function(c){return(o=!o)?{value:Tx(n[s](c)),done:!1}:l?l(c):c}:l}},Rdt=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],o;return i?i.call(n):(n=typeof CI=="function"?CI(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(l){o[l]=n[l]&&function(c){return new Promise(function(u,h){c=n[l](c),s(u,h,c.done,c.value)})}}function s(l,c,u,h){Promise.resolve(h).then(function(f){l({value:f,done:u})},c)}},Ndt=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};Ddt=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var o in n)o!=="default"&&Object.prototype.hasOwnProperty.call(n,o)&&AI(i,n,o);return r(i,n),i},Odt=function(n){return n&&n.__esModule?n:{default:n}},zdt=function(n,i,o,a){if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?a:o==="a"?a.call(n):a?a.value:i.get(n)},Fdt=function(n,i,o,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!s:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,o):s?s.value=o:i.set(n,o),o},Bdt=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},e("__extends",mdt),e("__assign",gdt),e("__rest",_dt),e("__decorate",ydt),e("__param",vdt),e("__esDecorate",xdt),e("__runInitializers",bdt),e("__propKey",wdt),e("__setFunctionName",Sdt),e("__metadata",Mdt),e("__awaiter",Edt),e("__generator",Tdt),e("__exportStar",Cdt),e("__createBinding",AI),e("__values",CI),e("__read",hG),e("__spread",Adt),e("__spreadArrays",Pdt),e("__spreadArray",Idt),e("__await",Tx),e("__asyncGenerator",Ldt),e("__asyncDelegator",kdt),e("__asyncValues",Rdt),e("__makeTemplateObject",Ndt),e("__importStar",Ddt),e("__importDefault",Odt),e("__classPrivateFieldGet",zdt),e("__classPrivateFieldSet",Fdt),e("__classPrivateFieldIn",Bdt)})});var Oe=H((Rx,$M)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",c=1,u=2,h=4,f=1,p=2,d=1,g=2,_=4,y=8,x=16,b=32,S=64,C=128,P=256,k=512,O=30,D="...",B=800,I=16,L=1,R=2,F=3,z=1/0,U=9007199254740991,W=17976931348623157e292,Z=0/0,rt=4294967295,ot=rt-1,st=rt>>>1,St=[["ary",C],["bind",d],["bindKey",g],["curry",y],["curryRight",x],["flip",k],["partial",b],["partialRight",S],["rearg",P]],bt="[object Arguments]",Mt="[object Array]",lt="[object AsyncFunction]",Kt="[object Boolean]",_t="[object Date]",ct="[object DOMException]",X="[object Error]",et="[object Function]",dt="[object GeneratorFunction]",q="[object Map]",pt="[object Number]",ht="[object Null]",wt="[object Object]",kt="[object Promise]",ie="[object Proxy]",ee="[object RegExp]",Le="[object Set]",ar="[object String]",fr="[object Symbol]",tt="[object Undefined]",$="[object WeakMap]",It="[object WeakSet]",$t="[object ArrayBuffer]",he="[object DataView]",Tt="[object Float32Array]",be="[object Float64Array]",nt="[object Int8Array]",Ct="[object Int16Array]",Wt="[object Int32Array]",fe="[object Uint8Array]",at="[object Uint8ClampedArray]",se="[object Uint16Array]",Qt="[object Uint32Array]",Ce=/\b__p \+= '';/g,Pt=/\b(__p \+=) '' \+/g,Nt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ze=/&(?:amp|lt|gt|quot|#39);/g,yn=/[&<>"']/g,Wi=RegExp(ze.source),Ar=RegExp(yn.source),Ia=/<%-([\s\S]+?)%>/g,ho=/<%([\s\S]+?)%>/g,La=/<%=([\s\S]+?)%>/g,cx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,um=/^\w*$/,Q0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/[\\^$.*+?()[\]{}|]/g,ux=RegExp(cn.source),np=/^\s+/,K=/\s/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Et=/\{\n\/\* \[wrapped with (.+)\] \*/,xt=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/[()=,{}\[\]\/\s]/,Ue=/\\(\\)?/g,tr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ke=/\w*$/,Xr=/^[-+]0x[0-9a-f]+$/i,_r=/^0b[01]+$/i,Pr=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,ip=/^(?:0|[1-9]\d*)$/,hm=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=/($^)/,Bl=/['\n\r\u2028\u2029\\]/g,$n="\\ud800-\\udfff",Hl="\\u0300-\\u036f",hx="\\ufe20-\\ufe2f",Vl="\\u20d0-\\u20ff",Ul=Hl+hx+Vl,Yi="\\u2700-\\u27bf",fm="a-z\\xdf-\\xf6\\xf8-\\xff",Gs="\\xac\\xb1\\xd7\\xf7",gpe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_pe="\\u2000-\\u206f",ype=" \\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",qht="A-Z\\xc0-\\xd6\\xd8-\\xde",Ght="\\ufe0e\\ufe0f",Wht=Gs+gpe+_pe+ype,eq="['\u2019]",vpe="["+$n+"]",Yht="["+Wht+"]",H6="["+Ul+"]",jht="\\d+",xpe="["+Yi+"]",Xht="["+fm+"]",$ht="[^"+$n+Wht+jht+Yi+fm+qht+"]",rq="\\ud83c[\\udffb-\\udfff]",bpe="(?:"+H6+"|"+rq+")",Kht="[^"+$n+"]",nq="(?:\\ud83c[\\udde6-\\uddff]){2}",iq="[\\ud800-\\udbff][\\udc00-\\udfff]",fx="["+qht+"]",Zht="\\u200d",Jht="(?:"+Xht+"|"+$ht+")",wpe="(?:"+fx+"|"+$ht+")",Qht="(?:"+eq+"(?:d|ll|m|re|s|t|ve))?",tft="(?:"+eq+"(?:D|LL|M|RE|S|T|VE))?",eft=bpe+"?",rft="["+Ght+"]?",Spe="(?:"+Zht+"(?:"+[Kht,nq,iq].join("|")+")"+rft+eft+")*",Mpe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Epe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nft=rft+eft+Spe,Tpe="(?:"+[xpe,nq,iq].join("|")+")"+nft,Cpe="(?:"+[Kht+H6+"?",H6,nq,iq,vpe].join("|")+")",Ape=RegExp(eq,"g"),Ppe=RegExp(H6,"g"),oq=RegExp(rq+"(?="+rq+")|"+Cpe+nft,"g"),Ipe=RegExp([fx+"?"+Xht+"+"+Qht+"(?="+[Yht,fx,"$"].join("|")+")",wpe+"+"+tft+"(?="+[Yht,fx+Jht,"$"].join("|")+")",fx+"?"+Jht+"+"+Qht,fx+"+"+tft,Epe,Mpe,jht,Tpe].join("|"),"g"),Lpe=RegExp("["+Zht+$n+Ul+Ght+"]"),kpe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rpe=["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"],Npe=-1,Rn={};Rn[Tt]=Rn[be]=Rn[nt]=Rn[Ct]=Rn[Wt]=Rn[fe]=Rn[at]=Rn[se]=Rn[Qt]=!0,Rn[bt]=Rn[Mt]=Rn[$t]=Rn[Kt]=Rn[he]=Rn[_t]=Rn[X]=Rn[et]=Rn[q]=Rn[pt]=Rn[wt]=Rn[ee]=Rn[Le]=Rn[ar]=Rn[$]=!1;var Tn={};Tn[bt]=Tn[Mt]=Tn[$t]=Tn[he]=Tn[Kt]=Tn[_t]=Tn[Tt]=Tn[be]=Tn[nt]=Tn[Ct]=Tn[Wt]=Tn[q]=Tn[pt]=Tn[wt]=Tn[ee]=Tn[Le]=Tn[ar]=Tn[fr]=Tn[fe]=Tn[at]=Tn[se]=Tn[Qt]=!0,Tn[X]=Tn[et]=Tn[$]=!1;var Dpe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"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"},Ope={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zpe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Fpe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bpe=parseFloat,Hpe=parseInt,ift=typeof global=="object"&&global&&global.Object===Object&&global,Vpe=typeof self=="object"&&self&&self.Object===Object&&self,fo=ift||Vpe||Function("return this")(),aq=typeof Rx=="object"&&Rx&&!Rx.nodeType&&Rx,t_=aq&&typeof $M=="object"&&$M&&!$M.nodeType&&$M,oft=t_&&t_.exports===aq,sq=oft&&ift.process,ql=function(){try{var ut=t_&&t_.require&&t_.require("util").types;return ut||sq&&sq.binding&&sq.binding("util")}catch(At){}}(),aft=ql&&ql.isArrayBuffer,sft=ql&&ql.isDate,lft=ql&&ql.isMap,cft=ql&&ql.isRegExp,uft=ql&&ql.isSet,hft=ql&&ql.isTypedArray;function Ws(ut,At,vt){switch(vt.length){case 0:return ut.call(At);case 1:return ut.call(At,vt[0]);case 2:return ut.call(At,vt[0],vt[1]);case 3:return ut.call(At,vt[0],vt[1],vt[2])}return ut.apply(At,vt)}function Upe(ut,At,vt,ge){for(var We=-1,$r=ut==null?0:ut.length;++We<$r;){var ji=ut[We];At(ge,ji,vt(ji),ut)}return ge}function Gl(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge&&At(ut[vt],vt,ut)!==!1;);return ut}function qpe(ut,At){for(var vt=ut==null?0:ut.length;vt--&&At(ut[vt],vt,ut)!==!1;);return ut}function fft(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge;)if(!At(ut[vt],vt,ut))return!1;return!0}function pm(ut,At){for(var vt=-1,ge=ut==null?0:ut.length,We=0,$r=[];++vt<ge;){var ji=ut[vt];At(ji,vt,ut)&&($r[We++]=ji)}return $r}function V6(ut,At){var vt=ut==null?0:ut.length;return!!vt&&px(ut,At,0)>-1}function lq(ut,At,vt){for(var ge=-1,We=ut==null?0:ut.length;++ge<We;)if(vt(At,ut[ge]))return!0;return!1}function Kn(ut,At){for(var vt=-1,ge=ut==null?0:ut.length,We=Array(ge);++vt<ge;)We[vt]=At(ut[vt],vt,ut);return We}function dm(ut,At){for(var vt=-1,ge=At.length,We=ut.length;++vt<ge;)ut[We+vt]=At[vt];return ut}function cq(ut,At,vt,ge){var We=-1,$r=ut==null?0:ut.length;for(ge&&$r&&(vt=ut[++We]);++We<$r;)vt=At(vt,ut[We],We,ut);return vt}function Gpe(ut,At,vt,ge){var We=ut==null?0:ut.length;for(ge&&We&&(vt=ut[--We]);We--;)vt=At(vt,ut[We],We,ut);return vt}function uq(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge;)if(At(ut[vt],vt,ut))return!0;return!1}var Wpe=hq("length");function Ype(ut){return ut.split("")}function jpe(ut){return ut.match(Ft)||[]}function pft(ut,At,vt){var ge;return vt(ut,function(We,$r,ji){if(At(We,$r,ji))return ge=$r,!1}),ge}function U6(ut,At,vt,ge){for(var We=ut.length,$r=vt+(ge?1:-1);ge?$r--:++$r<We;)if(At(ut[$r],$r,ut))return $r;return-1}function px(ut,At,vt){return At===At?ode(ut,At,vt):U6(ut,dft,vt)}function Xpe(ut,At,vt,ge){for(var We=vt-1,$r=ut.length;++We<$r;)if(ge(ut[We],At))return We;return-1}function dft(ut){return ut!==ut}function mft(ut,At){var vt=ut==null?0:ut.length;return vt?pq(ut,At)/vt:Z}function hq(ut){return function(At){return At==null?e:At[ut]}}function fq(ut){return function(At){return ut==null?e:ut[At]}}function gft(ut,At,vt,ge,We){return We(ut,function($r,ji,vn){vt=ge?(ge=!1,$r):At(vt,$r,ji,vn)}),vt}function $pe(ut,At){var vt=ut.length;for(ut.sort(At);vt--;)ut[vt]=ut[vt].value;return ut}function pq(ut,At){for(var vt,ge=-1,We=ut.length;++ge<We;){var $r=At(ut[ge]);$r!==e&&(vt=vt===e?$r:vt+$r)}return vt}function dq(ut,At){for(var vt=-1,ge=Array(ut);++vt<ut;)ge[vt]=At(vt);return ge}function Kpe(ut,At){return Kn(At,function(vt){return[vt,ut[vt]]})}function _ft(ut){return ut&&ut.slice(0,bft(ut)+1).replace(np,"")}function Ys(ut){return function(At){return ut(At)}}function mq(ut,At){return Kn(At,function(vt){return ut[vt]})}function MM(ut,At){return ut.has(At)}function yft(ut,At){for(var vt=-1,ge=ut.length;++vt<ge&&px(At,ut[vt],0)>-1;);return vt}function vft(ut,At){for(var vt=ut.length;vt--&&px(At,ut[vt],0)>-1;);return vt}function Zpe(ut,At){for(var vt=ut.length,ge=0;vt--;)ut[vt]===At&&++ge;return ge}var Jpe=fq(Dpe),Qpe=fq(Ope);function tde(ut){return"\\"+Fpe[ut]}function ede(ut,At){return ut==null?e:ut[At]}function dx(ut){return Lpe.test(ut)}function rde(ut){return kpe.test(ut)}function nde(ut){for(var At,vt=[];!(At=ut.next()).done;)vt.push(At.value);return vt}function gq(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge,We){vt[++At]=[We,ge]}),vt}function xft(ut,At){return function(vt){return ut(At(vt))}}function mm(ut,At){for(var vt=-1,ge=ut.length,We=0,$r=[];++vt<ge;){var ji=ut[vt];(ji===At||ji===l)&&(ut[vt]=l,$r[We++]=vt)}return $r}function q6(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=ge}),vt}function ide(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=[ge,ge]}),vt}function ode(ut,At,vt){for(var ge=vt-1,We=ut.length;++ge<We;)if(ut[ge]===At)return ge;return-1}function ade(ut,At,vt){for(var ge=vt+1;ge--;)if(ut[ge]===At)return ge;return ge}function mx(ut){return dx(ut)?lde(ut):Wpe(ut)}function tu(ut){return dx(ut)?cde(ut):Ype(ut)}function bft(ut){for(var At=ut.length;At--&&K.test(ut.charAt(At)););return At}var sde=fq(zpe);function lde(ut){for(var At=oq.lastIndex=0;oq.test(ut);)++At;return At}function cde(ut){return ut.match(oq)||[]}function ude(ut){return ut.match(Ipe)||[]}var hde=function ut(At){At=At==null?fo:gm.defaults(fo.Object(),At,gm.pick(fo,Rpe));var vt=At.Array,ge=At.Date,We=At.Error,$r=At.Function,ji=At.Math,vn=At.Object,_q=At.RegExp,fde=At.String,Wl=At.TypeError,G6=vt.prototype,pde=$r.prototype,gx=vn.prototype,W6=At["__core-js_shared__"],Y6=pde.toString,un=gx.hasOwnProperty,dde=0,wft=function(){var m=/[^.]+$/.exec(W6&&W6.keys&&W6.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),j6=gx.toString,mde=Y6.call(vn),gde=fo._,_de=_q("^"+Y6.call(un).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X6=oft?At.Buffer:e,_m=At.Symbol,$6=At.Uint8Array,Sft=X6?X6.allocUnsafe:e,K6=xft(vn.getPrototypeOf,vn),Mft=vn.create,Eft=gx.propertyIsEnumerable,Z6=G6.splice,Tft=_m?_m.isConcatSpreadable:e,EM=_m?_m.iterator:e,e_=_m?_m.toStringTag:e,J6=function(){try{var m=a_(vn,"defineProperty");return m({},"",{}),m}catch(v){}}(),yde=At.clearTimeout!==fo.clearTimeout&&At.clearTimeout,vde=ge&&ge.now!==fo.Date.now&&ge.now,xde=At.setTimeout!==fo.setTimeout&&At.setTimeout,Q6=ji.ceil,tI=ji.floor,yq=vn.getOwnPropertySymbols,bde=X6?X6.isBuffer:e,Cft=At.isFinite,wde=G6.join,Sde=xft(vn.keys,vn),Xi=ji.max,ra=ji.min,Mde=ge.now,Ede=At.parseInt,Aft=ji.random,Tde=G6.reverse,vq=a_(At,"DataView"),TM=a_(At,"Map"),xq=a_(At,"Promise"),_x=a_(At,"Set"),CM=a_(At,"WeakMap"),AM=a_(vn,"create"),eI=CM&&new CM,yx={},Cde=s_(vq),Ade=s_(TM),Pde=s_(xq),Ide=s_(_x),Lde=s_(CM),rI=_m?_m.prototype:e,PM=rI?rI.valueOf:e,Pft=rI?rI.toString:e;function G(m){if(si(m)&&!$e(m)&&!(m instanceof gr)){if(m instanceof Yl)return m;if(un.call(m,"__wrapped__"))return Ipt(m)}return new Yl(m)}var vx=function(){function m(){}return function(v){if(!ei(v))return{};if(Mft)return Mft(v);m.prototype=v;var T=new m;return m.prototype=e,T}}();function nI(){}function Yl(m,v){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}G.templateSettings={escape:Ia,evaluate:ho,interpolate:La,variable:"",imports:{_:G}},G.prototype=nI.prototype,G.prototype.constructor=G,Yl.prototype=vx(nI.prototype),Yl.prototype.constructor=Yl;function gr(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=rt,this.__views__=[]}function kde(){var m=new gr(this.__wrapped__);return m.__actions__=ds(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=ds(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=ds(this.__views__),m}function Rde(){if(this.__filtered__){var m=new gr(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function Nde(){var m=this.__wrapped__.value(),v=this.__dir__,T=$e(m),N=v<0,V=T?m.length:0,Y=Yme(0,V,this.__views__),J=Y.start,it=Y.end,ft=it-J,Dt=N?it:J-1,Ot=this.__iteratees__,Vt=Ot.length,oe=0,Te=ra(ft,this.__takeCount__);if(!T||!N&&V==ft&&Te==ft)return Qft(m,this.__actions__);var Ne=[];t:for(;ft--&&oe<Te;){Dt+=v;for(var er=-1,De=m[Dt];++er<Vt;){var pr=Ot[er],yr=pr.iteratee,$s=pr.type,Na=yr(De);if($s==R)De=Na;else if(!Na){if($s==L)continue t;break t}}Ne[oe++]=De}return Ne}gr.prototype=vx(nI.prototype),gr.prototype.constructor=gr;function r_(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Dde(){this.__data__=AM?AM(null):{},this.size=0}function Ode(m){var v=this.has(m)&&delete this.__data__[m];return this.size-=v?1:0,v}function zde(m){var v=this.__data__;if(AM){var T=v[m];return T===a?e:T}return un.call(v,m)?v[m]:e}function Fde(m){var v=this.__data__;return AM?v[m]!==e:un.call(v,m)}function Bde(m,v){var T=this.__data__;return this.size+=this.has(m)?0:1,T[m]=AM&&v===e?a:v,this}r_.prototype.clear=Dde,r_.prototype.delete=Ode,r_.prototype.get=zde,r_.prototype.has=Fde,r_.prototype.set=Bde;function op(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Hde(){this.__data__=[],this.size=0}function Vde(m){var v=this.__data__,T=iI(v,m);if(T<0)return!1;var N=v.length-1;return T==N?v.pop():Z6.call(v,T,1),--this.size,!0}function Ude(m){var v=this.__data__,T=iI(v,m);return T<0?e:v[T][1]}function qde(m){return iI(this.__data__,m)>-1}function Gde(m,v){var T=this.__data__,N=iI(T,m);return N<0?(++this.size,T.push([m,v])):T[N][1]=v,this}op.prototype.clear=Hde,op.prototype.delete=Vde,op.prototype.get=Ude,op.prototype.has=qde,op.prototype.set=Gde;function ap(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Wde(){this.size=0,this.__data__={hash:new r_,map:new(TM||op),string:new r_}}function Yde(m){var v=gI(this,m).delete(m);return this.size-=v?1:0,v}function jde(m){return gI(this,m).get(m)}function Xde(m){return gI(this,m).has(m)}function $de(m,v){var T=gI(this,m),N=T.size;return T.set(m,v),this.size+=T.size==N?0:1,this}ap.prototype.clear=Wde,ap.prototype.delete=Yde,ap.prototype.get=jde,ap.prototype.has=Xde,ap.prototype.set=$de;function n_(m){var v=-1,T=m==null?0:m.length;for(this.__data__=new ap;++v<T;)this.add(m[v])}function Kde(m){return this.__data__.set(m,a),this}function Zde(m){return this.__data__.has(m)}n_.prototype.add=n_.prototype.push=Kde,n_.prototype.has=Zde;function eu(m){var v=this.__data__=new op(m);this.size=v.size}function Jde(){this.__data__=new op,this.size=0}function Qde(m){var v=this.__data__,T=v.delete(m);return this.size=v.size,T}function tme(m){return this.__data__.get(m)}function eme(m){return this.__data__.has(m)}function rme(m,v){var T=this.__data__;if(T instanceof op){var N=T.__data__;if(!TM||N.length<r-1)return N.push([m,v]),this.size=++T.size,this;T=this.__data__=new ap(N)}return T.set(m,v),this.size=T.size,this}eu.prototype.clear=Jde,eu.prototype.delete=Qde,eu.prototype.get=tme,eu.prototype.has=eme,eu.prototype.set=rme;function Ift(m,v){var T=$e(m),N=!T&&l_(m),V=!T&&!N&&wm(m),Y=!T&&!N&&!V&&Sx(m),J=T||N||V||Y,it=J?dq(m.length,fde):[],ft=it.length;for(var Dt in m)(v||un.call(m,Dt))&&!(J&&(Dt=="length"||V&&(Dt=="offset"||Dt=="parent")||Y&&(Dt=="buffer"||Dt=="byteLength"||Dt=="byteOffset")||up(Dt,ft)))&&it.push(Dt);return it}function Lft(m){var v=m.length;return v?m[Lq(0,v-1)]:e}function nme(m,v){return _I(ds(m),i_(v,0,m.length))}function ime(m){return _I(ds(m))}function bq(m,v,T){(T!==e&&!ru(m[v],T)||T===e&&!(v in m))&&sp(m,v,T)}function IM(m,v,T){var N=m[v];(!(un.call(m,v)&&ru(N,T))||T===e&&!(v in m))&&sp(m,v,T)}function iI(m,v){for(var T=m.length;T--;)if(ru(m[T][0],v))return T;return-1}function ome(m,v,T,N){return ym(m,function(V,Y,J){v(N,V,T(V),J)}),N}function kft(m,v){return m&&gh(v,po(v),m)}function ame(m,v){return m&&gh(v,gs(v),m)}function sp(m,v,T){v=="__proto__"&&J6?J6(m,v,{configurable:!0,enumerable:!0,value:T,writable:!0}):m[v]=T}function wq(m,v){for(var T=-1,N=v.length,V=vt(N),Y=m==null;++T<N;)V[T]=Y?e:rG(m,v[T]);return V}function i_(m,v,T){return m===m&&(T!==e&&(m=m<=T?m:T),v!==e&&(m=m>=v?m:v)),m}function jl(m,v,T,N,V,Y){var J,it=v&c,ft=v&u,Dt=v&h;if(T&&(J=V?T(m,N,V,Y):T(m)),J!==e)return J;if(!ei(m))return m;var Ot=$e(m);if(Ot){if(J=Xme(m),!it)return ds(m,J)}else{var Vt=na(m),oe=Vt==et||Vt==dt;if(wm(m))return rpt(m,it);if(Vt==wt||Vt==bt||oe&&!V){if(J=ft||oe?{}:bpt(m),!it)return ft?zme(m,ame(J,m)):Ome(m,kft(J,m))}else{if(!Tn[Vt])return V?m:{};J=$me(m,Vt,it)}}Y||(Y=new eu);var Te=Y.get(m);if(Te)return Te;Y.set(m,J),Kpt(m)?m.forEach(function(De){J.add(jl(De,v,T,De,m,Y))}):Xpt(m)&&m.forEach(function(De,pr){J.set(pr,jl(De,v,T,pr,m,Y))});var Ne=Dt?ft?Uq:Vq:ft?gs:po,er=Ot?e:Ne(m);return Gl(er||m,function(De,pr){er&&(pr=De,De=m[pr]),IM(J,pr,jl(De,v,T,pr,m,Y))}),J}function sme(m){var v=po(m);return function(T){return Rft(T,m,v)}}function Rft(m,v,T){var N=T.length;if(m==null)return!N;for(m=vn(m);N--;){var V=T[N],Y=v[V],J=m[V];if(J===e&&!(V in m)||!Y(J))return!1}return!0}function Nft(m,v,T){if(typeof m!="function")throw new Wl(i);return zM(function(){m.apply(e,T)},v)}function LM(m,v,T,N){var V=-1,Y=V6,J=!0,it=m.length,ft=[],Dt=v.length;if(!it)return ft;T&&(v=Kn(v,Ys(T))),N?(Y=lq,J=!1):v.length>=r&&(Y=MM,J=!1,v=new n_(v));t:for(;++V<it;){var Ot=m[V],Vt=T==null?Ot:T(Ot);if(Ot=N||Ot!==0?Ot:0,J&&Vt===Vt){for(var oe=Dt;oe--;)if(v[oe]===Vt)continue t;ft.push(Ot)}else Y(v,Vt,N)||ft.push(Ot)}return ft}var ym=spt(mh),Dft=spt(Mq,!0);function lme(m,v){var T=!0;return ym(m,function(N,V,Y){return T=!!v(N,V,Y),T}),T}function oI(m,v,T){for(var N=-1,V=m.length;++N<V;){var Y=m[N],J=v(Y);if(J!=null&&(it===e?J===J&&!Xs(J):T(J,it)))var it=J,ft=Y}return ft}function cme(m,v,T,N){var V=m.length;for(T=Qe(T),T<0&&(T=-T>V?0:V+T),N=N===e||N>V?V:Qe(N),N<0&&(N+=V),N=T>N?0:Jpt(N);T<N;)m[T++]=v;return m}function Oft(m,v){var T=[];return ym(m,function(N,V,Y){v(N,V,Y)&&T.push(N)}),T}function Ro(m,v,T,N,V){var Y=-1,J=m.length;for(T||(T=Zme),V||(V=[]);++Y<J;){var it=m[Y];v>0&&T(it)?v>1?Ro(it,v-1,T,N,V):dm(V,it):N||(V[V.length]=it)}return V}var Sq=lpt(),zft=lpt(!0);function mh(m,v){return m&&Sq(m,v,po)}function Mq(m,v){return m&&zft(m,v,po)}function aI(m,v){return pm(v,function(T){return hp(m[T])})}function o_(m,v){v=xm(v,m);for(var T=0,N=v.length;m!=null&&T<N;)m=m[_h(v[T++])];return T&&T==N?m:e}function Fft(m,v,T){var N=v(m);return $e(m)?N:dm(N,T(m))}function ka(m){return m==null?m===e?tt:ht:e_&&e_ in vn(m)?Wme(m):ige(m)}function Eq(m,v){return m>v}function ume(m,v){return m!=null&&un.call(m,v)}function hme(m,v){return m!=null&&v in vn(m)}function fme(m,v,T){return m>=ra(v,T)&&m<Xi(v,T)}function Tq(m,v,T){for(var N=T?lq:V6,V=m[0].length,Y=m.length,J=Y,it=vt(Y),ft=1/0,Dt=[];J--;){var Ot=m[J];J&&v&&(Ot=Kn(Ot,Ys(v))),ft=ra(Ot.length,ft),it[J]=!T&&(v||V>=120&&Ot.length>=120)?new n_(J&&Ot):e}Ot=m[0];var Vt=-1,oe=it[0];t:for(;++Vt<V&&Dt.length<ft;){var Te=Ot[Vt],Ne=v?v(Te):Te;if(Te=T||Te!==0?Te:0,!(oe?MM(oe,Ne):N(Dt,Ne,T))){for(J=Y;--J;){var er=it[J];if(!(er?MM(er,Ne):N(m[J],Ne,T)))continue t}oe&&oe.push(Ne),Dt.push(Te)}}return Dt}function pme(m,v,T,N){return mh(m,function(V,Y,J){v(N,T(V),Y,J)}),N}function kM(m,v,T){v=xm(v,m),m=Ept(m,v);var N=m==null?m:m[_h($l(v))];return N==null?e:Ws(N,m,T)}function Bft(m){return si(m)&&ka(m)==bt}function dme(m){return si(m)&&ka(m)==$t}function mme(m){return si(m)&&ka(m)==_t}function RM(m,v,T,N,V){return m===v?!0:m==null||v==null||!si(m)&&!si(v)?m!==m&&v!==v:gme(m,v,T,N,RM,V)}function gme(m,v,T,N,V,Y){var J=$e(m),it=$e(v),ft=J?Mt:na(m),Dt=it?Mt:na(v);ft=ft==bt?wt:ft,Dt=Dt==bt?wt:Dt;var Ot=ft==wt,Vt=Dt==wt,oe=ft==Dt;if(oe&&wm(m)){if(!wm(v))return!1;J=!0,Ot=!1}if(oe&&!Ot)return Y||(Y=new eu),J||Sx(m)?ypt(m,v,T,N,V,Y):qme(m,v,ft,T,N,V,Y);if(!(T&f)){var Te=Ot&&un.call(m,"__wrapped__"),Ne=Vt&&un.call(v,"__wrapped__");if(Te||Ne){var er=Te?m.value():m,De=Ne?v.value():v;return Y||(Y=new eu),V(er,De,T,N,Y)}}return oe?(Y||(Y=new eu),Gme(m,v,T,N,V,Y)):!1}function _me(m){return si(m)&&na(m)==q}function Cq(m,v,T,N){var V=T.length,Y=V,J=!N;if(m==null)return!Y;for(m=vn(m);V--;){var it=T[V];if(J&&it[2]?it[1]!==m[it[0]]:!(it[0]in m))return!1}for(;++V<Y;){it=T[V];var ft=it[0],Dt=m[ft],Ot=it[1];if(J&&it[2]){if(Dt===e&&!(ft in m))return!1}else{var Vt=new eu;if(N)var oe=N(Dt,Ot,ft,m,v,Vt);if(!(oe===e?RM(Ot,Dt,f|p,N,Vt):oe))return!1}}return!0}function Hft(m){if(!ei(m)||Qme(m))return!1;var v=hp(m)?_de:Pr;return v.test(s_(m))}function yme(m){return si(m)&&ka(m)==ee}function vme(m){return si(m)&&na(m)==Le}function xme(m){return si(m)&&SI(m.length)&&!!Rn[ka(m)]}function Vft(m){return typeof m=="function"?m:m==null?_s:typeof m=="object"?$e(m)?Gft(m[0],m[1]):qft(m):cdt(m)}function Aq(m){if(!OM(m))return Sde(m);var v=[];for(var T in vn(m))un.call(m,T)&&T!="constructor"&&v.push(T);return v}function bme(m){if(!ei(m))return nge(m);var v=OM(m),T=[];for(var N in m)N=="constructor"&&(v||!un.call(m,N))||T.push(N);return T}function Pq(m,v){return m<v}function Uft(m,v){var T=-1,N=ms(m)?vt(m.length):[];return ym(m,function(V,Y,J){N[++T]=v(V,Y,J)}),N}function qft(m){var v=Gq(m);return v.length==1&&v[0][2]?Spt(v[0][0],v[0][1]):function(T){return T===m||Cq(T,m,v)}}function Gft(m,v){return Yq(m)&&wpt(v)?Spt(_h(m),v):function(T){var N=rG(T,m);return N===e&&N===v?nG(T,m):RM(v,N,f|p)}}function sI(m,v,T,N,V){m!==v&&Sq(v,function(Y,J){if(V||(V=new eu),ei(Y))wme(m,v,J,T,sI,N,V);else{var it=N?N(Xq(m,J),Y,J+"",m,v,V):e;it===e&&(it=Y),bq(m,J,it)}},gs)}function wme(m,v,T,N,V,Y,J){var it=Xq(m,T),ft=Xq(v,T),Dt=J.get(ft);if(Dt){bq(m,T,Dt);return}var Ot=Y?Y(it,ft,T+"",m,v,J):e,Vt=Ot===e;if(Vt){var oe=$e(ft),Te=!oe&&wm(ft),Ne=!oe&&!Te&&Sx(ft);Ot=ft,oe||Te||Ne?$e(it)?Ot=it:xi(it)?Ot=ds(it):Te?(Vt=!1,Ot=rpt(ft,!0)):Ne?(Vt=!1,Ot=npt(ft,!0)):Ot=[]:FM(ft)||l_(ft)?(Ot=it,l_(it)?Ot=Qpt(it):(!ei(it)||hp(it))&&(Ot=bpt(ft))):Vt=!1}Vt&&(J.set(ft,Ot),V(Ot,ft,N,Y,J),J.delete(ft)),bq(m,T,Ot)}function Wft(m,v){var T=m.length;if(!!T)return v+=v<0?T:0,up(v,T)?m[v]:e}function Yft(m,v,T){v.length?v=Kn(v,function(Y){return $e(Y)?function(J){return o_(J,Y.length===1?Y[0]:Y)}:Y}):v=[_s];var N=-1;v=Kn(v,Ys(ke()));var V=Uft(m,function(Y,J,it){var ft=Kn(v,function(Dt){return Dt(Y)});return{criteria:ft,index:++N,value:Y}});return $pe(V,function(Y,J){return Dme(Y,J,T)})}function Sme(m,v){return jft(m,v,function(T,N){return nG(m,N)})}function jft(m,v,T){for(var N=-1,V=v.length,Y={};++N<V;){var J=v[N],it=o_(m,J);T(it,J)&&NM(Y,xm(J,m),it)}return Y}function Mme(m){return function(v){return o_(v,m)}}function Iq(m,v,T,N){var V=N?Xpe:px,Y=-1,J=v.length,it=m;for(m===v&&(v=ds(v)),T&&(it=Kn(m,Ys(T)));++Y<J;)for(var ft=0,Dt=v[Y],Ot=T?T(Dt):Dt;(ft=V(it,Ot,ft,N))>-1;)it!==m&&Z6.call(it,ft,1),Z6.call(m,ft,1);return m}function Xft(m,v){for(var T=m?v.length:0,N=T-1;T--;){var V=v[T];if(T==N||V!==Y){var Y=V;up(V)?Z6.call(m,V,1):Nq(m,V)}}return m}function Lq(m,v){return m+tI(Aft()*(v-m+1))}function Eme(m,v,T,N){for(var V=-1,Y=Xi(Q6((v-m)/(T||1)),0),J=vt(Y);Y--;)J[N?Y:++V]=m,m+=T;return J}function kq(m,v){var T="";if(!m||v<1||v>U)return T;do v%2&&(T+=m),v=tI(v/2),v&&(m+=m);while(v);return T}function nr(m,v){return $q(Mpt(m,v,_s),m+"")}function Tme(m){return Lft(Mx(m))}function Cme(m,v){var T=Mx(m);return _I(T,i_(v,0,T.length))}function NM(m,v,T,N){if(!ei(m))return m;v=xm(v,m);for(var V=-1,Y=v.length,J=Y-1,it=m;it!=null&&++V<Y;){var ft=_h(v[V]),Dt=T;if(ft==="__proto__"||ft==="constructor"||ft==="prototype")return m;if(V!=J){var Ot=it[ft];Dt=N?N(Ot,ft,it):e,Dt===e&&(Dt=ei(Ot)?Ot:up(v[V+1])?[]:{})}IM(it,ft,Dt),it=it[ft]}return m}var $ft=eI?function(m,v){return eI.set(m,v),m}:_s,Ame=J6?function(m,v){return J6(m,"toString",{configurable:!0,enumerable:!1,value:oG(v),writable:!0})}:_s;function Pme(m){return _I(Mx(m))}function Xl(m,v,T){var N=-1,V=m.length;v<0&&(v=-v>V?0:V+v),T=T>V?V:T,T<0&&(T+=V),V=v>T?0:T-v>>>0,v>>>=0;for(var Y=vt(V);++N<V;)Y[N]=m[N+v];return Y}function Ime(m,v){var T;return ym(m,function(N,V,Y){return T=v(N,V,Y),!T}),!!T}function lI(m,v,T){var N=0,V=m==null?N:m.length;if(typeof v=="number"&&v===v&&V<=st){for(;N<V;){var Y=N+V>>>1,J=m[Y];J!==null&&!Xs(J)&&(T?J<=v:J<v)?N=Y+1:V=Y}return V}return Rq(m,v,_s,T)}function Rq(m,v,T,N){var V=0,Y=m==null?0:m.length;if(Y===0)return 0;v=T(v);for(var J=v!==v,it=v===null,ft=Xs(v),Dt=v===e;V<Y;){var Ot=tI((V+Y)/2),Vt=T(m[Ot]),oe=Vt!==e,Te=Vt===null,Ne=Vt===Vt,er=Xs(Vt);if(J)var De=N||Ne;else Dt?De=Ne&&(N||oe):it?De=Ne&&oe&&(N||!Te):ft?De=Ne&&oe&&!Te&&(N||!er):Te||er?De=!1:De=N?Vt<=v:Vt<v;De?V=Ot+1:Y=Ot}return ra(Y,ot)}function Kft(m,v){for(var T=-1,N=m.length,V=0,Y=[];++T<N;){var J=m[T],it=v?v(J):J;if(!T||!ru(it,ft)){var ft=it;Y[V++]=J===0?0:J}}return Y}function Zft(m){return typeof m=="number"?m:Xs(m)?Z:+m}function js(m){if(typeof m=="string")return m;if($e(m))return Kn(m,js)+"";if(Xs(m))return Pft?Pft.call(m):"";var v=m+"";return v=="0"&&1/m==-z?"-0":v}function vm(m,v,T){var N=-1,V=V6,Y=m.length,J=!0,it=[],ft=it;if(T)J=!1,V=lq;else if(Y>=r){var Dt=v?null:Vme(m);if(Dt)return q6(Dt);J=!1,V=MM,ft=new n_}else ft=v?[]:it;t:for(;++N<Y;){var Ot=m[N],Vt=v?v(Ot):Ot;if(Ot=T||Ot!==0?Ot:0,J&&Vt===Vt){for(var oe=ft.length;oe--;)if(ft[oe]===Vt)continue t;v&&ft.push(Vt),it.push(Ot)}else V(ft,Vt,T)||(ft!==it&&ft.push(Vt),it.push(Ot))}return it}function Nq(m,v){return v=xm(v,m),m=Ept(m,v),m==null||delete m[_h($l(v))]}function Jft(m,v,T,N){return NM(m,v,T(o_(m,v)),N)}function cI(m,v,T,N){for(var V=m.length,Y=N?V:-1;(N?Y--:++Y<V)&&v(m[Y],Y,m););return T?Xl(m,N?0:Y,N?Y+1:V):Xl(m,N?Y+1:0,N?V:Y)}function Qft(m,v){var T=m;return T instanceof gr&&(T=T.value()),cq(v,function(N,V){return V.func.apply(V.thisArg,dm([N],V.args))},T)}function Dq(m,v,T){var N=m.length;if(N<2)return N?vm(m[0]):[];for(var V=-1,Y=vt(N);++V<N;)for(var J=m[V],it=-1;++it<N;)it!=V&&(Y[V]=LM(Y[V]||J,m[it],v,T));return vm(Ro(Y,1),v,T)}function tpt(m,v,T){for(var N=-1,V=m.length,Y=v.length,J={};++N<V;){var it=N<Y?v[N]:e;T(J,m[N],it)}return J}function Oq(m){return xi(m)?m:[]}function zq(m){return typeof m=="function"?m:_s}function xm(m,v){return $e(m)?m:Yq(m,v)?[m]:Ppt(on(m))}var Lme=nr;function bm(m,v,T){var N=m.length;return T=T===e?N:T,!v&&T>=N?m:Xl(m,v,T)}var ept=yde||function(m){return fo.clearTimeout(m)};function rpt(m,v){if(v)return m.slice();var T=m.length,N=Sft?Sft(T):new m.constructor(T);return m.copy(N),N}function Fq(m){var v=new m.constructor(m.byteLength);return new $6(v).set(new $6(m)),v}function kme(m,v){var T=v?Fq(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.byteLength)}function Rme(m){var v=new m.constructor(m.source,Ke.exec(m));return v.lastIndex=m.lastIndex,v}function Nme(m){return PM?vn(PM.call(m)):{}}function npt(m,v){var T=v?Fq(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.length)}function ipt(m,v){if(m!==v){var T=m!==e,N=m===null,V=m===m,Y=Xs(m),J=v!==e,it=v===null,ft=v===v,Dt=Xs(v);if(!it&&!Dt&&!Y&&m>v||Y&&J&&ft&&!it&&!Dt||N&&J&&ft||!T&&ft||!V)return 1;if(!N&&!Y&&!Dt&&m<v||Dt&&T&&V&&!N&&!Y||it&&T&&V||!J&&V||!ft)return-1}return 0}function Dme(m,v,T){for(var N=-1,V=m.criteria,Y=v.criteria,J=V.length,it=T.length;++N<J;){var ft=ipt(V[N],Y[N]);if(ft){if(N>=it)return ft;var Dt=T[N];return ft*(Dt=="desc"?-1:1)}}return m.index-v.index}function opt(m,v,T,N){for(var V=-1,Y=m.length,J=T.length,it=-1,ft=v.length,Dt=Xi(Y-J,0),Ot=vt(ft+Dt),Vt=!N;++it<ft;)Ot[it]=v[it];for(;++V<J;)(Vt||V<Y)&&(Ot[T[V]]=m[V]);for(;Dt--;)Ot[it++]=m[V++];return Ot}function apt(m,v,T,N){for(var V=-1,Y=m.length,J=-1,it=T.length,ft=-1,Dt=v.length,Ot=Xi(Y-it,0),Vt=vt(Ot+Dt),oe=!N;++V<Ot;)Vt[V]=m[V];for(var Te=V;++ft<Dt;)Vt[Te+ft]=v[ft];for(;++J<it;)(oe||V<Y)&&(Vt[Te+T[J]]=m[V++]);return Vt}function ds(m,v){var T=-1,N=m.length;for(v||(v=vt(N));++T<N;)v[T]=m[T];return v}function gh(m,v,T,N){var V=!T;T||(T={});for(var Y=-1,J=v.length;++Y<J;){var it=v[Y],ft=N?N(T[it],m[it],it,T,m):e;ft===e&&(ft=m[it]),V?sp(T,it,ft):IM(T,it,ft)}return T}function Ome(m,v){return gh(m,Wq(m),v)}function zme(m,v){return gh(m,vpt(m),v)}function uI(m,v){return function(T,N){var V=$e(T)?Upe:ome,Y=v?v():{};return V(T,m,ke(N,2),Y)}}function xx(m){return nr(function(v,T){var N=-1,V=T.length,Y=V>1?T[V-1]:e,J=V>2?T[2]:e;for(Y=m.length>3&&typeof Y=="function"?(V--,Y):e,J&&Ra(T[0],T[1],J)&&(Y=V<3?e:Y,V=1),v=vn(v);++N<V;){var it=T[N];it&&m(v,it,N,Y)}return v})}function spt(m,v){return function(T,N){if(T==null)return T;if(!ms(T))return m(T,N);for(var V=T.length,Y=v?V:-1,J=vn(T);(v?Y--:++Y<V)&&N(J[Y],Y,J)!==!1;);return T}}function lpt(m){return function(v,T,N){for(var V=-1,Y=vn(v),J=N(v),it=J.length;it--;){var ft=J[m?it:++V];if(T(Y[ft],ft,Y)===!1)break}return v}}function Fme(m,v,T){var N=v&d,V=DM(m);function Y(){var J=this&&this!==fo&&this instanceof Y?V:m;return J.apply(N?T:this,arguments)}return Y}function cpt(m){return function(v){v=on(v);var T=dx(v)?tu(v):e,N=T?T[0]:v.charAt(0),V=T?bm(T,1).join(""):v.slice(1);return N[m]()+V}}function bx(m){return function(v){return cq(sdt(adt(v).replace(Ape,"")),m,"")}}function DM(m){return function(){var v=arguments;switch(v.length){case 0:return new m;case 1:return new m(v[0]);case 2:return new m(v[0],v[1]);case 3:return new m(v[0],v[1],v[2]);case 4:return new m(v[0],v[1],v[2],v[3]);case 5:return new m(v[0],v[1],v[2],v[3],v[4]);case 6:return new m(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new m(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var T=vx(m.prototype),N=m.apply(T,v);return ei(N)?N:T}}function Bme(m,v,T){var N=DM(m);function V(){for(var Y=arguments.length,J=vt(Y),it=Y,ft=wx(V);it--;)J[it]=arguments[it];var Dt=Y<3&&J[0]!==ft&&J[Y-1]!==ft?[]:mm(J,ft);if(Y-=Dt.length,Y<T)return dpt(m,v,hI,V.placeholder,e,J,Dt,e,e,T-Y);var Ot=this&&this!==fo&&this instanceof V?N:m;return Ws(Ot,this,J)}return V}function upt(m){return function(v,T,N){var V=vn(v);if(!ms(v)){var Y=ke(T,3);v=po(v),T=function(it){return Y(V[it],it,V)}}var J=m(v,T,N);return J>-1?V[Y?v[J]:J]:e}}function hpt(m){return cp(function(v){var T=v.length,N=T,V=Yl.prototype.thru;for(m&&v.reverse();N--;){var Y=v[N];if(typeof Y!="function")throw new Wl(i);if(V&&!J&&mI(Y)=="wrapper")var J=new Yl([],!0)}for(N=J?N:T;++N<T;){Y=v[N];var it=mI(Y),ft=it=="wrapper"?qq(Y):e;ft&&jq(ft[0])&&ft[1]==(C|y|b|P)&&!ft[4].length&&ft[9]==1?J=J[mI(ft[0])].apply(J,ft[3]):J=Y.length==1&&jq(Y)?J[it]():J.thru(Y)}return function(){var Dt=arguments,Ot=Dt[0];if(J&&Dt.length==1&&$e(Ot))return J.plant(Ot).value();for(var Vt=0,oe=T?v[Vt].apply(this,Dt):Ot;++Vt<T;)oe=v[Vt].call(this,oe);return oe}})}function hI(m,v,T,N,V,Y,J,it,ft,Dt){var Ot=v&C,Vt=v&d,oe=v&g,Te=v&(y|x),Ne=v&k,er=oe?e:DM(m);function De(){for(var pr=arguments.length,yr=vt(pr),$s=pr;$s--;)yr[$s]=arguments[$s];if(Te)var Na=wx(De),Ks=Zpe(yr,Na);if(N&&(yr=opt(yr,N,V,Te)),Y&&(yr=apt(yr,Y,J,Te)),pr-=Ks,Te&&pr<Dt){var bi=mm(yr,Na);return dpt(m,v,hI,De.placeholder,T,yr,bi,it,ft,Dt-pr)}var nu=Vt?T:this,pp=oe?nu[m]:m;return pr=yr.length,it?yr=oge(yr,it):Ne&&pr>1&&yr.reverse(),Ot&&ft<pr&&(yr.length=ft),this&&this!==fo&&this instanceof De&&(pp=er||DM(pp)),pp.apply(nu,yr)}return De}function fpt(m,v){return function(T,N){return pme(T,m,v(N),{})}}function fI(m,v){return function(T,N){var V;if(T===e&&N===e)return v;if(T!==e&&(V=T),N!==e){if(V===e)return N;typeof T=="string"||typeof N=="string"?(T=js(T),N=js(N)):(T=Zft(T),N=Zft(N)),V=m(T,N)}return V}}function Bq(m){return cp(function(v){return v=Kn(v,Ys(ke())),nr(function(T){var N=this;return m(v,function(V){return Ws(V,N,T)})})})}function pI(m,v){v=v===e?" ":js(v);var T=v.length;if(T<2)return T?kq(v,m):v;var N=kq(v,Q6(m/mx(v)));return dx(v)?bm(tu(N),0,m).join(""):N.slice(0,m)}function Hme(m,v,T,N){var V=v&d,Y=DM(m);function J(){for(var it=-1,ft=arguments.length,Dt=-1,Ot=N.length,Vt=vt(Ot+ft),oe=this&&this!==fo&&this instanceof J?Y:m;++Dt<Ot;)Vt[Dt]=N[Dt];for(;ft--;)Vt[Dt++]=arguments[++it];return Ws(oe,V?T:this,Vt)}return J}function ppt(m){return function(v,T,N){return N&&typeof N!="number"&&Ra(v,T,N)&&(T=N=e),v=fp(v),T===e?(T=v,v=0):T=fp(T),N=N===e?v<T?1:-1:fp(N),Eme(v,T,N,m)}}function dI(m){return function(v,T){return typeof v=="string"&&typeof T=="string"||(v=Kl(v),T=Kl(T)),m(v,T)}}function dpt(m,v,T,N,V,Y,J,it,ft,Dt){var Ot=v&y,Vt=Ot?J:e,oe=Ot?e:J,Te=Ot?Y:e,Ne=Ot?e:Y;v|=Ot?b:S,v&=~(Ot?S:b),v&_||(v&=~(d|g));var er=[m,v,V,Te,Vt,Ne,oe,it,ft,Dt],De=T.apply(e,er);return jq(m)&&Tpt(De,er),De.placeholder=N,Cpt(De,m,v)}function Hq(m){var v=ji[m];return function(T,N){if(T=Kl(T),N=N==null?0:ra(Qe(N),292),N&&Cft(T)){var V=(on(T)+"e").split("e"),Y=v(V[0]+"e"+(+V[1]+N));return V=(on(Y)+"e").split("e"),+(V[0]+"e"+(+V[1]-N))}return v(T)}}var Vme=_x&&1/q6(new _x([,-0]))[1]==z?function(m){return new _x(m)}:lG;function mpt(m){return function(v){var T=na(v);return T==q?gq(v):T==Le?ide(v):Kpe(v,m(v))}}function lp(m,v,T,N,V,Y,J,it){var ft=v&g;if(!ft&&typeof m!="function")throw new Wl(i);var Dt=N?N.length:0;if(Dt||(v&=~(b|S),N=V=e),J=J===e?J:Xi(Qe(J),0),it=it===e?it:Qe(it),Dt-=V?V.length:0,v&S){var Ot=N,Vt=V;N=V=e}var oe=ft?e:qq(m),Te=[m,v,T,N,V,Ot,Vt,Y,J,it];if(oe&&rge(Te,oe),m=Te[0],v=Te[1],T=Te[2],N=Te[3],V=Te[4],it=Te[9]=Te[9]===e?ft?0:m.length:Xi(Te[9]-Dt,0),!it&&v&(y|x)&&(v&=~(y|x)),!v||v==d)var Ne=Fme(m,v,T);else v==y||v==x?Ne=Bme(m,v,it):(v==b||v==(d|b))&&!V.length?Ne=Hme(m,v,T,N):Ne=hI.apply(e,Te);var er=oe?$ft:Tpt;return Cpt(er(Ne,Te),m,v)}function gpt(m,v,T,N){return m===e||ru(m,gx[T])&&!un.call(N,T)?v:m}function _pt(m,v,T,N,V,Y){return ei(m)&&ei(v)&&(Y.set(v,m),sI(m,v,e,_pt,Y),Y.delete(v)),m}function Ume(m){return FM(m)?e:m}function ypt(m,v,T,N,V,Y){var J=T&f,it=m.length,ft=v.length;if(it!=ft&&!(J&&ft>it))return!1;var Dt=Y.get(m),Ot=Y.get(v);if(Dt&&Ot)return Dt==v&&Ot==m;var Vt=-1,oe=!0,Te=T&p?new n_:e;for(Y.set(m,v),Y.set(v,m);++Vt<it;){var Ne=m[Vt],er=v[Vt];if(N)var De=J?N(er,Ne,Vt,v,m,Y):N(Ne,er,Vt,m,v,Y);if(De!==e){if(De)continue;oe=!1;break}if(Te){if(!uq(v,function(pr,yr){if(!MM(Te,yr)&&(Ne===pr||V(Ne,pr,T,N,Y)))return Te.push(yr)})){oe=!1;break}}else if(!(Ne===er||V(Ne,er,T,N,Y))){oe=!1;break}}return Y.delete(m),Y.delete(v),oe}function qme(m,v,T,N,V,Y,J){switch(T){case he:if(m.byteLength!=v.byteLength||m.byteOffset!=v.byteOffset)return!1;m=m.buffer,v=v.buffer;case $t:return!(m.byteLength!=v.byteLength||!Y(new $6(m),new $6(v)));case Kt:case _t:case pt:return ru(+m,+v);case X:return m.name==v.name&&m.message==v.message;case ee:case ar:return m==v+"";case q:var it=gq;case Le:var ft=N&f;if(it||(it=q6),m.size!=v.size&&!ft)return!1;var Dt=J.get(m);if(Dt)return Dt==v;N|=p,J.set(m,v);var Ot=ypt(it(m),it(v),N,V,Y,J);return J.delete(m),Ot;case fr:if(PM)return PM.call(m)==PM.call(v)}return!1}function Gme(m,v,T,N,V,Y){var J=T&f,it=Vq(m),ft=it.length,Dt=Vq(v),Ot=Dt.length;if(ft!=Ot&&!J)return!1;for(var Vt=ft;Vt--;){var oe=it[Vt];if(!(J?oe in v:un.call(v,oe)))return!1}var Te=Y.get(m),Ne=Y.get(v);if(Te&&Ne)return Te==v&&Ne==m;var er=!0;Y.set(m,v),Y.set(v,m);for(var De=J;++Vt<ft;){oe=it[Vt];var pr=m[oe],yr=v[oe];if(N)var $s=J?N(yr,pr,oe,v,m,Y):N(pr,yr,oe,m,v,Y);if(!($s===e?pr===yr||V(pr,yr,T,N,Y):$s)){er=!1;break}De||(De=oe=="constructor")}if(er&&!De){var Na=m.constructor,Ks=v.constructor;Na!=Ks&&"constructor"in m&&"constructor"in v&&!(typeof Na=="function"&&Na instanceof Na&&typeof Ks=="function"&&Ks instanceof Ks)&&(er=!1)}return Y.delete(m),Y.delete(v),er}function cp(m){return $q(Mpt(m,e,Rpt),m+"")}function Vq(m){return Fft(m,po,Wq)}function Uq(m){return Fft(m,gs,vpt)}var qq=eI?function(m){return eI.get(m)}:lG;function mI(m){for(var v=m.name+"",T=yx[v],N=un.call(yx,v)?T.length:0;N--;){var V=T[N],Y=V.func;if(Y==null||Y==m)return V.name}return v}function wx(m){var v=un.call(G,"placeholder")?G:m;return v.placeholder}function ke(){var m=G.iteratee||aG;return m=m===aG?Vft:m,arguments.length?m(arguments[0],arguments[1]):m}function gI(m,v){var T=m.__data__;return Jme(v)?T[typeof v=="string"?"string":"hash"]:T.map}function Gq(m){for(var v=po(m),T=v.length;T--;){var N=v[T],V=m[N];v[T]=[N,V,wpt(V)]}return v}function a_(m,v){var T=ede(m,v);return Hft(T)?T:e}function Wme(m){var v=un.call(m,e_),T=m[e_];try{m[e_]=e;var N=!0}catch(Y){}var V=j6.call(m);return N&&(v?m[e_]=T:delete m[e_]),V}var Wq=yq?function(m){return m==null?[]:(m=vn(m),pm(yq(m),function(v){return Eft.call(m,v)}))}:cG,vpt=yq?function(m){for(var v=[];m;)dm(v,Wq(m)),m=K6(m);return v}:cG,na=ka;(vq&&na(new vq(new ArrayBuffer(1)))!=he||TM&&na(new TM)!=q||xq&&na(xq.resolve())!=kt||_x&&na(new _x)!=Le||CM&&na(new CM)!=$)&&(na=function(m){var v=ka(m),T=v==wt?m.constructor:e,N=T?s_(T):"";if(N)switch(N){case Cde:return he;case Ade:return q;case Pde:return kt;case Ide:return Le;case Lde:return $}return v});function Yme(m,v,T){for(var N=-1,V=T.length;++N<V;){var Y=T[N],J=Y.size;switch(Y.type){case"drop":m+=J;break;case"dropRight":v-=J;break;case"take":v=ra(v,m+J);break;case"takeRight":m=Xi(m,v-J);break}}return{start:m,end:v}}function jme(m){var v=m.match(Et);return v?v[1].split(xt):[]}function xpt(m,v,T){v=xm(v,m);for(var N=-1,V=v.length,Y=!1;++N<V;){var J=_h(v[N]);if(!(Y=m!=null&&T(m,J)))break;m=m[J]}return Y||++N!=V?Y:(V=m==null?0:m.length,!!V&&SI(V)&&up(J,V)&&($e(m)||l_(m)))}function Xme(m){var v=m.length,T=new m.constructor(v);return v&&typeof m[0]=="string"&&un.call(m,"index")&&(T.index=m.index,T.input=m.input),T}function bpt(m){return typeof m.constructor=="function"&&!OM(m)?vx(K6(m)):{}}function $me(m,v,T){var N=m.constructor;switch(v){case $t:return Fq(m);case Kt:case _t:return new N(+m);case he:return kme(m,T);case Tt:case be:case nt:case Ct:case Wt:case fe:case at:case se:case Qt:return npt(m,T);case q:return new N;case pt:case ar:return new N(m);case ee:return Rme(m);case Le:return new N;case fr:return Nme(m)}}function Kme(m,v){var T=v.length;if(!T)return m;var N=T-1;return v[N]=(T>1?"& ":"")+v[N],v=v.join(T>2?", ":" "),m.replace(gt,`{
/* [wrapped with `+v+`] */
`)}function Zme(m){return $e(m)||l_(m)||!!(Tft&&m&&m[Tft])}function up(m,v){var T=typeof m;return v=v==null?U:v,!!v&&(T=="number"||T!="symbol"&&ip.test(m))&&m>-1&&m%1==0&&m<v}function Ra(m,v,T){if(!ei(T))return!1;var N=typeof v;return(N=="number"?ms(T)&&up(v,T.length):N=="string"&&v in T)?ru(T[v],m):!1}function Yq(m,v){if($e(m))return!1;var T=typeof m;return T=="number"||T=="symbol"||T=="boolean"||m==null||Xs(m)?!0:um.test(m)||!cx.test(m)||v!=null&&m in vn(v)}function Jme(m){var v=typeof m;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?m!=="__proto__":m===null}function jq(m){var v=mI(m),T=G[v];if(typeof T!="function"||!(v in gr.prototype))return!1;if(m===T)return!0;var N=qq(T);return!!N&&m===N[0]}function Qme(m){return!!wft&&wft in m}var tge=W6?hp:uG;function OM(m){var v=m&&m.constructor,T=typeof v=="function"&&v.prototype||gx;return m===T}function wpt(m){return m===m&&!ei(m)}function Spt(m,v){return function(T){return T==null?!1:T[m]===v&&(v!==e||m in vn(T))}}function ege(m){var v=bI(m,function(N){return T.size===s&&T.clear(),N}),T=v.cache;return v}function rge(m,v){var T=m[1],N=v[1],V=T|N,Y=V<(d|g|C),J=N==C&&T==y||N==C&&T==P&&m[7].length<=v[8]||N==(C|P)&&v[7].length<=v[8]&&T==y;if(!(Y||J))return m;N&d&&(m[2]=v[2],V|=T&d?0:_);var it=v[3];if(it){var ft=m[3];m[3]=ft?opt(ft,it,v[4]):it,m[4]=ft?mm(m[3],l):v[4]}return it=v[5],it&&(ft=m[5],m[5]=ft?apt(ft,it,v[6]):it,m[6]=ft?mm(m[5],l):v[6]),it=v[7],it&&(m[7]=it),N&C&&(m[8]=m[8]==null?v[8]:ra(m[8],v[8])),m[9]==null&&(m[9]=v[9]),m[0]=v[0],m[1]=V,m}function nge(m){var v=[];if(m!=null)for(var T in vn(m))v.push(T);return v}function ige(m){return j6.call(m)}function Mpt(m,v,T){return v=Xi(v===e?m.length-1:v,0),function(){for(var N=arguments,V=-1,Y=Xi(N.length-v,0),J=vt(Y);++V<Y;)J[V]=N[v+V];V=-1;for(var it=vt(v+1);++V<v;)it[V]=N[V];return it[v]=T(J),Ws(m,this,it)}}function Ept(m,v){return v.length<2?m:o_(m,Xl(v,0,-1))}function oge(m,v){for(var T=m.length,N=ra(v.length,T),V=ds(m);N--;){var Y=v[N];m[N]=up(Y,T)?V[Y]:e}return m}function Xq(m,v){if(!(v==="constructor"&&typeof m[v]=="function")&&v!="__proto__")return m[v]}var Tpt=Apt($ft),zM=xde||function(m,v){return fo.setTimeout(m,v)},$q=Apt(Ame);function Cpt(m,v,T){var N=v+"";return $q(m,Kme(N,age(jme(N),T)))}function Apt(m){var v=0,T=0;return function(){var N=Mde(),V=I-(N-T);if(T=N,V>0){if(++v>=B)return arguments[0]}else v=0;return m.apply(e,arguments)}}function _I(m,v){var T=-1,N=m.length,V=N-1;for(v=v===e?N:v;++T<v;){var Y=Lq(T,V),J=m[Y];m[Y]=m[T],m[T]=J}return m.length=v,m}var Ppt=ege(function(m){var v=[];return m.charCodeAt(0)===46&&v.push(""),m.replace(Q0,function(T,N,V,Y){v.push(V?Y.replace(Ue,"$1"):N||T)}),v});function _h(m){if(typeof m=="string"||Xs(m))return m;var v=m+"";return v=="0"&&1/m==-z?"-0":v}function s_(m){if(m!=null){try{return Y6.call(m)}catch(v){}try{return m+""}catch(v){}}return""}function age(m,v){return Gl(St,function(T){var N="_."+T[0];v&T[1]&&!V6(m,N)&&m.push(N)}),m.sort()}function Ipt(m){if(m instanceof gr)return m.clone();var v=new Yl(m.__wrapped__,m.__chain__);return v.__actions__=ds(m.__actions__),v.__index__=m.__index__,v.__values__=m.__values__,v}function sge(m,v,T){(T?Ra(m,v,T):v===e)?v=1:v=Xi(Qe(v),0);var N=m==null?0:m.length;if(!N||v<1)return[];for(var V=0,Y=0,J=vt(Q6(N/v));V<N;)J[Y++]=Xl(m,V,V+=v);return J}function lge(m){for(var v=-1,T=m==null?0:m.length,N=0,V=[];++v<T;){var Y=m[v];Y&&(V[N++]=Y)}return V}function cge(){var m=arguments.length;if(!m)return[];for(var v=vt(m-1),T=arguments[0],N=m;N--;)v[N-1]=arguments[N];return dm($e(T)?ds(T):[T],Ro(v,1))}var uge=nr(function(m,v){return xi(m)?LM(m,Ro(v,1,xi,!0)):[]}),hge=nr(function(m,v){var T=$l(v);return xi(T)&&(T=e),xi(m)?LM(m,Ro(v,1,xi,!0),ke(T,2)):[]}),fge=nr(function(m,v){var T=$l(v);return xi(T)&&(T=e),xi(m)?LM(m,Ro(v,1,xi,!0),e,T):[]});function pge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),Xl(m,v<0?0:v,N)):[]}function dge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,Xl(m,0,v<0?0:v)):[]}function mge(m,v){return m&&m.length?cI(m,ke(v,3),!0,!0):[]}function gge(m,v){return m&&m.length?cI(m,ke(v,3),!0):[]}function _ge(m,v,T,N){var V=m==null?0:m.length;return V?(T&&typeof T!="number"&&Ra(m,v,T)&&(T=0,N=V),cme(m,v,T,N)):[]}function Lpt(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=T==null?0:Qe(T);return V<0&&(V=Xi(N+V,0)),U6(m,ke(v,3),V)}function kpt(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=N-1;return T!==e&&(V=Qe(T),V=T<0?Xi(N+V,0):ra(V,N-1)),U6(m,ke(v,3),V,!0)}function Rpt(m){var v=m==null?0:m.length;return v?Ro(m,1):[]}function yge(m){var v=m==null?0:m.length;return v?Ro(m,z):[]}function vge(m,v){var T=m==null?0:m.length;return T?(v=v===e?1:Qe(v),Ro(m,v)):[]}function xge(m){for(var v=-1,T=m==null?0:m.length,N={};++v<T;){var V=m[v];N[V[0]]=V[1]}return N}function Npt(m){return m&&m.length?m[0]:e}function bge(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=T==null?0:Qe(T);return V<0&&(V=Xi(N+V,0)),px(m,v,V)}function wge(m){var v=m==null?0:m.length;return v?Xl(m,0,-1):[]}var Sge=nr(function(m){var v=Kn(m,Oq);return v.length&&v[0]===m[0]?Tq(v):[]}),Mge=nr(function(m){var v=$l(m),T=Kn(m,Oq);return v===$l(T)?v=e:T.pop(),T.length&&T[0]===m[0]?Tq(T,ke(v,2)):[]}),Ege=nr(function(m){var v=$l(m),T=Kn(m,Oq);return v=typeof v=="function"?v:e,v&&T.pop(),T.length&&T[0]===m[0]?Tq(T,e,v):[]});function Tge(m,v){return m==null?"":wde.call(m,v)}function $l(m){var v=m==null?0:m.length;return v?m[v-1]:e}function Cge(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=N;return T!==e&&(V=Qe(T),V=V<0?Xi(N+V,0):ra(V,N-1)),v===v?ade(m,v,V):U6(m,dft,V,!0)}function Age(m,v){return m&&m.length?Wft(m,Qe(v)):e}var Pge=nr(Dpt);function Dpt(m,v){return m&&m.length&&v&&v.length?Iq(m,v):m}function Ige(m,v,T){return m&&m.length&&v&&v.length?Iq(m,v,ke(T,2)):m}function Lge(m,v,T){return m&&m.length&&v&&v.length?Iq(m,v,e,T):m}var kge=cp(function(m,v){var T=m==null?0:m.length,N=wq(m,v);return Xft(m,Kn(v,function(V){return up(V,T)?+V:V}).sort(ipt)),N});function Rge(m,v){var T=[];if(!(m&&m.length))return T;var N=-1,V=[],Y=m.length;for(v=ke(v,3);++N<Y;){var J=m[N];v(J,N,m)&&(T.push(J),V.push(N))}return Xft(m,V),T}function Kq(m){return m==null?m:Tde.call(m)}function Nge(m,v,T){var N=m==null?0:m.length;return N?(T&&typeof T!="number"&&Ra(m,v,T)?(v=0,T=N):(v=v==null?0:Qe(v),T=T===e?N:Qe(T)),Xl(m,v,T)):[]}function Dge(m,v){return lI(m,v)}function Oge(m,v,T){return Rq(m,v,ke(T,2))}function zge(m,v){var T=m==null?0:m.length;if(T){var N=lI(m,v);if(N<T&&ru(m[N],v))return N}return-1}function Fge(m,v){return lI(m,v,!0)}function Bge(m,v,T){return Rq(m,v,ke(T,2),!0)}function Hge(m,v){var T=m==null?0:m.length;if(T){var N=lI(m,v,!0)-1;if(ru(m[N],v))return N}return-1}function Vge(m){return m&&m.length?Kft(m):[]}function Uge(m,v){return m&&m.length?Kft(m,ke(v,2)):[]}function qge(m){var v=m==null?0:m.length;return v?Xl(m,1,v):[]}function Gge(m,v,T){return m&&m.length?(v=T||v===e?1:Qe(v),Xl(m,0,v<0?0:v)):[]}function Wge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,Xl(m,v<0?0:v,N)):[]}function Yge(m,v){return m&&m.length?cI(m,ke(v,3),!1,!0):[]}function jge(m,v){return m&&m.length?cI(m,ke(v,3)):[]}var Xge=nr(function(m){return vm(Ro(m,1,xi,!0))}),$ge=nr(function(m){var v=$l(m);return xi(v)&&(v=e),vm(Ro(m,1,xi,!0),ke(v,2))}),Kge=nr(function(m){var v=$l(m);return v=typeof v=="function"?v:e,vm(Ro(m,1,xi,!0),e,v)});function Zge(m){return m&&m.length?vm(m):[]}function Jge(m,v){return m&&m.length?vm(m,ke(v,2)):[]}function Qge(m,v){return v=typeof v=="function"?v:e,m&&m.length?vm(m,e,v):[]}function Zq(m){if(!(m&&m.length))return[];var v=0;return m=pm(m,function(T){if(xi(T))return v=Xi(T.length,v),!0}),dq(v,function(T){return Kn(m,hq(T))})}function Opt(m,v){if(!(m&&m.length))return[];var T=Zq(m);return v==null?T:Kn(T,function(N){return Ws(v,e,N)})}var t0e=nr(function(m,v){return xi(m)?LM(m,v):[]}),e0e=nr(function(m){return Dq(pm(m,xi))}),r0e=nr(function(m){var v=$l(m);return xi(v)&&(v=e),Dq(pm(m,xi),ke(v,2))}),n0e=nr(function(m){var v=$l(m);return v=typeof v=="function"?v:e,Dq(pm(m,xi),e,v)}),i0e=nr(Zq);function o0e(m,v){return tpt(m||[],v||[],IM)}function a0e(m,v){return tpt(m||[],v||[],NM)}var s0e=nr(function(m){var v=m.length,T=v>1?m[v-1]:e;return T=typeof T=="function"?(m.pop(),T):e,Opt(m,T)});function zpt(m){var v=G(m);return v.__chain__=!0,v}function l0e(m,v){return v(m),m}function yI(m,v){return v(m)}var c0e=cp(function(m){var v=m.length,T=v?m[0]:0,N=this.__wrapped__,V=function(Y){return wq(Y,m)};return v>1||this.__actions__.length||!(N instanceof gr)||!up(T)?this.thru(V):(N=N.slice(T,+T+(v?1:0)),N.__actions__.push({func:yI,args:[V],thisArg:e}),new Yl(N,this.__chain__).thru(function(Y){return v&&!Y.length&&Y.push(e),Y}))});function u0e(){return zpt(this)}function h0e(){return new Yl(this.value(),this.__chain__)}function f0e(){this.__values__===e&&(this.__values__=Zpt(this.value()));var m=this.__index__>=this.__values__.length,v=m?e:this.__values__[this.__index__++];return{done:m,value:v}}function p0e(){return this}function d0e(m){for(var v,T=this;T instanceof nI;){var N=Ipt(T);N.__index__=0,N.__values__=e,v?V.__wrapped__=N:v=N;var V=N;T=T.__wrapped__}return V.__wrapped__=m,v}function m0e(){var m=this.__wrapped__;if(m instanceof gr){var v=m;return this.__actions__.length&&(v=new gr(this)),v=v.reverse(),v.__actions__.push({func:yI,args:[Kq],thisArg:e}),new Yl(v,this.__chain__)}return this.thru(Kq)}function g0e(){return Qft(this.__wrapped__,this.__actions__)}var _0e=uI(function(m,v,T){un.call(m,T)?++m[T]:sp(m,T,1)});function y0e(m,v,T){var N=$e(m)?fft:lme;return T&&Ra(m,v,T)&&(v=e),N(m,ke(v,3))}function v0e(m,v){var T=$e(m)?pm:Oft;return T(m,ke(v,3))}var x0e=upt(Lpt),b0e=upt(kpt);function w0e(m,v){return Ro(vI(m,v),1)}function S0e(m,v){return Ro(vI(m,v),z)}function M0e(m,v,T){return T=T===e?1:Qe(T),Ro(vI(m,v),T)}function Fpt(m,v){var T=$e(m)?Gl:ym;return T(m,ke(v,3))}function Bpt(m,v){var T=$e(m)?qpe:Dft;return T(m,ke(v,3))}var E0e=uI(function(m,v,T){un.call(m,T)?m[T].push(v):sp(m,T,[v])});function T0e(m,v,T,N){m=ms(m)?m:Mx(m),T=T&&!N?Qe(T):0;var V=m.length;return T<0&&(T=Xi(V+T,0)),MI(m)?T<=V&&m.indexOf(v,T)>-1:!!V&&px(m,v,T)>-1}var C0e=nr(function(m,v,T){var N=-1,V=typeof v=="function",Y=ms(m)?vt(m.length):[];return ym(m,function(J){Y[++N]=V?Ws(v,J,T):kM(J,v,T)}),Y}),A0e=uI(function(m,v,T){sp(m,T,v)});function vI(m,v){var T=$e(m)?Kn:Uft;return T(m,ke(v,3))}function P0e(m,v,T,N){return m==null?[]:($e(v)||(v=v==null?[]:[v]),T=N?e:T,$e(T)||(T=T==null?[]:[T]),Yft(m,v,T))}var I0e=uI(function(m,v,T){m[T?0:1].push(v)},function(){return[[],[]]});function L0e(m,v,T){var N=$e(m)?cq:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,ym)}function k0e(m,v,T){var N=$e(m)?Gpe:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,Dft)}function R0e(m,v){var T=$e(m)?pm:Oft;return T(m,wI(ke(v,3)))}function N0e(m){var v=$e(m)?Lft:Tme;return v(m)}function D0e(m,v,T){(T?Ra(m,v,T):v===e)?v=1:v=Qe(v);var N=$e(m)?nme:Cme;return N(m,v)}function O0e(m){var v=$e(m)?ime:Pme;return v(m)}function z0e(m){if(m==null)return 0;if(ms(m))return MI(m)?mx(m):m.length;var v=na(m);return v==q||v==Le?m.size:Aq(m).length}function F0e(m,v,T){var N=$e(m)?uq:Ime;return T&&Ra(m,v,T)&&(v=e),N(m,ke(v,3))}var B0e=nr(function(m,v){if(m==null)return[];var T=v.length;return T>1&&Ra(m,v[0],v[1])?v=[]:T>2&&Ra(v[0],v[1],v[2])&&(v=[v[0]]),Yft(m,Ro(v,1),[])}),xI=vde||function(){return fo.Date.now()};function H0e(m,v){if(typeof v!="function")throw new Wl(i);return m=Qe(m),function(){if(--m<1)return v.apply(this,arguments)}}function Hpt(m,v,T){return v=T?e:v,v=m&&v==null?m.length:v,lp(m,C,e,e,e,e,v)}function Vpt(m,v){var T;if(typeof v!="function")throw new Wl(i);return m=Qe(m),function(){return--m>0&&(T=v.apply(this,arguments)),m<=1&&(v=e),T}}var Jq=nr(function(m,v,T){var N=d;if(T.length){var V=mm(T,wx(Jq));N|=b}return lp(m,N,v,T,V)}),Upt=nr(function(m,v,T){var N=d|g;if(T.length){var V=mm(T,wx(Upt));N|=b}return lp(v,N,m,T,V)});function qpt(m,v,T){v=T?e:v;var N=lp(m,y,e,e,e,e,e,v);return N.placeholder=qpt.placeholder,N}function Gpt(m,v,T){v=T?e:v;var N=lp(m,x,e,e,e,e,e,v);return N.placeholder=Gpt.placeholder,N}function Wpt(m,v,T){var N,V,Y,J,it,ft,Dt=0,Ot=!1,Vt=!1,oe=!0;if(typeof m!="function")throw new Wl(i);v=Kl(v)||0,ei(T)&&(Ot=!!T.leading,Vt="maxWait"in T,Y=Vt?Xi(Kl(T.maxWait)||0,v):Y,oe="trailing"in T?!!T.trailing:oe);function Te(bi){var nu=N,pp=V;return N=V=e,Dt=bi,J=m.apply(pp,nu),J}function Ne(bi){return Dt=bi,it=zM(pr,v),Ot?Te(bi):J}function er(bi){var nu=bi-ft,pp=bi-Dt,udt=v-nu;return Vt?ra(udt,Y-pp):udt}function De(bi){var nu=bi-ft,pp=bi-Dt;return ft===e||nu>=v||nu<0||Vt&&pp>=Y}function pr(){var bi=xI();if(De(bi))return yr(bi);it=zM(pr,er(bi))}function yr(bi){return it=e,oe&&N?Te(bi):(N=V=e,J)}function $s(){it!==e&&ept(it),Dt=0,N=ft=V=it=e}function Na(){return it===e?J:yr(xI())}function Ks(){var bi=xI(),nu=De(bi);if(N=arguments,V=this,ft=bi,nu){if(it===e)return Ne(ft);if(Vt)return ept(it),it=zM(pr,v),Te(ft)}return it===e&&(it=zM(pr,v)),J}return Ks.cancel=$s,Ks.flush=Na,Ks}var V0e=nr(function(m,v){return Nft(m,1,v)}),U0e=nr(function(m,v,T){return Nft(m,Kl(v)||0,T)});function q0e(m){return lp(m,k)}function bI(m,v){if(typeof m!="function"||v!=null&&typeof v!="function")throw new Wl(i);var T=function(){var N=arguments,V=v?v.apply(this,N):N[0],Y=T.cache;if(Y.has(V))return Y.get(V);var J=m.apply(this,N);return T.cache=Y.set(V,J)||Y,J};return T.cache=new(bI.Cache||ap),T}bI.Cache=ap;function wI(m){if(typeof m!="function")throw new Wl(i);return function(){var v=arguments;switch(v.length){case 0:return!m.call(this);case 1:return!m.call(this,v[0]);case 2:return!m.call(this,v[0],v[1]);case 3:return!m.call(this,v[0],v[1],v[2])}return!m.apply(this,v)}}function G0e(m){return Vpt(2,m)}var W0e=Lme(function(m,v){v=v.length==1&&$e(v[0])?Kn(v[0],Ys(ke())):Kn(Ro(v,1),Ys(ke()));var T=v.length;return nr(function(N){for(var V=-1,Y=ra(N.length,T);++V<Y;)N[V]=v[V].call(this,N[V]);return Ws(m,this,N)})}),Qq=nr(function(m,v){var T=mm(v,wx(Qq));return lp(m,b,e,v,T)}),Ypt=nr(function(m,v){var T=mm(v,wx(Ypt));return lp(m,S,e,v,T)}),Y0e=cp(function(m,v){return lp(m,P,e,e,e,v)});function j0e(m,v){if(typeof m!="function")throw new Wl(i);return v=v===e?v:Qe(v),nr(m,v)}function X0e(m,v){if(typeof m!="function")throw new Wl(i);return v=v==null?0:Xi(Qe(v),0),nr(function(T){var N=T[v],V=bm(T,0,v);return N&&dm(V,N),Ws(m,this,V)})}function $0e(m,v,T){var N=!0,V=!0;if(typeof m!="function")throw new Wl(i);return ei(T)&&(N="leading"in T?!!T.leading:N,V="trailing"in T?!!T.trailing:V),Wpt(m,v,{leading:N,maxWait:v,trailing:V})}function K0e(m){return Hpt(m,1)}function Z0e(m,v){return Qq(zq(v),m)}function J0e(){if(!arguments.length)return[];var m=arguments[0];return $e(m)?m:[m]}function Q0e(m){return jl(m,h)}function t_e(m,v){return v=typeof v=="function"?v:e,jl(m,h,v)}function e_e(m){return jl(m,c|h)}function r_e(m,v){return v=typeof v=="function"?v:e,jl(m,c|h,v)}function n_e(m,v){return v==null||Rft(m,v,po(v))}function ru(m,v){return m===v||m!==m&&v!==v}var i_e=dI(Eq),o_e=dI(function(m,v){return m>=v}),l_=Bft(function(){return arguments}())?Bft:function(m){return si(m)&&un.call(m,"callee")&&!Eft.call(m,"callee")},$e=vt.isArray,a_e=aft?Ys(aft):dme;function ms(m){return m!=null&&SI(m.length)&&!hp(m)}function xi(m){return si(m)&&ms(m)}function s_e(m){return m===!0||m===!1||si(m)&&ka(m)==Kt}var wm=bde||uG,l_e=sft?Ys(sft):mme;function c_e(m){return si(m)&&m.nodeType===1&&!FM(m)}function u_e(m){if(m==null)return!0;if(ms(m)&&($e(m)||typeof m=="string"||typeof m.splice=="function"||wm(m)||Sx(m)||l_(m)))return!m.length;var v=na(m);if(v==q||v==Le)return!m.size;if(OM(m))return!Aq(m).length;for(var T in m)if(un.call(m,T))return!1;return!0}function h_e(m,v){return RM(m,v)}function f_e(m,v,T){T=typeof T=="function"?T:e;var N=T?T(m,v):e;return N===e?RM(m,v,e,T):!!N}function tG(m){if(!si(m))return!1;var v=ka(m);return v==X||v==ct||typeof m.message=="string"&&typeof m.name=="string"&&!FM(m)}function p_e(m){return typeof m=="number"&&Cft(m)}function hp(m){if(!ei(m))return!1;var v=ka(m);return v==et||v==dt||v==lt||v==ie}function jpt(m){return typeof m=="number"&&m==Qe(m)}function SI(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=U}function ei(m){var v=typeof m;return m!=null&&(v=="object"||v=="function")}function si(m){return m!=null&&typeof m=="object"}var Xpt=lft?Ys(lft):_me;function d_e(m,v){return m===v||Cq(m,v,Gq(v))}function m_e(m,v,T){return T=typeof T=="function"?T:e,Cq(m,v,Gq(v),T)}function g_e(m){return $pt(m)&&m!=+m}function __e(m){if(tge(m))throw new We(n);return Hft(m)}function y_e(m){return m===null}function v_e(m){return m==null}function $pt(m){return typeof m=="number"||si(m)&&ka(m)==pt}function FM(m){if(!si(m)||ka(m)!=wt)return!1;var v=K6(m);if(v===null)return!0;var T=un.call(v,"constructor")&&v.constructor;return typeof T=="function"&&T instanceof T&&Y6.call(T)==mde}var eG=cft?Ys(cft):yme;function x_e(m){return jpt(m)&&m>=-U&&m<=U}var Kpt=uft?Ys(uft):vme;function MI(m){return typeof m=="string"||!$e(m)&&si(m)&&ka(m)==ar}function Xs(m){return typeof m=="symbol"||si(m)&&ka(m)==fr}var Sx=hft?Ys(hft):xme;function b_e(m){return m===e}function w_e(m){return si(m)&&na(m)==$}function S_e(m){return si(m)&&ka(m)==It}var M_e=dI(Pq),E_e=dI(function(m,v){return m<=v});function Zpt(m){if(!m)return[];if(ms(m))return MI(m)?tu(m):ds(m);if(EM&&m[EM])return nde(m[EM]());var v=na(m),T=v==q?gq:v==Le?q6:Mx;return T(m)}function fp(m){if(!m)return m===0?m:0;if(m=Kl(m),m===z||m===-z){var v=m<0?-1:1;return v*W}return m===m?m:0}function Qe(m){var v=fp(m),T=v%1;return v===v?T?v-T:v:0}function Jpt(m){return m?i_(Qe(m),0,rt):0}function Kl(m){if(typeof m=="number")return m;if(Xs(m))return Z;if(ei(m)){var v=typeof m.valueOf=="function"?m.valueOf():m;m=ei(v)?v+"":v}if(typeof m!="string")return m===0?m:+m;m=_ft(m);var T=_r.test(m);return T||Xn.test(m)?Hpe(m.slice(2),T?2:8):Xr.test(m)?Z:+m}function Qpt(m){return gh(m,gs(m))}function T_e(m){return m?i_(Qe(m),-U,U):m===0?m:0}function on(m){return m==null?"":js(m)}var C_e=xx(function(m,v){if(OM(v)||ms(v)){gh(v,po(v),m);return}for(var T in v)un.call(v,T)&&IM(m,T,v[T])}),tdt=xx(function(m,v){gh(v,gs(v),m)}),EI=xx(function(m,v,T,N){gh(v,gs(v),m,N)}),A_e=xx(function(m,v,T,N){gh(v,po(v),m,N)}),P_e=cp(wq);function I_e(m,v){var T=vx(m);return v==null?T:kft(T,v)}var L_e=nr(function(m,v){m=vn(m);var T=-1,N=v.length,V=N>2?v[2]:e;for(V&&Ra(v[0],v[1],V)&&(N=1);++T<N;)for(var Y=v[T],J=gs(Y),it=-1,ft=J.length;++it<ft;){var Dt=J[it],Ot=m[Dt];(Ot===e||ru(Ot,gx[Dt])&&!un.call(m,Dt))&&(m[Dt]=Y[Dt])}return m}),k_e=nr(function(m){return m.push(e,_pt),Ws(edt,e,m)});function R_e(m,v){return pft(m,ke(v,3),mh)}function N_e(m,v){return pft(m,ke(v,3),Mq)}function D_e(m,v){return m==null?m:Sq(m,ke(v,3),gs)}function O_e(m,v){return m==null?m:zft(m,ke(v,3),gs)}function z_e(m,v){return m&&mh(m,ke(v,3))}function F_e(m,v){return m&&Mq(m,ke(v,3))}function B_e(m){return m==null?[]:aI(m,po(m))}function H_e(m){return m==null?[]:aI(m,gs(m))}function rG(m,v,T){var N=m==null?e:o_(m,v);return N===e?T:N}function V_e(m,v){return m!=null&&xpt(m,v,ume)}function nG(m,v){return m!=null&&xpt(m,v,hme)}var U_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=j6.call(v)),m[v]=T},oG(_s)),q_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=j6.call(v)),un.call(m,v)?m[v].push(T):m[v]=[T]},ke),G_e=nr(kM);function po(m){return ms(m)?Ift(m):Aq(m)}function gs(m){return ms(m)?Ift(m,!0):bme(m)}function W_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){sp(T,v(N,V,Y),N)}),T}function Y_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){sp(T,V,v(N,V,Y))}),T}var j_e=xx(function(m,v,T){sI(m,v,T)}),edt=xx(function(m,v,T,N){sI(m,v,T,N)}),X_e=cp(function(m,v){var T={};if(m==null)return T;var N=!1;v=Kn(v,function(Y){return Y=xm(Y,m),N||(N=Y.length>1),Y}),gh(m,Uq(m),T),N&&(T=jl(T,c|u|h,Ume));for(var V=v.length;V--;)Nq(T,v[V]);return T});function $_e(m,v){return rdt(m,wI(ke(v)))}var K_e=cp(function(m,v){return m==null?{}:Sme(m,v)});function rdt(m,v){if(m==null)return{};var T=Kn(Uq(m),function(N){return[N]});return v=ke(v),jft(m,T,function(N,V){return v(N,V[0])})}function Z_e(m,v,T){v=xm(v,m);var N=-1,V=v.length;for(V||(V=1,m=e);++N<V;){var Y=m==null?e:m[_h(v[N])];Y===e&&(N=V,Y=T),m=hp(Y)?Y.call(m):Y}return m}function J_e(m,v,T){return m==null?m:NM(m,v,T)}function Q_e(m,v,T,N){return N=typeof N=="function"?N:e,m==null?m:NM(m,v,T,N)}var ndt=mpt(po),idt=mpt(gs);function tye(m,v,T){var N=$e(m),V=N||wm(m)||Sx(m);if(v=ke(v,4),T==null){var Y=m&&m.constructor;V?T=N?new Y:[]:ei(m)?T=hp(Y)?vx(K6(m)):{}:T={}}return(V?Gl:mh)(m,function(J,it,ft){return v(T,J,it,ft)}),T}function eye(m,v){return m==null?!0:Nq(m,v)}function rye(m,v,T){return m==null?m:Jft(m,v,zq(T))}function nye(m,v,T,N){return N=typeof N=="function"?N:e,m==null?m:Jft(m,v,zq(T),N)}function Mx(m){return m==null?[]:mq(m,po(m))}function iye(m){return m==null?[]:mq(m,gs(m))}function oye(m,v,T){return T===e&&(T=v,v=e),T!==e&&(T=Kl(T),T=T===T?T:0),v!==e&&(v=Kl(v),v=v===v?v:0),i_(Kl(m),v,T)}function aye(m,v,T){return v=fp(v),T===e?(T=v,v=0):T=fp(T),m=Kl(m),fme(m,v,T)}function sye(m,v,T){if(T&&typeof T!="boolean"&&Ra(m,v,T)&&(v=T=e),T===e&&(typeof v=="boolean"?(T=v,v=e):typeof m=="boolean"&&(T=m,m=e)),m===e&&v===e?(m=0,v=1):(m=fp(m),v===e?(v=m,m=0):v=fp(v)),m>v){var N=m;m=v,v=N}if(T||m%1||v%1){var V=Aft();return ra(m+V*(v-m+Bpe("1e-"+((V+"").length-1))),v)}return Lq(m,v)}var lye=bx(function(m,v,T){return v=v.toLowerCase(),m+(T?odt(v):v)});function odt(m){return iG(on(m).toLowerCase())}function adt(m){return m=on(m),m&&m.replace(hm,Jpe).replace(Ppe,"")}function cye(m,v,T){m=on(m),v=js(v);var N=m.length;T=T===e?N:i_(Qe(T),0,N);var V=T;return T-=v.length,T>=0&&m.slice(T,V)==v}function uye(m){return m=on(m),m&&Ar.test(m)?m.replace(yn,Qpe):m}function hye(m){return m=on(m),m&&ux.test(m)?m.replace(cn,"\\$&"):m}var fye=bx(function(m,v,T){return m+(T?"-":"")+v.toLowerCase()}),pye=bx(function(m,v,T){return m+(T?" ":"")+v.toLowerCase()}),dye=cpt("toLowerCase");function mye(m,v,T){m=on(m),v=Qe(v);var N=v?mx(m):0;if(!v||N>=v)return m;var V=(v-N)/2;return pI(tI(V),T)+m+pI(Q6(V),T)}function gye(m,v,T){m=on(m),v=Qe(v);var N=v?mx(m):0;return v&&N<v?m+pI(v-N,T):m}function _ye(m,v,T){m=on(m),v=Qe(v);var N=v?mx(m):0;return v&&N<v?pI(v-N,T)+m:m}function yye(m,v,T){return T||v==null?v=0:v&&(v=+v),Ede(on(m).replace(np,""),v||0)}function vye(m,v,T){return(T?Ra(m,v,T):v===e)?v=1:v=Qe(v),kq(on(m),v)}function xye(){var m=arguments,v=on(m[0]);return m.length<3?v:v.replace(m[1],m[2])}var bye=bx(function(m,v,T){return m+(T?"_":"")+v.toLowerCase()});function wye(m,v,T){return T&&typeof T!="number"&&Ra(m,v,T)&&(v=T=e),T=T===e?rt:T>>>0,T?(m=on(m),m&&(typeof v=="string"||v!=null&&!eG(v))&&(v=js(v),!v&&dx(m))?bm(tu(m),0,T):m.split(v,T)):[]}var Sye=bx(function(m,v,T){return m+(T?" ":"")+iG(v)});function Mye(m,v,T){return m=on(m),T=T==null?0:i_(Qe(T),0,m.length),v=js(v),m.slice(T,T+v.length)==v}function Eye(m,v,T){var N=G.templateSettings;T&&Ra(m,v,T)&&(v=e),m=on(m),v=EI({},v,N,gpt);var V=EI({},v.imports,N.imports,gpt),Y=po(V),J=mq(V,Y),it,ft,Dt=0,Ot=v.interpolate||mr,Vt="__p += '",oe=_q((v.escape||mr).source+"|"+Ot.source+"|"+(Ot===La?tr:mr).source+"|"+(v.evaluate||mr).source+"|$","g"),Te="//# sourceURL="+(un.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Npe+"]")+`
`;m.replace(oe,function(De,pr,yr,$s,Na,Ks){return yr||(yr=$s),Vt+=m.slice(Dt,Ks).replace(Bl,tde),pr&&(it=!0,Vt+=`' +
__e(`+pr+`) +
'`),Na&&(ft=!0,Vt+=`';
`+Na+`;
__p += '`),yr&&(Vt+=`' +
((__t = (`+yr+`)) == null ? '' : __t) +
'`),Dt=Ks+De.length,De}),Vt+=`';
`;var Ne=un.call(v,"variable")&&v.variable;if(!Ne)Vt=`with (obj) {
`+Vt+`
}
`;else if(Ve.test(Ne))throw new We(o);Vt=(ft?Vt.replace(Ce,""):Vt).replace(Pt,"$1").replace(Nt,"$1;"),Vt="function("+(Ne||"obj")+`) {
`+(Ne?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(it?", __e = _.escape":"")+(ft?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Vt+`return __p
}`;var er=ldt(function(){return $r(Y,Te+"return "+Vt).apply(e,J)});if(er.source=Vt,tG(er))throw er;return er}function Tye(m){return on(m).toLowerCase()}function Cye(m){return on(m).toUpperCase()}function Aye(m,v,T){if(m=on(m),m&&(T||v===e))return _ft(m);if(!m||!(v=js(v)))return m;var N=tu(m),V=tu(v),Y=yft(N,V),J=vft(N,V)+1;return bm(N,Y,J).join("")}function Pye(m,v,T){if(m=on(m),m&&(T||v===e))return m.slice(0,bft(m)+1);if(!m||!(v=js(v)))return m;var N=tu(m),V=vft(N,tu(v))+1;return bm(N,0,V).join("")}function Iye(m,v,T){if(m=on(m),m&&(T||v===e))return m.replace(np,"");if(!m||!(v=js(v)))return m;var N=tu(m),V=yft(N,tu(v));return bm(N,V).join("")}function Lye(m,v){var T=O,N=D;if(ei(v)){var V="separator"in v?v.separator:V;T="length"in v?Qe(v.length):T,N="omission"in v?js(v.omission):N}m=on(m);var Y=m.length;if(dx(m)){var J=tu(m);Y=J.length}if(T>=Y)return m;var it=T-mx(N);if(it<1)return N;var ft=J?bm(J,0,it).join(""):m.slice(0,it);if(V===e)return ft+N;if(J&&(it+=ft.length-it),eG(V)){if(m.slice(it).search(V)){var Dt,Ot=ft;for(V.global||(V=_q(V.source,on(Ke.exec(V))+"g")),V.lastIndex=0;Dt=V.exec(Ot);)var Vt=Dt.index;ft=ft.slice(0,Vt===e?it:Vt)}}else if(m.indexOf(js(V),it)!=it){var oe=ft.lastIndexOf(V);oe>-1&&(ft=ft.slice(0,oe))}return ft+N}function kye(m){return m=on(m),m&&Wi.test(m)?m.replace(ze,sde):m}var Rye=bx(function(m,v,T){return m+(T?" ":"")+v.toUpperCase()}),iG=cpt("toUpperCase");function sdt(m,v,T){return m=on(m),v=T?e:v,v===e?rde(m)?ude(m):jpe(m):m.match(v)||[]}var ldt=nr(function(m,v){try{return Ws(m,e,v)}catch(T){return tG(T)?T:new We(T)}}),Nye=cp(function(m,v){return Gl(v,function(T){T=_h(T),sp(m,T,Jq(m[T],m))}),m});function Dye(m){var v=m==null?0:m.length,T=ke();return m=v?Kn(m,function(N){if(typeof N[1]!="function")throw new Wl(i);return[T(N[0]),N[1]]}):[],nr(function(N){for(var V=-1;++V<v;){var Y=m[V];if(Ws(Y[0],this,N))return Ws(Y[1],this,N)}})}function Oye(m){return sme(jl(m,c))}function oG(m){return function(){return m}}function zye(m,v){return m==null||m!==m?v:m}var Fye=hpt(),Bye=hpt(!0);function _s(m){return m}function aG(m){return Vft(typeof m=="function"?m:jl(m,c))}function Hye(m){return qft(jl(m,c))}function Vye(m,v){return Gft(m,jl(v,c))}var Uye=nr(function(m,v){return function(T){return kM(T,m,v)}}),qye=nr(function(m,v){return function(T){return kM(m,T,v)}});function sG(m,v,T){var N=po(v),V=aI(v,N);T==null&&!(ei(v)&&(V.length||!N.length))&&(T=v,v=m,m=this,V=aI(v,po(v)));var Y=!(ei(T)&&"chain"in T)||!!T.chain,J=hp(m);return Gl(V,function(it){var ft=v[it];m[it]=ft,J&&(m.prototype[it]=function(){var Dt=this.__chain__;if(Y||Dt){var Ot=m(this.__wrapped__),Vt=Ot.__actions__=ds(this.__actions__);return Vt.push({func:ft,args:arguments,thisArg:m}),Ot.__chain__=Dt,Ot}return ft.apply(m,dm([this.value()],arguments))})}),m}function Gye(){return fo._===this&&(fo._=gde),this}function lG(){}function Wye(m){return m=Qe(m),nr(function(v){return Wft(v,m)})}var Yye=Bq(Kn),jye=Bq(fft),Xye=Bq(uq);function cdt(m){return Yq(m)?hq(_h(m)):Mme(m)}function $ye(m){return function(v){return m==null?e:o_(m,v)}}var Kye=ppt(),Zye=ppt(!0);function cG(){return[]}function uG(){return!1}function Jye(){return{}}function Qye(){return""}function tve(){return!0}function eve(m,v){if(m=Qe(m),m<1||m>U)return[];var T=rt,N=ra(m,rt);v=ke(v),m-=rt;for(var V=dq(N,v);++T<m;)v(T);return V}function rve(m){return $e(m)?Kn(m,_h):Xs(m)?[m]:ds(Ppt(on(m)))}function nve(m){var v=++dde;return on(m)+v}var ive=fI(function(m,v){return m+v},0),ove=Hq("ceil"),ave=fI(function(m,v){return m/v},1),sve=Hq("floor");function lve(m){return m&&m.length?oI(m,_s,Eq):e}function cve(m,v){return m&&m.length?oI(m,ke(v,2),Eq):e}function uve(m){return mft(m,_s)}function hve(m,v){return mft(m,ke(v,2))}function fve(m){return m&&m.length?oI(m,_s,Pq):e}function pve(m,v){return m&&m.length?oI(m,ke(v,2),Pq):e}var dve=fI(function(m,v){return m*v},1),mve=Hq("round"),gve=fI(function(m,v){return m-v},0);function _ve(m){return m&&m.length?pq(m,_s):0}function yve(m,v){return m&&m.length?pq(m,ke(v,2)):0}return G.after=H0e,G.ary=Hpt,G.assign=C_e,G.assignIn=tdt,G.assignInWith=EI,G.assignWith=A_e,G.at=P_e,G.before=Vpt,G.bind=Jq,G.bindAll=Nye,G.bindKey=Upt,G.castArray=J0e,G.chain=zpt,G.chunk=sge,G.compact=lge,G.concat=cge,G.cond=Dye,G.conforms=Oye,G.constant=oG,G.countBy=_0e,G.create=I_e,G.curry=qpt,G.curryRight=Gpt,G.debounce=Wpt,G.defaults=L_e,G.defaultsDeep=k_e,G.defer=V0e,G.delay=U0e,G.difference=uge,G.differenceBy=hge,G.differenceWith=fge,G.drop=pge,G.dropRight=dge,G.dropRightWhile=mge,G.dropWhile=gge,G.fill=_ge,G.filter=v0e,G.flatMap=w0e,G.flatMapDeep=S0e,G.flatMapDepth=M0e,G.flatten=Rpt,G.flattenDeep=yge,G.flattenDepth=vge,G.flip=q0e,G.flow=Fye,G.flowRight=Bye,G.fromPairs=xge,G.functions=B_e,G.functionsIn=H_e,G.groupBy=E0e,G.initial=wge,G.intersection=Sge,G.intersectionBy=Mge,G.intersectionWith=Ege,G.invert=U_e,G.invertBy=q_e,G.invokeMap=C0e,G.iteratee=aG,G.keyBy=A0e,G.keys=po,G.keysIn=gs,G.map=vI,G.mapKeys=W_e,G.mapValues=Y_e,G.matches=Hye,G.matchesProperty=Vye,G.memoize=bI,G.merge=j_e,G.mergeWith=edt,G.method=Uye,G.methodOf=qye,G.mixin=sG,G.negate=wI,G.nthArg=Wye,G.omit=X_e,G.omitBy=$_e,G.once=G0e,G.orderBy=P0e,G.over=Yye,G.overArgs=W0e,G.overEvery=jye,G.overSome=Xye,G.partial=Qq,G.partialRight=Ypt,G.partition=I0e,G.pick=K_e,G.pickBy=rdt,G.property=cdt,G.propertyOf=$ye,G.pull=Pge,G.pullAll=Dpt,G.pullAllBy=Ige,G.pullAllWith=Lge,G.pullAt=kge,G.range=Kye,G.rangeRight=Zye,G.rearg=Y0e,G.reject=R0e,G.remove=Rge,G.rest=j0e,G.reverse=Kq,G.sampleSize=D0e,G.set=J_e,G.setWith=Q_e,G.shuffle=O0e,G.slice=Nge,G.sortBy=B0e,G.sortedUniq=Vge,G.sortedUniqBy=Uge,G.split=wye,G.spread=X0e,G.tail=qge,G.take=Gge,G.takeRight=Wge,G.takeRightWhile=Yge,G.takeWhile=jge,G.tap=l0e,G.throttle=$0e,G.thru=yI,G.toArray=Zpt,G.toPairs=ndt,G.toPairsIn=idt,G.toPath=rve,G.toPlainObject=Qpt,G.transform=tye,G.unary=K0e,G.union=Xge,G.unionBy=$ge,G.unionWith=Kge,G.uniq=Zge,G.uniqBy=Jge,G.uniqWith=Qge,G.unset=eye,G.unzip=Zq,G.unzipWith=Opt,G.update=rye,G.updateWith=nye,G.values=Mx,G.valuesIn=iye,G.without=t0e,G.words=sdt,G.wrap=Z0e,G.xor=e0e,G.xorBy=r0e,G.xorWith=n0e,G.zip=i0e,G.zipObject=o0e,G.zipObjectDeep=a0e,G.zipWith=s0e,G.entries=ndt,G.entriesIn=idt,G.extend=tdt,G.extendWith=EI,sG(G,G),G.add=ive,G.attempt=ldt,G.camelCase=lye,G.capitalize=odt,G.ceil=ove,G.clamp=oye,G.clone=Q0e,G.cloneDeep=e_e,G.cloneDeepWith=r_e,G.cloneWith=t_e,G.conformsTo=n_e,G.deburr=adt,G.defaultTo=zye,G.divide=ave,G.endsWith=cye,G.eq=ru,G.escape=uye,G.escapeRegExp=hye,G.every=y0e,G.find=x0e,G.findIndex=Lpt,G.findKey=R_e,G.findLast=b0e,G.findLastIndex=kpt,G.findLastKey=N_e,G.floor=sve,G.forEach=Fpt,G.forEachRight=Bpt,G.forIn=D_e,G.forInRight=O_e,G.forOwn=z_e,G.forOwnRight=F_e,G.get=rG,G.gt=i_e,G.gte=o_e,G.has=V_e,G.hasIn=nG,G.head=Npt,G.identity=_s,G.includes=T0e,G.indexOf=bge,G.inRange=aye,G.invoke=G_e,G.isArguments=l_,G.isArray=$e,G.isArrayBuffer=a_e,G.isArrayLike=ms,G.isArrayLikeObject=xi,G.isBoolean=s_e,G.isBuffer=wm,G.isDate=l_e,G.isElement=c_e,G.isEmpty=u_e,G.isEqual=h_e,G.isEqualWith=f_e,G.isError=tG,G.isFinite=p_e,G.isFunction=hp,G.isInteger=jpt,G.isLength=SI,G.isMap=Xpt,G.isMatch=d_e,G.isMatchWith=m_e,G.isNaN=g_e,G.isNative=__e,G.isNil=v_e,G.isNull=y_e,G.isNumber=$pt,G.isObject=ei,G.isObjectLike=si,G.isPlainObject=FM,G.isRegExp=eG,G.isSafeInteger=x_e,G.isSet=Kpt,G.isString=MI,G.isSymbol=Xs,G.isTypedArray=Sx,G.isUndefined=b_e,G.isWeakMap=w_e,G.isWeakSet=S_e,G.join=Tge,G.kebabCase=fye,G.last=$l,G.lastIndexOf=Cge,G.lowerCase=pye,G.lowerFirst=dye,G.lt=M_e,G.lte=E_e,G.max=lve,G.maxBy=cve,G.mean=uve,G.meanBy=hve,G.min=fve,G.minBy=pve,G.stubArray=cG,G.stubFalse=uG,G.stubObject=Jye,G.stubString=Qye,G.stubTrue=tve,G.multiply=dve,G.nth=Age,G.noConflict=Gye,G.noop=lG,G.now=xI,G.pad=mye,G.padEnd=gye,G.padStart=_ye,G.parseInt=yye,G.random=sye,G.reduce=L0e,G.reduceRight=k0e,G.repeat=vye,G.replace=xye,G.result=Z_e,G.round=mve,G.runInContext=ut,G.sample=N0e,G.size=z0e,G.snakeCase=bye,G.some=F0e,G.sortedIndex=Dge,G.sortedIndexBy=Oge,G.sortedIndexOf=zge,G.sortedLastIndex=Fge,G.sortedLastIndexBy=Bge,G.sortedLastIndexOf=Hge,G.startCase=Sye,G.startsWith=Mye,G.subtract=gve,G.sum=_ve,G.sumBy=yve,G.template=Eye,G.times=eve,G.toFinite=fp,G.toInteger=Qe,G.toLength=Jpt,G.toLower=Tye,G.toNumber=Kl,G.toSafeInteger=T_e,G.toString=on,G.toUpper=Cye,G.trim=Aye,G.trimEnd=Pye,G.trimStart=Iye,G.truncate=Lye,G.unescape=kye,G.uniqueId=nve,G.upperCase=Rye,G.upperFirst=iG,G.each=Fpt,G.eachRight=Bpt,G.first=Npt,sG(G,function(){var m={};return mh(G,function(v,T){un.call(G.prototype,T)||(m[T]=v)}),m}(),{chain:!1}),G.VERSION=t,Gl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){G[m].placeholder=G}),Gl(["drop","take"],function(m,v){gr.prototype[m]=function(T){T=T===e?1:Xi(Qe(T),0);var N=this.__filtered__&&!v?new gr(this):this.clone();return N.__filtered__?N.__takeCount__=ra(T,N.__takeCount__):N.__views__.push({size:ra(T,rt),type:m+(N.__dir__<0?"Right":"")}),N},gr.prototype[m+"Right"]=function(T){return this.reverse()[m](T).reverse()}}),Gl(["filter","map","takeWhile"],function(m,v){var T=v+1,N=T==L||T==F;gr.prototype[m]=function(V){var Y=this.clone();return Y.__iteratees__.push({iteratee:ke(V,3),type:T}),Y.__filtered__=Y.__filtered__||N,Y}}),Gl(["head","last"],function(m,v){var T="take"+(v?"Right":"");gr.prototype[m]=function(){return this[T](1).value()[0]}}),Gl(["initial","tail"],function(m,v){var T="drop"+(v?"":"Right");gr.prototype[m]=function(){return this.__filtered__?new gr(this):this[T](1)}}),gr.prototype.compact=function(){return this.filter(_s)},gr.prototype.find=function(m){return this.filter(m).head()},gr.prototype.findLast=function(m){return this.reverse().find(m)},gr.prototype.invokeMap=nr(function(m,v){return typeof m=="function"?new gr(this):this.map(function(T){return kM(T,m,v)})}),gr.prototype.reject=function(m){return this.filter(wI(ke(m)))},gr.prototype.slice=function(m,v){m=Qe(m);var T=this;return T.__filtered__&&(m>0||v<0)?new gr(T):(m<0?T=T.takeRight(-m):m&&(T=T.drop(m)),v!==e&&(v=Qe(v),T=v<0?T.dropRight(-v):T.take(v-m)),T)},gr.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},gr.prototype.toArray=function(){return this.take(rt)},mh(gr.prototype,function(m,v){var T=/^(?:filter|find|map|reject)|While$/.test(v),N=/^(?:head|last)$/.test(v),V=G[N?"take"+(v=="last"?"Right":""):v],Y=N||/^find/.test(v);!V||(G.prototype[v]=function(){var J=this.__wrapped__,it=N?[1]:arguments,ft=J instanceof gr,Dt=it[0],Ot=ft||$e(J),Vt=function(pr){var yr=V.apply(G,dm([pr],it));return N&&oe?yr[0]:yr};Ot&&T&&typeof Dt=="function"&&Dt.length!=1&&(ft=Ot=!1);var oe=this.__chain__,Te=!!this.__actions__.length,Ne=Y&&!oe,er=ft&&!Te;if(!Y&&Ot){J=er?J:new gr(this);var De=m.apply(J,it);return De.__actions__.push({func:yI,args:[Vt],thisArg:e}),new Yl(De,oe)}return Ne&&er?m.apply(this,it):(De=this.thru(Vt),Ne?N?De.value()[0]:De.value():De)})}),Gl(["pop","push","shift","sort","splice","unshift"],function(m){var v=G6[m],T=/^(?:push|sort|unshift)$/.test(m)?"tap":"thru",N=/^(?:pop|shift)$/.test(m);G.prototype[m]=function(){var V=arguments;if(N&&!this.__chain__){var Y=this.value();return v.apply($e(Y)?Y:[],V)}return this[T](function(J){return v.apply($e(J)?J:[],V)})}}),mh(gr.prototype,function(m,v){var T=G[v];if(T){var N=T.name+"";un.call(yx,N)||(yx[N]=[]),yx[N].push({name:v,func:T})}}),yx[hI(e,g).name]=[{name:"wrapper",func:e}],gr.prototype.clone=kde,gr.prototype.reverse=Rde,gr.prototype.value=Nde,G.prototype.at=c0e,G.prototype.chain=u0e,G.prototype.commit=h0e,G.prototype.next=f0e,G.prototype.plant=d0e,G.prototype.reverse=m0e,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=g0e,G.prototype.first=G.prototype.head,EM&&(G.prototype[EM]=p0e),G},gm=hde();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fo._=gm,define(function(){return gm})):t_?((t_.exports=gm)._=gm,aq._=gm):fo._=gm}).call(Rx)});function __t(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new J9(r)}function J9(e){this._=e}function g2e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function _2e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function g_t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=m2e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var m2e,xs,y_t=M(()=>{m2e={value:function(){}};J9.prototype=__t.prototype={constructor:J9,on:function(e,t){var r=this._,n=g2e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=_2e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=g_t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=g_t(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new J9(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};xs=__t});var Rm=M(()=>{y_t()});function _Y(e){return+e}var Cvt=M(()=>{});function yY(e){return e*e}function vY(e){return e*(2-e)}function IL(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var Avt=M(()=>{});function xY(e){return e*e*e}function bY(e){return--e*e*e+1}function bs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pvt=M(()=>{});var wY,SY,MY,LL,Ivt=M(()=>{wY=3,SY=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(wY),MY=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(wY),LL=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(wY)});function EY(e){return+e==1?1:1-Math.cos(e*kvt)}function TY(e){return Math.sin(e*kvt)}function kL(e){return(1-Math.cos(Lvt*e))/2}var Lvt,kvt,Rvt=M(()=>{Lvt=Math.PI,kvt=Lvt/2});function Oh(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var CY=M(()=>{});function AY(e){return Oh(1-+e)}function PY(e){return 1-Oh(e)}function RL(e){return((e*=2)<=1?Oh(1-e):2-Oh(e-1))/2}var Nvt=M(()=>{CY()});function IY(e){return 1-Math.sqrt(1-e*e)}function LY(e){return Math.sqrt(1- --e*e)}function NL(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Dvt=M(()=>{});function RY(e){return 1-I_(1-e)}function I_(e){return(e=+e)<kY?DL*e*e:e<uSe?DL*(e-=cSe)*e+hSe:e<pSe?DL*(e-=fSe)*e+dSe:DL*(e-=mSe)*e+gSe}function NY(e){return((e*=2)<=1?1-I_(1-e):I_(e-1)+1)/2}var kY,cSe,uSe,hSe,fSe,pSe,dSe,mSe,gSe,DL,Ovt=M(()=>{kY=.36363636363636365,cSe=6/11,uSe=8/11,hSe=3/4,fSe=9/11,pSe=10/11,dSe=15/16,mSe=21/22,gSe=63/64,DL=1/kY/kY});var DY,OY,zY,OL,zvt=M(()=>{DY=1.70158,OY=function e(t){t=+t;function r(n){return(n=+n)*n*(t*(n-1)+n)}return r.overshoot=e,r}(DY),zY=function e(t){t=+t;function r(n){return--n*n*((n+1)*t+n)+1}return r.overshoot=e,r}(DY),OL=function e(t){t=+t;function r(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return r.overshoot=e,r}(DY)});var Sb,FY,BY,HY,zL,VY,Fvt=M(()=>{CY();Sb=2*Math.PI,FY=1,BY=.3,HY=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return t*Oh(- --o)*Math.sin((n-o)/r)}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY),zL=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return 1-t*Oh(o=+o)*Math.sin((o+n)/r)}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY),VY=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return((o=o*2-1)<0?t*Oh(-o)*Math.sin((n-o)/r):2-t*Oh(o)*Math.sin((n+o)/r))/2}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY)});var Bvt={};Zs(Bvt,{easeBack:()=>OL,easeBackIn:()=>OY,easeBackInOut:()=>OL,easeBackOut:()=>zY,easeBounce:()=>I_,easeBounceIn:()=>RY,easeBounceInOut:()=>NY,easeBounceOut:()=>I_,easeCircle:()=>NL,easeCircleIn:()=>IY,easeCircleInOut:()=>NL,easeCircleOut:()=>LY,easeCubic:()=>bs,easeCubicIn:()=>xY,easeCubicInOut:()=>bs,easeCubicOut:()=>bY,easeElastic:()=>zL,easeElasticIn:()=>HY,easeElasticInOut:()=>VY,easeElasticOut:()=>zL,easeExp:()=>RL,easeExpIn:()=>AY,easeExpInOut:()=>RL,easeExpOut:()=>PY,easeLinear:()=>_Y,easePoly:()=>LL,easePolyIn:()=>SY,easePolyInOut:()=>LL,easePolyOut:()=>MY,easeQuad:()=>IL,easeQuadIn:()=>yY,easeQuadInOut:()=>IL,easeQuadOut:()=>vY,easeSin:()=>kL,easeSinIn:()=>EY,easeSinInOut:()=>kL,easeSinOut:()=>TY});var L_=M(()=>{Cvt();Avt();Pvt();Ivt();Rvt();Nvt();Dvt();Ovt();zvt();Fvt()});function YL(){}function Qvt(e,t){var r=new YL;if(e instanceof YL)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var rl,Ji,jL=M(()=>{rl="$";YL.prototype=Qvt.prototype={constructor:YL,has:function(e){return rl+e in this},get:function(e){return this[rl+e]},set:function(e,t){return this[rl+e]=t,this},remove:function(e){var t=rl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===rl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===rl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===rl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===rl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===rl&&++e;return e},empty:function(){for(var e in this)if(e[0]===rl)return!1;return!0},each:function(e){for(var t in this)t[0]===rl&&e(this[t],t.slice(1),this)}};Ji=Qvt});function r1t(){var e=[],t=[],r,n,i;function o(s,l,c,u){if(l>=e.length)return r!=null&&s.sort(r),n!=null?n(s):s;for(var h=-1,f=s.length,p=e[l++],d,g,_=Ji(),y,x=c();++h<f;)(y=_.get(d=p(g=s[h])+""))?y.push(g):_.set(d,[g]);return _.each(function(b,S){u(x,S,o(b,l,c,u))}),x}function a(s,l){if(++l>e.length)return s;var c,u=t[l-1];return n!=null&&l>=e.length?c=s.entries():(c=[],s.each(function(h,f){c.push({key:f,values:a(h,l)})})),u!=null?c.sort(function(h,f){return u(h.key,f.key)}):c}return i={object:function(s){return o(s,0,NSe,DSe)},map:function(s){return o(s,0,t1t,e1t)},entries:function(s){return a(o(s,0,t1t,e1t),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return r=s,i},rollup:function(s){return n=s,i}}}function NSe(){return{}}function DSe(e,t,r){e[t]=r}function t1t(){return Ji()}function e1t(e,t,r){e.set(t,r)}var n1t=M(()=>{jL()});function XL(){}function i1t(e,t){var r=new XL;if(e instanceof XL)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var R_,o1t,a1t=M(()=>{jL();R_=Ji.prototype;XL.prototype=i1t.prototype={constructor:XL,has:R_.has,add:function(e){return e+="",this[rl+e]=e,this},remove:R_.remove,clear:R_.clear,values:R_.keys,size:R_.size,empty:R_.empty,each:R_.each};o1t=i1t});function $L(e){var t=[];for(var r in e)t.push(r);return t}var s1t=M(()=>{});function l1t(e){var t=[];for(var r in e)t.push(e[r]);return t}var c1t=M(()=>{});function u1t(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var h1t=M(()=>{});var Tb=M(()=>{n1t();a1t();jL();s1t();c1t();h1t()});function v1t(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function GSe(e,t){var r=v1t(e);return function(n,i){return t(r(n),i,e)}}function y1t(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function Ss(e,t){var r=e+"",n=r.length;return n<t?new Array(t-n+1).join(0)+r:r}function WSe(e){return e<0?"-"+Ss(-e,6):e>9999?"+"+Ss(e,6):Ss(e,4)}function YSe(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":WSe(e.getUTCFullYear(),4)+"-"+Ss(e.getUTCMonth()+1,2)+"-"+Ss(e.getUTCDate(),2)+(i?"T"+Ss(t,2)+":"+Ss(r,2)+":"+Ss(n,2)+"."+Ss(i,3)+"Z":n?"T"+Ss(t,2)+":"+Ss(r,2)+":"+Ss(n,2)+"Z":r||t?"T"+Ss(t,2)+":"+Ss(r,2)+"Z":"")}function Ym(e){var t=new RegExp('["'+e+`
\r]`),r=e.charCodeAt(0);function n(h,f){var p,d,g=i(h,function(_,y){if(p)return p(_,y-1);d=_,p=f?GSe(_,f):v1t(_)});return g.columns=d||[],g}function i(h,f){var p=[],d=h.length,g=0,_=0,y,x=d<=0,b=!1;h.charCodeAt(d-1)===UE&&--d,h.charCodeAt(d-1)===nj&&--d;function S(){if(x)return ej;if(b)return b=!1,_1t;var P,k=g,O;if(h.charCodeAt(k)===rj){for(;g++<d&&h.charCodeAt(g)!==rj||h.charCodeAt(++g)===rj;);return(P=g)>=d?x=!0:(O=h.charCodeAt(g++))===UE?b=!0:O===nj&&(b=!0,h.charCodeAt(g)===UE&&++g),h.slice(k+1,P-1).replace(/""/g,'"')}for(;g<d;){if((O=h.charCodeAt(P=g++))===UE)b=!0;else if(O===nj)b=!0,h.charCodeAt(g)===UE&&++g;else if(O!==r)continue;return h.slice(k,P)}return x=!0,h.slice(k,d)}for(;(y=S())!==ej;){for(var C=[];y!==_1t&&y!==ej;)C.push(y),y=S();f&&(C=f(C,_++))==null||p.push(C)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return u(p[d])}).join(e)})}function a(h,f){return f==null&&(f=y1t(h)),[f.map(u).join(e)].concat(o(h,f)).join(`
`)}function s(h,f){return f==null&&(f=y1t(h)),o(h,f).join(`
`)}function l(h){return h.map(c).join(`
`)}function c(h){return h.map(u).join(e)}function u(h){return h==null?"":h instanceof Date?YSe(h):t.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:n,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}var _1t,ej,rj,UE,nj,tk=M(()=>{_1t={},ej={},rj=34,UE=10,nj=13});var N_,Cb,x1t,b1t,w1t,S1t,M1t,E1t,T1t=M(()=>{tk();N_=Ym(","),Cb=N_.parse,x1t=N_.parseRows,b1t=N_.format,w1t=N_.formatBody,S1t=N_.formatRows,M1t=N_.formatRow,E1t=N_.formatValue});var D_,Ab,C1t,A1t,P1t,I1t,L1t,k1t,R1t=M(()=>{tk();D_=Ym("	"),Ab=D_.parse,C1t=D_.parseRows,A1t=D_.format,P1t=D_.formatBody,I1t=D_.formatRows,L1t=D_.formatRow,k1t=D_.formatValue});function ij(e){for(var t in e){var r=e[t].trim(),n,i;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(n=+r))r=n;else if(i=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))jSe&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var jSe,N1t=M(()=>{jSe=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()});var qE=M(()=>{tk();T1t();R1t();N1t()});var pe={};Zs(pe,{__assign:()=>y5e,__asyncDelegator:()=>A5e,__asyncGenerator:()=>C5e,__asyncValues:()=>P5e,__await:()=>U5,__awaiter:()=>S5e,__decorate:()=>x5e,__exportStar:()=>E5e,__extends:()=>_5e,__generator:()=>M5e,__makeTemplateObject:()=>I5e,__metadata:()=>w5e,__param:()=>b5e,__read:()=>nMt,__rest:()=>v5e,__spread:()=>T5e,__values:()=>y$});function _5e(e,t){g5e(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function v5e(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&(r[n[i]]=e[n[i]]);return r}function x5e(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function b5e(e,t){return function(r,n){t(r,n,e)}}function w5e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function S5e(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(c){try{l(n.next(c))}catch(u){o(u)}}function s(c){try{l(n.throw(c))}catch(u){o(u)}}function l(c){c.done?i(c.value):new r(function(u){u(c.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})}function M5e(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=i[c[0]&2?"return":c[0]?"throw":"next"])&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[0,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function E5e(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function y$(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function nMt(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function T5e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(nMt(arguments[t]));return e}function U5(e){return this instanceof U5?(this.v=e,this):new U5(e)}function C5e(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(f){n[f]&&(i[f]=function(p){return new Promise(function(d,g){o.push([f,p,d,g])>1||s(f,p)})})}function s(f,p){try{l(n[f](p))}catch(d){h(o[0][3],d)}}function l(f){f.value instanceof U5?Promise.resolve(f.value.v).then(c,u):h(o[0][2],f)}function c(f){s("next",f)}function u(f){s("throw",f)}function h(f,p){f(p),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A5e(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){e[i]&&(t[i]=function(a){return(r=!r)?{value:U5(e[i](a)),done:i==="return"}:o?o(a):a})}}function P5e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):typeof y$=="function"?y$(e):e[Symbol.iterator]()}function I5e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var g5e,y5e,de=M(()=>{g5e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};y5e=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}});var iMt,oMt=M(()=>{iMt="4.13.0"});function _c(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var dy=M(()=>{});function aR(e){return e.length===1&&(e=L5e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function L5e(e){return function(t,r){return _c(e(t),r)}}var v$=M(()=>{dy()});var aMt,x$,sMt,sR,b$=M(()=>{dy();v$();aMt=aR(_c),x$=aMt.right,sMt=aMt.left,sR=x$});function lMt(e,t){t==null&&(t=w$);for(var r=0,n=e.length-1,i=e[0],o=new Array(n<0?0:n);r<n;)o[r]=t(i,i=e[++r]);return o}function w$(e,t){return[e,t]}var S$=M(()=>{});function cMt(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=w$),a=l=0;a<n;++a)for(c=e[a],s=0;s<i;++s,++l)o[l]=r(c,t[s]);return o}var uMt=M(()=>{S$()});function hMt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var fMt=M(()=>{});function sl(e){return e===null?NaN:+e}var l2=M(()=>{});function lR(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=sl(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=sl(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}var M$=M(()=>{l2()});function cR(e,t){var r=lR(e,t);return r&&Math.sqrt(r)}var E$=M(()=>{M$()});function uR(e,t){var r=e.length,n=-1,i,o,a;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=a=i;++n<r;)(i=e[n])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=a=i;++n<r;)(i=t(e[n],n,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var T$=M(()=>{});var pMt,dMt,mMt,C$=M(()=>{pMt=Array.prototype,dMt=pMt.slice,mMt=pMt.map});function q5(e){return function(){return e}}var gMt=M(()=>{});function _Mt(e){return e}var yMt=M(()=>{});function hR(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var A$=M(()=>{});function vMt(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=k$(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function k$(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=P$?10:o>=I$?5:o>=L$?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=P$?10:o>=I$?5:o>=L$?2:1)}function fR(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=P$?i*=10:o>=I$?i*=5:o>=L$&&(i*=2),t<e?-i:i}var P$,I$,L$,R$=M(()=>{P$=Math.sqrt(50),I$=Math.sqrt(10),L$=Math.sqrt(2)});function pR(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}var N$=M(()=>{});function xMt(){var e=_Mt,t=uR,r=pR;function n(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var c=t(l),u=c[0],h=c[1],f=r(l,u,h);Array.isArray(f)||(f=fR(u,h,f),f=hR(Math.ceil(u/f)*f,Math.floor(h/f)*f,f));for(var p=f.length;f[0]<=u;)f.shift(),--p;for(;f[p-1]>h;)f.pop(),--p;var d=new Array(p+1),g;for(o=0;o<=p;++o)g=d[o]=[],g.x0=o>0?f[o-1]:u,g.x1=o<p?f[o]:h;for(o=0;o<a;++o)s=l[o],u<=s&&s<=h&&d[sR(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:q5(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:q5([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?q5(dMt.call(i)):q5(i),n):r},n}var bMt=M(()=>{C$();b$();gMt();T$();yMt();A$();R$();N$()});function my(e,t,r){if(r==null&&(r=sl),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}var dR=M(()=>{l2()});function wMt(e,t,r){return e=mMt.call(e,sl).sort(_c),Math.ceil((r-t)/(2*(my(e,.75)-my(e,.25))*Math.pow(e.length,-1/3)))}var SMt=M(()=>{C$();dy();l2();dR()});function MMt(e,t,r){return Math.ceil((r-t)/(3.5*cR(e)*Math.pow(e.length,-1/3)))}var EMt=M(()=>{E$()});function TMt(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&i>o&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&i>o&&(o=i);return o}var CMt=M(()=>{});function AMt(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=sl(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=sl(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}var PMt=M(()=>{l2()});function IMt(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=sl(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=sl(t(e[n],n,e)))||o.push(i);return my(o.sort(_c),.5)}var LMt=M(()=>{dy();l2();dR()});function kMt(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}var RMt=M(()=>{});function mR(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&o>i&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&o>i&&(o=i);return o}var D$=M(()=>{});function NMt(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}var DMt=M(()=>{});function OMt(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,a=e[i];for(t==null&&(t=_c);++n<r;)(t(o=e[n],a)<0||t(a,a)!==0)&&(a=o,i=n);if(t(a,a)===0)return i}}var zMt=M(()=>{dy()});function FMt(e,t,r){for(var n=(r==null?e.length:r)-(t=t==null?0:+t),i,o;n;)o=Math.random()*n--|0,i=e[n+t],e[n+t]=e[o+t],e[o+t]=i;return e}var BMt=M(()=>{});function HMt(e,t){var r=e.length,n=-1,i,o=0;if(t==null)for(;++n<r;)(i=+e[n])&&(o+=i);else for(;++n<r;)(i=+t(e[n],n,e))&&(o+=i);return o}var VMt=M(()=>{});function gR(e){if(!(o=e.length))return[];for(var t=-1,r=mR(e,k5e),n=new Array(r);++t<r;)for(var i=-1,o,a=n[t]=new Array(o);++i<o;)a[i]=e[i][t];return n}function k5e(e){return e.length}var O$=M(()=>{D$()});function UMt(){return gR(arguments)}var qMt=M(()=>{O$()});var GMt=M(()=>{b$();dy();v$();uMt();fMt();E$();T$();bMt();SMt();EMt();N$();CMt();PMt();LMt();RMt();D$();S$();DMt();dR();A$();zMt();BMt();VMt();R$();O$();M$();qMt()});var _R,WMt=M(()=>{_R=Array.prototype.slice});function YMt(e){return e}var jMt=M(()=>{});function R5e(e){return"translate("+(e+.5)+",0)"}function N5e(e){return"translate(0,"+(e+.5)+")"}function D5e(e){return function(t){return+e(t)}}function O5e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function z5e(){return!this.__axis}function xR(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===yR||e===G5?-1:1,c=e===G5||e===vR?"x":"y",u=e===yR||e===z$?R5e:N5e;function h(f){var p=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,d=i==null?t.tickFormat?t.tickFormat.apply(t,r):YMt:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?O5e:D5e)(t.copy()),S=f.selection?f.selection():f,C=S.selectAll(".domain").data([null]),P=S.selectAll(".tick").data(p,t).order(),k=P.exit(),O=P.enter().append("g").attr("class","tick"),D=P.select("line"),B=P.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),P=P.merge(O),D=D.merge(O.append("line").attr("stroke","#000").attr(c+"2",l*o)),B=B.merge(O.append("text").attr("fill","#000").attr(c,l*g).attr("dy",e===yR?"0em":e===z$?"0.71em":"0.32em")),f!==S&&(C=C.transition(f),P=P.transition(f),D=D.transition(f),B=B.transition(f),k=k.transition(f).attr("opacity",XMt).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",XMt).attr("transform",function(I){var L=this.parentNode.__axis;return u(L&&isFinite(L=L(I))?L:b(I))})),k.remove(),C.attr("d",e===G5||e==vR?"M"+l*a+","+y+"H0.5V"+x+"H"+l*a:"M"+y+","+l*a+"V0.5H"+x+"V"+l*a),P.attr("opacity",1).attr("transform",function(I){return u(b(I))}),D.attr(c+"2",l*o),B.attr(c,l*g).text(d),S.filter(z5e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===vR?"start":e===G5?"end":"middle"),S.each(function(){this.__axis=b})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return r=_R.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:_R.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:_R.call(f),h):n&&n.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(o=a=+f,h):o},h.tickSizeInner=function(f){return arguments.length?(o=+f,h):o},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(s=+f,h):s},h}function $Mt(e){return xR(yR,e)}function KMt(e){return xR(vR,e)}function ZMt(e){return xR(z$,e)}function JMt(e){return xR(G5,e)}var yR,vR,z$,G5,XMt,QMt=M(()=>{WMt();jMt();yR=1,vR=2,z$=3,G5=4,XMt=1e-6});var tEt=M(()=>{QMt()});function rEt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new bR(r)}function bR(e){this._=e}function B5e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function H5e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function eEt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=F5e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var F5e,W5,nEt=M(()=>{F5e={value:function(){}};bR.prototype=rEt.prototype={constructor:bR,on:function(e,t){var r=this._,n=B5e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=H5e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=eEt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=eEt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new bR(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};W5=rEt});var F$=M(()=>{nEt()});var wR,B$,H$=M(()=>{wR="http://www.w3.org/1999/xhtml",B$={svg:"http://www.w3.org/2000/svg",xhtml:wR,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Up(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),B$.hasOwnProperty(t)?{space:B$[t],local:e}:e}var SR=M(()=>{H$()});function V5e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===wR&&t.documentElement.namespaceURI===wR?t.createElement(e):t.createElementNS(r,e)}}function U5e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function MR(e){var t=Up(e);return(t.local?U5e:V5e)(t)}var V$=M(()=>{SR();H$()});function q5e(){}function gy(e){return e==null?q5e:function(){return this.querySelector(e)}}var ER=M(()=>{});function iEt(e){typeof e!="function"&&(e=gy(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new fi(n,this._parents)}var oEt=M(()=>{wu();ER()});function G5e(){return[]}function Y5(e){return e==null?G5e:function(){return this.querySelectorAll(e)}}var U$=M(()=>{});function aEt(e){typeof e!="function"&&(e=Y5(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new fi(n,i)}var sEt=M(()=>{wu();U$()});function j5(e){return function(){return this.matches(e)}}var q$=M(()=>{});function lEt(e){typeof e!="function"&&(e=j5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new fi(n,this._parents)}var cEt=M(()=>{wu();q$()});function TR(e){return new Array(e.length)}var G$=M(()=>{});function uEt(){return new fi(this._enter||this._groups.map(TR),this._parents)}function X5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var W$=M(()=>{G$();wu();X5.prototype={constructor:X5,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function hEt(e){return function(){return e}}var fEt=M(()=>{});function W5e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new X5(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function Y5e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=pEt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=pEt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new X5(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function dEt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?Y5e:W5e,n=this._parents,i=this._groups;typeof e!="function"&&(e=hEt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new fi(a,n),a._enter=s,a._exit=l,a}var pEt,mEt=M(()=>{wu();W$();fEt();pEt="$"});function gEt(){return new fi(this._exit||this._groups.map(TR),this._parents)}var _Et=M(()=>{G$();wu()});function yEt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var vEt=M(()=>{});function xEt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new fi(a,this._parents)}var bEt=M(()=>{wu()});function wEt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var SEt=M(()=>{});function MEt(e){e||(e=j5e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new fi(i,this._parents).order()}function j5e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var EEt=M(()=>{wu()});function TEt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var CEt=M(()=>{});function AEt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var PEt=M(()=>{});function IEt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var LEt=M(()=>{});function kEt(){var e=0;return this.each(function(){++e}),e}var REt=M(()=>{});function NEt(){return!this.node()}var DEt=M(()=>{});function OEt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var zEt=M(()=>{});function X5e(e){return function(){this.removeAttribute(e)}}function $5e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function K5e(e,t){return function(){this.setAttribute(e,t)}}function Z5e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function J5e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Q5e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function FEt(e,t){var r=Up(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?$5e:X5e:typeof t=="function"?r.local?Q5e:J5e:r.local?Z5e:K5e)(r,t))}var BEt=M(()=>{SR()});function CR(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Y$=M(()=>{});function tTe(e){return function(){this.style.removeProperty(e)}}function eTe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function rTe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function HEt(e,t,r){return arguments.length>1?this.each((t==null?tTe:typeof t=="function"?rTe:eTe)(e,t,r==null?"":r)):sg(this.node(),e)}function sg(e,t){return e.style.getPropertyValue(t)||CR(e).getComputedStyle(e,null).getPropertyValue(t)}var j$=M(()=>{Y$()});function nTe(e){return function(){delete this[e]}}function iTe(e,t){return function(){this[e]=t}}function oTe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function VEt(e,t){return arguments.length>1?this.each((t==null?nTe:typeof t=="function"?oTe:iTe)(e,t)):this.node()[e]}var UEt=M(()=>{});function qEt(e){return e.trim().split(/^|\s+/)}function X$(e){return e.classList||new GEt(e)}function GEt(e){this._node=e,this._names=qEt(e.getAttribute("class")||"")}function WEt(e,t){for(var r=X$(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function YEt(e,t){for(var r=X$(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function aTe(e){return function(){WEt(this,e)}}function sTe(e){return function(){YEt(this,e)}}function lTe(e,t){return function(){(t.apply(this,arguments)?WEt:YEt)(this,e)}}function jEt(e,t){var r=qEt(e+"");if(arguments.length<2){for(var n=X$(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?lTe:t?aTe:sTe)(r,t))}var XEt=M(()=>{GEt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function cTe(){this.textContent=""}function uTe(e){return function(){this.textContent=e}}function hTe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function $Et(e){return arguments.length?this.each(e==null?cTe:(typeof e=="function"?hTe:uTe)(e)):this.node().textContent}var KEt=M(()=>{});function fTe(){this.innerHTML=""}function pTe(e){return function(){this.innerHTML=e}}function dTe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function ZEt(e){return arguments.length?this.each(e==null?fTe:(typeof e=="function"?dTe:pTe)(e)):this.node().innerHTML}var JEt=M(()=>{});function mTe(){this.nextSibling&&this.parentNode.appendChild(this)}function QEt(){return this.each(mTe)}var t5t=M(()=>{});function gTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e5t(){return this.each(gTe)}var r5t=M(()=>{});function n5t(e){var t=typeof e=="function"?e:MR(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var i5t=M(()=>{V$()});function _Te(){return null}function o5t(e,t){var r=typeof e=="function"?e:MR(e),n=t==null?_Te:typeof t=="function"?t:gy(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var a5t=M(()=>{V$();ER()});function yTe(){var e=this.parentNode;e&&e.removeChild(this)}function s5t(){return this.each(yTe)}var l5t=M(()=>{});function vTe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xTe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c5t(e){return this.select(e?xTe:vTe)}var u5t=M(()=>{});function h5t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var f5t=M(()=>{});function bTe(e,t,r){return e=m5t(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function m5t(e,t,r){return function(n){var i=wr;wr=n;try{e.call(this,this.__data__,t,r)}finally{wr=i}}}function wTe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function STe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function MTe(e,t,r){var n=d5t.hasOwnProperty(e.type)?bTe:m5t;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function g5t(e,t,r){var n=wTe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?MTe:STe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function $$(e,t,r,n){var i=wr;e.sourceEvent=wr,wr=e;try{return t.apply(r,n)}finally{wr=i}}var d5t,wr,p5t,AR=M(()=>{d5t={},wr=null;typeof document!="undefined"&&(p5t=document.documentElement,"onmouseenter"in p5t||(d5t={mouseenter:"mouseover",mouseleave:"mouseout"}))});function _5t(e,t,r){var n=CR(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ETe(e,t){return function(){return _5t(this,e,t)}}function TTe(e,t){return function(){return _5t(this,e,t.apply(this,arguments))}}function y5t(e,t){return this.each((typeof t=="function"?TTe:ETe)(e,t))}var v5t=M(()=>{Y$()});function fi(e,t){this._groups=e,this._parents=t}function x5t(){return new fi([[document.documentElement]],K$)}var K$,qp,wu=M(()=>{oEt();sEt();cEt();mEt();W$();_Et();vEt();bEt();SEt();EEt();CEt();PEt();LEt();REt();DEt();zEt();BEt();j$();UEt();XEt();KEt();JEt();t5t();r5t();i5t();a5t();l5t();u5t();f5t();AR();v5t();K$=[null];fi.prototype=x5t.prototype={constructor:fi,select:iEt,selectAll:aEt,filter:lEt,data:dEt,enter:uEt,exit:gEt,join:yEt,merge:xEt,order:wEt,sort:MEt,call:TEt,nodes:AEt,node:IEt,size:kEt,empty:NEt,each:OEt,attr:FEt,style:HEt,property:VEt,classed:jEt,text:$Et,html:ZEt,raise:QEt,lower:e5t,append:n5t,insert:o5t,remove:s5t,clone:c5t,datum:h5t,on:g5t,dispatch:y5t};qp=x5t});function Gp(e){return typeof e=="string"?new fi([[document.querySelector(e)]],[document.documentElement]):new fi([[e]],K$)}var b5t=M(()=>{wu()});function w5t(){for(var e=wr,t;t=e.sourceEvent;)e=t;return e}var S5t=M(()=>{AR()});function M5t(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var E5t=M(()=>{});function PR(e){var t=w5t();return t.changedTouches&&(t=t.changedTouches[0]),M5t(e,t)}var T5t=M(()=>{S5t();E5t()});var Ts=M(()=>{q$();T5t();SR();b5t();wu();ER();U$();j$();AR()});function IR(){wr.preventDefault(),wr.stopImmediatePropagation()}var C5t=M(()=>{Ts()});function Z$(e){var t=e.document.documentElement,r=Gp(e).on("dragstart.drag",IR,!0);"onselectstart"in t?r.on("selectstart.drag",IR,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function J$(e,t){var r=e.document.documentElement,n=Gp(e).on("dragstart.drag",null);t&&(n.on("click.drag",IR,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var A5t=M(()=>{Ts();C5t()});var P5t=M(()=>{A5t()});function LR(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Q$(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var I5t=M(()=>{});function Z5(){}function k5t(){return this.rgb().formatHex()}function NTe(){return F5t(this).formatHsl()}function R5t(){return this.rgb().formatRgb()}function Su(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=CTe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?N5t(t):r===3?new ll(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?kR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?kR(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ATe.exec(e))?new ll(t[1],t[2],t[3],1):(t=PTe.exec(e))?new ll(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ITe.exec(e))?kR(t[1],t[2],t[3],t[4]):(t=LTe.exec(e))?kR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kTe.exec(e))?z5t(t[1],t[2]/100,t[3]/100,1):(t=RTe.exec(e))?z5t(t[1],t[2]/100,t[3]/100,t[4]):L5t.hasOwnProperty(e)?N5t(L5t[e]):e==="transparent"?new ll(NaN,NaN,NaN,0):null}function N5t(e){return new ll(e>>16&255,e>>8&255,e&255,1)}function kR(e,t,r,n){return n<=0&&(e=t=r=NaN),new ll(e,t,r,n)}function DTe(e){return e instanceof Z5||(e=Su(e)),e?(e=e.rgb(),new ll(e.r,e.g,e.b,e.opacity)):new ll}function u2(e,t,r,n){return arguments.length===1?DTe(e):new ll(e,t,r,n==null?1:n)}function ll(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function D5t(){return"#"+tK(this.r)+tK(this.g)+tK(this.b)}function O5t(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function tK(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function z5t(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zh(e,t,r,n)}function F5t(e){if(e instanceof Zh)return new Zh(e.h,e.s,e.l,e.opacity);if(e instanceof Z5||(e=Su(e)),!e)return new Zh;if(e instanceof Zh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Zh(a,s,l,e.opacity)}function B5t(e,t,r,n){return arguments.length===1?F5t(e):new Zh(e,t,r,n==null?1:n)}function Zh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function eK(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var $5,RR,c2,K5,Jh,CTe,ATe,PTe,ITe,LTe,kTe,RTe,L5t,H5t=M(()=>{I5t();$5=.7,RR=1/$5,c2="\\s*([+-]?\\d+)\\s*",K5="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Jh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CTe=/^#([0-9a-f]{3,8})$/,ATe=new RegExp("^rgb\\("+[c2,c2,c2]+"\\)$"),PTe=new RegExp("^rgb\\("+[Jh,Jh,Jh]+"\\)$"),ITe=new RegExp("^rgba\\("+[c2,c2,c2,K5]+"\\)$"),LTe=new RegExp("^rgba\\("+[Jh,Jh,Jh,K5]+"\\)$"),kTe=new RegExp("^hsl\\("+[K5,Jh,Jh]+"\\)$"),RTe=new RegExp("^hsla\\("+[K5,Jh,Jh,K5]+"\\)$"),L5t={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};LR(Z5,Su,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:k5t,formatHex:k5t,formatHsl:NTe,formatRgb:R5t,toString:R5t});LR(ll,u2,Q$(Z5,{brighter:function(e){return e=e==null?RR:Math.pow(RR,e),new ll(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?$5:Math.pow($5,e),new ll(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D5t,formatHex:D5t,formatRgb:O5t,toString:O5t}));LR(Zh,B5t,Q$(Z5,{brighter:function(e){return e=e==null?RR:Math.pow(RR,e),new Zh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?$5:Math.pow($5,e),new Zh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ll(eK(e>=240?e-240:e+120,i,n),eK(e,i,n),eK(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var NR=M(()=>{H5t()});function rK(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function V5t(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return rK((r-n/t)*t,a,i,o,s)}}var nK=M(()=>{});function U5t(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return rK((r-n/t)*t,i,o,a,s)}}var q5t=M(()=>{nK()});function J5(e){return function(){return e}}var iK=M(()=>{});function OTe(e,t){return function(r){return e+r*t}}function zTe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function G5t(e){return(e=+e)==1?DR:function(t,r){return r-t?zTe(t,r,e):J5(isNaN(t)?r:t)}}function DR(e,t){var r=t-e;return r?OTe(e,r):J5(isNaN(e)?t:e)}var W5t=M(()=>{iK()});function Y5t(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=u2(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var _y,FTe,BTe,oK=M(()=>{NR();nK();q5t();W5t();_y=function e(t){var r=G5t(t);function n(i,o){var a=r((i=u2(i)).r,(o=u2(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=DR(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);FTe=Y5t(V5t),BTe=Y5t(U5t)});function j5t(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function X5t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var $5t=M(()=>{});function K5t(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=yy(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var Z5t=M(()=>{OR()});function J5t(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Q5t=M(()=>{});function qa(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Q5=M(()=>{});function tTt(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=yy(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var eTt=M(()=>{OR()});function HTe(e){return function(){return e}}function VTe(e){return function(t){return e(t)+""}}function tT(e,t){var r=sK.lastIndex=aK.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=sK.exec(e))&&(i=aK.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:qa(n,i)})),r=aK.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?VTe(l[0].x):HTe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var sK,aK,lK=M(()=>{Q5();sK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aK=new RegExp(sK.source,"g")});function yy(e,t){var r=typeof t,n;return t==null||r==="boolean"?J5(t):(r==="number"?qa:r==="string"?(n=Su(t))?(t=n,_y):tT:t instanceof Su?_y:t instanceof Date?J5t:X5t(t)?j5t:Array.isArray(t)?K5t:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tTt:qa)(e,t)}var OR=M(()=>{NR();oK();Z5t();Q5t();Q5();eTt();lK();iK();$5t()});function cK(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*rTt,skewX:Math.atan(l)*rTt,scaleX:a,scaleY:s}}var rTt,zR,nTt=M(()=>{rTt=180/Math.PI,zR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function oTt(e){return e==="none"?zR:(eT||(eT=document.createElement("DIV"),uK=document.documentElement,iTt=document.defaultView),eT.style.transform=e,e=iTt.getComputedStyle(uK.appendChild(eT),null).getPropertyValue("transform"),uK.removeChild(eT),e=e.slice(7,-1).split(","),cK(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function aTt(e){return e==null?zR:(FR||(FR=document.createElementNS("http://www.w3.org/2000/svg","g")),FR.setAttribute("transform",e),(e=FR.transform.baseVal.consolidate())?(e=e.matrix,cK(e.a,e.b,e.c,e.d,e.e,e.f)):zR)}var eT,uK,iTt,FR,sTt=M(()=>{nTt()});function lTt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:qa(c,h)},{i:g-2,x:qa(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:qa(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:qa(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:qa(c,h)},{i:g-2,x:qa(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var hK,fK,cTt=M(()=>{Q5();sTt();hK=lTt(oTt,"px, ","px)","deg)"),fK=lTt(aTt,", ",")",")")});var rT=M(()=>{OR();Q5();lK();cTt();oK()});function f2(){return vy||(fTt(UTe),vy=aT.now()+VR)}function UTe(){vy=0}function sT(){this._call=this._time=this._next=null}function UR(e,t,r){var n=new sT;return n.restart(e,t,r),n}function pTt(){f2(),++h2;for(var e=BR,t;e;)(t=vy-e._time)>=0&&e._call.call(null,t),e=e._next;--h2}function uTt(){vy=(HR=aT.now())+VR,h2=iT=0;try{pTt()}finally{h2=0,GTe(),vy=0}}function qTe(){var e=aT.now(),t=e-HR;t>hTt&&(VR-=t,HR=e)}function GTe(){for(var e,t=BR,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:BR=r);oT=e,pK(n)}function pK(e){if(!h2){iT&&(iT=clearTimeout(iT));var t=e-vy;t>24?(e<1/0&&(iT=setTimeout(uTt,e-aT.now()-VR)),nT&&(nT=clearInterval(nT))):(nT||(HR=aT.now(),nT=setInterval(qTe,hTt)),h2=1,fTt(uTt))}}var h2,iT,nT,hTt,BR,oT,HR,vy,VR,aT,fTt,dK=M(()=>{h2=0,iT=0,nT=0,hTt=1e3,HR=0,vy=0,VR=0,aT=typeof performance=="object"&&performance.now?performance:Date,fTt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};sT.prototype=UR.prototype={constructor:sT,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?f2():+r)+(t==null?0:+t),!this._next&&oT!==this&&(oT?oT._next=this:BR=this,oT=this),this._call=e,this._time=r,pK()},stop:function(){this._call&&(this._call=null,this._time=1/0,pK())}}});function qR(e,t,r){var n=new sT;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var dTt=M(()=>{dK()});var mK=M(()=>{dK();dTt()});function lg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;jTe(e,r,{name:t,index:n,group:i,on:WTe,tween:YTe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gTt})}function cT(e,t){var r=Qi(e,t);if(r.state>gTt)throw new Error("too late; already scheduled");return r}function Ga(e,t){var r=Qi(e,t);if(r.state>GR)throw new Error("too late; already running");return r}function Qi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function jTe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=UR(o,0,r.time);function o(c){r.state=gK,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==gK)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===GR)return qR(a);p.state===mTt?(p.state=lT,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=lT,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(qR(function(){r.state===GR&&(r.state=mTt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=WR,r.on.call("start",e,e.__data__,r.index,r.group),r.state===WR){for(r.state=GR,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=YR,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===YR&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=lT,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var WTe,YTe,gTt,gK,WR,GR,mTt,YR,lT,Cs=M(()=>{F$();mK();WTe=W5("start","end","cancel","interrupt"),YTe=[],gTt=0,gK=1,WR=2,GR=3,mTt=4,YR=5,lT=6});function p2(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>WR&&n.state<YR,n.state=lT,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var _K=M(()=>{Cs()});function _Tt(e){return this.each(function(){p2(this,e)})}var yTt=M(()=>{_K()});function XTe(e,t){var r,n;return function(){var i=Ga(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function $Te(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Ga(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function vTt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Qi(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?XTe:$Te)(r,e,t))}function d2(e,t,r){var n=e._id;return e.each(function(){var i=Ga(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Qi(i,n).value[t]}}var uT=M(()=>{Cs()});function jR(e,t){var r;return(typeof t=="number"?qa:t instanceof Su?_y:(r=Su(t))?(t=r,_y):tT)(e,t)}var yK=M(()=>{NR();rT()});function KTe(e){return function(){this.removeAttribute(e)}}function ZTe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function JTe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function QTe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function tCe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function eCe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function xTt(e,t){var r=Up(e),n=r==="transform"?fK:jR;return this.attrTween(e,typeof t=="function"?(r.local?eCe:tCe)(r,n,d2(this,"attr."+e,t)):t==null?(r.local?ZTe:KTe)(r):(r.local?QTe:JTe)(r,n,t))}var bTt=M(()=>{rT();Ts();uT();yK()});function rCe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function nCe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function iCe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&nCe(e,o)),r}return i._value=t,i}function oCe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&rCe(e,o)),r}return i._value=t,i}function wTt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Up(e);return this.tween(r,(n.local?iCe:oCe)(n,t))}var STt=M(()=>{Ts()});function aCe(e,t){return function(){cT(this,e).delay=+t.apply(this,arguments)}}function sCe(e,t){return t=+t,function(){cT(this,e).delay=t}}function MTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?aCe:sCe)(t,e)):Qi(this.node(),t).delay}var ETt=M(()=>{Cs()});function lCe(e,t){return function(){Ga(this,e).duration=+t.apply(this,arguments)}}function cCe(e,t){return t=+t,function(){Ga(this,e).duration=t}}function TTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?lCe:cCe)(t,e)):Qi(this.node(),t).duration}var CTt=M(()=>{Cs()});function uCe(e,t){if(typeof t!="function")throw new Error;return function(){Ga(this,e).ease=t}}function ATt(e){var t=this._id;return arguments.length?this.each(uCe(t,e)):Qi(this.node(),t).ease}var PTt=M(()=>{Cs()});function ITt(e){typeof e!="function"&&(e=j5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new ha(n,this._parents,this._name,this._id)}var LTt=M(()=>{Ts();Wp()});function kTt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new ha(a,this._parents,this._name,this._id)}var RTt=M(()=>{Wp()});function hCe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function fCe(e,t,r){var n,i,o=hCe(t)?cT:Ga;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function NTt(e,t){var r=this._id;return arguments.length<2?Qi(this.node(),r).on.on(e):this.each(fCe(r,e,t))}var DTt=M(()=>{Cs()});function pCe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function OTt(){return this.on("end.remove",pCe(this._id))}var zTt=M(()=>{});function FTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gy(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,lg(c[f],t,r,f,c,Qi(u,r)));return new ha(o,this._parents,t,r)}var BTt=M(()=>{Ts();Wp();Cs()});function HTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Y5(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=Qi(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&lg(p,t,r,g,f,d);o.push(f),a.push(u)}return new ha(o,a,t,r)}var VTt=M(()=>{Ts();Wp();Cs()});function UTt(){return new dCe(this._groups,this._parents)}var dCe,qTt=M(()=>{Ts();dCe=qp.prototype.constructor});function mCe(e,t){var r,n,i;return function(){var o=sg(this,e),a=(this.style.removeProperty(e),sg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function GTt(e){return function(){this.style.removeProperty(e)}}function gCe(e,t,r){var n,i=r+"",o;return function(){var a=sg(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function _Ce(e,t,r){var n,i,o;return function(){var a=sg(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),sg(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function yCe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Ga(this,e),c=l.on,u=l.value[o]==null?s||(s=GTt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function WTt(e,t,r){var n=(e+="")=="transform"?hK:jR;return t==null?this.styleTween(e,mCe(e,n)).on("end.style."+e,GTt(e)):typeof t=="function"?this.styleTween(e,_Ce(e,n,d2(this,"style."+e,t))).each(yCe(this._id,e)):this.styleTween(e,gCe(e,n,t),r).on("end.style."+e,null)}var YTt=M(()=>{rT();Ts();Cs();uT();yK()});function vCe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function xCe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&vCe(e,a,r)),n}return o._value=t,o}function jTt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,xCe(e,t,r==null?"":r))}var XTt=M(()=>{});function bCe(e){return function(){this.textContent=e}}function wCe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function $Tt(e){return this.tween("text",typeof e=="function"?wCe(d2(this,"text",e)):bCe(e==null?"":e+""))}var KTt=M(()=>{uT()});function SCe(e){return function(t){this.textContent=e.call(this,t)}}function MCe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&SCe(i)),t}return n._value=e,n}function ZTt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,MCe(e))}var JTt=M(()=>{});function QTt(){for(var e=this._name,t=this._id,r=XR(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=Qi(l,t);lg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ha(n,this._parents,e,r)}var tCt=M(()=>{Wp();Cs()});function eCt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=Ga(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var rCt=M(()=>{Cs()});function ha(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function vK(e){return qp().transition(e)}function XR(){return++ECe}var ECe,m2,Wp=M(()=>{Ts();bTt();STt();ETt();CTt();PTt();LTt();RTt();DTt();zTt();BTt();VTt();qTt();YTt();XTt();KTt();JTt();tCt();uT();rCt();ECe=0;m2=qp.prototype;ha.prototype=vK.prototype={constructor:ha,select:FTt,selectAll:HTt,filter:ITt,merge:kTt,selection:UTt,transition:QTt,call:m2.call,nodes:m2.nodes,node:m2.node,size:m2.size,empty:m2.empty,each:m2.each,on:NTt,attr:xTt,attrTween:wTt,style:WTt,styleTween:jTt,text:$Tt,textTween:ZTt,remove:OTt,tween:vTt,delay:MTt,duration:TTt,ease:ATt,end:eCt}});function TCe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return xK.time=f2(),xK;return r}function nCt(e){var t,r;e instanceof ha?(t=e._id,e=e._name):(t=XR(),(r=xK).time=f2(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&lg(l,e,t,c,a,r||TCe(l,t));return new ha(n,this._parents,e,t)}var xK,iCt=M(()=>{Wp();Cs();L_();mK();xK={time:null,delay:0,duration:250,ease:bs}});var oCt=M(()=>{Ts();yTt();iCt();qp.prototype.interrupt=_Tt;qp.prototype.transition=nCt});var aCt=M(()=>{Wp();Cs()});var sCt=M(()=>{oCt();Wp();aCt();_K()});function bK(e){return function(){return e}}var lCt=M(()=>{});function cCt(e,t,r){this.target=e,this.type=t,this.selection=r}var uCt=M(()=>{});function wK(){wr.stopImmediatePropagation()}function hT(){wr.preventDefault(),wr.stopImmediatePropagation()}var hCt=M(()=>{Ts()});function fT(e){return{type:e}}function ICe(){return!wr.button}function LCe(){var e=this.ownerSVGElement||this;return[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function MK(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function EK(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function mCt(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function gCt(){return TK($R)}function _Ct(){return TK(KR)}function yCt(){return TK(CCe)}function TK(e){var t=LCe,r=ICe,n=W5(a,"start","brush","end"),i=6,o;function a(f){var p=f.property("__brush",h).selectAll(".overlay").data([fT("overlay")]);p.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Yp.overlay).merge(p).each(function(){var g=MK(this).extent;Gp(this).attr("x",g[0][0]).attr("y",g[0][1]).attr("width",g[1][0]-g[0][0]).attr("height",g[1][1]-g[0][1])}),f.selectAll(".selection").data([fT("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Yp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var d=f.selectAll(".handle").data(e.handles,function(g){return g.type});d.exit().remove(),d.enter().append("rect").attr("class",function(g){return"handle handle--"+g.type}).attr("cursor",function(g){return Yp[g.type]}),f.each(s).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",u)}a.move=function(f,p){f.selection?f.on("start.brush",function(){l(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){l(this,arguments).end()}).tween("brush",function(){var d=this,g=d.__brush,_=l(d,arguments),y=g.selection,x=e.input(typeof p=="function"?p.apply(this,arguments):p,g.extent),b=yy(y,x);function S(C){g.selection=C===1&&EK(x)?null:b(C),s.call(d),_.brush()}return y&&x?S:S(1)}):f.each(function(){var d=this,g=arguments,_=d.__brush,y=e.input(typeof p=="function"?p.apply(d,g):p,_.extent),x=l(d,g).beforestart();p2(d),_.selection=y==null||EK(y)?null:y,s.call(d),x.start().brush().end()})};function s(){var f=Gp(this),p=MK(this).selection;p?(f.selectAll(".selection").style("display",null).attr("x",p[0][0]).attr("y",p[0][1]).attr("width",p[1][0]-p[0][0]).attr("height",p[1][1]-p[0][1]),f.selectAll(".handle").style("display",null).attr("x",function(d){return d.type[d.type.length-1]==="e"?p[1][0]-i/2:p[0][0]-i/2}).attr("y",function(d){return d.type[0]==="s"?p[1][1]-i/2:p[0][1]-i/2}).attr("width",function(d){return d.type==="n"||d.type==="s"?p[1][0]-p[0][0]+i:i}).attr("height",function(d){return d.type==="e"||d.type==="w"?p[1][1]-p[0][1]+i:i})):f.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(f,p){return f.__brush.emitter||new c(f,p)}function c(f,p){this.that=f,this.args=p,this.state=f.__brush,this.active=0}c.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(f){$$(new cCt(a,f,e.output(this.state.selection)),n.apply,n,[f,this.that,this.args])}};function u(){if(wr.touches){if(wr.changedTouches.length<wr.touches.length)return hT()}else if(o)return;if(!r.apply(this,arguments))return;var f=this,p=wr.target.__data__.type,d=(wr.metaKey?p="overlay":p)==="selection"?fCt:wr.altKey?_2:g2,g=e===KR?null:ACe[p],_=e===$R?null:PCe[p],y=MK(f),x=y.extent,b=y.selection,S=x[0][0],C,P,k=x[0][1],O,D,B=x[1][0],I,L,R=x[1][1],F,z,U,W,Z,rt=g&&_&&wr.shiftKey,ot,st,St=PR(f),bt=St,Mt=l(f,arguments).beforestart();p==="overlay"?y.selection=b=[[C=e===KR?S:St[0],O=e===$R?k:St[1]],[I=e===KR?B:C,F=e===$R?R:O]]:(C=b[0][0],O=b[0][1],I=b[1][0],F=b[1][1]),P=C,D=O,L=I,z=F;var lt=Gp(f).attr("pointer-events","none"),Kt=lt.selectAll(".overlay").attr("cursor",Yp[p]);if(wr.touches)lt.on("touchmove.brush",ct,!0).on("touchend.brush touchcancel.brush",et,!0);else{var _t=Gp(wr.view).on("keydown.brush",dt,!0).on("keyup.brush",q,!0).on("mousemove.brush",ct,!0).on("mouseup.brush",et,!0);Z$(wr.view)}wK(),p2(f),s.call(f),Mt.start();function ct(){var pt=PR(f);rt&&!ot&&!st&&(Math.abs(pt[0]-bt[0])>Math.abs(pt[1]-bt[1])?st=!0:ot=!0),bt=pt,Z=!0,hT(),X()}function X(){var pt;switch(U=bt[0]-St[0],W=bt[1]-St[1],d){case SK:case fCt:{g&&(U=Math.max(S-C,Math.min(B-I,U)),P=C+U,L=I+U),_&&(W=Math.max(k-O,Math.min(R-F,W)),D=O+W,z=F+W);break}case g2:{g<0?(U=Math.max(S-C,Math.min(B-C,U)),P=C+U,L=I):g>0&&(U=Math.max(S-I,Math.min(B-I,U)),P=C,L=I+U),_<0?(W=Math.max(k-O,Math.min(R-O,W)),D=O+W,z=F):_>0&&(W=Math.max(k-F,Math.min(R-F,W)),D=O,z=F+W);break}case _2:{g&&(P=Math.max(S,Math.min(B,C-U*g)),L=Math.max(S,Math.min(B,I+U*g))),_&&(D=Math.max(k,Math.min(R,O-W*_)),z=Math.max(k,Math.min(R,F+W*_)));break}}L<P&&(g*=-1,pt=C,C=I,I=pt,pt=P,P=L,L=pt,p in pCt&&Kt.attr("cursor",Yp[p=pCt[p]])),z<D&&(_*=-1,pt=O,O=F,F=pt,pt=D,D=z,z=pt,p in dCt&&Kt.attr("cursor",Yp[p=dCt[p]])),y.selection&&(b=y.selection),ot&&(P=b[0][0],L=b[1][0]),st&&(D=b[0][1],z=b[1][1]),(b[0][0]!==P||b[0][1]!==D||b[1][0]!==L||b[1][1]!==z)&&(y.selection=[[P,D],[L,z]],s.call(f),Mt.brush())}function et(){if(wK(),wr.touches){if(wr.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500),lt.on("touchmove.brush touchend.brush touchcancel.brush",null)}else J$(wr.view,Z),_t.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);lt.attr("pointer-events","all"),Kt.attr("cursor",Yp.overlay),y.selection&&(b=y.selection),EK(b)&&(y.selection=null,s.call(f)),Mt.end()}function dt(){switch(wr.keyCode){case 16:{rt=g&&_;break}case 18:{d===g2&&(g&&(I=L-U*g,C=P+U*g),_&&(F=z-W*_,O=D+W*_),d=_2,X());break}case 32:{(d===g2||d===_2)&&(g<0?I=L-U:g>0&&(C=P-U),_<0?F=z-W:_>0&&(O=D-W),d=SK,Kt.attr("cursor",Yp.selection),X());break}default:return}hT()}function q(){switch(wr.keyCode){case 16:{rt&&(ot=st=rt=!1,X());break}case 18:{d===_2&&(g<0?I=L:g>0&&(C=P),_<0?F=z:_>0&&(O=D),d=g2,X());break}case 32:{d===SK&&(wr.altKey?(g&&(I=L-U*g,C=P+U*g),_&&(F=z-W*_,O=D+W*_),d=_2):(g<0?I=L:g>0&&(C=P),_<0?F=z:_>0&&(O=D),d=g2),Kt.attr("cursor",Yp[p]),X());break}default:return}hT()}}function h(){var f=this.__brush||{selection:null};return f.extent=t.apply(this,arguments),f.dim=e,f}return a.extent=function(f){return arguments.length?(t=typeof f=="function"?f:bK([[+f[0][0],+f[0][1]],[+f[1][0],+f[1][1]]]),a):t},a.filter=function(f){return arguments.length?(r=typeof f=="function"?f:bK(!!f),a):r},a.handleSize=function(f){return arguments.length?(i=+f,a):i},a.on=function(){var f=n.on.apply(n,arguments);return f===n?a:f},a}var fCt,SK,g2,_2,$R,KR,CCe,Yp,pCt,dCt,ACe,PCe,vCt=M(()=>{F$();P5t();rT();Ts();sCt();lCt();uCt();hCt();fCt={name:"drag"},SK={name:"space"},g2={name:"handle"},_2={name:"center"},$R={name:"x",handles:["e","w"].map(fT),input:function(e,t){return e&&[[e[0],t[0][1]],[e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},KR={name:"y",handles:["n","s"].map(fT),input:function(e,t){return e&&[[t[0][0],e[0]],[t[1][0],e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},CCe={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(fT),input:function(e){return e},output:function(e){return e}},Yp={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},pCt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},dCt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ACe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},PCe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1}});var xCt=M(()=>{vCt()});function cg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var xy=M(()=>{});function CK(e){return e.length===1&&(e=kCe(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function kCe(e){return function(t,r){return cg(e(t),r)}}var AK=M(()=>{xy()});var bCt,RCe,NCe,PK=M(()=>{xy();AK();bCt=CK(cg),RCe=bCt.right,NCe=bCt.left});var IK=M(()=>{});var wCt=M(()=>{IK()});var SCt=M(()=>{});var y2=M(()=>{});var LK=M(()=>{y2()});var kK=M(()=>{LK()});var RK=M(()=>{});var MCt,OCe,zCe,NK=M(()=>{MCt=Array.prototype,OCe=MCt.slice,zCe=MCt.map});var ECt=M(()=>{});var TCt=M(()=>{});function pT(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var DK=M(()=>{});var Sln,Mln,Eln,OK=M(()=>{Sln=Math.sqrt(50),Mln=Math.sqrt(10),Eln=Math.sqrt(2)});var zK=M(()=>{});var CCt=M(()=>{NK();PK();ECt();RK();TCt();DK();OK();zK()});var JR=M(()=>{y2()});var PCt=M(()=>{NK();xy();y2();JR()});var ICt=M(()=>{kK()});var LCt=M(()=>{});var kCt=M(()=>{y2()});var RCt=M(()=>{xy();y2();JR()});var NCt=M(()=>{});var FK=M(()=>{});var DCt=M(()=>{});var OCt=M(()=>{xy()});var zCt=M(()=>{});var FCt=M(()=>{});var BK=M(()=>{FK()});var BCt=M(()=>{BK()});var HCt=M(()=>{PK();xy();AK();wCt();SCt();kK();RK();CCt();PCt();ICt();zK();LCt();kCt();RCt();NCt();FK();IK();DCt();JR();DK();OCt();zCt();FCt();OK();BK();LK();BCt()});var HK,VK,VCt,dT,UK,qK,GK=M(()=>{HK=Math.cos,VK=Math.sin,VCt=Math.PI,dT=VCt/2,UK=VCt*2,qK=Math.max});function WCe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function UCt(){var e=0,t=null,r=null,n=null;function i(o){var a=o.length,s=[],l=pT(a),c=[],u=[],h=u.groups=new Array(a),f=new Array(a*a),p,d,g,_,y,x;for(p=0,y=-1;++y<a;){for(d=0,x=-1;++x<a;)d+=o[y][x];s.push(d),c.push(pT(a)),p+=d}for(t&&l.sort(function(B,I){return t(s[B],s[I])}),r&&c.forEach(function(B,I){B.sort(function(L,R){return r(o[I][L],o[I][R])})}),p=qK(0,UK-e*a)/p,_=p?e:UK/a,d=0,y=-1;++y<a;){for(g=d,x=-1;++x<a;){var b=l[y],S=c[b][x],C=o[b][S],P=d,k=d+=C*p;f[S*a+b]={index:b,subindex:S,startAngle:P,endAngle:k,value:C}}h[b]={index:b,startAngle:g,endAngle:d,value:s[b]},d+=_}for(y=-1;++y<a;)for(x=y-1;++x<a;){var O=f[x*a+y],D=f[y*a+x];(O.value||D.value)&&u.push(O.value<D.value?{source:D,target:O}:{source:O,target:D})}return n?u.sort(n):u}return i.padAngle=function(o){return arguments.length?(e=qK(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(r=o,i):r},i.sortChords=function(o){return arguments.length?(o==null?n=null:(n=WCe(o))._=o,i):n&&n._},i}var qCt=M(()=>{HCt();GK()});var GCt,WCt=M(()=>{GCt=Array.prototype.slice});function QR(e){return function(){return e}}var YCt=M(()=>{});function jK(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jCt(){return new jK}var WK,YK,by,YCe,XK,XCt=M(()=>{WK=Math.PI,YK=2*WK,by=1e-6,YCe=YK-by;jK.prototype=jCt.prototype={constructor:jK,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>by)if(!(Math.abs(u*s-l*c)>by)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((WK-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>by&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>by||Math.abs(this._y1-c)>by)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%YK+YK),h>YCe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>by&&(this._+="A"+r+","+r+",0,"+ +(h>=WK)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};XK=jCt});var $Ct=M(()=>{XCt()});function jCe(e){return e.source}function XCe(e){return e.target}function $Ce(e){return e.radius}function KCe(e){return e.startAngle}function ZCe(e){return e.endAngle}function KCt(){var e=jCe,t=XCe,r=$Ce,n=KCe,i=ZCe,o=null;function a(){var s,l=GCt.call(arguments),c=e.apply(this,l),u=t.apply(this,l),h=+r.apply(this,(l[0]=c,l)),f=n.apply(this,l)-dT,p=i.apply(this,l)-dT,d=h*HK(f),g=h*VK(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-dT,x=i.apply(this,l)-dT;if(o||(o=s=XK()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*HK(y),_*VK(y)),o.arc(0,0,_,y,x)),o.quadraticCurveTo(0,0,d,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(r=typeof s=="function"?s:QR(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:QR(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:QR(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}var ZCt=M(()=>{WCt();YCt();GK();$Ct()});var JCt=M(()=>{qCt();ZCt()});function tN(){}function QCt(e,t){var r=new tN;if(e instanceof tN)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var cl,wy,eN=M(()=>{cl="$";tN.prototype=QCt.prototype={constructor:tN,has:function(e){return cl+e in this},get:function(e){return this[cl+e]},set:function(e,t){return this[cl+e]=t,this},remove:function(e){var t=cl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===cl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===cl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===cl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===cl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===cl&&++e;return e},empty:function(){for(var e in this)if(e[0]===cl)return!1;return!0},each:function(e){for(var t in this)t[0]===cl&&e(this[t],t.slice(1),this)}};wy=QCt});function rAt(){var e=[],t=[],r,n,i;function o(s,l,c,u){if(l>=e.length)return r!=null&&s.sort(r),n!=null?n(s):s;for(var h=-1,f=s.length,p=e[l++],d,g,_=wy(),y,x=c();++h<f;)(y=_.get(d=p(g=s[h])+""))?y.push(g):_.set(d,[g]);return _.each(function(b,S){u(x,S,o(b,l,c,u))}),x}function a(s,l){if(++l>e.length)return s;var c,u=t[l-1];return n!=null&&l>=e.length?c=s.entries():(c=[],s.each(function(h,f){c.push({key:f,values:a(h,l)})})),u!=null?c.sort(function(h,f){return u(h.key,f.key)}):c}return i={object:function(s){return o(s,0,JCe,QCe)},map:function(s){return o(s,0,tAt,eAt)},entries:function(s){return a(o(s,0,tAt,eAt),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return r=s,i},rollup:function(s){return n=s,i}}}function JCe(){return{}}function QCe(e,t,r){e[t]=r}function tAt(){return wy()}function eAt(e,t,r){e.set(t,r)}var nAt=M(()=>{eN()});function rN(){}function iAt(e,t){var r=new rN;if(e instanceof rN)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var Sy,oAt,aAt=M(()=>{eN();Sy=wy.prototype;rN.prototype=iAt.prototype={constructor:rN,has:Sy.has,add:function(e){return e+="",this[cl+e]=e,this},remove:Sy.remove,clear:Sy.clear,values:Sy.keys,size:Sy.size,empty:Sy.empty,each:Sy.each};oAt=iAt});function sAt(e){var t=[];for(var r in e)t.push(r);return t}var lAt=M(()=>{});function cAt(e){var t=[];for(var r in e)t.push(e[r]);return t}var uAt=M(()=>{});function hAt(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var fAt=M(()=>{});var pAt=M(()=>{nAt();aAt();eN();lAt();uAt();fAt()});function jp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ug(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var nN=M(()=>{});function ef(){}function x2(e){var t;return e=(e+"").trim().toLowerCase(),(t=tAe.exec(e))?(t=parseInt(t[1],16),new to(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1)):(t=eAe.exec(e))?mAt(parseInt(t[1],16)):(t=rAe.exec(e))?new to(t[1],t[2],t[3],1):(t=nAe.exec(e))?new to(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iAe.exec(e))?gAt(t[1],t[2],t[3],t[4]):(t=oAe.exec(e))?gAt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=aAe.exec(e))?_At(t[1],t[2]/100,t[3]/100,1):(t=sAe.exec(e))?_At(t[1],t[2]/100,t[3]/100,t[4]):dAt.hasOwnProperty(e)?mAt(dAt[e]):e==="transparent"?new to(NaN,NaN,NaN,0):null}function mAt(e){return new to(e>>16&255,e>>8&255,e&255,1)}function gAt(e,t,r,n){return n<=0&&(e=t=r=NaN),new to(e,t,r,n)}function gT(e){return e instanceof ef||(e=x2(e)),e?(e=e.rgb(),new to(e.r,e.g,e.b,e.opacity)):new to}function KK(e,t,r,n){return arguments.length===1?gT(e):new to(e,t,r,n==null?1:n)}function to(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _At(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Qh(e,t,r,n)}function lAe(e){if(e instanceof Qh)return new Qh(e.h,e.s,e.l,e.opacity);if(e instanceof ef||(e=x2(e)),!e)return new Qh;if(e instanceof Qh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Qh(a,s,l,e.opacity)}function ZK(e,t,r,n){return arguments.length===1?lAe(e):new Qh(e,t,r,n==null?1:n)}function Qh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function $K(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var hg,My,v2,mT,tf,tAe,eAe,rAe,nAe,iAe,oAe,aAe,sAe,dAt,iN=M(()=>{nN();hg=.7,My=1/hg,v2="\\s*([+-]?\\d+)\\s*",mT="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",tf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tAe=/^#([0-9a-f]{3})$/,eAe=/^#([0-9a-f]{6})$/,rAe=new RegExp("^rgb\\("+[v2,v2,v2]+"\\)$"),nAe=new RegExp("^rgb\\("+[tf,tf,tf]+"\\)$"),iAe=new RegExp("^rgba\\("+[v2,v2,v2,mT]+"\\)$"),oAe=new RegExp("^rgba\\("+[tf,tf,tf,mT]+"\\)$"),aAe=new RegExp("^hsl\\("+[mT,tf,tf]+"\\)$"),sAe=new RegExp("^hsla\\("+[mT,tf,tf,mT]+"\\)$"),dAt={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};jp(ef,x2,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});jp(to,KK,ug(ef,{brighter:function(e){return e=e==null?My:Math.pow(My,e),new to(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?hg:Math.pow(hg,e),new to(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}}));jp(Qh,ZK,ug(ef,{brighter:function(e){return e=e==null?My:Math.pow(My,e),new Qh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?hg:Math.pow(hg,e),new Qh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new to($K(e>=240?e-240:e+120,i,n),$K(e,i,n),$K(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))});var oN,aN,JK=M(()=>{oN=Math.PI/180,aN=180/Math.PI});function nZ(e){if(e instanceof Xp)return new Xp(e.l,e.a,e.b,e.opacity);if(e instanceof fg){var t=e.h*oN;return new Xp(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof to||(e=gT(e));var r=rZ(e.r),n=rZ(e.g),i=rZ(e.b),o=QK((.4124564*r+.3575761*n+.1804375*i)/yAt),a=QK((.2126729*r+.7151522*n+.072175*i)/vAt),s=QK((.0193339*r+.119192*n+.9503041*i)/xAt);return new Xp(116*a-16,500*(o-a),200*(a-s),e.opacity)}function lN(e,t,r,n){return arguments.length===1?nZ(e):new Xp(e,t,r,n==null?1:n)}function Xp(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function QK(e){return e>cAe?Math.pow(e,1/3):e/wAt+bAt}function tZ(e){return e>b2?e*e*e:wAt*(e-bAt)}function eZ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rZ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function uAe(e){if(e instanceof fg)return new fg(e.h,e.c,e.l,e.opacity);e instanceof Xp||(e=nZ(e));var t=Math.atan2(e.b,e.a)*aN;return new fg(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function iZ(e,t,r,n){return arguments.length===1?uAe(e):new fg(e,t,r,n==null?1:n)}function fg(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}var sN,yAt,vAt,xAt,bAt,b2,wAt,cAe,SAt=M(()=>{nN();iN();JK();sN=18,yAt=.95047,vAt=1,xAt=1.08883,bAt=4/29,b2=6/29,wAt=3*b2*b2,cAe=b2*b2*b2;jp(Xp,lN,ug(ef,{brighter:function(e){return new Xp(this.l+sN*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Xp(this.l-sN*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return e=vAt*tZ(e),t=yAt*tZ(t),r=xAt*tZ(r),new to(eZ(3.2404542*t-1.5371385*e-.4985314*r),eZ(-.969266*t+1.8760108*e+.041556*r),eZ(.0556434*t-.2040259*e+1.0572252*r),this.opacity)}}));jp(fg,iZ,ug(ef,{brighter:function(e){return new fg(this.h,this.c,this.l+sN*(e==null?1:e),this.opacity)},darker:function(e){return new fg(this.h,this.c,this.l-sN*(e==null?1:e),this.opacity)},rgb:function(){return nZ(this).rgb()}}))});function hAe(e){if(e instanceof Ey)return new Ey(e.h,e.s,e.l,e.opacity);e instanceof to||(e=gT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(TAt*n+MAt*t-EAt*r)/(TAt+MAt-EAt),o=n-i,a=(_T*(r-i)-aZ*o)/cN,s=Math.sqrt(a*a+o*o)/(_T*i*(1-i)),l=s?Math.atan2(a,o)*aN-120:NaN;return new Ey(l<0?l+360:l,s,i,e.opacity)}function uN(e,t,r,n){return arguments.length===1?hAe(e):new Ey(e,t,r,n==null?1:n)}function Ey(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var CAt,oZ,aZ,cN,_T,MAt,EAt,TAt,AAt=M(()=>{nN();iN();JK();CAt=-.14861,oZ=1.78277,aZ=-.29227,cN=-.90649,_T=1.97294,MAt=_T*cN,EAt=_T*oZ,TAt=oZ*aZ-cN*CAt;jp(Ey,uN,ug(ef,{brighter:function(e){return e=e==null?My:Math.pow(My,e),new Ey(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?hg:Math.pow(hg,e),new Ey(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*oN,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new to(255*(t+r*(CAt*n+oZ*i)),255*(t+r*(aZ*n+cN*i)),255*(t+r*(_T*n)),this.opacity)}}))});var PAt=M(()=>{iN();SAt();AAt()});function LAt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r)throw new Error("illegal type: "+n);r[n]=[]}return new hN(r)}function hN(e){this._=e}function pAe(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function dAe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function IAt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=fAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var fAe,kAt,RAt=M(()=>{fAe={value:function(){}};hN.prototype=LAt.prototype={constructor:hN,on:function(e,t){var r=this._,n=pAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=dAe(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=IAt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=IAt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new hN(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};kAt=LAt});var NAt=M(()=>{RAt()});function OAt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new fN(r)}function fN(e){this._=e}function gAe(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function _Ae(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function DAt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=mAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var mAe,sZ,zAt=M(()=>{mAe={value:function(){}};fN.prototype=OAt.prototype={constructor:fN,on:function(e,t){var r=this._,n=gAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=_Ae(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=DAt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=DAt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new fN(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};sZ=OAt});var FAt=M(()=>{zAt()});var pN,lZ,cZ=M(()=>{pN="http://www.w3.org/1999/xhtml",lZ={svg:"http://www.w3.org/2000/svg",xhtml:pN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function dN(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),lZ.hasOwnProperty(t)?{space:lZ[t],local:e}:e}var uZ=M(()=>{cZ()});function yAe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===pN&&t.documentElement.namespaceURI===pN?t.createElement(e):t.createElementNS(r,e)}}function vAe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mN(e){var t=dN(e);return(t.local?vAe:yAe)(t)}var hZ=M(()=>{uZ();cZ()});function xAe(){}function gN(e){return e==null?xAe:function(){return this.querySelector(e)}}var fZ=M(()=>{});function BAt(e){typeof e!="function"&&(e=gN(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new pi(n,this._parents)}var HAt=M(()=>{rf();fZ()});function bAe(){return[]}function VAt(e){return e==null?bAe:function(){return this.querySelectorAll(e)}}var UAt=M(()=>{});function qAt(e){typeof e!="function"&&(e=VAt(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new pi(n,i)}var GAt=M(()=>{rf();UAt()});function WAt(e){return function(){return this.matches(e)}}var YAt=M(()=>{});function jAt(e){typeof e!="function"&&(e=WAt(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new pi(n,this._parents)}var XAt=M(()=>{rf();YAt()});function _N(e){return new Array(e.length)}var pZ=M(()=>{});function $At(){return new pi(this._enter||this._groups.map(_N),this._parents)}function yT(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var dZ=M(()=>{pZ();rf();yT.prototype={constructor:yT,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function KAt(e){return function(){return e}}var ZAt=M(()=>{});function wAe(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new yT(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function SAe(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=JAt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=JAt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new yT(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function QAt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?SAe:wAe,n=this._parents,i=this._groups;typeof e!="function"&&(e=KAt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new pi(a,n),a._enter=s,a._exit=l,a}var JAt,t4t=M(()=>{rf();dZ();ZAt();JAt="$"});function e4t(){return new pi(this._exit||this._groups.map(_N),this._parents)}var r4t=M(()=>{pZ();rf()});function n4t(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var i4t=M(()=>{});function o4t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new pi(a,this._parents)}var a4t=M(()=>{rf()});function s4t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var l4t=M(()=>{});function c4t(e){e||(e=MAe);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new pi(i,this._parents).order()}function MAe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var u4t=M(()=>{rf()});function h4t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var f4t=M(()=>{});function p4t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var d4t=M(()=>{});function m4t(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var g4t=M(()=>{});function _4t(){var e=0;return this.each(function(){++e}),e}var y4t=M(()=>{});function v4t(){return!this.node()}var x4t=M(()=>{});function b4t(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var w4t=M(()=>{});function EAe(e){return function(){this.removeAttribute(e)}}function TAe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CAe(e,t){return function(){this.setAttribute(e,t)}}function AAe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function PAe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function IAe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function S4t(e,t){var r=dN(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?TAe:EAe:typeof t=="function"?r.local?IAe:PAe:r.local?AAe:CAe)(r,t))}var M4t=M(()=>{uZ()});function yN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var mZ=M(()=>{});function LAe(e){return function(){this.style.removeProperty(e)}}function kAe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function RAe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function E4t(e,t,r){return arguments.length>1?this.each((t==null?LAe:typeof t=="function"?RAe:kAe)(e,t,r==null?"":r)):NAe(this.node(),e)}function NAe(e,t){return e.style.getPropertyValue(t)||yN(e).getComputedStyle(e,null).getPropertyValue(t)}var T4t=M(()=>{mZ()});function DAe(e){return function(){delete this[e]}}function OAe(e,t){return function(){this[e]=t}}function zAe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function C4t(e,t){return arguments.length>1?this.each((t==null?DAe:typeof t=="function"?zAe:OAe)(e,t)):this.node()[e]}var A4t=M(()=>{});function P4t(e){return e.trim().split(/^|\s+/)}function gZ(e){return e.classList||new I4t(e)}function I4t(e){this._node=e,this._names=P4t(e.getAttribute("class")||"")}function L4t(e,t){for(var r=gZ(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function k4t(e,t){for(var r=gZ(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function FAe(e){return function(){L4t(this,e)}}function BAe(e){return function(){k4t(this,e)}}function HAe(e,t){return function(){(t.apply(this,arguments)?L4t:k4t)(this,e)}}function R4t(e,t){var r=P4t(e+"");if(arguments.length<2){for(var n=gZ(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?HAe:t?FAe:BAe)(r,t))}var N4t=M(()=>{I4t.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function VAe(){this.textContent=""}function UAe(e){return function(){this.textContent=e}}function qAe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function D4t(e){return arguments.length?this.each(e==null?VAe:(typeof e=="function"?qAe:UAe)(e)):this.node().textContent}var O4t=M(()=>{});function GAe(){this.innerHTML=""}function WAe(e){return function(){this.innerHTML=e}}function YAe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function z4t(e){return arguments.length?this.each(e==null?GAe:(typeof e=="function"?YAe:WAe)(e)):this.node().innerHTML}var F4t=M(()=>{});function jAe(){this.nextSibling&&this.parentNode.appendChild(this)}function B4t(){return this.each(jAe)}var H4t=M(()=>{});function XAe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function V4t(){return this.each(XAe)}var U4t=M(()=>{});function q4t(e){var t=typeof e=="function"?e:mN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var G4t=M(()=>{hZ()});function $Ae(){return null}function W4t(e,t){var r=typeof e=="function"?e:mN(e),n=t==null?$Ae:typeof t=="function"?t:gN(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Y4t=M(()=>{hZ();fZ()});function KAe(){var e=this.parentNode;e&&e.removeChild(this)}function j4t(){return this.each(KAe)}var X4t=M(()=>{});function ZAe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function JAe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $4t(e){return this.select(e?JAe:ZAe)}var K4t=M(()=>{});function Z4t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var J4t=M(()=>{});function QAe(e,t,r){return e=ePt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function ePt(e,t,r){return function(n){var i=sn;sn=n;try{e.call(this,this.__data__,t,r)}finally{sn=i}}}function t4e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function e4e(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function r4e(e,t,r){var n=tPt.hasOwnProperty(e.type)?QAe:ePt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function rPt(e,t,r){var n=t4e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?r4e:e4e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function vN(e,t,r,n){var i=sn;e.sourceEvent=sn,sn=e;try{return t.apply(r,n)}finally{sn=i}}var tPt,sn,Q4t,xN=M(()=>{tPt={},sn=null;typeof document!="undefined"&&(Q4t=document.documentElement,"onmouseenter"in Q4t||(tPt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function nPt(e,t,r){var n=yN(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function n4e(e,t){return function(){return nPt(this,e,t)}}function i4e(e,t){return function(){return nPt(this,e,t.apply(this,arguments))}}function iPt(e,t){return this.each((typeof t=="function"?i4e:n4e)(e,t))}var oPt=M(()=>{mZ()});function pi(e,t){this._groups=e,this._parents=t}function o4e(){return new pi([[document.documentElement]],_Z)}var _Z,rf=M(()=>{HAt();GAt();XAt();t4t();dZ();r4t();i4t();a4t();l4t();u4t();f4t();d4t();g4t();y4t();x4t();w4t();M4t();T4t();A4t();N4t();O4t();F4t();H4t();U4t();G4t();Y4t();X4t();K4t();J4t();xN();oPt();_Z=[null];pi.prototype=o4e.prototype={constructor:pi,select:BAt,selectAll:qAt,filter:jAt,data:QAt,enter:$At,exit:e4t,join:n4t,merge:o4t,order:s4t,sort:c4t,call:h4t,nodes:p4t,node:m4t,size:_4t,empty:v4t,each:b4t,attr:S4t,style:E4t,property:C4t,classed:R4t,text:D4t,html:z4t,raise:B4t,lower:V4t,append:q4t,insert:W4t,remove:j4t,clone:$4t,datum:Z4t,on:rPt,dispatch:iPt}});function Ty(e){return typeof e=="string"?new pi([[document.querySelector(e)]],[document.documentElement]):new pi([[e]],_Z)}var aPt=M(()=>{rf()});function bN(){for(var e=sn,t;t=e.sourceEvent;)e=t;return e}var yZ=M(()=>{xN()});function wN(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var vZ=M(()=>{});function xZ(e){var t=bN();return t.changedTouches&&(t=t.changedTouches[0]),wN(e,t)}var sPt=M(()=>{yZ();vZ()});function bZ(e,t,r){arguments.length<3&&(r=t,t=bN().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return wN(e,o);return null}var lPt=M(()=>{yZ();vZ()});var SN=M(()=>{sPt();aPt();lPt();xN()});function MN(){sn.stopImmediatePropagation()}function pg(){sn.preventDefault(),sn.stopImmediatePropagation()}var wZ=M(()=>{SN()});function EN(e){var t=e.document.documentElement,r=Ty(e).on("dragstart.drag",pg,!0);"onselectstart"in t?r.on("selectstart.drag",pg,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function TN(e,t){var r=e.document.documentElement,n=Ty(e).on("dragstart.drag",null);t&&(n.on("click.drag",pg,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var SZ=M(()=>{SN();wZ()});function vT(e){return function(){return e}}var cPt=M(()=>{});function xT(e,t,r,n,i,o,a,s,l,c){this.target=e,this.type=t,this.subject=r,this.identifier=n,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}var uPt=M(()=>{xT.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e}});function a4e(){return!sn.button}function s4e(){return this.parentNode}function l4e(e){return e==null?{x:sn.x,y:sn.y}:e}function c4e(){return"ontouchstart"in this}function hPt(){var e=a4e,t=s4e,r=l4e,n=c4e,i={},o=sZ("start","drag","end"),a=0,s,l,c,u,h=0;function f(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",_).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!(u||!e.apply(this,arguments))){var S=b("mouse",t.apply(this,arguments),xZ,this,arguments);!S||(Ty(sn.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),EN(sn.view),MN(),c=!1,s=sn.clientX,l=sn.clientY,S("start"))}}function d(){if(pg(),!c){var S=sn.clientX-s,C=sn.clientY-l;c=S*S+C*C>h}i.mouse("drag")}function g(){Ty(sn.view).on("mousemove.drag mouseup.drag",null),TN(sn.view,c),pg(),i.mouse("end")}function _(){if(!!e.apply(this,arguments)){var S=sn.changedTouches,C=t.apply(this,arguments),P=S.length,k,O;for(k=0;k<P;++k)(O=b(S[k].identifier,C,bZ,this,arguments))&&(MN(),O("start"))}}function y(){var S=sn.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(pg(),k("drag"))}function x(){var S=sn.changedTouches,C=S.length,P,k;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),P=0;P<C;++P)(k=i[S[P].identifier])&&(MN(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!vN(new xT(f,"beforestart",B,S,a,D[0],D[1],0,0,R),function(){return(sn.subject=B=r.apply(k,O))==null?!1:(I=B.x-D[0]||0,L=B.y-D[1]||0,!0)}))return function F(z){var U=D,W;switch(z){case"start":i[S]=F,W=a++;break;case"end":delete i[S],--a;case"drag":D=P(C,S),W=a;break}vN(new xT(f,z,B,S,W,D[0]+I,D[1]+L,D[0]-U[0],D[1]-U[1],R),R.apply,R,[z,k,O])}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:vT(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:vT(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:vT(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:vT(!!S),f):n},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,f):Math.sqrt(h)},f}var fPt=M(()=>{FAt();SN();SZ();wZ();cPt();uPt()});var pPt=M(()=>{fPt();SZ()});function mPt(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+"]"}).join(",")+"}")}function u4e(e,t){var r=mPt(e);return function(n,i){return t(r(n),i,e)}}function h4e(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function w2(e){var t=new RegExp('["'+e+`
\r]`),r=e.charCodeAt(0);function n(c,u){var h,f,p=i(c,function(d,g){if(h)return h(d,g-1);f=d,h=u?u4e(d,u):mPt(d)});return p.columns=f||[],p}function i(c,u){var h=[],f=c.length,p=0,d=0,g,_=f<=0,y=!1;c.charCodeAt(f-1)===bT&&--f,c.charCodeAt(f-1)===TZ&&--f;function x(){if(_)return MZ;if(y)return y=!1,dPt;var S,C=p,P;if(c.charCodeAt(C)===EZ){for(;p++<f&&c.charCodeAt(p)!==EZ||c.charCodeAt(++p)===EZ;);return(S=p)>=f?_=!0:(P=c.charCodeAt(p++))===bT?y=!0:P===TZ&&(y=!0,c.charCodeAt(p)===bT&&++p),c.slice(C+1,S-1).replace(/""/g,'"')}for(;p<f;){if((P=c.charCodeAt(S=p++))===bT)y=!0;else if(P===TZ)y=!0,c.charCodeAt(p)===bT&&++p;else if(P!==r)continue;return c.slice(C,S)}return _=!0,c.slice(C,f)}for(;(g=x())!==MZ;){for(var b=[];g!==dPt&&g!==MZ;)b.push(g),g=x();u&&(b=u(b,d++))==null||h.push(b)}return h}function o(c,u){return u==null&&(u=h4e(c)),[u.map(l).join(e)].concat(c.map(function(h){return u.map(function(f){return l(h[f])}).join(e)})).join(`
`)}function a(c){return c.map(s).join(`
`)}function s(c){return c.map(l).join(e)}function l(c){return c==null?"":t.test(c+="")?'"'+c.replace(/"/g,'""')+'"':c}return{parse:n,parseRows:i,format:o,formatRows:a}}var dPt,MZ,EZ,bT,TZ,CN=M(()=>{dPt={},MZ={},EZ=34,bT=10,TZ=13});var AN,gPt,_Pt,yPt,vPt,xPt=M(()=>{CN();AN=w2(","),gPt=AN.parse,_Pt=AN.parseRows,yPt=AN.format,vPt=AN.formatRows});var PN,bPt,wPt,SPt,MPt,EPt=M(()=>{CN();PN=w2("	"),bPt=PN.parse,wPt=PN.parseRows,SPt=PN.format,MPt=PN.formatRows});var TPt=M(()=>{CN();xPt();EPt()});function CPt(e){return+e}var APt=M(()=>{});function PPt(e){return e*e}function IPt(e){return e*(2-e)}function CZ(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var LPt=M(()=>{});function kPt(e){return e*e*e}function RPt(e){return--e*e*e+1}function AZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var NPt=M(()=>{});var PZ,DPt,OPt,IZ,zPt=M(()=>{PZ=3,DPt=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(PZ),OPt=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(PZ),IZ=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(PZ)});function HPt(e){return 1-Math.cos(e*BPt)}function VPt(e){return Math.sin(e*BPt)}function LZ(e){return(1-Math.cos(FPt*e))/2}var FPt,BPt,UPt=M(()=>{FPt=Math.PI,BPt=FPt/2});function qPt(e){return Math.pow(2,10*e-10)}function GPt(e){return 1-Math.pow(2,-10*e)}function kZ(e){return((e*=2)<=1?Math.pow(2,10*e-10):2-Math.pow(2,10-10*e))/2}var WPt=M(()=>{});function YPt(e){return 1-Math.sqrt(1-e*e)}function jPt(e){return Math.sqrt(1- --e*e)}function RZ(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var XPt=M(()=>{});function $Pt(e){return 1-S2(1-e)}function S2(e){return(e=+e)<NZ?IN*e*e:e<p4e?IN*(e-=f4e)*e+d4e:e<g4e?IN*(e-=m4e)*e+_4e:IN*(e-=y4e)*e+v4e}function KPt(e){return((e*=2)<=1?1-S2(1-e):S2(e-1)+1)/2}var NZ,f4e,p4e,d4e,m4e,g4e,_4e,y4e,v4e,IN,ZPt=M(()=>{NZ=.36363636363636365,f4e=6/11,p4e=8/11,d4e=3/4,m4e=9/11,g4e=10/11,_4e=15/16,y4e=21/22,v4e=63/64,IN=1/NZ/NZ});var DZ,JPt,QPt,OZ,t6t=M(()=>{DZ=1.70158,JPt=function e(t){t=+t;function r(n){return n*n*((t+1)*n-t)}return r.overshoot=e,r}(DZ),QPt=function e(t){t=+t;function r(n){return--n*n*((t+1)*n+t)+1}return r.overshoot=e,r}(DZ),OZ=function e(t){t=+t;function r(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return r.overshoot=e,r}(DZ)});var M2,zZ,FZ,e6t,BZ,r6t,n6t=M(()=>{M2=2*Math.PI,zZ=1,FZ=.3,e6t=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return t*Math.pow(2,10*--o)*Math.sin((n-o)/r)}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ),BZ=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return 1-t*Math.pow(2,-10*(o=+o))*Math.sin((o+n)/r)}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ),r6t=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return((o=o*2-1)<0?t*Math.pow(2,10*o)*Math.sin((n-o)/r):2-t*Math.pow(2,-10*o)*Math.sin((n+o)/r))/2}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ)});var i6t=M(()=>{APt();LPt();NPt();zPt();UPt();WPt();XPt();ZPt();t6t();n6t()});function o6t(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var i,o=r.length,a,s=0,l=0;for(i=0;i<o;++i)a=r[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=r[i],a.x-=s,a.y-=l}return n.initialize=function(i){r=i},n.x=function(i){return arguments.length?(e=+i,n):e},n.y=function(i){return arguments.length?(t=+i,n):t},n}var a6t=M(()=>{});function Fn(e){return function(){return e}}var Cy=M(()=>{});function Mu(){return(Math.random()-.5)*1e-6}var LN=M(()=>{});function s6t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return l6t(this.cover(t,r),t,r,e)}function l6t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function c6t(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),r=0;r<n;++r)l6t(this,a[r],s[r],e[r]);return this}var u6t=M(()=>{});function h6t(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a=i-r,s=this._root,l,c;r>e||e>=i||n>t||t>=o;)switch(c=(t<n)<<1|e<r,l=new Array(4),l[c]=s,s=l,a*=2,c){case 0:i=r+a,o=n+a;break;case 1:r=i-a,o=n+a;break;case 2:i=r+a,n=o-a;break;case 3:r=i-a,n=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}var f6t=M(()=>{});function p6t(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var d6t=M(()=>{});function m6t(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}var g6t=M(()=>{});function So(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var kN=M(()=>{});function _6t(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new So(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new So(p[3],_,y,l,c),new So(p[2],a,y,_,c),new So(p[1],_,s,l,y),new So(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}var y6t=M(()=>{kN()});function v6t(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function x6t(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var b6t=M(()=>{});function w6t(){return this._root}var S6t=M(()=>{});function M6t(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var E6t=M(()=>{});function T6t(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new So(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new So(i,c,u,s,l)),(i=n[2])&&t.push(new So(i,o,u,c,l)),(i=n[1])&&t.push(new So(i,c,a,s,u)),(i=n[0])&&t.push(new So(i,o,a,c,u))}return this}var C6t=M(()=>{kN()});function A6t(e){var t=[],r=[],n;for(this._root&&t.push(new So(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new So(o,a,s,u,h)),(o=i[1])&&t.push(new So(o,u,s,l,h)),(o=i[2])&&t.push(new So(o,a,h,u,c)),(o=i[3])&&t.push(new So(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}var P6t=M(()=>{kN()});function I6t(e){return e[0]}function L6t(e){return arguments.length?(this._x=e,this):this._x}var k6t=M(()=>{});function R6t(e){return e[1]}function N6t(e){return arguments.length?(this._y=e,this):this._y}var D6t=M(()=>{});function Ay(e,t,r){var n=new HZ(t==null?I6t:t,r==null?R6t:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function HZ(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function O6t(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Wa,z6t=M(()=>{u6t();f6t();d6t();g6t();y6t();b6t();S6t();E6t();C6t();P6t();k6t();D6t();Wa=Ay.prototype=HZ.prototype;Wa.copy=function(){var e=new HZ(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=O6t(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=O6t(n));return e};Wa.add=s6t;Wa.addAll=c6t;Wa.cover=h6t;Wa.data=p6t;Wa.extent=m6t;Wa.find=_6t;Wa.remove=v6t;Wa.removeAll=x6t;Wa.root=w6t;Wa.size=M6t;Wa.visit=T6t;Wa.visitAfter=A6t;Wa.x=L6t;Wa.y=N6t});var VZ=M(()=>{z6t()});function x4e(e){return e.x+e.vx}function b4e(e){return e.y+e.vy}function F6t(e){var t,r,n=1,i=1;typeof e!="function"&&(e=Fn(e==null?1:+e));function o(){for(var l,c=t.length,u,h,f,p,d,g,_=0;_<i;++_)for(u=Ay(t,x4e,b4e).visitAfter(a),l=0;l<c;++l)h=t[l],d=r[h.index],g=d*d,f=h.x+h.vx,p=h.y+h.vy,u.visit(y);function y(x,b,S,C,P){var k=x.data,O=x.r,D=d+O;if(k){if(k.index>h.index){var B=f-k.x-k.vx,I=p-k.y-k.vy,L=B*B+I*I;L<D*D&&(B===0&&(B=Mu(),L+=B*B),I===0&&(I=Mu(),L+=I*I),L=(D-(L=Math.sqrt(L)))/L*n,h.vx+=(B*=L)*(D=(O*=O)/(g+O)),h.vy+=(I*=L)*D,k.vx-=B*(D=1-D),k.vy-=I*D)}return}return b>f+D||C<f-D||S>p+D||P<p-D}}function a(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function s(){if(!!t){var l,c=t.length,u;for(r=new Array(c),l=0;l<c;++l)u=t[l],r[u.index]=+e(u,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(n=+l,o):n},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Fn(+l),s(),o):e},o}var B6t=M(()=>{Cy();LN();VZ()});function RN(){}function H6t(e,t){var r=new RN;if(e instanceof RN)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var ul,dg,NN=M(()=>{ul="$";RN.prototype=H6t.prototype={constructor:RN,has:function(e){return ul+e in this},get:function(e){return this[ul+e]},set:function(e,t){return this[ul+e]=t,this},remove:function(e){var t=ul+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===ul&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===ul&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===ul&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===ul&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===ul&&++e;return e},empty:function(){for(var e in this)if(e[0]===ul)return!1;return!0},each:function(e){for(var t in this)t[0]===ul&&e(this[t],t.slice(1),this)}};dg=H6t});var V6t=M(()=>{NN()});function DN(){}function w4e(e,t){var r=new DN;if(e instanceof DN)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var Py,U6t=M(()=>{NN();Py=dg.prototype;DN.prototype=w4e.prototype={constructor:DN,has:Py.has,add:function(e){return e+="",this[ul+e]=e,this},remove:Py.remove,clear:Py.clear,values:Py.keys,size:Py.size,empty:Py.empty,each:Py.each}});var q6t=M(()=>{});var G6t=M(()=>{});var W6t=M(()=>{});var UZ=M(()=>{V6t();U6t();NN();q6t();G6t();W6t()});function S4e(e){return e.index}function Y6t(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function j6t(e){var t=S4e,r=u,n,i=Fn(30),o,a,s,l,c=1;e==null&&(e=[]);function u(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var _=0,y=e.length;_<c;++_)for(var x=0,b,S,C,P,k,O,D;x<y;++x)b=e[x],S=b.source,C=b.target,P=C.x+C.vx-S.x-S.vx||Mu(),k=C.y+C.vy-S.y-S.vy||Mu(),O=Math.sqrt(P*P+k*k),O=(O-o[x])/O*g*n[x],P*=O,k*=O,C.vx-=P*(D=l[x]),C.vy-=k*D,S.vx+=P*(D=1-D),S.vy+=k*D}function f(){if(!!a){var g,_=a.length,y=e.length,x=dg(a,t),b;for(g=0,s=new Array(_);g<y;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=Y6t(x,b.source)),typeof b.target!="object"&&(b.target=Y6t(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(g=0,l=new Array(y);g<y;++g)b=e[g],l[g]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);n=new Array(y),p(),o=new Array(y),d()}}function p(){if(!!a)for(var g=0,_=e.length;g<_;++g)n[g]=+r(e[g],g,e)}function d(){if(!!a)for(var g=0,_=e.length;g<_;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g){a=g,f()},h.links=function(g){return arguments.length?(e=g,f(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(r=typeof g=="function"?g:Fn(+g),p(),h):r},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Fn(+g),d(),h):i},h}var X6t=M(()=>{Cy();LN();UZ()});function K6t(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new ON(r)}function ON(e){this._=e}function E4e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function T4e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function $6t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=M4e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var M4e,qZ,Z6t=M(()=>{M4e={value:function(){}};ON.prototype=K6t.prototype={constructor:ON,on:function(e,t){var r=this._,n=E4e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=T4e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=$6t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=$6t(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ON(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};qZ=K6t});var J6t=M(()=>{Z6t()});function YZ(){return Iy||(eIt(C4e),Iy=ET.now()+BN)}function C4e(){Iy=0}function GZ(){this._call=this._time=this._next=null}function HN(e,t,r){var n=new GZ;return n.restart(e,t,r),n}function rIt(){YZ(),++E2;for(var e=zN,t;e;)(t=Iy-e._time)>=0&&e._call.call(null,t),e=e._next;--E2}function Q6t(){Iy=(FN=ET.now())+BN,E2=ST=0;try{rIt()}finally{E2=0,P4e(),Iy=0}}function A4e(){var e=ET.now(),t=e-FN;t>tIt&&(BN-=t,FN=e)}function P4e(){for(var e,t=zN,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:zN=r);MT=e,WZ(n)}function WZ(e){if(!E2){ST&&(ST=clearTimeout(ST));var t=e-Iy;t>24?(e<1/0&&(ST=setTimeout(Q6t,e-ET.now()-BN)),wT&&(wT=clearInterval(wT))):(wT||(FN=ET.now(),wT=setInterval(A4e,tIt)),E2=1,eIt(Q6t))}}var E2,ST,wT,tIt,zN,MT,FN,Iy,BN,ET,eIt,nIt=M(()=>{E2=0,ST=0,wT=0,tIt=1e3,FN=0,Iy=0,BN=0,ET=typeof performance=="object"&&performance.now?performance:Date,eIt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};GZ.prototype=HN.prototype={constructor:GZ,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?YZ():+r)+(t==null?0:+t),!this._next&&MT!==this&&(MT?MT._next=this:zN=this,MT=this),this._call=e,this._time=r,WZ()},stop:function(){this._call&&(this._call=null,this._time=1/0,WZ())}}});var iIt=M(()=>{nIt()});function oIt(e){return e.x}function aIt(e){return e.y}function sIt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=dg(),l=HN(u),c=qZ("tick","end");e==null&&(e=[]);function u(){h(),c.call("tick",t),r<n&&(l.stop(),c.call("end",t))}function h(){var d,g=e.length,_;for(r+=(o-r)*i,s.each(function(y){y(r)}),d=0;d<g;++d)_=e[d],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0)}function f(){for(var d=0,g=e.length,_;d<g;++d){if(_=e[d],_.index=d,isNaN(_.x)||isNaN(_.y)){var y=I4e*Math.sqrt(d),x=d*L4e;_.x=y*Math.cos(x),_.y=y*Math.sin(x)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function p(d){return d.initialize&&d.initialize(e),d}return f(),t={tick:h,restart:function(){return l.restart(u),t},stop:function(){return l.stop(),t},nodes:function(d){return arguments.length?(e=d,f(),s.each(p),t):e},alpha:function(d){return arguments.length?(r=+d,t):r},alphaMin:function(d){return arguments.length?(n=+d,t):n},alphaDecay:function(d){return arguments.length?(i=+d,t):+i},alphaTarget:function(d){return arguments.length?(o=+d,t):o},velocityDecay:function(d){return arguments.length?(a=1-d,t):1-a},force:function(d,g){return arguments.length>1?(g==null?s.remove(d):s.set(d,p(g)),t):s.get(d)},find:function(d,g,_){var y=0,x=e.length,b,S,C,P,k;for(_==null?_=1/0:_*=_,y=0;y<x;++y)P=e[y],b=d-P.x,S=g-P.y,C=b*b+S*S,C<_&&(k=P,_=C);return k},on:function(d,g){return arguments.length>1?(c.on(d,g),t):c.on(d)}}}var I4e,L4e,jZ=M(()=>{J6t();UZ();iIt();I4e=10,L4e=Math.PI*(3-Math.sqrt(5))});function lIt(){var e,t,r,n=Fn(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=Ay(e,oIt,aIt).visitAfter(u);for(r=f,p=0;p<d;++p)t=e[p],g.visit(h)}function c(){if(!!e){var f,p=e.length,d;for(i=new Array(p),f=0;f<p;++f)d=e[f],i[d.index]=+n(d,f,e)}}function u(f){var p=0,d,g,_=0,y,x,b;if(f.length){for(y=x=b=0;b<4;++b)(d=f[b])&&(g=Math.abs(d.value))&&(p+=d.value,_+=g,y+=g*d.x,x+=g*d.y);f.x=y/_,f.y=x/_}else{d=f,d.x=d.data.x,d.y=d.data.y;do p+=i[d.data.index];while(d=d.next)}f.value=p}function h(f,p,d,g){if(!f.value)return!0;var _=f.x-t.x,y=f.y-t.y,x=g-p,b=_*_+y*y;if(x*x/s<b)return b<a&&(_===0&&(_=Mu(),b+=_*_),y===0&&(y=Mu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)),t.vx+=_*f.value*r/b,t.vy+=y*f.value*r/b),!0;if(f.length||b>=a)return;(f.data!==t||f.next)&&(_===0&&(_=Mu(),b+=_*_),y===0&&(y=Mu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)));do f.data!==t&&(x=i[f.data.index]*r/b,t.vx+=_*x,t.vy+=y*x);while(f=f.next)}return l.initialize=function(f){e=f,c()},l.strength=function(f){return arguments.length?(n=typeof f=="function"?f:Fn(+f),c(),l):n},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}var cIt=M(()=>{Cy();LN();VZ();jZ()});function uIt(e,t,r){var n,i=Fn(.1),o,a;typeof e!="function"&&(e=Fn(+e)),t==null&&(t=0),r==null&&(r=0);function s(c){for(var u=0,h=n.length;u<h;++u){var f=n[u],p=f.x-t||1e-6,d=f.y-r||1e-6,g=Math.sqrt(p*p+d*d),_=(a[u]-g)*o[u]*c/g;f.vx+=p*_,f.vy+=d*_}}function l(){if(!!n){var c,u=n.length;for(o=new Array(u),a=new Array(u),c=0;c<u;++c)a[c]=+e(n[c],c,n),o[c]=isNaN(a[c])?0:+i(n[c],c,n)}}return s.initialize=function(c){n=c,l()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Fn(+c),l(),s):i},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Fn(+c),l(),s):e},s.x=function(c){return arguments.length?(t=+c,s):t},s.y=function(c){return arguments.length?(r=+c,s):r},s}var hIt=M(()=>{Cy()});function fIt(e){var t=Fn(.1),r,n,i;typeof e!="function"&&(e=Fn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vx+=(i[l]-u.x)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Fn(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Fn(+s),a(),o):e},o}var pIt=M(()=>{Cy()});function dIt(e){var t=Fn(.1),r,n,i;typeof e!="function"&&(e=Fn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vy+=(i[l]-u.y)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Fn(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Fn(+s),a(),o):e},o}var mIt=M(()=>{Cy()});var gIt=M(()=>{a6t();B6t();X6t();cIt();hIt();jZ();pIt();mIt()});function Ly(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var VN=M(()=>{});function nf(e){return e=Ly(Math.abs(e)),e?e[1]:NaN}var TT=M(()=>{VN()});function _It(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}var yIt=M(()=>{});function vIt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var xIt=M(()=>{});function bIt(e,t){e=e.toPrecision(t);t:for(var r=e.length,n=1,i=-1,o;n<r;++n)switch(e[n]){case".":i=o=n;break;case"0":i===0&&(i=n),o=n;break;case"e":break t;default:i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(o+1):e}var wIt=M(()=>{});function SIt(e,t){var r=Ly(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(XZ=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ly(e,Math.max(0,t+o-1))[0]}var XZ,$Z=M(()=>{VN()});function KZ(e,t){var r=Ly(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var MIt=M(()=>{VN()});var UN,ZZ=M(()=>{wIt();$Z();MIt();UN={"":bIt,"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return KZ(e*100,t)},r:KZ,s:SIt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function ky(e){return new JZ(e)}function JZ(e){if(!(t=k4e.exec(e)))throw new Error("invalid format: "+e);var t,r=t[1]||" ",n=t[2]||">",i=t[3]||"-",o=t[4]||"",a=!!t[5],s=t[6]&&+t[6],l=!!t[7],c=t[8]&&+t[8].slice(1),u=t[9]||"";u==="n"?(l=!0,u="g"):UN[u]||(u=""),(a||r==="0"&&n==="=")&&(a=!0,r="0",n="="),this.fill=r,this.align=n,this.sign=i,this.symbol=o,this.zero=a,this.width=s,this.comma=l,this.precision=c,this.type=u}var k4e,QZ=M(()=>{ZZ();k4e=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;ky.prototype=JZ.prototype;JZ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type}});function tJ(e){return e}var EIt=M(()=>{});function qN(e){var t=e.grouping&&e.thousands?_It(e.grouping,e.thousands):tJ,r=e.currency,n=e.decimal,i=e.numerals?vIt(e.numerals):tJ,o=e.percent||"%";function a(l){l=ky(l);var c=l.fill,u=l.align,h=l.sign,f=l.symbol,p=l.zero,d=l.width,g=l.comma,_=l.precision,y=l.type,x=f==="$"?r[0]:f==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b=f==="$"?r[1]:/[%p]/.test(y)?o:"",S=UN[y],C=!y||/[defgprs%]/.test(y);_=_==null?y?6:12:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function P(k){var O=x,D=b,B,I,L;if(y==="c")D=S(k)+D,k="";else{k=+k;var R=k<0;if(k=S(Math.abs(k),_),R&&+k==0&&(R=!1),O=(R?h==="("?h:"-":h==="-"||h==="("?"":h)+O,D=(y==="s"?TIt[8+XZ/3]:"")+D+(R&&h==="("?")":""),C){for(B=-1,I=k.length;++B<I;)if(L=k.charCodeAt(B),48>L||L>57){D=(L===46?n+k.slice(B+1):k.slice(B))+D,k=k.slice(0,B);break}}}g&&!p&&(k=t(k,1/0));var F=O.length+k.length+D.length,z=F<d?new Array(d-F+1).join(c):"";switch(g&&p&&(k=t(z+k,z.length?d-D.length:1/0),z=""),u){case"<":k=O+k+D+z;break;case"=":k=O+z+k+D;break;case"^":k=z.slice(0,F=z.length>>1)+O+k+D+z.slice(F);break;default:k=z+O+k+D;break}return i(k)}return P.toString=function(){return l+""},P}function s(l,c){var u=a((l=ky(l),l.type="f",l)),h=Math.max(-8,Math.min(8,Math.floor(nf(c)/3)))*3,f=Math.pow(10,-h),p=TIt[8+h/3];return function(d){return u(f*d)+p}}return{format:a,formatPrefix:s}}var TIt,eJ=M(()=>{TT();yIt();xIt();QZ();ZZ();$Z();EIt();TIt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function WN(e){return GN=qN(e),rJ=GN.format,nJ=GN.formatPrefix,GN}var GN,rJ,nJ,CIt=M(()=>{eJ();WN({decimal:".",thousands:",",grouping:[3],currency:["$",""]})});function AIt(e){return Math.max(0,-nf(Math.abs(e)))}var PIt=M(()=>{TT()});function IIt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(nf(t)/3)))*3-nf(Math.abs(e)))}var LIt=M(()=>{TT()});function kIt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,nf(t)-nf(e))+1}var RIt=M(()=>{TT()});var NIt=M(()=>{CIt();eJ();QZ();PIt();LIt();RIt()});function As(){return new jN}function jN(){this.reset()}function DIt(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var YN,Ry=M(()=>{jN.prototype={constructor:jN,reset:function(){this.s=this.t=0},add:function(e){DIt(YN,e,this.t),DIt(this,YN.s,this.s),this.s?this.t+=YN.t:this.s=YN.t},valueOf:function(){return this.s}};YN=new jN});function KN(e){return e>1?0:e<-1?rr:Math.acos(e)}function Jn(e){return e>1?Bn:e<-1?-Bn:Math.asin(e)}function oJ(e){return(e=Jt(e/2))*e}var ce,iJ,rr,Bn,T2,Bi,Ur,we,Ye,yc,Sn,ae,CT,XN,Ny,$N,Jt,mg,Rr,C2,lr=M(()=>{ce=1e-6,iJ=1e-12,rr=Math.PI,Bn=rr/2,T2=rr/4,Bi=rr*2,Ur=180/rr,we=rr/180,Ye=Math.abs,yc=Math.atan,Sn=Math.atan2,ae=Math.cos,CT=Math.ceil,XN=Math.exp,Ny=Math.log,$N=Math.pow,Jt=Math.sin,mg=Math.sign||function(e){return e>0?1:e<0?-1:0},Rr=Math.sqrt,C2=Math.tan});function qr(){}var $p=M(()=>{});function ZN(e,t){e&&zIt.hasOwnProperty(e.type)&&zIt[e.type](e,t)}function aJ(e,t,r){var n=-1,i=e.length-r,o;for(t.lineStart();++n<i;)o=e[n],t.point(o[0],o[1],o[2]);t.lineEnd()}function FIt(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)aJ(e[r],t,1);t.polygonEnd()}function Mo(e,t){e&&OIt.hasOwnProperty(e.type)?OIt[e.type](e,t):ZN(e,t)}var OIt,zIt,gg=M(()=>{OIt={Feature:function(e,t){ZN(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)ZN(r[n].geometry,t)}},zIt={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){aJ(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)aJ(r[n],t,0)},Polygon:function(e,t){FIt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)FIt(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)ZN(r[n],t)}}});function R4e(){Eu.point=D4e}function N4e(){VIt(BIt,HIt)}function D4e(e,t){Eu.point=VIt,BIt=e,HIt=t,e*=we,t*=we,sJ=e,lJ=ae(t=t/2+T2),cJ=Jt(t)}function VIt(e,t){e*=we,t*=we,t=t/2+T2;var r=e-sJ,n=r>=0?1:-1,i=n*r,o=ae(t),a=Jt(t),s=cJ*a,l=lJ*o+s*ae(i),c=s*n*Jt(i);AT.add(Sn(c,l)),sJ=e,lJ=o,cJ=a}function UIt(e){return JN.reset(),Mo(e,Eu),JN*2}var AT,JN,BIt,HIt,sJ,lJ,cJ,Eu,uJ=M(()=>{Ry();lr();$p();gg();AT=As(),JN=As(),Eu={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){AT.reset(),Eu.lineStart=R4e,Eu.lineEnd=N4e},polygonEnd:function(){var e=+AT;JN.add(e<0?Bi+e:e),this.lineStart=this.lineEnd=this.point=qr},sphere:function(){JN.add(Bi)}}});function Dy(e){return[Sn(e[1],e[0]),Jn(e[2])]}function vc(e){var t=e[0],r=e[1],n=ae(r);return[n*ae(t),n*Jt(t),Jt(r)]}function PT(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Kp(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function QN(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function IT(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Oy(e){var t=Rr(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var A2=M(()=>{lr()});function hJ(e,t){_g.push(Jp=[di=e,Ei=e]),t<fl&&(fl=t),t>xc&&(xc=t)}function XIt(e,t){var r=vc([e*we,t*we]);if(P2){var n=Kp(P2,r),i=[n[1],-n[0],0],o=Kp(i,n);Oy(o),o=Dy(o);var a=e-zy,s=a>0?1:-1,l=o[0]*Ur*s,c,u=Ye(a)>180;u^(s*zy<l&&l<s*e)?(c=o[1]*Ur,c>xc&&(xc=c)):(l=(l+360)%360-180,u^(s*zy<l&&l<s*e)?(c=-o[1]*Ur,c<fl&&(fl=c)):(t<fl&&(fl=t),t>xc&&(xc=t))),u?e<zy?hl(di,e)>hl(di,Ei)&&(Ei=e):hl(e,Ei)>hl(di,Ei)&&(di=e):Ei>=di?(e<di&&(di=e),e>Ei&&(Ei=e)):e>zy?hl(di,e)>hl(di,Ei)&&(Ei=e):hl(e,Ei)>hl(di,Ei)&&(di=e)}else _g.push(Jp=[di=e,Ei=e]);t<fl&&(fl=t),t>xc&&(xc=t),P2=r,zy=e}function qIt(){Zp.point=XIt}function GIt(){Jp[0]=di,Jp[1]=Ei,Zp.point=hJ,P2=null}function $It(e,t){if(P2){var r=e-zy;LT.add(Ye(r)>180?r+(r>0?360:-360):r)}else YIt=e,jIt=t;Eu.point(e,t),XIt(e,t)}function O4e(){Eu.lineStart()}function z4e(){$It(YIt,jIt),Eu.lineEnd(),Ye(LT)>ce&&(di=-(Ei=180)),Jp[0]=di,Jp[1]=Ei,P2=null}function hl(e,t){return(t-=e)<0?t+360:t}function F4e(e,t){return e[0]-t[0]}function WIt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function KIt(e){var t,r,n,i,o,a,s;if(xc=Ei=-(di=fl=1/0),_g=[],Mo(e,Zp),r=_g.length){for(_g.sort(F4e),t=1,n=_g[0],o=[n];t<r;++t)i=_g[t],WIt(n,i[0])||WIt(n,i[1])?(hl(n[0],i[1])>hl(n[0],n[1])&&(n[1]=i[1]),hl(i[0],n[1])>hl(n[0],n[1])&&(n[0]=i[0])):o.push(n=i);for(a=-1/0,r=o.length-1,t=0,n=o[r];t<=r;n=i,++t)i=o[t],(s=hl(n[1],i[0]))>a&&(a=s,di=i[0],Ei=n[1])}return _g=Jp=null,di===1/0||fl===1/0?[[NaN,NaN],[NaN,NaN]]:[[di,fl],[Ei,xc]]}var di,fl,Ei,xc,zy,YIt,jIt,P2,LT,_g,Jp,Zp,ZIt=M(()=>{Ry();uJ();A2();lr();gg();LT=As(),Zp={point:hJ,lineStart:qIt,lineEnd:GIt,polygonStart:function(){Zp.point=$It,Zp.lineStart=O4e,Zp.lineEnd=z4e,LT.reset(),Eu.polygonStart()},polygonEnd:function(){Eu.polygonEnd(),Zp.point=hJ,Zp.lineStart=qIt,Zp.lineEnd=GIt,AT<0?(di=-(Ei=180),fl=-(xc=90)):LT>ce?xc=90:LT<-ce&&(fl=-90),Jp[0]=di,Jp[1]=Ei}}});function mJ(e,t){e*=we,t*=we;var r=ae(t);RT(r*ae(e),r*Jt(e),Jt(t))}function RT(e,t,r){++kT,eD+=(e-eD)/kT,rD+=(t-rD)/kT,nD+=(r-nD)/kT}function JIt(){Tu.point=B4e}function B4e(e,t){e*=we,t*=we;var r=ae(t);Ya=r*ae(e),ja=r*Jt(e),Xa=Jt(t),Tu.point=H4e,RT(Ya,ja,Xa)}function H4e(e,t){e*=we,t*=we;var r=ae(t),n=r*ae(e),i=r*Jt(e),o=Jt(t),a=Sn(Rr((a=ja*o-Xa*i)*a+(a=Xa*n-Ya*o)*a+(a=Ya*i-ja*n)*a),Ya*n+ja*i+Xa*o);tD+=a,iD+=a*(Ya+(Ya=n)),oD+=a*(ja+(ja=i)),aD+=a*(Xa+(Xa=o)),RT(Ya,ja,Xa)}function QIt(){Tu.point=mJ}function V4e(){Tu.point=q4e}function U4e(){r9t(t9t,e9t),Tu.point=mJ}function q4e(e,t){t9t=e,e9t=t,e*=we,t*=we,Tu.point=r9t;var r=ae(t);Ya=r*ae(e),ja=r*Jt(e),Xa=Jt(t),RT(Ya,ja,Xa)}function r9t(e,t){e*=we,t*=we;var r=ae(t),n=r*ae(e),i=r*Jt(e),o=Jt(t),a=ja*o-Xa*i,s=Xa*n-Ya*o,l=Ya*i-ja*n,c=Rr(a*a+s*s+l*l),u=Jn(c),h=c&&-u/c;fJ+=h*a,pJ+=h*s,dJ+=h*l,tD+=u,iD+=u*(Ya+(Ya=n)),oD+=u*(ja+(ja=i)),aD+=u*(Xa+(Xa=o)),RT(Ya,ja,Xa)}function n9t(e){kT=tD=eD=rD=nD=iD=oD=aD=fJ=pJ=dJ=0,Mo(e,Tu);var t=fJ,r=pJ,n=dJ,i=t*t+r*r+n*n;return i<iJ&&(t=iD,r=oD,n=aD,tD<ce&&(t=eD,r=rD,n=nD),i=t*t+r*r+n*n,i<iJ)?[NaN,NaN]:[Sn(r,t)*Ur,Jn(n/Rr(i))*Ur]}var kT,tD,eD,rD,nD,iD,oD,aD,fJ,pJ,dJ,t9t,e9t,Ya,ja,Xa,Tu,i9t=M(()=>{lr();$p();gg();Tu={sphere:qr,point:mJ,lineStart:JIt,lineEnd:QIt,polygonStart:function(){Tu.lineStart=V4e,Tu.lineEnd=U4e},polygonEnd:function(){Tu.lineStart=JIt,Tu.lineEnd=QIt}}});function Fy(e){return function(){return e}}var o9t=M(()=>{});function sD(e,t){function r(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(r.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),r}var gJ=M(()=>{});function _J(e,t){return[e>rr?e-Bi:e<-rr?e+Bi:e,t]}function NT(e,t,r){return(e%=Bi)?t||r?sD(s9t(e),l9t(t,r)):s9t(e):t||r?l9t(t,r):_J}function a9t(e){return function(t,r){return t+=e,[t>rr?t-Bi:t<-rr?t+Bi:t,r]}}function s9t(e){var t=a9t(e);return t.invert=a9t(-e),t}function l9t(e,t){var r=ae(e),n=Jt(e),i=ae(t),o=Jt(t);function a(s,l){var c=ae(l),u=ae(s)*c,h=Jt(s)*c,f=Jt(l),p=f*r+u*n;return[Sn(h*i-p*o,u*r-f*n),Jn(p*i+h*o)]}return a.invert=function(s,l){var c=ae(l),u=ae(s)*c,h=Jt(s)*c,f=Jt(l),p=f*i-h*o;return[Sn(h*i+f*o,u*r+p*n),Jn(p*r-u*n)]},a}function lD(e){e=NT(e[0]*we,e[1]*we,e.length>2?e[2]*we:0);function t(r){return r=e(r[0]*we,r[1]*we),r[0]*=Ur,r[1]*=Ur,r}return t.invert=function(r){return r=e.invert(r[0]*we,r[1]*we),r[0]*=Ur,r[1]*=Ur,r},t}var DT=M(()=>{gJ();lr();_J.invert=_J});function yJ(e,t,r,n,i,o){if(!!r){var a=ae(t),s=Jt(t),l=n*r;i==null?(i=t+n*Bi,o=t-l/2):(i=c9t(a,i),o=c9t(a,o),(n>0?i<o:i>o)&&(i+=n*Bi));for(var c,u=i;n>0?u>o:u<o;u-=l)c=Dy([a,-s*ae(u),-s*Jt(u)]),e.point(c[0],c[1])}}function c9t(e,t){t=vc(t),t[0]-=e,Oy(t);var r=KN(-t[1]);return((-t[2]<0?-r:r)+Bi-ce)%Bi}function u9t(){var e=Fy([0,0]),t=Fy(90),r=Fy(6),n,i,o={point:a};function a(l,c){n.push(l=i(l,c)),l[0]*=Ur,l[1]*=Ur}function s(){var l=e.apply(this,arguments),c=t.apply(this,arguments)*we,u=r.apply(this,arguments)*we;return n=[],i=NT(-l[0]*we,-l[1]*we,0).invert,yJ(o,c,u,1),l={type:"Polygon",coordinates:[n]},n=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:Fy([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Fy(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:Fy(+l),s):r},s}var vJ=M(()=>{A2();o9t();lr();DT()});function cD(){var e=[],t;return{point:function(r,n){t.push([r,n])},lineStart:function(){e.push(t=[])},lineEnd:qr,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}var xJ=M(()=>{$p()});function I2(e,t){return Ye(e[0]-t[0])<ce&&Ye(e[1]-t[1])<ce}var bJ=M(()=>{lr()});function uD(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function hD(e,t,r,n,i){var o=[],a=[],s,l;if(e.forEach(function(d){if(!((g=d.length-1)<=0)){var g,_=d[0],y=d[g],x;if(I2(_,y)){for(i.lineStart(),s=0;s<g;++s)i.point((_=d[s])[0],_[1]);i.lineEnd();return}o.push(x=new uD(_,d,null,!0)),a.push(x.o=new uD(_,null,x,!1)),o.push(x=new uD(y,d,null,!1)),a.push(x.o=new uD(y,null,x,!0))}}),!!o.length){for(a.sort(t),h9t(o),h9t(a),s=0,l=a.length;s<l;++s)a[s].e=r=!r;for(var c=o[0],u,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,l=u.length;s<l;++s)i.point((h=u[s])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((h=u[s])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function h9t(e){if(!!(t=e.length)){for(var t,r=0,n=e[0],i;++r<t;)n.n=i=e[r],i.p=n,n=i;n.n=i=e[0],i.p=n}}var wJ=M(()=>{bJ()});function fD(e,t){var r=t[0],n=t[1],i=[Jt(r),-ae(r),0],o=0,a=0;SJ.reset();for(var s=0,l=e.length;s<l;++s)if(!!(u=(c=e[s]).length))for(var c,u,h=c[u-1],f=h[0],p=h[1]/2+T2,d=Jt(p),g=ae(p),_=0;_<u;++_,f=x,d=S,g=C,h=y){var y=c[_],x=y[0],b=y[1]/2+T2,S=Jt(b),C=ae(b),P=x-f,k=P>=0?1:-1,O=k*P,D=O>rr,B=d*S;if(SJ.add(Sn(B*k*Jt(O),g*C+B*ae(O))),o+=D?P+k*Bi:P,D^f>=r^x>=r){var I=Kp(vc(h),vc(y));Oy(I);var L=Kp(i,I);Oy(L);var R=(D^P>=0?-1:1)*Jn(L[2]);(n>R||n===R&&(I[0]||I[1]))&&(a+=D^P>=0?1:-1)}}return(o<-ce||o<ce&&SJ<-ce)^a&1}var SJ,MJ=M(()=>{Ry();A2();lr();SJ=As()});function yg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var By=M(()=>{});function EJ(e){return e.length===1&&(e=G4e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function G4e(e){return function(t,r){return yg(e(t),r)}}var TJ=M(()=>{By()});var f9t,W4e,Y4e,CJ=M(()=>{By();TJ();f9t=EJ(yg),W4e=f9t.right,Y4e=f9t.left});var AJ=M(()=>{});var p9t=M(()=>{AJ()});var d9t=M(()=>{});var L2=M(()=>{});var PJ=M(()=>{L2()});var IJ=M(()=>{PJ()});var LJ=M(()=>{});var m9t,X4e,$4e,kJ=M(()=>{m9t=Array.prototype,X4e=m9t.slice,$4e=m9t.map});var g9t=M(()=>{});var _9t=M(()=>{});function Qp(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var RJ=M(()=>{});var k0n,R0n,N0n,NJ=M(()=>{k0n=Math.sqrt(50),R0n=Math.sqrt(10),N0n=Math.sqrt(2)});var DJ=M(()=>{});var y9t=M(()=>{kJ();CJ();g9t();LJ();_9t();RJ();NJ();DJ()});var dD=M(()=>{L2()});var x9t=M(()=>{kJ();By();L2();dD()});var b9t=M(()=>{IJ()});var w9t=M(()=>{});var S9t=M(()=>{L2()});var M9t=M(()=>{By();L2();dD()});function OT(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}var E9t=M(()=>{});var OJ=M(()=>{});var T9t=M(()=>{});var C9t=M(()=>{By()});var A9t=M(()=>{});var P9t=M(()=>{});var zJ=M(()=>{OJ()});var I9t=M(()=>{zJ()});var mD=M(()=>{CJ();By();TJ();p9t();d9t();IJ();LJ();y9t();x9t();b9t();DJ();w9t();S9t();M9t();E9t();OJ();AJ();T9t();dD();RJ();C9t();A9t();P9t();NJ();zJ();PJ();I9t()});function gD(e,t,r,n){return function(i){var o=t(i),a=cD(),s=t(a),l=!1,c,u,h,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=b,u=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,u=OT(u);var S=fD(c,n);u.length?(l||(i.polygonStart(),l=!0),hD(u,iPe,S,r,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(S,C){e(S,C)&&i.point(S,C)}function d(S,C){o.point(S,C)}function g(){f.point=d,o.lineStart()}function _(){f.point=p,o.lineEnd()}function y(S,C){h.push([S,C]),s.point(S,C)}function x(){s.lineStart(),h=[]}function b(){y(h[0][0],h[0][1]),s.lineEnd();var S=s.clean(),C=a.result(),P,k=C.length,O,D,B;if(h.pop(),c.push(h),h=null,!!k){if(S&1){if(D=C[0],(O=D.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),P=0;P<O;++P)i.point((B=D[P])[0],B[1]);i.lineEnd()}return}k>1&&S&2&&C.push(C.pop().concat(C.shift())),u.push(C.filter(nPe))}}return f}}function nPe(e){return e.length>1}function iPe(e,t){return((e=e.x)[0]<0?e[1]-Bn-ce:Bn-e[1])-((t=t.x)[0]<0?t[1]-Bn-ce:Bn-t[1])}var FJ=M(()=>{xJ();wJ();lr();MJ();mD()});function oPe(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?rr:-rr,l=Ye(o-t);Ye(l-rr)<ce?(e.point(t,r=(r+a)/2>0?Bn:-Bn),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),i=0):n!==s&&l>=rr&&(Ye(t-n)<ce&&(t-=n*ce),Ye(o-s)<ce&&(o-=s*ce),r=aPe(t,r,o,a),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),i=0),e.point(t=o,r=a),n=s},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-i}}}function aPe(e,t,r,n){var i,o,a=Jt(e-r);return Ye(a)>ce?yc((Jt(t)*(o=ae(n))*Jt(r)-Jt(n)*(i=ae(t))*Jt(e))/(i*o*a)):(t+n)/2}function sPe(e,t,r,n){var i;if(e==null)i=r*Bn,n.point(-rr,i),n.point(0,i),n.point(rr,i),n.point(rr,0),n.point(rr,-i),n.point(0,-i),n.point(-rr,-i),n.point(-rr,0),n.point(-rr,i);else if(Ye(e[0]-t[0])>ce){var o=e[0]<t[0]?rr:-rr;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])}var zT,BJ=M(()=>{FJ();lr();zT=gD(function(){return!0},oPe,sPe,[-rr,-Bn])});function _D(e){var t=ae(e),r=6*we,n=t>0,i=Ye(t)>ce;function o(u,h,f,p){yJ(p,e,r,f,u,h)}function a(u,h){return ae(u)*ae(h)>t}function s(u){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(_,y){var x=[_,y],b,S=a(_,y),C=n?S?0:c(_,y):S?c(_+(_<0?rr:-rr),y):0;if(!h&&(d=p=S)&&u.lineStart(),S!==p&&(b=l(h,x),(!b||I2(h,b)||I2(x,b))&&(x[0]+=ce,x[1]+=ce,S=a(x[0],x[1]))),S!==p)g=0,S?(u.lineStart(),b=l(x,h),u.point(b[0],b[1])):(b=l(h,x),u.point(b[0],b[1]),u.lineEnd()),h=b;else if(i&&h&&n^S){var P;!(C&f)&&(P=l(x,h,!0))&&(g=0,n?(u.lineStart(),u.point(P[0][0],P[0][1]),u.point(P[1][0],P[1][1]),u.lineEnd()):(u.point(P[1][0],P[1][1]),u.lineEnd(),u.lineStart(),u.point(P[0][0],P[0][1])))}S&&(!h||!I2(h,x))&&u.point(x[0],x[1]),h=x,p=S,f=C},lineEnd:function(){p&&u.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function l(u,h,f){var p=vc(u),d=vc(h),g=[1,0,0],_=Kp(p,d),y=PT(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=Kp(g,_),k=IT(g,S),O=IT(_,C);QN(k,O);var D=P,B=PT(k,D),I=PT(D,D),L=B*B-I*(PT(k,k)-1);if(!(L<0)){var R=Rr(L),F=IT(D,(-B-R)/I);if(QN(F,k),F=Dy(F),!f)return F;var z=u[0],U=h[0],W=u[1],Z=h[1],rt;U<z&&(rt=z,z=U,U=rt);var ot=U-z,st=Ye(ot-rr)<ce,St=st||ot<ce;if(!st&&Z<W&&(rt=W,W=Z,Z=rt),St?st?W+Z>0^F[1]<(Ye(F[0]-z)<ce?W:Z):W<=F[1]&&F[1]<=Z:ot>rr^(z<=F[0]&&F[0]<=U)){var bt=IT(D,(-B+R)/I);return QN(bt,k),[F,Dy(bt)]}}}function c(u,h){var f=n?e:rr-e,p=0;return u<-f?p|=1:u>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return gD(a,s,o,n?[0,-e]:[-rr,e-rr])}var HJ=M(()=>{A2();vJ();lr();bJ();FJ()});function L9t(e,t,r,n,i,o){var a=e[0],s=e[1],l=t[0],c=t[1],u=0,h=1,f=l-a,p=c-s,d;if(d=r-a,!(!f&&d>0)){if(d/=f,f<0){if(d<u)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>u&&(u=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>u&&(u=d)}else if(f>0){if(d<u)return;d<h&&(h=d)}if(d=n-s,!(!p&&d>0)){if(d/=p,p<0){if(d<u)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>u&&(u=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>u&&(u=d)}else if(p>0){if(d<u)return;d<h&&(h=d)}return u>0&&(e[0]=a+u*f,e[1]=s+u*p),h<1&&(t[0]=a+h*f,t[1]=s+h*p),!0}}}}}var k9t=M(()=>{});function td(e,t,r,n){function i(c,u){return e<=c&&c<=r&&t<=u&&u<=n}function o(c,u,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(u,h))||l(c,u)<0^h>0)do f.point(p===0||p===3?e:r,p>1?n:t);while((p=(p+h+4)%4)!==d);else f.point(u[0],u[1])}function a(c,u){return Ye(c[0]-e)<ce?u>0?0:3:Ye(c[0]-r)<ce?u>0?2:1:Ye(c[1]-t)<ce?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var h=a(c,1),f=a(u,1);return h!==f?h-f:h===0?u[1]-c[1]:h===1?c[0]-u[0]:h===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,h=cD(),f,p,d,g,_,y,x,b,S,C,P,k={point:O,lineStart:L,lineEnd:R,polygonStart:B,polygonEnd:I};function O(z,U){i(z,U)&&u.point(z,U)}function D(){for(var z=0,U=0,W=p.length;U<W;++U)for(var Z=p[U],rt=1,ot=Z.length,st=Z[0],St,bt,Mt=st[0],lt=st[1];rt<ot;++rt)St=Mt,bt=lt,st=Z[rt],Mt=st[0],lt=st[1],bt<=n?lt>n&&(Mt-St)*(n-bt)>(lt-bt)*(e-St)&&++z:lt<=n&&(Mt-St)*(n-bt)<(lt-bt)*(e-St)&&--z;return z}function B(){u=h,f=[],p=[],P=!0}function I(){var z=D(),U=P&&z,W=(f=OT(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&hD(f,s,z,o,c),c.polygonEnd()),u=c,f=p=d=null}function L(){k.point=F,p&&p.push(d=[]),C=!0,S=!1,x=b=NaN}function R(){f&&(F(g,_),y&&S&&h.rejoin(),f.push(h.result())),k.point=O,S&&u.lineEnd()}function F(z,U){var W=i(z,U);if(p&&d.push([z,U]),C)g=z,_=U,y=W,C=!1,W&&(u.lineStart(),u.point(z,U));else if(W&&S)u.point(z,U);else{var Z=[x=Math.max(yD,Math.min(FT,x)),b=Math.max(yD,Math.min(FT,b))],rt=[z=Math.max(yD,Math.min(FT,z)),U=Math.max(yD,Math.min(FT,U))];L9t(Z,rt,e,t,r,n)?(S||(u.lineStart(),u.point(Z[0],Z[1])),u.point(rt[0],rt[1]),W||u.lineEnd(),P=!1):W&&(u.lineStart(),u.point(z,U),P=!1)}x=z,b=U,S=W}return k}}var FT,yD,BT=M(()=>{lr();xJ();k9t();wJ();mD();FT=1e9,yD=-FT});function R9t(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=td(e,t,r,n)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=o=null,a):[[e,t],[r,n]]}}}var N9t=M(()=>{BT()});function lPe(){k2.point=uPe,k2.lineEnd=cPe}function cPe(){k2.point=k2.lineEnd=qr}function uPe(e,t){e*=we,t*=we,UJ=e,vD=Jt(t),xD=ae(t),k2.point=hPe}function hPe(e,t){e*=we,t*=we;var r=Jt(t),n=ae(t),i=Ye(e-UJ),o=ae(i),a=Jt(i),s=n*a,l=xD*r-vD*n*o,c=vD*r+xD*n*o;VJ.add(Sn(Rr(s*s+l*l),c)),UJ=e,vD=r,xD=n}function bD(e){return VJ.reset(),Mo(e,k2),+VJ}var VJ,UJ,vD,xD,k2,qJ=M(()=>{Ry();lr();$p();gg();VJ=As(),k2={sphere:qr,point:qr,lineStart:lPe,lineEnd:qr,polygonStart:qr,polygonEnd:qr}});function Hy(e,t){return GJ[0]=e,GJ[1]=t,bD(fPe)}var GJ,fPe,WJ=M(()=>{qJ();GJ=[null,null],fPe={type:"LineString",coordinates:GJ}});function wD(e,t){return e&&O9t.hasOwnProperty(e.type)?O9t[e.type](e,t):!1}function z9t(e,t){return Hy(e,t)===0}function F9t(e,t){var r=Hy(e[0],e[1]),n=Hy(e[0],t),i=Hy(t,e[1]);return n+i<=r+ce}function B9t(e,t){return!!fD(e.map(pPe),H9t(t))}function pPe(e){return e=e.map(H9t),e.pop(),e}function H9t(e){return[e[0]*we,e[1]*we]}function V9t(e,t){return(e&&D9t.hasOwnProperty(e.type)?D9t[e.type]:wD)(e,t)}var D9t,O9t,U9t=M(()=>{MJ();WJ();lr();D9t={Feature:function(e,t){return wD(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(wD(r[n].geometry,t))return!0;return!1}},O9t={Sphere:function(){return!0},Point:function(e,t){return z9t(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(z9t(r[n],t))return!0;return!1},LineString:function(e,t){return F9t(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(F9t(r[n],t))return!0;return!1},Polygon:function(e,t){return B9t(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(B9t(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(wD(r[n],t))return!0;return!1}}});function q9t(e,t,r){var n=Qp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function G9t(e,t,r){var n=Qp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function SD(){var e,t,r,n,i,o,a,s,l=10,c=l,u=90,h=360,f,p,d,g,_=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return Qp(CT(n/u)*u,r,u).map(d).concat(Qp(CT(s/h)*h,a,h).map(g)).concat(Qp(CT(t/l)*l,e,l).filter(function(b){return Ye(b%u)>ce}).map(f)).concat(Qp(CT(o/c)*c,i,c).filter(function(b){return Ye(b%h)>ce}).map(p))}return y.lines=function(){return x().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(g(a).slice(1),d(r).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(n=+b[0][0],r=+b[1][0],s=+b[0][1],a=+b[1][1],n>r&&(b=n,n=r,r=b),s>a&&(b=s,s=a,a=b),y.precision(_)):[[n,s],[r,a]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],o=+b[0][1],i=+b[1][1],t>e&&(b=t,t=e,e=b),o>i&&(b=o,o=i,i=b),y.precision(_)):[[t,o],[e,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],h=+b[1],y):[u,h]},y.stepMinor=function(b){return arguments.length?(l=+b[0],c=+b[1],y):[l,c]},y.precision=function(b){return arguments.length?(_=+b,f=q9t(o,i,90),p=G9t(t,e,_),d=q9t(s,a,90),g=G9t(n,r,_),y):_},y.extentMajor([[-180,-90+ce],[180,90-ce]]).extentMinor([[-180,-80-ce],[180,80+ce]])}function W9t(){return SD()()}var Y9t=M(()=>{mD();lr()});function j9t(e,t){var r=e[0]*we,n=e[1]*we,i=t[0]*we,o=t[1]*we,a=ae(n),s=Jt(n),l=ae(o),c=Jt(o),u=a*ae(r),h=a*Jt(r),f=l*ae(i),p=l*Jt(i),d=2*Jn(Rr(oJ(o-n)+a*l*oJ(i-r))),g=Jt(d),_=d?function(y){var x=Jt(y*=d)/g,b=Jt(d-y)/g,S=b*u+x*f,C=b*h+x*p,P=b*s+x*c;return[Sn(C,S)*Ur,Sn(P,Rr(S*S+C*C))*Ur]}:function(){return[r*Ur,n*Ur]};return _.distance=d,_}var X9t=M(()=>{lr()});function of(e){return e}var MD=M(()=>{});function dPe(){vg.point=mPe}function mPe(e,t){vg.point=Z9t,$9t=XJ=e,K9t=$J=t}function Z9t(e,t){jJ.add($J*e-XJ*t),XJ=e,$J=t}function gPe(){Z9t($9t,K9t)}var YJ,jJ,$9t,K9t,XJ,$J,vg,KJ,J9t=M(()=>{Ry();lr();$p();YJ=As(),jJ=As(),vg={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){vg.lineStart=dPe,vg.lineEnd=gPe},polygonEnd:function(){vg.lineStart=vg.lineEnd=vg.point=qr,YJ.add(Ye(jJ)),jJ.reset()},result:function(){var e=YJ/2;return YJ.reset(),e}};KJ=vg});function yPe(e,t){e<R2&&(R2=e),e>HT&&(HT=e),t<ED&&(ED=t),t>TD&&(TD=t)}var R2,ED,HT,TD,_Pe,N2,ZJ=M(()=>{$p();R2=1/0,ED=R2,HT=-R2,TD=HT,_Pe={point:yPe,lineStart:qr,lineEnd:qr,polygonStart:qr,polygonEnd:qr,result:function(){var e=[[R2,ED],[HT,TD]];return HT=TD=-(ED=R2=1/0),e}};N2=_Pe});function Vy(e,t){JJ+=e,QJ+=t,++VT}function Q9t(){Cu.point=vPe}function vPe(e,t){Cu.point=xPe,Vy(af=e,sf=t)}function xPe(e,t){var r=e-af,n=t-sf,i=Rr(r*r+n*n);CD+=i*(af+e)/2,AD+=i*(sf+t)/2,D2+=i,Vy(af=e,sf=t)}function tLt(){Cu.point=Vy}function bPe(){Cu.point=SPe}function wPe(){nLt(eLt,rLt)}function SPe(e,t){Cu.point=nLt,Vy(eLt=af=e,rLt=sf=t)}function nLt(e,t){var r=e-af,n=t-sf,i=Rr(r*r+n*n);CD+=i*(af+e)/2,AD+=i*(sf+t)/2,D2+=i,i=sf*e-af*t,tQ+=i*(af+e),eQ+=i*(sf+t),UT+=i*3,Vy(af=e,sf=t)}var JJ,QJ,VT,CD,AD,D2,tQ,eQ,UT,eLt,rLt,af,sf,Cu,rQ,iLt=M(()=>{lr();JJ=0,QJ=0,VT=0,CD=0,AD=0,D2=0,tQ=0,eQ=0,UT=0,Cu={point:Vy,lineStart:Q9t,lineEnd:tLt,polygonStart:function(){Cu.lineStart=bPe,Cu.lineEnd=wPe},polygonEnd:function(){Cu.point=Vy,Cu.lineStart=Q9t,Cu.lineEnd=tLt},result:function(){var e=UT?[tQ/UT,eQ/UT]:D2?[CD/D2,AD/D2]:VT?[JJ/VT,QJ/VT]:[NaN,NaN];return JJ=QJ=VT=CD=AD=D2=tQ=eQ=UT=0,e}};rQ=Cu});function PD(e){this._context=e}var oLt=M(()=>{lr();$p();PD.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Bi);break}}},result:qr}});function MPe(e,t){ID.point=lLt,aLt=qT=e,sLt=GT=t}function lLt(e,t){qT-=e,GT-=t,iQ.add(Rr(qT*qT+GT*GT)),qT=e,GT=t}var iQ,nQ,aLt,sLt,qT,GT,ID,oQ,cLt=M(()=>{Ry();lr();$p();iQ=As(),ID={point:qr,lineStart:function(){ID.point=MPe},lineEnd:function(){nQ&&lLt(aLt,sLt),ID.point=qr},polygonStart:function(){nQ=!0},polygonEnd:function(){nQ=null},result:function(){var e=+iQ;return iQ.reset(),e}};oQ=ID});function LD(){this._string=[]}function uLt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var hLt=M(()=>{LD.prototype={_radius:4.5,_circle:uLt(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=uLt(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}}});function fLt(e,t){var r=4.5,n,i;function o(a){return a&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),Mo(a,n(i))),i.result()}return o.area=function(a){return Mo(a,n(KJ)),KJ.result()},o.measure=function(a){return Mo(a,n(oQ)),oQ.result()},o.bounds=function(a){return Mo(a,n(N2)),N2.result()},o.centroid=function(a){return Mo(a,n(rQ)),rQ.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,of):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new LD):new PD(t=a),typeof r!="function"&&i.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(i.pointRadius(+a),+a),o):r},o.projection(e).context(t)}var pLt=M(()=>{MD();gg();J9t();ZJ();iLt();oLt();cLt();hLt()});function dLt(e){return{stream:xg(e)}}function xg(e){return function(t){var r=new aQ;for(var n in e)r[n]=e[n];return r.stream=t,r}}function aQ(){}var WT=M(()=>{aQ.prototype={constructor:aQ,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}});function sQ(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),Mo(r,e.stream(N2)),t(N2.result()),n!=null&&e.clipExtent(n),e}function Uy(e,t,r){return sQ(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),s=+t[0][0]+(i-a*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(o-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([s,l])},r)}function O2(e,t,r){return Uy(e,[[0,0],t],r)}function z2(e,t,r){return sQ(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),a=(i-o*(n[1][0]+n[0][0]))/2,s=-o*n[0][1];e.scale(150*o).translate([a,s])},r)}function F2(e,t,r){return sQ(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),a=-o*n[0][0],s=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])},r)}var kD=M(()=>{gg();ZJ()});function lQ(e,t){return+t?CPe(e,t):TPe(e)}function TPe(e){return xg({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function CPe(e,t){function r(n,i,o,a,s,l,c,u,h,f,p,d,g,_){var y=c-n,x=u-i,b=y*y+x*x;if(b>4*t&&g--){var S=a+f,C=s+p,P=l+d,k=Rr(S*S+C*C+P*P),O=Jn(P/=k),D=Ye(Ye(P)-1)<ce||Ye(o-h)<ce?(o+h)/2:Sn(C,S),B=e(D,O),I=B[0],L=B[1],R=I-n,F=L-i,z=x*R-y*F;(z*z/b>t||Ye((y*R+x*F)/b-.5)>.3||a*f+s*p+l*d<EPe)&&(r(n,i,o,a,s,l,I,L,D,S/=k,C/=k,P,g,_),_.point(I,L),r(I,L,D,S,C,P,c,u,h,f,p,d,g,_))}}return function(n){var i,o,a,s,l,c,u,h,f,p,d,g,_={point:y,lineStart:x,lineEnd:S,polygonStart:function(){n.polygonStart(),_.lineStart=C},polygonEnd:function(){n.polygonEnd(),_.lineStart=x}};function y(O,D){O=e(O,D),n.point(O[0],O[1])}function x(){h=NaN,_.point=b,n.lineStart()}function b(O,D){var B=vc([O,D]),I=e(O,D);r(h,f,u,p,d,g,h=I[0],f=I[1],u=O,p=B[0],d=B[1],g=B[2],mLt,n),n.point(h,f)}function S(){_.point=y,n.lineEnd()}function C(){x(),_.point=P,_.lineEnd=k}function P(O,D){b(i=O,D),o=h,a=f,s=p,l=d,c=g,_.point=b}function k(){r(h,f,u,p,d,g,o,a,i,s,l,c,mLt,n),_.lineEnd=S,S()}return _}}var mLt,EPe,gLt=M(()=>{A2();lr();WT();mLt=16,EPe=ae(30*we)});function PPe(e){return xg({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function eo(e){return YT(function(){return e})()}function YT(e){var t,r=150,n=480,i=250,o,a,s=0,l=0,c=0,u=0,h=0,f,p,d=null,g=zT,_=null,y,x,b,S=of,C=.5,P=lQ(I,C),k,O;function D(F){return F=p(F[0]*we,F[1]*we),[F[0]*r+o,a-F[1]*r]}function B(F){return F=p.invert((F[0]-o)/r,(a-F[1])/r),F&&[F[0]*Ur,F[1]*Ur]}function I(F,z){return F=t(F,z),[F[0]*r+o,a-F[1]*r]}D.stream=function(F){return k&&O===F?k:k=APe(PPe(f)(g(P(S(O=F)))))},D.preclip=function(F){return arguments.length?(g=F,d=void 0,R()):g},D.postclip=function(F){return arguments.length?(S=F,_=y=x=b=null,R()):S},D.clipAngle=function(F){return arguments.length?(g=+F?_D(d=F*we):(d=null,zT),R()):d*Ur},D.clipExtent=function(F){return arguments.length?(S=F==null?(_=y=x=b=null,of):td(_=+F[0][0],y=+F[0][1],x=+F[1][0],b=+F[1][1]),R()):_==null?null:[[_,y],[x,b]]},D.scale=function(F){return arguments.length?(r=+F,L()):r},D.translate=function(F){return arguments.length?(n=+F[0],i=+F[1],L()):[n,i]},D.center=function(F){return arguments.length?(s=F[0]%360*we,l=F[1]%360*we,L()):[s*Ur,l*Ur]},D.rotate=function(F){return arguments.length?(c=F[0]%360*we,u=F[1]%360*we,h=F.length>2?F[2]%360*we:0,L()):[c*Ur,u*Ur,h*Ur]},D.precision=function(F){return arguments.length?(P=lQ(I,C=F*F),R()):Rr(C)},D.fitExtent=function(F,z){return Uy(D,F,z)},D.fitSize=function(F,z){return O2(D,F,z)},D.fitWidth=function(F,z){return z2(D,F,z)},D.fitHeight=function(F,z){return F2(D,F,z)};function L(){p=sD(f=NT(c,u,h),t);var F=t(s,l);return o=n-F[0]*r,a=i+F[1]*r,R()}function R(){return k=O=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&B,L()}}var APe,Au=M(()=>{BJ();HJ();BT();gJ();MD();lr();DT();WT();kD();gLt();APe=xg({point:function(e,t){this.stream.point(e*we,t*we)}})});function B2(e){var t=0,r=rr/3,n=YT(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*we,r=o[1]*we):[t*Ur,r*Ur]},i}var RD=M(()=>{lr();Au()});function _Lt(e){var t=ae(e);function r(n,i){return[n*t,Jt(i)/t]}return r.invert=function(n,i){return[n/t,Jn(i*t)]},r}var yLt=M(()=>{lr()});function cQ(e,t){var r=Jt(e),n=(r+Jt(t))/2;if(Ye(n)<ce)return _Lt(e);var i=1+r*(2*n-r),o=Rr(i)/n;function a(s,l){var c=Rr(i-2*n*Jt(l))/n;return[c*Jt(s*=n),o-c*ae(s)]}return a.invert=function(s,l){var c=o-l;return[Sn(s,Ye(c))/n*mg(c),Jn((i-(s*s+c*c)*n*n)/(2*n))]},a}function qy(){return B2(cQ).scale(155.424).center([0,33.6442])}var ND=M(()=>{lr();RD();yLt()});function DD(){return qy().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var uQ=M(()=>{ND()});function IPe(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i<t;)e[i].point(r,n)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function vLt(){var e,t,r=DD(),n,i=qy().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=qy().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(f,p){l=[f,p]}};function u(f){var p=f[0],d=f[1];return l=null,n.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}u.invert=function(f){var p=r.scale(),d=r.translate(),g=(f[0]-d[0])/p,_=(f[1]-d[1])/p;return(_>=.12&&_<.234&&g>=-.425&&g<-.214?i:_>=.166&&_<.234&&g>=-.214&&g<-.115?a:r).invert(f)},u.stream=function(f){return e&&t===f?e:e=IPe([r.stream(t=f),i.stream(f),a.stream(f)])},u.precision=function(f){return arguments.length?(r.precision(f),i.precision(f),a.precision(f),h()):r.precision()},u.scale=function(f){return arguments.length?(r.scale(f),i.scale(f*.35),a.scale(f),u.translate(r.translate())):r.scale()},u.translate=function(f){if(!arguments.length)return r.translate();var p=r.scale(),d=+f[0],g=+f[1];return n=r.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+ce,g+.12*p+ce],[d-.214*p-ce,g+.234*p-ce]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+ce,g+.166*p+ce],[d-.115*p-ce,g+.234*p-ce]]).stream(c),h()},u.fitExtent=function(f,p){return Uy(u,f,p)},u.fitSize=function(f,p){return O2(u,f,p)},u.fitWidth=function(f,p){return z2(u,f,p)},u.fitHeight=function(f,p){return F2(u,f,p)};function h(){return e=t=null,u}return u.scale(1070)}var xLt=M(()=>{lr();uQ();ND();kD()});function OD(e){return function(t,r){var n=ae(t),i=ae(r),o=e(n*i);return[o*i*Jt(t),o*Jt(r)]}}function lf(e){return function(t,r){var n=Rr(t*t+r*r),i=e(n),o=Jt(i),a=ae(i);return[Sn(t*o,n*a),Jn(n&&r*o/n)]}}var H2=M(()=>{lr()});function bLt(){return eo(zD).scale(124.75).clipAngle(180-.001)}var zD,wLt=M(()=>{lr();H2();Au();zD=OD(function(e){return Rr(2/(1+e))});zD.invert=lf(function(e){return 2*Jn(e/2)})});function SLt(){return eo(FD).scale(79.4188).clipAngle(180-.001)}var FD,MLt=M(()=>{lr();H2();Au();FD=OD(function(e){return(e=KN(e))&&e/Jt(e)});FD.invert=lf(function(e){return e})});function Gy(e,t){return[e,Ny(C2((Bn+t)/2))]}function ELt(){return hQ(Gy).scale(961/Bi)}function hQ(e){var t=eo(e),r=t.center,n=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,c;t.scale=function(h){return arguments.length?(n(h),u()):n()},t.translate=function(h){return arguments.length?(i(h),u()):i()},t.center=function(h){return arguments.length?(r(h),u()):r()},t.clipExtent=function(h){return arguments.length?(h==null?a=s=l=c=null:(a=+h[0][0],s=+h[0][1],l=+h[1][0],c=+h[1][1]),u()):a==null?null:[[a,s],[l,c]]};function u(){var h=rr*n(),f=t(lD(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===Gy?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,l),c]]:[[a,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,c)]])}return u()}var BD=M(()=>{lr();DT();Au();Gy.invert=function(e,t){return[e,2*yc(XN(t))-Bn]}});function HD(e){return C2((Bn+e)/2)}function fQ(e,t){var r=ae(e),n=e===t?Jt(e):Ny(r/ae(t))/Ny(HD(t)/HD(e)),i=r*$N(HD(e),n)/n;if(!n)return Gy;function o(a,s){i>0?s<-Bn+ce&&(s=-Bn+ce):s>Bn-ce&&(s=Bn-ce);var l=i/$N(HD(s),n);return[l*Jt(n*a),i-l*ae(n*a)]}return o.invert=function(a,s){var l=i-s,c=mg(n)*Rr(a*a+l*l);return[Sn(a,Ye(l))/n*mg(l),2*yc($N(i/c,1/n))-Bn]},o}function TLt(){return B2(fQ).scale(109.5).parallels([30,30])}var CLt=M(()=>{lr();RD();BD()});function Wy(e,t){return[e,t]}function ALt(){return eo(Wy).scale(152.63)}var pQ=M(()=>{Au();Wy.invert=Wy});function dQ(e,t){var r=ae(e),n=e===t?Jt(e):(r-ae(t))/(t-e),i=r/n+e;if(Ye(n)<ce)return Wy;function o(a,s){var l=i-s,c=n*a;return[l*Jt(c),i-l*ae(c)]}return o.invert=function(a,s){var l=i-s;return[Sn(a,Ye(l))/n*mg(l),i-mg(n)*Rr(a*a+l*l)]},o}function PLt(){return B2(dQ).scale(131.154).center([0,13.9389])}var ILt=M(()=>{lr();RD();pQ()});function VD(e,t){var r=ae(t),n=ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function LLt(){return eo(VD).scale(144.049).clipAngle(60)}var kLt=M(()=>{lr();H2();Au();VD.invert=lf(yc)});function UD(e,t,r,n){return e===1&&t===1&&r===0&&n===0?of:xg({point:function(i,o){this.stream.point(i*e+r,o*t+n)}})}function RLt(){var e=1,t=0,r=0,n=1,i=1,o=of,a=null,s,l,c,u=of,h,f,p;function d(){return h=f=null,p}return p={stream:function(g){return h&&f===g?h:h=o(u(f=g))},postclip:function(g){return arguments.length?(u=g,a=s=l=c=null,d()):u},clipExtent:function(g){return arguments.length?(u=g==null?(a=s=l=c=null,of):td(a=+g[0][0],s=+g[0][1],l=+g[1][0],c=+g[1][1]),d()):a==null?null:[[a,s],[l,c]]},scale:function(g){return arguments.length?(o=UD((e=+g)*n,e*i,t,r),d()):e},translate:function(g){return arguments.length?(o=UD(e*n,e*i,t=+g[0],r=+g[1]),d()):[t,r]},reflectX:function(g){return arguments.length?(o=UD(e*(n=g?-1:1),e*i,t,r),d()):n<0},reflectY:function(g){return arguments.length?(o=UD(e*n,e*(i=g?-1:1),t,r),d()):i<0},fitExtent:function(g,_){return Uy(p,g,_)},fitSize:function(g,_){return O2(p,g,_)},fitWidth:function(g,_){return z2(p,g,_)},fitHeight:function(g,_){return F2(p,g,_)}}}var NLt=M(()=>{BT();MD();WT();kD()});function qD(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}function DLt(){return eo(qD).scale(175.295)}var OLt=M(()=>{Au();lr();qD.invert=function(e,t){var r=t,n=25,i;do{var o=r*r,a=o*o;r-=i=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(Ye(i)>ce&&--n>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]}});function GD(e,t){return[ae(t)*Jt(e),Jt(t)]}function zLt(){return eo(GD).scale(249.5).clipAngle(90+ce)}var FLt=M(()=>{lr();H2();Au();GD.invert=lf(Jn)});function WD(e,t){var r=ae(t),n=1+ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function BLt(){return eo(WD).scale(250).clipAngle(142)}var HLt=M(()=>{lr();H2();Au();WD.invert=lf(function(e){return 2*yc(e)})});function YD(e,t){return[Ny(C2((Bn+t)/2)),-e]}function VLt(){var e=hQ(YD),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}var ULt=M(()=>{lr();BD();YD.invert=function(e,t){return[-t,2*yc(XN(e))-Bn]}});var qLt=M(()=>{uJ();ZIt();i9t();vJ();BJ();HJ();N9t();BT();U9t();WJ();Y9t();X9t();qJ();pLt();uQ();xLt();wLt();MLt();CLt();ND();ILt();pQ();kLt();NLt();Au();BD();OLt();FLt();HLt();ULt();DT();gg();WT()});function LPe(e,t){return e.parent===t.parent?1:2}function kPe(e){return e.reduce(RPe,0)/e.length}function RPe(e,t){return e+t.x}function NPe(e){return 1+e.reduce(DPe,0)}function DPe(e,t){return Math.max(e,t.y)}function OPe(e){for(var t;t=e.children;)e=t[0];return e}function zPe(e){for(var t;t=e.children;)e=t[t.length-1];return e}function GLt(){var e=LPe,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=kPe(p),f.y=NPe(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=OPe(o),c=zPe(o),u=l.x-e(l,c)/2,h=c.x+e(c,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-u)/(h-u)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}var WLt=M(()=>{});function FPe(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function YLt(){return this.eachAfter(FPe)}var jLt=M(()=>{});function XLt(e){var t=this,r,n=[t],i,o,a;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);while(n.length);return this}var $Lt=M(()=>{});function KLt(e){for(var t=this,r=[t],n,i;t=r.pop();)if(e(t),n=t.children,n)for(i=n.length-1;i>=0;--i)r.push(n[i]);return this}var ZLt=M(()=>{});function JLt(e){for(var t=this,r=[t],n=[],i,o,a;t=r.pop();)if(n.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);for(;t=n.pop();)e(t);return this}var QLt=M(()=>{});function tkt(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}var ekt=M(()=>{});function rkt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var nkt=M(()=>{});function ikt(e){for(var t=this,r=BPe(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function BPe(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var okt=M(()=>{});function akt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var skt=M(()=>{});function lkt(){var e=[];return this.each(function(t){e.push(t)}),e}var ckt=M(()=>{});function ukt(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var hkt=M(()=>{});function fkt(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var pkt=M(()=>{});function jT(e,t){var r=new bg(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=VPe);i=o.pop();)if(n&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new bg(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(mQ)}function HPe(){return jT(this).eachBefore(UPe)}function VPe(e){return e.children}function UPe(e){e.data=e.data.data}function mQ(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function bg(e){this.data=e,this.depth=this.height=0,this.parent=null}var jD=M(()=>{jLt();$Lt();ZLt();QLt();ekt();nkt();okt();skt();ckt();hkt();pkt();bg.prototype=jT.prototype={constructor:bg,count:YLt,each:XLt,eachAfter:JLt,eachBefore:KLt,sum:tkt,sort:rkt,path:ikt,ancestors:akt,descendants:lkt,leaves:ukt,links:fkt,copy:HPe}});function mkt(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}var dkt,gkt=M(()=>{dkt=Array.prototype.slice});function $D(e){for(var t=0,r=(e=mkt(dkt.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&_kt(o,i)?++t:(o=GPe(n=qPe(n,i)),t=0);return o}function qPe(e,t){var r,n;if(gQ(t,e))return[t];for(r=0;r<e.length;++r)if(XD(t,e[r])&&gQ(XT(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(XD(XT(e[r],e[n]),t)&&XD(XT(e[r],t),e[n])&&XD(XT(e[n],t),e[r])&&gQ(ykt(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function XD(e,t){var r=e.r-t.r,n=t.x-e.x,i=t.y-e.y;return r<0||r*r<n*n+i*i}function _kt(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function gQ(e,t){for(var r=0;r<t.length;++r)if(!_kt(e,t[r]))return!1;return!0}function GPe(e){switch(e.length){case 1:return WPe(e[0]);case 2:return XT(e[0],e[1]);case 3:return ykt(e[0],e[1],e[2])}}function WPe(e){return{x:e.x,y:e.y,r:e.r}}function XT(e,t){var r=e.x,n=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-r,c=a-n,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(r+o+l/h*u)/2,y:(n+a+c/h*u)/2,r:(h+i+s)/2}}function ykt(e,t,r){var n=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=r.x,u=r.y,h=r.r,f=n-a,p=n-c,d=i-s,g=i-u,_=l-o,y=h-o,x=n*n+i*i-o*o,b=x-a*a-s*s+l*l,S=x-c*c-u*u+h*h,C=p*d-f*g,P=(d*S-g*b)/(C*2)-n,k=(g*_-d*y)/C,O=(p*b-f*S)/(C*2)-i,D=(f*y-p*_)/C,B=k*k+D*D-1,I=2*(o+P*k+O*D),L=P*P+O*O-o*o,R=-(B?(I+Math.sqrt(I*I-4*B*L))/(2*B):L/I);return{x:n+P+k*R,y:i+O+D*R,r:R}}var _Q=M(()=>{gkt()});function vkt(e,t,r){var n=e.x,i=e.y,o=t.r+r.r,a=e.r+r.r,s=t.x-n,l=t.y-i,c=s*s+l*l;if(c){var u=.5+((a*=a)-(o*=o))/(2*c),h=Math.sqrt(Math.max(0,2*o*(a+c)-(a-=c)*a-o*o))/(2*c);r.x=n+u*s+h*l,r.y=i+u*l-h*s}else r.x=n+a,r.y=i}function xkt(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return i*i-1e-6>r*r+n*n}function bkt(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function KD(e){this._=e,this.next=null,this.previous=null}function yQ(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,h;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;vkt(r,t,n=e[2]),t=new KD(t),r=new KD(r),n=new KD(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){vkt(t._,r._,n=e[s]),n=new KD(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(xkt(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(xkt(c._,n._)){t=c,t.next=r,r.previous=t,--s;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,o=bkt(t);(n=n.next)!==r;)(a=bkt(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=$D(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function wkt(e){return yQ(e),e}var vQ=M(()=>{_Q()});function Skt(e){return e==null?null:V2(e)}function V2(e){if(typeof e!="function")throw new Error;return e}var ZD=M(()=>{});function ed(){return 0}function wg(e){return function(){return e}}var xQ=M(()=>{});function YPe(e){return Math.sqrt(e.value)}function Tkt(){var e=null,t=1,r=1,n=ed;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(Mkt(e)).eachAfter(bQ(n,.5)).eachBefore(Ekt(1)):o.eachBefore(Mkt(YPe)).eachAfter(bQ(ed,1)).eachAfter(bQ(n,o.r/Math.min(t,r))).eachBefore(Ekt(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=Skt(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.padding=function(o){return arguments.length?(n=typeof o=="function"?o:wg(+o),i):n},i}function Mkt(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function bQ(e,t){return function(r){if(n=r.children){var n,i,o=n.length,a=e(r)*t||0,s;if(a)for(i=0;i<o;++i)n[i].r+=a;if(s=yQ(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function Ekt(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}var Ckt=M(()=>{vQ();ZD();xQ()});function JD(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var wQ=M(()=>{});function cf(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(n-t)/e.value;++s<l;)a=o[s],a.y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}var U2=M(()=>{});function Akt(){var e=1,t=1,r=0,n=!1;function i(a){var s=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),n&&a.eachBefore(JD),a}function o(a,s){return function(l){l.children&&cf(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var c=l.x0,u=l.y0,h=l.x1-r,f=l.y1-r;h<c&&(c=h=(c+h)/2),f<u&&(u=f=(u+f)/2),l.x0=c,l.y0=u,l.x1=h,l.y1=f}}return i.round=function(a){return arguments.length?(n=!!a,i):n},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(r=+a,i):r},i}var Pkt=M(()=>{wQ();U2()});function XPe(e){return e.id}function $Pe(e){return e.parentId}function kkt(){var e=XPe,t=$Pe;function r(n){var i,o,a=n.length,s,l,c,u=new Array(a),h,f,p={};for(o=0;o<a;++o)i=n[o],c=u[o]=new bg(i),(h=e(i,o,n))!=null&&(h+="")&&(f=Ikt+(c.id=h),p[f]=f in p?Lkt:c);for(o=0;o<a;++o)if(c=u[o],h=t(n[o],o,n),h==null||!(h+="")){if(s)throw new Error("multiple roots");s=c}else{if(l=p[Ikt+h],!l)throw new Error("missing: "+h);if(l===Lkt)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}if(!s)throw new Error("no root");if(s.parent=jPe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(mQ),s.parent=null,a>0)throw new Error("cycle");return s}return r.id=function(n){return arguments.length?(e=V2(n),r):e},r.parentId=function(n){return arguments.length?(t=V2(n),r):t},r}var Ikt,jPe,Lkt,Rkt=M(()=>{ZD();jD();Ikt="$",jPe={depth:-1},Lkt={}});function KPe(e,t){return e.parent===t.parent?1:2}function SQ(e){var t=e.children;return t?t[0]:e.t}function MQ(e){var t=e.children;return t?t[t.length-1]:e.t}function ZPe(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function JPe(e){for(var t=0,r=0,n=e.children,i=n.length,o;--i>=0;)o=n[i],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function QPe(e,t,r){return e.a.parent===t.parent?e.a:r}function QD(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function t6e(e){for(var t=new QD(e,0),r,n=[t],i,o,a,s;r=n.pop();)if(o=r._.children)for(r.children=new Array(s=o.length),a=s-1;a>=0;--a)n.push(i=r.children[a]=new QD(o[a],a)),i.parent=r;return(t.parent=new QD(null,0)).children=[t],t}function Nkt(){var e=KPe,t=1,r=1,n=null;function i(c){var u=t6e(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),n)c.eachBefore(l);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:e(h,f)/2,g=d-h.x,_=t/(f.x+d+g),y=r/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*_,x.y=x.depth*y})}return c}function o(c){var u=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(u){JPe(c);var p=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+e(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,h){if(u){for(var f=c,p=c,d=u,g=f.parent.children[0],_=f.m,y=p.m,x=d.m,b=g.m,S;d=MQ(d),f=SQ(f),d&&f;)g=SQ(g),p=MQ(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(ZPe(QPe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!MQ(p)&&(p.t=d,p.m+=x-y),f&&!SQ(g)&&(g.t=f,g.m+=_-b,h=c)}return h}function l(c){c.x*=t,c.y=c.depth*r}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(n=!1,t=+c[0],r=+c[1],i):n?null:[t,r]},i.nodeSize=function(c){return arguments.length?(n=!0,t=+c[0],r=+c[1],i):n?[t,r]:null},i}var Dkt=M(()=>{jD();QD.prototype=Object.create(bg.prototype)});function Sg(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-r)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var $T=M(()=>{});function TQ(e,t,r,n,i,o){for(var a=[],s=t.children,l,c,u=0,h=0,f=s.length,p,d,g=t.value,_,y,x,b,S,C,P;u<f;){p=i-r,d=o-n;do _=s[h++].value;while(!_&&h<f);for(y=x=_,C=Math.max(d/p,p/d)/(g*e),P=_*_*C,S=Math.max(x/P,P/y);h<f;++h){if(_+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),P=_*_*C,b=Math.max(x/P,P/y),b>S){_-=c;break}S=b}a.push(l={value:_,dice:p<d,children:s.slice(u,h)}),l.dice?cf(l,r,n,i,g?n+=d*_/g:o):Sg(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var EQ,tO,eO=M(()=>{U2();$T();EQ=(1+Math.sqrt(5))/2;tO=function e(t){function r(n,i,o,a,s){TQ(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(EQ)});function Okt(){var e=tO,t=!1,r=1,n=1,i=[0],o=ed,a=ed,s=ed,l=ed,c=ed;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(JD),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,_=f.x1-p,y=f.y1-p;_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=_,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,_-=s(f)-p,y-=l(f)-p,_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),e(f,d,g,_,y))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(r=+f[0],n=+f[1],u):[r,n]},u.tile=function(f){return arguments.length?(e=V2(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:wg(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:wg(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:wg(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:wg(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:wg(+f),u):c},u}var zkt=M(()=>{wQ();eO();ZD();xQ()});function Fkt(e,t,r,n,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,r,n,i);function u(h,f,p,d,g,_,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=_,x.y1=y;return}for(var b=c[h],S=p/2+b,C=h+1,P=f-1;C<P;){var k=C+P>>>1;c[k]<S?C=k+1:P=k}S-c[C-1]<c[C]-S&&h+1<C&&--C;var O=c[C]-b,D=p-O;if(_-d>y-g){var B=(d*D+_*O)/p;u(h,C,O,d,g,B,y),u(C,f,D,B,g,_,y)}else{var I=(g*D+y*O)/p;u(h,C,O,d,g,_,I),u(C,f,D,d,I,_,y)}}}var Bkt=M(()=>{});function Hkt(e,t,r,n,i){(e.depth&1?Sg:cf)(e,t,r,n,i)}var Vkt=M(()=>{U2();$T()});var Ukt,qkt=M(()=>{U2();$T();eO();Ukt=function e(t){function r(n,i,o,a,s){if((l=n._squarify)&&l.ratio===t)for(var l,c,u,h,f=-1,p,d=l.length,g=n.value;++f<d;){for(c=l[f],u=c.children,h=c.value=0,p=u.length;h<p;++h)c.value+=u[h].value;c.dice?cf(c,i,o,a,o+=(s-o)*c.value/g):Sg(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=TQ(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(EQ)});var Gkt=M(()=>{WLt();jD();Ckt();vQ();_Q();Pkt();Rkt();Dkt();zkt();Bkt();U2();$T();Vkt();eO();qkt()});function rd(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Mg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var rO=M(()=>{});function ff(){}function Ykt(){return this.rgb().formatHex()}function l6e(){return Jkt(this).formatHsl()}function jkt(){return this.rgb().formatRgb()}function Tg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=e6e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Xkt(t):r===3?new ro(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=r6e.exec(e))?new ro(t[1],t[2],t[3],1):(t=n6e.exec(e))?new ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=i6e.exec(e))?nO(t[1],t[2],t[3],t[4]):(t=o6e.exec(e))?nO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a6e.exec(e))?Zkt(t[1],t[2]/100,t[3]/100,1):(t=s6e.exec(e))?Zkt(t[1],t[2]/100,t[3]/100,t[4]):Wkt.hasOwnProperty(e)?Xkt(Wkt[e]):e==="transparent"?new ro(NaN,NaN,NaN,0):null}function Xkt(e){return new ro(e>>16&255,e>>8&255,e&255,1)}function nO(e,t,r,n){return n<=0&&(e=t=r=NaN),new ro(e,t,r,n)}function ZT(e){return e instanceof ff||(e=Tg(e)),e?(e=e.rgb(),new ro(e.r,e.g,e.b,e.opacity)):new ro}function G2(e,t,r,n){return arguments.length===1?ZT(e):new ro(e,t,r,n==null?1:n)}function ro(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function $kt(){return"#"+CQ(this.r)+CQ(this.g)+CQ(this.b)}function Kkt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function CQ(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Zkt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uf(e,t,r,n)}function Jkt(e){if(e instanceof uf)return new uf(e.h,e.s,e.l,e.opacity);if(e instanceof ff||(e=Tg(e)),!e)return new uf;if(e instanceof uf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new uf(a,s,l,e.opacity)}function JT(e,t,r,n){return arguments.length===1?Jkt(e):new uf(e,t,r,n==null?1:n)}function uf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function AQ(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Eg,Yy,q2,KT,hf,e6e,r6e,n6e,i6e,o6e,a6e,s6e,Wkt,iO=M(()=>{rO();Eg=.7,Yy=1/Eg,q2="\\s*([+-]?\\d+)\\s*",KT="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",hf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",e6e=/^#([0-9a-f]{3,8})$/,r6e=new RegExp("^rgb\\("+[q2,q2,q2]+"\\)$"),n6e=new RegExp("^rgb\\("+[hf,hf,hf]+"\\)$"),i6e=new RegExp("^rgba\\("+[q2,q2,q2,KT]+"\\)$"),o6e=new RegExp("^rgba\\("+[hf,hf,hf,KT]+"\\)$"),a6e=new RegExp("^hsl\\("+[KT,hf,hf]+"\\)$"),s6e=new RegExp("^hsla\\("+[KT,hf,hf,KT]+"\\)$"),Wkt={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};rd(ff,Tg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ykt,formatHex:Ykt,formatHsl:l6e,formatRgb:jkt,toString:jkt});rd(ro,G2,Mg(ff,{brighter:function(e){return e=e==null?Yy:Math.pow(Yy,e),new ro(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Eg:Math.pow(Eg,e),new ro(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$kt,formatHex:$kt,formatRgb:Kkt,toString:Kkt}));rd(uf,JT,Mg(ff,{brighter:function(e){return e=e==null?Yy:Math.pow(Yy,e),new uf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Eg:Math.pow(Eg,e),new uf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ro(AQ(e>=240?e-240:e+120,i,n),AQ(e,i,n),AQ(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var oO,aO,PQ=M(()=>{oO=Math.PI/180,aO=180/Math.PI});function i8t(e){if(e instanceof pf)return new pf(e.l,e.a,e.b,e.opacity);if(e instanceof nd)return o8t(e);e instanceof ro||(e=ZT(e));var t=RQ(e.r),r=RQ(e.g),n=RQ(e.b),i=IQ((.2225045*t+.7168786*r+.0606169*n)/t8t),o,a;return t===r&&r===n?o=a=i:(o=IQ((.4360747*t+.3850649*r+.1430804*n)/Qkt),a=IQ((.0139322*t+.0971045*r+.7141733*n)/e8t)),new pf(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Y2(e,t,r,n){return arguments.length===1?i8t(e):new pf(e,t,r,n==null?1:n)}function pf(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function IQ(e){return e>c6e?Math.pow(e,1/3):e/n8t+r8t}function LQ(e){return e>W2?e*e*e:n8t*(e-r8t)}function kQ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RQ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function u6e(e){if(e instanceof nd)return new nd(e.h,e.c,e.l,e.opacity);if(e instanceof pf||(e=i8t(e)),e.a===0&&e.b===0)return new nd(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*aO;return new nd(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function QT(e,t,r,n){return arguments.length===1?u6e(e):new nd(e,t,r,n==null?1:n)}function nd(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function o8t(e){if(isNaN(e.h))return new pf(e.l,0,0,e.opacity);var t=e.h*oO;return new pf(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var sO,Qkt,t8t,e8t,r8t,W2,n8t,c6e,a8t=M(()=>{rO();iO();PQ();sO=18,Qkt=.96422,t8t=1,e8t=.82521,r8t=4/29,W2=6/29,n8t=3*W2*W2,c6e=W2*W2*W2;rd(pf,Y2,Mg(ff,{brighter:function(e){return new pf(this.l+sO*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new pf(this.l-sO*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Qkt*LQ(t),e=t8t*LQ(e),r=e8t*LQ(r),new ro(kQ(3.1338561*t-1.6168667*e-.4906146*r),kQ(-.9787684*t+1.9161415*e+.033454*r),kQ(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));rd(nd,QT,Mg(ff,{brighter:function(e){return new nd(this.h,this.c,this.l+sO*(e==null?1:e),this.opacity)},darker:function(e){return new nd(this.h,this.c,this.l-sO*(e==null?1:e),this.opacity)},rgb:function(){return o8t(this).rgb()}}))});function h6e(e){if(e instanceof jy)return new jy(e.h,e.s,e.l,e.opacity);e instanceof ro||(e=ZT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(c8t*n+s8t*t-l8t*r)/(c8t+s8t-l8t),o=n-i,a=(tC*(r-i)-DQ*o)/lO,s=Math.sqrt(a*a+o*o)/(tC*i*(1-i)),l=s?Math.atan2(a,o)*aO-120:NaN;return new jy(l<0?l+360:l,s,i,e.opacity)}function j2(e,t,r,n){return arguments.length===1?h6e(e):new jy(e,t,r,n==null?1:n)}function jy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var u8t,NQ,DQ,lO,tC,s8t,l8t,c8t,h8t=M(()=>{rO();iO();PQ();u8t=-.14861,NQ=1.78277,DQ=-.29227,lO=-.90649,tC=1.97294,s8t=tC*lO,l8t=tC*NQ,c8t=NQ*DQ-lO*u8t;rd(jy,j2,Mg(ff,{brighter:function(e){return e=e==null?Yy:Math.pow(Yy,e),new jy(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Eg:Math.pow(Eg,e),new jy(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*oO,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new ro(255*(t+r*(u8t*n+NQ*i)),255*(t+r*(DQ*n+lO*i)),255*(t+r*(tC*n)),this.opacity)}}))});var Xy=M(()=>{iO();a8t();h8t()});function OQ(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function cO(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return OQ((r-n/t)*t,a,i,o,s)}}var uO=M(()=>{});function hO(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return OQ((r-n/t)*t,i,o,a,s)}}var zQ=M(()=>{uO()});function X2(e){return function(){return e}}var FQ=M(()=>{});function f8t(e,t){return function(r){return e+r*t}}function f6e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function $2(e,t){var r=t-e;return r?f8t(e,r>180||r<-180?r-360*Math.round(r/360):r):X2(isNaN(e)?t:e)}function p8t(e){return(e=+e)==1?Qn:function(t,r){return r-t?f6e(t,r,e):X2(isNaN(t)?r:t)}}function Qn(e,t){var r=t-e;return r?f8t(e,r):X2(isNaN(e)?t:e)}var K2=M(()=>{FQ()});function d8t(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=G2(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var eC,m8t,g8t,BQ=M(()=>{Xy();uO();zQ();K2();eC=function e(t){var r=p8t(t);function n(i,o){var a=r((i=G2(i)).r,(o=G2(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Qn(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);m8t=d8t(cO),g8t=d8t(hO)});function fO(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=Z2(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var HQ=M(()=>{pO()});function dO(e,t){var r=new Date;return e=+e,t-=e,function(n){return r.setTime(e+t*n),r}}var VQ=M(()=>{});function Ps(e,t){return e=+e,t-=e,function(r){return e+t*r}}var rC=M(()=>{});function mO(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Z2(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var UQ=M(()=>{pO()});function p6e(e){return function(){return e}}function d6e(e){return function(t){return e(t)+""}}function gO(e,t){var r=GQ.lastIndex=qQ.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=GQ.exec(e))&&(i=qQ.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ps(n,i)})),r=qQ.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?d6e(l[0].x):p6e(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var GQ,qQ,WQ=M(()=>{rC();GQ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qQ=new RegExp(GQ.source,"g")});function Z2(e,t){var r=typeof t,n;return t==null||r==="boolean"?X2(t):(r==="number"?Ps:r==="string"?(n=Tg(t))?(t=n,eC):gO:t instanceof Tg?eC:t instanceof Date?dO:Array.isArray(t)?fO:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?mO:Ps)(e,t)}var pO=M(()=>{Xy();BQ();HQ();VQ();rC();UQ();WQ();FQ()});function _8t(e,t){return e=+e,t-=e,function(r){return Math.round(e+t*r)}}var y8t=M(()=>{});function YQ(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*v8t,skewX:Math.atan(l)*v8t,scaleX:a,scaleY:s}}var v8t,_O,x8t=M(()=>{v8t=180/Math.PI,_O={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function w8t(e){return e==="none"?_O:(nC||(nC=document.createElement("DIV"),jQ=document.documentElement,b8t=document.defaultView),nC.style.transform=e,e=b8t.getComputedStyle(jQ.appendChild(nC),null).getPropertyValue("transform"),jQ.removeChild(nC),e=e.slice(7,-1).split(","),YQ(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function S8t(e){return e==null?_O:(yO||(yO=document.createElementNS("http://www.w3.org/2000/svg","g")),yO.setAttribute("transform",e),(e=yO.transform.baseVal.consolidate())?(e=e.matrix,YQ(e.a,e.b,e.c,e.d,e.e,e.f)):_O)}var nC,jQ,b8t,yO,M8t=M(()=>{x8t()});function E8t(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Ps(c,h)},{i:g-2,x:Ps(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ps(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ps(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Ps(c,h)},{i:g-2,x:Ps(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var T8t,C8t,A8t=M(()=>{rC();M8t();T8t=E8t(w8t,"px, ","px)","deg)"),C8t=E8t(S8t,", ",")",")")});function I8t(e){return((e=Math.exp(e))+1/e)/2}function g6e(e){return((e=Math.exp(e))-1/e)/2}function _6e(e){return((e=Math.exp(2*e))-1)/(e+1)}function L8t(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<m6e)f=Math.log(s/i)/iC,h=function(x){return[r+x*l,n+x*c,i*Math.exp(iC*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+P8t*u)/(2*i*XQ*p),g=(s*s-i*i-P8t*u)/(2*s*XQ*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/iC,h=function(x){var b=x*f,S=I8t(_),C=i/(XQ*p)*(S*_6e(iC*b+_)-g6e(_));return[r+C*l,n+C*c,i*S/I8t(iC*b+_)]}}return h.duration=f*1e3,h}var iC,XQ,P8t,m6e,k8t=M(()=>{iC=Math.SQRT2,XQ=2,P8t=4,m6e=1e-12});function R8t(e){return function(t,r){var n=e((t=JT(t)).h,(r=JT(r)).h),i=Qn(t.s,r.s),o=Qn(t.l,r.l),a=Qn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var N8t,D8t,O8t=M(()=>{Xy();K2();N8t=R8t($2),D8t=R8t(Qn)});function $Q(e,t){var r=Qn((e=Y2(e)).l,(t=Y2(t)).l),n=Qn(e.a,t.a),i=Qn(e.b,t.b),o=Qn(e.opacity,t.opacity);return function(a){return e.l=r(a),e.a=n(a),e.b=i(a),e.opacity=o(a),e+""}}var z8t=M(()=>{Xy();K2()});function F8t(e){return function(t,r){var n=e((t=QT(t)).h,(r=QT(r)).h),i=Qn(t.c,r.c),o=Qn(t.l,r.l),a=Qn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var B8t,H8t,V8t=M(()=>{Xy();K2();B8t=F8t($2),H8t=F8t(Qn)});function U8t(e){return function t(r){r=+r;function n(i,o){var a=e((i=j2(i)).h,(o=j2(o)).h),s=Qn(i.s,o.s),l=Qn(i.l,o.l),c=Qn(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var q8t,G8t,W8t=M(()=>{Xy();K2();q8t=U8t($2),G8t=U8t(Qn)});function Y8t(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var j8t=M(()=>{});var X8t=M(()=>{pO();HQ();uO();zQ();VQ();rC();UQ();y8t();WQ();A8t();k8t();BQ();O8t();z8t();V8t();W8t();j8t()});function JQ(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $8t(){return new JQ}var KQ,ZQ,$y,y6e,K8t,Z8t=M(()=>{KQ=Math.PI,ZQ=2*KQ,$y=1e-6,y6e=ZQ-$y;JQ.prototype=$8t.prototype={constructor:JQ,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>$y)if(!(Math.abs(u*s-l*c)>$y)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((KQ-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>$y&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>$y||Math.abs(this._y1-c)>$y)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%ZQ+ZQ),h>y6e?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>$y&&(this._+="A"+r+","+r+",0,"+ +(h>=KQ)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};K8t=$8t});var J8t=M(()=>{Z8t()});function Q8t(e){for(var t=-1,r=e.length,n,i=e[r-1],o=0;++t<r;)n=i,i=e[t],o+=n[1]*i[0]-n[0]*i[1];return o/2}var tRt=M(()=>{});function eRt(e){for(var t=-1,r=e.length,n=0,i=0,o,a=e[r-1],s,l=0;++t<r;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],n+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[n/l,i/l]}var rRt=M(()=>{});function nRt(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}var iRt=M(()=>{});function v6e(e,t){return e[0]-t[0]||e[1]-t[1]}function oRt(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&nRt(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function aRt(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t<r;++t)n[t]=[+e[t][0],+e[t][1],t];for(n.sort(v6e),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=oRt(n),a=oRt(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[n[o[t]][2]]);for(t=+s;t<a.length-l;++t)c.push(e[n[a[t]][2]]);return c}var sRt=M(()=>{iRt()});function lRt(e,t){for(var r=e.length,n=e[r-1],i=t[0],o=t[1],a=n[0],s=n[1],l,c,u=!1,h=0;h<r;++h)n=e[h],l=n[0],c=n[1],c>o!=s>o&&i<(a-l)*(o-c)/(s-c)+l&&(u=!u),a=l,s=c;return u}var cRt=M(()=>{});function uRt(e){for(var t=-1,r=e.length,n=e[r-1],i,o,a=n[0],s=n[1],l=0;++t<r;)i=a,o=s,n=e[t],a=n[0],s=n[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}var hRt=M(()=>{});var fRt=M(()=>{tRt();rRt();sRt();cRt();hRt()});function pRt(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return dRt(this.cover(t,r),t,r,e)}function dRt(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function mRt(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));for(u<l&&(l=this._x0,u=this._x1),h<c&&(c=this._y0,h=this._y1),this.cover(l,c).cover(u,h),r=0;r<n;++r)dRt(this,a[r],s[r],e[r]);return this}var gRt=M(()=>{});function _Rt(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else if(r>e||e>i||n>t||t>o){var a=i-r,s=this._root,l,c;switch(c=(t<(n+o)/2)<<1|e<(r+i)/2){case 0:{do l=new Array(4),l[c]=s,s=l;while(a*=2,i=r+a,o=n+a,e>i||t>o);break}case 1:{do l=new Array(4),l[c]=s,s=l;while(a*=2,r=i-a,o=n+a,r>e||t>o);break}case 2:{do l=new Array(4),l[c]=s,s=l;while(a*=2,i=r+a,n=o-a,e>i||n>t);break}case 3:{do l=new Array(4),l[c]=s,s=l;while(a*=2,r=i-a,n=o-a,r>e||n>t);break}}this._root&&this._root.length&&(this._root=s)}else return this;return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}var yRt=M(()=>{});function vRt(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var xRt=M(()=>{});function bRt(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}var wRt=M(()=>{});function Eo(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var vO=M(()=>{});function SRt(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new Eo(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new Eo(p[3],_,y,l,c),new Eo(p[2],a,y,_,c),new Eo(p[1],_,s,l,y),new Eo(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}var MRt=M(()=>{vO()});function ERt(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function TRt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var CRt=M(()=>{});function ARt(){return this._root}var PRt=M(()=>{});function IRt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var LRt=M(()=>{});function kRt(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new Eo(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new Eo(i,c,u,s,l)),(i=n[2])&&t.push(new Eo(i,o,u,c,l)),(i=n[1])&&t.push(new Eo(i,c,a,s,u)),(i=n[0])&&t.push(new Eo(i,o,a,c,u))}return this}var RRt=M(()=>{vO()});function NRt(e){var t=[],r=[],n;for(this._root&&t.push(new Eo(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new Eo(o,a,s,u,h)),(o=i[1])&&t.push(new Eo(o,u,s,l,h)),(o=i[2])&&t.push(new Eo(o,a,h,u,c)),(o=i[3])&&t.push(new Eo(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}var DRt=M(()=>{vO()});function ORt(e){return e[0]}function zRt(e){return arguments.length?(this._x=e,this):this._x}var FRt=M(()=>{});function BRt(e){return e[1]}function HRt(e){return arguments.length?(this._y=e,this):this._y}var VRt=M(()=>{});function xO(e,t,r){var n=new QQ(t==null?ORt:t,r==null?BRt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function QQ(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function URt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var $a,qRt=M(()=>{gRt();yRt();xRt();wRt();MRt();CRt();PRt();LRt();RRt();DRt();FRt();VRt();$a=xO.prototype=QQ.prototype;$a.copy=function(){var e=new QQ(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=URt(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=URt(n));return e};$a.add=pRt;$a.addAll=mRt;$a.cover=_Rt;$a.data=vRt;$a.extent=bRt;$a.find=SRt;$a.remove=ERt;$a.removeAll=TRt;$a.root=ARt;$a.size=IRt;$a.visit=kRt;$a.visitAfter=NRt;$a.x=zRt;$a.y=HRt});var GRt=M(()=>{qRt()});var WRt,YRt=M(()=>{WRt=[].slice});function ttt(e){this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function jRt(e){if(!e._start)try{b6e(e)}catch(t){if(e._tasks[e._ended+e._active-1])ett(e,t);else if(!e._data)throw t}}function b6e(e){for(;e._start=e._waiting&&e._active<e._size;){var t=e._ended+e._active,r=e._tasks[t],n=r.length-1,i=r[n];r[n]=w6e(e,t),--e._waiting,++e._active,r=i.apply(null,r),e._tasks[t]&&(e._tasks[t]=r||x6e)}}function w6e(e,t){return function(r,n){!e._tasks[t]||(--e._active,++e._ended,e._tasks[t]=null,e._error==null&&(r!=null?ett(e,r):(e._data[t]=n,e._waiting?jRt(e):bO(e))))}}function ett(e,t){var r=e._tasks.length,n;for(e._error=t,e._data=void 0,e._waiting=NaN;--r>=0;)if((n=e._tasks[r])&&(e._tasks[r]=null,n.abort))try{n.abort()}catch(i){}e._active=NaN,bO(e)}function bO(e){if(!e._active&&e._call){var t=e._data;e._data=void 0,e._call(e._error,t)}}function wO(e){if(e==null)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new ttt(e)}var x6e,XRt=M(()=>{YRt();x6e={};ttt.prototype=wO.prototype={constructor:ttt,defer:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(this._error!=null)return this;var t=WRt.call(arguments,1);return t.push(e),++this._waiting,this._tasks.push(t),jRt(this),this},abort:function(){return this._error==null&&ett(this,new Error("abort")),this},await:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,r){e.apply(null,[t].concat(r))},bO(this),this},awaitAll:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=e,bO(this),this}}});var $Rt=M(()=>{XRt()});function bc(){return Math.random()}var Ky=M(()=>{});var KRt,ZRt=M(()=>{Ky();KRt=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return t()*i+n}}return r.source=e,r}(bc)});var SO,rtt=M(()=>{Ky();SO=function e(t){function r(n,i){var o,a;return n=n==null?0:+n,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return n+i*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=e,r}(bc)});var JRt,QRt=M(()=>{Ky();rtt();JRt=function e(t){function r(){var n=SO.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(bc)});var MO,ntt=M(()=>{Ky();MO=function e(t){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=t();return i}}return r.source=e,r}(bc)});var tNt,eNt=M(()=>{Ky();ntt();tNt=function e(t){function r(n){var i=MO.source(t)(n);return function(){return i()/n}}return r.source=e,r}(bc)});var rNt,nNt=M(()=>{Ky();rNt=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(bc)});var iNt=M(()=>{ZRt();rtt();QRt();eNt();ntt();nNt()});function J2(e,t){var r,n=xs("beforesend","progress","load","error"),i,o=Ji(),a=new XMLHttpRequest,s=null,l=null,c,u,h=0;typeof XDomainRequest!="undefined"&&!("withCredentials"in a)&&/^(http(s)?:)?\/\//.test(e)&&(a=new XDomainRequest),"onload"in a?a.onload=a.onerror=a.ontimeout=f:a.onreadystatechange=function(p){a.readyState>3&&f(p)};function f(p){var d=a.status,g;if(!d&&M6e(a)||d>=200&&d<300||d===304){if(c)try{g=c.call(r,a)}catch(_){n.call("error",r,_);return}else g=a;n.call("load",r,g)}else n.call("error",r,p)}if(a.onprogress=function(p){n.call("progress",r,p)},r={header:function(p,d){return p=(p+"").toLowerCase(),arguments.length<2?o.get(p):(d==null?o.remove(p):o.set(p,d+""),r)},mimeType:function(p){return arguments.length?(i=p==null?null:p+"",r):i},responseType:function(p){return arguments.length?(u=p,r):u},timeout:function(p){return arguments.length?(h=+p,r):h},user:function(p){return arguments.length<1?s:(s=p==null?null:p+"",r)},password:function(p){return arguments.length<1?l:(l=p==null?null:p+"",r)},response:function(p){return c=p,r},get:function(p,d){return r.send("GET",p,d)},post:function(p,d){return r.send("POST",p,d)},send:function(p,d,g){return a.open(p,e,!0,s,l),i!=null&&!o.has("accept")&&o.set("accept",i+",*/*"),a.setRequestHeader&&o.each(function(_,y){a.setRequestHeader(y,_)}),i!=null&&a.overrideMimeType&&a.overrideMimeType(i),u!=null&&(a.responseType=u),h>0&&(a.timeout=h),g==null&&typeof d=="function"&&(g=d,d=null),g!=null&&g.length===1&&(g=S6e(g)),g!=null&&r.on("error",g).on("load",function(_){g(null,_)}),n.call("beforesend",r,a),a.send(d==null?null:d),r},abort:function(){return a.abort(),r},on:function(){var p=n.on.apply(n,arguments);return p===n?r:p}},t!=null){if(typeof t!="function")throw new Error("invalid callback: "+t);return r.get(t)}return r}function S6e(e){return function(t,r){e(t==null?r:null)}}function M6e(e){var t=e.responseType;return t&&t!=="text"?e.response:e.responseText}var EO=M(()=>{Tb();Rm()});function Cg(e,t){return function(r,n){var i=J2(r).mimeType(e).response(t);if(n!=null){if(typeof n!="function")throw new Error("invalid callback: "+n);return i.get(n)}return i}}var oC=M(()=>{EO()});var oNt,aNt=M(()=>{oC();oNt=Cg("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)})});var sNt,lNt=M(()=>{oC();sNt=Cg("application/json",function(e){return JSON.parse(e.responseText)})});var cNt,uNt=M(()=>{oC();cNt=Cg("text/plain",function(e){return e.responseText})});var hNt,fNt=M(()=>{oC();hNt=Cg("application/xml",function(e){var t=e.responseXML;if(!t)throw new Error("parse error");return t})});function TO(e,t){return function(r,n,i){arguments.length<3&&(i=n,n=null);var o=J2(r).mimeType(e);return o.row=function(a){return arguments.length?o.response(E6e(t,n=a)):n},o.row(n),i?o.get(i):o}}function E6e(e,t){return function(r){return e(r.responseText,t)}}var itt=M(()=>{EO()});var pNt,dNt=M(()=>{qE();itt();pNt=TO("text/csv",Cb)});var mNt,gNt=M(()=>{qE();itt();mNt=TO("text/tab-separated-values",Ab)});var _Nt=M(()=>{EO();aNt();lNt();uNt();fNt();dNt();gNt()});function df(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Zy=M(()=>{});function aC(e){return e.length===1&&(e=T6e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function T6e(e){return function(t,r){return df(e(t),r)}}var ott=M(()=>{Zy()});var yNt,vNt,C6e,mf,att=M(()=>{Zy();ott();yNt=aC(df),vNt=yNt.right,C6e=yNt.left,mf=vNt});var stt=M(()=>{});var xNt=M(()=>{stt()});var bNt=M(()=>{});function Q2(e){return e===null?NaN:+e}var tw=M(()=>{});var ltt=M(()=>{tw()});var ctt=M(()=>{ltt()});var utt=M(()=>{});var wNt,P6e,I6e,htt=M(()=>{wNt=Array.prototype,P6e=wNt.slice,I6e=wNt.map});var SNt=M(()=>{});var MNt=M(()=>{});function CO(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var ftt=M(()=>{});function sC(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=ew(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function ew(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=ptt?10:o>=dtt?5:o>=mtt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ptt?10:o>=dtt?5:o>=mtt?2:1)}function Jy(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=ptt?i*=10:o>=dtt?i*=5:o>=mtt&&(i*=2),t<e?-i:i}var ptt,dtt,mtt,gtt=M(()=>{ptt=Math.sqrt(50),dtt=Math.sqrt(10),mtt=Math.sqrt(2)});var _tt=M(()=>{});var ENt=M(()=>{htt();att();SNt();utt();MNt();ftt();gtt();_tt()});function lC(e,t,r){if(r==null&&(r=Q2),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}var AO=M(()=>{tw()});var TNt=M(()=>{htt();Zy();tw();AO()});var CNt=M(()=>{ctt()});var ANt=M(()=>{});var PNt=M(()=>{tw()});var INt=M(()=>{Zy();tw();AO()});var LNt=M(()=>{});var ytt=M(()=>{});var kNt=M(()=>{});var RNt=M(()=>{Zy()});var NNt=M(()=>{});var DNt=M(()=>{});var vtt=M(()=>{ytt()});var ONt=M(()=>{vtt()});var gf=M(()=>{att();Zy();ott();xNt();bNt();ctt();utt();ENt();TNt();CNt();_tt();ANt();PNt();INt();LNt();ytt();stt();kNt();AO();ftt();RNt();NNt();DNt();gtt();vtt();ltt();ONt()});function PO(){}function zNt(e,t){var r=new PO;if(e instanceof PO)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var pl,Qy,IO=M(()=>{pl="$";PO.prototype=zNt.prototype={constructor:PO,has:function(e){return pl+e in this},get:function(e){return this[pl+e]},set:function(e,t){return this[pl+e]=t,this},remove:function(e){var t=pl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===pl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===pl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===pl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===pl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===pl&&++e;return e},empty:function(){for(var e in this)if(e[0]===pl)return!1;return!0},each:function(e){for(var t in this)t[0]===pl&&e(this[t],t.slice(1),this)}};Qy=zNt});var FNt=M(()=>{IO()});function LO(){}function O6e(e,t){var r=new LO;if(e instanceof LO)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var tv,BNt=M(()=>{IO();tv=Qy.prototype;LO.prototype=O6e.prototype={constructor:LO,has:tv.has,add:function(e){return e+="",this[pl+e]=e,this},remove:tv.remove,clear:tv.clear,values:tv.keys,size:tv.size,empty:tv.empty,each:tv.each}});var HNt=M(()=>{});var VNt=M(()=>{});var UNt=M(()=>{});var qNt=M(()=>{FNt();BNt();IO();HNt();VNt();UNt()});var GNt,rw,dl,Ag=M(()=>{GNt=Array.prototype,rw=GNt.map,dl=GNt.slice});function nw(e){var t=Qy(),r=[],n=kO;e=e==null?[]:dl.call(e);function i(o){var a=o+"",s=t.get(a);if(!s){if(n!==kO)return n;t.set(a,s=r.push(o))}return e[(s-1)%e.length]}return i.domain=function(o){if(!arguments.length)return r.slice();r=[],t=Qy();for(var a=-1,s=o.length,l,c;++a<s;)t.has(c=(l=o[a])+"")||t.set(c,r.push(l));return i},i.range=function(o){return arguments.length?(e=dl.call(o),i):e.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return nw().domain(r).range(e).unknown(n)},i}var kO,xtt=M(()=>{qNt();Ag();kO={name:"implicit"}});function cC(){var e=nw().unknown(void 0),t=e.domain,r=e.range,n=[0,1],i,o,a=!1,s=0,l=0,c=.5;delete e.unknown;function u(){var h=t().length,f=n[1]<n[0],p=n[f-0],d=n[1-f];i=(d-p)/Math.max(1,h-s+l*2),a&&(i=Math.floor(i)),p+=(d-p-i*(h-s))*c,o=i*(1-s),a&&(p=Math.round(p),o=Math.round(o));var g=CO(h).map(function(_){return p+i*_});return r(f?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),u()):t()},e.range=function(h){return arguments.length?(n=[+h[0],+h[1]],u()):n.slice()},e.rangeRound=function(h){return n=[+h[0],+h[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(a=!!h,u()):a},e.padding=function(h){return arguments.length?(s=l=Math.max(0,Math.min(1,h)),u()):s},e.paddingInner=function(h){return arguments.length?(s=Math.max(0,Math.min(1,h)),u()):s},e.paddingOuter=function(h){return arguments.length?(l=Math.max(0,Math.min(1,h)),u()):l},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),u()):c},e.copy=function(){return cC().domain(t()).range(n).round(a).paddingInner(s).paddingOuter(l).align(c)},u()}function WNt(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return WNt(t())},e}function YNt(){return WNt(cC().paddingInner(1))}var jNt=M(()=>{gf();xtt()});function iw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function uC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var btt=M(()=>{});function rv(){}function $Nt(){return this.rgb().formatHex()}function G6e(){return eDt(this).formatHsl()}function KNt(){return this.rgb().formatRgb()}function Ig(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=z6e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ZNt(t):r===3?new fa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?RO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?RO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=F6e.exec(e))?new fa(t[1],t[2],t[3],1):(t=B6e.exec(e))?new fa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H6e.exec(e))?RO(t[1],t[2],t[3],t[4]):(t=V6e.exec(e))?RO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=U6e.exec(e))?tDt(t[1],t[2]/100,t[3]/100,1):(t=q6e.exec(e))?tDt(t[1],t[2]/100,t[3]/100,t[4]):XNt.hasOwnProperty(e)?ZNt(XNt[e]):e==="transparent"?new fa(NaN,NaN,NaN,0):null}function ZNt(e){return new fa(e>>16&255,e>>8&255,e&255,1)}function RO(e,t,r,n){return n<=0&&(e=t=r=NaN),new fa(e,t,r,n)}function Mtt(e){return e instanceof rv||(e=Ig(e)),e?(e=e.rgb(),new fa(e.r,e.g,e.b,e.opacity)):new fa}function aw(e,t,r,n){return arguments.length===1?Mtt(e):new fa(e,t,r,n==null?1:n)}function fa(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function JNt(){return"#"+wtt(this.r)+wtt(this.g)+wtt(this.b)}function QNt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function wtt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function tDt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _f(e,t,r,n)}function eDt(e){if(e instanceof _f)return new _f(e.h,e.s,e.l,e.opacity);if(e instanceof rv||(e=Ig(e)),!e)return new _f;if(e instanceof _f)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new _f(a,s,l,e.opacity)}function rDt(e,t,r,n){return arguments.length===1?eDt(e):new _f(e,t,r,n==null?1:n)}function _f(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Stt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Pg,ev,ow,hC,yf,z6e,F6e,B6e,H6e,V6e,U6e,q6e,XNt,Ett=M(()=>{btt();Pg=.7,ev=1/Pg,ow="\\s*([+-]?\\d+)\\s*",hC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",yf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z6e=/^#([0-9a-f]{3,8})$/,F6e=new RegExp("^rgb\\("+[ow,ow,ow]+"\\)$"),B6e=new RegExp("^rgb\\("+[yf,yf,yf]+"\\)$"),H6e=new RegExp("^rgba\\("+[ow,ow,ow,hC]+"\\)$"),V6e=new RegExp("^rgba\\("+[yf,yf,yf,hC]+"\\)$"),U6e=new RegExp("^hsl\\("+[hC,yf,yf]+"\\)$"),q6e=new RegExp("^hsla\\("+[hC,yf,yf,hC]+"\\)$"),XNt={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};iw(rv,Ig,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:$Nt,formatHex:$Nt,formatHsl:G6e,formatRgb:KNt,toString:KNt});iw(fa,aw,uC(rv,{brighter:function(e){return e=e==null?ev:Math.pow(ev,e),new fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Pg:Math.pow(Pg,e),new fa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JNt,formatHex:JNt,formatRgb:QNt,toString:QNt}));iw(_f,rDt,uC(rv,{brighter:function(e){return e=e==null?ev:Math.pow(ev,e),new _f(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Pg:Math.pow(Pg,e),new _f(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new fa(Stt(e>=240?e-240:e+120,i,n),Stt(e,i,n),Stt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var nDt,iDt,oDt=M(()=>{nDt=Math.PI/180,iDt=180/Math.PI});function W6e(e){if(e instanceof nv)return new nv(e.h,e.s,e.l,e.opacity);e instanceof fa||(e=Mtt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(lDt*n+aDt*t-sDt*r)/(lDt+aDt-sDt),o=n-i,a=(fC*(r-i)-Ctt*o)/NO,s=Math.sqrt(a*a+o*o)/(fC*i*(1-i)),l=s?Math.atan2(a,o)*iDt-120:NaN;return new nv(l<0?l+360:l,s,i,e.opacity)}function Ka(e,t,r,n){return arguments.length===1?W6e(e):new nv(e,t,r,n==null?1:n)}function nv(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var cDt,Ttt,Ctt,NO,fC,aDt,sDt,lDt,uDt=M(()=>{btt();Ett();oDt();cDt=-.14861,Ttt=1.78277,Ctt=-.29227,NO=-.90649,fC=1.97294,aDt=fC*NO,sDt=fC*Ttt,lDt=Ttt*Ctt-NO*cDt;iw(nv,Ka,uC(rv,{brighter:function(e){return e=e==null?ev:Math.pow(ev,e),new nv(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Pg:Math.pow(Pg,e),new nv(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*nDt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new fa(255*(t+r*(cDt*n+Ttt*i)),255*(t+r*(Ctt*n+NO*i)),255*(t+r*(fC*n)),this.opacity)}}))});var sw=M(()=>{Ett();uDt()});function Att(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function hDt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Att((r-n/t)*t,a,i,o,s)}}var Ptt=M(()=>{});function fDt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Att((r-n/t)*t,i,o,a,s)}}var pDt=M(()=>{Ptt()});function lw(e){return function(){return e}}var Itt=M(()=>{});function dDt(e,t){return function(r){return e+r*t}}function Y6e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function mDt(e,t){var r=t-e;return r?dDt(e,r>180||r<-180?r-360*Math.round(r/360):r):lw(isNaN(e)?t:e)}function gDt(e){return(e=+e)==1?id:function(t,r){return r-t?Y6e(t,r,e):lw(isNaN(t)?r:t)}}function id(e,t){var r=t-e;return r?dDt(e,r):lw(isNaN(e)?t:e)}var Ltt=M(()=>{Itt()});function _Dt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=aw(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var ktt,_5n,y5n,yDt=M(()=>{sw();Ptt();pDt();Ltt();ktt=function e(t){var r=gDt(t);function n(i,o){var a=r((i=aw(i)).r,(o=aw(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=id(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);_5n=_Dt(hDt),y5n=_Dt(fDt)});function vDt(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function xDt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var bDt=M(()=>{});function wDt(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=iv(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var SDt=M(()=>{DO()});function MDt(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var EDt=M(()=>{});function vf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var OO=M(()=>{});function TDt(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=iv(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var CDt=M(()=>{DO()});function j6e(e){return function(){return e}}function X6e(e){return function(t){return e(t)+""}}function ADt(e,t){var r=Ntt.lastIndex=Rtt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Ntt.exec(e))&&(i=Rtt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:vf(n,i)})),r=Rtt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?X6e(l[0].x):j6e(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var Ntt,Rtt,PDt=M(()=>{OO();Ntt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rtt=new RegExp(Ntt.source,"g")});function iv(e,t){var r=typeof t,n;return t==null||r==="boolean"?lw(t):(r==="number"?vf:r==="string"?(n=Ig(t))?(t=n,ktt):ADt:t instanceof Ig?ktt:t instanceof Date?MDt:xDt(t)?vDt:Array.isArray(t)?wDt:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?TDt:vf)(e,t)}var DO=M(()=>{sw();yDt();SDt();EDt();OO();CDt();PDt();Itt();bDt()});function Dtt(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var IDt=M(()=>{});function LDt(e){return function t(r){r=+r;function n(i,o){var a=e((i=Ka(i)).h,(o=Ka(o)).h),s=id(i.s,o.s),l=id(i.l,o.l),c=id(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var $6e,cw,kDt=M(()=>{sw();Ltt();$6e=LDt(mDt),cw=LDt(id)});var uw=M(()=>{DO();OO();IDt();kDt()});function hw(e){return function(){return e}}var zO=M(()=>{});function FO(e){return+e}var Ott=M(()=>{});function pC(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:hw(t)}function K6e(e){return function(t,r){var n=e(t=+t,r=+r);return function(i){return i<=t?0:i>=r?1:n(i)}}}function Z6e(e){return function(t,r){var n=e(t=+t,r=+r);return function(i){return i<=0?t:i>=1?r:n(i)}}}function J6e(e,t,r,n){var i=e[0],o=e[1],a=t[0],s=t[1];return o<i?(i=r(o,i),a=n(s,a)):(i=r(i,o),a=n(a,s)),function(l){return a(i(l))}}function Q6e(e,t,r,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=r(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(l){var c=mf(e,l,1,i)-1;return a[c](o[c](l))}}function Lg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp())}function od(e,t){var r=RDt,n=RDt,i=iv,o=!1,a,s,l;function c(){return a=Math.min(r.length,n.length)>2?Q6e:J6e,s=l=null,u}function u(h){return(s||(s=a(r,n,o?K6e(e):e,i)))(+h)}return u.invert=function(h){return(l||(l=a(n,r,pC,o?Z6e(t):t)))(+h)},u.domain=function(h){return arguments.length?(r=rw.call(h,FO),c()):r.slice()},u.range=function(h){return arguments.length?(n=dl.call(h),c()):n.slice()},u.rangeRound=function(h){return n=dl.call(h),i=Dtt,c()},u.clamp=function(h){return arguments.length?(o=!!h,c()):o},u.interpolate=function(h){return arguments.length?(i=h,c()):i},c()}var RDt,dC=M(()=>{gf();uw();Ag();zO();Ott();RDt=[0,1]});function NDt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ov(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var mC=M(()=>{});function xf(e){return e=ov(Math.abs(e)),e?e[1]:NaN}var gC=M(()=>{mC()});function DDt(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}var ODt=M(()=>{});function zDt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var FDt=M(()=>{});function kg(e){if(!(t=tIe.exec(e)))throw new Error("invalid format: "+e);var t;return new BO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function BO(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var tIe,ztt=M(()=>{tIe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;kg.prototype=BO.prototype;BO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function BDt(e){t:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break t;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var HDt=M(()=>{});function VDt(e,t){var r=ov(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Ftt=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+ov(e,Math.max(0,t+o-1))[0]}var Ftt,Btt=M(()=>{mC()});function Htt(e,t){var r=ov(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var UDt=M(()=>{mC()});var Vtt,qDt=M(()=>{mC();Btt();UDt();Vtt={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:NDt,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Htt(e*100,t)},r:Htt,s:VDt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function Utt(e){return e}var GDt=M(()=>{});function jDt(e){var t=e.grouping===void 0||e.thousands===void 0?Utt:DDt(WDt.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Utt:zDt(WDt.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(h){h=kg(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,_=h.zero,y=h.width,x=h.comma,b=h.precision,S=h.trim,C=h.type;C==="n"?(x=!0,C="g"):Vtt[C]||(b===void 0&&(b=12),S=!0,C="g"),(_||f==="0"&&p==="=")&&(_=!0,f="0",p="=");var P=g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",k=g==="$"?n:/[%p]/.test(C)?a:"",O=Vtt[C],D=/[defgprs%]/.test(C);b=b===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function B(I){var L=P,R=k,F,z,U;if(C==="c")R=O(I)+R,I="";else{I=+I;var W=I<0||1/I<0;if(I=isNaN(I)?l:O(Math.abs(I),b),S&&(I=BDt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?YDt[8+Ftt/3]:"")+R+(W&&d==="("?")":""),D){for(F=-1,z=I.length;++F<z;)if(U=I.charCodeAt(F),48>U||U>57){R=(U===46?i+I.slice(F+1):I.slice(F))+R,I=I.slice(0,F);break}}}x&&!_&&(I=t(I,1/0));var Z=L.length+I.length+R.length,rt=Z<y?new Array(y-Z+1).join(f):"";switch(x&&_&&(I=t(rt+I,rt.length?y-R.length:1/0),rt=""),p){case"<":I=L+I+R+rt;break;case"=":I=L+rt+I+R;break;case"^":I=rt.slice(0,Z=rt.length>>1)+L+I+R+rt.slice(Z);break;default:I=rt+L+I+R;break}return o(I)}return B.toString=function(){return h+""},B}function u(h,f){var p=c((h=kg(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(xf(f)/3)))*3,g=Math.pow(10,-d),_=YDt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var WDt,YDt,XDt=M(()=>{gC();ODt();FDt();ztt();HDt();qDt();Btt();GDt();WDt=Array.prototype.map,YDt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function qtt(e){return HO=jDt(e),fw=HO.format,VO=HO.formatPrefix,HO}var HO,fw,VO,$Dt=M(()=>{XDt();qtt({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})});function Gtt(e){return Math.max(0,-xf(Math.abs(e)))}var KDt=M(()=>{gC()});function Wtt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xf(t)/3)))*3-xf(Math.abs(e)))}var ZDt=M(()=>{gC()});function Ytt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xf(t)-xf(e))+1}var JDt=M(()=>{gC()});var jtt=M(()=>{$Dt();ztt();KDt();ZDt();JDt()});function QDt(e,t,r){var n=e[0],i=e[e.length-1],o=Jy(n,i,t==null?10:t),a;switch(r=kg(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(n),Math.abs(i));return r.precision==null&&!isNaN(a=Wtt(o,s))&&(r.precision=a),VO(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Ytt(o,Math.max(Math.abs(n),Math.abs(i))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Gtt(o))&&(r.precision=a-(r.type==="%")*2);break}}return fw(r)}var tOt=M(()=>{gf();jtt()});function ad(e){var t=e.domain;return e.ticks=function(r){var n=t();return sC(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){return QDt(t(),r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=ew(a,s,r),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=ew(a,s,r)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=ew(a,s,r)),l>0?(n[i]=Math.floor(a/l)*l,n[o]=Math.ceil(s/l)*l,t(n)):l<0&&(n[i]=Math.ceil(a*l)/l,n[o]=Math.floor(s*l)/l,t(n)),e},e}function UO(){var e=od(pC,vf);return e.copy=function(){return Lg(e,UO())},ad(e)}var pw=M(()=>{gf();uw();dC();tOt()});function qO(){var e=[0,1];function t(r){return+r}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(e=rw.call(r,FO),t):e.slice()},t.copy=function(){return qO().domain(e)},ad(t)}var eOt=M(()=>{Ag();pw();Ott()});function GO(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}var Xtt=M(()=>{});function eIe(e,t){return(t=Math.log(t/e))?function(r){return Math.log(r/e)/t}:hw(t)}function rIe(e,t){return e<0?function(r){return-Math.pow(-t,r)*Math.pow(-e,1-r)}:function(r){return Math.pow(t,r)*Math.pow(e,1-r)}}function nIe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function rOt(e){return e===10?nIe:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function nOt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function iOt(e){return function(t){return-e(-t)}}function WO(){var e=od(eIe,rIe).domain([1,10]),t=e.domain,r=10,n=nOt(10),i=rOt(10);function o(){return n=nOt(r),i=rOt(r),t()[0]<0&&(n=iOt(n),i=iOt(i)),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(t(a),o()):t()},e.ticks=function(a){var s=t(),l=s[0],c=s[s.length-1],u;(u=c<l)&&(h=l,l=c,c=h);var h=n(l),f=n(c),p,d,g,_=a==null?10:+a,y=[];if(!(r%1)&&f-h<_){if(h=Math.round(h)-1,f=Math.round(f)+1,l>0){for(;h<f;++h)for(d=1,p=i(h);d<r;++d)if(g=p*d,!(g<l)){if(g>c)break;y.push(g)}}else for(;h<f;++h)for(d=r-1,p=i(h);d>=1;--d)if(g=p*d,!(g<l)){if(g>c)break;y.push(g)}}else y=sC(h,f,Math.min(f-h,_)).map(i);return u?y.reverse():y},e.tickFormat=function(a,s){if(s==null&&(s=r===10?".0e":","),typeof s!="function"&&(s=fw(s)),a===1/0)return s;a==null&&(a=10);var l=Math.max(1,r*a/e.ticks().length);return function(c){var u=c/i(Math.round(n(c)));return u*r<r-.5&&(u*=r),u<=l?s(c):""}},e.nice=function(){return t(GO(t(),{floor:function(a){return i(Math.floor(n(a)))},ceil:function(a){return i(Math.ceil(n(a)))}}))},e.copy=function(){return Lg(e,WO().base(r))},e}var oOt=M(()=>{gf();jtt();zO();Xtt();dC()});function dw(e,t){return e<0?-Math.pow(-e,t):Math.pow(e,t)}function _C(){var e=1,t=od(n,i),r=t.domain;function n(o,a){return(a=dw(a,e)-(o=dw(o,e)))?function(s){return(dw(s,e)-o)/a}:hw(a)}function i(o,a){return a=dw(a,e)-(o=dw(o,e)),function(s){return dw(o+a*s,1/e)}}return t.exponent=function(o){return arguments.length?(e=+o,r(r())):e},t.copy=function(){return Lg(t,_C().exponent(e))},ad(t)}function aOt(){return _C().exponent(.5)}var sOt=M(()=>{zO();pw();dC()});function YO(){var e=[],t=[],r=[];function n(){var o=0,a=Math.max(1,t.length);for(r=new Array(a-1);++o<a;)r[o-1]=lC(e,o/a);return i}function i(o){if(!isNaN(o=+o))return t[mf(r,o)]}return i.invertExtent=function(o){var a=t.indexOf(o);return a<0?[NaN,NaN]:[a>0?r[a-1]:e[0],a<r.length?r[a]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(var a=0,s=o.length,l;a<s;++a)l=o[a],l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(df),n()},i.range=function(o){return arguments.length?(t=dl.call(o),n()):t.slice()},i.quantiles=function(){return r.slice()},i.copy=function(){return YO().domain(e).range(t)},i}var lOt=M(()=>{gf();Ag()});function jO(){var e=0,t=1,r=1,n=[.5],i=[0,1];function o(s){if(s<=s)return i[mf(n,s,0,r)]}function a(){var s=-1;for(n=new Array(r);++s<r;)n[s]=((s+1)*t-(s-r)*e)/(r+1);return o}return o.domain=function(s){return arguments.length?(e=+s[0],t=+s[1],a()):[e,t]},o.range=function(s){return arguments.length?(r=(i=dl.call(s)).length-1,a()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[e,n[0]]:l>=r?[n[r-1],t]:[n[l-1],n[l]]},o.copy=function(){return jO().domain([e,t]).range(i)},ad(o)}var cOt=M(()=>{gf();Ag();pw()});function XO(){var e=[.5],t=[0,1],r=1;function n(i){if(i<=i)return t[mf(e,i,0,r)]}return n.domain=function(i){return arguments.length?(e=dl.call(i),r=Math.min(e.length,t.length-1),n):e.slice()},n.range=function(i){return arguments.length?(t=dl.call(i),r=Math.min(e.length,t.length-1),n):t.slice()},n.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},n.copy=function(){return XO().domain(e).range(t)},n}var uOt=M(()=>{gf();Ag()});function Nr(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Nr(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return $tt.setTime(+o),Ktt.setTime(+a),e($tt),e(Ktt),Math.floor(r($tt,Ktt))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var $tt,Ktt,Za=M(()=>{$tt=new Date,Ktt=new Date});var $O,mw,hOt,fOt=M(()=>{Za();$O=Nr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});$O.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Nr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):$O};mw=$O,hOt=$O.range});var av,wc,gw,KO,ZO,bf=M(()=>{av=1e3,wc=6e4,gw=36e5,KO=864e5,ZO=6048e5});var pOt,_w,dOt,mOt=M(()=>{Za();bf();pOt=Nr(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*av)},function(e,t){return(t-e)/av},function(e){return e.getUTCSeconds()}),_w=pOt,dOt=pOt.range});var gOt,Ztt,iIe,_Ot=M(()=>{Za();bf();gOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*av)},function(e,t){e.setTime(+e+t*wc)},function(e,t){return(t-e)/wc},function(e){return e.getMinutes()}),Ztt=gOt,iIe=gOt.range});var yOt,Jtt,oIe,vOt=M(()=>{Za();bf();yOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*av-e.getMinutes()*wc)},function(e,t){e.setTime(+e+t*gw)},function(e,t){return(t-e)/gw},function(e){return e.getHours()}),Jtt=yOt,oIe=yOt.range});var xOt,yw,aIe,bOt=M(()=>{Za();bf();xOt=Nr(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wc)/KO},function(e){return e.getDate()-1}),yw=xOt,aIe=xOt.range});function sv(e){return Nr(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*wc)/ZO})}var lv,vw,wOt,SOt,Rg,MOt,EOt,TOt,sIe,lIe,cIe,uIe,hIe,fIe,COt=M(()=>{Za();bf();lv=sv(0),vw=sv(1),wOt=sv(2),SOt=sv(3),Rg=sv(4),MOt=sv(5),EOt=sv(6),TOt=lv.range,sIe=vw.range,lIe=wOt.range,cIe=SOt.range,uIe=Rg.range,hIe=MOt.range,fIe=EOt.range});var AOt,Qtt,pIe,POt=M(()=>{Za();AOt=Nr(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),Qtt=AOt,pIe=AOt.range});var tet,sd,dIe,IOt=M(()=>{Za();tet=Nr(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});tet.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Nr(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};sd=tet,dIe=tet.range});var LOt,eet,mIe,kOt=M(()=>{Za();bf();LOt=Nr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*wc)},function(e,t){return(t-e)/wc},function(e){return e.getUTCMinutes()}),eet=LOt,mIe=LOt.range});var ROt,ret,gIe,NOt=M(()=>{Za();bf();ROt=Nr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*gw)},function(e,t){return(t-e)/gw},function(e){return e.getUTCHours()}),ret=ROt,gIe=ROt.range});var DOt,xw,_Ie,OOt=M(()=>{Za();bf();DOt=Nr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/KO},function(e){return e.getUTCDate()-1}),xw=DOt,_Ie=DOt.range});function cv(e){return Nr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/ZO})}var uv,bw,zOt,FOt,Ng,BOt,HOt,VOt,yIe,vIe,xIe,bIe,wIe,SIe,UOt=M(()=>{Za();bf();uv=cv(0),bw=cv(1),zOt=cv(2),FOt=cv(3),Ng=cv(4),BOt=cv(5),HOt=cv(6),VOt=uv.range,yIe=bw.range,vIe=zOt.range,xIe=FOt.range,bIe=Ng.range,wIe=BOt.range,SIe=HOt.range});var qOt,net,MIe,GOt=M(()=>{Za();qOt=Nr(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),net=qOt,MIe=qOt.range});var iet,ld,EIe,WOt=M(()=>{Za();iet=Nr(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});iet.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Nr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};ld=iet,EIe=iet.range});var JO=M(()=>{fOt();mOt();_Ot();vOt();bOt();COt();POt();IOt();kOt();NOt();OOt();UOt();GOt();WOt()});function oet(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function aet(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function yC(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function set(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=vC(i),u=xC(i),h=vC(o),f=xC(o),p=vC(a),d=xC(a),g=vC(s),_=xC(s),y=vC(l),x=xC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:ZOt,e:ZOt,f:XIe,g:i9e,G:a9e,H:WIe,I:YIe,j:jIe,L:r7t,m:$Ie,M:KIe,p:st,q:St,Q:t7t,s:e7t,S:ZIe,u:JIe,U:QIe,V:t9e,w:e9e,W:r9e,x:null,X:null,y:n9e,Y:o9e,Z:s9e,"%":QOt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:JOt,e:JOt,f:h9e,g:b9e,G:S9e,H:l9e,I:c9e,j:u9e,L:i7t,m:f9e,M:p9e,p:_t,q:ct,Q:t7t,s:e7t,S:d9e,u:m9e,U:g9e,V:_9e,w:y9e,W:v9e,x:null,X:null,y:x9e,Y:w9e,Z:M9e,"%":QOt},C={a:B,A:I,b:L,B:R,c:F,d:$Ot,e:$Ot,f:VIe,g:XOt,G:jOt,H:KOt,I:KOt,j:zIe,L:HIe,m:OIe,M:FIe,p:D,q:DIe,Q:qIe,s:GIe,S:BIe,u:IIe,U:LIe,V:kIe,w:PIe,W:RIe,x:z,X:U,y:XOt,Y:jOt,Z:NIe,"%":UIe};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(X,et){return function(dt){var q=[],pt=-1,ht=0,wt=X.length,kt,ie,ee;for(dt instanceof Date||(dt=new Date(+dt));++pt<wt;)X.charCodeAt(pt)===37&&(q.push(X.slice(ht,pt)),(ie=YOt[kt=X.charAt(++pt)])!=null?kt=X.charAt(++pt):ie=kt==="e"?" ":"0",(ee=et[kt])&&(kt=ee(dt,ie)),q.push(kt),ht=pt+1);return q.push(X.slice(ht,pt)),q.join("")}}function k(X,et){return function(dt){var q=yC(1900,void 0,1),pt=O(q,X,dt+="",0),ht,wt;if(pt!=dt.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(et&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(ht=aet(yC(q.y,0,1)),wt=ht.getUTCDay(),ht=wt>4||wt===0?bw.ceil(ht):bw(ht),ht=xw.offset(ht,(q.V-1)*7),q.y=ht.getUTCFullYear(),q.m=ht.getUTCMonth(),q.d=ht.getUTCDate()+(q.w+6)%7):(ht=oet(yC(q.y,0,1)),wt=ht.getDay(),ht=wt>4||wt===0?vw.ceil(ht):vw(ht),ht=yw.offset(ht,(q.V-1)*7),q.y=ht.getFullYear(),q.m=ht.getMonth(),q.d=ht.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),wt="Z"in q?aet(yC(q.y,0,1)).getUTCDay():oet(yC(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(wt+5)%7:q.w+q.U*7-(wt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,aet(q)):oet(q)}}function O(X,et,dt,q){for(var pt=0,ht=et.length,wt=dt.length,kt,ie;pt<ht;){if(q>=wt)return-1;if(kt=et.charCodeAt(pt++),kt===37){if(kt=et.charAt(pt++),ie=C[kt in YOt?et.charAt(pt++):kt],!ie||(q=ie(X,dt,q))<0)return-1}else if(kt!=dt.charCodeAt(q++))return-1}return q}function D(X,et,dt){var q=c.exec(et.slice(dt));return q?(X.p=u[q[0].toLowerCase()],dt+q[0].length):-1}function B(X,et,dt){var q=p.exec(et.slice(dt));return q?(X.w=d[q[0].toLowerCase()],dt+q[0].length):-1}function I(X,et,dt){var q=h.exec(et.slice(dt));return q?(X.w=f[q[0].toLowerCase()],dt+q[0].length):-1}function L(X,et,dt){var q=y.exec(et.slice(dt));return q?(X.m=x[q[0].toLowerCase()],dt+q[0].length):-1}function R(X,et,dt){var q=g.exec(et.slice(dt));return q?(X.m=_[q[0].toLowerCase()],dt+q[0].length):-1}function F(X,et,dt){return O(X,t,et,dt)}function z(X,et,dt){return O(X,r,et,dt)}function U(X,et,dt){return O(X,n,et,dt)}function W(X){return a[X.getDay()]}function Z(X){return o[X.getDay()]}function rt(X){return l[X.getMonth()]}function ot(X){return s[X.getMonth()]}function st(X){return i[+(X.getHours()>=12)]}function St(X){return 1+~~(X.getMonth()/3)}function bt(X){return a[X.getUTCDay()]}function Mt(X){return o[X.getUTCDay()]}function lt(X){return l[X.getUTCMonth()]}function Kt(X){return s[X.getUTCMonth()]}function _t(X){return i[+(X.getUTCHours()>=12)]}function ct(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var et=P(X+="",b);return et.toString=function(){return X},et},parse:function(X){var et=k(X+="",!1);return et.toString=function(){return X},et},utcFormat:function(X){var et=P(X+="",S);return et.toString=function(){return X},et},utcParse:function(X){var et=k(X+="",!0);return et.toString=function(){return X},et}}}function Gr(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function AIe(e){return e.replace(CIe,"\\$&")}function vC(e){return new RegExp("^(?:"+e.map(AIe).join("|")+")","i")}function xC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function PIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function IIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function LIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function kIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function RIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function jOt(e,t,r){var n=To.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function XOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function NIe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function DIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function OIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function $Ot(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zIe(e,t,r){var n=To.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function KOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function FIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function BIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function HIe(e,t,r){var n=To.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function VIe(e,t,r){var n=To.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function UIe(e,t,r){var n=TIe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function qIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function GIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ZOt(e,t){return Gr(e.getDate(),t,2)}function WIe(e,t){return Gr(e.getHours(),t,2)}function YIe(e,t){return Gr(e.getHours()%12||12,t,2)}function jIe(e,t){return Gr(1+yw.count(sd(e),e),t,3)}function r7t(e,t){return Gr(e.getMilliseconds(),t,3)}function XIe(e,t){return r7t(e,t)+"000"}function $Ie(e,t){return Gr(e.getMonth()+1,t,2)}function KIe(e,t){return Gr(e.getMinutes(),t,2)}function ZIe(e,t){return Gr(e.getSeconds(),t,2)}function JIe(e){var t=e.getDay();return t===0?7:t}function QIe(e,t){return Gr(lv.count(sd(e)-1,e),t,2)}function n7t(e){var t=e.getDay();return t>=4||t===0?Rg(e):Rg.ceil(e)}function t9e(e,t){return e=n7t(e),Gr(Rg.count(sd(e),e)+(sd(e).getDay()===4),t,2)}function e9e(e){return e.getDay()}function r9e(e,t){return Gr(vw.count(sd(e)-1,e),t,2)}function n9e(e,t){return Gr(e.getFullYear()%100,t,2)}function i9e(e,t){return e=n7t(e),Gr(e.getFullYear()%100,t,2)}function o9e(e,t){return Gr(e.getFullYear()%1e4,t,4)}function a9e(e,t){var r=e.getDay();return e=r>=4||r===0?Rg(e):Rg.ceil(e),Gr(e.getFullYear()%1e4,t,4)}function s9e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gr(t/60|0,"0",2)+Gr(t%60,"0",2)}function JOt(e,t){return Gr(e.getUTCDate(),t,2)}function l9e(e,t){return Gr(e.getUTCHours(),t,2)}function c9e(e,t){return Gr(e.getUTCHours()%12||12,t,2)}function u9e(e,t){return Gr(1+xw.count(ld(e),e),t,3)}function i7t(e,t){return Gr(e.getUTCMilliseconds(),t,3)}function h9e(e,t){return i7t(e,t)+"000"}function f9e(e,t){return Gr(e.getUTCMonth()+1,t,2)}function p9e(e,t){return Gr(e.getUTCMinutes(),t,2)}function d9e(e,t){return Gr(e.getUTCSeconds(),t,2)}function m9e(e){var t=e.getUTCDay();return t===0?7:t}function g9e(e,t){return Gr(uv.count(ld(e)-1,e),t,2)}function o7t(e){var t=e.getUTCDay();return t>=4||t===0?Ng(e):Ng.ceil(e)}function _9e(e,t){return e=o7t(e),Gr(Ng.count(ld(e),e)+(ld(e).getUTCDay()===4),t,2)}function y9e(e){return e.getUTCDay()}function v9e(e,t){return Gr(bw.count(ld(e)-1,e),t,2)}function x9e(e,t){return Gr(e.getUTCFullYear()%100,t,2)}function b9e(e,t){return e=o7t(e),Gr(e.getUTCFullYear()%100,t,2)}function w9e(e,t){return Gr(e.getUTCFullYear()%1e4,t,4)}function S9e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ng(e):Ng.ceil(e),Gr(e.getUTCFullYear()%1e4,t,4)}function M9e(){return"+0000"}function QOt(){return"%"}function t7t(e){return+e}function e7t(e){return Math.floor(+e/1e3)}var YOt,To,TIe,CIe,a7t=M(()=>{JO();YOt={"-":"",_:" ",0:"0"},To=/^\s*\d+/,TIe=/^%/,CIe=/[\\^$*+?|[\]().{}]/g});function cet(e){return ww=set(e),QO=ww.format,s7t=ww.parse,t7=ww.utcFormat,l7t=ww.utcParse,ww}var ww,QO,s7t,t7,l7t,c7t=M(()=>{a7t();cet({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var uet=M(()=>{c7t()});function T9e(e){return new Date(e)}function C9e(e){return e instanceof Date?+e:+new Date(+e)}function e7(e,t,r,n,i,o,a,s,l){var c=od(pC,vf),u=c.invert,h=c.domain,f=l(".%L"),p=l(":%S"),d=l("%I:%M"),g=l("%I %p"),_=l("%a %d"),y=l("%b %d"),x=l("%B"),b=l("%Y"),S=[[a,1,bC],[a,5,5*bC],[a,15,15*bC],[a,30,30*bC],[o,1,wC],[o,5,5*wC],[o,15,15*wC],[o,30,30*wC],[i,1,SC],[i,3,3*SC],[i,6,6*SC],[i,12,12*SC],[n,1,MC],[n,2,2*MC],[r,1,E9e],[t,1,u7t],[t,3,3*u7t],[e,1,het]];function C(k){return(a(k)<k?f:o(k)<k?p:i(k)<k?d:n(k)<k?g:t(k)<k?r(k)<k?_:y:e(k)<k?x:b)(k)}function P(k,O,D,B){if(k==null&&(k=10),typeof k=="number"){var I=Math.abs(D-O)/k,L=aC(function(R){return R[2]}).right(S,I);L===S.length?(B=Jy(O/het,D/het,k),k=e):L?(L=S[I/S[L-1][2]<S[L][2]/I?L-1:L],B=L[1],k=L[0]):(B=Math.max(Jy(O,D,k),1),k=s)}return B==null?k:k.every(B)}return c.invert=function(k){return new Date(u(k))},c.domain=function(k){return arguments.length?h(rw.call(k,C9e)):h().map(T9e)},c.ticks=function(k,O){var D=h(),B=D[0],I=D[D.length-1],L=I<B,R;return L&&(R=B,B=I,I=R),R=P(k,B,I,O),R=R?R.range(B,I+1):[],L?R.reverse():R},c.tickFormat=function(k,O){return O==null?C:l(O)},c.nice=function(k,O){var D=h();return(k=P(k,D[0],D[D.length-1],O))?h(GO(D,k)):c},c.copy=function(){return Lg(c,e7(e,t,r,n,i,o,a,s,l))},c}function h7t(){return e7(sd,Qtt,lv,yw,Jtt,Ztt,_w,mw,QO).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}var bC,wC,SC,MC,E9e,u7t,het,fet=M(()=>{gf();uw();JO();uet();Ag();dC();Xtt();bC=1e3,wC=bC*60,SC=wC*60,MC=SC*24,E9e=MC*7,u7t=MC*30,het=MC*365});function f7t(){return e7(ld,net,uv,xw,ret,eet,_w,mw,t7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}var p7t=M(()=>{fet();uet();JO()});function ml(e){return e.match(/.{6}/g).map(function(t){return"#"+t})}var Sw=M(()=>{});var d7t,m7t=M(()=>{Sw();d7t=ml("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")});var g7t,_7t=M(()=>{Sw();g7t=ml("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")});var y7t,v7t=M(()=>{Sw();y7t=ml("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")});var x7t,b7t=M(()=>{Sw();x7t=ml("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")});var w7t,S7t=M(()=>{sw();uw();w7t=cw(Ka(300,.5,0),Ka(-240,.5,1))});function T7t(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return r7.h=360*e-100,r7.s=1.5-1.5*t,r7.l=.8-.9*t,r7+""}var M7t,E7t,r7,C7t=M(()=>{sw();uw();M7t=cw(Ka(-100,.75,.35),Ka(80,1.5,.8)),E7t=cw(Ka(260,.75,.35),Ka(80,1.5,.8)),r7=Ka()});function n7(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var A7t,P7t,I7t,L7t,k7t=M(()=>{Sw();A7t=n7(ml("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),P7t=n7(ml("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),I7t=n7(ml("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),L7t=n7(ml("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))});function i7(e){var t=0,r=1,n=!1;function i(o){var a=(o-t)/(r-t);return e(n?Math.max(0,Math.min(1,a)):a)}return i.domain=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.clamp=function(o){return arguments.length?(n=!!o,i):n},i.interpolator=function(o){return arguments.length?(e=o,i):e},i.copy=function(){return i7(e).domain([t,r]).clamp(n)},ad(i)}var R7t=M(()=>{pw()});var N7t=M(()=>{jNt();eOt();pw();oOt();xtt();sOt();lOt();cOt();uOt();fet();p7t();m7t();_7t();v7t();b7t();S7t();C7t();k7t();R7t()});var o7,EC,a7=M(()=>{o7="http://www.w3.org/1999/xhtml",EC={svg:"http://www.w3.org/2000/svg",xhtml:o7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Mw(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),EC.hasOwnProperty(t)?{space:EC[t],local:e}:e}var s7=M(()=>{a7()});function A9e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===o7&&t.documentElement.namespaceURI===o7?t.createElement(e):t.createElementNS(r,e)}}function P9e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dg(e){var t=Mw(e);return(t.local?P9e:A9e)(t)}var TC=M(()=>{s7();a7()});function I9e(){}function Ew(e){return e==null?I9e:function(){return this.querySelector(e)}}var l7=M(()=>{});function D7t(e){typeof e!="function"&&(e=Ew(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Hn(n,this._parents)}var O7t=M(()=>{Sc();l7()});function L9e(){return[]}function c7(e){return e==null?L9e:function(){return this.querySelectorAll(e)}}var pet=M(()=>{});function z7t(e){typeof e!="function"&&(e=c7(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new Hn(n,i)}var F7t=M(()=>{Sc();pet()});var H7t,Tw,B7t,u7,det=M(()=>{H7t=function(e){return function(){return this.matches(e)}};typeof document!="undefined"&&(Tw=document.documentElement,Tw.matches||(B7t=Tw.webkitMatchesSelector||Tw.msMatchesSelector||Tw.mozMatchesSelector||Tw.oMatchesSelector,H7t=function(e){return function(){return B7t.call(this,e)}}));u7=H7t});function V7t(e){typeof e!="function"&&(e=u7(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Hn(n,this._parents)}var U7t=M(()=>{Sc();det()});function h7(e){return new Array(e.length)}var met=M(()=>{});function q7t(){return new Hn(this._enter||this._groups.map(h7),this._parents)}function CC(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var get=M(()=>{met();Sc();CC.prototype={constructor:CC,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function G7t(e){return function(){return e}}var W7t=M(()=>{});function k9e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new CC(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function R9e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=Y7t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=Y7t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new CC(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function j7t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?R9e:k9e,n=this._parents,i=this._groups;typeof e!="function"&&(e=G7t(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new Hn(a,n),a._enter=s,a._exit=l,a}var Y7t,X7t=M(()=>{Sc();get();W7t();Y7t="$"});function $7t(){return new Hn(this._exit||this._groups.map(h7),this._parents)}var K7t=M(()=>{met();Sc()});function Z7t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Hn(a,this._parents)}var J7t=M(()=>{Sc()});function Q7t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&o!==a.nextSibling&&o.parentNode.insertBefore(a,o),o=a);return this}var tzt=M(()=>{});function ezt(e){e||(e=N9e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Hn(i,this._parents).order()}function N9e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var rzt=M(()=>{Sc()});function nzt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var izt=M(()=>{});function ozt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var azt=M(()=>{});function szt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var lzt=M(()=>{});function czt(){var e=0;return this.each(function(){++e}),e}var uzt=M(()=>{});function hzt(){return!this.node()}var fzt=M(()=>{});function pzt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var dzt=M(()=>{});function D9e(e){return function(){this.removeAttribute(e)}}function O9e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function z9e(e,t){return function(){this.setAttribute(e,t)}}function F9e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function B9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function H9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function mzt(e,t){var r=Mw(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?O9e:D9e:typeof t=="function"?r.local?H9e:B9e:r.local?F9e:z9e)(r,t))}var gzt=M(()=>{s7()});function Cw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var f7=M(()=>{});function V9e(e){return function(){this.style.removeProperty(e)}}function U9e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function q9e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function _zt(e,t,r){return arguments.length>1?this.each((t==null?V9e:typeof t=="function"?q9e:U9e)(e,t,r==null?"":r)):_et(this.node(),e)}function _et(e,t){return e.style.getPropertyValue(t)||Cw(e).getComputedStyle(e,null).getPropertyValue(t)}var yet=M(()=>{f7()});function G9e(e){return function(){delete this[e]}}function W9e(e,t){return function(){this[e]=t}}function Y9e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function yzt(e,t){return arguments.length>1?this.each((t==null?G9e:typeof t=="function"?Y9e:W9e)(e,t)):this.node()[e]}var vzt=M(()=>{});function xzt(e){return e.trim().split(/^|\s+/)}function vet(e){return e.classList||new bzt(e)}function bzt(e){this._node=e,this._names=xzt(e.getAttribute("class")||"")}function wzt(e,t){for(var r=vet(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Szt(e,t){for(var r=vet(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function j9e(e){return function(){wzt(this,e)}}function X9e(e){return function(){Szt(this,e)}}function $9e(e,t){return function(){(t.apply(this,arguments)?wzt:Szt)(this,e)}}function Mzt(e,t){var r=xzt(e+"");if(arguments.length<2){for(var n=vet(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?$9e:t?j9e:X9e)(r,t))}var Ezt=M(()=>{bzt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function K9e(){this.textContent=""}function Z9e(e){return function(){this.textContent=e}}function J9e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function Tzt(e){return arguments.length?this.each(e==null?K9e:(typeof e=="function"?J9e:Z9e)(e)):this.node().textContent}var Czt=M(()=>{});function Q9e(){this.innerHTML=""}function tLe(e){return function(){this.innerHTML=e}}function eLe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Azt(e){return arguments.length?this.each(e==null?Q9e:(typeof e=="function"?eLe:tLe)(e)):this.node().innerHTML}var Pzt=M(()=>{});function rLe(){this.nextSibling&&this.parentNode.appendChild(this)}function Izt(){return this.each(rLe)}var Lzt=M(()=>{});function nLe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kzt(){return this.each(nLe)}var Rzt=M(()=>{});function Nzt(e){var t=typeof e=="function"?e:Dg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var Dzt=M(()=>{TC()});function iLe(){return null}function Ozt(e,t){var r=typeof e=="function"?e:Dg(e),n=t==null?iLe:typeof t=="function"?t:Ew(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var zzt=M(()=>{TC();l7()});function oLe(){var e=this.parentNode;e&&e.removeChild(this)}function Fzt(){return this.each(oLe)}var Bzt=M(()=>{});function aLe(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function sLe(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function Hzt(e){return this.select(e?sLe:aLe)}var Vzt=M(()=>{});function Uzt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var qzt=M(()=>{});function lLe(e,t,r){return e=Yzt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function Yzt(e,t,r){return function(n){var i=Pu;Pu=n;try{e.call(this,this.__data__,t,r)}finally{Pu=i}}}function cLe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function uLe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function hLe(e,t,r){var n=Wzt.hasOwnProperty(e.type)?lLe:Yzt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function jzt(e,t,r){var n=cLe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?hLe:uLe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Xzt(e,t,r,n){var i=Pu;e.sourceEvent=Pu,Pu=e;try{return t.apply(r,n)}finally{Pu=i}}var Wzt,Pu,Gzt,p7=M(()=>{Wzt={},Pu=null;typeof document!="undefined"&&(Gzt=document.documentElement,"onmouseenter"in Gzt||(Wzt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function $zt(e,t,r){var n=Cw(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function fLe(e,t){return function(){return $zt(this,e,t)}}function pLe(e,t){return function(){return $zt(this,e,t.apply(this,arguments))}}function Kzt(e,t){return this.each((typeof t=="function"?pLe:fLe)(e,t))}var Zzt=M(()=>{f7()});function Hn(e,t){this._groups=e,this._parents=t}function Jzt(){return new Hn([[document.documentElement]],AC)}var AC,Qzt,Sc=M(()=>{O7t();F7t();U7t();X7t();get();K7t();J7t();tzt();rzt();izt();azt();lzt();uzt();fzt();dzt();gzt();yet();vzt();Ezt();Czt();Pzt();Lzt();Rzt();Dzt();zzt();Bzt();Vzt();qzt();p7();Zzt();AC=[null];Hn.prototype=Jzt.prototype={constructor:Hn,select:D7t,selectAll:z7t,filter:V7t,data:j7t,enter:q7t,exit:$7t,merge:Z7t,order:Q7t,sort:ezt,call:nzt,nodes:ozt,node:szt,size:czt,empty:hzt,each:pzt,attr:mzt,style:_zt,property:yzt,classed:Mzt,text:Tzt,html:Azt,raise:Izt,lower:kzt,append:Nzt,insert:Ozt,remove:Fzt,clone:Hzt,datum:Uzt,on:jzt,dispatch:Kzt};Qzt=Jzt});function d7(e){return typeof e=="string"?new Hn([[document.querySelector(e)]],[document.documentElement]):new Hn([[e]],AC)}var xet=M(()=>{Sc()});function tFt(e){return d7(Dg(e).call(document.documentElement))}var eFt=M(()=>{TC();xet()});function m7(){return new bet}function bet(){this._="@"+(++dLe).toString(36)}var dLe,rFt=M(()=>{dLe=0;bet.prototype=m7.prototype={constructor:bet,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}}});function Aw(){for(var e=Pu,t;t=e.sourceEvent;)e=t;return e}var g7=M(()=>{p7()});function Og(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var PC=M(()=>{});function nFt(e){var t=Aw();return t.changedTouches&&(t=t.changedTouches[0]),Og(e,t)}var iFt=M(()=>{g7();PC()});function oFt(e){return typeof e=="string"?new Hn([document.querySelectorAll(e)],[document.documentElement]):new Hn([e==null?[]:e],AC)}var aFt=M(()=>{Sc()});function sFt(e,t,r){arguments.length<3&&(r=t,t=Aw().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Og(e,o);return null}var lFt=M(()=>{g7();PC()});function cFt(e,t){t==null&&(t=Aw().touches);for(var r=0,n=t?t.length:0,i=new Array(n);r<n;++r)i[r]=Og(e,t[r]);return i}var uFt=M(()=>{g7();PC()});var hFt=M(()=>{eFt();TC();rFt();det();iFt();s7();a7();PC();xet();aFt();Sc();l7();pet();yet();lFt();uFt();f7();p7()});function Eet(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function fFt(){return new Eet}var wet,Met,hv,mLe,Iu,pFt=M(()=>{wet=Math.PI,Met=2*wet,hv=1e-6,mLe=Met-hv;Eet.prototype=fFt.prototype={constructor:Eet,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>hv)if(!(Math.abs(u*s-l*c)>hv)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((wet-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>hv&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>hv||Math.abs(this._y1-c)>hv)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%Met+Met),h>mLe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>hv&&(this._+="A"+r+","+r+",0,"+ +(h>=wet)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};Iu=fFt});var Pw=M(()=>{pFt()});function Ge(e){return function(){return e}}var zg=M(()=>{});function mFt(e){return e>1?0:e<-1?ku:Math.acos(e)}function Cet(e){return e>=1?IC:e<=-1?-IC:Math.asin(e)}var Tet,Ho,Fg,dFt,_7,Lu,fv,Co,ku,IC,Mc,Iw=M(()=>{Tet=Math.abs,Ho=Math.atan2,Fg=Math.cos,dFt=Math.max,_7=Math.min,Lu=Math.sin,fv=Math.sqrt,Co=1e-12,ku=Math.PI,IC=ku/2,Mc=2*ku});function gLe(e){return e.innerRadius}function _Le(e){return e.outerRadius}function yLe(e){return e.startAngle}function vLe(e){return e.endAngle}function xLe(e){return e&&e.padAngle}function bLe(e,t,r,n,i,o,a,s){var l=r-e,c=n-t,u=a-i,h=s-o,f=(u*(t-o)-h*(e-i))/(h*l-u*c);return[e+f*l,t+f*c]}function y7(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/fv(s*s+l*l),u=c*l,h=-c*s,f=e+u,p=t+h,d=r+u,g=n+h,_=(f+d)/2,y=(p+g)/2,x=d-f,b=g-p,S=x*x+b*b,C=i-o,P=f*g-d*p,k=(b<0?-1:1)*fv(dFt(0,C*C*S-P*P)),O=(P*b-x*k)/S,D=(-P*x-b*k)/S,B=(P*b+x*k)/S,I=(-P*x+b*k)/S,L=O-_,R=D-y,F=B-_,z=I-y;return L*L+R*R>F*F+z*z&&(O=B,D=I),{cx:O,cy:D,x01:-u,y01:-h,x11:O*(i/C-1),y11:D*(i/C-1)}}function gFt(){var e=gLe,t=_Le,r=Ge(0),n=null,i=yLe,o=vLe,a=xLe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-IC,d=o.apply(this,arguments)-IC,g=Tet(d-p),_=d>p;if(s||(s=c=Iu()),f<h&&(u=f,f=h,h=u),!(f>Co))s.moveTo(0,0);else if(g>Mc-Co)s.moveTo(f*Fg(p),f*Lu(p)),s.arc(0,0,f,p,d,!_),h>Co&&(s.moveTo(h*Fg(d),h*Lu(d)),s.arc(0,0,h,d,p,_));else{var y=p,x=d,b=p,S=d,C=g,P=g,k=a.apply(this,arguments)/2,O=k>Co&&(n?+n.apply(this,arguments):fv(h*h+f*f)),D=_7(Tet(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>Co){var F=Cet(O/h*Lu(k)),z=Cet(O/f*Lu(k));(C-=F*2)>Co?(F*=_?1:-1,b+=F,S-=F):(C=0,b=S=(p+d)/2),(P-=z*2)>Co?(z*=_?1:-1,y+=z,x-=z):(P=0,y=x=(p+d)/2)}var U=f*Fg(y),W=f*Lu(y),Z=h*Fg(S),rt=h*Lu(S);if(D>Co){var ot=f*Fg(x),st=f*Lu(x),St=h*Fg(b),bt=h*Lu(b);if(g<ku){var Mt=C>Co?bLe(U,W,St,bt,ot,st,Z,rt):[Z,rt],lt=U-Mt[0],Kt=W-Mt[1],_t=ot-Mt[0],ct=st-Mt[1],X=1/Lu(mFt((lt*_t+Kt*ct)/(fv(lt*lt+Kt*Kt)*fv(_t*_t+ct*ct)))/2),et=fv(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=_7(D,(h-et)/(X-1)),I=_7(D,(f-et)/(X+1))}}P>Co?I>Co?(L=y7(St,bt,U,W,f,I,_),R=y7(ot,st,Z,rt,f,I,_),s.moveTo(L.cx+L.x01,L.cy+L.y01),I<D?s.arc(L.cx,L.cy,I,Ho(L.y01,L.x01),Ho(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,I,Ho(L.y01,L.x01),Ho(L.y11,L.x11),!_),s.arc(0,0,f,Ho(L.cy+L.y11,L.cx+L.x11),Ho(R.cy+R.y11,R.cx+R.x11),!_),s.arc(R.cx,R.cy,I,Ho(R.y11,R.x11),Ho(R.y01,R.x01),!_))):(s.moveTo(U,W),s.arc(0,0,f,y,x,!_)):s.moveTo(U,W),!(h>Co)||!(C>Co)?s.lineTo(Z,rt):B>Co?(L=y7(Z,rt,ot,st,h,-B,_),R=y7(U,W,St,bt,h,-B,_),s.lineTo(L.cx+L.x01,L.cy+L.y01),B<D?s.arc(L.cx,L.cy,B,Ho(L.y01,L.x01),Ho(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,B,Ho(L.y01,L.x01),Ho(L.y11,L.x11),!_),s.arc(0,0,h,Ho(L.cy+L.y11,L.cx+L.x11),Ho(R.cy+R.y11,R.cx+R.x11),_),s.arc(R.cx,R.cy,B,Ho(R.y11,R.x11),Ho(R.y01,R.x01),!_))):s.arc(0,0,h,S,b,_)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ku/2;return[Fg(u)*c,Lu(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Ge(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Ge(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Ge(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ge(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Ge(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Ge(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Ge(+c),l):a},l.context=function(c){return arguments.length?(s=c==null?null:c,l):s},l}var _Ft=M(()=>{Pw();zg();Iw()});function yFt(e){this._context=e}function Bg(e){return new yFt(e)}var LC=M(()=>{yFt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}}});function Lw(e){return e[0]}function kw(e){return e[1]}var v7=M(()=>{});function Rw(){var e=Lw,t=kw,r=Ge(!0),n=null,i=Bg,o=null;function a(s){var l,c=s.length,u,h=!1,f;for(n==null&&(o=i(f=Iu())),l=0;l<=c;++l)!(l<c&&r(u=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(u,l,s),+t(u,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:Ge(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Ge(+s),a):t},a.defined=function(s){return arguments.length?(r=typeof s=="function"?s:Ge(!!s),a):r},a.curve=function(s){return arguments.length?(i=s,n!=null&&(o=i(n)),a):i},a.context=function(s){return arguments.length?(s==null?n=o=null:o=i(n=s),a):n},a}var x7=M(()=>{Pw();zg();LC();v7()});function b7(){var e=Lw,t=null,r=Ge(0),n=kw,i=Ge(!0),o=null,a=Bg,s=null;function l(u){var h,f,p,d=u.length,g,_=!1,y,x=new Array(d),b=new Array(d);for(o==null&&(s=a(y=Iu())),h=0;h<=d;++h){if(!(h<d&&i(g=u[h],h,u))===_)if(_=!_)f=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=h-1;p>=f;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}_&&(x[h]=+e(g,h,u),b[h]=+r(g,h,u),s.point(t?+t(g,h,u):x[h],n?+n(g,h,u):b[h]))}if(y)return s=null,y+""||null}function c(){return Rw().defined(i).curve(a).context(o)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:Ge(+u),l):t},l.y=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),n=null,l):r},l.y0=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),l):r},l.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ge(+u),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(r)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(t).y(r)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Ge(!!u),l):i},l.curve=function(u){return arguments.length?(a=u,o!=null&&(s=a(o)),l):a},l.context=function(u){return arguments.length?(u==null?o=s=null:s=a(o=u),l):o},l}var Aet=M(()=>{Pw();zg();LC();x7();v7()});function vFt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var xFt=M(()=>{});function bFt(e){return e}var wFt=M(()=>{});function SFt(){var e=bFt,t=vFt,r=null,n=Ge(0),i=Ge(Mc),o=Ge(0);function a(s){var l,c=s.length,u,h,f=0,p=new Array(c),d=new Array(c),g=+n.apply(this,arguments),_=Math.min(Mc,Math.max(-Mc,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(_)/c,o.apply(this,arguments)),b=x*(_<0?-1:1),S;for(l=0;l<c;++l)(S=d[p[l]=l]=+e(s[l],l,s))>0&&(f+=S);for(t!=null?p.sort(function(C,P){return t(d[C],d[P])}):r!=null&&p.sort(function(C,P){return r(s[C],s[P])}),l=0,h=f?(_-c*b)/f:0;l<c;++l,g=y)u=p[l],S=d[u],y=g+(S>0?S*h:0)+b,d[u]={data:s[u],index:l,value:S,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:Ge(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Ge(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ge(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:Ge(+s),a):o},a}var MFt=M(()=>{zg();xFt();wFt();Iw()});function EFt(e){this._curve=e}function Nw(e){function t(r){return new EFt(e(r))}return t._curve=e,t}var w7,Pet=M(()=>{LC();w7=Nw(Bg);EFt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}}});function Dw(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Nw(r)):t()._curve},e}function Iet(){return Dw(Rw().curve(w7))}var Let=M(()=>{Pet();x7()});function ket(){var e=b7().curve(w7),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Dw(r())},delete e.lineX0,e.lineEndAngle=function(){return Dw(n())},delete e.lineX1,e.lineInnerRadius=function(){return Dw(i())},delete e.lineY0,e.lineOuterRadius=function(){return Dw(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Nw(a)):t()._curve},e}var TFt=M(()=>{Pet();Aet();Let()});function pv(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Ret=M(()=>{});var kC,Net=M(()=>{kC=Array.prototype.slice});function wLe(e){return e.source}function SLe(e){return e.target}function Det(e){var t=wLe,r=SLe,n=Lw,i=kw,o=null;function a(){var s,l=kC.call(arguments),c=t.apply(this,l),u=r.apply(this,l);if(o||(o=s=Iu()),e(o,+n.apply(this,(l[0]=c,l)),+i.apply(this,l),+n.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(r=s,a):r},a.x=function(s){return arguments.length?(n=typeof s=="function"?s:Ge(+s),a):n},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:Ge(+s),a):i},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}function MLe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function ELe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function TLe(e,t,r,n,i){var o=pv(t,r),a=pv(t,r=(r+i)/2),s=pv(n,r),l=pv(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function CFt(){return Det(MLe)}function AFt(){return Det(ELe)}function PFt(){var e=Det(TLe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var IFt=M(()=>{Pw();Net();zg();v7();Ret()});var RC,Oet=M(()=>{Iw();RC={draw:function(e,t){var r=Math.sqrt(t/ku);e.moveTo(r,0),e.arc(0,0,r,0,Mc)}}});var S7,zet=M(()=>{S7={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}}});var LFt,CLe,M7,Fet=M(()=>{LFt=Math.sqrt(.3333333333333333),CLe=LFt*2,M7={draw:function(e,t){var r=Math.sqrt(t/CLe),n=r*LFt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}}});var ALe,kFt,PLe,ILe,E7,Bet=M(()=>{Iw();ALe=.8908130915292852,kFt=Math.sin(ku/10)/Math.sin(7*ku/10),PLe=Math.sin(Mc/10)*kFt,ILe=-Math.cos(Mc/10)*kFt,E7={draw:function(e,t){var r=Math.sqrt(t*ALe),n=PLe*r,i=ILe*r;e.moveTo(0,-r),e.lineTo(n,i);for(var o=1;o<5;++o){var a=Mc*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}}});var T7,Het=M(()=>{T7={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}}});var Vet,C7,Uet=M(()=>{Vet=Math.sqrt(3),C7={draw:function(e,t){var r=-Math.sqrt(t/(Vet*3));e.moveTo(0,r*2),e.lineTo(-Vet*r,-r),e.lineTo(Vet*r,-r),e.closePath()}}});var Ec,Tc,qet,LLe,A7,Get=M(()=>{Ec=-.5,Tc=Math.sqrt(3)/2,qet=1/Math.sqrt(12),LLe=(qet/2+1)*3,A7={draw:function(e,t){var r=Math.sqrt(t/LLe),n=r/2,i=r*qet,o=n,a=r*qet+r,s=-o,l=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Ec*n-Tc*i,Tc*n+Ec*i),e.lineTo(Ec*o-Tc*a,Tc*o+Ec*a),e.lineTo(Ec*s-Tc*l,Tc*s+Ec*l),e.lineTo(Ec*n+Tc*i,Ec*i-Tc*n),e.lineTo(Ec*o+Tc*a,Ec*a-Tc*o),e.lineTo(Ec*s+Tc*l,Ec*l-Tc*s),e.closePath()}}});function NFt(){var e=Ge(RC),t=Ge(64),r=null;function n(){var i;if(r||(r=i=Iu()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ge(i),n):e},n.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ge(+i),n):t},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}var RFt,DFt=M(()=>{Pw();Oet();zet();Fet();Bet();Het();Uet();Get();zg();RFt=[RC,S7,M7,T7,E7,C7,A7]});function Cc(){}var NC=M(()=>{});function Ow(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function DC(e){this._context=e}function OFt(e){return new DC(e)}var OC=M(()=>{DC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ow(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function zFt(e){this._context=e}function FFt(e){return new zFt(e)}var BFt=M(()=>{NC();OC();zFt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function HFt(e){this._context=e}function VFt(e){return new HFt(e)}var UFt=M(()=>{OC();HFt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function qFt(e,t){this._basis=new DC(e),this._beta=t}var GFt,WFt=M(()=>{OC();qFt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,a=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};GFt=function e(t){function r(n){return t===1?new DC(n):new qFt(n,t)}return r.beta=function(n){return e(+n)},r}(.85)});function zw(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function P7(e,t){this._context=e,this._k=(1-t)/6}var YFt,zC=M(()=>{P7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:zw(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};YFt=function e(t){function r(n){return new P7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function I7(e,t){this._context=e,this._k=(1-t)/6}var jFt,Wet=M(()=>{NC();zC();I7.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};jFt=function e(t){function r(n){return new I7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function L7(e,t){this._context=e,this._k=(1-t)/6}var XFt,Yet=M(()=>{zC();L7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};XFt=function e(t){function r(n){return new L7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function FC(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Co){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Co){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function $Ft(e,t){this._context=e,this._alpha=t}var KFt,k7=M(()=>{Iw();zC();$Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};KFt=function e(t){function r(n){return t?new $Ft(n,t):new P7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function ZFt(e,t){this._context=e,this._alpha=t}var JFt,QFt=M(()=>{Wet();NC();k7();ZFt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};JFt=function e(t){function r(n){return t?new ZFt(n,t):new I7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function tBt(e,t){this._context=e,this._alpha=t}var eBt,rBt=M(()=>{Yet();k7();tBt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};eBt=function e(t){function r(n){return t?new tBt(n,t):new L7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function nBt(e){this._context=e}function iBt(e){return new nBt(e)}var oBt=M(()=>{NC();nBt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}});function aBt(e){return e<0?-1:1}function sBt(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(aBt(o)+aBt(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function lBt(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function jet(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function R7(e){this._context=e}function cBt(e){this._context=new uBt(e)}function uBt(e){this._context=e}function hBt(e){return new R7(e)}function fBt(e){return new cBt(e)}var pBt=M(()=>{R7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:jet(this,this._t0,lBt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,jet(this,lBt(this,r=sBt(this,e,t)),r);break;default:jet(this,this._t0,r=sBt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};(cBt.prototype=Object.create(R7.prototype)).point=function(e,t){R7.prototype.point.call(this,t,e)};uBt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}}});function mBt(e){this._context=e}function dBt(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function gBt(e){return new mBt(e)}var _Bt=M(()=>{mBt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=dBt(e),i=dBt(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}});function N7(e,t){this._context=e,this._t=t}function yBt(e){return new N7(e,.5)}function vBt(e){return new N7(e,0)}function xBt(e){return new N7(e,1)}var bBt=M(()=>{N7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}}});function Ru(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,s=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}var Fw=M(()=>{});function Nu(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}var Bw=M(()=>{});function kLe(e,t){return e[t]}function wBt(){var e=Ge([]),t=Nu,r=Ru,n=kLe;function i(o){var a=e.apply(this,arguments),s,l=o.length,c=a.length,u=new Array(c),h;for(s=0;s<c;++s){for(var f=a[s],p=u[s]=new Array(l),d=0,g;d<l;++d)p[d]=g=[0,+n(o[d],f,d,o)],g.data=o[d];p.key=f}for(s=0,h=t(u);s<c;++s)u[h[s]].index=s;return r(u,h),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ge(kC.call(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ge(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Nu:typeof o=="function"?o:Ge(kC.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?Ru:o,i):r},i}var SBt=M(()=>{Net();zg();Fw();Bw()});function MBt(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}Ru(e,t)}}var EBt=M(()=>{Fw()});function TBt(e,t){if((l=e.length)>1)for(var r,n=0,i,o,a,s,l,c=e[t[0]].length;n<c;++n)for(a=s=0,r=0;r<l;++r)(o=(i=e[t[r]][n])[1]-i[0])>=0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):i[0]=a}var CBt=M(()=>{});function ABt(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,s=0;a<i;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}Ru(e,t)}}var PBt=M(()=>{Fw()});function IBt(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],h=u[n][1]||0,f=u[n-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=e[t[d]],_=g[n][1]||0,y=g[n-1][1]||0;p+=_-y}l+=h,c+=p*h}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,Ru(e,t)}}var LBt=M(()=>{Fw()});function D7(e){var t=e.map(Xet);return Nu(e).sort(function(r,n){return t[r]-t[n]})}function Xet(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}var O7=M(()=>{Bw()});function kBt(e){return D7(e).reverse()}var RBt=M(()=>{O7()});function NBt(e){var t=e.length,r,n,i=e.map(Xet),o=Nu(e).sort(function(u,h){return i[h]-i[u]}),a=0,s=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}var DBt=M(()=>{Bw();O7()});function OBt(e){return Nu(e).reverse()}var zBt=M(()=>{Bw()});var FBt=M(()=>{_Ft();Aet();x7();MFt();TFt();Let();Ret();IFt();DFt();Oet();zet();Fet();Het();Bet();Uet();Get();BFt();UFt();OC();WFt();Wet();Yet();zC();QFt();rBt();k7();oBt();LC();pBt();_Bt();bBt();SBt();EBt();CBt();Fw();PBt();LBt();O7();RBt();DBt();Bw();zBt()});function Sr(e,t,r,n){function i(o){return e(o=new Date(+o)),o}return i.floor=i,i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Sr(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return $et.setTime(+o),Ket.setTime(+a),e($et),e(Ket),Math.floor(r($et,Ket))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var $et,Ket,pa=M(()=>{$et=new Date,Ket=new Date});var z7,Zet,Jet,BBt=M(()=>{pa();z7=Sr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});z7.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Sr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):z7};Zet=z7,Jet=z7.range});var BC,Is,wf,F7,B7,Sf=M(()=>{BC=1e3,Is=6e4,wf=36e5,F7=864e5,B7=6048e5});var HBt,Qet,trt,VBt=M(()=>{pa();Sf();HBt=Sr(function(e){e.setTime(Math.floor(e/BC)*BC)},function(e,t){e.setTime(+e+t*BC)},function(e,t){return(t-e)/BC},function(e){return e.getUTCSeconds()}),Qet=HBt,trt=HBt.range});var UBt,qBt,GBt,WBt=M(()=>{pa();Sf();UBt=Sr(function(e){e.setTime(Math.floor(e/Is)*Is)},function(e,t){e.setTime(+e+t*Is)},function(e,t){return(t-e)/Is},function(e){return e.getMinutes()}),qBt=UBt,GBt=UBt.range});var YBt,jBt,XBt,$Bt=M(()=>{pa();Sf();YBt=Sr(function(e){var t=e.getTimezoneOffset()*Is%wf;t<0&&(t+=wf),e.setTime(Math.floor((+e-t)/wf)*wf+t)},function(e,t){e.setTime(+e+t*wf)},function(e,t){return(t-e)/wf},function(e){return e.getHours()}),jBt=YBt,XBt=YBt.range});var KBt,ZBt,JBt,QBt=M(()=>{pa();Sf();KBt=Sr(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Is)/F7},function(e){return e.getDate()-1}),ZBt=KBt,JBt=KBt.range});function dv(e){return Sr(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Is)/B7})}var H7,ert,rrt,nrt,irt,ort,art,srt,tHt,eHt,rHt,nHt,iHt,oHt,aHt=M(()=>{pa();Sf();H7=dv(0),ert=dv(1),rrt=dv(2),nrt=dv(3),irt=dv(4),ort=dv(5),art=dv(6),srt=H7.range,tHt=ert.range,eHt=rrt.range,rHt=nrt.range,nHt=irt.range,iHt=ort.range,oHt=art.range});var sHt,lHt,cHt,uHt=M(()=>{pa();sHt=Sr(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),lHt=sHt,cHt=sHt.range});var lrt,hHt,fHt,pHt=M(()=>{pa();lrt=Sr(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});lrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Sr(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};hHt=lrt,fHt=lrt.range});var dHt,mHt,gHt,_Ht=M(()=>{pa();Sf();dHt=Sr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Is)},function(e,t){return(t-e)/Is},function(e){return e.getUTCMinutes()}),mHt=dHt,gHt=dHt.range});var yHt,vHt,xHt,bHt=M(()=>{pa();Sf();yHt=Sr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*wf)},function(e,t){return(t-e)/wf},function(e){return e.getUTCHours()}),vHt=yHt,xHt=yHt.range});var wHt,SHt,MHt,EHt=M(()=>{pa();Sf();wHt=Sr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/F7},function(e){return e.getUTCDate()-1}),SHt=wHt,MHt=wHt.range});function mv(e){return Sr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/B7})}var V7,crt,urt,hrt,frt,prt,drt,mrt,THt,CHt,AHt,PHt,IHt,LHt,kHt=M(()=>{pa();Sf();V7=mv(0),crt=mv(1),urt=mv(2),hrt=mv(3),frt=mv(4),prt=mv(5),drt=mv(6),mrt=V7.range,THt=crt.range,CHt=urt.range,AHt=hrt.range,PHt=frt.range,IHt=prt.range,LHt=drt.range});var RHt,NHt,DHt,OHt=M(()=>{pa();RHt=Sr(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),NHt=RHt,DHt=RHt.range});var grt,zHt,FHt,BHt=M(()=>{pa();grt=Sr(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});grt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Sr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};zHt=grt,FHt=grt.range});var HHt=M(()=>{pa();BBt();VBt();WBt();$Bt();QBt();aHt();uHt();pHt();_Ht();bHt();EHt();kHt();OHt();BHt()});function da(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return da(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return _rt.setTime(+o),yrt.setTime(+a),e(_rt),e(yrt),Math.floor(r(_rt,yrt))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var _rt,yrt,gv=M(()=>{_rt=new Date,yrt=new Date});var U7,q7,G7,HC=M(()=>{U7=6e4,q7=864e5,G7=6048e5});var VHt,W7,RLe,UHt=M(()=>{gv();HC();VHt=da(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*U7)/q7},function(e){return e.getDate()-1}),W7=VHt,RLe=VHt.range});function _v(e){return da(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*U7)/G7})}var VC,Hw,qHt,GHt,Vw,WHt,YHt,jHt,NLe,DLe,OLe,zLe,FLe,BLe,XHt=M(()=>{gv();HC();VC=_v(0),Hw=_v(1),qHt=_v(2),GHt=_v(3),Vw=_v(4),WHt=_v(5),YHt=_v(6),jHt=VC.range,NLe=Hw.range,DLe=qHt.range,OLe=GHt.range,zLe=Vw.range,FLe=WHt.range,BLe=YHt.range});var vrt,yv,HLe,$Ht=M(()=>{gv();vrt=da(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});vrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:da(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};yv=vrt,HLe=vrt.range});var KHt,Y7,VLe,ZHt=M(()=>{gv();HC();KHt=da(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/q7},function(e){return e.getUTCDate()-1}),Y7=KHt,VLe=KHt.range});function vv(e){return da(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/G7})}var UC,Uw,JHt,QHt,qw,tVt,eVt,rVt,ULe,qLe,GLe,WLe,YLe,jLe,nVt=M(()=>{gv();HC();UC=vv(0),Uw=vv(1),JHt=vv(2),QHt=vv(3),qw=vv(4),tVt=vv(5),eVt=vv(6),rVt=UC.range,ULe=Uw.range,qLe=JHt.range,GLe=QHt.range,WLe=qw.range,YLe=tVt.range,jLe=eVt.range});var xrt,xv,XLe,iVt=M(()=>{gv();xrt=da(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});xrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:da(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};xv=xrt,XLe=xrt.range});var oVt=M(()=>{UHt();XHt();$Ht();ZHt();nVt();iVt()});function $Le(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function j7(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qC(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function YC(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=GC(i),u=WC(i),h=GC(o),f=WC(o),p=GC(a),d=WC(a),g=GC(s),_=WC(s),y=GC(l),x=WC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:cVt,e:cVt,f:vke,H:gke,I:_ke,j:yke,L:dVt,m:xke,M:bke,p:st,Q:fVt,s:pVt,S:wke,u:Ske,U:Mke,V:Eke,w:Tke,W:Cke,x:null,X:null,y:Ake,Y:Pke,Z:Ike,"%":hVt},S={a:St,A:bt,b:Mt,B:lt,c:null,d:uVt,e:uVt,f:Nke,H:Lke,I:kke,j:Rke,L:mVt,m:Dke,M:Oke,p:Kt,Q:fVt,s:pVt,S:zke,u:Fke,U:Bke,V:Hke,w:Vke,W:Uke,x:null,X:null,y:qke,Y:Gke,Z:Wke,"%":hVt},C={a:B,A:I,b:L,B:R,c:F,d:sVt,e:sVt,f:fke,H:lVt,I:lVt,j:lke,L:hke,m:ske,M:cke,p:D,Q:dke,s:mke,S:uke,u:tke,U:eke,V:rke,w:QLe,W:nke,x:z,X:U,y:oke,Y:ike,Z:ake,"%":pke};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(_t,ct){return function(X){var et=[],dt=-1,q=0,pt=_t.length,ht,wt,kt;for(X instanceof Date||(X=new Date(+X));++dt<pt;)_t.charCodeAt(dt)===37&&(et.push(_t.slice(q,dt)),(wt=aVt[ht=_t.charAt(++dt)])!=null?ht=_t.charAt(++dt):wt=ht==="e"?" ":"0",(kt=ct[ht])&&(ht=kt(X,wt)),et.push(ht),q=dt+1);return et.push(_t.slice(q,dt)),et.join("")}}function k(_t,ct){return function(X){var et=qC(1900),dt=O(et,_t,X+="",0),q,pt;if(dt!=X.length)return null;if("Q"in et)return new Date(et.Q);if("p"in et&&(et.H=et.H%12+et.p*12),"V"in et){if(et.V<1||et.V>53)return null;"w"in et||(et.w=1),"Z"in et?(q=j7(qC(et.y)),pt=q.getUTCDay(),q=pt>4||pt===0?Uw.ceil(q):Uw(q),q=Y7.offset(q,(et.V-1)*7),et.y=q.getUTCFullYear(),et.m=q.getUTCMonth(),et.d=q.getUTCDate()+(et.w+6)%7):(q=ct(qC(et.y)),pt=q.getDay(),q=pt>4||pt===0?Hw.ceil(q):Hw(q),q=W7.offset(q,(et.V-1)*7),et.y=q.getFullYear(),et.m=q.getMonth(),et.d=q.getDate()+(et.w+6)%7)}else("W"in et||"U"in et)&&("w"in et||(et.w="u"in et?et.u%7:"W"in et?1:0),pt="Z"in et?j7(qC(et.y)).getUTCDay():ct(qC(et.y)).getDay(),et.m=0,et.d="W"in et?(et.w+6)%7+et.W*7-(pt+5)%7:et.w+et.U*7-(pt+6)%7);return"Z"in et?(et.H+=et.Z/100|0,et.M+=et.Z%100,j7(et)):ct(et)}}function O(_t,ct,X,et){for(var dt=0,q=ct.length,pt=X.length,ht,wt;dt<q;){if(et>=pt)return-1;if(ht=ct.charCodeAt(dt++),ht===37){if(ht=ct.charAt(dt++),wt=C[ht in aVt?ct.charAt(dt++):ht],!wt||(et=wt(_t,X,et))<0)return-1}else if(ht!=X.charCodeAt(et++))return-1}return et}function D(_t,ct,X){var et=c.exec(ct.slice(X));return et?(_t.p=u[et[0].toLowerCase()],X+et[0].length):-1}function B(_t,ct,X){var et=p.exec(ct.slice(X));return et?(_t.w=d[et[0].toLowerCase()],X+et[0].length):-1}function I(_t,ct,X){var et=h.exec(ct.slice(X));return et?(_t.w=f[et[0].toLowerCase()],X+et[0].length):-1}function L(_t,ct,X){var et=y.exec(ct.slice(X));return et?(_t.m=x[et[0].toLowerCase()],X+et[0].length):-1}function R(_t,ct,X){var et=g.exec(ct.slice(X));return et?(_t.m=_[et[0].toLowerCase()],X+et[0].length):-1}function F(_t,ct,X){return O(_t,t,ct,X)}function z(_t,ct,X){return O(_t,r,ct,X)}function U(_t,ct,X){return O(_t,n,ct,X)}function W(_t){return a[_t.getDay()]}function Z(_t){return o[_t.getDay()]}function rt(_t){return l[_t.getMonth()]}function ot(_t){return s[_t.getMonth()]}function st(_t){return i[+(_t.getHours()>=12)]}function St(_t){return a[_t.getUTCDay()]}function bt(_t){return o[_t.getUTCDay()]}function Mt(_t){return l[_t.getUTCMonth()]}function lt(_t){return s[_t.getUTCMonth()]}function Kt(_t){return i[+(_t.getUTCHours()>=12)]}return{format:function(_t){var ct=P(_t+="",b);return ct.toString=function(){return _t},ct},parse:function(_t){var ct=k(_t+="",$Le);return ct.toString=function(){return _t},ct},utcFormat:function(_t){var ct=P(_t+="",S);return ct.toString=function(){return _t},ct},utcParse:function(_t){var ct=k(_t,j7);return ct.toString=function(){return _t},ct}}}function gn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function JLe(e){return e.replace(ZLe,"\\$&")}function GC(e){return new RegExp("^(?:"+e.map(JLe).join("|")+")","i")}function WC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function QLe(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function tke(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function eke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function rke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function nke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function ike(e,t,r){var n=Vo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function oke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ake(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function ske(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function sVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function lke(e,t,r){var n=Vo.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function lVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function cke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function uke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function hke(e,t,r){var n=Vo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function fke(e,t,r){var n=Vo.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function pke(e,t,r){var n=KLe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function dke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function mke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0]*1e3,r+n[0].length):-1}function cVt(e,t){return gn(e.getDate(),t,2)}function gke(e,t){return gn(e.getHours(),t,2)}function _ke(e,t){return gn(e.getHours()%12||12,t,2)}function yke(e,t){return gn(1+W7.count(yv(e),e),t,3)}function dVt(e,t){return gn(e.getMilliseconds(),t,3)}function vke(e,t){return dVt(e,t)+"000"}function xke(e,t){return gn(e.getMonth()+1,t,2)}function bke(e,t){return gn(e.getMinutes(),t,2)}function wke(e,t){return gn(e.getSeconds(),t,2)}function Ske(e){var t=e.getDay();return t===0?7:t}function Mke(e,t){return gn(VC.count(yv(e),e),t,2)}function Eke(e,t){var r=e.getDay();return e=r>=4||r===0?Vw(e):Vw.ceil(e),gn(Vw.count(yv(e),e)+(yv(e).getDay()===4),t,2)}function Tke(e){return e.getDay()}function Cke(e,t){return gn(Hw.count(yv(e),e),t,2)}function Ake(e,t){return gn(e.getFullYear()%100,t,2)}function Pke(e,t){return gn(e.getFullYear()%1e4,t,4)}function Ike(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gn(t/60|0,"0",2)+gn(t%60,"0",2)}function uVt(e,t){return gn(e.getUTCDate(),t,2)}function Lke(e,t){return gn(e.getUTCHours(),t,2)}function kke(e,t){return gn(e.getUTCHours()%12||12,t,2)}function Rke(e,t){return gn(1+Y7.count(xv(e),e),t,3)}function mVt(e,t){return gn(e.getUTCMilliseconds(),t,3)}function Nke(e,t){return mVt(e,t)+"000"}function Dke(e,t){return gn(e.getUTCMonth()+1,t,2)}function Oke(e,t){return gn(e.getUTCMinutes(),t,2)}function zke(e,t){return gn(e.getUTCSeconds(),t,2)}function Fke(e){var t=e.getUTCDay();return t===0?7:t}function Bke(e,t){return gn(UC.count(xv(e),e),t,2)}function Hke(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qw(e):qw.ceil(e),gn(qw.count(xv(e),e)+(xv(e).getUTCDay()===4),t,2)}function Vke(e){return e.getUTCDay()}function Uke(e,t){return gn(Uw.count(xv(e),e),t,2)}function qke(e,t){return gn(e.getUTCFullYear()%100,t,2)}function Gke(e,t){return gn(e.getUTCFullYear()%1e4,t,4)}function Wke(){return"+0000"}function hVt(){return"%"}function fVt(e){return+e}function pVt(e){return Math.floor(+e/1e3)}var aVt,Vo,KLe,ZLe,brt=M(()=>{oVt();aVt={"-":"",_:" ",0:"0"},Vo=/^\s*\d+/,KLe=/^%/,ZLe=/[\\^$*+?|[\]().{}]/g});function X7(e){return Gw=YC(e),wrt=Gw.format,Srt=Gw.parse,jC=Gw.utcFormat,XC=Gw.utcParse,Gw}var Gw,wrt,Srt,jC,XC,$7=M(()=>{brt();X7({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});function Yke(e){return e.toISOString()}var Mrt,jke,gVt,Ert=M(()=>{$7();Mrt="%Y-%m-%dT%H:%M:%S.%LZ";jke=Date.prototype.toISOString?Yke:jC(Mrt),gVt=jke});function Xke(e){var t=new Date(e);return isNaN(t)?null:t}var $ke,_Vt,yVt=M(()=>{Ert();$7();$ke=+new Date("2000-01-01T00:00:00.000Z")?Xke:XC(Mrt),_Vt=$ke});var vVt=M(()=>{$7();brt();Ert();yVt()});function Yw(){return bv||(wVt(Kke),bv=JC.now()+J7)}function Kke(){bv=0}function wv(){this._call=this._time=this._next=null}function Crt(e,t,r){var n=new wv;return n.restart(e,t,r),n}function Art(){Yw(),++Ww;for(var e=K7,t;e;)(t=bv-e._time)>=0&&e._call.call(null,t),e=e._next;--Ww}function xVt(){bv=(Z7=JC.now())+J7,Ww=KC=0;try{Art()}finally{Ww=0,Jke(),bv=0}}function Zke(){var e=JC.now(),t=e-Z7;t>bVt&&(J7-=t,Z7=e)}function Jke(){for(var e,t=K7,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:K7=r);ZC=e,Trt(n)}function Trt(e){if(!Ww){KC&&(KC=clearTimeout(KC));var t=e-bv;t>24?(e<1/0&&(KC=setTimeout(xVt,e-JC.now()-J7)),$C&&($C=clearInterval($C))):($C||(Z7=JC.now(),$C=setInterval(Zke,bVt)),Ww=1,wVt(xVt))}}var Ww,KC,$C,bVt,K7,ZC,Z7,bv,J7,JC,wVt,Q7=M(()=>{Ww=0,KC=0,$C=0,bVt=1e3,Z7=0,bv=0,J7=0,JC=typeof performance=="object"&&performance.now?performance:Date,wVt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};wv.prototype=Crt.prototype={constructor:wv,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Yw():+r)+(t==null?0:+t),!this._next&&ZC!==this&&(ZC?ZC._next=this:K7=this,ZC=this),this._call=e,this._time=r,Trt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Trt())}}});function SVt(e,t,r){var n=new wv;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var MVt=M(()=>{Q7()});function EVt(e,t,r){var n=new wv,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?Yw():+r,n.restart(function o(a){a+=i,n.restart(o,i+=t,r),e(a)},t,r),n)}var TVt=M(()=>{Q7()});var CVt=M(()=>{Q7();MVt();TVt()});var tz,Prt,Irt=M(()=>{tz="http://www.w3.org/1999/xhtml",Prt={svg:"http://www.w3.org/2000/svg",xhtml:tz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function cd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Prt.hasOwnProperty(t)?{space:Prt[t],local:e}:e}var ez=M(()=>{Irt()});function Qke(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===tz&&t.documentElement.namespaceURI===tz?t.createElement(e):t.createElementNS(r,e)}}function t8e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rz(e){var t=cd(e);return(t.local?t8e:Qke)(t)}var Lrt=M(()=>{ez();Irt()});function e8e(){}function Sv(e){return e==null?e8e:function(){return this.querySelector(e)}}var nz=M(()=>{});function AVt(e){typeof e!="function"&&(e=Sv(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new no(n,this._parents)}var PVt=M(()=>{Mf();nz()});function r8e(){return[]}function QC(e){return e==null?r8e:function(){return this.querySelectorAll(e)}}var krt=M(()=>{});function IVt(e){typeof e!="function"&&(e=QC(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new no(n,i)}var LVt=M(()=>{Mf();krt()});function tA(e){return function(){return this.matches(e)}}var Rrt=M(()=>{});function kVt(e){typeof e!="function"&&(e=tA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new no(n,this._parents)}var RVt=M(()=>{Mf();Rrt()});function iz(e){return new Array(e.length)}var Nrt=M(()=>{});function NVt(){return new no(this._enter||this._groups.map(iz),this._parents)}function eA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Drt=M(()=>{Nrt();Mf();eA.prototype={constructor:eA,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function DVt(e){return function(){return e}}var OVt=M(()=>{});function n8e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new eA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function i8e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=zVt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=zVt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new eA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function FVt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?i8e:n8e,n=this._parents,i=this._groups;typeof e!="function"&&(e=DVt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new no(a,n),a._enter=s,a._exit=l,a}var zVt,BVt=M(()=>{Mf();Drt();OVt();zVt="$"});function HVt(){return new no(this._exit||this._groups.map(iz),this._parents)}var VVt=M(()=>{Nrt();Mf()});function UVt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var qVt=M(()=>{});function GVt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new no(a,this._parents)}var WVt=M(()=>{Mf()});function YVt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var jVt=M(()=>{});function XVt(e){e||(e=o8e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new no(i,this._parents).order()}function o8e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var $Vt=M(()=>{Mf()});function KVt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var ZVt=M(()=>{});function JVt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var QVt=M(()=>{});function tUt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var eUt=M(()=>{});function rUt(){var e=0;return this.each(function(){++e}),e}var nUt=M(()=>{});function iUt(){return!this.node()}var oUt=M(()=>{});function aUt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var sUt=M(()=>{});function a8e(e){return function(){this.removeAttribute(e)}}function s8e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function l8e(e,t){return function(){this.setAttribute(e,t)}}function c8e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function u8e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function h8e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function lUt(e,t){var r=cd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?s8e:a8e:typeof t=="function"?r.local?h8e:u8e:r.local?c8e:l8e)(r,t))}var cUt=M(()=>{ez()});function oz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Ort=M(()=>{});function f8e(e){return function(){this.style.removeProperty(e)}}function p8e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function d8e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function uUt(e,t,r){return arguments.length>1?this.each((t==null?f8e:typeof t=="function"?d8e:p8e)(e,t,r==null?"":r)):Hg(this.node(),e)}function Hg(e,t){return e.style.getPropertyValue(t)||oz(e).getComputedStyle(e,null).getPropertyValue(t)}var zrt=M(()=>{Ort()});function m8e(e){return function(){delete this[e]}}function g8e(e,t){return function(){this[e]=t}}function _8e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function hUt(e,t){return arguments.length>1?this.each((t==null?m8e:typeof t=="function"?_8e:g8e)(e,t)):this.node()[e]}var fUt=M(()=>{});function pUt(e){return e.trim().split(/^|\s+/)}function Frt(e){return e.classList||new dUt(e)}function dUt(e){this._node=e,this._names=pUt(e.getAttribute("class")||"")}function mUt(e,t){for(var r=Frt(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function gUt(e,t){for(var r=Frt(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function y8e(e){return function(){mUt(this,e)}}function v8e(e){return function(){gUt(this,e)}}function x8e(e,t){return function(){(t.apply(this,arguments)?mUt:gUt)(this,e)}}function _Ut(e,t){var r=pUt(e+"");if(arguments.length<2){for(var n=Frt(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?x8e:t?y8e:v8e)(r,t))}var yUt=M(()=>{dUt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function b8e(){this.textContent=""}function w8e(e){return function(){this.textContent=e}}function S8e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function vUt(e){return arguments.length?this.each(e==null?b8e:(typeof e=="function"?S8e:w8e)(e)):this.node().textContent}var xUt=M(()=>{});function M8e(){this.innerHTML=""}function E8e(e){return function(){this.innerHTML=e}}function T8e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function bUt(e){return arguments.length?this.each(e==null?M8e:(typeof e=="function"?T8e:E8e)(e)):this.node().innerHTML}var wUt=M(()=>{});function C8e(){this.nextSibling&&this.parentNode.appendChild(this)}function SUt(){return this.each(C8e)}var MUt=M(()=>{});function A8e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function EUt(){return this.each(A8e)}var TUt=M(()=>{});function CUt(e){var t=typeof e=="function"?e:rz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var AUt=M(()=>{Lrt()});function P8e(){return null}function PUt(e,t){var r=typeof e=="function"?e:rz(e),n=t==null?P8e:typeof t=="function"?t:Sv(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var IUt=M(()=>{Lrt();nz()});function I8e(){var e=this.parentNode;e&&e.removeChild(this)}function LUt(){return this.each(I8e)}var kUt=M(()=>{});function L8e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function k8e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function RUt(e){return this.select(e?k8e:L8e)}var NUt=M(()=>{});function DUt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var OUt=M(()=>{});function R8e(e,t,r){return e=BUt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function BUt(e,t,r){return function(n){var i=Brt;Brt=n;try{e.call(this,this.__data__,t,r)}finally{Brt=i}}}function N8e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function D8e(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function O8e(e,t,r){var n=FUt.hasOwnProperty(e.type)?R8e:BUt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function HUt(e,t,r){var n=N8e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?O8e:D8e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}var FUt,Brt,zUt,VUt=M(()=>{FUt={},Brt=null;typeof document!="undefined"&&(zUt=document.documentElement,"onmouseenter"in zUt||(FUt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function UUt(e,t,r){var n=oz(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function z8e(e,t){return function(){return UUt(this,e,t)}}function F8e(e,t){return function(){return UUt(this,e,t.apply(this,arguments))}}function qUt(e,t){return this.each((typeof t=="function"?F8e:z8e)(e,t))}var GUt=M(()=>{Ort()});function no(e,t){this._groups=e,this._parents=t}function WUt(){return new no([[document.documentElement]],B8e)}var B8e,ud,Mf=M(()=>{PVt();LVt();RVt();BVt();Drt();VVt();qVt();WVt();jVt();$Vt();ZVt();QVt();eUt();nUt();oUt();sUt();cUt();zrt();fUt();yUt();xUt();wUt();MUt();TUt();AUt();IUt();kUt();NUt();OUt();VUt();GUt();B8e=[null];no.prototype=WUt.prototype={constructor:no,select:AVt,selectAll:IVt,filter:kVt,data:FVt,enter:NVt,exit:HVt,join:UVt,merge:GVt,order:YVt,sort:XVt,call:KVt,nodes:JVt,node:tUt,size:rUt,empty:iUt,each:aUt,attr:lUt,style:uUt,property:hUt,classed:_Ut,text:vUt,html:bUt,raise:SUt,lower:EUt,append:CUt,insert:PUt,remove:LUt,clone:RUt,datum:DUt,on:HUt,dispatch:qUt};ud=WUt});var Ef=M(()=>{Rrt();ez();Mf();nz();krt();zrt()});function jUt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new az(r)}function az(e){this._=e}function V8e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function U8e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function YUt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=H8e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var H8e,Hrt,XUt=M(()=>{H8e={value:function(){}};az.prototype=jUt.prototype={constructor:az,on:function(e,t){var r=this._,n=V8e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=U8e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=YUt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=YUt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new az(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};Hrt=jUt});var $Ut=M(()=>{XUt()});function Xw(){return Mv||(JUt(q8e),Mv=oA.now()+cz)}function q8e(){Mv=0}function aA(){this._call=this._time=this._next=null}function uz(e,t,r){var n=new aA;return n.restart(e,t,r),n}function QUt(){Xw(),++jw;for(var e=sz,t;e;)(t=Mv-e._time)>=0&&e._call.call(null,t),e=e._next;--jw}function KUt(){Mv=(lz=oA.now())+cz,jw=nA=0;try{QUt()}finally{jw=0,W8e(),Mv=0}}function G8e(){var e=oA.now(),t=e-lz;t>ZUt&&(cz-=t,lz=e)}function W8e(){for(var e,t=sz,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:sz=r);iA=e,Vrt(n)}function Vrt(e){if(!jw){nA&&(nA=clearTimeout(nA));var t=e-Mv;t>24?(e<1/0&&(nA=setTimeout(KUt,e-oA.now()-cz)),rA&&(rA=clearInterval(rA))):(rA||(lz=oA.now(),rA=setInterval(G8e,ZUt)),jw=1,JUt(KUt))}}var jw,nA,rA,ZUt,sz,iA,lz,Mv,cz,oA,JUt,Urt=M(()=>{jw=0,nA=0,rA=0,ZUt=1e3,lz=0,Mv=0,cz=0,oA=typeof performance=="object"&&performance.now?performance:Date,JUt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};aA.prototype=uz.prototype={constructor:aA,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Xw():+r)+(t==null?0:+t),!this._next&&iA!==this&&(iA?iA._next=this:sz=this,iA=this),this._call=e,this._time=r,Vrt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vrt())}}});function hz(e,t,r){var n=new aA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var tqt=M(()=>{Urt()});var qrt=M(()=>{Urt();tqt()});function Vg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;X8e(e,r,{name:t,index:n,group:i,on:Y8e,tween:j8e,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rqt})}function cA(e,t){var r=io(e,t);if(r.state>rqt)throw new Error("too late; already scheduled");return r}function Du(e,t){var r=io(e,t);if(r.state>lA)throw new Error("too late; already started");return r}function io(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function X8e(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=uz(o,0,r.time);function o(c){r.state=fz,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==fz)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===Grt)return hz(a);p.state===eqt?(p.state=sA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=sA,p.timer.stop(),delete n[u])}if(hz(function(){r.state===Grt&&(r.state=eqt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=lA,r.on.call("start",e,e.__data__,r.index,r.group),r.state===lA){for(r.state=Grt,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=pz,1),h=-1,f=i.length;++h<f;)i[h].call(null,u);r.state===pz&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=sA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var Y8e,j8e,rqt,fz,lA,Grt,eqt,pz,sA,Ac=M(()=>{$Ut();qrt();Y8e=Hrt("start","end","interrupt"),j8e=[],rqt=0,fz=1,lA=2,Grt=3,eqt=4,pz=5,sA=6});function dz(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>lA&&n.state<pz,n.state=sA,n.timer.stop(),i&&n.on.call("interrupt",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Wrt=M(()=>{Ac()});function nqt(e){return this.each(function(){dz(this,e)})}var iqt=M(()=>{Wrt()});function mz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Yrt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var oqt=M(()=>{});function fA(){}function sqt(){return this.rgb().formatHex()}function rRe(){return pqt(this).formatHsl()}function lqt(){return this.rgb().formatRgb()}function Ug(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=$8e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?cqt(t):r===3?new gl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=K8e.exec(e))?new gl(t[1],t[2],t[3],1):(t=Z8e.exec(e))?new gl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=J8e.exec(e))?gz(t[1],t[2],t[3],t[4]):(t=Q8e.exec(e))?gz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=tRe.exec(e))?fqt(t[1],t[2]/100,t[3]/100,1):(t=eRe.exec(e))?fqt(t[1],t[2]/100,t[3]/100,t[4]):aqt.hasOwnProperty(e)?cqt(aqt[e]):e==="transparent"?new gl(NaN,NaN,NaN,0):null}function cqt(e){return new gl(e>>16&255,e>>8&255,e&255,1)}function gz(e,t,r,n){return n<=0&&(e=t=r=NaN),new gl(e,t,r,n)}function nRe(e){return e instanceof fA||(e=Ug(e)),e?(e=e.rgb(),new gl(e.r,e.g,e.b,e.opacity)):new gl}function Kw(e,t,r,n){return arguments.length===1?nRe(e):new gl(e,t,r,n==null?1:n)}function gl(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function uqt(){return"#"+jrt(this.r)+jrt(this.g)+jrt(this.b)}function hqt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function jrt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function fqt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Tf(e,t,r,n)}function pqt(e){if(e instanceof Tf)return new Tf(e.h,e.s,e.l,e.opacity);if(e instanceof fA||(e=Ug(e)),!e)return new Tf;if(e instanceof Tf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Tf(a,s,l,e.opacity)}function dqt(e,t,r,n){return arguments.length===1?pqt(e):new Tf(e,t,r,n==null?1:n)}function Tf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Xrt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uA,_z,$w,hA,Cf,$8e,K8e,Z8e,J8e,Q8e,tRe,eRe,aqt,mqt=M(()=>{oqt();uA=.7,_z=1/uA,$w="\\s*([+-]?\\d+)\\s*",hA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$8e=/^#([0-9a-f]{3,8})$/,K8e=new RegExp("^rgb\\("+[$w,$w,$w]+"\\)$"),Z8e=new RegExp("^rgb\\("+[Cf,Cf,Cf]+"\\)$"),J8e=new RegExp("^rgba\\("+[$w,$w,$w,hA]+"\\)$"),Q8e=new RegExp("^rgba\\("+[Cf,Cf,Cf,hA]+"\\)$"),tRe=new RegExp("^hsl\\("+[hA,Cf,Cf]+"\\)$"),eRe=new RegExp("^hsla\\("+[hA,Cf,Cf,hA]+"\\)$"),aqt={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};mz(fA,Ug,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:sqt,formatHex:sqt,formatHsl:rRe,formatRgb:lqt,toString:lqt});mz(gl,Kw,Yrt(fA,{brighter:function(e){return e=e==null?_z:Math.pow(_z,e),new gl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?uA:Math.pow(uA,e),new gl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uqt,formatHex:uqt,formatRgb:hqt,toString:hqt}));mz(Tf,dqt,Yrt(fA,{brighter:function(e){return e=e==null?_z:Math.pow(_z,e),new Tf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?uA:Math.pow(uA,e),new Tf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new gl(Xrt(e>=240?e-240:e+120,i,n),Xrt(e,i,n),Xrt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var $rt=M(()=>{mqt()});function Krt(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function gqt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Krt((r-n/t)*t,a,i,o,s)}}var Zrt=M(()=>{});function _qt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Krt((r-n/t)*t,i,o,a,s)}}var yqt=M(()=>{Zrt()});function Jrt(e){return function(){return e}}var vqt=M(()=>{});function iRe(e,t){return function(r){return e+r*t}}function oRe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function xqt(e){return(e=+e)==1?yz:function(t,r){return r-t?oRe(t,r,e):Jrt(isNaN(t)?r:t)}}function yz(e,t){var r=t-e;return r?iRe(e,r):Jrt(isNaN(e)?t:e)}var bqt=M(()=>{vqt()});function wqt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=Kw(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var vz,aRe,sRe,Sqt=M(()=>{$rt();Zrt();yqt();bqt();vz=function e(t){var r=xqt(t);function n(i,o){var a=r((i=Kw(i)).r,(o=Kw(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=yz(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);aRe=wqt(gqt),sRe=wqt(_qt)});function Pc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var xz=M(()=>{});function lRe(e){return function(){return e}}function cRe(e){return function(t){return e(t)+""}}function ent(e,t){var r=tnt.lastIndex=Qrt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=tnt.exec(e))&&(i=Qrt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Pc(n,i)})),r=Qrt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?cRe(l[0].x):lRe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var tnt,Qrt,Mqt=M(()=>{xz();tnt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qrt=new RegExp(tnt.source,"g")});function rnt(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Eqt,skewX:Math.atan(l)*Eqt,scaleX:a,scaleY:s}}var Eqt,bz,Tqt=M(()=>{Eqt=180/Math.PI,bz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Aqt(e){return e==="none"?bz:(pA||(pA=document.createElement("DIV"),nnt=document.documentElement,Cqt=document.defaultView),pA.style.transform=e,e=Cqt.getComputedStyle(nnt.appendChild(pA),null).getPropertyValue("transform"),nnt.removeChild(pA),e=e.slice(7,-1).split(","),rnt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Pqt(e){return e==null?bz:(wz||(wz=document.createElementNS("http://www.w3.org/2000/svg","g")),wz.setAttribute("transform",e),(e=wz.transform.baseVal.consolidate())?(e=e.matrix,rnt(e.a,e.b,e.c,e.d,e.e,e.f)):bz)}var pA,nnt,Cqt,wz,Iqt=M(()=>{Tqt()});function Lqt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Pc(c,h)},{i:g-2,x:Pc(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Pc(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Pc(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Pc(c,h)},{i:g-2,x:Pc(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var int,ont,kqt=M(()=>{xz();Iqt();int=Lqt(Aqt,"px, ","px)","deg)"),ont=Lqt(Pqt,", ",")",")")});var Sz=M(()=>{xz();Mqt();kqt();Sqt()});function uRe(e,t){var r,n;return function(){var i=Du(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function hRe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Du(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Rqt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=io(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?uRe:hRe)(r,e,t))}function Zw(e,t,r){var n=e._id;return e.each(function(){var i=Du(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return io(i,n).value[t]}}var dA=M(()=>{Ac()});function Mz(e,t){var r;return(typeof t=="number"?Pc:t instanceof Ug?vz:(r=Ug(t))?(t=r,vz):ent)(e,t)}var ant=M(()=>{$rt();Sz()});function fRe(e){return function(){this.removeAttribute(e)}}function pRe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dRe(e,t,r){var n,i;return function(){var o=this.getAttribute(e);return o===r?null:o===n?i:i=t(n=o,r)}}function mRe(e,t,r){var n,i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===r?null:o===n?i:i=t(n=o,r)}}function gRe(e,t,r){var n,i,o;return function(){var a,s=r(this);return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),a===s?null:a===n&&s===i?o:o=t(n=a,i=s))}}function _Re(e,t,r){var n,i,o;return function(){var a,s=r(this);return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),a===s?null:a===n&&s===i?o:o=t(n=a,i=s))}}function Nqt(e,t){var r=cd(e),n=r==="transform"?ont:Mz;return this.attrTween(e,typeof t=="function"?(r.local?_Re:gRe)(r,n,Zw(this,"attr."+e,t)):t==null?(r.local?pRe:fRe)(r):(r.local?mRe:dRe)(r,n,t+""))}var Dqt=M(()=>{Sz();Ef();dA();ant()});function yRe(e,t){function r(){var n=this,i=t.apply(n,arguments);return i&&function(o){n.setAttributeNS(e.space,e.local,i(o))}}return r._value=t,r}function vRe(e,t){function r(){var n=this,i=t.apply(n,arguments);return i&&function(o){n.setAttribute(e,i(o))}}return r._value=t,r}function Oqt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=cd(e);return this.tween(r,(n.local?yRe:vRe)(n,t))}var zqt=M(()=>{Ef()});function xRe(e,t){return function(){cA(this,e).delay=+t.apply(this,arguments)}}function bRe(e,t){return t=+t,function(){cA(this,e).delay=t}}function Fqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xRe:bRe)(t,e)):io(this.node(),t).delay}var Bqt=M(()=>{Ac()});function wRe(e,t){return function(){Du(this,e).duration=+t.apply(this,arguments)}}function SRe(e,t){return t=+t,function(){Du(this,e).duration=t}}function Hqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?wRe:SRe)(t,e)):io(this.node(),t).duration}var Vqt=M(()=>{Ac()});function MRe(e,t){if(typeof t!="function")throw new Error;return function(){Du(this,e).ease=t}}function Uqt(e){var t=this._id;return arguments.length?this.each(MRe(t,e)):io(this.node(),t).ease}var qqt=M(()=>{Ac()});function Gqt(e){typeof e!="function"&&(e=tA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Uo(n,this._parents,this._name,this._id)}var Wqt=M(()=>{Ef();hd()});function Yqt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Uo(a,this._parents,this._name,this._id)}var jqt=M(()=>{hd()});function ERe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function TRe(e,t,r){var n,i,o=ERe(t)?cA:Du;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function Xqt(e,t){var r=this._id;return arguments.length<2?io(this.node(),r).on.on(e):this.each(TRe(r,e,t))}var $qt=M(()=>{Ac()});function CRe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Kqt(){return this.on("end.remove",CRe(this._id))}var Zqt=M(()=>{});function Jqt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Sv(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Vg(c[f],t,r,f,c,io(u,r)));return new Uo(o,this._parents,t,r)}var Qqt=M(()=>{Ef();hd();Ac()});function tGt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=QC(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=io(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Vg(p,t,r,g,f,d);o.push(f),a.push(u)}return new Uo(o,a,t,r)}var eGt=M(()=>{Ef();hd();Ac()});function rGt(){return new ARe(this._groups,this._parents)}var ARe,nGt=M(()=>{Ef();ARe=ud.prototype.constructor});function PRe(e,t){var r,n,i;return function(){var o=Hg(this,e),a=(this.style.removeProperty(e),Hg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function IRe(e){return function(){this.style.removeProperty(e)}}function LRe(e,t,r){var n,i;return function(){var o=Hg(this,e);return o===r?null:o===n?i:i=t(n=o,r)}}function kRe(e,t,r){var n,i,o;return function(){var a=Hg(this,e),s=r(this);return s==null&&(s=(this.style.removeProperty(e),Hg(this,e))),a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function iGt(e,t,r){var n=(e+="")=="transform"?int:Mz;return t==null?this.styleTween(e,PRe(e,n)).on("end.style."+e,IRe(e)):this.styleTween(e,typeof t=="function"?kRe(e,n,Zw(this,"style."+e,t)):LRe(e,n,t+""),r)}var oGt=M(()=>{Sz();Ef();dA();ant()});function RRe(e,t,r){function n(){var i=this,o=t.apply(i,arguments);return o&&function(a){i.style.setProperty(e,o(a),r)}}return n._value=t,n}function aGt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,RRe(e,t,r==null?"":r))}var sGt=M(()=>{});function NRe(e){return function(){this.textContent=e}}function DRe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function lGt(e){return this.tween("text",typeof e=="function"?DRe(Zw(this,"text",e)):NRe(e==null?"":e+""))}var cGt=M(()=>{dA()});function uGt(){for(var e=this._name,t=this._id,r=Ez(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=io(l,t);Vg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Uo(n,this._parents,e,r)}var hGt=M(()=>{hd();Ac()});function Uo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Tz(e){return ud().transition(e)}function Ez(){return++ORe}var ORe,Jw,hd=M(()=>{Ef();Dqt();zqt();Bqt();Vqt();qqt();Wqt();jqt();$qt();Zqt();Qqt();eGt();nGt();oGt();sGt();cGt();hGt();dA();ORe=0;Jw=ud.prototype;Uo.prototype=Tz.prototype={constructor:Uo,select:Jqt,selectAll:tGt,filter:Gqt,merge:Yqt,selection:rGt,transition:uGt,call:Jw.call,nodes:Jw.nodes,node:Jw.node,size:Jw.size,empty:Jw.empty,each:Jw.each,on:Xqt,attr:Nqt,attrTween:Oqt,style:iGt,styleTween:aGt,text:lGt,remove:Kqt,tween:Rqt,delay:Fqt,duration:Hqt,ease:Uqt}});function zRe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return snt.time=Xw(),snt;return r}function fGt(e){var t,r;e instanceof Uo?(t=e._id,e=e._name):(t=Ez(),(r=snt).time=Xw(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Vg(l,e,t,c,a,r||zRe(l,t));return new Uo(n,this._parents,e,t)}var snt,pGt=M(()=>{hd();Ac();L_();qrt();snt={time:null,delay:0,duration:250,ease:bs}});var dGt=M(()=>{Ef();iqt();pGt();ud.prototype.interrupt=nqt;ud.prototype.transition=fGt});function mGt(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>fz&&n.name===t)return new Uo([[e]],FRe,t,+i)}return null}var FRe,gGt=M(()=>{hd();Ac();FRe=[null]});var _Gt=M(()=>{dGt();hd();gGt();Wrt()});function lnt(e){return function(){return e}}var yGt=M(()=>{});function vGt(e){return e[0]}function xGt(e){return e[1]}var bGt=M(()=>{});function cnt(){this._=null}function Qw(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function mA(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function gA(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function wGt(e){for(;e.L;)e=e.L;return e}var unt,Cz=M(()=>{cnt.prototype={constructor:cnt,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=wGt(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(mA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,gA(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(gA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,mA(this,n))),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,r,n=e.L,i=e.R,o,a;if(n?i?o=wGt(i):o=n:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,n&&i?(a=o.C,o.C=e.C,o.L=n,n.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(r=t.R,r.C&&(r.C=!1,t.C=!0,mA(this,t),r=t.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,gA(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,mA(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,gA(this,t),r=t.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,mA(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,gA(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};unt=cnt});function tS(e,t,r,n){var i=[null,null],o=Ao.push(i)-1;return i.left=e,i.right=t,r&&_A(i,e,t,r),n&&_A(i,t,e,n),Ja[e.index].halfedges.push(o),Ja[t.index].halfedges.push(o),i}function eS(e,t,r){var n=[t,r];return n.left=e,n}function _A(e,t,r,n){!e[0]&&!e[1]?(e[0]=n,e.left=t,e.right=r):e.left===r?e[1]=n:e[0]=n}function BRe(e,t,r,n,i){var o=e[0],a=e[1],s=o[0],l=o[1],c=a[0],u=a[1],h=0,f=1,p=c-s,d=u-l,g;if(g=t-s,!(!p&&g>0)){if(g/=p,p<0){if(g<h)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>h&&(h=g)}if(g=n-s,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>h&&(h=g)}else if(p>0){if(g<h)return;g<f&&(f=g)}if(g=r-l,!(!d&&g>0)){if(g/=d,d<0){if(g<h)return;g<f&&(f=g)}else if(d>0){if(g>f)return;g>h&&(h=g)}if(g=i-l,!(!d&&g<0)){if(g/=d,d<0){if(g>f)return;g>h&&(h=g)}else if(d>0){if(g<h)return;g<f&&(f=g)}return!(h>0)&&!(f<1)||(h>0&&(e[0]=[s+h*p,l+h*d]),f<1&&(e[1]=[s+f*p,l+f*d])),!0}}}}}function HRe(e,t,r,n,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,c=s[0],u=s[1],h=l[0],f=l[1],p=(c+h)/2,d=(u+f)/2,g,_;if(f===u){if(p<t||p>=n)return;if(c>h){if(!a)a=[p,r];else if(a[1]>=i)return;o=[p,i]}else{if(!a)a=[p,i];else if(a[1]<r)return;o=[p,r]}}else if(g=(c-h)/(f-u),_=d-g*p,g<-1||g>1)if(c>h){if(!a)a=[(r-_)/g,r];else if(a[1]>=i)return;o=[(i-_)/g,i]}else{if(!a)a=[(i-_)/g,i];else if(a[1]<r)return;o=[(r-_)/g,r]}else if(u<f){if(!a)a=[t,g*t+_];else if(a[0]>=n)return;o=[n,g*n+_]}else{if(!a)a=[n,g*n+_];else if(a[0]<t)return;o=[t,g*t+_]}return e[0]=a,e[1]=o,!0}function SGt(e,t,r,n){for(var i=Ao.length,o;i--;)(!HRe(o=Ao[i],e,t,r,n)||!BRe(o,e,t,r,n)||!(Math.abs(o[0][0]-o[1][0])>Wr||Math.abs(o[0][1]-o[1][1])>Wr))&&delete Ao[i]}var Az=M(()=>{rS()});function MGt(e){return Ja[e.index]={site:e,halfedges:[]}}function VRe(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function hnt(e,t){return t[+(t.left!==e.site)]}function URe(e,t){return t[+(t.left===e.site)]}function EGt(){for(var e=0,t=Ja.length,r,n,i,o;e<t;++e)if((r=Ja[e])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=VRe(r,Ao[n[i]]);for(a.sort(function(l,c){return s[c]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function TGt(e,t,r,n){var i=Ja.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Ja[o]){for(s=a.site,c=a.halfedges,l=c.length;l--;)Ao[c[l]]||c.splice(l,1);for(l=0,u=c.length;l<u;)d=URe(a,Ao[c[l]]),g=d[0],_=d[1],h=hnt(a,Ao[c[++l%u]]),f=h[0],p=h[1],(Math.abs(g-f)>Wr||Math.abs(_-p)>Wr)&&(c.splice(l,0,Ao.push(eS(s,d,Math.abs(g-e)<Wr&&n-_>Wr?[e,Math.abs(f-e)<Wr?p:n]:Math.abs(_-n)<Wr&&r-g>Wr?[Math.abs(p-n)<Wr?f:r,n]:Math.abs(g-r)<Wr&&_-t>Wr?[r,Math.abs(f-r)<Wr?p:t]:Math.abs(_-t)<Wr&&g-e>Wr?[Math.abs(p-t)<Wr?f:e,t]:null))-1),++u);u&&(y=!1)}if(y){var x,b,S,C=1/0;for(o=0,y=null;o<i;++o)(a=Ja[o])&&(s=a.site,x=s[0]-e,b=s[1]-t,S=x*x+b*b,S<C&&(C=S,y=a));if(y){var P=[e,t],k=[e,n],O=[r,n],D=[r,t];y.halfedges.push(Ao.push(eS(s=y.site,P,k))-1,Ao.push(eS(s,k,O))-1,Ao.push(eS(s,O,D))-1,Ao.push(eS(s,D,P))-1)}}for(o=0;o<i;++o)(a=Ja[o])&&(a.halfedges.length||delete Ja[o])}var fnt=M(()=>{Az();rS()});function qRe(){Qw(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ev(e){var t=e.P,r=e.N;if(!(!t||!r)){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,c=n[1]-s,u=o[0]-a,h=o[1]-s,f=2*(l*h-c*u);if(!(f>=-AGt)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=CGt.pop()||new qRe;y.arc=e,y.site=i,y.x=g+a,y.y=(y.cy=_+s)+Math.sqrt(g*g+_*_),e.circle=y;for(var x=null,b=nS._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x)if(b.L)b=b.L;else{x=b.P;break}else if(b.R)b=b.R;else{x=b;break}nS.insert(x,y),x||(Pz=y)}}}}function Tv(e){var t=e.circle;t&&(t.P||(Pz=t.N),nS.remove(t),CGt.push(t),Qw(t),e.circle=null)}var CGt,Pz,pnt=M(()=>{Cz();rS();CGt=[]});function GRe(){Qw(this),this.edge=this.site=this.circle=null}function PGt(e){var t=IGt.pop()||new GRe;return t.site=e,t}function dnt(e){Tv(e),Cv.remove(e),IGt.push(e),Qw(e)}function LGt(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];dnt(e);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<Wr&&Math.abs(n-l.circle.cy)<Wr;)o=l.P,s.unshift(l),dnt(l),l=o;s.unshift(l),Tv(l);for(var c=a;c.circle&&Math.abs(r-c.circle.x)<Wr&&Math.abs(n-c.circle.cy)<Wr;)a=c.N,s.push(c),dnt(c),c=a;s.push(c),Tv(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],_A(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=tS(l.site,c.site,null,i),Ev(l),Ev(c)}function kGt(e){for(var t=e[0],r=e[1],n,i,o,a,s=Cv._;s;)if(o=RGt(s,r)-t,o>Wr)s=s.L;else if(a=t-WRe(s,r),a>Wr){if(!s.R){n=s;break}s=s.R}else{o>-Wr?(n=s.P,i=s):a>-Wr?(n=s,i=s.N):n=i=s;break}MGt(e);var l=PGt(e);if(Cv.insert(n,l),!(!n&&!i)){if(n===i){Tv(n),i=PGt(n.site),Cv.insert(l,i),l.edge=i.edge=tS(n.site,l.site),Ev(n),Ev(i);return}if(!i){l.edge=tS(n.site,l.site);return}Tv(n),Tv(i);var c=n.site,u=c[0],h=c[1],f=e[0]-u,p=e[1]-h,d=i.site,g=d[0]-u,_=d[1]-h,y=2*(f*_-p*g),x=f*f+p*p,b=g*g+_*_,S=[(_*x-p*b)/y+u,(f*b-g*x)/y+h];_A(i.edge,c,d,S),l.edge=tS(c,e,null,S),i.edge=tS(e,d,null,S),Ev(n),Ev(i)}}function RGt(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],c=l-t;if(!c)return s;var u=s-n,h=1/o-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function WRe(e,t){var r=e.N;if(r)return RGt(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var IGt,NGt=M(()=>{Cz();fnt();pnt();Az();rS();IGt=[]});function YRe(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function jRe(e,t){return t[1]-e[1]||t[0]-e[0]}function yA(e,t){var r=e.sort(jRe).pop(),n,i,o;for(Ao=[],Ja=new Array(e.length),Cv=new unt,nS=new unt;;)if(o=Pz,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(kGt(r),n=r[0],i=r[1]),r=e.pop();else if(o)LGt(o.arc);else break;if(EGt(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];SGt(a,s,l,c),TGt(a,s,l,c)}this.edges=Ao,this.cells=Ja,Cv=nS=Ao=Ja=null}var Wr,AGt,Cv,Ja,nS,Ao,rS=M(()=>{NGt();fnt();pnt();Az();Cz();Wr=1e-6,AGt=1e-12;yA.prototype={constructor:yA,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return hnt(t,e[n])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,c=t[o[s-1]],u=c.left===i?c.right:c.left;++a<s;)l=u,c=t[o[a]],u=c.left===i?c.right:c.left,l&&u&&n<l.index&&n<u.index&&YRe(i,l,u)<0&&e.push([i.data,l.data,u.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],c=t-s.site[1],u=l*l+c*c;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(h){var f=n.edges[h],p=f.left;if(!((p===s.site||!p)&&!(p=f.right))){var d=e-p[0],g=t-p[1],_=d*d+g*g;_<u&&(u=_,o=p.index)}});while(o!==null);return n._found=i,r==null||u<=r*r?s.site:null}}});function DGt(){var e=vGt,t=xGt,r=null;function n(i){return new yA(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Wr)*Wr,Math.round(t(o,a,i)/Wr)*Wr];return s.index=a,s.data=o,s}),r)}return n.polygons=function(i){return n(i).polygons()},n.links=function(i){return n(i).links()},n.triangles=function(i){return n(i).triangles()},n.x=function(i){return arguments.length?(e=typeof i=="function"?i:lnt(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:lnt(+i),n):t},n.extent=function(i){return arguments.length?(r=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(i){return arguments.length?(r=i==null?null:[[0,0],[+i[0],+i[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}var OGt=M(()=>{yGt();bGt();rS()});var zGt=M(()=>{OGt()});function BGt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Iz(r)}function Iz(e){this._=e}function $Re(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function KRe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function FGt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=XRe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var XRe,vA,HGt=M(()=>{XRe={value:function(){}};Iz.prototype=BGt.prototype={constructor:Iz,on:function(e,t){var r=this._,n=$Re(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=KRe(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=FGt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=FGt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Iz(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};vA=BGt});var mnt=M(()=>{HGt()});var Lz,gnt,_nt=M(()=>{Lz="http://www.w3.org/1999/xhtml",gnt={svg:"http://www.w3.org/2000/svg",xhtml:Lz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function fd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),gnt.hasOwnProperty(t)?{space:gnt[t],local:e}:e}var kz=M(()=>{_nt()});function ZRe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Lz&&t.documentElement.namespaceURI===Lz?t.createElement(e):t.createElementNS(r,e)}}function JRe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rz(e){var t=fd(e);return(t.local?JRe:ZRe)(t)}var ynt=M(()=>{kz();_nt()});function QRe(){}function Av(e){return e==null?QRe:function(){return this.querySelector(e)}}var Nz=M(()=>{});function VGt(e){typeof e!="function"&&(e=Av(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new mi(n,this._parents)}var UGt=M(()=>{Ou();Nz()});function tNe(){return[]}function xA(e){return e==null?tNe:function(){return this.querySelectorAll(e)}}var vnt=M(()=>{});function qGt(e){typeof e!="function"&&(e=xA(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new mi(n,i)}var GGt=M(()=>{Ou();vnt()});function bA(e){return function(){return this.matches(e)}}var xnt=M(()=>{});function WGt(e){typeof e!="function"&&(e=bA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new mi(n,this._parents)}var YGt=M(()=>{Ou();xnt()});function Dz(e){return new Array(e.length)}var bnt=M(()=>{});function jGt(){return new mi(this._enter||this._groups.map(Dz),this._parents)}function wA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var wnt=M(()=>{bnt();Ou();wA.prototype={constructor:wA,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function XGt(e){return function(){return e}}var $Gt=M(()=>{});function eNe(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new wA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function rNe(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=KGt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=KGt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new wA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function ZGt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?rNe:eNe,n=this._parents,i=this._groups;typeof e!="function"&&(e=XGt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new mi(a,n),a._enter=s,a._exit=l,a}var KGt,JGt=M(()=>{Ou();wnt();$Gt();KGt="$"});function QGt(){return new mi(this._exit||this._groups.map(Dz),this._parents)}var tWt=M(()=>{bnt();Ou()});function eWt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var rWt=M(()=>{});function nWt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new mi(a,this._parents)}var iWt=M(()=>{Ou()});function oWt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var aWt=M(()=>{});function sWt(e){e||(e=nNe);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new mi(i,this._parents).order()}function nNe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var lWt=M(()=>{Ou()});function cWt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var uWt=M(()=>{});function hWt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var fWt=M(()=>{});function pWt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var dWt=M(()=>{});function mWt(){var e=0;return this.each(function(){++e}),e}var gWt=M(()=>{});function _Wt(){return!this.node()}var yWt=M(()=>{});function vWt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var xWt=M(()=>{});function iNe(e){return function(){this.removeAttribute(e)}}function oNe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aNe(e,t){return function(){this.setAttribute(e,t)}}function sNe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function lNe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function cNe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function bWt(e,t){var r=fd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?oNe:iNe:typeof t=="function"?r.local?cNe:lNe:r.local?sNe:aNe)(r,t))}var wWt=M(()=>{kz()});function Oz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Snt=M(()=>{});function uNe(e){return function(){this.style.removeProperty(e)}}function hNe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function fNe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function SWt(e,t,r){return arguments.length>1?this.each((t==null?uNe:typeof t=="function"?fNe:hNe)(e,t,r==null?"":r)):qg(this.node(),e)}function qg(e,t){return e.style.getPropertyValue(t)||Oz(e).getComputedStyle(e,null).getPropertyValue(t)}var Mnt=M(()=>{Snt()});function pNe(e){return function(){delete this[e]}}function dNe(e,t){return function(){this[e]=t}}function mNe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function MWt(e,t){return arguments.length>1?this.each((t==null?pNe:typeof t=="function"?mNe:dNe)(e,t)):this.node()[e]}var EWt=M(()=>{});function TWt(e){return e.trim().split(/^|\s+/)}function Ent(e){return e.classList||new CWt(e)}function CWt(e){this._node=e,this._names=TWt(e.getAttribute("class")||"")}function AWt(e,t){for(var r=Ent(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function PWt(e,t){for(var r=Ent(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function gNe(e){return function(){AWt(this,e)}}function _Ne(e){return function(){PWt(this,e)}}function yNe(e,t){return function(){(t.apply(this,arguments)?AWt:PWt)(this,e)}}function IWt(e,t){var r=TWt(e+"");if(arguments.length<2){for(var n=Ent(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?yNe:t?gNe:_Ne)(r,t))}var LWt=M(()=>{CWt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function vNe(){this.textContent=""}function xNe(e){return function(){this.textContent=e}}function bNe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function kWt(e){return arguments.length?this.each(e==null?vNe:(typeof e=="function"?bNe:xNe)(e)):this.node().textContent}var RWt=M(()=>{});function wNe(){this.innerHTML=""}function SNe(e){return function(){this.innerHTML=e}}function MNe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function NWt(e){return arguments.length?this.each(e==null?wNe:(typeof e=="function"?MNe:SNe)(e)):this.node().innerHTML}var DWt=M(()=>{});function ENe(){this.nextSibling&&this.parentNode.appendChild(this)}function OWt(){return this.each(ENe)}var zWt=M(()=>{});function TNe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function FWt(){return this.each(TNe)}var BWt=M(()=>{});function HWt(e){var t=typeof e=="function"?e:Rz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var VWt=M(()=>{ynt()});function CNe(){return null}function UWt(e,t){var r=typeof e=="function"?e:Rz(e),n=t==null?CNe:typeof t=="function"?t:Av(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var qWt=M(()=>{ynt();Nz()});function ANe(){var e=this.parentNode;e&&e.removeChild(this)}function GWt(){return this.each(ANe)}var WWt=M(()=>{});function PNe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function INe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function YWt(e){return this.select(e?INe:PNe)}var jWt=M(()=>{});function XWt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var $Wt=M(()=>{});function LNe(e,t,r){return e=JWt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function JWt(e,t,r){return function(n){var i=Yr;Yr=n;try{e.call(this,this.__data__,t,r)}finally{Yr=i}}}function kNe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function RNe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function NNe(e,t,r){var n=ZWt.hasOwnProperty(e.type)?LNe:JWt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function QWt(e,t,r){var n=kNe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?NNe:RNe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Tnt(e,t,r,n){var i=Yr;e.sourceEvent=Yr,Yr=e;try{return t.apply(r,n)}finally{Yr=i}}var ZWt,Yr,KWt,zz=M(()=>{ZWt={},Yr=null;typeof document!="undefined"&&(KWt=document.documentElement,"onmouseenter"in KWt||(ZWt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function tYt(e,t,r){var n=Oz(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function DNe(e,t){return function(){return tYt(this,e,t)}}function ONe(e,t){return function(){return tYt(this,e,t.apply(this,arguments))}}function eYt(e,t){return this.each((typeof t=="function"?ONe:DNe)(e,t))}var rYt=M(()=>{Snt()});function mi(e,t){this._groups=e,this._parents=t}function nYt(){return new mi([[document.documentElement]],Cnt)}var Cnt,pd,Ou=M(()=>{UGt();GGt();YGt();JGt();wnt();tWt();rWt();iWt();aWt();lWt();uWt();fWt();dWt();gWt();yWt();xWt();wWt();Mnt();EWt();LWt();RWt();DWt();zWt();BWt();VWt();qWt();WWt();jWt();$Wt();zz();rYt();Cnt=[null];mi.prototype=nYt.prototype={constructor:mi,select:VGt,selectAll:qGt,filter:WGt,data:ZGt,enter:jGt,exit:QGt,join:eWt,merge:nWt,order:oWt,sort:sWt,call:cWt,nodes:hWt,node:pWt,size:mWt,empty:_Wt,each:vWt,attr:bWt,style:SWt,property:MWt,classed:IWt,text:kWt,html:NWt,raise:OWt,lower:FWt,append:HWt,insert:UWt,remove:GWt,clone:YWt,datum:XWt,on:QWt,dispatch:eYt};pd=nYt});function dd(e){return typeof e=="string"?new mi([[document.querySelector(e)]],[document.documentElement]):new mi([[e]],Cnt)}var iYt=M(()=>{Ou()});function Fz(){for(var e=Yr,t;t=e.sourceEvent;)e=t;return e}var Ant=M(()=>{zz()});function Bz(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var Pnt=M(()=>{});function iS(e){var t=Fz();return t.changedTouches&&(t=t.changedTouches[0]),Bz(e,t)}var oYt=M(()=>{Ant();Pnt()});function Hz(e,t,r){arguments.length<3&&(r=t,t=Fz().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Bz(e,o);return null}var aYt=M(()=>{Ant();Pnt()});var Ls=M(()=>{xnt();oYt();kz();iYt();Ou();Nz();vnt();Mnt();aYt();zz()});function Vz(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var sYt=M(()=>{Ls()});function Int(e){var t=e.document.documentElement,r=dd(e).on("dragstart.drag",Vz,!0);"onselectstart"in t?r.on("selectstart.drag",Vz,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Lnt(e,t){var r=e.document.documentElement,n=dd(e).on("dragstart.drag",null);t&&(n.on("click.drag",Vz,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var lYt=M(()=>{Ls();sYt()});var cYt=M(()=>{lYt()});function Uz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function knt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var uYt=M(()=>{});function EA(){}function fYt(){return this.rgb().formatHex()}function GNe(){return yYt(this).formatHsl()}function pYt(){return this.rgb().formatRgb()}function Gg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zNe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?dYt(t):r===3?new _l(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FNe.exec(e))?new _l(t[1],t[2],t[3],1):(t=BNe.exec(e))?new _l(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=HNe.exec(e))?qz(t[1],t[2],t[3],t[4]):(t=VNe.exec(e))?qz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UNe.exec(e))?_Yt(t[1],t[2]/100,t[3]/100,1):(t=qNe.exec(e))?_Yt(t[1],t[2]/100,t[3]/100,t[4]):hYt.hasOwnProperty(e)?dYt(hYt[e]):e==="transparent"?new _l(NaN,NaN,NaN,0):null}function dYt(e){return new _l(e>>16&255,e>>8&255,e&255,1)}function qz(e,t,r,n){return n<=0&&(e=t=r=NaN),new _l(e,t,r,n)}function WNe(e){return e instanceof EA||(e=Gg(e)),e?(e=e.rgb(),new _l(e.r,e.g,e.b,e.opacity)):new _l}function aS(e,t,r,n){return arguments.length===1?WNe(e):new _l(e,t,r,n==null?1:n)}function _l(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function mYt(){return"#"+Rnt(this.r)+Rnt(this.g)+Rnt(this.b)}function gYt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function Rnt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function _Yt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Af(e,t,r,n)}function yYt(e){if(e instanceof Af)return new Af(e.h,e.s,e.l,e.opacity);if(e instanceof EA||(e=Gg(e)),!e)return new Af;if(e instanceof Af)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Af(a,s,l,e.opacity)}function vYt(e,t,r,n){return arguments.length===1?yYt(e):new Af(e,t,r,n==null?1:n)}function Af(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Nnt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var SA,Gz,oS,MA,Pf,zNe,FNe,BNe,HNe,VNe,UNe,qNe,hYt,xYt=M(()=>{uYt();SA=.7,Gz=1/SA,oS="\\s*([+-]?\\d+)\\s*",MA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zNe=/^#([0-9a-f]{3,8})$/,FNe=new RegExp("^rgb\\("+[oS,oS,oS]+"\\)$"),BNe=new RegExp("^rgb\\("+[Pf,Pf,Pf]+"\\)$"),HNe=new RegExp("^rgba\\("+[oS,oS,oS,MA]+"\\)$"),VNe=new RegExp("^rgba\\("+[Pf,Pf,Pf,MA]+"\\)$"),UNe=new RegExp("^hsl\\("+[MA,Pf,Pf]+"\\)$"),qNe=new RegExp("^hsla\\("+[MA,Pf,Pf,MA]+"\\)$"),hYt={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};Uz(EA,Gg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:fYt,formatHex:fYt,formatHsl:GNe,formatRgb:pYt,toString:pYt});Uz(_l,aS,knt(EA,{brighter:function(e){return e=e==null?Gz:Math.pow(Gz,e),new _l(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?SA:Math.pow(SA,e),new _l(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mYt,formatHex:mYt,formatRgb:gYt,toString:gYt}));Uz(Af,vYt,knt(EA,{brighter:function(e){return e=e==null?Gz:Math.pow(Gz,e),new Af(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?SA:Math.pow(SA,e),new Af(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _l(Nnt(e>=240?e-240:e+120,i,n),Nnt(e,i,n),Nnt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var Dnt=M(()=>{xYt()});function Ont(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function bYt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Ont((r-n/t)*t,a,i,o,s)}}var znt=M(()=>{});function wYt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Ont((r-n/t)*t,i,o,a,s)}}var SYt=M(()=>{znt()});function Fnt(e){return function(){return e}}var MYt=M(()=>{});function YNe(e,t){return function(r){return e+r*t}}function jNe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function EYt(e){return(e=+e)==1?Wz:function(t,r){return r-t?jNe(t,r,e):Fnt(isNaN(t)?r:t)}}function Wz(e,t){var r=t-e;return r?YNe(e,r):Fnt(isNaN(e)?t:e)}var TYt=M(()=>{MYt()});function CYt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=aS(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var Yz,XNe,$Ne,AYt=M(()=>{Dnt();znt();SYt();TYt();Yz=function e(t){var r=EYt(t);function n(i,o){var a=r((i=aS(i)).r,(o=aS(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Wz(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);XNe=CYt(bYt),$Ne=CYt(wYt)});function Ic(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var jz=M(()=>{});function KNe(e){return function(){return e}}function ZNe(e){return function(t){return e(t)+""}}function Vnt(e,t){var r=Hnt.lastIndex=Bnt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Hnt.exec(e))&&(i=Bnt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ic(n,i)})),r=Bnt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?ZNe(l[0].x):KNe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var Hnt,Bnt,PYt=M(()=>{jz();Hnt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bnt=new RegExp(Hnt.source,"g")});function Unt(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*IYt,skewX:Math.atan(l)*IYt,scaleX:a,scaleY:s}}var IYt,Xz,LYt=M(()=>{IYt=180/Math.PI,Xz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function RYt(e){return e==="none"?Xz:(TA||(TA=document.createElement("DIV"),qnt=document.documentElement,kYt=document.defaultView),TA.style.transform=e,e=kYt.getComputedStyle(qnt.appendChild(TA),null).getPropertyValue("transform"),qnt.removeChild(TA),e=e.slice(7,-1).split(","),Unt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function NYt(e){return e==null?Xz:($z||($z=document.createElementNS("http://www.w3.org/2000/svg","g")),$z.setAttribute("transform",e),(e=$z.transform.baseVal.consolidate())?(e=e.matrix,Unt(e.a,e.b,e.c,e.d,e.e,e.f)):Xz)}var TA,qnt,kYt,$z,DYt=M(()=>{LYt()});function OYt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Ic(c,h)},{i:g-2,x:Ic(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ic(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ic(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Ic(c,h)},{i:g-2,x:Ic(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var Gnt,Wnt,zYt=M(()=>{jz();DYt();Gnt=OYt(RYt,"px, ","px)","deg)"),Wnt=OYt(NYt,", ",")",")")});function BYt(e){return((e=Math.exp(e))+1/e)/2}function QNe(e){return((e=Math.exp(e))-1/e)/2}function tDe(e){return((e=Math.exp(2*e))-1)/(e+1)}function jnt(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<JNe)f=Math.log(s/i)/CA,h=function(x){return[r+x*l,n+x*c,i*Math.exp(CA*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+FYt*u)/(2*i*Ynt*p),g=(s*s-i*i-FYt*u)/(2*s*Ynt*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/CA,h=function(x){var b=x*f,S=BYt(_),C=i/(Ynt*p)*(S*tDe(CA*b+_)-QNe(_));return[r+C*l,n+C*c,i*S/BYt(CA*b+_)]}}return h.duration=f*1e3,h}var CA,Ynt,FYt,JNe,HYt=M(()=>{CA=Math.SQRT2,Ynt=2,FYt=4,JNe=1e-12});var AA=M(()=>{jz();PYt();zYt();HYt();AYt()});function lS(){return Pv||(qYt(eDe),Pv=kA.now()+Jz)}function eDe(){Pv=0}function RA(){this._call=this._time=this._next=null}function Qz(e,t,r){var n=new RA;return n.restart(e,t,r),n}function GYt(){lS(),++sS;for(var e=Kz,t;e;)(t=Pv-e._time)>=0&&e._call.call(null,t),e=e._next;--sS}function VYt(){Pv=(Zz=kA.now())+Jz,sS=IA=0;try{GYt()}finally{sS=0,nDe(),Pv=0}}function rDe(){var e=kA.now(),t=e-Zz;t>UYt&&(Jz-=t,Zz=e)}function nDe(){for(var e,t=Kz,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Kz=r);LA=e,Xnt(n)}function Xnt(e){if(!sS){IA&&(IA=clearTimeout(IA));var t=e-Pv;t>24?(e<1/0&&(IA=setTimeout(VYt,e-kA.now()-Jz)),PA&&(PA=clearInterval(PA))):(PA||(Zz=kA.now(),PA=setInterval(rDe,UYt)),sS=1,qYt(VYt))}}var sS,IA,PA,UYt,Kz,LA,Zz,Pv,Jz,kA,qYt,$nt=M(()=>{sS=0,IA=0,PA=0,UYt=1e3,Zz=0,Pv=0,Jz=0,kA=typeof performance=="object"&&performance.now?performance:Date,qYt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};RA.prototype=Qz.prototype={constructor:RA,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?lS():+r)+(t==null?0:+t),!this._next&&LA!==this&&(LA?LA._next=this:Kz=this,LA=this),this._call=e,this._time=r,Xnt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xnt())}}});function tF(e,t,r){var n=new RA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var WYt=M(()=>{$nt()});var Knt=M(()=>{$nt();WYt()});function Wg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;aDe(e,r,{name:t,index:n,group:i,on:iDe,tween:oDe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jYt})}function DA(e,t){var r=oo(e,t);if(r.state>jYt)throw new Error("too late; already scheduled");return r}function Qa(e,t){var r=oo(e,t);if(r.state>eF)throw new Error("too late; already running");return r}function oo(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function aDe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Qz(o,0,r.time);function o(c){r.state=Znt,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==Znt)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===eF)return tF(a);p.state===YYt?(p.state=NA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=NA,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(tF(function(){r.state===eF&&(r.state=YYt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=rF,r.on.call("start",e,e.__data__,r.index,r.group),r.state===rF){for(r.state=eF,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=nF,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===nF&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=NA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var iDe,oDe,jYt,Znt,rF,eF,YYt,nF,NA,ks=M(()=>{mnt();Knt();iDe=vA("start","end","cancel","interrupt"),oDe=[],jYt=0,Znt=1,rF=2,eF=3,YYt=4,nF=5,NA=6});function Iv(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>rF&&n.state<nF,n.state=NA,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Jnt=M(()=>{ks()});function XYt(e){return this.each(function(){Iv(this,e)})}var $Yt=M(()=>{Jnt()});function sDe(e,t){var r,n;return function(){var i=Qa(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function lDe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Qa(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function KYt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=oo(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?sDe:lDe)(r,e,t))}function cS(e,t,r){var n=e._id;return e.each(function(){var i=Qa(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return oo(i,n).value[t]}}var OA=M(()=>{ks()});function iF(e,t){var r;return(typeof t=="number"?Ic:t instanceof Gg?Yz:(r=Gg(t))?(t=r,Yz):Vnt)(e,t)}var Qnt=M(()=>{Dnt();AA()});function cDe(e){return function(){this.removeAttribute(e)}}function uDe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hDe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function fDe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function pDe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function dDe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function ZYt(e,t){var r=fd(e),n=r==="transform"?Wnt:iF;return this.attrTween(e,typeof t=="function"?(r.local?dDe:pDe)(r,n,cS(this,"attr."+e,t)):t==null?(r.local?uDe:cDe)(r):(r.local?fDe:hDe)(r,n,t))}var JYt=M(()=>{AA();Ls();OA();Qnt()});function mDe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function gDe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function _De(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&gDe(e,o)),r}return i._value=t,i}function yDe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&mDe(e,o)),r}return i._value=t,i}function QYt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=fd(e);return this.tween(r,(n.local?_De:yDe)(n,t))}var tjt=M(()=>{Ls()});function vDe(e,t){return function(){DA(this,e).delay=+t.apply(this,arguments)}}function xDe(e,t){return t=+t,function(){DA(this,e).delay=t}}function ejt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vDe:xDe)(t,e)):oo(this.node(),t).delay}var rjt=M(()=>{ks()});function bDe(e,t){return function(){Qa(this,e).duration=+t.apply(this,arguments)}}function wDe(e,t){return t=+t,function(){Qa(this,e).duration=t}}function njt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bDe:wDe)(t,e)):oo(this.node(),t).duration}var ijt=M(()=>{ks()});function SDe(e,t){if(typeof t!="function")throw new Error;return function(){Qa(this,e).ease=t}}function ojt(e){var t=this._id;return arguments.length?this.each(SDe(t,e)):oo(this.node(),t).ease}var ajt=M(()=>{ks()});function sjt(e){typeof e!="function"&&(e=bA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new ma(n,this._parents,this._name,this._id)}var ljt=M(()=>{Ls();md()});function cjt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new ma(a,this._parents,this._name,this._id)}var ujt=M(()=>{md()});function MDe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function EDe(e,t,r){var n,i,o=MDe(t)?DA:Qa;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function hjt(e,t){var r=this._id;return arguments.length<2?oo(this.node(),r).on.on(e):this.each(EDe(r,e,t))}var fjt=M(()=>{ks()});function TDe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pjt(){return this.on("end.remove",TDe(this._id))}var djt=M(()=>{});function mjt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Av(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Wg(c[f],t,r,f,c,oo(u,r)));return new ma(o,this._parents,t,r)}var gjt=M(()=>{Ls();md();ks()});function _jt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=xA(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=oo(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Wg(p,t,r,g,f,d);o.push(f),a.push(u)}return new ma(o,a,t,r)}var yjt=M(()=>{Ls();md();ks()});function vjt(){return new CDe(this._groups,this._parents)}var CDe,xjt=M(()=>{Ls();CDe=pd.prototype.constructor});function ADe(e,t){var r,n,i;return function(){var o=qg(this,e),a=(this.style.removeProperty(e),qg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function bjt(e){return function(){this.style.removeProperty(e)}}function PDe(e,t,r){var n,i=r+"",o;return function(){var a=qg(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function IDe(e,t,r){var n,i,o;return function(){var a=qg(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),qg(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function LDe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Qa(this,e),c=l.on,u=l.value[o]==null?s||(s=bjt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function wjt(e,t,r){var n=(e+="")=="transform"?Gnt:iF;return t==null?this.styleTween(e,ADe(e,n)).on("end.style."+e,bjt(e)):typeof t=="function"?this.styleTween(e,IDe(e,n,cS(this,"style."+e,t))).each(LDe(this._id,e)):this.styleTween(e,PDe(e,n,t),r).on("end.style."+e,null)}var Sjt=M(()=>{AA();Ls();ks();OA();Qnt()});function kDe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function RDe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&kDe(e,a,r)),n}return o._value=t,o}function Mjt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,RDe(e,t,r==null?"":r))}var Ejt=M(()=>{});function NDe(e){return function(){this.textContent=e}}function DDe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Tjt(e){return this.tween("text",typeof e=="function"?DDe(cS(this,"text",e)):NDe(e==null?"":e+""))}var Cjt=M(()=>{OA()});function ODe(e){return function(t){this.textContent=e.call(this,t)}}function zDe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&ODe(i)),t}return n._value=e,n}function Ajt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,zDe(e))}var Pjt=M(()=>{});function Ijt(){for(var e=this._name,t=this._id,r=oF(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=oo(l,t);Wg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ma(n,this._parents,e,r)}var Ljt=M(()=>{md();ks()});function kjt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=Qa(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var Rjt=M(()=>{ks()});function ma(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function tit(e){return pd().transition(e)}function oF(){return++FDe}var FDe,uS,md=M(()=>{Ls();JYt();tjt();rjt();ijt();ajt();ljt();ujt();fjt();djt();gjt();yjt();xjt();Sjt();Ejt();Cjt();Pjt();Ljt();OA();Rjt();FDe=0;uS=pd.prototype;ma.prototype=tit.prototype={constructor:ma,select:mjt,selectAll:_jt,filter:sjt,merge:cjt,selection:vjt,transition:Ijt,call:uS.call,nodes:uS.nodes,node:uS.node,size:uS.size,empty:uS.empty,each:uS.each,on:hjt,attr:ZYt,attrTween:QYt,style:wjt,styleTween:Mjt,text:Tjt,textTween:Ajt,remove:pjt,tween:KYt,delay:ejt,duration:njt,ease:ojt,end:kjt}});function BDe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return eit.time=lS(),eit;return r}function Njt(e){var t,r;e instanceof ma?(t=e._id,e=e._name):(t=oF(),(r=eit).time=lS(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Wg(l,e,t,c,a,r||BDe(l,t));return new ma(n,this._parents,e,t)}var eit,Djt=M(()=>{md();ks();L_();Knt();eit={time:null,delay:0,duration:250,ease:bs}});var Ojt=M(()=>{Ls();$Yt();Djt();pd.prototype.interrupt=XYt;pd.prototype.transition=Njt});var zjt=M(()=>{md();ks()});var Fjt=M(()=>{Ojt();md();zjt();Jnt()});function zA(e){return function(){return e}}var Bjt=M(()=>{});function rit(e,t,r){this.target=e,this.type=t,this.transform=r}var Hjt=M(()=>{});function If(e,t,r){this.k=e,this.x=t,this.y=r}function aF(e){return e.__zoom||hS}var hS,nit=M(()=>{If.prototype={constructor:If,scale:function(e){return e===1?this:new If(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new If(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};hS=new If(1,0,0);aF.prototype=If.prototype});function sF(){Yr.stopImmediatePropagation()}function fS(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var Vjt=M(()=>{Ls()});function HDe(){return!Yr.button}function VDe(){var e=this,t,r;return e instanceof SVGElement?(e=e.ownerSVGElement||e,t=e.width.baseVal.value,r=e.height.baseVal.value):(t=e.clientWidth,r=e.clientHeight),[[0,0],[t,r]]}function Ujt(){return this.__zoom||hS}function UDe(){return-Yr.deltaY*(Yr.deltaMode?120:1)/500}function qDe(){return"ontouchstart"in this}function GDe(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function qjt(){var e=HDe,t=VDe,r=GDe,n=UDe,i=qDe,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=jnt,c=[],u=vA("start","zoom","end"),h,f,p=500,d=150,g=0;function _(R){R.property("__zoom",Ujt).on("wheel.zoom",k).on("mousedown.zoom",O).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",L).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(R,F){var z=R.selection?R.selection():R;z.property("__zoom",Ujt),R!==z?S(R,F):z.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(R,F){_.scaleTo(R,function(){var z=this.__zoom.k,U=typeof F=="function"?F.apply(this,arguments):F;return z*U})},_.scaleTo=function(R,F){_.transform(R,function(){var z=t.apply(this,arguments),U=this.__zoom,W=b(z),Z=U.invert(W),rt=typeof F=="function"?F.apply(this,arguments):F;return r(x(y(U,rt),W,Z),z,a)})},_.translateBy=function(R,F,z){_.transform(R,function(){return r(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),a)})},_.translateTo=function(R,F,z){_.transform(R,function(){var U=t.apply(this,arguments),W=this.__zoom,Z=b(U);return r(hS.translate(Z[0],Z[1]).scale(W.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),U,a)})};function y(R,F){return F=Math.max(o[0],Math.min(o[1],F)),F===R.k?R:new If(F,R.x,R.y)}function x(R,F,z){var U=F[0]-z[0]*R.k,W=F[1]-z[1]*R.k;return U===R.x&&W===R.y?R:new If(R.k,U,W)}function b(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function S(R,F,z){R.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var U=this,W=arguments,Z=C(U,W),rt=t.apply(U,W),ot=z||b(rt),st=Math.max(rt[1][0]-rt[0][0],rt[1][1]-rt[0][1]),St=U.__zoom,bt=typeof F=="function"?F.apply(U,W):F,Mt=l(St.invert(ot).concat(st/St.k),bt.invert(ot).concat(st/bt.k));return function(lt){if(lt===1)lt=bt;else{var Kt=Mt(lt),_t=st/Kt[2];lt=new If(_t,ot[0]-Kt[0]*_t,ot[1]-Kt[1]*_t)}Z.zoom(null,lt)}})}function C(R,F){for(var z=0,U=c.length,W;z<U;++z)if((W=c[z]).that===R)return W;return new P(R,F)}function P(R,F){this.that=R,this.args=F,this.index=-1,this.active=0,this.extent=t.apply(R,F)}P.prototype={start:function(){return++this.active===1&&(this.index=c.push(this)-1,this.emit("start")),this},zoom:function(R,F){return this.mouse&&R!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(c.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(R){Tnt(new rit(_,R,this.that.__zoom),u.apply,u,[R,this.that,this.args])}};function k(){if(!e.apply(this,arguments))return;var R=C(this,arguments),F=this.__zoom,z=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,n.apply(this,arguments)))),U=iS(this);if(R.wheel)(R.mouse[0][0]!==U[0]||R.mouse[0][1]!==U[1])&&(R.mouse[1]=F.invert(R.mouse[0]=U)),clearTimeout(R.wheel);else{if(F.k===z)return;R.mouse=[U,F.invert(U)],Iv(this),R.start()}fS(),R.wheel=setTimeout(W,d),R.zoom("mouse",r(x(y(F,z),R.mouse[0],R.mouse[1]),R.extent,a));function W(){R.wheel=null,R.end()}}function O(){if(f||!e.apply(this,arguments))return;var R=C(this,arguments),F=dd(Yr.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",rt,!0),z=iS(this),U=Yr.clientX,W=Yr.clientY;Int(Yr.view),sF(),R.mouse=[z,this.__zoom.invert(z)],Iv(this),R.start();function Z(){if(fS(),!R.moved){var ot=Yr.clientX-U,st=Yr.clientY-W;R.moved=ot*ot+st*st>g}R.zoom("mouse",r(x(R.that.__zoom,R.mouse[0]=iS(R.that),R.mouse[1]),R.extent,a))}function rt(){F.on("mousemove.zoom mouseup.zoom",null),Lnt(Yr.view,R.moved),fS(),R.end()}}function D(){if(!!e.apply(this,arguments)){var R=this.__zoom,F=iS(this),z=R.invert(F),U=R.k*(Yr.shiftKey?.5:2),W=r(x(y(R,U),F,z),t.apply(this,arguments),a);fS(),s>0?dd(this).transition().duration(s).call(S,W,F):dd(this).call(_.transform,W)}}function B(){if(!!e.apply(this,arguments)){var R=C(this,arguments),F=Yr.changedTouches,z,U=F.length,W,Z,rt;for(sF(),W=0;W<U;++W)Z=F[W],rt=Hz(this,F,Z.identifier),rt=[rt,this.__zoom.invert(rt),Z.identifier],R.touch0?R.touch1||(R.touch1=rt):(R.touch0=rt,z=!0);if(h&&(h=clearTimeout(h),!R.touch1)){R.end(),rt=dd(this).on("dblclick.zoom"),rt&&rt.apply(this,arguments);return}z&&(h=setTimeout(function(){h=null},p),Iv(this),R.start())}}function I(){var R=C(this,arguments),F=Yr.changedTouches,z=F.length,U,W,Z,rt;for(fS(),h&&(h=clearTimeout(h)),U=0;U<z;++U)W=F[U],Z=Hz(this,F,W.identifier),R.touch0&&R.touch0[2]===W.identifier?R.touch0[0]=Z:R.touch1&&R.touch1[2]===W.identifier&&(R.touch1[0]=Z);if(W=R.that.__zoom,R.touch1){var ot=R.touch0[0],st=R.touch0[1],St=R.touch1[0],bt=R.touch1[1],Mt=(Mt=St[0]-ot[0])*Mt+(Mt=St[1]-ot[1])*Mt,lt=(lt=bt[0]-st[0])*lt+(lt=bt[1]-st[1])*lt;W=y(W,Math.sqrt(Mt/lt)),Z=[(ot[0]+St[0])/2,(ot[1]+St[1])/2],rt=[(st[0]+bt[0])/2,(st[1]+bt[1])/2]}else if(R.touch0)Z=R.touch0[0],rt=R.touch0[1];else return;R.zoom("touch",r(x(W,Z,rt),R.extent,a))}function L(){var R=C(this,arguments),F=Yr.changedTouches,z=F.length,U,W;for(sF(),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),U=0;U<z;++U)W=F[U],R.touch0&&R.touch0[2]===W.identifier?delete R.touch0:R.touch1&&R.touch1[2]===W.identifier&&delete R.touch1;R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0?R.touch0[1]=this.__zoom.invert(R.touch0[0]):R.end()}return _.wheelDelta=function(R){return arguments.length?(n=typeof R=="function"?R:zA(+R),_):n},_.filter=function(R){return arguments.length?(e=typeof R=="function"?R:zA(!!R),_):e},_.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:zA(!!R),_):i},_.extent=function(R){return arguments.length?(t=typeof R=="function"?R:zA([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),_):t},_.scaleExtent=function(R){return arguments.length?(o[0]=+R[0],o[1]=+R[1],_):[o[0],o[1]]},_.translateExtent=function(R){return arguments.length?(a[0][0]=+R[0][0],a[1][0]=+R[1][0],a[0][1]=+R[0][1],a[1][1]=+R[1][1],_):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},_.constrain=function(R){return arguments.length?(r=R,_):r},_.duration=function(R){return arguments.length?(s=+R,_):s},_.interpolate=function(R){return arguments.length?(l=R,_):l},_.on=function(){var R=u.on.apply(u,arguments);return R===u?_:R},_.clickDistance=function(R){return arguments.length?(g=(R=+R)*R,_):Math.sqrt(g)},_}var Gjt=M(()=>{mnt();cYt();AA();Ls();Fjt();Bjt();Hjt();nit();Vjt()});var Wjt=M(()=>{Gjt();nit()});var Mr={};Zs(Mr,{active:()=>mGt,arc:()=>gFt,area:()=>b7,areaRadial:()=>ket,ascending:()=>_c,axisBottom:()=>ZMt,axisLeft:()=>JMt,axisRight:()=>KMt,axisTop:()=>$Mt,bisect:()=>sR,bisectLeft:()=>sMt,bisectRight:()=>x$,bisector:()=>aR,brush:()=>yCt,brushSelection:()=>mCt,brushX:()=>gCt,brushY:()=>_Ct,chord:()=>UCt,clientPoint:()=>Og,cluster:()=>GLt,color:()=>x2,create:()=>tFt,creator:()=>Dg,cross:()=>cMt,csv:()=>pNt,csvFormat:()=>yPt,csvFormatRows:()=>vPt,csvParse:()=>gPt,csvParseRows:()=>_Pt,cubehelix:()=>uN,curveBasis:()=>OFt,curveBasisClosed:()=>FFt,curveBasisOpen:()=>VFt,curveBundle:()=>GFt,curveCardinal:()=>YFt,curveCardinalClosed:()=>jFt,curveCardinalOpen:()=>XFt,curveCatmullRom:()=>KFt,curveCatmullRomClosed:()=>JFt,curveCatmullRomOpen:()=>eBt,curveLinear:()=>Bg,curveLinearClosed:()=>iBt,curveMonotoneX:()=>hBt,curveMonotoneY:()=>fBt,curveNatural:()=>gBt,curveStep:()=>yBt,curveStepAfter:()=>xBt,curveStepBefore:()=>vBt,customEvent:()=>Xzt,descending:()=>hMt,deviation:()=>cR,dispatch:()=>kAt,drag:()=>hPt,dragDisable:()=>EN,dragEnable:()=>TN,dsvFormat:()=>w2,easeBack:()=>OZ,easeBackIn:()=>JPt,easeBackInOut:()=>OZ,easeBackOut:()=>QPt,easeBounce:()=>S2,easeBounceIn:()=>$Pt,easeBounceInOut:()=>KPt,easeBounceOut:()=>S2,easeCircle:()=>RZ,easeCircleIn:()=>YPt,easeCircleInOut:()=>RZ,easeCircleOut:()=>jPt,easeCubic:()=>AZ,easeCubicIn:()=>kPt,easeCubicInOut:()=>AZ,easeCubicOut:()=>RPt,easeElastic:()=>BZ,easeElasticIn:()=>e6t,easeElasticInOut:()=>r6t,easeElasticOut:()=>BZ,easeExp:()=>kZ,easeExpIn:()=>qPt,easeExpInOut:()=>kZ,easeExpOut:()=>GPt,easeLinear:()=>CPt,easePoly:()=>IZ,easePolyIn:()=>DPt,easePolyInOut:()=>IZ,easePolyOut:()=>OPt,easeQuad:()=>CZ,easeQuadIn:()=>PPt,easeQuadInOut:()=>CZ,easeQuadOut:()=>IPt,easeSin:()=>LZ,easeSinIn:()=>HPt,easeSinInOut:()=>LZ,easeSinOut:()=>VPt,entries:()=>hAt,event:()=>Pu,extent:()=>uR,forceCenter:()=>o6t,forceCollide:()=>F6t,forceLink:()=>j6t,forceManyBody:()=>lIt,forceRadial:()=>uIt,forceSimulation:()=>sIt,forceX:()=>fIt,forceY:()=>dIt,format:()=>rJ,formatDefaultLocale:()=>WN,formatLocale:()=>qN,formatPrefix:()=>nJ,formatSpecifier:()=>ky,geoAlbers:()=>DD,geoAlbersUsa:()=>vLt,geoArea:()=>UIt,geoAzimuthalEqualArea:()=>bLt,geoAzimuthalEqualAreaRaw:()=>zD,geoAzimuthalEquidistant:()=>SLt,geoAzimuthalEquidistantRaw:()=>FD,geoBounds:()=>KIt,geoCentroid:()=>n9t,geoCircle:()=>u9t,geoClipAntimeridian:()=>zT,geoClipCircle:()=>_D,geoClipExtent:()=>R9t,geoClipRectangle:()=>td,geoConicConformal:()=>TLt,geoConicConformalRaw:()=>fQ,geoConicEqualArea:()=>qy,geoConicEqualAreaRaw:()=>cQ,geoConicEquidistant:()=>PLt,geoConicEquidistantRaw:()=>dQ,geoContains:()=>V9t,geoDistance:()=>Hy,geoEquirectangular:()=>ALt,geoEquirectangularRaw:()=>Wy,geoGnomonic:()=>LLt,geoGnomonicRaw:()=>VD,geoGraticule:()=>SD,geoGraticule10:()=>W9t,geoIdentity:()=>RLt,geoInterpolate:()=>j9t,geoLength:()=>bD,geoMercator:()=>ELt,geoMercatorRaw:()=>Gy,geoNaturalEarth1:()=>DLt,geoNaturalEarth1Raw:()=>qD,geoOrthographic:()=>zLt,geoOrthographicRaw:()=>GD,geoPath:()=>fLt,geoProjection:()=>eo,geoProjectionMutator:()=>YT,geoRotation:()=>lD,geoStereographic:()=>BLt,geoStereographicRaw:()=>WD,geoStream:()=>Mo,geoTransform:()=>dLt,geoTransverseMercator:()=>VLt,geoTransverseMercatorRaw:()=>YD,hcl:()=>iZ,hierarchy:()=>jT,histogram:()=>xMt,hsl:()=>ZK,html:()=>oNt,interpolate:()=>Z2,interpolateArray:()=>fO,interpolateBasis:()=>cO,interpolateBasisClosed:()=>hO,interpolateCool:()=>E7t,interpolateCubehelix:()=>q8t,interpolateCubehelixDefault:()=>w7t,interpolateCubehelixLong:()=>G8t,interpolateDate:()=>dO,interpolateHcl:()=>B8t,interpolateHclLong:()=>H8t,interpolateHsl:()=>N8t,interpolateHslLong:()=>D8t,interpolateInferno:()=>I7t,interpolateLab:()=>$Q,interpolateMagma:()=>P7t,interpolateNumber:()=>Ps,interpolateObject:()=>mO,interpolatePlasma:()=>L7t,interpolateRainbow:()=>T7t,interpolateRgb:()=>eC,interpolateRgbBasis:()=>m8t,interpolateRgbBasisClosed:()=>g8t,interpolateRound:()=>_8t,interpolateString:()=>gO,interpolateTransformCss:()=>T8t,interpolateTransformSvg:()=>C8t,interpolateViridis:()=>A7t,interpolateWarm:()=>M7t,interpolateZoom:()=>L8t,interrupt:()=>dz,interval:()=>EVt,isoFormat:()=>gVt,isoParse:()=>_Vt,json:()=>sNt,keys:()=>sAt,lab:()=>lN,line:()=>Rw,lineRadial:()=>Iet,linkHorizontal:()=>CFt,linkRadial:()=>PFt,linkVertical:()=>AFt,local:()=>m7,map:()=>wy,matcher:()=>u7,max:()=>TMt,mean:()=>AMt,median:()=>IMt,merge:()=>kMt,min:()=>mR,mouse:()=>nFt,namespace:()=>Mw,namespaces:()=>EC,nest:()=>rAt,now:()=>Yw,pack:()=>Tkt,packEnclose:()=>$D,packSiblings:()=>wkt,pairs:()=>lMt,partition:()=>Akt,path:()=>K8t,permute:()=>NMt,pie:()=>SFt,pointRadial:()=>pv,polygonArea:()=>Q8t,polygonCentroid:()=>eRt,polygonContains:()=>lRt,polygonHull:()=>aRt,polygonLength:()=>uRt,precisionFixed:()=>AIt,precisionPrefix:()=>IIt,precisionRound:()=>kIt,quadtree:()=>xO,quantile:()=>my,quantize:()=>Y8t,queue:()=>wO,radialArea:()=>ket,radialLine:()=>Iet,randomBates:()=>tNt,randomExponential:()=>rNt,randomIrwinHall:()=>MO,randomLogNormal:()=>JRt,randomNormal:()=>SO,randomUniform:()=>KRt,range:()=>hR,request:()=>J2,rgb:()=>KK,ribbon:()=>KCt,scaleBand:()=>cC,scaleIdentity:()=>qO,scaleImplicit:()=>kO,scaleLinear:()=>UO,scaleLog:()=>WO,scaleOrdinal:()=>nw,scalePoint:()=>YNt,scalePow:()=>_C,scaleQuantile:()=>YO,scaleQuantize:()=>jO,scaleSequential:()=>i7,scaleSqrt:()=>aOt,scaleThreshold:()=>XO,scaleTime:()=>h7t,scaleUtc:()=>f7t,scan:()=>OMt,schemeCategory10:()=>d7t,schemeCategory20:()=>x7t,schemeCategory20b:()=>g7t,schemeCategory20c:()=>y7t,select:()=>d7,selectAll:()=>oFt,selection:()=>Qzt,selector:()=>Ew,selectorAll:()=>c7,set:()=>oAt,shuffle:()=>FMt,stack:()=>wBt,stackOffsetDiverging:()=>TBt,stackOffsetExpand:()=>MBt,stackOffsetNone:()=>Ru,stackOffsetSilhouette:()=>ABt,stackOffsetWiggle:()=>IBt,stackOrderAscending:()=>D7,stackOrderDescending:()=>kBt,stackOrderInsideOut:()=>NBt,stackOrderNone:()=>Nu,stackOrderReverse:()=>OBt,stratify:()=>kkt,style:()=>_et,sum:()=>HMt,symbol:()=>NFt,symbolCircle:()=>RC,symbolCross:()=>S7,symbolDiamond:()=>M7,symbolSquare:()=>T7,symbolStar:()=>E7,symbolTriangle:()=>C7,symbolWye:()=>A7,symbols:()=>RFt,text:()=>cNt,thresholdFreedmanDiaconis:()=>wMt,thresholdScott:()=>MMt,thresholdSturges:()=>pR,tickIncrement:()=>k$,tickStep:()=>fR,ticks:()=>vMt,timeDay:()=>ZBt,timeDays:()=>JBt,timeFormat:()=>wrt,timeFormatDefaultLocale:()=>X7,timeFormatLocale:()=>YC,timeFriday:()=>ort,timeFridays:()=>iHt,timeHour:()=>jBt,timeHours:()=>XBt,timeInterval:()=>Sr,timeMillisecond:()=>Zet,timeMilliseconds:()=>Jet,timeMinute:()=>qBt,timeMinutes:()=>GBt,timeMonday:()=>ert,timeMondays:()=>tHt,timeMonth:()=>lHt,timeMonths:()=>cHt,timeParse:()=>Srt,timeSaturday:()=>art,timeSaturdays:()=>oHt,timeSecond:()=>Qet,timeSeconds:()=>trt,timeSunday:()=>H7,timeSundays:()=>srt,timeThursday:()=>irt,timeThursdays:()=>nHt,timeTuesday:()=>rrt,timeTuesdays:()=>eHt,timeWednesday:()=>nrt,timeWednesdays:()=>rHt,timeWeek:()=>H7,timeWeeks:()=>srt,timeYear:()=>hHt,timeYears:()=>fHt,timeout:()=>SVt,timer:()=>Crt,timerFlush:()=>Art,touch:()=>sFt,touches:()=>cFt,transition:()=>Tz,transpose:()=>gR,tree:()=>Nkt,treemap:()=>Okt,treemapBinary:()=>Fkt,treemapDice:()=>cf,treemapResquarify:()=>Ukt,treemapSlice:()=>Sg,treemapSliceDice:()=>Hkt,treemapSquarify:()=>tO,tsv:()=>mNt,tsvFormat:()=>SPt,tsvFormatRows:()=>MPt,tsvParse:()=>bPt,tsvParseRows:()=>wPt,utcDay:()=>SHt,utcDays:()=>MHt,utcFormat:()=>jC,utcFriday:()=>prt,utcFridays:()=>IHt,utcHour:()=>vHt,utcHours:()=>xHt,utcMillisecond:()=>Zet,utcMilliseconds:()=>Jet,utcMinute:()=>mHt,utcMinutes:()=>gHt,utcMonday:()=>crt,utcMondays:()=>THt,utcMonth:()=>NHt,utcMonths:()=>DHt,utcParse:()=>XC,utcSaturday:()=>drt,utcSaturdays:()=>LHt,utcSecond:()=>Qet,utcSeconds:()=>trt,utcSunday:()=>V7,utcSundays:()=>mrt,utcThursday:()=>frt,utcThursdays:()=>PHt,utcTuesday:()=>urt,utcTuesdays:()=>CHt,utcWednesday:()=>hrt,utcWednesdays:()=>AHt,utcWeek:()=>V7,utcWeeks:()=>mrt,utcYear:()=>zHt,utcYears:()=>FHt,values:()=>cAt,variance:()=>lR,version:()=>iMt,voronoi:()=>DGt,window:()=>Cw,xml:()=>hNt,zip:()=>UMt,zoom:()=>qjt,zoomIdentity:()=>hS,zoomTransform:()=>aF});var Er=M(()=>{oMt();GMt();tEt();xCt();JCt();pAt();PAt();NAt();pPt();TPt();i6t();gIt();NIt();qLt();Gkt();X8t();J8t();fRt();GRt();$Rt();iNt();_Nt();N7t();hFt();FBt();HHt();vVt();CVt();_Gt();zGt();Wjt()});var $jt=H(Xjt=>{"use strict";Object.defineProperty(Xjt,"__esModule",{value:!0});var Yjt=(Er(),Ut(Mr)),Yg=Yjt,jjt=Yjt;function WDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Yg.select(this);for(var i in r)n.attr(i,r[i])})}function YDe(e,t){for(var r in t)e.attr(r,t[r]);return e}function jDe(e){return(typeof e=="function"?WDe:YDe)(this,e)}function XDe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Yg.select(this);for(var o in n)i.style(o,n[o],r)})}function $De(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function KDe(e,t){return(typeof e=="function"?XDe:$De)(this,e,t==null?"":t)}function ZDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Yg.select(this);for(var i in r)n.property(i,r[i])})}function JDe(e,t){for(var r in t)e.property(r,t[r]);return e}function QDe(e){return(typeof e=="function"?ZDe:JDe)(this,e)}function tOe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Yg.select(this).transition(e);for(var i in r)n.attr(i,r[i])})}function eOe(e,t){for(var r in t)e.attr(r,t[r]);return e}function rOe(e){return(typeof e=="function"?tOe:eOe)(this,e)}function nOe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Yg.select(this).transition(e);for(var o in n)i.style(o,n[o],r)})}function iOe(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function oOe(e,t){return(typeof e=="function"?nOe:iOe)(this,e,t==null?"":t)}Yg.selection.prototype.attrs=jDe;Yg.selection.prototype.styles=KDe;Yg.selection.prototype.properties=QDe;jjt.transition.prototype.attrs=rOe;jjt.transition.prototype.styles=oOe});var jg=H(iit=>{"use strict";Object.defineProperty(iit,"__esModule",{value:!0});var Kjt=(Er(),Ut(Mr));function aOe(e){if(e.attrs==null)if(e.nodes==null){var t=[];return e.each(function(){t.push(this)}),Kjt.selectAll(t)}else return Kjt.selectAll(e.nodes());else return e}iit.coerceExternalD3=aOe});var Lf=H(oit=>{"use strict";Object.defineProperty(oit,"__esModule",{value:!0});function sOe(e){return e.reduce(function(t,r){return t[r]=r,t},{})}oit.makeEnum=sOe});var Jjt=H(lF=>{"use strict";Object.defineProperty(lF,"__esModule",{value:!0});var dr=(L_(),Ut(Bvt)),lOe=jg(),cOe=Lf(),Zjt={linear:dr.easeLinear,quad:dr.easeQuad,quadIn:dr.easeQuadIn,quadOut:dr.easeQuadOut,quadInOut:dr.easeQuadInOut,cubic:dr.easeCubic,cubicIn:dr.easeCubicIn,cubicOut:dr.easeCubicOut,cubicInOut:dr.easeCubicInOut,poly:dr.easePoly,polyIn:dr.easePolyIn,polyOut:dr.easePolyOut,polyInOut:dr.easePolyInOut,sin:dr.easeSin,sinIn:dr.easeSinIn,sinOut:dr.easeSinOut,sinInOut:dr.easeSinInOut,exp:dr.easeExp,expIn:dr.easeExpIn,expOut:dr.easeExpOut,expInOut:dr.easeExpInOut,circle:dr.easeCircle,circleIn:dr.easeCircleIn,circleOut:dr.easeCircleOut,circleInOut:dr.easeCircleInOut,bounce:dr.easeBounce,bounceIn:dr.easeBounceIn,bounceOut:dr.easeBounceOut,bounceInOut:dr.easeBounceInOut,back:dr.easeBack,backIn:dr.easeBackIn,backOut:dr.easeBackOut,backInOut:dr.easeBackInOut,elastic:dr.easeElastic,elasticIn:dr.easeElasticIn,elasticOut:dr.easeElasticOut,elasticInOut:dr.easeElasticInOut};lF.EaseName=cOe.makeEnum(["linear","quad","quadIn","quadOut","quadInOut","cubic","cubicIn","cubicOut","cubicInOut","poly","polyIn","polyOut","polyInOut","sin","sinIn","sinOut","sinInOut","exp","expIn","expOut","expInOut","circle","circleIn","circleOut","circleInOut","bounce","bounceIn","bounceOut","bounceInOut","back","backIn","backOut","backInOut","elastic","elasticIn","elasticOut","elasticInOut"]);var uOe=function(){function e(){this._startDelay=e._DEFAULT_START_DELAY_MILLISECONDS,this._stepDuration=e._DEFAULT_STEP_DURATION_MILLISECONDS,this._stepDelay=e._DEFAULT_ITERATIVE_DELAY_MILLISECONDS,this._maxTotalDuration=e._DEFAULT_MAX_TOTAL_DURATION_MILLISECONDS,this._easingMode=e._DEFAULT_EASING_MODE}return e.prototype.totalTime=function(t){var r=this._getAdjustedIterativeDelay(t);return this.startDelay()+r*Math.max(t-1,0)+this.stepDuration()},e.prototype.animate=function(t,r){var n=this;t=lOe.coerceExternalD3(t);var i=t.size(),o=this._getAdjustedIterativeDelay(i);return t.transition().ease(this._getEaseFactory()).duration(this.stepDuration()).delay(function(a,s){return n.startDelay()+o*s}).attrs(r)},e.prototype.startDelay=function(t){return t==null?this._startDelay:(this._startDelay=t,this)},e.prototype.stepDuration=function(t){return t==null?Math.min(this._stepDuration,this._maxTotalDuration):(this._stepDuration=t,this)},e.prototype.stepDelay=function(t){return t==null?this._stepDelay:(this._stepDelay=t,this)},e.prototype.maxTotalDuration=function(t){return t==null?this._maxTotalDuration:(this._maxTotalDuration=t,this)},e.prototype.easingMode=function(t){return t==null?this._easingMode:(this._easingMode=t,this)},e.prototype._getEaseFactory=function(){var t=this.easingMode();if(typeof t=="string"){var r=Zjt[t];return r==null?Zjt.linear:r}else return t},e.prototype._getAdjustedIterativeDelay=function(t){var r=this.maxTotalDuration()-this.stepDuration();r=Math.max(r,0);var n=r/Math.max(t-1,1);return Math.min(this.stepDelay(),n)},e._DEFAULT_START_DELAY_MILLISECONDS=0,e._DEFAULT_STEP_DURATION_MILLISECONDS=300,e._DEFAULT_ITERATIVE_DELAY_MILLISECONDS=15,e._DEFAULT_MAX_TOTAL_DURATION_MILLISECONDS=1/0,e._DEFAULT_EASING_MODE="expOut",e}();lF.Easing=uOe});var Qjt=H(ait=>{"use strict";Object.defineProperty(ait,"__esModule",{value:!0});var hOe=jg(),fOe=function(){function e(){}return e.prototype.totalTime=function(t){return 0},e.prototype.animate=function(t,r){return t=hOe.coerceExternalD3(t),t.attrs(r)},e}();ait.Null=fOe});var kf=H(cF=>{"use strict";Object.defineProperty(cF,"__esModule",{value:!0});var tXt=(de(),Ut(pe));tXt.__exportStar(Jjt(),cF);tXt.__exportStar(Qjt(),cF)});var eXt=H(sit=>{"use strict";Object.defineProperty(sit,"__esModule",{value:!0});var pOe=function(){function e(t){this.cache={},this.compute=t}return e.prototype.get=function(t){return this.cache.hasOwnProperty(t)||(this.cache[t]=this.compute(t)),this.cache[t]},e.prototype.clear=function(){return this.cache={},this},e}();sit.Cache=pOe});var rXt=H(lit=>{"use strict";Object.defineProperty(lit,"__esModule",{value:!0});var dOe=function(){function e(){}return e.arrayEq=function(t,r){if(t==null||r==null)return t===r;if(t.length!==r.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0},e.objEq=function(t,r){if(t==null||r==null)return t===r;var n=Object.keys(t).sort(),i=Object.keys(r).sort(),o=n.map(function(s){return t[s]}),a=i.map(function(s){return r[s]});return e.arrayEq(n,i)&&e.arrayEq(o,a)},e.strictEq=function(t,r){return t===r},e.defaults=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(t==null)throw new TypeError("Cannot convert undefined or null to object");var i=Object(t);return r.forEach(function(o){if(o!=null)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])}),i},e}();lit.Methods=dOe});var nXt=H(cit=>{"use strict";Object.defineProperty(cit,"__esModule",{value:!0});var mOe=function(){function e(){}return e.combineWhitespace=function(t){return t.replace(/[ \t]+/g," ")},e.isNotEmptyString=function(t){return t&&t.trim()!==""},e.trimStart=function(t,r){if(!t)return t;var n=t.split(""),i=r?function(o){return o.split(r).some(e.isNotEmptyString)}:e.isNotEmptyString;return n.reduce(function(o,a){return i(o+a)?o+a:o},"")},e.trimEnd=function(t,r){if(!t)return t;var n=t.split("");return n.reverse(),n=e.trimStart(n.join(""),r).split(""),n.reverse(),n.join("")},e}();cit.StringMethods=mOe});var iXt=H(uit=>{"use strict";Object.defineProperty(uit,"__esModule",{value:!0});var gOe=function(){function e(){this.WordDividerRegExp=new RegExp("\\W"),this.WhitespaceRegExp=new RegExp("\\s")}return e.prototype.tokenize=function(t){var r=this;return t.split("").reduce(function(n,i){return n.slice(0,-1).concat(r.shouldCreateNewToken(n[n.length-1],i))},[""])},e.prototype.shouldCreateNewToken=function(t,r){if(!t)return[r];var n=t[t.length-1];return this.WhitespaceRegExp.test(n)&&this.WhitespaceRegExp.test(r)?[t+r]:this.WhitespaceRegExp.test(n)||this.WhitespaceRegExp.test(r)?[t,r]:this.WordDividerRegExp.test(n)?n===r?[t+r]:[t,r]:[t+r]},e}();uit.Tokenizer=gOe});var pS=H(uF=>{"use strict";function hF(e){for(var t in e)uF.hasOwnProperty(t)||(uF[t]=e[t])}Object.defineProperty(uF,"__esModule",{value:!0});hF(eXt());hF(rXt());hF(nXt());hF(iXt())});var aXt=H(hit=>{"use strict";Object.defineProperty(hit,"__esModule",{value:!0});var oXt=pS(),_Oe={textRotation:0,textShear:0,xAlign:"left",yAlign:"top"},fF=function(){function e(t,r,n){this._measurer=t,this._penFactory=r,this._wrapper=n}return e.prototype.measurer=function(t){return this._measurer=t,this},e.prototype.wrapper=function(t){return this._wrapper=t,this},e.prototype.penFactory=function(t){return this._penFactory=t,this},e.prototype.write=function(t,r,n,i,o){if(i===void 0&&(i={}),i=oXt.Methods.defaults({},_Oe,i),e.SupportedRotation.indexOf(i.textRotation)===-1)throw new Error("unsupported rotation - "+i.textRotation+". Supported rotations are "+e.SupportedRotation.join(", "));if(i.textShear!=null&&i.textShear<-80||i.textShear>80)throw new Error("unsupported shear angle - "+i.textShear+". Must be between -80 and 80");var a=Math.abs(Math.abs(i.textRotation)-90)>45,s=a?r:n,l=a?n:r,c=i.textShear,u=c*Math.PI/180,h=this._measurer.measure().height,f=h*Math.tan(u),p=s/Math.cos(u)-Math.abs(f),d=l*Math.cos(u),g=oXt.StringMethods.combineWhitespace(t),_=this._wrapper?this._wrapper.wrap(g,this._measurer,p,d).wrappedText:g,y=_.split(`
`),x=e.XOffsetFactor[i.xAlign]*p*Math.sin(u),b=e.YOffsetFactor[i.yAlign]*(d-y.length*h),S=x-b,C=[0,0],P=i.textRotation+c;switch(i.textRotation){case 90:C=[r+S,0];break;case-90:C=[-S,n];break;case 180:C=[r,n+S];break;default:C=[0,-S];break}var k=this._penFactory.createPen(t,{translate:C,rotate:P},o);this.writeLines(y,k,p,h,f,i.xAlign),k.destroy!=null&&k.destroy()},e.prototype.writeLines=function(t,r,n,i,o,a){t.forEach(function(s,l){var c=o>0?(l+1)*o:l*o;r.write(s,n,a,c,(l+1)*i)})},e}();fF.XOffsetFactor={center:.5,left:0,right:1};fF.YOffsetFactor={bottom:1,center:.5,top:0};fF.SupportedRotation=[-90,0,180,90];hit.Writer=fF});var FA=H(pF=>{"use strict";function yOe(e){for(var t in e)pF.hasOwnProperty(t)||(pF[t]=e[t])}Object.defineProperty(pF,"__esModule",{value:!0});yOe(aXt())});var fit=H(dF=>{"use strict";Object.defineProperty(dF,"__esModule",{value:!0});var BA=function(){function e(){}return e.append=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=e.create.apply(e,[r].concat(n));return t.appendChild(o),o},e.create=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=document.createElement(t);return e.addClasses.apply(e,[i].concat(r)),i},e.addClasses=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];r=r.filter(function(i){return i!=null}),t.classList!=null?r.forEach(function(i){t.classList.add(i)}):t.setAttribute("class",r.join(" "))},e.getDimensions=function(t){if(t.getBoundingClientRect)try{var r=t.getBoundingClientRect(),n=r.width,i=r.height;return{width:n,height:i}}catch(o){}return{height:0,width:0}},e}();dF.HtmlUtils=BA;var vOe=function(){function e(t,r,n){n===void 0&&(n=!1);var i=this;this.element=t,this.className=r,this.addTitle=n,this.createRuler=function(){return function(o){var a=BA.append(i.element,"span","text-tmp",i.className);a.textContent=o;var s=BA.getDimensions(a);return i.element.removeChild(a),s}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=BA.append(s,"div","text-block",i.className);return l.style.position="relative",l.style.transform="translate(0, -1em) "+("translate("+a.translate[0]+"px, "+a.translate[1]+"px) ")+("rotate("+a.rotate+"deg)"),l.style.transformOrigin="0 1.2em",i.addTitle&&l.setAttribute("title",o),i.createHtmlLinePen(l)}}return e.prototype.setAddTitle=function(t){this.addTitle=t},e.prototype.createHtmlLinePen=function(t){return{write:function(r,n,i,o,a){var s=BA.append(t,"div","text-line");s.textContent=r,s.style.width=n+"px",s.style.textAlign=i,s.style.position="absolute",s.style.whiteSpace="nowrap",s.style.top=a+"px",s.style.left=o+"px"}}},e}();dF.HtmlContext=vOe});var cXt=H(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});var xOe=FA(),sXt=fit(),Xg=function(){function e(){}return e.append=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=e.create.apply(e,[r].concat(n));return t.appendChild(o),o},e.create=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=document.createElementNS(e.SVG_NS,t);return sXt.HtmlUtils.addClasses.apply(sXt.HtmlUtils,[i].concat(r)),i},e.getDimensions=function(t){if(t.getBBox)try{var r=t.getBBox(),n=r.width,i=r.height;return{width:n,height:i}}catch(o){}return{height:0,width:0}},e}();Xg.SVG_NS="http://www.w3.org/2000/svg";mF.SvgUtils=Xg;var lXt=function(){function e(t,r,n){n===void 0&&(n=!1);var i=this;this.element=t,this.className=r,this.addTitleElement=n,this.createRuler=function(){var o=i.getTextElements(i.element),a=o.parentElement,s=o.containerElement,l=o.textElement;return function(c){a.appendChild(s),l.textContent=c;var u=Xg.getDimensions(l);return a.removeChild(s),u}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=Xg.append(s,"g","text-container",i.className);i.addTitleElement&&(Xg.append(l,"title").textContent=o,l.setAttribute("title",o));var c=Xg.append(l,"g","text-area");return c.setAttribute("transform","translate("+a.translate[0]+","+a.translate[1]+")"+("rotate("+a.rotate+")")),i.createSvgLinePen(c)}}return e.prototype.setAddTitleElement=function(t){this.addTitleElement=t},e.prototype.createSvgLinePen=function(t){return{write:function(r,n,i,o,a){o+=n*xOe.Writer.XOffsetFactor[i];var s=Xg.append(t,"text","text-line");s.textContent=r,s.setAttribute("text-anchor",e.AnchorMap[i]),s.setAttribute("transform","translate("+o+","+a+")"),s.setAttribute("y","-0.25em")}}},e.prototype.getTextElements=function(t){if(t.tagName==="text"){var r=t.parentElement;return r==null&&(r=t.parentNode),r.removeChild(t),{containerElement:t,parentElement:r,textElement:t}}var n=t.querySelector("text");if(n!=null){var r=n.parentElement;return r==null&&(r=n.parentNode),r.removeChild(n),{containerElement:n,parentElement:r,textElement:n}}var i=Xg.create("text",this.className);return{containerElement:i,parentElement:t,textElement:i}},e}();lXt.AnchorMap={center:"middle",left:"start",right:"end"};mF.SvgContext=lXt});var uXt=H(pit=>{"use strict";Object.defineProperty(pit,"__esModule",{value:!0});var bOe=FA(),wOe="#444",SOe=function(){function e(t,r,n){r===void 0&&(r=10),n===void 0&&(n={});var i=this;this.ctx=t,this.lineHeight=r,this.style=n,this.createRuler=function(){return function(o){i.ctx.font=i.style.font;var a=i.ctx.measureText(o).width;return{width:a,height:i.lineHeight}}},this.createPen=function(o,a,s){return s==null&&(s=i.ctx),s.save(),s.translate(a.translate[0],a.translate[1]),s.rotate(a.rotate*Math.PI/180),i.createCanvasPen(s)},this.style.fill===void 0&&(this.style.fill=wOe)}return e.prototype.createCanvasPen=function(t){var r=this;return{destroy:function(){t.restore()},write:function(n,i,o,a,s){a+=i*bOe.Writer.XOffsetFactor[o],t.textAlign=o,r.style.font!=null&&(t.font=r.style.font),r.style.fill!=null&&(t.fillStyle=r.style.fill,t.fillText(n,a,s)),r.style.stroke!=null&&(t.strokeStyle=r.style.fill,t.strokeText(n,a,s))}}},e}();pit.CanvasContext=SOe});var mit=H(gF=>{"use strict";function dit(e){for(var t in e)gF.hasOwnProperty(t)||(gF[t]=e[t])}Object.defineProperty(gF,"__esModule",{value:!0});dit(cXt());dit(uXt());dit(fit())});var _F=H(git=>{"use strict";Object.defineProperty(git,"__esModule",{value:!0});var hXt=function(){function e(t){t.createRuler!=null?this.ruler=t.createRuler():this.ruler=t}return e.prototype.measure=function(t){return t===void 0&&(t=e.HEIGHT_TEXT),this.ruler(t)},e}();hXt.HEIGHT_TEXT="bdpql";git.AbstractMeasurer=hXt});var _it=H(HA=>{"use strict";var MOe=HA&&HA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(HA,"__esModule",{value:!0});var yF=_F(),EOe=function(e){MOe(t,e);function t(r,n){n===void 0&&(n=!1);var i=e.call(this,r)||this;return i.useGuards=n,i}return t.prototype._addGuards=function(r){return yF.AbstractMeasurer.HEIGHT_TEXT+r+yF.AbstractMeasurer.HEIGHT_TEXT},t.prototype._measureLine=function(r,n){n===void 0&&(n=!1);var i=this.useGuards||n||/^[\t ]$/.test(r),o=i?this._addGuards(r):r,a=e.prototype.measure.call(this,o);return a.width-=i?2*this.getGuardWidth():0,a},t.prototype.measure=function(r){var n=this;if(r===void 0&&(r=yF.AbstractMeasurer.HEIGHT_TEXT),r.trim()==="")return{width:0,height:0};var i=r.trim().split(`
`).map(function(o){return n._measureLine(o)});return{height:i.reduce(function(o,a){return o+a.height},0),width:i.reduce(function(o,a){return Math.max(o,a.width)},0)}},t.prototype.getGuardWidth=function(){return this.guardWidth==null&&(this.guardWidth=e.prototype.measure.call(this).width),this.guardWidth},t}(yF.AbstractMeasurer);HA.Measurer=EOe});var yit=H(VA=>{"use strict";var TOe=VA&&VA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(VA,"__esModule",{value:!0});var COe=_it(),AOe=function(e){TOe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._measureCharacter=function(r){return e.prototype._measureLine.call(this,r)},t.prototype._measureLine=function(r){var n=this,i=r.split("").map(function(o){return n._measureCharacter(o)});return{height:i.reduce(function(o,a){return Math.max(o,a.height)},0),width:i.reduce(function(o,a){return o+a.width},0)}},t}(COe.Measurer);VA.CharacterMeasurer=AOe});var vit=H(UA=>{"use strict";var POe=UA&&UA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(UA,"__esModule",{value:!0});var IOe=pS(),LOe=yit(),kOe=function(e){POe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.cache=new IOe.Cache(function(o){return i._measureCharacterNotFromCache(o)}),i}return t.prototype._measureCharacterNotFromCache=function(r){return e.prototype._measureCharacter.call(this,r)},t.prototype._measureCharacter=function(r){return this.cache.get(r)},t.prototype.reset=function(){this.cache.clear()},t}(LOe.CharacterMeasurer);UA.CacheCharacterMeasurer=kOe});var fXt=H(qA=>{"use strict";var ROe=qA&&qA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qA,"__esModule",{value:!0});var NOe=pS(),DOe=_F(),OOe=vit(),zOe=function(e){ROe(t,e);function t(r){var n=e.call(this,r)||this;return n.dimCache=new NOe.Cache(function(i){return n._measureNotFromCache(i)}),n}return t.prototype._measureNotFromCache=function(r){return e.prototype.measure.call(this,r)},t.prototype.measure=function(r){return r===void 0&&(r=DOe.AbstractMeasurer.HEIGHT_TEXT),this.dimCache.get(r)},t.prototype.reset=function(){this.dimCache.clear(),e.prototype.reset.call(this)},t}(OOe.CacheCharacterMeasurer);qA.CacheMeasurer=zOe});var xit=H(vF=>{"use strict";function GA(e){for(var t in e)vF.hasOwnProperty(t)||(vF[t]=e[t])}Object.defineProperty(vF,"__esModule",{value:!0});GA(_F());GA(vit());GA(fXt());GA(yit());GA(_it())});var wit=H(bit=>{"use strict";Object.defineProperty(bit,"__esModule",{value:!0});var WA=pS(),FOe=function(){function e(){this.maxLines(1/0),this.textTrimming("ellipsis"),this.allowBreakingWords(!1),this._tokenizer=new WA.Tokenizer,this._breakingCharacter="-"}return e.prototype.maxLines=function(t){return t==null?this._maxLines:(this._maxLines=t,this)},e.prototype.textTrimming=function(t){if(t==null)return this._textTrimming;if(t!=="ellipsis"&&t!=="none")throw new Error(t+" - unsupported text trimming option.");return this._textTrimming=t,this},e.prototype.allowBreakingWords=function(t){return t==null?this._allowBreakingWords:(this._allowBreakingWords=t,this)},e.prototype.wrap=function(t,r,n,i){var o=this;i===void 0&&(i=1/0);var a={noBrokeWords:0,noLines:0,originalText:t,truncatedText:"",wrappedText:""},s={availableLines:Math.min(Math.floor(i/r.measure().height),this._maxLines),availableWidth:n,canFitText:!0,currentLine:"",wrapping:a},l=t.split(`
`);return l.reduce(function(c,u,h){return o.breakLineToFitWidth(c,u,h!==l.length-1,r)},s).wrapping},e.prototype.breakLineToFitWidth=function(t,r,n,i){var o=this;!t.canFitText&&t.wrapping.truncatedText!==""&&(t.wrapping.truncatedText+=`
`);var a=this._tokenizer.tokenize(r);t=a.reduce(function(l,c){return o.wrapNextToken(c,l,i)},t);var s=WA.StringMethods.trimEnd(t.currentLine);return t.wrapping.noLines+=+(s!==""),t.wrapping.noLines===t.availableLines&&this._textTrimming!=="none"&&n?t.canFitText=!1:t.wrapping.wrappedText+=s,t.currentLine=`
`,t},e.prototype.canFitToken=function(t,r,n){var i=this,o=t.split("").map(function(a,s){return s!==t.length-1?a+i._breakingCharacter:a});return n.measure(t).width<=r||o.every(function(a){return n.measure(a).width<=r})},e.prototype.addEllipsis=function(t,r,n){if(this._textTrimming==="none")return{remainingToken:"",wrappedToken:t};var i=t.substring(0).trim(),o=n.measure(i).width,a=n.measure("...").width,s=t.length>0&&t[0]===`
`?`
`:"";if(r<=a){var l=a/3,c=Math.floor(r/l);return{remainingToken:t,wrappedToken:s+"...".substr(0,c)}}for(;o+a>r;)i=WA.StringMethods.trimEnd(i.substr(0,i.length-1)),o=n.measure(i).width;return{remainingToken:WA.StringMethods.trimEnd(t.substring(i.length),"-").trim(),wrappedToken:s+i+"..."}},e.prototype.wrapNextToken=function(t,r,n){if(!r.canFitText||r.availableLines===r.wrapping.noLines||!this.canFitToken(t,r.availableWidth,n))return this.finishWrapping(t,r,n);for(var i=t;i;){var o=this.breakTokenToFitInWidth(i,r.currentLine,r.availableWidth,n);if(r.currentLine=o.line,i=o.remainingToken,i!=null)if(r.wrapping.noBrokeWords+=+o.breakWord,++r.wrapping.noLines,r.availableLines===r.wrapping.noLines){var a=this.addEllipsis(r.currentLine,r.availableWidth,n);return r.wrapping.wrappedText+=a.wrappedToken,r.wrapping.truncatedText+=a.remainingToken+i,r.currentLine=`
`,r}else r.wrapping.wrappedText+=WA.StringMethods.trimEnd(r.currentLine),r.currentLine=`
`}return r},e.prototype.finishWrapping=function(t,r,n){if(r.canFitText&&r.availableLines!==r.wrapping.noLines&&this._textTrimming!=="none"){var i=this.addEllipsis(r.currentLine+t,r.availableWidth,n);r.wrapping.wrappedText+=i.wrappedToken,r.wrapping.truncatedText+=i.remainingToken,r.wrapping.noBrokeWords+=+(i.remainingToken.length<t.length),r.wrapping.noLines+=+(i.wrappedToken.length>0),r.currentLine=""}else r.wrapping.truncatedText+=t;return r.canFitText=!1,r},e.prototype.breakTokenToFitInWidth=function(t,r,n,i,o){if(o===void 0&&(o=this._breakingCharacter),i.measure(r+t).width<=n)return{breakWord:!1,line:r+t,remainingToken:null};if(t.trim()==="")return{breakWord:!1,line:r,remainingToken:""};if(!this._allowBreakingWords&&r.trim()!=="")return{breakWord:!1,line:r,remainingToken:t};for(var a=0;a<t.length&&i.measure(r+t.substring(0,a+1)+o).width<=n;)++a;var s="";return a>0&&(s=o),{breakWord:a>0,line:r+t.substring(0,a)+s,remainingToken:t.substring(a)}},e}();bit.Wrapper=FOe});var dXt=H(YA=>{"use strict";var BOe=YA&&YA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(YA,"__esModule",{value:!0});var HOe=wit(),pXt=function(e){BOe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.wrap=function(r,n,i,o){var a=this;o===void 0&&(o=1/0);var s=r.split(`
`);if(s.length>1)throw new Error("SingleLineWrapper is designed to work only on single line");var l=function(g){return e.prototype.wrap.call(a,r,n,g,o)},c=l(i);if(c.noLines<2)return c;for(var u=0,h=i,f=0;f<t.NO_WRAP_ITERATIONS&&h>u;++f){var p=(h+u)/2,d=l(p);this.areSameResults(c,d)?(h=p,c=d):u=p}return c},t.prototype.areSameResults=function(r,n){return r.noLines===n.noLines&&r.truncatedText===n.truncatedText},t}(HOe.Wrapper);pXt.NO_WRAP_ITERATIONS=5;YA.SingleLineWrapper=pXt});var Sit=H(xF=>{"use strict";function mXt(e){for(var t in e)xF.hasOwnProperty(t)||(xF[t]=e[t])}Object.defineProperty(xF,"__esModule",{value:!0});mXt(dXt());mXt(wit())});var gXt=H(Eit=>{"use strict";Object.defineProperty(Eit,"__esModule",{value:!0});var Mit=mit(),VOe=xit(),UOe=Sit(),qOe=FA(),GOe=function(){function e(t){this.context=t,this.measurer=new VOe.CacheMeasurer(this.context),this.wrapper=new UOe.Wrapper,this.writer=new qOe.Writer(this.measurer,this.context,this.wrapper)}return e.svg=function(t,r,n){return new e(new Mit.SvgContext(t,r,n))},e.canvas=function(t,r,n){return new e(new Mit.CanvasContext(t,r,n))},e.html=function(t,r,n){return new e(new Mit.HtmlContext(t,r,n))},e.prototype.write=function(t,r,n,i,o){this.writer.write(t,r,n,i,o)},e.prototype.clearMeasurerCache=function(){this.measurer.reset()},e}();Eit.Typesetter=GOe});var yl=H(bF=>{"use strict";function dS(e){for(var t in e)bF.hasOwnProperty(t)||(bF[t]=e[t])}Object.defineProperty(bF,"__esModule",{value:!0});dS(mit());dS(xit());dS(gXt());dS(pS());dS(Sit());dS(FA())});var _Xt=H(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});var WOe=(Er(),Ut(Mr)),YOe=window.Array;function jOe(e,t){if(e.length!==t.length)throw new Error("attempted to add arrays of unequal length");return e.map(function(r,n){return e[n]+t[n]})}mS.add=jOe;function XOe(e){var t=WOe.set(),r=[];return e.forEach(function(n){t.has(String(n))||(t.add(String(n)),r.push(n))}),r}mS.uniq=XOe;function $Oe(e){return YOe.prototype.concat.apply([],e)}mS.flatten=$Oe;function KOe(e,t){for(var r=[],n=0;n<t;n++)r[n]=typeof e=="function"?e(n):e;return r}mS.createFilledArray=KOe});var xXt=H(jA=>{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});var vXt=(Er(),Ut(Mr)),ZOe=window.Math;function JOe(e,t){var r=yXt(e)+.05,n=yXt(t)+.05;return r>n?r/n:n/r}jA.contrast=JOe;function QOe(e,t){var r=vXt.color(e).brighter(t);return r.rgb().toString()}jA.lightenColor=QOe;function t7e(e,t){e.classed(t,!0);var r=e.style("background-color");if(r==="transparent")return null;var n=/\((.+)\)/.exec(r);if(!n)return null;var i=n[1].split(",").map(function(a){var s=+a,l=s.toString(16);return s<16?"0"+l:l});if(i.length===4&&i[3]==="00")return null;var o="#"+i.join("");return e.classed(t,!1),o}jA.colorTest=t7e;function yXt(e){var t=vXt.rgb(e),r=function(a){return a=a/255,a<=.03928?a/12.92:ZOe.pow((a+.055)/1.055,2.4)},n=r(t.r),i=r(t.g),o=r(t.b);return .2126*n+.7152*i+.0722*o}});var Cit=H(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Tit=(Er(),Ut(Mr)),ga=window.Math;function e7e(e,t){for(var r=t;r!=null&&r!==e;)r=r.parentNode;return r===e}ao.contains=e7e;function wXt(e){var t;try{t=e.node().getBBox()}catch(r){t={x:0,y:0,width:0,height:0}}return t}ao.elementBBox=wXt;function r7e(e){if(e instanceof SVGElement)return wXt(Tit.select(e));if(e instanceof HTMLElement){var t=e.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}else return{x:0,y:0,width:0,height:0}}ao.entityBounds=r7e;ao.SCREEN_REFRESH_RATE_MILLISECONDS=1e3/60;function n7e(e){window.requestAnimationFrame!=null?window.requestAnimationFrame(e):setTimeout(e,ao.SCREEN_REFRESH_RATE_MILLISECONDS)}ao.requestAnimationFramePolyfill=n7e;function i7e(e){var t=e instanceof Tit.selection?e.node():e,r=window.getComputedStyle(t);return Rf(r,"width")+Rf(r,"padding-left")+Rf(r,"padding-right")+Rf(r,"border-left-width")+Rf(r,"border-right-width")}ao.elementWidth=i7e;function o7e(e){var t=e instanceof Tit.selection?e.node():e,r=window.getComputedStyle(t);return Rf(r,"height")+Rf(r,"padding-top")+Rf(r,"padding-bottom")+Rf(r,"border-top-width")+Rf(r,"border-bottom-width")}ao.elementHeight=o7e;var Lc="\\s",XA="(?:[-+]?[0-9]*\\.?[0-9]+)",SXt="(?:(?:"+Lc+"+,?"+Lc+"*)|(?:,"+Lc+"*))",a7e=new RegExp("translate"+Lc+"*\\("+Lc+"*("+XA+")(?:"+SXt+"("+XA+"))?"+Lc+"*\\)"),s7e=new RegExp("rotate"+Lc+"*\\("+Lc+"*("+XA+")"+Lc+"*\\)"),l7e=new RegExp("scale"+Lc+"*\\("+Lc+"*("+XA+")(?:"+SXt+"("+XA+"))?"+Lc+"*\\)");function c7e(e){var t=a7e.exec(e.attr("transform"));if(t!=null){var r=t[1],n=t[2],i=n===void 0?0:n;return[+r,+i]}else return[0,0]}ao.getTranslateValues=c7e;function u7e(e){var t=s7e.exec(e.attr("transform"));if(t!=null){var r=t[1];return+r}else return 0}ao.getRotate=u7e;function h7e(e){var t=l7e.exec(e.attr("transform"));if(t!=null){var r=t[1],n=t[2];return[+r,n==null?+r:+n]}else return[0,0]}ao.getScaleValues=h7e;function f7e(e,t){return!(ga.floor(e.right)<=ga.ceil(t.left)||ga.ceil(e.left)>=ga.floor(t.right)||ga.floor(e.bottom)<=ga.ceil(t.top)||ga.ceil(e.top)>=ga.floor(t.bottom))}ao.clientRectsOverlap=f7e;function p7e(e,t){return{left:e.left-t,top:e.top-t,right:e.right+t,bottom:e.bottom+t,width:e.width+t*2,height:e.height+t*2}}ao.expandRect=p7e;function d7e(e,t){return ga.floor(t.left)<=ga.ceil(e.left)&&ga.floor(t.top)<=ga.ceil(e.top)&&ga.floor(e.right)<=ga.ceil(t.right)&&ga.floor(e.bottom)<=ga.ceil(t.bottom)}ao.clientRectInside=d7e;function m7e(e,t,r,n){n===void 0&&(n=.5);var i=bXt(e),o=bXt(t);return r.x+r.width>=i.min-n&&r.x<=i.max+n&&r.y+r.height>=o.min-n&&r.y<=o.max+n}ao.intersectsBBox=m7e;function bXt(e){if(typeof e=="number"){var t=e;return{min:t,max:t}}var r=e;if(r instanceof Object&&"min"in r&&"max"in r)return r;throw new Error("input '"+e+"' can't be parsed as an Range")}function Rf(e,t){var r=e.getPropertyValue(t),n=parseFloat(r);return n||0}function g7e(e){for(var t=[];e&&e instanceof HTMLElement;)t.push(e),e=e.parentElement;return t}ao.getHtmlElementAncestors=g7e;function _7e(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return x7e(r)}ao.getElementTransform=_7e;var y7e=/^matrix\(([^)]+)\)$/,v7e=/[, ]+/;function x7e(e){if(e==null||e==="none")return null;var t=e.match(y7e);if(t==null||t.length<2)return null;var r=t[1].split(v7e).map(function(n){return parseFloat(n)});return r.length!=6?null:r}});var Ait=H(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var SF=(Er(),Ut(Mr)),MXt=Cit(),gd=window.Math,b7e=[1,0,0,1,0,0];function w7e(e,t,r){return gd.min(t,r)<=e&&e<=gd.max(t,r)}so.inRange=w7e;function S7e(e,t,r){return gd.min(gd.max(t,e),r)}so.clamp=S7e;function M7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?SF.max(e):SF.max(e,n);return o!==void 0?o:i}so.max=M7e;function E7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?SF.min(e):SF.min(e,n);return o!==void 0?o:i}so.min=E7e;function T7e(e){return e!==e}so.isNaN=T7e;function C7e(e){return typeof e=="number"&&e-e<1}so.isValidNumber=C7e;function A7e(e,t,r){if(r===void 0&&(r=1),r===0)throw new Error("step cannot be 0");for(var n=gd.max(gd.ceil((t-e)/r),0),i=[],o=0;o<n;++o)i[o]=e+r*o;return i}so.range=A7e;function P7e(e,t){return gd.pow(t.y-e.y,2)+gd.pow(t.x-e.x,2)}so.distanceSquared=P7e;function I7e(e){return e/360*gd.PI*2}so.degreesToRadians=I7e;function L7e(e,t){return t.topLeft.x<=e.x&&t.bottomRight.x>=e.x&&t.topLeft.y<=e.y&&t.bottomRight.y>=e.y}so.within=L7e;function k7e(e,t,r,n,i,o,a,s){return e<=i+a&&i<=e+r&&t<=o+s&&o<=t+n}so.boundsIntersects=k7e;function R7e(e){for(var t=MXt.getHtmlElementAncestors(e),r=b7e,n=null,i=0,o=t;i<o.length;i++){var a=o[i],s=MXt.getElementTransform(a);if(s!=null){var l=a.clientWidth/2,c=a.clientHeight/2;r=wF(r,[l,c]),r=EXt(r,TXt(s)),r=wF(r,[-l,-c])}var u=a.scrollLeft,h=a.scrollTop;(n===null||a===n)&&(u-=a.offsetLeft+a.clientLeft,h-=a.offsetTop+a.clientTop,n=a.offsetParent),r=wF(r,[u,h])}return r}so.getCumulativeTransform=R7e;function EXt(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}so.multiplyMatrix=EXt;function N7e(e,t){return[t[0],t[1],t[2],t[3],t[4]+e[0],t[5]+e[1]]}so.premultiplyTranslate=N7e;function wF(e,t){return[e[0],e[1],e[2],e[3],e[0]*t[0]+e[2]*t[1]+e[4],e[1]*t[0]+e[3]*t[1]+e[5]]}so.multiplyTranslate=wF;function TXt(e){var t=e[0]*e[3]-e[1]*e[2];if(t===0)throw new Error("singular matrix");var r=1/t;return[r*e[3],r*-e[1],r*-e[2],r*e[0],r*(-e[3]*e[4]+e[2]*e[5]),r*(e[1]*e[4]+-e[0]*e[5])]}so.invertMatrix=TXt;function D7e(e,t){return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}so.applyTransform=D7e});var CXt=H(MF=>{"use strict";Object.defineProperty(MF,"__esModule",{value:!0});var O7e=function(){function e(){}return e.prototype.split=function(t,r){for(var n=Math.ceil(t.length/2),i=0;i<n;i++)r[0].insert(t[i]);for(var i=n;i<t.length;i++)r[1].insert(t[i])},e}();MF.SplitStrategyTrivial=O7e;var z7e=function(){function e(){}return e.prototype.split=function(t,r){for(t=t.slice(),this.chooseFirstSplit(t,r);t.length>0;)this.addNext(t,r)},e.prototype.chooseFirstSplit=function(t,r){for(var n=0,i=0,o=t.length-1,a=t.length-1,s=1;s<t.length-1;s++){var l=t[s];l.bounds.xl>t[o].bounds.xl?o=s:l.bounds.xh<t[n].bounds.xh&&(n=s),l.bounds.yl>t[a].bounds.yl?a=s:l.bounds.yh<t[i].bounds.yh&&(i=s)}var c=Math.abs(t[n].bounds.xh-t[o].bounds.xl),u=Math.abs(t[i].bounds.yh-t[a].bounds.yl),h=c>u?[n,o]:[i,a],f=h[0],p=h[1];f===p&&(f=0,p=t.length-1),r[0].insert(t.splice(Math.max(f,p),1)[0]),r[1].insert(t.splice(Math.min(f,p),1)[0])},e.prototype.addNext=function(t,r){for(var n=null,i=null,o=null,a=0;a<t.length;a++){var s=t[a],l=r[0].unionAreaDifference(s.bounds),c=r[1].unionAreaDifference(s.bounds);(l<i||n==null)&&(n=a,i=l,o=r[0]),c<i&&(n=a,i=c,o=r[1])}o.insert(t.splice(n,1)[0])},e}();MF.SplitStrategyLinear=z7e});var Iit=H(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var F7e=CXt(),B7e=5,H7e=new F7e.SplitStrategyLinear,Nf;(function(e){e[e.PASS=0]="PASS",e[e.FAIL=1]="FAIL",e[e.PASS_AND_OVERWRITE=2]="PASS_AND_OVERWRITE"})(Nf=_d.QueryPredicateResult||(_d.QueryPredicateResult={}));function EF(e,t,r){var n=1/0,i=1/0,o=1/0;return function(a){var s=t(a.bounds,e),l=r(a.bounds,e);return a.value!=null?s<n?(n=s,i=s,o=l,Nf.PASS_AND_OVERWRITE):s===n?Nf.PASS:Nf.FAIL:s>o?Nf.FAIL:(i=Math.min(s,i),o=Math.max(l,o),Nf.PASS)}}_d.createMinimizingNodePredicate=EF;function Pit(e,t){return function(r,n){return t(n.bounds,e)-t(r.bounds,e)}}_d.createNodeSort=Pit;var V7e=function(){function e(t,r){t===void 0&&(t=B7e),r===void 0&&(r=H7e),this.maxNodeChildren=t,this.splitStrategy=r,this.root=new TF(!0),this.size=0}return e.prototype.getRoot=function(){return this.root},e.prototype.clear=function(){this.root=new TF(!0),this.size=0},e.prototype.insert=function(t,r){for(var n=this.root;!n.leaf;)n=n.subtree(t);var i=TF.valueNode(t,r);for(n.insert(i),this.size+=1;n.overflow(this.maxNodeChildren);)n=n.split(this.splitStrategy),n.parent==null&&(this.root=n);return i},e.prototype.locate=function(t){return this.query(function(r){return r.contains(t)})},e.prototype.locateNearest=function(t){var r=EF(t,ts.distanceSquaredToNearEdge,ts.distanceSquaredToFarEdge),n=this.queryNodes(r);return n.map(function(i){return i.value})},e.prototype.locateNearestX=function(t){var r=EF(t,ts.absoluteDistanceToNearEdgeX,ts.absoluteDistanceToFarEdgeX),n=this.queryNodes(r);return n.sort(Pit(t,ts.absoluteDistanceToNearEdgeY)),n.map(function(i){return i.value})},e.prototype.locateNearestY=function(t){var r=EF(t,ts.absoluteDistanceToNearEdgeY,ts.absoluteDistanceToFarEdgeY),n=this.queryNodes(r);return n.sort(Pit(t,ts.absoluteDistanceToNearEdgeX)),n.map(function(i){return i.value})},e.prototype.intersect=function(t){return this.query(function(r){return ts.isBoundsOverlapBounds(r,t)})},e.prototype.intersectX=function(t){return this.query(function(r){return ts.isBoundsOverlapX(r,t)})},e.prototype.intersectY=function(t){return this.query(function(r){return ts.isBoundsOverlapY(r,t)})},e.prototype.query=function(t){var r=[];if(this.root.bounds!=null&&!t(this.root.bounds))return r;for(var n=[this.root];n.length>0;)for(var i=n.shift(),o=0;o<i.entries.length;o++){var a=i.entries[o];t(a.bounds)&&(i.leaf?r.push(a.value):n.push(a))}return r},e.prototype.queryNodes=function(t){var r=[];if(this.root.bounds!=null&&t(this.root)===Nf.FAIL)return r;for(var n=[this.root];n.length>0;)for(var i=n.shift(),o=0;o<i.entries.length;o++){var a=i.entries[o],s=t(a);s===Nf.PASS_AND_OVERWRITE&&(r=[]),(s===Nf.PASS||s===Nf.PASS_AND_OVERWRITE)&&(i.leaf?r.push(a):n.push(a))}return r},e}();_d.RTree=V7e;var TF=function(){function e(t){this.leaf=t,this.bounds=null,this.entries=[],this.parent=null,this.value=null}return e.valueNode=function(t,r){var n=new e(!0);return n.bounds=t,n.value=r,n},e.prototype.overflow=function(t){return this.entries.length>t},e.prototype.insert=function(t){this.entries.push(t),t.parent=this;for(var r=this;r!=null;)r.bounds=ts.unionAll([r.bounds,t.bounds]),r=r.parent;return this},e.prototype.remove=function(t){var r=this.entries.indexOf(t);if(r>=0){this.entries.splice(r,1);for(var n=this;n!=null;)n.bounds=ts.unionAll(n.entries.map(function(i){return i.bounds})),n=n.parent}return this},e.prototype.subtree=function(t){for(var r=1/0,n=null,i=0;i<this.entries.length;i++){var o=this.entries[i],a=o.unionAreaDifference(t);(a<r||a===r&&n!=null&&o.entries.length<n.entries.length)&&(n=o)}return n},e.prototype.split=function(t){this.parent!=null&&this.parent.remove(this);var r=[new e(this.leaf),new e(this.leaf)];t.split(this.entries,r);var n=this.parent!=null?this.parent:new e(!1);return n.insert(r[0]),n.insert(r[1]),n.leaf=!1,n},e.prototype.unionAreaDifference=function(t){return Math.abs(ts.union(this.bounds,t).area()-this.bounds.area())},e.prototype.maxDepth=function(){return this.leaf?1:1+this.entries.map(function(t){return t.maxDepth()}).reduce(function(t,r){return Math.max(t,r)})},e}();_d.RTreeNode=TF;var ts=function(){function e(t,r,n,i){this.xl=t,this.yl=r,this.xh=n,this.yh=i,this.width=this.xh-this.xl,this.height=this.yh-this.yl}return e.xywh=function(t,r,n,i){return new e(t,r,t+n,r+i)},e.entityBounds=function(t){return new e(t.x,t.y,t.x+t.width,t.y+t.height)},e.bounds=function(t){return e.pointPair(t.topLeft,t.bottomRight)},e.pointPair=function(t,r){return new e(Math.min(t.x,r.x),Math.min(t.y,r.y),Math.max(t.x,r.x),Math.max(t.y,r.y))},e.points=function(t){if(t.length<2)throw new Error("need at least 2 points to create bounds");var r=t.map(function(i){return i.x}),n=t.map(function(i){return i.y});return new e(r.reduce(function(i,o){return Math.min(i,o)}),n.reduce(function(i,o){return Math.min(i,o)}),r.reduce(function(i,o){return Math.max(i,o)}),n.reduce(function(i,o){return Math.max(i,o)}))},e.union=function(t,r){return new e(Math.min(t.xl,r.xl),Math.min(t.yl,r.yl),Math.max(t.xh,r.xh),Math.max(t.yh,r.yh))},e.unionAll=function(t){return t=t.filter(function(r){return r!=null}),t.length===0?null:t.reduce(function(r,n){return e.union(r,n)})},e.isBoundsOverlapBounds=function(t,r){return e.isBoundsOverlapX(t,r)&&e.isBoundsOverlapY(t,r)},e.isBoundsOverlapX=function(t,r){return!(t.xh<r.xl)&&!(t.xl>r.xh)},e.isBoundsOverlapY=function(t,r){return!(t.yh<r.yl)&&!(t.yl>r.yh)},e.absoluteDistanceToNearEdgeX=function(t,r){var n=t.width/2,i=t.xl+n;return Math.max(Math.abs(r.x-i)-n,0)},e.absoluteDistanceToNearEdgeY=function(t,r){var n=t.height/2,i=t.yl+n;return Math.max(Math.abs(r.y-i)-n,0)},e.absoluteDistanceToFarEdgeX=function(t,r){var n=e.absoluteDistanceToNearEdgeX(t,r);return n===0?0:n+t.width},e.absoluteDistanceToFarEdgeY=function(t,r){var n=e.absoluteDistanceToNearEdgeY(t,r);return n===0?0:n+t.height},e.distanceSquaredToNearEdge=function(t,r){var n=e.absoluteDistanceToNearEdgeX(t,r),i=e.absoluteDistanceToNearEdgeY(t,r);return n*n+i*i},e.distanceSquaredToFarEdge=function(t,r){var n=e.absoluteDistanceToFarEdgeX(t,r),i=e.absoluteDistanceToFarEdgeY(t,r);return n*n+i*i},e.prototype.area=function(){return this.areaCached==null&&(this.areaCached=(this.xh-this.xl)*(this.yh-this.yl)),this.areaCached},e.prototype.contains=function(t){return this.xl<=t.x&&this.xh>=t.x&&this.yl<=t.y&&this.yh>=t.y},e}();_d.RTreeBounds=ts});var IXt=H(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var AXt=(Er(),Ut(Mr)),U7e=Oe(),$g=Fe(),q7e=Lf();yd.IStackingOrder=q7e.makeEnum(["topdown","bottomup"]);var PXt=window.Math;function G7e(e,t,r,n){n===void 0&&(n="bottomup");var i=AXt.map(),o=AXt.map(),a=new $g.Map;n==="topdown"&&(e=e.slice(),e.reverse());for(var s=0,l=e;s<l.length;s++){for(var c=l[s],u=new $g.Map,h=c.data(),f=h.length,p=0;p<f;p++){var d=h[p],g=t(d,p,c),_=yd.normalizeKey(g),y=+r(d,p,c),x=void 0,b=y>=0?i:o;b.has(_)?(x=b.get(_),b.set(_,x+y)):(x=0,b.set(_,y)),u.set(_,{offset:x,value:y,axisValue:g,originalDatum:d,originalDataset:c,originalIndex:p})}a.set(c,u)}return a}yd.stack=G7e;function W7e(e){var t=new $g.Map,r=new $g.Map;return e.forEach(function(n){n.forEach(function(i,o){var a=i.offset+i.value,s=$g.Math.max([a,i.offset],i.offset),l=$g.Math.min([a,i.offset],i.offset),c=i.axisValue;t.has(o)?t.get(o).extent<s&&t.set(o,{extent:s,axisValue:c,stackedDatum:i}):t.set(o,{extent:s,axisValue:c,stackedDatum:i}),r.has(o)?r.get(o).extent>l&&r.set(o,{extent:l,axisValue:c,stackedDatum:i}):r.set(o,{extent:l,axisValue:c,stackedDatum:i})})}),{maximumExtents:t,minimumExtents:r}}yd.stackedExtents=W7e;function Y7e(e,t,r){var n=[];e.forEach(function(a,s){for(var l=s.data(),c=l.length,u=0;u<c;u++){var h=l[u];if(!(r!=null&&!r(h,u,s))){var f=a.get(yd.normalizeKey(t(h,u,s)));n.push(f.value+f.offset)}}});var i=$g.Math.max(n,0),o=$g.Math.min(n,0);return[PXt.min(o,0),PXt.max(0,i)]}yd.stackedExtent=Y7e;yd.normalizeKey=U7e.memoize(function(e){return String(e)})});var $A=H(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});CF.SHOW_WARNINGS=!0;CF.ADD_TITLE_ELEMENTS=!0});var AF=H(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});var j7e=$A();function LXt(e){!j7e.SHOW_WARNINGS||console.warn(e)}gS.warn=LXt;function kXt(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return t===0?(e(r),-1):window.setTimeout(e,t,r)}gS.setTimeout=kXt;function X7e(e,t,r){var n=null,i=[],o=function(){t.apply(r,i)};return function(){i=Array.prototype.slice.call(arguments),clearTimeout(n),n=kXt(o,e)}}gS.debounce=X7e;function $7e(e,t,r){r===void 0&&(r=""),LXt("Method "+e+" has been deprecated in version "+t+". Please refer to the release notes. "+r)}gS.deprecated=$7e});var RXt=H(Lit=>{"use strict";Object.defineProperty(Lit,"__esModule",{value:!0});var K7e=function(){function e(t,r,n){this.entryIndex=t,this.exitIndex=t,this.minIndex=t,this.maxIndex=t,this.bucketValue=r,this.minValue=n,this.maxValue=n}return e.prototype.isInBucket=function(t){return t==this.bucketValue},e.prototype.addToBucket=function(t,r){t<this.minValue&&(this.minValue=t,this.minIndex=r),t>this.maxValue&&(this.maxValue=t,this.maxIndex=r),this.exitIndex=r},e.prototype.getUniqueIndices=function(){var t=[this.entryIndex,this.maxIndex,this.minIndex,this.exitIndex];return t.filter(function(r,n){return n==0||r!=t[n-1]})},e}();Lit.Bucket=K7e});var Rit=H(kit=>{"use strict";Object.defineProperty(kit,"__esModule",{value:!0});var Z7e=function(){function e(){typeof window.Set=="function"?this._es6Set=new window.Set:this._values=[],this.size=0}return e.prototype.add=function(t){return this._es6Set!=null?(this._es6Set.add(t),this.size=this._es6Set.size,this):(this.has(t)||(this._values.push(t),this.size=this._values.length),this)},e.prototype.delete=function(t){if(this._es6Set!=null){var r=this._es6Set.delete(t);return this.size=this._es6Set.size,r}var n=this._values.indexOf(t);return n!==-1?(this._values.splice(n,1),this.size=this._values.length,!0):!1},e.prototype.has=function(t){return this._es6Set!=null?this._es6Set.has(t):this._values.indexOf(t)!==-1},e.prototype.forEach=function(t,r){var n=this;if(this._es6Set!=null){var i=function(o,a){return t.call(r,o,a,n)};this._es6Set.forEach(i,r);return}this._values.forEach(function(o){t.call(r,o,o,n)})},e}();kit.Set=Z7e});var NXt=H(Nit=>{"use strict";Object.defineProperty(Nit,"__esModule",{value:!0});var J7e=(de(),Ut(pe)),Q7e=Rit(),tze=function(e){J7e.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.callCallbacks=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this.forEach(function(o){o.apply(r,n)}),this},t}(Q7e.Set);Nit.CallbackSet=tze});var DXt=H(Dit=>{"use strict";Object.defineProperty(Dit,"__esModule",{value:!0});var Kg=Iit(),eze=function(){function e(){this._entities=[],this._rtree=new Kg.RTree}return e.prototype.addAll=function(t,r,n){if(this._entities=this._entities.concat(t),n!==void 0)for(var i=Kg.RTreeBounds.bounds(n),o=0;o<t.length;o++){var a=t[o],s=Kg.RTreeBounds.entityBounds(r(a));Kg.RTreeBounds.isBoundsOverlapBounds(i,s)&&this._rtree.insert(s,a)}else for(var o=0;o<t.length;o++){var a=t[o],s=Kg.RTreeBounds.entityBounds(r(a));this._rtree.insert(s,a)}},e.prototype.entityNearest=function(t){return this._rtree.locateNearest(t).pop()},e.prototype.entityNearestX=function(t){return this._rtree.locateNearestX(t).pop()},e.prototype.entityNearestY=function(t){return this._rtree.locateNearestY(t).pop()},e.prototype.entitiesInBounds=function(t){return this._rtree.intersect(Kg.RTreeBounds.entityBounds(t))},e.prototype.entitiesInXBounds=function(t){return this._rtree.intersectX(Kg.RTreeBounds.entityBounds(t))},e.prototype.entitiesInYBounds=function(t){return this._rtree.intersectY(Kg.RTreeBounds.entityBounds(t))},e.prototype.entities=function(){return this._entities},e}();Dit.EntityStore=eze});var OXt=H(Oit=>{"use strict";Object.defineProperty(Oit,"__esModule",{value:!0});var rze=Ait(),nze=function(){function e(){typeof window.Map=="function"?this._es6Map=new window.Map:this._keyValuePairs=[]}return e.prototype.set=function(t,r){if(rze.isNaN(t))throw new Error("NaN may not be used as a key to the Map");if(this._es6Map!=null)return this._es6Map.set(t,r),this;for(var n=0;n<this._keyValuePairs.length;n++)if(this._keyValuePairs[n].key===t)return this._keyValuePairs[n].value=r,this;return this._keyValuePairs.push({key:t,value:r}),this},e.prototype.get=function(t){if(this._es6Map!=null)return this._es6Map.get(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return this._keyValuePairs[r].value},e.prototype.has=function(t){if(this._es6Map!=null)return this._es6Map.has(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return!0;return!1},e.prototype.forEach=function(t,r){var n=this;if(this._es6Map!=null){var i=function(o,a){return t.call(r,o,a,n)};this._es6Map.forEach(i,r);return}this._keyValuePairs.forEach(function(o){t.call(r,o.value,o.key,n)})},e.prototype.delete=function(t){if(this._es6Map!=null)return this._es6Map.delete(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return this._keyValuePairs.splice(r,1),!0;return!1},e}();Oit.Map=nze});var zXt=H(zit=>{"use strict";Object.defineProperty(zit,"__esModule",{value:!0});function ize(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,i=e;n<i.length;n++)for(var o=i[n],a=Object.keys(o),s=0,l=a;s<l.length;s++){var c=l[s];r[c]=o[c]}return r}zit.assign=ize});var HXt=H(PF=>{"use strict";Object.defineProperty(PF,"__esModule",{value:!0});var Fit=Fe(),FXt="__Plottable_ClientTranslator";function oze(e){var t=e.root().rootElement().node(),r=t[FXt];return r==null&&(r=new BXt(t),t[FXt]=r),r}PF.getTranslator=oze;var BXt=function(){function e(t){this._rootElement=t}return e.prototype.computePosition=function(t,r){var n={x:t,y:r},i=Fit.Math.getCumulativeTransform(this._rootElement);if(i==null)return n;var o=Fit.Math.applyTransform(i,n);return o},e.isEventInside=function(t,r){return Fit.DOM.contains(t.root().rootElement().node(),r.target)},e}();PF.Translator=BXt});var Fe=H(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var Zg=(de(),Ut(pe)),aze=_Xt();qo.Array=aze;var sze=xXt();qo.Color=sze;var lze=Cit();qo.DOM=lze;var cze=Ait();qo.Math=cze;var uze=Iit();qo.RTree=uze;var hze=IXt();qo.Stacking=hze;var fze=AF();qo.Window=fze;Zg.__exportStar(RXt(),qo);Zg.__exportStar(NXt(),qo);Zg.__exportStar(jg(),qo);Zg.__exportStar(DXt(),qo);Zg.__exportStar(OXt(),qo);Zg.__exportStar(zXt(),qo);Zg.__exportStar(Rit(),qo);Zg.__exportStar(HXt(),qo)});var Hit=H(KA=>{"use strict";Object.defineProperty(KA,"__esModule",{value:!0});var VXt=Fe(),Bit=IF(),pze=function(){function e(){}return e.prototype.render=function(){Bit.flush()},e}();KA.Immediate=pze;var dze=function(){function e(){}return e.prototype.render=function(){VXt.DOM.requestAnimationFramePolyfill(Bit.flush)},e}();KA.AnimationFrame=dze;var mze=function(){function e(){this._timeoutMsec=VXt.DOM.SCREEN_REFRESH_RATE_MILLISECONDS}return e.prototype.render=function(){setTimeout(Bit.flush,this._timeoutMsec)},e}();KA.Timeout=mze});var IF=H(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var _S=Fe(),gze=Lf(),LF=Hit(),JA=new _S.Set,Vit=new _S.Set,kF=!1,Uit=!1;zu.Policy=gze.makeEnum(["immediate","animationFrame","timeout"]);var ZA=new LF.AnimationFrame;function _ze(e){if(e==null)return ZA;switch(e){case zu.Policy.immediate:ZA=new LF.Immediate;break;case zu.Policy.animationFrame:ZA=new LF.AnimationFrame;break;case zu.Policy.timeout:ZA=new LF.Timeout;break;default:_S.Window.warn("Unrecognized renderPolicy: "+e)}}zu.renderPolicy=_ze;function yze(e){Uit&&_S.Window.warn("Registered to render while other components are flushing: request may be ignored"),JA.add(e),qXt()}zu.registerToRender=yze;function UXt(e){Vit.add(e),JA.add(e),qXt()}zu.registerToComputeLayoutAndRender=UXt;function vze(e){UXt(e)}zu.registerToComputeLayout=vze;function qXt(){kF||(kF=!0,ZA.render())}function xze(){if(kF){Vit.forEach(function(t){return t.computeLayout()}),JA.forEach(function(t){return t.render()}),Uit=!0;var e=new _S.Set;JA.forEach(function(t){try{t.renderImmediately()}catch(r){window.setTimeout(function(){throw r},0),e.add(t)}}),Vit=new _S.Set,JA=e,kF=!1,Uit=!1}}zu.flush=xze});var kc=H(QA=>{"use strict";Object.defineProperty(QA,"__esModule",{value:!0});var GXt=(Er(),Ut(Mr)),RF=IF(),yS=Fe(),bze=Oe(),WXt=jg(),YXt=Lf();QA.XAlignment=YXt.makeEnum(["left","center","right"]);QA.YAlignment=YXt.makeEnum(["top","center","bottom"]);var wze=function(){function e(){this._overflowHidden=!1,this._origin={x:0,y:0},this._xAlignment="left",this._yAlignment="top",this._isSetup=!1,this._isAnchored=!1,this._cssClasses=new yS.Set,this._destroyed=!1,this._onAnchorCallbacks=new yS.CallbackSet,this._onDetachCallbacks=new yS.CallbackSet,this._cssClasses.add("component")}return e.prototype.anchor=function(t){if(t=WXt.coerceExternalD3(t),this._destroyed)throw new Error("Can't reuse destroy()-ed Components!");return this.isRoot()&&(this._rootElement=t,this._rootElement.classed("plottable",!0)),this._element!=null?t.node().appendChild(this._element.node()):(this._element=t.append("div"),this._setup()),this._isAnchored=!0,this._onAnchorCallbacks.callCallbacks(this),this},e.prototype.onAnchor=function(t){return this._isAnchored&&t(this),this._onAnchorCallbacks.add(t),this},e.prototype.offAnchor=function(t){return this._onAnchorCallbacks.delete(t),this},e.prototype._setup=function(){var t=this;this._isSetup||(this._cssClasses.forEach(function(r){t._element.classed(r,!0)}),this._cssClasses=new yS.Set,this._backgroundContainer=this._element.append("svg").classed("background-container",!0),this._content=this._element.append("svg").classed("content",!0),this._foregroundContainer=this._element.append("svg").classed("foreground-container",!0),this._overflowHidden?this._content.classed("component-overflow-hidden",!0):this._content.classed("component-overflow-visible",!0),this._isSetup=!0)},e.prototype.requestedSpace=function(t,r){return{minWidth:0,minHeight:0}},e.prototype.computeLayout=function(t,r,n){if(t==null||r==null||n==null){if(this._element==null)throw new Error("anchor() must be called before computeLayout()");if(this._rootElement!=null){t={x:0,y:0};var i=this._rootElement.node();r=yS.DOM.elementWidth(i),n=yS.DOM.elementHeight(i)}else throw new Error("null arguments cannot be passed to computeLayout() on a non-root, unanchored node")}var o=this._sizeFromOffer(r,n),a=o.height,s=o.width,l=e._xAlignToProportion[this._xAlignment],c=e._yAlignToProportion[this._yAlignment],u=t.x+(r-s)*l,h=t.y+(n-a)*c;return this.setBounds(s,a,u,h),this},e.prototype.setBounds=function(t,r,n,i){return n===void 0&&(n=0),i===void 0&&(i=0),this._width=t,this._height=r,this._origin={x:n,y:i},this._element!=null&&this._element.styles({left:n+"px",height:r+"px",top:i+"px",width:t+"px"}),this._resizeHandler!=null&&this._resizeHandler({width:t,height:r}),this},e.prototype._sizeFromOffer=function(t,r){var n=this.requestedSpace(t,r);return{width:this.fixedWidth()?Math.min(t,n.minWidth):t,height:this.fixedHeight()?Math.min(r,n.minHeight):r}},e.prototype.render=function(){return this._isAnchored&&this._isSetup&&this.width()>=0&&this.height()>=0&&RF.registerToRender(this),this},e.prototype.renderLowPriority=function(){return this.render()},e.prototype._scheduleComputeLayout=function(){this._isAnchored&&this._isSetup&&RF.registerToComputeLayoutAndRender(this)},e.prototype.onResize=function(t){return this._resizeHandler=t,this},e.prototype.renderImmediately=function(){return this},e.prototype.redraw=function(){return this._isAnchored&&this._isSetup&&(this.isRoot()?this._scheduleComputeLayout():this.parent().redraw()),this},e.prototype.invalidateCache=function(){},e.prototype.renderTo=function(t){if(this.detach(),t!=null){var r=void 0;if(typeof t=="string"||bze.isElement(t)?r=GXt.select(t):r=WXt.coerceExternalD3(t),!r.node()||r.node().nodeName==null)throw new Error("Plottable requires a valid Element to renderTo");if(r.node().nodeName==="svg")throw new Error("Plottable 3.x and later can only renderTo an HTML component; pass a div instead!");this.anchor(r)}if(this._element==null)throw new Error("If a Component has never been rendered before, then renderTo must be given a node to render to, or a d3.Selection, or a selector string");return RF.registerToComputeLayoutAndRender(this),RF.flush(),this},e.prototype.xAlignment=function(t){if(t==null)return this._xAlignment;if(t=t.toLowerCase(),e._xAlignToProportion[t]==null)throw new Error("Unsupported alignment: "+t);return this._xAlignment=t,this.redraw(),this},e.prototype.yAlignment=function(t){if(t==null)return this._yAlignment;if(t=t.toLowerCase(),e._yAlignToProportion[t]==null)throw new Error("Unsupported alignment: "+t);return this._yAlignment=t,this.redraw(),this},e.prototype.hasClass=function(t){return t==null?!1:this._element==null?this._cssClasses.has(t):this._element.classed(t)},e.prototype.addClass=function(t){return t==null?this:(this._element==null?this._cssClasses.add(t):this._element.classed(t,!0),this)},e.prototype.removeClass=function(t){return t==null?this:(this._element==null?this._cssClasses.delete(t):this._element.classed(t,!1),this)},e.prototype.fixedWidth=function(){return!1},e.prototype.fixedHeight=function(){return!1},e.prototype.detach=function(){return this.parent(null),this._isAnchored&&this._element.remove(),this._isAnchored=!1,this._onDetachCallbacks.callCallbacks(this),this},e.prototype.onDetach=function(t){return this._onDetachCallbacks.add(t),this},e.prototype.offDetach=function(t){return this._onDetachCallbacks.delete(t),this},e.prototype.parent=function(t){if(t===void 0)return this._parent;if(t!==null&&!t.has(this))throw new Error("Passed invalid parent");return this._parent=t,this},e.prototype.bounds=function(){var t=this.origin();return{topLeft:t,bottomRight:{x:t.x+this.width(),y:t.y+this.height()}}},e.prototype.destroy=function(){this._destroyed=!0,this.detach()},e.prototype.width=function(){return this._width},e.prototype.height=function(){return this._height},e.prototype.origin=function(){return{x:this._origin.x,y:this._origin.y}},e.prototype.originToRoot=function(){for(var t=this.origin(),r=this.parent();r!=null;){var n=r.origin();t.x+=n.x,t.y+=n.y,r=r.parent()}return t},e.prototype.root=function(){for(var t=this;!t.isRoot();)t=t.parent();return t},e.prototype.isRoot=function(){return this.parent()==null},e.prototype.foreground=function(){return this._foregroundContainer},e.prototype.content=function(){return this._content},e.prototype.element=function(){return this._element},e.prototype.rootElement=function(){return this.root()._rootElement},e.prototype.background=function(){return this._backgroundContainer},e._xAlignToProportion={left:0,center:.5,right:1},e._yAlignToProportion={top:0,center:.5,bottom:1},e}();QA.Component=wze});var Bu=H(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var vS=(Er(),Ut(Mr)),Sze=!1;function Mze(e,t,r){e===void 0&&(e=2),t===void 0&&(t="$"),r===void 0&&(r=!0);var n=qit(e);return function(i){var o=n(Math.abs(i));return o!==""&&(r?o=t+o:o+=t,i<0&&(o="-"+o)),o}}Fu.currency=Mze;function qit(e){return e===void 0&&(e=3),NF(e),function(t){return t.toFixed(e)}}Fu.fixed=qit;function Eze(e){return e===void 0&&(e=3),NF(e),function(t){if(typeof t=="number"){var r=Math.pow(10,e);return String(Math.round(t*r)/r)}else return String(t)}}Fu.general=Eze;function Tze(){return function(e){return String(e)}}Fu.identity=Tze;function Cze(e){e===void 0&&(e=0);var t=qit(e);return function(r){var n=r*100,i=r.toString(),o=Math.pow(10,i.length-(i.indexOf(".")+1));return n=parseInt((n*o).toString(),10)/o,t(n)+"%"}}Fu.percentage=Cze;function Aze(e){return e===void 0&&(e=3),NF(e),function(t){return vS.format("."+e+"s")(t)}}Fu.siSuffix=Aze;function Pze(e){e===void 0&&(e=3),NF(e);var t="KMBTQ",r=vS.format("."+e+"e"),n=vS.format("."+e+"f"),i=Math.pow(10,3*(t.length+1)),o=Math.pow(10,-e);return function(a){var s=Math.abs(a);if((s<o||s>=i)&&s!==0)return r(a);for(var l=-1;s>=Math.pow(1e3,l+2)&&l<t.length-1;)l++;var c="";return l===-1?c=n(a):c=n(a/Math.pow(1e3,l+1))+t[l],(a>0&&c.substr(0,4)==="1000"||a<0&&c.substr(0,5)==="-1000")&&(l<t.length-1?(l++,c=n(a/Math.pow(1e3,l+1))+t[l]):c=r(a)),c}}Fu.shortScale=Pze;function Ize(){var e=[{specifier:".%L",predicate:function(t){return t.getMilliseconds()!==0}},{specifier:":%S",predicate:function(t){return t.getSeconds()!==0}},{specifier:"%I:%M",predicate:function(t){return t.getMinutes()!==0}},{specifier:"%I %p",predicate:function(t){return t.getHours()!==0}},{specifier:"%a %d",predicate:function(t){return t.getDay()!==0&&t.getDate()!==1}},{specifier:"%b %d",predicate:function(t){return t.getDate()!==1}},{specifier:"%b",predicate:function(t){return t.getMonth()!==0}}];return function(t){var r=e.filter(function(i){return i.predicate(t)}),n=r.length>0?r[0].specifier:"%Y";return vS.timeFormat(n)(t)}}Fu.multiTime=Ize;function Lze(e,t){return t===void 0&&(t=Sze),t?vS.utcFormat(e):vS.timeFormat(e)}Fu.time=Lze;function NF(e){if(e<0||e>20)throw new RangeError("Formatter precision must be between 0 and 20");if(e!==Math.floor(e))throw new RangeError("Formatter precision must be an integer")}});var t4=H(DF=>{"use strict";Object.defineProperty(DF,"__esModule",{value:!0});var kze=(de(),Ut(pe)),vd=(Er(),Ut(Mr)),Git=yl(),Rze=kc(),jXt=Bu(),xS=Fe(),Nze=Lf();DF.AxisOrientation=Nze.makeEnum(["bottom","left","right","top"]);var Dze=function(e){kze.__extends(t,e);function t(r,n){var i=e.call(this)||this;if(i._endTickLength=5,i._innerTickLength=5,i._tickLabelPadding=10,i._margin=15,i._showEndTickLabels=!1,i._annotationsEnabled=!1,i._annotationTierCount=1,r==null||n==null)throw new Error("Axis requires a scale and orientation");return i._scale=r,i.orientation(n),i._setDefaultAlignment(),i.addClass("axis"),i.isHorizontal()?i.addClass("x-axis"):i.addClass("y-axis"),i.formatter(jXt.identity()),i._rescaleCallback=function(o){return i._rescale()},i._scale.onUpdate(i._rescaleCallback),i._annotatedTicks=[],i._annotationFormatter=jXt.identity(),i}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this._scale.offUpdate(this._rescaleCallback)},t.prototype.tickLabelDataOnElement=function(r){if(r!=null){for(var n;r!=null&&r.classList&&n===void 0;)r.classList.contains(t.TICK_LABEL_CLASS)?n=r:r=r.parentNode;return r===void 0?void 0:vd.select(r).datum()}},t.prototype._computeWidth=function(){return this._maxLabelTickLength()},t.prototype._computeHeight=function(){return this._maxLabelTickLength()},t.prototype.requestedSpace=function(r,n){var i=0,o=0;if(this.isHorizontal()){if(o=this._computeHeight()+this._margin,this.annotationsEnabled()){var a=this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING;o+=a*this.annotationTierCount()}}else if(i=this._computeWidth()+this._margin,this.annotationsEnabled()){var a=this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING;i+=a*this.annotationTierCount()}return{minWidth:i,minHeight:o}},t.prototype.fixedHeight=function(){return this.isHorizontal()},t.prototype.fixedWidth=function(){return!this.isHorizontal()},t.prototype._rescale=function(){this.render()},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.isHorizontal()?this._scale.range([0,this.width()]):this._scale.range([this.height(),0]),this},t.prototype._sizeFromOffer=function(r,n){var i=this.requestedSpace(r,n);return this.isHorizontal()?{width:r,height:i.minHeight}:{height:n,width:i.minWidth}},t.prototype._setup=function(){e.prototype._setup.call(this),this._tickMarkContainer=this.content().append("g").classed(t.TICK_MARK_CLASS+"-container",!0),this._tickLabelContainer=this.content().append("g").classed(t.TICK_LABEL_CLASS+"-container",!0),this._baseline=this.content().append("line").classed("baseline",!0),this._annotationContainer=this.content().append("g").classed("annotation-container",!0),this._annotationContainer.append("g").classed("annotation-line-container",!0),this._annotationContainer.append("g").classed("annotation-circle-container",!0),this._annotationContainer.append("g").classed("annotation-rect-container",!0);var r=this._annotationContainer.append("g").classed("annotation-label-container",!0),n=new Git.SvgContext(r.node());this._annotationMeasurer=new Git.CacheMeasurer(n),this._annotationWriter=new Git.Writer(this._annotationMeasurer,n)},t.prototype._getTickValues=function(){return[]},t.prototype.renderImmediately=function(){var r=this._getTickValues(),n=this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS).data(r),i=n.enter().append("line").classed(t.TICK_MARK_CLASS,!0).merge(n);return i.attrs(this._generateTickMarkAttrHash()),vd.select(i.nodes()[0]).classed(t.END_TICK_MARK_CLASS,!0).attrs(this._generateTickMarkAttrHash(!0)),vd.select(i.nodes()[r.length-1]).classed(t.END_TICK_MARK_CLASS,!0).attrs(this._generateTickMarkAttrHash(!0)),n.exit().remove(),this._baseline.attrs(this._generateBaselineAttrHash()),this.annotationsEnabled()?this._drawAnnotations():this._removeAnnotations(),this},t.prototype.annotatedTicks=function(r){return r==null?this._annotatedTicks:(this._annotatedTicks=r,this.render(),this)},t.prototype.annotationFormatter=function(r){return r==null?this._annotationFormatter:(this._annotationFormatter=r,this.render(),this)},t.prototype.annotationsEnabled=function(r){return r==null?this._annotationsEnabled:(this._annotationsEnabled=r,this.redraw(),this)},t.prototype.annotationTierCount=function(r){if(r==null)return this._annotationTierCount;if(r<0)throw new Error("annotationTierCount cannot be negative");return this._annotationTierCount=r,this.redraw(),this},t.prototype._drawAnnotations=function(){var r=this,n=t._ANNOTATION_LABEL_PADDING,i=new xS.Map,o=this._annotatedTicksToRender();o.forEach(function(P){var k=r._annotationMeasurer.measure(r.annotationFormatter()(P)),O={width:k.width+2*n,height:k.height+2*n};i.set(P,O)});var a=this._annotationMeasurer.measure().height+2*n,s=this._annotationToTier(i),l=new xS.Set,c=this.isHorizontal()?this.height():this.width(),u=this._coreSize(),h=Math.min(this.annotationTierCount(),Math.floor((c-u)/a));s.forEach(function(P,k){(P===-1||P>=h)&&l.add(k)});var f=function(P,k,O){var D=P.selectAll("."+O).data(o),B=D.enter().append(k).classed(O,!0).merge(D);return D.exit().remove(),B},p=function(P){switch(r.orientation()){case"bottom":case"right":return s.get(P)*a+u;case"top":case"left":return c-u-s.get(P)*a}},d=function(P){return r._scale.scale(P)},g=function(P){return l.has(P)?"hidden":"visible"},_;switch(this.orientation()){case"bottom":case"right":_=0;break;case"top":_=this.height();break;case"left":_=this.width();break}var y=this.isHorizontal();f(this._annotationContainer.select(".annotation-line-container"),"line",t.ANNOTATION_LINE_CLASS).attrs({x1:y?d:_,x2:y?d:p,y1:y?_:d,y2:y?p:d,visibility:g}),f(this._annotationContainer.select(".annotation-circle-container"),"circle",t.ANNOTATION_CIRCLE_CLASS).attrs({cx:y?d:_,cy:y?_:d,r:3});var x=function(P){switch(r.orientation()){case"bottom":case"right":return p(P);case"top":case"left":return p(P)-i.get(P).height}};f(this._annotationContainer.select(".annotation-rect-container"),"rect",t.ANNOTATION_RECT_CLASS).attrs({x:y?d:x,y:y?x:d,width:y?function(P){return i.get(P).width}:function(P){return i.get(P).height},height:y?function(P){return i.get(P).height}:function(P){return i.get(P).width},visibility:g});var b=this._annotationWriter,S=this.annotationFormatter(),C=f(this._annotationContainer.select(".annotation-label-container"),"g",t.ANNOTATION_LABEL_CLASS);C.selectAll(".text-container").remove(),C.attrs({transform:function(P){var k=y?d(P):x(P),O=y?x(P):d(P);return"translate("+k+","+O+")"},visibility:g}).each(function(P){b.write(S(P),y?i.get(P).width:i.get(P).height,y?i.get(P).height:i.get(P).width,{xAlign:"center",yAlign:"center",textRotation:y?0:90},vd.select(this).node())})},t.prototype._annotatedTicksToRender=function(){var r=this,n=this._scale.range();return xS.Array.uniq(this.annotatedTicks().filter(function(i){return i==null?!1:xS.Math.inRange(r._scale.scale(i),n[0],n[1])}))},t.prototype._coreSize=function(){var r=this.isHorizontal()?this.height():this.width(),n=this.isHorizontal()?this._computeHeight():this._computeWidth();return Math.min(n,r)},t.prototype._annotationTierHeight=function(){return this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING},t.prototype._annotationToTier=function(r){var n=this,i=[[]],o=new xS.Map,a=this.isHorizontal()?this.width():this.height();return this._annotatedTicksToRender().forEach(function(s){var l=n._scale.scale(s),c=r.get(s).width;if(l<0||l+c>a){o.set(s,-1);return}for(var u=function(f){return i[f].some(function(p){var d=n._scale.scale(p),g=r.get(p).width;return l+c>=d&&l<=d+g})},h=0;u(h);)h++,i.length===h&&i.push([]);i[h].push(s),o.set(s,h)}),o},t.prototype._removeAnnotations=function(){this._annotationContainer.selectAll(".annotation-line").remove(),this._annotationContainer.selectAll(".annotation-circle").remove(),this._annotationContainer.selectAll(".annotation-rect").remove(),this._annotationContainer.selectAll(".annotation-label").remove()},t.prototype._generateBaselineAttrHash=function(){var r={x1:0,y1:0,x2:0,y2:0};switch(this._orientation){case"bottom":r.x2=this.width();break;case"top":r.x2=this.width(),r.y1=this.height(),r.y2=this.height();break;case"left":r.x1=this.width(),r.x2=this.width(),r.y2=this.height();break;case"right":r.y2=this.height();break}return r},t.prototype._generateTickMarkAttrHash=function(r){var n=this;r===void 0&&(r=!1);var i={x1:0,y1:0,x2:0,y2:0},o=function(s){return n._scale.scale(s)};this.isHorizontal()?(i.x1=o,i.x2=o):(i.y1=o,i.y2=o);var a=r?this._endTickLength:this._innerTickLength;switch(this._orientation){case"bottom":i.y2=a;break;case"top":i.y1=this.height(),i.y2=this.height()-a;break;case"left":i.x1=this.width(),i.x2=this.width()-a;break;case"right":i.x2=a;break}return i},t.prototype._setDefaultAlignment=function(){switch(this._orientation){case"bottom":this.yAlignment("top");break;case"top":this.yAlignment("bottom");break;case"left":this.xAlignment("right");break;case"right":this.xAlignment("left");break}},t.prototype.isHorizontal=function(){return this._orientation==="top"||this._orientation==="bottom"},t.prototype.getScale=function(){return this._scale},t.prototype.formatter=function(r){return r==null?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.innerTickLength=function(r){if(r==null)return this._innerTickLength;if(r<0)throw new Error("inner tick length must be positive");return this._innerTickLength=r,this.redraw(),this},t.prototype.endTickLength=function(r){if(r==null)return this._endTickLength;if(r<0)throw new Error("end tick length must be positive");return this._endTickLength=r,this.redraw(),this},t.prototype._maxLabelTickLength=function(){return this.showEndTickLabels()?Math.max(this.innerTickLength(),this.endTickLength()):this.innerTickLength()},t.prototype.tickLabelPadding=function(r){if(r==null)return this._tickLabelPadding;if(r<0)throw new Error("tick label padding must be positive");return this._tickLabelPadding=r,this.redraw(),this},t.prototype.margin=function(r){if(r==null)return this._margin;if(r<0)throw new Error("margin size must be positive");return this._margin=r,this.redraw(),this},t.prototype.orientation=function(r){if(r==null)return this._orientation;var n=r.toLowerCase();if(n!=="top"&&n!=="bottom"&&n!=="left"&&n!=="right")throw new Error("unsupported orientation");return this._orientation=n,this.redraw(),this},t.prototype.showEndTickLabels=function(r){return r==null?this._showEndTickLabels:(this._showEndTickLabels=r,this.render(),this)},t.prototype._showAllTickMarks=function(){this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS).each(function(){vd.select(this).style("visibility","inherit")})},t.prototype._showAllTickLabels=function(){this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS).each(function(){vd.select(this).style("visibility","inherit")})},t.prototype._hideOverflowingTickLabels=function(){var r=this.element().node().getBoundingClientRect(),n=this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS);n.empty()||n.each(function(i,o){xS.DOM.clientRectInside(this.getBoundingClientRect(),r)||vd.select(this).style("visibility","hidden")})},t.prototype._hideTickMarksWithoutLabel=function(){var r=this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS),n=this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS).filter(function(o,a){var s=vd.select(this).style("visibility");return s==="inherit"||s==="visible"}),i=n.data();r.each(function(o,a){i.indexOf(o)===-1&&vd.select(this).style("visibility","hidden")})},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._annotationMeasurer.reset()},t.END_TICK_MARK_CLASS="end-tick-mark",t.TICK_MARK_CLASS="tick-mark",t.TICK_LABEL_CLASS="tick-label",t.ANNOTATION_LINE_CLASS="annotation-line",t.ANNOTATION_RECT_CLASS="annotation-rect",t.ANNOTATION_CIRCLE_CLASS="annotation-circle",t.ANNOTATION_LABEL_CLASS="annotation-label",t._ANNOTATION_LABEL_PADDING=4,t}(Rze.Component);DF.Axis=Dze});var $Xt=H(jit=>{"use strict";Object.defineProperty(jit,"__esModule",{value:!0});var Oze=(de(),Ut(pe)),Wit=(Er(),Ut(Mr)),OF=yl(),zze=kc(),XXt=Fe(),Yit=t4(),Fze=function(e){Oze.__extends(t,e);function t(r,n){n===void 0&&(n="bottom");var i=e.call(this,r,n)||this;return i._tickLabelAngle=0,i._tickLabelShearAngle=0,i.addClass("category-axis"),i}return Object.defineProperty(t.prototype,"_wrapper",{get:function(){var r=new OF.Wrapper;return this._tickLabelMaxLines!=null&&r.maxLines(this._tickLabelMaxLines),r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_writer",{get:function(){return new OF.Writer(this._measurer,this._typesetterContext,this._wrapper)},enumerable:!0,configurable:!0}),t.prototype._setup=function(){e.prototype._setup.call(this),this._typesetterContext=new OF.SvgContext(this._tickLabelContainer.node()),this._measurer=new OF.CacheMeasurer(this._typesetterContext)},t.prototype._rescale=function(){return this.redraw()},t.prototype.requestedSpace=function(r,n){var i=this.isHorizontal()?0:this._tickSpaceRequired()+this.margin(),o=this.isHorizontal()?this._tickSpaceRequired()+this.margin():0;if(this._scale.domain().length===0)return{minWidth:0,minHeight:0};if(this.annotationsEnabled()){var a=this._annotationTierHeight()*this.annotationTierCount();this.isHorizontal()?o+=a:i+=a}var s=this._measureTickLabels(r,n);return{minWidth:s.usedWidth+i,minHeight:s.usedHeight+o}},t.prototype._coreSize=function(){var r=this.isHorizontal()?this.height():this.width(),n=this.isHorizontal()?this.requestedSpace(this.width(),this.height()).minHeight:this.requestedSpace(this.width(),this.height()).minWidth,i=this.margin()+this._annotationTierHeight(),o=n-i;return Math.min(o,r)},t.prototype._getTickValues=function(){return this.getDownsampleInfo().domain},t.prototype._sizeFromOffer=function(r,n){return zze.Component.prototype._sizeFromOffer.call(this,r,n)},t.prototype.getDownsampleInfo=function(r,n){r===void 0&&(r=this._scale),n===void 0&&(n=r.invertRange());var i=this._tickLabelAngle===0?1:1/Math.cos(this._tickLabelShearAngle/180*Math.PI),o=t._MINIMUM_WIDTH_PER_LABEL_PX*i,a=Math.ceil(o/r.stepWidth());return{domain:n.filter(function(s,l){return l%a===0}),stepWidth:a*r.stepWidth()}},t.prototype.tickLabelAngle=function(r){if(r==null)return this._tickLabelAngle;if(r!==0&&r!==90&&r!==-90)throw new Error("Angle "+r+" not supported; only 0, 90, and -90 are valid values");return this._tickLabelAngle=r,this.redraw(),this},t.prototype.tickLabelShearAngle=function(r){if(r==null)return this._tickLabelShearAngle;if(r<-80||r>80)throw new Error("Angle "+r+" not supported; Must be between [-80, 80]");return this._tickLabelShearAngle=r,this.redraw(),this},t.prototype.tickLabelMaxWidth=function(r){return arguments.length===0?this._tickLabelMaxWidth:(this._tickLabelMaxWidth=r,this.redraw(),this)},t.prototype.tickLabelMaxLines=function(r){return arguments.length===0?this._tickLabelMaxLines:(this._tickLabelMaxLines=r,this.redraw(),this)},t.prototype._tickSpaceRequired=function(){return this._maxLabelTickLength()+this.tickLabelPadding()},t.prototype._drawTicks=function(r,n){var i=this,o,a;switch(this.tickLabelAngle()){case 0:o={left:"right",right:"left",top:"center",bottom:"center"},a={left:"center",right:"center",top:"bottom",bottom:"top"};break;case 90:o={left:"center",right:"center",top:"right",bottom:"left"},a={left:"top",right:"bottom",top:"center",bottom:"center"};break;case-90:o={left:"center",right:"center",top:"left",bottom:"right"},a={left:"bottom",right:"top",top:"center",bottom:"center"};break}n.each(function(s){var l=Wit.select(this),c=i.isHorizontal()?r:i.width()-i._tickSpaceRequired(),u=i.isHorizontal()?i.height()-i._tickSpaceRequired():r,h={xAlign:o[i.orientation()],yAlign:a[i.orientation()],textRotation:i.tickLabelAngle(),textShear:i.tickLabelShearAngle()};if(i._tickLabelMaxWidth!=null){if(i.orientation()==="left"&&c>i._tickLabelMaxWidth){var f=c-i._tickLabelMaxWidth,p=l.attr("transform")+" translate("+f+", 0)";l.attr("transform",p)}c=Math.min(c,i._tickLabelMaxWidth)}i._writer.write(i.formatter()(s),c,u,h,l.node())})},t.prototype._measureTickLabels=function(r,n){var i=this,o=this._scale,a=o.cloneWithoutProviders().range([0,this.isHorizontal()?r:n]),s=this.getDownsampleInfo(a),l=s.domain,c=s.stepWidth,u=r-this._tickSpaceRequired();this.isHorizontal()&&(u=c,this._tickLabelAngle!==0&&(u=n-this._tickSpaceRequired()),u=Math.max(u,0));var h=c;this.isHorizontal()&&(h=n-this._tickSpaceRequired(),this._tickLabelAngle!==0&&(h=r-this._tickSpaceRequired()),h=Math.max(h,0)),this._tickLabelMaxWidth!=null&&(u=Math.min(u,this._tickLabelMaxWidth));var f=l.map(function(x){return i._wrapper.wrap(i.formatter()(x),i._measurer,u,h)}),p=this.isHorizontal()&&this._tickLabelAngle===0?Wit.sum:XXt.Math.max,d=this.isHorizontal()&&this._tickLabelAngle===0?XXt.Math.max:Wit.sum,g=p(f,function(x){return i._measurer.measure(x.wrappedText).width},0),_=d(f,function(x){return i._measurer.measure(x.wrappedText).height},0);return this._tickLabelAngle!==0&&(y=[_,g],g=y[0],_=y[1]),{usedWidth:g,usedHeight:_};var y},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n=this._scale,i=this.getDownsampleInfo(n),o=i.domain,a=i.stepWidth,s=a;this.isHorizontal()&&this._tickLabelMaxWidth!=null&&(s=Math.min(s,this._tickLabelMaxWidth));var l=function(p,d){var g=n.scale(p)-s/2,_=r.isHorizontal()?g:0,y=r.isHorizontal()?0:g;return"translate("+_+","+y+")"},c=this._tickLabelContainer.selectAll("."+Yit.Axis.TICK_LABEL_CLASS).data(o),u=c.enter().append("g").classed(Yit.Axis.TICK_LABEL_CLASS,!0).merge(c);c.exit().remove(),u.attr("transform",l),u.text(""),this._drawTicks(a,u);var h=this.orientation()==="right"?this._tickSpaceRequired():0,f=this.orientation()==="bottom"?this._tickSpaceRequired():0;return this._tickLabelContainer.attr("transform","translate("+h+","+f+")"),this._showAllTickMarks(),this._showAllTickLabels(),this._hideTickMarksWithoutLabel(),this},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.isHorizontal()||this._scale.range([0,this.height()]),this},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t._MINIMUM_WIDTH_PER_LABEL_PX=15,t}(Yit.Axis);jit.Category=Fze});var KXt=H($it=>{"use strict";Object.defineProperty($it,"__esModule",{value:!0});var Bze=(de(),Ut(pe)),zF=(Er(),Ut(Mr)),Xit=yl(),Hze=Bu(),bS=Fe(),wS=t4(),Vze=function(e){Bze.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i._tickLabelPositioning="center",i._usesTextWidthApproximation=!1,i.formatter(Hze.general()),i}return t.prototype._setup=function(){e.prototype._setup.call(this);var r=new Xit.SvgContext(this._tickLabelContainer.node(),wS.Axis.TICK_LABEL_CLASS);this._measurer=new Xit.CacheMeasurer(r),this._wrapper=new Xit.Wrapper().maxLines(1)},t.prototype._computeWidth=function(){var r=this._usesTextWidthApproximation?this._computeApproximateTextWidth():this._computeExactTextWidth();return this._tickLabelPositioning==="center"?this._maxLabelTickLength()+this.tickLabelPadding()+r:Math.max(this._maxLabelTickLength(),this.tickLabelPadding()+r)},t.prototype._computeExactTextWidth=function(){var r=this,n=this._getTickValues(),i=n.map(function(o){var a=r.formatter()(o);return r._measurer.measure(a).width});return bS.Math.max(i,0)},t.prototype._computeApproximateTextWidth=function(){var r=this,n=this._getTickValues(),i=this._measurer.measure("M").width,o=n.map(function(a){var s=r.formatter()(a);return s.length*i});return bS.Math.max(o,0)},t.prototype._computeHeight=function(){var r=this._measurer.measure().height;return this._tickLabelPositioning==="center"?this._maxLabelTickLength()+this.tickLabelPadding()+r:Math.max(this._maxLabelTickLength(),this.tickLabelPadding()+r)},t.prototype._getTickValues=function(){var r=this._scale,n=r.domain(),i=n[0]<=n[1]?n[0]:n[1],o=n[0]>=n[1]?n[0]:n[1];return r.ticks().filter(function(a){return a>=i&&a<=o})},t.prototype._rescale=function(){if(!!this._isSetup){if(!this.isHorizontal()){var r=this._computeWidth();if(r>this.width()||r<this.width()-this.margin()){this.redraw();return}}this.render()}},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n={x:0,y:0,dx:"0em",dy:"0.3em"},i=this._maxLabelTickLength(),o=this.tickLabelPadding(),a="middle",s=0,l=0,c=0,u=0;if(this.isHorizontal())switch(this._tickLabelPositioning){case"left":a="end",s=-o,u=o;break;case"center":u=i+o;break;case"right":a="start",s=o,u=o;break}else switch(this._tickLabelPositioning){case"top":n.dy="-0.3em",c=o,l=-o;break;case"center":c=i+o;break;case"bottom":n.dy="1em",c=o,l=o;break}var h=this._generateTickMarkAttrHash();switch(this.orientation()){case"bottom":n.x=h.x1,n.dy="0.95em",l=h.y1+u;break;case"top":n.x=h.x1,n.dy="-.25em",l=h.y1-u;break;case"left":a="end",s=h.x1-c,n.y=h.y1;break;case"right":a="start",s=h.x1+c,n.y=h.y1;break}var f=this._getTickValues(),p=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS).data(f);p.exit().remove();var d=p.enter().append("text").classed(wS.Axis.TICK_LABEL_CLASS,!0).merge(p);d.style("text-anchor",a).style("visibility","inherit").attrs(n).text(function(_){return r.formatter()(_)});var g="translate("+s+", "+l+")";return this._tickLabelContainer.attr("transform",g),this._showAllTickMarks(),this.showEndTickLabels()||this._hideEndTickLabels(),this._hideOverflowingTickLabels(),this._hideOverlappingTickLabels(),this._tickLabelPositioning!=="center"&&this._hideTickMarksWithoutLabel(),this},t.prototype.tickLabelPosition=function(r){if(r==null)return this._tickLabelPositioning;var n=r.toLowerCase();if(this.isHorizontal()){if(!(n==="left"||n==="center"||n==="right"))throw new Error(n+" is not a valid tick label position for a horizontal NumericAxis")}else if(!(n==="top"||n==="center"||n==="bottom"))throw new Error(n+" is not a valid tick label position for a vertical NumericAxis");return this._tickLabelPositioning=n,this.redraw(),this},t.prototype.usesTextWidthApproximation=function(r){return r==null?this._usesTextWidthApproximation:(this._usesTextWidthApproximation=r,this)},t.prototype._hideEndTickLabels=function(){var r=this.element().node().getBoundingClientRect(),n=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS);if(n.size()!==0){var i=n.nodes()[0];bS.DOM.clientRectInside(i.getBoundingClientRect(),r)||zF.select(i).style("visibility","hidden");var o=n.nodes()[n.size()-1];bS.DOM.clientRectInside(o.getBoundingClientRect(),r)||zF.select(o).style("visibility","hidden")}},t.prototype._hideOverlappingTickLabels=function(){for(var r=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS).filter(function(o,a){var s=zF.select(this).style("visibility");return s==="inherit"||s==="visible"}),n=r.nodes().map(function(o){return o.getBoundingClientRect()}),i=1;!this._hasOverlapWithInterval(i,n)&&i<n.length;)i+=1;r.each(function(o,a){var s=zF.select(this);a%i!==0&&s.style("visibility","hidden")})},t.prototype._hasOverlapWithInterval=function(r,n){for(var i=this._tickLabelPositioning==="center"?this.tickLabelPadding():this.tickLabelPadding()*3,o=n.map(function(c){return bS.DOM.expandRect(c,i)}),a=0;a<o.length-r;a+=r){var s=o[a],l=o[a+r];if(bS.DOM.clientRectsOverlap(s,l))return!1}return!0},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t}(wS.Axis);$it.Numeric=Vze});var ZXt=H(FF=>{"use strict";Object.defineProperty(FF,"__esModule",{value:!0});var Uze=Fe();function qze(e){if(e<=0)throw new Error("interval must be positive number");return function(t){var r=t.domain(),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),o=Math.ceil(n/e)*e,a=Math.floor((i-o)/e)+1,s=n%e===0?[]:[n],l=Uze.Math.range(0,a).map(function(u){return o+u*e}),c=i%e===0?[]:[i];return s.concat(l).concat(c)}}FF.intervalTickGenerator=qze;function Gze(){return function(e){var t=e.defaultTicks();return t.filter(function(r,n){return r%1===0||n===0||n===t.length-1})}}FF.integerTickGenerator=Gze});var e4=H(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});function Zit(e,t,r){return r-(r-e)*t}Lv.zoomOut=Zit;function Kit(e,t,r){return(e*t-r)/(t-1)}function Wze(e,t,r,n,i,o,a){return t=JXt(e,t,n,i),QXt(e,t,r,o,a)}Lv.constrainedZoom=Wze;function JXt(e,t,r,n){var i=t>1,o=i?n:r;if(o==null)return t;var a=e.getTransformationDomain(),s=a[0],l=a[1],c=Math.abs(l-s),u=i?Math.min:Math.max;return u(t,o/c)}Lv.constrainZoomExtents=JXt;function QXt(e,t,r,n,i){if(t<=1)return{centerPoint:r,zoomAmount:t};if(n==null&&i==null)return{centerPoint:r,zoomAmount:t};var o=t$t(e),a=jze(e),s=a?1/0:-1/0,l=a?-1/0:1/0;n=n==null?s:n,i=i==null?l:i;var c=e.getTransformationDomain(),u=c[0],h=c[1],f=e.scaleTransformation(i),p=e.scaleTransformation(h),d=Zit(p,t,r),g=e.scaleTransformation(n),_=e.scaleTransformation(u),y=Zit(_,t,r),x=Math.abs(f-g),b=Math.abs(d-y);if(b>x){var S=(f-g)/(p-_);if(S!==1){var C=Kit(p,S,f);return{centerPoint:C,zoomAmount:S}}else return{centerPoint:r,zoomAmount:S}}else return d>f!=o?{centerPoint:Kit(p,t,f),zoomAmount:t}:y<g!=o?{centerPoint:Kit(_,t,g),zoomAmount:t}:{centerPoint:r,zoomAmount:t}}Lv.constrainZoomValues=QXt;function Yze(e,t,r,n){var i=e.getTransformationDomain(),o=i[0],a=i[1],s=t$t(e);if(t>0!==s){var l=n;if(l!=null){var c=e.scaleTransformation(a),u=e.scaleTransformation(l);t=(s?Math.max:Math.min)(c+t,u)-c}}else{var l=r;if(l!=null){var h=e.scaleTransformation(o),f=e.scaleTransformation(l);t=(s?Math.min:Math.max)(h+t,f)-h}}return t}Lv.constrainedTranslation=Yze;function t$t(e){var t=e.range();return t[1]<t[0]}function jze(e){var t=e.getTransformationDomain();return t[1]<t[0]}});var kv=H(Jit=>{"use strict";Object.defineProperty(Jit,"__esModule",{value:!0});var e$t=Fe(),Xze=function(){function e(){this._autoDomainAutomatically=!0,this._domainModificationInProgress=!1,this._updateId=0,this._callbacks=new e$t.CallbackSet,this._includedValuesProviders=new e$t.Set}return e.prototype.extentOfValues=function(t){return[]},e.prototype._getAllIncludedValues=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this._includedValuesProviders.forEach(function(i){var o=i(r,t);n=n.concat(o)}),n},e.prototype._getExtent=function(){return[]},e.prototype.onUpdate=function(t){return this._callbacks.add(t),this},e.prototype.offUpdate=function(t){return this._callbacks.delete(t),this},e.prototype._dispatchUpdate=function(){this._updateId++,this._callbacks.callCallbacks(this)},e.prototype.autoDomain=function(){return this._autoDomainAutomatically=!0,this._setDomain(this._getExtent()),this},e.prototype.autoDomainIfAutomaticMode=function(){this._autoDomainAutomatically&&this.autoDomain()},e.prototype.scale=function(t){throw new Error("Subclasses should override scale")},e.prototype.ticks=function(){return this.domain()},e.prototype.domain=function(t){return t==null?this._getDomain():(this._autoDomainAutomatically=!1,this._setDomain(t),this)},e.prototype._getDomain=function(){throw new Error("Subclasses should override _getDomain")},e.prototype._setDomain=function(t){this._domainModificationInProgress||(this._domainModificationInProgress=!0,this._backingScaleDomain(t),this._dispatchUpdate(),this._domainModificationInProgress=!1)},e.prototype._backingScaleDomain=function(t){throw new Error("Subclasses should override _backingDomain")},e.prototype.range=function(t){return t==null?this._getRange():(this._setRange(t),this)},e.prototype._getRange=function(){throw new Error("Subclasses should override _getRange")},e.prototype._setRange=function(t){throw new Error("Subclasses should override _setRange")},e.prototype.addIncludedValuesProvider=function(t){return this._includedValuesProviders.add(t),this.autoDomainIfAutomaticMode(),this},e.prototype.removeIncludedValuesProvider=function(t){return this._includedValuesProviders.delete(t),this.autoDomainIfAutomaticMode(),this},e.prototype.updateId=function(){return this._updateId},e}();Jit.Scale=Xze});var eot=H(tot=>{"use strict";Object.defineProperty(tot,"__esModule",{value:!0});var $ze=(de(),Ut(pe)),BF=(Er(),Ut(Mr)),Kze=e4(),r$t=Fe(),Zze=kv(),Qit=[0,1],Jze=function(e){$ze.__extends(t,e);function t(){var r=e.call(this)||this;r._range=[0,1],r._d3Scale=BF.scaleBand(),r._d3Scale.range(Qit),r._d3TransformationScale=BF.scaleLinear(),r._d3TransformationScale.domain(Qit);var n=.3;return r._innerPadding=t._convertToPlottableInnerPadding(n),r._outerPadding=t._convertToPlottableOuterPadding(.5,n),r}return t.prototype.cloneWithoutProviders=function(){var r=new t().domain(this.domain()).range(this.range()).innerPadding(this.innerPadding()).outerPadding(this.outerPadding());return r._d3TransformationScale.domain(this._d3TransformationScale.domain()),r},t.prototype.extentOfValues=function(r){return r$t.Array.uniq(r)},t.prototype._getExtent=function(){return r$t.Array.uniq(this._getAllIncludedValues())},t.prototype.domain=function(r){return e.prototype.domain.call(this,r)},t.prototype.invertRange=function(r){var n=this;r===void 0&&(r=this.range());var i=this._d3Scale.bandwidth(),o=this.invertedTransformation(r[0]),a=this.invertedTransformation(r[1]),s=this._d3Scale.domain(),l=s.map(function(h){return n._d3Scale(h)+i/2}),c=BF.bisect(l,o),u=BF.bisect(l,a);return s.slice(c,u)},t.prototype.range=function(r){return e.prototype.range.call(this,r)},t._convertToPlottableInnerPadding=function(r){return 1/(1-r)-1},t._convertToPlottableOuterPadding=function(r,n){return r/(1-n)},t.prototype._setBands=function(){var r=1-1/(1+this.innerPadding()),n=this.outerPadding()/(1+this.innerPadding());this._d3Scale.paddingInner(r),this._d3Scale.paddingOuter(n)},t.prototype.rangeBand=function(){return this._rescaleBand(this._d3Scale.bandwidth())},t.prototype.stepWidth=function(){return this._rescaleBand(this._d3Scale.bandwidth()*(1+this.innerPadding()))},t.prototype.ticks=function(){return this.domain()},t.prototype.innerPadding=function(r){return r==null?this._innerPadding:(this._innerPadding=r,this.range(this.range()),this._dispatchUpdate(),this)},t.prototype.outerPadding=function(r){return r==null?this._outerPadding:(this._outerPadding=r,this.range(this.range()),this._dispatchUpdate(),this)},t.prototype.scale=function(r){var n=this._d3Scale(r)+this._d3Scale.bandwidth()/2;return this._d3TransformationScale(n)},t.prototype.zoom=function(r,n){var i=this,o=function(a){return i._d3TransformationScale.invert(Kze.zoomOut(a,r,n))};this._d3TransformationScale.domain(this._d3TransformationScale.range().map(o)),this._dispatchUpdate()},t.prototype.pan=function(r){var n=this,i=function(o){return n._d3TransformationScale.invert(o+r)};this._d3TransformationScale.domain(this._d3TransformationScale.range().map(i)),this._dispatchUpdate()},t.prototype.scaleTransformation=function(r){return this._d3TransformationScale(r)},t.prototype.invertedTransformation=function(r){return this._d3TransformationScale.invert(r)},t.prototype.getTransformationExtent=function(){return Qit},t.prototype.getTransformationDomain=function(){return this._d3TransformationScale.domain()},t.prototype.setTransformationDomain=function(r){this._d3TransformationScale.domain(r),this._dispatchUpdate()},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this._setBands(),this)},t.prototype._getRange=function(){return this._range},t.prototype._setRange=function(r){this._range=r,this._d3TransformationScale.range(r),this._setBands()},t.prototype._rescaleBand=function(r){return Math.abs(this._d3TransformationScale(r)-this._d3TransformationScale(0))},t}(Zze.Scale);tot.Category=Jze});var n$t=H(rot=>{"use strict";Object.defineProperty(rot,"__esModule",{value:!0});var Qze=(de(),Ut(pe)),Df=(Er(),Ut(Mr)),SS=Fe(),tFe=kv(),eFe=function(){function e(){this.count=0,this.tracker={}}return e.prototype.getIndex=function(t){if(this.tracker[t]!=null)return this.tracker[t];var r=this.count;return this.tracker[t]=r,this.count+=1,r},e.prototype.clear=function(){this.count=0,this.tracker={}},e}(),rFe=function(e){Qze.__extends(t,e);function t(r){var n=e.call(this)||this;n._rangeLength=1,n._tracker=new eFe;var i;switch(r){case null:case void 0:t._plottableColorCache==null&&(t._plottableColorCache=t._getPlottableColors()),i=Df.scaleOrdinal().range(t._plottableColorCache);break;case"Category10":case"category10":case"10":i=Df.scaleOrdinal(Df.schemeCategory10);break;case"Category20":case"category20":case"20":i=Df.scaleOrdinal(Df.schemeCategory20);break;case"Category20b":case"category20b":case"20b":i=Df.scaleOrdinal(Df.schemeCategory20b);break;case"Category20c":case"category20c":case"20c":i=Df.scaleOrdinal(Df.schemeCategory20c);break;default:throw new Error("Unsupported ColorScale type")}return n._d3Scale=i,n._rangeLength=n._d3Scale.range().length,n}return t.prototype.extentOfValues=function(r){return SS.Array.uniq(r)},t.prototype._getExtent=function(){return SS.Array.uniq(this._getAllIncludedValues())},t.invalidateColorCache=function(){t._plottableColorCache=null},t._getPlottableColors=function(){for(var r=[],n=Df.select("body").append("plottable-color-tester"),i=SS.Color.colorTest(n,""),o=0,a=SS.Color.colorTest(n,"plottable-colors-0");a!=null&&o<this._MAXIMUM_COLORS_FROM_CSS&&!(a===i&&a===r[r.length-1]);)r.push(a),o++,a=SS.Color.colorTest(n,"plottable-colors-"+o);return n.remove(),r},t.prototype.scale=function(r){var n=this._d3Scale(r),i=this._tracker.getIndex(r),o=Math.floor(i/this._rangeLength);if(o===0)return n;var a=Math.log(o*t._LOOP_LIGHTEN_FACTOR+1);return SS.Color.lightenColor(n,a)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this._tracker.clear(),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r),this._rangeLength=r.length},t._LOOP_LIGHTEN_FACTOR=1.6,t._MAXIMUM_COLORS_FROM_CSS=256,t}(tFe.Scale);rot.Color=rFe});var o$t=H(not=>{"use strict";Object.defineProperty(not,"__esModule",{value:!0});var nFe=(de(),Ut(pe)),MS=(Er(),Ut(Mr)),i$t=Fe(),iFe=kv(),oFe=function(e){nFe.__extends(t,e);function t(r){r===void 0&&(r="linear");var n=e.call(this)||this;switch(r){case"linear":n._colorScale=MS.scaleLinear();break;case"log":n._colorScale=MS.scaleLog();break;case"sqrt":n._colorScale=MS.scaleSqrt();break;case"pow":n._colorScale=MS.scalePow();break}if(n._colorScale==null)throw new Error("unknown QuantitativeScale scale type "+r);return n.range(t.REDS),n}return t.prototype.extentOfValues=function(r){var n=MS.extent(r);return n[0]==null||n[1]==null?[]:n},t.prototype._d3InterpolatedScale=function(){return this._colorScale.range([0,1]).interpolate(this._interpolateColors())},t.prototype._interpolateColors=function(){var r=this._colorRange;if(r.length<2)throw new Error("Color scale arrays must have at least two elements.");return function(n,i){return function(o){o=Math.max(0,Math.min(1,o));var a=o*(r.length-1),s=Math.floor(a),l=Math.ceil(a),c=a-s;return MS.interpolateLab(r[s],r[l])(c)}}},t.prototype._resetScale=function(){this._d3Scale=this._d3InterpolatedScale(),this.autoDomainIfAutomaticMode(),this._dispatchUpdate()},t.prototype.autoDomain=function(){var r=this._getAllIncludedValues();return r.length>0&&this._setDomain([i$t.Math.min(r,0),i$t.Math.max(r,0)]),this},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._colorRange},t.prototype._setRange=function(r){this._colorRange=r,this._resetScale()},t.REDS=["#FFFFFF","#FFF6E1","#FEF4C0","#FED976","#FEB24C","#FD8D3C","#FC4E2A","#E31A1C","#B10026"],t.BLUES=["#FFFFFF","#CCFFFF","#A5FFFD","#85F7FB","#6ED3EF","#55A7E0","#417FD0","#2545D3","#0B02E1"],t.POSNEG=["#0B02E1","#2545D3","#417FD0","#55A7E0","#6ED3EF","#85F7FB","#A5FFFD","#CCFFFF","#FFFFFF","#FFF6E1","#FEF4C0","#FED976","#FEB24C","#FD8D3C","#FC4E2A","#E31A1C","#B10026"],t}(iFe.Scale);not.InterpolatedColor=oFe});var xd=H(iot=>{"use strict";Object.defineProperty(iot,"__esModule",{value:!0});var aFe=(de(),Ut(pe)),sFe=(Er(),Ut(Mr)),lFe=e4(),ES=Fe(),cFe=kv(),uFe=function(e){aFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._tickGenerator=function(n){return n.defaultTicks()},r._padProportion=.05,r._snappingDomainEnabled=!0,r._paddingExceptionsProviders=new ES.Set,r}return t.prototype.autoDomain=function(){return this._domainMin=null,this._domainMax=null,e.prototype.autoDomain.call(this),this},t.prototype.autoDomainIfAutomaticMode=function(){if(this._domainMin!=null&&this._domainMax!=null){this._setDomain([this._domainMin,this._domainMax]);return}var r=this._getExtent();if(this._domainMin!=null){var n=r[1];this._domainMin>=n&&(n=this._expandSingleValueDomain([this._domainMin,this._domainMin])[1]),this._setDomain([this._domainMin,n]);return}if(this._domainMax!=null){var i=r[0];this._domainMax<=i&&(i=this._expandSingleValueDomain([this._domainMax,this._domainMax])[0]),this._setDomain([i,this._domainMax]);return}e.prototype.autoDomainIfAutomaticMode.call(this)},t.prototype._getUnboundedExtent=function(r){r===void 0&&(r=!1);var n=this._getAllIncludedValues(r),i=this._defaultExtent();if(n.length!==0){var o=[ES.Math.min(n,i[0]),ES.Math.max(n,i[1])];i=this._padDomain(o)}return i},t.prototype._getExtent=function(){var r=this._getUnboundedExtent();return this._domainMin!=null&&(r[0]=this._domainMin),this._domainMax!=null&&(r[1]=this._domainMax),r},t.prototype.addPaddingExceptionsProvider=function(r){return this._paddingExceptionsProviders.add(r),this.autoDomainIfAutomaticMode(),this},t.prototype.removePaddingExceptionsProvider=function(r){return this._paddingExceptionsProviders.delete(r),this.autoDomainIfAutomaticMode(),this},t.prototype.padProportion=function(r){if(r==null)return this._padProportion;if(r<0)throw new Error("padProportion must be non-negative");return this._padProportion=r,this.autoDomainIfAutomaticMode(),this},t.prototype._padDomain=function(r){var n=this;if(r[0].valueOf()===r[1].valueOf())return this._expandSingleValueDomain(r);if(this._padProportion===0)return r;var i=this._padProportion/2,o=r[0],a=r[1],s=!1,l=!1;this._paddingExceptionsProviders.forEach(function(f){var p=f(n);p.forEach(function(d){d.valueOf()===o.valueOf()&&(s=!0),d.valueOf()===a.valueOf()&&(l=!0)})});var c=this._backingScaleDomain();this._backingScaleDomain(r);var u=s?o:this.invert(this.scale(o)-(this.scale(a)-this.scale(o))*i),h=l?a:this.invert(this.scale(a)+(this.scale(a)-this.scale(o))*i);return this._backingScaleDomain(c),this._snappingDomainEnabled?this._niceDomain([u,h]):[u,h]},t.prototype.snappingDomainEnabled=function(r){return r==null?this._snappingDomainEnabled:(this._snappingDomainEnabled=r,this.autoDomainIfAutomaticMode(),this)},t.prototype._expandSingleValueDomain=function(r){return r},t.prototype.invert=function(r){throw new Error("Subclasses should override invert")},t.prototype.domain=function(r){return r!=null&&(this._domainMin=r[0],this._domainMax=r[1]),e.prototype.domain.call(this,r)},t.prototype.domainMin=function(r){return r==null?this.domain()[0]:(this._domainMin=r,this.autoDomainIfAutomaticMode(),this)},t.prototype.domainMax=function(r){return r==null?this.domain()[1]:(this._domainMax=r,this.autoDomainIfAutomaticMode(),this)},t.prototype.extentOfValues=function(r){var n=sFe.extent(r.filter(function(i){return ES.Math.isValidNumber(+i)}));return n[0]==null||n[1]==null?[]:n},t.prototype.zoom=function(r,n){var i=this,o=function(a){return i.invert(lFe.zoomOut(a,r,n))};this.domain(this.range().map(o))},t.prototype.pan=function(r){var n=this,i=function(o){return n.invert(o+r)};this.domain(this.range().map(i))},t.prototype.scaleTransformation=function(r){throw new Error("Subclasses should override scaleTransformation")},t.prototype.invertedTransformation=function(r){throw new Error("Subclasses should override invertedTransformation")},t.prototype.getTransformationExtent=function(){throw new Error("Subclasses should override getTransformationExtent")},t.prototype.getTransformationDomain=function(){throw new Error("Subclasses should override getTransformationDomain")},t.prototype.setTransformationDomain=function(r){throw new Error("Subclasses should override setTransformationDomain")},t.prototype._setDomain=function(r){var n=function(i){return ES.Math.isNaN(i)||i===1/0||i===-1/0};if(n(r[0])||n(r[1])){ES.Window.warn("Warning: QuantitativeScales cannot take NaN or Infinity as a domain value. Ignoring.");return}e.prototype._setDomain.call(this,r)},t.prototype.defaultTicks=function(){throw new Error("Subclasses should override _getDefaultTicks")},t.prototype.ticks=function(){return this._tickGenerator(this)},t.prototype._niceDomain=function(r,n){throw new Error("Subclasses should override _niceDomain")},t.prototype._defaultExtent=function(){throw new Error("Subclasses should override _defaultExtent")},t.prototype.tickGenerator=function(r){return r==null?this._tickGenerator:(this._tickGenerator=r,this)},t._DEFAULT_NUM_TICKS=10,t}(cFe.Scale);iot.QuantitativeScale=uFe});var a$t=H(oot=>{"use strict";Object.defineProperty(oot,"__esModule",{value:!0});var hFe=(de(),Ut(pe)),fFe=(Er(),Ut(Mr)),pFe=xd(),dFe=function(e){hFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=fFe.scaleLinear(),r}return t.prototype._defaultExtent=function(){return[0,1]},t.prototype._expandSingleValueDomain=function(r){return r[0]===r[1]?[r[0]-1,r[1]+1]:r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r,n){return this._d3Scale.copy().domain(r).nice(n).domain()},t}(pFe.QuantitativeScale);oot.Linear=dFe});var s$t=H(aot=>{"use strict";Object.defineProperty(aot,"__esModule",{value:!0});var mFe=(de(),Ut(pe)),gFe=(Er(),Ut(Mr)),_Fe=xd(),yFe=function(e){mFe.__extends(t,e);function t(r){r===void 0&&(r=10);var n=e.call(this)||this;return n._d3Scale=gFe.scaleLog().base(r),n._setDomain(n._defaultExtent()),n}return t.prototype._defaultExtent=function(){return[1,this._d3Scale.base()]},t.prototype._expandSingleValueDomain=function(r){return r[0]===r[1]?[r[0]/this._d3Scale.base(),r[1]*this._d3Scale.base()]:r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r,n){return this._d3Scale.copy().domain(r).nice().domain()},t}(_Fe.QuantitativeScale);aot.Log=yFe});var l$t=H(lot=>{"use strict";Object.defineProperty(lot,"__esModule",{value:!0});var vFe=(de(),Ut(pe)),r4=(Er(),Ut(Mr)),TS=Fe(),sot=Rs(),xFe=xd(),bFe=function(e){vFe.__extends(t,e);function t(r){r===void 0&&(r=10);var n=e.call(this)||this;if(n._logTickGenerator=function(i){var o=function(x,b,S){return[x,b,S].sort(function(C,P){return C-P})[1]},a=TS.Math.min(n._untransformedDomain,0),s=TS.Math.max(n._untransformedDomain,0),l=a,c=o(a,s,-n._pivot),u=o(a,s,n._pivot),h=s,f=n._logTicks(-c,-l).map(function(x){return-x}).reverse(),p=n._logTicks(u,h),d=Math.max(a,-n._pivot),g=Math.min(s,n._pivot),_=r4.scaleLinear().domain([d,g]).ticks(n._howManyTicks(d,g)),y=f.concat(_).concat(p);return y.length<=1&&(y=r4.scaleLinear().domain([a,s]).ticks(sot.ModifiedLog._DEFAULT_NUM_TICKS)),y},n._d3Scale=r4.scaleLinear(),n._base=r,n._pivot=n._base,n._setDomain(n._defaultExtent()),n.tickGenerator(n._logTickGenerator),r<=1)throw new Error("ModifiedLogScale: The base must be > 1");return n}return t.prototype._adjustedLog=function(r){var n=r<0?-1:1;return r*=n,r<this._pivot&&(r+=(this._pivot-r)/this._pivot),r=Math.log(r)/Math.log(this._base),r*=n,r},t.prototype._invertedAdjustedLog=function(r){var n=r<0?-1:1;return r*=n,r=Math.pow(this._base,r),r<this._pivot&&(r=this._pivot*(r-1)/(this._pivot-1)),r*=n,r},t.prototype.scale=function(r){return this._d3Scale(this._adjustedLog(r))},t.prototype.invert=function(r){return this._invertedAdjustedLog(this._d3Scale.invert(r))},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._untransformedDomain},t.prototype._setDomain=function(r){this._untransformedDomain=r;var n=[this._adjustedLog(r[0]),this._adjustedLog(r[1])];e.prototype._setDomain.call(this,n)},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._logTicks=function(r,n){var i=this,o=this._howManyTicks(r,n);if(o===0)return[];var a=Math.floor(Math.log(r)/Math.log(this._base)),s=Math.ceil(Math.log(n)/Math.log(this._base)),l=r4.range(s,a,-Math.ceil((s-a)/o)),c=r4.range(this._base,1,-(this._base-1)).map(Math.floor),u=TS.Array.uniq(c),h=l.map(function(g){return u.map(function(_){return Math.pow(i._base,g-1)*_})}),f=TS.Array.flatten(h),p=f.filter(function(g){return r<=g&&g<=n}),d=p.sort(function(g,_){return g-_});return d},t.prototype._howManyTicks=function(r,n){var i=this._adjustedLog(TS.Math.min(this._untransformedDomain,0)),o=this._adjustedLog(TS.Math.max(this._untransformedDomain,0)),a=this._adjustedLog(r),s=this._adjustedLog(n),l=(s-a)/(o-i),c=Math.ceil(l*sot.ModifiedLog._DEFAULT_NUM_TICKS);return c},t.prototype._niceDomain=function(r,n){return r},t.prototype._defaultExtent=function(){return[0,this._base]},t.prototype._expandSingleValueDomain=function(r){if(r[0]===r[1]){var n=r[0];return n>0?[n/this._base,n*this._base]:n===0?[-this._base,this._base]:[n*this._base,n/this._base]}return r},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(sot.ModifiedLog._DEFAULT_NUM_TICKS)},t}(xFe.QuantitativeScale);lot.ModifiedLog=bFe});var c$t=H(cot=>{"use strict";Object.defineProperty(cot,"__esModule",{value:!0});var wFe=(de(),Ut(pe)),_a=(Er(),Ut(Mr)),Rv=HF(),SFe=xd(),MFe=function(e){wFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=_a.scaleTime(),r.autoDomain(),r}return t.prototype.tickInterval=function(r,n,i){n===void 0&&(n=1),i===void 0&&(i=!1);var o=_a.scaleTime(),a=t.timeIntervalToD3Time(r,i).every(n);return o.domain(this.domain()),o.range(this.range()),o.ticks(a)},t.prototype._setDomain=function(r){if(r[1]<r[0])throw new Error("Scale.Time domain values must be in chronological order");return e.prototype._setDomain.call(this,r)},t.prototype._defaultExtent=function(){return[new Date("1970-01-01"),new Date("1970-01-02")]},t.prototype._expandSingleValueDomain=function(r){var n=r[0].getTime(),i=r[1].getTime();if(n===i){var o=new Date(n);o.setDate(o.getDate()-1);var a=new Date(i);return a.setDate(a.getDate()+1),[o,a]}return r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(new Date(r))},t.prototype.invertedTransformation=function(r){return this.invert(r).getTime()},t.prototype.getTransformationExtent=function(){var r=this._getUnboundedExtent(!0);return[r[0].valueOf(),r[1].valueOf()]},t.prototype.getTransformationDomain=function(){var r=this.domain();return[r[0].valueOf(),r[1].valueOf()]},t.prototype.setTransformationDomain=function(r){var n=r[0],i=r[1];this.domain([new Date(n),new Date(i)])},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r){return this._d3Scale.copy().domain(r).nice().domain()},t.timeIntervalToD3Time=function(r,n){switch(r){case Rv.TimeInterval.second:return n?_a.utcSecond:_a.timeSecond;case Rv.TimeInterval.minute:return n?_a.utcMinute:_a.timeMinute;case Rv.TimeInterval.hour:return n?_a.utcHour:_a.timeHour;case Rv.TimeInterval.day:return n?_a.utcDay:_a.timeDay;case Rv.TimeInterval.week:return n?_a.utcWeek:_a.timeWeek;case Rv.TimeInterval.month:return n?_a.utcMonth:_a.timeMonth;case Rv.TimeInterval.year:return n?_a.utcYear:_a.timeYear;default:throw Error("TimeInterval specified does not exist: "+r)}},t}(SFe.QuantitativeScale);cot.Time=MFe});var Rs=H(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var Nv=(de(),Ut(pe)),EFe=ZXt();Hu.TickGenerators=EFe;Nv.__exportStar(eot(),Hu);Nv.__exportStar(n$t(),Hu);Nv.__exportStar(o$t(),Hu);Nv.__exportStar(a$t(),Hu);Nv.__exportStar(s$t(),Hu);Nv.__exportStar(l$t(),Hu);Nv.__exportStar(c$t(),Hu);var TFe=eot(),CFe=xd();function AFe(e){return e instanceof CFe.QuantitativeScale||e instanceof TFe.Category}Hu.isTransformable=AFe});var HF=H(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var PFe=(de(),Ut(pe)),Vu=(Er(),Ut(Mr)),u$t=yl(),h$t=Bu(),IFe=Rs(),n4=Fe(),uot=Lf(),es=t4();Se.TimeInterval=uot.makeEnum(["second","minute","hour","day","week","month","year"]);Se.TimeAxisOrientation=uot.makeEnum(["top","bottom"]);Se.TierLabelPosition=uot.makeEnum(["between","center"]);var LFe=function(e){PFe.__extends(t,e);function t(r,n,i){var o=e.call(this,r,n)||this;return o._maxTimeIntervalPrecision=null,o._tierLabelPositions=[],o._useUTC=i,o.addClass("time-axis"),o.tickLabelPadding(5),o.axisConfigurations(t._DEFAULT_TIME_AXIS_CONFIGURATIONS(o._useUTC)),o.annotationFormatter(h$t.time("%a %b %d, %Y",o._useUTC)),o}return t.prototype.tierLabelPositions=function(r){if(r==null)return this._tierLabelPositions;if(!r.every(function(n){return n.toLowerCase()==="between"||n.toLowerCase()==="center"}))throw new Error("Unsupported position for tier labels");return this._tierLabelPositions=r,this.redraw(),this},t.prototype.maxTimeIntervalPrecision=function(r){return r==null?this._maxTimeIntervalPrecision:(this._maxTimeIntervalPrecision=r,this.redraw(),this)},t.prototype.currentAxisConfiguration=function(){return this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex]},t.prototype.axisConfigurations=function(r){if(r==null)return this._possibleTimeAxisConfigurations;this._possibleTimeAxisConfigurations=r,this._numTiers=n4.Math.max(this._possibleTimeAxisConfigurations.map(function(a){return a.length}),0),this._isAnchored&&this._setupDomElements();for(var n=this.tierLabelPositions(),i=[],o=0;o<this._numTiers;o++)i.push(n[o]||"between");return this.tierLabelPositions(i),this.redraw(),this},t.prototype._getMostPreciseConfigurationIndex=function(){var r=this,n=this._possibleTimeAxisConfigurations.length;return this._possibleTimeAxisConfigurations.forEach(function(i,o){o<n&&i.every(function(a){return r._checkTimeAxisTierConfiguration(a)})&&(n=o)}),n===this._possibleTimeAxisConfigurations.length&&(n4.Window.warn("zoomed out too far: could not find suitable interval to display labels"),--n),n},t.prototype.orientation=function(r){if(r&&(r.toLowerCase()==="right"||r.toLowerCase()==="left"))throw new Error(r+" is not a supported orientation for TimeAxis - only horizontal orientations are supported");return e.prototype.orientation.call(this,r)},t.prototype._computeHeight=function(){var r=this._measurer.measure().height;this._tierHeights=[];for(var n=0;n<this._numTiers;n++)this._tierHeights.push(r+this.tickLabelPadding()+(this._tierLabelPositions[n]==="between"?0:this._maxLabelTickLength()));return Vu.sum(this._tierHeights)},t.prototype._getIntervalLength=function(r){var n=this._scale.domain()[0],i=IFe.Time.timeIntervalToD3Time(r.interval,this._useUTC),o=i.offset(n,r.step);if(o>this._scale.domain()[1])return this.width();var a=Math.abs(this._scale.scale(o)-this._scale.scale(n));return a},t.prototype._maxWidthForInterval=function(r){return this._measurer.measure(r.formatter(t._LONG_DATE)).width},t.prototype._checkTimeAxisTierConfiguration=function(r){if(this._maxTimeIntervalPrecision!=null){var n=t._SORTED_TIME_INTERVAL_INDEX[this._maxTimeIntervalPrecision],i=t._SORTED_TIME_INTERVAL_INDEX[r.interval];if(n!=null&&i!=null&&i<n)return!1}var o=this._maxWidthForInterval(r)+2*this.tickLabelPadding();return Math.min(this._getIntervalLength(r),this.width())>=o},t.prototype._sizeFromOffer=function(r,n){var i=e.prototype._sizeFromOffer.call(this,r,n),o=this._tierHeights.reduce(function(s,l,c,u){return s+l>i.height?s:s+l}),a=this.margin()+(this.annotationsEnabled()?this.annotationTierCount()*this._annotationTierHeight():0);return i.height=Math.min(i.height,o+a),i},t.prototype._setup=function(){e.prototype._setup.call(this),this._setupDomElements()},t.prototype._setupDomElements=function(){this.content().selectAll("."+t.TIME_AXIS_TIER_CLASS).remove(),this._tierLabelContainers=[],this._tierMarkContainers=[],this._tierBaselines=[],this._tickLabelContainer.remove(),this._baseline.remove();for(var r=0;r<this._numTiers;++r){var n=this.content().append("g").classed(t.TIME_AXIS_TIER_CLASS,!0);this._tierLabelContainers.push(n.append("g").classed(es.Axis.TICK_LABEL_CLASS+"-container",!0)),this._tierMarkContainers.push(n.append("g").classed(es.Axis.TICK_MARK_CLASS+"-container",!0)),this._tierBaselines.push(n.append("line").classed("baseline",!0))}var i=new u$t.SvgContext(this._tierLabelContainers[0].node());this._measurer=new u$t.CacheMeasurer(i)},t.prototype._getTickIntervalValues=function(r){return this._scale.tickInterval(r.interval,r.step,this._useUTC)},t.prototype._getTickValues=function(){var r=this;return this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex].reduce(function(n,i){return n.concat(r._getTickIntervalValues(i))},[])},t.prototype._cleanTiers=function(){for(var r=0;r<this._tierLabelContainers.length;r++)this._tierLabelContainers[r].selectAll("."+es.Axis.TICK_LABEL_CLASS).remove(),this._tierMarkContainers[r].selectAll("."+es.Axis.TICK_MARK_CLASS).remove(),this._tierBaselines[r].style("visibility","hidden")},t.prototype._getTickValuesForConfiguration=function(r){var n=this._scale.tickInterval(r.interval,r.step,this._useUTC),i=this._scale.domain(),o=n.map(function(a){return a.valueOf()});return o.indexOf(i[0].valueOf())===-1&&n.unshift(i[0]),o.indexOf(i[1].valueOf())===-1&&n.push(i[1]),n},t.prototype._renderTierLabels=function(r,n,i){var o=this,a=this._getTickValuesForConfiguration(n),s=[];this._tierLabelPositions[i]==="between"&&n.step===1?a.map(function(g,_){_+1>=a.length||s.push(new Date((a[_+1].valueOf()-a[_].valueOf())/2+a[_].valueOf()))}):s=a;var l=r.selectAll("."+es.Axis.TICK_LABEL_CLASS).data(s,function(g){return String(g.valueOf())}),c=l.enter().append("g").classed(es.Axis.TICK_LABEL_CLASS,!0);c.append("text");var u=this._tierLabelPositions[i]==="center"||n.step===1?0:this.tickLabelPadding(),h;this.orientation()==="bottom"?h=Vu.sum(this._tierHeights.slice(0,i+1))-this.tickLabelPadding():this._tierLabelPositions[i]==="center"?h=this.height()-Vu.sum(this._tierHeights.slice(0,i))-this.tickLabelPadding()-this._maxLabelTickLength():h=this.height()-Vu.sum(this._tierHeights.slice(0,i))-this.tickLabelPadding();var f=l.merge(c),p=f.selectAll("text");p.size()>0&&p.attr("transform","translate("+u+","+h+")"),l.exit().remove(),f.attr("transform",function(g){return"translate("+o._scale.scale(g)+",0)"});var d=this._tierLabelPositions[i]==="center"||n.step===1?"middle":"start";f.selectAll("text").text(n.formatter).style("text-anchor",d)},t.prototype._renderTickMarks=function(r,n){var i=this._tierMarkContainers[n].selectAll("."+es.Axis.TICK_MARK_CLASS).data(r),o=i.enter().append("line").classed(es.Axis.TICK_MARK_CLASS,!0).merge(i),a=this._generateTickMarkAttrHash(),s=this._tierHeights.slice(0,n).reduce(function(l,c){return l+c},0);this.orientation()==="bottom"?(a.y1=s,a.y2=s+(this._tierLabelPositions[n]==="center"?this.innerTickLength():this._tierHeights[n])):(a.y1=this.height()-s,a.y2=this.height()-(s+(this._tierLabelPositions[n]==="center"?this.innerTickLength():this._tierHeights[n]))),o.attrs(a),this.orientation()==="bottom"?(a.y1=s,a.y2=s+(this._tierLabelPositions[n]==="center"?this.endTickLength():this._tierHeights[n])):(a.y1=this.height()-s,a.y2=this.height()-(s+(this._tierLabelPositions[n]==="center"?this.endTickLength():this._tierHeights[n]))),Vu.select(o.nodes()[0]).attrs(a),Vu.select(o.nodes()[o.size()-1]).attrs(a),Vu.select(o.nodes()[0]).classed(es.Axis.END_TICK_MARK_CLASS,!0),Vu.select(o.nodes()[o.size()-1]).classed(es.Axis.END_TICK_MARK_CLASS,!0),i.exit().remove()},t.prototype._renderLabellessTickMarks=function(r){var n=this._tickMarkContainer.selectAll("."+es.Axis.TICK_MARK_CLASS).data(r),i=n.enter().append("line").classed(es.Axis.TICK_MARK_CLASS,!0).merge(n),o=this._generateTickMarkAttrHash();o.y2=this.orientation()==="bottom"?this.tickLabelPadding():this.height()-this.tickLabelPadding(),i.attrs(o),n.exit().remove()},t.prototype._generateLabellessTicks=function(){return this._mostPreciseConfigIndex<1?[]:this._getTickIntervalValues(this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex-1][0])},t.prototype.renderImmediately=function(){var r=this;this._mostPreciseConfigIndex=this._getMostPreciseConfigurationIndex();var n=this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex];this._cleanTiers(),n.forEach(function(h,f){return r._renderTierLabels(r._tierLabelContainers[f],h,f)});for(var i=n.map(function(h,f){return r._getTickValuesForConfiguration(h)}),o=0,a=0;a<Math.max(n.length,1);++a){var s=this._generateBaselineAttrHash();s.y1+=this.orientation()==="bottom"?o:-o,s.y2=s.y1,this._tierBaselines[a].attrs(s).style("visibility","inherit"),o+=this._tierHeights[a]}var l=[],c=this._scale.domain(),u=this._scale.scale(c[1])-this._scale.scale(c[0]);this._getIntervalLength(n[0])*1.5>=u&&(l=this._generateLabellessTicks()),this._renderLabellessTickMarks(l),this._hideOverflowingTiers();for(var a=0;a<n.length;++a)this._renderTickMarks(i[a],a),this._hideOverlappingAndCutOffLabels(a);return this.annotationsEnabled()?this._drawAnnotations():this._removeAnnotations(),this},t.prototype._hideOverflowingTiers=function(){var r=this,n=this.height(),i=0;this.content().selectAll("."+t.TIME_AXIS_TIER_CLASS).attr("visibility",function(o,a){return i+=r._tierHeights[a],i<=n?"inherit":"hidden"})},t.prototype._hideOverlappingAndCutOffLabels=function(r){var n=this,i=this.element().node().getBoundingClientRect(),o=function(u){return Math.floor(i.left)<=Math.ceil(u.left)&&Math.floor(i.top)<=Math.ceil(u.top)&&Math.floor(u.right)<=Math.ceil(i.left+n.width())&&Math.floor(u.bottom)<=Math.ceil(i.top+n.height())},a=this._tierMarkContainers[r].selectAll("."+es.Axis.TICK_MARK_CLASS).filter(function(u,h){var f=Vu.select(this).style("visibility");return f==="visible"||f==="inherit"}),s=a.nodes().map(function(u){return u.getBoundingClientRect()}),l=this._tierLabelContainers[r].selectAll("."+es.Axis.TICK_LABEL_CLASS).filter(function(u,h){var f=Vu.select(this).style("visibility");return f==="visible"||f==="inherit"}),c;l.each(function(u,h){var f=this.getBoundingClientRect(),p=Vu.select(this),d=s[h],g=s[h+1],_=c!=null&&n4.DOM.clientRectsOverlap(f,c),y=d!=null&&n4.DOM.clientRectsOverlap(f,d),x=g!=null&&n4.DOM.clientRectsOverlap(f,g);!o(f)||_||y||x?p.style("visibility","hidden"):(c=f,p.style("visibility","inherit"))})},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t.TIME_AXIS_TIER_CLASS="time-axis-tier",t._SORTED_TIME_INTERVAL_INDEX=(bd={},bd[Se.TimeInterval.second]=0,bd[Se.TimeInterval.minute]=1,bd[Se.TimeInterval.hour]=2,bd[Se.TimeInterval.day]=3,bd[Se.TimeInterval.week]=4,bd[Se.TimeInterval.month]=5,bd[Se.TimeInterval.year]=6,bd),t._DEFAULT_TIME_AXIS_CONFIGURATIONS=function(r){var n=function(i){return h$t.time(i,r)};return[[{interval:Se.TimeInterval.second,step:1,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:5,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:10,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:15,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:30,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:1,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:5,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:10,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:15,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:30,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:1,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:3,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:6,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:12,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.day,step:1,formatter:n("%a %e")},{interval:Se.TimeInterval.month,step:1,formatter:n("%B %Y")}],[{interval:Se.TimeInterval.day,step:1,formatter:n("%e")},{interval:Se.TimeInterval.month,step:1,formatter:n("%B %Y")}],[{interval:Se.TimeInterval.month,step:1,formatter:n("%B")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:1,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:3,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:6,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1,formatter:n("%y")}],[{interval:Se.TimeInterval.year,step:5,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:25,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:50,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:100,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:200,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:500,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1e3,formatter:n("%Y")}]]},t._LONG_DATE=new Date(9999,8,29,12,59,9999),t}(es.Axis);Se.Time=LFe;var bd});var f$t=H(i4=>{"use strict";Object.defineProperty(i4,"__esModule",{value:!0});var hot=(de(),Ut(pe));hot.__exportStar($Xt(),i4);hot.__exportStar(KXt(),i4);hot.__exportStar(HF(),i4)});var o4=H(fot=>{"use strict";Object.defineProperty(fot,"__esModule",{value:!0});var kFe=Fe(),RFe=function(){function e(){this._eventToProcessingFunction={},this._eventTarget=document,this._eventNameToCallbackSet={},this._connected=!1}return e.prototype._hasNoCallbacks=function(){for(var t=Object.keys(this._eventNameToCallbackSet),r=0;r<t.length;r++)if(this._eventNameToCallbackSet[t[r]].size!==0)return!1;return!0},e.prototype._connect=function(){var t=this;this._connected||(Object.keys(this._eventToProcessingFunction).forEach(function(r){var n=t._eventToProcessingFunction[r],i=r==="wheel"?{passive:!1}:void 0;t._eventTarget.addEventListener(r,n,i)}),this._connected=!0)},e.prototype._disconnect=function(){var t=this;this._connected&&this._hasNoCallbacks()&&(Object.keys(this._eventToProcessingFunction).forEach(function(r){var n=t._eventToProcessingFunction[r];t._eventTarget.removeEventListener(r,n)}),this._connected=!1)},e.prototype._addCallbackForEvent=function(t,r){this._eventNameToCallbackSet[t]==null&&(this._eventNameToCallbackSet[t]=new kFe.CallbackSet),this._eventNameToCallbackSet[t].add(r),this._connect()},e.prototype._removeCallbackForEvent=function(t,r){this._eventNameToCallbackSet[t]!=null&&this._eventNameToCallbackSet[t].delete(r),this._disconnect()},e.prototype._callCallbacksForEvent=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this._eventNameToCallbackSet[t];i!=null&&i.callCallbacks.apply(i,r)},e}();fot.Dispatcher=RFe});var p$t=H(pot=>{"use strict";Object.defineProperty(pot,"__esModule",{value:!0});var NFe=(de(),Ut(pe)),DFe=o4(),OFe=function(e){NFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._eventToProcessingFunction[t._KEYDOWN_EVENT_NAME]=function(n){return r._processKeydown(n)},r._eventToProcessingFunction[t._KEYUP_EVENT_NAME]=function(n){return r._processKeyup(n)},r}return t.getDispatcher=function(){var r=document[t._DISPATCHER_KEY];return r==null&&(r=new t,document[t._DISPATCHER_KEY]=r),r},t.prototype._processKeydown=function(r){this._callCallbacksForEvent(t._KEYDOWN_EVENT_NAME,r.keyCode,r)},t.prototype._processKeyup=function(r){this._callCallbacksForEvent(t._KEYUP_EVENT_NAME,r.keyCode,r)},t.prototype.onKeyDown=function(r){return this._addCallbackForEvent(t._KEYDOWN_EVENT_NAME,r),this},t.prototype.offKeyDown=function(r){return this._removeCallbackForEvent(t._KEYDOWN_EVENT_NAME,r),this},t.prototype.onKeyUp=function(r){return this._addCallbackForEvent(t._KEYUP_EVENT_NAME,r),this},t.prototype.offKeyUp=function(r){return this._removeCallbackForEvent(t._KEYUP_EVENT_NAME,r),this},t._DISPATCHER_KEY="__Plottable_Dispatcher_Key",t._KEYDOWN_EVENT_NAME="keydown",t._KEYUP_EVENT_NAME="keyup",t}(DFe.Dispatcher);pot.Key=OFe});var m$t=H(dot=>{"use strict";Object.defineProperty(dot,"__esModule",{value:!0});var zFe=(de(),Ut(pe)),d$t=Fe(),FFe=o4(),BFe=function(e){zFe.__extends(t,e);function t(r){var n=e.call(this)||this;n._lastMousePosition={x:-1,y:-1},n._translator=d$t.getTranslator(r);var i=function(o){return n._measureAndDispatch(r,o,t._MOUSEMOVE_EVENT_NAME,"page")};return n._eventToProcessingFunction[t._MOUSEOVER_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEMOVE_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEOUT_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEDOWN_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._MOUSEDOWN_EVENT_NAME)},n._eventToProcessingFunction[t._MOUSEUP_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._MOUSEUP_EVENT_NAME,"page")},n._eventToProcessingFunction[t._WHEEL_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._WHEEL_EVENT_NAME)},n._eventToProcessingFunction[t._DBLCLICK_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._DBLCLICK_EVENT_NAME)},n}return t.getDispatcher=function(r){var n=r.root().rootElement(),i=n[t._DISPATCHER_KEY];return i==null&&(i=new t(r),n[t._DISPATCHER_KEY]=i),i},t.prototype.onMouseMove=function(r){return this._addCallbackForEvent(t._MOUSEMOVE_EVENT_NAME,r),this},t.prototype.offMouseMove=function(r){return this._removeCallbackForEvent(t._MOUSEMOVE_EVENT_NAME,r),this},t.prototype.onMouseDown=function(r){return this._addCallbackForEvent(t._MOUSEDOWN_EVENT_NAME,r),this},t.prototype.offMouseDown=function(r){return this._removeCallbackForEvent(t._MOUSEDOWN_EVENT_NAME,r),this},t.prototype.onMouseUp=function(r){return this._addCallbackForEvent(t._MOUSEUP_EVENT_NAME,r),this},t.prototype.offMouseUp=function(r){return this._removeCallbackForEvent(t._MOUSEUP_EVENT_NAME,r),this},t.prototype.onWheel=function(r){return this._addCallbackForEvent(t._WHEEL_EVENT_NAME,r),this},t.prototype.offWheel=function(r){return this._removeCallbackForEvent(t._WHEEL_EVENT_NAME,r),this},t.prototype.onDblClick=function(r){return this._addCallbackForEvent(t._DBLCLICK_EVENT_NAME,r),this},t.prototype.offDblClick=function(r){return this._removeCallbackForEvent(t._DBLCLICK_EVENT_NAME,r),this},t.prototype._measureAndDispatch=function(r,n,i,o){if(o===void 0&&(o="element"),o!=="page"&&o!=="element")throw new Error("Invalid scope '"+o+"', must be 'element' or 'page'");if(o==="page"||this.eventInside(r,n)){var a=this._translator.computePosition(n.clientX,n.clientY);this._lastMousePosition=a,this._callCallbacksForEvent(i,this.lastMousePosition(),n)}},t.prototype.eventInside=function(r,n){return d$t.Translator.isEventInside(r,n)},t.prototype.lastMousePosition=function(){return this._lastMousePosition},t._DISPATCHER_KEY="__Plottable_Dispatcher_Mouse",t._MOUSEOVER_EVENT_NAME="mouseover",t._MOUSEMOVE_EVENT_NAME="mousemove",t._MOUSEOUT_EVENT_NAME="mouseout",t._MOUSEDOWN_EVENT_NAME="mousedown",t._MOUSEUP_EVENT_NAME="mouseup",t._WHEEL_EVENT_NAME="wheel",t._DBLCLICK_EVENT_NAME="dblclick",t}(FFe.Dispatcher);dot.Mouse=BFe});var _$t=H(mot=>{"use strict";Object.defineProperty(mot,"__esModule",{value:!0});var HFe=(de(),Ut(pe)),g$t=Fe(),VFe=o4(),UFe=function(e){HFe.__extends(t,e);function t(r){var n=e.call(this)||this;return n._translator=g$t.getTranslator(r),n._eventToProcessingFunction[t._TOUCHSTART_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHSTART_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHMOVE_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHMOVE_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHEND_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHEND_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHCANCEL_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHCANCEL_EVENT_NAME,"page")},n}return t.getDispatcher=function(r){var n=r.root().rootElement(),i=n[t._DISPATCHER_KEY];return i==null&&(i=new t(r),n[t._DISPATCHER_KEY]=i),i},t.prototype.onTouchStart=function(r){return this._addCallbackForEvent(t._TOUCHSTART_EVENT_NAME,r),this},t.prototype.offTouchStart=function(r){return this._removeCallbackForEvent(t._TOUCHSTART_EVENT_NAME,r),this},t.prototype.onTouchMove=function(r){return this._addCallbackForEvent(t._TOUCHMOVE_EVENT_NAME,r),this},t.prototype.offTouchMove=function(r){return this._removeCallbackForEvent(t._TOUCHMOVE_EVENT_NAME,r),this},t.prototype.onTouchEnd=function(r){return this._addCallbackForEvent(t._TOUCHEND_EVENT_NAME,r),this},t.prototype.offTouchEnd=function(r){return this._removeCallbackForEvent(t._TOUCHEND_EVENT_NAME,r),this},t.prototype.onTouchCancel=function(r){return this._addCallbackForEvent(t._TOUCHCANCEL_EVENT_NAME,r),this},t.prototype.offTouchCancel=function(r){return this._removeCallbackForEvent(t._TOUCHCANCEL_EVENT_NAME,r),this},t.prototype._measureAndDispatch=function(r,n,i,o){if(o===void 0&&(o="element"),o!=="page"&&o!=="element")throw new Error("Invalid scope '"+o+"', must be 'element' or 'page'");if(!(o==="element"&&!this.eventInside(r,n))){for(var a=n.changedTouches,s={},l=[],c=0;c<a.length;c++){var u=a[c],h=u.identifier,f=this._translator.computePosition(u.clientX,u.clientY);f!=null&&(s[h]=f,l.push(h))}l.length>0&&this._callCallbacksForEvent(i,l,s,n)}},t.prototype.eventInside=function(r,n){return g$t.Translator.isEventInside(r,n)},t._DISPATCHER_KEY="__Plottable_Dispatcher_Touch",t._TOUCHSTART_EVENT_NAME="touchstart",t._TOUCHMOVE_EVENT_NAME="touchmove",t._TOUCHEND_EVENT_NAME="touchend",t._TOUCHCANCEL_EVENT_NAME="touchcancel",t}(VFe.Dispatcher);mot.Touch=UFe});var Dv=H(a4=>{"use strict";Object.defineProperty(a4,"__esModule",{value:!0});var got=(de(),Ut(pe));got.__exportStar(p$t(),a4);got.__exportStar(m$t(),a4);got.__exportStar(_$t(),a4)});var Ov=H(_ot=>{"use strict";Object.defineProperty(_ot,"__esModule",{value:!0});var qFe=function(){function e(){var t=this;this._anchorCallback=function(r){return t._anchor(r)},this._enabled=!0}return e.prototype.attachTo=function(t){return this._disconnect(),this._componentAttachedTo=t,this._connect(),this},e.prototype.detachFrom=function(t){return this.detach()},e.prototype.detach=function(){return this._disconnect(),this._componentAttachedTo=null,this},e.prototype.enabled=function(t){return t==null?this._enabled:(this._enabled=t,this._enabled?this._connect():this._disconnect(),this)},e.prototype._anchor=function(t){this._isAnchored=!0},e.prototype._unanchor=function(){this._isAnchored=!1},e.prototype._translateToComponentSpace=function(t){var r=this._componentAttachedTo.originToRoot();return{x:t.x-r.x,y:t.y-r.y}},e.prototype._isInsideComponent=function(t){return 0<=t.x&&0<=t.y&&t.x<=this._componentAttachedTo.width()&&t.y<=this._componentAttachedTo.height()},e.prototype._connect=function(){this.enabled()&&this._componentAttachedTo!=null&&!this._isAnchored&&this._componentAttachedTo.onAnchor(this._anchorCallback)},e.prototype._disconnect=function(){this._isAnchored&&this._unanchor(),this._componentAttachedTo!=null&&this._componentAttachedTo.offAnchor(this._anchorCallback)},e}();_ot.Interaction=qFe});var x$t=H(yot=>{"use strict";Object.defineProperty(yot,"__esModule",{value:!0});var GFe=(de(),Ut(pe)),y$t=Dv(),v$t=Fe(),WFe=Ov(),YFe=function(e){GFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._clickedDown=!1,r._doubleClicking=!1,r._onClickCallbacks=new v$t.CallbackSet,r._onDoubleClickCallbacks=new v$t.CallbackSet,r._mouseDownCallback=function(n,i){return r._handleClickDown(n,i)},r._mouseUpCallback=function(n,i){return r._handleClickUp(n,i)},r._dblClickCallback=function(n,i){return r._handleDblClick(n,i)},r._touchStartCallback=function(n,i,o){return r._handleClickDown(i[n[0]],o)},r._touchEndCallback=function(n,i,o){return r._handleClickUp(i[n[0]],o)},r._touchCancelCallback=function(n,i){return r._clickedDown=!1},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=y$t.Mouse.getDispatcher(r),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._mouseDispatcher.onDblClick(this._dblClickCallback),this._touchDispatcher=y$t.Touch.getDispatcher(r),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback),this._touchDispatcher.onTouchCancel(this._touchCancelCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseDown(this._mouseDownCallback),this._mouseDispatcher.offMouseUp(this._mouseUpCallback),this._mouseDispatcher.offDblClick(this._dblClickCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher.offTouchCancel(this._touchCancelCallback),this._touchDispatcher=null},t.prototype._handleClickDown=function(r,n){var i=this._translateToComponentSpace(r);this._isInsideComponent(i)&&(this._clickedDown=!0,this._clickedPoint=i)},t.prototype._handleClickUp=function(r,n){var i=this,o=this._translateToComponentSpace(r);this._clickedDown&&t._pointsEqual(o,this._clickedPoint)&&setTimeout(function(){i._doubleClicking||i._onClickCallbacks.callCallbacks(o,n)},0),this._clickedDown=!1},t.prototype._handleDblClick=function(r,n){var i=this,o=this._translateToComponentSpace(r);this._doubleClicking=!0,this._onDoubleClickCallbacks.callCallbacks(o,n),setTimeout(function(){return i._doubleClicking=!1},0)},t._pointsEqual=function(r,n){return r.x===n.x&&r.y===n.y},t.prototype.onClick=function(r){return this._onClickCallbacks.add(r),this},t.prototype.offClick=function(r){return this._onClickCallbacks.delete(r),this},t.prototype.onDoubleClick=function(r){return this._onDoubleClickCallbacks.add(r),this},t.prototype.offDoubleClick=function(r){return this._onDoubleClickCallbacks.delete(r),this},t}(WFe.Interaction);yot.Click=YFe});var w$t=H(vot=>{"use strict";Object.defineProperty(vot,"__esModule",{value:!0});var jFe=(de(),Ut(pe)),b$t=Dv(),s4=Fe(),XFe=Ov(),$Fe=function(e){jFe.__extends(t,e);function t(r){var n=e.call(this)||this;return n._dragging=!1,n._constrainedToComponent=!0,n._mouseFilter=t._DEFAULT_MOUSE_FILTER,n._dragStartCallbacks=new s4.CallbackSet,n._dragCallbacks=new s4.CallbackSet,n._dragEndCallbacks=new s4.CallbackSet,n._mouseDownCallback=function(i,o){return n._startDrag(i,o)},n._mouseMoveCallback=function(i,o){return n._doDrag(i,o)},n._mouseUpCallback=function(i,o){return n._endDrag(i,o)},n._touchStartCallback=function(i,o,a){return n._startDrag(o[i[0]],a)},n._touchMoveCallback=function(i,o,a){return n._doDrag(o[i[0]],a)},n._touchEndCallback=function(i,o,a){return n._endDrag(o[i[0]],a)},n._mouseButton=r!==void 0?r:0,n}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=b$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._touchDispatcher=b$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchMove(this._touchMoveCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseDown(this._mouseDownCallback),this._mouseDispatcher.offMouseMove(this._mouseMoveCallback),this._mouseDispatcher.offMouseUp(this._mouseUpCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchMove(this._touchMoveCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher=null},t.prototype._translateAndConstrain=function(r){var n=this._translateToComponentSpace(r);return this._constrainedToComponent?{x:s4.Math.clamp(n.x,0,this._componentAttachedTo.width()),y:s4.Math.clamp(n.y,0,this._componentAttachedTo.height())}:n},t.prototype._startDrag=function(r,n){if(!(n instanceof MouseEvent&&!this._mouseFilter(n))){var i=this._translateToComponentSpace(r);this._isInsideComponent(i)&&(n.preventDefault(),this._dragging=!0,this._dragOrigin=i,this._dragStartCallbacks.callCallbacks(this._dragOrigin))}},t.prototype._doDrag=function(r,n){this._dragging&&this._dragCallbacks.callCallbacks(this._dragOrigin,this._translateAndConstrain(r))},t.prototype._endDrag=function(r,n){n instanceof MouseEvent&&n.button!==this._mouseButton||this._dragging&&(this._dragging=!1,this._dragEndCallbacks.callCallbacks(this._dragOrigin,this._translateAndConstrain(r)))},t.prototype.constrainedToComponent=function(r){return r==null?this._constrainedToComponent:(this._constrainedToComponent=r,this)},t.prototype.mouseFilter=function(r){return arguments.length===0?this._mouseFilter:(this._mouseFilter=r,this)},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t._DEFAULT_MOUSE_FILTER=function(r){return r.button===0},t}(XFe.Interaction);vot.Drag=$Fe});var wot=H(bot=>{"use strict";Object.defineProperty(bot,"__esModule",{value:!0});var KFe=(de(),Ut(pe)),S$t=Dv(),xot=Fe(),ZFe=Ov(),JFe=function(e){KFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._keyPressCallbacks={},r._keyReleaseCallbacks={},r._mouseMoveCallback=function(n){return!1},r._downedKeys=new xot.Set,r._keyDownCallback=function(n,i){return r._handleKeyDownEvent(n,i)},r._keyUpCallback=function(n){return r._handleKeyUpEvent(n)},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._positionDispatcher=S$t.Mouse.getDispatcher(this._componentAttachedTo),this._positionDispatcher.onMouseMove(this._mouseMoveCallback),this._keyDispatcher=S$t.Key.getDispatcher(),this._keyDispatcher.onKeyDown(this._keyDownCallback),this._keyDispatcher.onKeyUp(this._keyUpCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._positionDispatcher.offMouseMove(this._mouseMoveCallback),this._positionDispatcher=null,this._keyDispatcher.offKeyDown(this._keyDownCallback),this._keyDispatcher.offKeyUp(this._keyUpCallback),this._keyDispatcher=null},t.prototype._handleKeyDownEvent=function(r,n){var i=this._translateToComponentSpace(this._positionDispatcher.lastMousePosition());this._isInsideComponent(i)&&!n.repeat&&(this._keyPressCallbacks[r]&&this._keyPressCallbacks[r].callCallbacks(r),this._downedKeys.add(r))},t.prototype._handleKeyUpEvent=function(r){this._downedKeys.has(r)&&this._keyReleaseCallbacks[r]&&this._keyReleaseCallbacks[r].callCallbacks(r),this._downedKeys.delete(r)},t.prototype.onKeyPress=function(r,n){return this._keyPressCallbacks[r]||(this._keyPressCallbacks[r]=new xot.CallbackSet),this._keyPressCallbacks[r].add(n),this},t.prototype.offKeyPress=function(r,n){return this._keyPressCallbacks[r].delete(n),this._keyPressCallbacks[r].size===0&&delete this._keyPressCallbacks[r],this},t.prototype.onKeyRelease=function(r,n){return this._keyReleaseCallbacks[r]||(this._keyReleaseCallbacks[r]=new xot.CallbackSet),this._keyReleaseCallbacks[r].add(n),this},t.prototype.offKeyRelease=function(r,n){return this._keyReleaseCallbacks[r].delete(n),this._keyReleaseCallbacks[r].size===0&&delete this._keyReleaseCallbacks[r],this},t}(ZFe.Interaction);bot.Key=JFe});var C$t=H(Sot=>{"use strict";Object.defineProperty(Sot,"__esModule",{value:!0});var QFe=(de(),Ut(pe)),tBe=(Er(),Ut(Mr)),M$t=Dv(),E$t=Rs(),vl=Fe(),eBe=l4(),rBe=Ov(),T$t=e4(),nBe=function(e){QFe.__extends(t,e);function t(r,n){var i=e.call(this)||this;return i._wheelFilter=function(o){return!0},i._wheelCallback=function(o,a){return i._handleWheelEvent(o,a)},i._touchStartCallback=function(o,a,s){return i._handleTouchStart(o,a,s)},i._touchMoveCallback=function(o,a,s){return i._handlePinch(o,a,s)},i._touchEndCallback=function(o,a,s){return i._handleTouchEnd(o,a,s)},i._touchCancelCallback=function(o,a,s){return i._handleTouchEnd(o,a,s)},i._panEndCallbacks=new vl.CallbackSet,i._zoomEndCallbacks=new vl.CallbackSet,i._panZoomUpdateCallbacks=new vl.CallbackSet,i._xScales=new vl.Set,i._yScales=new vl.Set,i._dragInteraction=new eBe.Drag,i._setupDragInteraction(),i._touchIds=tBe.map(),i._minDomainExtents=new vl.Map,i._maxDomainExtents=new vl.Map,i._minDomainValues=new vl.Map,i._maxDomainValues=new vl.Map,r!=null&&i.addXScale(r),n!=null&&i.addYScale(n),i}return t.prototype.dragInteraction=function(){return this._dragInteraction},t.prototype.wheelFilter=function(r){return arguments.length===0?this._wheelFilter:(this._wheelFilter=r,this)},t.prototype.pan=function(r){var n=this;this.xScales().forEach(function(i){i.pan(n._constrainedTranslation(i,r.x))}),this.yScales().forEach(function(i){i.pan(n._constrainedTranslation(i,r.y))}),this._panZoomUpdateCallbacks.callCallbacks()},t.prototype.zoom=function(r,n,i){var o=this;i===void 0&&(i=!0);var a,s;return n!=null&&(a=n.x,s=n.y,i&&(this.xScales().forEach(function(l){var c=o._constrainedZoom(l,r,a);a=c.centerPoint,r=c.zoomAmount}),this.yScales().forEach(function(l){var c=o._constrainedZoom(l,r,s);s=c.centerPoint,r=c.zoomAmount}))),this.xScales().forEach(function(l){var c=l.range(),u=a==null?(c[1]+c[0])/2:a;l.zoom(r,u)}),this.yScales().forEach(function(l){var c=l.range(),u=s==null?(c[1]+c[0])/2:s;l.zoom(r,u)}),this._panZoomUpdateCallbacks.callCallbacks(),{zoomAmount:r,centerValue:{centerX:a,centerY:s}}},t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._dragInteraction.attachTo(r),this._mouseDispatcher=M$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onWheel(this._wheelCallback),this._touchDispatcher=M$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchMove(this._touchMoveCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback),this._touchDispatcher.onTouchCancel(this._touchCancelCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offWheel(this._wheelCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchMove(this._touchMoveCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher.offTouchCancel(this._touchCancelCallback),this._touchDispatcher=null,this._dragInteraction.detach()},t.prototype._handleTouchStart=function(r,n,i){for(var o=0;o<r.length&&this._touchIds.size()<2;o++){var a=r[o];this._touchIds.set(a.toString(),this._translateToComponentSpace(n[a]))}},t.prototype._handlePinch=function(r,n,i){var o=this;if(!(this._touchIds.size()<2)){var a=this._touchIds.values();if(!(!this._isInsideComponent(this._translateToComponentSpace(a[0]))||!this._isInsideComponent(this._translateToComponentSpace(a[1])))){var s=t._pointDistance(a[0],a[1]);if(s!==0){r.forEach(function(S){o._touchIds.has(S.toString())&&o._touchIds.set(S.toString(),o._translateToComponentSpace(n[S]))});var l=this._touchIds.values(),c=t._pointDistance(l[0],l[1]);if(c!==0){var u=s/c,h=l.map(function(S,C){return{x:(S.x-a[C].x)/u,y:(S.y-a[C].y)/u}}),f=t.centerPoint(a[0],a[1]),p=this.zoom(u,f),d=p.centerValue,g=p.zoomAmount,_=d.centerX,y=d.centerY,x=a.map(function(S,C){return{x:h[C].x*g+S.x,y:h[C].y*g+S.y}}),b={x:_-(x[0].x+x[1].x)/2,y:y-(x[0].y+x[1].y)/2};this.pan(b)}}}}},t.centerPoint=function(r,n){var i=Math.min(r.x,n.x),o=Math.max(r.x,n.x),a=Math.min(r.y,n.y),s=Math.max(r.y,n.y);return{x:(i+o)/2,y:(s+a)/2}},t._pointDistance=function(r,n){var i=Math.min(r.x,n.x),o=Math.max(r.x,n.x),a=Math.min(r.y,n.y),s=Math.max(r.y,n.y);return Math.sqrt(Math.pow(o-i,2)+Math.pow(s-a,2))},t.prototype._handleTouchEnd=function(r,n,i){var o=this;r.forEach(function(a){o._touchIds.remove(a.toString())}),this._touchIds.size()>0&&this._zoomEndCallbacks.callCallbacks()},t.prototype._handleWheelEvent=function(r,n){if(!!this._wheelFilter(n)){var i=this._translateToComponentSpace(r);if(this._isInsideComponent(i)){n.preventDefault();var o=n.deltaY!==0?n.deltaY:n.deltaX,a=o*(n.deltaMode?t._PIXELS_PER_LINE:1),s=Math.pow(2,a*.002);this.zoom(s,i),this._zoomEndCallbacks.callCallbacks()}}},t.prototype._constrainedZoom=function(r,n,i){return T$t.constrainedZoom(r,n,i,this.minDomainExtent(r),this.maxDomainExtent(r),this.minDomainValue(r),this.maxDomainValue(r))},t.prototype._constrainedTranslation=function(r,n){return T$t.constrainedTranslation(r,n,this.minDomainValue(r),this.maxDomainValue(r))},t.prototype._setupDragInteraction=function(){var r=this;this._dragInteraction.constrainedToComponent(!1);var n;this._dragInteraction.onDragStart(function(){return n=null}),this._dragInteraction.onDrag(function(i,o){if(!(r._touchIds.size()>=2)){var a={x:(n==null?i.x:n.x)-o.x,y:(n==null?i.y:n.y)-o.y};r.pan(a),n=o}}),this._dragInteraction.onDragEnd(function(){return r._panEndCallbacks.callCallbacks()})},t.prototype._nonLinearScaleWithExtents=function(r){return this.minDomainExtent(r)!=null&&this.maxDomainExtent(r)!=null&&!(r instanceof E$t.Linear)&&!(r instanceof E$t.Time)},t.prototype.xScales=function(r){var n=this;if(r==null){var i=[];return this._xScales.forEach(function(o){i.push(o)}),i}return this._xScales=new vl.Set,r.forEach(function(o){n.addXScale(o)}),this},t.prototype.yScales=function(r){var n=this;if(r==null){var i=[];return this._yScales.forEach(function(o){i.push(o)}),i}return this._yScales=new vl.Set,r.forEach(function(o){n.addYScale(o)}),this},t.prototype.addXScale=function(r){return this._xScales.add(r),this},t.prototype.removeXScale=function(r){return this._xScales.delete(r),this._minDomainExtents.delete(r),this._maxDomainExtents.delete(r),this._minDomainValues.delete(r),this._maxDomainValues.delete(r),this},t.prototype.addYScale=function(r){return this._yScales.add(r),this},t.prototype.removeYScale=function(r){return this._yScales.delete(r),this._minDomainExtents.delete(r),this._maxDomainExtents.delete(r),this._minDomainValues.delete(r),this._maxDomainValues.delete(r),this},t.prototype.minDomainExtent=function(r,n){if(n==null)return this._minDomainExtents.get(r);if(n.valueOf()<0)throw new Error("extent must be non-negative");var i=this.maxDomainExtent(r);if(i!=null&&i.valueOf()<n.valueOf())throw new Error("minDomainExtent must be smaller than maxDomainExtent for the same Scale");return this._nonLinearScaleWithExtents(r)&&vl.Window.warn("Panning and zooming with extents on a nonlinear scale may have unintended behavior."),this._minDomainExtents.set(r,n),this},t.prototype.maxDomainExtent=function(r,n){if(n==null)return this._maxDomainExtents.get(r);if(n.valueOf()<=0)throw new Error("extent must be positive");var i=this.minDomainExtent(r);if(i!=null&&n.valueOf()<i.valueOf())throw new Error("maxDomainExtent must be larger than minDomainExtent for the same Scale");return this._nonLinearScaleWithExtents(r)&&vl.Window.warn("Panning and zooming with extents on a nonlinear scale may have unintended behavior."),this._maxDomainExtents.set(r,n),this},t.prototype.minDomainValue=function(r,n){return n==null?this._minDomainValues.get(r):(this._minDomainValues.set(r,n),this)},t.prototype.maxDomainValue=function(r,n){return n==null?this._maxDomainValues.get(r):(this._maxDomainValues.set(r,n),this)},t.prototype.setMinMaxDomainValuesTo=function(r){this._minDomainValues.delete(r),this._maxDomainValues.delete(r);var n=r.getTransformationDomain(),i=n[0],o=n[1];return this.minDomainValue(r,i),this.maxDomainValue(r,o),this},t.prototype.onPanEnd=function(r){return this._panEndCallbacks.add(r),this},t.prototype.offPanEnd=function(r){return this._panEndCallbacks.delete(r),this},t.prototype.onZoomEnd=function(r){return this._zoomEndCallbacks.add(r),this},t.prototype.offZoomEnd=function(r){return this._zoomEndCallbacks.delete(r),this},t.prototype.onPanZoomUpdate=function(r){return this._panZoomUpdateCallbacks.add(r),this},t.prototype.offPanZoomUpdate=function(r){return this._panZoomUpdateCallbacks.delete(r),this},t._PIXELS_PER_LINE=120,t}(rBe.Interaction);Sot.PanZoom=nBe});var P$t=H(Eot=>{"use strict";Object.defineProperty(Eot,"__esModule",{value:!0});var iBe=(de(),Ut(pe)),A$t=Dv(),Mot=Fe(),oBe=Ov(),aBe=function(e){iBe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._overComponent=!1,r._pointerEnterCallbacks=new Mot.CallbackSet,r._pointerMoveCallbacks=new Mot.CallbackSet,r._pointerExitCallbacks=new Mot.CallbackSet,r._mouseMoveCallback=function(n,i){return r._handleMouseEvent(n,i)},r._touchStartCallback=function(n,i,o){return r._handleTouchEvent(i[n[0]],o)},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=A$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._touchDispatcher=A$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseMove(this._mouseMoveCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher=null},t.prototype._handleMouseEvent=function(r,n){var i=this._mouseDispatcher.eventInside(this._componentAttachedTo,n);this._handlePointerEvent(r,i)},t.prototype._handleTouchEvent=function(r,n){var i=this._touchDispatcher.eventInside(this._componentAttachedTo,n);this._handlePointerEvent(r,i)},t.prototype._handlePointerEvent=function(r,n){var i=this._translateToComponentSpace(r),o=this._isInsideComponent(i);o&&n?(this._overComponent||this._pointerEnterCallbacks.callCallbacks(i),this._pointerMoveCallbacks.callCallbacks(i)):this._overComponent&&this._pointerExitCallbacks.callCallbacks(i),this._overComponent=o&&n},t.prototype.onPointerEnter=function(r){return this._pointerEnterCallbacks.add(r),this},t.prototype.offPointerEnter=function(r){return this._pointerEnterCallbacks.delete(r),this},t.prototype.onPointerMove=function(r){return this._pointerMoveCallbacks.add(r),this},t.prototype.offPointerMove=function(r){return this._pointerMoveCallbacks.delete(r),this},t.prototype.onPointerExit=function(r){return this._pointerExitCallbacks.add(r),this},t.prototype.offPointerExit=function(r){return this._pointerExitCallbacks.delete(r),this},t}(oBe.Interaction);Eot.Pointer=aBe});var l4=H(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});var c4=(de(),Ut(pe));c4.__exportStar(x$t(),Jg);c4.__exportStar(w$t(),Jg);c4.__exportStar(wot(),Jg);c4.__exportStar(C$t(),Jg);c4.__exportStar(P$t(),Jg);var sBe=e4();Jg.zoomOut=sBe.zoomOut});var Tot=H(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});var lBe=(de(),Ut(pe)),VF=Fe(),cBe=kc(),rs;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(rs=u4.PropertyMode||(u4.PropertyMode={}));var uBe=function(e){lBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._boxVisible=!1,r._boxBounds={topLeft:{x:0,y:0},bottomRight:{x:0,y:0}},r._xBoundsMode=rs.PIXEL,r._yBoundsMode=rs.PIXEL,r.addClass("selection-box-layer"),r._adjustBoundsCallback=function(){r.render()},r._overflowHidden=!0,r._xExtent=[void 0,void 0],r._yExtent=[void 0,void 0],r}return t.prototype._setup=function(){e.prototype._setup.call(this),this._box=this.content().append("g").classed("selection-box",!0).remove(),this._boxArea=this._box.append("rect").classed("selection-area",!0)},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype.bounds=function(r){return r==null?this._getBounds():(this._setBounds(r),this._xBoundsMode=rs.PIXEL,this._yBoundsMode=rs.PIXEL,this.render(),this)},t.prototype._setBounds=function(r){var n={x:Math.min(r.topLeft.x,r.bottomRight.x),y:Math.min(r.topLeft.y,r.bottomRight.y)},i={x:Math.max(r.topLeft.x,r.bottomRight.x),y:Math.max(r.topLeft.y,r.bottomRight.y)};this._boxBounds={topLeft:n,bottomRight:i}},t.prototype._getBounds=function(){return{topLeft:{x:this._xBoundsMode===rs.PIXEL?this._boxBounds.topLeft.x:this._xScale==null?0:Math.min(this.xScale().scale(this.xExtent()[0]),this.xScale().scale(this.xExtent()[1])),y:this._yBoundsMode===rs.PIXEL?this._boxBounds.topLeft.y:this._yScale==null?0:Math.min(this.yScale().scale(this.yExtent()[0]),this.yScale().scale(this.yExtent()[1]))},bottomRight:{x:this._xBoundsMode===rs.PIXEL?this._boxBounds.bottomRight.x:this._xScale==null?0:Math.max(this.xScale().scale(this.xExtent()[0]),this.xScale().scale(this.xExtent()[1])),y:this._yBoundsMode===rs.PIXEL?this._boxBounds.bottomRight.y:this._yScale==null?0:Math.max(this.yScale().scale(this.yExtent()[0]),this.yScale().scale(this.yExtent()[1]))}}},t.prototype.renderImmediately=function(){if(e.prototype.renderImmediately.call(this),this._boxVisible){var r=this.bounds(),n=r.topLeft.y,i=r.bottomRight.y,o=r.topLeft.x,a=r.bottomRight.x;if(!(VF.Math.isValidNumber(n)&&VF.Math.isValidNumber(i)&&VF.Math.isValidNumber(o)&&VF.Math.isValidNumber(a)))throw new Error("bounds have not been properly set");this._boxArea.attrs({x:o,y:n,width:a-o,height:i-n}),this.content().node().appendChild(this._box.node())}else this._box.remove();return this},t.prototype.boxVisible=function(r){return r==null?this._boxVisible:(this._boxVisible=r,this.render(),this)},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.xScale=function(r){return r==null?this._xScale:(this._xScale!=null&&this._xScale.offUpdate(this._adjustBoundsCallback),this._xScale=r,this._xBoundsMode=rs.VALUE,this._xScale.onUpdate(this._adjustBoundsCallback),this.render(),this)},t.prototype.yScale=function(r){return r==null?this._yScale:(this._yScale!=null&&this._yScale.offUpdate(this._adjustBoundsCallback),this._yScale=r,this._yBoundsMode=rs.VALUE,this._yScale.onUpdate(this._adjustBoundsCallback),this.render(),this)},t.prototype.xExtent=function(r){return r==null?this._getXExtent():(this._setXExtent(r),this._xBoundsMode=rs.VALUE,this.render(),this)},t.prototype._getXExtent=function(){return this._xBoundsMode===rs.VALUE?this._xExtent:this._xScale==null?[void 0,void 0]:[this._xScale.invert(this._boxBounds.topLeft.x),this._xScale.invert(this._boxBounds.bottomRight.x)]},t.prototype._setXExtent=function(r){this._xExtent=r},t.prototype.yExtent=function(r){return r==null?this._getYExtent():(this._setYExtent(r),this._yBoundsMode=rs.VALUE,this.render(),this)},t.prototype._getYExtent=function(){return this._yBoundsMode===rs.VALUE?this._yExtent:this._yScale==null?[void 0,void 0]:[this._yScale.invert(this._boxBounds.topLeft.y),this._yScale.invert(this._boxBounds.bottomRight.y)]},t.prototype._setYExtent=function(r){this._yExtent=r},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._xScale!=null&&this.xScale().offUpdate(this._adjustBoundsCallback),this._yScale!=null&&this.yScale().offUpdate(this._adjustBoundsCallback)},t}(cBe.Component);u4.SelectionBoxLayer=uBe});var qF=H(Aot=>{"use strict";Object.defineProperty(Aot,"__esModule",{value:!0});var hBe=(de(),Ut(pe)),fBe=l4(),Cot=Fe(),pBe=jg(),UF=Pot(),dBe=Tot(),mBe=function(e){hBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._detectionRadius=3,r._resizable=!1,r._movable=!1,r._hasCorners=!0,r.addClass("drag-box-layer"),r._dragInteraction=new fBe.Drag,r._setUpCallbacks(),r._dragInteraction.attachTo(r),r._dragStartCallbacks=new Cot.CallbackSet,r._dragCallbacks=new Cot.CallbackSet,r._dragEndCallbacks=new Cot.CallbackSet,r}return t.prototype._setUpCallbacks=function(){var r=this,n,i,o,a,s={newBox:0,resize:1,move:2},l=s.newBox,c=function(f){n=r._getResizingEdges(f);var p=r.bounds(),d=p.topLeft.x<=f.x&&f.x<=p.bottomRight.x&&p.topLeft.y<=f.y&&f.y<=p.bottomRight.y;r.boxVisible()&&(n.top||n.bottom||n.left||n.right)?l=s.resize:r.boxVisible()&&r.movable()&&d?l=s.move:(l=s.newBox,r._setBounds({topLeft:f,bottomRight:f}),r._xBoundsMode===UF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(f.x),r.xScale().invert(f.x)]),r._yBoundsMode===UF.PropertyMode.VALUE&&r.yScale()!=null&&r._setYExtent([r.yScale().invert(f.y),r.yScale().invert(f.y)]),r.render()),r.boxVisible(!0),p=r.bounds(),i={x:p.topLeft.x,y:p.topLeft.y},o={x:p.bottomRight.x,y:p.bottomRight.y},a=f,r._dragStartCallbacks.callCallbacks(p)},u=function(f,p){switch(l){case s.newBox:o.x=p.x,o.y=p.y;break;case s.resize:n.bottom?o.y=p.y:n.top&&(i.y=p.y),n.right?o.x=p.x:n.left&&(i.x=p.x);break;case s.move:var d=p.x-a.x,g=p.y-a.y;i.x+=d,i.y+=g,o.x+=d,o.y+=g,a=p;break}r._setBounds({topLeft:i,bottomRight:o}),r._xBoundsMode===UF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(i.x),r.xScale().invert(o.x)]),r._yBoundsMode===UF.PropertyMode.VALUE&&r.yScale()!=null&&r._setYExtent([r.yScale().invert(i.y),r.yScale().invert(o.y)]),r.render(),r._dragCallbacks.callCallbacks(r.bounds())},h=function(f,p){l===s.newBox&&f.x===p.x&&f.y===p.y&&r.boxVisible(!1),r._dragEndCallbacks.callCallbacks(r.bounds())};this._dragInteraction.onDragStart(c),this._dragInteraction.onDrag(u),this._dragInteraction.onDragEnd(h),this._disconnectInteraction=function(){r._dragInteraction.offDragStart(c),r._dragInteraction.offDrag(u),r._dragInteraction.offDragEnd(h),r._dragInteraction.detach()}},t.prototype._setup=function(){var r=this;e.prototype._setup.call(this);var n=function(){return r._box.append("line").styles({opacity:0,stroke:"pink","pointer-events":"visibleStroke"})};if(this._detectionEdgeT=n().classed("drag-edge-tb",!0),this._detectionEdgeB=n().classed("drag-edge-tb",!0),this._detectionEdgeL=n().classed("drag-edge-lr",!0),this._detectionEdgeR=n().classed("drag-edge-lr",!0),this._hasCorners){var i=function(){return r._box.append("circle").styles({opacity:0,fill:"pink","pointer-events":"visibleFill"})};this._detectionCornerTL=i().classed("drag-corner-tl",!0),this._detectionCornerTR=i().classed("drag-corner-tr",!0),this._detectionCornerBL=i().classed("drag-corner-bl",!0),this._detectionCornerBR=i().classed("drag-corner-br",!0)}},t.prototype._getResizingEdges=function(r){var n={top:!1,bottom:!1,left:!1,right:!1};if(!this.resizable())return n;var i=this.bounds(),o=i.topLeft.y,a=i.bottomRight.y,s=i.topLeft.x,l=i.bottomRight.x,c=this._detectionRadius;return s-c<=r.x&&r.x<=l+c&&(n.top=o-c<=r.y&&r.y<=o+c,n.bottom=a-c<=r.y&&r.y<=a+c),o-c<=r.y&&r.y<=a+c&&(n.left=s-c<=r.x&&r.x<=s+c,n.right=l-c<=r.x&&r.x<=l+c),n},t.prototype.renderImmediately=function(){if(e.prototype.renderImmediately.call(this),this.boxVisible()){var r=this.bounds(),n=r.topLeft.y,i=r.bottomRight.y,o=r.topLeft.x,a=r.bottomRight.x;this._detectionEdgeT.attrs({x1:o,y1:n,x2:a,y2:n,"stroke-width":this._detectionRadius*2}),this._detectionEdgeB.attrs({x1:o,y1:i,x2:a,y2:i,"stroke-width":this._detectionRadius*2}),this._detectionEdgeL.attrs({x1:o,y1:n,x2:o,y2:i,"stroke-width":this._detectionRadius*2}),this._detectionEdgeR.attrs({x1:a,y1:n,x2:a,y2:i,"stroke-width":this._detectionRadius*2}),this._hasCorners&&(this._detectionCornerTL.attrs({cx:o,cy:n,r:this._detectionRadius}),this._detectionCornerTR.attrs({cx:a,cy:n,r:this._detectionRadius}),this._detectionCornerBL.attrs({cx:o,cy:i,r:this._detectionRadius}),this._detectionCornerBR.attrs({cx:a,cy:i,r:this._detectionRadius}))}return this},t.prototype.detectionRadius=function(r){if(r==null)return this._detectionRadius;if(r<0)throw new Error("detection radius cannot be negative.");return this._detectionRadius=r,this.render(),this},t.prototype.resizable=function(r){return r==null?this._resizable:(this._resizable=r,this._setResizableClasses(r),this)},t.prototype._setResizableClasses=function(r){r&&this.enabled()?(this.addClass("x-resizable"),this.addClass("y-resizable")):(this.removeClass("x-resizable"),this.removeClass("y-resizable"))},t.prototype.movable=function(r){return r==null?this._movable:(this._movable=r,this._setMovableClass(),this)},t.prototype._setMovableClass=function(){this.movable()&&this.enabled()?this.addClass("movable"):this.removeClass("movable")},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t.prototype.dragInteraction=function(){return this._dragInteraction},t.prototype.enabled=function(r){return r==null?this._dragInteraction.enabled():(this._dragInteraction.enabled(r),this._setResizableClasses(this.resizable()),this._setMovableClass(),this)},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._dragStartCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragEndCallbacks.forEach(function(n){return r._dragEndCallbacks.delete(n)}),this._disconnectInteraction()},t.prototype.detach=function(){return this._resetState(),this._dragInteraction.detach(),e.prototype.detach.call(this),this},t.prototype.anchor=function(r){return r=pBe.coerceExternalD3(r),this._dragInteraction.attachTo(this),e.prototype.anchor.call(this,r),this},t.prototype._resetState=function(){this.bounds({topLeft:{x:0,y:0},bottomRight:{x:0,y:0}})},t}(dBe.SelectionBoxLayer);Aot.DragBoxLayer=mBe});var Lot=H(Iot=>{"use strict";Object.defineProperty(Iot,"__esModule",{value:!0});var gBe=(de(),Ut(pe)),_Be=Fe(),yBe=kc(),zv;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(zv||(zv={}));var vBe=function(e){gBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._mode=zv.VALUE,r!==t.ORIENTATION_VERTICAL&&r!==t.ORIENTATION_HORIZONTAL)throw new Error(r+" is not a valid orientation for GuideLineLayer");return n._orientation=r,n._overflowHidden=!0,n.addClass("guide-line-layer"),n._isVertical()?n.addClass("vertical"):n.addClass("horizontal"),n._scaleUpdateCallback=function(){n._syncPixelPositionAndValue(),n.render()},n}return t.prototype._setup=function(){e.prototype._setup.call(this),this._guideLine=this.content().append("line").classed("guide-line",!0)},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype._isVertical=function(){return this._orientation===t.ORIENTATION_VERTICAL},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.scale()!=null&&(this._isVertical()?this.scale().range([0,this.width()]):this.scale().range([this.height(),0])),this},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._syncPixelPositionAndValue(),this._guideLine.attrs({x1:this._isVertical()?this.pixelPosition():0,y1:this._isVertical()?0:this.pixelPosition(),x2:this._isVertical()?this.pixelPosition():this.width(),y2:this._isVertical()?this.height():this.pixelPosition()}),this},t.prototype._syncPixelPositionAndValue=function(){this.scale()!=null&&(this._mode===zv.VALUE&&this.value()!=null?this._pixelPosition=this.scale().scale(this.value()):this._mode===zv.PIXEL&&this.pixelPosition()!=null&&(this._value=this.scale().invert(this.pixelPosition())))},t.prototype._setPixelPositionWithoutChangingMode=function(r){this._pixelPosition=r,this.scale()!=null&&(this._value=this.scale().invert(this.pixelPosition())),this.render()},t.prototype.scale=function(r){if(r==null)return this._scale;var n=this._scale;return n!=null&&n.offUpdate(this._scaleUpdateCallback),this._scale=r,this._scale.onUpdate(this._scaleUpdateCallback),this._syncPixelPositionAndValue(),this.redraw(),this},t.prototype.value=function(r){return r==null?this._value:(this._value=r,this._mode=zv.VALUE,this._syncPixelPositionAndValue(),this.render(),this)},t.prototype.pixelPosition=function(r){if(r==null)return this._pixelPosition;if(!_Be.Math.isValidNumber(r))throw new Error("pixelPosition must be a finite number");return this._pixelPosition=r,this._mode=zv.PIXEL,this._syncPixelPositionAndValue(),this.render(),this},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.scale()!=null&&this.scale().offUpdate(this._scaleUpdateCallback)},t.ORIENTATION_VERTICAL="vertical",t.ORIENTATION_HORIZONTAL="horizontal",t}(yBe.Component);Iot.GuideLineLayer=vBe});var I$t=H(Rot=>{"use strict";Object.defineProperty(Rot,"__esModule",{value:!0});var xBe=(de(),Ut(pe)),bBe=Lot(),wBe=l4(),kot=Fe(),SBe=function(e){xBe.__extends(t,e);function t(r){var n=e.call(this,r)||this;n._detectionRadius=3,n._enabled=!0,n.addClass("drag-line-layer"),n.addClass("enabled"),n._dragInteraction=new wBe.Drag,n._dragInteraction.attachTo(n);var i=function(c){return n._isVertical()&&n.pixelPosition()-n.detectionRadius()<=c.x&&c.x<=n.pixelPosition()+n.detectionRadius()||!n._isVertical()&&n.pixelPosition()-n.detectionRadius()<=c.y&&c.y<=n.pixelPosition()+n.detectionRadius()},o=!1,a=function(c){i(c)&&(o=!0,n._dragStartCallbacks.callCallbacks(n))};n._dragInteraction.onDragStart(a);var s=function(c,u){o&&(n._setPixelPositionWithoutChangingMode(n._isVertical()?u.x:u.y),n._dragCallbacks.callCallbacks(n))};n._dragInteraction.onDrag(s);var l=function(c,u){o&&(o=!1,n._dragEndCallbacks.callCallbacks(n))};return n._dragInteraction.onDragEnd(l),n._disconnectInteraction=function(){n._dragInteraction.offDragStart(a),n._dragInteraction.offDrag(s),n._dragInteraction.offDragEnd(l),n._dragInteraction.detach()},n._dragStartCallbacks=new kot.CallbackSet,n._dragCallbacks=new kot.CallbackSet,n._dragEndCallbacks=new kot.CallbackSet,n}return t.prototype._setup=function(){e.prototype._setup.call(this),this._detectionEdge=this.content().append("line").styles({opacity:0,stroke:"pink","pointer-events":"visibleStroke"}).classed("drag-edge",!0)},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._detectionEdge.attrs({x1:this._isVertical()?this.pixelPosition():0,y1:this._isVertical()?0:this.pixelPosition(),x2:this._isVertical()?this.pixelPosition():this.width(),y2:this._isVertical()?this.height():this.pixelPosition(),"stroke-width":this._detectionRadius*2}),this},t.prototype.detectionRadius=function(r){if(r==null)return this._detectionRadius;if(r<0)throw new Error("detection radius cannot be negative.");return this._detectionRadius=r,this.render(),this},t.prototype.enabled=function(r){return r==null?this._enabled:(this._enabled=r,r?this.addClass("enabled"):this.removeClass("enabled"),this._dragInteraction.enabled(r),this)},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._dragStartCallbacks.forEach(function(n){return r._dragStartCallbacks.delete(n)}),this._dragCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragEndCallbacks.forEach(function(n){return r._dragEndCallbacks.delete(n)}),this._disconnectInteraction()},t}(bBe.GuideLineLayer);Rot.DragLineLayer=SBe});var L$t=H(Not=>{"use strict";Object.defineProperty(Not,"__esModule",{value:!0});var MBe=(de(),Ut(pe)),EBe=kc();function GF(e,t,r){var n={};if(r!==void 0)for(var i=0;i<r.length;i++){var o=r[i-1],a=r[i];n[a]=o}return function(s){var l=e.scale(s);if(!t)return l;var c,u=n[s]===void 0?void 0:e.scale(n[s]);return u!==void 0&&(c=u+(l-u)/2),c}}var TBe=function(e){MBe.__extends(t,e);function t(r,n){var i=e.call(this)||this;return i.addClass("gridlines"),i._xScale=r,i._yScale=n,i._renderCallback=function(o){return i.render()},i._xScale&&i._xScale.onUpdate(i._renderCallback),i._yScale&&i._yScale.onUpdate(i._renderCallback),i}return t.prototype.betweenX=function(r){return r===void 0?this._betweenX:(r!==this._betweenX&&(this._betweenX=r,this.render()),this)},t.prototype.betweenY=function(r){return r===void 0?this._betweenY:(r!==this._betweenY&&(this._betweenY=r,this.render()),this)},t.prototype.destroy=function(){return e.prototype.destroy.call(this),this._xScale&&this._xScale.offUpdate(this._renderCallback),this._yScale&&this._yScale.offUpdate(this._renderCallback),this},t.prototype._setup=function(){e.prototype._setup.call(this),this._xLinesContainer=this.content().append("g").classed("x-gridlines",!0),this._yLinesContainer=this.content().append("g").classed("y-gridlines",!0)},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._redrawXLines(),this._redrawYLines(),this},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._xScale!=null&&this._xScale.range([0,this.width()]),this._yScale!=null&&this._yScale.range([this.height(),0]),this},t.prototype._redrawXLines=function(){if(this._xScale){var r=this.betweenX(),n=this._xScale.ticks().slice(r?1:0),i=this._xLinesContainer.selectAll("line").data(n),o=i.enter().append("line").merge(i);o.attr("x1",GF(this._xScale,r,this._xScale.ticks())).attr("y1",0).attr("x2",GF(this._xScale,r,this._xScale.ticks())).attr("y2",this.height()).classed("betweenline",r).classed("zeroline",function(a){return a===0}),i.exit().remove()}},t.prototype._redrawYLines=function(){if(this._yScale){var r=this.betweenY(),n=this._yScale.ticks().slice(r?1:0),i=this._yLinesContainer.selectAll("line").data(n),o=i.enter().append("line").merge(i);o.attr("x1",0).attr("y1",GF(this._yScale,r,this._yScale.ticks())).attr("x2",this.width()).attr("y2",GF(this._yScale,r,this._yScale.ticks())).classed("betweenline",r).classed("zeroline",function(a){return a===0}),i.exit().remove()}},t}(EBe.Component);Not.Gridlines=TBe});var WF=H(Dot=>{"use strict";Object.defineProperty(Dot,"__esModule",{value:!0});var CBe=(de(),Ut(pe)),ABe=jg(),PBe=kc(),IBe=function(e){CBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._detachCallback=function(n){return r.remove(n)},r}return t.prototype.anchor=function(r){var n=this;return r=ABe.coerceExternalD3(r),e.prototype.anchor.call(this,r),this._forEach(function(i){return i.anchor(n.element())}),this},t.prototype.render=function(){return this._forEach(function(r){return r.render()}),this},t.prototype.has=function(r){throw new Error("has() is not implemented on ComponentContainer")},t.prototype._adoptAndAnchor=function(r){r.parent(this),r.onDetach(this._detachCallback),this._isAnchored&&r.anchor(this.element())},t.prototype.remove=function(r){return this.has(r)&&(r.offDetach(this._detachCallback),this._remove(r),r.detach(),this.redraw()),this},t.prototype._remove=function(r){return!1},t.prototype._forEach=function(r){throw new Error("_forEach() is not implemented on ComponentContainer")},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._forEach(function(r){return r.destroy()})},t.prototype.invalidateCache=function(){this._forEach(function(r){return r.invalidateCache()})},t}(PBe.Component);Dot.ComponentContainer=IBe});var zot=H(Oot=>{"use strict";Object.defineProperty(Oot,"__esModule",{value:!0});var LBe=(de(),Ut(pe)),k$t=Fe(),kBe=WF(),RBe=function(e){LBe.__extends(t,e);function t(r){r===void 0&&(r=[]);var n=e.call(this)||this;return n._components=[],n.addClass("component-group"),r.forEach(function(i){return n.append(i)}),n}return t.prototype._forEach=function(r){this.components().forEach(r)},t.prototype.has=function(r){return this._components.indexOf(r)>=0},t.prototype.requestedSpace=function(r,n){var i=this._components.map(function(o){return o.requestedSpace(r,n)});return{minWidth:k$t.Math.max(i,function(o){return o.minWidth},0),minHeight:k$t.Math.max(i,function(o){return o.minHeight},0)}},t.prototype.computeLayout=function(r,n,i){var o=this;return e.prototype.computeLayout.call(this,r,n,i),this._forEach(function(a){a.computeLayout({x:0,y:0},o.width(),o.height())}),this},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype.fixedWidth=function(){return this._components.every(function(r){return r.fixedWidth()})},t.prototype.fixedHeight=function(){return this._components.every(function(r){return r.fixedHeight()})},t.prototype.components=function(){return this._components.slice()},t.prototype.append=function(r){return r!=null&&!this.has(r)&&(r.detach(),this._components.push(r),this._adoptAndAnchor(r),this.redraw()),this},t.prototype._remove=function(r){var n=this._components.indexOf(r);return n>=0?(this._components.splice(n,1),!0):!1},t}(kBe.ComponentContainer);Oot.Group=RBe});var R$t=H(Fot=>{"use strict";Object.defineProperty(Fot,"__esModule",{value:!0});var NBe=(de(),Ut(pe)),YF=yl(),DBe=$A(),OBe=Bu(),zBe=Fe(),FBe=kc(),BBe=function(e){NBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._textPadding=5,r==null)throw new Error("InterpolatedColorLegend requires a interpolatedColorScale");return n._scale=r,n._redrawCallback=function(i){return n.redraw()},n._scale.onUpdate(n._redrawCallback),n._formatter=OBe.general(),n._orientation="horizontal",n._expands=!1,n.addClass("legend"),n.addClass("interpolated-color-legend"),n}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this._scale.offUpdate(this._redrawCallback)},t.prototype.formatter=function(r){return r===void 0?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.expands=function(r){return r==null?this._expands:(this._expands=r,this.redraw(),this)},t._ensureOrientation=function(r){if(r=r.toLowerCase(),r==="horizontal"||r==="left"||r==="right")return r;throw new Error('"'+r+'" is not a valid orientation for InterpolatedColorLegend')},t.prototype.orientation=function(r){return r==null?this._orientation:(this._orientation=t._ensureOrientation(r),this.redraw(),this)},t.prototype.fixedWidth=function(){return!this.expands()||this._isVertical()},t.prototype.fixedHeight=function(){return!this.expands()||!this._isVertical()},t.prototype._generateTicks=function(r){r===void 0&&(r=t._DEFAULT_NUM_SWATCHES);var n=this._scale.domain();if(r===1)return[n[0]];for(var i=(n[1]-n[0])/(r-1),o=[],a=0;a<r;a++)o.push(n[0]+i*a);return o},t.prototype._setup=function(){e.prototype._setup.call(this),this._swatchContainer=this.content().append("g").classed("swatch-container",!0),this._swatchBoundingBox=this.content().append("rect").classed("swatch-bounding-box",!0),this._lowerLabel=this.content().append("g").classed(t.LEGEND_LABEL_CLASS,!0),this._upperLabel=this.content().append("g").classed(t.LEGEND_LABEL_CLASS,!0);var r=new YF.SvgContext(this.content().node());this._measurer=new YF.Measurer(r),this._wrapper=new YF.Wrapper,this._writer=new YF.Writer(this._measurer,r,this._wrapper)},t.prototype.requestedSpace=function(r,n){var i=this,o=this._measurer.measure().height,a=o,s=this._scale.domain(),l=s.map(function(p){return i._measurer.measure(i._formatter(p)).width}),c,u,h=t._DEFAULT_NUM_SWATCHES;if(this._isVertical()){var f=zBe.Math.max(l,0);u=a+o+this._textPadding+f+this._textPadding,c=h*o}else c=a+o+a,u=this._textPadding+l[0]+h*o+l[1]+this._textPadding;return{minWidth:u,minHeight:c}},t.prototype._isVertical=function(){return this._orientation!=="horizontal"},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n=this._scale.domain(),i=this._formatter(n[0]),o=this._measurer.measure(i).width,a=this._formatter(n[1]),s=this._measurer.measure(a).width,l=this._measurer.measure().height,c=this._textPadding,u={x:0,y:0},h={x:0,y:0},f={xAlign:"center",yAlign:"center",textRotation:0},p={xAlign:"center",yAlign:"center",textRotation:0},d,g,_,y,x={x:0,y:0,width:0,height:0},b,S;if(this._isVertical()){S=Math.floor(this.height());var C=Math.max(o,s);b=(this.width()-C-2*this._textPadding)/2,d=Math.max(this.width()-b-2*c-C,0),g=1,y=function(L,R){return r.height()-(R+1)},p.yAlign="top",u.y=0,f.yAlign="bottom",h.y=0,this._orientation==="left"?(_=function(L,R){return c+C+c},p.xAlign="right",u.x=-(b+d+c),f.xAlign="right",h.x=-(b+d+c)):(_=function(L,R){return b},p.xAlign="left",u.x=b+d+c,f.xAlign="left",h.x=b+d+c),x.width=d,x.height=S*g}else b=Math.max(c,(this.height()-l)/2),S=Math.max(Math.floor(this.width()-c*4-o-s),0),d=1,g=Math.max(this.height()-2*b,0),_=function(L,R){return Math.floor(o+2*c)+R},y=function(L,R){return b},p.xAlign="right",u.x=-c,f.xAlign="left",h.x=c,x.y=b,x.width=S*d,x.height=g;x.x=_(null,0),this._upperLabel.text(""),this._writer.write(a,this.width(),this.height(),p,this._upperLabel.node());var P="translate("+u.x+", "+u.y+")";this._upperLabel.attr("transform",P),this._lowerLabel.text(""),this._writer.write(i,this.width(),this.height(),f,this._lowerLabel.node());var k="translate("+h.x+", "+h.y+")";this._lowerLabel.attr("transform",k),this._swatchBoundingBox.attrs(x);var O=this._generateTicks(S),D=this._swatchContainer.selectAll("rect.swatch").data(O),B=D.enter().append("rect").classed("swatch",!0),I=D.merge(B);return D.exit().remove(),I.attrs({fill:function(L,R){return r._scale.scale(L)},width:d,height:g,x:_,y,"shape-rendering":"crispEdges"}),DBe.ADD_TITLE_ELEMENTS&&B.append("title").text(function(L){return r._formatter(L)}),this},t._DEFAULT_NUM_SWATCHES=11,t.LEGEND_LABEL_CLASS="legend-label",t}(FBe.Component);Fot.InterpolatedColorLegend=BBe});var Vot=H(h4=>{"use strict";Object.defineProperty(h4,"__esModule",{value:!0});var Bot=(de(),Ut(pe)),jF=yl(),HBe=kc(),Hot=function(e){Bot.__extends(t,e);function t(r,n){r===void 0&&(r=""),n===void 0&&(n=0);var i=e.call(this)||this;return i.addClass("label"),i.text(r),i.angle(n),i.xAlignment("center").yAlignment("center"),i._padding=0,i}return t.prototype.requestedSpace=function(r,n){var i=this._measurer.measure(this._text),o=(this.angle()===0?i.width:i.height)+2*this.padding(),a=(this.angle()===0?i.height:i.width)+2*this.padding();return{minWidth:o,minHeight:a}},t.prototype._setup=function(){e.prototype._setup.call(this),this._textContainer=this.content().append("g");var r=new jF.SvgContext(this._textContainer.node());this._measurer=new jF.CacheMeasurer(r),this._wrapper=new jF.Wrapper,this._writer=new jF.Writer(this._measurer,r,this._wrapper),this.text(this._text)},t.prototype.text=function(r){if(r==null)return this._text;if(typeof r!="string")throw new Error("Label.text() only takes strings as input");return this._text=r,this.redraw(),this},t.prototype.angle=function(r){if(r==null)return this._angle;if(r%=360,r>180?r-=360:r<-180&&(r+=360),r===-90||r===0||r===90)this._angle=r;else throw new Error(r+" is not a valid angle for Label");return this.redraw(),this},t.prototype.padding=function(r){if(r==null)return this._padding;if(r=+r,r<0)throw new Error(r+" is not a valid padding value. Cannot be less than 0.");return this._padding=r,this.redraw(),this},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.renderImmediately=function(){e.prototype.renderImmediately.call(this),this._textContainer.selectAll("g").remove();var r=this._measurer.measure(this._text),n=Math.max(Math.min((this.height()-r.height)/2,this.padding()),0),i=Math.max(Math.min((this.width()-r.width)/2,this.padding()),0);this._textContainer.attr("transform","translate("+i+","+n+")");var o=this.width()-2*i,a=this.height()-2*n,s={xAlign:this.xAlignment(),yAlign:this.yAlignment(),textRotation:this.angle()};return this._writer.write(this._text,o,a,s),this},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t}(HBe.Component);h4.Label=Hot;var VBe=function(e){Bot.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.addClass(t.TITLE_LABEL_CLASS),i}return t.TITLE_LABEL_CLASS="title-label",t}(Hot);h4.TitleLabel=VBe;var UBe=function(e){Bot.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.addClass(t.AXIS_LABEL_CLASS),i}return t.AXIS_LABEL_CLASS="axis-label",t}(Hot);h4.AxisLabel=UBe});var XF=H(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var Ns=(Er(),Ut(Mr));function qBe(){return function(e){return Ns.symbol().type(Ns.symbolCircle).size(Math.PI*Math.pow(e/2,2))}}wd.circle=qBe;function GBe(){return function(e){return Ns.symbol().type(Ns.symbolSquare).size(Math.pow(e,2))}}wd.square=GBe;function WBe(){return function(e){return Ns.symbol().type(Ns.symbolCross).size(5/9*Math.pow(e,2))}}wd.cross=WBe;function YBe(){return function(e){return Ns.symbol().type(Ns.symbolDiamond).size(Math.tan(Math.PI/6)*Math.pow(e,2)/2)}}wd.diamond=YBe;function jBe(){return function(e){return Ns.symbol().type(Ns.symbolTriangle).size(Math.sqrt(3)*Math.pow(e/2,2))}}wd.triangle=jBe;var XBe=.8908130915292852;function $Be(){return function(e){return Ns.symbol().type(Ns.symbolStar).size(XBe*Math.pow(e/2,2))}}wd.star=$Be;var KBe=(1/Math.sqrt(12)/2+1)*3;function ZBe(){return function(e){return Ns.symbol().type(Ns.symbolWye).size(KBe*Math.pow(e/2.4,2))}}wd.wye=ZBe});var N$t=H(qot=>{"use strict";Object.defineProperty(qot,"__esModule",{value:!0});var JBe=(de(),Ut(pe)),Fv=(Er(),Ut(Mr)),$F=yl(),QBe=$A(),tHe=Bu(),eHe=XF(),Qg=Fe(),rHe=kc(),Uot=function(){function e(t,r,n){t===void 0&&(t=[]),r===void 0&&(r=0),n===void 0&&(n=1/0),this.columns=t,this.bottomPadding=r,this.maxWidth=n}return e.prototype.addColumn=function(t){var r=t.width,n=this.getWidthAvailable();t.width=Math.min(n,r),this.columns.push(t)},e.prototype.getBounds=function(t){for(var r=this.columns[t],n=0,i=0;i<t;i++)n+=this.columns[i].width;return{topLeft:{x:n,y:0},bottomRight:{x:n+r.width,y:r.height}}},e.prototype.getHeight=function(){return Qg.Math.max(this.columns.map(function(t){var r=t.height;return r}),0)+this.bottomPadding},e.prototype.getWidth=function(){return Math.min(this.columns.reduce(function(t,r){var n=r.width;return t+n},0),this.maxWidth)},e.prototype.getWidthAvailable=function(){var t=this.getWidth();return Math.max(this.maxWidth-t,0)},e}(),nHe=function(){function e(t,r,n,i){t===void 0&&(t=1/0),r===void 0&&(r=1/0),n===void 0&&(n=0),i===void 0&&(i=[]),this.maxWidth=t,this.maxHeight=r,this.padding=n,this.rows=i}return e.prototype.addRow=function(t){t.maxWidth=this.maxWidth-this.padding*2,this.rows.push(t)},e.prototype.getColumnBounds=function(t,r){var n=this.getRowBounds(t),i=this.rows[t].getBounds(r);return i.topLeft.x+=n.topLeft.x,i.bottomRight.x+=n.topLeft.x,i.topLeft.y+=n.topLeft.y,i.bottomRight.y+=n.topLeft.y,i},e.prototype.getRowBounds=function(t){for(var r=this.padding,n=this.padding,i=0;i<t;i++)n+=this.rows[i].getHeight();var o={topLeft:{x:r,y:n},bottomRight:{x:r+this.rows[t].getWidth(),y:n+this.rows[t].getHeight()}};return o},e.prototype.getHeight=function(){return Math.min(this.rows.reduce(function(t,r){return t+r.getHeight()},0)+this.padding*2,this.maxHeight)},e.prototype.getWidth=function(){return Math.min(Qg.Math.max(this.rows.map(function(t){return t.getWidth()}),0)+this.padding*2,this.maxWidth)},e}(),iHe=function(e){JBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._padding=5,n._rowBottomPadding=3,n.addClass("legend"),n.maxEntriesPerRow(1),r==null)throw new Error("Legend requires a colorScale");return n._colorScale=r,n._redrawCallback=function(i){return n.redraw()},n._colorScale.onUpdate(n._redrawCallback),n._formatter=tHe.identity(),n.maxLinesPerEntry(1),n.xAlignment("right").yAlignment("top"),n.comparator(function(i,o){var a=n._colorScale.domain().slice().map(function(s){return n._formatter(s)});return a.indexOf(i)-a.indexOf(o)}),n._symbolFactoryAccessor=function(){return eHe.circle()},n._symbolOpacityAccessor=function(){return 1},n}return t.prototype._setup=function(){e.prototype._setup.call(this);var r=this.content().append("g").classed(t.LEGEND_ROW_CLASS,!0),n=r.append("g").classed(t.LEGEND_ENTRY_CLASS,!0);n.append("text");var i=new $F.SvgContext(r.node(),null,QBe.ADD_TITLE_ELEMENTS);this._measurer=new $F.CacheMeasurer(i),this._wrapper=new $F.Wrapper().maxLines(this.maxLinesPerEntry()),this._writer=new $F.Writer(this._measurer,i,this._wrapper)},t.prototype.formatter=function(r){return r==null?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.maxEntriesPerRow=function(r){return r==null?this._maxEntriesPerRow:(this._maxEntriesPerRow=r,this.redraw(),this)},t.prototype.maxLinesPerEntry=function(r){return r==null?this._maxLinesPerEntry:(this._maxLinesPerEntry=r,this.redraw(),this)},t.prototype.maxWidth=function(r){return r==null?this._maxWidth:(this._maxWidth=r,this.redraw(),this)},t.prototype.comparator=function(r){return r==null?this._comparator:(this._comparator=r,this.redraw(),this)},t.prototype.colorScale=function(r){return r!=null?(this._colorScale.offUpdate(this._redrawCallback),this._colorScale=r,this._colorScale.onUpdate(this._redrawCallback),this.redraw(),this):this._colorScale},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._colorScale.offUpdate(this._redrawCallback)},t.prototype._buildLegendTable=function(r,n){var i=this,o=this._measurer.measure().height,a=new nHe(r,n,this._padding),s=this._colorScale.domain().slice().sort(function(c,u){return i._comparator(i._formatter(c),i._formatter(u))}),l=new Uot;return a.addRow(l),l.bottomPadding=this._rowBottomPadding,s.forEach(function(c,u){l.columns.length/2===i.maxEntriesPerRow()&&(l=new Uot,l.bottomPadding=i._rowBottomPadding,a.addRow(l));var h=l.getWidthAvailable(),f=i._formatter(c),p=i._measurer.measure(f).width,d=h-o-p<0;d&&l.columns.length>1&&(l=new Uot,l.bottomPadding=i._rowBottomPadding,a.addRow(l));var g={width:o,height:o,data:{name:c,type:"symbol"}};l.addColumn(g),h=l.getWidthAvailable();var _=Math.min(h,p);i._wrapper.maxLines(i.maxLinesPerEntry());var y=i._wrapper.wrap(f,i._measurer,_).noLines,x=y*o,b={width:_,height:x,data:{name:c,type:"text"}};l.addColumn(b)}),a},t.prototype.requestedSpace=function(r,n){var i=this._buildLegendTable(Qg.Math.min([this.maxWidth(),r],r),n);return{minHeight:i.getHeight(),minWidth:i.getWidth()}},t.prototype.entitiesAt=function(r){var n=this;if(!this._isSetup)return[];var i=this._buildLegendTable(this.width(),this.height());return i.rows.reduce(function(o,a,s){if(o.length!==0)return o;var l=i.getRowBounds(s),c=Qg.Math.within(r,l);return c?a.columns.reduce(function(u,h,f){var p=i.getColumnBounds(s,f),d=Qg.Math.within(r,p);if(d){var g=n.content().selectAll("."+t.LEGEND_ROW_CLASS).nodes()[s],_=Fv.select(g).selectAll("."+t.LEGEND_ENTRY_CLASS).nodes()[Math.floor(f/2)],y=Fv.select(_).select("."+t.LEGEND_SYMBOL_CLASS),x=Qg.DOM.getTranslateValues(Fv.select(g)),b=Qg.DOM.getTranslateValues(y);return[{bounds:Qg.DOM.elementBBox(Fv.select(g)),datum:h.data.name,position:{x:x[0]+b[0],y:x[1]+b[1]},selection:Fv.select(_),component:n}]}return u},o):o},[])},t.prototype.renderImmediately=function(){e.prototype.renderImmediately.call(this);var r=this._buildLegendTable(this.width(),this.height());this.content().selectAll("*").remove();var n=this.content().selectAll("g."+t.LEGEND_ROW_CLASS).data(r.rows),i=n.enter().append("g").classed(t.LEGEND_ROW_CLASS,!0).merge(n);n.exit().remove(),i.attr("transform",function(a,s){var l=r.getRowBounds(s);return"translate("+l.topLeft.x+", "+l.topLeft.y+")"});var o=this;return i.each(function(a,s){for(var l=[],c=0;c<a.columns.length;c+=2)l.push([a.columns[c],a.columns[c+1]]);var u=Fv.select(this).selectAll("g."+t.LEGEND_ENTRY_CLASS).data(l),h=u.enter().append("g").classed(t.LEGEND_ENTRY_CLASS,!0).merge(u);h.append("path").attr("d",function(f,p){var d=f[0];return o.symbol()(d.data.name,s)(d.height*.6)(null)}).attr("transform",function(f,p){var d=f[0],g=r.rows[s].columns.indexOf(d),_=r.getColumnBounds(s,g);return"translate("+(_.topLeft.x+d.width/2)+", "+d.height/2+")"}).attr("fill",function(f){return o._colorScale.scale(f[0].data.name)}).attr("opacity",function(f,p){return o.symbolOpacity()(f[0].data.name,s)}).classed(t.LEGEND_SYMBOL_CLASS,!0),h.append("g").classed("text-container",!0).attr("transform",function(f,p){var d=f[1],g=r.rows[s].columns.indexOf(d),_=r.getColumnBounds(s,g);return"translate("+_.topLeft.x+", 0)"}).each(function(f,p,d){var g=Fv.select(this),_=f[1],y={xAlign:"left",yAlign:"top",textRotation:0};o._writer.write(o._formatter(_.data.name),_.width,o.height(),y,g.node())}),u.exit().remove()}),this},t.prototype.symbol=function(r){return r==null?this._symbolFactoryAccessor:(this._symbolFactoryAccessor=r,this.render(),this)},t.prototype.symbolOpacity=function(r){return r==null?this._symbolOpacityAccessor:(typeof r=="number"?this._symbolOpacityAccessor=function(){return r}:this._symbolOpacityAccessor=r,this.render(),this)},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t.LEGEND_ROW_CLASS="legend-row",t.LEGEND_ENTRY_CLASS="legend-entry",t.LEGEND_SYMBOL_CLASS="legend-symbol",t}(rHe.Component);qot.Legend=iHe});var Got=H(KF=>{"use strict";Object.defineProperty(KF,"__esModule",{value:!0});var oHe;(function(e){e.MAIN="main",e.RESET="reset"})(oHe=KF.Animator||(KF.Animator={}))});var O$t=H((eGn,D$t)=>{"use strict";D$t.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var B$t=H((rGn,F$t)=>{"use strict";var aHe=O$t();function z$t(e){return aHe(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}F$t.exports=function(t){var r,n;return!(z$t(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,z$t(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)}});var Yot=H(Wot=>{"use strict";Object.defineProperty(Wot,"__esModule",{value:!0});var sHe=Fe(),H$t=0,lHe=function(){function e(t,r){t===void 0&&(t=[]),r===void 0&&(r={}),this._updateId=H$t++,this._data=t,this._metadata=r,this._callbacks=new sHe.CallbackSet}return e.prototype.onUpdate=function(t){return this._callbacks.add(t),this},e.prototype.offUpdate=function(t){return this._callbacks.delete(t),this},e.prototype.data=function(t){return t==null?this._data:(this._data=t,this._dispatchUpdate(),this)},e.prototype.metadata=function(t){return t==null?this._metadata:(this._metadata=t,this._dispatchUpdate(),this)},e.prototype.updateId=function(){return this._updateId},e.prototype._dispatchUpdate=function(){this._updateId=H$t++,this._callbacks.callCallbacks(this)},e}();Wot.Dataset=lHe});var $ot=H(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var jot=(de(),Ut(pe)),cHe=B$t(),uHe=Yot(),hHe=kv();function Xot(e){return e instanceof p4?e:e instanceof Date?f4(e.valueOf()):e instanceof hHe.Scale?V$t(e):e instanceof uHe.Dataset?U$t(e):cHe(e)?ZF(e):Array.isArray(e)?q$t(e):f4(e)}Rc.sign=Xot;function V$t(e){var t={domain:e.domain(),range:e.range(),updateId:e.updateId(),ref:f4(e)};return ZF(t)}Rc.signScale=V$t;function U$t(e){var t={ref:f4(e),updateId:e.updateId()};return ZF(t)}Rc.signDataset=U$t;function f4(e){return new W$t(e)}Rc.signRef=f4;function q$t(e){return new G$t(e.map(function(t){return Xot(t)}))}Rc.signArray=q$t;function ZF(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=Xot(e[r]));return new Y$t(t)}Rc.signObj=ZF;var p4=function(){function e(){}return e.prototype.isDifferent=function(t){return t instanceof this.constructor?this.isSignatureDifferent(t):!0},e}();Rc.Signature=p4;var G$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.array=r,n}return t.prototype.isSignatureDifferent=function(r){if(r.array.length!==this.array.length)return!0;for(var n=0;n<this.array.length;n++)if(this.array[n].isDifferent(r.array[n]))return!0;return!1},t}(p4);Rc.ArraySignature=G$t;var W$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.ref=r,n}return t.prototype.isSignatureDifferent=function(r){return this.ref!==r.ref},t}(p4);Rc.ReferenceSignature=W$t;var Y$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.obj=r,n}return t.prototype.isSignatureDifferent=function(r){var n=Object.keys(this.obj),i=Object.keys(r.obj);if(n.length!==i.length)return!0;for(var o=0,a=n;o<a.length;o++){var s=a[o];if(!r.obj.hasOwnProperty(s)||this.obj[s].isDifferent(r.obj[s]))return!0}return!1},t}(p4);Rc.ObjectSignature=Y$t});var j$t=H(Kot=>{"use strict";Object.defineProperty(Kot,"__esModule",{value:!0});var fHe=$ot();function pHe(e){var t=void 0,r,n=!1,i=!1,o=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(n)return r;var l=fHe.signArray(a);return t===void 0||t.isDifferent(l)?(i&&console.warn("cache miss! computing"),t=l,r=e.apply(this,a)):i&&console.warn("cache hit!"),r};return o.doLocked=function(a){if(n)throw new Error("Locking an already locked memoize function!");n=!0;var s=a.apply(this);return n=!1,s},o.logPerformance=function(a){return a===void 0&&(a=!0),i=a,this},o}Kot.memoize=pHe});var K$t=H(JF=>{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var dHe=Oe(),Zot=function(){function e(){this.map=Object.create(null),this.exists=Object.create(null)}return e.prototype.delete=function(t){return delete this.map[t],delete this.exists[t],!0},e.prototype.get=function(t){return this.map[t]},e.prototype.has=function(t){return!!this.exists[t]},e.prototype.set=function(t,r){return this.map[t]=r,this.exists[t]=!0,this},e}(),X$t=function(){function e(){this.map=new Zot}return e.prototype.get=function(t){return this.map.get(t[0]).get(t[1])},e.prototype.has=function(t){return this.map.has(t[0])&&this.map.get(t[0]).has(t[1])},e.prototype.set=function(t,r){return this.map.has(t[0])||this.map.set(t[0],new Zot),this.map.get(t[0]).set(t[1],r),this},e.prototype.delete=function(t){return this.map.has(t[0])&&this.map.get(t[0]).delete(t[1]),!0},e.prototype.clear=function(){this.map=new Zot},e.resolver=function(t,r,n){return[n.updateId(),r]},e}();function $$t(e){var t=dHe.memoize(e,X$t.resolver);return t.cache=new X$t,t}JF.memoizeProjector=$$t;function mHe(e){return Object.keys(e).forEach(function(t){e[t]=$$t(e[t])}),e}JF.memoizeProjectors=mHe});var Z$t=H(Jot=>{"use strict";Object.defineProperty(Jot,"__esModule",{value:!0});var gHe=CS();function _He(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.slice(0,-1),n=e[e.length-1],i=gHe.memoize(n),o=function(){var a=this,s=r.map(function(l){return l.apply(a)});return i.apply(void 0,s)};return o}Jot.memThunk=_He});var CS=H(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});var Qot=(de(),Ut(pe));Qot.__exportStar(j$t(),AS);Qot.__exportStar(K$t(),AS);Qot.__exportStar(Z$t(),AS);var yHe=$ot();AS.sign=yHe.sign});var Bv=H(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var J$t=(Er(),Ut(Mr)),vHe=function(){function e(t,r){this._context=t,this._drawStep=r}return e.prototype.getDrawStep=function(){return this._drawStep},e.prototype.draw=function(t,r){var n=r[r.length-1].attrToAppliedProjector;this._context.save(),this._drawStep(this._context,t,n),this._context.restore()},e.prototype.getVisualPrimitives=function(){return[]},e.prototype.getVisualPrimitiveAtIndex=function(t){return null},e.prototype.remove=function(){},e}();Nc.CanvasDrawer=vHe;Nc.ContextStyleAttrs=["fill-opacity","fill","opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function xHe(e,t,r,n){var i=Nc.ContextStyleAttrs.concat(t);return Q$t(e,i,r,n)}Nc.resolveAttributesSubsetWithStyles=xHe;function Q$t(e,t,r,n){for(var i={},o=0,a=t;o<a.length;o++){var s=a[o];e.hasOwnProperty(s)&&(i[s]=e[s](r,n))}return i}Nc.resolveAttributes=Q$t;function bHe(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["stroke-opacity"]!=null?parseFloat(e["stroke-opacity"]):1;return r*t}function wHe(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["fill-opacity"]!=null?parseFloat(e["fill-opacity"]):1;return r*t}function tKt(e){return e["stroke-width"]!=null?parseFloat(e["stroke-width"]):1}Nc.getStrokeWidth=tKt;function eKt(e){var t=e["stroke-dasharray"];if(t!=null)try{return t.split(/[ ,]+/).map(function(r){return parseInt(r,10)})}catch(r){return console.error("getStrokeDashArray failed with: "+r),[]}return[]}Nc.getStrokeDashArray=eKt;function SHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",tat(e,n),e.restore()}Nc.renderArea=SHe;function MHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",tat(e,n),e.restore()}Nc.renderLine=MHe;function tat(e,t){if(t.stroke){e.lineWidth=tKt(t);var r=J$t.color(t.stroke),n=eKt(t);e.setLineDash(n),r.opacity*=bHe(t),e.strokeStyle=r.toString(),e.stroke()}if(t.fill){var i=J$t.color(t.fill);i.opacity*=wHe(t),e.fillStyle=i.toString(),e.fill()}}Nc.renderPathWithStyle=tat});var Uu=H(eat=>{"use strict";Object.defineProperty(eat,"__esModule",{value:!0});var EHe=function(){function e(t,r){this._svgDrawerFactory=t,this._canvasDrawerFactory=r}return e.prototype.useSVG=function(t){this._currentDrawer!=null&&this._currentDrawer.remove();var r=this._svgDrawerFactory();r.attachTo(t),this._currentDrawer=r},e.prototype.useCanvas=function(t){this._currentDrawer!=null&&this._currentDrawer.remove(),this._currentDrawer=this._canvasDrawerFactory(t.node().getContext("2d"))},e.prototype.getDrawer=function(){return this._currentDrawer},e.prototype.remove=function(){this._currentDrawer!=null&&this._currentDrawer.remove()},e.prototype.draw=function(t,r){this._currentDrawer.draw(t,r)},e.prototype.getVisualPrimitives=function(){return this._currentDrawer.getVisualPrimitives()},e.prototype.getVisualPrimitiveAtIndex=function(t){return this._currentDrawer.getVisualPrimitiveAtIndex(t)},e}();eat.ProxyDrawer=EHe});var Of=H(rat=>{"use strict";Object.defineProperty(rat,"__esModule",{value:!0});var THe=(Er(),Ut(Mr)),rKt=Fe(),CHe=function(){function e(t,r){this._root=THe.select(document.createElementNS("http://www.w3.org/2000/svg","g")),this._className=r,this._svgElementName=t}return e.prototype.draw=function(t,r){var n=this;this._createAndDestroyDOMElements(t);for(var i=0,o=r.length,a=function(l){var c=r[l];rKt.Window.setTimeout(function(){return n._drawStep(c)},i),i+=c.animator.totalTime(t.length)},s=0;s<o;s++)a(s)},e.prototype.getVisualPrimitives=function(){return this._cachedVisualPrimitivesNodes==null&&(this._cachedVisualPrimitivesNodes=this._selection.nodes()),this._cachedVisualPrimitivesNodes},e.prototype.getVisualPrimitiveAtIndex=function(t){return this._cachedVisualPrimitivesNodeMap==null?null:this._cachedVisualPrimitivesNodeMap.get(t)},e.prototype.remove=function(){this._root.remove()},e.prototype.attachTo=function(t){t.node().appendChild(this._root.node())},e.prototype.getRoot=function(){return this._root},e.prototype.selector=function(){return this._svgElementName},e.prototype._applyDefaultAttributes=function(t){},e.prototype._createAndDestroyDOMElements=function(t){var r=t.map(function(a,s){return a!=null?{d:a,i:s}:null}),n=r.filter(function(a){return a!=null}),i=this._root.selectAll(this.selector()).data(n);this._selection=i.enter().append(this._svgElementName).merge(i),i.exit().remove();var o=new rKt.Map;this._selection.each(function(a){o.set(a.i,this)}),this._cachedVisualPrimitivesNodeMap=o,this._cachedVisualPrimitivesNodes=null,this._selection.data(this._selection.data().map(function(a){var s=a.d;return s})),this._className!=null&&this._selection.classed(this._className,!0),this._applyDefaultAttributes(this._selection)},e.prototype._drawStep=function(t){var r=this,n=["fill","stroke"];n.forEach(function(i){t.attrToAppliedProjector[i]!=null&&r._selection.attr(i,t.attrToAppliedProjector[i])}),t.animator.animate(this._selection,t.attrToAppliedProjector),this._className!=null&&this._selection.classed(this._className,!0)},e}();rat.SVGDrawer=CHe});var iat=H(nat=>{"use strict";Object.defineProperty(nat,"__esModule",{value:!0});var nKt=function(){function e(){var t=this;this.scale=0,this.translate=0,this.cachedDomain=[null,null],this.lastSeenDomain=[null,null],this.updateDomain=function(r){t.lastSeenDomain=r.getTransformationDomain();var n=r.scaleTransformation(t.cachedDomain[1])-r.scaleTransformation(t.cachedDomain[0]),i=r.scaleTransformation(t.lastSeenDomain[1])-r.scaleTransformation(t.lastSeenDomain[0]);t.scale=n/i||1,t.translate=r.scaleTransformation(t.cachedDomain[0])-r.scaleTransformation(t.lastSeenDomain[0])*t.scale||0}}return e.prototype.reset=function(){this.scale=1,this.translate=0,this.cachedDomain=this.lastSeenDomain},e.prototype.setDomain=function(t){this.cachedDomain=t.getTransformationDomain()},e}(),AHe=function(){function e(t,r){var n=this;this.renderCallback=t,this.applyTransformCallback=r,this.domainTransformX=new nKt,this.domainTransformY=new nKt,this.renderDeferred=function(){n.applyTransform(),clearTimeout(n.timeoutToken),n.timeoutToken=setTimeout(function(){n.renderCallback()},e.DEFERRED_RENDERING_DELAY)}}return e.prototype.setDomains=function(t,r){t&&this.domainTransformX.setDomain(t),r&&this.domainTransformY.setDomain(r),this.renderDeferred()},e.prototype.updateDomains=function(t,r){t&&this.domainTransformX.updateDomain(t),r&&this.domainTransformY.updateDomain(r),this.renderDeferred()},e.prototype.resetTransforms=function(){this.domainTransformX.reset(),this.domainTransformY.reset(),this.applyTransform()},e.prototype.applyTransform=function(){this.applyTransformCallback(this.domainTransformX.translate,this.domainTransformY.translate,this.domainTransformX.scale,this.domainTransformY.scale)},e.DEFERRED_RENDERING_DELAY=200,e}();nat.DeferredRenderer=AHe});var ns=H(QF=>{"use strict";Object.defineProperty(QF,"__esModule",{value:!0});var PHe=(de(),Ut(pe)),Sd=(Er(),Ut(Mr)),d4=kf(),Md=Fe(),iKt=Got(),oat=CS(),IHe=kc(),LHe=Bv(),kHe=Uu(),RHe=Of(),NHe=jg(),DHe=Lf(),OHe=iat();QF.Renderer=DHe.makeEnum(["svg","canvas"]);var zHe=function(e){PHe.__extends(t,e);function t(){var r=e.call(this)||this;r._dataChanged=!1,r._attrExtents={},r._animate=!1,r._animators={},r._propertyExtents={},r._resetEntityStore=function(){r._cachedEntityStore=void 0},r._overflowHidden=!0,r.addClass("plot"),r._datasetToDrawer=new Md.Map,r._attrBindings=Sd.map(),r._includedValuesProvider=function(i,o){return r._includedValuesForScale(i,o)},r._renderCallback=function(){return r.render()},r._onDatasetUpdateCallback=function(){return r._onDatasetUpdate()},r._propertyBindings=Sd.map();var n=new d4.Easing().maxTotalDuration(t._ANIMATION_MAX_DURATION);return r.animator(iKt.Animator.MAIN,n),r.animator(iKt.Animator.RESET,new d4.Null),r._deferredResetEntityStore=Md.Window.debounce(OHe.DeferredRenderer.DEFERRED_RENDERING_DELAY,r._resetEntityStore),r}return t.getTotalDrawTime=function(r,n){return n.reduce(function(i,o){return i+o.animator.totalTime(r.length)},0)},t.applyDrawSteps=function(r,n){var i=r.map(function(o){var a=o.attrToProjector,s={};return Object.keys(a).forEach(function(l){s[l]=function(c,u){return a[l](c,u,n)}}),{attrToAppliedProjector:s,animator:o.animator}});return i},t.prototype.anchor=function(r){return r=NHe.coerceExternalD3(r),e.prototype.anchor.call(this,r),this._dataChanged=!0,this._resetEntityStore(),this._updateExtents(),this},t.prototype._setup=function(){var r=this;this._isSetup||(e.prototype._setup.call(this),this._canvas!=null&&this._appendCanvasNode(),this._renderArea=this.content().append("g").classed("render-area",!0),this.datasets().forEach(function(n){return r._createNodesForDataset(n)}))},t.prototype._appendCanvasNode=function(){var r=this.element().select(".plot-canvas-container");r.empty()&&(r=this.element().append("div").classed("plot-canvas-container",!0),r.node().appendChild(this._canvas.node()))},t.prototype.setBounds=function(r,n,i,o){if(e.prototype.setBounds.call(this,r,n,i,o),this._updateExtents(),this._canvas!=null){if(this._bufferCanvas&&!this._bufferCanvasValid){this._bufferCanvas.attr("width",this._canvas.attr("width")),this._bufferCanvas.attr("height",this._canvas.attr("height"));var a=this._bufferCanvas.node().getContext("2d");if(a){var s=this._canvas.node();s.width>0&&s.height>0?a.canvas.width>0&&a.canvas.height>0&&a.drawImage(s,0,0):console.warn("Failed to fill buffer canvas with with 0x0 canvas")}this._bufferCanvasValid=!0}var l=window.devicePixelRatio!=null?window.devicePixelRatio:1;this._canvas.attr("width",r*l),this._canvas.attr("height",n*l);var c=this._canvas.node().getContext("2d");if(c&&(c.setTransform(l,0,0,l,0,0),this._bufferCanvas)){var u=this._bufferCanvas.node();u.width>0&&u.height>0?c.canvas.width>0&&c.canvas.height>0&&c.drawImage(u,0,0,r,n):console.warn("Failed to fill canvas with 0x0 buffer canvas")}}return this},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._scales().forEach(function(n){return n.offUpdate(r._renderCallback)}),this.datasets([])},t.prototype._createNodesForDataset=function(r){var n=this._datasetToDrawer.get(r);return this.renderer()==="svg"?n.useSVG(this._renderArea):n.useCanvas(this._canvas),n},t.prototype._createDrawer=function(r){return new kHe.ProxyDrawer(function(){return new RHe.SVGDrawer("path","")},function(n){return new LHe.CanvasDrawer(n,function(){})})},t.prototype._getAnimator=function(r){return this._animateOnNextRender()?this._animators[r]||new d4.Null:new d4.Null},t.prototype._onDatasetUpdate=function(){this._updateExtents(),this._dataChanged=!0,this._resetEntityStore(),this.renderLowPriority()},t.prototype.attr=function(r,n,i){return n==null?this._attrBindings.get(r):(this._bindAttr(r,n,i),this.render(),this)},t.prototype._bindProperty=function(r,n,i,o){var a=this._propertyBindings.get(r),s=a!=null?a.scale:null,l=typeof n=="function"?n:function(){return n};this._propertyBindings.set(r,{accessor:l,scale:i,postScale:o}),s!=null&&this._uninstallScaleForKey(s,r),i!=null&&this._installScaleForKey(i,r),this._clearAttrToProjectorCache()},t.prototype._bindAttr=function(r,n,i){var o=this._attrBindings.get(r),a=o!=null?o.scale:null,s=typeof n=="function"?n:function(){return n};this._attrBindings.set(r,{accessor:s,scale:i}),a!=null&&this._uninstallScaleForKey(a,r),i!=null&&this._installScaleForKey(i,r),this._clearAttrToProjectorCache()},t.prototype._clearAttrToProjectorCache=function(){delete this._cachedAttrToProjector},t.prototype._getAttrToProjector=function(){if(this._cachedAttrToProjector==null){var r=this._generateAttrToProjector();t.OPTIMIZE_MEMOIZE_PROJECTORS&&(r=oat.memoizeProjectors(r)),this._cachedAttrToProjector=r}return Md.assign({},this._cachedAttrToProjector)},t.prototype._generateAttrToProjector=function(){var r={};this._attrBindings.each(function(i,o){r[o]=t._scaledAccessor(i)});var n=this._propertyProjectors();return Object.keys(n).forEach(function(i){r[i]==null&&(r[i]=n[i])}),r},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._isAnchored&&(this._paint(),this._dataChanged=!1),this},t.prototype.renderLowPriority=function(){return this._renderCallback(),this},t.prototype.animated=function(r){return r==null?this._animate:(this._animate=r,this)},t.prototype.detach=function(){return e.prototype.detach.call(this),this._updateExtents(),this},t.prototype._scales=function(){var r=[];return this._attrBindings.each(function(n,i){var o=n.scale;o!=null&&r.indexOf(o)===-1&&r.push(o)}),this._propertyBindings.each(function(n,i){var o=n.scale;o!=null&&r.indexOf(o)===-1&&r.push(o)}),r},t.prototype._updateExtents=function(){var r=this;this._resetEntityStore(),this._scales().forEach(function(n){return n.addIncludedValuesProvider(r._includedValuesProvider)})},t.prototype._filterForProperty=function(r){return null},t.prototype.getExtentsForAttr=function(r){var n=this;if(this._attrExtents[r]==null){var i=oat.memThunk(function(){return n.datasets()},function(){return n._attrBindings.get(r)},function(o,a){return a==null||a.accessor==null?null:o.map(function(s){return oKt(s,a,null)})});this._attrExtents[r]=i}return this._attrExtents[r]()},t.prototype.getExtentsForProperty=function(r){var n=this;if(this._propertyExtents[r]==null){var i=oat.memThunk(function(){return n.datasets()},function(){return n._propertyBindings.get(r)},function(){return n._filterForProperty(r)},function(o,a,s){return a==null||a.accessor==null?null:o.map(function(l){return oKt(l,a,s)})});this._propertyExtents[r]=i}return this._propertyExtents[r]()},t.prototype._includedValuesForScale=function(r,n){var i=this;if(!this._isAnchored&&!n)return[];var o=[];return this._attrBindings.each(function(a,s){if(a.scale===r){var l=i.getExtentsForAttr(s);l!=null&&(o=o.concat(Sd.merge(l)))}}),this._propertyBindings.each(function(a,s){if(a.scale===r){var l=i.getExtentsForProperty(s);l!=null&&(o=o.concat(Sd.merge(l)))}}),o},t.prototype.animator=function(r,n){return n===void 0?this._animators[r]:(this._animators[r]=n,this)},t.prototype.renderer=function(r){var n=this;return r===void 0?this._canvas==null?"svg":"canvas":(this._canvas==null&&r==="canvas"?(this._canvas=Sd.select(document.createElement("canvas")).classed("plot-canvas",!0),this._bufferCanvas=Sd.select(document.createElement("canvas")),this.element()!=null&&this._appendCanvasNode(),this._datasetToDrawer.forEach(function(i){i.useCanvas(n._canvas)}),this.render()):this._canvas!=null&&r=="svg"&&(this._canvas.remove(),this._canvas=null,this._bufferCanvas=null,this._datasetToDrawer.forEach(function(i){i.useSVG(n._renderArea)}),this.render()),this)},t.prototype.addDataset=function(r){return this._addDataset(r),this._onDatasetUpdate(),this},t.prototype._addDataset=function(r){this._removeDataset(r);var n=this._createDrawer(r);return this._datasetToDrawer.set(r,n),this._isSetup&&this._createNodesForDataset(r),r.onUpdate(this._onDatasetUpdateCallback),this},t.prototype.removeDataset=function(r){return this._removeDataset(r),this._onDatasetUpdate(),this},t.prototype._removeDataset=function(r){return this.datasets().indexOf(r)===-1?this:(this._removeDatasetNodes(r),r.offUpdate(this._onDatasetUpdateCallback),this._datasetToDrawer.delete(r),this)},t.prototype._removeDatasetNodes=function(r){var n=this._datasetToDrawer.get(r);n.remove()},t.prototype.datasets=function(r){var n=this,i=[];return this._datasetToDrawer.forEach(function(o,a){return i.push(a)}),r==null?i:(i.forEach(function(o){return n._removeDataset(o)}),r.forEach(function(o){return n._addDataset(o)}),this._onDatasetUpdate(),this)},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:new d4.Null}]},t.prototype._additionalPaint=function(r){},t.prototype._buildLightweightPlotEntities=function(r){var n=this,i=[];return r.forEach(function(o,a){for(var s=n._datasetToDrawer.get(o),l=0,c=o.data(),u=c.length,h=function(p){var d=c[p],g=n._pixelPoint(d,p,o);if(Md.Math.isNaN(g.x)||Md.Math.isNaN(g.y))return"continue";var _=n;i.push({datum:d,get position(){return _._pixelPoint.call(_,d,p,o)},index:p,dataset:o,datasetIndex:a,component:n,drawer:s,validDatumIndex:l}),l++},f=0;f<u;f++)h(f)}),i},t.prototype._getDataToDraw=function(){var r=new Md.Map;return this.datasets().forEach(function(n){return r.set(n,n.data())}),r},t.prototype._paint=function(){var r=this;delete this._cachedAttrToProjector;var n=this._generateDrawSteps(),i=this._getDataToDraw(),o=this.datasets().map(function(u){return r._datasetToDrawer.get(u)});if(this.renderer()==="canvas"){var a=this._canvas.node(),s=a.getContext("2d");s.clearRect(0,0,a.clientWidth,a.clientHeight),this._bufferCanvasValid=!1}this.datasets().forEach(function(u,h){var f=t.applyDrawSteps(n,u);o[h].draw(i.get(u),f)});var l=this.datasets().map(function(u,h){return t.getTotalDrawTime(i.get(u),n)}),c=Md.Math.max(l,0);this._additionalPaint(c)},t.prototype.selections=function(r){var n=this;if(r===void 0&&(r=this.datasets()),this.renderer()==="canvas")return Sd.selectAll();var i=[];return r.forEach(function(o){var a=n._datasetToDrawer.get(o);if(a!=null){var s=a.getVisualPrimitives();i.push.apply(i,s)}}),Sd.selectAll(i)},t.prototype.entities=function(r){var n=this;return this._getEntityStore(r).entities().map(function(i){return n._lightweightPlotEntityToPlotEntity(i)})},t.prototype.filterEntities=function(r){var n=this;return this._getEntityStore().entities().filter(r).map(function(i){return n._lightweightPlotEntityToPlotEntity(i)})},t.prototype._getEntityStore=function(r){var n=this,i=function(a){return n._entityBounds(a)};if(r!==void 0){var o=new Md.EntityStore;return o.addAll(this._buildLightweightPlotEntities(r),i,this._localOriginBounds()),o}else if(this._cachedEntityStore===void 0){var o=new Md.EntityStore;o.addAll(this._buildLightweightPlotEntities(this.datasets()),i,this._localOriginBounds()),this._cachedEntityStore=o}return this._cachedEntityStore},t.prototype._localOriginBounds=function(){return{topLeft:{x:0,y:0},bottomRight:{x:this.width(),y:this.height()}}},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset,a=this._pixelPoint(n,i,o),s=a.x,l=a.y;return{x:s,y:l,width:0,height:0}},t.prototype._lightweightPlotEntityToPlotEntity=function(r){var n={bounds:this._entityBounds(r),component:r.component,dataset:r.dataset,datasetIndex:r.datasetIndex,datum:r.datum,index:r.index,position:r.position,selection:Sd.select(r.drawer.getVisualPrimitiveAtIndex(r.validDatumIndex))};return n},t.prototype.entitiesAt=function(r){throw new Error("plots must implement entitiesAt")},t.prototype.entityNearest=function(r){var n=this._getEntityStore().entityNearest(r);return n===void 0?void 0:this._lightweightPlotEntityToPlotEntity(n)},t.prototype.entitiesIn=function(r,n){var i;if(n==null){var o=r;i={x:o.topLeft.x,y:o.topLeft.y,width:o.bottomRight.x-o.topLeft.x,height:o.bottomRight.y-o.topLeft.y}}else{var a=r;i={x:a.min,y:n.min,width:a.max-a.min,height:n.max-n.min}}return this.entitiesInBounds(i)},t.prototype.entitiesInBounds=function(r){var n=this,i=this._getEntityStore().entitiesInBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype.entitiesInXBounds=function(r){var n=this,i=this._getEntityStore().entitiesInXBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype.entitiesInYBounds=function(r){var n=this,i=this._getEntityStore().entitiesInYBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype._uninstallScaleForKey=function(r,n){r.offUpdate(this._renderCallback),r.offUpdate(this._deferredResetEntityStore),r.removeIncludedValuesProvider(this._includedValuesProvider)},t.prototype._installScaleForKey=function(r,n){r.onUpdate(this._renderCallback),r.onUpdate(this._deferredResetEntityStore),r.addIncludedValuesProvider(this._includedValuesProvider)},t.prototype._propertyProjectors=function(){return{}},t._scaledAccessor=function(r){var n=r.scale,i=r.accessor,o=r.postScale,a=n==null?i:function(l,c,u){return n.scale(i(l,c,u))},s=o==null?a:function(l,c,u){return o(a(l,c,u),l,c,u)};return s},t.prototype._pixelPoint=function(r,n,i){return{x:0,y:0}},t.prototype._animateOnNextRender=function(){return this._animate&&this._dataChanged},t.OPTIMIZE_MEMOIZE_PROJECTORS=!1,t._ANIMATION_MAX_DURATION=600,t}(IHe.Component);QF.Plot=zHe;function oKt(e,t,r){var n=t.accessor,i=t.scale;if(i==null)return[];var o=e.data();r!=null&&(o=o.filter(function(l,c){return r(l,c,e)}));var a=function(l,c){return n(l,c,e)},s=o.map(a);return i.extentOfValues(s)}});var aKt=H(aat=>{"use strict";Object.defineProperty(aat,"__esModule",{value:!0});var FHe=(de(),Ut(pe)),BHe=ns(),HHe=Fe(),VHe=zot(),UHe=function(e){FHe.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.entityNearest=function(r){var n,i=1/0;return this.components().forEach(function(o){var a=o,s=a.entityNearest(r);if(s!=null){var l=HHe.Math.distanceSquared(s.position,r);l<=i&&(i=l,n=s)}}),n},t.prototype.append=function(r){if(r!=null&&!(r instanceof BHe.Plot))throw new Error("Plot Group only accepts plots");return e.prototype.append.call(this,r),this},t}(VHe.Group);aat.PlotGroup=UHe});var sKt=H(sat=>{"use strict";Object.defineProperty(sat,"__esModule",{value:!0});var qHe=(de(),Ut(pe)),qu=(Er(),Ut(Mr)),Go=Fe(),GHe=WF(),WHe=function(e){qHe.__extends(t,e);function t(r){r===void 0&&(r=[]);var n=e.call(this)||this;return n._rowPadding=0,n._columnPadding=0,n._rows=[],n._rowWeights=[],n._columnWeights=[],n._nRows=0,n._nCols=0,n._calculatedLayout=null,n.addClass("table"),r.forEach(function(i,o){i.forEach(function(a,s){a!=null&&n.add(a,o,s)})}),n}return t.prototype._forEach=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)this._rows[n][i]!=null&&r(this._rows[n][i])},t.prototype.has=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)if(this._rows[n][i]===r)return!0;return!1},t.prototype.componentAt=function(r,n){return r<0||r>=this._nRows||n<0||n>=this._nCols?null:this._rows[r][n]},t.prototype.add=function(r,n,i){if(r==null)throw Error("Cannot add null to a table cell");if(!this.has(r)){var o=this._rows[n]&&this._rows[n][i];if(o!=null)throw new Error("cell is occupied");r.detach(),this._nRows=Math.max(n+1,this._nRows),this._nCols=Math.max(i+1,this._nCols),this._padTableToSize(this._nRows,this._nCols),this._rows[n][i]=r,this._adoptAndAnchor(r),this.redraw()}return this},t.prototype._remove=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)if(this._rows[n][i]===r)return this._rows[n][i]=null,!0;return!1},t.prototype._iterateLayout=function(r,n,i){i===void 0&&(i=!1);for(var o=this._rows,a=qu.transpose(this._rows),s=r-this._columnPadding*(this._nCols-1),l=n-this._rowPadding*(this._nRows-1),c=t._calcComponentWeights(this._rowWeights,o,function(z){return z==null||z.fixedHeight()}),u=t._calcComponentWeights(this._columnWeights,a,function(z){return z==null||z.fixedWidth()}),h=u.map(function(z){return z===0?.5:z}),f=c.map(function(z){return z===0?.5:z}),p=t._calcProportionalSpace(h,s),d=t._calcProportionalSpace(f,l),g=Go.Array.createFilledArray(0,this._nCols),_=Go.Array.createFilledArray(0,this._nRows),y,x,b=0,S,C,P;;){var k=Go.Array.add(_,d),O=Go.Array.add(g,p);S=this._determineGuarantees(O,k,i),g=S.guaranteedWidths,_=S.guaranteedHeights,C=S.wantsWidthArr.some(function(z){return z}),P=S.wantsHeightArr.some(function(z){return z});var D=y,B=x;y=s-qu.sum(S.guaranteedWidths),x=l-qu.sum(S.guaranteedHeights);var I=void 0;C?(I=S.wantsWidthArr.map(function(z){return z?.1:0}),I=Go.Array.add(I,u)):I=u;var L=void 0;P?(L=S.wantsHeightArr.map(function(z){return z?.1:0}),L=Go.Array.add(L,c)):L=c,p=t._calcProportionalSpace(I,y),d=t._calcProportionalSpace(L,x),b++;var R=y>0&&y!==D,F=x>0&&x!==B;if(!(R||F)||b>5)break}return y=s-qu.sum(S.guaranteedWidths),x=l-qu.sum(S.guaranteedHeights),p=t._calcProportionalSpace(u,y),d=t._calcProportionalSpace(c,x),{colProportionalSpace:p,rowProportionalSpace:d,guaranteedWidths:S.guaranteedWidths,guaranteedHeights:S.guaranteedHeights,wantsWidth:C,wantsHeight:P}},t.prototype._determineGuarantees=function(r,n,i){i===void 0&&(i=!1);var o=Go.Array.createFilledArray(0,this._nCols),a=Go.Array.createFilledArray(0,this._nRows),s=Go.Array.createFilledArray(!1,this._nCols),l=Go.Array.createFilledArray(!1,this._nRows);return this._rows.forEach(function(c,u){c.forEach(function(h,f){var p;h!=null?p=h.requestedSpace(r[f],n[u]):p={minWidth:0,minHeight:0};var d=i?Math.min(p.minWidth,r[f]):p.minWidth;o[f]=Math.max(o[f],d);var g=i?Math.min(p.minHeight,n[u]):p.minHeight;a[u]=Math.max(a[u],g);var _=p.minWidth>r[f];s[f]=s[f]||_;var y=p.minHeight>n[u];l[u]=l[u]||y})}),{guaranteedWidths:o,guaranteedHeights:a,wantsWidthArr:s,wantsHeightArr:l}},t.prototype.requestedSpace=function(r,n){return this._calculatedLayout=this._iterateLayout(r,n),{minWidth:qu.sum(this._calculatedLayout.guaranteedWidths),minHeight:qu.sum(this._calculatedLayout.guaranteedHeights)}},t.prototype.computeLayout=function(r,n,i){var o=this;e.prototype.computeLayout.call(this,r,n,i);var a=qu.sum(this._calculatedLayout.guaranteedWidths),s=qu.sum(this._calculatedLayout.guaranteedHeights),l=this._calculatedLayout;(a>this.width()||s>this.height())&&(l=this._iterateLayout(this.width(),this.height(),!0));var c=0,u=Go.Array.add(l.rowProportionalSpace,l.guaranteedHeights),h=Go.Array.add(l.colProportionalSpace,l.guaranteedWidths);return this._rows.forEach(function(f,p){var d=0;f.forEach(function(g,_){g!=null&&g.computeLayout({x:d,y:c},h[_],u[p]),d+=h[_]+o._columnPadding}),c+=u[p]+o._rowPadding}),this},t.prototype.rowPadding=function(r){if(r==null)return this._rowPadding;if(!Go.Math.isValidNumber(r)||r<0)throw Error("rowPadding must be a non-negative finite value");return this._rowPadding=r,this.redraw(),this},t.prototype.columnPadding=function(r){if(r==null)return this._columnPadding;if(!Go.Math.isValidNumber(r)||r<0)throw Error("columnPadding must be a non-negative finite value");return this._columnPadding=r,this.redraw(),this},t.prototype.rowWeight=function(r,n){if(n==null)return this._rowWeights[r];if(!Go.Math.isValidNumber(n)||n<0)throw Error("rowWeight must be a non-negative finite value");return this._rowWeights[r]=n,this.redraw(),this},t.prototype.columnWeight=function(r,n){if(n==null)return this._columnWeights[r];if(!Go.Math.isValidNumber(n)||n<0)throw Error("columnWeight must be a non-negative finite value");return this._columnWeights[r]=n,this.redraw(),this},t.prototype.fixedWidth=function(){var r=qu.transpose(this._rows);return t._fixedSpace(r,function(n){return n==null||n.fixedWidth()})},t.prototype.fixedHeight=function(){return t._fixedSpace(this._rows,function(r){return r==null||r.fixedHeight()})},t.prototype._padTableToSize=function(r,n){for(var i=0;i<r;i++){this._rows[i]===void 0&&(this._rows[i]=[],this._rowWeights[i]=null);for(var o=0;o<n;o++)this._rows[i][o]===void 0&&(this._rows[i][o]=null)}for(var o=0;o<n;o++)this._columnWeights[o]===void 0&&(this._columnWeights[o]=null)},t._calcComponentWeights=function(r,n,i){return r.map(function(o,a){if(o!=null)return o;var s=n[a].map(i),l=s.reduce(function(c,u){return c&&u},!0);return l?0:1})},t._calcProportionalSpace=function(r,n){var i=qu.sum(r);return i===0?Go.Array.createFilledArray(0,r.length):r.map(function(o){return n*o/i})},t._fixedSpace=function(r,n){var i=function(a){return a.reduce(function(s,l){return s&&l},!0)},o=function(a){return i(a.map(n))};return i(r.map(o))},t}(GHe.ComponentContainer);sat.Table=WHe});var lKt=H(lat=>{"use strict";Object.defineProperty(lat,"__esModule",{value:!0});var YHe=(de(),Ut(pe)),jHe=Vot(),XHe=2,$He=function(e){YHe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._maxLines=XHe,r}return t.prototype.requestedSpace=function(r,n){this._wrapper.maxLines(this._maxLines);var i=this.angle()===0?r:n;i===0&&(i=1/0);var o=this._wrapper.wrap(this._text,this._measurer,i),a=this._measurer.measure(o.wrappedText),s=(this.angle()===0?a.width:a.height)+2*this.padding(),l=(this.angle()===0?a.height:a.width)+2*this.padding();return{minWidth:s,minHeight:l}},t.prototype.maxLines=function(r){return arguments.length===0?this._maxLines:(this._maxLines=r,this.redraw(),this)},t}(jHe.Label);lat.WrappedLabel=$He});var cKt=H(cat=>{"use strict";Object.defineProperty(cat,"__esModule",{value:!0});var KHe=(de(),Ut(pe)),ZHe=qF(),JHe=function(e){KHe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("x-drag-box-layer"),r._hasCorners=!1,r}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._setBounds(this.bounds()),this},t.prototype._setBounds=function(r){e.prototype._setBounds.call(this,{topLeft:{x:r.topLeft.x,y:0},bottomRight:{x:r.bottomRight.x,y:this.height()}})},t.prototype._setResizableClasses=function(r){r&&this.enabled()?this.addClass("x-resizable"):this.removeClass("x-resizable")},t.prototype.yScale=function(r){if(r==null)return e.prototype.yScale.call(this);throw new Error("yScales cannot be set on an XDragBoxLayer")},t.prototype.yExtent=function(r){if(r==null)return e.prototype.yExtent.call(this);throw new Error("XDragBoxLayer has no yExtent")},t}(ZHe.DragBoxLayer);cat.XDragBoxLayer=JHe});var uKt=H(uat=>{"use strict";Object.defineProperty(uat,"__esModule",{value:!0});var QHe=(de(),Ut(pe)),tVe=qF(),eVe=function(e){QHe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("y-drag-box-layer"),r._hasCorners=!1,r}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._setBounds(this.bounds()),this},t.prototype._setBounds=function(r){e.prototype._setBounds.call(this,{topLeft:{x:0,y:r.topLeft.y},bottomRight:{x:this.width(),y:r.bottomRight.y}})},t.prototype._setResizableClasses=function(r){r&&this.enabled()?this.addClass("y-resizable"):this.removeClass("y-resizable")},t.prototype.xScale=function(r){if(r==null)return e.prototype.xScale.call(this);throw new Error("xScales cannot be set on an YDragBoxLayer")},t.prototype.xExtent=function(r){if(r==null)return e.prototype.xExtent.call(this);throw new Error("YDragBoxLayer has no xExtent")},t}(tVe.DragBoxLayer);uat.YDragBoxLayer=eVe});var Pot=H(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var Ds=(de(),Ut(pe));Ds.__exportStar(qF(),ya);Ds.__exportStar(I$t(),ya);Ds.__exportStar(L$t(),ya);Ds.__exportStar(zot(),ya);Ds.__exportStar(Lot(),ya);Ds.__exportStar(R$t(),ya);Ds.__exportStar(Vot(),ya);Ds.__exportStar(N$t(),ya);Ds.__exportStar(aKt(),ya);Ds.__exportStar(Tot(),ya);Ds.__exportStar(sKt(),ya);Ds.__exportStar(lKt(),ya);Ds.__exportStar(cKt(),ya);Ds.__exportStar(uKt(),ya)});var fat=H(hat=>{"use strict";Object.defineProperty(hat,"__esModule",{value:!0});var rVe=(de(),Ut(pe)),nVe=Of(),iVe=function(e){rVe.__extends(t,e);function t(){return e.call(this,"path","arc fill")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("stroke","none")},t}(nVe.SVGDrawer);hat.ArcSVGDrawer=iVe});var dat=H(pat=>{"use strict";Object.defineProperty(pat,"__esModule",{value:!0});var oVe=(de(),Ut(pe)),aVe=Of(),sVe=function(e){oVe.__extends(t,e);function t(){return e.call(this,"path","arc outline")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("fill","none")},t}(aVe.SVGDrawer);pat.ArcOutlineSVGDrawer=sVe});var mat=H(eB=>{"use strict";Object.defineProperty(eB,"__esModule",{value:!0});var lVe=(de(),Ut(pe)),tB=Bv(),cVe=Of(),uVe=function(e){lVe.__extends(t,e);function t(){return e.call(this,"path","area")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("stroke","none")},t.prototype.getVisualPrimitiveAtIndex=function(r){return e.prototype.getVisualPrimitiveAtIndex.call(this,0)},t}(cVe.SVGDrawer);eB.AreaSVGDrawer=uVe;var hVe=["opacity","fill","fill-opacity"],fVe=["opacity","stroke","stroke-width"];function pVe(e,t){return function(r,n,i){var o=tB.resolveAttributes(i,hVe,n[0],0);tB.renderArea(r,e(),n[0],o);var a=tB.resolveAttributes(i,fVe,n[0],0);tB.renderLine(r,t(),n[0],a)}}eB.makeAreaCanvasDrawStep=pVe});var nB=H(rB=>{"use strict";Object.defineProperty(rB,"__esModule",{value:!0});var dVe=(de(),Ut(pe)),hKt=Bv(),mVe=Of(),gVe=function(e){dVe.__extends(t,e);function t(){return e.call(this,"path","line")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("fill","none")},t.prototype.getVisualPrimitiveAtIndex=function(r){return e.prototype.getVisualPrimitiveAtIndex.call(this,0)},t}(mVe.SVGDrawer);rB.LineSVGDrawer=gVe;var _Ve=["opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function yVe(e){return function(t,r,n){var i=hKt.resolveAttributes(n,_Ve,r[0],0);hKt.renderLine(t,e(),r[0],i)}}rB.makeLineCanvasDrawStep=yVe});var oB=H(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});var fKt=(de(),Ut(pe)),iB=Bv(),vVe=Of(),xVe=function(e){fKt.__extends(t,e);function t(r){r===void 0&&(r="");var n=e.call(this,"rect","")||this;return n._rootClassName=r,n._root.classed(n._rootClassName,!0),n}return t}(vVe.SVGDrawer);PS.RectangleSVGDrawer=xVe;var bVe=iB.ContextStyleAttrs.concat(["x","y","width","height"]);PS.RectangleCanvasDrawStep=function(e,t,r){e.save();for(var n=t.length,i=0;i<n;i++){var o=t[i];if(o!=null){var a=iB.resolveAttributes(r,bVe,o,i);e.beginPath(),e.rect(a.x,a.y,a.width,a.height),iB.renderPathWithStyle(e,a)}}e.restore()};var wVe=function(e){fKt.__extends(t,e);function t(r){return e.call(this,r,PS.RectangleCanvasDrawStep)||this}return t}(iB.CanvasDrawer);PS.RectangleCanvasDrawer=wVe});var _at=H(gat=>{"use strict";Object.defineProperty(gat,"__esModule",{value:!0});var SVe=(de(),Ut(pe)),MVe=Of(),EVe=function(e){SVe.__extends(t,e);function t(){return e.call(this,"line","")||this}return t}(MVe.SVGDrawer);gat.SegmentSVGDrawer=EVe});var pKt=H(yat=>{"use strict";Object.defineProperty(yat,"__esModule",{value:!0});var TVe=function(){function e(t,r,n){n===void 0&&(n=window.devicePixelRatio),this.screenWidth=t,this.screenHeight=r,this.devicePixelRatio=n,this.pixelWidth=t*n,this.pixelHeight=r*n,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),e.sizePixels(this.ctx,t,r,n)}return e.sizePixels=function(t,r,n,i){var o=t.canvas;o.width=r*i,o.height=n*i,o.style.width=r+"px",o.style.height=n+"px",t.setTransform(1,0,0,1,0,0),t.scale(i,i)},e.prototype.blit=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=0),t.drawImage(this.canvas,r,n,this.screenWidth,this.screenHeight)},e.prototype.blitCenter=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.blit(t,Math.floor(r-this.screenWidth/2),Math.floor(n-this.screenHeight/2))},e.prototype.resize=function(t,r,n){n===void 0&&(n=!1);var i=this.devicePixelRatio;return this.screenWidth=t,this.screenHeight=r,this.pixelWidth=t*i,this.pixelHeight=r*i,e.sizePixels(this.ctx,t,r,i),n&&this.ctx.translate(t/2,t/2),this},e.prototype.clear=function(t){var r=this,n=r.pixelWidth,i=r.pixelHeight,o=r.ctx;return o.save(),o.setTransform(1,0,0,1,0,0),t==null?o.clearRect(0,0,n,i):(o.fillStyle=t,o.fillRect(0,0,n,i)),o.restore(),this},e.prototype.getImageData=function(){return this.ctx.getImageData(0,0,this.pixelWidth,this.pixelHeight)},e}();yat.CanvasBuffer=TVe});var vat=H(aB=>{"use strict";Object.defineProperty(aB,"__esModule",{value:!0});var CVe=(de(),Ut(pe)),m4=Bv(),AVe=pKt(),PVe=Of(),IVe=function(e){CVe.__extends(t,e);function t(){return e.call(this,"path","symbol")||this}return t}(PVe.SVGDrawer);aB.SymbolSVGDrawer=IVe;var LVe=m4.ContextStyleAttrs.concat(["x","y"]);function kVe(e,t,r,n){var i=this;return function(o,a,s){for(var l=o.canvas,c=l.clientWidth,u=l.clientHeight,h=n===void 0?new AVe.CanvasBuffer(0,0):n,f=t(),p=r(),d=null,g=null,_=null,y=0;y<a.length;y++){var x=a[y];if(x!=null){var b=m4.resolveAttributes(s,LVe,x,y),S=p(x,y,e);if(!!RVe(c,u,b.x,b.y,S)){var C=NVe(d,b,m4.ContextStyleAttrs),P=f(x,y,i._dataset);if(!(C&&_==S&&g==P)){var k=m4.getStrokeWidth(b),O=S+k+1;(O>h.screenWidth||O>h.screenHeight)&&h.resize(O,O,!0),h.clear();var D=h.ctx;D.beginPath(),P(S).context(D)(null),D.closePath(),m4.renderPathWithStyle(D,b),g=P,_=S,d=b}h.blitCenter(o,b.x,b.y)}}}}}aB.makeSymbolCanvasDrawStep=kVe;function RVe(e,t,r,n,i){return r+i>=0&&r-i<=e&&n+i>=0&&n-i<=t}function NVe(e,t,r){if(e==null)return!1;for(var n=0;n<r.length;n++){var i=r[n];if(e[i]!=t[i])return!1}return!0}});var Hv=H(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var zf=(de(),Ut(pe));zf.__exportStar(fat(),Dc);zf.__exportStar(dat(),Dc);zf.__exportStar(mat(),Dc);zf.__exportStar(Bv(),Dc);zf.__exportStar(Uu(),Dc);zf.__exportStar(nB(),Dc);zf.__exportStar(oB(),Dc);zf.__exportStar(_at(),Dc);zf.__exportStar(Of(),Dc);zf.__exportStar(vat(),Dc)});var Vv=H(bat=>{"use strict";Object.defineProperty(bat,"__esModule",{value:!0});var DVe=(de(),Ut(pe)),dKt=Rs(),xat=Fe(),OVe=iat(),g4=ns(),zVe=function(e){DVe.__extends(t,e);function t(){var r=e.call(this)||this;return r._autoAdjustXScaleDomain=!1,r._autoAdjustYScaleDomain=!1,r._deferredRendering=!1,r._applyDeferredRenderingTransform=function(n,i,o,a){!r._isAnchored||(r._renderArea!=null&&r._renderArea.attr("transform","translate("+n+", "+i+") scale("+o+", "+a+")"),r._canvas!=null&&r._canvas.style("transform","translate("+n+"px, "+i+"px) scale("+o+", "+a+")"))},r.addClass("xy-plot"),r._adjustYDomainOnChangeFromXCallback=function(n){return r._adjustYDomainOnChangeFromX()},r._adjustXDomainOnChangeFromYCallback=function(n){return r._adjustXDomainOnChangeFromY()},r._renderCallback=function(){if(r.deferredRendering()){var n=r.x()&&r.x().scale,i=r.y()&&r.y().scale;r._deferredRenderer.updateDomains(n,i)}else r.render()},r._deferredRenderer=new OVe.DeferredRenderer(function(){return r.render()},r._applyDeferredRenderingTransform),r}return t.prototype.render=function(){return this.deferredRendering()&&this._deferredRenderer.resetTransforms(),e.prototype.render.call(this)},t.prototype.deferredRendering=function(r){if(r==null)return this._deferredRendering;if(r){var n=this.x()&&this.x().scale,i=this.y()&&this.y().scale;this._deferredRenderer.setDomains(n,i)}return this._deferredRendering=r,this},t.prototype.x=function(r,n,i){if(r==null)return this._propertyBindings.get(t._X_KEY);this._bindProperty(t._X_KEY,r,n,i);var o=this.width();return n!=null&&o!=null&&n.range([0,o]),this._autoAdjustYScaleDomain&&this._updateYExtentsAndAutodomain(),this.render(),this},t.prototype.y=function(r,n,i){if(r==null)return this._propertyBindings.get(t._Y_KEY);this._bindProperty(t._Y_KEY,r,n,i);var o=this.height();return n!=null&&o!=null&&(n instanceof dKt.Category?n.range([0,o]):n.range([o,0])),this._autoAdjustXScaleDomain&&this._updateXExtentsAndAutodomain(),this.render(),this},t.prototype._filterForProperty=function(r){return r==="x"&&this._autoAdjustXScaleDomain?this._makeFilterByProperty("y"):(r==="y"||r==="y0")&&this._autoAdjustYScaleDomain?this._makeFilterByProperty("x"):null},t.prototype._makeFilterByProperty=function(r){var n=this._propertyBindings.get(r);if(n!=null){var i=n.accessor,o=n.scale;if(o!=null)return function(a,s,l){var c=o.range();return xat.Math.inRange(o.scale(i(a,s,l)),c[0],c[1])}}return null},t.prototype._uninstallScaleForKey=function(r,n){e.prototype._uninstallScaleForKey.call(this,r,n);var i=n===t._X_KEY?this._adjustYDomainOnChangeFromXCallback:this._adjustXDomainOnChangeFromYCallback;r.offUpdate(i)},t.prototype._installScaleForKey=function(r,n){e.prototype._installScaleForKey.call(this,r,n);var i=n===t._X_KEY?this._adjustYDomainOnChangeFromXCallback:this._adjustXDomainOnChangeFromYCallback;r.onUpdate(i)},t.prototype.destroy=function(){return e.prototype.destroy.call(this),this.x().scale&&this.x().scale.offUpdate(this._adjustYDomainOnChangeFromXCallback),this.y().scale&&this.y().scale.offUpdate(this._adjustXDomainOnChangeFromYCallback),this},t.prototype.autorangeMode=function(r){if(r==null)return this._autoAdjustXScaleDomain?"x":this._autoAdjustYScaleDomain?"y":"none";switch(r){case"x":this._autoAdjustXScaleDomain=!0,this._autoAdjustYScaleDomain=!1,this._adjustXDomainOnChangeFromY();break;case"y":this._autoAdjustXScaleDomain=!1,this._autoAdjustYScaleDomain=!0,this._adjustYDomainOnChangeFromX();break;case"none":this._autoAdjustXScaleDomain=!1,this._autoAdjustYScaleDomain=!1;break;default:throw new Error("Invalid scale name '"+r+"', must be 'x', 'y' or 'none'")}return this},t.prototype.computeLayout=function(r,n,i){e.prototype.computeLayout.call(this,r,n,i);var o=this.x(),a=o&&o.scale;a!=null&&a.range([0,this.width()]);var s=this.y(),l=s&&s.scale;return l!=null&&(l instanceof dKt.Category?l.range([0,this.height()]):l.range([this.height(),0])),this},t.prototype._updateXExtentsAndAutodomain=function(){var r=this.x().scale;r!=null&&r.autoDomain()},t.prototype._updateYExtentsAndAutodomain=function(){var r=this.y().scale;r!=null&&r.autoDomain()},t.prototype.showAllData=function(){return this._updateXExtentsAndAutodomain(),this._updateYExtentsAndAutodomain(),this},t.prototype._adjustYDomainOnChangeFromX=function(){!this._projectorsReady()||this._autoAdjustYScaleDomain&&this._updateYExtentsAndAutodomain()},t.prototype._adjustXDomainOnChangeFromY=function(){!this._projectorsReady()||this._autoAdjustXScaleDomain&&this._updateXExtentsAndAutodomain()},t.prototype._projectorsReady=function(){var r=this.x(),n=this.y();return r!=null&&r.accessor!=null&&n!=null&&n.accessor!=null},t.prototype._pixelPoint=function(r,n,i){var o=g4.Plot._scaledAccessor(this.x()),a=g4.Plot._scaledAccessor(this.y());return{x:o(r,n,i),y:a(r,n,i)}},t.prototype._getDataToDraw=function(){var r=this,n=e.prototype._getDataToDraw.call(this),i=this.attr("defined"),o=function(a,s,l){var c=g4.Plot._scaledAccessor(r.x())(a,s,l),u=g4.Plot._scaledAccessor(r.y())(a,s,l);return i&&i.accessor(a,s,l)===!1?!1:xat.Math.isValidNumber(c)&&xat.Math.isValidNumber(u)};return this.datasets().forEach(function(a){n.set(a,n.get(a).filter(function(s,l){return o(s,l,a)}))}),n},t._X_KEY="x",t._Y_KEY="y",t}(g4.Plot);bat.XYPlot=zVe});var Sat=H(lB=>{"use strict";Object.defineProperty(lB,"__esModule",{value:!0});var FVe=(de(),Ut(pe)),va=(Er(),Ut(Mr)),BVe=kf(),HVe=Hv(),VVe=Uu(),mKt=nB(),UVe=Rs(),sB=xd(),t0=Fe(),qVe=Lf(),wat=IS(),xl=ns(),GVe=Vv(),gKt={linear:va.curveLinear,linearClosed:va.curveLinearClosed,step:va.curveStep,stepBefore:va.curveStepBefore,stepAfter:va.curveStepAfter,basis:va.curveBasis,basisOpen:va.curveBasisOpen,basisClosed:va.curveBasisClosed,bundle:va.curveBundle,cardinal:va.curveCardinal,cardinalOpen:va.curveCardinalOpen,cardinalClosed:va.curveCardinalClosed,monotone:va.curveMonotoneX};lB.CurveName=qVe.makeEnum(["linear","linearClosed","step","stepBefore","stepAfter","basis","basisOpen","basisClosed","bundle","cardinal","cardinalOpen","cardinalClosed","monotone"]);var WVe=function(e){FVe.__extends(t,e);function t(){var r=e.call(this)||this;r._curve="linear",r._autorangeSmooth=!1,r._croppedRenderingEnabled=!0,r._collapseDenseVerticalLinesEnabled=!1,r._downsamplingEnabled=!1,r.addClass("line-plot");var n=new BVe.Easing;return n.stepDuration(xl.Plot._ANIMATION_MAX_DURATION),n.easingMode("expInOut"),n.maxTotalDuration(xl.Plot._ANIMATION_MAX_DURATION),r.animator(wat.Animator.MAIN,n),r.attr("stroke",new UVe.Color().range()[0]),r.attr("stroke-width","2px"),r}return t.prototype.x=function(r,n,i){return r==null?e.prototype.x.call(this):(e.prototype.x.call(this,r,n,i),this._setScaleSnapping(),this)},t.prototype.y=function(r,n,i){return r==null?e.prototype.y.call(this):(e.prototype.y.call(this,r,n,i),this._setScaleSnapping(),this)},t.prototype.autorangeMode=function(r){return r==null?e.prototype.autorangeMode.call(this):(e.prototype.autorangeMode.call(this,r),this._setScaleSnapping(),this)},t.prototype.autorangeSmooth=function(r){return r==null?this._autorangeSmooth:(this._autorangeSmooth=r,this._setScaleSnapping(),this)},t.prototype._setScaleSnapping=function(){this.autorangeMode()==="x"&&this.x()&&this.x().scale&&this.x().scale instanceof sB.QuantitativeScale&&this.x().scale.snappingDomainEnabled(!this.autorangeSmooth()),this.autorangeMode()==="y"&&this.y()&&this.y().scale&&this.y().scale instanceof sB.QuantitativeScale&&this.y().scale.snappingDomainEnabled(!this.autorangeSmooth())},t.prototype.curve=function(r){return r==null?this._curve:(this._curve=r,this.render(),this)},t.prototype.downsamplingEnabled=function(r){return r==null?this._downsamplingEnabled:(this._downsamplingEnabled=r,this)},t.prototype.croppedRenderingEnabled=function(r){return r==null?this._croppedRenderingEnabled:(this._croppedRenderingEnabled=r,this.render(),this)},t.prototype.collapseDenseLinesEnabled=function(r){return r==null?this._collapseDenseVerticalLinesEnabled:(this._collapseDenseVerticalLinesEnabled=r,this.render(),this)},t.prototype._createDrawer=function(r){var n=this;return new VVe.ProxyDrawer(function(){return new mKt.LineSVGDrawer},function(i){return new HVe.CanvasDrawer(i,mKt.makeLineCanvasDrawStep(function(){return n._d3LineFactory(r)}))})},t.prototype.getExtentsForProperty=function(r){var n=e.prototype.getExtentsForProperty.call(this,r);if(!this._autorangeSmooth||this.autorangeMode()!==r||this.autorangeMode()!=="x"&&this.autorangeMode()!=="y")return n;var i=this._getEdgeIntersectionPoints(),o;return this.autorangeMode()==="y"?o=i.left.concat(i.right).map(function(a){return a.y}):o=i.top.concat(i.bottom).map(function(a){return a.x}),n.map(function(a){return va.extent(va.merge([a,o]))})},t.prototype._getEdgeIntersectionPoints=function(){var r=this;if(!(this.y().scale instanceof sB.QuantitativeScale&&this.x().scale instanceof sB.QuantitativeScale))return{left:[],right:[],top:[],bottom:[]};var n=this.y().scale,i=this.x().scale,o={left:[],right:[],top:[],bottom:[]},a=i.scale(i.domain()[0]),s=i.scale(i.domain()[1]),l=n.scale(n.domain()[0]),c=n.scale(n.domain()[1]);return this.datasets().forEach(function(u){for(var h=u.data(),f,p,d,g,_,y,x,b,S=1;S<h.length;S++)_=x||i.scale(r.x().accessor(h[S-1],S-1,u)),y=b||n.scale(r.y().accessor(h[S-1],S-1,u)),x=i.scale(r.x().accessor(h[S],S,u)),b=n.scale(r.y().accessor(h[S],S,u)),_<a==a<=x&&(f=a-_,p=x-_,g=b-y,d=f*g/p,o.left.push({x:a,y:n.invert(y+d)})),_<s==s<=x&&(f=s-_,p=x-_,g=b-y,d=f*g/p,o.right.push({x:s,y:n.invert(y+d)})),y<c==c<=b&&(p=x-_,d=c-y,g=b-y,f=d*p/g,o.top.push({x:i.invert(_+f),y:c})),y<l==l<=b&&(p=x-_,d=l-y,g=b-y,f=d*p/g,o.bottom.push({x:i.invert(_+f),y:l}))}),o},t.prototype._getResetYFunction=function(){var r=this.y().scale.domain(),n=Math.max(r[0],r[1]),i=Math.min(r[0],r[1]),o=n<0&&n||i>0&&i||0,a=this.y().scale.scale(o);return function(s,l,c){return a}},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector();n.d=this._constructLineProjector(xl.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(wat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(wat.Animator.MAIN)}),r},t.prototype._generateAttrToProjector=function(){var r=e.prototype._generateAttrToProjector.call(this);return Object.keys(r).forEach(function(n){if(n!=="d"){var i=r[n];r[n]=function(o,a,s){return o.length>0?i(o[0],a,s):null}}}),r},t.prototype.entitiesAt=function(r){var n=this.entityNearestByXThenY(r);return n!=null?[n]:[]},t.prototype.entityNearestByXThenY=function(r){for(var n=1/0,i=1/0,o,a=this.bounds(),s=this.entities(),l=s.length,c=0;c<l;c++){var u=s[c];if(!!t0.Math.within(u.position,a)){var h=Math.abs(r.x-u.position.x),f=Math.abs(r.y-u.position.y);(h<n||h===n&&f<i)&&(o=u,n=h,i=f)}}return o},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return r.d=this._constructLineProjector(xl.Plot._scaledAccessor(this.x()),xl.Plot._scaledAccessor(this.y())),r},t.prototype._constructLineProjector=function(r,n){var i=this;return function(o,a,s){return i._d3LineFactory(s,r,n)(o)}},t.prototype._d3LineFactory=function(r,n,i){n===void 0&&(n=xl.Plot._scaledAccessor(this.x())),i===void 0&&(i=xl.Plot._scaledAccessor(this.y()));var o=function(a,s,l){var c=n(a,s,l),u=i(a,s,l);return t0.Math.isValidNumber(c)&&t0.Math.isValidNumber(u)};return va.line().x(function(a,s){return n(a,s,r)}).y(function(a,s){return i(a,s,r)}).curve(this._getCurveFactory()).defined(function(a,s){return o(a,s,r)})},t.prototype._getCurveFactory=function(){var r=this.curve();if(typeof r=="string"){var n=gKt[r];return n==null?gKt.linear:n}else return r},t.prototype._getDataToDraw=function(){var r=this,n=new t0.Map;return this.datasets().forEach(function(i){var o=i.data();if(!r._croppedRenderingEnabled&&!r._downsamplingEnabled){n.set(i,[o]);return}for(var a=[],s=o.length,l=0;l<s;l++)a[l]=l;r._croppedRenderingEnabled&&(a=r._filterCroppedRendering(i,a)),r._downsamplingEnabled&&(a=r._filterDownsampling(i,a)),r._collapseDenseVerticalLinesEnabled&&(a=r._filterDenseLines(i,a));for(var c=[],u=a.length,l=0;l<u;l++){var h=a[l];c[l]=o[h]}n.set(i,[c])}),n},t.prototype._filterCroppedRendering=function(r,n){for(var i=this,o=xl.Plot._scaledAccessor(this.x()),a=xl.Plot._scaledAccessor(this.y()),s=r.data(),l=[],c=function(x,b){return t0.Math.inRange(x,0,i.width())&&t0.Math.inRange(b,0,i.height())},u=0;u<n.length;u++){var h=o(s[n[u]],n[u],r),f=a(s[n[u]],n[u],r),p=c(h,f);if(!p&&n[u-1]!=null&&s[n[u-1]]!=null){var d=o(s[n[u-1]],n[u-1],r),g=a(s[n[u-1]],n[u-1],r);p=p||c(d,g)}if(!p&&n[u+1]!=null&&s[n[u+1]]!=null){var _=o(s[n[u+1]],n[u+1],r),y=a(s[n[u+1]],n[u+1],r);p=p||c(_,y)}p&&l.push(n[u])}return l},t.prototype._filterDownsampling=function(r,n){if(n.length===0)return[];for(var i=r.data(),o=xl.Plot._scaledAccessor(this.x()),a=xl.Plot._scaledAccessor(this.y()),s=[n[0]],l=function(k,O){var D=o(i[n[k]],n[k],r),B=a(i[n[k]],n[k],r),I=o(i[n[k+1]],n[k+1],r),L=a(i[n[k+1]],n[k+1],r);if(O===1/0)return Math.floor(D)===Math.floor(I);var R=B+(I-D)*O;return Math.floor(L)===Math.floor(R)},c=0;c<n.length-1;){for(var u=n[c],h=o(i[n[c]],n[c],r),f=a(i[n[c]],n[c],r),p=o(i[n[c+1]],n[c+1],r),d=a(i[n[c+1]],n[c+1],r),g=Math.floor(h)===Math.floor(p)?1/0:(d-f)/(p-h),_=n[c],y=g===1/0?f:h,x=_,b=y,S=!0;c<n.length-1&&(S||l(c,g));){c++,S=!1;var C=g===1/0?a(i[n[c]],n[c],r):o(i[n[c]],n[c],r);C>b&&(b=C,x=n[c]),C<y&&(y=C,_=n[c])}var P=n[c];_!==u&&s.push(_),x!==_&&x!==u&&s.push(x),P!==u&&P!==_&&P!==x&&s.push(P)}return s},t.prototype._filterDenseLines=function(r,n){if(n.length===0)return[];var i=r.data(),o=xl.Plot._scaledAccessor(this.x()),a=xl.Plot._scaledAccessor(this.y()),s=function(c){return o(i[c],c,r)},l=function(c){return a(i[c],c,r)};return this._bucketByX(r,n,s,l)},t.prototype._bucketByX=function(r,n,i,o){for(var a=[],s=r.data(),l=null,c=n.length,u=0;u<=c;++u){var h=n[u];if(s[h]!=null){var f=Math.floor(i(h)),p=o(h);l==null?l=new t0.Bucket(h,f,p):l.isInBucket(f)?l.addToBucket(p,h):(a.push.apply(a,l.getUniqueIndices()),l=new t0.Bucket(h,f,p))}}return l!=null&&a.push.apply(a,l.getUniqueIndices()),a},t}(GVe.XYPlot);lB.Line=WVe});var Tat=H(Eat=>{"use strict";Object.defineProperty(Eat,"__esModule",{value:!0});var YVe=(de(),Ut(pe)),cB=(Er(),Ut(Mr)),jVe=Rs(),_4=Fe(),Mat=Hv(),_Kt=mat(),XVe=Uu(),yKt=nB(),uB=IS(),$Ve=Sat(),Os=ns(),KVe=function(e){YVe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("area-plot"),r.y0(0),r.attr("fill-opacity",.25),r.attr("fill",new jVe.Color().range()[0]),r._lineDrawers=new _4.Map,r}return t.prototype.y=function(r,n){if(r==null)return e.prototype.y.call(this);if(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),n!=null){var i=this.y0().accessor;i!=null&&this._bindProperty(t._Y0_KEY,i,n),this._updateYScale()}return this},t.prototype.y0=function(r){if(r==null)return this._propertyBindings.get(t._Y0_KEY);var n=this.y(),i=n&&n.scale;return this._bindProperty(t._Y0_KEY,r,i),this._updateYScale(),this.render(),this},t.prototype._onDatasetUpdate=function(){e.prototype._onDatasetUpdate.call(this),this._updateYScale()},t.prototype._addDataset=function(r){var n=this;return this._lineDrawers.set(r,new Mat.ProxyDrawer(function(){return new yKt.LineSVGDrawer},function(i){return new Mat.CanvasDrawer(i,yKt.makeLineCanvasDrawStep(function(){var o=Os.Plot._scaledAccessor(n.x()),a=Os.Plot._scaledAccessor(n.y());return n._d3LineFactory(r,o,a)}))})),e.prototype._addDataset.call(this,r),this},t.prototype._createNodesForDataset=function(r){e.prototype._createNodesForDataset.call(this,r);var n=this._lineDrawers.get(r);return this.renderer()==="svg"?n.useSVG(this._renderArea):n.useCanvas(this._canvas),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r),this._lineDrawers.get(r).remove()},t.prototype._additionalPaint=function(){var r=this,n=this._generateLineDrawSteps(),i=this._getDataToDraw();this.datasets().forEach(function(o){var a=Os.Plot.applyDrawSteps(n,o);r._lineDrawers.get(o).draw(i.get(o),a)})},t.prototype._generateLineDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._generateLineAttrToProjector();n.d=this._constructLineProjector(Os.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(uB.Animator.RESET)})}return r.push({attrToProjector:this._generateLineAttrToProjector(),animator:this._getAnimator(uB.Animator.MAIN)}),r},t.prototype._generateLineAttrToProjector=function(){var r=this._getAttrToProjector();return r.d=this._constructLineProjector(Os.Plot._scaledAccessor(this.x()),Os.Plot._scaledAccessor(this.y())),r},t.prototype._createDrawer=function(r){var n=this;return new XVe.ProxyDrawer(function(){return new _Kt.AreaSVGDrawer},function(i){return new Mat.CanvasDrawer(i,_Kt.makeAreaCanvasDrawStep(function(){var o=n._coordinateProjectors(),a=o[0],s=o[1],l=o[2],c=n._createDefinedProjector(a,s);return n._createAreaGenerator(a,s,l,c,r)},function(){var o=n._coordinateProjectors(),a=o[0],s=o[1],l=n._createDefinedProjector(a,s);return n._createTopLineGenerator(a,s,l,r)}))})},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector();n.d=this._constructAreaProjector(Os.Plot._scaledAccessor(this.x()),this._getResetYFunction(),Os.Plot._scaledAccessor(this.y0())),r.push({attrToProjector:n,animator:this._getAnimator(uB.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(uB.Animator.MAIN)}),r},t.prototype._updateYScale=function(){var r=this.getExtentsForProperty("y0"),n=_4.Array.flatten(r),i=_4.Array.uniq(n),o=i.length===1?i[0]:null,a=this.y(),s=a&&a.scale;s!=null&&(this._constantBaselineValueProvider!=null&&(s.removePaddingExceptionsProvider(this._constantBaselineValueProvider),this._constantBaselineValueProvider=null),o!=null&&(this._constantBaselineValueProvider=function(){return[o]},s.addPaddingExceptionsProvider(this._constantBaselineValueProvider)))},t.prototype._getResetYFunction=function(){return Os.Plot._scaledAccessor(this.y0())},t.prototype._coordinateProjectors=function(){return[Os.Plot._scaledAccessor(this.x()),Os.Plot._scaledAccessor(this.y()),Os.Plot._scaledAccessor(this.y0())]},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=this._coordinateProjectors(),i=n[0],o=n[1],a=n[2];return r.d=this._constructAreaProjector(i,o,a),r},t.prototype.selections=function(r){var n=this;if(r===void 0&&(r=this.datasets()),this.renderer()==="canvas")return cB.selectAll();var i=e.prototype.selections.call(this,r).nodes(),o=r.map(function(a){return n._lineDrawers.get(a)}).filter(function(a){return a!=null});return o.forEach(function(a){return i.push.apply(i,a.getVisualPrimitives())}),cB.selectAll(i)},t.prototype._constructAreaProjector=function(r,n,i){var o=this,a=this._createDefinedProjector(Os.Plot._scaledAccessor(this.x()),Os.Plot._scaledAccessor(this.y()));return function(s,l,c){var u=o._createAreaGenerator(r,n,i,a,c);return u(s)}},t.prototype._createDefinedProjector=function(r,n){return function(i,o,a){var s=r(i,o,a),l=n(i,o,a);return _4.Math.isValidNumber(s)&&_4.Math.isValidNumber(l)}},t.prototype._createAreaGenerator=function(r,n,i,o,a){var s=this._getCurveFactory(),l=cB.area().x(function(c,u){return r(c,u,a)}).y1(function(c,u){return n(c,u,a)}).y0(function(c,u){return i(c,u,a)}).curve(s).defined(function(c,u){return o(c,u,a)});return l},t.prototype._createTopLineGenerator=function(r,n,i,o){var a=this._getCurveFactory(),s=cB.line().x(function(l,c){return r(l,c,o)}).y(function(l,c){return n(l,c,o)}).curve(a).defined(function(l,c){return i(l,c,o)});return s},t._Y0_KEY="y0",t}($Ve.Line);Eat.Area=KVe});var y4=H(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var ZVe=(de(),Ut(pe)),Aat=(Er(),Ut(Mr)),Cat=yl(),JVe=kf(),QVe=Bu(),tUe=Hv(),eUe=Uu(),rUe=oB(),nUe=CS(),Pat=Rs(),vKt=xd(),bl=Fe(),Lat=Lf(),xKt=IS(),hB=ns(),iUe=Vv();Gu.BarOrientation=Lat.makeEnum(["vertical","horizontal"]);Gu.LabelsPosition=Lat.makeEnum(["start","middle","end","outside"]);Gu.BarAlignment=Lat.makeEnum(["start","middle","end"]);var Iat=function(e){ZVe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this)||this;if(n._labelFormatter=QVe.identity(),n._labelsEnabled=!1,n._labelsPosition=Gu.LabelsPosition.end,n._hideBarsIfAnyAreTooWide=!0,n._barAlignment="middle",n._computeBarPixelThickness=nUe.memoize(oUe),n._fixedBarPixelThickness=!0,n.addClass("bar-plot"),r!=="vertical"&&r!=="horizontal")throw new Error(r+" is not a valid orientation for Plots.Bar");return n._isVertical=r==="vertical",n.animator("baseline",new JVe.Null),n.attr("fill",new Pat.Color().range()[0]),n.attr(t._BAR_THICKNESS_KEY,function(){return n._barPixelThickness()}),n._labelConfig=new bl.Map,n._baselineValueProvider=function(){return[n.baselineValue()]},n}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._updateExtents(),this},t.prototype.x=function(r,n){return r==null?e.prototype.x.call(this):(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n),this._updateThicknessAttr(),this._updateLengthScale(),this)},t.prototype.y=function(r,n){return r==null?e.prototype.y.call(this):(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),this._updateLengthScale(),this)},t.prototype.length=function(){return this._isVertical?this.y():this.x()},t.prototype.position=function(){return this._isVertical?this.x():this.y()},t.prototype.barEnd=function(r){if(r==null)return this._propertyBindings.get(t._BAR_END_KEY);var n=this.position(),i=n&&n.scale;return this._bindProperty(t._BAR_END_KEY,r,i),this._updateThicknessAttr(),this._updateLengthScale(),this.render(),this},t.prototype.barAlignment=function(r){return r==null?this._barAlignment:(this._barAlignment=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype.orientation=function(){return this._isVertical?"vertical":"horizontal"},t.prototype._createDrawer=function(){return new eUe.ProxyDrawer(function(){return new rUe.RectangleSVGDrawer(t._BAR_AREA_CLASS)},function(r){return new tUe.RectangleCanvasDrawer(r)})},t.prototype._setup=function(){e.prototype._setup.call(this),this._baseline=this._renderArea.append("line").classed("baseline",!0)},t.prototype.baselineValue=function(r){if(r==null){if(this._baselineValue!=null)return this._baselineValue;if(!this._projectorsReady())return 0;var n=this.length().scale;return n&&n instanceof Pat.Time?new Date(0):0}return this._baselineValue=r,this._updateLengthScale(),this._clearAttrToProjectorCache(),this.render(),this},t.prototype.addDataset=function(r){return e.prototype.addDataset.call(this,r),this},t.prototype._addDataset=function(r){return e.prototype._addDataset.call(this,r),this},t.prototype.removeDataset=function(r){return e.prototype.removeDataset.call(this,r),this},t.prototype._removeDataset=function(r){return e.prototype._removeDataset.call(this,r),this},t.prototype.datasets=function(r){return r==null?e.prototype.datasets.call(this):(e.prototype.datasets.call(this,r),this)},t.prototype.labelsEnabled=function(r,n){return r==null?this._labelsEnabled:(this._labelsEnabled=r,n!=null&&(this._labelsPosition=n),this._clearAttrToProjectorCache(),this.render(),this)},t.prototype.labelFormatter=function(r){return r==null?this._labelFormatter:(this._labelFormatter=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r),i=this._renderArea.append("g").classed(t._LABEL_AREA_CLASS,!0),o=new Cat.SvgContext(i.node()),a=new Cat.CacheMeasurer(o),s=new Cat.Writer(a,o);return this._labelConfig.set(r,{labelArea:i,measurer:a,writer:s}),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r);var n=this._labelConfig.get(r);n!=null&&(n.labelArea.remove(),this._labelConfig.delete(r))},t.prototype.entityNearest=function(r){var n=this,i=function(){var o=n._isVertical?n._getEntityStore().entityNearestX(r):n._getEntityStore().entityNearestY(r);return o===void 0?void 0:n._lightweightPlotEntityToPlotEntity(o)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesAt=function(r){var n=this,i=function(){return n._entitiesIntersecting(r.x,r.y)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInXBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInXBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInYBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInYBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype._entitiesIntersecting=function(r,n){for(var i=[],o=this._getEntityStore().entities(),a=o.length,s=0;s<a;s++){var l=o[s];bl.DOM.intersectsBBox(r,n,this._entityBounds(l))&&i.push(this._lightweightPlotEntityToPlotEntity(l))}return i},t.prototype._updateLengthScale=function(){if(!!this._projectorsReady()){var r=this.length().scale;r instanceof vKt.QuantitativeScale&&(r.addPaddingExceptionsProvider(this._baselineValueProvider),r.addIncludedValuesProvider(this._baselineValueProvider))}},t.prototype.renderImmediately=function(){var r=this;return this._barPixelThickness(),this._computeBarPixelThickness.doLocked(function(){return e.prototype.renderImmediately.call(r)})},t.prototype._additionalPaint=function(r){var n=this,i=this.length().scale,o=i.scale(this.baselineValue()),a={x1:this._isVertical?0:o,y1:this._isVertical?o:0,x2:this._isVertical?this.width():o,y2:this._isVertical?o:this.height()};this._getAnimator("baseline").animate(this._baseline,a),this.datasets().forEach(function(s){return n._labelConfig.get(s).labelArea.selectAll("g").remove()}),this._labelsEnabled&&bl.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype.getExtentsForProperty=function(r){var n=this,i=e.prototype.getExtentsForProperty.call(this,r),o;if(r==="x"&&this._isVertical)o=this.x();else if(r==="y"&&!this._isVertical)o=this.y();else return i;if(!(o&&o.scale&&o.scale instanceof vKt.QuantitativeScale))return i;var a=o.scale,s=this._barPixelThickness();return i=i.map(function(l){return Aat.extent([a.invert(n._getPositionAttr(a.scale(l[0]),s)),a.invert(n._getPositionAttr(a.scale(l[0]),s)+s),a.invert(n._getPositionAttr(a.scale(l[1]),s)),a.invert(n._getPositionAttr(a.scale(l[1]),s)+s)])}),i},t.prototype._getPositionAttr=function(r,n){switch(this._isVertical||(r-=n,n*=-1),this._barAlignment){case"start":return r;case"end":return r-n;case"middle":default:return r-n/2}},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw(),i=this._getAttrToProjector(),o=this.datasets().some(function(a){return n.get(a).some(function(s,l){return s==null?!1:r._drawLabel(s,l,a,i)})});this._hideBarsIfAnyAreTooWide&&o&&this.datasets().forEach(function(a){return r._labelConfig.get(a).labelArea.selectAll("g").remove()})},t.prototype._drawLabel=function(r,n,i,o){var a=this._labelConfig.get(i),s=a.labelArea,l=a.measurer,c=a.writer,u=this.length().accessor,h=u(r,n,i),f=this.length().scale,p=f!=null?f.scale(h):h,d=f!=null?f.scale(this.baselineValue()):this.baselineValue(),g={x:o.x(r,n,i),y:o.y(r,n,i)},_={width:o.width(r,n,i),height:o.height(r,n,i)},y=this._labelFormatter(h,r,n,i),x=l.measure(y),b=this._shouldShowLabelOnBar(g,_,x),S=this._isVertical?p<=d:p<d,C=this._calculateLabelProperties(g,_,x,b,S),P=C.containerDimensions,k=C.labelContainerOrigin,O=C.labelOrigin,D=C.alignment,B=o.fill(r,n,i),I=this._createLabelContainer(s,k,O,x,b,B),L={xAlign:D.x,yAlign:D.y};c.write(y,P.width,P.height,L,I.node());var R=this._isVertical?_.width<x.width:_.height<x.height;return R},t.prototype._shouldShowLabelOnBar=function(r,n,i){if(this._labelsPosition===Gu.LabelsPosition.outside)return!1;var o=this._isVertical?r.y:r.x,a=this._isVertical?n.height:n.width,s=this._isVertical?this.height():this.width(),l=this._isVertical?i.height:i.width,c=o+a,u=a;return c>s?u=s-o:o<0&&(u=c),l+t._LABEL_MARGIN_INSIDE_BAR<=u},t.prototype._calculateLabelProperties=function(r,n,i,o,a){var s=this,l=this._isVertical?r.y:r.x,c=this._isVertical?n.height:n.width,u=this._isVertical?i.height:i.width,h="center",f=c,p=l,d=l,g=function(_){switch(_){case"topLeft":h=s._isVertical?"top":"left",p+=t._LABEL_MARGIN_INSIDE_BAR,d+=t._LABEL_MARGIN_INSIDE_BAR;return;case"center":d+=(c+u)/2;return;case"bottomRight":h=s._isVertical?"bottom":"right",p-=t._LABEL_MARGIN_INSIDE_BAR,d+=f-t._LABEL_MARGIN_INSIDE_BAR-u;return}};if(o)switch(this._labelsPosition){case Gu.LabelsPosition.start:g(a?"bottomRight":"topLeft");break;case Gu.LabelsPosition.middle:g("center");break;case Gu.LabelsPosition.end:g(a?"topLeft":"bottomRight");break}else a?(h=this._isVertical?"top":"left",f=c+t._LABEL_MARGIN_INSIDE_BAR+u,p-=t._LABEL_MARGIN_INSIDE_BAR+u,d-=t._LABEL_MARGIN_INSIDE_BAR+u):(h=this._isVertical?"bottom":"right",f=c+t._LABEL_MARGIN_INSIDE_BAR+u,d+=c+t._LABEL_MARGIN_INSIDE_BAR);return{containerDimensions:{width:this._isVertical?n.width:f,height:this._isVertical?f:n.height},labelContainerOrigin:{x:this._isVertical?r.x:p,y:this._isVertical?p:r.y},labelOrigin:{x:this._isVertical?r.x+n.width/2-i.width/2:d,y:this._isVertical?d:r.y+n.height/2-i.height/2},alignment:{x:this._isVertical?"center":h,y:this._isVertical?h:"center"}}},t.prototype._createLabelContainer=function(r,n,i,o,a,s){var l=r.append("g").attr("transform","translate("+n.x+", "+n.y+")");if(a){l.classed("on-bar-label",!0);var c=bl.Color.contrast("white",s)*1.6<bl.Color.contrast("black",s);l.classed(c?"dark-label":"light-label",!0)}else l.classed("off-bar-label",!0);return l},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector(),i=this.length().scale,o=i.scale(this.baselineValue()),a=this._isVertical?"y":"x",s=this._isVertical?"height":"width";n[a]=function(){return o},n[s]=function(){return 0},r.push({attrToProjector:n,animator:this._getAnimator(xKt.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(xKt.Animator.MAIN)}),r},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this.length().scale,o=i.scale(this.baselineValue()),a=this._isVertical?"y":"x",s=this._isVertical?"x":"y",l=hB.Plot._scaledAccessor(this.position()),c=hB.Plot._scaledAccessor(this.length()),u=function(d,g,_){return Math.abs(o-c(d,g,_))},h=n[t._BAR_THICKNESS_KEY],f=n.gap,p=f==null?h:function(d,g,_){var y=h(d,g,_);return y<t._BAR_GAPLESS_THRESHOLD_PX?y:y-f(d,g,_)};return n.width=this._isVertical?p:u,n.height=this._isVertical?u:p,n[a]=function(d,g,_){var y=c(d,g,_);return y>o?o:y},n[s]=function(d,g,_){return r._getPositionAttr(l(d,g,_),h(d,g,_))},n},t.prototype._updateThicknessAttr=function(){var r=this,n=this.position(),i=this.barEnd();n!=null&&i!=null?(this._fixedBarPixelThickness=!1,this.attr(t._BAR_THICKNESS_KEY,function(o,a,s){var l=n.accessor(o,a,s),c=i.accessor(o,a,s);return l=n.scale?n.scale.scale(l):l,c=i.scale?i.scale.scale(c):c,Math.abs(c-l)})):(this._fixedBarPixelThickness=!0,this.attr(t._BAR_THICKNESS_KEY,function(){return r._barPixelThickness()}))},t.prototype._barPixelThickness=function(){return this._fixedBarPixelThickness&&this._projectorsReady()?this._computeBarPixelThickness(this.position(),this.datasets(),this._isVertical?this.width():this.height()):0},t.prototype.entities=function(r){if(r===void 0&&(r=this.datasets()),!this._projectorsReady())return[];var n=e.prototype.entities.call(this,r);return n},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset;return this._pixelBounds(n,i,o)},t.prototype._pixelBounds=function(r,n,i){var o=this._getAttrToProjector();return{x:o.x(r,n,i),y:o.y(r,n,i),width:o.width(r,n,i),height:o.height(r,n,i)}},t.prototype._pixelPoint=function(r,n,i){var o=this._pixelBounds(r,n,i),a=(this._isVertical?hB.Plot._scaledAccessor(this.y()):hB.Plot._scaledAccessor(this.x()))(r,n,i),s=(this._isVertical?this.y().scale:this.x().scale).scale(this.baselineValue());return this._pixelPointBar(a,s,o)},t.prototype._pixelPointBar=function(r,n,i){var o,a;return this._isVertical?(o=i.x+i.width/2,a=r<=n?i.y:i.y+i.height):(o=r>=n?i.x+i.width:i.x,a=i.y+i.height/2),{x:o,y:a}},t.prototype._uninstallScaleForKey=function(r,n){e.prototype._uninstallScaleForKey.call(this,r,n)},t.prototype._getDataToDraw=function(){var r=this,n=new bl.Map,i=this._getAttrToProjector(),o=this.width(),a=this.height();return this.datasets().forEach(function(s){var l=s.data().map(function(c,u){var h=r._isDatumOnScreen(i,o,a,c,u,s);return h?c:null});n.set(s,l)}),n},t.prototype._isDatumOnScreen=function(r,n,i,o,a,s){var l=r.x(o,a,s),c=r.y(o,a,s),u=r.width(o,a,s),h=r.height(o,a,s),f=bl.Math.isValidNumber(l)&&bl.Math.isValidNumber(c)&&bl.Math.isValidNumber(u)&&bl.Math.isValidNumber(h);return f?bl.Math.boundsIntersects(l,c,u,h,0,0,n,i):!1},t.prototype.invalidateCache=function(){var r=this;e.prototype.invalidateCache.call(this),this.datasets().forEach(function(n){return r._labelConfig.get(n).measurer.reset()})},t._BAR_THICKNESS_RATIO=.95,t._BAR_GAPLESS_THRESHOLD_PX=3,t._SINGLE_BAR_DIMENSION_RATIO=.4,t._BAR_AREA_CLASS="bar-area",t._BAR_END_KEY="barEnd",t._BAR_THICKNESS_KEY="width",t._LABEL_AREA_CLASS="bar-label-text-area",t._LABEL_MARGIN_INSIDE_BAR=10,t}(iUe.XYPlot);Gu.Bar=Iat;function oUe(e,t,r){var n,i=e.scale;if(i instanceof Pat.Category)n=i.rangeBand();else{var o=e.accessor,a=Aat.set(bl.Array.flatten(t.map(function(c){return c.data().map(function(u,h){return o(u,h,c)}).filter(function(u){return u!=null}).map(function(u){return u.valueOf()})}))).values().map(function(c){return+c});a.sort(function(c,u){return c-u});var s=a.map(function(c){return i.scale(c)}),l=Aat.pairs(s);n=bl.Math.min(l,function(c,u){return Math.abs(c[1]-c[0])},r*Iat._SINGLE_BAR_DIMENSION_RATIO),n*=Iat._BAR_THICKNESS_RATIO}return n}});var wKt=H(kat=>{"use strict";Object.defineProperty(kat,"__esModule",{value:!0});var aUe=(de(),Ut(pe)),sUe=Rs(),lUe=Fe(),bKt=y4(),cUe=ns(),uUe=function(e){aUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._clusterOffsets=new lUe.Map,n}return t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this._makeInnerScale(),o=function(l,c){return i.rangeBand()};n.width=this._isVertical?o:n.width,n.height=this._isVertical?n.height:o;var a=n.x,s=n.y;return n.x=this._isVertical?function(l,c,u){return a(l,c,u)+r._clusterOffsets.get(u)}:function(l,c,u){return a(l,c,u)},n.y=this._isVertical?function(l,c,u){return s(l,c,u)}:function(l,c,u){return s(l,c,u)+r._clusterOffsets.get(u)},n},t.prototype._updateClusterPosition=function(){var r=this,n=this._makeInnerScale();this.datasets().forEach(function(i,o){return r._clusterOffsets.set(i,n.scale(String(o))-n.rangeBand()/2)})},t.prototype._makeInnerScale=function(){var r=new sUe.Category;r.domain(this.datasets().map(function(i,o){return String(o)}));var n=cUe.Plot._scaledAccessor(this.attr(bKt.Bar._BAR_THICKNESS_KEY));return r.range([0,n(null,0,null)]),r},t.prototype._getDataToDraw=function(){return this._updateClusterPosition(),e.prototype._getDataToDraw.call(this)},t}(bKt.Bar);kat.ClusteredBar=uUe});var SKt=H(Nat=>{"use strict";Object.defineProperty(Nat,"__esModule",{value:!0});var hUe=(de(),Ut(pe)),v4=(Er(),Ut(Mr)),Rat=yl(),fUe=kf(),pUe=Bu(),dUe=Rs(),Uv=Fe(),mUe=fat(),gUe=dat(),_Ue=Uu(),yUe=AF(),Ed=ns(),vUe=function(e){hUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._startAngle=0,r._endAngle=2*Math.PI,r._labelFormatter=pUe.identity(),r._labelsEnabled=!1,r.innerRadius(0),r.outerRadius(function(){var n=r._pieCenter();return Math.min(Math.max(r.width()-n.x,n.x),Math.max(r.height()-n.y,n.y))}),r.addClass("pie-plot"),r.attr("fill",function(n,i){return String(i)},new dUe.Color),r._strokeDrawers=new Uv.Map,r}return t.prototype._setup=function(){var r=this;e.prototype._setup.call(this),this._strokeDrawers.forEach(function(n){return n.attachTo(r._renderArea)})},t.prototype.computeLayout=function(r,n,i){e.prototype.computeLayout.call(this,r,n,i);var o=this._pieCenter();this._renderArea.attr("transform","translate("+o.x+","+o.y+")");var a=Math.min(Math.max(this.width()-o.x,o.x),Math.max(this.height()-o.y,o.y));return this.innerRadius().scale!=null&&this.innerRadius().scale.range([0,a]),this.outerRadius().scale!=null&&this.outerRadius().scale.range([0,a]),this},t.prototype.addDataset=function(r){return e.prototype.addDataset.call(this,r),this},t.prototype._addDataset=function(r){if(this.datasets().length===1)return Uv.Window.warn("Only one dataset is supported in Pie plots"),this;this._updatePieAngles(),e.prototype._addDataset.call(this,r);var n=new gUe.ArcOutlineSVGDrawer;return this._isSetup&&n.attachTo(this._renderArea),this._strokeDrawers.set(r,n),this},t.prototype.removeDataset=function(r){return e.prototype.removeDataset.call(this,r),this},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r),this._strokeDrawers.get(r).remove()},t.prototype._removeDataset=function(r){return e.prototype._removeDataset.call(this,r),this._strokeDrawers.delete(r),this._startAngles=[],this._endAngles=[],this},t.prototype.selections=function(r){var n=this;r===void 0&&(r=this.datasets());var i=e.prototype.selections.call(this,r).nodes();return r.forEach(function(o){var a=n._strokeDrawers.get(o);a!=null&&i.push.apply(i,a.getVisualPrimitives())}),v4.selectAll(i)},t.prototype._onDatasetUpdate=function(){e.prototype._onDatasetUpdate.call(this),this._updatePieAngles(),this.render()},t.prototype._createDrawer=function(){return new _Ue.ProxyDrawer(function(){return new mUe.ArcSVGDrawer},function(){return yUe.warn("canvas renderer is not supported on Pie Plot!"),null})},t.prototype.entities=function(r){var n=this;r===void 0&&(r=this.datasets());var i=e.prototype.entities.call(this,r);return i.map(function(o){o.position.x+=n.width()/2,o.position.y+=n.height()/2;var a=v4.select(n._strokeDrawers.get(o.dataset).getVisualPrimitiveAtIndex(o.index)),s=o;return s.strokeSelection=a,s})},t.prototype.sectorValue=function(r,n){return r==null?this._propertyBindings.get(t._SECTOR_VALUE_KEY):(this._bindProperty(t._SECTOR_VALUE_KEY,r,n),this._updatePieAngles(),this.render(),this)},t.prototype.innerRadius=function(r,n){return r==null?this._propertyBindings.get(t._INNER_RADIUS_KEY):(this._bindProperty(t._INNER_RADIUS_KEY,r,n),this.render(),this)},t.prototype.outerRadius=function(r,n){return r==null?this._propertyBindings.get(t._OUTER_RADIUS_KEY):(this._bindProperty(t._OUTER_RADIUS_KEY,r,n),this.render(),this)},t.prototype.startAngle=function(r){return r==null?this._startAngle:(this._startAngle=r,this._updatePieAngles(),this.render(),this)},t.prototype.endAngle=function(r){return r==null?this._endAngle:(this._endAngle=r,this._updatePieAngles(),this.render(),this)},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this.render(),this)},t.prototype.labelFormatter=function(r){return r==null?this._labelFormatter:(this._labelFormatter=r,this.render(),this)},t.prototype.entitiesAt=function(r){var n={x:this.width()/2,y:this.height()/2},i={x:r.x-n.x,y:r.y-n.y},o=this._sliceIndexForPoint(i);return o==null?[]:[this.entities()[o]]},t.prototype._propertyProjectors=function(){var r=this,n=e.prototype._propertyProjectors.call(this),i=Ed.Plot._scaledAccessor(this.innerRadius()),o=Ed.Plot._scaledAccessor(this.outerRadius());return n.d=function(a,s,l){return v4.arc().innerRadius(i(a,s,l)).outerRadius(o(a,s,l)).startAngle(r._startAngles[s]).endAngle(r._endAngles[s])(a,s)},n},t.prototype._updatePieAngles=function(){if(this.sectorValue()!=null&&this.datasets().length!==0){var r=Ed.Plot._scaledAccessor(this.sectorValue()),n=this.datasets()[0],i=this._getDataToDraw().get(n),o=v4.pie().sort(null).startAngle(this._startAngle).endAngle(this._endAngle).value(function(a,s){return r(a,s,n)})(i);this._startAngles=o.map(function(a){return a.startAngle}),this._endAngles=o.map(function(a){return a.endAngle})}},t.prototype._pieCenter=function(){var r=this._startAngle<this._endAngle?this._startAngle:this._endAngle,n=this._startAngle<this._endAngle?this._endAngle:this._startAngle,i=Math.sin(r),o=Math.cos(r),a=Math.sin(n),s=Math.cos(n),l,c,u,h;return i>=0&&a>=0?o>=0&&s>=0?(l=o,c=0,h=0,u=a):o<0&&s<0?(l=0,c=-s,h=0,u=i):o>=0&&s<0?(l=o,c=-s,h=0,u=i):o<0&&s>=0&&(l=1,c=1,h=1,u=Math.max(i,a)):i>=0&&a<0?o>=0&&s>=0?(l=Math.max(o,s),c=1,h=1,u=1):o<0&&s<0?(l=0,c=1,h=-a,u=i):o>=0&&s<0?(l=o,c=1,h=-a,u=1):o<0&&s>=0&&(l=s,c=1,h=1,u=i):i<0&&a>=0?o>=0&&s>=0?(l=1,c=0,h=-i,u=a):o<0&&s<0?(l=1,c=Math.max(-o,-s),h=1,u=1):o>=0&&s<0?(l=1,c=-s,h=-i,u=1):o<0&&s>=0&&(l=1,c=-o,h=1,u=a):i<0&&a<0&&(o>=0&&s>=0?(l=s,c=0,h=-i,u=0):o<0&&s<0?(l=0,c=-o,h=-a,u=0):o>=0&&s<0?(l=1,c=1,h=Math.max(o,-s),u=1):o<0&&s>=0&&(l=s,c=-o,h=1,u=0)),{x:h+u==0?0:h/(h+u)*this.width(),y:l+c==0?0:l/(l+c)*this.height()}},t.prototype._getDataToDraw=function(){var r=e.prototype._getDataToDraw.call(this);if(this.datasets().length===0)return r;var n=Ed.Plot._scaledAccessor(this.sectorValue()),i=this.datasets()[0],o=r.get(i),a=o.filter(function(s,l){return t._isValidData(n(s,l,i))});return r.set(i,a),r},t._isValidData=function(r){return Uv.Math.isValidNumber(r)&&r>=0},t.prototype._pixelPoint=function(r,n,i){var o=Ed.Plot._scaledAccessor(this.sectorValue());if(!t._isValidData(o(r,n,i)))return{x:NaN,y:NaN};var a=Ed.Plot._scaledAccessor(this.innerRadius())(r,n,i),s=Ed.Plot._scaledAccessor(this.outerRadius())(r,n,i),l=(a+s)/2,c=v4.pie().sort(null).value(function(p,d){var g=o(p,d,i);return t._isValidData(g)?g:0}).startAngle(this._startAngle).endAngle(this._endAngle)(i.data()),u=c[n].startAngle,h=c[n].endAngle,f=(u+h)/2;return{x:l*Math.sin(f),y:-l*Math.cos(f)}},t.prototype._additionalPaint=function(r){var n=this;this._renderArea.select(".label-area").remove(),this._labelsEnabled&&Uv.Window.setTimeout(function(){return n._drawLabels()},r);var i=this._generateStrokeDrawSteps(),o=this._getDataToDraw();this.datasets().forEach(function(a){var s=Ed.Plot.applyDrawSteps(i,a);n._strokeDrawers.get(a).draw(o.get(a),s)})},t.prototype._generateStrokeDrawSteps=function(){var r=this._getAttrToProjector();return[{attrToProjector:r,animator:new fUe.Null}]},t.prototype._sliceIndexForPoint=function(r){var n=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),i=Math.acos(-r.y/n);r.x<0&&(i=Math.PI*2-i);for(var o,a=0;a<this._startAngles.length;a++)if(this._startAngles[a]<i&&this._endAngles[a]>i){o=a;break}if(o!==void 0){var s=this.datasets()[0],l=s.data()[o],c=this.innerRadius().accessor(l,o,s),u=this.outerRadius().accessor(l,o,s);if(n>c&&n<u)return o}return null},t.prototype._drawLabels=function(){for(var r=this,n=this._getAttrToProjector(),i=this._renderArea.append("g").classed("label-area",!0),o=new Rat.SvgContext(i.node()),a=new Rat.CacheMeasurer(o),s=new Rat.Writer(a,o),l=this.datasets()[0],c=this._getDataToDraw().get(l),u=c.length,h=function(d){var g=c[d],_=f.sectorValue().accessor(g,d,l);if(!Uv.Math.isValidNumber(_))return"continue";_=f._labelFormatter(_,g,d,l);var y=a.measure(_),x=(f._endAngles[d]+f._startAngles[d])/2,b=f.outerRadius().accessor(g,d,l);f.outerRadius().scale&&(b=f.outerRadius().scale.scale(b));var S=f.innerRadius().accessor(g,d,l);f.innerRadius().scale&&(S=f.innerRadius().scale.scale(S));var C=(b+S)/2,P=Math.sin(x)*C-y.width/2,k=-Math.cos(x)*C-y.height/2,O=[{x:P,y:k},{x:P,y:k+y.height},{x:P+y.width,y:k},{x:P+y.width,y:k+y.height}],D=O.every(function(z){return Math.abs(z.x)<=r.width()/2&&Math.abs(z.y)<=r.height()/2});if(D){var B=O.map(function(z){return r._sliceIndexForPoint(z)});D=B.every(function(z){return z===d})}var I=n.fill(g,d,l),L=Uv.Color.contrast("white",I)*1.6<Uv.Color.contrast("black",I),R=i.append("g").attr("transform","translate("+P+","+k+")"),F=L?"dark-label":"light-label";R.classed(F,!0),R.style("visibility",D?"inherit":"hidden"),s.write(_,y.width,y.height,{xAlign:"center",yAlign:"center"},R.node())},f=this,p=0;p<u;p++)h(p)},t._INNER_RADIUS_KEY="inner-radius",t._OUTER_RADIUS_KEY="outer-radius",t._SECTOR_VALUE_KEY="sector-value",t}(Ed.Plot);Nat.Pie=vUe});var MKt=H(Oat=>{"use strict";Object.defineProperty(Oat,"__esModule",{value:!0});var xUe=(de(),Ut(pe)),bUe=(Er(),Ut(Mr)),Dat=yl(),wUe=kf(),SUe=Hv(),MUe=Uu(),EUe=oB(),fB=Rs(),Oc=Fe(),pB=ns(),TUe=Vv(),CUe=function(e){xUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._labelsEnabled=!1,r._label=null,r.animator("rectangles",new wUe.Null),r.addClass("rectangle-plot"),r.attr("fill",new fB.Color().range()[0]),r}return t.prototype._createDrawer=function(){return new MUe.ProxyDrawer(function(){return new EUe.RectangleSVGDrawer},function(r){return new SUe.RectangleCanvasDrawer(r)})},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=pB.Plot._scaledAccessor(this.x()),o=n[t._X2_KEY],a=pB.Plot._scaledAccessor(this.y()),s=n[t._Y2_KEY],l=this.x().scale,c=this.y().scale;return o!=null?(n.width=function(u,h,f){return Math.abs(o(u,h,f)-i(u,h,f))},n.x=function(u,h,f){return Math.min(o(u,h,f),i(u,h,f))}):(n.width=function(u,h,f){return r._rectangleWidth(l)},n.x=function(u,h,f){return i(u,h,f)-.5*n.width(u,h,f)}),s!=null?(n.height=function(u,h,f){return Math.abs(s(u,h,f)-a(u,h,f))},n.y=function(u,h,f){return Math.max(s(u,h,f),a(u,h,f))-n.height(u,h,f)}):(n.height=function(u,h,f){return r._rectangleWidth(c)},n.y=function(u,h,f){return a(u,h,f)-.5*n.height(u,h,f)}),delete n[t._X2_KEY],delete n[t._Y2_KEY],n},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:this._getAnimator("rectangles")}]},t.prototype._filterForProperty=function(r){return r==="x2"?e.prototype._filterForProperty.call(this,"x"):r==="y2"?e.prototype._filterForProperty.call(this,"y"):e.prototype._filterForProperty.call(this,r)},t.prototype.x=function(r,n,i){if(r==null)return e.prototype.x.call(this);if(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n,i),n!=null){var o=this.x2(),a=o&&o.accessor;a!=null&&this._bindProperty(t._X2_KEY,a,n,o.postScale)}return n instanceof fB.Category&&n.innerPadding(0).outerPadding(0),this},t.prototype.x2=function(r,n){if(r==null)return this._propertyBindings.get(t._X2_KEY);var i=this.x(),o=i&&i.scale;return this._bindProperty(t._X2_KEY,r,o,n),this.render(),this},t.prototype.y=function(r,n,i){if(r==null)return e.prototype.y.call(this);if(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n,i),n!=null){var o=this.y2(),a=o&&o.accessor;a!=null&&this._bindProperty(t._Y2_KEY,a,n,o.postScale)}return n instanceof fB.Category&&n.innerPadding(0).outerPadding(0),this},t.prototype.y2=function(r,n){if(r==null)return this._propertyBindings.get(t._Y2_KEY);var i=this.y(),o=i&&i.scale;return this._bindProperty(t._Y2_KEY,r,o,n),this.render(),this},t.prototype.entitiesAt=function(r){var n=this._getAttrToProjector();return this.entities().filter(function(i){var o=i.datum,a=i.index,s=i.dataset,l=n.x(o,a,s),c=n.y(o,a,s),u=n.width(o,a,s),h=n.height(o,a,s);return l<=r.x&&r.x<=l+u&&c<=r.y&&r.y<=c+h})},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset;return this._entityBBox(n,i,o,this._getAttrToProjector())},t.prototype._entityBBox=function(r,n,i,o){return{x:o.x(r,n,i),y:o.y(r,n,i),width:o.width(r,n,i),height:o.height(r,n,i)}},t.prototype.label=function(r){return r==null?this._label:(this._label=r,this.render(),this)},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this.render(),this)},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return this.x2()!=null&&(r.x2=pB.Plot._scaledAccessor(this.x2())),this.y2()!=null&&(r.y2=pB.Plot._scaledAccessor(this.y2())),r},t.prototype._pixelPoint=function(r,n,i){var o=this._getAttrToProjector(),a=o.x(r,n,i),s=o.y(r,n,i),l=o.width(r,n,i),c=o.height(r,n,i),u=a+l/2,h=s+c/2;return{x:u,y:h}},t.prototype._rectangleWidth=function(r){if(r instanceof fB.Category)return r.rangeBand();var n=r===this.x().scale?this.x().accessor:this.y().accessor,i=bUe.set(Oc.Array.flatten(this.datasets().map(function(c){return c.data().map(function(u,h){return n(u,h,c).valueOf()})}))).values().map(function(c){return+c}),o=Oc.Math.min(i,0),a=Oc.Math.max(i,0),s=r.scale(o),l=r.scale(a);return(l-s)/Math.abs(a-o)},t.prototype._getDataToDraw=function(){var r=new Oc.Map,n=this._getAttrToProjector();return this.datasets().forEach(function(i){var o=i.data().map(function(a,s){var l=Oc.Math.isValidNumber(n.x(a,s,i))&&Oc.Math.isValidNumber(n.y(a,s,i))&&Oc.Math.isValidNumber(n.width(a,s,i))&&Oc.Math.isValidNumber(n.height(a,s,i));return l?a:null});r.set(i,o)}),r},t.prototype._additionalPaint=function(r){var n=this;this._renderArea.selectAll(".label-area").remove(),this._labelsEnabled&&this.label()!=null&&Oc.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw();this.datasets().forEach(function(i,o){return r._drawLabel(n,i,o)})},t.prototype._drawLabel=function(r,n,i){for(var o=this._getAttrToProjector(),a=this._renderArea.append("g").classed("label-area",!0),s=new Dat.SvgContext(a.node()),l=new Dat.CacheMeasurer(s),c=new Dat.Writer(l,s),u=this.x().scale.range(),h=this.y().scale.range(),f=Math.min.apply(null,u),p=Math.max.apply(null,u),d=Math.min.apply(null,h),g=Math.max.apply(null,h),_=r.get(n),y=_.length,x=0;x<y;x++){var b=_[x];if(b!=null){var S=""+this.label()(b,x,n),C=l.measure(S),P=o.x(b,x,n),k=o.y(b,x,n),O=o.width(b,x,n),D=o.height(b,x,n);if(C.height<=D&&C.width<=O){var B=(O-C.width)/2,I=(D-C.height)/2;P+=B,k+=I;var L={min:P,max:P+C.width},R={min:k,max:k+C.height};if(L.min<f||L.max>p||R.min<d||R.max>g||this._overlayLabel(L,R,x,i,r))continue;var F=o.fill(b,x,n),z=Oc.Color.contrast("white",F)*1.6<Oc.Color.contrast("black",F),U=a.append("g").attr("transform","translate("+P+","+k+")"),W=z?"dark-label":"light-label";U.classed(W,!0),c.write(S,C.width,C.height,{xAlign:"center",yAlign:"center"},U.node())}}}},t.prototype._overlayLabel=function(r,n,i,o,a){for(var s=this._getAttrToProjector(),l=this.datasets(),c=o;c<l.length;c++)for(var u=l[c],h=a.get(u),f=h.length,p=c===o?i+1:0;p<f;p++)if(Oc.DOM.intersectsBBox(r,n,this._entityBBox(h[p],p,u,s)))return!0;return!1},t._X2_KEY="x2",t._Y2_KEY="y2",t}(TUe.XYPlot);Oat.Rectangle=CUe});var TKt=H(Hat=>{"use strict";Object.defineProperty(Hat,"__esModule",{value:!0});var AUe=(de(),Ut(pe)),zat=yl(),PUe=Bu(),IUe=XF(),LUe=Uu(),EKt=vat(),kUe=kf(),RUe=Hv(),NUe=Rs(),Fat=Fe(),Bat=IS(),wl=ns(),DUe=Vv(),OUe=function(e){AUe.__extends(t,e);function t(){var r=e.call(this)||this;r._labelFormatter=PUe.identity(),r._labelsEnabled=!1,r.addClass("scatter-plot");var n=new kUe.Easing;n.startDelay(5),n.stepDuration(250),n.maxTotalDuration(wl.Plot._ANIMATION_MAX_DURATION),r.animator(Bat.Animator.MAIN,n),r.attr("opacity",.6),r.attr("fill",new NUe.Color().range()[0]),r.size(6);var i=IUe.circle();return r.symbol(function(){return i}),r._labelConfig=new Fat.Map,r}return t.prototype._buildLightweightPlotEntities=function(r){var n=this,i=e.prototype._buildLightweightPlotEntities.call(this,r);return i.map(function(o){var a=wl.Plot._scaledAccessor(n.size())(o.datum,o.index,o.dataset);return o.diameter=a,o})},t.prototype._createDrawer=function(r){var n=this;return new LUe.ProxyDrawer(function(){return new EKt.SymbolSVGDrawer},function(i){return new RUe.CanvasDrawer(i,EKt.makeSymbolCanvasDrawStep(r,function(){return wl.Plot._scaledAccessor(n.symbol())},function(){return wl.Plot._scaledAccessor(n.size())}))})},t.prototype.size=function(r,n){return r==null?this._propertyBindings.get(t._SIZE_KEY):(this._bindProperty(t._SIZE_KEY,r,n),this.render(),this)},t.prototype.symbol=function(r){return r==null?this._propertyBindings.get(t._SYMBOL_KEY):(this._propertyBindings.set(t._SYMBOL_KEY,{accessor:r}),this.render(),this)},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector(),i=wl.Plot._scaledAccessor(this.symbol());n.d=function(o,a,s){return i(o,a,s)(0)(null)},r.push({attrToProjector:n,animator:this._getAnimator(Bat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(Bat.Animator.MAIN)}),r},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=wl.Plot._scaledAccessor(this.x()),i=wl.Plot._scaledAccessor(this.y());return r.x=n,r.y=i,r.transform=function(o,a,s){return"translate("+n(o,a,s)+","+i(o,a,s)+")"},r.d=this._constructSymbolGenerator(),r},t.prototype._constructSymbolGenerator=function(){var r=wl.Plot._scaledAccessor(this.symbol()),n=wl.Plot._scaledAccessor(this.size());return function(i,o,a){return r(i,o,a)(n(i,o,a))(null)}},t.prototype._entityBounds=function(r){return{x:r.position.x-r.diameter/2,y:r.position.y-r.diameter/2,width:r.diameter,height:r.diameter}},t.prototype._entityVisibleOnPlot=function(r,n){var i={min:n.topLeft.x,max:n.bottomRight.x},o={min:n.topLeft.y,max:n.bottomRight.y},a=this._entityBounds(r);return Fat.DOM.intersectsBBox(i,o,a)},t.prototype.entitiesAt=function(r){var n=wl.Plot._scaledAccessor(this.x()),i=wl.Plot._scaledAccessor(this.y()),o=wl.Plot._scaledAccessor(this.size());return this.entities().filter(function(a){var s=a.datum,l=a.index,c=a.dataset,u=n(s,l,c),h=i(s,l,c),f=o(s,l,c);return u-f/2<=r.x&&r.x<=u+f/2&&h-f/2<=r.y&&r.y<=h+f/2})},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r),i=this._renderArea.append("g").classed(t._LABEL_AREA_CLASS,!0),o=new zat.SvgContext(i.node()),a=new zat.CacheMeasurer(o),s=new zat.Writer(a,o);return this._labelConfig.set(r,{labelArea:i,measurer:a,writer:s}),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r);var n=this._labelConfig.get(r);n!=null&&(n.labelArea.remove(),this._labelConfig.delete(r))},t.prototype._additionalPaint=function(r){var n=this;this.datasets().forEach(function(i){return n._labelConfig.get(i).labelArea.selectAll("g").remove()}),this._labelsEnabled&&Fat.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw(),i=this._getAttrToProjector();this.datasets().forEach(function(o){for(var a=n.get(o),s=a.length,l=0;l<s;l++){var c=a[l];c!=null&&r._drawLabel(c,l,o,i)}})},t.prototype._drawLabel=function(r,n,i,o){if(r.label!=null){var a=this._labelConfig.get(i),s=a.labelArea,l=a.measurer,c=a.writer,u={x:o.x(r,n,i),y:o.y(r,n,i)},h=wl.Plot._scaledAccessor(this.size()),f=h(r,n,i),p=this._labelFormatter(r.label,r,n,i),d=l.measure(p),g=this._calculateLabelProperties(u,f,d),_=g.containerDimensions,y=g.labelContainerOrigin,x=g.labelOrigin,b=g.alignment,S=this._createLabelContainer(s,y,x,d),C={xAlign:b.x,yAlign:b.y};c.write(p,_.width,_.height,C,S.node())}},t.prototype._calculateLabelProperties=function(r,n,i){var o=n<i.height?n/2+t._LABEL_MARGIN_FROM_BUBBLE:0;return{containerDimensions:{width:i.width,height:i.height},labelContainerOrigin:{x:r.x-i.width/2,y:r.y-i.height/2+o},labelOrigin:{x:r.x,y:r.y},alignment:{x:"center",y:"center"}}},t.prototype._createLabelContainer=function(r,n,i,o){var a=r.append("g").attr("transform","translate("+n.x+", "+n.y+")");return a.classed("on-bar-label",!0),a},t._SIZE_KEY="size",t._SYMBOL_KEY="symbol",t._LABEL_AREA_CLASS="scatter-label-text-area",t._LABEL_MARGIN_FROM_BUBBLE=15,t}(DUe.XYPlot);Hat.Scatter=OUe});var CKt=H(Vat=>{"use strict";Object.defineProperty(Vat,"__esModule",{value:!0});var zUe=(de(),Ut(pe)),FUe=kf(),BUe=Uu(),HUe=_at(),VUe=Rs(),UUe=AF(),LS=ns(),qUe=Vv(),GUe=function(e){zUe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("segment-plot"),r.attr("stroke",new VUe.Color().range()[0]),r.attr("stroke-width","2px"),r}return t.prototype._createDrawer=function(){return new BUe.ProxyDrawer(function(){return new HUe.SegmentSVGDrawer},function(){return UUe.warn("canvas renderer is not supported on Segment Plot!"),null})},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:new FUe.Null}]},t.prototype._filterForProperty=function(r){return r==="x2"?e.prototype._filterForProperty.call(this,"x"):r==="y2"?e.prototype._filterForProperty.call(this,"y"):e.prototype._filterForProperty.call(this,r)},t.prototype.x=function(r,n){if(r==null)return e.prototype.x.call(this);if(n==null)e.prototype.x.call(this,r);else{e.prototype.x.call(this,r,n);var i=this.x2(),o=i&&i.accessor;o!=null&&this._bindProperty(t._X2_KEY,o,n)}return this},t.prototype.x2=function(r){if(r==null)return this._propertyBindings.get(t._X2_KEY);var n=this.x(),i=n&&n.scale;return this._bindProperty(t._X2_KEY,r,i),this.render(),this},t.prototype.y=function(r,n){if(r==null)return e.prototype.y.call(this);if(n==null)e.prototype.y.call(this,r);else{e.prototype.y.call(this,r,n);var i=this.y2(),o=i&&i.accessor;o!=null&&this._bindProperty(t._Y2_KEY,o,n)}return this},t.prototype.y2=function(r){if(r==null)return this._propertyBindings.get(t._Y2_KEY);var n=this.y(),i=n&&n.scale;return this._bindProperty(t._Y2_KEY,r,i),this.render(),this},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return r.x1=LS.Plot._scaledAccessor(this.x()),r.x2=this.x2()==null?LS.Plot._scaledAccessor(this.x()):LS.Plot._scaledAccessor(this.x2()),r.y1=LS.Plot._scaledAccessor(this.y()),r.y2=this.y2()==null?LS.Plot._scaledAccessor(this.y()):LS.Plot._scaledAccessor(this.y2()),r},t.prototype.entitiesAt=function(r){var n=this.entityNearest(r);return n!=null?[n]:[]},t.prototype.entitiesIn=function(r,n){var i,o;if(n==null){var a=r;i={min:a.topLeft.x,max:a.bottomRight.x},o={min:a.topLeft.y,max:a.bottomRight.y}}else i=r,o=n;return this._entitiesIntersecting(i,o)},t.prototype._entitiesIntersecting=function(r,n){for(var i=[],o=this._getAttrToProjector(),a=this.entities(),s=a.length,l=0;l<s;l++){var c=a[l];this._lineIntersectsBox(c,r,n,o)&&i.push(c)}return i},t.prototype._lineIntersectsBox=function(r,n,i,o){var a=this,s=o.x1(r.datum,r.index,r.dataset),l=o.x2(r.datum,r.index,r.dataset),c=o.y1(r.datum,r.index,r.dataset),u=o.y2(r.datum,r.index,r.dataset);if(n.min<=s&&s<=n.max&&i.min<=c&&c<=i.max||n.min<=l&&l<=n.max&&i.min<=u&&u<=i.max)return!0;var h={x:s,y:c},f={x:l,y:u},p=[{x:n.min,y:i.min},{x:n.min,y:i.max},{x:n.max,y:i.max},{x:n.max,y:i.min}],d=p.filter(function(g,_){return _!==0?a._lineIntersectsSegment(h,f,g,p[_-1])&&a._lineIntersectsSegment(g,p[_-1],h,f):!1});return d.length>0},t.prototype._lineIntersectsSegment=function(r,n,i,o){var a=function(s,l,c){return(l.x-s.x)*(c.y-l.y)-(l.y-s.y)*(c.x-l.x)};return a(r,n,i)*a(r,n,o)<0},t._X2_KEY="x2",t._Y2_KEY="y2",t}(qUe.XYPlot);Vat.Segment=GUe});var IKt=H(Uat=>{"use strict";Object.defineProperty(Uat,"__esModule",{value:!0});var WUe=(de(),Ut(pe)),AKt=(Er(),Ut(Mr)),YUe=kf(),PKt=CS(),e0=Fe(),jUe=Tat(),XUe=ns(),$Ue=function(e){WUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._stackingResult=PKt.memThunk(function(){return r.datasets()},function(){return r.x().accessor},function(){return r.y().accessor},function(){return r._stackingOrder},function(n,i,o,a){return e0.Stacking.stack(n,i,o,a)}),r._stackedExtent=PKt.memThunk(r._stackingResult,function(){return r.x().accessor},function(){return r._filterForProperty("y")},function(n,i,o){return e0.Stacking.stackedExtent(n,i,o)}),r._baselineValue=0,r._stackingOrder="bottomup",r.addClass("stacked-area-plot"),r._baselineValueProvider=function(){return[r._baselineValue]},r.croppedRenderingEnabled(!1),r}return t.prototype.croppedRenderingEnabled=function(r){return r==null?e.prototype.croppedRenderingEnabled.call(this):r?(e0.Window.warn("Warning: Stacked Area Plot does not support cropped rendering."),this):e.prototype.croppedRenderingEnabled.call(this,r)},t.prototype._getAnimator=function(r){return new YUe.Null},t.prototype._setup=function(){e.prototype._setup.call(this),this._baseline=this._renderArea.append("line").classed("baseline",!0)},t.prototype.x=function(r,n){return r==null?e.prototype.x.call(this):(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n),this._checkSameDomain(),this)},t.prototype.y=function(r,n){return r==null?e.prototype.y.call(this):(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),this._checkSameDomain(),this)},t.prototype.yOffset=function(r,n){var i=this._stackingResult();if(i!=null){var o=i.get(r);if(o!=null){var a=o.get(String(n));if(a!=null)return a.offset}}},t.prototype.stackingOrder=function(r){return r==null?this._stackingOrder:(this._stackingOrder=r,this._onDatasetUpdate(),this)},t.prototype.downsamplingEnabled=function(r){return r==null?e.prototype.downsamplingEnabled.call(this):(e0.Window.warn("Warning: Stacked Area Plot does not support downsampling"),this)},t.prototype._additionalPaint=function(){var r=this.y().scale.scale(this._baselineValue),n={x1:0,y1:r,x2:this.width(),y2:r};this._getAnimator("baseline").animate(this._baseline,n)},t.prototype._updateYScale=function(){var r=this.y(),n=r&&r.scale;n!=null&&(n.addPaddingExceptionsProvider(this._baselineValueProvider),n.addIncludedValuesProvider(this._baselineValueProvider))},t.prototype._onDatasetUpdate=function(){return this._checkSameDomain(),e.prototype._onDatasetUpdate.call(this),this},t.prototype.getExtentsForProperty=function(r){var n="y";return r===n?[this._stackedExtent()]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype._checkSameDomain=function(){if(!!this._projectorsReady()){var r=this.datasets(),n=this.x().accessor,i=r.map(function(a){return AKt.set(a.data().map(function(s,l){return e0.Stacking.normalizeKey(n(s,l,a))})).values()}),o=t._domainKeys(r,n);i.some(function(a){return a.length!==o.length})&&e0.Window.warn("the domains across the datasets are not the same. Plot may produce unintended behavior.")}},t._domainKeys=function(r,n){var i=AKt.set();return r.forEach(function(o){for(var a=o.data(),s=a.length,l=0;l<s;l++){var c=a[l];i.add(n(c,l,o))}}),i.values()},t.prototype._coordinateProjectors=function(){var r=this,n=XUe.Plot._scaledAccessor(this.x()),i=this.y().accessor,o=this.x().accessor,a=function(u,h,f){return e0.Stacking.normalizeKey(o(u,h,f))},s=this._stackingResult(),l=function(u,h,f){var p=+i(u,h,f),d=s.get(f).get(a(u,h,f)).offset;return r.y().scale.scale(p+d)},c=function(u,h,f){var p=s.get(f).get(a(u,h,f)).offset;return r.y().scale.scale(p)};return[n,l,c]},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=this._coordinateProjectors(),i=n[0],o=n[1],a=n[2];return r.d=this._constructAreaProjector(i,o,a),r},t.prototype._pixelPoint=function(r,n,i){var o=e.prototype._pixelPoint.call(this,r,n,i),a=this.x().accessor(r,n,i),s=this.y().accessor(r,n,i),l=this.y().scale.scale(+s+this._stackingResult().get(i).get(e0.Stacking.normalizeKey(a)).offset);return{x:o.x,y:l}},t}(jUe.Area);Uat.StackedArea=$Ue});var kKt=H(Wat=>{"use strict";Object.defineProperty(Wat,"__esModule",{value:!0});var KUe=(de(),Ut(pe)),qat=yl(),ZUe=Bu(),LKt=CS(),dB=Fe(),Gat=y4(),JUe=ns(),QUe=function(e){KUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._extremaFormatter=ZUe.identity(),n._stackingResult=LKt.memThunk(function(){return n.datasets()},function(){return n.position().accessor},function(){return n.length().accessor},function(){return n._stackingOrder},function(i,o,a,s){return dB.Stacking.stack(i,o,a,s)}),n._stackedExtent=LKt.memThunk(n._stackingResult,function(){return n.position().accessor},function(){return n._filterForProperty(n._isVertical?"y":"x")},function(i,o,a){return dB.Stacking.stackedExtent(i,o,a)}),n.addClass("stacked-bar-plot"),n._stackingOrder="bottomup",n}return t.prototype.stackingOrder=function(r){return r==null?this._stackingOrder:(this._stackingOrder=r,this._onDatasetUpdate(),this)},t.prototype.extremaFormatter=function(r){return arguments.length===0?this._extremaFormatter:(this._extremaFormatter=r,this.render(),this)},t.prototype._setup=function(){e.prototype._setup.call(this),this._labelArea=this._renderArea.append("g").classed(Gat.Bar._LABEL_AREA_CLASS,!0);var r=new qat.SvgContext(this._labelArea.node());this._measurer=new qat.CacheMeasurer(r),this._writer=new qat.Writer(this._measurer,r)},t.prototype._drawLabels=function(){var r=this;e.prototype._drawLabels.call(this),this._labelArea.selectAll("g").remove();var n=+this.baselineValue(),i=this.position().scale,o=this.length().scale,a=dB.Stacking.stackedExtents(this._stackingResult()),s=a.maximumExtents,l=a.minimumExtents,c=[],u=function(f,p,d){var g=p.topLeft,_=g.x,y=g.y,x=p.bottomRight.x-p.topLeft.x,b=p.bottomRight.y-p.topLeft.y,S=r._isVertical?x>d:b>d;if(!S){var C=r._labelArea.append("g").attr("transform","translate("+_+", "+y+")");C.classed("stacked-bar-label",!0);var P={xAlign:"center",yAlign:"center"};r._writer.write(f,x,b,P,C.node())}return S},h=function(f,p){var d=r._generateAttrToProjector(),g=r.width(),_=r.height();f.forEach(function(y){if(y.extent!==n){var x=r.extremaFormatter()(y.extent),b=r._measurer.measure(x),S=y.stackedDatum,C=S.originalDatum,P=S.originalIndex,k=S.originalDataset;if(!r._isDatumOnScreen(d,g,_,C,P,k))return;var O=JUe.Plot._scaledAccessor(r.attr(Gat.Bar._BAR_THICKNESS_KEY))(C,P,k),D=o.scale(y.extent),B=r._getPositionAttr(i.scale(y.axisValue),O)+O/2,I=r._isVertical?{x:B,y:D}:{x:D,y:B},L=p(I,b,O),R=u(x,{topLeft:L,bottomRight:{x:L.x+b.width,y:L.y+b.height}},O);c.push(R)}})};h(s,function(f,p,d){var g=r._isVertical?p.width:p.height,_=r._isVertical?p.height:p.width;return{x:r._isVertical?f.x-g/2:f.x+t._EXTREMA_LABEL_MARGIN_FROM_BAR,y:r._isVertical?f.y-_:f.y-g/2}}),h(l,function(f,p,d){var g=r._isVertical?p.width:p.height,_=r._isVertical?p.height:p.width;return{x:r._isVertical?f.x-g/2:f.x-_,y:r._isVertical?f.y+t._EXTREMA_LABEL_MARGIN_FROM_BAR:f.y-g/2}}),c.some(function(f){return f})&&this._labelArea.selectAll("g").remove()},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this._isVertical?"y":"x",o=this.length().scale,a=this.length().accessor,s=this.position().accessor,l=function(d,g,_){return dB.Stacking.normalizeKey(s(d,g,_))},c=this._stackingResult(),u=function(d,g,_){return o.scale(c.get(_).get(l(d,g,_)).offset)},h=function(d,g,_){return o.scale(+a(d,g,_)+c.get(_).get(l(d,g,_)).offset)},f=function(d,g,_){return Math.abs(h(d,g,_)-u(d,g,_))};n[this._isVertical?"height":"width"]=f;var p=function(d,g,_){return+a(d,g,_)<0?u(d,g,_):h(d,g,_)};return n[i]=function(d,g,_){return r._isVertical?p(d,g,_):p(d,g,_)-f(d,g,_)},n},t.prototype.getExtentsForProperty=function(r){var n=this._isVertical?"y":"x";return r===n?[this._stackedExtent()]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t._EXTREMA_LABEL_MARGIN_FROM_BAR=5,t}(Gat.Bar);Wat.StackedBar=QUe});var RKt=H(Yat=>{"use strict";Object.defineProperty(Yat,"__esModule",{value:!0});var tqe=(de(),Ut(pe)),eqe=Fe(),rqe=y4(),nqe=ns(),iqe=function(e){tqe.__extends(t,e);function t(){var r=e.call(this)||this;return r._connectorsEnabled=!1,r.addClass("waterfall-plot"),r}return t.prototype.connectorsEnabled=function(r){return r==null?this._connectorsEnabled:(this._connectorsEnabled=r,this)},t.prototype.total=function(r){return r==null?this._propertyBindings.get(t._TOTAL_KEY):(this._bindProperty(t._TOTAL_KEY,r,null),this)},t.prototype._additionalPaint=function(r){var n=this;this._connectorArea.selectAll("line").remove(),this._connectorsEnabled&&eqe.Window.setTimeout(function(){return n._drawConnectors()},r)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r);return this._connectorArea=this._renderArea.append("g").classed(t._CONNECTOR_AREA_CLASS,!0),n},t.prototype.getExtentsForProperty=function(r){var n="y";return r===n?[this._extent]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this.y().scale,o=nqe.Plot._scaledAccessor(this.total()),a=this.attr("y");a==null&&(n.y=function(l,c,u){var h=r.y().accessor(l,c,u),f=o(l,c,u);if(f)return Math.min(i.scale(h),i.scale(0));var p=r._subtotals[c];if(c===0)return h<0?i.scale(p-h):i.scale(p);var d=r._subtotals[c-1];return p>d?i.scale(p):i.scale(d)});var s=this.attr("height");return s==null&&(n.height=function(l,c,u){var h=o(l,c,u),f=r.y().accessor(l,c,u);if(h)return Math.abs(i.scale(f)-i.scale(0));var p=r._subtotals[c];if(c===0)return Math.abs(i.scale(p)-i.scale(p-f));var d=r._subtotals[c-1];return Math.abs(i.scale(p)-i.scale(d))}),n.class=function(l,c,u){var h="";r.attr("class")!=null&&(h=r.attr("class").accessor(l,c,u)+" ");var f=o(l,c,u);if(f)return h+t._BAR_TOTAL_CLASS;var p=r.y().accessor(l,c,u);return h+(p>0?t._BAR_GROWTH_CLASS:t._BAR_DECLINE_CLASS)},n},t.prototype._onDatasetUpdate=function(){return this._updateSubtotals(),e.prototype._onDatasetUpdate.call(this),this},t.prototype._calculateSubtotalsAndExtent=function(r){for(var n=Number.MAX_VALUE,i=Number.MIN_VALUE,o=0,a=!1,s=r.data(),l=s.length,c=0;c<l;c++){var u=s[c],h=this.y().accessor(u,c,r),f=this.total().accessor(u,c,r);if((!f||c===0)&&(o+=h),this._subtotals.push(o),o<n&&(n=o),o>i&&(i=o),f&&(h<n&&(n=h),h>i&&(i=h)),!a&&f){for(var p=h-o,d=0;d<this._subtotals.length;d++)this._subtotals[d]+=p;a=!0,o+=p,n+=p,i+=p}}this._extent=[n,i]},t.prototype._drawConnectors=function(){for(var r=this._getAttrToProjector(),n=this.datasets()[0],i=1;i<n.data().length;i++){var o=i-1,a=n.data()[i],s=n.data()[o],l=r.x(s,o,n),c=r.x(a,i,n)+r.width(a,i,n),u=r.y(a,i,n);(this._subtotals[i]>0&&this._subtotals[i]>this._subtotals[o]||this._subtotals[i]<0&&this._subtotals[i]>=this._subtotals[o])&&(u=r.y(a,i,n)+r.height(a,i,n)),this._connectorArea.append("line").classed(t._CONNECTOR_CLASS,!0).attr("x1",l).attr("x2",c).attr("y1",u).attr("y2",u)}},t.prototype._updateSubtotals=function(){var r=this.datasets();if(r.length>0){var n=r[r.length-1];this._subtotals=new Array,this._calculateSubtotalsAndExtent(n)}},t._BAR_DECLINE_CLASS="waterfall-decline",t._BAR_GROWTH_CLASS="waterfall-growth",t._BAR_TOTAL_CLASS="waterfall-total",t._CONNECTOR_CLASS="connector",t._CONNECTOR_AREA_CLASS="connector-area",t._TOTAL_KEY="total",t}(rqe.Bar);Yat.Waterfall=iqe});var IS=H(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var zc=(de(),Ut(pe));zc.__exportStar(Tat(),zs);zc.__exportStar(y4(),zs);zc.__exportStar(Got(),zs);zc.__exportStar(wKt(),zs);zc.__exportStar(Sat(),zs);zc.__exportStar(SKt(),zs);zc.__exportStar(MKt(),zs);zc.__exportStar(TKt(),zs);zc.__exportStar(CKt(),zs);zc.__exportStar(IKt(),zs);zc.__exportStar(kKt(),zs);zc.__exportStar(RKt(),zs)});var NKt=H(jat=>{"use strict";Object.defineProperty(jat,"__esModule",{value:!0});jat.version="3.9.0"});var Sl=H(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var Fc=(de(),Ut(pe));$jt();var oqe=kf();ln.Animators=oqe;var aqe=f$t();ln.Axes=aqe;var sqe=Pot();ln.Components=sqe;var lqe=$A();ln.Configs=lqe;var cqe=Bu();ln.Formatters=cqe;var uqe=IF();ln.RenderController=uqe;var hqe=Hit();ln.RenderPolicies=hqe;var fqe=XF();ln.SymbolFactories=fqe;var pqe=Dv();ln.Dispatchers=pqe;var dqe=Hv();ln.Drawers=dqe;var mqe=l4();ln.Interactions=mqe;var gqe=IS();ln.Plots=gqe;var _qe=Rs();ln.Scales=_qe;var yqe=Fe();ln.Utils=yqe;Fc.__exportStar(t4(),ln);var vqe=HF();ln.TimeInterval=vqe.TimeInterval;Fc.__exportStar(kc(),ln);Fc.__exportStar(WF(),ln);Fc.__exportStar(Yot(),ln);var xqe=NKt();ln.version=xqe.version;Fc.__exportStar(o4(),ln);Fc.__exportStar(Uu(),ln);Fc.__exportStar(Ov(),ln);Fc.__exportStar(wot(),ln);Fc.__exportStar(Vv(),ln);Fc.__exportStar(ns(),ln);Fc.__exportStar(xd(),ln);Fc.__exportStar(kv(),ln)});var QKt=H((sXn,JKt)=>{function Bqe(){this.__data__=[],this.size=0}JKt.exports=Bqe});var jv=H((lXn,tZt)=>{function Hqe(e,t){return e===t||e!==e&&t!==t}tZt.exports=Hqe});var M4=H((cXn,eZt)=>{var Vqe=jv();function Uqe(e,t){for(var r=e.length;r--;)if(Vqe(e[r][0],t))return r;return-1}eZt.exports=Uqe});var nZt=H((uXn,rZt)=>{var qqe=M4(),Gqe=Array.prototype,Wqe=Gqe.splice;function Yqe(e){var t=this.__data__,r=qqe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Wqe.call(t,r,1),--this.size,!0}rZt.exports=Yqe});var oZt=H((hXn,iZt)=>{var jqe=M4();function Xqe(e){var t=this.__data__,r=jqe(t,e);return r<0?void 0:t[r][1]}iZt.exports=Xqe});var sZt=H((fXn,aZt)=>{var $qe=M4();function Kqe(e){return $qe(this.__data__,e)>-1}aZt.exports=Kqe});var cZt=H((pXn,lZt)=>{var Zqe=M4();function Jqe(e,t){var r=this.__data__,n=Zqe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}lZt.exports=Jqe});var E4=H((dXn,uZt)=>{var Qqe=QKt(),tGe=nZt(),eGe=oZt(),rGe=sZt(),nGe=cZt();function zS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}zS.prototype.clear=Qqe;zS.prototype.delete=tGe;zS.prototype.get=eGe;zS.prototype.has=rGe;zS.prototype.set=nGe;uZt.exports=zS});var fZt=H((mXn,hZt)=>{var iGe=E4();function oGe(){this.__data__=new iGe,this.size=0}hZt.exports=oGe});var dZt=H((gXn,pZt)=>{function aGe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}pZt.exports=aGe});var gZt=H((_Xn,mZt)=>{function sGe(e){return this.__data__.get(e)}mZt.exports=sGe});var yZt=H((yXn,_Zt)=>{function lGe(e){return this.__data__.has(e)}_Zt.exports=lGe});var cst=H((vXn,vZt)=>{var cGe=typeof global=="object"&&global&&global.Object===Object&&global;vZt.exports=cGe});var Hc=H((xXn,xZt)=>{var uGe=cst(),hGe=typeof self=="object"&&self&&self.Object===Object&&self,fGe=uGe||hGe||Function("return this")();xZt.exports=fGe});var Xv=H((bXn,bZt)=>{var pGe=Hc(),dGe=pGe.Symbol;bZt.exports=dGe});var EZt=H((wXn,MZt)=>{var wZt=Xv(),SZt=Object.prototype,mGe=SZt.hasOwnProperty,gGe=SZt.toString,T4=wZt?wZt.toStringTag:void 0;function _Ge(e){var t=mGe.call(e,T4),r=e[T4];try{e[T4]=void 0;var n=!0}catch(o){}var i=gGe.call(e);return n&&(t?e[T4]=r:delete e[T4]),i}MZt.exports=_Ge});var CZt=H((SXn,TZt)=>{var yGe=Object.prototype,vGe=yGe.toString;function xGe(e){return vGe.call(e)}TZt.exports=xGe});var l0=H((MXn,IZt)=>{var AZt=Xv(),bGe=EZt(),wGe=CZt(),SGe="[object Null]",MGe="[object Undefined]",PZt=AZt?AZt.toStringTag:void 0;function EGe(e){return e==null?e===void 0?MGe:SGe:PZt&&PZt in Object(e)?bGe(e):wGe(e)}IZt.exports=EGe});var El=H((EXn,LZt)=>{function TGe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}LZt.exports=TGe});var FS=H((TXn,kZt)=>{var CGe=l0(),AGe=El(),PGe="[object AsyncFunction]",IGe="[object Function]",LGe="[object GeneratorFunction]",kGe="[object Proxy]";function RGe(e){if(!AGe(e))return!1;var t=CGe(e);return t==IGe||t==LGe||t==PGe||t==kGe}kZt.exports=RGe});var NZt=H((CXn,RZt)=>{var NGe=Hc(),DGe=NGe["__core-js_shared__"];RZt.exports=DGe});var zZt=H((AXn,OZt)=>{var ust=NZt(),DZt=function(){var e=/[^.]+$/.exec(ust&&ust.keys&&ust.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function OGe(e){return!!DZt&&DZt in e}OZt.exports=OGe});var hst=H((PXn,FZt)=>{var zGe=Function.prototype,FGe=zGe.toString;function BGe(e){if(e!=null){try{return FGe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}FZt.exports=BGe});var HZt=H((IXn,BZt)=>{var HGe=FS(),VGe=zZt(),UGe=El(),qGe=hst(),GGe=/[\\^$.*+?()[\]{}|]/g,WGe=/^\[object .+?Constructor\]$/,YGe=Function.prototype,jGe=Object.prototype,XGe=YGe.toString,$Ge=jGe.hasOwnProperty,KGe=RegExp("^"+XGe.call($Ge).replace(GGe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZGe(e){if(!UGe(e)||VGe(e))return!1;var t=HGe(e)?KGe:WGe;return t.test(qGe(e))}BZt.exports=ZGe});var UZt=H((LXn,VZt)=>{function JGe(e,t){return e==null?void 0:e[t]}VZt.exports=JGe});var c0=H((kXn,qZt)=>{var QGe=HZt(),tWe=UZt();function eWe(e,t){var r=tWe(e,t);return QGe(r)?r:void 0}qZt.exports=eWe});var zB=H((RXn,GZt)=>{var rWe=c0(),nWe=Hc(),iWe=rWe(nWe,"Map");GZt.exports=iWe});var C4=H((NXn,WZt)=>{var oWe=c0(),aWe=oWe(Object,"create");WZt.exports=aWe});var XZt=H((DXn,jZt)=>{var YZt=C4();function sWe(){this.__data__=YZt?YZt(null):{},this.size=0}jZt.exports=sWe});var KZt=H((OXn,$Zt)=>{function lWe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}$Zt.exports=lWe});var JZt=H((zXn,ZZt)=>{var cWe=C4(),uWe="__lodash_hash_undefined__",hWe=Object.prototype,fWe=hWe.hasOwnProperty;function pWe(e){var t=this.__data__;if(cWe){var r=t[e];return r===uWe?void 0:r}return fWe.call(t,e)?t[e]:void 0}ZZt.exports=pWe});var tJt=H((FXn,QZt)=>{var dWe=C4(),mWe=Object.prototype,gWe=mWe.hasOwnProperty;function _We(e){var t=this.__data__;return dWe?t[e]!==void 0:gWe.call(t,e)}QZt.exports=_We});var rJt=H((BXn,eJt)=>{var yWe=C4(),vWe="__lodash_hash_undefined__";function xWe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yWe&&t===void 0?vWe:t,this}eJt.exports=xWe});var iJt=H((HXn,nJt)=>{var bWe=XZt(),wWe=KZt(),SWe=JZt(),MWe=tJt(),EWe=rJt();function BS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}BS.prototype.clear=bWe;BS.prototype.delete=wWe;BS.prototype.get=SWe;BS.prototype.has=MWe;BS.prototype.set=EWe;nJt.exports=BS});var sJt=H((VXn,aJt)=>{var oJt=iJt(),TWe=E4(),CWe=zB();function AWe(){this.size=0,this.__data__={hash:new oJt,map:new(CWe||TWe),string:new oJt}}aJt.exports=AWe});var cJt=H((UXn,lJt)=>{function PWe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}lJt.exports=PWe});var A4=H((qXn,uJt)=>{var IWe=cJt();function LWe(e,t){var r=e.__data__;return IWe(t)?r[typeof t=="string"?"string":"hash"]:r.map}uJt.exports=LWe});var fJt=H((GXn,hJt)=>{var kWe=A4();function RWe(e){var t=kWe(this,e).delete(e);return this.size-=t?1:0,t}hJt.exports=RWe});var dJt=H((WXn,pJt)=>{var NWe=A4();function DWe(e){return NWe(this,e).get(e)}pJt.exports=DWe});var gJt=H((YXn,mJt)=>{var OWe=A4();function zWe(e){return OWe(this,e).has(e)}mJt.exports=zWe});var yJt=H((jXn,_Jt)=>{var FWe=A4();function BWe(e,t){var r=FWe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}_Jt.exports=BWe});var FB=H((XXn,vJt)=>{var HWe=sJt(),VWe=fJt(),UWe=dJt(),qWe=gJt(),GWe=yJt();function HS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}HS.prototype.clear=HWe;HS.prototype.delete=VWe;HS.prototype.get=UWe;HS.prototype.has=qWe;HS.prototype.set=GWe;vJt.exports=HS});var bJt=H(($Xn,xJt)=>{var WWe=E4(),YWe=zB(),jWe=FB(),XWe=200;function $We(e,t){var r=this.__data__;if(r instanceof WWe){var n=r.__data__;if(!YWe||n.length<XWe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new jWe(n)}return r.set(e,t),this.size=r.size,this}xJt.exports=$We});var P4=H((KXn,wJt)=>{var KWe=E4(),ZWe=fZt(),JWe=dZt(),QWe=gZt(),tYe=yZt(),eYe=bJt();function VS(e){var t=this.__data__=new KWe(e);this.size=t.size}VS.prototype.clear=ZWe;VS.prototype.delete=JWe;VS.prototype.get=QWe;VS.prototype.has=tYe;VS.prototype.set=eYe;wJt.exports=VS});var BB=H((ZXn,SJt)=>{function rYe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}SJt.exports=rYe});var fst=H((JXn,MJt)=>{var nYe=c0(),iYe=function(){try{var e=nYe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();MJt.exports=iYe});var I4=H((QXn,TJt)=>{var EJt=fst();function oYe(e,t,r){t=="__proto__"&&EJt?EJt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}TJt.exports=oYe});var L4=H((t$n,CJt)=>{var aYe=I4(),sYe=jv(),lYe=Object.prototype,cYe=lYe.hasOwnProperty;function uYe(e,t,r){var n=e[t];(!(cYe.call(e,t)&&sYe(n,r))||r===void 0&&!(t in e))&&aYe(e,t,r)}CJt.exports=uYe});var US=H((e$n,AJt)=>{var hYe=L4(),fYe=I4();function pYe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),i?fYe(r,s,l):hYe(r,s,l)}return r}AJt.exports=pYe});var IJt=H((r$n,PJt)=>{function dYe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}PJt.exports=dYe});var Yu=H((n$n,LJt)=>{function mYe(e){return e!=null&&typeof e=="object"}LJt.exports=mYe});var RJt=H((i$n,kJt)=>{var gYe=l0(),_Ye=Yu(),yYe="[object Arguments]";function vYe(e){return _Ye(e)&&gYe(e)==yYe}kJt.exports=vYe});var qS=H((o$n,OJt)=>{var NJt=RJt(),xYe=Yu(),DJt=Object.prototype,bYe=DJt.hasOwnProperty,wYe=DJt.propertyIsEnumerable,SYe=NJt(function(){return arguments}())?NJt:function(e){return xYe(e)&&bYe.call(e,"callee")&&!wYe.call(e,"callee")};OJt.exports=SYe});var Ti=H((a$n,zJt)=>{var MYe=Array.isArray;zJt.exports=MYe});var BJt=H((s$n,FJt)=>{function EYe(){return!1}FJt.exports=EYe});var $v=H((k4,GS)=>{var TYe=Hc(),CYe=BJt(),UJt=typeof k4=="object"&&k4&&!k4.nodeType&&k4,HJt=UJt&&typeof GS=="object"&&GS&&!GS.nodeType&&GS,AYe=HJt&&HJt.exports===UJt,VJt=AYe?TYe.Buffer:void 0,PYe=VJt?VJt.isBuffer:void 0,IYe=PYe||CYe;GS.exports=IYe});var R4=H((l$n,qJt)=>{var LYe=9007199254740991,kYe=/^(?:0|[1-9]\d*)$/;function RYe(e,t){var r=typeof e;return t=t==null?LYe:t,!!t&&(r=="number"||r!="symbol"&&kYe.test(e))&&e>-1&&e%1==0&&e<t}qJt.exports=RYe});var HB=H((c$n,GJt)=>{var NYe=9007199254740991;function DYe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=NYe}GJt.exports=DYe});var YJt=H((u$n,WJt)=>{var OYe=l0(),zYe=HB(),FYe=Yu(),BYe="[object Arguments]",HYe="[object Array]",VYe="[object Boolean]",UYe="[object Date]",qYe="[object Error]",GYe="[object Function]",WYe="[object Map]",YYe="[object Number]",jYe="[object Object]",XYe="[object RegExp]",$Ye="[object Set]",KYe="[object String]",ZYe="[object WeakMap]",JYe="[object ArrayBuffer]",QYe="[object DataView]",tje="[object Float32Array]",eje="[object Float64Array]",rje="[object Int8Array]",nje="[object Int16Array]",ije="[object Int32Array]",oje="[object Uint8Array]",aje="[object Uint8ClampedArray]",sje="[object Uint16Array]",lje="[object Uint32Array]",Un={};Un[tje]=Un[eje]=Un[rje]=Un[nje]=Un[ije]=Un[oje]=Un[aje]=Un[sje]=Un[lje]=!0;Un[BYe]=Un[HYe]=Un[JYe]=Un[VYe]=Un[QYe]=Un[UYe]=Un[qYe]=Un[GYe]=Un[WYe]=Un[YYe]=Un[jYe]=Un[XYe]=Un[$Ye]=Un[KYe]=Un[ZYe]=!1;function cje(e){return FYe(e)&&zYe(e.length)&&!!Un[OYe(e)]}WJt.exports=cje});var N4=H((h$n,jJt)=>{function uje(e){return function(t){return e(t)}}jJt.exports=uje});var VB=H((D4,WS)=>{var hje=cst(),XJt=typeof D4=="object"&&D4&&!D4.nodeType&&D4,O4=XJt&&typeof WS=="object"&&WS&&!WS.nodeType&&WS,fje=O4&&O4.exports===XJt,pst=fje&&hje.process,pje=function(){try{var e=O4&&O4.require&&O4.require("util").types;return e||pst&&pst.binding&&pst.binding("util")}catch(t){}}();WS.exports=pje});var YS=H((f$n,ZJt)=>{var dje=YJt(),mje=N4(),$Jt=VB(),KJt=$Jt&&$Jt.isTypedArray,gje=KJt?mje(KJt):dje;ZJt.exports=gje});var dst=H((p$n,JJt)=>{var _je=IJt(),yje=qS(),vje=Ti(),xje=$v(),bje=R4(),wje=YS(),Sje=Object.prototype,Mje=Sje.hasOwnProperty;function Eje(e,t){var r=vje(e),n=!r&&yje(e),i=!r&&!n&&xje(e),o=!r&&!n&&!i&&wje(e),a=r||n||i||o,s=a?_je(e.length,String):[],l=s.length;for(var c in e)(t||Mje.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||bje(c,l)))&&s.push(c);return s}JJt.exports=Eje});var z4=H((d$n,QJt)=>{var Tje=Object.prototype;function Cje(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Tje;return e===r}QJt.exports=Cje});var mst=H((m$n,tQt)=>{function Aje(e,t){return function(r){return e(t(r))}}tQt.exports=Aje});var rQt=H((g$n,eQt)=>{var Pje=mst(),Ije=Pje(Object.keys,Object);eQt.exports=Ije});var UB=H((_$n,nQt)=>{var Lje=z4(),kje=rQt(),Rje=Object.prototype,Nje=Rje.hasOwnProperty;function Dje(e){if(!Lje(e))return kje(e);var t=[];for(var r in Object(e))Nje.call(e,r)&&r!="constructor"&&t.push(r);return t}nQt.exports=Dje});var Hf=H((y$n,iQt)=>{var Oje=FS(),zje=HB();function Fje(e){return e!=null&&zje(e.length)&&!Oje(e)}iQt.exports=Fje});var Pd=H((v$n,oQt)=>{var Bje=dst(),Hje=UB(),Vje=Hf();function Uje(e){return Vje(e)?Bje(e):Hje(e)}oQt.exports=Uje});var sQt=H((x$n,aQt)=>{var qje=US(),Gje=Pd();function Wje(e,t){return e&&qje(t,Gje(t),e)}aQt.exports=Wje});var cQt=H((b$n,lQt)=>{function Yje(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}lQt.exports=Yje});var hQt=H((w$n,uQt)=>{var jje=El(),Xje=z4(),$je=cQt(),Kje=Object.prototype,Zje=Kje.hasOwnProperty;function Jje(e){if(!jje(e))return $je(e);var t=Xje(e),r=[];for(var n in e)n=="constructor"&&(t||!Zje.call(e,n))||r.push(n);return r}uQt.exports=Jje});var u0=H((S$n,fQt)=>{var Qje=dst(),tXe=hQt(),eXe=Hf();function rXe(e){return eXe(e)?Qje(e,!0):tXe(e)}fQt.exports=rXe});var dQt=H((M$n,pQt)=>{var nXe=US(),iXe=u0();function oXe(e,t){return e&&nXe(t,iXe(t),e)}pQt.exports=oXe});var gst=H((F4,jS)=>{var aXe=Hc(),yQt=typeof F4=="object"&&F4&&!F4.nodeType&&F4,mQt=yQt&&typeof jS=="object"&&jS&&!jS.nodeType&&jS,sXe=mQt&&mQt.exports===yQt,gQt=sXe?aXe.Buffer:void 0,_Qt=gQt?gQt.allocUnsafe:void 0;function lXe(e,t){if(t)return e.slice();var r=e.length,n=_Qt?_Qt(r):new e.constructor(r);return e.copy(n),n}jS.exports=lXe});var _st=H((E$n,vQt)=>{function cXe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}vQt.exports=cXe});var yst=H((T$n,xQt)=>{function uXe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}xQt.exports=uXe});var vst=H((C$n,bQt)=>{function hXe(){return[]}bQt.exports=hXe});var qB=H((A$n,SQt)=>{var fXe=yst(),pXe=vst(),dXe=Object.prototype,mXe=dXe.propertyIsEnumerable,wQt=Object.getOwnPropertySymbols,gXe=wQt?function(e){return e==null?[]:(e=Object(e),fXe(wQt(e),function(t){return mXe.call(e,t)}))}:pXe;SQt.exports=gXe});var EQt=H((P$n,MQt)=>{var _Xe=US(),yXe=qB();function vXe(e,t){return _Xe(e,yXe(e),t)}MQt.exports=vXe});var GB=H((I$n,TQt)=>{function xXe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}TQt.exports=xXe});var B4=H((L$n,CQt)=>{var bXe=mst(),wXe=bXe(Object.getPrototypeOf,Object);CQt.exports=wXe});var xst=H((k$n,AQt)=>{var SXe=GB(),MXe=B4(),EXe=qB(),TXe=vst(),CXe=Object.getOwnPropertySymbols,AXe=CXe?function(e){for(var t=[];e;)SXe(t,EXe(e)),e=MXe(e);return t}:TXe;AQt.exports=AXe});var IQt=H((R$n,PQt)=>{var PXe=US(),IXe=xst();function LXe(e,t){return PXe(e,IXe(e),t)}PQt.exports=LXe});var bst=H((N$n,LQt)=>{var kXe=GB(),RXe=Ti();function NXe(e,t,r){var n=t(e);return RXe(e)?n:kXe(n,r(e))}LQt.exports=NXe});var wst=H((D$n,kQt)=>{var DXe=bst(),OXe=qB(),zXe=Pd();function FXe(e){return DXe(e,zXe,OXe)}kQt.exports=FXe});var NQt=H((O$n,RQt)=>{var BXe=bst(),HXe=xst(),VXe=u0();function UXe(e){return BXe(e,VXe,HXe)}RQt.exports=UXe});var OQt=H((z$n,DQt)=>{var qXe=c0(),GXe=Hc(),WXe=qXe(GXe,"DataView");DQt.exports=WXe});var FQt=H((F$n,zQt)=>{var YXe=c0(),jXe=Hc(),XXe=YXe(jXe,"Promise");zQt.exports=XXe});var Sst=H((B$n,BQt)=>{var $Xe=c0(),KXe=Hc(),ZXe=$Xe(KXe,"Set");BQt.exports=ZXe});var VQt=H((H$n,HQt)=>{var JXe=c0(),QXe=Hc(),t$e=JXe(QXe,"WeakMap");HQt.exports=t$e});var Zv=H((V$n,XQt)=>{var Mst=OQt(),Est=zB(),Tst=FQt(),Cst=Sst(),Ast=VQt(),jQt=l0(),XS=hst(),UQt="[object Map]",e$e="[object Object]",qQt="[object Promise]",GQt="[object Set]",WQt="[object WeakMap]",YQt="[object DataView]",r$e=XS(Mst),n$e=XS(Est),i$e=XS(Tst),o$e=XS(Cst),a$e=XS(Ast),Kv=jQt;(Mst&&Kv(new Mst(new ArrayBuffer(1)))!=YQt||Est&&Kv(new Est)!=UQt||Tst&&Kv(Tst.resolve())!=qQt||Cst&&Kv(new Cst)!=GQt||Ast&&Kv(new Ast)!=WQt)&&(Kv=function(e){var t=jQt(e),r=t==e$e?e.constructor:void 0,n=r?XS(r):"";if(n)switch(n){case r$e:return YQt;case n$e:return UQt;case i$e:return qQt;case o$e:return GQt;case a$e:return WQt}return t});XQt.exports=Kv});var KQt=H((U$n,$Qt)=>{var s$e=Object.prototype,l$e=s$e.hasOwnProperty;function c$e(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&l$e.call(e,"index")&&(r.index=e.index,r.input=e.input),r}$Qt.exports=c$e});var Pst=H((q$n,ZQt)=>{var u$e=Hc(),h$e=u$e.Uint8Array;ZQt.exports=h$e});var WB=H((G$n,QQt)=>{var JQt=Pst();function f$e(e){var t=new e.constructor(e.byteLength);return new JQt(t).set(new JQt(e)),t}QQt.exports=f$e});var ete=H((W$n,tte)=>{var p$e=WB();function d$e(e,t){var r=t?p$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}tte.exports=d$e});var nte=H((Y$n,rte)=>{var m$e=/\w*$/;function g$e(e){var t=new e.constructor(e.source,m$e.exec(e));return t.lastIndex=e.lastIndex,t}rte.exports=g$e});var lte=H((j$n,ste)=>{var ite=Xv(),ote=ite?ite.prototype:void 0,ate=ote?ote.valueOf:void 0;function _$e(e){return ate?Object(ate.call(e)):{}}ste.exports=_$e});var Ist=H((X$n,cte)=>{var y$e=WB();function v$e(e,t){var r=t?y$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}cte.exports=v$e});var hte=H(($$n,ute)=>{var x$e=WB(),b$e=ete(),w$e=nte(),S$e=lte(),M$e=Ist(),E$e="[object Boolean]",T$e="[object Date]",C$e="[object Map]",A$e="[object Number]",P$e="[object RegExp]",I$e="[object Set]",L$e="[object String]",k$e="[object Symbol]",R$e="[object ArrayBuffer]",N$e="[object DataView]",D$e="[object Float32Array]",O$e="[object Float64Array]",z$e="[object Int8Array]",F$e="[object Int16Array]",B$e="[object Int32Array]",H$e="[object Uint8Array]",V$e="[object Uint8ClampedArray]",U$e="[object Uint16Array]",q$e="[object Uint32Array]";function G$e(e,t,r){var n=e.constructor;switch(t){case R$e:return x$e(e);case E$e:case T$e:return new n(+e);case N$e:return b$e(e,r);case D$e:case O$e:case z$e:case F$e:case B$e:case H$e:case V$e:case U$e:case q$e:return M$e(e,r);case C$e:return new n;case A$e:case L$e:return new n(e);case P$e:return w$e(e);case I$e:return new n;case k$e:return S$e(e)}}ute.exports=G$e});var Lst=H((K$n,pte)=>{var W$e=El(),fte=Object.create,Y$e=function(){function e(){}return function(t){if(!W$e(t))return{};if(fte)return fte(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();pte.exports=Y$e});var kst=H((Z$n,dte)=>{var j$e=Lst(),X$e=B4(),$$e=z4();function K$e(e){return typeof e.constructor=="function"&&!$$e(e)?j$e(X$e(e)):{}}dte.exports=K$e});var gte=H((J$n,mte)=>{var Z$e=Zv(),J$e=Yu(),Q$e="[object Map]";function tKe(e){return J$e(e)&&Z$e(e)==Q$e}mte.exports=tKe});var xte=H((Q$n,vte)=>{var eKe=gte(),rKe=N4(),_te=VB(),yte=_te&&_te.isMap,nKe=yte?rKe(yte):eKe;vte.exports=nKe});var wte=H((tKn,bte)=>{var iKe=Zv(),oKe=Yu(),aKe="[object Set]";function sKe(e){return oKe(e)&&iKe(e)==aKe}bte.exports=sKe});var Tte=H((eKn,Ete)=>{var lKe=wte(),cKe=N4(),Ste=VB(),Mte=Ste&&Ste.isSet,uKe=Mte?cKe(Mte):lKe;Ete.exports=uKe});var Rst=H((rKn,Ite)=>{var hKe=P4(),fKe=BB(),pKe=L4(),dKe=sQt(),mKe=dQt(),gKe=gst(),_Ke=_st(),yKe=EQt(),vKe=IQt(),xKe=wst(),bKe=NQt(),wKe=Zv(),SKe=KQt(),MKe=hte(),EKe=kst(),TKe=Ti(),CKe=$v(),AKe=xte(),PKe=El(),IKe=Tte(),LKe=Pd(),kKe=u0(),RKe=1,NKe=2,DKe=4,Cte="[object Arguments]",OKe="[object Array]",zKe="[object Boolean]",FKe="[object Date]",BKe="[object Error]",Ate="[object Function]",HKe="[object GeneratorFunction]",VKe="[object Map]",UKe="[object Number]",Pte="[object Object]",qKe="[object RegExp]",GKe="[object Set]",WKe="[object String]",YKe="[object Symbol]",jKe="[object WeakMap]",XKe="[object ArrayBuffer]",$Ke="[object DataView]",KKe="[object Float32Array]",ZKe="[object Float64Array]",JKe="[object Int8Array]",QKe="[object Int16Array]",tZe="[object Int32Array]",eZe="[object Uint8Array]",rZe="[object Uint8ClampedArray]",nZe="[object Uint16Array]",iZe="[object Uint32Array]",Cn={};Cn[Cte]=Cn[OKe]=Cn[XKe]=Cn[$Ke]=Cn[zKe]=Cn[FKe]=Cn[KKe]=Cn[ZKe]=Cn[JKe]=Cn[QKe]=Cn[tZe]=Cn[VKe]=Cn[UKe]=Cn[Pte]=Cn[qKe]=Cn[GKe]=Cn[WKe]=Cn[YKe]=Cn[eZe]=Cn[rZe]=Cn[nZe]=Cn[iZe]=!0;Cn[BKe]=Cn[Ate]=Cn[jKe]=!1;function YB(e,t,r,n,i,o){var a,s=t&RKe,l=t&NKe,c=t&DKe;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!PKe(e))return e;var u=TKe(e);if(u){if(a=SKe(e),!s)return _Ke(e,a)}else{var h=wKe(e),f=h==Ate||h==HKe;if(CKe(e))return gKe(e,s);if(h==Pte||h==Cte||f&&!i){if(a=l||f?{}:EKe(e),!s)return l?vKe(e,mKe(a,e)):yKe(e,dKe(a,e))}else{if(!Cn[h])return i?e:{};a=MKe(e,h,s)}}o||(o=new hKe);var p=o.get(e);if(p)return p;o.set(e,a),IKe(e)?e.forEach(function(_){a.add(YB(_,t,r,_,e,o))}):AKe(e)&&e.forEach(function(_,y){a.set(y,YB(_,t,r,y,e,o))});var d=c?l?bKe:xKe:l?kKe:LKe,g=u?void 0:d(e);return fKe(g||e,function(_,y){g&&(y=_,_=e[y]),pKe(a,y,YB(_,t,r,y,e,o))}),a}Ite.exports=YB});var kte=H((nKn,Lte)=>{var oZe=Rst(),aZe=4;function sZe(e){return oZe(e,aZe)}Lte.exports=sZe});var jB=H((iKn,Rte)=>{function lZe(e){return function(){return e}}Rte.exports=lZe});var Dte=H((oKn,Nte)=>{function cZe(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(r(o[l],l,o)===!1)break}return t}}Nte.exports=cZe});var XB=H((aKn,Ote)=>{var uZe=Dte(),hZe=uZe();Ote.exports=hZe});var $B=H((sKn,zte)=>{var fZe=XB(),pZe=Pd();function dZe(e,t){return e&&fZe(e,t,pZe)}zte.exports=dZe});var Bte=H((lKn,Fte)=>{var mZe=Hf();function gZe(e,t){return function(r,n){if(r==null)return r;if(!mZe(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}Fte.exports=gZe});var H4=H((cKn,Hte)=>{var _Ze=$B(),yZe=Bte(),vZe=yZe(_Ze);Hte.exports=vZe});var h0=H((uKn,Vte)=>{function xZe(e){return e}Vte.exports=xZe});var Nst=H((hKn,Ute)=>{var bZe=h0();function wZe(e){return typeof e=="function"?e:bZe}Ute.exports=wZe});var Dst=H((fKn,qte)=>{var SZe=BB(),MZe=H4(),EZe=Nst(),TZe=Ti();function CZe(e,t){var r=TZe(e)?SZe:MZe;return r(e,EZe(t))}qte.exports=CZe});var Ost=H((pKn,Gte)=>{Gte.exports=Dst()});var Yte=H((dKn,Wte)=>{var AZe=H4();function PZe(e,t){var r=[];return AZe(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}Wte.exports=PZe});var Xte=H((mKn,jte)=>{var IZe="__lodash_hash_undefined__";function LZe(e){return this.__data__.set(e,IZe),this}jte.exports=LZe});var Kte=H((gKn,$te)=>{function kZe(e){return this.__data__.has(e)}$te.exports=kZe});var zst=H((_Kn,Zte)=>{var RZe=FB(),NZe=Xte(),DZe=Kte();function KB(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new RZe;++t<r;)this.add(e[t])}KB.prototype.add=KB.prototype.push=NZe;KB.prototype.has=DZe;Zte.exports=KB});var Qte=H((yKn,Jte)=>{function OZe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Jte.exports=OZe});var Fst=H((vKn,tee)=>{function zZe(e,t){return e.has(t)}tee.exports=zZe});var Bst=H((xKn,eee)=>{var FZe=zst(),BZe=Qte(),HZe=Fst(),VZe=1,UZe=2;function qZe(e,t,r,n,i,o){var a=r&VZe,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,f=!0,p=r&UZe?new FZe:void 0;for(o.set(e,t),o.set(t,e);++h<s;){var d=e[h],g=t[h];if(n)var _=a?n(g,d,h,t,e,o):n(d,g,h,e,t,o);if(_!==void 0){if(_)continue;f=!1;break}if(p){if(!BZe(t,function(y,x){if(!HZe(p,x)&&(d===y||i(d,y,r,n,o)))return p.push(x)})){f=!1;break}}else if(!(d===g||i(d,g,r,n,o))){f=!1;break}}return o.delete(e),o.delete(t),f}eee.exports=qZe});var nee=H((bKn,ree)=>{function GZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}ree.exports=GZe});var ZB=H((wKn,iee)=>{function WZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}iee.exports=WZe});var cee=H((SKn,lee)=>{var oee=Xv(),aee=Pst(),YZe=jv(),jZe=Bst(),XZe=nee(),$Ze=ZB(),KZe=1,ZZe=2,JZe="[object Boolean]",QZe="[object Date]",tJe="[object Error]",eJe="[object Map]",rJe="[object Number]",nJe="[object RegExp]",iJe="[object Set]",oJe="[object String]",aJe="[object Symbol]",sJe="[object ArrayBuffer]",lJe="[object DataView]",see=oee?oee.prototype:void 0,Hst=see?see.valueOf:void 0;function cJe(e,t,r,n,i,o,a){switch(r){case lJe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sJe:return!(e.byteLength!=t.byteLength||!o(new aee(e),new aee(t)));case JZe:case QZe:case rJe:return YZe(+e,+t);case tJe:return e.name==t.name&&e.message==t.message;case nJe:case oJe:return e==t+"";case eJe:var s=XZe;case iJe:var l=n&KZe;if(s||(s=$Ze),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=ZZe,a.set(e,t);var u=jZe(s(e),s(t),n,i,o,a);return a.delete(e),u;case aJe:if(Hst)return Hst.call(e)==Hst.call(t)}return!1}lee.exports=cJe});var fee=H((MKn,hee)=>{var uee=wst(),uJe=1,hJe=Object.prototype,fJe=hJe.hasOwnProperty;function pJe(e,t,r,n,i,o){var a=r&uJe,s=uee(e),l=s.length,c=uee(t),u=c.length;if(l!=u&&!a)return!1;for(var h=l;h--;){var f=s[h];if(!(a?f in t:fJe.call(t,f)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var g=!0;o.set(e,t),o.set(t,e);for(var _=a;++h<l;){f=s[h];var y=e[f],x=t[f];if(n)var b=a?n(x,y,f,t,e,o):n(y,x,f,e,t,o);if(!(b===void 0?y===x||i(y,x,r,n,o):b)){g=!1;break}_||(_=f=="constructor")}if(g&&!_){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(g=!1)}return o.delete(e),o.delete(t),g}hee.exports=pJe});var xee=H((EKn,vee)=>{var Vst=P4(),dJe=Bst(),mJe=cee(),gJe=fee(),pee=Zv(),dee=Ti(),mee=$v(),_Je=YS(),yJe=1,gee="[object Arguments]",_ee="[object Array]",JB="[object Object]",vJe=Object.prototype,yee=vJe.hasOwnProperty;function xJe(e,t,r,n,i,o){var a=dee(e),s=dee(t),l=a?_ee:pee(e),c=s?_ee:pee(t);l=l==gee?JB:l,c=c==gee?JB:c;var u=l==JB,h=c==JB,f=l==c;if(f&&mee(e)){if(!mee(t))return!1;a=!0,u=!1}if(f&&!u)return o||(o=new Vst),a||_Je(e)?dJe(e,t,r,n,i,o):mJe(e,t,l,r,n,i,o);if(!(r&yJe)){var p=u&&yee.call(e,"__wrapped__"),d=h&&yee.call(t,"__wrapped__");if(p||d){var g=p?e.value():e,_=d?t.value():t;return o||(o=new Vst),i(g,_,r,n,o)}}return f?(o||(o=new Vst),gJe(e,t,r,n,i,o)):!1}vee.exports=xJe});var Ust=H((TKn,See)=>{var bJe=xee(),bee=Yu();function wee(e,t,r,n,i){return e===t?!0:e==null||t==null||!bee(e)&&!bee(t)?e!==e&&t!==t:bJe(e,t,r,n,wee,i)}See.exports=wee});var Eee=H((CKn,Mee)=>{var wJe=P4(),SJe=Ust(),MJe=1,EJe=2;function TJe(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var l=s[0],c=e[l],u=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var h=new wJe;if(n)var f=n(c,u,l,e,t,h);if(!(f===void 0?SJe(u,c,MJe|EJe,n,h):f))return!1}}return!0}Mee.exports=TJe});var qst=H((AKn,Tee)=>{var CJe=El();function AJe(e){return e===e&&!CJe(e)}Tee.exports=AJe});var Aee=H((PKn,Cee)=>{var PJe=qst(),IJe=Pd();function LJe(e){for(var t=IJe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,PJe(i)]}return t}Cee.exports=LJe});var Gst=H((IKn,Pee)=>{function kJe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}Pee.exports=kJe});var Lee=H((LKn,Iee)=>{var RJe=Eee(),NJe=Aee(),DJe=Gst();function OJe(e){var t=NJe(e);return t.length==1&&t[0][2]?DJe(t[0][0],t[0][1]):function(r){return r===e||RJe(r,e,t)}}Iee.exports=OJe});var Jv=H((kKn,kee)=>{var zJe=l0(),FJe=Yu(),BJe="[object Symbol]";function HJe(e){return typeof e=="symbol"||FJe(e)&&zJe(e)==BJe}kee.exports=HJe});var QB=H((RKn,Ree)=>{var VJe=Ti(),UJe=Jv(),qJe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GJe=/^\w*$/;function WJe(e,t){if(VJe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||UJe(e)?!0:GJe.test(e)||!qJe.test(e)||t!=null&&e in Object(t)}Ree.exports=WJe});var Oee=H((NKn,Dee)=>{var Nee=FB(),YJe="Expected a function";function Wst(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(YJe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Wst.Cache||Nee),r}Wst.Cache=Nee;Dee.exports=Wst});var Fee=H((DKn,zee)=>{var jJe=Oee(),XJe=500;function $Je(e){var t=jJe(e,function(n){return r.size===XJe&&r.clear(),n}),r=t.cache;return t}zee.exports=$Je});var Hee=H((OKn,Bee)=>{var KJe=Fee(),ZJe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JJe=/\\(\\)?/g,QJe=KJe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZJe,function(r,n,i,o){t.push(i?o.replace(JJe,"$1"):n||r)}),t});Bee.exports=QJe});var V4=H((zKn,Vee)=>{function tQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}Vee.exports=tQe});var jee=H((FKn,Yee)=>{var Uee=Xv(),eQe=V4(),rQe=Ti(),nQe=Jv(),iQe=1/0,qee=Uee?Uee.prototype:void 0,Gee=qee?qee.toString:void 0;function Wee(e){if(typeof e=="string")return e;if(rQe(e))return eQe(e,Wee)+"";if(nQe(e))return Gee?Gee.call(e):"";var t=e+"";return t=="0"&&1/e==-iQe?"-0":t}Yee.exports=Wee});var Yst=H((BKn,Xee)=>{var oQe=jee();function aQe(e){return e==null?"":oQe(e)}Xee.exports=aQe});var U4=H((HKn,$ee)=>{var sQe=Ti(),lQe=QB(),cQe=Hee(),uQe=Yst();function hQe(e,t){return sQe(e)?e:lQe(e,t)?[e]:cQe(uQe(e))}$ee.exports=hQe});var $S=H((VKn,Kee)=>{var fQe=Jv(),pQe=1/0;function dQe(e){if(typeof e=="string"||fQe(e))return e;var t=e+"";return t=="0"&&1/e==-pQe?"-0":t}Kee.exports=dQe});var q4=H((UKn,Zee)=>{var mQe=U4(),gQe=$S();function _Qe(e,t){t=mQe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gQe(t[r++])];return r&&r==n?e:void 0}Zee.exports=_Qe});var Qee=H((qKn,Jee)=>{var yQe=q4();function vQe(e,t,r){var n=e==null?void 0:yQe(e,t);return n===void 0?r:n}Jee.exports=vQe});var ere=H((GKn,tre)=>{function xQe(e,t){return e!=null&&t in Object(e)}tre.exports=xQe});var jst=H((WKn,rre)=>{var bQe=U4(),wQe=qS(),SQe=Ti(),MQe=R4(),EQe=HB(),TQe=$S();function CQe(e,t,r){t=bQe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=TQe(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&EQe(i)&&MQe(a,i)&&(SQe(e)||wQe(e)))}rre.exports=CQe});var Xst=H((YKn,nre)=>{var AQe=ere(),PQe=jst();function IQe(e,t){return e!=null&&PQe(e,t,AQe)}nre.exports=IQe});var ore=H((jKn,ire)=>{var LQe=Ust(),kQe=Qee(),RQe=Xst(),NQe=QB(),DQe=qst(),OQe=Gst(),zQe=$S(),FQe=1,BQe=2;function HQe(e,t){return NQe(e)&&DQe(t)?OQe(zQe(e),t):function(r){var n=kQe(r,e);return n===void 0&&n===t?RQe(r,e):LQe(t,n,FQe|BQe)}}ire.exports=HQe});var $st=H((XKn,are)=>{function VQe(e){return function(t){return t==null?void 0:t[e]}}are.exports=VQe});var lre=H(($Kn,sre)=>{var UQe=q4();function qQe(e){return function(t){return UQe(t,e)}}sre.exports=qQe});var ure=H((KKn,cre)=>{var GQe=$st(),WQe=lre(),YQe=QB(),jQe=$S();function XQe(e){return YQe(e)?GQe(jQe(e)):WQe(e)}cre.exports=XQe});var Vf=H((ZKn,hre)=>{var $Qe=Lee(),KQe=ore(),ZQe=h0(),JQe=Ti(),QQe=ure();function ttr(e){return typeof e=="function"?e:e==null?ZQe:typeof e=="object"?JQe(e)?KQe(e[0],e[1]):$Qe(e):QQe(e)}hre.exports=ttr});var Kst=H((JKn,fre)=>{var etr=yst(),rtr=Yte(),ntr=Vf(),itr=Ti();function otr(e,t){var r=itr(e)?etr:rtr;return r(e,ntr(t,3))}fre.exports=otr});var dre=H((QKn,pre)=>{var atr=Object.prototype,str=atr.hasOwnProperty;function ltr(e,t){return e!=null&&str.call(e,t)}pre.exports=ltr});var Zst=H((tZn,mre)=>{var ctr=dre(),utr=jst();function htr(e,t){return e!=null&&utr(e,t,ctr)}mre.exports=htr});var _re=H((eZn,gre)=>{var ftr=UB(),ptr=Zv(),dtr=qS(),mtr=Ti(),gtr=Hf(),_tr=$v(),ytr=z4(),vtr=YS(),xtr="[object Map]",btr="[object Set]",wtr=Object.prototype,Str=wtr.hasOwnProperty;function Mtr(e){if(e==null)return!0;if(gtr(e)&&(mtr(e)||typeof e=="string"||typeof e.splice=="function"||_tr(e)||vtr(e)||dtr(e)))return!e.length;var t=ptr(e);if(t==xtr||t==btr)return!e.size;if(ytr(e))return!ftr(e).length;for(var r in e)if(Str.call(e,r))return!1;return!0}gre.exports=Mtr});var Jst=H((rZn,yre)=>{function Etr(e){return e===void 0}yre.exports=Etr});var Qst=H((nZn,vre)=>{var Ttr=H4(),Ctr=Hf();function Atr(e,t){var r=-1,n=Ctr(e)?Array(e.length):[];return Ttr(e,function(i,o,a){n[++r]=t(i,o,a)}),n}vre.exports=Atr});var tlt=H((iZn,xre)=>{var Ptr=V4(),Itr=Vf(),Ltr=Qst(),ktr=Ti();function Rtr(e,t){var r=ktr(e)?Ptr:Ltr;return r(e,Itr(t,3))}xre.exports=Rtr});var wre=H((oZn,bre)=>{function Ntr(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}bre.exports=Ntr});var Mre=H((aZn,Sre)=>{function Dtr(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}Sre.exports=Dtr});var elt=H((sZn,Ere)=>{var Otr=wre(),ztr=H4(),Ftr=Vf(),Btr=Mre(),Htr=Ti();function Vtr(e,t,r){var n=Htr(e)?Otr:Btr,i=arguments.length<3;return n(e,Ftr(t,4),r,i,ztr)}Ere.exports=Vtr});var Cre=H((lZn,Tre)=>{var Utr=l0(),qtr=Ti(),Gtr=Yu(),Wtr="[object String]";function Ytr(e){return typeof e=="string"||!qtr(e)&&Gtr(e)&&Utr(e)==Wtr}Tre.exports=Ytr});var Pre=H((cZn,Are)=>{var jtr=$st(),Xtr=jtr("length");Are.exports=Xtr});var Lre=H((uZn,Ire)=>{var $tr="\\ud800-\\udfff",Ktr="\\u0300-\\u036f",Ztr="\\ufe20-\\ufe2f",Jtr="\\u20d0-\\u20ff",Qtr=Ktr+Ztr+Jtr,ter="\\ufe0e\\ufe0f",eer="\\u200d",rer=RegExp("["+eer+$tr+Qtr+ter+"]");function ner(e){return rer.test(e)}Ire.exports=ner});var Hre=H((hZn,Bre)=>{var Rre="\\ud800-\\udfff",ier="\\u0300-\\u036f",oer="\\ufe20-\\ufe2f",aer="\\u20d0-\\u20ff",ser=ier+oer+aer,ler="\\ufe0e\\ufe0f",cer="["+Rre+"]",rlt="["+ser+"]",nlt="\\ud83c[\\udffb-\\udfff]",uer="(?:"+rlt+"|"+nlt+")",Nre="[^"+Rre+"]",Dre="(?:\\ud83c[\\udde6-\\uddff]){2}",Ore="[\\ud800-\\udbff][\\udc00-\\udfff]",her="\\u200d",zre=uer+"?",Fre="["+ler+"]?",fer="(?:"+her+"(?:"+[Nre,Dre,Ore].join("|")+")"+Fre+zre+")*",per=Fre+zre+fer,der="(?:"+[Nre+rlt+"?",rlt,Dre,Ore,cer].join("|")+")",kre=RegExp(nlt+"(?="+nlt+")|"+der+per,"g");function mer(e){for(var t=kre.lastIndex=0;kre.test(e);)++t;return t}Bre.exports=mer});var Ure=H((fZn,Vre)=>{var ger=Pre(),_er=Lre(),yer=Hre();function ver(e){return _er(e)?yer(e):ger(e)}Vre.exports=ver});var Gre=H((pZn,qre)=>{var xer=UB(),ber=Zv(),wer=Hf(),Ser=Cre(),Mer=Ure(),Eer="[object Map]",Ter="[object Set]";function Cer(e){if(e==null)return 0;if(wer(e))return Ser(e)?Mer(e):e.length;var t=ber(e);return t==Eer||t==Ter?e.size:xer(e).length}qre.exports=Cer});var Yre=H((dZn,Wre)=>{var Aer=BB(),Per=Lst(),Ier=$B(),Ler=Vf(),ker=B4(),Rer=Ti(),Ner=$v(),Der=FS(),Oer=El(),zer=YS();function Fer(e,t,r){var n=Rer(e),i=n||Ner(e)||zer(e);if(t=Ler(t,4),r==null){var o=e&&e.constructor;i?r=n?new o:[]:Oer(e)?r=Der(o)?Per(ker(e)):{}:r={}}return(i?Aer:Ier)(e,function(a,s,l){return t(r,a,s,l)}),r}Wre.exports=Fer});var Kre=H((mZn,$re)=>{var jre=Xv(),Ber=qS(),Her=Ti(),Xre=jre?jre.isConcatSpreadable:void 0;function Ver(e){return Her(e)||Ber(e)||!!(Xre&&e&&e[Xre])}$re.exports=Ver});var tH=H((gZn,Jre)=>{var Uer=GB(),qer=Kre();function Zre(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=qer),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Zre(s,t-1,r,n,i):Uer(i,s):n||(i[i.length]=s)}return i}Jre.exports=Zre});var tne=H((_Zn,Qre)=>{function Ger(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Qre.exports=Ger});var ilt=H((yZn,rne)=>{var Wer=tne(),ene=Math.max;function Yer(e,t,r){return t=ene(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=ene(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Wer(e,this,s)}}rne.exports=Yer});var one=H((vZn,ine)=>{var jer=jB(),nne=fst(),Xer=h0(),$er=nne?function(e,t){return nne(e,"toString",{configurable:!0,enumerable:!1,value:jer(t),writable:!0})}:Xer;ine.exports=$er});var sne=H((xZn,ane)=>{var Ker=800,Zer=16,Jer=Date.now;function Qer(e){var t=0,r=0;return function(){var n=Jer(),i=Zer-(n-r);if(r=n,i>0){if(++t>=Ker)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ane.exports=Qer});var olt=H((bZn,lne)=>{var trr=one(),err=sne(),rrr=err(trr);lne.exports=rrr});var G4=H((wZn,cne)=>{var nrr=h0(),irr=ilt(),orr=olt();function arr(e,t){return orr(irr(e,t,nrr),e+"")}cne.exports=arr});var alt=H((SZn,une)=>{function srr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}une.exports=srr});var fne=H((MZn,hne)=>{function lrr(e){return e!==e}hne.exports=lrr});var dne=H((EZn,pne)=>{function crr(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}pne.exports=crr});var gne=H((TZn,mne)=>{var urr=alt(),hrr=fne(),frr=dne();function prr(e,t,r){return t===t?frr(e,t,r):urr(e,hrr,r)}mne.exports=prr});var yne=H((CZn,_ne)=>{var drr=gne();function mrr(e,t){var r=e==null?0:e.length;return!!r&&drr(e,t,0)>-1}_ne.exports=mrr});var xne=H((AZn,vne)=>{function grr(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}vne.exports=grr});var wne=H((PZn,bne)=>{function _rr(){}bne.exports=_rr});var Mne=H((IZn,Sne)=>{var slt=Sst(),yrr=wne(),vrr=ZB(),xrr=1/0,brr=slt&&1/vrr(new slt([,-0]))[1]==xrr?function(e){return new slt(e)}:yrr;Sne.exports=brr});var Tne=H((LZn,Ene)=>{var wrr=zst(),Srr=yne(),Mrr=xne(),Err=Fst(),Trr=Mne(),Crr=ZB(),Arr=200;function Prr(e,t,r){var n=-1,i=Srr,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=Mrr;else if(o>=Arr){var c=t?null:Trr(e);if(c)return Crr(c);a=!1,i=Err,l=new wrr}else l=t?[]:s;t:for(;++n<o;){var u=e[n],h=t?t(u):u;if(u=r||u!==0?u:0,a&&h===h){for(var f=l.length;f--;)if(l[f]===h)continue t;t&&l.push(h),s.push(u)}else i(l,h,r)||(l!==s&&l.push(h),s.push(u))}return s}Ene.exports=Prr});var llt=H((kZn,Cne)=>{var Irr=Hf(),Lrr=Yu();function krr(e){return Lrr(e)&&Irr(e)}Cne.exports=krr});var Pne=H((RZn,Ane)=>{var Rrr=tH(),Nrr=G4(),Drr=Tne(),Orr=llt(),zrr=Nrr(function(e){return Drr(Rrr(e,1,Orr,!0))});Ane.exports=zrr});var Lne=H((NZn,Ine)=>{var Frr=V4();function Brr(e,t){return Frr(t,function(r){return e[r]})}Ine.exports=Brr});var clt=H((DZn,kne)=>{var Hrr=Lne(),Vrr=Pd();function Urr(e){return e==null?[]:Hrr(e,Vrr(e))}kne.exports=Urr});var Tl=H((OZn,Rne)=>{var eH;if(typeof Ex=="function")try{eH={clone:kte(),constant:jB(),each:Ost(),filter:Kst(),has:Zst(),isArray:Ti(),isEmpty:_re(),isFunction:FS(),isUndefined:Jst(),keys:Pd(),map:tlt(),reduce:elt(),size:Gre(),transform:Yre(),union:Pne(),values:clt()}}catch(e){}eH||(eH=window._);Rne.exports=eH});var rH=H((FZn,zne)=>{"use strict";var je=Tl();zne.exports=cr;var qrr="\0",Qv="\0",Nne="";function cr(e){this._isDirected=je.has(e,"directed")?e.directed:!0,this._isMultigraph=je.has(e,"multigraph")?e.multigraph:!1,this._isCompound=je.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=je.constant(void 0),this._defaultEdgeLabelFn=je.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Qv]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}cr.prototype._nodeCount=0;cr.prototype._edgeCount=0;cr.prototype.isDirected=function(){return this._isDirected};cr.prototype.isMultigraph=function(){return this._isMultigraph};cr.prototype.isCompound=function(){return this._isCompound};cr.prototype.setGraph=function(e){return this._label=e,this};cr.prototype.graph=function(){return this._label};cr.prototype.setDefaultNodeLabel=function(e){return je.isFunction(e)||(e=je.constant(e)),this._defaultNodeLabelFn=e,this};cr.prototype.nodeCount=function(){return this._nodeCount};cr.prototype.nodes=function(){return je.keys(this._nodes)};cr.prototype.sources=function(){var e=this;return je.filter(this.nodes(),function(t){return je.isEmpty(e._in[t])})};cr.prototype.sinks=function(){var e=this;return je.filter(this.nodes(),function(t){return je.isEmpty(e._out[t])})};cr.prototype.setNodes=function(e,t){var r=arguments,n=this;return je.each(e,function(i){r.length>1?n.setNode(i,t):n.setNode(i)}),this};cr.prototype.setNode=function(e,t){return je.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Qv,this._children[e]={},this._children[Qv][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};cr.prototype.node=function(e){return this._nodes[e]};cr.prototype.hasNode=function(e){return je.has(this._nodes,e)};cr.prototype.removeNode=function(e){var t=this;if(je.has(this._nodes,e)){var r=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],je.each(this.children(e),function(n){t.setParent(n)}),delete this._children[e]),je.each(je.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],je.each(je.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};cr.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(je.isUndefined(t))t=Qv;else{t+="";for(var r=t;!je.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this};cr.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};cr.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Qv)return t}};cr.prototype.children=function(e){if(je.isUndefined(e)&&(e=Qv),this._isCompound){var t=this._children[e];if(t)return je.keys(t)}else{if(e===Qv)return this.nodes();if(this.hasNode(e))return[]}};cr.prototype.predecessors=function(e){var t=this._preds[e];if(t)return je.keys(t)};cr.prototype.successors=function(e){var t=this._sucs[e];if(t)return je.keys(t)};cr.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return je.union(t,this.successors(e))};cr.prototype.isLeaf=function(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0};cr.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;je.each(this._nodes,function(o,a){e(a)&&t.setNode(a,o)}),je.each(this._edgeObjs,function(o){t.hasNode(o.v)&&t.hasNode(o.w)&&t.setEdge(o,r.edge(o))});var n={};function i(o){var a=r.parent(o);return a===void 0||t.hasNode(a)?(n[o]=a,a):a in n?n[a]:i(a)}return this._isCompound&&je.each(t.nodes(),function(o){t.setParent(o,i(o))}),t};cr.prototype.setDefaultEdgeLabel=function(e){return je.isFunction(e)||(e=je.constant(e)),this._defaultEdgeLabelFn=e,this};cr.prototype.edgeCount=function(){return this._edgeCount};cr.prototype.edges=function(){return je.values(this._edgeObjs)};cr.prototype.setPath=function(e,t){var r=this,n=arguments;return je.reduce(e,function(i,o){return n.length>1?r.setEdge(i,o,t):r.setEdge(i,o),o}),this};cr.prototype.setEdge=function(){var e,t,r,n,i=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,t=""+t,je.isUndefined(r)||(r=""+r);var a=W4(this._isDirected,e,t,r);if(je.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=n),this;if(!je.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=i?n:this._defaultEdgeLabelFn(e,t,r);var s=Grr(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Dne(this._preds[t],e),Dne(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this};cr.prototype.edge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r);return this._edgeLabels[n]};cr.prototype.hasEdge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r);return je.has(this._edgeLabels,n)};cr.prototype.removeEdge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],One(this._preds[t],e),One(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this};cr.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=je.values(r);return t?je.filter(n,function(i){return i.v===t}):n}};cr.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=je.values(r);return t?je.filter(n,function(i){return i.w===t}):n}};cr.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};function Dne(e,t){e[t]?e[t]++:e[t]=1}function One(e,t){--e[t]||delete e[t]}function W4(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}return i+Nne+o+Nne+(je.isUndefined(n)?qrr:n)}function Grr(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return n&&(s.name=n),s}function ult(e,t){return W4(e,t.v,t.w,t.name)}});var Bne=H((BZn,Fne)=>{Fne.exports="2.1.8"});var Vne=H((HZn,Hne)=>{Hne.exports={Graph:rH(),version:Bne()}});var qne=H((VZn,Une)=>{var Uf=Tl(),Wrr=rH();Une.exports={write:Yrr,read:$rr};function Yrr(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:jrr(e),edges:Xrr(e)};return Uf.isUndefined(e.graph())||(t.value=Uf.clone(e.graph())),t}function jrr(e){return Uf.map(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return Uf.isUndefined(r)||(i.value=r),Uf.isUndefined(n)||(i.parent=n),i})}function Xrr(e){return Uf.map(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Uf.isUndefined(t.name)||(n.name=t.name),Uf.isUndefined(r)||(n.value=r),n})}function $rr(e){var t=new Wrr(e.options).setGraph(e.value);return Uf.each(e.nodes,function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),Uf.each(e.edges,function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}});var Wne=H((UZn,Gne)=>{var nH=Tl();Gne.exports=Krr;function Krr(e){var t={},r=[],n;function i(o){nH.has(t,o)||(t[o]=!0,n.push(o),nH.each(e.successors(o),i),nH.each(e.predecessors(o),i))}return nH.each(e.nodes(),function(o){n=[],i(o),n.length&&r.push(n)}),r}});var hlt=H((qZn,jne)=>{var Yne=Tl();jne.exports=Vc;function Vc(){this._arr=[],this._keyIndices={}}Vc.prototype.size=function(){return this._arr.length};Vc.prototype.keys=function(){return this._arr.map(function(e){return e.key})};Vc.prototype.has=function(e){return Yne.has(this._keyIndices,e)};Vc.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority};Vc.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};Vc.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Yne.has(r,e)){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1};Vc.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};Vc.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)};Vc.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))};Vc.prototype._decrease=function(e){for(var t=this._arr,r=t[e].priority,n;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n};Vc.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}});var flt=H((GZn,Xne)=>{var Zrr=Tl(),Jrr=hlt();Xne.exports=tnr;var Qrr=Zrr.constant(1);function tnr(e,t,r,n){return enr(e,String(t),r||Qrr,n||function(i){return e.outEdges(i)})}function enr(e,t,r,n){var i={},o=new Jrr,a,s,l=function(c){var u=c.v!==a?c.v:c.w,h=i[u],f=r(c),p=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+f);p<h.distance&&(h.distance=p,h.predecessor=a,o.decrease(u,p))};for(e.nodes().forEach(function(c){var u=c===t?0:Number.POSITIVE_INFINITY;i[c]={distance:u},o.add(c,u)});o.size()>0&&(a=o.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(l);return i}});var Kne=H((WZn,$ne)=>{var rnr=flt(),nnr=Tl();$ne.exports=inr;function inr(e,t,r){return nnr.transform(e.nodes(),function(n,i){n[i]=rnr(e,i,t,r)},{})}});var plt=H((YZn,Jne)=>{var Zne=Tl();Jne.exports=onr;function onr(e){var t=0,r=[],n={},i=[];function o(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach(function(u){Zne.has(n,u)?n[u].onStack&&(s.lowlink=Math.min(s.lowlink,n[u].index)):(o(u),s.lowlink=Math.min(s.lowlink,n[u].lowlink))}),s.lowlink===s.index){var l=[],c;do c=r.pop(),n[c].onStack=!1,l.push(c);while(a!==c);i.push(l)}}return e.nodes().forEach(function(a){Zne.has(n,a)||o(a)}),i}});var tie=H((jZn,Qne)=>{var anr=Tl(),snr=plt();Qne.exports=lnr;function lnr(e){return anr.filter(snr(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var rie=H((XZn,eie)=>{var cnr=Tl();eie.exports=hnr;var unr=cnr.constant(1);function hnr(e,t,r){return fnr(e,t||unr,r||function(n){return e.outEdges(n)})}function fnr(e,t,r){var n={},i=e.nodes();return i.forEach(function(o){n[o]={},n[o][o]={distance:0},i.forEach(function(a){o!==a&&(n[o][a]={distance:Number.POSITIVE_INFINITY})}),r(o).forEach(function(a){var s=a.v===o?a.w:a.v,l=t(a);n[o][s]={distance:l,predecessor:o}})}),i.forEach(function(o){var a=n[o];i.forEach(function(s){var l=n[s];i.forEach(function(c){var u=l[o],h=a[c],f=l[c],p=u.distance+h.distance;p<f.distance&&(f.distance=p,f.predecessor=h.predecessor)})})}),n}});var dlt=H(($Zn,iie)=>{var Y4=Tl();iie.exports=nie;nie.CycleException=iH;function nie(e){var t={},r={},n=[];function i(o){if(Y4.has(r,o))throw new iH;Y4.has(t,o)||(r[o]=!0,t[o]=!0,Y4.each(e.predecessors(o),i),delete r[o],n.push(o))}if(Y4.each(e.sinks(),i),Y4.size(t)!==e.nodeCount())throw new iH;return n}function iH(){}iH.prototype=new Error});var sie=H((KZn,aie)=>{var oie=dlt();aie.exports=pnr;function pnr(e){try{oie(e)}catch(t){if(t instanceof oie.CycleException)return!1;throw t}return!0}});var mlt=H((ZZn,cie)=>{var oH=Tl();cie.exports=dnr;function dnr(e,t,r){oH.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return oH.each(t,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);lie(e,a,r==="post",o,n,i)}),i}function lie(e,t,r,n,i,o){oH.has(n,t)||(n[t]=!0,r||o.push(t),oH.each(i(t),function(a){lie(e,a,r,n,i,o)}),r&&o.push(t))}});var hie=H((JZn,uie)=>{var mnr=mlt();uie.exports=gnr;function gnr(e,t){return mnr(e,t,"post")}});var pie=H((QZn,fie)=>{var _nr=mlt();fie.exports=ynr;function ynr(e,t){return _nr(e,t,"pre")}});var gie=H((tJn,mie)=>{var die=Tl(),vnr=rH(),xnr=hlt();mie.exports=bnr;function bnr(e,t){var r=new vnr,n={},i=new xnr,o;function a(l){var c=l.v===o?l.w:l.v,u=i.priority(c);if(u!==void 0){var h=t(l);h<u&&(n[c]=o,i.decrease(c,h))}}if(e.nodeCount()===0)return r;die.each(e.nodes(),function(l){i.add(l,Number.POSITIVE_INFINITY),r.setNode(l)}),i.decrease(e.nodes()[0],0);for(var s=!1;i.size()>0;){if(o=i.removeMin(),die.has(n,o))r.setEdge(o,n[o]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(o).forEach(a)}return r}});var yie=H((eJn,_ie)=>{_ie.exports={components:Wne(),dijkstra:flt(),dijkstraAll:Kne(),findCycles:tie(),floydWarshall:rie(),isAcyclic:sie(),postorder:hie(),preorder:pie(),prim:gie(),tarjan:plt(),topsort:dlt()}});var bie=H((rJn,xie)=>{var vie=Vne();xie.exports={Graph:vie.Graph,json:qne(),alg:yie(),version:vie.version}});var Uc=H((nJn,wie)=>{var aH;if(typeof Ex=="function")try{aH=bie()}catch(e){}aH||(aH=window.graphlib);wie.exports=aH});var Mie=H((oJn,Sie)=>{var wnr=Rst(),Snr=1,Mnr=4;function Enr(e){return wnr(e,Snr|Mnr)}Sie.exports=Enr});var j4=H((aJn,Eie)=>{var Tnr=jv(),Cnr=Hf(),Anr=R4(),Pnr=El();function Inr(e,t,r){if(!Pnr(r))return!1;var n=typeof t;return(n=="number"?Cnr(r)&&Anr(t,r.length):n=="string"&&t in r)?Tnr(r[t],e):!1}Eie.exports=Inr});var Aie=H((sJn,Cie)=>{var Lnr=G4(),knr=jv(),Rnr=j4(),Nnr=u0(),Tie=Object.prototype,Dnr=Tie.hasOwnProperty,Onr=Lnr(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Rnr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Nnr(o),s=-1,l=a.length;++s<l;){var c=a[s],u=e[c];(u===void 0||knr(u,Tie[c])&&!Dnr.call(e,c))&&(e[c]=o[c])}return e});Cie.exports=Onr});var Iie=H((lJn,Pie)=>{var znr=Vf(),Fnr=Hf(),Bnr=Pd();function Hnr(e){return function(t,r,n){var i=Object(t);if(!Fnr(t)){var o=znr(r,3);t=Bnr(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}Pie.exports=Hnr});var kie=H((cJn,Lie)=>{var Vnr=/\s/;function Unr(e){for(var t=e.length;t--&&Vnr.test(e.charAt(t)););return t}Lie.exports=Unr});var Nie=H((uJn,Rie)=>{var qnr=kie(),Gnr=/^\s+/;function Wnr(e){return e&&e.slice(0,qnr(e)+1).replace(Gnr,"")}Rie.exports=Wnr});var Fie=H((hJn,zie)=>{var Ynr=Nie(),Die=El(),jnr=Jv(),Oie=0/0,Xnr=/^[-+]0x[0-9a-f]+$/i,$nr=/^0b[01]+$/i,Knr=/^0o[0-7]+$/i,Znr=parseInt;function Jnr(e){if(typeof e=="number")return e;if(jnr(e))return Oie;if(Die(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Die(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ynr(e);var r=$nr.test(e);return r||Knr.test(e)?Znr(e.slice(2),r?2:8):Xnr.test(e)?Oie:+e}zie.exports=Jnr});var glt=H((fJn,Hie)=>{var Qnr=Fie(),Bie=1/0,tir=17976931348623157e292;function eir(e){if(!e)return e===0?e:0;if(e=Qnr(e),e===Bie||e===-Bie){var t=e<0?-1:1;return t*tir}return e===e?e:0}Hie.exports=eir});var Uie=H((pJn,Vie)=>{var rir=glt();function nir(e){var t=rir(e),r=t%1;return t===t?r?t-r:t:0}Vie.exports=nir});var Gie=H((dJn,qie)=>{var iir=alt(),oir=Vf(),air=Uie(),sir=Math.max;function lir(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:air(r);return i<0&&(i=sir(n+i,0)),iir(e,oir(t,3),i)}qie.exports=lir});var Yie=H((mJn,Wie)=>{var cir=Iie(),uir=Gie(),hir=cir(uir);Wie.exports=hir});var _lt=H((gJn,jie)=>{var fir=tH();function pir(e){var t=e==null?0:e.length;return t?fir(e,1):[]}jie.exports=pir});var $ie=H((_Jn,Xie)=>{var dir=XB(),mir=Nst(),gir=u0();function _ir(e,t){return e==null?e:dir(e,mir(t),gir)}Xie.exports=_ir});var Zie=H((yJn,Kie)=>{function yir(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Kie.exports=yir});var Qie=H((vJn,Jie)=>{var vir=I4(),xir=$B(),bir=Vf();function wir(e,t){var r={};return t=bir(t,3),xir(e,function(n,i,o){vir(r,i,t(n,i,o))}),r}Jie.exports=wir});var sH=H((xJn,toe)=>{var Sir=Jv();function Mir(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(a!=null&&(s===void 0?a===a&&!Sir(a):r(a,s)))var s=a,l=o}return l}toe.exports=Mir});var roe=H((bJn,eoe)=>{function Eir(e,t){return e>t}eoe.exports=Eir});var ioe=H((wJn,noe)=>{var Tir=sH(),Cir=roe(),Air=h0();function Pir(e){return e&&e.length?Tir(e,Air,Cir):void 0}noe.exports=Pir});var ylt=H((SJn,ooe)=>{var Iir=I4(),Lir=jv();function kir(e,t,r){(r!==void 0&&!Lir(e[t],r)||r===void 0&&!(t in e))&&Iir(e,t,r)}ooe.exports=kir});var loe=H((MJn,soe)=>{var Rir=l0(),Nir=B4(),Dir=Yu(),Oir="[object Object]",zir=Function.prototype,Fir=Object.prototype,aoe=zir.toString,Bir=Fir.hasOwnProperty,Hir=aoe.call(Object);function Vir(e){if(!Dir(e)||Rir(e)!=Oir)return!1;var t=Nir(e);if(t===null)return!0;var r=Bir.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&aoe.call(r)==Hir}soe.exports=Vir});var vlt=H((EJn,coe)=>{function Uir(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}coe.exports=Uir});var hoe=H((TJn,uoe)=>{var qir=US(),Gir=u0();function Wir(e){return qir(e,Gir(e))}uoe.exports=Wir});var _oe=H((CJn,goe)=>{var foe=ylt(),Yir=gst(),jir=Ist(),Xir=_st(),$ir=kst(),poe=qS(),doe=Ti(),Kir=llt(),Zir=$v(),Jir=FS(),Qir=El(),tor=loe(),eor=YS(),moe=vlt(),ror=hoe();function nor(e,t,r,n,i,o,a){var s=moe(e,r),l=moe(t,r),c=a.get(l);if(c){foe(e,r,c);return}var u=o?o(s,l,r+"",e,t,a):void 0,h=u===void 0;if(h){var f=doe(l),p=!f&&Zir(l),d=!f&&!p&&eor(l);u=l,f||p||d?doe(s)?u=s:Kir(s)?u=Xir(s):p?(h=!1,u=Yir(l,!0)):d?(h=!1,u=jir(l,!0)):u=[]:tor(l)||poe(l)?(u=s,poe(s)?u=ror(s):(!Qir(s)||Jir(s))&&(u=$ir(l))):h=!1}h&&(a.set(l,u),i(u,l,n,o,a),a.delete(l)),foe(e,r,u)}goe.exports=nor});var xoe=H((AJn,voe)=>{var ior=P4(),oor=ylt(),aor=XB(),sor=_oe(),lor=El(),cor=u0(),uor=vlt();function yoe(e,t,r,n,i){e!==t&&aor(t,function(o,a){if(i||(i=new ior),lor(o))sor(e,t,a,r,yoe,n,i);else{var s=n?n(uor(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),oor(e,a,s)}},cor)}voe.exports=yoe});var woe=H((PJn,boe)=>{var hor=G4(),por=j4();function dor(e){return hor(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&por(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}boe.exports=dor});var Moe=H((IJn,Soe)=>{var mor=xoe(),gor=woe(),_or=gor(function(e,t,r){mor(e,t,r)});Soe.exports=_or});var xlt=H((LJn,Eoe)=>{function yor(e,t){return e<t}Eoe.exports=yor});var Coe=H((kJn,Toe)=>{var vor=sH(),xor=xlt(),bor=h0();function wor(e){return e&&e.length?vor(e,bor,xor):void 0}Toe.exports=wor});var Poe=H((RJn,Aoe)=>{var Sor=sH(),Mor=Vf(),Eor=xlt();function Tor(e,t){return e&&e.length?Sor(e,Mor(t,2),Eor):void 0}Aoe.exports=Tor});var Loe=H((NJn,Ioe)=>{var Cor=Hc(),Aor=function(){return Cor.Date.now()};Ioe.exports=Aor});var Noe=H((DJn,Roe)=>{var Por=L4(),Ior=U4(),Lor=R4(),koe=El(),kor=$S();function Ror(e,t,r,n){if(!koe(e))return e;t=Ior(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var l=kor(t[i]),c=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=a){var u=s[l];c=n?n(u,l,s):void 0,c===void 0&&(c=koe(u)?u:Lor(t[i+1])?[]:{})}Por(s,l,c),s=s[l]}return e}Roe.exports=Ror});var Ooe=H((OJn,Doe)=>{var Nor=q4(),Dor=Noe(),Oor=U4();function zor(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Nor(e,a);r(s,a)&&Dor(o,Oor(a,e),s)}return o}Doe.exports=zor});var Foe=H((zJn,zoe)=>{var For=Ooe(),Bor=Xst();function Hor(e,t){return For(e,t,function(r,n){return Bor(e,n)})}zoe.exports=Hor});var Hoe=H((FJn,Boe)=>{var Vor=_lt(),Uor=ilt(),qor=olt();function Gor(e){return qor(Uor(e,void 0,Vor),e+"")}Boe.exports=Gor});var Uoe=H((BJn,Voe)=>{var Wor=Foe(),Yor=Hoe(),jor=Yor(function(e,t){return e==null?{}:Wor(e,t)});Voe.exports=jor});var Goe=H((HJn,qoe)=>{var Xor=Math.ceil,$or=Math.max;function Kor(e,t,r,n){for(var i=-1,o=$or(Xor((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}qoe.exports=Kor});var Yoe=H((VJn,Woe)=>{var Zor=Goe(),Jor=j4(),blt=glt();function Qor(e){return function(t,r,n){return n&&typeof n!="number"&&Jor(t,r,n)&&(r=n=void 0),t=blt(t),r===void 0?(r=t,t=0):r=blt(r),n=n===void 0?t<r?1:-1:blt(n),Zor(t,r,n,e)}}Woe.exports=Qor});var Xoe=H((UJn,joe)=>{var tar=Yoe(),ear=tar();joe.exports=ear});var Koe=H((qJn,$oe)=>{function rar(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}$oe.exports=rar});var Qoe=H((GJn,Joe)=>{var Zoe=Jv();function nar(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,o=Zoe(e),a=t!==void 0,s=t===null,l=t===t,c=Zoe(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||n&&a&&l||!r&&l||!i)return 1;if(!n&&!o&&!c&&e<t||c&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!l)return-1}return 0}Joe.exports=nar});var eae=H((WJn,tae)=>{var iar=Qoe();function oar(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=iar(i[n],o[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}tae.exports=oar});var nae=H((YJn,rae)=>{var wlt=V4(),aar=q4(),sar=Vf(),lar=Qst(),car=Koe(),uar=N4(),har=eae(),far=h0(),par=Ti();function dar(e,t,r){t.length?t=wlt(t,function(o){return par(o)?function(a){return aar(a,o.length===1?o[0]:o)}:o}):t=[far];var n=-1;t=wlt(t,uar(sar));var i=lar(e,function(o,a,s){var l=wlt(t,function(c){return c(o)});return{criteria:l,index:++n,value:o}});return car(i,function(o,a){return har(o,a,r)})}rae.exports=dar});var aae=H((jJn,oae)=>{var mar=tH(),gar=nae(),_ar=G4(),iae=j4(),yar=_ar(function(e,t){if(e==null)return[];var r=t.length;return r>1&&iae(e,t[0],t[1])?t=[]:r>2&&iae(t[0],t[1],t[2])&&(t=[t[0]]),gar(e,mar(t,1),[])});oae.exports=yar});var lae=H((XJn,sae)=>{var xar=Yst(),bar=0;function war(e){var t=++bar;return xar(e)+t}sae.exports=war});var uae=H(($Jn,cae)=>{function Sar(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;){var s=n<o?t[n]:void 0;r(a,e[n],s)}return a}cae.exports=Sar});var fae=H((KJn,hae)=>{var Mar=L4(),Ear=uae();function Tar(e,t){return Ear(e||[],t||[],Mar)}hae.exports=Tar});var qn=H((ZJn,pae)=>{var lH;if(typeof Ex=="function")try{lH={cloneDeep:Mie(),constant:jB(),defaults:Aie(),each:Ost(),filter:Kst(),find:Yie(),flatten:_lt(),forEach:Dst(),forIn:$ie(),has:Zst(),isUndefined:Jst(),last:Zie(),map:tlt(),mapValues:Qie(),max:ioe(),merge:Moe(),min:Coe(),minBy:Poe(),now:Loe(),pick:Uoe(),range:Xoe(),reduce:elt(),sortBy:aae(),uniqueId:lae(),values:clt(),zipObject:fae()}}catch(e){}lH||(lH=window._);pae.exports=lH});var gae=H((QJn,mae)=>{mae.exports=cH;function cH(){var e={};e._next=e._prev=e,this._sentinel=e}cH.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return dae(t),t};cH.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&dae(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};cH.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Car)),r=r._prev;return"["+e.join(", ")+"]"};function dae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Car(e,t){if(e!=="_next"&&e!=="_prev")return t}});var yae=H((tQn,_ae)=>{var Id=qn(),Aar=Uc().Graph,Par=gae();_ae.exports=Lar;var Iar=Id.constant(1);function Lar(e,t){if(e.nodeCount()<=1)return[];var r=Rar(e,t||Iar),n=kar(r.graph,r.buckets,r.zeroIdx);return Id.flatten(Id.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function kar(e,t,r){for(var n=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)Slt(e,t,r,a);for(;a=i.dequeue();)Slt(e,t,r,a);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(a=t[s].dequeue(),a){n=n.concat(Slt(e,t,r,a,!0));break}}}return n}function Slt(e,t,r,n,i){var o=i?[]:void 0;return Id.forEach(e.inEdges(n.v),function(a){var s=e.edge(a),l=e.node(a.v);i&&o.push({v:a.v,w:a.w}),l.out-=s,Mlt(t,r,l)}),Id.forEach(e.outEdges(n.v),function(a){var s=e.edge(a),l=a.w,c=e.node(l);c.in-=s,Mlt(t,r,c)}),e.removeNode(n.v),o}function Rar(e,t){var r=new Aar,n=0,i=0;Id.forEach(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),Id.forEach(e.edges(),function(s){var l=r.edge(s.v,s.w)||0,c=t(s),u=l+c;r.setEdge(s.v,s.w,u),i=Math.max(i,r.node(s.v).out+=c),n=Math.max(n,r.node(s.w).in+=c)});var o=Id.range(i+n+3).map(function(){return new Par}),a=n+1;return Id.forEach(r.nodes(),function(s){Mlt(o,a,r.node(s))}),{graph:r,buckets:o,zeroIdx:a}}function Mlt(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}});var xae=H((eQn,vae)=>{"use strict";var t1=qn(),Nar=yae();vae.exports={run:Dar,undo:zar};function Dar(e){var t=e.graph().acyclicer==="greedy"?Nar(e,r(e)):Oar(e);t1.forEach(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,t1.uniqueId("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function Oar(e){var t=[],r={},n={};function i(o){t1.has(n,o)||(n[o]=!0,r[o]=!0,t1.forEach(e.outEdges(o),function(a){t1.has(r,a.w)?t.push(a):i(a.w)}),delete r[o])}return t1.forEach(e.nodes(),i),t}function zar(e){t1.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}});var is=H((rQn,Mae)=>{"use strict";var Qr=qn(),bae=Uc().Graph;Mae.exports={addDummyNode:wae,simplify:Far,asNonCompoundGraph:Bar,successorWeights:Har,predecessorWeights:Var,intersectRect:Uar,buildLayerMatrix:qar,normalizeRanks:Gar,removeEmptyRanks:War,addBorderNode:Yar,maxRank:Sae,partition:jar,time:Xar,notime:$ar};function wae(e,t,r,n){var i;do i=Qr.uniqueId(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function Far(e){var t=new bae().setGraph(e.graph());return Qr.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),Qr.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function Bar(e){var t=new bae({multigraph:e.isMultigraph()}).setGraph(e.graph());return Qr.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),Qr.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function Har(e){var t=Qr.map(e.nodes(),function(r){var n={};return Qr.forEach(e.outEdges(r),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Qr.zipObject(e.nodes(),t)}function Var(e){var t=Qr.map(e.nodes(),function(r){var n={};return Qr.forEach(e.inEdges(r),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Qr.zipObject(e.nodes(),t)}function Uar(e,t){var r=e.x,n=e.y,i=t.x-r,o=t.y-n,a=e.width/2,s=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var l,c;return Math.abs(o)*a>Math.abs(i)*s?(o<0&&(s=-s),l=s*i/o,c=s):(i<0&&(a=-a),l=a,c=a*o/i),{x:r+l,y:n+c}}function qar(e){var t=Qr.map(Qr.range(Sae(e)+1),function(){return[]});return Qr.forEach(e.nodes(),function(r){var n=e.node(r),i=n.rank;Qr.isUndefined(i)||(t[i][n.order]=r)}),t}function Gar(e){var t=Qr.min(Qr.map(e.nodes(),function(r){return e.node(r).rank}));Qr.forEach(e.nodes(),function(r){var n=e.node(r);Qr.has(n,"rank")&&(n.rank-=t)})}function War(e){var t=Qr.min(Qr.map(e.nodes(),function(o){return e.node(o).rank})),r=[];Qr.forEach(e.nodes(),function(o){var a=e.node(o).rank-t;r[a]||(r[a]=[]),r[a].push(o)});var n=0,i=e.graph().nodeRankFactor;Qr.forEach(r,function(o,a){Qr.isUndefined(o)&&a%i!==0?--n:n&&Qr.forEach(o,function(s){e.node(s).rank+=n})})}function Yar(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),wae(e,"border",i,t)}function Sae(e){return Qr.max(Qr.map(e.nodes(),function(t){var r=e.node(t).rank;if(!Qr.isUndefined(r))return r}))}function jar(e,t){var r={lhs:[],rhs:[]};return Qr.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Xar(e,t){var r=Qr.now();try{return t()}finally{console.log(e+" time: "+(Qr.now()-r)+"ms")}}function $ar(e,t){return t()}});var Cae=H((nQn,Tae)=>{"use strict";var Eae=qn(),Kar=is();Tae.exports={run:Zar,undo:Qar};function Zar(e){e.graph().dummyChains=[],Eae.forEach(e.edges(),function(t){Jar(e,t)})}function Jar(e,t){var r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,a=t.name,s=e.edge(t),l=s.labelRank;if(o!==n+1){e.removeEdge(t);var c,u,h;for(h=0,++n;n<o;++h,++n)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:n},c=Kar.addDummyNode(e,"edge",u,"_d"),n===l&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(r,c,{weight:s.weight},a),h===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:s.weight},a)}}function Qar(e){Eae.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}});var X4=H((iQn,Aae)=>{"use strict";var uH=qn();Aae.exports={longestPath:tsr,slack:esr};function tsr(e){var t={};function r(n){var i=e.node(n);if(uH.has(t,n))return i.rank;t[n]=!0;var o=uH.min(uH.map(e.outEdges(n),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}uH.forEach(e.sources(),r)}function esr(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var Elt=H((oQn,Pae)=>{"use strict";var hH=qn(),rsr=Uc().Graph,fH=X4().slack;Pae.exports=nsr;function nsr(e){var t=new rsr({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;isr(t,e)<n;)i=osr(t,e),o=t.hasNode(i.v)?fH(e,i):-fH(e,i),asr(t,e,o);return t}function isr(e,t){function r(n){hH.forEach(t.nodeEdges(n),function(i){var o=i.v,a=n===o?i.w:o;!e.hasNode(a)&&!fH(t,i)&&(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}return hH.forEach(e.nodes(),r),e.nodeCount()}function osr(e,t){return hH.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return fH(t,r)})}function asr(e,t,r){hH.forEach(e.nodes(),function(n){t.node(n).rank+=r})}});var zae=H((aQn,Oae)=>{"use strict";var Ld=qn(),ssr=Elt(),lsr=X4().slack,csr=X4().longestPath,usr=Uc().alg.preorder,hsr=Uc().alg.postorder,fsr=is().simplify;Oae.exports=e1;e1.initLowLimValues=Clt;e1.initCutValues=Tlt;e1.calcCutValue=Lae;e1.leaveEdge=Rae;e1.enterEdge=Nae;e1.exchangeEdges=Dae;function e1(e){e=fsr(e),csr(e);var t=ssr(e);Clt(t),Tlt(t,e);for(var r,n;r=Rae(t);)n=Nae(t,e,r),Dae(t,e,r,n)}function Tlt(e,t){var r=hsr(e,e.nodes());r=r.slice(0,r.length-1),Ld.forEach(r,function(n){psr(e,t,n)})}function psr(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=Lae(e,t,r)}function Lae(e,t,r){var n=e.node(r),i=n.parent,o=!0,a=t.edge(r,i),s=0;return a||(o=!1,a=t.edge(i,r)),s=a.weight,Ld.forEach(t.nodeEdges(r),function(l){var c=l.v===r,u=c?l.w:l.v;if(u!==i){var h=c===o,f=t.edge(l).weight;if(s+=h?f:-f,msr(e,r,u)){var p=e.edge(r,u).cutvalue;s+=h?-p:p}}}),s}function Clt(e,t){arguments.length<2&&(t=e.nodes()[0]),kae(e,{},1,t)}function kae(e,t,r,n,i){var o=r,a=e.node(n);return t[n]=!0,Ld.forEach(e.neighbors(n),function(s){Ld.has(t,s)||(r=kae(e,t,r,s,n))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Rae(e){return Ld.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Nae(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var o=e.node(n),a=e.node(i),s=o,l=!1;o.lim>a.lim&&(s=a,l=!0);var c=Ld.filter(t.edges(),function(u){return l===Iae(e,e.node(u.v),s)&&l!==Iae(e,e.node(u.w),s)});return Ld.minBy(c,function(u){return lsr(t,u)})}function Dae(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),Clt(e),Tlt(e,t),dsr(e,t)}function dsr(e,t){var r=Ld.find(e.nodes(),function(i){return!t.node(i).parent}),n=usr(e,r);n=n.slice(1),Ld.forEach(n,function(i){var o=e.node(i).parent,a=t.edge(i,o),s=!1;a||(a=t.edge(o,i),s=!0),t.node(i).rank=t.node(o).rank+(s?a.minlen:-a.minlen)})}function msr(e,t,r){return e.hasEdge(t,r)}function Iae(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}});var Vae=H((sQn,Hae)=>{"use strict";var gsr=X4(),Bae=gsr.longestPath,_sr=Elt(),ysr=zae();Hae.exports=vsr;function vsr(e){switch(e.graph().ranker){case"network-simplex":Fae(e);break;case"tight-tree":bsr(e);break;case"longest-path":xsr(e);break;default:Fae(e)}}var xsr=Bae;function bsr(e){Bae(e),_sr(e)}function Fae(e){ysr(e)}});var qae=H((lQn,Uae)=>{var Alt=qn();Uae.exports=wsr;function wsr(e){var t=Msr(e);Alt.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,o=Ssr(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,c=a[l],u=!0;r!==i.w;){if(n=e.node(r),u){for(;(c=a[l])!==s&&e.node(c).maxRank<n.rank;)l++;c===s&&(u=!1)}if(!u){for(;l<a.length-1&&e.node(c=a[l+1]).minRank<=n.rank;)l++;c=a[l]}e.setParent(r,c),r=e.successors(r)[0]}})}function Ssr(e,t,r,n){var i=[],o=[],a=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),l,c;l=r;do l=e.parent(l),i.push(l);while(l&&(t[l].low>a||s>t[l].lim));for(c=l,l=n;(l=e.parent(l))!==c;)o.push(l);return{path:i.concat(o.reverse()),lca:c}}function Msr(e){var t={},r=0;function n(i){var o=r;Alt.forEach(e.children(i),n),t[i]={low:o,lim:r++}}return Alt.forEach(e.children(),n),t}});var Yae=H((cQn,Wae)=>{var kd=qn(),Plt=is();Wae.exports={run:Esr,cleanup:Asr};function Esr(e){var t=Plt.addDummyNode(e,"root",{},"_root"),r=Tsr(e),n=kd.max(kd.values(r))-1,i=2*n+1;e.graph().nestingRoot=t,kd.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=Csr(e)+1;kd.forEach(e.children(),function(a){Gae(e,t,i,o,n,r,a)}),e.graph().nodeRankFactor=i}function Gae(e,t,r,n,i,o,a){var s=e.children(a);if(!s.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:r});return}var l=Plt.addBorderNode(e,"_bt"),c=Plt.addBorderNode(e,"_bb"),u=e.node(a);e.setParent(l,a),u.borderTop=l,e.setParent(c,a),u.borderBottom=c,kd.forEach(s,function(h){Gae(e,t,r,n,i,o,h);var f=e.node(h),p=f.borderTop?f.borderTop:h,d=f.borderBottom?f.borderBottom:h,g=f.borderTop?n:2*n,_=p!==d?1:i-o[a]+1;e.setEdge(l,p,{weight:g,minlen:_,nestingEdge:!0}),e.setEdge(d,c,{weight:g,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,l,{weight:0,minlen:i+o[a]})}function Tsr(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&kd.forEach(o,function(a){r(a,i+1)}),t[n]=i}return kd.forEach(e.children(),function(n){r(n,1)}),t}function Csr(e){return kd.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function Asr(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,kd.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}});var $ae=H((uQn,Xae)=>{var Ilt=qn(),Psr=is();Xae.exports=Isr;function Isr(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&Ilt.forEach(n,t),Ilt.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)jae(e,"borderLeft","_bl",r,i,o),jae(e,"borderRight","_br",r,i,o)}}Ilt.forEach(e.children(),t)}function jae(e,t,r,n,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],l=Psr.addDummyNode(e,"border",a,r);i[t][o]=l,e.setParent(l,n),s&&e.setEdge(s,l,{weight:1})}});var Qae=H((hQn,Jae)=>{"use strict";var qf=qn();Jae.exports={adjust:Lsr,undo:ksr};function Lsr(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Zae(e)}function ksr(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&Rsr(e),(t==="lr"||t==="rl")&&(Nsr(e),Zae(e))}function Zae(e){qf.forEach(e.nodes(),function(t){Kae(e.node(t))}),qf.forEach(e.edges(),function(t){Kae(e.edge(t))})}function Kae(e){var t=e.width;e.width=e.height,e.height=t}function Rsr(e){qf.forEach(e.nodes(),function(t){Llt(e.node(t))}),qf.forEach(e.edges(),function(t){var r=e.edge(t);qf.forEach(r.points,Llt),qf.has(r,"y")&&Llt(r)})}function Llt(e){e.y=-e.y}function Nsr(e){qf.forEach(e.nodes(),function(t){klt(e.node(t))}),qf.forEach(e.edges(),function(t){var r=e.edge(t);qf.forEach(r.points,klt),qf.has(r,"x")&&klt(r)})}function klt(e){var t=e.x;e.x=e.y,e.y=t}});var ese=H((fQn,tse)=>{"use strict";var Rd=qn();tse.exports=Dsr;function Dsr(e){var t={},r=Rd.filter(e.nodes(),function(s){return!e.children(s).length}),n=Rd.max(Rd.map(r,function(s){return e.node(s).rank})),i=Rd.map(Rd.range(n+1),function(){return[]});function o(s){if(!Rd.has(t,s)){t[s]=!0;var l=e.node(s);i[l.rank].push(s),Rd.forEach(e.successors(s),o)}}var a=Rd.sortBy(r,function(s){return e.node(s).rank});return Rd.forEach(a,o),i}});var nse=H((pQn,rse)=>{"use strict";var f0=qn();rse.exports=Osr;function Osr(e,t){for(var r=0,n=1;n<t.length;++n)r+=zsr(e,t[n-1],t[n]);return r}function zsr(e,t,r){for(var n=f0.zipObject(r,f0.map(r,function(c,u){return u})),i=f0.flatten(f0.map(t,function(c){return f0.sortBy(f0.map(e.outEdges(c),function(u){return{pos:n[u.w],weight:e.edge(u).weight}}),"pos")}),!0),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var s=f0.map(new Array(a),function(){return 0}),l=0;return f0.forEach(i.forEach(function(c){var u=c.pos+o;s[u]+=c.weight;for(var h=0;u>0;)u%2&&(h+=s[u+1]),u=u-1>>1,s[u]+=c.weight;l+=c.weight*h})),l}});var ase=H((dQn,ose)=>{var ise=qn();ose.exports=Fsr;function Fsr(e,t){return ise.map(t,function(r){var n=e.inEdges(r);if(n.length){var i=ise.reduce(n,function(o,a){var s=e.edge(a),l=e.node(a.v);return{sum:o.sum+s.weight*l.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}});var lse=H((mQn,sse)=>{"use strict";var Cl=qn();sse.exports=Bsr;function Bsr(e,t){var r={};Cl.forEach(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Cl.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Cl.forEach(t.edges(),function(i){var o=r[i.v],a=r[i.w];!Cl.isUndefined(o)&&!Cl.isUndefined(a)&&(a.indegree++,o.out.push(r[i.w]))});var n=Cl.filter(r,function(i){return!i.indegree});return Hsr(n)}function Hsr(e){var t=[];function r(o){return function(a){a.merged||(Cl.isUndefined(a.barycenter)||Cl.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&Vsr(o,a)}}function n(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();t.push(i),Cl.forEach(i.in.reverse(),r(i)),Cl.forEach(i.out,n(i))}return Cl.map(Cl.filter(t,function(o){return!o.merged}),function(o){return Cl.pick(o,["vs","i","barycenter","weight"])})}function Vsr(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}});var hse=H((gQn,use)=>{var $4=qn(),Usr=is();use.exports=qsr;function qsr(e,t){var r=Usr.partition(e,function(u){return $4.has(u,"barycenter")}),n=r.lhs,i=$4.sortBy(r.rhs,function(u){return-u.i}),o=[],a=0,s=0,l=0;n.sort(Gsr(!!t)),l=cse(o,i,l),$4.forEach(n,function(u){l+=u.vs.length,o.push(u.vs),a+=u.barycenter*u.weight,s+=u.weight,l=cse(o,i,l)});var c={vs:$4.flatten(o,!0)};return s&&(c.barycenter=a/s,c.weight=s),c}function cse(e,t,r){for(var n;t.length&&(n=$4.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Gsr(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}});var dse=H((_Qn,pse)=>{var p0=qn(),Wsr=ase(),Ysr=lse(),jsr=hse();pse.exports=fse;function fse(e,t,r,n){var i=e.children(t),o=e.node(t),a=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,l={};a&&(i=p0.filter(i,function(d){return d!==a&&d!==s}));var c=Wsr(e,i);p0.forEach(c,function(d){if(e.children(d.v).length){var g=fse(e,d.v,r,n);l[d.v]=g,p0.has(g,"barycenter")&&$sr(d,g)}});var u=Ysr(c,r);Xsr(u,l);var h=jsr(u,n);if(a&&(h.vs=p0.flatten([a,h.vs,s],!0),e.predecessors(a).length)){var f=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(s)[0]);p0.has(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+f.order+p.order)/(h.weight+2),h.weight+=2}return h}function Xsr(e,t){p0.forEach(e,function(r){r.vs=p0.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function $sr(e,t){p0.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}});var gse=H((yQn,mse)=>{var K4=qn(),Ksr=Uc().Graph;mse.exports=Zsr;function Zsr(e,t,r){var n=Jsr(e),i=new Ksr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(o){return e.node(o)});return K4.forEach(e.nodes(),function(o){var a=e.node(o),s=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(i.setNode(o),i.setParent(o,s||n),K4.forEach(e[r](o),function(l){var c=l.v===o?l.w:l.v,u=i.edge(c,o),h=K4.isUndefined(u)?0:u.weight;i.setEdge(c,o,{weight:e.edge(l).weight+h})}),K4.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function Jsr(e){for(var t;e.hasNode(t=K4.uniqueId("_root")););return t}});var yse=H((vQn,_se)=>{var Qsr=qn();_se.exports=tlr;function tlr(e,t,r){var n={},i;Qsr.forEach(r,function(o){for(var a=e.parent(o),s,l;a;){if(s=e.parent(a),s?(l=n[s],n[s]=a):(l=i,i=a),l&&l!==a){t.setEdge(l,a);return}a=s}})}});var Sse=H((xQn,wse)=>{"use strict";var d0=qn(),elr=ese(),rlr=nse(),nlr=dse(),ilr=gse(),olr=yse(),alr=Uc().Graph,vse=is();wse.exports=slr;function slr(e){var t=vse.maxRank(e),r=xse(e,d0.range(1,t+1),"inEdges"),n=xse(e,d0.range(t-1,-1,-1),"outEdges"),i=elr(e);bse(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,l=0;l<4;++s,++l){llr(s%2?r:n,s%4>=2),i=vse.buildLayerMatrix(e);var c=rlr(e,i);c<o&&(l=0,a=d0.cloneDeep(i),o=c)}bse(e,a)}function xse(e,t,r){return d0.map(t,function(n){return ilr(e,n,r)})}function llr(e,t){var r=new alr;d0.forEach(e,function(n){var i=n.graph().root,o=nlr(n,i,r,t);d0.forEach(o.vs,function(a,s){n.node(a).order=s}),olr(n,r,o.vs)})}function bse(e,t){d0.forEach(t,function(r){d0.forEach(r,function(n,i){e.node(n).order=i})})}});var Rse=H((bQn,kse)=>{"use strict";var Xe=qn(),clr=Uc().Graph,ulr=is();kse.exports={positionX:plr,findType1Conflicts:Mse,findType2Conflicts:Ese,addConflict:Rlt,hasConflict:Tse,verticalAlignment:Cse,horizontalCompaction:Ase,alignCoordinates:Ise,findSmallestWidthAlignment:Pse,balance:Lse};function Mse(e,t){var r={};function n(i,o){var a=0,s=0,l=i.length,c=Xe.last(o);return Xe.forEach(o,function(u,h){var f=hlr(e,u),p=f?e.node(f).order:l;(f||u===c)&&(Xe.forEach(o.slice(s,h+1),function(d){Xe.forEach(e.predecessors(d),function(g){var _=e.node(g),y=_.order;(y<a||p<y)&&!(_.dummy&&e.node(d).dummy)&&Rlt(r,g,d)})}),s=h+1,a=p)}),o}return Xe.reduce(t,n),r}function Ese(e,t){var r={};function n(o,a,s,l,c){var u;Xe.forEach(Xe.range(a,s),function(h){u=o[h],e.node(u).dummy&&Xe.forEach(e.predecessors(u),function(f){var p=e.node(f);p.dummy&&(p.order<l||p.order>c)&&Rlt(r,f,u)})})}function i(o,a){var s=-1,l,c=0;return Xe.forEach(a,function(u,h){if(e.node(u).dummy==="border"){var f=e.predecessors(u);f.length&&(l=e.node(f[0]).order,n(a,c,h,s,l),c=h,s=l)}n(a,c,a.length,l,o.length)}),a}return Xe.reduce(t,i),r}function hlr(e,t){if(e.node(t).dummy)return Xe.find(e.predecessors(t),function(r){return e.node(r).dummy})}function Rlt(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function Tse(e,t,r){if(t>r){var n=t;t=r,r=n}return Xe.has(e[t],r)}function Cse(e,t,r,n){var i={},o={},a={};return Xe.forEach(t,function(s){Xe.forEach(s,function(l,c){i[l]=l,o[l]=l,a[l]=c})}),Xe.forEach(t,function(s){var l=-1;Xe.forEach(s,function(c){var u=n(c);if(u.length){u=Xe.sortBy(u,function(g){return a[g]});for(var h=(u.length-1)/2,f=Math.floor(h),p=Math.ceil(h);f<=p;++f){var d=u[f];o[c]===c&&l<a[d]&&!Tse(r,c,d)&&(o[d]=c,o[c]=i[c]=i[d],l=a[d])}}})}),{root:i,align:o}}function Ase(e,t,r,n,i){var o={},a=flr(e,t,r,i),s=i?"borderLeft":"borderRight";function l(h,f){for(var p=a.nodes(),d=p.pop(),g={};d;)g[d]?h(d):(g[d]=!0,p.push(d),p=p.concat(f(d))),d=p.pop()}function c(h){o[h]=a.inEdges(h).reduce(function(f,p){return Math.max(f,o[p.v]+a.edge(p))},0)}function u(h){var f=a.outEdges(h).reduce(function(d,g){return Math.min(d,o[g.w]-a.edge(g))},Number.POSITIVE_INFINITY),p=e.node(h);f!==Number.POSITIVE_INFINITY&&p.borderType!==s&&(o[h]=Math.max(o[h],f))}return l(c,a.predecessors.bind(a)),l(u,a.successors.bind(a)),Xe.forEach(n,function(h){o[h]=o[r[h]]}),o}function flr(e,t,r,n){var i=new clr,o=e.graph(),a=dlr(o.nodesep,o.edgesep,n);return Xe.forEach(t,function(s){var l;Xe.forEach(s,function(c){var u=r[c];if(i.setNode(u),l){var h=r[l],f=i.edge(h,u);i.setEdge(h,u,Math.max(a(e,c,l),f||0))}l=c})}),i}function Pse(e,t){return Xe.minBy(Xe.values(t),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Xe.forIn(r,function(o,a){var s=mlr(e,a)/2;n=Math.max(o+s,n),i=Math.min(o-s,i)}),n-i})}function Ise(e,t){var r=Xe.values(t),n=Xe.min(r),i=Xe.max(r);Xe.forEach(["u","d"],function(o){Xe.forEach(["l","r"],function(a){var s=o+a,l=e[s],c;if(l!==t){var u=Xe.values(l);c=a==="l"?n-Xe.min(u):i-Xe.max(u),c&&(e[s]=Xe.mapValues(l,function(h){return h+c}))}})})}function Lse(e,t){return Xe.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var i=Xe.sortBy(Xe.map(e,n));return(i[1]+i[2])/2})}function plr(e){var t=ulr.buildLayerMatrix(e),r=Xe.merge(Mse(e,t),Ese(e,t)),n={},i;Xe.forEach(["u","d"],function(a){i=a==="u"?t:Xe.values(t).reverse(),Xe.forEach(["l","r"],function(s){s==="r"&&(i=Xe.map(i,function(h){return Xe.values(h).reverse()}));var l=(a==="u"?e.predecessors:e.successors).bind(e),c=Cse(e,i,r,l),u=Ase(e,i,c.root,c.align,s==="r");s==="r"&&(u=Xe.mapValues(u,function(h){return-h})),n[a+s]=u})});var o=Pse(e,n);return Ise(n,o),Lse(n,e.graph().align)}function dlr(e,t,r){return function(n,i,o){var a=n.node(i),s=n.node(o),l=0,c;if(l+=a.width/2,Xe.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(l+=r?c:-c),c=0,l+=(a.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,Xe.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=s.width/2;break;case"r":c=-s.width/2;break}return c&&(l+=r?c:-c),c=0,l}}function mlr(e,t){return e.node(t).width}});var Ose=H((wQn,Dse)=>{"use strict";var Z4=qn(),Nse=is(),glr=Rse().positionX;Dse.exports=_lr;function _lr(e){e=Nse.asNonCompoundGraph(e),ylr(e),Z4.forEach(glr(e),function(t,r){e.node(r).x=t})}function ylr(e){var t=Nse.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Z4.forEach(t,function(i){var o=Z4.max(Z4.map(i,function(a){return e.node(a).height}));Z4.forEach(i,function(a){e.node(a).y=n+o/2}),n+=o+r})}});var Use=H((SQn,Vse)=>{"use strict";var ir=qn(),zse=xae(),Fse=Cae(),vlr=Vae(),xlr=is().normalizeRanks,blr=qae(),wlr=is().removeEmptyRanks,Bse=Yae(),Slr=$ae(),Hse=Qae(),Mlr=Sse(),Elr=Ose(),m0=is(),Tlr=Uc().Graph;Vse.exports=Clr;function Clr(e,t){var r=t&&t.debugTiming?m0.time:m0.notime;r("layout",function(){var n=r("  buildLayoutGraph",function(){return Flr(e)});r("  runLayout",function(){Alr(n,r)}),r("  updateInputGraph",function(){Plr(e,n)})})}function Alr(e,t){t("    makeSpaceForEdgeLabels",function(){Blr(e)}),t("    removeSelfEdges",function(){Xlr(e)}),t("    acyclic",function(){zse.run(e)}),t("    nestingGraph.run",function(){Bse.run(e)}),t("    rank",function(){vlr(m0.asNonCompoundGraph(e))}),t("    injectEdgeLabelProxies",function(){Hlr(e)}),t("    removeEmptyRanks",function(){wlr(e)}),t("    nestingGraph.cleanup",function(){Bse.cleanup(e)}),t("    normalizeRanks",function(){xlr(e)}),t("    assignRankMinMax",function(){Vlr(e)}),t("    removeEdgeLabelProxies",function(){Ulr(e)}),t("    normalize.run",function(){Fse.run(e)}),t("    parentDummyChains",function(){blr(e)}),t("    addBorderSegments",function(){Slr(e)}),t("    order",function(){Mlr(e)}),t("    insertSelfEdges",function(){$lr(e)}),t("    adjustCoordinateSystem",function(){Hse.adjust(e)}),t("    position",function(){Elr(e)}),t("    positionSelfEdges",function(){Klr(e)}),t("    removeBorderNodes",function(){jlr(e)}),t("    normalize.undo",function(){Fse.undo(e)}),t("    fixupEdgeLabelCoords",function(){Wlr(e)}),t("    undoCoordinateSystem",function(){Hse.undo(e)}),t("    translateGraph",function(){qlr(e)}),t("    assignNodeIntersects",function(){Glr(e)}),t("    reversePoints",function(){Ylr(e)}),t("    acyclic.undo",function(){zse.undo(e)})}function Plr(e,t){ir.forEach(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),ir.forEach(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,ir.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Ilr=["nodesep","edgesep","ranksep","marginx","marginy"],Llr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},klr=["acyclicer","ranker","rankdir","align"],Rlr=["width","height"],Nlr={width:0,height:0},Dlr=["minlen","weight","width","height","labeloffset"],Olr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},zlr=["labelpos"];function Flr(e){var t=new Tlr({multigraph:!0,compound:!0}),r=Dlt(e.graph());return t.setGraph(ir.merge({},Llr,Nlt(r,Ilr),ir.pick(r,klr))),ir.forEach(e.nodes(),function(n){var i=Dlt(e.node(n));t.setNode(n,ir.defaults(Nlt(i,Rlr),Nlr)),t.setParent(n,e.parent(n))}),ir.forEach(e.edges(),function(n){var i=Dlt(e.edge(n));t.setEdge(n,ir.merge({},Olr,Nlt(i,Dlr),ir.pick(i,zlr)))}),t}function Blr(e){var t=e.graph();t.ranksep/=2,ir.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function Hlr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-n.rank)/2+n.rank,e:t};m0.addDummyNode(e,"edge-proxy",o,"_ep")}})}function Vlr(e){var t=0;ir.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=ir.max(t,n.maxRank))}),e.graph().maxRank=t}function Ulr(e){ir.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function qlr(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function l(c){var u=c.x,h=c.y,f=c.width,p=c.height;t=Math.min(t,u-f/2),r=Math.max(r,u+f/2),n=Math.min(n,h-p/2),i=Math.max(i,h+p/2)}ir.forEach(e.nodes(),function(c){l(e.node(c))}),ir.forEach(e.edges(),function(c){var u=e.edge(c);ir.has(u,"x")&&l(u)}),t-=a,n-=s,ir.forEach(e.nodes(),function(c){var u=e.node(c);u.x-=t,u.y-=n}),ir.forEach(e.edges(),function(c){var u=e.edge(c);ir.forEach(u.points,function(h){h.x-=t,h.y-=n}),ir.has(u,"x")&&(u.x-=t),ir.has(u,"y")&&(u.y-=n)}),o.width=r-t+a,o.height=i-n+s}function Glr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=n),r.points.unshift(m0.intersectRect(n,o)),r.points.push(m0.intersectRect(i,a))})}function Wlr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);if(ir.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ylr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function jlr(e){ir.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(ir.last(r.borderLeft)),a=e.node(ir.last(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),ir.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Xlr(e){ir.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function $lr(e){var t=m0.buildLayerMatrix(e);ir.forEach(t,function(r){var n=0;ir.forEach(r,function(i,o){var a=e.node(i);a.order=o+n,ir.forEach(a.selfEdges,function(s){m0.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:o+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function Klr(e){ir.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,a=r.x-i,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}function Nlt(e,t){return ir.mapValues(ir.pick(e,t),Number)}function Dlt(e){var t={};return ir.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}});var Gse=H((MQn,qse)=>{var pH=qn(),Zlr=is(),Jlr=Uc().Graph;qse.exports={debugOrdering:Qlr};function Qlr(e){var t=Zlr.buildLayerMatrix(e),r=new Jlr({compound:!0,multigraph:!0}).setGraph({});return pH.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),pH.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),pH.forEach(t,function(n,i){var o="layer"+i;r.setNode(o,{rank:"same"}),pH.reduce(n,function(a,s){return r.setEdge(a,s,{style:"invis"}),s})}),r}});var Yse=H((EQn,Wse)=>{Wse.exports="0.8.5"});var Olt=H((TQn,jse)=>{jse.exports={graphlib:Uc(),layout:Use(),debug:Gse(),util:{time:is().time,notime:is().notime},version:Yse()}});var Vdt=Ee(Hdt(),1),{__extends:d_r,__assign:m_r,__rest:g_r,__decorate:E,__param:__r,__esDecorate:y_r,__runInitializers:v_r,__propKey:x_r,__setFunctionName:b_r,__metadata:w,__awaiter:w_r,__generator:S_r,__exportStar:M_r,__createBinding:E_r,__values:T_r,__read:C_r,__spread:A_r,__spreadArrays:P_r,__spreadArray:I_r,__await:L_r,__asyncGenerator:k_r,__asyncDelegator:R_r,__asyncValues:N_r,__makeTemplateObject:D_r,__importStar:O_r,__importDefault:z_r,__classPrivateFieldGet:F_r,__classPrivateFieldSet:B_r,__classPrivateFieldIn:H_r}=Vdt.default;function yt(e){return t=>{if(e)if(t.hasOwnProperty("is")){if(e!==t.is)throw new Error(`custom element tag names do not match: (${e} !== ${t.is})`)}else Object.defineProperty(t,"is",{value:e});window.customElements.define(t.is,t)}}function Udt(e,t,r){e.constructor.hasOwnProperty("properties")||Object.defineProperty(e.constructor,"properties",{value:{}}),e.constructor.properties[t]=Object.assign({},e.constructor.properties[t],r)}function A(e){return(t,r)=>{Udt(t,r,e)}}function Bt(...e){return(t,r)=>{t.constructor.hasOwnProperty("observers")||Object.defineProperty(t.constructor,"observers",{value:[]}),t.constructor.observers.push(`${r}(${e.join(",")})`)}}function Rt(e,...t){return(r,n,i)=>{let o=`__compute${n}`;Object.defineProperty(r,o,{value:i.get}),i.get=void 0;let a=[e,...t].join(",");Udt(r,n,{computed:`${o}(${a})`})}}var U_r=qdt((e,t)=>e.querySelector(t)),q_r=qdt((e,t)=>e.querySelectorAll(t));function qdt(e){return t=>(r,n)=>{Object.defineProperty(r,n,{get(){return e(this.shadowRoot,t)},enumerable:!0,configurable:!0})}}window.JSCompiler_renameProperty=function(e,t){return e};var Tve=/(url\()([^)]*)(\))/g,Cve=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,II,Js;function c_(e,t){if(e&&Cve.test(e)||e==="//")return e;if(II===void 0){II=!1;try{let r=new URL("b","http://a");r.pathname="c%20d",II=r.href==="http://a/c%20d"}catch(r){}}if(t||(t=document.baseURI||window.location.href),II)try{return new URL(e,t).href}catch(r){return e}return Js||(Js=document.implementation.createHTMLDocument("temp"),Js.base=Js.createElement("base"),Js.head.appendChild(Js.base),Js.anchor=Js.createElement("a"),Js.body.appendChild(Js.anchor)),Js.base.href=t,Js.anchor.href=e,Js.anchor.href||e}function HM(e,t){return e.replace(Tve,function(r,n,i,o){return n+"'"+c_(i.replace(/["']/g,""),t)+"'"+o})}function Cx(e){return e.substring(0,e.lastIndexOf("/")+1)}var u_=!window.ShadyDOM||!window.ShadyDOM.inUse,$_r=Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),K_r=!window.customElements.polyfillWrapFlushCallback,Gdt=u_&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{let e=new CSSStyleSheet;e.replaceSync("");let t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})(),Wdt=window.Polymer&&window.Polymer.rootPath||Cx(document.baseURI||window.location.href);var VM=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;var Ydt=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;var iu=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;var jdt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;var dp=window.Polymer&&window.Polymer.legacyOptimizations||!1;var LI=window.Polymer&&window.Polymer.legacyWarnings||!1;var Xdt=window.Polymer&&window.Polymer.syncInitialRender||!1;var kI=window.Polymer&&window.Polymer.legacyUndefined||!1;var $dt=window.Polymer&&window.Polymer.orderedComputed||!1;var fG=!0;var pG=window.Polymer&&window.Polymer.removeNestedTemplates||!1;var RI=window.Polymer&&window.Polymer.fastDomIf||!1;var UM=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;var qM=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;var Kdt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;var Ave=0;function Zdt(){}Zdt.prototype.__mixinApplications;Zdt.prototype.__mixinSet;var Nn=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let r=Ave++;function n(i){let o=i.__mixinSet;if(o&&o[r])return i;let a=t,s=a.get(i);if(!s){s=e(i),a.set(i,s);let l=Object.create(s.__mixinSet||o||null);l[r]=!0,s.__mixinSet=l}return s}return n};var dG={},tmt={};function Jdt(e,t){dG[e]=tmt[e.toLowerCase()]=t}function Qdt(e){return dG[e]||tmt[e.toLowerCase()]}function Pve(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var ou=class extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,r){if(t){let n=Qdt(t);return n&&r?n.querySelector(r):n}return null}attributeChangedCallback(t,r,n,i){r!==n&&this.register()}get assetpath(){if(!this.__assetpath){let t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,r=c_(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Cx(r)}return this.__assetpath}register(t){if(t=t||this.id,t){if(iu&&Qdt(t)!==void 0)throw Jdt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Jdt(t,this),Pve(this)}}};ou.prototype.modules=dG;customElements.define("dom-module",ou);var Ive="link[rel=import][type~=css]",Lve="include",emt="shady-unscoped";function mG(e){return ou.import(e)}function rmt(e){let t=e.body?e.body:e,r=HM(t.textContent,e.baseURI),n=document.createElement("style");return n.textContent=r,n}function kve(e){let t=e.trim().split(/\s+/),r=[];for(let n=0;n<t.length;n++)r.push(...Rve(t[n]));return r}function Rve(e){let t=mG(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(t._styles===void 0){let r=[];r.push(...gG(t));let n=t.querySelector("template");n&&r.push(...NI(n,t.assetpath)),t._styles=r}return t._styles}function NI(e,t){if(!e._styles){let r=[],n=e.content.querySelectorAll("style");for(let i=0;i<n.length;i++){let o=n[i],a=o.getAttribute(Lve);a&&r.push(...kve(a).filter(function(s,l,c){return c.indexOf(s)===l})),t&&(o.textContent=HM(o.textContent,t)),r.push(o)}e._styles=r}return e._styles}function nmt(e){let t=mG(e);return t?gG(t):[]}function gG(e){let t=[],r=e.querySelectorAll(Ive);for(let n=0;n<r.length;n++){let i=r[n];if(i.import){let o=i.import,a=i.hasAttribute(emt);if(a&&!o._unscopedStyle){let s=rmt(o);s.setAttribute(emt,""),o._unscopedStyle=s}else o._style||(o._style=rmt(o));t.push(a?o._unscopedStyle:o._style)}}return t}function imt(e){let t=e.trim().split(/\s+/),r="";for(let n=0;n<t.length;n++)r+=Nve(t[n]);return r}function Nve(e){let t=mG(e);if(t&&t._cssText===void 0){let r=Ove(t),n=t.querySelector("template");n&&(r+=Dve(n,t.assetpath)),t._cssText=r||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function Dve(e,t){let r="",n=NI(e,t);for(let i=0;i<n.length;i++){let o=n[i];o.parentNode&&o.parentNode.removeChild(o),r+=o.textContent}return r}function Ove(e){let t="",r=gG(e);for(let n=0;n<r.length;n++)t+=r[n].textContent;return t}var ue=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e;function DI(e){return e.indexOf(".")>=0}function au(e){let t=e.indexOf(".");return t===-1?e:e.slice(0,t)}function _G(e,t){return e.indexOf(t+".")===0}function Ax(e,t){return t.indexOf(e+".")===0}function mp(e,t,r){return t+r.slice(e.length)}function OI(e,t){return e===t||_G(e,t)||Ax(e,t)}function Px(e){if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=e[r].toString().split(".");for(let i=0;i<n.length;i++)t.push(n[i])}return t.join(".")}else return e}function omt(e){return Array.isArray(e)?Px(e).split("."):e.toString().split(".")}function No(e,t,r){let n=e,i=omt(t);for(let o=0;o<i.length;o++){if(!n)return;let a=i[o];n=n[a]}return r&&(r.path=i.join(".")),n}function yG(e,t,r){let n=e,i=omt(t),o=i[i.length-1];if(i.length>1){for(let a=0;a<i.length-1;a++){let s=i[a];if(n=n[s],!n)return}n[o]=r}else n[t]=r;return i.join(".")}var zI={},zve=/-[a-z]/g,Fve=/([A-Z])/g;function Sm(e){return zI[e]||(zI[e]=e.indexOf("-")<0?e:e.replace(zve,t=>t[1].toUpperCase()))}function Ix(e){return zI[e]||(zI[e]=e.replace(Fve,"-$1").toLowerCase())}var Bve=0,amt=0,Lx=[],Hve=0,vG=!1,smt=document.createTextNode("");new window.MutationObserver(Vve).observe(smt,{characterData:!0});function Vve(){vG=!1;let e=Lx.length;for(let t=0;t<e;t++){let r=Lx[t];if(r)try{r()}catch(n){setTimeout(()=>{throw n})}}Lx.splice(0,e),amt+=e}var mo={after(e){return{run(t){return window.setTimeout(t,e)},cancel(t){window.clearTimeout(t)}}},run(e,t){return window.setTimeout(e,t)},cancel(e){window.clearTimeout(e)}};var Ni={run(e){return window.requestAnimationFrame(e)},cancel(e){window.cancelAnimationFrame(e)}};var kx={run(e){return window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16)},cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}};var li={run(e){return vG||(vG=!0,smt.textContent=Hve++),Lx.push(e),Bve++},cancel(e){let t=e-amt;if(t>=0){if(!Lx[t])throw new Error("invalid async handle: "+e);Lx[t]=null}}};var Uve=li,FI=Nn(e=>{class t extends e{static createProperties(n){let i=this.prototype;for(let o in n)o in i||i._createPropertyAccessor(o)}static attributeNameForProperty(n){return n.toLowerCase()}static typeForProperty(n){}_createPropertyAccessor(n,i){this._addPropertyToAttributeMap(n),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[n]||(this.__dataHasAccessor[n]=!0,this._definePropertyAccessor(n,i))}_addPropertyToAttributeMap(n){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let i=this.__dataAttributes[n];return i||(i=this.constructor.attributeNameForProperty(n),this.__dataAttributes[i]=n),i}_definePropertyAccessor(n,i){Object.defineProperty(this,n,{get(){return this.__data[n]},set:i?function(){}:function(o){this._setPendingProperty(n,o,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let n in this.__dataHasAccessor)this.hasOwnProperty(n)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[n]=this[n],delete this[n])}_initializeInstanceProperties(n){Object.assign(this,n)}_setProperty(n,i){this._setPendingProperty(n,i)&&this._invalidateProperties()}_getProperty(n){return this.__data[n]}_setPendingProperty(n,i,o){let a=this.__data[n],s=this._shouldPropertyChange(n,i,a);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(n in this.__dataOld)&&(this.__dataOld[n]=a),this.__data[n]=i,this.__dataPending[n]=i),s}_isPropertyPending(n){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(n))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Uve.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;let n=this.__data,i=this.__dataPending,o=this.__dataOld;this._shouldPropertiesChange(n,i,o)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(n,i,o)),this.__dataCounter--}_shouldPropertiesChange(n,i,o){return Boolean(i)}_propertiesChanged(n,i,o){}_shouldPropertyChange(n,i,o){return o!==i&&(o===o||i===i)}attributeChangedCallback(n,i,o,a){i!==o&&this._attributeToProperty(n,o),super.attributeChangedCallback&&super.attributeChangedCallback(n,i,o,a)}_attributeToProperty(n,i,o){if(!this.__serializing){let a=this.__dataAttributes,s=a&&a[n]||n;this[s]=this._deserializeValue(i,o||this.constructor.typeForProperty(s))}}_propertyToAttribute(n,i,o){this.__serializing=!0,o=arguments.length<3?this[n]:o,this._valueToNodeAttribute(this,o,i||this.constructor.attributeNameForProperty(n)),this.__serializing=!1}_valueToNodeAttribute(n,i,o){let a=this._serializeValue(i);(o==="class"||o==="name"||o==="slot")&&(n=ue(n)),a===void 0?n.removeAttribute(o):n.setAttribute(o,a)}_serializeValue(n){switch(typeof n){case"boolean":return n?"":void 0;default:return n!=null?n.toString():void 0}}_deserializeValue(n,i){switch(i){case Boolean:return n!==null;case Number:return Number(n);default:return n}}}return t});var lmt={},BI=HTMLElement.prototype;for(;BI;){let e=Object.getOwnPropertyNames(BI);for(let t=0;t<e.length;t++)lmt[e[t]]=!0;BI=Object.getPrototypeOf(BI)}function qve(e,t){if(!lmt[t]){let r=e[t];r!==void 0&&(e.__data?e._setPendingProperty(t,r):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=r))}}var HI=Nn(e=>{let t=FI(e);class r extends t{static createPropertiesForAttributes(){let i=this.observedAttributes;for(let o=0;o<i.length;o++)this.prototype._createPropertyAccessor(Sm(i[o]))}static attributeNameForProperty(i){return Ix(i)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(i){for(let o in i)this._setProperty(o,i[o])}_ensureAttribute(i,o){let a=this;a.hasAttribute(i)||this._valueToNodeAttribute(a,o,i)}_serializeValue(i){switch(typeof i){case"object":if(i instanceof Date)return i.toString();if(i)try{return JSON.stringify(i)}catch(o){return""}default:return super._serializeValue(i)}}_deserializeValue(i,o){let a;switch(o){case Object:try{a=JSON.parse(i)}catch(s){a=i}break;case Array:try{a=JSON.parse(i)}catch(s){a=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${i}`)}break;case Date:a=isNaN(i)?String(i):Number(i),a=new Date(a);break;default:a=super._deserializeValue(i,o);break}return a}_definePropertyAccessor(i,o){qve(this,i),super._definePropertyAccessor(i,o)}_hasAccessor(i){return this.__dataHasAccessor&&this.__dataHasAccessor[i]}_isPropertyPending(i){return Boolean(this.__dataPending&&i in this.__dataPending)}}return r});var Gve={"dom-if":!0,"dom-repeat":!0},cmt=!1,umt=!1;function Wve(){if(!cmt){cmt=!0;let e=document.createElement("textarea");e.placeholder="a",umt=e.placeholder===e.textContent}return umt}function Yve(e){Wve()&&e.localName==="textarea"&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}function jve(e){let t=e.getAttribute("is");if(t&&Gve[t]){let r=e;for(r.removeAttribute("is"),e=r.ownerDocument.createElement(t),r.parentNode.replaceChild(e,r),e.appendChild(r);r.attributes.length;)e.setAttribute(r.attributes[0].name,r.attributes[0].value),r.removeAttribute(r.attributes[0].name)}return e}function hmt(e,t){let r=t.parentInfo&&hmt(e,t.parentInfo);if(r){for(let n=r.firstChild,i=0;n;n=n.nextSibling)if(t.parentIndex===i++)return n}else return e}function Xve(e,t,r,n){n.id&&(t[n.id]=r)}function $ve(e,t,r){if(r.events&&r.events.length)for(let n=0,i=r.events,o;n<i.length&&(o=i[n]);n++)e._addMethodEventListenerToNode(t,o.name,o.value,e)}function Kve(e,t,r,n){r.templateInfo&&(t._templateInfo=r.templateInfo,t._parentTemplateInfo=n)}function Zve(e,t,r){return e=e._methodHost||e,function(i){e[r]?e[r](i,i.detail):console.warn("listener method `"+r+"` not defined")}}var fmt=Nn(e=>{class t extends e{static _parseTemplate(n,i){if(!n._templateInfo){let o=n._templateInfo={};o.nodeInfoList=[],o.nestedTemplate=Boolean(i),o.stripWhiteSpace=i&&i.stripWhiteSpace||n.hasAttribute("strip-whitespace"),this._parseTemplateContent(n,o,{parent:null})}return n._templateInfo}static _parseTemplateContent(n,i,o){return this._parseTemplateNode(n.content,i,o)}static _parseTemplateNode(n,i,o){let a=!1,s=n;return s.localName=="template"&&!s.hasAttribute("preserve-content")?a=this._parseTemplateNestedTemplate(s,i,o)||a:s.localName==="slot"&&(i.hasInsertionPoint=!0),Yve(s),s.firstChild&&this._parseTemplateChildNodes(s,i,o),s.hasAttributes&&s.hasAttributes()&&(a=this._parseTemplateNodeAttributes(s,i,o)||a),a||o.noted}static _parseTemplateChildNodes(n,i,o){if(!(n.localName==="script"||n.localName==="style"))for(let a=n.firstChild,s=0,l;a;a=l){if(a.localName=="template"&&(a=jve(a)),l=a.nextSibling,a.nodeType===Node.TEXT_NODE){let u=l;for(;u&&u.nodeType===Node.TEXT_NODE;)a.textContent+=u.textContent,l=u.nextSibling,n.removeChild(u),u=l;if(i.stripWhiteSpace&&!a.textContent.trim()){n.removeChild(a);continue}}let c={parentIndex:s,parentInfo:o};this._parseTemplateNode(a,i,c)&&(c.infoIndex=i.nodeInfoList.push(c)-1),a.parentNode&&s++}}static _parseTemplateNestedTemplate(n,i,o){let a=n,s=this._parseTemplate(a,i);return(s.content=a.content.ownerDocument.createDocumentFragment()).appendChild(a.content),o.templateInfo=s,!0}static _parseTemplateNodeAttributes(n,i,o){let a=!1,s=Array.from(n.attributes);for(let l=s.length-1,c;c=s[l];l--)a=this._parseTemplateNodeAttribute(n,i,o,c.name,c.value)||a;return a}static _parseTemplateNodeAttribute(n,i,o,a,s){return a.slice(0,3)==="on-"?(n.removeAttribute(a),o.events=o.events||[],o.events.push({name:a.slice(3),value:s}),!0):a==="id"?(o.id=s,!0):!1}static _contentForTemplate(n){let i=n._templateInfo;return i&&i.content||n.content}_stampTemplate(n,i){n&&!n.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),i=i||this.constructor._parseTemplate(n);let o=i.nodeInfoList,a=i.content||n.content,s=document.importNode(a,!0);s.__noInsertionPoint=!i.hasInsertionPoint;let l=s.nodeList=new Array(o.length);s.$={};for(let c=0,u=o.length,h;c<u&&(h=o[c]);c++){let f=l[c]=hmt(s,h);Xve(this,s.$,f,h),Kve(this,f,h,i),$ve(this,f,h)}return s=s,s}_addMethodEventListenerToNode(n,i,o,a){a=a||n;let s=Zve(a,i,o);return this._addEventListenerToNode(n,i,s),s}_addEventListenerToNode(n,i,o){n.addEventListener(i,o)}_removeEventListenerFromNode(n,i,o){n.removeEventListener(i,o)}}return t});var jM=0,XM=[],zr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},xmt="__computeInfo",Jve=/[A-Z]/;function xG(e,t,r){let n=e[t];if(!n)n=e[t]={};else if(!e.hasOwnProperty(t)&&(n=e[t]=Object.create(e[t]),r))for(let i in n){let o=n[i],a=n[i]=Array(o.length);for(let s=0;s<o.length;s++)a[s]=o[s]}return n}function YM(e,t,r,n,i,o){if(t){let a=!1,s=jM++;for(let l in r){let c=i?au(l):l,u=t[c];if(u)for(let h=0,f=u.length,p;h<f&&(p=u[h]);h++)(!p.info||p.info.lastRun!==s)&&(!i||MG(l,p.trigger))&&(p.info&&(p.info.lastRun=s),p.fn(e,l,r,n,p.info,i,o),a=!0)}return a}return!1}function Qve(e,t,r,n,i,o,a,s){let l=!1,c=a?au(n):n,u=t[c];if(u)for(let h=0,f=u.length,p;h<f&&(p=u[h]);h++)(!p.info||p.info.lastRun!==r)&&(!a||MG(n,p.trigger))&&(p.info&&(p.info.lastRun=r),p.fn(e,n,i,o,p.info,a,s),l=!0);return l}function MG(e,t){if(t){let r=t.name;return r==e||!!(t.structured&&_G(r,e))||!!(t.wildcard&&Ax(r,e))}else return!0}function pmt(e,t,r,n,i){let o=typeof i.method=="string"?e[i.method]:i.method,a=i.property;o?o.call(e,e.__data[a],n[a]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function t1e(e,t,r,n,i){let o=e[zr.NOTIFY],a,s=jM++;for(let c in t)t[c]&&(o&&Qve(e,o,s,c,r,n,i)||i&&e1e(e,c,r))&&(a=!0);let l;a&&(l=e.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function e1e(e,t,r){let n=au(t);if(n!==t){let i=Ix(n)+"-changed";return bmt(e,i,r[t],t),!0}return!1}function bmt(e,t,r,n){let i={value:r,queueProperty:!0};n&&(i.path=n),ue(e).dispatchEvent(new CustomEvent(t,{detail:i}))}function r1e(e,t,r,n,i,o){let s=(o?au(t):t)!=t?t:null,l=s?No(e,s):e.__data[t];s&&l===void 0&&(l=r[t]),bmt(e,i.eventName,l,s)}function n1e(e,t,r,n,i){let o,a=e.detail,s=a&&a.path;s?(n=mp(r,n,s),o=a&&a.value):o=e.currentTarget[r],o=i?!o:o,(!t[zr.READ_ONLY]||!t[zr.READ_ONLY][n])&&t._setPendingPropertyOrPath(n,o,!0,Boolean(s))&&(!a||!a.queueProperty)&&t._invalidateProperties()}function i1e(e,t,r,n,i){let o=e.__data[t];VM&&(o=VM(o,i.attrName,"attribute",e)),e._propertyToAttribute(t,i.attrName,o)}function o1e(e,t,r,n){let i=e[zr.COMPUTE];if(i)if($dt){jM++;let o=s1e(e),a=[];for(let l in t)dmt(l,i,a,o,n);let s;for(;s=a.shift();)wmt(e,"",t,r,s)&&dmt(s.methodInfo,i,a,o,n);Object.assign(r,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let o=t;for(;YM(e,i,o,r,n);)Object.assign(r,e.__dataOld),Object.assign(t,e.__dataPending),o=e.__dataPending,e.__dataPending=null}}var a1e=(e,t,r)=>{let n=0,i=t.length-1,o=-1;for(;n<=i;){let a=n+i>>1,s=r.get(t[a].methodInfo)-r.get(e.methodInfo);if(s<0)n=a+1;else if(s>0)i=a-1;else{o=a;break}}o<0&&(o=i+1),t.splice(o,0,e)},dmt=(e,t,r,n,i)=>{let o=i?au(e):e,a=t[o];if(a)for(let s=0;s<a.length;s++){let l=a[s];l.info.lastRun!==jM&&(!i||MG(e,l.trigger))&&(l.info.lastRun=jM,a1e(l.info,r,n))}};function s1e(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;let r=e[zr.COMPUTE],{counts:n,ready:i,total:o}=l1e(e),a;for(;a=i.shift();){t.set(a,t.size);let s=r[a];s&&s.forEach(l=>{let c=l.info.methodInfo;--o,--n[c]===0&&i.push(c)})}o!==0&&console.warn(`Computed graph for ${e.localName} incomplete; circular?`),e.constructor.__orderedComputedDeps=t}return t}function l1e(e){let t=e[xmt],r={},n=e[zr.COMPUTE],i=[],o=0;for(let a in t){let s=t[a];o+=r[a]=s.args.filter(l=>!l.literal).length+(s.dynamicFn?1:0)}for(let a in n)t[a]||i.push(a);return{counts:r,ready:i,total:o}}function wmt(e,t,r,n,i){let o=SG(e,t,r,n,i);if(o===XM)return!1;let a=i.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[a]?e._setPendingProperty(a,o,!0):(e[a]=o,!1)}function c1e(e,t,r){let n=e.__dataLinkedPaths;if(n){let i;for(let o in n){let a=n[o];Ax(o,t)?(i=mp(o,a,t),e._setPendingPropertyOrPath(i,r,!0,!0)):Ax(a,t)&&(i=mp(a,o,t),e._setPendingPropertyOrPath(i,r,!0,!0))}}}function bG(e,t,r,n,i,o,a){r.bindings=r.bindings||[];let s={kind:n,target:i,parts:o,literal:a,isCompound:o.length!==1};if(r.bindings.push(s),d1e(s)){let{event:c,negate:u}=s.parts[0];s.listenerEvent=c||Ix(i)+"-changed",s.listenerNegate=u}let l=t.nodeInfoList.length;for(let c=0;c<s.parts.length;c++){let u=s.parts[c];u.compoundIndex=c,u1e(e,t,s,u,l)}}function u1e(e,t,r,n,i){if(!n.literal)if(r.kind==="attribute"&&r.target[0]==="-")console.warn("Cannot set attribute "+r.target+' because "-" is not a valid attribute starting character');else{let o=n.dependencies,a={index:i,binding:r,part:n,evaluator:e};for(let s=0;s<o.length;s++){let l=o[s];typeof l=="string"&&(l=Mmt(l),l.wildcard=!0),e._addTemplatePropertyEffect(t,l.rootProperty,{fn:h1e,info:a,trigger:l})}}}function h1e(e,t,r,n,i,o,a){let s=a[i.index],l=i.binding,c=i.part;if(o&&c.source&&t.length>c.source.length&&l.kind=="property"&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let u=r[t];t=mp(c.source,l.target,t),s._setPendingPropertyOrPath(t,u,!1,!0)&&e._enqueueClient(s)}else{let u=i.evaluator._evaluateBinding(e,c,t,r,n,o);u!==XM&&f1e(e,s,l,c,u)}}function f1e(e,t,r,n,i){if(i=p1e(t,i,r,n),VM&&(i=VM(i,r.target,r.kind,t)),r.kind=="attribute")e._valueToNodeAttribute(t,i,r.target);else{let o=r.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[o]?(!t[zr.READ_ONLY]||!t[zr.READ_ONLY][o])&&t._setPendingProperty(o,i)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,o,i)}}function p1e(e,t,r,n){if(r.isCompound){let i=e.__dataCompoundStorage[r.target];i[n.compoundIndex]=t,t=i.join("")}return r.kind!=="attribute"&&(r.target==="textContent"||r.target==="value"&&(e.localName==="input"||e.localName==="textarea"))&&(t=t==null?"":t),t}function d1e(e){return Boolean(e.target)&&e.kind!="attribute"&&e.kind!="text"&&!e.isCompound&&e.parts[0].mode==="{"}function m1e(e,t){let{nodeList:r,nodeInfoList:n}=t;if(n.length)for(let i=0;i<n.length;i++){let o=n[i],a=r[i],s=o.bindings;if(s)for(let l=0;l<s.length;l++){let c=s[l];g1e(a,c),_1e(a,e,c)}a.__dataHost=e}}function g1e(e,t){if(t.isCompound){let r=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),n=t.parts,i=new Array(n.length);for(let a=0;a<n.length;a++)i[a]=n[a].literal;let o=t.target;r[o]=i,t.literal&&t.kind=="property"&&(o==="className"&&(e=ue(e)),e[o]=t.literal)}}function _1e(e,t,r){if(r.listenerEvent){let n=r.parts[0];e.addEventListener(r.listenerEvent,function(i){n1e(i,t,r.target,n.source,n.negate)})}}function mmt(e,t,r,n,i,o){o=t.static||o&&(typeof o!="object"||o[t.methodName]);let a={methodName:t.methodName,args:t.args,methodInfo:i,dynamicFn:o};for(let s=0,l;s<t.args.length&&(l=t.args[s]);s++)l.literal||e._addPropertyEffect(l.rootProperty,r,{fn:n,info:a,trigger:l});return o&&e._addPropertyEffect(t.methodName,r,{fn:n,info:a}),a}function SG(e,t,r,n,i){let o=e._methodHost||e,a=o[i.methodName];if(a){let s=e._marshalArgs(i.args,t,r);return s===XM?XM:a.apply(o,s)}else i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}var y1e=[],Smt="(?:[a-zA-Z_$][\\w.:$\\-*]*)",v1e="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",x1e="(?:'(?:[^'\\\\]|\\\\.)*')",b1e='(?:"(?:[^"\\\\]|\\\\.)*")',w1e="(?:"+x1e+"|"+b1e+")",gmt="(?:("+Smt+"|"+v1e+"|"+w1e+")\\s*)",S1e="(?:"+gmt+"(?:,\\s*"+gmt+")*)",M1e="(?:\\(\\s*(?:"+S1e+"?)\\)\\s*)",E1e="("+Smt+"\\s*"+M1e+"?)",T1e="(\\[\\[|{{)\\s*",C1e="(?:]]|}})",A1e="(?:(!)\\s*)?",P1e=T1e+A1e+E1e+C1e,_mt=new RegExp(P1e,"g");function ymt(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].literal||"";return t}function wG(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let n={methodName:t[1],static:!0,args:y1e};if(t[2].trim()){let i=t[2].replace(/\\,/g,"&comma;").split(",");return I1e(i,n)}else return n}return null}function I1e(e,t){return t.args=e.map(function(r){let n=Mmt(r);return n.literal||(t.static=!1),n},this),t}function Mmt(e){let t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),r={name:t,value:"",literal:!1},n=t[0];switch(n==="-"&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':r.value=t.slice(1,-1),r.literal=!0;break;case"#":r.value=Number(t),r.literal=!0;break}return r.literal||(r.rootProperty=au(t),r.structured=DI(t),r.structured&&(r.wildcard=t.slice(-2)==".*",r.wildcard&&(r.name=t.slice(0,-2)))),r}function vmt(e,t,r){let n=No(e,r);return n===void 0&&(n=t[r]),n}function Emt(e,t,r,n){let i={indexSplices:n};kI&&!e._overrideLegacyUndefined&&(t.splices=i),e.notifyPath(r+".splices",i),e.notifyPath(r+".length",t.length),kI&&!e._overrideLegacyUndefined&&(i.indexSplices=[])}function GM(e,t,r,n,i,o){Emt(e,t,r,[{index:n,addedCount:i,removed:o,object:t,type:"splice"}])}function L1e(e){return e[0].toUpperCase()+e.substring(1)}var h_=Nn(e=>{let t=fmt(HI(e));class r extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return zr}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(WM.length){let i=WM[WM.length-1];i._enqueueClient(this),this.__dataHost=i}}_initializeProtoProperties(i){this.__data=Object.create(i),this.__dataPending=Object.create(i),this.__dataOld={}}_initializeInstanceProperties(i){let o=this[zr.READ_ONLY];for(let a in i)(!o||!o[a])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[a]=this.__dataPending[a]=i[a])}_addPropertyEffect(i,o,a){this._createPropertyAccessor(i,o==zr.READ_ONLY);let s=xG(this,o,!0)[i];s||(s=this[o][i]=[]),s.push(a)}_removePropertyEffect(i,o,a){let s=xG(this,o,!0)[i],l=s.indexOf(a);l>=0&&s.splice(l,1)}_hasPropertyEffect(i,o){let a=this[o];return Boolean(a&&a[i])}_hasReadOnlyEffect(i){return this._hasPropertyEffect(i,zr.READ_ONLY)}_hasNotifyEffect(i){return this._hasPropertyEffect(i,zr.NOTIFY)}_hasReflectEffect(i){return this._hasPropertyEffect(i,zr.REFLECT)}_hasComputedEffect(i){return this._hasPropertyEffect(i,zr.COMPUTE)}_setPendingPropertyOrPath(i,o,a,s){if(s||au(Array.isArray(i)?i[0]:i)!==i){if(!s){let l=No(this,i);if(i=yG(this,i,o),!i||!super._shouldPropertyChange(i,o,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(i,o,a))return c1e(this,i,o),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[i])return this._setPendingProperty(i,o,a);this[i]=o}return!1}_setUnmanagedPropertyToNode(i,o,a){(a!==i[o]||typeof a=="object")&&(o==="className"&&(i=ue(i)),i[o]=a)}_setPendingProperty(i,o,a){let s=this.__dataHasPaths&&DI(i),l=s?this.__dataTemp:this.__data;return this._shouldPropertyChange(i,o,l[i])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),i in this.__dataOld||(this.__dataOld[i]=this.__data[i]),s?this.__dataTemp[i]=o:this.__data[i]=o,this.__dataPending[i]=o,(s||this[zr.NOTIFY]&&this[zr.NOTIFY][i])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[i]=a),!0):!1}_setProperty(i,o){this._setPendingProperty(i,o,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(i){this.__dataPendingClients=this.__dataPendingClients||[],i!==this&&this.__dataPendingClients.push(i)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let i=this.__dataPendingClients;if(i){this.__dataPendingClients=null;for(let o=0;o<i.length;o++){let a=i[o];a.__dataEnabled?a.__dataPending&&a._flushProperties():a._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(i,o){for(let a in i)(o||!this[zr.READ_ONLY]||!this[zr.READ_ONLY][a])&&this._setPendingPropertyOrPath(a,i[a],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(i,o,a){let s=this.__dataHasPaths;this.__dataHasPaths=!1;let l;o1e(this,o,a,s),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(o,a,s),this._flushClients(),YM(this,this[zr.REFLECT],o,a,s),YM(this,this[zr.OBSERVE],o,a,s),l&&t1e(this,l,o,a,s),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(i,o,a){this[zr.PROPAGATE]&&YM(this,this[zr.PROPAGATE],i,o,a),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,i,o,a)}_runEffectsForTemplate(i,o,a,s){let l=(c,u)=>{YM(this,i.propertyEffects,c,a,u,i.nodeList);for(let h=i.firstChild;h;h=h.nextSibling)this._runEffectsForTemplate(h,c,a,u)};i.runEffects?i.runEffects(l,o,s):l(o,s)}linkPaths(i,o){i=Px(i),o=Px(o),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[i]=o}unlinkPaths(i){i=Px(i),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[i]}notifySplices(i,o){let a={path:""},s=No(this,i,a);Emt(this,s,a.path,o)}get(i,o){return No(o||this,i)}set(i,o,a){a?yG(a,i,o):(!this[zr.READ_ONLY]||!this[zr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,o,!0)&&this._invalidateProperties()}push(i,...o){let a={path:""},s=No(this,i,a),l=s.length,c=s.push(...o);return o.length&&GM(this,s,a.path,l,o.length,[]),c}pop(i){let o={path:""},a=No(this,i,o),s=Boolean(a.length),l=a.pop();return s&&GM(this,a,o.path,a.length,0,[l]),l}splice(i,o,a,...s){let l={path:""},c=No(this,i,l);o<0?o=c.length-Math.floor(-o):o&&(o=Math.floor(o));let u;return arguments.length===2?u=c.splice(o):u=c.splice(o,a,...s),(s.length||u.length)&&GM(this,c,l.path,o,s.length,u),u}shift(i){let o={path:""},a=No(this,i,o),s=Boolean(a.length),l=a.shift();return s&&GM(this,a,o.path,0,0,[l]),l}unshift(i,...o){let a={path:""},s=No(this,i,a),l=s.unshift(...o);return o.length&&GM(this,s,a.path,0,o.length,[]),l}notifyPath(i,o){let a;if(arguments.length==1){let s={path:""};o=No(this,i,s),a=s.path}else Array.isArray(i)?a=Px(i):a=i;this._setPendingPropertyOrPath(a,o,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(i,o){this._addPropertyEffect(i,zr.READ_ONLY),o&&(this["_set"+L1e(i)]=function(a){this._setProperty(i,a)})}_createPropertyObserver(i,o,a){let s={property:i,method:o,dynamicFn:Boolean(a)};this._addPropertyEffect(i,zr.OBSERVE,{fn:pmt,info:s,trigger:{name:i}}),a&&this._addPropertyEffect(o,zr.OBSERVE,{fn:pmt,info:s,trigger:{name:o}})}_createMethodObserver(i,o){let a=wG(i);if(!a)throw new Error("Malformed observer expression '"+i+"'");mmt(this,a,zr.OBSERVE,SG,null,o)}_createNotifyingProperty(i){this._addPropertyEffect(i,zr.NOTIFY,{fn:r1e,info:{eventName:Ix(i)+"-changed",property:i}})}_createReflectedProperty(i){let o=this.constructor.attributeNameForProperty(i);o[0]==="-"?console.warn("Property "+i+" cannot be reflected to attribute "+o+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(i,zr.REFLECT,{fn:i1e,info:{attrName:o}})}_createComputedProperty(i,o,a){let s=wG(o);if(!s)throw new Error("Malformed computed expression '"+o+"'");let l=mmt(this,s,zr.COMPUTE,wmt,i,a);xG(this,xmt)[i]=l}_marshalArgs(i,o,a){let s=this.__data,l=[];for(let c=0,u=i.length;c<u;c++){let{name:h,structured:f,wildcard:p,value:d,literal:g}=i[c];if(!g)if(p){let _=Ax(h,o),y=vmt(s,a,_?o:h);d={path:_?o:h,value:y,base:_?No(s,h):y}}else d=f?vmt(s,a,h):s[h];if(kI&&!this._overrideLegacyUndefined&&d===void 0&&i.length>1)return XM;l[c]=d}return l}static addPropertyEffect(i,o,a){this.prototype._addPropertyEffect(i,o,a)}static createPropertyObserver(i,o,a){this.prototype._createPropertyObserver(i,o,a)}static createMethodObserver(i,o){this.prototype._createMethodObserver(i,o)}static createNotifyingProperty(i){this.prototype._createNotifyingProperty(i)}static createReadOnlyProperty(i,o){this.prototype._createReadOnlyProperty(i,o)}static createReflectedProperty(i){this.prototype._createReflectedProperty(i)}static createComputedProperty(i,o,a){this.prototype._createComputedProperty(i,o,a)}static bindTemplate(i){return this.prototype._bindTemplate(i)}_bindTemplate(i,o){let a=this.constructor._parseTemplate(i),s=this.__preBoundTemplateInfo==a;if(!s)for(let l in a.propertyEffects)this._createPropertyAccessor(l);if(o)if(a=Object.create(a),a.wasPreBound=s,!this.__templateInfo)this.__templateInfo=a;else{let l=i._parentTemplateInfo||this.__templateInfo,c=l.lastChild;a.parent=l,l.lastChild=a,a.previousSibling=c,c?c.nextSibling=a:l.firstChild=a}else this.__preBoundTemplateInfo=a;return a}static _addTemplatePropertyEffect(i,o,a){let s=i.hostProps=i.hostProps||{};s[o]=!0;let l=i.propertyEffects=i.propertyEffects||{};(l[o]=l[o]||[]).push(a)}_stampTemplate(i,o){o=o||this._bindTemplate(i,!0),WM.push(this);let a=super._stampTemplate(i,o);if(WM.pop(),o.nodeList=a.nodeList,!o.wasPreBound){let s=o.childNodes=[];for(let l=a.firstChild;l;l=l.nextSibling)s.push(l)}return a.templateInfo=o,m1e(this,o),this.__dataClientsReady&&(this._runEffectsForTemplate(o,this.__data,null,!1),this._flushClients()),a}_removeBoundDom(i){let o=i.templateInfo,{previousSibling:a,nextSibling:s,parent:l}=o;a?a.nextSibling=s:l&&(l.firstChild=s),s?s.previousSibling=a:l&&(l.lastChild=a),o.nextSibling=o.previousSibling=null;let c=o.childNodes;for(let u=0;u<c.length;u++){let h=c[u];ue(ue(h).parentNode).removeChild(h)}}static _parseTemplateNode(i,o,a){let s=t._parseTemplateNode.call(this,i,o,a);if(i.nodeType===Node.TEXT_NODE){let l=this._parseBindings(i.textContent,o);l&&(i.textContent=ymt(l)||" ",bG(this,o,a,"text","textContent",l),s=!0)}return s}static _parseTemplateNodeAttribute(i,o,a,s,l){let c=this._parseBindings(l,o);if(c){let u=s,h="property";Jve.test(s)?h="attribute":s[s.length-1]=="$"&&(s=s.slice(0,-1),h="attribute");let f=ymt(c);return f&&h=="attribute"&&(s=="class"&&i.hasAttribute("class")&&(f+=" "+i.getAttribute(s)),i.setAttribute(s,f)),h=="attribute"&&u=="disable-upgrade$"&&i.setAttribute(s,""),i.localName==="input"&&u==="value"&&i.setAttribute(u,""),i.removeAttribute(u),h==="property"&&(s=Sm(s)),bG(this,o,a,h,s,c,f),!0}else return t._parseTemplateNodeAttribute.call(this,i,o,a,s,l)}static _parseTemplateNestedTemplate(i,o,a){let s=t._parseTemplateNestedTemplate.call(this,i,o,a),l=i.parentNode,c=a.templateInfo,u=l.localName==="dom-if",h=l.localName==="dom-repeat";pG&&(u||h)&&(l.removeChild(i),a=a.parentInfo,a.templateInfo=c,a.noted=!0,s=!1);let f=c.hostProps;if(RI&&u)f&&(o.hostProps=Object.assign(o.hostProps||{},f),pG||(a.parentInfo.noted=!0));else{let p="{";for(let d in f){let g=[{mode:p,source:d,dependencies:[d],hostProp:!0}];bG(this,o,a,"property","_host_"+d,g)}}return s}static _parseBindings(i,o){let a=[],s=0,l;for(;(l=_mt.exec(i))!==null;){l.index>s&&a.push({literal:i.slice(s,l.index)});let c=l[1][0],u=Boolean(l[2]),h=l[3].trim(),f=!1,p="",d=-1;c=="{"&&(d=h.indexOf("::"))>0&&(p=h.substring(d+2),h=h.substring(0,d),f=!0);let g=wG(h),_=[];if(g){let{args:y,methodName:x}=g;for(let S=0;S<y.length;S++){let C=y[S];C.literal||_.push(C)}let b=o.dynamicFns;(b&&b[x]||g.static)&&(_.push(x),g.dynamicFn=!0)}else _.push(h);a.push({source:h,mode:c,negate:u,customEvent:f,signature:g,dependencies:_,event:p}),s=_mt.lastIndex}if(s&&s<i.length){let c=i.substring(s);c&&a.push({literal:c})}return a.length?a:null}static _evaluateBinding(i,o,a,s,l,c){let u;return o.signature?u=SG(i,a,s,l,o.signature):a!=o.source?u=No(i,o.source):c&&DI(a)?u=No(i,a):u=i.__data[a],o.negate&&(u=!u),u}}return r}),WM=[];var k1e=0;function Tmt(){k1e++}var R1e=[];function VI(e){R1e.push(e)}function N1e(e){let t={};for(let r in e){let n=e[r];t[r]=typeof n=="function"?{type:n}:n}return t}var Cmt=Nn(e=>{let t=FI(e);function r(o){let a=Object.getPrototypeOf(o);return a.prototype instanceof i?a:null}function n(o){if(!o.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",o))){let a=null;if(o.hasOwnProperty(JSCompiler_renameProperty("properties",o))){let s=o.properties;s&&(a=N1e(s))}o.__ownProperties=a}return o.__ownProperties}class i extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){VI(this.prototype);let a=this._properties;this.__observedAttributes=a?Object.keys(a).map(s=>this.prototype._addPropertyToAttributeMap(s)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){let a=r(this);a&&a.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){let a=n(this);a&&this.createProperties(a)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){let a=r(this);this.__properties=Object.assign({},a&&a._properties,n(this))}return this.__properties}static typeForProperty(a){let s=this._properties[a];return s&&s.type}_initializeProperties(){Tmt(),this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i});var Amt="3.4.1",UI=window.ShadyCSS&&window.ShadyCSS.cssBuild,Mm=Nn(e=>{let t=Cmt(h_(e));function r(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let c=l._properties;for(let u in c){let h=c[u];"value"in h&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[u]=h)}}return l.__propertyDefaults}function n(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function i(l,c,u,h){u.computed&&(u.readOnly=!0),u.computed&&(l._hasReadOnlyEffect(c)?console.warn(`Cannot redefine computed property '${c}'.`):l._createComputedProperty(c,u.computed,h)),u.readOnly&&!l._hasReadOnlyEffect(c)?l._createReadOnlyProperty(c,!u.computed):u.readOnly===!1&&l._hasReadOnlyEffect(c)&&console.warn(`Cannot make readOnly property '${c}' non-readOnly.`),u.reflectToAttribute&&!l._hasReflectEffect(c)?l._createReflectedProperty(c):u.reflectToAttribute===!1&&l._hasReflectEffect(c)&&console.warn(`Cannot make reflected property '${c}' non-reflected.`),u.notify&&!l._hasNotifyEffect(c)?l._createNotifyingProperty(c):u.notify===!1&&l._hasNotifyEffect(c)&&console.warn(`Cannot make notify property '${c}' non-notify.`),u.observer&&l._createPropertyObserver(c,u.observer,h[u.observer]),l._addPropertyToAttributeMap(c)}function o(l,c,u,h){if(!UI){let f=c.content.querySelectorAll("style"),p=NI(c),d=nmt(u),g=c.content.firstElementChild;for(let y=0;y<d.length;y++){let x=d[y];x.textContent=l._processStyleText(x.textContent,h),c.content.insertBefore(x,g)}let _=0;for(let y=0;y<p.length;y++){let x=p[y],b=f[_];b!==x?(x=x.cloneNode(!0),b.parentNode.insertBefore(x,b)):_++,x.textContent=l._processStyleText(x.textContent,h)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(c,u),Kdt&&UI&&Gdt){let f=c.content.querySelectorAll("style");if(f){let p="";Array.from(f).forEach(d=>{p+=d.textContent,d.parentNode.removeChild(d)}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(p)}}}function a(l){let c=null;if(l&&(!iu||jdt)&&(c=ou.import(l,"template"),iu&&!c))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return c}class s extends t{static get polymerElementVersion(){return Amt}static _finalizeClass(){t._finalizeClass.call(this);let c=n(this);c&&this.createObservers(c,this._properties),this._prepareTemplate()}static _prepareTemplate(){let c=this.template;c&&(typeof c=="string"?(console.error("template getter must return HTMLTemplateElement"),c=null):dp||(c=c.cloneNode(!0))),this.prototype._template=c}static createProperties(c){for(let u in c)i(this.prototype,u,c[u],c)}static createObservers(c,u){let h=this.prototype;for(let f=0;f<c.length;f++)h._createMethodObserver(c[f],u)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let c=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;this._template=c!==void 0?c:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&a(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(c){this._template=c}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){let c=this.importMeta;if(c)this._importPath=Cx(c.url);else{let u=ou.import(this.is);this._importPath=u&&u.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Wdt,this.importPath=this.constructor.importPath;let c=r(this.constructor);if(!!c)for(let u in c){let h=c[u];if(this._canApplyPropertyDefault(u)){let f=typeof h.value=="function"?h.value.call(this):h.value;this._hasAccessor(u)?this._setPendingProperty(u,f,!0):this[u]=f}}}_canApplyPropertyDefault(c){return!this.hasOwnProperty(c)}static _processStyleText(c,u){return HM(c,u)}static _finalizeTemplate(c){let u=this.prototype._template;if(u&&!u.__polymerFinalized){u.__polymerFinalized=!0;let h=this.importPath,f=h?c_(h):"";o(this,u,c,f),this.prototype._bindTemplate(u)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(c){let u=ue(this);if(u.attachShadow)return c?(u.shadowRoot||(u.attachShadow({mode:"open",shadyUpgradeFragment:c}),u.shadowRoot.appendChild(c),this.constructor._styleSheet&&(u.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Xdt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(u.shadowRoot),u.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(c){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,c)}resolveUrl(c,u){return!u&&this.importPath&&(u=c_(this.importPath)),c_(c,u)}static _parseTemplateContent(c,u,h){return u.dynamicFns=u.dynamicFns||this._properties,t._parseTemplateContent.call(this,c,u,h)}static _addTemplatePropertyEffect(c,u,h){return LI&&!(u in this._properties)&&!(h.info.part.signature&&h.info.part.signature.static)&&!h.info.part.hostProp&&!c.nestedTemplate&&console.warn(`Property '${u}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,c,u,h)}}return s});var qI=class{constructor(t){this.value=t.toString()}toString(){return this.value}};function D1e(e){if(e instanceof qI)return e.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${e}`)}function O1e(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof qI)return D1e(e);throw new Error(`non-template value passed to Polymer's html function: ${e}`)}var Q=function(t,...r){let n=document.createElement("template");return n.innerHTML=r.reduce((i,o,a)=>i+O1e(o)+t[a+1],t[0]),n};var mt=Mm(HTMLElement);var py=Ee(Oe(),1);var f_=!(window.ShadyDOM&&window.ShadyDOM.inUse),GI;function Pmt(e){e&&e.shimcssproperties?GI=!1:GI=f_||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"))}var Em;window.ShadyCSS&&window.ShadyCSS.cssBuild!==void 0&&(Em=window.ShadyCSS.cssBuild);var WI=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&window.ShadyCSS.nativeCss!==void 0?GI=window.ShadyCSS.nativeCss:window.ShadyCSS?(Pmt(window.ShadyCSS),window.ShadyCSS=void 0):Pmt(window.WebComponents&&window.WebComponents.flags);var Nx=GI;var YI=class{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}};function EG(e){return e=z1e(e),Imt(F1e(e),e)}function z1e(e){return e.replace(_p.comments,"").replace(_p.port,"")}function F1e(e){let t=new YI;t.start=0,t.end=e.length;let r=t;for(let n=0,i=e.length;n<i;n++)if(e[n]===Lmt){r.rules||(r.rules=[]);let o=r,a=o.rules[o.rules.length-1]||null;r=new YI,r.start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===kmt&&(r.end=n+1,r=r.parent||t);return t}function Imt(e,t){let r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){let i=e.previous?e.previous.end:e.parent.start;r=t.substring(i,e.start-1),r=B1e(r),r=r.replace(_p.multipleSpaces," "),r=r.substring(r.lastIndexOf(";")+1);let o=e.parsedSelector=e.selector=r.trim();e.atRule=o.indexOf(W1e)===0,e.atRule?o.indexOf(G1e)===0?e.type=gp.MEDIA_RULE:o.match(_p.keyframesRule)&&(e.type=gp.KEYFRAMES_RULE,e.keyframesName=e.selector.split(_p.multipleSpaces).pop()):o.indexOf(Rmt)===0?e.type=gp.MIXIN_RULE:e.type=gp.STYLE_RULE}let n=e.rules;if(n)for(let i=0,o=n.length,a;i<o&&(a=n[i]);i++)Imt(a,t);return e}function B1e(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let t=arguments[1],r=6-t.length;for(;r--;)t="0"+t;return"\\"+t})}function TG(e,t,r=""){let n="";if(e.cssText||e.rules){let i=e.rules;if(i&&!H1e(i))for(let o=0,a=i.length,s;o<a&&(s=i[o]);o++)n=TG(s,t,n);else n=t?e.cssText:V1e(e.cssText),n=n.trim(),n&&(n="  "+n+`
`)}return n&&(e.selector&&(r+=e.selector+" "+Lmt+`
`),r+=n,e.selector&&(r+=kmt+`

`)),r}function H1e(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&t.selector.indexOf(Rmt)===0}function V1e(e){return e=U1e(e),q1e(e)}function U1e(e){return e.replace(_p.customProp,"").replace(_p.mixinProp,"")}function q1e(e){return e.replace(_p.mixinApply,"").replace(_p.varApply,"")}var gp={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Lmt="{",kmt="}",_p={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},Rmt="--",G1e="@media",W1e="@";var KM=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Dx=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi;var Nmt=/@media\s(.*)/;var Dmt=new Set,Y1e="shady-unscoped";function Omt(e){let t=e.textContent;if(!Dmt.has(t)){Dmt.add(t);let r=document.createElement("style");r.setAttribute("shady-unscoped",""),r.textContent=t,document.head.appendChild(r)}}function zmt(e){return e.hasAttribute(Y1e)}function ZM(e,t){return e?(typeof e=="string"&&(e=EG(e)),t&&Ox(e,t),TG(e,Nx)):""}function CG(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=EG(e.textContent)),e.__cssRules||null}function Ox(e,t,r,n){if(!e)return;let i=!1,o=e.type;if(n&&o===gp.MEDIA_RULE){let s=e.selector.match(Nmt);s&&(window.matchMedia(s[1]).matches||(i=!0))}o===gp.STYLE_RULE?t(e):r&&o===gp.KEYFRAMES_RULE?r(e):o===gp.MIXIN_RULE&&(i=!0);let a=e.rules;if(a&&!i)for(let s=0,l=a.length,c;s<l&&(c=a[s]);s++)Ox(c,t,r,n)}function j1e(e,t){let r=0;for(let n=t,i=e.length;n<i;n++)if(e[n]==="(")r++;else if(e[n]===")"&&--r===0)return n;return-1}function AG(e,t){let r=e.indexOf("var(");if(r===-1)return t(e,"","","");let n=j1e(e,r+3),i=e.substring(r+4,n),o=e.substring(0,r),a=AG(e.substring(n+1),t),s=i.indexOf(",");if(s===-1)return t(o,i.trim(),"",a);let l=i.substring(0,s).trim(),c=i.substring(s+1).trim();return t(o,l,c,a)}var fvr=window.ShadyDOM&&window.ShadyDOM.wrap||(e=>e);function Fmt(e){let t=e.localName,r="",n="";return t?t.indexOf("-")>-1?r=t:(n=t,r=e.getAttribute&&e.getAttribute("is")||""):(r=e.is,n=e.extends),{is:r,typeExtension:n}}function Bmt(e){let t=[],r=e.querySelectorAll("style");for(let n=0;n<r.length;n++){let i=r[n];zmt(i)?f_||(Omt(i),i.parentNode.removeChild(i)):(t.push(i.textContent),i.parentNode.removeChild(i))}return t.join("").trim()}var Hmt="css-build";function X1e(e){if(Em!==void 0)return Em;if(e.__cssBuild===void 0){let t=e.getAttribute(Hmt);if(t)e.__cssBuild=t;else{let r=$1e(e);r!==""&&K1e(e),e.__cssBuild=r}}return e.__cssBuild||""}function PG(e){return X1e(e)!==""}function $1e(e){let t=e.localName==="template"?e.content.firstChild:e.firstChild;if(t instanceof Comment){let r=t.textContent.trim().split(":");if(r[0]===Hmt)return r[1]}return""}function K1e(e){let t=e.localName==="template"?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}function JM(e,t){for(let r in t)r===null?e.style.removeProperty(r):e.style.setProperty(r,t[r])}function jI(e,t){let r=window.getComputedStyle(e).getPropertyValue(t);return r?r.trim():""}function Vmt(e){let t=Dx.test(e)||KM.test(e);return Dx.lastIndex=0,KM.lastIndex=0,t}var Z1e=/;\s*/m,J1e=/^\s*(initial)|(inherit)\s*$/,Umt=/\s*!important/,IG="_-_";var LG=class{constructor(){this._map={}}set(t,r){t=t.trim(),this._map[t]={properties:r,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}},XI=null,Do=class{constructor(){this._currentElement=null,this._measureElement=null,this._map=new LG}detectMixin(t){return Vmt(t)}gatherStyles(t){let r=Bmt(t.content);if(r){let n=document.createElement("style");return n.textContent=r,t.content.insertBefore(n,t.content.firstChild),n}return null}transformTemplate(t,r){t._gatheredStyle===void 0&&(t._gatheredStyle=this.gatherStyles(t));let n=t._gatheredStyle;return n?this.transformStyle(n,r):null}transformStyle(t,r=""){let n=CG(t);return this.transformRules(n,r),t.textContent=ZM(n),n}transformCustomStyle(t){let r=CG(t);return Ox(r,n=>{n.selector===":root"&&(n.selector="html"),this.transformRule(n)}),t.textContent=ZM(r),r}transformRules(t,r){this._currentElement=r,Ox(t,n=>{this.transformRule(n)}),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),t.selector===":root"&&(t.selector=":host > *")}transformCssText(t,r){return t=t.replace(KM,(n,i,o,a)=>this._produceCssProperties(n,i,o,a,r)),this._consumeCssProperties(t,r)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let r=t;for(;r.parent;)r=r.parent;let n={},i=!1;return Ox(r,o=>{i=i||o===t,!i&&o.selector===t.selector&&Object.assign(n,this._cssTextToMap(o.parsedCssText))}),n}_consumeCssProperties(t,r){let n=null;for(;n=Dx.exec(t);){let i=n[0],o=n[1],a=n.index,s=a+i.indexOf("@apply"),l=a+i.length,c=t.slice(0,s),u=t.slice(l),h=r?this._fallbacksFromPreviousRules(r):{};Object.assign(h,this._cssTextToMap(c));let f=this._atApplyToCssProperties(o,h);t=`${c}${f}${u}`,Dx.lastIndex=a+f.length}return t}_atApplyToCssProperties(t,r){t=t.replace(Z1e,"");let n=[],i=this._map.get(t);if(i||(this._map.set(t,{}),i=this._map.get(t)),i){this._currentElement&&(i.dependants[this._currentElement]=!0);let o,a,s,l=i.properties;for(o in l)s=r&&r[o],a=[o,": var(",t,IG,o],s&&a.push(",",s.replace(Umt,"")),a.push(")"),Umt.test(l[o])&&a.push(" !important"),n.push(a.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,r){let n=J1e.exec(r);return n&&(n[1]?r=this._getInitialValueForProperty(t):r="apply-shim-inherit"),r}_cssTextToMap(t,r=!1){let n=t.split(";"),i,o,a={};for(let s=0,l,c;s<n.length;s++)l=n[s],l&&(c=l.split(":"),c.length>1&&(i=c[0].trim(),o=c.slice(1).join(":"),r&&(o=this._replaceInitialOrInherit(i,o)),a[i]=o));return a}_invalidateMixinEntry(t){if(!!XI)for(let r in t.dependants)r!==this._currentElement&&XI(r)}_produceCssProperties(t,r,n,i,o){if(n&&AG(n,(_,y)=>{y&&this._map.get(y)&&(i=`@apply ${y};`)}),!i)return t;let a=this._consumeCssProperties(""+i,o),s=t.slice(0,t.indexOf("--")),l=this._cssTextToMap(a,!0),c=l,u=this._map.get(r),h=u&&u.properties;h?c=Object.assign(Object.create(h),l):this._map.set(r,c);let f=[],p,d,g=!1;for(p in c)d=l[p],d===void 0&&(d="initial"),h&&!(p in h)&&(g=!0),f.push(`${r}${IG}${p}: ${d}`);return g&&this._invalidateMixinEntry(u),u&&(u.properties=c),n&&(s=`${t};${s}`),`${s}${f.join("; ")};`}};Do.prototype.detectMixin=Do.prototype.detectMixin;Do.prototype.transformStyle=Do.prototype.transformStyle;Do.prototype.transformCustomStyle=Do.prototype.transformCustomStyle;Do.prototype.transformRules=Do.prototype.transformRules;Do.prototype.transformRule=Do.prototype.transformRule;Do.prototype.transformTemplate=Do.prototype.transformTemplate;Do.prototype._separator=IG;Object.defineProperty(Do.prototype,"invalidCallback",{get(){return XI},set(e){XI=e}});var qmt=Do;var Q1e={},QM=Q1e;var $I="_applyShimCurrentVersion",zx="_applyShimNextVersion",KI="_applyShimValidatingVersion",txe=Promise.resolve();function Gmt(e){let t=QM[e];t&&exe(t)}function exe(e){e[$I]=e[$I]||0,e[KI]=e[KI]||0,e[zx]=(e[zx]||0)+1}function kG(e){return e[$I]===e[zx]}function Wmt(e){return!kG(e)&&e[KI]===e[zx]}function Ymt(e){e[KI]=e[zx],e._validating||(e._validating=!0,txe.then(function(){e[$I]=e[zx],e._validating=!1}))}var RG=null,jmt=window.HTMLImports&&window.HTMLImports.whenReady||null,NG;function ZI(e){requestAnimationFrame(function(){jmt?jmt(e):(RG||(RG=new Promise(t=>{NG=t}),document.readyState==="complete"?NG():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&NG()})),RG.then(function(){e&&e()}))})}var Xmt="__seenByShadyCSS",JI="__shadyCSSCachedStyle",QI=null,tE=null,Zl=class{constructor(){this.customStyles=[],this.enqueued=!1,ZI(()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}enqueueDocumentValidation(){this.enqueued||!tE||(this.enqueued=!0,ZI(tE))}addCustomStyle(t){t[Xmt]||(t[Xmt]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[JI])return t[JI];let r;return t.getStyle?r=t.getStyle():r=t,r}processStyles(){let t=this.customStyles;for(let r=0;r<t.length;r++){let n=t[r];if(n[JI])continue;let i=this.getStyleForCustomStyle(n);if(i){let o=i.__appliedElement||i;QI&&QI(o),n[JI]=o}}return t}};Zl.prototype.addCustomStyle=Zl.prototype.addCustomStyle;Zl.prototype.getStyleForCustomStyle=Zl.prototype.getStyleForCustomStyle;Zl.prototype.processStyles=Zl.prototype.processStyles;Object.defineProperties(Zl.prototype,{transformCallback:{get(){return QI},set(e){QI=e}},validateCallback:{get(){return tE},set(e){let t=!1;tE||(t=!0),tE=e,t&&this.enqueueDocumentValidation()}}});var eE=new qmt,DG=class{constructor(){this.customStyleInterface=null,eE.invalidCallback=Gmt}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{eE.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()})})}prepareTemplate(t,r){if(this.ensure(),PG(t))return;QM[r]=t;let n=eE.transformTemplate(t,r);t._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(!!this.customStyleInterface.enqueued){for(let r=0;r<t.length;r++){let n=t[r],i=this.customStyleInterface.getStyleForCustomStyle(n);i&&eE.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,r){if(this.ensure(),r&&JM(t,r),t.shadowRoot){this.styleElement(t);let n=t.shadowRoot.children||t.shadowRoot.childNodes;for(let i=0;i<n.length;i++)this.styleSubtree(n[i])}else{let n=t.children||t.childNodes;for(let i=0;i<n.length;i++)this.styleSubtree(n[i])}}styleElement(t){this.ensure();let{is:r}=Fmt(t),n=QM[r];if(!(n&&PG(n))&&n&&!kG(n)){Wmt(n)||(this.prepareTemplate(n,r),Ymt(n));let i=t.shadowRoot;if(i){let o=i.querySelector("style");o&&(o.__cssRules=n._styleAst,o.textContent=ZM(n._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}};if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){let e=new DG,t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(r,n,i){e.flushCustomStyles(),e.prepareTemplate(r,n)},prepareTemplateStyles(r,n,i){window.ShadyCSS.prepareTemplate(r,n,i)},prepareTemplateDom(r,n){},styleSubtree(r,n){e.flushCustomStyles(),e.styleSubtree(r,n)},styleElement(r){e.flushCustomStyles(),e.styleElement(r)},styleDocument(r){e.flushCustomStyles(),e.styleDocument(r)},getComputedStyleValue(r,n){return jI(r,n)},flushCustomStyles(){e.flushCustomStyles()},nativeCss:Nx,nativeShadow:f_,cssBuild:Em,disableRuntime:WI},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=eE;var sr=class{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,r){this._asyncModule=t,this._callback=r,this._timer=this._asyncModule.run(()=>{this._timer=null,rE.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),rE.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return this._timer!=null}static debounce(t,r,n){return t instanceof sr?t._cancelAsync():t=new sr,t.setConfig(r,n),t}},rE=new Set,Jl=function(e){rE.add(e)},$mt=function(){let e=Boolean(rE.size);return rE.forEach(t=>{try{t.flush()}catch(r){setTimeout(()=>{throw r})}}),e};var BG=typeof document.head.style.touchAction=="string",e9="__polymerGestures",t9="__polymerGesturesHandled",zG="__polymerGesturesTouchAction",Kmt=25,Zmt=5,nxe=2,ixe=2500,rgt=["mousedown","mousemove","mouseup","click"],oxe=[0,1,4,2],axe=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(e){return!1}}();function HG(e){return rgt.indexOf(e)>-1}var VG=!1;(function(){try{let e=Object.defineProperty({},"passive",{get(){VG=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}})();function ngt(e){if(!(HG(e)||e==="touchend")&&BG&&VG&&Ydt)return{passive:!0}}var igt=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),FG=[],sxe={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},lxe={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function cxe(e){return sxe[e.localName]||!1}function uxe(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];let r=e.getRootNode();if(e.id){let n=r.querySelectorAll(`label[for = ${e.id}]`);for(let i=0;i<n.length;i++)t.push(n[i])}}return t}var Jmt=function(e){let t=e.sourceCapabilities;if(!(t&&!t.firesTouchEvents)&&(e[t9]={skip:!0},e.type==="click")){let r=!1,n=n9(e);for(let i=0;i<n.length;i++){if(n[i].nodeType===Node.ELEMENT_NODE){if(n[i].localName==="label")FG.push(n[i]);else if(cxe(n[i])){let o=uxe(n[i]);for(let a=0;a<o.length;a++)r=r||FG.indexOf(o[a])>-1}}if(n[i]===oa.mouse.target)return}if(r)return;e.preventDefault(),e.stopPropagation()}};function Qmt(e){let t=igt?["click"]:rgt;for(let r=0,n;r<t.length;r++)n=t[r],e?(FG.length=0,document.addEventListener(n,Jmt,!0)):document.removeEventListener(n,Jmt,!0)}function hxe(e){if(!fG)return;oa.mouse.mouseIgnoreJob||Qmt(!0);let t=function(){Qmt(),oa.mouse.target=null,oa.mouse.mouseIgnoreJob=null};oa.mouse.target=n9(e)[0],oa.mouse.mouseIgnoreJob=sr.debounce(oa.mouse.mouseIgnoreJob,mo.after(ixe),t)}function d_(e){let t=e.type;if(!HG(t))return!1;if(t==="mousemove"){let r=e.buttons===void 0?1:e.buttons;return e instanceof window.MouseEvent&&!axe&&(r=oxe[e.which]||0),Boolean(r&1)}else return(e.button===void 0?0:e.button)===0}function fxe(e){if(e.type==="click"){if(e.detail===0)return!0;let t=yp(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let r=t.getBoundingClientRect(),n=e.pageX,i=e.pageY;return!(n>=r.left&&n<=r.right&&i>=r.top&&i<=r.bottom)}return!1}var oa={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function pxe(e){let t="auto",r=n9(e);for(let n=0,i;n<r.length;n++)if(i=r[n],i[zG]){t=i[zG];break}return t}function ogt(e,t,r){e.movefn=t,e.upfn=r,document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}function Fx(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}fG&&document.addEventListener("touchend",hxe,VG?{passive:!0}:!1);var n9=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],iE={},p_=[];function dxe(e,t){let r=document.elementFromPoint(e,t),n=r;for(;n&&n.shadowRoot&&!window.ShadyDOM;){let i=n;if(n=n.shadowRoot.elementFromPoint(e,t),i===n)break;n&&(r=n)}return r}function yp(e){let t=n9(e);return t.length>0?t[0]:e.target}function agt(e){let t,r=e.type,i=e.currentTarget[e9];if(!i)return;let o=i[r];if(!!o){if(!e[t9]&&(e[t9]={},r.slice(0,5)==="touch")){e=e;let a=e.changedTouches[0];if(r==="touchstart"&&e.touches.length===1&&(oa.touch.id=a.identifier),oa.touch.id!==a.identifier)return;BG||(r==="touchstart"||r==="touchmove")&&mxe(e)}if(t=e[t9],!t.skip){for(let a=0,s;a<p_.length;a++)s=p_[a],o[s.name]&&!t[s.name]&&s.flow&&s.flow.start.indexOf(e.type)>-1&&s.reset&&s.reset();for(let a=0,s;a<p_.length;a++)s=p_[a],o[s.name]&&!t[s.name]&&(t[s.name]=!0,s[r](e))}}}function mxe(e){let t=e.changedTouches[0],r=e.type;if(r==="touchstart")oa.touch.x=t.clientX,oa.touch.y=t.clientY,oa.touch.scrollDecided=!1;else if(r==="touchmove"){if(oa.touch.scrollDecided)return;oa.touch.scrollDecided=!0;let n=pxe(e),i=!1,o=Math.abs(oa.touch.x-t.clientX),a=Math.abs(oa.touch.y-t.clientY);e.cancelable&&(n==="none"?i=!0:n==="pan-x"?i=a>o:n==="pan-y"&&(i=o>a)),i?e.preventDefault():r9("track")}}function Tm(e,t,r){return iE[t]?(gxe(e,t,r),!0):!1}function sgt(e,t,r){return iE[t]?(_xe(e,t,r),!0):!1}function gxe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[e9];a||(e[e9]=a={});for(let s=0,l,c;s<i.length;s++)l=i[s],!(igt&&HG(l)&&l!=="click")&&(c=a[l],c||(a[l]=c={_count:0}),c._count===0&&e.addEventListener(l,agt,ngt(l)),c[o]=(c[o]||0)+1,c._count=(c._count||0)+1);e.addEventListener(t,r),n.touchAction&&m_(e,n.touchAction)}function _xe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[e9];if(a)for(let s=0,l,c;s<i.length;s++)l=i[s],c=a[l],c&&c[o]&&(c[o]=(c[o]||1)-1,c._count=(c._count||1)-1,c._count===0&&e.removeEventListener(l,agt,ngt(l)));e.removeEventListener(t,r)}function UG(e){p_.push(e);for(let t=0;t<e.emits.length;t++)iE[e.emits[t]]=e}function yxe(e){for(let t=0,r;t<p_.length;t++){r=p_[t];for(let n=0,i;n<r.emits.length;n++)if(i=r.emits[n],i===e)return r}return null}function m_(e,t){BG&&e instanceof HTMLElement&&li.run(()=>{e.style.touchAction=t}),e[zG]=t}function qG(e,t,r){let n=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(n.detail=r,ue(e).dispatchEvent(n),n.defaultPrevented){let i=r.preventer||r.sourceEvent;i&&i.preventDefault&&i.preventDefault()}}function r9(e){let t=yxe(e);t.info&&(t.info.prevent=!0)}UG({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Fx(this.info)},mousedown:function(e){if(!d_(e))return;let t=yp(e),r=this,n=function(a){d_(a)||(nE("up",t,a),Fx(r.info))},i=function(a){d_(a)&&nE("up",t,a),Fx(r.info)};ogt(this.info,n,i),nE("down",t,e)},touchstart:function(e){nE("down",yp(e),e.changedTouches[0],e)},touchend:function(e){nE("up",yp(e),e.changedTouches[0],e)}});function nE(e,t,r,n){!t||qG(t,e,{x:r.clientX,y:r.clientY,sourceEvent:r,preventer:n,prevent:function(i){return r9(i)}})}UG({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>nxe&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Fx(this.info)},mousedown:function(e){if(!d_(e))return;let t=yp(e),r=this,n=function(a){let s=a.clientX,l=a.clientY;tgt(r.info,s,l)&&(r.info.state=r.info.started?a.type==="mouseup"?"end":"track":"start",r.info.state==="start"&&r9("tap"),r.info.addMove({x:s,y:l}),d_(a)||(r.info.state="end",Fx(r.info)),t&&OG(r.info,t,a),r.info.started=!0)},i=function(a){r.info.started&&n(a),Fx(r.info)};ogt(this.info,n,i),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=yp(e),r=e.changedTouches[0],n=r.clientX,i=r.clientY;tgt(this.info,n,i)&&(this.info.state==="start"&&r9("tap"),this.info.addMove({x:n,y:i}),OG(this.info,t,r),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=yp(e),r=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:r.clientX,y:r.clientY}),OG(this.info,t,r))}});function tgt(e,t,r){if(e.prevent)return!1;if(e.started)return!0;let n=Math.abs(e.x-t),i=Math.abs(e.y-r);return n>=Zmt||i>=Zmt}function OG(e,t,r){if(!t)return;let n=e.moves[e.moves.length-2],i=e.moves[e.moves.length-1],o=i.x-e.x,a=i.y-e.y,s,l=0;n&&(s=i.x-n.x,l=i.y-n.y),qG(t,"track",{state:e.state,x:r.clientX,y:r.clientY,dx:o,dy:a,ddx:s,ddy:l,sourceEvent:r,hover:function(){return dxe(r.clientX,r.clientY)}})}UG({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){d_(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){d_(e)&&egt(this.info,e)},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){egt(this.info,e.changedTouches[0],e)}});function egt(e,t,r){let n=Math.abs(t.clientX-e.x),i=Math.abs(t.clientY-e.y),o=yp(r||t);!o||lxe[o.localName]&&o.hasAttribute("disabled")||(isNaN(n)||isNaN(i)||n<=Kmt&&i<=Kmt||fxe(t))&&(e.prevent||qG(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:r}))}var lgt=yp;var vh=Nn(e=>{class t extends e{_addEventListenerToNode(n,i,o){Tm(n,i,o)||super._addEventListenerToNode(n,i,o)}_removeEventListenerFromNode(n,i,o){sgt(n,i,o)||super._removeEventListenerFromNode(n,i,o)}}return t});var vxe=/:host\(:dir\((ltr|rtl)\)\)/g,xxe=':host([dir="$1"])',bxe=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,wxe=':host([dir="$2"]) $1',Sxe=/:dir\((?:ltr|rtl)\)/,ugt=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),oE=[],aE=null,GG="";function hgt(){GG=document.documentElement.getAttribute("dir")}function fgt(e){e.__autoDirOptOut||e.setAttribute("dir",GG)}function pgt(){hgt(),GG=document.documentElement.getAttribute("dir");for(let e=0;e<oE.length;e++)fgt(oE[e])}function Mxe(){aE&&aE.takeRecords().length&&pgt()}var dgt=Nn(e=>{ugt||aE||(hgt(),aE=new MutationObserver(pgt),aE.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));let t=HI(e);class r extends t{static _processStyleText(i,o){return i=t._processStyleText.call(this,i,o),!ugt&&Sxe.test(i)&&(i=this._replaceDirInCssText(i),this.__activateDir=!0),i}static _replaceDirInCssText(i){let o=i;return o=o.replace(vxe,xxe),o=o.replace(bxe,wxe),o}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(Mxe(),oE.push(this),fgt(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){let i=oE.indexOf(this);i>-1&&oE.splice(i,1)}}}return r.__activateDir=!1,r});var i9=!1,mgt=[],ggt=[];function _gt(){i9=!0,requestAnimationFrame(function(){i9=!1,Exe(mgt),setTimeout(function(){Txe(ggt)})})}function Exe(e){for(;e.length;)ygt(e.shift())}function Txe(e){for(let t=0,r=e.length;t<r;t++)ygt(e.shift())}function ygt(e){let t=e[0],r=e[1],n=e[2];try{r.apply(t,n)}catch(i){setTimeout(()=>{throw i})}}function vgt(e,t,r){i9||_gt(),mgt.push([e,t,r])}function Cm(e,t,r){i9||_gt(),ggt.push([e,t,r])}function xgt(){document.body.removeAttribute("unresolved")}document.readyState==="interactive"||document.readyState==="complete"?xgt():window.addEventListener("DOMContentLoaded",xgt);function sE(e,t,r){return{index:e,removed:t,addedCount:r}}var bgt=0,wgt=1,WG=2,YG=3;function Cxe(e,t,r,n,i,o){let a=o-i+1,s=r-t+1,l=new Array(a);for(let c=0;c<a;c++)l[c]=new Array(s),l[c][0]=c;for(let c=0;c<s;c++)l[0][c]=c;for(let c=1;c<a;c++)for(let u=1;u<s;u++)if(jG(e[t+u-1],n[i+c-1]))l[c][u]=l[c-1][u-1];else{let h=l[c-1][u]+1,f=l[c][u-1]+1;l[c][u]=h<f?h:f}return l}function Axe(e){let t=e.length-1,r=e[0].length-1,n=e[t][r],i=[];for(;t>0||r>0;){if(t==0){i.push(WG),r--;continue}if(r==0){i.push(YG),t--;continue}let o=e[t-1][r-1],a=e[t-1][r],s=e[t][r-1],l;a<s?l=a<o?a:o:l=s<o?s:o,l==o?(o==n?i.push(bgt):(i.push(wgt),n=o),t--,r--):l==a?(i.push(YG),t--,n=a):(i.push(WG),r--,n=s)}return i.reverse(),i}function Pxe(e,t,r,n,i,o){let a=0,s=0,l,c=Math.min(r-t,o-i);if(t==0&&i==0&&(a=Ixe(e,n,c)),r==e.length&&o==n.length&&(s=Lxe(e,n,c-a)),t+=a,i+=a,r-=s,o-=s,r-t==0&&o-i==0)return[];if(t==r){for(l=sE(t,[],0);i<o;)l.removed.push(n[i++]);return[l]}else if(i==o)return[sE(t,[],r-t)];let u=Axe(Cxe(e,t,r,n,i,o));l=void 0;let h=[],f=t,p=i;for(let d=0;d<u.length;d++)switch(u[d]){case bgt:l&&(h.push(l),l=void 0),f++,p++;break;case wgt:l||(l=sE(f,[],0)),l.addedCount++,f++,l.removed.push(n[p]),p++;break;case WG:l||(l=sE(f,[],0)),l.addedCount++,f++;break;case YG:l||(l=sE(f,[],0)),l.removed.push(n[p]),p++;break}return l&&h.push(l),h}function Ixe(e,t,r){for(let n=0;n<r;n++)if(!jG(e[n],t[n]))return n;return r}function Lxe(e,t,r){let n=e.length,i=t.length,o=0;for(;o<r&&jG(e[--n],t[--i]);)o++;return o}function o9(e,t){return Pxe(e,0,e.length,t,0,t.length)}function jG(e,t){return e===t}function Bx(e){return e.localName==="slot"}var xh=class{static getFlattenedNodes(e){let t=ue(e);return Bx(e)?(e=e,t.assignedNodes({flatten:!0})):Array.from(t.childNodes).map(r=>Bx(r)?(r=r,ue(r).assignedNodes({flatten:!0})):[r]).reduce((r,n)=>r.concat(n),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Bx(this._target)?this._listenSlots([this._target]):ue(this._target).children&&(this._listenSlots(ue(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,e=>{this._processMutations(e)}):(this._nativeChildrenObserver=new MutationObserver(e=>{this._processMutations(e)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Bx(this._target)?this._unlistenSlots([this._target]):ue(this._target).children&&(this._unlistenSlots(ue(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,li.run(()=>this.flush()))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let r=e[t];r.addedNodes&&this._listenSlots(r.addedNodes),r.removedNodes&&this._unlistenSlots(r.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),r=o9(t,this._effectiveNodes);for(let i=0,o;i<r.length&&(o=r[i]);i++)for(let a=0,s;a<o.removed.length&&(s=o.removed[a]);a++)e.removedNodes.push(s);for(let i=0,o;i<r.length&&(o=r[i]);i++)for(let a=o.index;a<o.index+o.addedCount;a++)e.addedNodes.push(t[a]);this._effectiveNodes=t;let n=!1;return(e.addedNodes.length||e.removedNodes.length)&&(n=!0,this.callback.call(this._target,e)),n}_listenSlots(e){for(let t=0;t<e.length;t++){let r=e[t];Bx(r)&&r.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let r=e[t];Bx(r)&&r.removeEventListener("slotchange",this._boundSchedule)}}};var ci=function(){let e,t;do e=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=$mt();while(e||t)};var Hx=Element.prototype,kxe=Hx.matches||Hx.matchesSelector||Hx.mozMatchesSelector||Hx.msMatchesSelector||Hx.oMatchesSelector||Hx.webkitMatchesSelector,$G=function(e,t){return kxe.call(e,t)},Kr=class{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new xh(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if(ue(this.node).contains(t))return!0;let r=t,n=t.ownerDocument;for(;r&&r!==n&&r!==this.node;)r=ue(r).parentNode||ue(r).host;return r===this.node}getOwnerRoot(){return ue(this.node).getRootNode()}getDistributedNodes(){return this.node.localName==="slot"?ue(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],r=ue(this.node).assignedSlot;for(;r;)t.push(r),r=ue(r).assignedSlot;return t}importNode(t,r){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return ue(n).importNode(t,r)}getEffectiveChildNodes(){return xh.getFlattenedNodes(this.node)}queryDistributedElements(t){let r=this.getEffectiveChildNodes(),n=[];for(let i=0,o=r.length,a;i<o&&(a=r[i]);i++)a.nodeType===Node.ELEMENT_NODE&&$G(a,t)&&n.push(a);return n}get activeElement(){let t=this.node;return t._activeElement!==void 0?t._activeElement:t.activeElement}};function Rxe(e,t){for(let r=0;r<t.length;r++){let n=t[r];e[n]=function(){return this.node[n].apply(this.node,arguments)}}}function Sgt(e,t){for(let r=0;r<t.length;r++){let n=t[r];Object.defineProperty(e,n,{get:function(){return this.node[n]},configurable:!0})}}function Nxe(e,t){for(let r=0;r<t.length;r++){let n=t[r];Object.defineProperty(e,n,{get:function(){return this.node[n]},set:function(i){this.node[n]=i},configurable:!0})}}var lE=class{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}};Kr.prototype.cloneNode;Kr.prototype.appendChild;Kr.prototype.insertBefore;Kr.prototype.removeChild;Kr.prototype.replaceChild;Kr.prototype.setAttribute;Kr.prototype.removeAttribute;Kr.prototype.querySelector;Kr.prototype.querySelectorAll;Kr.prototype.parentNode;Kr.prototype.firstChild;Kr.prototype.lastChild;Kr.prototype.nextSibling;Kr.prototype.previousSibling;Kr.prototype.firstElementChild;Kr.prototype.lastElementChild;Kr.prototype.nextElementSibling;Kr.prototype.previousElementSibling;Kr.prototype.childNodes;Kr.prototype.children;Kr.prototype.classList;Kr.prototype.textContent;Kr.prototype.innerHTML;var XG=Kr;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(Kr.prototype).forEach(t=>{t!="activeElement"&&(e.prototype[t]=Kr.prototype[t])}),Sgt(e.prototype,["classList"]),XG=e,Object.defineProperties(lE.prototype,{localTarget:{get(){let t=this.event.currentTarget,r=t&&zt(t).getOwnerRoot(),n=this.path;for(let i=0;i<n.length;i++){let o=n[i];if(zt(o).getOwnerRoot()===r)return o}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else Rxe(Kr.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),Sgt(Kr.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),Nxe(Kr.prototype,["textContent","innerHTML","className"]);var zt=function(e){if(e=e||document,e instanceof XG||e instanceof lE)return e;let t=e.__domApi;return t||(e instanceof Event?t=new lE(e):t=new XG(e),e.__domApi=t),t};var KG=window.ShadyDOM,Mgt=window.ShadyCSS;function Egt(e,t){return ue(e).getRootNode()===t}function Tgt(e,t=!1){if(!KG||!Mgt||!KG.handlesDynamicScoping)return null;let r=Mgt.ScopingShim;if(!r)return null;let n=r.scopeForNode(e),i=ue(e).getRootNode(),o=a=>{if(!Egt(a,i))return;let s=Array.from(KG.nativeMethods.querySelectorAll.call(a,"*"));s.push(a);for(let l=0;l<s.length;l++){let c=s[l];if(!Egt(c,i))continue;let u=r.currentScopeForNode(c);u!==n&&(u!==""&&r.unscopeNode(c,u),r.scopeNode(c,n))}};if(o(e),t){let a=new MutationObserver(s=>{for(let l=0;l<s.length;l++){let c=s[l];for(let u=0;u<c.addedNodes.length;u++){let h=c.addedNodes[u];h.nodeType===Node.ELEMENT_NODE&&o(h)}}});return a.observe(e,{childList:!0,subtree:!0}),a}else return null}var ZG="disable-upgrade",JG=e=>{for(;e;){let t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},E1r=Nn(e=>{let t=Mm(e),r=JG(t);class n extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return r.call(this).concat(ZG)}_initializeProperties(){this.hasAttribute(ZG)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(o){return super._canApplyPropertyDefault(o)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(o))}attributeChangedCallback(o,a,s,l){o==ZG?this.__isUpgradeDisabled&&s==null&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,ue(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(o,a,s,l)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}return n});var a9="disable-upgrade",Dxe=window.ShadyCSS,Gt=Nn(e=>{let t=vh(Mm(e)),r=UI?t:dgt(t),n=JG(r),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class o extends r{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(s,l,c){(this.__dataAttributes&&this.__dataAttributes[s]||s===a9)&&this.attributeChangedCallback(s,l,c,null)}setAttribute(s,l){if(qM&&!this._legacyForceObservedAttributes){let c=this.getAttribute(s);super.setAttribute(s,l),this.__attributeReaction(s,c,String(l))}else super.setAttribute(s,l)}removeAttribute(s){if(qM&&!this._legacyForceObservedAttributes){let l=this.getAttribute(s);super.removeAttribute(s),this.__attributeReaction(s,l,null)}else super.removeAttribute(s)}static get observedAttributes(){return qM&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],VI(this.prototype)),this.__observedAttributes):n.call(this).concat(a9)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(s){return super._canApplyPropertyDefault(s)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(s))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(s,l,c,u){l!==c&&(s==a9?this.__isUpgradeDisabled&&c==null&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,ue(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(s,l,c,u),this.attributeChanged(s,l,c)))}attributeChanged(s,l,c){}_initializeProperties(){if(dp&&this.hasAttribute(a9))this.__isUpgradeDisabled=!0;else{let s=Object.getPrototypeOf(this);s.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",s))||(this._registered(),s.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),qM&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){let s=this.attributes;for(let l=0,c=s.length;l<c;l++){let u=s[l];this.__attributeReaction(u.name,null,u.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(s){return this._serializeValue(s)}deserialize(s,l){return this._deserializeValue(s,l)}reflectPropertyToAttribute(s,l,c){this._propertyToAttribute(s,l,c)}serializeValueToAttribute(s,l,c){this._valueToNodeAttribute(c||this,s,l)}extend(s,l){if(!(s&&l))return s||l;let c=Object.getOwnPropertyNames(l);for(let u=0,h;u<c.length&&(h=c[u]);u++){let f=Object.getOwnPropertyDescriptor(l,h);f&&Object.defineProperty(s,h,f)}return s}mixin(s,l){for(let c in l)s[c]=l[c];return s}chainObject(s,l){return s&&l&&s!==l&&(s.__proto__=l),s}instanceTemplate(s){let l=this.constructor._contentForTemplate(s);return document.importNode(l,!0)}fire(s,l,c){c=c||{},l=l==null?{}:l;let u=new Event(s,{bubbles:c.bubbles===void 0?!0:c.bubbles,cancelable:Boolean(c.cancelable),composed:c.composed===void 0?!0:c.composed});u.detail=l;let h=c.node||this;return ue(h).dispatchEvent(u),u}listen(s,l,c){s=s||this;let u=this.__boundListeners||(this.__boundListeners=new WeakMap),h=u.get(s);h||(h={},u.set(s,h));let f=l+c;h[f]||(h[f]=this._addMethodEventListenerToNode(s,l,c,this))}unlisten(s,l,c){s=s||this;let u=this.__boundListeners&&this.__boundListeners.get(s),h=l+c,f=u&&u[h];f&&(this._removeEventListenerFromNode(s,l,f),u[h]=null)}setScrollDirection(s,l){m_(l||this,i[s]||"auto")}$$(s){return this.root.querySelector(s)}get domHost(){let s=ue(this).getRootNode();return s instanceof DocumentFragment?s.host:s}distributeContent(){let l=zt(this);window.ShadyDOM&&l.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return zt(this).getEffectiveChildNodes()}queryDistributedElements(s){return zt(this).queryDistributedElements(s)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter(function(l){return l.nodeType===Node.ELEMENT_NODE})}getEffectiveTextContent(){let s=this.getEffectiveChildNodes(),l=[];for(let c=0,u;u=s[c];c++)u.nodeType!==Node.COMMENT_NODE&&l.push(u.textContent);return l.join("")}queryEffectiveChildren(s){let l=this.queryDistributedElements(s);return l&&l[0]}queryAllEffectiveChildren(s){return this.queryDistributedElements(s)}getContentChildNodes(s){let l=this.root.querySelector(s||"slot");return l?zt(l).getDistributedNodes():[]}getContentChildren(s){return this.getContentChildNodes(s).filter(function(c){return c.nodeType===Node.ELEMENT_NODE})}isLightDescendant(s){let l=this;return l!==s&&ue(l).contains(s)&&ue(l).getRootNode()===ue(s).getRootNode()}isLocalDescendant(s){return this.root===ue(s).getRootNode()}scopeSubtree(s,l=!1){return Tgt(s,l)}getComputedStyleValue(s){return Dxe.getComputedStyleValue(this,s)}debounce(s,l,c){return this._debouncers=this._debouncers||{},this._debouncers[s]=sr.debounce(this._debouncers[s],c>0?mo.after(c):li,l.bind(this))}isDebouncerActive(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];return!!(l&&l.isActive())}flushDebouncer(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];l&&l.flush()}cancelDebouncer(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];l&&l.cancel()}async(s,l){return l>0?mo.run(s.bind(this),l):~li.run(s.bind(this))}cancelAsync(s){s<0?li.cancel(~s):mo.cancel(s)}create(s,l){let c=document.createElement(s);if(l)if(c.setProperties)c.setProperties(l);else for(let u in l)c[u]=l[u];return c}elementMatches(s,l){return $G(l||this,s)}toggleAttribute(s,l){let c=this;return arguments.length===3&&(c=arguments[2]),arguments.length==1&&(l=!c.hasAttribute(s)),l?(ue(c).setAttribute(s,""),!0):(ue(c).removeAttribute(s),!1)}toggleClass(s,l,c){c=c||this,arguments.length==1&&(l=!c.classList.contains(s)),l?c.classList.add(s):c.classList.remove(s)}transform(s,l){l=l||this,l.style.webkitTransform=s,l.style.transform=s}translate3d(s,l,c,u){u=u||this,this.transform("translate3d("+s+","+l+","+c+")",u)}arrayDelete(s,l){let c;if(Array.isArray(s)){if(c=s.indexOf(l),c>=0)return s.splice(c,1)}else if(c=No(this,s).indexOf(l),c>=0)return this.splice(s,c,1);return null}_logger(s,l){switch(Array.isArray(l)&&l.length===1&&Array.isArray(l[0])&&(l=l[0]),s){case"log":case"warn":case"error":console[s](...l)}}_log(...s){this._logger("log",s)}_warn(...s){this._logger("warn",s)}_error(...s){this._logger("error",s)}_logf(s,...l){return["[%s::%s]",this.is,s,...l]}}return o.prototype.is="",o});var Am=Ee(Oe(),1);function bh(e,t){let r=0,n=0;for(;;){if(r===e.length)return n===t.length?0:-1;if(n===t.length)return 1;if(g_(e[r])&&g_(t[n])){let i=r,o=n;r=Cgt(e,r+1),n=Cgt(t,n+1);let a=parseFloat(e.slice(i,r)),s=parseFloat(t.slice(o,n));if(a<s)return-1;if(a>s)return 1;continue}if(QG(e[r])){if(!QG(t[n]))return-1}else{if(QG(t[n]))return 1;if(e[r]<t[n])return-1;if(e[r]>t[n])return 1}r++,n++}}function Cgt(e,t){let r;(function(i){i[i.NATURAL=0]="NATURAL",i[i.REAL=1]="REAL",i[i.EXPONENT_SIGN=2]="EXPONENT_SIGN",i[i.EXPONENT=3]="EXPONENT"})(r||(r={}));let n=r.NATURAL;for(;t<e.length;t++)if(n===r.NATURAL){if(e[t]===".")n=r.REAL;else if(e[t]==="e"||e[t]==="E")n=r.EXPONENT_SIGN;else if(!g_(e[t]))break}else if(n===r.REAL){if(e[t]==="e"||e[t]==="E")n=r.EXPONENT_SIGN;else if(!g_(e[t]))break}else if(n===r.EXPONENT_SIGN)if(g_(e[t])||e[t]==="+"||e[t]==="-")n=r.EXPONENT;else break;else if(n===r.EXPONENT&&!g_(e[t]))break;return t}function g_(e){return"0"<=e&&e<="9"}function QG(e){return e==="/"||e==="_"||g_(e)}var Oxe=[];function zxe(e){return Am.keys(e).sort(bh)}function $i(e){return Am.union.apply(null,Am.values(e)).sort(bh)}function Fxe(e,t){let r=[];return t.forEach(n=>r=r.concat(e[n])),Am.uniq(r).sort(bh)}var Pgt="X-TensorBoard-Feature-Flags",Igt="tensorBoardFeatureFlags";var tW={};Zs(tW,{getFeatureFlags:()=>Hxe,getFeatureFlagsToSendToServer:()=>cE,initializeFeatureFlags:()=>Lgt,setFeatureFlags:()=>Bxe});var s9,l9;Lgt();function Lgt(){s9=null,l9=null}function Bxe(e,t){s9=e,l9=t}function Hxe(){if(s9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return s9}function cE(){if(l9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return l9}var c9=class extends Error{constructor(){super(...arguments),this.name="RequestCancellationError"}},Vx=class extends Error{constructor(t){super(t),this.name="InvalidRequestOptionsError",Object.setPrototypeOf(this,Vx.prototype)}},uE=class extends Error{constructor(t,r){super(),this.message=`RequestNetworkError: ${t.status} at ${r}`,this.name="RequestNetworkError",this.req=t,this.url=r}},Pm;(function(e){e.GET="GET",e.POST="POST"})(Pm||(Pm={}));var Ux=class{validate(){if(this.methodType===Pm.GET&&this.body)throw new Vx("body must be missing for a GET request.")}},Ae=class{constructor(t=1e3,r=3){this._queue=[],this._nActiveRequests=0,this._nSimultaneousRequests=t,this._maxRetries=r}request(t,r){let n=Uxe(r);return this.requestWithOptions(t,n)}requestWithOptions(t,r){return r.validate(),new Promise((i,o)=>{let a={resolve:i,reject:o};this._queue.push(a),this.launchRequests()}).then(()=>this.promiseWithRetries(t,this._maxRetries,r)).then(i=>(this._nActiveRequests--,this.launchRequests(),i),i=>(i.name==="RequestNetworkError"&&(this._nActiveRequests--,this.launchRequests()),Promise.reject(i)))}fetch(t,r){return new Promise((n,i)=>{let o={resolve:n,reject:i};this._queue.push(o),this.launchRequests()}).then(()=>{let n=1;return new Promise(i=>{let o=()=>{fetch(t,r).then(a=>{if(!a.ok&&this._maxRetries>n){n++,o();return}i(a),this._nActiveRequests--,this.launchRequests()})};o()})})}clearQueue(){var t;for(;this._queue.length>0;)(t=this._queue.pop())==null||t.reject(new c9("Request cancelled by clearQueue"))}activeRequests(){return this._nActiveRequests}outstandingRequests(){return this._nActiveRequests+this._queue.length}launchRequests(){for(;this._nActiveRequests<this._nSimultaneousRequests&&this._queue.length>0;)this._nActiveRequests++,this._queue.pop().resolve(void 0)}promiseWithRetries(t,r,n){var i=a=>a,o=a=>r>0?this.promiseWithRetries(t,r-1,n):Promise.reject(a);return this._promiseFromUrl(t,n).then(i,o)}_promiseFromUrl(t,r){return new Promise((n,i)=>{let o=Vxe(r.methodType,t,r.withCredentials,r.contentType);o.setRequestHeader(Pgt,JSON.stringify(cE())),o.onload=function(){o.status===200?n(JSON.parse(o.responseText)):i(new uE(o,t))},o.onerror=function(){i(new uE(o,t))},r.body?o.send(r.body):o.send()})}};function Vxe(e,t,r,n){let i=new XMLHttpRequest;return i.open(e,t),r&&(i.withCredentials=r),n&&i.setRequestHeader("Content-Type",n),i}function Uxe(e){let t=new Ux;return e?(t.methodType=Pm.POST,t.body=qxe(e),t):(t.methodType=Pm.GET,t)}function qxe(e){let t=new FormData;for(let[r,n]of Object.entries(e)){let i=Array.isArray(n)?n:[n];for(let o of i)t.append(r,o)}return t}var kgt="experimentalPlugin",Gxe=new URLSearchParams(window.location.search),Wxe=Rgt();function Rgt(){return{environment:()=>qx("/environment"),experiments:()=>qx("/experiments"),pluginRoute:(e,t,r)=>qx(`/plugin/${e}${t}`,r),pluginRouteForSrc:(e,t,r=new URLSearchParams)=>{let n=cE();return Object.keys(n).length>0&&r.append(Igt,JSON.stringify(n)),qx(`/plugin/${e}${t}`,r)},pluginsListing:()=>qx("/plugins_listing",Ngt({[kgt]:Gxe.getAll(kgt)})),runs:()=>qx("/runs")}}function _e(){return Wxe}function qx(e,t=new URLSearchParams){let r="data"+e;return String(t)&&(r+=(e.includes("?")?"&":"?")+String(t)),r}function Ngt(e={}){let t=Object.keys(e).sort().filter(n=>e[n]),r=new URLSearchParams;return t.forEach(n=>{let i=e[n];(Array.isArray(i)?i:[i]).forEach(a=>r.append(n,a))}),r}var u9=Ee(Oe(),1);var Da;(function(e){e[e.SEARCH_RESULTS=0]="SEARCH_RESULTS",e[e.PREFIX_GROUP=1]="PREFIX_GROUP"})(Da||(Da={}));function Yxe(e,t){let r=(()=>{try{return new RegExp(t)}catch(n){return null}})();return{name:t,metadata:{type:Da.SEARCH_RESULTS,validRegex:!!r,universalRegex:t===".*"},items:r?e.filter(n=>n.match(r)):[]}}function jxe(e,t="/"){let r=[],n={};return e.forEach(i=>{let o=i.indexOf(t),a=o>=0?i.slice(0,o):i;if(!n[a]){let s={name:a,metadata:{type:Da.PREFIX_GROUP},items:[]};n[a]=s,r.push(s)}n[a].items.push(i)}),r}function Xxe(e,t=""){let r=[Yxe(e,t)],n=jxe(e);return Array().concat(r,n)}function hE(e,t,r){let n=$i(e),i=Xxe(n,r),o=$xe(u9.pick(e,t));return i.map(({name:a,metadata:s,items:l})=>({name:a,metadata:s,items:l.map(c=>({tag:c,runs:(o.get(c)||[]).slice()}))}))}function $xe(e){let t=new Map;return Object.keys(e).forEach(r=>{e[r].forEach(n=>{let i=t.get(n)||[];i.push(r),t.set(n,i)})}),t}function Kxe(e,t){let r=bh(e.tag,t.tag);return r!=0?r:bh(e.run,t.run)}function Ql(e,t,r){let n=hE(e,t,r);function i(o){let a=u9.flatten(o.items.map(({tag:s,runs:l})=>l.map(c=>({tag:s,run:c}))));return a.sort(Kxe),{name:o.name,metadata:o.metadata,items:a}}return n.map(i)}var cW={};Zs(cW,{IronResizableBehavior:()=>Qs});var Zxe={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Fgt={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Jxe=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},Fgt);function Qxe(e,t,r){let n=e._noAccessors,i=Object.getOwnPropertyNames(e);for(let o=0;o<i.length;o++){let a=i[o];if(!(a in r))if(n)t[a]=e[a];else{let s=Object.getOwnPropertyDescriptor(e,a);s&&(s.configurable=!0,Object.defineProperty(t,a,s))}}}function Bgt(e,t){return Ugt({},Gt(t),e)}function tbe(e,t,r){for(let n=0;n<t.length;n++)Hgt(e,t[n],r,Jxe)}function Hgt(e,t,r,n){Qxe(t,e,n);for(let i in Zxe)t[i]&&(r[i]=r[i]||[],r[i].push(t[i]))}function Vgt(e,t,r){t=t||[];for(let n=e.length-1;n>=0;n--){let i=e[n];i?Array.isArray(i)?Vgt(i,t):t.indexOf(i)<0&&(!r||r.indexOf(i)<0)&&t.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return t}function Ogt(e,t){for(let r in t){let n=e[r],i=t[r];!("value"in i)&&n&&"value"in n?e[r]=Object.assign({value:n.value},i):e[r]=i}}var zgt=Gt(HTMLElement);function Ugt(e,t,r){let n,i={};class o extends t{static _finalizeClass(){if(!this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this)))t._finalizeClass.call(this);else{if(n)for(let l=0,c;l<n.length;l++)c=n[l],c.properties&&this.createProperties(c.properties),c.observers&&this.createObservers(c.observers,c.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}}static get properties(){let l={};if(n)for(let c=0;c<n.length;c++)Ogt(l,n[c].properties);return Ogt(l,e.properties),l}static get observers(){let l=[];if(n)for(let c=0,u;c<n.length;c++)u=n[c],u.observers&&(l=l.concat(u.observers));return e.observers&&(l=l.concat(e.observers)),l}created(){super.created();let l=i.created;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}_registered(){let l=o.prototype;if(!l.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",l))){l.__hasRegisterFinished=!0,super._registered(),dp&&a(l);let c=Object.getPrototypeOf(this),u=i.beforeRegister;if(u)for(let h=0;h<u.length;h++)u[h].call(c);if(u=i.registered,u)for(let h=0;h<u.length;h++)u[h].call(c)}}_applyListeners(){super._applyListeners();let l=i.listeners;if(l)for(let c=0;c<l.length;c++){let u=l[c];if(u)for(let h in u)this._addMethodEventListenerToNode(this,h,u[h])}}_ensureAttributes(){let l=i.hostAttributes;if(l)for(let c=l.length-1;c>=0;c--){let u=l[c];for(let h in u)this._ensureAttribute(h,u[h])}super._ensureAttributes()}ready(){super.ready();let l=i.ready;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}attached(){super.attached();let l=i.attached;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}detached(){super.detached();let l=i.detached;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}attributeChanged(l,c,u){super.attributeChanged();let h=i.attributeChanged;if(h)for(let f=0;f<h.length;f++)h[f].call(this,l,c,u)}}if(r){Array.isArray(r)||(r=[r]);let s=t.prototype.behaviors;n=Vgt(r,null,s),o.prototype.behaviors=s?s.concat(r):n}let a=s=>{n&&tbe(s,n,i),Hgt(s,e,i,Fgt)};return dp||a(o.prototype),o.generatedFrom=e,o}var h9=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let r=t?t(zgt):zgt;return r=Ugt(e,r,e.behaviors),r.is=r.prototype.is=e.is,r};var Yt=function(e){let t;return typeof e=="function"?t=e:t=Yt.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};Yt.Class=h9;function eW(e,t,r,n,i){let o;i&&(o=typeof r=="object"&&r!==null,o&&(n=e.__dataTemp[t]));let a=n!==r&&(n===n||r===r);return o&&a&&(e.__dataTemp[t]=r),a}var Gx=Nn(e=>{class t extends e{_shouldPropertyChange(n,i,o){return eW(this,n,i,o,!0)}}return t}),f9=Nn(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(n,i,o){return eW(this,n,i,o,this.mutableData)}}return t});Gx._mutablePropertyChange=eW;var rW=null;function nW(){return rW}nW.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:nW,writable:!0}});var Ggt=h_(nW),ebe=Gx(Ggt);function rbe(e,t){rW=e,Object.setPrototypeOf(e,t.prototype),new t,rW=null}var nbe=h_(class{});function iW(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(Boolean(e)!=Boolean(n.__hideTemplateChildren__))if(n.nodeType===Node.TEXT_NODE)e?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__;else if(n.localName==="slot")if(e)n.__polymerReplaced__=document.createComment("hidden-slot"),ue(ue(n).parentNode).replaceChild(n.__polymerReplaced__,n);else{let i=n.__polymerReplaced__;i&&ue(ue(i).parentNode).replaceChild(n,i)}else n.style&&(e?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__);n.__hideTemplateChildren__=e,n._showHideChildren&&n._showHideChildren(e)}}var wh=class extends nbe{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let r=[];this.children=r;for(let i=this.root.firstChild;i;i=i.nextSibling)r.push(i),i.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let n=this.__templatizeOptions;(t&&n.instanceProps||!n.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let n in this.__hostProps)this._setPendingProperty(n,this.__dataHost["_host_"+n]);for(let n in t)this._setPendingProperty(n,t[n])}forwardHostProp(t,r){this._setPendingPropertyOrPath(t,r,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,r,n){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,r,i=>{i.model=this,n(i)});else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(t,r,n)}}_showHideChildren(t){iW(t,this.children)}_setUnmanagedPropertyToNode(t,r,n){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&r=="textContent"?t.__polymerTextContent__=n:super._setUnmanagedPropertyToNode(t,r,n)}get parentModel(){let t=this.__parentModel;if(!t){let r;t=this;do t=t.__dataHost.__dataHost;while((r=t.__templatizeOptions)&&!r.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}};wh.prototype.__dataHost;wh.prototype.__templatizeOptions;wh.prototype._methodHost;wh.prototype.__templatizeOwner;wh.prototype.__hostProps;var ibe=Gx(wh);function qgt(e){let t=e.__dataHost;return t&&t._methodHost||t}function obe(e,t,r){let n=r.mutableData?ibe:wh;tc.mixin&&(n=tc.mixin(n));let i=class extends n{};return i.prototype.__templatizeOptions=r,i.prototype._bindTemplate(e),lbe(i,e,t,r),i}function abe(e,t,r,n){let i=r.forwardHostProp;if(i&&t.hasHostProps){let o=e.localName=="template",a=t.templatizeTemplateClass;if(!a){if(o){let l=r.mutableData?ebe:Ggt;class c extends l{}a=t.templatizeTemplateClass=c}else{let l=e.constructor;class c extends l{}a=t.templatizeTemplateClass=c}let s=t.hostProps;for(let l in s)a.prototype._addPropertyEffect("_host_"+l,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:sbe(l,i)}),a.prototype._createNotifyingProperty("_host_"+l);LI&&n&&hbe(t,r,n)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),o)rbe(e,a),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,a.prototype);let s=t.hostProps;for(let l in s)if(l="_host_"+l,l in e){let c=e[l];delete e[l],e.__data[l]=c}}}}function sbe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,i.substring(6),o[i])}}function lbe(e,t,r,n){let i=r.hostProps||{};for(let o in n.instanceProps){delete i[o];let a=n.notifyInstanceProp;a&&e.prototype._addPropertyEffect(o,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:cbe(o,a)})}if(n.forwardHostProp&&t.__dataHost)for(let o in i)r.hasHostProps||(r.hasHostProps=!0),e.prototype._addPropertyEffect(o,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ube()})}function cbe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,n,i,o[i])}}function ube(){return function(t,r,n){t.__dataHost._setPendingPropertyOrPath("_host_"+r,n[r],!0,!0)}}function tc(e,t,r){if(iu&&!qgt(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(r=r||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let i=(t?t.constructor:wh)._parseTemplate(e),o=i.templatizeInstanceClass;o||(o=obe(e,i,r),i.templatizeInstanceClass=o);let a=qgt(e);abe(e,i,r,a);let s=class extends o{};return s.prototype._methodHost=a,s.prototype.__dataHost=e,s.prototype.__templatizeOwner=t,s.prototype.__hostProps=i.hostProps,s=s,s}function hbe(e,t,r){let n=r.constructor._properties,{propertyEffects:i}=e,{instanceProps:o}=t;for(let a in i)if(!n[a]&&!(o&&o[a])){let s=i[a];for(let l=0;l<s.length;l++){let{part:c}=s[l].info;if(!(c.signature&&c.signature.static)){console.warn(`Property '${a}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function p9(e,t){let r;for(;t;)if(r=t.__dataHost?t:t.__templatizeInstance)if(r.__dataHost!=e)t=r.__dataHost;else return r;else t=ue(t).parentNode;return null}var Wgt={templatize(e,t){this._templatizerTemplate=e,this.ctor=tc(e,this,{mutableData:Boolean(t),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return p9(this._templatizerTemplate,e)}};var Ygt=!1;function Wx(){if(dp&&!u_){if(!Ygt){Ygt=!0;let e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}var fbe=vh(f9(h_(HTMLElement))),oW=class extends fbe{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),iu)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,r,n,i){this.mutableData=!0}connectedCallback(){Wx()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){ue(ue(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let r=new MutationObserver(()=>{if(t=this.querySelector("template"),t)r.disconnect(),this.render();else throw new Error("dom-bind requires a <template> child")});r.observe(this,{childList:!0});return}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let r=this.root.firstChild;r;r=r.nextSibling)this.__children[this.__children.length]=r;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}};customElements.define("dom-bind",oW);var pbe=f9(mt),d9=class extends pbe{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!UM,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t)}connectedCallback(){if(super.connectedCallback(),Wx()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=ue(ue(this).parentNode);for(let r=0;r<this.__instances.length;r++)this.__attachInstance(r,t)}}__ensureTemplatized(){if(!this.__ctor){let t=this,r=this.template=t._templateInfo?t:this.querySelector("template");if(!r){let i=new MutationObserver(()=>{if(this.querySelector("template"))i.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return i.observe(this,{childList:!0}),!1}let n={};n[this.as]=!0,n[this.indexAs]=!0,n[this.itemsIndexAs]=!0,this.__ctor=tc(r,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:n,forwardHostProp:function(i,o){let a=this.__instances;for(let s=0,l;s<a.length&&(l=a[s]);s++)l.forwardHostProp(i,o)},notifyInstanceProp:function(i,o,a){if(OI(this.as,o)){let s=i[this.itemsIndexAs];o==this.as&&(this.items[s]=a);let l=mp(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,o);this.notifyPath(l,a)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){let r=t,n=this.__getMethodHost();return function(){return n[r].apply(n,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let r=this.__observePaths;for(let n=0;n<r.length;n++)t.indexOf(r[n])===0&&this.__debounceRender(this.__render,this.delay)}}}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,r=0){this.__renderDebouncer=sr.debounce(this.__renderDebouncer,r>0?mo.after(r):li,t.bind(this)),Jl(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ci()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[],r=this.__sortAndFilterItems(t),n=this.__calculateLimit(r.length);this.__updateInstances(t,n,r),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>this.__continueChunking())),this._setRenderedItemCount(this.__instances.length),(!UM||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=n;return this.__filterFn&&(r=r.filter((n,i,o)=>this.__filterFn(t[n],i,o))),this.__sortFn&&r.sort((n,i)=>this.__sortFn(t[n],t[i])),r}__calculateLimit(t){let r=t,n=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(r=Math.min(t,this.initialCount),i=Math.max(r-n,0),this.__chunkCount=i||1):(i=Math.min(Math.max(t-n,0),this.__chunkCount),r=Math.min(n+i,t)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=r<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,r}__continueChunking(){if(this.__shouldMeasureChunk){let t=performance.now()-this.__renderStartTime,r=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*r)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,r,n){let i=this.__itemsIdxToInstIdx={},o;for(o=0;o<r;o++){let a=this.__instances[o],s=n[o],l=t[s];i[s]=o,a?(a._setPendingProperty(this.as,l),a._setPendingProperty(this.indexAs,o),a._setPendingProperty(this.itemsIndexAs,s),a._flushProperties()):this.__insertInstance(l,o,s)}for(let a=this.__instances.length-1;a>=o;a--)this.__detachAndRemoveInstance(a)}__detachInstance(t){let r=this.__instances[t],n=ue(r.root);for(let i=0;i<r.children.length;i++){let o=r.children[i];n.appendChild(o)}return r}__attachInstance(t,r){let n=this.__instances[t];r.insertBefore(n.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,r,n){let i={};return i[this.as]=t,i[this.indexAs]=r,i[this.itemsIndexAs]=n,new this.__ctor(i)}__insertInstance(t,r,n){let i=this.__stampInstance(t,r,n),o=this.__instances[r+1],a=o?o.children[0]:this;return ue(ue(this).parentNode).insertBefore(i.root,a),this.__instances[r]=i,i}_showHideChildren(t){for(let r=0;r<this.__instances.length;r++)this.__instances[r]._showHideChildren(t)}__handleItemPath(t,r){let n=t.slice(6),i=n.indexOf("."),o=i<0?n:n.substring(0,i);if(o==parseInt(o,10)){let a=i<0?"":n.substring(i+1);this.__handleObservedPaths(a);let s=this.__itemsIdxToInstIdx[o],l=this.__instances[s];if(l){let c=this.as+(a?"."+a:"");l._setPendingPropertyOrPath(c,r,!1,!0),l._flushProperties()}return!0}}itemForElement(t){let r=this.modelForElement(t);return r&&r[this.as]}indexForElement(t){let r=this.modelForElement(t);return r&&r[this.indexAs]}modelForElement(t){return p9(this.template,t)}};customElements.define(d9.is,d9);var m9=class extends mt{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=sr.debounce(this.__renderDebouncer,li,()=>this.__render()),Jl(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();let t=ue(this).parentNode;(!t||t.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&!ue(t).host)&&this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Wx()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){let t=this,r=t._templateInfo?t:ue(t).querySelector("template");if(!r){let n=new MutationObserver(()=>{if(ue(this).querySelector("template"))n.disconnect(),this.__render();else throw new Error("dom-if requires a <template> child")});return n.observe(this,{childList:!0}),!1}this.__template=r}return!0}__ensureInstance(){let t=ue(this).parentNode;if(this.__hasInstance()){let r=this.__getInstanceNodes();if(r&&r.length&&ue(this).previousSibling!==r[r.length-1])for(let i=0,o;i<r.length&&(o=r[i]);i++)ue(t).insertBefore(o,this)}else{if(!t||!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){ci()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),(!UM||this.notifyDomChange)&&this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}},aW=class extends m9{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(t){let r=this.__dataHost||this;if(iu&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");let n=r._bindTemplate(this.__template,!0);n.runEffects=(i,o,a)=>{let s=this.__syncInfo;if(this.if)s&&(this.__syncInfo=null,this._showHideChildren(),o=Object.assign(s.changedProps,o)),i(o,a);else if(this.__instance)if(s||(s=this.__syncInfo={runEffects:i,changedProps:{}}),a)for(let l in o){let c=au(l);s.changedProps[c]=this.__dataHost[c]}else Object.assign(s.changedProps,o)},this.__instance=r._stampTemplate(this.__template,n),ue(t).insertBefore(this.__instance,this)}__syncHostProperties(){let t=this.__syncInfo;t&&(this.__syncInfo=null,t.runEffects(t.changedProps,!1))}__teardownInstance(){let t=this.__dataHost||this;this.__instance&&(t._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){let t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,iW(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}},sW=class extends m9{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=tc(this.__template,this,{mutableData:!0,forwardHostProp:function(r,n){this.__instance&&(this.if?this.__instance.forwardHostProp(r,n):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[au(r)]=!0))}})),this.__instance=new this.__ctor,ue(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let r=ue(t[0]).parentNode;if(r){r=ue(r);for(let n=0,i;n<t.length&&(i=t[n]);n++)r.removeChild(i)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let r in t)this.__instance._setPendingProperty(r,this.__dataHost[r]);this.__instance._flushProperties()}}_showHideChildren(){let t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}},jgt=RI?aW:sW;customElements.define(jgt.is,jgt);var dbe=Nn(e=>{let t=Mm(e);class r extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(i,o){let a=o.path;if(a==JSCompiler_renameProperty("items",this)){let s=o.base||[],l=this.__lastItems,c=this.__lastMulti;if(i!==c&&this.clearSelection(),l){let u=o9(s,l);this.__applySplices(u)}this.__lastItems=s,this.__lastMulti=i}else if(o.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(o.value.indexSplices);else{let s=a.slice(`${JSCompiler_renameProperty("items",this)}.`.length),l=parseInt(s,10);s.indexOf(".")<0&&s==l&&this.__deselectChangedIdx(l)}}__applySplices(i){let o=this.__selectedMap;for(let s=0;s<i.length;s++){let l=i[s];o.forEach((c,u)=>{c<l.index||(c>=l.index+l.removed.length?o.set(u,c+l.addedCount-l.removed.length):o.set(u,-1))});for(let c=0;c<l.addedCount;c++){let u=l.index+c;o.has(this.items[u])&&o.set(this.items[u],u)}}this.__updateLinks();let a=0;o.forEach((s,l)=>{s<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),a,1):this.selected=this.selectedItem=null,o.delete(l)):a++})}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let i=0;this.__selectedMap.forEach(o=>{o>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${o}`,`${JSCompiler_renameProperty("selected",this)}.${i++}`)})}else this.__selectedMap.forEach(i=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${i}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${i}`)})}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(i){return this.__selectedMap.has(i)}isIndexSelected(i){return this.isSelected(this.items[i])}__deselectChangedIdx(i){let o=this.__selectedIndexForItemIndex(i);if(o>=0){let a=0;this.__selectedMap.forEach((s,l)=>{o==a++&&this.deselect(l)})}}__selectedIndexForItemIndex(i){let o=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${i}`];if(o)return parseInt(o.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(i){let o=this.__selectedMap.get(i);if(o>=0){this.__selectedMap.delete(i);let a;this.multi&&(a=this.__selectedIndexForItemIndex(o)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),a,1):this.selected=this.selectedItem=null}}deselectIndex(i){this.deselect(this.items[i])}select(i){this.selectIndex(this.items.indexOf(i))}selectIndex(i){let o=this.items[i];this.isSelected(o)?this.toggle&&this.deselectIndex(i):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(o,i),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),o):this.selected=this.selectedItem=o)}}return r});var mbe=dbe(mt),g9=class extends mbe{static get is(){return"array-selector"}static get template(){return null}};customElements.define(g9.is,g9);var _9=new Zl;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,r){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,r){},styleSubtree(e,t){_9.processStyles(),JM(e,t)},styleElement(e){_9.processStyles()},styleDocument(e){_9.processStyles(),JM(document.body,e)},getComputedStyleValue(e,t){return jI(e,t)},flushCustomStyles(){},nativeCss:Nx,nativeShadow:f_,cssBuild:Em,disableRuntime:WI});window.ShadyCSS.CustomStyleInterface=_9;var Xgt="include",gbe=window.ShadyCSS.CustomStyleInterface,lW=class extends HTMLElement{constructor(){super(),this._style=null,gbe.addCustomStyle(this)}getStyle(){if(this._style)return this._style;let t=this.querySelector("style");if(!t)return null;this._style=t;let r=t.getAttribute(Xgt);return r&&(t.removeAttribute(Xgt),t.textContent=imt(r)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}};window.customElements.define("custom-style",lW);var $gt;$gt=Gx._mutablePropertyChange;var Kgt={properties:{mutableData:Boolean},_shouldPropertyChange(e,t,r){return $gt(this,e,t,r,this.mutableData)}};var Oa=Gt(HTMLElement).prototype;var y9=new Set,Qs={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(y9.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){!this.isAttached||(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&e._interestedResizables.indexOf(this)===-1&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){if(this._notifyingDescendant){e.stopPropagation();return}u_||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=zt(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){!this.isAttached||(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(!!this.isAttached)if(document.readyState==="loading"){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function t(){document.removeEventListener("readystatechange",t),e()})}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach(function(t){t!==this&&t._findParent()},this):(y9.forEach(function(t){t!==this&&t._findParent()},this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?y9.delete(this):y9.add(this)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        transition-duration: var(--iron-collapse-transition-duration, 300ms);
        /* Safari 10 needs this property prefixed to correctly apply the custom property */
        -webkit-transition-duration: var(--iron-collapse-transition-duration, 300ms);
        overflow: visible;
      }

      :host(.iron-collapse-closed) {
        display: none;
      }

      :host(:not(.iron-collapse-opened)) {
        overflow: hidden;
      }
    </style>

    <slot></slot>
`,is:"iron-collapse",behaviors:[Qs],properties:{horizontal:{type:Boolean,value:!1,observer:"_horizontalChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},transitioning:{type:Boolean,notify:!0,readOnly:!0},noAnimation:{type:Boolean},_desiredSize:{type:String,value:""}},get dimension(){return this.horizontal?"width":"height"},get _dimensionMax(){return this.horizontal?"maxWidth":"maxHeight"},get _dimensionMaxCss(){return this.horizontal?"max-width":"max-height"},hostAttributes:{role:"group","aria-hidden":"true"},listeners:{transitionend:"_onTransitionEnd"},toggle:function(){this.opened=!this.opened},show:function(){this.opened=!0},hide:function(){this.opened=!1},updateSize:function(e,t){e=e==="auto"?"":e;var r=t&&!this.noAnimation&&this.isAttached&&this._desiredSize!==e;if(this._desiredSize=e,this._updateTransition(!1),r){var n=this._calcSize();e===""&&(this.style[this._dimensionMax]="",e=this._calcSize()),this.style[this._dimensionMax]=n,this.scrollTop=this.scrollTop,this._updateTransition(!0),r=e!==n}this.style[this._dimensionMax]=e,r||this._transitionEnd()},enableTransition:function(e){Oa._warn("`enableTransition()` is deprecated, use `noAnimation` instead."),this.noAnimation=!e},_updateTransition:function(e){this.style.transitionDuration=e&&!this.noAnimation?"":"0s"},_horizontalChanged:function(){this.style.transitionProperty=this._dimensionMaxCss;var e=this._dimensionMax==="maxWidth"?"maxHeight":"maxWidth";this.style[e]="",this.updateSize(this.opened?"auto":"0px",!1)},_openedChanged:function(){this.setAttribute("aria-hidden",!this.opened),this._setTransitioning(!0),this.toggleClass("iron-collapse-closed",!1),this.toggleClass("iron-collapse-opened",!1),this.updateSize(this.opened?"auto":"0px",!0),this.opened&&this.focus()},_transitionEnd:function(){this.style[this._dimensionMax]=this._desiredSize,this.toggleClass("iron-collapse-closed",!this.opened),this.toggleClass("iron-collapse-opened",this.opened),this._updateTransition(!1),this.notifyResize(),this._setTransitioning(!1)},_onTransitionEnd:function(e){zt(e).rootTarget===this&&this._transitionEnd()},_calcSize:function(){return this.getBoundingClientRect()[this.dimension]+"px"}});var Zgt=Q`
/* Most common used flex styles*/
<dom-module id="iron-flex">
  <template>
    <style>
      .layout.horizontal,
      .layout.vertical {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      }

      .layout.inline {
        display: -ms-inline-flexbox;
        display: -webkit-inline-flex;
        display: inline-flex;
      }

      .layout.horizontal {
        -ms-flex-direction: row;
        -webkit-flex-direction: row;
        flex-direction: row;
      }

      .layout.vertical {
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
      }

      .layout.wrap {
        -ms-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
      }

      .layout.no-wrap {
        -ms-flex-wrap: nowrap;
        -webkit-flex-wrap: nowrap;
        flex-wrap: nowrap;
      }

      .layout.center,
      .layout.center-center {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .layout.center-justified,
      .layout.center-center {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      }

      .flex {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      }

      .flex-auto {
        -ms-flex: 1 1 auto;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
      }

      .flex-none {
        -ms-flex: none;
        -webkit-flex: none;
        flex: none;
      }
    </style>
  </template>
</dom-module>
/* Basic flexbox reverse styles */
<dom-module id="iron-flex-reverse">
  <template>
    <style>
      .layout.horizontal-reverse,
      .layout.vertical-reverse {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      }

      .layout.horizontal-reverse {
        -ms-flex-direction: row-reverse;
        -webkit-flex-direction: row-reverse;
        flex-direction: row-reverse;
      }

      .layout.vertical-reverse {
        -ms-flex-direction: column-reverse;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse;
      }

      .layout.wrap-reverse {
        -ms-flex-wrap: wrap-reverse;
        -webkit-flex-wrap: wrap-reverse;
        flex-wrap: wrap-reverse;
      }
    </style>
  </template>
</dom-module>
/* Flexbox alignment */
<dom-module id="iron-flex-alignment">
  <template>
    <style>
      /**
       * Alignment in cross axis.
       */
      .layout.start {
        -ms-flex-align: start;
        -webkit-align-items: flex-start;
        align-items: flex-start;
      }

      .layout.center,
      .layout.center-center {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .layout.end {
        -ms-flex-align: end;
        -webkit-align-items: flex-end;
        align-items: flex-end;
      }

      .layout.baseline {
        -ms-flex-align: baseline;
        -webkit-align-items: baseline;
        align-items: baseline;
      }

      /**
       * Alignment in main axis.
       */
      .layout.start-justified {
        -ms-flex-pack: start;
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
      }

      .layout.center-justified,
      .layout.center-center {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      }

      .layout.end-justified {
        -ms-flex-pack: end;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
      }

      .layout.around-justified {
        -ms-flex-pack: distribute;
        -webkit-justify-content: space-around;
        justify-content: space-around;
      }

      .layout.justified {
        -ms-flex-pack: justify;
        -webkit-justify-content: space-between;
        justify-content: space-between;
      }

      /**
       * Self alignment.
       */
      .self-start {
        -ms-align-self: flex-start;
        -webkit-align-self: flex-start;
        align-self: flex-start;
      }

      .self-center {
        -ms-align-self: center;
        -webkit-align-self: center;
        align-self: center;
      }

      .self-end {
        -ms-align-self: flex-end;
        -webkit-align-self: flex-end;
        align-self: flex-end;
      }

      .self-stretch {
        -ms-align-self: stretch;
        -webkit-align-self: stretch;
        align-self: stretch;
      }

      .self-baseline {
        -ms-align-self: baseline;
        -webkit-align-self: baseline;
        align-self: baseline;
      }

      /**
       * multi-line alignment in main axis.
       */
      .layout.start-aligned {
        -ms-flex-line-pack: start;  /* IE10 */
        -ms-align-content: flex-start;
        -webkit-align-content: flex-start;
        align-content: flex-start;
      }

      .layout.end-aligned {
        -ms-flex-line-pack: end;  /* IE10 */
        -ms-align-content: flex-end;
        -webkit-align-content: flex-end;
        align-content: flex-end;
      }

      .layout.center-aligned {
        -ms-flex-line-pack: center;  /* IE10 */
        -ms-align-content: center;
        -webkit-align-content: center;
        align-content: center;
      }

      .layout.between-aligned {
        -ms-flex-line-pack: justify;  /* IE10 */
        -ms-align-content: space-between;
        -webkit-align-content: space-between;
        align-content: space-between;
      }

      .layout.around-aligned {
        -ms-flex-line-pack: distribute;  /* IE10 */
        -ms-align-content: space-around;
        -webkit-align-content: space-around;
        align-content: space-around;
      }
    </style>
  </template>
</dom-module>
/* Non-flexbox positioning helper styles */
<dom-module id="iron-flex-factors">
  <template>
    <style>
      .flex,
      .flex-1 {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      }

      .flex-2 {
        -ms-flex: 2;
        -webkit-flex: 2;
        flex: 2;
      }

      .flex-3 {
        -ms-flex: 3;
        -webkit-flex: 3;
        flex: 3;
      }

      .flex-4 {
        -ms-flex: 4;
        -webkit-flex: 4;
        flex: 4;
      }

      .flex-5 {
        -ms-flex: 5;
        -webkit-flex: 5;
        flex: 5;
      }

      .flex-6 {
        -ms-flex: 6;
        -webkit-flex: 6;
        flex: 6;
      }

      .flex-7 {
        -ms-flex: 7;
        -webkit-flex: 7;
        flex: 7;
      }

      .flex-8 {
        -ms-flex: 8;
        -webkit-flex: 8;
        flex: 8;
      }

      .flex-9 {
        -ms-flex: 9;
        -webkit-flex: 9;
        flex: 9;
      }

      .flex-10 {
        -ms-flex: 10;
        -webkit-flex: 10;
        flex: 10;
      }

      .flex-11 {
        -ms-flex: 11;
        -webkit-flex: 11;
        flex: 11;
      }

      .flex-12 {
        -ms-flex: 12;
        -webkit-flex: 12;
        flex: 12;
      }
    </style>
  </template>
</dom-module>
<dom-module id="iron-positioning">
  <template>
    <style>
      .block {
        display: block;
      }

      [hidden] {
        display: none !important;
      }

      .invisible {
        visibility: hidden !important;
      }

      .relative {
        position: relative;
      }

      .fit {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      }

      body.fullbleed {
        margin: 0;
        height: 100vh;
      }

      .scroll {
        -webkit-overflow-scrolling: touch;
        overflow: auto;
      }

      /* fixed position */
      .fixed-bottom,
      .fixed-left,
      .fixed-right,
      .fixed-top {
        position: fixed;
      }

      .fixed-top {
        top: 0;
        left: 0;
        right: 0;
      }

      .fixed-right {
        top: 0;
        right: 0;
        bottom: 0;
      }

      .fixed-bottom {
        right: 0;
        bottom: 0;
        left: 0;
      }

      .fixed-left {
        top: 0;
        bottom: 0;
        left: 0;
      }
    </style>
  </template>
</dom-module>
`;Zgt.setAttribute("style","display: none;");document.head.appendChild(Zgt.content);var Jgt=Q`
<custom-style>
  <style is="custom-style">
    [hidden] {
      display: none !important;
    }
  </style>
</custom-style>
<custom-style>
  <style is="custom-style">
    html {

      --layout: {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      };

      --layout-inline: {
        display: -ms-inline-flexbox;
        display: -webkit-inline-flex;
        display: inline-flex;
      };

      --layout-horizontal: {
        @apply --layout;

        -ms-flex-direction: row;
        -webkit-flex-direction: row;
        flex-direction: row;
      };

      --layout-horizontal-reverse: {
        @apply --layout;

        -ms-flex-direction: row-reverse;
        -webkit-flex-direction: row-reverse;
        flex-direction: row-reverse;
      };

      --layout-vertical: {
        @apply --layout;

        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
      };

      --layout-vertical-reverse: {
        @apply --layout;

        -ms-flex-direction: column-reverse;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse;
      };

      --layout-wrap: {
        -ms-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
      };

      --layout-wrap-reverse: {
        -ms-flex-wrap: wrap-reverse;
        -webkit-flex-wrap: wrap-reverse;
        flex-wrap: wrap-reverse;
      };

      --layout-flex-auto: {
        -ms-flex: 1 1 auto;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
      };

      --layout-flex-none: {
        -ms-flex: none;
        -webkit-flex: none;
        flex: none;
      };

      --layout-flex: {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      };

      --layout-flex-2: {
        -ms-flex: 2;
        -webkit-flex: 2;
        flex: 2;
      };

      --layout-flex-3: {
        -ms-flex: 3;
        -webkit-flex: 3;
        flex: 3;
      };

      --layout-flex-4: {
        -ms-flex: 4;
        -webkit-flex: 4;
        flex: 4;
      };

      --layout-flex-5: {
        -ms-flex: 5;
        -webkit-flex: 5;
        flex: 5;
      };

      --layout-flex-6: {
        -ms-flex: 6;
        -webkit-flex: 6;
        flex: 6;
      };

      --layout-flex-7: {
        -ms-flex: 7;
        -webkit-flex: 7;
        flex: 7;
      };

      --layout-flex-8: {
        -ms-flex: 8;
        -webkit-flex: 8;
        flex: 8;
      };

      --layout-flex-9: {
        -ms-flex: 9;
        -webkit-flex: 9;
        flex: 9;
      };

      --layout-flex-10: {
        -ms-flex: 10;
        -webkit-flex: 10;
        flex: 10;
      };

      --layout-flex-11: {
        -ms-flex: 11;
        -webkit-flex: 11;
        flex: 11;
      };

      --layout-flex-12: {
        -ms-flex: 12;
        -webkit-flex: 12;
        flex: 12;
      };

      /* alignment in cross axis */

      --layout-start: {
        -ms-flex-align: start;
        -webkit-align-items: flex-start;
        align-items: flex-start;
      };

      --layout-center: {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      };

      --layout-end: {
        -ms-flex-align: end;
        -webkit-align-items: flex-end;
        align-items: flex-end;
      };

      --layout-baseline: {
        -ms-flex-align: baseline;
        -webkit-align-items: baseline;
        align-items: baseline;
      };

      /* alignment in main axis */

      --layout-start-justified: {
        -ms-flex-pack: start;
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
      };

      --layout-center-justified: {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      };

      --layout-end-justified: {
        -ms-flex-pack: end;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
      };

      --layout-around-justified: {
        -ms-flex-pack: distribute;
        -webkit-justify-content: space-around;
        justify-content: space-around;
      };

      --layout-justified: {
        -ms-flex-pack: justify;
        -webkit-justify-content: space-between;
        justify-content: space-between;
      };

      --layout-center-center: {
        @apply --layout-center;
        @apply --layout-center-justified;
      };

      /* self alignment */

      --layout-self-start: {
        -ms-align-self: flex-start;
        -webkit-align-self: flex-start;
        align-self: flex-start;
      };

      --layout-self-center: {
        -ms-align-self: center;
        -webkit-align-self: center;
        align-self: center;
      };

      --layout-self-end: {
        -ms-align-self: flex-end;
        -webkit-align-self: flex-end;
        align-self: flex-end;
      };

      --layout-self-stretch: {
        -ms-align-self: stretch;
        -webkit-align-self: stretch;
        align-self: stretch;
      };

      --layout-self-baseline: {
        -ms-align-self: baseline;
        -webkit-align-self: baseline;
        align-self: baseline;
      };

      /* multi-line alignment in main axis */

      --layout-start-aligned: {
        -ms-flex-line-pack: start;  /* IE10 */
        -ms-align-content: flex-start;
        -webkit-align-content: flex-start;
        align-content: flex-start;
      };

      --layout-end-aligned: {
        -ms-flex-line-pack: end;  /* IE10 */
        -ms-align-content: flex-end;
        -webkit-align-content: flex-end;
        align-content: flex-end;
      };

      --layout-center-aligned: {
        -ms-flex-line-pack: center;  /* IE10 */
        -ms-align-content: center;
        -webkit-align-content: center;
        align-content: center;
      };

      --layout-between-aligned: {
        -ms-flex-line-pack: justify;  /* IE10 */
        -ms-align-content: space-between;
        -webkit-align-content: space-between;
        align-content: space-between;
      };

      --layout-around-aligned: {
        -ms-flex-line-pack: distribute;  /* IE10 */
        -ms-align-content: space-around;
        -webkit-align-content: space-around;
        align-content: space-around;
      };

      /*******************************
                Other Layout
      *******************************/

      --layout-block: {
        display: block;
      };

      --layout-invisible: {
        visibility: hidden !important;
      };

      --layout-relative: {
        position: relative;
      };

      --layout-fit: {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      };

      --layout-scroll: {
        -webkit-overflow-scrolling: touch;
        overflow: auto;
      };

      --layout-fullbleed: {
        margin: 0;
        height: 100vh;
      };

      /* fixed position */

      --layout-fixed-top: {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
      };

      --layout-fixed-right: {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
      };

      --layout-fixed-bottom: {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
      };

      --layout-fixed-left: {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
      };

    }
  </style>
</custom-style>`;Jgt.setAttribute("style","display: none;");document.head.appendChild(Jgt.content);var Qgt=document.createElement("style");Qgt.textContent="[hidden] { display: none !important; }";document.head.appendChild(Qgt);var go=class{constructor(t){go[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}get value(){var t=this.type,r=this.key;if(t&&r)return go.types[t]&&go.types[t][r]}set value(t){var r=this.type,n=this.key;r&&n&&(r=go.types[r]=go.types[r]||{},t==null?delete r[n]:r[n]=t)}get list(){var t=this.type;if(t){var r=go.types[this.type];return r?Object.keys(r).map(function(n){return _be[this.type][n]},this):[]}}byKey(t){return this.key=t,this.value}};go[" "]=function(){};go.types={};var _be=go.types;Yt({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,r){var n=new go({type:e,key:t});return r!==void 0&&r!==n.value?n.value=r:this.value!==n.value&&(this.value=n.value),n},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new go({type:this.type,key:e}).value}});Yt({_template:Q`
    <style>
      :host {
        @apply --layout-inline;
        @apply --layout-center-center;
        position: relative;

        vertical-align: middle;

        fill: var(--iron-icon-fill-color, currentcolor);
        stroke: var(--iron-icon-stroke-color, none);

        width: var(--iron-icon-width, 24px);
        height: var(--iron-icon-height, 24px);
        @apply --iron-icon;
      }

      :host([hidden]) {
        display: none;
      }
    </style>
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Oa.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&zt(this.root).removeChild(this._img),this._iconName===""?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,zt(this.root).appendChild(this._img))}});Yt({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new go({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){this.removeIcon(e);var r=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(r){var n=zt(e.root||e);return n.insertBefore(r,n.childNodes[0]),e._svgIcon=r}return null},removeIcon:function(e){e._svgIcon&&(zt(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(this.__targetIsRTL==null)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL=t.getAttribute("dir")==="rtl"}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&window.getComputedStyle(e).direction==="rtl";return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return zt(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,r){if(e){var n=e.cloneNode(!0),i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=n.getAttribute("viewBox")||"0 0 "+t+" "+t,a="pointer-events: none; display: block; width: 100%; height: 100%;";return r&&n.hasAttribute("mirror-in-rtl")&&(a+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),i.setAttribute("viewBox",o),i.setAttribute("preserveAspectRatio","xMidYMid meet"),i.setAttribute("focusable","false"),i.style.cssText=a,i.appendChild(n).removeAttribute("id"),i}return null}});var ybe=Q`<iron-iconset-svg name="image" size="24">
<svg><defs>
<g id="add-a-photo"><path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-3.2-5c0 1.77 1.43 3.2 3.2 3.2s3.2-1.43 3.2-3.2-1.43-3.2-3.2-3.2-3.2 1.43-3.2 3.2z"></path></g>
<g id="add-to-photos"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"></path></g>
<g id="adjust"><path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"></path></g>
<g id="assistant"><path d="M19 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5.12 10.88L12 17l-1.88-4.12L6 11l4.12-1.88L12 5l1.88 4.12L18 11l-4.12 1.88z"></path></g>
<g id="assistant-photo"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"></path></g>
<g id="audiotrack"><path d="M12 3v9.28c-.47-.17-.97-.28-1.5-.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z"></path></g>
<g id="blur-circular"><path d="M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"></path></g>
<g id="blur-linear"><path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zM3 21h18v-2H3v2zM5 9.5c.83 0 1.5-.67 1.5-1.5S5.83 6.5 5 6.5 3.5 7.17 3.5 8 4.17 9.5 5 9.5zm0 4c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 17c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8-.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM3 3v2h18V3H3zm14 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm0 4c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM13 9c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z"></path></g>
<g id="blur-off"><path d="M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-.2 4.48l.2.02c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5l.02.2c.09.67.61 1.19 1.28 1.28zM14 3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-4 0c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm11 7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 8c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-4 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM2.5 5.27l3.78 3.78L6 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l2.81 2.81c-.71.11-1.25.73-1.25 1.47 0 .83.67 1.5 1.5 1.5.74 0 1.36-.54 1.47-1.25l2.81 2.81c-.09-.03-.18-.06-.28-.06-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l3.78 3.78L20 20.23 3.77 4 2.5 5.27zM10 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm11-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 11c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"></path></g>
<g id="blur-on"><path d="M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path></g>
<g id="brightness-1"><circle cx="12" cy="12" r="10"></circle></g>
<g id="brightness-2"><path d="M10 2c-1.82 0-3.53.5-5 1.35C7.99 5.08 10 8.3 10 12s-2.01 6.92-5 8.65C6.47 21.5 8.18 22 10 22c5.52 0 10-4.48 10-10S15.52 2 10 2z"></path></g>
<g id="brightness-3"><path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"></path></g>
<g id="brightness-4"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"></path></g>
<g id="brightness-5"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"></path></g>
<g id="brightness-6"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"></path></g>
<g id="brightness-7"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"></path></g>
<g id="broken-image"><path d="M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"></path></g>
<g id="brush"><path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41z"></path></g>
<g id="burst-mode"><path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"></path></g>
<g id="camera"><path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4.76 8.25C21 16.97 22 14.61 22 12c0-.69-.07-1.35-.2-2zM8.54 12l-3.9-6.75C3.01 7.03 2 9.39 2 12c0 .69.07 1.35.2 2h7.49l-1.15-2zm-6.08 3c.92 2.92 3.15 5.26 6 6.34L12.12 15H2.46zm11.27 0l-3.9 6.76c.7.15 1.42.24 2.17.24 2.4 0 4.6-.85 6.32-2.25l-3.66-6.35-.93 1.6z"></path></g>
<g id="camera-alt"><circle cx="12" cy="12" r="3.2"></circle><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="camera-front"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM7 2h10v10.5c0-1.67-3.33-2.5-5-2.5s-5 .83-5 2.5V2z"></path></g>
<g id="camera-rear"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-2 2 .9 2 2C14 5.1 13.1 6 12 6z"></path></g>
<g id="camera-roll"><path d="M14 5c0-1.1-.9-2-2-2h-1V2c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2h8V5h-8zm-2 13h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2z"></path></g>
<g id="center-focus-strong"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"></path></g>
<g id="center-focus-weak"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="collections"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"></path></g>
<g id="collections-bookmark"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z"></path></g>
<g id="color-lens"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="colorize"><path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"></path></g>
<g id="compare"><path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="control-point"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="control-point-duplicate"><path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 12zm13-9c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"></path></g>
<g id="crop"><path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"></path></g>
<g id="crop-16-9"><path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"></path></g>
<g id="crop-3-2"><path d="M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H5V6h14v12z"></path></g>
<g id="crop-5-4"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"></path></g>
<g id="crop-7-5"><path d="M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"></path></g>
<g id="crop-din"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="crop-free"><path d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="crop-landscape"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"></path></g>
<g id="crop-original"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"></path></g>
<g id="crop-portrait"><path d="M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"></path></g>
<g id="crop-rotate"><path d="M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"></path></g>
<g id="crop-square"><path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"></path></g>
<g id="dehaze"><path d="M2 15.5v2h20v-2H2zm0-5v2h20v-2H2zm0-5v2h20v-2H2z"></path></g>
<g id="details"><path d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z"></path></g>
<g id="edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></g>
<g id="exposure"><path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"></path></g>
<g id="exposure-neg-1"><path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"></path></g>
<g id="exposure-neg-2"><path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H21v-1.71h-5.95zM2 11v2h8v-2H2z"></path></g>
<g id="exposure-plus-1"><path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z"></path></g>
<g id="exposure-plus-2"><path d="M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z"></path></g>
<g id="exposure-zero"><path d="M16.14 12.5c0 1-.1 1.85-.3 2.55-.2.7-.48 1.27-.83 1.7-.36.44-.79.75-1.3.95-.51.2-1.07.3-1.7.3-.62 0-1.18-.1-1.69-.3-.51-.2-.95-.51-1.31-.95-.36-.44-.65-1.01-.85-1.7-.2-.7-.3-1.55-.3-2.55v-2.04c0-1 .1-1.85.3-2.55.2-.7.48-1.26.84-1.69.36-.43.8-.74 1.31-.93C10.81 5.1 11.38 5 12 5c.63 0 1.19.1 1.7.29.51.19.95.5 1.31.93.36.43.64.99.84 1.69.2.7.3 1.54.3 2.55v2.04zm-2.11-2.36c0-.64-.05-1.18-.13-1.62-.09-.44-.22-.79-.4-1.06-.17-.27-.39-.46-.64-.58-.25-.13-.54-.19-.86-.19-.32 0-.61.06-.86.18s-.47.31-.64.58c-.17.27-.31.62-.4 1.06s-.13.98-.13 1.62v2.67c0 .64.05 1.18.14 1.62.09.45.23.81.4 1.09s.39.48.64.61.54.19.87.19c.33 0 .62-.06.87-.19s.46-.33.63-.61c.17-.28.3-.64.39-1.09.09-.45.13-.99.13-1.62v-2.66z"></path></g>
<g id="filter"><path d="M15.96 10.29l-2.75 3.54-1.96-2.36L8.5 15h11l-3.54-4.71zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-1"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-2"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"></path></g>
<g id="filter-3"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"></path></g>
<g id="filter-4"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-5"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"></path></g>
<g id="filter-6"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2c0-1.11-.9-2-2-2h-2V7h4V5h-4c-1.1 0-2 .89-2 2v6c0 1.11.9 2 2 2zm0-4h2v2h-2v-2z"></path></g>
<g id="filter-7"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2l4-8V5h-6v2h4l-4 8h2z"></path></g>
<g id="filter-8"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-2c-1.1 0-2 .89-2 2v1.5c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5V13c0 1.11.9 2 2 2zm0-8h2v2h-2V7zm0 4h2v2h-2v-2z"></path></g>
<g id="filter-9"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM15 5h-2c-1.1 0-2 .89-2 2v2c0 1.11.9 2 2 2h2v2h-4v2h4c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2zm0 4h-2V7h2v2z"></path></g>
<g id="filter-9-plus"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 8h-2V7h-2v2h-2v2h2v2h2v-2h2v6H7V3h14v6z"></path></g>
<g id="filter-b-and-w"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"></path></g>
<g id="filter-center-focus"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="filter-drama"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4h2c0-2.76-1.86-5.08-4.4-5.78C8.61 6.88 10.2 6 12 6c3.03 0 5.5 2.47 5.5 5.5v.5H19c1.65 0 3 1.35 3 3s-1.35 3-3 3z"></path></g>
<g id="filter-frames"><path d="M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM18 8H6v10h12"></path></g>
<g id="filter-hdr"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"></path></g>
<g id="filter-none"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-tilt-shift"><path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1c.86 1.11 1.44 2.44 1.62 3.9zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43c1.21-1.48 2.01-3.32 2.21-5.32h-2.02c-.18 1.45-.76 2.78-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43z"></path></g>
<g id="filter-vintage"><path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path></g>
<g id="flare"><path d="M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24l2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71l1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"></path></g>
<g id="flash-auto"><path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"></path></g>
<g id="flash-off"><path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"></path></g>
<g id="flash-on"><path d="M7 2v11h3v9l7-12h-4l4-8z"></path></g>
<g id="flip"><path d="M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"></path></g>
<g id="gradient"><path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"></path></g>
<g id="grain"><path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="grid-off"><path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27L1.27 1.27zM10 12.55L11.45 14H10v-1.45zm-6-6L5.45 8H4V6.55zM8 20H4v-4h4v4zm0-6H4v-4h3.45l.55.55V14zm6 6h-4v-4h3.45l.55.54V20zm2 0v-1.46L17.46 20H16z"></path></g>
<g id="grid-on"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"></path></g>
<g id="hdr-off"><path d="M17.5 15v-2h1.1l.9 2H21l-.9-2.1c.5-.2.9-.8.9-1.4v-1c0-.8-.7-1.5-1.5-1.5H16v4.9l1.1 1.1h.4zm0-4.5h2v1h-2v-1zm-4.5 0v.4l1.5 1.5v-1.9c0-.8-.7-1.5-1.5-1.5h-1.9l1.5 1.5h.4zm-3.5-1l-7-7-1.1 1L6.9 9h-.4v2h-2V9H3v6h1.5v-2.5h2V15H8v-4.9l1.5 1.5V15h3.4l7.6 7.6 1.1-1.1-12.1-12z"></path></g>
<g id="hdr-on"><path d="M21 11.5v-1c0-.8-.7-1.5-1.5-1.5H16v6h1.5v-2h1.1l.9 2H21l-.9-2.1c.5-.3.9-.8.9-1.4zm-1.5 0h-2v-1h2v1zm-13-.5h-2V9H3v6h1.5v-2.5h2V15H8V9H6.5v2zM13 9H9.5v6H13c.8 0 1.5-.7 1.5-1.5v-3c0-.8-.7-1.5-1.5-1.5zm0 4.5h-2v-3h2v3z"></path></g>
<g id="hdr-strong"><path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="hdr-weak"><path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path></g>
<g id="healing"><path d="M17.73 12.02l3.98-3.98c.39-.39.39-1.02 0-1.41l-4.34-4.34c-.39-.39-1.02-.39-1.41 0l-3.98 3.98L8 2.29C7.8 2.1 7.55 2 7.29 2c-.25 0-.51.1-.7.29L2.25 6.63c-.39.39-.39 1.02 0 1.41l3.98 3.98L2.25 16c-.39.39-.39 1.02 0 1.41l4.34 4.34c.39.39 1.02.39 1.41 0l3.98-3.98 3.98 3.98c.2.2.45.29.71.29.26 0 .51-.1.71-.29l4.34-4.34c.39-.39.39-1.02 0-1.41l-3.99-3.98zM12 9c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-4.71 1.96L3.66 7.34l3.63-3.63 3.62 3.62-3.62 3.63zM10 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2-4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2.66 9.34l-3.63-3.62 3.63-3.63 3.62 3.62-3.62 3.63z"></path></g>
<g id="image"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path></g>
<g id="image-aspect-ratio"><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"></path></g>
<g id="iso"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"></path></g>
<g id="landscape"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"></path></g>
<g id="leak-add"><path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-6.07 0-11 4.93-11 11zm8 0h3v-3c-1.66 0-3 1.34-3 3zm-4 0h2c0-2.76 2.24-5 5-5v-2c-3.87 0-7 3.13-7 7z"></path></g>
<g id="leak-remove"><path d="M10 3H8c0 .37-.04.72-.12 1.06l1.59 1.59C9.81 4.84 10 3.94 10 3zM3 4.27l2.84 2.84C5.03 7.67 4.06 8 3 8v2c1.61 0 3.09-.55 4.27-1.46L8.7 9.97C7.14 11.24 5.16 12 3 12v2c2.71 0 5.19-.99 7.11-2.62l2.5 2.5C10.99 15.81 10 18.29 10 21h2c0-2.16.76-4.14 2.03-5.69l1.43 1.43C14.55 17.91 14 19.39 14 21h2c0-1.06.33-2.03.89-2.84L19.73 21 21 19.73 4.27 3 3 4.27zM14 3h-2c0 1.5-.37 2.91-1.02 4.16l1.46 1.46C13.42 6.98 14 5.06 14 3zm5.94 13.12c.34-.08.69-.12 1.06-.12v-2c-.94 0-1.84.19-2.66.52l1.6 1.6zm-4.56-4.56l1.46 1.46C18.09 12.37 19.5 12 21 12v-2c-2.06 0-3.98.58-5.62 1.56z"></path></g>
<g id="lens"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"></path></g>
<g id="linked-camera"><circle cx="12" cy="14" r="3.2"></circle><path d="M16 3.33c2.58 0 4.67 2.09 4.67 4.67H22c0-3.31-2.69-6-6-6v1.33M16 6c1.11 0 2 .89 2 2h1.33c0-1.84-1.49-3.33-3.33-3.33V6"></path><path d="M17 9c0-1.11-.89-2-2-2V4H9L7.17 6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9h-5zm-5 10c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="looks"><path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-11z"></path></g>
<g id="looks-3"><path d="M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4c1.1 0 2 .89 2 2v1.5z"></path></g>
<g id="looks-4"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"></path></g>
<g id="looks-5"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2H9v-2h4v-2H9V7h6v2z"></path></g>
<g id="looks-6"><path d="M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2h-2c-1.1 0-2-.89-2-2V9c0-1.11.9-2 2-2h4v2z"></path></g>
<g id="looks-one"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"></path></g>
<g id="looks-two"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z"></path></g>
<g id="loupe"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="monochrome-photos"><path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3-6c0-2.8-2.2-5-5-5v1.8c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2V18c2.8 0 5-2.2 5-5zm-8.2 0c0 1.8 1.4 3.2 3.2 3.2V9.8c-1.8 0-3.2 1.4-3.2 3.2z"></path></g>
<g id="movie-creation"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"></path></g>
<g id="movie-filter"><path d="M18 4l2 3h-3l-2-3h-2l2 3h-3l-2-3H8l2 3H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4zm-6.75 11.25L10 18l-1.25-2.75L6 14l2.75-1.25L10 10l1.25 2.75L14 14l-2.75 1.25zm5.69-3.31L16 14l-.94-2.06L13 11l2.06-.94L16 8l.94 2.06L19 11l-2.06.94z"></path></g>
<g id="music-note"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"></path></g>
<g id="nature"><path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"></path></g>
<g id="nature-people"><path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 6.17-3.36 6.17-6.95zM4.5 11c.83 0 1.5-.67 1.5-1.5S5.33 8 4.5 8 3 8.67 3 9.5 3.67 11 4.5 11z"></path></g>
<g id="navigate-before"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="navigate-next"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
<g id="palette"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="panorama"><path d="M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"></path></g>
<g id="panorama-fish-eye"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="panorama-horizontal"><path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C18.18 5.16 15.09 5.7 12 5.7c-3.09 0-6.18-.55-9.12-1.64-.11-.04-.22-.06-.31-.06-.34 0-.57.23-.57.63v14.75c0 .39.23.62.57.62.1 0 .2-.02.31-.06 2.94-1.1 6.03-1.64 9.12-1.64 3.09 0 6.18.55 9.12 1.64.11.04.21.06.31.06.33 0 .57-.23.57-.63V4.63c0-.4-.24-.63-.57-.63z"></path></g>
<g id="panorama-vertical"><path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02.2.06.31C5.16 5.82 5.71 8.91 5.71 12c0 3.09-.55 6.18-1.64 9.12-.05.11-.07.22-.07.31 0 .33.23.57.63.57h14.75c.39 0 .63-.24.63-.57-.01-.1-.03-.2-.07-.31zM6.54 20c.77-2.6 1.16-5.28 1.16-8 0-2.72-.39-5.4-1.16-8h10.91c-.77 2.6-1.16 5.28-1.16 8 0 2.72.39 5.4 1.16 8H6.54z"></path></g>
<g id="panorama-wide-angle"><path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12c0-1.78.24-3.58.71-5.36C7.29 6.2 9.55 6 12 6m0-2c-2.73 0-5.22.24-7.95.72l-.93.16-.25.9C2.29 7.85 2 9.93 2 12s.29 4.15.87 6.22l.25.89.93.16c2.73.49 5.22.73 7.95.73s5.22-.24 7.95-.72l.93-.16.25-.89c.58-2.08.87-4.16.87-6.23s-.29-4.15-.87-6.22l-.25-.89-.93-.16C17.22 4.24 14.73 4 12 4z"></path></g>
<g id="photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path></g>
<g id="photo-album"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4zm0 15l3-3.86 2.14 2.58 3-3.86L18 19H6z"></path></g>
<g id="photo-camera"><circle cx="12" cy="12" r="3.2"></circle><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="photo-filter"><path d="M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12z"></path></g>
<g id="photo-library"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"></path></g>
<g id="photo-size-select-actual"><path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zM5 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"></path></g>
<g id="photo-size-select-large"><path d="M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8l2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"></path></g>
<g id="photo-size-select-small"><path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H1v2h2V7zm12 12h-2v2h2v-2zm4-16h-2v2h2V3zm0 16h-2v2h2v-2zM3 3C2 3 1 4 1 5h2V3zm0 8H1v2h2v-2zm8-8H9v2h2V3zM7 3H5v2h2V3z"></path></g>
<g id="picture-as-pdf"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"></path></g>
<g id="portrait"><path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="remove-red-eye"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="rotate-90-degrees-ccw"><path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05 2.73 2.73 2.73 7.17 0 9.9C16.58 19.32 14.79 20 13 20c-.97 0-1.94-.21-2.84-.61l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64 3.52-3.51 3.52-9.21 0-12.72z"></path></g>
<g id="rotate-left"><path d="M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"></path></g>
<g id="rotate-right"><path d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"></path></g>
<g id="slideshow"><path d="M10 8v8l5-4-5-4zm9-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="straighten"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"></path></g>
<g id="style"><path d="M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zM7.88 8.75c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-2 11c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"></path></g>
<g id="switch-camera"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"></path></g>
<g id="switch-video"><path d="M18 9.5V6c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3.5l4 4v-13l-4 4zm-5 6V13H7v2.5L3.5 12 7 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"></path></g>
<g id="tag-faces"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"></path></g>
<g id="texture"><path d="M19.51 3.08L3.08 19.51c.09.34.27.65.51.9.25.24.56.42.9.51L20.93 4.49c-.19-.69-.73-1.23-1.42-1.41zM11.88 3L3 11.88v2.83L14.71 3h-2.83zM5 3c-1.1 0-2 .9-2 2v2l4-4H5zm14 18c.55 0 1.05-.22 1.41-.59.37-.36.59-.86.59-1.41v-2l-4 4h2zm-9.71 0h2.83L21 12.12V9.29L9.29 21z"></path></g>
<g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="timer"><path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g>
<g id="timer-10"><path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39 0-.14.03-.28.09-.41.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59C21.49 9.07 21 9 20.46 9c-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.69.23.96c.15.28.36.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02zm-9.96-7.32c-.34-.4-.75-.7-1.23-.88-.47-.18-1.01-.27-1.59-.27-.58 0-1.11.09-1.59.27-.48.18-.89.47-1.23.88-.34.41-.6.93-.79 1.59-.18.65-.28 1.45-.28 2.39v1.92c0 .94.09 1.74.28 2.39.19.66.45 1.19.8 1.6.34.41.75.71 1.23.89.48.18 1.01.28 1.59.28.59 0 1.12-.09 1.59-.28.48-.18.88-.48 1.22-.89.34-.41.6-.94.78-1.6.18-.65.28-1.45.28-2.39v-1.92c0-.94-.09-1.74-.28-2.39-.18-.66-.44-1.19-.78-1.59zm-.92 6.17c0 .6-.04 1.11-.12 1.53-.08.42-.2.76-.36 1.02-.16.26-.36.45-.59.57-.23.12-.51.18-.82.18-.3 0-.58-.06-.82-.18s-.44-.31-.6-.57c-.16-.26-.29-.6-.38-1.02-.09-.42-.13-.93-.13-1.53v-2.5c0-.6.04-1.11.13-1.52.09-.41.21-.74.38-1 .16-.25.36-.43.6-.55.24-.11.51-.17.81-.17.31 0 .58.06.81.17.24.11.44.29.6.55.16.25.29.58.37.99.08.41.13.92.13 1.52v2.51z"></path></g>
<g id="timer-3"><path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.04-.28-1.46-.18-.42-.44-.77-.78-1.06-.33-.28-.73-.5-1.2-.64-.45-.13-.97-.2-1.53-.2-.55 0-1.06.08-1.52.24-.47.17-.87.4-1.2.69-.33.29-.6.63-.78 1.03-.2.39-.29.83-.29 1.29h1.98c0-.26.05-.49.14-.69.09-.2.22-.38.38-.52.17-.14.36-.25.58-.33.22-.08.46-.12.73-.12.61 0 1.06.16 1.36.47.3.31.44.75.44 1.32 0 .27-.04.52-.12.74-.08.22-.21.41-.38.57-.17.16-.38.28-.63.37-.25.09-.55.13-.89.13H6.72v1.57H7.9c.34 0 .64.04.91.11.27.08.5.19.69.35.19.16.34.36.44.61.1.24.16.54.16.87 0 .62-.18 1.09-.53 1.42-.35.33-.84.49-1.45.49-.29 0-.56-.04-.8-.13-.24-.08-.44-.2-.61-.36-.17-.16-.3-.34-.39-.56-.09-.22-.14-.46-.14-.72H4.19c0 .55.11 1.03.32 1.45.21.42.5.77.86 1.05s.77.49 1.24.63.96.21 1.48.21c.57 0 1.09-.08 1.58-.23.49-.15.91-.38 1.26-.68.36-.3.64-.66.84-1.1.2-.43.3-.93.3-1.48 0-.29-.04-.58-.11-.86-.08-.25-.19-.51-.35-.76zm9.26 1.4c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39s.03-.28.09-.41c.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59-.43-.15-.92-.22-1.46-.22-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.68.23.96c.15.28.37.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02z"></path></g>
<g id="timer-off"><path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z"></path></g>
<g id="tonality"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"></path></g>
<g id="transform"><path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"></path></g>
<g id="tune"><path d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"></path></g>
<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z"></path></g>
<g id="view-compact"><path d="M3 19h6v-7H3v7zm7 0h12v-7H10v7zM3 5v6h19V5H3z"></path></g>
<g id="vignette"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"></path></g>
<g id="wb-auto"><path d="M6.85 12.65h2.3L8 9l-1.15 3.65zM22 7l-1.2 6.29L19.3 7h-1.6l-1.49 6.29L15 7h-.76C12.77 5.17 10.53 4 8 4c-4.42 0-8 3.58-8 8s3.58 8 8 8c3.13 0 5.84-1.81 7.15-4.43l.1.43H17l1.5-6.1L20 16h1.75l2.05-9H22zm-11.7 9l-.7-2H6.4l-.7 2H3.8L7 7h2l3.2 9h-1.9z"></path></g>
<g id="wb-cloudy"><path d="M19.36 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.64-4.96z"></path></g>
<g id="wb-incandescent"><path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z"></path></g>
<g id="wb-iridescent"><path d="M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z"></path></g>
<g id="wb-sunny"><path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(ybe.content);var vbe=Q`<iron-iconset-svg name="icons" size="24">
<svg><defs>
<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"></path></g>
<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"></path></g>
<g id="accessible"><circle cx="12" cy="4" r="2"></circle><path d="M19 13v-2c-1.54.02-3.09-.75-4.07-1.83l-1.29-1.43c-.17-.19-.38-.34-.61-.45-.01 0-.01-.01-.02-.01H13c-.35-.2-.75-.3-1.19-.26C10.76 7.11 10 8.04 10 9.09V15c0 1.1.9 2 2 2h5v5h2v-5.5c0-1.1-.9-2-2-2h-3v-3.45c1.29 1.07 3.25 1.94 5 1.95zm-6.17 5c-.41 1.16-1.52 2-2.83 2-1.66 0-3-1.34-3-3 0-1.31.84-2.41 2-2.83V12.1c-2.28.46-4 2.48-4 4.9 0 2.76 2.24 5 5 5 2.42 0 4.44-1.72 4.9-4h-2.07z"></path></g>
<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"></path></g>
<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"></path></g>
<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></g>
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></g>
<g id="add-alert"><path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z"></path></g>
<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g>
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g>
<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"></path></g>
<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g>
<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"></path></g>
<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"></path></g>
<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"></path></g>
<g id="all-out"><path d="M16.21 4.16l4 4v-4zm4 12l-4 4h4zm-12 4l-4-4v4zm-4-12l4-4h-4zm12.95-.95c-2.73-2.73-7.17-2.73-9.9 0s-2.73 7.17 0 9.9 7.17 2.73 9.9 0 2.73-7.16 0-9.9zm-1.1 8.8c-2.13 2.13-5.57 2.13-7.7 0s-2.13-5.57 0-7.7 5.57-2.13 7.7 0 2.13 5.57 0 7.7z"></path></g>
<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"></path></g>
<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"></path></g>
<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"></path></g>
<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"></path></g>
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path></g>
<g id="arrow-downward"><path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"></path></g>
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>
<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"></path></g>
<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"></path></g>
<g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"></path></g>
<g id="arrow-upward"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"></path></g>
<g id="aspect-ratio"><path d="M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g>
<g id="assessment"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"></path></g>
<g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"></path></g>
<g id="assignment-ind"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></g>
<g id="assignment-late"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g>
<g id="assignment-return"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z"></path></g>
<g id="assignment-returned"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h3l-5 5z"></path></g>
<g id="assignment-turned-in"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g>
<g id="attachment"><path d="M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z"></path></g>
<g id="autorenew"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"></path></g>
<g id="backspace"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"></path></g>
<g id="backup"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g>
<g id="block"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"></path></g>
<g id="book"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g>
<g id="bookmark"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g>
<g id="bookmark-border"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g>
<g id="bug-report"><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"></path></g>
<g id="build"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"></path></g>
<g id="cached"><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"></path></g>
<g id="camera-enhance"><path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-1l1.25-2.75L16 13l-2.75-1.25L12 9l-1.25 2.75L8 13l2.75 1.25z"></path></g>
<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path></g>
<g id="card-giftcard"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g>
<g id="card-membership"><path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"></path></g>
<g id="card-travel"><path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z"></path></g>
<g id="change-history"><path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"></path></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></g>
<g id="check-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g>
<g id="check-box-outline-blank"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="check-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g>
<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
<g id="chrome-reader-mode"><path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"></path></g>
<g id="class"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g>
<g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g>
<g id="cloud"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"></path></g>
<g id="cloud-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"></path></g>
<g id="cloud-done"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"></path></g>
<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"></path></g>
<g id="cloud-off"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"></path></g>
<g id="cloud-queue"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"></path></g>
<g id="cloud-upload"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g>
<g id="code"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path></g>
<g id="compare-arrows"><path d="M9.01 14H2v2h7.01v3L13 15l-3.99-4v3zm5.98-1v-3H22V8h-7.01V5L11 9l3.99 4z"></path></g>
<g id="content-copy"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></g>
<g id="content-cut"><path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"></path></g>
<g id="content-paste"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path></g>
<g id="copyright"><path d="M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91 1.05.34 1.7.34c.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="create"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></g>
<g id="create-new-folder"><path d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"></path></g>
<g id="credit-card"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g>
<g id="dashboard"><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path></g>
<g id="date-range"><path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"></path></g>
<g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"></path></g>
<g id="delete-forever"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"></path></g>
<g id="delete-sweep"><path d="M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z"></path></g>
<g id="description"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"></path></g>
<g id="dns"><path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="done"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"></path></g>
<g id="done-all"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"></path></g>
<g id="donut-large"><path d="M11 5.08V2c-5 .5-9 4.81-9 10s4 9.5 9 10v-3.08c-3-.48-6-3.4-6-6.92s3-6.44 6-6.92zM18.97 11H22c-.47-5-4-8.53-9-9v3.08C16 5.51 18.54 8 18.97 11zM13 18.92V22c5-.47 8.53-4 9-9h-3.03c-.43 3-2.97 5.49-5.97 5.92z"></path></g>
<g id="donut-small"><path d="M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84zM14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84zM13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84z"></path></g>
<g id="drafts"><path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"></path></g>
<g id="eject"><path d="M5 17h14v2H5zm7-12L5.33 15h13.34z"></path></g>
<g id="error"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"></path></g>
<g id="error-outline"><path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="euro-symbol"><path d="M15 18.5c-2.51 0-4.68-1.42-5.76-3.5H15v-2H8.58c-.05-.33-.08-.66-.08-1s.03-.67.08-1H15V9H9.24C10.32 6.92 12.5 5.5 15 5.5c1.61 0 3.09.59 4.23 1.57L21 5.3C19.41 3.87 17.3 3 15 3c-3.92 0-7.24 2.51-8.48 6H3v2h3.06c-.04.33-.06.66-.06 1 0 .34.02.67.06 1H3v2h3.52c1.24 3.49 4.56 6 8.48 6 2.31 0 4.41-.87 6-2.3l-1.78-1.77c-1.13.98-2.6 1.57-4.22 1.57z"></path></g>
<g id="event"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"></path></g>
<g id="event-seat"><path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"></path></g>
<g id="exit-to-app"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="expand-less"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"></path></g>
<g id="expand-more"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path></g>
<g id="explore"><path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"></path></g>
<g id="extension"><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"></path></g>
<g id="face"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></g>
<g id="favorite"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></g>
<g id="favorite-border"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"></path></g>
<g id="feedback"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path></g>
<g id="file-download"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g>
<g id="file-upload"><path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"></path></g>
<g id="filter-list"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"></path></g>
<g id="find-in-page"><path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"></path></g>
<g id="find-replace"><path d="M11 6c1.38 0 2.63.56 3.54 1.46L12 10h6V4l-2.05 2.05C14.68 4.78 12.93 4 11 4c-3.53 0-6.43 2.61-6.92 6H6.1c.46-2.28 2.48-4 4.9-4zm5.64 9.14c.66-.9 1.12-1.97 1.28-3.14H15.9c-.46 2.28-2.48 4-4.9 4-1.38 0-2.63-.56-3.54-1.46L10 12H4v6l2.05-2.05C7.32 17.22 9.07 18 11 18c1.55 0 2.98-.51 4.14-1.36L20 21.49 21.49 20l-4.85-4.86z"></path></g>
<g id="fingerprint"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"></path></g>
<g id="first-page"><path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"></path></g>
<g id="flag"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"></path></g>
<g id="flight-land"><path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2.32-1.45-.39v5.17l1.6.43 5.31 1.43z"></path></g>
<g id="flight-takeoff"><path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-.43 5.31-1.42 4.35-1.16L21 11.49c.81-.23 1.28-1.05 1.07-1.85z"></path></g>
<g id="flip-to-back"><path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1.89 2 2 2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z"></path></g>
<g id="flip-to-front"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"></path></g>
<g id="folder"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path></g>
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"></path></g>
<g id="folder-shared"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z"></path></g>
<g id="font-download"><path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"></path></g>
<g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"></path></g>
<g id="fullscreen"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"></path></g>
<g id="fullscreen-exit"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"></path></g>
<g id="g-translate"><path d="M20 5h-9.12L10 2H4c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h7l1 3h8c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zM7.17 14.59c-2.25 0-4.09-1.83-4.09-4.09s1.83-4.09 4.09-4.09c1.04 0 1.99.37 2.74 1.07l.07.06-1.23 1.18-.06-.05c-.29-.27-.78-.59-1.52-.59-1.31 0-2.38 1.09-2.38 2.42s1.07 2.42 2.38 2.42c1.37 0 1.96-.87 2.12-1.46H7.08V9.91h3.95l.01.07c.04.21.05.4.05.61 0 2.35-1.61 4-3.92 4zm6.03-1.71c.33.6.74 1.18 1.19 1.7l-.54.53-.65-2.23zm.77-.76h-.99l-.31-1.04h3.99s-.34 1.31-1.56 2.74c-.52-.62-.89-1.23-1.13-1.7zM21 20c0 .55-.45 1-1 1h-7l2-2-.81-2.77.92-.92L17.79 18l.73-.73-2.71-2.68c.9-1.03 1.6-2.25 1.92-3.51H19v-1.04h-3.64V9h-1.04v1.04h-1.96L11.18 6H20c.55 0 1 .45 1 1v13z"></path></g>
<g id="gavel"><path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z"></path></g>
<g id="gesture"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"></path></g>
<g id="get-app"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g>
<g id="gif"><path d="M11.5 9H13v6h-1.5zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1z"></path></g>
<g id="grade"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g>
<g id="group-work"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8 17.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM9.5 8c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8zm6.5 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g>
<g id="help"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path></g>
<g id="help-outline"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"></path></g>
<g id="highlight-off"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="history"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g>
<g id="home"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"></path></g>
<g id="hourglass-empty"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"></path></g>
<g id="hourglass-full"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"></path></g>
<g id="http"><path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z"></path></g>
<g id="https"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g>
<g id="important-devices"><path d="M23 11.01L18 11c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-9c0-.55-.45-.99-1-.99zM23 20h-5v-7h5v7zM20 2H2C.89 2 0 2.89 0 4v12c0 1.1.89 2 2 2h7v2H7v2h8v-2h-2v-2h2v-2H2V4h18v5h2V4c0-1.11-.9-2-2-2zm-8.03 7L11 6l-.97 3H7l2.47 1.76-.94 2.91 2.47-1.8 2.47 1.8-.94-2.91L15 9h-3.03z"></path></g>
<g id="inbox"><path d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"></path></g>
<g id="indeterminate-check-box"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"></path></g>
<g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"></path></g>
<g id="info-outline"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"></path></g>
<g id="input"><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"></path></g>
<g id="invert-colors"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"></path></g>
<g id="label"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"></path></g>
<g id="label-outline"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"></path></g>
<g id="language"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"></path></g>
<g id="last-page"><path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"></path></g>
<g id="launch"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g>
<g id="lightbulb-outline"><path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"></path></g>
<g id="line-style"><path d="M3 16h5v-2H3v2zm6.5 0h5v-2h-5v2zm6.5 0h5v-2h-5v2zM3 20h2v-2H3v2zm4 0h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM3 12h8v-2H3v2zm10 0h8v-2h-8v2zM3 4v4h18V4H3z"></path></g>
<g id="line-weight"><path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"></path></g>
<g id="link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></g>
<g id="list"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"></path></g>
<g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g>
<g id="lock-open"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"></path></g>
<g id="lock-outline"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z"></path></g>
<g id="low-priority"><path d="M14 5h8v2h-8zm0 5.5h8v2h-8zm0 5.5h8v2h-8zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7.92 2 11.5z"></path></g>
<g id="loyalty"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7zm11.77 8.27L13 19.54l-4.27-4.27C8.28 14.81 8 14.19 8 13.5c0-1.38 1.12-2.5 2.5-2.5.69 0 1.32.28 1.77.74l.73.72.73-.73c.45-.45 1.08-.73 1.77-.73 1.38 0 2.5 1.12 2.5 2.5 0 .69-.28 1.32-.73 1.77z"></path></g>
<g id="mail"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g>
<g id="markunread"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g>
<g id="markunread-mailbox"><path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"></path></g>
<g id="menu"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></g>
<g id="more-horiz"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="motorcycle"><path d="M19.44 9.03L15.41 5H11v2h3.59l2 2H5c-2.8 0-5 2.2-5 5s2.2 5 5 5c2.46 0 4.45-1.69 4.9-4h1.65l2.77-2.77c-.21.54-.32 1.14-.32 1.77 0 2.8 2.2 5 5 5s5-2.2 5-5c0-2.65-1.97-4.77-4.56-4.97zM7.82 15C7.4 16.15 6.28 17 5 17c-1.63 0-3-1.37-3-3s1.37-3 3-3c1.28 0 2.4.85 2.82 2H5v2h2.82zM19 17c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"></path></g>
<g id="move-to-inbox"><path d="M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2V7h-4v3H8l4 4 4-4z"></path></g>
<g id="next-week"><path d="M20 7h-4V5c0-.55-.22-1.05-.59-1.41C15.05 3.22 14.55 3 14 3h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM10 5h4v2h-4V5zm1 13.5l-1-1 3-3-3-3 1-1 4 4-4 4z"></path></g>
<g id="note-add"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"></path></g>
<g id="offline-pin"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"></path></g>
<g id="opacity"><path d="M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"></path></g>
<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"></path></g>
<g id="open-in-new"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g>
<g id="open-with"><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"></path></g>
<g id="pageview"><path d="M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3.21 14.21l-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9-1.42 1.42z"></path></g>
<g id="pan-tool"><path d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"></path></g>
<g id="payment"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g>
<g id="perm-camera-mic"><path d="M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v-2.09c-2.83-.48-5-2.94-5-5.91h2c0 2.21 1.79 4 4 4s4-1.79 4-4h2c0 2.97-2.17 5.43-5 5.91V21h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-6 8c0 1.1-.9 2-2 2s-2-.9-2-2V9c0-1.1.9-2 2-2s2 .9 2 2v4z"></path></g>
<g id="perm-contact-calendar"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"></path></g>
<g id="perm-data-setting"><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-.19-.15-.31-.11l-1.24.5c-.26-.2-.54-.37-.85-.49l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.49l-1.24-.5c-.11-.04-.24 0-.31.11l-1 1.73c-.06.11-.04.24.06.32l1.06.83c-.02.16-.03.32-.03.49 0 .17.01.33.03.49l-1.06.83c-.09.08-.12.21-.06.32l1 1.73c.06.11.19.15.31.11l1.24-.5c.26.2.54.37.85.49l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.59-.29.84-.49l1.25.5c.11.04.24 0 .31-.11l1-1.73c.06-.11.03-.24-.06-.32l-1.07-.83zm-3.71 1.01c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="perm-device-information"><path d="M13 7h-2v2h2V7zm0 4h-2v6h2v-6zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"></path></g>
<g id="perm-identity"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"></path></g>
<g id="perm-media"><path d="M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2V6zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 15l4.5-6 3.5 4.51 2.5-3.01L21 15H7z"></path></g>
<g id="perm-phone-msg"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM12 3v10l3-3h6V3h-9z"></path></g>
<g id="perm-scan-wifi"><path d="M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"></path></g>
<g id="pets"><circle cx="4.5" cy="9.5" r="2.5"></circle><circle cx="9" cy="5.5" r="2.5"></circle><circle cx="15" cy="5.5" r="2.5"></circle><circle cx="19.5" cy="9.5" r="2.5"></circle><path d="M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"></path></g>
<g id="picture-in-picture"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"></path></g>
<g id="picture-in-picture-alt"><path d="M19 11h-8v6h8v-6zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H3V4.97h18v14.05z"></path></g>
<g id="play-for-work"><path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"></path></g>
<g id="polymer"><path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"></path></g>
<g id="power-settings-new"><path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"></path></g>
<g id="pregnant-woman"><path d="M9 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm7 9c-.01-1.34-.83-2.51-2-3 0-1.66-1.34-3-3-3s-3 1.34-3 3v7h2v5h3v-5h3v-4z"></path></g>
<g id="print"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></g>
<g id="query-builder"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g>
<g id="question-answer"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"></path></g>
<g id="radio-button-checked"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="radio-button-unchecked"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="receipt"><path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"></path></g>
<g id="record-voice-over"><circle cx="9" cy="9" r="4"></circle><path d="M9 15c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm7.76-9.64l-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27zM20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14z"></path></g>
<g id="redeem"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g>
<g id="redo"><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"></path></g>
<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></g>
<g id="remove"><path d="M19 13H5v-2h14v2z"></path></g>
<g id="remove-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"></path></g>
<g id="remove-circle-outline"><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="remove-shopping-cart"><path d="M22.73 22.73L2.77 2.77 2 2l-.73-.73L0 2.54l4.39 4.39 2.21 4.66-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h7.46l1.38 1.38c-.5.36-.83.95-.83 1.62 0 1.1.89 2 1.99 2 .67 0 1.26-.33 1.62-.84L21.46 24l1.27-1.27zM7.42 15c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h2.36l2 2H7.42zm8.13-2c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H6.54l9.01 9zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2z"></path></g>
<g id="reorder"><path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"></path></g>
<g id="reply"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g>
<g id="reply-all"><path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g>
<g id="report"><path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"></path></g>
<g id="report-problem"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g>
<g id="restore"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g>
<g id="restore-page"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.5-1.57 3.5-3.5S13.93 9.5 12 9.5c-1.35 0-2.52.78-3.1 1.9l1.6 1.6h-4V9l1.3 1.3C8.69 8.92 10.23 8 12 8c2.76 0 5 2.24 5 5s-2.24 5-5 5z"></path></g>
<g id="room"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g>
<g id="rounded-corner"><path d="M19 19h2v2h-2v-2zm0-2h2v-2h-2v2zM3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm0-4h2V3H3v2zm4 0h2V3H7v2zm8 16h2v-2h-2v2zm-4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm-8 0h2v-2H7v2zm-4 0h2v-2H3v2zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2V8z"></path></g>
<g id="rowing"><path d="M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-2.16c1.66.03 3.61-.87 4.67-2.04l1.4-1.55c.19-.21.43-.38.69-.5.29-.14.62-.23.96-.23h.03C15.99 6.01 17 7.02 17 8.26v5.75c0 .84-.35 1.61-.92 2.16l-3.58-3.58v-2.27c-.63.52-1.43 1.02-2.29 1.39L16.5 18H18l3 3.01z"></path></g>
<g id="save"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"></path></g>
<g id="schedule"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g>
<g id="search"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></g>
<g id="select-all"><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"></path></g>
<g id="send"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"></path></g>
<g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></g>
<g id="settings-applications"><path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"></path></g>
<g id="settings-backup-restore"><path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"></path></g>
<g id="settings-bluetooth"><path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"></path></g>
<g id="settings-brightness"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"></path></g>
<g id="settings-cell"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"></path></g>
<g id="settings-ethernet"><path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z"></path></g>
<g id="settings-input-antenna"><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"></path></g>
<g id="settings-input-component"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g>
<g id="settings-input-composite"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g>
<g id="settings-input-hdmi"><path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"></path></g>
<g id="settings-input-svideo"><path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h3c.83 0 1.5-.67 1.5-1.5zM8.5 15c-.83 0-1.5.67-1.5 1.5S7.67 18 8.5 18s1.5-.67 1.5-1.5S9.33 15 8.5 15zM12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9zm5.5-11c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm-2 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path></g>
<g id="settings-overscan"><path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g>
<g id="settings-phone"><path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 9v2h2V9h-2z"></path></g>
<g id="settings-power"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-5.12L7.44 4.44C5.36 5.88 4 8.28 4 11c0 4.42 3.58 8 8 8s8-3.58 8-8c0-2.72-1.36-5.12-3.44-6.56zM15 24h2v-2h-2v2z"></path></g>
<g id="settings-remote"><path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05zM12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0z"></path></g>
<g id="settings-voice"><path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z"></path></g>
<g id="shop"><path d="M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z"></path></g>
<g id="shop-two"><path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"></path></g>
<g id="shopping-basket"><path d="M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="shopping-cart"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="sort"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"></path></g>
<g id="speaker-notes"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"></path></g>
<g id="speaker-notes-off"><path d="M10.54 11l-.54-.54L7.54 8 6 6.46 2.38 2.84 1.27 1.73 0 3l2.01 2.01L2 22l4-4h9l5.73 5.73L22 22.46 17.54 18l-7-7zM8 14H6v-2h2v2zm-2-3V9l2 2H6zm14-9H4.08L10 7.92V6h8v2h-7.92l1 1H18v2h-4.92l6.99 6.99C21.14 17.95 22 17.08 22 16V4c0-1.1-.9-2-2-2z"></path></g>
<g id="spellcheck"><path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"></path></g>
<g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g>
<g id="star-border"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"></path></g>
<g id="star-half"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"></path></g>
<g id="stars"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"></path></g>
<g id="store"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"></path></g>
<g id="subdirectory-arrow-left"><path d="M11 9l1.42 1.42L8.83 14H18V4h2v12H8.83l3.59 3.58L11 21l-6-6 6-6z"></path></g>
<g id="subdirectory-arrow-right"><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"></path></g>
<g id="subject"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"></path></g>
<g id="supervisor-account"><path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"></path></g>
<g id="swap-horiz"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"></path></g>
<g id="swap-vert"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"></path></g>
<g id="swap-vertical-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"></path></g>
<g id="system-update-alt"><path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"></path></g>
<g id="tab"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h10v4h8v10z"></path></g>
<g id="tab-unselected"><path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"></path></g>
<g id="text-format"><path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"></path></g>
<g id="theaters"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"></path></g>
<g id="thumb-down"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"></path></g>
<g id="thumb-up"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z"></path></g>
<g id="thumbs-up-down"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"></path></g>
<g id="timeline"><path d="M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"></path></g>
<g id="toc"><path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"></path></g>
<g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"></path></g>
<g id="toll"><path d="M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zM3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65z"></path></g>
<g id="touch-app"><path d="M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74l-3.43-.72c-.08-.01-.15-.03-.24-.03-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z"></path></g>
<g id="track-changes"><path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"></path></g>
<g id="translate"><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></g>
<g id="trending-down"><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"></path></g>
<g id="trending-flat"><path d="M22 12l-4-4v3H3v2h15v3z"></path></g>
<g id="trending-up"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"></path></g>
<g id="turned-in"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g>
<g id="turned-in-not"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g>
<g id="unarchive"><path d="M20.55 5.22l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.49-.17-.93-.45-1.28zM12 9.5l5.5 5.5H14v2h-4v-2H6.5L12 9.5zM5.12 5l.82-1h12l.93 1H5.12z"></path></g>
<g id="undo"><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></g>
<g id="unfold-less"><path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"></path></g>
<g id="unfold-more"><path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"></path></g>
<g id="update"><path d="M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79 2.73 2.71 7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58 3.51-3.47 9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"></path></g>
<g id="verified-user"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g>
<g id="view-agenda"><path d="M20 13H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zm0-10H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"></path></g>
<g id="view-array"><path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"></path></g>
<g id="view-carousel"><path d="M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"></path></g>
<g id="view-column"><path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"></path></g>
<g id="view-day"><path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"></path></g>
<g id="view-headline"><path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"></path></g>
<g id="view-list"><path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"></path></g>
<g id="view-module"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"></path></g>
<g id="view-quilt"><path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"></path></g>
<g id="view-stream"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"></path></g>
<g id="view-week"><path d="M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"></path></g>
<g id="visibility"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="visibility-off"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"></path></g>
<g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g>
<g id="watch-later"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"></path></g>
<g id="weekend"><path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51 2 2.82V14h12v-2.03c0-1.3.84-2.4 2-2.82V7c0-1.1-.9-2-2-2z"></path></g>
<g id="work"><path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"></path></g>
<g id="youtube-searched-for"><path d="M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z"></path></g>
<g id="zoom-in"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"></path></g>
<g id="zoom-out"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(vbe.content);var t0t={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},xbe={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},e0t={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},bbe=/[a-z0-9*]/,wbe=/U\+/,Sbe=/^arrow/,Mbe=/^space(bar)?/,Ebe=/^escape$/;function r0t(e,t){var r="";if(e){var n=e.toLowerCase();n===" "||Mbe.test(n)?r="space":Ebe.test(n)?r="esc":n.length==1?(!t||bbe.test(n))&&(r=n):Sbe.test(n)?r=n.replace("arrow",""):n=="multiply"?r="*":r=n}return r}function Tbe(e){var t="";return e&&(e in t0t?t=t0t[e]:wbe.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function Cbe(e){var t="";return Number(e)&&(e>=65&&e<=90?t=String.fromCharCode(32+e):e>=112&&e<=123?t="f"+(e-112+1):e>=48&&e<=57?t=String(e-48):e>=96&&e<=105?t=String(e-96):t=xbe[e]),t}function Abe(e,t){return e.key?r0t(e.key,t):e.detail&&e.detail.key?r0t(e.detail.key,t):Tbe(e.keyIdentifier)||Cbe(e.keyCode)||""}function n0t(e,t){var r=Abe(t,e.hasModifiers);return r===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Pbe(e){return e.length===1?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(t,r){var n=r.split(":"),i=n[0],o=n[1];return i in e0t?(t[e0t[i]]=!0,t.hasModifiers=!0):(t.key=i,t.event=o||"keydown"),t},{combo:e.split(":").shift()})}function i0t(e){return e.trim().split(" ").map(function(t){return Pbe(t)})}var Oo={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var r=i0t(t),n=0;n<r.length;++n)if(n0t(r[n],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(t){return t.keyBindings});return e.indexOf(this.keyBindings)===-1&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(r){for(var n in r)this._addKeyBinding(n,r[n])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(r,n){var i=r[0].hasModifiers,o=n[0].hasModifiers;return i===o?0:i?-1:1})},_addKeyBinding:function(e,t){i0t(e).forEach(function(r){this._keyBindings[r.event]=this._keyBindings[r.event]||[],this._keyBindings[r.event].push([r,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){!this.keyEventTarget||Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],r=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,r]),this.keyEventTarget.addEventListener(e,r)},this)},_unlistenKeyEventListeners:function(){for(var e,t,r,n;this._boundKeyHandlers.length;)e=this._boundKeyHandlers.pop(),t=e[0],r=e[1],n=e[2],t.removeEventListener(r,n)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var r=0;r<e.length;r++){var n=e[r][0],i=e[r][1];if(n0t(n,t)&&(this._triggerKeyHandler(n,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,r){var n=Object.create(e);n.keyboardEvent=r;var i=new CustomEvent(e.event,{detail:n,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&r.preventDefault()}};var v9={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){var r;if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),!!t)if(e==="document")this.scrollTarget=this._doc;else if(typeof e=="string"){var n=this.domHost;this.scrollTarget=n&&n.$?n.$[e]:zt(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var r;typeof e=="object"?(r=e.left,t=e.top):r=e,r=r||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(r,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=r,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var r=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}};var o0t=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Ibe=o0t&&o0t[1]>=8,a0t=3,s0t="-10000px",fE=-100;Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      @media only screen and (-webkit-max-device-pixel-ratio: 1) {
        :host {
          will-change: transform;
        }
      }

      #items {
        @apply --iron-list-items-container;
        position: relative;
      }

      :host(:not([grid])) #items > ::slotted(*) {
        width: 100%;
      }

      #items > ::slotted(*) {
        box-sizing: border-box;
        margin: 0;
        position: absolute;
        top: 0;
        will-change: transform;
      }
    </style>

    <array-selector id="selector" items="{{items}}" selected="{{selectedItems}}" selected-item="{{selectedItem}}"></array-selector>

    <div id="items">
      <slot></slot>
    </div>
`,is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[Wgt,Qs,v9,Kgt],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){var e=this.grid?this._physicalRows*this._rowHeight:this._physicalSize;return e-this._viewportHeight},get _itemsParent(){return zt(zt(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e=e-e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){e=e%this._physicalCount,e<0&&(e=this._physicalCount+e),this.grid&&(e=e-e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(e==null){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems(function(r,n){if(t+=this._getPhysicalSizeIncrement(r),t>this._scrollPosition)return this.grid?n-n%this._itemsPerRow:n;if(this.grid&&this._virtualCount-1===n)return n-n%this._itemsPerRow})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(e==null){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems(function(r,n){t<this._scrollBottom&&(e=n),t+=this._getPhysicalSizeIncrement(r)})}this._lastVisibleIndexVal=e}return e},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){this._debounce("_render",this._render,Ni),this.listen(this,"iron-resize","_resizeHandler"),this.listen(this,"keydown","_keydownHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler"),this.unlisten(this,"keydown","_keydownHandler")},_setOverflow:function(e){this.style.webkitOverflowScrolling=e===this?"touch":"",this.style.overflowY=e===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,Ni)},updateViewportBoundaries:function(){var e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean(e.direction==="rtl"),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,r=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t=t-this._scrollOffset;var n=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+n,this._physicalStart=this._physicalStart+n,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var i=this._getReusables(r);r?(this._physicalTop=i.physicalTop,this._virtualStart=this._virtualStart+i.indexes.length,this._physicalStart=this._physicalStart+i.indexes.length):(this._virtualStart=this._virtualStart-i.indexes.length,this._physicalStart=this._physicalStart-i.indexes.length),this._update(i.indexes,r?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),li)}},_getReusables:function(e){var t,r,n,i,o=[],a=this._hiddenContentSize*this._ratio,s=this._virtualStart,l=this._virtualEnd,c=this._physicalCount,u=this._physicalTop+this._scrollOffset,h=this._physicalBottom+this._scrollOffset,f=this._scrollPosition,p=this._scrollBottom;for(e?(t=this._physicalStart,r=this._physicalEnd,n=f-u):(t=this._physicalEnd,r=this._physicalStart,n=h-p);i=this._getPhysicalSizeIncrement(t),n=n-i,!(o.length>=c||n<=a);)if(e){if(l+o.length+1>=this._virtualCount||u+i>=f-this._scrollOffset)break;o.push(t),u=u+i,t=(t+1)%c}else{if(s-o.length<=0||u+this._physicalSize-i<=p)break;o.push(t),u=u-i,t=t===0?c-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&e.length===0||this._physicalCount===0)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var r=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(r)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(e){this._ensureTemplatized();var t,r,n=new Array(e);for(t=0;t<e;t++)r=this.stamp(null),n[t]=r.root.querySelector("*"),this._itemsParent.appendChild(r.root);return n},_isClientFull:function(){return this._scrollBottom!=0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,a0t,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var r=t%this._itemsPerRow;r&&t-r<=this._physicalCount&&(t+=this._itemsPerRow),t-=r}var n=t-this._physicalCount,i=Math.round(this._physicalCount*.5);if(!(n<0)){if(n>0){var o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(n));for(var a=0;a<n;a++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+n,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+n),this._update(),this._templateCost=(window.performance.now()-o)/n,i=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),kx):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),li))}},_render:function(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){var e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart=this._virtualStart+e.indexes.length,this._physicalStart=this._physicalStart+e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(a0t))},_ensureTemplatized:function(){if(!this.ctor){this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate||console.warn("iron-list requires a template to be provided in light-dom");var e={};e.__key__=!0,e[this.as]=!0,e[this.indexAs]=!0,e[this.selectedAs]=!0,e.tabIndex=!0,this._instanceProps=e,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(e,t){typeof t!="undefined"&&(this.notifyResize(),ci(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if(e.path==="items")this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,Ni);else if(e.path==="items.splices"){this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0;var t=e.value.indexSplices.some(function(i){return i.addedCount>0||i.removed.length>0});if(t){var r=this._getActiveElement();this.contains(r)&&r.blur()}var n=e.value.indexSplices.some(function(i){return i.index+i.addedCount>=this._virtualStart&&i.index<=this._virtualEnd},this);(!this._isClientFull()||n)&&this._debounce("_render",this._render,Ni)}else e.path!=="items.length"&&this._forwardItemPath(e.path,e.value)},_forwardItemPath:function(e,t){e=e.slice(6);var r=e.indexOf(".");r===-1&&(r=e.length);var n,i,o,a=this.modelForElement(this._offscreenFocusedItem),s=parseInt(e.substring(0,r),10);n=this._isIndexRendered(s),n?(i=this._getPhysicalIndex(s),o=this.modelForElement(this._physicalItems[i])):a&&(o=a),!(!o||o[this.indexAs]!==s)&&(e=e.substring(r+1),e=this.as+(e?"."+e:""),o._setPendingPropertyOrPath(e,t,!1,!0),o._flushProperties&&o._flushProperties(),n&&(this._updateMetrics([i]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(e){e.forEach(function(t){if(t.removed.forEach(this._removeItem,this),t.index<this._virtualStart){var r=Math.max(t.addedCount-t.removed.length,t.index-this._virtualStart);this._virtualStart=this._virtualStart+r,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+r)}},this)},_removeItem:function(e){this.$.selector.deselect(e),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===e&&this._removeFocusedItem()},_iterateItems:function(e,t){var r,n,i,o;if(arguments.length===2&&t){for(o=0;o<t.length;o++)if(r=t[o],n=this._computeVidx(r),(i=e.call(this,r,n))!=null)return i}else{for(r=this._physicalStart,n=this._virtualStart;r<this._physicalCount;r++,n++)if((i=e.call(this,r,n))!=null)return i;for(r=0;r<this._physicalStart;r++,n++)if((i=e.call(this,r,n))!=null)return i}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_assignModels:function(e){this._iterateItems(function(t,r){var n=this._physicalItems[t],i=this.items&&this.items[r];if(i!=null){var o=this.modelForElement(n);o.__key__=null,this._forwardProperty(o,this.as,i),this._forwardProperty(o,this.selectedAs,this.$.selector.isSelected(i)),this._forwardProperty(o,this.indexAs,r),this._forwardProperty(o,"tabIndex",this._focusedVirtualIndex===r?0:-1),this._physicalIndexForKey[o.__key__]=t,o._flushProperties&&o._flushProperties(!0),n.removeAttribute("hidden")}else n.setAttribute("hidden","")},e)},_updateMetrics:function(e){ci();var t=0,r=0,n=this._physicalAverageCount,i=this._physicalAverage;this._iterateItems(function(o,a){r+=this._physicalSizes[o],this._physicalSizes[o]=this._physicalItems[o].offsetHeight,t+=this._physicalSizes[o],this._physicalAverageCount+=this._physicalSizes[o]?1:0},e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(r=this._itemsPerRow===1?r:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-r,this._itemsPerRow=1),this._physicalAverageCount!==n&&(this._physicalAverage=Math.round((i*n+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,r=(this._viewportWidth-t)/2;this._iterateItems(function(n,i){var o=i%this._itemsPerRow,a=Math.floor(o*this._itemWidth+r);this._isRTL&&(a=a*-1),this.translate3d(a+"px",e+"px",0,this._physicalItems[n]),this._shouldRenderNextRow(i)&&(e+=this._rowHeight)})}else{let n=[];this._iterateItems(function(i,o){let a=this._physicalItems[i];this.translate3d(0,e+"px",0,a),e+=this._physicalSizes[i];let s=a.id;s&&n.push(s)}),n.length&&this.setAttribute("aria-owns",n.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!==this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow===this._itemsPerRow-1},_adjustScrollPosition:function(){var e=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(e!==0){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!Ibe&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,e=e||this._scrollHeight===0,e=e||this._scrollPosition>=this._estScrollHeight-this._physicalSize,e=e||this.grid&&this.$.items.style.height<this._estScrollHeight,(e||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(e){return this.scrollToIndex(this.items.indexOf(e))},scrollToIndex:function(e){if(!(typeof e!="number"||e<0||e>this.items.length-1)&&(ci(),this._physicalCount!==0)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-this._itemsPerRow*2:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,r=this._virtualStart,n=0,i=this._hiddenContentSize;r<e&&n<=i;)n=n+this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,r++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+n),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Ni)},selectItem:function(e){return this.selectIndex(this.items.indexOf(e))},selectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t&&(t[this.selectedAs]=!0),this.updateSizeForIndex(e)}this.$.selector.selectIndex(e)}},deselectItem:function(e){return this.deselectIndex(this.items.indexOf(e))},deselectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t[this.selectedAs]=!1,this.updateSizeForIndex(e)}this.$.selector.deselectIndex(e)}},toggleSelectionForItem:function(e){return this.toggleSelectionForIndex(this.items.indexOf(e))},toggleSelectionForIndex:function(e){var t=this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(e):this.$.selector.isSelected(this.items[e]);t?this.deselectIndex(e):this.selectIndex(e)},clearSelection:function(){this._iterateItems(function(e,t){this.modelForElement(this._physicalItems[e])[this.selectedAs]=!1}),this.$.selector.clearSelection()},_selectionEnabledChanged:function(e){var t=e?this.listen:this.unlisten;t.call(this,this,"tap","_selectionHandler")},_selectionHandler:function(e){var t=this.modelForElement(e.target);if(!!t){var r,n,i=zt(e).path[0],o=this._getActiveElement(),a=this._physicalItems[this._getPhysicalIndex(t[this.indexAs])];i.localName==="input"||i.localName==="button"||i.localName==="select"||(r=t.tabIndex,t.tabIndex=fE,n=o?o.tabIndex:-1,t.tabIndex=r,!(o&&a!==o&&a.contains(o)&&n!==fE)&&this.toggleSelectionForItem(t[this.as]))}},_multiSelectionChanged:function(e){this.clearSelection(),this.$.selector.multi=e},updateSizeForItem:function(e){return this.updateSizeForIndex(this.items.indexOf(e))},updateSizeForIndex:function(e){return this._isIndexRendered(e)&&(this._updateMetrics([this._getPhysicalIndex(e)]),this._positionItems()),null},_manageFocus:function(){var e=this._focusedVirtualIndex;e>=0&&e<this._virtualCount?this._isIndexRendered(e)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedPhysicalIndex=this._physicalStart,this._focusedVirtualIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_convertIndexToCompleteRow:function(e){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(e/this._itemsPerRow)*this._itemsPerRow:e},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},focusItem:function(e){this._focusPhysicalItem(e)},_focusPhysicalItem:function(e){if(!(e<0||e>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(e)||this.scrollToIndex(e);var t=this._physicalItems[this._getPhysicalIndex(e)],r=this.modelForElement(t),n;r.tabIndex=fE,t.tabIndex===fE&&(n=t),n||(n=zt(t).querySelector('[tabindex="'+fE+'"]')),r.tabIndex=0,this._focusedVirtualIndex=e,n&&n.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedVirtualIndex=-1,this._focusedPhysicalIndex=-1},_createFocusBackfillItem:function(){var e=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var t=this.stamp(null);this._focusBackfillItem=t.root.querySelector("*"),this._itemsParent.appendChild(t.root)}this._offscreenFocusedItem=this._physicalItems[e],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this._focusedPhysicalIndex=e,this.translate3d(0,s0t,0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(!(!this._offscreenFocusedItem||this._focusedVirtualIndex<0)){this._assignModels();var e=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),t=this._physicalItems[e];if(!!t){var r=this.modelForElement(t),n=this.modelForElement(this._offscreenFocusedItem);r[this.as]===n[this.as]?(this._focusBackfillItem=t,r.tabIndex=-1,this._physicalItems[e]=this._offscreenFocusedItem,this.translate3d(0,s0t,0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(e){var t=this.modelForElement(e.target),r=this.modelForElement(this._focusedItem),n=this._offscreenFocusedItem!==null,i=this._focusedVirtualIndex;!t||(r===t?this._isIndexVisible(i)||this.scrollToIndex(i):(this._restoreFocusedItem(),r&&(r.tabIndex=-1),t.tabIndex=0,i=t[this.indexAs],this._focusedVirtualIndex=i,this._focusedPhysicalIndex=this._getPhysicalIndex(i),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],n&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(e){switch(e.keyCode){case 40:this._focusedVirtualIndex<this._virtualCount-1&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex+(this.grid?this._itemsPerRow:1));break;case 39:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?-1:1));break;case 38:this._focusedVirtualIndex>0&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex-(this.grid?this._itemsPerRow:1));break;case 37:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?1:-1));break;case 13:this._focusPhysicalItem(this._focusedVirtualIndex),this.selectionEnabled&&this._selectionHandler(e);break}},_clamp:function(e,t,r){return Math.min(r,Math.max(t,e))},_debounce:function(e,t,r){this._debouncers=this._debouncers||{},this._debouncers[e]=sr.debounce(this._debouncers[e],r,t.bind(this)),Jl(this._debouncers[e])},_forwardProperty:function(e,t,r){e._setPendingProperty(t,r)},_forwardHostPropV2:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&this.modelForElement(r).forwardHostProp(e,t)},this)},_notifyInstancePropV2:function(e,t,r){if(OI(this.as,t)){var n=e[this.indexAs];t==this.as&&(this.items[n]=r),this.notifyPath(mp(this.as,"items."+n,t),r)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(e,t,r){t.indexOf(this.as+".")===0&&this.notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),r)},_forwardParentPath:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&this.modelForElement(r).notifyPath(e,t)},this)},_forwardParentProp:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&(this.modelForElement(r)[e]=t)},this)},_getActiveElement:function(){var e=this._itemsParent.node.domHost;return zt(e?e.root:document).activeElement}});var x9=class{constructor(t){this.selection=[],this.selectCallback=t}get(){return this.multi?this.selection.slice():this.selection[0]}clear(t){this.selection.slice().forEach(function(r){(!t||t.indexOf(r)<0)&&this.setItemSelected(r,!1)},this)}isSelected(t){return this.selection.indexOf(t)>=0}setItemSelected(t,r){if(t!=null&&r!==this.isSelected(t)){if(r)this.selection.push(t);else{var n=this.selection.indexOf(t);n>=0&&this.selection.splice(n,1)}this.selectCallback&&this.selectCallback(t,r)}}select(t){this.multi?this.toggle(t):this.get()!==t&&(this.setItemSelected(this.get(),!1),this.setItemSelected(t,!0))}toggle(t){this.setItemSelected(t,!this.isSelected(t))}};var Sh={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new x9(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&zt(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items?this.items.indexOf(e):-1},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=e-1;this.selected!==void 0&&(t=(Number(this._valueToIndex(this.selected))-1+e)%e),this.selected=this._indexToValue(t)},selectNext:function(){var e=0;this.selected!==void 0&&(e=(Number(this._valueToIndex(this.selected))+1)%this.items.length),this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&typeof this._observer.flush=="function"?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return this.selected!=null},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=zt(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(!!this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&this._selection.get()===void 0&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return e==null?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(this.attrForSelected){for(var t=0,r;r=this.items[t];t++)if(this._valueForItem(r)==e)return t}else return Number(e)},_indexToValue:function(e){if(this.attrForSelected){var t=this.items[e];if(t)return this._valueForItem(t)}else return e},_valueForItem:function(e){if(!e)return null;if(!this.attrForSelected){var t=this.indexOf(e);return t===-1?null:t}var r=e[Sm(this.attrForSelected)];return r!=null?r:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return zt(e).observeNodes(function(t){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",t,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,r=this.items;t&&t!=this;){var n=r.indexOf(t);if(n>=0){var i=this._indexToValue(n);this._itemActivate(i,t);return}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      :host > ::slotted(:not(slot):not(.iron-selected)) {
        display: none !important;
      }
    </style>

    <slot></slot>
`,is:"iron-pages",behaviors:[Qs,Sh],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,t){this.async(this.notifyResize)}});var l0t=Q`
<custom-style>
  <style is="custom-style">
    html {

      --shadow-transition: {
        transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      };

      --shadow-none: {
        box-shadow: none;
      };

      /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */

      --shadow-elevation-2dp: {
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
                    0 1px 5px 0 rgba(0, 0, 0, 0.12),
                    0 3px 1px -2px rgba(0, 0, 0, 0.2);
      };

      --shadow-elevation-3dp: {
        box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
                    0 1px 8px 0 rgba(0, 0, 0, 0.12),
                    0 3px 3px -2px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-4dp: {
        box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
                    0 1px 10px 0 rgba(0, 0, 0, 0.12),
                    0 2px 4px -1px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-6dp: {
        box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
                    0 1px 18px 0 rgba(0, 0, 0, 0.12),
                    0 3px 5px -1px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-8dp: {
        box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
                    0 3px 14px 2px rgba(0, 0, 0, 0.12),
                    0 5px 5px -3px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-12dp: {
        box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
                    0 4px 22px 3px rgba(0, 0, 0, 0.12),
                    0 6px 7px -4px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-16dp: {
        box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
                    0  6px 30px 5px rgba(0, 0, 0, 0.12),
                    0  8px 10px -5px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-24dp: {
        box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
                    0 9px 46px 8px rgba(0, 0, 0, 0.12),
                    0 11px 15px -7px rgba(0, 0, 0, 0.4);
      };
    }
  </style>
</custom-style>`;l0t.setAttribute("style","display: none;");document.head.appendChild(l0t.content);var c0t=Q`
<dom-module id="paper-material-styles">
  <template>
    <style>
      html {
        --paper-material: {
          display: block;
          position: relative;
        };
        --paper-material-elevation-1: {
          @apply --shadow-elevation-2dp;
        };
        --paper-material-elevation-2: {
          @apply --shadow-elevation-4dp;
        };
        --paper-material-elevation-3: {
          @apply --shadow-elevation-6dp;
        };
        --paper-material-elevation-4: {
          @apply --shadow-elevation-8dp;
        };
        --paper-material-elevation-5: {
          @apply --shadow-elevation-16dp;
        };
      }
      .paper-material {
        @apply --paper-material;
      }
      .paper-material[elevation="1"] {
        @apply --paper-material-elevation-1;
      }
      .paper-material[elevation="2"] {
        @apply --paper-material-elevation-2;
      }
      .paper-material[elevation="3"] {
        @apply --paper-material-elevation-3;
      }
      .paper-material[elevation="4"] {
        @apply --paper-material-elevation-4;
      }
      .paper-material[elevation="5"] {
        @apply --paper-material-elevation-5;
      }

      /* Duplicate the styles because of https://github.com/webcomponents/shadycss/issues/193 */
      :host {
        --paper-material: {
          display: block;
          position: relative;
        };
        --paper-material-elevation-1: {
          @apply --shadow-elevation-2dp;
        };
        --paper-material-elevation-2: {
          @apply --shadow-elevation-4dp;
        };
        --paper-material-elevation-3: {
          @apply --shadow-elevation-6dp;
        };
        --paper-material-elevation-4: {
          @apply --shadow-elevation-8dp;
        };
        --paper-material-elevation-5: {
          @apply --shadow-elevation-16dp;
        };
      }
      :host(.paper-material) {
        @apply --paper-material;
      }
      :host(.paper-material[elevation="1"]) {
        @apply --paper-material-elevation-1;
      }
      :host(.paper-material[elevation="2"]) {
        @apply --paper-material-elevation-2;
      }
      :host(.paper-material[elevation="3"]) {
        @apply --paper-material-elevation-3;
      }
      :host(.paper-material[elevation="4"]) {
        @apply --paper-material-elevation-4;
      }
      :host(.paper-material[elevation="5"]) {
        @apply --paper-material-elevation-5;
      }
    </style>
  </template>
</dom-module>`;c0t.setAttribute("style","display: none;");document.head.appendChild(c0t.content);var Di={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){this._setFocused(e.type==="focus")},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):this._oldTabIndex!==void 0&&(this._oldTabIndex===null?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};var Yx={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,r=zt(t).localTarget;this.isLightDescendant(r)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,r=zt(t).localTarget;this.isLightDescendant(r)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Mh=[Oo,Yx];var Eh={distance:function(e,t,r,n){var i=e-r,o=t-n;return Math.sqrt(i*i+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function u0t(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}u0t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var r=Eh.distance(e,t,0,0),n=Eh.distance(e,t,this.width,0),i=Eh.distance(e,t,0,this.height),o=Eh.distance(e,t,this.width,this.height);return Math.max(r,n,i,o)}};function __(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),zt(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}__.MAX_RADIUS=300;__.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Eh.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Eh.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,r=Math.min(Math.sqrt(e+t),__.MAX_RADIUS)*1.1+5,n=1.1-.2*(r/__.MAX_RADIUS),i=this.mouseInteractionSeconds/n,o=r*(1-Math.pow(80,-i));return Math.abs(o)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=this.mouseUpElapsedSeconds*.3,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,__.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,__.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new u0t(this.element)},draw:function(){var e,t,r;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,r=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+r+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+r+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,r=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=Eh.now(),this.center?(this.xStart=t,this.yStart=r,this.slideDistance=Eh.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=r,this.slideDistance=Eh.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){!this.isMouseDown||(this.mouseUpStart=Eh.now())},remove:function(){zt(zt(this.waveContainer).parentNode).removeChild(this.waveContainer)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: absolute;
        border-radius: inherit;
        overflow: hidden;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;

        /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,
         * creating a node (with a position:absolute) in the middle of an event
         * handler "interrupts" that event handler (which happens when the
         * ripple is created on demand) */
        pointer-events: none;
      }

      :host([animating]) {
        /* This resolves a rendering issue in Chrome (as of 40) where the
           ripple is not properly clipped by its parent (which may have
           rounded corners). See: http://jsbin.com/temexa/4

           Note: We only apply this style conditionally. Otherwise, the browser
           will create a new compositing layer for every ripple element on the
           page, and that would be bad. */
        -webkit-transform: translate(0, 0);
        transform: translate3d(0, 0, 0);
      }

      #background,
      #waves,
      .wave-container,
      .wave {
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }

      #background,
      .wave {
        opacity: 0;
      }

      #waves,
      .wave {
        overflow: hidden;
      }

      .wave-container,
      .wave {
        border-radius: 50%;
      }

      :host(.circle) #background,
      :host(.circle) #waves {
        border-radius: 50%;
      }

      :host(.circle) .wave-container {
        overflow: hidden;
      }
    </style>

    <div id="background"></div>
    <div id="waves"></div>
`,is:"paper-ripple",behaviors:[Oo],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){zt(this).parentNode.nodeType==11?this.keyEventTarget=zt(this).getOwnerRoot().host:this.keyEventTarget=zt(this).parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){if(!(this.holdDown&&this.ripples.length>0)){var t=this.addRipple();t.downAction(e),this._animating||(this._animating=!0,this.animate())}},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor="",this.fire("transitionend")},addRipple:function(){var e=new __(this);return zt(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(!!this._animating){var e,t;for(e=0;e<this.ripples.length;++e)t=this.ripples[e],t.draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);!this.shouldKeepAnimating&&this.ripples.length===0?this.onAnimationComplete():window.requestAnimationFrame(this._boundAnimate)}},animateRipple:function(){return this.animate()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(e,t){t!==void 0&&(e?this.downAction():this.upAction())}});var su={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Yx._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var t=this._rippleContainer||this.root;if(t&&zt(t).appendChild(this._ripple),e){var r=zt(this._rippleContainer||this),n=zt(e).rootTarget;r.deepContains(n)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){var e=document.createElement("paper-ripple");return e},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}};var uW={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Yx._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Yx._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},h0t=[Mh,Di,su,uW];var f0t=Q`
  <style include="paper-material-styles">
    /* Need to specify the same specificity as the styles imported from paper-material. */
    :host {
      @apply --layout-inline;
      @apply --layout-center-center;
      position: relative;
      box-sizing: border-box;
      min-width: 5.14em;
      margin: 0 0.29em;
      background: transparent;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      -webkit-tap-highlight-color: transparent;
      font: inherit;
      text-transform: uppercase;
      outline-width: 0;
      border-radius: 3px;
      -moz-user-select: none;
      -ms-user-select: none;
      -webkit-user-select: none;
      user-select: none;
      cursor: pointer;
      z-index: 0;
      padding: 0.7em 0.57em;

      @apply --paper-font-common-base;
      @apply --paper-button;
    }

    :host([elevation="1"]) {
      @apply --paper-material-elevation-1;
    }

    :host([elevation="2"]) {
      @apply --paper-material-elevation-2;
    }

    :host([elevation="3"]) {
      @apply --paper-material-elevation-3;
    }

    :host([elevation="4"]) {
      @apply --paper-material-elevation-4;
    }

    :host([elevation="5"]) {
      @apply --paper-material-elevation-5;
    }

    :host([hidden]) {
      display: none !important;
    }

    :host([raised].keyboard-focus) {
      font-weight: bold;
      @apply --paper-button-raised-keyboard-focus;
    }

    :host(:not([raised]).keyboard-focus) {
      font-weight: bold;
      @apply --paper-button-flat-keyboard-focus;
    }

    :host([disabled]) {
      background: none;
      color: #a8a8a8;
      cursor: auto;
      pointer-events: none;

      @apply --paper-button-disabled;
    }

    :host([disabled][raised]) {
      background: #eaeaea;
    }


    :host([animated]) {
      @apply --shadow-transition;
    }

    paper-ripple {
      color: var(--paper-button-ink-color);
    }
  </style>

  <slot></slot>`;f0t.setAttribute("strip-whitespace","");Yt({_template:f0t,is:"paper-button",behaviors:[h0t],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?uW._calculateElevation.apply(this):this._setElevation(0)}});var p0t=Q`
<custom-style>
  <style is="custom-style">
    html {

      /* Material Design color palette for Google products */

      --google-red-100: #f4c7c3;
      --google-red-300: #e67c73;
      --google-red-500: #db4437;
      --google-red-700: #c53929;

      --google-blue-100: #c6dafc;
      --google-blue-300: #7baaf7;
      --google-blue-500: #4285f4;
      --google-blue-700: #3367d6;

      --google-green-100: #b7e1cd;
      --google-green-300: #57bb8a;
      --google-green-500: #0f9d58;
      --google-green-700: #0b8043;

      --google-yellow-100: #fce8b2;
      --google-yellow-300: #f7cb4d;
      --google-yellow-500: #f4b400;
      --google-yellow-700: #f09300;

      --google-grey-100: #f5f5f5;
      --google-grey-300: #e0e0e0;
      --google-grey-500: #9e9e9e;
      --google-grey-700: #616161;

      /* Material Design color palette from online spec document */

      --paper-red-50: #ffebee;
      --paper-red-100: #ffcdd2;
      --paper-red-200: #ef9a9a;
      --paper-red-300: #e57373;
      --paper-red-400: #ef5350;
      --paper-red-500: #f44336;
      --paper-red-600: #e53935;
      --paper-red-700: #d32f2f;
      --paper-red-800: #c62828;
      --paper-red-900: #b71c1c;
      --paper-red-a100: #ff8a80;
      --paper-red-a200: #ff5252;
      --paper-red-a400: #ff1744;
      --paper-red-a700: #d50000;

      --paper-pink-50: #fce4ec;
      --paper-pink-100: #f8bbd0;
      --paper-pink-200: #f48fb1;
      --paper-pink-300: #f06292;
      --paper-pink-400: #ec407a;
      --paper-pink-500: #e91e63;
      --paper-pink-600: #d81b60;
      --paper-pink-700: #c2185b;
      --paper-pink-800: #ad1457;
      --paper-pink-900: #880e4f;
      --paper-pink-a100: #ff80ab;
      --paper-pink-a200: #ff4081;
      --paper-pink-a400: #f50057;
      --paper-pink-a700: #c51162;

      --paper-purple-50: #f3e5f5;
      --paper-purple-100: #e1bee7;
      --paper-purple-200: #ce93d8;
      --paper-purple-300: #ba68c8;
      --paper-purple-400: #ab47bc;
      --paper-purple-500: #9c27b0;
      --paper-purple-600: #8e24aa;
      --paper-purple-700: #7b1fa2;
      --paper-purple-800: #6a1b9a;
      --paper-purple-900: #4a148c;
      --paper-purple-a100: #ea80fc;
      --paper-purple-a200: #e040fb;
      --paper-purple-a400: #d500f9;
      --paper-purple-a700: #aa00ff;

      --paper-deep-purple-50: #ede7f6;
      --paper-deep-purple-100: #d1c4e9;
      --paper-deep-purple-200: #b39ddb;
      --paper-deep-purple-300: #9575cd;
      --paper-deep-purple-400: #7e57c2;
      --paper-deep-purple-500: #673ab7;
      --paper-deep-purple-600: #5e35b1;
      --paper-deep-purple-700: #512da8;
      --paper-deep-purple-800: #4527a0;
      --paper-deep-purple-900: #311b92;
      --paper-deep-purple-a100: #b388ff;
      --paper-deep-purple-a200: #7c4dff;
      --paper-deep-purple-a400: #651fff;
      --paper-deep-purple-a700: #6200ea;

      --paper-indigo-50: #e8eaf6;
      --paper-indigo-100: #c5cae9;
      --paper-indigo-200: #9fa8da;
      --paper-indigo-300: #7986cb;
      --paper-indigo-400: #5c6bc0;
      --paper-indigo-500: #3f51b5;
      --paper-indigo-600: #3949ab;
      --paper-indigo-700: #303f9f;
      --paper-indigo-800: #283593;
      --paper-indigo-900: #1a237e;
      --paper-indigo-a100: #8c9eff;
      --paper-indigo-a200: #536dfe;
      --paper-indigo-a400: #3d5afe;
      --paper-indigo-a700: #304ffe;

      --paper-blue-50: #e3f2fd;
      --paper-blue-100: #bbdefb;
      --paper-blue-200: #90caf9;
      --paper-blue-300: #64b5f6;
      --paper-blue-400: #42a5f5;
      --paper-blue-500: #2196f3;
      --paper-blue-600: #1e88e5;
      --paper-blue-700: #1976d2;
      --paper-blue-800: #1565c0;
      --paper-blue-900: #0d47a1;
      --paper-blue-a100: #82b1ff;
      --paper-blue-a200: #448aff;
      --paper-blue-a400: #2979ff;
      --paper-blue-a700: #2962ff;

      --paper-light-blue-50: #e1f5fe;
      --paper-light-blue-100: #b3e5fc;
      --paper-light-blue-200: #81d4fa;
      --paper-light-blue-300: #4fc3f7;
      --paper-light-blue-400: #29b6f6;
      --paper-light-blue-500: #03a9f4;
      --paper-light-blue-600: #039be5;
      --paper-light-blue-700: #0288d1;
      --paper-light-blue-800: #0277bd;
      --paper-light-blue-900: #01579b;
      --paper-light-blue-a100: #80d8ff;
      --paper-light-blue-a200: #40c4ff;
      --paper-light-blue-a400: #00b0ff;
      --paper-light-blue-a700: #0091ea;

      --paper-cyan-50: #e0f7fa;
      --paper-cyan-100: #b2ebf2;
      --paper-cyan-200: #80deea;
      --paper-cyan-300: #4dd0e1;
      --paper-cyan-400: #26c6da;
      --paper-cyan-500: #00bcd4;
      --paper-cyan-600: #00acc1;
      --paper-cyan-700: #0097a7;
      --paper-cyan-800: #00838f;
      --paper-cyan-900: #006064;
      --paper-cyan-a100: #84ffff;
      --paper-cyan-a200: #18ffff;
      --paper-cyan-a400: #00e5ff;
      --paper-cyan-a700: #00b8d4;

      --paper-teal-50: #e0f2f1;
      --paper-teal-100: #b2dfdb;
      --paper-teal-200: #80cbc4;
      --paper-teal-300: #4db6ac;
      --paper-teal-400: #26a69a;
      --paper-teal-500: #009688;
      --paper-teal-600: #00897b;
      --paper-teal-700: #00796b;
      --paper-teal-800: #00695c;
      --paper-teal-900: #004d40;
      --paper-teal-a100: #a7ffeb;
      --paper-teal-a200: #64ffda;
      --paper-teal-a400: #1de9b6;
      --paper-teal-a700: #00bfa5;

      --paper-green-50: #e8f5e9;
      --paper-green-100: #c8e6c9;
      --paper-green-200: #a5d6a7;
      --paper-green-300: #81c784;
      --paper-green-400: #66bb6a;
      --paper-green-500: #4caf50;
      --paper-green-600: #43a047;
      --paper-green-700: #388e3c;
      --paper-green-800: #2e7d32;
      --paper-green-900: #1b5e20;
      --paper-green-a100: #b9f6ca;
      --paper-green-a200: #69f0ae;
      --paper-green-a400: #00e676;
      --paper-green-a700: #00c853;

      --paper-light-green-50: #f1f8e9;
      --paper-light-green-100: #dcedc8;
      --paper-light-green-200: #c5e1a5;
      --paper-light-green-300: #aed581;
      --paper-light-green-400: #9ccc65;
      --paper-light-green-500: #8bc34a;
      --paper-light-green-600: #7cb342;
      --paper-light-green-700: #689f38;
      --paper-light-green-800: #558b2f;
      --paper-light-green-900: #33691e;
      --paper-light-green-a100: #ccff90;
      --paper-light-green-a200: #b2ff59;
      --paper-light-green-a400: #76ff03;
      --paper-light-green-a700: #64dd17;

      --paper-lime-50: #f9fbe7;
      --paper-lime-100: #f0f4c3;
      --paper-lime-200: #e6ee9c;
      --paper-lime-300: #dce775;
      --paper-lime-400: #d4e157;
      --paper-lime-500: #cddc39;
      --paper-lime-600: #c0ca33;
      --paper-lime-700: #afb42b;
      --paper-lime-800: #9e9d24;
      --paper-lime-900: #827717;
      --paper-lime-a100: #f4ff81;
      --paper-lime-a200: #eeff41;
      --paper-lime-a400: #c6ff00;
      --paper-lime-a700: #aeea00;

      --paper-yellow-50: #fffde7;
      --paper-yellow-100: #fff9c4;
      --paper-yellow-200: #fff59d;
      --paper-yellow-300: #fff176;
      --paper-yellow-400: #ffee58;
      --paper-yellow-500: #ffeb3b;
      --paper-yellow-600: #fdd835;
      --paper-yellow-700: #fbc02d;
      --paper-yellow-800: #f9a825;
      --paper-yellow-900: #f57f17;
      --paper-yellow-a100: #ffff8d;
      --paper-yellow-a200: #ffff00;
      --paper-yellow-a400: #ffea00;
      --paper-yellow-a700: #ffd600;

      --paper-amber-50: #fff8e1;
      --paper-amber-100: #ffecb3;
      --paper-amber-200: #ffe082;
      --paper-amber-300: #ffd54f;
      --paper-amber-400: #ffca28;
      --paper-amber-500: #ffc107;
      --paper-amber-600: #ffb300;
      --paper-amber-700: #ffa000;
      --paper-amber-800: #ff8f00;
      --paper-amber-900: #ff6f00;
      --paper-amber-a100: #ffe57f;
      --paper-amber-a200: #ffd740;
      --paper-amber-a400: #ffc400;
      --paper-amber-a700: #ffab00;

      --paper-orange-50: #fff3e0;
      --paper-orange-100: #ffe0b2;
      --paper-orange-200: #ffcc80;
      --paper-orange-300: #ffb74d;
      --paper-orange-400: #ffa726;
      --paper-orange-500: #ff9800;
      --paper-orange-600: #fb8c00;
      --paper-orange-700: #f57c00;
      --paper-orange-800: #ef6c00;
      --paper-orange-900: #e65100;
      --paper-orange-a100: #ffd180;
      --paper-orange-a200: #ffab40;
      --paper-orange-a400: #ff9100;
      --paper-orange-a700: #ff6500;

      --paper-deep-orange-50: #fbe9e7;
      --paper-deep-orange-100: #ffccbc;
      --paper-deep-orange-200: #ffab91;
      --paper-deep-orange-300: #ff8a65;
      --paper-deep-orange-400: #ff7043;
      --paper-deep-orange-500: #ff5722;
      --paper-deep-orange-600: #f4511e;
      --paper-deep-orange-700: #e64a19;
      --paper-deep-orange-800: #d84315;
      --paper-deep-orange-900: #bf360c;
      --paper-deep-orange-a100: #ff9e80;
      --paper-deep-orange-a200: #ff6e40;
      --paper-deep-orange-a400: #ff3d00;
      --paper-deep-orange-a700: #dd2c00;

      --paper-brown-50: #efebe9;
      --paper-brown-100: #d7ccc8;
      --paper-brown-200: #bcaaa4;
      --paper-brown-300: #a1887f;
      --paper-brown-400: #8d6e63;
      --paper-brown-500: #795548;
      --paper-brown-600: #6d4c41;
      --paper-brown-700: #5d4037;
      --paper-brown-800: #4e342e;
      --paper-brown-900: #3e2723;

      --paper-grey-50: #fafafa;
      --paper-grey-100: #f5f5f5;
      --paper-grey-200: #eeeeee;
      --paper-grey-300: #e0e0e0;
      --paper-grey-400: #bdbdbd;
      --paper-grey-500: #9e9e9e;
      --paper-grey-600: #757575;
      --paper-grey-700: #616161;
      --paper-grey-800: #424242;
      --paper-grey-900: #212121;

      --paper-blue-grey-50: #eceff1;
      --paper-blue-grey-100: #cfd8dc;
      --paper-blue-grey-200: #b0bec5;
      --paper-blue-grey-300: #90a4ae;
      --paper-blue-grey-400: #78909c;
      --paper-blue-grey-500: #607d8b;
      --paper-blue-grey-600: #546e7a;
      --paper-blue-grey-700: #455a64;
      --paper-blue-grey-800: #37474f;
      --paper-blue-grey-900: #263238;

      /* opacity for dark text on a light background */
      --dark-divider-opacity: 0.12;
      --dark-disabled-opacity: 0.38; /* or hint text or icon */
      --dark-secondary-opacity: 0.54;
      --dark-primary-opacity: 0.87;

      /* opacity for light text on a dark background */
      --light-divider-opacity: 0.12;
      --light-disabled-opacity: 0.3; /* or hint text or icon */
      --light-secondary-opacity: 0.7;
      --light-primary-opacity: 1.0;

    }

  </style>
</custom-style>
`;p0t.setAttribute("style","display: none;");document.head.appendChild(p0t.content);var d0t=Q`
<custom-style>
  <style is="custom-style">
    html {
      /*
       * You can use these generic variables in your elements for easy theming.
       * For example, if all your elements use \`--primary-text-color\` as its main
       * color, then switching from a light to a dark theme is just a matter of
       * changing the value of \`--primary-text-color\` in your application.
       */
      --primary-text-color: var(--light-theme-text-color);
      --primary-background-color: var(--light-theme-background-color);
      --secondary-text-color: var(--light-theme-secondary-color);
      --disabled-text-color: var(--light-theme-disabled-color);
      --divider-color: var(--light-theme-divider-color);
      --error-color: var(--paper-deep-orange-a700);

      /*
       * Primary and accent colors. Also see color.js for more colors.
       */
      --primary-color: var(--paper-indigo-500);
      --light-primary-color: var(--paper-indigo-100);
      --dark-primary-color: var(--paper-indigo-700);

      --accent-color: var(--paper-pink-a200);
      --light-accent-color: var(--paper-pink-a100);
      --dark-accent-color: var(--paper-pink-a400);


      /*
       * Material Design Light background theme
       */
      --light-theme-background-color: #ffffff;
      --light-theme-base-color: #000000;
      --light-theme-text-color: var(--paper-grey-900);
      --light-theme-secondary-color: #737373;  /* for secondary text and icons */
      --light-theme-disabled-color: #9b9b9b;  /* disabled/hint text */
      --light-theme-divider-color: #dbdbdb;

      /*
       * Material Design Dark background theme
       */
      --dark-theme-background-color: var(--paper-grey-900);
      --dark-theme-base-color: #ffffff;
      --dark-theme-text-color: #ffffff;
      --dark-theme-secondary-color: #bcbcbc;  /* for secondary text and icons */
      --dark-theme-disabled-color: #646464;  /* disabled/hint text */
      --dark-theme-divider-color: #3c3c3c;

      /*
       * Deprecated values because of their confusing names.
       */
      --text-primary-color: var(--dark-theme-text-color);
      --default-primary-color: var(--primary-color);
    }
  </style>
</custom-style>`;d0t.setAttribute("style","display: none;");document.head.appendChild(d0t.content);var Th={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},detached:function(){}};var hW=null,Ch={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){hW=new go({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return hW&&hW.byKey(this.validator)},hasValidator:function(){return this._validator!=null},validate:function(e){return e===void 0&&this.value!==void 0?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return this.hasValidator()?this._validator.validate(e):!0}};var fW={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){(this.value===void 0||this.value===null)&&(this.value="on")}},m0t=[Th,Ch,fW];var pE={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=su._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},jx=[Mh,Di,su,pE];var Lbe={_checkedChanged:function(){fW._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){su._buttonStateChanged.call(this),!this.disabled&&this.isAttached&&(this.checked=this.active)}},Xx=[jx,m0t,Lbe];var g0t=Q`<style>
  :host {
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    --calculated-paper-checkbox-size: var(--paper-checkbox-size, 18px);
    /* -1px is a sentinel for the default and is replaced in \`attached\`. */
    --calculated-paper-checkbox-ink-size: var(--paper-checkbox-ink-size, -1px);
    @apply --paper-font-common-base;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
  }

  :host([hidden]) {
    display: none !important;
  }

  :host(:focus) {
    outline: none;
  }

  .hidden {
    display: none;
  }

  #checkboxContainer {
    display: inline-block;
    position: relative;
    width: var(--calculated-paper-checkbox-size);
    height: var(--calculated-paper-checkbox-size);
    min-width: var(--calculated-paper-checkbox-size);
    margin: var(--paper-checkbox-margin, initial);
    vertical-align: var(--paper-checkbox-vertical-align, middle);
    background-color: var(--paper-checkbox-unchecked-background-color, transparent);
  }

  #ink {
    position: absolute;

    /* Center the ripple in the checkbox by negative offsetting it by
     * (inkWidth - rippleWidth) / 2 */
    top: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    left: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    width: var(--calculated-paper-checkbox-ink-size);
    height: var(--calculated-paper-checkbox-ink-size);
    color: var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));
    opacity: 0.6;
    pointer-events: none;
  }

  #ink:dir(rtl) {
    right: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    left: auto;
  }

  #ink[checked] {
    color: var(--paper-checkbox-checked-ink-color, var(--primary-color));
  }

  #checkbox {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    border: solid 2px;
    border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
    border-radius: 2px;
    pointer-events: none;
    -webkit-transition: background-color 140ms, border-color 140ms;
    transition: background-color 140ms, border-color 140ms;

    -webkit-transition-duration: var(--paper-checkbox-animation-duration, 140ms);
    transition-duration: var(--paper-checkbox-animation-duration, 140ms);
  }

  /* checkbox checked animations */
  #checkbox.checked #checkmark {
    -webkit-animation: checkmark-expand 140ms ease-out forwards;
    animation: checkmark-expand 140ms ease-out forwards;

    -webkit-animation-duration: var(--paper-checkbox-animation-duration, 140ms);
    animation-duration: var(--paper-checkbox-animation-duration, 140ms);
  }

  @-webkit-keyframes checkmark-expand {
    0% {
      -webkit-transform: scale(0, 0) rotate(45deg);
    }
    100% {
      -webkit-transform: scale(1, 1) rotate(45deg);
    }
  }

  @keyframes checkmark-expand {
    0% {
      transform: scale(0, 0) rotate(45deg);
    }
    100% {
      transform: scale(1, 1) rotate(45deg);
    }
  }

  #checkbox.checked {
    background-color: var(--paper-checkbox-checked-color, var(--primary-color));
    border-color: var(--paper-checkbox-checked-color, var(--primary-color));
  }

  #checkmark {
    position: absolute;
    width: 36%;
    height: 70%;
    border-style: solid;
    border-top: none;
    border-left: none;
    border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size));
    border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size));
    border-color: var(--paper-checkbox-checkmark-color, white);
    -webkit-transform-origin: 97% 86%;
    transform-origin: 97% 86%;
    box-sizing: content-box; /* protect against page-level box-sizing */
  }

  #checkmark:dir(rtl) {
    -webkit-transform-origin: 50% 14%;
    transform-origin: 50% 14%;
  }

  /* label */
  #checkboxLabel {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    padding-left: var(--paper-checkbox-label-spacing, 8px);
    white-space: normal;
    line-height: normal;
    color: var(--paper-checkbox-label-color, var(--primary-text-color));
    @apply --paper-checkbox-label;
  }

  :host([checked]) #checkboxLabel {
    color: var(--paper-checkbox-label-checked-color, var(--paper-checkbox-label-color, var(--primary-text-color)));
    @apply --paper-checkbox-label-checked;
  }

  #checkboxLabel:dir(rtl) {
    padding-right: var(--paper-checkbox-label-spacing, 8px);
    padding-left: 0;
  }

  #checkboxLabel[hidden] {
    display: none;
  }

  /* disabled state */

  :host([disabled]) #checkbox {
    opacity: 0.5;
    border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
  }

  :host([disabled][checked]) #checkbox {
    background-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled]) #checkboxLabel  {
    opacity: 0.65;
  }

  /* invalid state */
  #checkbox.invalid:not(.checked) {
    border-color: var(--paper-checkbox-error-color, var(--error-color));
  }
</style>

<div id="checkboxContainer">
  <div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]">
    <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
  </div>
</div>

<div id="checkboxLabel"><slot></slot></div>`;g0t.setAttribute("strip-whitespace","");Yt({_template:g0t,is:"paper-checkbox",behaviors:[Xx],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){Cm(this,function(){var e=this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim();if(e==="-1px"){var t=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),r="px",n=t.match(/[A-Za-z]+$/);n!==null&&(r=n[0]);var i=parseFloat(t),o=8/3*i;r==="px"&&(o=Math.floor(o),o%2!==i%2&&o++),this.updateStyles({"--paper-checkbox-ink-size":o+r})}})},_computeCheckboxClass:function(e,t){var r="";return e&&(r+="checked "),t&&(r+="invalid"),r},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,pE._createRipple.call(this)}});if(!window.polymerSkipLoadingFontRoboto){let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.crossOrigin="anonymous",e.href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic",document.head.appendChild(e)}var _0t=Q`<custom-style>
  <style is="custom-style">
    html {

      /* Shared Styles */
      --paper-font-common-base: {
        font-family: 'Roboto', 'Noto', sans-serif;
        -webkit-font-smoothing: antialiased;
      };

      --paper-font-common-code: {
        font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
        -webkit-font-smoothing: antialiased;
      };

      --paper-font-common-expensive-kerning: {
        text-rendering: optimizeLegibility;
      };

      --paper-font-common-nowrap: {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      };

      /* Material Font Styles */

      --paper-font-display4: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 112px;
        font-weight: 300;
        letter-spacing: -.044em;
        line-height: 120px;
      };

      --paper-font-display3: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 56px;
        font-weight: 400;
        letter-spacing: -.026em;
        line-height: 60px;
      };

      --paper-font-display2: {
        @apply --paper-font-common-base;

        font-size: 45px;
        font-weight: 400;
        letter-spacing: -.018em;
        line-height: 48px;
      };

      --paper-font-display1: {
        @apply --paper-font-common-base;

        font-size: 34px;
        font-weight: 400;
        letter-spacing: -.01em;
        line-height: 40px;
      };

      --paper-font-headline: {
        @apply --paper-font-common-base;

        font-size: 24px;
        font-weight: 400;
        letter-spacing: -.012em;
        line-height: 32px;
      };

      --paper-font-title: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 20px;
        font-weight: 500;
        line-height: 28px;
      };

      --paper-font-subhead: {
        @apply --paper-font-common-base;

        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
      };

      --paper-font-body2: {
        @apply --paper-font-common-base;

        font-size: 14px;
        font-weight: 500;
        line-height: 24px;
      };

      --paper-font-body1: {
        @apply --paper-font-common-base;

        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
      };

      --paper-font-caption: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 12px;
        font-weight: 400;
        letter-spacing: 0.011em;
        line-height: 20px;
      };

      --paper-font-menu: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 13px;
        font-weight: 500;
        line-height: 24px;
      };

      --paper-font-button: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.018em;
        line-height: 24px;
        text-transform: uppercase;
      };

      --paper-font-code2: {
        @apply --paper-font-common-code;

        font-size: 14px;
        font-weight: 700;
        line-height: 20px;
      };

      --paper-font-code1: {
        @apply --paper-font-common-code;

        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
      };

    }

  </style>
</custom-style>`;_0t.setAttribute("style","display: none;");document.head.appendChild(_0t.content);var pW=document.createElement("template");pW.setAttribute("style","display: none;");pW.innerHTML=`<dom-module id="paper-dialog-shared-styles">
  <template>
    <style>
      :host {
        display: block;
        margin: 24px 40px;

        background: var(--paper-dialog-background-color, var(--primary-background-color));
        color: var(--paper-dialog-color, var(--primary-text-color));

        @apply --paper-font-body1;
        @apply --shadow-elevation-16dp;
        @apply --paper-dialog;
      }

      :host > ::slotted(*) {
        margin-top: 20px;
        padding: 0 24px;
      }

      :host > ::slotted(.no-padding) {
        padding: 0;
      }

      
      :host > ::slotted(*:first-child) {
        margin-top: 24px;
      }

      :host > ::slotted(*:last-child) {
        margin-bottom: 24px;
      }

      /* In 1.x, this selector was \`:host > ::content h2\`. In 2.x <slot> allows
      to select direct children only, which increases the weight of this
      selector, so we have to re-define first-child/last-child margins below. */
      :host > ::slotted(h2) {
        position: relative;
        margin: 0;

        @apply --paper-font-title;
        @apply --paper-dialog-title;
      }

      /* Apply mixin again, in case it sets margin-top. */
      :host > ::slotted(h2:first-child) {
        margin-top: 24px;
        @apply --paper-dialog-title;
      }

      /* Apply mixin again, in case it sets margin-bottom. */
      :host > ::slotted(h2:last-child) {
        margin-bottom: 24px;
        @apply --paper-dialog-title;
      }

      :host > ::slotted(.paper-dialog-buttons),
      :host > ::slotted(.buttons) {
        position: relative;
        padding: 8px 8px 8px 24px;
        margin: 0;

        color: var(--paper-dialog-button-color, var(--primary-color));

        @apply --layout-horizontal;
        @apply --layout-end-justified;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(pW.content);var y0t={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var r in t)e[r]=t[r]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,r){if(!!this.animationConfig){if(this.animationConfig.value&&typeof this.animationConfig.value=="function"){this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));return}var n;if(e?n=this.animationConfig[e]:n=this.animationConfig,Array.isArray(n)||(n=[n]),n)for(var i,o=0;i=n[o];o++)if(i.animatable)i.animatable._getAnimationConfigRecursive(i.type||e,t,r);else if(i.id){var a=t[i.id];a?(a.isClone||(t[i.id]=this._cloneConfig(a),a=t[i.id]),this._copyProperties(a,i)):t[i.id]=i}else r.push(i)}},getAnimationConfig:function(e){var t={},r=[];this._getAnimationConfigRecursive(e,t,r);for(var n in t)r.push(t[n]);return r}};var kbe={_configureAnimations:function(e){var t=[],r=[];if(e.length>0)for(let i,o=0;i=e[o];o++){let a=document.createElement(i.name);if(a.isNeonAnimation){let s=null;a.configure||(a.configure=function(l){return null}),s=a.configure(i),r.push({result:s,config:i,neonAnimation:a})}else console.warn(this.is+":",i.name,"not found!")}for(var n=0;n<r.length;n++){let i=r[n].result,o=r[n].config,a=r[n].neonAnimation;try{typeof i.cancel!="function"&&(i=document.timeline.play(i))}catch(s){i=null,console.warn("Couldnt play","(",o.name,").",s)}i&&t.push({neonAnimation:a,config:o,animation:i})}return t},_shouldComplete:function(e){for(var t=!0,r=0;r<e.length;r++)if(e[r].animation.playState!="finished"){t=!1;break}return t},_complete:function(e){for(var t=0;t<e.length;t++)e[t].neonAnimation.complete(e[t].config);for(var t=0;t<e.length;t++)e[t].animation.cancel()},playAnimation:function(e,t){var r=this.getAnimationConfig(e);if(!!r){this._active=this._active||{},this._active[e]&&(this._complete(this._active[e]),delete this._active[e]);var n=this._configureAnimations(r);if(n.length==0){this.fire("neon-animation-finish",t,{bubbles:!1});return}this._active[e]=n;for(var i=0;i<n.length;i++)n[i].animation.onfinish=function(){this._shouldComplete(n)&&(this._complete(n),delete this._active[e],this.fire("neon-animation-finish",t,{bubbles:!1}))}.bind(this)}},cancelAnimation:function(){for(var e in this._active){var t=this._active[e];for(var r in t)t[r].animation.cancel()}this._active={}}},b9=[y0t,kbe];var w9,Rbe=()=>{if(w9!==void 0)return w9;let e=document.createElement("div");Object.assign(e.style,{overflow:"auto",position:"fixed",left:"0px",top:"0px",maxWidth:"100px",maxHeight:"100px"});let t=document.createElement("div");return t.style.width="200px",t.style.height="200px",e.appendChild(t),document.body.appendChild(e),w9=Math.abs(e.offsetWidth-100)>1?e.offsetWidth-e.clientWidth:0,document.body.removeChild(e),w9},v0t={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){var e;return this.fitInto===window?e=this.fitInto.innerWidth:e=this.fitInto.getBoundingClientRect().width,e},get _fitHeight(){var e;return this.fitInto===window?e=this.fitInto.innerHeight:e=this.fitInto.getBoundingClientRect().height,e},get _fitLeft(){var e;return this.fitInto===window?e=0:e=this.fitInto.getBoundingClientRect().left,e},get _fitTop(){var e;return this.fitInto===window?e=0:e=this.fitInto.getBoundingClientRect().top,e},get _defaultPositionTarget(){var e=zt(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if(this.horizontalAlign==="right")return"left";if(this.horizontalAlign==="left")return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){return typeof this._memoizedIsRTL=="undefined"&&(this._memoizedIsRTL=window.getComputedStyle(this).direction=="rtl"),this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&(window.getComputedStyle(this).display==="none"?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:e.top!=="auto"?"top":e.bottom!=="auto"?"bottom":null,horizontally:e.left!=="auto"?"left":e.right!=="auto"?"right":null},sizedBy:{height:t.maxHeight!=="none",width:t.maxWidth!=="none",minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(!this.__shouldPosition)return;this._discoverInfo(),window.ShadyDOM&&window.ShadyDOM.flush(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),r=this.__getNormalizedRect(this.fitInto);let n,i,o,a;this.expandSizingTargetForScrollbars&&(n=this.sizingTarget.offsetWidth,i=this.sizingTarget.offsetHeight,o=this.sizingTarget.clientWidth,a=this.sizingTarget.clientHeight);var s=this._fitInfo.margin,l={width:e.width+s.left+s.right,height:e.height+s.top+s.bottom},c=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,l,e,t,r),u=c.left+s.left,h=c.top+s.top,f=Math.min(r.right-s.right,u+e.width),p=Math.min(r.bottom-s.bottom,h+e.height);u=Math.max(r.left+s.left,Math.min(u,f-this._fitInfo.sizedBy.minWidth)),h=Math.max(r.top+s.top,Math.min(h,p-this._fitInfo.sizedBy.minHeight));let d=Math.max(f-u,this._fitInfo.sizedBy.minWidth),g=Math.max(p-h,this._fitInfo.sizedBy.minHeight);this.sizingTarget.style.maxWidth=d+"px",this.sizingTarget.style.maxHeight=g+"px";let _=u-e.left,y=h-e.top;if(this.style.left=`${_}px`,this.style.top=`${y}px`,this.expandSizingTargetForScrollbars){let x=this.sizingTarget.offsetHeight,b=this.sizingTarget.clientHeight,S=i-a,P=x-b-S;if(P>0){let L=r.height-s.top-s.bottom,R=Math.min(L,g+P);this.sizingTarget.style.maxHeight=`${R}px`;let F=this.sizingTarget.offsetHeight,z=F-x,U;c.verticalAlign==="top"?U=y:c.verticalAlign==="middle"?U=y-z/2:c.verticalAlign==="bottom"&&(U=y-z),U=Math.max(r.top+s.top,Math.min(U,r.bottom-s.bottom-F)),this.style.top=`${U}px`}let k=this.sizingTarget.offsetWidth,O=this.sizingTarget.clientWidth,D=n-o,I=k-O-D;if(I>0){let L=Rbe(),R=r.width-s.left-s.right,F=Math.min(R,d+I-L);this.sizingTarget.style.maxWidth=`${F}px`;let z=this.sizingTarget.offsetWidth+L,U=z-k,W;c.horizontalAlign==="left"?W=_:c.horizontalAlign==="center"?W=_-U/2:c.horizontalAlign==="right"&&(W=_-U),W=Math.max(r.left+s.left,Math.min(W,r.right-s.right-z)),this.style.left=`${W}px`}}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,r,n,i){this.__sizeDimension(e,t,r,n,i)},__sizeDimension:function(e,t,r,n,i){var o=this._fitInfo,a=this.__getNormalizedRect(this.fitInto),s=i==="Width"?a.width:a.height,l=t===n,c=l?s-e[n]:e[r],u=o.margin[l?r:n],h="offset"+i,f=this[h]-this.sizingTarget[h];this.sizingTarget.style["max"+i]=s-u-c-f+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!(e.vertically&&e.horizontally)){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),r=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var n=r.top-t.top+(r.height-t.height)/2;this.style.top=n+"px"}if(!e.horizontally){var i=r.left-t.left+(r.width-t.width)/2;this.style.left=i+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,r){var n=Math.min(0,e.top)+Math.min(0,r.bottom-(e.top+t.height)),i=Math.min(0,e.left)+Math.min(0,r.right-(e.left+t.width));return Math.abs(n)*t.width+Math.abs(i)*t.height},__getPosition:function(e,t,r,n,i,o){var a=[{verticalAlign:"top",horizontalAlign:"left",top:i.top+this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:i.top+this.verticalOffset,left:i.right-r.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:i.bottom-r.height-this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:i.bottom-r.height-this.verticalOffset,left:i.right-r.width-this.horizontalOffset}];if(this.noOverlap){for(var s=0,l=a.length;s<l;s++){var c={};for(var u in a[s])c[u]=a[s][u];a.push(c)}a[0].top=a[1].top+=i.height,a[2].top=a[3].top-=i.height,a[4].left=a[6].left+=i.width,a[5].left=a[7].left-=i.width}t=t==="auto"?null:t,e=e==="auto"?null:e,(!e||e==="center")&&(a.push({verticalAlign:"top",horizontalAlign:"center",top:i.top+this.verticalOffset+(this.noOverlap?i.height:0),left:i.left-n.width/2+i.width/2+this.horizontalOffset}),a.push({verticalAlign:"bottom",horizontalAlign:"center",top:i.bottom-r.height-this.verticalOffset-(this.noOverlap?i.height:0),left:i.left-n.width/2+i.width/2+this.horizontalOffset})),(!t||t==="middle")&&(a.push({verticalAlign:"middle",horizontalAlign:"left",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.left+this.horizontalOffset+(this.noOverlap?i.width:0)}),a.push({verticalAlign:"middle",horizontalAlign:"right",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.right-r.width-this.horizontalOffset-(this.noOverlap?i.width:0)})),t==="middle"&&e==="center"&&a.push({verticalAlign:"middle",horizontalAlign:"center",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.left-n.width/2+i.width/2+this.horizontalOffset});for(var h,s=0;s<a.length;s++){var f=a[s],p=f.verticalAlign===t,d=f.horizontalAlign===e;if(!this.dynamicAlign&&!this.noOverlap&&p&&d){h=f;break}var g=(!t||p)&&(!e||d);if(!(!this.dynamicAlign&&!g)){if(f.offscreenArea=this.__getOffscreenArea(f,r,o),f.offscreenArea===0&&g){h=f;break}h=h||f;var _=f.offscreenArea-h.offscreenArea;(_<0||_===0&&(p||d))&&(h=f)}}return h}};var $x=Element.prototype,S9=$x.matches||$x.matchesSelector||$x.mozMatchesSelector||$x.msMatchesSelector||$x.oMatchesSelector||$x.webkitMatchesSelector,dW=class{getTabbableNodes(t){var r=[],n=this._collectTabbableNodes(t,r);return n?this._sortByTabIndex(r):r}isFocusable(t){return S9.call(t,"input, select, textarea, button, object")?S9.call(t,":not([disabled])"):S9.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(t){return this.isFocusable(t)&&S9.call(t,':not([tabindex="-1"])')&&this._isVisible(t)}_normalizedTabIndex(t){if(this.isFocusable(t)){var r=t.getAttribute("tabindex")||0;return Number(r)}return-1}_collectTabbableNodes(t,r){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t;if(!this._isVisible(n))return!1;var i=this._normalizedTabIndex(n),o=i>0;i>=0&&r.push(n);var a;n.localName==="content"||n.localName==="slot"?a=zt(n).getDistributedNodes():a=zt(n.root||n).children;for(var s=0;s<a.length;s++)o=this._collectTabbableNodes(a[s],r)||o;return o}_isVisible(t){var r=t.style;return r.visibility!=="hidden"&&r.display!=="none"?(r=window.getComputedStyle(t),r.visibility!=="hidden"&&r.display!=="none"):!1}_sortByTabIndex(t){var r=t.length;if(r<2)return t;var n=Math.ceil(r/2),i=this._sortByTabIndex(t.slice(0,n)),o=this._sortByTabIndex(t.slice(n));return this._mergeSortByTabIndex(i,o)}_mergeSortByTabIndex(t,r){for(var n=[];t.length>0&&r.length>0;)this._hasLowerTabOrder(t[0],r[0])?n.push(r.shift()):n.push(t.shift());return n.concat(t,r)}_hasLowerTabOrder(t,r){var n=Math.max(t.tabIndex,0),i=Math.max(r.tabIndex,0);return n===0||i===0?i>n:n>i}},x0t=new dW;Yt({_template:Q`
    <style>
      :host {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--iron-overlay-backdrop-background-color, #000);
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
        @apply --iron-overlay-backdrop;
      }

      :host(.opened) {
        opacity: var(--iron-overlay-backdrop-opacity, 0.6);
        pointer-events: auto;
        @apply --iron-overlay-backdrop-opened;
      }
    </style>

    <slot></slot>
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&zt(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){!this.opened&&this.parentNode===document.body&&zt(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);(t.transitionDuration==="0s"||t.opacity==0)&&this.complete()}!this.isAttached||(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var mW=class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Tm(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for((!t||!(t instanceof Element))&&(t=document.body);t.root&&zt(t.root).activeElement;)t=zt(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var r=this._overlays[t];if(!!r){var n=this._overlays.length-1,i=this._overlays[n];if(i&&this._shouldBeBehindOverlay(r,i)&&n--,!(t>=n)){var o=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(r)<=o&&this._applyOverlayZ(r,o);t<n;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[n]=r}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var r=this._overlays.indexOf(t);if(r>=0){this._bringOverlayAtIndexToFront(r),this.trackBackdrop();return}var n=this._overlays.length,i=this._overlays[n-1],o=Math.max(this._getZ(i),this._minimumZ),a=this._getZ(t);if(i&&this._shouldBeBehindOverlay(t,i)){this._applyOverlayZ(i,o),n--;var s=this._overlays[n-1];o=Math.max(this._getZ(s),this._minimumZ)}a<=o&&this._applyOverlayZ(t,o),this._overlays.splice(n,0,t),this.trackBackdrop()}removeOverlay(t){var r=this._overlays.indexOf(t);r!==-1&&(this._overlays.splice(r,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();!t&&!this._backdropElement||(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],r=0;r<this._overlays.length;r++)this._overlays[r].withBackdrop&&t.push(this._overlays[r]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var r=this._minimumZ;if(t){var n=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);n===n&&(r=n)}return r}_setZ(t,r){t.style.zIndex=r}_applyOverlayZ(t,r){this._setZ(t,r+2)}_overlayInPath(t){t=t||[];for(var r=0;r<t.length;r++)if(t[r]._manager===this)return t[r]}_onCaptureClick(t){var r=this._overlays.length-1;if(r!==-1)for(var n=zt(t).path,i;(i=this._overlays[r])&&this._overlayInPath(n)!==i&&(i._onCaptureClick(t),i.allowClickThrough);)r--}_onCaptureFocus(t){var r=this.currentOverlay();r&&r._onCaptureFocus(t)}_onCaptureKeyDown(t){var r=this.currentOverlay();r&&(Oo.keyboardEventMatchesKeys(t,"esc")?r._onCaptureEsc(t):Oo.keyboardEventMatchesKeys(t,"tab")&&r._onCaptureTab(t))}_shouldBeBehindOverlay(t,r){return!t.alwaysOnTop&&r.alwaysOnTop}},b0t=new mW;var E9={pageX:0,pageY:0},w0t=null,gW=[],T9=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"],M9,_W;function S0t(e){Ah.indexOf(e)>=0||(Ah.length===0&&Dbe(),Ah.push(e),_W=Ah[Ah.length-1],E0t=[],T0t=[])}function M0t(e){var t=Ah.indexOf(e);t!==-1&&(Ah.splice(t,1),_W=Ah[Ah.length-1],E0t=[],T0t=[],Ah.length===0&&Obe())}var Ah=[],E0t=null,T0t=null;function Nbe(e){if(e.cancelable&&zbe(e)&&e.preventDefault(),e.targetTouches){var t=e.targetTouches[0];E9.pageX=t.pageX,E9.pageY=t.pageY}}function Dbe(){M9=M9||Nbe.bind(void 0);for(var e=0,t=T9.length;e<t;e++)document.addEventListener(T9[e],M9,{capture:!0,passive:!1})}function Obe(){for(var e=0,t=T9.length;e<t;e++)document.removeEventListener(T9[e],M9,{capture:!0,passive:!1})}function zbe(e){var t=zt(e).rootTarget;if(e.type!=="touchmove"&&w0t!==t&&(w0t=t,gW=Fbe(zt(e).path)),!gW.length)return!0;if(e.type==="touchstart")return!1;var r=Hbe(e);return!Bbe(gW,r.deltaX,r.deltaY)}function Fbe(e){for(var t=[],r=e.indexOf(_W),n=0;n<=r;n++)if(e[n].nodeType===Node.ELEMENT_NODE){var i=e[n],o=i.style;o.overflow!=="scroll"&&o.overflow!=="auto"&&(o=window.getComputedStyle(i)),(o.overflow==="scroll"||o.overflow==="auto")&&t.push(i)}return t}function Bbe(e,t,r){if(!(!t&&!r))for(var n=Math.abs(r)>=Math.abs(t),i=0;i<e.length;i++){var o=e[i],a=!1;if(n?a=r<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:a=t<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth,a)return o}}function Hbe(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if(!("deltaX"in e)){if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=e.axis===1?e.detail:0,t.deltaY=e.axis===2?e.detail:0;else if(e.targetTouches){var r=e.targetTouches[0];t.deltaX=E9.pageX-r.pageX,t.deltaY=E9.pageY-r.pageY}}return t}var Im={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:b0t},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||zt(this).querySelector("[autofocus]")||this},get _focusableNodes(){return x0t.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=zt(this).observeNodes(this._onNodesChange)},detached:function(){this._observer&&zt(this).unobserveNodes(this._observer),this._observer=null;for(var e in this.__rafs)this.__rafs[e]!==null&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){var t=this.fire("iron-overlay-canceled",e,{cancelable:!0});t.defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Ube(this,e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(!!this.withBackdrop){var t=zt(e).path;t.indexOf(this)===-1?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(!!this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,r=t?this.__firstFocusableNode:this.__lastFocusableNode,n=t?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(r===n)i=!0;else{var o=this._manager.deepActiveElement;i=o===r||o===this}i&&(e.preventDefault(),this._focusedChild=n,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var r=this.__rafs;r[e]!==null&&cancelAnimationFrame(r[e]),r[e]=requestAnimationFrame(function(){r[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,r){!e||!t||!this.__isValidScrollAction(r)?(M0t(this),this.__removeScrollListeners()):(r==="lock"&&(this.__saveScrollPosition(),S0t(this)),this.__addScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],u_)for(var e=this;e;)e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host&&this.__rootNodes.push(e),e=e.host||e.assignedSlot||e.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach(function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach(function(e){e.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(e){return e==="lock"||e==="refit"||e==="cancel"},__onCaptureScroll:function(e){if(!this.__isAnimating&&!(zt(e).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e);break}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},Vbe=e=>e.assignedSlot||e.parentNode||e.host,Ube=(e,t)=>{for(let r=t;r;r=Vbe(r))if(r===e)return!0;return!1},Kx=[v0t,Qs,Im];var yW={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){!t||(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=zt(e).path,r=0,n=t.indexOf(this);r<n;r++){var i=t[r];if(i.hasAttribute&&(i.hasAttribute("dialog-dismiss")||i.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(i.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}},C0t=[Kx,yW];Yt({_template:Q`
    <style include="paper-dialog-shared-styles"></style>
    <slot></slot>
`,is:"paper-dialog",behaviors:[C0t,b9],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});Yt({_template:Q`
    <style>

      :host {
        display: block;
        @apply --layout-relative;
      }

      :host(.is-scrolled:not(:first-child))::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--divider-color);
      }

      :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--divider-color);
      }

      .scrollable {
        padding: 0 24px;

        @apply --layout-scroll;
        @apply --paper-dialog-scrollable;
      }

      .fit {
        @apply --layout-fit;
      }
    </style>

    <div id="scrollable" class="scrollable" on-scroll="updateScrollState">
      <slot></slot>
    </div>
`,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(yW)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var ec=Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: fixed;
        clip: rect(0px,0px,0px,0px);
      }
    </style>
    <div aria-live$="[[mode]]">[[_text]]</div>
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){ec.instance||(ec.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});ec.instance=null;ec.requestAvailability=function(){ec.instance||(ec.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(ec.instance):document.addEventListener("load",function(){document.body.appendChild(ec.instance)})};Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
      }
    </style>
    <slot id="content"></slot>
`,is:"iron-input",behaviors:[Ch],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){ec.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=zt(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(zt(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/;break}return e},_bindValueChanged:function(e,t){!t||(e===void 0?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){if(this.allowedPattern&&!this._patternAlreadyChecked){var e=this._checkPatternValidity();e||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput)}this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=e.keyCode==8||e.keyCode==9||e.keyCode==13||e.keyCode==27,r=e.keyCode==19||e.keyCode==20||e.keyCode==45||e.keyCode==46||e.keyCode==144||e.keyCode==145||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!t&&!(e.charCode==0&&r)},_onKeypress:function(e){if(!(!this.allowedPattern&&this.inputElement.type!=="number")){var t=this._patternRegExp;if(!!t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var r=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(r)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+r+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.inputElement.value.length;t++)if(!e.test(this.inputElement.value[t]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var e=this.inputElement.checkValidity();return e&&(this.required&&this.bindValue===""?e=!1:this.hasValidator()&&(e=Ch.validate.call(this,this.bindValue))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})},_computeValue:function(e){return e}});var C9={attached:function(){this.fire("addon-attached")},update:function(e){}};Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        float: right;

        @apply --paper-font-caption;
        @apply --paper-input-char-counter;
      }

      :host([hidden]) {
        display: none !important;
      }

      :host(:dir(rtl)) {
        float: left;
      }
    </style>

    <span>[[_charCounterStr]]</span>
`,is:"paper-input-char-counter",behaviors:[C9],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(!!e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});var A0t=Q`
<custom-style>
  <style is="custom-style">
    html {
      --paper-input-container-shared-input-style: {
        position: relative; /* to make a stacking context */
        outline: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        background: transparent;
        border: none;
        color: var(--paper-input-container-input-color, var(--primary-text-color));
        -webkit-appearance: none;
        text-align: inherit;
        vertical-align: var(--paper-input-container-input-align, bottom);

        @apply --paper-font-subhead;
      };
    }
  </style>
</custom-style>
`;A0t.setAttribute("style","display: none;");document.head.appendChild(A0t.content);Yt({_template:Q`
    <style>
      :host {
        display: block;
        padding: 8px 0;
        @apply --paper-input-container;
      }

      :host([inline]) {
        display: inline-block;
      }

      :host([disabled]) {
        pointer-events: none;
        opacity: 0.33;

        @apply --paper-input-container-disabled;
      }

      :host([hidden]) {
        display: none !important;
      }

      [hidden] {
        display: none !important;
      }

      .floated-label-placeholder {
        @apply --paper-font-caption;
      }

      .underline {
        height: 2px;
        position: relative;
      }

      .focused-line {
        @apply --layout-fit;
        border-bottom: 2px solid var(--paper-input-container-focus-color, var(--primary-color));

        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-transform: scale3d(0,1,1);
        transform: scale3d(0,1,1);

        @apply --paper-input-container-underline-focus;
      }

      .underline.is-highlighted .focused-line {
        -webkit-transform: none;
        transform: none;
        -webkit-transition: -webkit-transform 0.25s;
        transition: transform 0.25s;

        @apply --paper-transition-easing;
      }

      .underline.is-invalid .focused-line {
        border-color: var(--paper-input-container-invalid-color, var(--error-color));
        -webkit-transform: none;
        transform: none;
        -webkit-transition: -webkit-transform 0.25s;
        transition: transform 0.25s;

        @apply --paper-transition-easing;
      }

      .unfocused-line {
        @apply --layout-fit;
        border-bottom: 1px solid var(--paper-input-container-color, var(--secondary-text-color));
        @apply --paper-input-container-underline;
      }

      :host([disabled]) .unfocused-line {
        border-bottom: 1px dashed;
        border-color: var(--paper-input-container-color, var(--secondary-text-color));
        @apply --paper-input-container-underline-disabled;
      }

      .input-wrapper {
        @apply --layout-horizontal;
        @apply --layout-center;
        position: relative;
      }

      .input-content {
        @apply --layout-flex-auto;
        @apply --layout-relative;
        max-width: 100%;
      }

      .input-content ::slotted(label),
      .input-content ::slotted(.paper-input-label) {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        font: inherit;
        color: var(--paper-input-container-color, var(--secondary-text-color));
        -webkit-transition: -webkit-transform 0.25s, width 0.25s;
        transition: transform 0.25s, width 0.25s;
        -webkit-transform-origin: left top;
        transform-origin: left top;
        /* Fix for safari not focusing 0-height date/time inputs with -webkit-apperance: none; */
        min-height: 1px;

        @apply --paper-font-common-nowrap;
        @apply --paper-font-subhead;
        @apply --paper-input-container-label;
        @apply --paper-transition-easing;
      }


      .input-content ::slotted(label):before,
      .input-content ::slotted(.paper-input-label):before {
        @apply --paper-input-container-label-before;
      }

      .input-content ::slotted(label):after,
      .input-content ::slotted(.paper-input-label):after {
        @apply --paper-input-container-label-after;
      }

      .input-content.label-is-floating ::slotted(label),
      .input-content.label-is-floating ::slotted(.paper-input-label) {
        -webkit-transform: translateY(-75%) scale(0.75);
        transform: translateY(-75%) scale(0.75);

        /* Since we scale to 75/100 of the size, we actually have 100/75 of the
        original space now available */
        width: 133%;

        @apply --paper-input-container-label-floating;
      }

      :host(:dir(rtl)) .input-content.label-is-floating ::slotted(label),
      :host(:dir(rtl)) .input-content.label-is-floating ::slotted(.paper-input-label) {
        right: 0;
        left: auto;
        -webkit-transform-origin: right top;
        transform-origin: right top;
      }

      .input-content.label-is-highlighted ::slotted(label),
      .input-content.label-is-highlighted ::slotted(.paper-input-label) {
        color: var(--paper-input-container-focus-color, var(--primary-color));

        @apply --paper-input-container-label-focus;
      }

      .input-content.is-invalid ::slotted(label),
      .input-content.is-invalid ::slotted(.paper-input-label) {
        color: var(--paper-input-container-invalid-color, var(--error-color));
      }

      .input-content.label-is-hidden ::slotted(label),
      .input-content.label-is-hidden ::slotted(.paper-input-label) {
        visibility: hidden;
      }

      .input-content ::slotted(input),
      .input-content ::slotted(iron-input),
      .input-content ::slotted(textarea),
      .input-content ::slotted(iron-autogrow-textarea),
      .input-content ::slotted(.paper-input-input) {
        @apply --paper-input-container-shared-input-style;
        /* The apply shim doesn't apply the nested color custom property,
          so we have to re-apply it here. */
        color: var(--paper-input-container-input-color, var(--primary-text-color));
        @apply --paper-input-container-input;
      }

      .input-content ::slotted(input)::-webkit-outer-spin-button,
      .input-content ::slotted(input)::-webkit-inner-spin-button {
        @apply --paper-input-container-input-webkit-spinner;
      }

      .input-content.focused ::slotted(input),
      .input-content.focused ::slotted(iron-input),
      .input-content.focused ::slotted(textarea),
      .input-content.focused ::slotted(iron-autogrow-textarea),
      .input-content.focused ::slotted(.paper-input-input) {
        @apply --paper-input-container-input-focus;
      }

      .input-content.is-invalid ::slotted(input),
      .input-content.is-invalid ::slotted(iron-input),
      .input-content.is-invalid ::slotted(textarea),
      .input-content.is-invalid ::slotted(iron-autogrow-textarea),
      .input-content.is-invalid ::slotted(.paper-input-input) {
        @apply --paper-input-container-input-invalid;
      }

      .prefix ::slotted(*) {
        display: inline-block;
        @apply --paper-font-subhead;
        @apply --layout-flex-none;
        @apply --paper-input-prefix;
      }

      .suffix ::slotted(*) {
        display: inline-block;
        @apply --paper-font-subhead;
        @apply --layout-flex-none;

        @apply --paper-input-suffix;
      }

      /* Firefox sets a min-width on the input, which can cause layout issues */
      .input-content ::slotted(input) {
        min-width: 0;
      }

      .input-content ::slotted(textarea) {
        resize: none;
      }

      .add-on-content {
        position: relative;
      }

      .add-on-content.is-invalid ::slotted(*) {
        color: var(--paper-input-container-invalid-color, var(--error-color));
      }

      .add-on-content.is-highlighted ::slotted(*) {
        color: var(--paper-input-container-focus-color, var(--primary-color));
      }
    </style>

    <div class="floated-label-placeholder" aria-hidden="true" hidden="[[noLabelFloat]]">&nbsp;</div>

    <div class="input-wrapper">
      <span class="prefix"><slot name="prefix"></slot></span>

      <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]" id="labelAndInputContainer">
        <slot name="label"></slot>
        <slot name="input"></slot>
      </div>

      <span class="suffix"><slot name="suffix"></slot></span>
    </div>

    <div class$="[[_computeUnderlineClass(focused,invalid)]]">
      <div class="unfocused-line"></div>
      <div class="focused-line"></div>
    </div>

    <div class$="[[_computeAddOnContentClass(focused,invalid)]]">
      <slot name="add-on"></slot>
    </div>
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return Sm(this.attrForValue)},get _inputElement(){return zt(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&this._inputElementValue!=""?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(e){this._addons||(this._addons=[]);var t=e.target;this._addons.indexOf(t)===-1&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){var t=e.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,t.value===void 0||t.value==="")||this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||t===0||e.type==="number"&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){if(this.autoValidate&&e){var t;e.validate?t=e.validate(this._inputElementValue):t=e.checkValidity(),this.invalid=!t}this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,r=0;t=this._addons[r];r++)t.update(e)},_computeInputContentClass:function(e,t,r,n,i){var o="input-content";if(e)i&&(o+=" label-is-hidden"),n&&(o+=" is-invalid");else{var a=this.querySelector("label");t||i?(o+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",n?o+=" is-invalid":r&&(o+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),n&&(o+=" is-invalid"))}return r&&(o+=" focused"),o},_computeUnderlineClass:function(e,t){var r="underline";return t?r+=" is-invalid":e&&(r+=" is-highlighted"),r},_computeAddOnContentClass:function(e,t){var r="add-on-content";return t?r+=" is-invalid":e&&(r+=" is-highlighted"),r}});Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        visibility: hidden;

        color: var(--paper-input-container-invalid-color, var(--error-color));

        @apply --paper-font-caption;
        @apply --paper-input-error;
        position: absolute;
        left:0;
        right:0;
      }

      :host([invalid]) {
        visibility: visible;
      }

      #a11yWrapper {
        visibility: hidden;
      }

      :host([invalid]) #a11yWrapper {
        visibility: visible;
      }
    </style>

    <!--
    If the paper-input-error element is directly referenced by an
    \`aria-describedby\` attribute, such as when used as a paper-input add-on,
    then applying \`visibility: hidden;\` to the paper-input-error element itself
    does not hide the error.

    For more information, see:
    https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
    -->
    <div id="a11yWrapper">
      <slot></slot>
    </div>
`,is:"paper-input-error",behaviors:[C9],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});var Zx={};Zx.NextLabelID=1;Zx.NextAddonID=1;Zx.NextInputID=1;var qbe={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$||(this.$={}),this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId)),this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!mt&&this.inputElement&&this._typesThatHaveText.indexOf(this.inputElement.type)!==-1&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e?e=e+" "+t:e=t,e},_onAddonAttached:function(e){var t=zt(e).rootTarget;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var r="paper-input-add-on-"+Zx.NextAddonID++;t.id=r,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,r)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){Di._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(r){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e=zt(this.root).querySelector("label");if(!e){this._ariaLabelledBy="";return}var t;e.id?t=e.id:(t="paper-input-label-"+Zx.NextLabelID++,e.id=t),this._ariaLabelledBy=t},_generateInputId:function(){(!this._inputId||this._inputId==="")&&(this._inputId="input-"+Zx.NextInputID++)},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement,t=e instanceof HTMLElement,r=t&&e!==document.body&&e!==document.documentElement;r||this._focusableElement.focus()}}},A9=[Di,Oo,qbe];Yt({is:"paper-input",_template:Q`
    <style>
      :host {
        display: block;
      }

      :host([focused]) {
        outline: none;
      }

      :host([hidden]) {
        display: none !important;
      }

      input {
        /* Firefox sets a min-width on the input, which can cause layout issues */
        min-width: 0;
      }

      /* In 1.x, the <input> is distributed to paper-input-container, which styles it.
      In 2.x the <iron-input> is distributed to paper-input-container, which styles
      it, but in order for this to work correctly, we need to reset some
      of the native input's properties to inherit (from the iron-input) */
      iron-input > input {
        @apply --paper-input-container-shared-input-style;
        font-family: inherit;
        font-weight: inherit;
        font-size: inherit;
        letter-spacing: inherit;
        word-spacing: inherit;
        line-height: inherit;
        text-shadow: inherit;
        color: inherit;
        cursor: inherit;
      }

      input:disabled {
        @apply --paper-input-container-input-disabled;
      }

      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        @apply --paper-input-container-input-webkit-spinner;
      }

      input::-webkit-clear-button {
        @apply --paper-input-container-input-webkit-clear;
      }

      input::-webkit-calendar-picker-indicator {
        @apply --paper-input-container-input-webkit-calendar-picker-indicator;
      }

      input::-webkit-input-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input:-moz-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input::-moz-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input::-ms-clear {
        @apply --paper-input-container-ms-clear;
      }

      input::-ms-reveal {
        @apply --paper-input-container-ms-reveal;
      }

      input:-ms-input-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      label {
        pointer-events: none;
      }
    </style>

    <paper-input-container id="container" no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">

      <slot name="prefix" slot="prefix"></slot>

      <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>

      <!-- Need to bind maxlength so that the paper-input-char-counter works correctly -->
      <iron-input bind-value="{{value}}" slot="input" class="input-element" id$="[[_inputId]]" maxlength$="[[maxlength]]" allowed-pattern="[[allowedPattern]]" invalid="{{invalid}}" validator="[[validator]]">
        <input aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabIndex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]" role$="[[inputRole]]" aria-haspopup$="[[inputAriaHaspopup]]">
      </iron-input>

      <slot name="suffix" slot="suffix"></slot>

      <template is="dom-if" if="[[errorMessage]]">
        <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>
      </template>

      <template is="dom-if" if="[[charCounter]]">
        <paper-input-char-counter slot="add-on"></paper-input-char-counter>
      </template>

    </paper-input-container>
  `,behaviors:[A9,Th],properties:{value:{type:String},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&this._typesThatHaveText.indexOf(this.$.nativeInput.type)!==-1&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});Yt({_template:Q`
    <style>
      :host {
        position: fixed;
      }

      #contentWrapper ::slotted(*) {
        overflow: auto;
      }

      #contentWrapper.animating ::slotted(*) {
        overflow: hidden;
        pointer-events: none;
      }
    </style>

    <div id="contentWrapper">
      <slot id="content" name="dropdown-content"></slot>
    </div>
`,is:"iron-dropdown",behaviors:[Di,Oo,Kx,b9],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},ready:function(){this.scrollAction||(this.scrollAction=this.allowOutsideScroll?"refit":"lock"),this._readied=!0},attached:function(){(!this.sizingTarget||this.sizingTarget===this)&&(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation()},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),Im._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Im._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Im._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_updateAnimationConfig:function(){for(var e=this.containedElement,t=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),r=0;r<t.length;r++)t[r].node=e;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_allowOutsideScrollChanged:function(e){!this._readied||(e?(!this.scrollAction||this.scrollAction==="lock")&&(this.scrollAction="refit"):this.scrollAction="lock")},_applyFocus:function(){var e=this.focusTarget||this.containedElement;e&&this.opened&&!this.noAutoFocus?e.focus():Im._applyFocus.apply(this,arguments)}});var vp={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},timingFromConfig:function(e){if(e.timing)for(var t in e.timing)this.animationTiming[t]=e.timing[t];return this.animationTiming},setPrefixedProperty:function(e,t,r){for(var n={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]},i=n[t],o,a=0;o=i[a];a++)e.style[o]=r;e.style[t]=r},complete:function(e){}};Yt({is:"fade-in-animation",behaviors:[vp],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(e)),this._effect}});Yt({is:"fade-out-animation",behaviors:[vp],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-grow-height-animation",_template:null,behaviors:[vp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.height;return this._effect=new KeyframeEffect(t,[{height:n/2+"px"},{height:n+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-grow-width-animation",_template:null,behaviors:[vp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.width;return this._effect=new KeyframeEffect(t,[{width:n/2+"px"},{width:n+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[vp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.width;return this._effect=new KeyframeEffect(t,[{width:n+"px"},{width:n-n/20+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[vp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.height;return this.setPrefixedProperty(t,"transformOrigin","0 0"),this._effect=new KeyframeEffect(t,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}});var dE={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},Gbe=Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        padding: 8px;
        outline: none;

        @apply --paper-menu-button;
      }

      :host([disabled]) {
        cursor: auto;
        color: var(--disabled-text-color);

        @apply --paper-menu-button-disabled;
      }

      iron-dropdown {
        @apply --paper-menu-button-dropdown;
      }

      .dropdown-content {
        @apply --shadow-elevation-2dp;

        position: relative;
        border-radius: 2px;
        background-color: var(--paper-menu-button-dropdown-background, var(--primary-background-color));

        @apply --paper-menu-button-content;
      }

      :host([vertical-align="top"]) .dropdown-content {
        margin-bottom: 20px;
        margin-top: -10px;
        top: 10px;
      }

      :host([vertical-align="bottom"]) .dropdown-content {
        bottom: 10px;
        margin-bottom: -10px;
        margin-top: 20px;
      }

      #trigger {
        cursor: pointer;
      }
    </style>

    <div id="trigger" on-tap="toggle">
      <slot name="dropdown-trigger"></slot>
    </div>

    <iron-dropdown id="dropdown" opened="{{opened}}" horizontal-align="[[horizontalAlign]]" vertical-align="[[verticalAlign]]" dynamic-align="[[dynamicAlign]]" horizontal-offset="[[horizontalOffset]]" vertical-offset="[[verticalOffset]]" no-overlap="[[noOverlap]]" open-animation-config="[[openAnimationConfig]]" close-animation-config="[[closeAnimationConfig]]" no-animations="[[noAnimations]]" focus-target="[[_dropdownContent]]" allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" on-iron-overlay-canceled="__onIronOverlayCanceled" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
      <div slot="dropdown-content" class="dropdown-content">
        <slot id="content" name="dropdown-content"></slot>
      </div>
    </iron-dropdown>
`,is:"paper-menu-button",behaviors:[Oo,Di],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:dE.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:dE.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:dE.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,t){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):t!=null&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){Di._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var t=e.detail,r=this.$.trigger,n=zt(t).path;n.indexOf(r)>-1&&e.preventDefault()}});Object.keys(dE).forEach(function(e){Gbe[e]=dE[e]});var vW=document.createElement("template");vW.setAttribute("style","display: none;");vW.innerHTML=`<iron-iconset-svg name="paper-dropdown-menu" size="24">
<svg><defs>
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(vW.content);var xW=document.createElement("template");xW.setAttribute("style","display: none;");xW.innerHTML=`<dom-module id="paper-dropdown-menu-shared-styles">
  <template>
    <style>
      :host {
        display: inline-block;
        position: relative;
        text-align: left;

        /* NOTE(cdata): Both values are needed, since some phones require the
         * value to be \`transparent\`.
         */
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;

        --paper-input-container-input: {
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          max-width: 100%;
          box-sizing: border-box;
          cursor: pointer;
        };

        @apply --paper-dropdown-menu;
      }

      /* paper-dropdown-menu and paper-dropdown-menu-light both delegate focus
       * to other internal elements which manage focus styling. */
      :host(:focus) {
        outline: none;
      }

      :host(:dir(rtl)) {
        text-align: right;

        @apply(--paper-dropdown-menu);
      }

      :host([disabled]) {
        @apply --paper-dropdown-menu-disabled;
      }

      :host([noink]) paper-ripple {
        display: none;
      }

      :host([no-label-float]) paper-ripple {
        top: 8px;
      }

      paper-ripple {
        top: 12px;
        left: 0px;
        bottom: 8px;
        right: 0px;

        @apply --paper-dropdown-menu-ripple;
      }

      paper-menu-button {
        display: block;
        padding: 0;

        @apply --paper-dropdown-menu-button;
      }

      paper-input {
        @apply --paper-dropdown-menu-input;
      }

      iron-icon {
        color: var(--disabled-text-color);

        @apply --paper-dropdown-menu-icon;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(xW.content);var Wbe=Gt(HTMLElement);Yt({_template:Q`
    <style include="paper-dropdown-menu-shared-styles"></style>

    <paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
      <!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> -->
      <div class="dropdown-trigger" slot="dropdown-trigger">
        <paper-ripple></paper-ripple>
        <!-- paper-input has type="text" for a11y, do not remove -->
        <paper-input id="input" type="text" invalid="[[invalid]]" readonly disabled="[[disabled]]" value="[[value]]" placeholder="[[placeholder]]" error-message="[[errorMessage]]" always-float-label="[[alwaysFloatLabel]]" no-label-float="[[noLabelFloat]]" label="[[label]]" input-role="button" input-aria-haspopup="listbox" autocomplete="off">
          <!-- support hybrid mode: user might be using paper-input 1.x which distributes via <content> -->
          <iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix slot="suffix"></iron-icon>
        </paper-input>
      </div>
      <slot id="content" name="dropdown-content" slot="dropdown-content"></slot>
    </paper-menu-button>
`,is:"paper-dropdown-menu",behaviors:[Mh,Di,Th,Ch],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom(e){let t=ue(this);return t.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),Wbe.prototype._attachDom.call(this,e)},focus(){this.$.input._focusableElement.focus()},attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){lgt(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";e?t=e.label||e.getAttribute("label")||e.textContent.trim():t="",this.value=t,this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e,t){return t||(e?-4:8)},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}});var bW=1,P0t=2,P9={outerScroll:{scroll:!0},shadowMode:{standard:P0t,waterfall:bW,"waterfall-tall":bW},tallMode:{"waterfall-tall":!0}};Yt({_template:Q`
    <style>
      :host {
        @apply --layout-vertical;
        position: relative;
        height: 100%;
        @apply --paper-header-panel;
      }

      #mainContainer {
        @apply --layout-flex;
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
      }

      #mainPanel {
        @apply --layout-vertical;
        @apply --layout-flex;
        position: relative;
        min-height: 0;
        @apply --paper-header-panel-body;
      }

      #mainContainer {
        @apply --paper-header-panel-container;
      }

      /*
       * mode: scroll
       */
      :host([mode=scroll]) #mainContainer {
        @apply --paper-header-panel-scroll-container;
        overflow: visible;
      }

      :host([mode=scroll]) {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
      }

      /*
       * mode: cover
       */
      :host([mode=cover]) #mainContainer {
        @apply --paper-header-panel-cover-container;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      }

      :host([mode=cover]) #mainPanel {
        position: static;
      }

      /*
       * mode: standard
       */
      :host([mode=standard]) #mainContainer {
        @apply --paper-header-panel-standard-container;
      }

      /*
       * mode: seamed
       */
      :host([mode=seamed]) #mainContainer {
        @apply --paper-header-panel-seamed-container;
      }


      /*
       * mode: waterfall
       */
      :host([mode=waterfall]) #mainContainer {
        @apply --paper-header-panel-waterfall-container;
      }

      /*
       * mode: waterfall-tall
       */
      :host([mode=waterfall-tall]) #mainContainer {
        @apply --paper-header-panel-waterfall-tall-container;
      }

      #dropShadow {
        transition: opacity 0.5s;
        height: 6px;
        box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
        @apply --paper-header-panel-shadow;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        opacity: 0;
        pointer-events: none;
      }

      #dropShadow.has-shadow {
        opacity: 1;
      }

      #mainContainer > ::slotted(.fit) {
        @apply --layout-fit;
      }

    </style>

    <slot id="headerSlot" name="header"></slot>

    <div id="mainPanel">
      <div id="mainContainer" class\$="[[_computeMainContainerClass(mode)]]">
        <slot></slot>
      </div>
      <div id="dropShadow"></div>
    </div>
`,is:"paper-header-panel",properties:{mode:{type:String,value:"standard",observer:"_modeChanged",reflectToAttribute:!0},shadow:{type:Boolean,value:!1},tallClass:{type:String,value:"tall"},atTop:{type:Boolean,value:!0,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_computeDropShadowHidden(atTop, mode, shadow)"],attached:function(){this._addListener(),this._keepScrollingState()},detached:function(){this._removeListener()},ready:function(){this.scrollHandler=this._scroll.bind(this),console.warn(this.is,"is deprecated. Please use app-layout instead!")},get header(){return zt(this.$.headerSlot).getDistributedNodes()[0]},get scroller(){return this._getScrollerForMode(this.mode)},get visibleShadow(){return this.$.dropShadow.classList.contains("has-shadow")},_computeDropShadowHidden:function(e,t,r){var n=P9.shadowMode[t];this.shadow?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===P0t?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===bW&&!e?this.toggleClass("has-shadow",!0,this.$.dropShadow):this.toggleClass("has-shadow",!1,this.$.dropShadow)},_computeMainContainerClass:function(e){var t={};return t.flex=e!=="cover",Object.keys(t).filter(function(r){return t[r]}).join(" ")},_addListener:function(){this.scroller.addEventListener("scroll",this.scrollHandler)},_removeListener:function(){this.scroller.removeEventListener("scroll",this.scrollHandler)},_modeChanged:function(e,t){var r=P9,n=this.header,i=200;n&&(r.tallMode[t]&&!r.tallMode[e]?(n.classList.remove(this.tallClass),this.async(function(){n.classList.remove("animate")},i)):this.toggleClass("animate",r.tallMode[e],n)),this._keepScrollingState()},_keepScrollingState:function(){var e=this.scroller,t=this.header;this._setAtTop(e.scrollTop===0),t&&this.tallClass&&P9.tallMode[this.mode]&&this.toggleClass(this.tallClass,this.atTop||t.classList.contains(this.tallClass)&&e.scrollHeight<this.offsetHeight,t)},_scroll:function(){this._keepScrollingState(),this.fire("content-scroll",{target:this.scroller},{bubbles:!1})},_getScrollerForMode:function(e){return P9.outerScroll[e]?this:this.$.mainContainer}});Yt({is:"paper-icon-button",_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        padding: 8px;
        outline: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        cursor: pointer;
        z-index: 0;
        line-height: 1;

        width: 40px;
        height: 40px;

        /*
          NOTE: Both values are needed, since some phones require the value to
          be \`transparent\`.
        */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-tap-highlight-color: transparent;

        /* Because of polymer/2558, this style has lower specificity than * */
        box-sizing: border-box !important;

        @apply --paper-icon-button;
      }

      :host #ink {
        color: var(--paper-icon-button-ink-color, var(--primary-text-color));
        opacity: 0.6;
      }

      :host([disabled]) {
        color: var(--paper-icon-button-disabled-text, var(--disabled-text-color));
        pointer-events: none;
        cursor: auto;

        @apply --paper-icon-button-disabled;
      }

      :host([hidden]) {
        display: none !important;
      }

      :host(:hover) {
        @apply --paper-icon-button-hover;
      }

      iron-icon {
        --iron-icon-width: 100%;
        --iron-icon-height: 100%;
      }
    </style>

    <iron-icon id="icon" src="[[src]]" icon="[[icon]]"
               alt$="[[alt]]"></iron-icon>
  `,hostAttributes:{role:"button",tabindex:"0"},behaviors:[jx],registered:function(){this._template.setAttribute("strip-whitespace","")},properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(e,t){var r=this.getAttribute("aria-label");(!r||t==r)&&this.setAttribute("aria-label",e)}});Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        width: 400px;
        border: 1px solid;
        padding: 2px;
        -moz-appearance: textarea;
        -webkit-appearance: textarea;
        overflow: hidden;
      }

      .mirror-text {
        visibility: hidden;
        word-wrap: break-word;
        @apply --iron-autogrow-textarea;
      }

      .fit {
        @apply --layout-fit;
      }

      textarea {
        position: relative;
        outline: none;
        border: none;
        resize: none;
        background: inherit;
        color: inherit;
        /* see comments in template */
        width: 100%;
        height: 100%;
        font-size: inherit;
        font-family: inherit;
        line-height: inherit;
        text-align: inherit;
        @apply --iron-autogrow-textarea;
      }

      textarea::-webkit-input-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea:-moz-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea::-moz-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea:-ms-input-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }
    </style>

    <!-- the mirror sizes the input/textarea so it grows with typing -->
    <!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML -->
    <div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div>

    <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff -->
    <div class="textarea-container fit">
      <textarea id="textarea" name$="[[name]]" aria-label$="[[label]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" autocapitalize$="[[autocapitalize]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea>
    </div>
`,is:"iron-autogrow-textarea",behaviors:[Ch,Di],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},autocapitalize:{type:String,value:"none"},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){var e=navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&!navigator.userAgent.match(/OS 1[3456789]/);e&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&this.value===""?e=!1:this.hasValidator()&&(e=Ch.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;!t||(t.value!==e&&(t.value=e||e===0?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=zt(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],this.maxRows>0&&e.length>this.maxRows?t=e.slice(0,this.maxRows):t=e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+"&#160;"},_valueForMirror:function(){var e=this.textarea;if(!!e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split(`
`):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      :host([hidden]) {
        display: none !important;
      }

      label {
        pointer-events: none;
      }
    </style>

    <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">

      <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>

      <iron-autogrow-textarea class="paper-input-input" slot="input" id$="[[_inputId]]" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea>

      <template is="dom-if" if="[[errorMessage]]">
        <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>
      </template>

      <template is="dom-if" if="[[charCounter]]">
        <paper-input-char-counter slot="add-on"></paper-input-char-counter>
      </template>

    </paper-input-container>
`,is:"paper-textarea",behaviors:[A9,Th],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(e){this.$.input.textarea.selectionStart=e},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(e){this.$.input.textarea.selectionEnd=e},_ariaLabelledByChanged:function(e){this._focusableElement.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this._focusableElement.setAttribute("aria-describedby",e)},get _focusableElement(){return this.inputElement.textarea}});var wW=document.createElement("template");wW.setAttribute("style","display: none;");wW.innerHTML=`<dom-module id="paper-item-shared-styles">
  <template>
    <style>
      :host, .paper-item {
        display: block;
        position: relative;
        min-height: var(--paper-item-min-height, 48px);
        padding: 0px 16px;
      }

      .paper-item {
        @apply --paper-font-subhead;
        border:none;
        outline: none;
        background: white;
        width: 100%;
        text-align: left;
      }

      :host([hidden]), .paper-item[hidden] {
        display: none !important;
      }

      :host(.iron-selected), .paper-item.iron-selected {
        font-weight: var(--paper-item-selected-weight, bold);

        @apply --paper-item-selected;
      }

      :host([disabled]), .paper-item[disabled] {
        color: var(--paper-item-disabled-color, var(--disabled-text-color));

        @apply --paper-item-disabled;
      }

      :host(:focus), .paper-item:focus {
        position: relative;
        outline: 0;

        @apply --paper-item-focused;
      }

      :host(:focus):before, .paper-item:focus:before {
        @apply --layout-fit;

        background: currentColor;
        content: '';
        opacity: var(--dark-divider-opacity);
        pointer-events: none;

        @apply --paper-item-focused-before;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(wW.content);var Ybe={hostAttributes:{role:"option",tabindex:"0"}},I9=[Mh,Di,Ybe];Yt({_template:Q`
    <style include="paper-item-shared-styles">
      :host {
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-subhead;

        @apply --paper-item;
      }
    </style>
    <slot></slot>
`,is:"paper-item",behaviors:[I9]});Yt({_template:Q`
    <style>
      :host {
        overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
        @apply --layout-vertical;
        @apply --layout-center-justified;
        @apply --layout-flex;
      }

      :host([two-line]) {
        min-height: var(--paper-item-body-two-line-min-height, 72px);
      }

      :host([three-line]) {
        min-height: var(--paper-item-body-three-line-min-height, 88px);
      }

      :host > ::slotted(*) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      :host > ::slotted([secondary]) {
        @apply --paper-font-body1;

        color: var(--paper-item-body-secondary-color, var(--secondary-text-color));

        @apply --paper-item-body-secondary;
      }
    </style>

    <slot></slot>
`,is:"paper-item-body"});Yt({_template:Q`
    <style include="paper-item-shared-styles"></style>
    <style>
      :host {
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-subhead;

        @apply --paper-item;
        @apply --paper-icon-item;
      }

      .content-icon {
        @apply --layout-horizontal;
        @apply --layout-center;

        width: var(--paper-item-icon-width, 56px);
        @apply --paper-item-icon;
      }
    </style>

    <div id="contentIcon" class="content-icon">
      <slot name="item-icon"></slot>
    </div>
    <slot></slot>
`,is:"paper-icon-item",behaviors:[I9]});var SW={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return this.selected!=null||this.selectedValues!=null&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return e!=null},this)):Sh._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter(function(i){return i!=null});this._selection.clear(t);for(var r=0;r<t.length;r++)this._selection.setItemSelected(t[r],!0);if(this.fallbackSelection&&!this._selection.get().length){var n=this._valueToItem(this.fallbackSelection);n&&this.select(this.fallbackSelection)}},_selectionChange:function(){var e=this._selection.get();this.multi?(this._setSelectedItems(e),this._setSelectedItem(e.length?e[0]:null)):e!=null?(this._setSelectedItems([e]),this._setSelectedItem(e)):(this._setSelectedItems([]),this._setSelectedItem(null))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e),r=t<0;r?this.push("selectedValues",e):this.splice("selectedValues",t,1)},_valuesToItems:function(e){return e==null?null:e.map(function(t){return this._valueToItem(t)},this)}},I0t=[Sh,SW];var y_={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"],_SEARCH_RESET_TIMEOUT_MS:1e3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),SW.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(t){t.setAttribute("tabindex",t===e?"0":"-1"),t.setAttribute("aria-selected",this._selection.isSelected(t))},this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){if(this._MODIFIER_KEYS.indexOf(e.key)===-1){this.cancelDebouncer("_clearSearchText");var t=this._searchText||"",r=e.key&&e.key.length==1?e.key:String.fromCharCode(e.keyCode);t+=r.toLocaleLowerCase();for(var n=t.length,i=0,o;o=this.items[i];i++)if(!o.hasAttribute("disabled")){var a=this.attrForItemTitle||"textContent",s=(o[a]||o.getAttribute(a)||"").trim();if(!(s.length<n)&&s.slice(0,n).toLocaleLowerCase()==t){this._setFocusedItem(o);break}}this._searchText=t,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),r=1;r<e+1;r++){var n=this.items[(t-r+e)%e];if(!n.hasAttribute("disabled")){var i=zt(n).getOwnerRoot()||document;if(this._setFocusedItem(n),zt(i).activeElement==n)return}}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),r=1;r<e+1;r++){var n=this.items[(t+r)%e];if(!n.hasAttribute("disabled")){var i=zt(n).getOwnerRoot()||document;if(this._setFocusedItem(n),zt(i).activeElement==n)return}}},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.setAttribute("aria-selected","false"),Sh._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),e&&!e.hasAttribute("disabled")&&!this.disabled&&(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){e.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");y_._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),y_._shiftTabPressed=!1},1)},_onFocus:function(e){if(!y_._shiftTabPressed){var t=zt(e).rootTarget;t!==this&&typeof t.tabIndex!="undefined"&&!this.isLightDescendant(t)||(this._defaultFocusAsync=this.async(function(){var r=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),r?this._setFocusedItem(r):this.items[0]&&this._focusNext()}))}},_onUpKey:function(e){this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onEscKey:function(e){var t=this.focusedItem;t&&t.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e),e.stopPropagation()},_activateHandler:function(e){Sh._activateHandler.call(this,e),e.stopPropagation()},_disabledChanged:function(e){e?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)}};y_._shiftTabPressed=!1;var L9=[I0t,Oo,y_];Yt({_template:Q`
    <style>
      :host {
        display: block;
        padding: 8px 0;

        background: var(--paper-listbox-background-color, var(--primary-background-color));
        color: var(--paper-listbox-color, var(--primary-text-color));

        @apply --paper-listbox;
      }
    </style>

    <slot></slot>
`,is:"paper-listbox",behaviors:[L9],hostAttributes:{role:"listbox"}});var L0t=Q`
<dom-module id="paper-material-shared-styles">
  <template>
    <style>
      :host {
        display: block;
        position: relative;
      }

      :host([elevation="1"]) {
        @apply --shadow-elevation-2dp;
      }

      :host([elevation="2"]) {
        @apply --shadow-elevation-4dp;
      }

      :host([elevation="3"]) {
        @apply --shadow-elevation-6dp;
      }

      :host([elevation="4"]) {
        @apply --shadow-elevation-8dp;
      }

      :host([elevation="5"]) {
        @apply --shadow-elevation-16dp;
      }
    </style>
  </template>
</dom-module>
`;L0t.setAttribute("style","display: none;");document.body.appendChild(L0t.content);Yt({_template:Q`
    <style include="paper-material-shared-styles"></style>
    <style>
      :host([animated]) {
        @apply --shadow-transition;
      }
      :host {
        @apply --paper-material;
      }
    </style>

    <slot></slot>
`,is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});var k9={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(e){return(this._clampValue(e)-this.min)/(this.max-this.min)},_clampValue:function(e){return Math.min(this.max,Math.max(this.min,this._calcStep(e)))},_calcStep:function(e){if(e=parseFloat(e),!this.step)return e;var t=Math.round((e-this.min)/this.step);return this.step<1?t/(1/this.step)+this.min:t*this.step+this.min},_validateValue:function(){var e=this._clampValue(this.value);return this.value=this.oldValue=isNaN(e)?this.oldValue:e,this.value!==e},_update:function(){this._validateValue(),this._setRatio(this._calcRatio(this.value)*100)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        width: 200px;
        position: relative;
        overflow: hidden;
      }

      :host([hidden]), [hidden] {
        display: none !important;
      }

      #progressContainer {
        @apply --paper-progress-container;
        position: relative;
      }

      #progressContainer,
      /* the stripe for the indeterminate animation*/
      .indeterminate::after {
        height: var(--paper-progress-height, 4px);
      }

      #primaryProgress,
      #secondaryProgress,
      .indeterminate::after {
        @apply --layout-fit;
      }

      #progressContainer,
      .indeterminate::after {
        background: var(--paper-progress-container-color, var(--google-grey-300));
      }

      :host(.transiting) #primaryProgress,
      :host(.transiting) #secondaryProgress {
        -webkit-transition-property: -webkit-transform;
        transition-property: transform;

        /* Duration */
        -webkit-transition-duration: var(--paper-progress-transition-duration, 0.08s);
        transition-duration: var(--paper-progress-transition-duration, 0.08s);

        /* Timing function */
        -webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
        transition-timing-function: var(--paper-progress-transition-timing-function, ease);

        /* Delay */
        -webkit-transition-delay: var(--paper-progress-transition-delay, 0s);
        transition-delay: var(--paper-progress-transition-delay, 0s);
      }

      #primaryProgress,
      #secondaryProgress {
        @apply --layout-fit;
        -webkit-transform-origin: left center;
        transform-origin: left center;
        -webkit-transform: scaleX(0);
        transform: scaleX(0);
        will-change: transform;
      }

      #primaryProgress {
        background: var(--paper-progress-active-color, var(--google-green-500));
      }

      #secondaryProgress {
        background: var(--paper-progress-secondary-color, var(--google-green-100));
      }

      :host([disabled]) #primaryProgress {
        background: var(--paper-progress-disabled-active-color, var(--google-grey-500));
      }

      :host([disabled]) #secondaryProgress {
        background: var(--paper-progress-disabled-secondary-color, var(--google-grey-300));
      }

      :host(:not([disabled])) #primaryProgress.indeterminate {
        -webkit-transform-origin: right center;
        transform-origin: right center;
        -webkit-animation: indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
        animation: indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
      }

      :host(:not([disabled])) #primaryProgress.indeterminate::after {
        content: "";
        -webkit-transform-origin: center center;
        transform-origin: center center;

        -webkit-animation: indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
        animation: indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
      }

      @-webkit-keyframes indeterminate-bar {
        0% {
          -webkit-transform: scaleX(1) translateX(-100%);
        }
        50% {
          -webkit-transform: scaleX(1) translateX(0%);
        }
        75% {
          -webkit-transform: scaleX(1) translateX(0%);
          -webkit-animation-timing-function: cubic-bezier(.28,.62,.37,.91);
        }
        100% {
          -webkit-transform: scaleX(0) translateX(0%);
        }
      }

      @-webkit-keyframes indeterminate-splitter {
        0% {
          -webkit-transform: scaleX(.75) translateX(-125%);
        }
        30% {
          -webkit-transform: scaleX(.75) translateX(-125%);
          -webkit-animation-timing-function: cubic-bezier(.42,0,.6,.8);
        }
        90% {
          -webkit-transform: scaleX(.75) translateX(125%);
        }
        100% {
          -webkit-transform: scaleX(.75) translateX(125%);
        }
      }

      @keyframes indeterminate-bar {
        0% {
          transform: scaleX(1) translateX(-100%);
        }
        50% {
          transform: scaleX(1) translateX(0%);
        }
        75% {
          transform: scaleX(1) translateX(0%);
          animation-timing-function: cubic-bezier(.28,.62,.37,.91);
        }
        100% {
          transform: scaleX(0) translateX(0%);
        }
      }

      @keyframes indeterminate-splitter {
        0% {
          transform: scaleX(.75) translateX(-125%);
        }
        30% {
          transform: scaleX(.75) translateX(-125%);
          animation-timing-function: cubic-bezier(.42,0,.6,.8);
        }
        90% {
          transform: scaleX(.75) translateX(125%);
        }
        100% {
          transform: scaleX(.75) translateX(125%);
        }
      }
    </style>

    <div id="progressContainer">
      <div id="secondaryProgress" hidden\$="[[_hideSecondaryProgress(secondaryRatio)]]"></div>
      <div id="primaryProgress"></div>
    </div>
`,is:"paper-progress",behaviors:[k9],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(e){this.toggleClass("indeterminate",e,this.$.primaryProgress)},_transformProgress:function(e,t){var r="scaleX("+t/100+")";e.style.transform=e.style.webkitTransform=r},_mainRatioChanged:function(e){this._transformProgress(this.$.primaryProgress,e)},_progressChanged:function(e,t,r,n,i){e=this._clampValue(e),t=this._clampValue(t);var o=this._calcRatio(e)*100,a=this._calcRatio(t)*100;this._setSecondaryRatio(o),this._transformProgress(this.$.secondaryProgress,o),this._transformProgress(this.$.primaryProgress,a),this.secondaryProgress=e,i?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",t),this.setAttribute("aria-valuemin",r),this.setAttribute("aria-valuemax",n)},_disabledChanged:function(e){this.setAttribute("aria-disabled",e?"true":"false")},_hideSecondaryProgress:function(e){return e===0}});var k0t=Q`
<style>
  :host {
    display: inline-block;
    line-height: 0;
    white-space: nowrap;
    cursor: pointer;
    @apply --paper-font-common-base;
    --calculated-paper-radio-button-size: var(--paper-radio-button-size, 16px);
    /* -1px is a sentinel for the default and is replace in \`attached\`. */
    --calculated-paper-radio-button-ink-size: var(--paper-radio-button-ink-size, -1px);
  }

  :host(:focus) {
    outline: none;
  }

  #radioContainer {
    @apply --layout-inline;
    @apply --layout-center-center;
    position: relative;
    width: var(--calculated-paper-radio-button-size);
    height: var(--calculated-paper-radio-button-size);
    vertical-align: middle;

    @apply --paper-radio-button-radio-container;
  }

  #ink {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: var(--calculated-paper-radio-button-ink-size);
    height: var(--calculated-paper-radio-button-ink-size);
    color: var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));
    opacity: 0.6;
    pointer-events: none;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
  }

  #ink[checked] {
    color: var(--paper-radio-button-checked-ink-color, var(--primary-color));
  }

  #offRadio, #onRadio {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
  }

  #offRadio {
    border: 2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    background-color: var(--paper-radio-button-unchecked-background-color, transparent);
    transition: border-color 0.28s;
  }

  #onRadio {
    background-color: var(--paper-radio-button-checked-color, var(--primary-color));
    -webkit-transform: scale(0);
    transform: scale(0);
    transition: -webkit-transform ease 0.28s;
    transition: transform ease 0.28s;
    will-change: transform;
  }

  :host([checked]) #offRadio {
    border-color: var(--paper-radio-button-checked-color, var(--primary-color));
  }

  :host([checked]) #onRadio {
    -webkit-transform: scale(0.5);
    transform: scale(0.5);
  }

  #radioLabel {
    line-height: normal;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--paper-radio-button-label-spacing, 10px);
    white-space: normal;
    color: var(--paper-radio-button-label-color, var(--primary-text-color));

    @apply --paper-radio-button-label;
  }

  :host([checked]) #radioLabel {
    @apply --paper-radio-button-label-checked;
  }

  #radioLabel:dir(rtl) {
    margin-left: 0;
    margin-right: var(--paper-radio-button-label-spacing, 10px);
  }

  #radioLabel[hidden] {
    display: none;
  }

  /* disabled state */

  :host([disabled]) #offRadio {
    border-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled][checked]) #onRadio {
    background-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled]) #radioLabel {
    /* slightly darker than the button, so that it's readable */
    opacity: 0.65;
  }
</style>

<div id="radioContainer">
  <div id="offRadio"></div>
  <div id="onRadio"></div>
</div>

<div id="radioLabel"><slot></slot></div>`;k0t.setAttribute("strip-whitespace","");Yt({_template:k0t,is:"paper-radio-button",behaviors:[Xx],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){Cm(this,function(){var e=this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim();if(e==="-1px"){var t=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),r=Math.floor(3*t);r%2!==t%2&&r++,this.updateStyles({"--paper-radio-button-ink-size":r+"px"})}})}});var R9={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return window.getComputedStyle(this).direction==="rtl"},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},N9=[L9,R9];Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
      }

      :host ::slotted(*) {
        padding: var(--paper-radio-group-item-padding, 12px);
      }
    </style>

    <slot></slot>
`,is:"paper-radio-group",behaviors:[N9],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!(t&&t.hasAttribute("disabled"))){if(this.selected){var r=this._valueToItem(this.selected);if(this.selected==e)if(this.allowEmptySelection)e="";else{r&&(r.checked=!0);return}r&&(r.checked=!1)}Sh.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){R9._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){R9._onRightKey.apply(this,arguments),this._activateFocusedItem()}});var R0t=Q`
  <style>
    :host {
      @apply --layout;
      @apply --layout-justified;
      @apply --layout-center;
      width: 200px;
      cursor: default;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      --paper-progress-active-color: var(--paper-slider-active-color, var(--google-blue-700));
      --paper-progress-secondary-color: var(--paper-slider-secondary-color, var(--google-blue-300));
      --paper-progress-disabled-active-color: var(--paper-slider-disabled-active-color, var(--paper-grey-400));
      --paper-progress-disabled-secondary-color: var(--paper-slider-disabled-secondary-color, var(--paper-grey-400));
      --calculated-paper-slider-height: var(--paper-slider-height, 2px);
    }

    /* focus shows the ripple */
    :host(:focus) {
      outline: none;
    }

    /**
      * NOTE(keanulee): Though :host-context is not universally supported, some pages
      * still rely on paper-slider being flipped when dir="rtl" is set on body. For full
      * compatibility, dir="rtl" must be explicitly set on paper-slider.
      */
    :dir(rtl) #sliderContainer {
      -webkit-transform: scaleX(-1);
      transform: scaleX(-1);
    }

    /**
      * NOTE(keanulee): This is separate from the rule above because :host-context may
      * not be recognized.
      */
    :host([dir="rtl"]) #sliderContainer {
      -webkit-transform: scaleX(-1);
      transform: scaleX(-1);
    }

    /**
      * NOTE(keanulee): Needed to override the :host-context rule (where supported)
      * to support LTR sliders in RTL pages.
      */
    :host([dir="ltr"]) #sliderContainer {
      -webkit-transform: scaleX(1);
      transform: scaleX(1);
    }

    #sliderContainer {
      position: relative;
      width: 100%;
      height: calc(30px + var(--calculated-paper-slider-height));
      margin-left: calc(15px + var(--calculated-paper-slider-height)/2);
      margin-right: calc(15px + var(--calculated-paper-slider-height)/2);
    }

    #sliderContainer:focus {
      outline: 0;
    }

    #sliderContainer.editable {
      margin-top: 12px;
      margin-bottom: 12px;
    }

    .bar-container {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      overflow: hidden;
    }

    .ring > .bar-container {
      left: calc(5px + var(--calculated-paper-slider-height)/2);
      transition: left 0.18s ease;
    }

    .ring.expand.dragging > .bar-container {
      transition: none;
    }

    .ring.expand:not(.pin) > .bar-container {
      left: calc(8px + var(--calculated-paper-slider-height)/2);
    }

    #sliderBar {
      padding: 15px 0;
      width: 100%;
      background-color: var(--paper-slider-bar-color, transparent);
      --paper-progress-container-color: var(--paper-slider-container-color, var(--paper-grey-400));
      --paper-progress-height: var(--calculated-paper-slider-height);
    }

    .slider-markers {
      position: absolute;
      /* slider-knob is 30px + the slider-height so that the markers should start at a offset of 15px*/
      top: 15px;
      height: var(--calculated-paper-slider-height);
      left: 0;
      right: -1px;
      box-sizing: border-box;
      pointer-events: none;
      @apply --layout-horizontal;
    }

    .slider-marker {
      @apply --layout-flex;
    }
    .slider-markers::after,
    .slider-marker::after {
      content: "";
      display: block;
      margin-left: -1px;
      width: 2px;
      height: var(--calculated-paper-slider-height);
      border-radius: 50%;
      background-color: var(--paper-slider-markers-color, #000);
    }

    .slider-knob {
      position: absolute;
      left: 0;
      top: 0;
      margin-left: calc(-15px - var(--calculated-paper-slider-height)/2);
      width: calc(30px + var(--calculated-paper-slider-height));
      height: calc(30px + var(--calculated-paper-slider-height));
    }

    .transiting > .slider-knob {
      transition: left 0.08s ease;
    }

    .slider-knob:focus {
      outline: none;
    }

    .slider-knob.dragging {
      transition: none;
    }

    .snaps > .slider-knob.dragging {
      transition: -webkit-transform 0.08s ease;
      transition: transform 0.08s ease;
    }

    .slider-knob-inner {
      margin: 10px;
      width: calc(100% - 20px);
      height: calc(100% - 20px);
      background-color: var(--paper-slider-knob-color, var(--google-blue-700));
      border: 2px solid var(--paper-slider-knob-color, var(--google-blue-700));
      border-radius: 50%;

      -moz-box-sizing: border-box;
      box-sizing: border-box;

      transition-property: -webkit-transform, background-color, border;
      transition-property: transform, background-color, border;
      transition-duration: 0.18s;
      transition-timing-function: ease;
    }

    .expand:not(.pin) > .slider-knob > .slider-knob-inner {
      -webkit-transform: scale(1.5);
      transform: scale(1.5);
    }

    .ring > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-knob-start-color, transparent);
      border: 2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));
    }

    .slider-knob-inner::before {
      background-color: var(--paper-slider-pin-color, var(--google-blue-700));
    }

    .pin > .slider-knob > .slider-knob-inner::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      margin-left: -13px;
      width: 26px;
      height: 26px;
      border-radius: 50% 50% 50% 0;

      -webkit-transform: rotate(-45deg) scale(0) translate(0);
      transform: rotate(-45deg) scale(0) translate(0);
    }

    .slider-knob-inner::before,
    .slider-knob-inner::after {
      transition: -webkit-transform .18s ease, background-color .18s ease;
      transition: transform .18s ease, background-color .18s ease;
    }

    .pin.ring > .slider-knob > .slider-knob-inner::before {
      background-color: var(--paper-slider-pin-start-color, var(--paper-grey-400));
    }

    .pin.expand > .slider-knob > .slider-knob-inner::before {
      -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px);
      transform: rotate(-45deg) scale(1) translate(17px, -17px);
    }

    .pin > .slider-knob > .slider-knob-inner::after {
      content: attr(value);
      position: absolute;
      top: 0;
      left: 50%;
      margin-left: -16px;
      width: 32px;
      height: 26px;
      text-align: center;
      color: var(--paper-slider-font-color, #fff);
      font-size: 10px;

      -webkit-transform: scale(0) translate(0);
      transform: scale(0) translate(0);
    }

    .pin.expand > .slider-knob > .slider-knob-inner::after {
      -webkit-transform: scale(1) translate(0, -17px);
      transform: scale(1) translate(0, -17px);
    }

    /* paper-input */
    .slider-input {
      width: 50px;
      overflow: hidden;
      --paper-input-container-input: {
        text-align: center;
        @apply --paper-slider-input-container-input;
      };
      @apply --paper-slider-input;
    }

    /* disabled state */
    #sliderContainer.disabled {
      pointer-events: none;
    }

    .disabled > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-disabled-knob-color, var(--paper-grey-400));
      border: 2px solid var(--paper-slider-disabled-knob-color, var(--paper-grey-400));
      -webkit-transform: scale3d(0.75, 0.75, 1);
      transform: scale3d(0.75, 0.75, 1);
    }

    .disabled.ring > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-knob-start-color, transparent);
      border: 2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));
    }

    paper-ripple {
      color: var(--paper-slider-knob-color, var(--google-blue-700));
    }
  </style>

  <div id="sliderContainer" class\$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]">
    <div class="bar-container">
      <paper-progress disabled\$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_bartrack" on-tap="_barclick">
      </paper-progress>
    </div>

    <template is="dom-if" if="[[snaps]]">
      <div class="slider-markers">
        <template is="dom-repeat" items="[[markers]]">
          <div class="slider-marker"></div>
        </template>
      </div>
    </template>

    <div id="sliderKnob" class="slider-knob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
        <div class="slider-knob-inner" value\$="[[immediateValue]]"></div>
    </div>
  </div>

  <template is="dom-if" if="[[editable]]">
    <paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled\$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float>
    </paper-input>
  </template>
`;R0t.setAttribute("strip-whitespace","");Yt({_template:R0t,is:"paper-slider",behaviors:[Oo,Th,jx,k9],properties:{value:{type:Number,value:0},snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},ignoreBarTouch:{type:Boolean,value:!1},dragging:{type:Boolean,value:!1,readOnly:!0,notify:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},ready:function(){this.ignoreBarTouch&&m_(this.$.sliderBar,"auto")},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(e,t,r,n,i){this.setAttribute("aria-valuemin",t),this.setAttribute("aria-valuemax",r),this.setAttribute("aria-valuenow",e),this._positionKnob(this._calcRatio(e)*100)},_valueChanged:function(){this.fire("value-change",{composed:!0})},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(e){this._setImmediateValue(this._calcStep(this._calcKnobPosition(e))),this._setRatio(this._calcRatio(this.immediateValue)*100),this.$.sliderKnob.style.left=this.ratio+"%",this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))},_calcKnobPosition:function(e){return(this.max-this.min)*e/100+this.min},_onTrack:function(e){switch(e.stopPropagation(),e.detail.state){case"start":this._trackStart(e);break;case"track":this._trackX(e);break;case"end":this._trackEnd();break}},_trackStart:function(e){this._setTransiting(!1),this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w/100,this._startx=this._x,this._knobstartx=this._startx,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(e){this.dragging||this._trackStart(e);var t=this._isRTL?-1:1,r=Math.min(this._maxx,Math.max(this._minx,e.detail.dx*t));this._x=this._startx+r;var n=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(n);var i=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(i+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var e=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,e.transform=e.webkitTransform="",this.fire("change",{composed:!0})},_knobdown:function(e){this._expandKnob(),e.preventDefault(),this.focus()},_bartrack:function(e){this._allowBarEvent(e)&&this._onTrack(e)},_barclick:function(e){this._w=this.$.sliderBar.offsetWidth;var t=this.$.sliderBar.getBoundingClientRect(),r=(e.detail.x-t.left)/this._w*100;this._isRTL&&(r=100-r);var n=this.ratio;this._setTransiting(!0),this._positionKnob(r),n===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change",{composed:!0})}),e.preventDefault(),this.focus()},_bardown:function(e){this._allowBarEvent(e)&&(this.debounce("expandKnob",this._expandKnob,60),this._barclick(e))},_knobTransitionEnd:function(e){e.target===this.$.sliderKnob&&this._setTransiting(!1)},_updateMarkers:function(e,t,r,n){n||this._setMarkers([]);var i=Math.round((r-t)/this.step);i>e&&(i=e),(i<0||!isFinite(i))&&(i=0),this._setMarkers(new Array(i))},_mergeClasses:function(e){return Object.keys(e).filter(function(t){return e[t]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},_allowBarEvent:function(e){return!this.ignoreBarTouch||e.detail.sourceEvent instanceof MouseEvent},get _isRTL(){return this.__isRTL===void 0&&(this.__isRTL=window.getComputedStyle(this).direction==="rtl"),this.__isRTL},_leftKey:function(e){this._isRTL?this._incrementKey(e):this._decrementKey(e)},_rightKey:function(e){this._isRTL?this._decrementKey(e):this._incrementKey(e)},_incrementKey:function(e){this.disabled||(e.detail.key==="end"?this.value=this.max:this.increment(),this.fire("change"),e.preventDefault())},_decrementKey:function(e){this.disabled||(e.detail.key==="home"?this.value=this.min:this.decrement(),this.fire("change"),e.preventDefault())},_changeValue:function(e){this.value=e.target.value,this.fire("change",{composed:!0})},_inputKeyDown:function(e){e.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,pE._createRipple.call(this)},_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(e?this._ripple.style.display="":this._ripple.style.display="none",this._ripple.holdDown=e)}});var MW=document.createElement("template");MW.setAttribute("style","display: none;");MW.innerHTML=`<dom-module id="paper-spinner-styles">
  <template>
    <style>
      /*
      /**************************/
      /* STYLES FOR THE SPINNER */
      /**************************/

      /*
       * Constants:
       *      ARCSIZE     = 270 degrees (amount of circle the arc takes up)
       *      ARCTIME     = 1333ms (time it takes to expand and contract arc)
       *      ARCSTARTROT = 216 degrees (how much the start location of the arc
       *                                should rotate each time, 216 gives us a
       *                                5 pointed star shape (it's 360/5 * 3).
       *                                For a 7 pointed star, we might do
       *                                360/7 * 3 = 154.286)
       *      SHRINK_TIME = 400ms
       */

      :host {
        display: inline-block;
        position: relative;
        width: 28px;
        height: 28px;

        /* 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
        --paper-spinner-container-rotation-duration: 1568ms;

        /* ARCTIME */
        --paper-spinner-expand-contract-duration: 1333ms;

        /* 4 * ARCTIME */
        --paper-spinner-full-cycle-duration: 5332ms;

        /* SHRINK_TIME */
        --paper-spinner-cooldown-duration: 400ms;
      }

      #spinnerContainer {
        width: 100%;
        height: 100%;

        /* The spinner does not have any contents that would have to be
         * flipped if the direction changes. Always use ltr so that the
         * style works out correctly in both cases. */
        direction: ltr;
      }

      #spinnerContainer.active {
        -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
        animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
      }

      @-webkit-keyframes container-rotate {
        to { -webkit-transform: rotate(360deg) }
      }

      @keyframes container-rotate {
        to { transform: rotate(360deg) }
      }

      .spinner-layer {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        white-space: nowrap;
        color: var(--paper-spinner-color, var(--google-blue-500));
      }

      .layer-1 {
        color: var(--paper-spinner-layer-1-color, var(--google-blue-500));
      }

      .layer-2 {
        color: var(--paper-spinner-layer-2-color, var(--google-red-500));
      }

      .layer-3 {
        color: var(--paper-spinner-layer-3-color, var(--google-yellow-500));
      }

      .layer-4 {
        color: var(--paper-spinner-layer-4-color, var(--google-green-500));
      }

      /**
       * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
       *
       * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
       * guarantee that the animation will start _exactly_ after that value. So we avoid using
       * animation-delay and instead set custom keyframes for each color (as layer-2undant as it
       * seems).
       */
      .active .spinner-layer {
        -webkit-animation-name: fill-unfill-rotate;
        -webkit-animation-duration: var(--paper-spinner-full-cycle-duration);
        -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        -webkit-animation-iteration-count: infinite;
        animation-name: fill-unfill-rotate;
        animation-duration: var(--paper-spinner-full-cycle-duration);
        animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        animation-iteration-count: infinite;
        opacity: 1;
      }

      .active .spinner-layer.layer-1 {
        -webkit-animation-name: fill-unfill-rotate, layer-1-fade-in-out;
        animation-name: fill-unfill-rotate, layer-1-fade-in-out;
      }

      .active .spinner-layer.layer-2 {
        -webkit-animation-name: fill-unfill-rotate, layer-2-fade-in-out;
        animation-name: fill-unfill-rotate, layer-2-fade-in-out;
      }

      .active .spinner-layer.layer-3 {
        -webkit-animation-name: fill-unfill-rotate, layer-3-fade-in-out;
        animation-name: fill-unfill-rotate, layer-3-fade-in-out;
      }

      .active .spinner-layer.layer-4 {
        -webkit-animation-name: fill-unfill-rotate, layer-4-fade-in-out;
        animation-name: fill-unfill-rotate, layer-4-fade-in-out;
      }

      @-webkit-keyframes fill-unfill-rotate {
        12.5% { -webkit-transform: rotate(135deg) } /* 0.5 * ARCSIZE */
        25%   { -webkit-transform: rotate(270deg) } /* 1   * ARCSIZE */
        37.5% { -webkit-transform: rotate(405deg) } /* 1.5 * ARCSIZE */
        50%   { -webkit-transform: rotate(540deg) } /* 2   * ARCSIZE */
        62.5% { -webkit-transform: rotate(675deg) } /* 2.5 * ARCSIZE */
        75%   { -webkit-transform: rotate(810deg) } /* 3   * ARCSIZE */
        87.5% { -webkit-transform: rotate(945deg) } /* 3.5 * ARCSIZE */
        to    { -webkit-transform: rotate(1080deg) } /* 4   * ARCSIZE */
      }

      @keyframes fill-unfill-rotate {
        12.5% { transform: rotate(135deg) } /* 0.5 * ARCSIZE */
        25%   { transform: rotate(270deg) } /* 1   * ARCSIZE */
        37.5% { transform: rotate(405deg) } /* 1.5 * ARCSIZE */
        50%   { transform: rotate(540deg) } /* 2   * ARCSIZE */
        62.5% { transform: rotate(675deg) } /* 2.5 * ARCSIZE */
        75%   { transform: rotate(810deg) } /* 3   * ARCSIZE */
        87.5% { transform: rotate(945deg) } /* 3.5 * ARCSIZE */
        to    { transform: rotate(1080deg) } /* 4   * ARCSIZE */
      }

      @-webkit-keyframes layer-1-fade-in-out {
        0% { opacity: 1 }
        25% { opacity: 1 }
        26% { opacity: 0 }
        89% { opacity: 0 }
        90% { opacity: 1 }
        to { opacity: 1 }
      }

      @keyframes layer-1-fade-in-out {
        0% { opacity: 1 }
        25% { opacity: 1 }
        26% { opacity: 0 }
        89% { opacity: 0 }
        90% { opacity: 1 }
        to { opacity: 1 }
      }

      @-webkit-keyframes layer-2-fade-in-out {
        0% { opacity: 0 }
        15% { opacity: 0 }
        25% { opacity: 1 }
        50% { opacity: 1 }
        51% { opacity: 0 }
        to { opacity: 0 }
      }

      @keyframes layer-2-fade-in-out {
        0% { opacity: 0 }
        15% { opacity: 0 }
        25% { opacity: 1 }
        50% { opacity: 1 }
        51% { opacity: 0 }
        to { opacity: 0 }
      }

      @-webkit-keyframes layer-3-fade-in-out {
        0% { opacity: 0 }
        40% { opacity: 0 }
        50% { opacity: 1 }
        75% { opacity: 1 }
        76% { opacity: 0 }
        to { opacity: 0 }
      }

      @keyframes layer-3-fade-in-out {
        0% { opacity: 0 }
        40% { opacity: 0 }
        50% { opacity: 1 }
        75% { opacity: 1 }
        76% { opacity: 0 }
        to { opacity: 0 }
      }

      @-webkit-keyframes layer-4-fade-in-out {
        0% { opacity: 0 }
        65% { opacity: 0 }
        75% { opacity: 1 }
        90% { opacity: 1 }
        to { opacity: 0 }
      }

      @keyframes layer-4-fade-in-out {
        0% { opacity: 0 }
        65% { opacity: 0 }
        75% { opacity: 1 }
        90% { opacity: 1 }
        to { opacity: 0 }
      }

      .circle-clipper {
        display: inline-block;
        position: relative;
        width: 50%;
        height: 100%;
        overflow: hidden;
      }

      /**
       * Patch the gap that appear between the two adjacent div.circle-clipper while the
       * spinner is rotating (appears on Chrome 50, Safari 9.1.1, and Edge).
       */
      .spinner-layer::after {
        content: '';
        left: 45%;
        width: 10%;
        border-top-style: solid;
      }

      .spinner-layer::after,
      .circle-clipper .circle {
        box-sizing: border-box;
        position: absolute;
        top: 0;
        border-width: var(--paper-spinner-stroke-width, 3px);
        border-radius: 50%;
      }

      .circle-clipper .circle {
        bottom: 0;
        width: 200%;
        border-style: solid;
        border-bottom-color: transparent !important;
      }

      .circle-clipper.left .circle {
        left: 0;
        border-right-color: transparent !important;
        -webkit-transform: rotate(129deg);
        transform: rotate(129deg);
      }

      .circle-clipper.right .circle {
        left: -100%;
        border-left-color: transparent !important;
        -webkit-transform: rotate(-129deg);
        transform: rotate(-129deg);
      }

      .active .gap-patch::after,
      .active .circle-clipper .circle {
        -webkit-animation-duration: var(--paper-spinner-expand-contract-duration);
        -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        -webkit-animation-iteration-count: infinite;
        animation-duration: var(--paper-spinner-expand-contract-duration);
        animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        animation-iteration-count: infinite;
      }

      .active .circle-clipper.left .circle {
        -webkit-animation-name: left-spin;
        animation-name: left-spin;
      }

      .active .circle-clipper.right .circle {
        -webkit-animation-name: right-spin;
        animation-name: right-spin;
      }

      @-webkit-keyframes left-spin {
        0% { -webkit-transform: rotate(130deg) }
        50% { -webkit-transform: rotate(-5deg) }
        to { -webkit-transform: rotate(130deg) }
      }

      @keyframes left-spin {
        0% { transform: rotate(130deg) }
        50% { transform: rotate(-5deg) }
        to { transform: rotate(130deg) }
      }

      @-webkit-keyframes right-spin {
        0% { -webkit-transform: rotate(-130deg) }
        50% { -webkit-transform: rotate(5deg) }
        to { -webkit-transform: rotate(-130deg) }
      }

      @keyframes right-spin {
        0% { transform: rotate(-130deg) }
        50% { transform: rotate(5deg) }
        to { transform: rotate(-130deg) }
      }

      #spinnerContainer.cooldown {
        -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
        animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
      }

      @-webkit-keyframes fade-out {
        0% { opacity: 1 }
        to { opacity: 0 }
      }

      @keyframes fade-out {
        0% { opacity: 1 }
        to { opacity: 0 }
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(MW.content);var D9={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){e==="loading"?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(e===""),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){var t="aria-hidden";e?this.setAttribute(t,"true"):this.removeAttribute(t)},__reset:function(){this.active=!1,this.__coolingDown=!1}};var N0t=Q`
  <style include="paper-spinner-styles"></style>

  <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]" on-animationend="__reset" on-webkit-animation-end="__reset">
    <div class="spinner-layer layer-1">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-2">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-3">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-4">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>
  </div>
`;N0t.setAttribute("strip-whitespace","");Yt({_template:N0t,is:"paper-spinner",behaviors:[D9]});var D0t=Q`
  <style include="paper-spinner-styles"></style>

  <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]" on-animationend="__reset" on-webkit-animation-end="__reset">
    <div class="spinner-layer">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>
  </div>
`;D0t.setAttribute("strip-whitespace","");Yt({_template:D0t,is:"paper-spinner-lite",behaviors:[D9]});var jbe=Q`<iron-iconset-svg name="paper-tabs" size="24">
<svg><defs>
<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(jbe.content);Yt({_template:Q`
    <style>
      :host {
        @apply --layout-inline;
        @apply --layout-center;
        @apply --layout-center-justified;
        @apply --layout-flex-auto;

        position: relative;
        padding: 0 12px;
        overflow: hidden;
        cursor: pointer;
        vertical-align: middle;

        @apply --paper-font-common-base;
        @apply --paper-tab;
      }

      :host(:focus) {
        outline: none;
      }

      :host([link]) {
        padding: 0;
      }

      .tab-content {
        height: 100%;
        transform: translateZ(0);
          -webkit-transform: translateZ(0);
        transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);
        @apply --layout-horizontal;
        @apply --layout-center-center;
        @apply --layout-flex-auto;
        @apply --paper-tab-content;
      }

      :host(:not(.iron-selected)) > .tab-content {
        opacity: 0.8;

        @apply --paper-tab-content-unselected;
      }

      :host(:focus) .tab-content {
        opacity: 1;
        font-weight: 700;

        @apply --paper-tab-content-focused;
      }

      paper-ripple {
        color: var(--paper-tab-ink, var(--paper-yellow-a100));
      }

      .tab-content > ::slotted(a) {
        @apply --layout-flex-auto;

        height: 100%;
      }
    </style>

    <div class="tab-content">
      <slot></slot>
    </div>
`,is:"paper-tab",behaviors:[Di,Mh,su],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var e=zt(this).parentNode;return!!e&&!!e.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(e){if(this.link){var t=this.queryEffectiveChildren("a");if(!t||e.target===t)return;t.click()}}});Yt({_template:Q`
    <style>
      :host {
        @apply --layout;
        @apply --layout-center;

        height: 48px;
        font-size: 14px;
        font-weight: 500;
        overflow: hidden;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;

        /* NOTE: Both values are needed, since some phones require the value to be \`transparent\`. */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-tap-highlight-color: transparent;

        @apply --paper-tabs;
      }

      :host(:dir(rtl)) {
        @apply --layout-horizontal-reverse;
      }

      #tabsContainer {
        position: relative;
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        @apply --layout-flex-auto;
        @apply --paper-tabs-container;
      }

      #tabsContent {
        height: 100%;
        -moz-flex-basis: auto;
        -ms-flex-basis: auto;
        flex-basis: auto;
        @apply --paper-tabs-content;
      }

      #tabsContent.scrollable {
        position: absolute;
        white-space: nowrap;
      }

      #tabsContent:not(.scrollable),
      #tabsContent.scrollable.fit-container {
        @apply --layout-horizontal;
      }

      #tabsContent.scrollable.fit-container {
        min-width: 100%;
      }

      #tabsContent.scrollable.fit-container > ::slotted(*) {
        /* IE - prevent tabs from compressing when they should scroll. */
        -ms-flex: 1 0 auto;
        -webkit-flex: 1 0 auto;
        flex: 1 0 auto;
      }

      .hidden {
        display: none;
      }

      .not-visible {
        opacity: 0;
        cursor: default;
      }

      paper-icon-button {
        width: 48px;
        height: 48px;
        padding: 12px;
        margin: 0 4px;
      }

      #selectionBar {
        position: absolute;
        height: 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-bottom: 2px solid var(--paper-tabs-selection-bar-color, var(--paper-yellow-a100));
          -webkit-transform: scale(0);
        transform: scale(0);
          -webkit-transform-origin: left center;
        transform-origin: left center;
          transition: -webkit-transform;
        transition: transform;

        @apply --paper-tabs-selection-bar;
      }

      #selectionBar.align-bottom {
        top: 0;
        bottom: auto;
      }

      #selectionBar.expand {
        transition-duration: 0.15s;
        transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
      }

      #selectionBar.contract {
        transition-duration: 0.18s;
        transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
      }

      #tabsContent > ::slotted(:not(#selectionBar)) {
        height: 100%;
      }
    </style>

    <paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>

    <div id="tabsContainer" on-track="_scroll" on-down="_down">
      <div id="tabsContent" class$="[[_computeTabsContentClass(scrollable, fitContainer)]]">
        <div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div>
        <slot></slot>
      </div>
    </div>

    <paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
`,is:"paper-tabs",behaviors:[Qs,N9],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(e){var t=zt(this).querySelectorAll("paper-tab");t.forEach(e?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(e){e.setAttribute("noink","")},_removeNoinkAttribute:function(e){e.removeAttribute("noink")},_computeScrollButtonClass:function(e,t,r){return!t||r?"hidden":e?"not-visible":""},_computeTabsContentClass:function(e,t){return e?"scrollable"+(t?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(e,t){return e?"hidden":t?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(e){this._tabChanged(e.detail.item,this._previousTab),this._previousTab=e.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(e){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),y_._activateHandler.apply(this,arguments)},_scheduleActivation:function(e,t){this._pendingActivationItem=e,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,t)},_delayedActivationHandler:function(){var e=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,e.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){this._pendingActivationTimeout!==void 0&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(e){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(e){e.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(e,t){if(!!this.scrollable){var r=t&&-t.ddx||0;this._affectScroll(r)}},_down:function(e){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(e){this.$.tabsContainer.scrollLeft+=e;var t=this.$.tabsContainer.scrollLeft;this._leftHidden=t===0,this._rightHidden=t===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(e,t){if(!e){this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(0,0);return}var r=this.$.tabsContent.getBoundingClientRect(),n=r.width,i=e.getBoundingClientRect(),o=i.left-r.left;if(this._pos={width:this._calcPercent(i.width,n),left:this._calcPercent(o,n)},this.noSlide||t==null){this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(this._pos.width,this._pos.left);return}var a=t.getBoundingClientRect(),s=this.items.indexOf(t),l=this.items.indexOf(e),c=5;this.$.selectionBar.classList.add("expand");var u=s<l,h=this._isRTL;h&&(u=!u),u?this._positionBar(this._calcPercent(i.left+i.width-a.left,n)-c,this._left):this._positionBar(this._calcPercent(a.left+a.width-i.left,n)-c,this._calcPercent(o,n)+c),this.scrollable&&this._scrollToSelectedIfNeeded(i.width,o)},_scrollToSelectedIfNeeded:function(e,t){var r=t-this.$.tabsContainer.scrollLeft;r<0?this.$.tabsContainer.scrollLeft+=r:(r+=e-this.$.tabsContainer.offsetWidth,r>0&&(this.$.tabsContainer.scrollLeft+=r))},_calcPercent:function(e,t){return 100*e/t},_positionBar:function(e,t){e=e||0,t=t||0,this._width=e,this._left=t,this.transform("translateX("+t+"%) scaleX("+e/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(e){var t=this.$.selectionBar.classList;t.contains("expand")?(t.remove("expand"),t.add("contract"),this._positionBar(this._pos.width,this._pos.left)):t.contains("contract")&&t.remove("contract")}});var Jx=null;Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: fixed;
        background-color: var(--paper-toast-background-color, #323232);
        color: var(--paper-toast-color, #f1f1f1);
        min-height: 48px;
        min-width: 288px;
        padding: 16px 24px;
        box-sizing: border-box;
        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
        border-radius: 2px;
        margin: 12px;
        font-size: 14px;
        cursor: default;
        -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
        transition: transform 0.3s, opacity 0.3s;
        opacity: 0;
        -webkit-transform: translateY(100px);
        transform: translateY(100px);
        @apply --paper-font-common-base;
      }

      :host(.capsule) {
        border-radius: 24px;
      }

      :host(.fit-bottom) {
        width: 100%;
        min-width: 0;
        border-radius: 0;
        margin: 0;
      }

      :host(.paper-toast-open) {
        opacity: 1;
        -webkit-transform: translateY(0px);
        transform: translateY(0px);
      }
    </style>

    <span id="label">{{text}}</span>
    <slot></slot>
`,is:"paper-toast",behaviors:[Kx],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Oa._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,ec.requestAvailability()},show:function(e){typeof e=="string"&&(e={text:e});for(var t in e)t.indexOf("_")===0?Oa._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Oa._warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(e){e&&e.target===this&&e.propertyName==="opacity"&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){this._autoClose!==null&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(Jx&&Jx!==this&&Jx.close(),Jx=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):Jx===this&&(Jx=null),Im._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(e){this.positionTarget=e}});var O0t=Q`

    <style>
      :host {
        display: inline-block;
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-common-base;
      }

      :host([disabled]) {
        pointer-events: none;
      }

      :host(:focus) {
        outline:none;
      }

      .toggle-bar {
        position: absolute;
        height: 100%;
        width: 100%;
        border-radius: 8px;
        pointer-events: none;
        opacity: 0.4;
        transition: background-color linear .08s;
        background-color: var(--paper-toggle-button-unchecked-bar-color, #000000);

        @apply --paper-toggle-button-unchecked-bar;
      }

      .toggle-button {
        position: absolute;
        top: -3px;
        left: 0;
        height: 20px;
        width: 20px;
        border-radius: 50%;
        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);
        transition: -webkit-transform linear .08s, background-color linear .08s;
        transition: transform linear .08s, background-color linear .08s;
        will-change: transform;
        background-color: var(--paper-toggle-button-unchecked-button-color, var(--paper-grey-50));

        @apply --paper-toggle-button-unchecked-button;
      }

      .toggle-button.dragging {
        -webkit-transition: none;
        transition: none;
      }

      :host([checked]:not([disabled])) .toggle-bar {
        opacity: 0.5;
        background-color: var(--paper-toggle-button-checked-bar-color, var(--primary-color));

        @apply --paper-toggle-button-checked-bar;
      }

      :host([disabled]) .toggle-bar {
        background-color: #000;
        opacity: 0.12;
      }

      :host([checked]) .toggle-button {
        -webkit-transform: translate(16px, 0);
        transform: translate(16px, 0);
      }

      :host([checked]:not([disabled])) .toggle-button {
        background-color: var(--paper-toggle-button-checked-button-color, var(--primary-color));

        @apply --paper-toggle-button-checked-button;
      }

      :host([disabled]) .toggle-button {
        background-color: #bdbdbd;
        opacity: 1;
      }

      .toggle-ink {
        position: absolute;
        top: -14px;
        left: -14px;
        right: auto;
        bottom: auto;
        width: 48px;
        height: 48px;
        opacity: 0.5;
        pointer-events: none;
        color: var(--paper-toggle-button-unchecked-ink-color, var(--primary-text-color));

        @apply --paper-toggle-button-unchecked-ink;
      }

      :host([checked]) .toggle-ink {
        color: var(--paper-toggle-button-checked-ink-color, var(--primary-color));

        @apply --paper-toggle-button-checked-ink;
      }

      .toggle-container {
        display: inline-block;
        position: relative;
        width: 36px;
        height: 14px;
        /* The toggle button has an absolute position of -3px; The extra 1px
        /* accounts for the toggle button shadow box. */
        margin: 4px 1px;
      }

      .toggle-label {
        position: relative;
        display: inline-block;
        vertical-align: middle;
        padding-left: var(--paper-toggle-button-label-spacing, 8px);
        pointer-events: none;
        color: var(--paper-toggle-button-label-color, var(--primary-text-color));
      }

      /* invalid state */
      :host([invalid]) .toggle-bar {
        background-color: var(--paper-toggle-button-invalid-bar-color, var(--error-color));
      }

      :host([invalid]) .toggle-button {
        background-color: var(--paper-toggle-button-invalid-button-color, var(--error-color));
      }

      :host([invalid]) .toggle-ink {
        color: var(--paper-toggle-button-invalid-ink-color, var(--error-color));
      }
    </style>

    <div class="toggle-container">
      <div id="toggleBar" class="toggle-bar"></div>
      <div id="toggleButton" class="toggle-button"></div>
    </div>

    <div class="toggle-label"><slot></slot></div>

  `;O0t.setAttribute("strip-whitespace","");Yt({_template:O0t,is:"paper-toggle-button",behaviors:[Xx],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Cm(this,function(){m_(this,"pan-y")})},_ontrack:function(e){var t=e.detail;t.state==="start"?this._trackStart(t):t.state==="track"?this._trackMove(t):t.state==="end"&&this._trackEnd(t)},_trackStart:function(e){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(e){var t=e.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+t:t)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(e){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var e=su._createRipple();return e.id="ink",e.setAttribute("recenters",""),e.classList.add("circle","toggle-ink"),e}});Yt({_template:Q`
    <style>
      :host {
        --calculated-paper-toolbar-height: var(--paper-toolbar-height, 64px);
        --calculated-paper-toolbar-sm-height: var(--paper-toolbar-sm-height, 56px);
        display: block;
        position: relative;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        height: var(--calculated-paper-toolbar-height);
        background: var(--paper-toolbar-background, var(--primary-color));
        color: var(--paper-toolbar-color, var(--dark-theme-text-color));
        @apply --paper-toolbar;
      }

      :host(.animate) {
        transition: var(--paper-toolbar-transition, height 0.18s ease-in);
      }

      :host(.medium-tall) {
        height: calc(var(--calculated-paper-toolbar-height) * 2);
        @apply --paper-toolbar-medium;
      }

      :host(.tall) {
        height: calc(var(--calculated-paper-toolbar-height) * 3);
        @apply --paper-toolbar-tall;
      }

      .toolbar-tools {
        position: relative;
        height: var(--calculated-paper-toolbar-height);
        padding: 0 16px;
        pointer-events: none;
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-toolbar-content;
      }

      /*
       * TODO: Where should media query breakpoints live so they can be shared between elements?
       */

      @media (max-width: 600px) {
        :host {
          height: var(--calculated-paper-toolbar-sm-height);
        }

        :host(.medium-tall) {
          height: calc(var(--calculated-paper-toolbar-sm-height) * 2);
        }

        :host(.tall) {
          height: calc(var(--calculated-paper-toolbar-sm-height) * 3);
        }

        .toolbar-tools {
          height: var(--calculated-paper-toolbar-sm-height);
        }
      }

      #topBar {
        position: relative;
      }

      /* middle bar */
      #middleBar {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
      }

      :host(.tall) #middleBar,
      :host(.medium-tall) #middleBar {
        -webkit-transform: translateY(100%);
        transform: translateY(100%);
      }

      /* bottom bar */
      #bottomBar {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
      }

      /*
       * make elements (e.g. buttons) respond to mouse/touch events
       *
       * \`.toolbar-tools\` disables touch events so multiple toolbars can stack and not
       * absorb events. All children must have pointer events re-enabled to work as
       * expected.
       */
      .toolbar-tools > ::slotted(*:not([disabled])) {
        pointer-events: auto;
      }

      .toolbar-tools > ::slotted(.title) {
        @apply --paper-font-common-base;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 20px;
        font-weight: 400;
        line-height: 1;
        pointer-events: none;
        @apply --layout-flex;
      }

      .toolbar-tools > ::slotted(.title) {
        margin-left: 56px;
      }

      .toolbar-tools > ::slotted(paper-icon-button + .title) {
        margin-left: 0;
      }

      /**
       * The --paper-toolbar-title mixin is applied here instead of above to
       * fix the issue with margin-left being ignored due to css ordering.
       */
      .toolbar-tools > ::slotted(.title) {
        @apply --paper-toolbar-title;
      }

      .toolbar-tools > ::slotted(paper-icon-button[icon=menu]) {
        margin-right: 24px;
      }

      .toolbar-tools > ::slotted(.fit) {
        position: absolute;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        margin: 0;
      }

      /* TODO(noms): Until we have a better solution for classes that don't use
       * /deep/ create our own.
       */
      .start-justified {
        @apply --layout-start-justified;
      }

      .center-justified {
        @apply --layout-center-justified;
      }

      .end-justified {
        @apply --layout-end-justified;
      }

      .around-justified {
        @apply --layout-around-justified;
      }

      .justified {
        @apply --layout-justified;
      }
    </style>

    <div id="topBar" class\$="toolbar-tools [[_computeBarExtraClasses(justify)]]">
      <slot name="top"></slot>
    </div>

    <div id="middleBar" class\$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]">
      <slot name="middle"></slot>
    </div>

    <div id="bottomBar" class\$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]">
      <slot name="bottom"></slot>
    </div>
`,is:"paper-toolbar",hostAttributes:{role:"toolbar"},properties:{bottomJustify:{type:String,value:""},justify:{type:String,value:""},middleJustify:{type:String,value:""}},ready:function(){console.warn(this.is,"is deprecated. Please use app-layout instead!")},attached:function(){this._observer=this._observe(this),this._updateAriaLabelledBy()},detached:function(){this._observer&&this._observer.disconnect()},_observe:function(e){var t=new MutationObserver(function(){this._updateAriaLabelledBy()}.bind(this));return t.observe(e,{childList:!0,subtree:!0}),t},_updateAriaLabelledBy:function(){ci();for(var e=[],t=Array.prototype.slice.call(zt(this.root).querySelectorAll("slot")).concat(Array.prototype.slice.call(zt(this.root).querySelectorAll("content"))),r,n=0;r=t[n];n++)for(var i=zt(r).getDistributedNodes(),o,a=0;o=i[a];a++)if(o.classList&&o.classList.contains("title"))if(o.id)e.push(o.id);else{var s="paper-toolbar-label-"+Math.floor(Math.random()*1e4);o.id=s,e.push(s)}e.length>0&&this.setAttribute("aria-labelledby",e.join(" "))},_computeBarExtraClasses:function(e){return e?e+(e==="justified"?"":"-justified"):""}});Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: absolute;
        outline: none;
        z-index: 1002;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: default;
      }

      #tooltip {
        display: block;
        outline: none;
        @apply --paper-font-common-base;
        font-size: 10px;
        line-height: 1;
        background-color: var(--paper-tooltip-background, #616161);
        color: var(--paper-tooltip-text-color, white);
        padding: 8px;
        border-radius: 2px;
        @apply --paper-tooltip;
      }

      @keyframes keyFrameScaleUp {
        0% {
          transform: scale(0.0);
        }
        100% {
          transform: scale(1.0);
        }
      }

      @keyframes keyFrameScaleDown {
        0% {
          transform: scale(1.0);
        }
        100% {
          transform: scale(0.0);
        }
      }

      @keyframes keyFrameFadeInOpacity {
        0% {
          opacity: 0;
        }
        100% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameFadeOutOpacity {
        0% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        100% {
          opacity: 0;
        }
      }

      @keyframes keyFrameSlideDownIn {
        0% {
          transform: translateY(-2000px);
          opacity: 0;
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameSlideDownOut {
        0% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(-2000px);
          opacity: 0;
        }
      }

      .fade-in-animation {
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameFadeInOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .fade-out-animation {
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 0ms);
        animation-name: keyFrameFadeOutOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-up-animation {
        transform: scale(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameScaleUp;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-down-animation {
        transform: scale(1);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameScaleDown;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation {
        transform: translateY(-2000px);
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownIn;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation-out {
        transform: translateY(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownOut;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .cancel-animation {
        animation-delay: -30s !important;
      }

      /* Thanks IE 10. */

      .hidden {
        display: none !important;
      }
    </style>

    <div id="tooltip" class="hidden">
      <slot></slot>
    </div>
`,is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object,value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}},_showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var e=zt(this).parentNode,t=zt(this).getOwnerRoot(),r;return this.for?r=zt(t).querySelector("#"+this.for):r=e.nodeType==Node.DOCUMENT_FRAGMENT_NODE?t.host:e,r},attached:function(){this._findTarget()},detached:function(){this.manualMode||this._removeListeners()},playAnimation:function(e){e==="entry"?this.show():e==="exit"&&this.hide()},cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")},show:function(){if(!this._showing){if(zt(this).textContent.trim()===""){for(var e=!0,t=zt(this).getEffectiveChildNodes(),r=0;r<t.length;r++)if(t[r].textContent.trim()!==""){e=!1;break}if(e)return}this._showing=!0,this.$.tooltip.classList.remove("hidden"),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.updatePosition(),this._animationPlaying=!0,this.$.tooltip.classList.add(this._getAnimationType("entry"))}},hide:function(){if(!!this._showing){if(this._animationPlaying){this._showing=!1,this._cancelAnimation();return}else this._onAnimationFinish();this._showing=!1,this._animationPlaying=!0}},updatePosition:function(){if(!(!this._target||!this.offsetParent)){var e=this.offset;this.marginTop!=14&&this.offset==14&&(e=this.marginTop);var t=this.offsetParent.getBoundingClientRect(),r=this._target.getBoundingClientRect(),n=this.getBoundingClientRect(),i=(r.width-n.width)/2,o=(r.height-n.height)/2,a=r.left-t.left,s=r.top-t.top,l,c;switch(this.position){case"top":l=a+i,c=s-n.height-e;break;case"bottom":l=a+i,c=s+r.height+e;break;case"left":l=a-n.width-e,c=s+o;break;case"right":l=a+r.width+e,c=s+o;break}this.fitToVisibleBounds?(t.left+l+n.width>window.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,l)+"px",this.style.right="auto"),t.top+c+n.height>window.innerHeight?(this.style.bottom=t.height-s+e+"px",this.style.top="auto"):(this.style.top=Math.max(-t.top,c)+"px",this.style.bottom="auto")):(this.style.left=l+"px",this.style.top=c+"px")}},_addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide")),this.listen(this.$.tooltip,"animationend","_onAnimationEnd"),this.listen(this,"mouseenter","hide")},_findTarget:function(){this.manualMode||this._removeListeners(),this._target=this.target,this.manualMode||this._addListeners()},_delayChange:function(e){e!==500&&this.updateStyles({"--paper-tooltip-delay-in":e+"ms"})},_manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()},_cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add("hidden")},_onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))},_onAnimationEnd:function(){this._animationPlaying=!1,this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))},_getAnimationType:function(e){if(e==="entry"&&this.animationEntry!=="")return this.animationEntry;if(e==="exit"&&this.animationExit!=="")return this.animationExit;if(this.animationConfig[e]&&typeof this.animationConfig[e][0].name=="string"){if(this.animationConfig[e][0].timing&&this.animationConfig[e][0].timing.delay&&this.animationConfig[e][0].timing.delay!==0){var t=this.animationConfig[e][0].timing.delay;e==="entry"?this.updateStyles({"--paper-tooltip-delay-in":t+"ms"}):e==="exit"&&this.updateStyles({"--paper-tooltip-delay-out":t+"ms"})}return this.animationConfig[e][0].name}},_removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide")),this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd"),this.unlisten(this,"mouseenter","hide")}});var rb=Ee(Oe(),1);var mE=class{constructor(t){this.listener=t}},EW=new Set,O9=new Set;window.addEventListener("hashchange",()=>{EW.forEach(e=>e.listener())});window.addEventListener("storage",()=>{O9.forEach(e=>e.listener())});function gE(e){let t=new mE(e);return EW.add(t),t}function TW(e){let t=new mE(e);return O9.add(t),t}function CW(){O9.forEach(e=>e.listener())}function AW(e){EW.delete(e)}function PW(e){O9.delete(e)}var kW={};Zs(kW,{getFakeHash:()=>LW,setFakeHash:()=>IW,setUseHash:()=>Xbe,useHash:()=>z9});var z0t=!1;function Xbe(e){z0t=e}function z9(){return z0t}var F0t="";function IW(e){F0t=e}function LW(){return F0t}var Qx="__tab__",RW={};function B0t(){return RW}function H0t(e){RW=e}gE(()=>{RW=eb(tb())});function tb(){return z9()?window.location.hash.slice(1):LW()}function eb(e){let t={};return e.split("&").forEach(n=>{let i=n.split("=");i.length===1?t[Qx]=i[0]:i.length===2&&(t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}),t}function F9(e,t=!1){if(z9())if(t){let r=new URL(window.location.href);r.hash=e,window.history.replaceState(window.history.state,"",r.toString())}else window.location.hash=e;else IW(e)}function B9(e){let t="";e[Qx]!==void 0&&(t+=e[Qx]);let r=Object.keys(e).map(n=>[n,e[n]]).filter(n=>n[0]!==Qx).map(n=>encodeURIComponent(n[0])+"="+encodeURIComponent(n[1])).join("&");return r.length>0?t+"&"+r:t}function V0t(e,t=!1){let r=eb(tb());delete r[e],F9(B9(r),t)}var q0t="disambiguator",{get:$be,set:Kbe,getInitializer:v_,getObserver:x_,disposeBinding:Zbe}=vE(e=>e,e=>e),{get:Jbe,set:Qbe,getInitializer:xp,getObserver:bp,disposeBinding:t2e}=vE(e=>e==="true"?!0:e==="false"?!1:void 0,e=>e.toString()),{get:NW,set:DW,getInitializer:_E,getObserver:yE,disposeBinding:e2e}=vE(e=>+e,e=>e.toString()),{get:r2e,set:n2e,getInitializer:OW,getObserver:zW,disposeBinding:i2e}=vE(e=>JSON.parse(atob(e)),e=>btoa(JSON.stringify(e)));function vE(e,t){let r=[],n=[];function i(c,u={}){let{defaultValue:h,useLocalStorage:f=!1}=u,p=f?window.localStorage.getItem(c):eb(tb())[c];return p==null?rb.cloneDeep(h):e(p)}function o(c,u,h={}){let{defaultValue:f,useLocalStorage:p=!1,useLocationReplace:d=!1}=h,g=t(u);if(p)window.localStorage.setItem(c,g),CW();else if(!rb.isEqual(u,i(c,{useLocalStorage:p})))if(rb.isEqual(u,f))V0t(c,d);else{let _=eb(tb());_[c]=g,F9(B9(_),d)}}function a(c,u){let h=ia({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=U0t(this,c),p=()=>{let _=i(f,h),y=this[h.polymerProperty];rb.isEqual(_,y)||(this[h.polymerProperty]=_)},g=(h.useLocalStorage?TW:gE)(()=>p());return h.useLocalStorage?n.push(g):r.push(g),p(),this[h.polymerProperty]}}function s(){r.forEach(c=>AW(c)),n.forEach(c=>PW(c))}function l(c,u){let h=ia({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=U0t(this,c),p=this[h.polymerProperty];o(f,p,h)}}return{get:i,set:o,getInitializer:a,getObserver:l,disposeBinding:s}}function o2e(){let e=new Set(["examplesPath","hideModelPane2","modelName1","modelName2","inferenceAddress1","inferenceAddress2","modelType","modelVersion1","modelVersion2","modelSignature1","modelSignature2","maxExamples","labelVocabPath","multiClass","sequenceExamples","maxClassesToDisplay","samplingOdds","usePredictApi","predictInputTensor","predictOutputTensor"]),t=eb(tb());if(t[Qx]==="whatif"){for(let r of e)if(r in t){let n=t[r];t[`p.whatif.${r}`]=n}}F9(B9(t)),H0t(t)}function U0t(e,t){let r=e[q0t];return(r==null?[t]:[r,t]).join(".")}var xE=class extends mt{constructor(){super(...arguments),this._tagFilter=v_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"}).call(this),this._tagFilterObserver=x_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"})}_computeTagFilter(){return this._tagFilter}};xE.template=Q`
    <paper-input
      no-label-float=""
      label="Filter tags (regular expressions supported)"
      value="{{_tagFilter}}"
      class="search-input"
    >
      <iron-icon prefix="" icon="search" slot="prefix"></iron-icon>
    </paper-input>
    <style>
      :host {
        display: block;
        margin: 10px 5px 10px 10px;
      }
    </style>
  `;E([A({type:String,notify:!0,computed:"_computeTagFilter(_tagFilter)"}),w("design:type",String)],xE.prototype,"tagFilter",void 0);E([A({type:String,observer:"_tagFilterObserver"}),w("design:type",String)],xE.prototype,"_tagFilter",void 0);xE=E([yt("tf-tag-filterer")],xE);function ys(e){let{moduleName:t,styleContent:r}=e,n=document.createElement("dom-module"),i=document.createElement("template"),o=[];e.styleDependencies&&e.styleDependencies.forEach(s=>{let l=document.createElement("style");l.setAttribute("include",s),o.push(l)});let a=document.createElement("style");Object.assign(a,{textContent:r}),o.forEach(s=>{i.content.appendChild(s)}),i.content.appendChild(a),n.appendChild(i),n.register(t)}ys({moduleName:"dashboard-style",styleDependencies:["iron-flex"],styleContent:`
      :host {
        --sidebar-vertical-padding: 15px;
        --sidebar-left-padding: 30px;
      }

      [slot='sidebar'] {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        height: 100%;
        margin-right: 10px;
        overflow-x: hidden;
        padding: 5px 0;
        text-overflow: ellipsis;
      }

      .settings {
        min-height: 50px;
        overflow-x: hidden;
        overflow-y: auto;
        will-change: transform;
      }

      .runs-selector {
        display: flex;
        flex-grow: 1;
        min-height: 200px;
      }

      tf-runs-selector {
        flex-grow: 1;
        flex-shrink: 1;
        left: var(--sidebar-left-padding);
        max-height: calc(100% - var(--sidebar-vertical-padding) * 2);
        overflow: hidden;
        position: absolute;
        right: 0;
      }

      .search-input {
        margin: 10px 5px 0 10px;
      }

      .sidebar-section {
        border-top: solid 1px var(--tb-ui-border);
        margin-right: 10px;
        padding: var(--sidebar-vertical-padding) 0
          var(--sidebar-vertical-padding) var(--sidebar-left-padding);
        position: relative;
        overflow: hidden;
      }

      .sidebar-section:first-of-type {
        border: none;
      }

      .sidebar-section paper-button {
        margin: 5px;
      }

      .sidebar-section paper-button:first-of-type {
        margin-left: 0 !important;
      }

      .sidebar-section paper-button:last-of-type {
        margin-right: 0 !important;
      }

      .sidebar-section > :first-child {
        margin-top: 0;
        padding-top: 0;
      }

      .sidebar-section > :last-child {
        margin-bottom: 0;
        padding-bottom: 0;
      }

      .sidebar-section h3 {
        color: var(--tb-secondary-text-color);
        display: block;
        font-size: 14px;
        font-weight: normal;
        margin: 10px 0 5px;
        pointer-events: none;
      }

      paper-checkbox {
        --paper-checkbox-checked-color: var(--tb-ui-dark-accent);
        --paper-checkbox-unchecked-color: var(--tb-ui-dark-accent);
        font-size: 15px;
        margin-top: 5px;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
  `});function _o(e){return class extends e{connectedCallback(){super.connectedCallback(),this._maybeSetDarkMode(),this.observer=new MutationObserver(r=>{r.some(i=>i.attributeName==="class")&&this._maybeSetDarkMode()}),this.observer.observe(document.body,{attributes:!0})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.observer)==null||r.disconnect()}_maybeSetDarkMode(){this.classList.toggle("dark-mode",document.body.classList.contains("dark-mode"))}}}ys({moduleName:"scrollbar-style",styleContent:`
    .scrollbar::-webkit-scrollbar-track {
      visibility: hidden;
    }

    .scrollbar::-webkit-scrollbar {
      width: 10px;
    }

    .scrollbar::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
      background-color: var(--paper-grey-500);
      color: var(--paper-grey-900);
    }
    .scrollbar {
      box-sizing: border-box;
    }
  `});var BW=document.createElement("style");BW.setAttribute("is","custom-style");BW.textContent=`
  :root {
    --tb-orange-weak: #ffa726;
    --tb-orange-strong: #f57c00;
    --tb-orange-dark: #dc7320;
    --tb-grey-darker: #e2e2e2;
    --tb-grey-lighter: #f3f3f3;
    --tb-ui-dark-accent: #757575;
    --tb-ui-light-accent: #e0e0e0;
    --tb-ui-border: var(--paper-grey-300);
    --tb-graph-faded: #e0d4b3;
    --tb-secondary-text-color: var(--paper-grey-800);
    --tb-raised-button-shadow-color: rgba(0, 0, 0, 0.2);
    --primary-background-color: #fff;
    --secondary-background-color: #e9e9e9;
    --tb-layout-background-color: #f5f5f5;
    --tb-link: #1976d2; /* material blue 700. */
    --tb-link-visited: #7b1fa2; /* material purple 700. */
  }

  :root .dark-mode {
    --tb-ui-border: var(--paper-grey-700);
    --tb-ui-dark-accent: var(--paper-grey-400);
    --tb-ui-light-accent: var(--paper-grey-600);
    --tb-secondary-text-color: var(--paper-grey-400);
    --tb-raised-button-shadow-color: rgba(255, 255, 255, 0.5);
    --primary-text-color: #fff;
    --secondary-text-color: var(--paper-grey-400);
    --primary-background-color: #303030;  /* material grey A400. */
    --secondary-background-color: #3a3a3a;
    --tb-layout-background-color: #3a3a3a;
    --tb-link: #42a5f5; /* material blue 400. */
    --tb-link-visited: #ba68c8; /* material purple 300. */
    /* Overrides paper-material */
    --shadow-elevation-2dp_-_box-shadow: 0 2px 2px 0 rgba(255, 255, 255, 0.14),
      0 1px 5px 0 rgba(255, 255, 255, 0.12),
      0 3px 1px -2px rgba(255, 255, 255, 0.2);
  }
`;document.head.appendChild(BW);var HW=class extends _o(mt){};HW.template=Q`
    <div id="sidebar">
      <slot name="sidebar"></slot>
    </div>

    <div id="center">
      <slot name="center" class="scollbar"></slot>
    </div>
    <style include="scrollbar-style"></style>
    <style>
      :host {
        background-color: #f5f5f5;
        display: flex;
        flex-direction: row;
        height: 100%;
      }

      :host(.dark-mode) {
        background-color: var(--secondary-background-color);
      }

      #sidebar {
        flex: 0 0 var(--tf-dashboard-layout-sidebar-basis, 25%);
        height: 100%;
        max-width: var(--tf-dashboard-layout-sidebar-max-width, 350px);
        min-width: var(--tf-dashboard-layout-sidebar-min-width, 270px);
        overflow-y: auto;
        text-overflow: ellipsis;
      }

      #center {
        flex-grow: 1;
        flex-shrink: 1;
        height: 100%;
        overflow: hidden;
      }

      ::slotted([slot='center']) {
        contain: strict;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        width: 100%;
        will-change: transform;
      }

      .tf-graph-dashboard #center {
        background: #fff;
      }
    </style>
  `;HW=E([yt("tf-dashboard-layout")],HW);var G0t="TF.TensorBoard.PaginatedView.limit",a2e=12,Ph=null,VW=new Set;function UW(e){VW.add(e)}function qW(e){VW.delete(e)}function GW(){return Ph==null&&(Ph=NW(G0t,{useLocalStorage:!0}),(Ph==null||!isFinite(Ph)||Ph<=0)&&(Ph=a2e)),Ph}function s2e(e){if(e!==Math.floor(e))throw new Error(`limit must be an integer, but got: ${e}`);if(e<=0)throw new Error(`limit must be positive, but got: ${e}`);e!==Ph&&(Ph=e,DW(G0t,Ph,{useLocalStorage:!0}),VW.forEach(t=>{t()}))}var nb=class extends mt{updateArrayProp(t,r,n){let i=this.get(t),o=r;if(!Array.isArray(o))throw RangeError(`Expected new value to '${t}' to be an array.`);Array.isArray(i)||(i=[],this.set(t,i));let a=new Set(o.map((c,u)=>n(c,u))),s=0,l=0;for(;s<i.length&&l<o.length;){if(a.has(n(i[s],s)))n(i[s],s)==n(o[l],l)?this.set(`${t}.${s}`,o[l]):this.splice(t,s,0,o[l]);else{this.splice(t,s,1);continue}l++,s++}s<i.length&&this.splice(t,s),l<o.length&&this.push(t,...o.slice(l))}};var Oi=class extends nb{constructor(){super(...arguments),this.as="item",this._contentActive=!0,this._domBootstrapped=!1,this._ctor=null,this._renderedItems=[],this._renderedTemplateInst=new Map,this._lruCachedItems=new Map,this._cacheSize=10,this._getItemKey=t=>JSON.stringify(t),this._isConnected=!1}connectedCallback(){super.connectedCallback(),this._isConnected=!0}setCacheSize(t){this._cacheSize=t}setGetItemKey(t){this._getItemKey=t}updateDom(t){this.updateArrayProp("_renderedItems",t,this._getItemKey)}_ensureTemplatized(){if(!this.isConnected)return!1;if(!this._ctor){let t=this.querySelector("template");this._ctor=tc(t,this,{parentModel:!0,instanceProps:{[this.as]:!0,active:this._contentActive},forwardHostProp:function(r,n){this._renderedTemplateInst.forEach(i=>{i.forwardHostProp(r,n)})}})}return!0}_bootstrapDom(){if(!this._ensureTemplatized()||this._domBootstrapped)return;new MutationObserver(r=>{for(let n of r)if(n.type==="childList")for(let i of Array.from(n.addedNodes))i instanceof Element&&i.setAttribute("slot","items")}).observe(this,{childList:!0}),Array.from(this.children).forEach(r=>{this.removeChild(r)}),this._lruCachedItems.clear(),this._renderedItems.forEach((r,n)=>this._insertItem(r,n)),this._domBootstrapped=!0}_updateActive(){!this._domBootstrapped||Array.from(this._renderedTemplateInst.values()).forEach(t=>{t.notifyPath("active",this._contentActive)})}_updateDom(t){if(!!this._domBootstrapped&&!(t.path=="_renderedItems"||t.path=="_renderedItems.length"))if(t.path==="_renderedItems.splices")t.value.indexSplices.forEach(n=>{let{index:i,addedCount:o,object:a,removed:s}=n;s.forEach(l=>{this._removeItem(l,this.children[i])}),a.slice(i,i+o).forEach((l,c)=>this._insertItem(l,i+c)),this._trimCache()});else{let r=this._getItemKey(t.value);this._renderedTemplateInst.has(r)?this._renderedTemplateInst.get(r).notifyPath(this.as,t.value):console.warn(`Expected '${r}' to exist in the DOM but could not find one.`)}}_insertItem(t,r){if(!this._ensureTemplatized())throw new Error("Expected templatized before inserting an item");let n,i=this._getItemKey(t);if(this._lruCachedItems.has(i))n=this._lruCachedItems.get(i),this._lruCachedItems.delete(i),this._renderedTemplateInst.get(i).notifyPath("active",this._contentActive);else{let o={[this.as]:t,active:this._contentActive},a=new this._ctor(o);n=a.root,this._renderedTemplateInst.set(i,a)}this.children[r]?this.insertBefore(n,this.children[r]):((n.nodeType==Node.DOCUMENT_FRAGMENT_NODE?Array.from(n.children):[n]).forEach(a=>a.setAttribute("slot","items")),this.appendChild(n))}_removeItem(t,r){r.parentNode&&r.parentNode.removeChild(r);let n=this._getItemKey(t);this._lruCachedItems.set(n,r),this._renderedTemplateInst.get(n).notifyPath("active",!1)}_trimCache(){for(;this._lruCachedItems.size>this._cacheSize;){let[t]=this._lruCachedItems.keys();this._lruCachedItems.delete(t),this._renderedTemplateInst.delete(t)}}};E([A({type:String}),w("design:type",Object)],Oi.prototype,"as",void 0);E([A({type:Array}),w("design:type",Array)],Oi.prototype,"items",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Oi.prototype,"_contentActive",void 0);E([A({type:Boolean}),w("design:type",Object)],Oi.prototype,"_domBootstrapped",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_ctor",void 0);E([A({type:Array}),w("design:type",Array)],Oi.prototype,"_renderedItems",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_renderedTemplateInst",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_lruCachedItems",void 0);E([A({type:Number}),w("design:type",Object)],Oi.prototype,"_cacheSize",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_getItemKey",void 0);E([A({type:Boolean}),w("design:type",Object)],Oi.prototype,"_isConnected",void 0);E([Bt("_isConnected"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_bootstrapDom",null);E([Bt("_contentActive"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_updateActive",null);E([Bt("_renderedItems.*","_domBootstrapped"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],Oi.prototype,"_updateDom",null);E([Bt("_cacheSize"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_trimCache",null);var hn=class extends Oi{constructor(){super(...arguments),this.disablePagination=!1,this.getCategoryItemKey=t=>JSON.stringify(t),this._limit=12,this._activeIndex=0,this._pageInputRawValue="",this._pageInputFocused=!1}_computeCount(){return this.category.items.length}get _hasMultiple(){return this._count>1}_togglePane(){this.opened=!this.opened}_changeContentActive(t){this._contentActive=t}_onPaneRenderedChanged(t,r){t&&t!==r&&this.$.ifRendered.render()}_computePaneRendered(t){return!(t.metadata.type===Da.SEARCH_RESULTS&&t.name==="")}get _itemsRendered(){return this._paneRendered&&this.opened}_computeIsSearchResults(t){return t===Da.SEARCH_RESULTS}_computeIsInvalidSearchResults(t){return t.type===Da.SEARCH_RESULTS&&!t.validRegex}_computeIsUniversalSearchQuery(t){return t.type===Da.SEARCH_RESULTS&&t.universalRegex}_isCompositeSearch(){let{type:t,compositeSearch:r}=this.category.metadata;return r&&t===Da.SEARCH_RESULTS}ready(){super.ready(),this.opened=this.initialOpened==null?!0:this.initialOpened,this._limitListener=()=>{this.set("_limit",GW())},UW(this._limitListener),this._limitListener()}detached(){qW(this._limitListener)}_updateRenderedItems(){var t=this._itemsRendered,r=this._limit,n=this._activeIndex,i=this.disablePagination;if(!t)return;let o=Math.floor(n/r),a=this.category.items||[],s=i?a:a.slice(o*r,(o+1)*r);this.updateDom(s)}_limitChanged(t){this.setCacheSize(t*2)}_getCategoryItemKeyChanged(){this.setGetItemKey(this.getCategoryItemKey)}get _currentPage(){var t=this._limit,r=this._activeIndex;return Math.floor(r/t)+1}_computePageCount(t,r){return this.category?Math.ceil(this.category.items.length/r):0}get _multiplePagesExist(){var t=this._pageCount,r=this.disablePagination;return!r&&t>1}get _hasPreviousPage(){var t=this._currentPage;return t>1}get _hasNextPage(){var t=this._currentPage,r=this._pageCount;return t<r}_computeInputWidth(t){return`calc(${t.toString().length}em + 20px)`}_setActiveIndex(t){let r=(this.category.items||[]).length-1;t>r&&(t=r),t<0&&(t=0),this.set("_activeIndex",t)}_clampActiveIndex(){this._setActiveIndex(this._activeIndex)}_performPreviousPage(){this._setActiveIndex(this._activeIndex-this._limit)}_performNextPage(){this._setActiveIndex(this._activeIndex+this._limit)}_computePageInputValue(t,r,n){return t?r:n.toString()}_handlePageInputEvent(t){this.set("_pageInputRawValue",t.target.value);let r=Number(t.target.value||NaN);if(isNaN(r))return;let n=Math.max(1,Math.min(r,this._pageCount))-1;this._setActiveIndex(this._limit*n)}_handlePageChangeEvent(){this.set("_pageInputRawValue",this._currentPage.toString())}_handlePageFocusEvent(){this.set("_pageInputRawValue",this._pageInputValue),this.set("_pageInputFocused",!0)}_handlePageBlurEvent(){this.set("_pageInputFocused",!1)}_updatePageInputValue(t){var n;let r=(n=this.shadowRoot)==null?void 0:n.querySelector("#page-input input");r&&(r.value=t)}_updateInputWidth(){this.updateStyles({"--tf-category-paginated-view-page-input-width":this._inputWidth})}};hn.template=Q`
    <template is="dom-if" if="[[_paneRendered]]" id="ifRendered">
      <button class="heading" on-tap="_togglePane" open-button$="[[opened]]">
        <span class="name">
          <template is="dom-if" if="[[_isSearchResults]]">
            <template is="dom-if" if="[[_isCompositeSearch(category)]]">
              <span>Tags matching multiple experiments</span>
              <template is="dom-if" if="[[_isInvalidSearchResults]]">
                <span
                  >&nbsp;<strong>(malformed regular expression)</strong></span
                >
              </template>
            </template>
            <template is="dom-if" if="[[!_isCompositeSearch(category)]]">
              <span class="light">Tags matching /</span>
              <span class="category-name" title$="[[category.name]]"
                >[[category.name]]</span
              >
              <span class="light">/</span>
              <template is="dom-if" if="[[_isUniversalSearchQuery]]">
                <span> (all tags)</span>
              </template>
              <template is="dom-if" if="[[_isInvalidSearchResults]]">
                <span> <strong>(malformed regular expression)</strong></span>
              </template>
            </template>
          </template>
          <template is="dom-if" if="[[!_isSearchResults]]">
            <span class="category-name" title$="[[category.name]]"
              >[[category.name]]</span
            >
          </template>
        </span>
        <span class="count">
          <template is="dom-if" if="[[_hasMultiple]]">
            <span>[[_count]]</span>
          </template>
          <iron-icon icon="expand-more" class="expand-arrow"></iron-icon>
        </span>
      </button>
      <!-- TODO(stephanwlee): investigate further. For some reason,
        transitionend that the iron-collapse relies on sometimes does not
        trigger when rendering a chart with a spinner. A toy example cannot
        reproduce this bug. -->
      <iron-collapse opened="[[opened]]" no-animation="">
        <div class="content">
          <span id="top-of-container"></span>
          <template is="dom-if" if="[[_multiplePagesExist]]">
            <div class="big-page-buttons" style="margin-bottom: 10px;">
              <paper-button
                on-tap="_performPreviousPage"
                disabled$="[[!_hasPreviousPage]]"
                >Previous page</paper-button
              >
              <paper-button
                on-tap="_performNextPage"
                disabled$="[[!_hasNextPage]]"
                >Next page</paper-button
              >
            </div>
          </template>

          <div id="items">
            <slot name="items"></slot>
          </div>
          <template is="dom-if" if="[[_multiplePagesExist]]">
            <div id="controls-container">
              <div style="display: inline-block; padding: 0 5px">
                Page
                <paper-input
                  id="page-input"
                  type="number"
                  no-label-float=""
                  min="1"
                  max="[[_pageCount]]"
                  value="[[_pageInputValue]]"
                  on-input="_handlePageInputEvent"
                  on-change="_handlePageChangeEvent"
                  on-focus="_handlePageFocusEvent"
                  on-blur="_handlePageBlurEvent"
                ></paper-input>
                of [[_pageCount]]
              </div>
            </div>

            <div class="big-page-buttons" style="margin-top: 10px;">
              <paper-button
                on-tap="_performPreviousPage"
                disabled$="[[!_hasPreviousPage]]"
                >Previous page</paper-button
              >
              <paper-button
                on-tap="_performNextPage"
                disabled$="[[!_hasNextPage]]"
                >Next page</paper-button
              >
            </div>
          </template>
        </div>
      </iron-collapse>
    </template>
    <style>
      :host {
        display: block;
        margin: 0 5px 1px 10px;
      }

      :host(:first-of-type) {
        margin-top: 10px;
      }

      :host(:last-of-type) {
        margin-bottom: 20px;
      }

      .heading {
        background-color: var(--primary-background-color);
        border: none;
        color: inherit;
        cursor: pointer;
        width: 100%;
        font-size: 15px;
        line-height: 1;
        box-shadow: 0 1px 5px var(--tb-raised-button-shadow-color);
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .heading::-moz-focus-inner {
        padding: 10px 15px;
      }

      [open-button] {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
      }

      [open-button] .expand-arrow {
        transform: rotateZ(180deg);
      }

      .name {
        display: inline-flex;
        overflow: hidden;
      }

      .light {
        color: var(--paper-grey-500);
      }

      .category-name {
        white-space: pre;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 2px 0;
      }

      .count {
        margin: 0 5px;
        font-size: 12px;
        color: var(--paper-grey-500);
        display: flex;
        align-items: center;
        flex: none;
      }

      .heading::-moz-focus-inner {
        padding: 10px 15px;
      }

      .content {
        display: flex;
        flex-direction: column;
        background-color: var(--primary-background-color);
        border-bottom-left-radius: 2px;
        border-bottom-right-radius: 2px;
        border-top: none;
        border: 1px solid #dedede;
        padding: 15px;
      }

      .light {
        color: var(--paper-grey-500);
      }

      #controls-container {
        justify-content: center;
        display: flex;
        flex-direction: row;
        flex-grow: 0;
        flex-shrink: 0;
        width: 100%;
      }

      #controls-container paper-button {
        display: inline-block;
      }

      .big-page-buttons {
        display: flex;
      }

      .big-page-buttons paper-button {
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
        display: inline-block;
        flex-basis: 0;
        flex-grow: 1;
        flex-shrink: 1;
        font-size: 13px;
      }

      .big-page-buttons paper-button[disabled] {
        background: none;
      }

      slot {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
      }

      ::slotted([slot='items']) {
        /* Tooltip for descriptions and others break with more strict ones. */
        contain: style;
      }

      #page-input {
        display: inline-block;
        width: var(--tf-category-paginated-view-page-input-width, 100%);
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],hn.prototype,"category",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"initialOpened",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],hn.prototype,"opened",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"disablePagination",void 0);E([A({type:Number,computed:"_computeCount(category.items.*)"}),w("design:type",Number)],hn.prototype,"_count",void 0);E([A({type:Boolean,computed:"_computePaneRendered(category)",observer:"_onPaneRenderedChanged"}),w("design:type",Boolean)],hn.prototype,"_paneRendered",void 0);E([A({type:Boolean,computed:"_computeIsSearchResults(category.metadata.type)"}),w("design:type",Boolean)],hn.prototype,"_isSearchResults",void 0);E([A({type:Boolean,computed:"_computeIsInvalidSearchResults(category.metadata)"}),w("design:type",Boolean)],hn.prototype,"_isInvalidSearchResults",void 0);E([A({type:Boolean,computed:"_computeIsUniversalSearchQuery(category.metadata)"}),w("design:type",Boolean)],hn.prototype,"_isUniversalSearchQuery",void 0);E([A({type:Object,observer:"_getCategoryItemKeyChanged"}),w("design:type",Object)],hn.prototype,"getCategoryItemKey",void 0);E([A({type:Number,observer:"_limitChanged"}),w("design:type",Number)],hn.prototype,"_limit",void 0);E([A({type:Number}),w("design:type",Number)],hn.prototype,"_activeIndex",void 0);E([A({type:Number,computed:"_computePageCount(category.items.*, _limit)"}),w("design:type",Number)],hn.prototype,"_pageCount",void 0);E([A({type:String,computed:"_computeInputWidth(_pageCount)",observer:"_updateInputWidth"}),w("design:type",String)],hn.prototype,"_inputWidth",void 0);E([A({type:String,computed:"_computePageInputValue(_pageInputFocused, _pageInputRawValue, _currentPage)",observer:"_updatePageInputValue"}),w("design:type",String)],hn.prototype,"_pageInputValue",void 0);E([A({type:String}),w("design:type",String)],hn.prototype,"_pageInputRawValue",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"_pageInputFocused",void 0);E([Rt("_count"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasMultiple",null);E([Bt("opened"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],hn.prototype,"_changeContentActive",null);E([Rt("opened","_paneRendered"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_itemsRendered",null);E([Bt("_itemsRendered","category.items.*","_limit","_activeIndex","_pageCount","disablePagination"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],hn.prototype,"_updateRenderedItems",null);E([Rt("_limit","_activeIndex"),w("design:type",Number),w("design:paramtypes",[])],hn.prototype,"_currentPage",null);E([Rt("_pageCount","disablePagination"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_multiplePagesExist",null);E([Rt("_currentPage"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasPreviousPage",null);E([Rt("_currentPage","_pageCount"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasNextPage",null);E([Bt("category.items.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],hn.prototype,"_clampActiveIndex",null);hn=E([yt("tf-category-paginated-view")],hn);var W0t=Ee(Oe(),1);var H9=class{constructor(t){this.listener=t}},wp=class{constructor(){this.requestManager=new Ae(1),this._listeners=new Set,this.initialized=!1}refresh(){return this.load().then(()=>{this.initialized=!0})}addListener(t){let r=new H9(t);return this._listeners.add(r),r}removeListenerByKey(t){this._listeners.delete(t)}emitChange(){this._listeners.forEach(t=>{try{t.listener()}catch(r){}})}};var V9=class extends wp{load(){let t=_e().environment();return this.requestManager.request(t).then(r=>{let n={dataLocation:r.data_location,windowTitle:r.window_title};r.experiment_name!==void 0&&(n.experimentName=r.experiment_name),r.experiment_description!==void 0&&(n.experimentDescription=r.experiment_description),r.creation_time!==void 0&&(n.creationTime=r.creation_time),!W0t.isEqual(this.environment,n)&&(this.environment=n,this.emitChange())})}getDataLocation(){return this.environment?this.environment.dataLocation:""}getWindowTitle(){return this.environment?this.environment.windowTitle:""}getExperimentName(){return this.environment?this.environment.experimentName:""}getExperimentDescription(){return this.environment?this.environment.experimentDescription:""}getCreationTime(){return this.environment?this.environment.creationTime:null}},ib=new V9;var Y0t=Ee(Oe(),1);var U9=class extends wp{constructor(){super(...arguments),this._runs=[]}load(){let t=_e().runs();return this.requestManager.request(t).then(r=>{Y0t.isEqual(this._runs,r)||(this._runs=r,this.emitChange())})}getRuns(){return this._runs.slice()}},Sp=new U9;var Vr={};Zs(Vr,{FormatSpecifier:()=>GE,active:()=>Vvt,arc:()=>BSt,area:()=>z8,areaRadial:()=>o$,ascending:()=>aa,autoType:()=>ij,axisBottom:()=>Z9,axisLeft:()=>lb,axisRight:()=>m_t,axisTop:()=>d_t,bisect:()=>vs,bisectLeft:()=>$0t,bisectRight:()=>WW,bisector:()=>ob,blob:()=>D1t,brush:()=>GL,brushSelection:()=>UL,brushX:()=>jvt,brushY:()=>qL,buffer:()=>O1t,chord:()=>$vt,clientPoint:()=>Om,cluster:()=>Wbt,color:()=>rc,contourDensity:()=>g1t,contours:()=>ZL,create:()=>syt,creator:()=>Nm,cross:()=>q9,csv:()=>F1t,csvFormat:()=>b1t,csvFormatBody:()=>w1t,csvFormatRow:()=>M1t,csvFormatRows:()=>S1t,csvFormatValue:()=>E1t,csvParse:()=>Cb,csvParseRows:()=>x1t,cubehelix:()=>ca,curveBasis:()=>W8,curveBasisClosed:()=>QSt,curveBasisOpen:()=>e3t,curveBundle:()=>n3t,curveCardinal:()=>i3t,curveCardinalClosed:()=>o3t,curveCardinalOpen:()=>a3t,curveCatmullRom:()=>l3t,curveCatmullRomClosed:()=>u3t,curveCatmullRomOpen:()=>f3t,curveLinear:()=>jh,curveLinearClosed:()=>d3t,curveMonotoneX:()=>x3t,curveMonotoneY:()=>b3t,curveNatural:()=>M3t,curveStep:()=>E3t,curveStepAfter:()=>C3t,curveStepBefore:()=>T3t,customEvent:()=>Ep,descending:()=>Z0t,deviation:()=>W9,dispatch:()=>xs,drag:()=>pb,dragDisable:()=>Fm,dragEnable:()=>Bm,dsv:()=>oj,dsvFormat:()=>Ym,easeBack:()=>OL,easeBackIn:()=>OY,easeBackInOut:()=>OL,easeBackOut:()=>zY,easeBounce:()=>I_,easeBounceIn:()=>RY,easeBounceInOut:()=>NY,easeBounceOut:()=>I_,easeCircle:()=>NL,easeCircleIn:()=>IY,easeCircleInOut:()=>NL,easeCircleOut:()=>LY,easeCubic:()=>bs,easeCubicIn:()=>xY,easeCubicInOut:()=>bs,easeCubicOut:()=>bY,easeElastic:()=>zL,easeElasticIn:()=>HY,easeElasticInOut:()=>VY,easeElasticOut:()=>zL,easeExp:()=>RL,easeExpIn:()=>AY,easeExpInOut:()=>RL,easeExpOut:()=>PY,easeLinear:()=>_Y,easePoly:()=>LL,easePolyIn:()=>SY,easePolyInOut:()=>LL,easePolyOut:()=>MY,easeQuad:()=>IL,easeQuadIn:()=>yY,easeQuadInOut:()=>IL,easeQuadOut:()=>vY,easeSin:()=>kL,easeSinIn:()=>EY,easeSinInOut:()=>kL,easeSinOut:()=>TY,entries:()=>u1t,event:()=>qt,extent:()=>sa,forceCenter:()=>W1t,forceCollide:()=>uxt,forceLink:()=>fxt,forceManyBody:()=>gxt,forceRadial:()=>_xt,forceSimulation:()=>mxt,forceX:()=>yxt,forceY:()=>vxt,format:()=>xn,formatDefaultLocale:()=>nk,formatLocale:()=>ek,formatPrefix:()=>WE,formatSpecifier:()=>kp,geoAlbers:()=>Uk,geoAlbersUsa:()=>Lbt,geoArea:()=>Nxt,geoAzimuthalEqualArea:()=>kbt,geoAzimuthalEqualAreaRaw:()=>Gk,geoAzimuthalEquidistant:()=>Rbt,geoAzimuthalEquidistantRaw:()=>Wk,geoBounds:()=>Uxt,geoCentroid:()=>Xxt,geoCircle:()=>Qxt,geoClipAntimeridian:()=>e5,geoClipCircle:()=>Ak,geoClipExtent:()=>rbt,geoClipRectangle:()=>Op,geoConicConformal:()=>Dbt,geoConicConformalRaw:()=>jj,geoConicEqualArea:()=>Y_,geoConicEqualAreaRaw:()=>Wj,geoConicEquidistant:()=>zbt,geoConicEquidistantRaw:()=>Xj,geoContains:()=>cbt,geoDistance:()=>Nb,geoEqualEarth:()=>Fbt,geoEqualEarthRaw:()=>Xk,geoEquirectangular:()=>Obt,geoEquirectangularRaw:()=>X_,geoGnomonic:()=>Bbt,geoGnomonicRaw:()=>$k,geoGraticule:()=>Nk,geoGraticule10:()=>fbt,geoIdentity:()=>Hbt,geoInterpolate:()=>pbt,geoLength:()=>kk,geoMercator:()=>Nbt,geoMercatorRaw:()=>j_,geoNaturalEarth1:()=>Vbt,geoNaturalEarth1Raw:()=>Kk,geoOrthographic:()=>Ubt,geoOrthographicRaw:()=>Zk,geoPath:()=>Tbt,geoProjection:()=>Si,geoProjectionMutator:()=>l5,geoRotation:()=>wk,geoStereographic:()=>qbt,geoStereographicRaw:()=>Jk,geoStream:()=>vo,geoTransform:()=>Cbt,geoTransverseMercator:()=>Gbt,geoTransverseMercatorRaw:()=>Qk,gray:()=>Syt,hcl:()=>gb,hierarchy:()=>p5,histogram:()=>r_t,hsl:()=>Um,html:()=>q1t,image:()=>H1t,interpolate:()=>nc,interpolateArray:()=>Dyt,interpolateBasis:()=>lL,interpolateBasisClosed:()=>cL,interpolateBlues:()=>xSt,interpolateBrBG:()=>Qwt,interpolateBuGn:()=>lSt,interpolateBuPu:()=>cSt,interpolateCividis:()=>TSt,interpolateCool:()=>PSt,interpolateCubehelix:()=>Jyt,interpolateCubehelixDefault:()=>CSt,interpolateCubehelixLong:()=>T_,interpolateDate:()=>fL,interpolateDiscrete:()=>Oyt,interpolateGnBu:()=>uSt,interpolateGreens:()=>bSt,interpolateGreys:()=>wSt,interpolateHcl:()=>$yt,interpolateHclLong:()=>Kyt,interpolateHsl:()=>Yyt,interpolateHslLong:()=>jyt,interpolateHue:()=>zyt,interpolateInferno:()=>DSt,interpolateLab:()=>E_,interpolateMagma:()=>NSt,interpolateNumber:()=>zi,interpolateNumberArray:()=>yb,interpolateObject:()=>pL,interpolateOrRd:()=>hSt,interpolateOranges:()=>ESt,interpolatePRGn:()=>tSt,interpolatePiYG:()=>eSt,interpolatePlasma:()=>OSt,interpolatePuBu:()=>pSt,interpolatePuBuGn:()=>fSt,interpolatePuOr:()=>rSt,interpolatePuRd:()=>dSt,interpolatePurples:()=>SSt,interpolateRainbow:()=>ISt,interpolateRdBu:()=>nSt,interpolateRdGy:()=>iSt,interpolateRdPu:()=>mSt,interpolateRdYlBu:()=>oSt,interpolateRdYlGn:()=>aSt,interpolateReds:()=>MSt,interpolateRgb:()=>Gm,interpolateRgbBasis:()=>uL,interpolateRgbBasisClosed:()=>Nyt,interpolateRound:()=>dL,interpolateSinebow:()=>LSt,interpolateSpectral:()=>sSt,interpolateString:()=>vb,interpolateTransformCss:()=>_L,interpolateTransformSvg:()=>yL,interpolateTurbo:()=>kSt,interpolateViridis:()=>RSt,interpolateWarm:()=>ASt,interpolateYlGn:()=>_St,interpolateYlGnBu:()=>gSt,interpolateYlOrBr:()=>ySt,interpolateYlOrRd:()=>vSt,interpolateZoom:()=>vL,interrupt:()=>hu,interval:()=>nvt,isoFormat:()=>Fwt,isoParse:()=>Bwt,json:()=>V1t,keys:()=>$L,lab:()=>S_,lch:()=>Eyt,line:()=>vu,lineRadial:()=>i$,linkHorizontal:()=>WSt,linkRadial:()=>jSt,linkVertical:()=>YSt,local:()=>eL,map:()=>Ji,matcher:()=>ub,max:()=>lu,mean:()=>o_t,median:()=>a_t,merge:()=>Lm,min:()=>km,mouse:()=>zo,namespace:()=>Ih,namespaces:()=>SE,nest:()=>r1t,now:()=>Pp,pack:()=>d2t,packEnclose:()=>e8,packSiblings:()=>u2t,pairs:()=>K0t,partition:()=>m2t,path:()=>ws,permute:()=>s_t,pie:()=>qSt,piecewise:()=>dY,pointRadial:()=>cy,polygonArea:()=>M2t,polygonCentroid:()=>E2t,polygonContains:()=>P2t,polygonHull:()=>A2t,polygonLength:()=>I2t,precisionFixed:()=>ik,precisionPrefix:()=>ok,precisionRound:()=>ak,quadtree:()=>Fh,quantile:()=>la,quantize:()=>Qyt,radialArea:()=>o$,radialLine:()=>i$,randomBates:()=>R2t,randomExponential:()=>N2t,randomIrwinHall:()=>s8,randomLogNormal:()=>k2t,randomNormal:()=>a8,randomUniform:()=>L2t,range:()=>Ir,rgb:()=>cu,ribbon:()=>Jvt,scaleBand:()=>tg,scaleDiverging:()=>I8,scaleDivergingLog:()=>CX,scaleDivergingPow:()=>L8,scaleDivergingSqrt:()=>qwt,scaleDivergingSymlog:()=>AX,scaleIdentity:()=>u8,scaleImplicit:()=>l8,scaleLinear:()=>zn,scaleLog:()=>cc,scaleOrdinal:()=>gu,scalePoint:()=>eg,scalePow:()=>Z_,scaleQuantile:()=>rg,scaleQuantize:()=>qb,scaleSequential:()=>T8,scaleSequentialLog:()=>EX,scaleSequentialPow:()=>C8,scaleSequentialQuantile:()=>A8,scaleSequentialSqrt:()=>Uwt,scaleSequentialSymlog:()=>TX,scaleSqrt:()=>Y2t,scaleSymlog:()=>f8,scaleThreshold:()=>p8,scaleTime:()=>Yb,scaleUtc:()=>Vwt,scan:()=>l_t,schemeAccent:()=>Gwt,schemeBlues:()=>KX,schemeBrBG:()=>PX,schemeBuGn:()=>FX,schemeBuPu:()=>BX,schemeCategory10:()=>jb,schemeDark2:()=>Wwt,schemeGnBu:()=>HX,schemeGreens:()=>ZX,schemeGreys:()=>JX,schemeOrRd:()=>VX,schemeOranges:()=>e$,schemePRGn:()=>IX,schemePaired:()=>Ywt,schemePastel1:()=>jwt,schemePastel2:()=>Xwt,schemePiYG:()=>LX,schemePuBu:()=>qX,schemePuBuGn:()=>UX,schemePuOr:()=>kX,schemePuRd:()=>GX,schemePurples:()=>QX,schemeRdBu:()=>RX,schemeRdGy:()=>NX,schemeRdPu:()=>WX,schemeRdYlBu:()=>DX,schemeRdYlGn:()=>OX,schemeReds:()=>t$,schemeSet1:()=>$wt,schemeSet2:()=>Kwt,schemeSet3:()=>Zwt,schemeSpectral:()=>zX,schemeTableau10:()=>Jwt,schemeYlGn:()=>jX,schemeYlGnBu:()=>YX,schemeYlOrBr:()=>XX,schemeYlOrRd:()=>$X,select:()=>Ht,selectAll:()=>Tp,selection:()=>Lh,selector:()=>Dm,selectorAll:()=>cb,set:()=>o1t,shuffle:()=>c_t,stack:()=>A3t,stackOffsetDiverging:()=>I3t,stackOffsetExpand:()=>P3t,stackOffsetNone:()=>xu,stackOffsetSilhouette:()=>L3t,stackOffsetWiggle:()=>k3t,stackOrderAppearance:()=>Z8,stackOrderAscending:()=>J8,stackOrderDescending:()=>R3t,stackOrderInsideOut:()=>N3t,stackOrderNone:()=>bu,stackOrderReverse:()=>D3t,stratify:()=>y2t,style:()=>Mp,sum:()=>u_t,svg:()=>G1t,symbol:()=>ZSt,symbolCircle:()=>k5,symbolCross:()=>B8,symbolDiamond:()=>H8,symbolSquare:()=>U8,symbolStar:()=>V8,symbolTriangle:()=>q8,symbolWye:()=>G8,symbols:()=>KSt,text:()=>O_,thresholdFreedmanDiaconis:()=>n_t,thresholdScott:()=>i_t,thresholdSturges:()=>sb,tickFormat:()=>c8,tickIncrement:()=>b_,tickStep:()=>el,ticks:()=>ab,timeDay:()=>ey,timeDays:()=>Q2t,timeFormat:()=>M5,timeFormatDefaultLocale:()=>S8,timeFormatLocale:()=>S5,timeFriday:()=>uX,timeFridays:()=>iwt,timeHour:()=>y8,timeHours:()=>Z2t,timeInterval:()=>br,timeMillisecond:()=>J_,timeMilliseconds:()=>aX,timeMinute:()=>_8,timeMinutes:()=>$2t,timeMonday:()=>ny,timeMondays:()=>twt,timeMonth:()=>v8,timeMonths:()=>swt,timeParse:()=>wX,timeSaturday:()=>hX,timeSaturdays:()=>owt,timeSecond:()=>ty,timeSeconds:()=>sX,timeSunday:()=>ng,timeSundays:()=>fX,timeThursday:()=>Fp,timeThursdays:()=>nwt,timeTuesday:()=>lX,timeTuesdays:()=>ewt,timeWednesday:()=>cX,timeWednesdays:()=>rwt,timeWeek:()=>ng,timeWeeks:()=>fX,timeYear:()=>Wh,timeYears:()=>lwt,timeout:()=>zE,timer:()=>P_,timerFlush:()=>gY,touch:()=>Cp,touches:()=>lyt,transition:()=>PL,transpose:()=>Y9,tree:()=>v2t,treemap:()=>x2t,treemapBinary:()=>b2t,treemapDice:()=>qh,treemapResquarify:()=>S2t,treemapSlice:()=>Qm,treemapSliceDice:()=>w2t,treemapSquarify:()=>o8,tsv:()=>B1t,tsvFormat:()=>A1t,tsvFormatBody:()=>P1t,tsvFormatRow:()=>L1t,tsvFormatRows:()=>I1t,tsvFormatValue:()=>k1t,tsvParse:()=>Ab,tsvParseRows:()=>C1t,utcDay:()=>iy,utcDays:()=>dwt,utcFormat:()=>sy,utcFriday:()=>gX,utcFridays:()=>vwt,utcHour:()=>b8,utcHours:()=>fwt,utcMillisecond:()=>J_,utcMilliseconds:()=>aX,utcMinute:()=>x8,utcMinutes:()=>uwt,utcMonday:()=>ay,utcMondays:()=>mwt,utcMonth:()=>w8,utcMonths:()=>wwt,utcParse:()=>E5,utcSaturday:()=>_X,utcSaturdays:()=>xwt,utcSecond:()=>ty,utcSeconds:()=>sX,utcSunday:()=>ig,utcSundays:()=>yX,utcThursday:()=>Bp,utcThursdays:()=>ywt,utcTuesday:()=>dX,utcTuesdays:()=>gwt,utcWednesday:()=>mX,utcWednesdays:()=>_wt,utcWeek:()=>ig,utcWeeks:()=>yX,utcYear:()=>Yh,utcYears:()=>Swt,values:()=>l1t,variance:()=>G9,version:()=>j0t,voronoi:()=>K3t,window:()=>hb,xml:()=>U1t,zip:()=>h_t,zoom:()=>eR,zoomIdentity:()=>$h,zoomTransform:()=>i2});var j0t="5.7.0";function aa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ob(e){return e.length===1&&(e=l2e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function l2e(e){return function(t,r){return aa(e(t),r)}}var X0t=ob(aa),WW=X0t.right,$0t=X0t.left,vs=WW;function K0t(e,t){t==null&&(t=YW);for(var r=0,n=e.length-1,i=e[0],o=new Array(n<0?0:n);r<n;)o[r]=t(i,i=e[++r]);return o}function YW(e,t){return[e,t]}function q9(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=YW),a=l=0;a<n;++a)for(c=e[a],s=0;s<i;++s,++l)o[l]=r(c,t[s]);return o}function Z0t(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function tl(e){return e===null?NaN:+e}function G9(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=tl(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=tl(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}function W9(e,t){var r=G9(e,t);return r&&Math.sqrt(r)}function sa(e,t){var r=e.length,n=-1,i,o,a;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=a=i;++n<r;)(i=e[n])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=a=i;++n<r;)(i=t(e[n],n,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var J0t=Array.prototype,Q0t=J0t.slice,t_t=J0t.map;function bE(e){return function(){return e}}function e_t(e){return e}function Ir(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var jW=Math.sqrt(50),XW=Math.sqrt(10),$W=Math.sqrt(2);function ab(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=b_(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function b_(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=jW?10:o>=XW?5:o>=$W?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=jW?10:o>=XW?5:o>=$W?2:1)}function el(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=jW?i*=10:o>=XW?i*=5:o>=$W&&(i*=2),t<e?-i:i}function sb(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function r_t(){var e=e_t,t=sa,r=sb;function n(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var c=t(l),u=c[0],h=c[1],f=r(l,u,h);Array.isArray(f)||(f=el(u,h,f),f=Ir(Math.ceil(u/f)*f,h,f));for(var p=f.length;f[0]<=u;)f.shift(),--p;for(;f[p-1]>h;)f.pop(),--p;var d=new Array(p+1),g;for(o=0;o<=p;++o)g=d[o]=[],g.x0=o>0?f[o-1]:u,g.x1=o<p?f[o]:h;for(o=0;o<a;++o)s=l[o],u<=s&&s<=h&&d[vs(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:bE(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:bE([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?bE(Q0t.call(i)):bE(i),n):r},n}function la(e,t,r){if(r==null&&(r=tl),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function n_t(e,t,r){return e=t_t.call(e,tl).sort(aa),Math.ceil((r-t)/(2*(la(e,.75)-la(e,.25))*Math.pow(e.length,-1/3)))}function i_t(e,t,r){return Math.ceil((r-t)/(3.5*W9(e)*Math.pow(e.length,-1/3)))}function lu(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&i>o&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&i>o&&(o=i);return o}function o_t(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=tl(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=tl(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}function a_t(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=tl(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=tl(t(e[n],n,e)))||o.push(i);return la(o.sort(aa),.5)}function Lm(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}function km(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&o>i&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&o>i&&(o=i);return o}function s_t(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}function l_t(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,a=e[i];for(t==null&&(t=aa);++n<r;)(t(o=e[n],a)<0||t(a,a)!==0)&&(a=o,i=n);if(t(a,a)===0)return i}}function c_t(e,t,r){for(var n=(r==null?e.length:r)-(t=t==null?0:+t),i,o;n;)o=Math.random()*n--|0,i=e[n+t],e[n+t]=e[o+t],e[o+t]=i;return e}function u_t(e,t){var r=e.length,n=-1,i,o=0;if(t==null)for(;++n<r;)(i=+e[n])&&(o+=i);else for(;++n<r;)(i=+t(e[n],n,e))&&(o+=i);return o}function Y9(e){if(!(o=e.length))return[];for(var t=-1,r=km(e,c2e),n=new Array(r);++t<r;)for(var i=-1,o,a=n[t]=new Array(o);++i<o;)a[i]=e[i][t];return n}function c2e(e){return e.length}function h_t(){return Y9(arguments)}var j9=Array.prototype.slice;function f_t(e){return e}var X9=1,$9=2,KW=3,wE=4,p_t=1e-6;function u2e(e){return"translate("+(e+.5)+",0)"}function h2e(e){return"translate(0,"+(e+.5)+")"}function f2e(e){return function(t){return+e(t)}}function p2e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function d2e(){return!this.__axis}function K9(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===X9||e===wE?-1:1,c=e===wE||e===$9?"x":"y",u=e===X9||e===KW?u2e:h2e;function h(f){var p=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,d=i==null?t.tickFormat?t.tickFormat.apply(t,r):f_t:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?p2e:f2e)(t.copy()),S=f.selection?f.selection():f,C=S.selectAll(".domain").data([null]),P=S.selectAll(".tick").data(p,t).order(),k=P.exit(),O=P.enter().append("g").attr("class","tick"),D=P.select("line"),B=P.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(O),D=D.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),B=B.merge(O.append("text").attr("fill","currentColor").attr(c,l*g).attr("dy",e===X9?"0em":e===KW?"0.71em":"0.32em")),f!==S&&(C=C.transition(f),P=P.transition(f),D=D.transition(f),B=B.transition(f),k=k.transition(f).attr("opacity",p_t).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",p_t).attr("transform",function(I){var L=this.parentNode.__axis;return u(L&&isFinite(L=L(I))?L:b(I))})),k.remove(),C.attr("d",e===wE||e==$9?a?"M"+l*a+","+y+"H0.5V"+x+"H"+l*a:"M0.5,"+y+"V"+x:a?"M"+y+","+l*a+"V0.5H"+x+"V"+l*a:"M"+y+",0.5H"+x),P.attr("opacity",1).attr("transform",function(I){return u(b(I))}),D.attr(c+"2",l*o),B.attr(c,l*g).text(d),S.filter(d2e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===$9?"start":e===wE?"end":"middle"),S.each(function(){this.__axis=b})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return r=j9.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:j9.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:j9.call(f),h):n&&n.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(o=a=+f,h):o},h.tickSizeInner=function(f){return arguments.length?(o=+f,h):o},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(s=+f,h):s},h}function d_t(e){return K9(X9,e)}function m_t(e){return K9($9,e)}function Z9(e){return K9(KW,e)}function lb(e){return K9(wE,e)}Rm();Rm();var Q9="http://www.w3.org/1999/xhtml",SE={svg:"http://www.w3.org/2000/svg",xhtml:Q9,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ih(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SE.hasOwnProperty(t)?{space:SE[t],local:e}:e}function y2e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Q9&&t.documentElement.namespaceURI===Q9?t.createElement(e):t.createElementNS(r,e)}}function v2e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nm(e){var t=Ih(e);return(t.local?v2e:y2e)(t)}function x2e(){}function Dm(e){return e==null?x2e:function(){return this.querySelector(e)}}function v_t(e){typeof e!="function"&&(e=Dm(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Dn(n,this._parents)}function b2e(){return[]}function cb(e){return e==null?b2e:function(){return this.querySelectorAll(e)}}function x_t(e){typeof e!="function"&&(e=cb(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new Dn(n,i)}function ub(e){return function(){return this.matches(e)}}function b_t(e){typeof e!="function"&&(e=ub(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Dn(n,this._parents)}function tL(e){return new Array(e.length)}function w_t(){return new Dn(this._enter||this._groups.map(tL),this._parents)}function ME(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ME.prototype={constructor:ME,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function S_t(e){return function(){return e}}var M_t="$";function w2e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new ME(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function S2e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=M_t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=M_t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new ME(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function E_t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?S2e:w2e,n=this._parents,i=this._groups;typeof e!="function"&&(e=S_t(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new Dn(a,n),a._enter=s,a._exit=l,a}function T_t(){return new Dn(this._exit||this._groups.map(tL),this._parents)}function C_t(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function A_t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Dn(a,this._parents)}function P_t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function I_t(e){e||(e=M2e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Dn(i,this._parents).order()}function M2e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function L_t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function k_t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function R_t(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function N_t(){var e=0;return this.each(function(){++e}),e}function D_t(){return!this.node()}function O_t(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function E2e(e){return function(){this.removeAttribute(e)}}function T2e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2e(e,t){return function(){this.setAttribute(e,t)}}function A2e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function P2e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function I2e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function z_t(e,t){var r=Ih(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?T2e:E2e:typeof t=="function"?r.local?I2e:P2e:r.local?A2e:C2e)(r,t))}function hb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function L2e(e){return function(){this.style.removeProperty(e)}}function k2e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function R2e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function F_t(e,t,r){return arguments.length>1?this.each((t==null?L2e:typeof t=="function"?R2e:k2e)(e,t,r==null?"":r)):Mp(this.node(),e)}function Mp(e,t){return e.style.getPropertyValue(t)||hb(e).getComputedStyle(e,null).getPropertyValue(t)}function N2e(e){return function(){delete this[e]}}function D2e(e,t){return function(){this[e]=t}}function O2e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function B_t(e,t){return arguments.length>1?this.each((t==null?N2e:typeof t=="function"?O2e:D2e)(e,t)):this.node()[e]}function H_t(e){return e.trim().split(/^|\s+/)}function ZW(e){return e.classList||new V_t(e)}function V_t(e){this._node=e,this._names=H_t(e.getAttribute("class")||"")}V_t.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function U_t(e,t){for(var r=ZW(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function q_t(e,t){for(var r=ZW(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function z2e(e){return function(){U_t(this,e)}}function F2e(e){return function(){q_t(this,e)}}function B2e(e,t){return function(){(t.apply(this,arguments)?U_t:q_t)(this,e)}}function G_t(e,t){var r=H_t(e+"");if(arguments.length<2){for(var n=ZW(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?B2e:t?z2e:F2e)(r,t))}function H2e(){this.textContent=""}function V2e(e){return function(){this.textContent=e}}function U2e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function W_t(e){return arguments.length?this.each(e==null?H2e:(typeof e=="function"?U2e:V2e)(e)):this.node().textContent}function q2e(){this.innerHTML=""}function G2e(e){return function(){this.innerHTML=e}}function W2e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Y_t(e){return arguments.length?this.each(e==null?q2e:(typeof e=="function"?W2e:G2e)(e)):this.node().innerHTML}function Y2e(){this.nextSibling&&this.parentNode.appendChild(this)}function j_t(){return this.each(Y2e)}function j2e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X_t(){return this.each(j2e)}function $_t(e){var t=typeof e=="function"?e:Nm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function X2e(){return null}function K_t(e,t){var r=typeof e=="function"?e:Nm(e),n=t==null?X2e:typeof t=="function"?t:Dm(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function $2e(){var e=this.parentNode;e&&e.removeChild(this)}function Z_t(){return this.each($2e)}function K2e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z2e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J_t(e){return this.select(e?Z2e:K2e)}function Q_t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var eyt={},qt=null;typeof document!="undefined"&&(tyt=document.documentElement,"onmouseenter"in tyt||(eyt={mouseenter:"mouseover",mouseleave:"mouseout"}));var tyt;function J2e(e,t,r){return e=ryt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function ryt(e,t,r){return function(n){var i=qt;qt=n;try{e.call(this,this.__data__,t,r)}finally{qt=i}}}function Q2e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function twe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function ewe(e,t,r){var n=eyt.hasOwnProperty(e.type)?J2e:ryt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function nyt(e,t,r){var n=Q2e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?ewe:twe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Ep(e,t,r,n){var i=qt;e.sourceEvent=qt,qt=e;try{return t.apply(r,n)}finally{qt=i}}function iyt(e,t,r){var n=hb(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function rwe(e,t){return function(){return iyt(this,e,t)}}function nwe(e,t){return function(){return iyt(this,e,t.apply(this,arguments))}}function oyt(e,t){return this.each((typeof t=="function"?nwe:rwe)(e,t))}var EE=[null];function Dn(e,t){this._groups=e,this._parents=t}function ayt(){return new Dn([[document.documentElement]],EE)}Dn.prototype=ayt.prototype={constructor:Dn,select:v_t,selectAll:x_t,filter:b_t,data:E_t,enter:w_t,exit:T_t,join:C_t,merge:A_t,order:P_t,sort:I_t,call:L_t,nodes:k_t,node:R_t,size:N_t,empty:D_t,each:O_t,attr:z_t,style:F_t,property:B_t,classed:G_t,text:W_t,html:Y_t,raise:j_t,lower:X_t,append:$_t,insert:K_t,remove:Z_t,clone:J_t,datum:Q_t,on:nyt,dispatch:oyt};var Lh=ayt;function Ht(e){return typeof e=="string"?new Dn([[document.querySelector(e)]],[document.documentElement]):new Dn([[e]],EE)}function syt(e){return Ht(Nm(e).call(document.documentElement))}var iwe=0;function eL(){return new JW}function JW(){this._="@"+(++iwe).toString(36)}JW.prototype=eL.prototype={constructor:JW,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function fb(){for(var e=qt,t;t=e.sourceEvent;)e=t;return e}function Om(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function zo(e){var t=fb();return t.changedTouches&&(t=t.changedTouches[0]),Om(e,t)}function Tp(e){return typeof e=="string"?new Dn([document.querySelectorAll(e)],[document.documentElement]):new Dn([e==null?[]:e],EE)}function Cp(e,t,r){arguments.length<3&&(r=t,t=fb().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Om(e,o);return null}function lyt(e,t){t==null&&(t=fb().touches);for(var r=0,n=t?t.length:0,i=new Array(n);r<n;++r)i[r]=Om(e,t[r]);return i}function rL(){qt.stopImmediatePropagation()}function zm(){qt.preventDefault(),qt.stopImmediatePropagation()}function Fm(e){var t=e.document.documentElement,r=Ht(e).on("dragstart.drag",zm,!0);"onselectstart"in t?r.on("selectstart.drag",zm,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Bm(e,t){var r=e.document.documentElement,n=Ht(e).on("dragstart.drag",null);t&&(n.on("click.drag",zm,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function TE(e){return function(){return e}}function CE(e,t,r,n,i,o,a,s,l,c){this.target=e,this.type=t,this.subject=r,this.identifier=n,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}CE.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function owe(){return!qt.ctrlKey&&!qt.button}function awe(){return this.parentNode}function swe(e){return e==null?{x:qt.x,y:qt.y}:e}function lwe(){return navigator.maxTouchPoints||"ontouchstart"in this}function pb(){var e=owe,t=awe,r=swe,n=lwe,i={},o=xs("start","drag","end"),a=0,s,l,c,u,h=0;function f(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",_).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!(u||!e.apply(this,arguments))){var S=b("mouse",t.apply(this,arguments),zo,this,arguments);!S||(Ht(qt.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),Fm(qt.view),rL(),c=!1,s=qt.clientX,l=qt.clientY,S("start"))}}function d(){if(zm(),!c){var S=qt.clientX-s,C=qt.clientY-l;c=S*S+C*C>h}i.mouse("drag")}function g(){Ht(qt.view).on("mousemove.drag mouseup.drag",null),Bm(qt.view,c),zm(),i.mouse("end")}function _(){if(!!e.apply(this,arguments)){var S=qt.changedTouches,C=t.apply(this,arguments),P=S.length,k,O;for(k=0;k<P;++k)(O=b(S[k].identifier,C,Cp,this,arguments))&&(rL(),O("start"))}}function y(){var S=qt.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(zm(),k("drag"))}function x(){var S=qt.changedTouches,C=S.length,P,k;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),P=0;P<C;++P)(k=i[S[P].identifier])&&(rL(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!Ep(new CE(f,"beforestart",B,S,a,D[0],D[1],0,0,R),function(){return(qt.subject=B=r.apply(k,O))==null?!1:(I=B.x-D[0]||0,L=B.y-D[1]||0,!0)}))return function F(z){var U=D,W;switch(z){case"start":i[S]=F,W=a++;break;case"end":delete i[S],--a;case"drag":D=P(C,S),W=a;break}Ep(new CE(f,z,B,S,W,D[0]+I,D[1]+L,D[0]-U[0],D[1]-U[1],R),R.apply,R,[z,k,O])}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:TE(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:TE(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:TE(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:TE(!!S),f):n},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,f):Math.sqrt(h)},f}function Ap(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Hm(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Nh(){}var Vm=.7,w_=1/Vm,db="\\s*([+-]?\\d+)\\s*",AE="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cwe=/^#([0-9a-f]{3,8})$/,uwe=new RegExp("^rgb\\("+[db,db,db]+"\\)$"),hwe=new RegExp("^rgb\\("+[Rh,Rh,Rh]+"\\)$"),fwe=new RegExp("^rgba\\("+[db,db,db,AE]+"\\)$"),pwe=new RegExp("^rgba\\("+[Rh,Rh,Rh,AE]+"\\)$"),dwe=new RegExp("^hsl\\("+[AE,Rh,Rh]+"\\)$"),mwe=new RegExp("^hsla\\("+[AE,Rh,Rh,AE]+"\\)$"),cyt={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};Ap(Nh,rc,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:uyt,formatHex:uyt,formatHsl:gwe,formatRgb:hyt,toString:hyt});function uyt(){return this.rgb().formatHex()}function gwe(){return gyt(this).formatHsl()}function hyt(){return this.rgb().formatRgb()}function rc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=cwe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?fyt(t):r===3?new Ki(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nL(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uwe.exec(e))?new Ki(t[1],t[2],t[3],1):(t=hwe.exec(e))?new Ki(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fwe.exec(e))?nL(t[1],t[2],t[3],t[4]):(t=pwe.exec(e))?nL(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dwe.exec(e))?myt(t[1],t[2]/100,t[3]/100,1):(t=mwe.exec(e))?myt(t[1],t[2]/100,t[3]/100,t[4]):cyt.hasOwnProperty(e)?fyt(cyt[e]):e==="transparent"?new Ki(NaN,NaN,NaN,0):null}function fyt(e){return new Ki(e>>16&255,e>>8&255,e&255,1)}function nL(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ki(e,t,r,n)}function PE(e){return e instanceof Nh||(e=rc(e)),e?(e=e.rgb(),new Ki(e.r,e.g,e.b,e.opacity)):new Ki}function cu(e,t,r,n){return arguments.length===1?PE(e):new Ki(e,t,r,n==null?1:n)}function Ki(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ap(Ki,cu,Hm(Nh,{brighter:function(e){return e=e==null?w_:Math.pow(w_,e),new Ki(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Vm:Math.pow(Vm,e),new Ki(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pyt,formatHex:pyt,formatRgb:dyt,toString:dyt}));function pyt(){return"#"+QW(this.r)+QW(this.g)+QW(this.b)}function dyt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function QW(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function myt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kh(e,t,r,n)}function gyt(e){if(e instanceof kh)return new kh(e.h,e.s,e.l,e.opacity);if(e instanceof Nh||(e=rc(e)),!e)return new kh;if(e instanceof kh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new kh(a,s,l,e.opacity)}function Um(e,t,r,n){return arguments.length===1?gyt(e):new kh(e,t,r,n==null?1:n)}function kh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ap(kh,Um,Hm(Nh,{brighter:function(e){return e=e==null?w_:Math.pow(w_,e),new kh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Vm:Math.pow(Vm,e),new kh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ki(tY(e>=240?e-240:e+120,i,n),tY(e,i,n),tY(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function tY(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var iL=Math.PI/180,oL=180/Math.PI;var aL=18,_yt=.96422,yyt=1,vyt=.82521,xyt=4/29,mb=6/29,byt=3*mb*mb,_we=mb*mb*mb;function wyt(e){if(e instanceof uu)return new uu(e.l,e.a,e.b,e.opacity);if(e instanceof Dh)return Tyt(e);e instanceof Ki||(e=PE(e));var t=iY(e.r),r=iY(e.g),n=iY(e.b),i=eY((.2225045*t+.7168786*r+.0606169*n)/yyt),o,a;return t===r&&r===n?o=a=i:(o=eY((.4360747*t+.3850649*r+.1430804*n)/_yt),a=eY((.0139322*t+.0971045*r+.7141733*n)/vyt)),new uu(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Syt(e,t){return new uu(e,0,0,t==null?1:t)}function S_(e,t,r,n){return arguments.length===1?wyt(e):new uu(e,t,r,n==null?1:n)}function uu(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}Ap(uu,S_,Hm(Nh,{brighter:function(e){return new uu(this.l+aL*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new uu(this.l-aL*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=_yt*rY(t),e=yyt*rY(e),r=vyt*rY(r),new Ki(nY(3.1338561*t-1.6168667*e-.4906146*r),nY(-.9787684*t+1.9161415*e+.033454*r),nY(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function eY(e){return e>_we?Math.pow(e,1/3):e/byt+xyt}function rY(e){return e>mb?e*e*e:byt*(e-xyt)}function nY(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function iY(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Myt(e){if(e instanceof Dh)return new Dh(e.h,e.c,e.l,e.opacity);if(e instanceof uu||(e=wyt(e)),e.a===0&&e.b===0)return new Dh(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*oL;return new Dh(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Eyt(e,t,r,n){return arguments.length===1?Myt(e):new Dh(r,t,e,n==null?1:n)}function gb(e,t,r,n){return arguments.length===1?Myt(e):new Dh(e,t,r,n==null?1:n)}function Dh(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Tyt(e){if(isNaN(e.h))return new uu(e.l,0,0,e.opacity);var t=e.h*iL;return new uu(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ap(Dh,gb,Hm(Nh,{brighter:function(e){return new Dh(this.h,this.c,this.l+aL*(e==null?1:e),this.opacity)},darker:function(e){return new Dh(this.h,this.c,this.l-aL*(e==null?1:e),this.opacity)},rgb:function(){return Tyt(this).rgb()}}));var Iyt=-.14861,oY=1.78277,aY=-.29227,sL=-.90649,IE=1.97294,Cyt=IE*sL,Ayt=IE*oY,Pyt=oY*aY-sL*Iyt;function ywe(e){if(e instanceof M_)return new M_(e.h,e.s,e.l,e.opacity);e instanceof Ki||(e=PE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(Pyt*n+Cyt*t-Ayt*r)/(Pyt+Cyt-Ayt),o=n-i,a=(IE*(r-i)-aY*o)/sL,s=Math.sqrt(a*a+o*o)/(IE*i*(1-i)),l=s?Math.atan2(a,o)*oL-120:NaN;return new M_(l<0?l+360:l,s,i,e.opacity)}function ca(e,t,r,n){return arguments.length===1?ywe(e):new M_(e,t,r,n==null?1:n)}function M_(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ap(M_,ca,Hm(Nh,{brighter:function(e){return e=e==null?w_:Math.pow(w_,e),new M_(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Vm:Math.pow(Vm,e),new M_(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*iL,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new Ki(255*(t+r*(Iyt*n+oY*i)),255*(t+r*(aY*n+sL*i)),255*(t+r*(IE*n)),this.opacity)}}));function sY(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function lL(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return sY((r-n/t)*t,a,i,o,s)}}function cL(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return sY((r-n/t)*t,i,o,a,s)}}function _b(e){return function(){return e}}function Lyt(e,t){return function(r){return e+r*t}}function vwe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function qm(e,t){var r=t-e;return r?Lyt(e,r>180||r<-180?r-360*Math.round(r/360):r):_b(isNaN(e)?t:e)}function kyt(e){return(e=+e)==1?Zn:function(t,r){return r-t?vwe(t,r,e):_b(isNaN(t)?r:t)}}function Zn(e,t){var r=t-e;return r?Lyt(e,r):_b(isNaN(e)?t:e)}var Gm=function e(t){var r=kyt(t);function n(i,o){var a=r((i=cu(i)).r,(o=cu(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Zn(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);function Ryt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=cu(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var uL=Ryt(lL),Nyt=Ryt(cL);function yb(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function hL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dyt(e,t){return(hL(t)?yb:lY)(e,t)}function lY(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=nc(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}function fL(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function zi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function pL(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=nc(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var uY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cY=new RegExp(uY.source,"g");function xwe(e){return function(){return e}}function bwe(e){return function(t){return e(t)+""}}function vb(e,t){var r=uY.lastIndex=cY.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=uY.exec(e))&&(i=cY.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:zi(n,i)})),r=cY.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?bwe(l[0].x):xwe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}function nc(e,t){var r=typeof t,n;return t==null||r==="boolean"?_b(t):(r==="number"?zi:r==="string"?(n=rc(t))?(t=n,Gm):vb:t instanceof rc?Gm:t instanceof Date?fL:hL(t)?yb:Array.isArray(t)?lY:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?pL:zi)(e,t)}function Oyt(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}function zyt(e,t){var r=qm(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}function dL(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Fyt=180/Math.PI,mL={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hY(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Fyt,skewX:Math.atan(l)*Fyt,scaleX:a,scaleY:s}}var LE,fY,Byt,gL;function Hyt(e){return e==="none"?mL:(LE||(LE=document.createElement("DIV"),fY=document.documentElement,Byt=document.defaultView),LE.style.transform=e,e=Byt.getComputedStyle(fY.appendChild(LE),null).getPropertyValue("transform"),fY.removeChild(LE),e=e.slice(7,-1).split(","),hY(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Vyt(e){return e==null?mL:(gL||(gL=document.createElementNS("http://www.w3.org/2000/svg","g")),gL.setAttribute("transform",e),(e=gL.transform.baseVal.consolidate())?(e=e.matrix,hY(e.a,e.b,e.c,e.d,e.e,e.f)):mL)}function Uyt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:zi(c,h)},{i:g-2,x:zi(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:zi(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:zi(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:zi(c,h)},{i:g-2,x:zi(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var _L=Uyt(Hyt,"px, ","px)","deg)"),yL=Uyt(Vyt,", ",")",")");var kE=Math.SQRT2,pY=2,qyt=4,wwe=1e-12;function Gyt(e){return((e=Math.exp(e))+1/e)/2}function Swe(e){return((e=Math.exp(e))-1/e)/2}function Mwe(e){return((e=Math.exp(2*e))-1)/(e+1)}function vL(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<wwe)f=Math.log(s/i)/kE,h=function(x){return[r+x*l,n+x*c,i*Math.exp(kE*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+qyt*u)/(2*i*pY*p),g=(s*s-i*i-qyt*u)/(2*s*pY*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/kE,h=function(x){var b=x*f,S=Gyt(_),C=i/(pY*p)*(S*Mwe(kE*b+_)-Swe(_));return[r+C*l,n+C*c,i*S/Gyt(kE*b+_)]}}return h.duration=f*1e3,h}function Wyt(e){return function(t,r){var n=e((t=Um(t)).h,(r=Um(r)).h),i=Zn(t.s,r.s),o=Zn(t.l,r.l),a=Zn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var Yyt=Wyt(qm),jyt=Wyt(Zn);function E_(e,t){var r=Zn((e=S_(e)).l,(t=S_(t)).l),n=Zn(e.a,t.a),i=Zn(e.b,t.b),o=Zn(e.opacity,t.opacity);return function(a){return e.l=r(a),e.a=n(a),e.b=i(a),e.opacity=o(a),e+""}}function Xyt(e){return function(t,r){var n=e((t=gb(t)).h,(r=gb(r)).h),i=Zn(t.c,r.c),o=Zn(t.l,r.l),a=Zn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var $yt=Xyt(qm),Kyt=Xyt(Zn);function Zyt(e){return function t(r){r=+r;function n(i,o){var a=e((i=ca(i)).h,(o=ca(o)).h),s=Zn(i.s,o.s),l=Zn(i.l,o.l),c=Zn(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var Jyt=Zyt(qm),T_=Zyt(Zn);function dY(e,t){for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(a){var s=Math.max(0,Math.min(n-1,Math.floor(a*=n)));return o[s](a-s)}}function Qyt(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}Rm();var xb=0,NE=0,RE=0,evt=1e3,xL,DE,bL=0,C_=0,wL=0,OE=typeof performance=="object"&&performance.now?performance:Date,rvt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Pp(){return C_||(rvt(Ewe),C_=OE.now()+wL)}function Ewe(){C_=0}function A_(){this._call=this._time=this._next=null}A_.prototype=P_.prototype={constructor:A_,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Pp():+r)+(t==null?0:+t),!this._next&&DE!==this&&(DE?DE._next=this:xL=this,DE=this),this._call=e,this._time=r,mY()},stop:function(){this._call&&(this._call=null,this._time=1/0,mY())}};function P_(e,t,r){var n=new A_;return n.restart(e,t,r),n}function gY(){Pp(),++xb;for(var e=xL,t;e;)(t=C_-e._time)>=0&&e._call.call(null,t),e=e._next;--xb}function tvt(){C_=(bL=OE.now())+wL,xb=NE=0;try{gY()}finally{xb=0,Cwe(),C_=0}}function Twe(){var e=OE.now(),t=e-bL;t>evt&&(wL-=t,bL=e)}function Cwe(){for(var e,t=xL,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:xL=r);DE=e,mY(n)}function mY(e){if(!xb){NE&&(NE=clearTimeout(NE));var t=e-C_;t>24?(e<1/0&&(NE=setTimeout(tvt,e-OE.now()-wL)),RE&&(RE=clearInterval(RE))):(RE||(bL=OE.now(),RE=setInterval(Twe,evt)),xb=1,rvt(tvt))}}function zE(e,t,r){var n=new A_;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}function nvt(e,t,r){var n=new A_,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?Pp():+r,n.restart(function o(a){a+=i,n.restart(o,i+=t,r),e(a)},t,r),n)}var Awe=xs("start","end","cancel","interrupt"),Pwe=[],ovt=0,ML=1,EL=2,SL=3,ivt=4,TL=5,FE=6;function Wm(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Iwe(e,r,{name:t,index:n,group:i,on:Awe,tween:Pwe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ovt})}function BE(e,t){var r=Zi(e,t);if(r.state>ovt)throw new Error("too late; already scheduled");return r}function za(e,t){var r=Zi(e,t);if(r.state>SL)throw new Error("too late; already running");return r}function Zi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Iwe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=P_(o,0,r.time);function o(c){r.state=ML,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==ML)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===SL)return zE(a);p.state===ivt?(p.state=FE,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=FE,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(zE(function(){r.state===SL&&(r.state=ivt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=EL,r.on.call("start",e,e.__data__,r.index,r.group),r.state===EL){for(r.state=SL,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=TL,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===TL&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=FE,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}function hu(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>EL&&n.state<TL,n.state=FE,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function avt(e){return this.each(function(){hu(this,e)})}function Lwe(e,t){var r,n;return function(){var i=za(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function kwe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=za(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function svt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Zi(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Lwe:kwe)(r,e,t))}function bb(e,t,r){var n=e._id;return e.each(function(){var i=za(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Zi(i,n).value[t]}}function CL(e,t){var r;return(typeof t=="number"?zi:t instanceof rc?Gm:(r=rc(t))?(t=r,Gm):vb)(e,t)}function Rwe(e){return function(){this.removeAttribute(e)}}function Nwe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dwe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function Owe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function zwe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function Fwe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function lvt(e,t){var r=Ih(e),n=r==="transform"?yL:CL;return this.attrTween(e,typeof t=="function"?(r.local?Fwe:zwe)(r,n,bb(this,"attr."+e,t)):t==null?(r.local?Nwe:Rwe)(r):(r.local?Owe:Dwe)(r,n,t))}function Bwe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Hwe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Vwe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Hwe(e,o)),r}return i._value=t,i}function Uwe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Bwe(e,o)),r}return i._value=t,i}function cvt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Ih(e);return this.tween(r,(n.local?Vwe:Uwe)(n,t))}function qwe(e,t){return function(){BE(this,e).delay=+t.apply(this,arguments)}}function Gwe(e,t){return t=+t,function(){BE(this,e).delay=t}}function uvt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qwe:Gwe)(t,e)):Zi(this.node(),t).delay}function Wwe(e,t){return function(){za(this,e).duration=+t.apply(this,arguments)}}function Ywe(e,t){return t=+t,function(){za(this,e).duration=t}}function hvt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wwe:Ywe)(t,e)):Zi(this.node(),t).duration}function jwe(e,t){if(typeof t!="function")throw new Error;return function(){za(this,e).ease=t}}function fvt(e){var t=this._id;return arguments.length?this.each(jwe(t,e)):Zi(this.node(),t).ease}function pvt(e){typeof e!="function"&&(e=ub(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Fo(n,this._parents,this._name,this._id)}function dvt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Fo(a,this._parents,this._name,this._id)}function Xwe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function $we(e,t,r){var n,i,o=Xwe(t)?BE:za;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function mvt(e,t){var r=this._id;return arguments.length<2?Zi(this.node(),r).on.on(e):this.each($we(r,e,t))}function Kwe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function gvt(){return this.on("end.remove",Kwe(this._id))}function _vt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Dm(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Wm(c[f],t,r,f,c,Zi(u,r)));return new Fo(o,this._parents,t,r)}function yvt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=cb(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=Zi(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Wm(p,t,r,g,f,d);o.push(f),a.push(u)}return new Fo(o,a,t,r)}var Zwe=Lh.prototype.constructor;function vvt(){return new Zwe(this._groups,this._parents)}function Jwe(e,t){var r,n,i;return function(){var o=Mp(this,e),a=(this.style.removeProperty(e),Mp(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function xvt(e){return function(){this.style.removeProperty(e)}}function Qwe(e,t,r){var n,i=r+"",o;return function(){var a=Mp(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function tSe(e,t,r){var n,i,o;return function(){var a=Mp(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Mp(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function eSe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=za(this,e),c=l.on,u=l.value[o]==null?s||(s=xvt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function bvt(e,t,r){var n=(e+="")=="transform"?_L:CL;return t==null?this.styleTween(e,Jwe(e,n)).on("end.style."+e,xvt(e)):typeof t=="function"?this.styleTween(e,tSe(e,n,bb(this,"style."+e,t))).each(eSe(this._id,e)):this.styleTween(e,Qwe(e,n,t),r).on("end.style."+e,null)}function rSe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function nSe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&rSe(e,a,r)),n}return o._value=t,o}function wvt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,nSe(e,t,r==null?"":r))}function iSe(e){return function(){this.textContent=e}}function oSe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Svt(e){return this.tween("text",typeof e=="function"?oSe(bb(this,"text",e)):iSe(e==null?"":e+""))}function aSe(e){return function(t){this.textContent=e.call(this,t)}}function sSe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&aSe(i)),t}return n._value=e,n}function Mvt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sSe(e))}function Evt(){for(var e=this._name,t=this._id,r=AL(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=Zi(l,t);Wm(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Fo(n,this._parents,e,r)}function Tvt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=za(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var lSe=0;function Fo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function PL(e){return Lh().transition(e)}function AL(){return++lSe}var wb=Lh.prototype;Fo.prototype=PL.prototype={constructor:Fo,select:_vt,selectAll:yvt,filter:pvt,merge:dvt,selection:vvt,transition:Evt,call:wb.call,nodes:wb.nodes,node:wb.node,size:wb.size,empty:wb.empty,each:wb.each,on:mvt,attr:lvt,attrTween:cvt,style:bvt,styleTween:wvt,text:Svt,textTween:Mvt,remove:gvt,tween:svt,delay:uvt,duration:hvt,ease:fvt,end:Tvt};L_();var UY={time:null,delay:0,duration:250,ease:bs};function _Se(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return UY.time=Pp(),UY;return r}function Hvt(e){var t,r;e instanceof Fo?(t=e._id,e=e._name):(t=AL(),(r=UY).time=Pp(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Wm(l,e,t,c,a,r||_Se(l,t));return new Fo(n,this._parents,e,t)}Lh.prototype.interrupt=avt;Lh.prototype.transition=Hvt;var ySe=[null];function Vvt(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>ML&&n.name===t)return new Fo([[e]],ySe,t,+i)}return null}function FL(e){return function(){return e}}function Uvt(e,t,r){this.target=e,this.type=t,this.selection=r}function qY(){qt.stopImmediatePropagation()}function BL(){qt.preventDefault(),qt.stopImmediatePropagation()}var qvt={name:"drag"},GY={name:"space"},Mb={name:"handle"},Eb={name:"center"};function Gvt(e){return[+e[0],+e[1]]}function YY(e){return[Gvt(e[0]),Gvt(e[1])]}function vSe(e){return function(t){return Cp(t,qt.touches,e)}}var HL={name:"x",handles:["w","e"].map(HE),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},VL={name:"y",handles:["n","s"].map(HE),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},xSe={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(HE),input:function(e){return e==null?null:YY(e)},output:function(e){return e}},Ip={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wvt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Yvt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bSe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},wSe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function HE(e){return{type:e}}function SSe(){return!qt.ctrlKey&&!qt.button}function MSe(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function ESe(){return navigator.maxTouchPoints||"ontouchstart"in this}function WY(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function TSe(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function UL(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function jvt(){return jY(HL)}function qL(){return jY(VL)}function GL(){return jY(xSe)}function jY(e){var t=MSe,r=SSe,n=ESe,i=!0,o=xs("start","brush","end"),a=6,s;function l(_){var y=_.property("__brush",g).selectAll(".overlay").data([HE("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ip.overlay).merge(y).each(function(){var b=WY(this).extent;Ht(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),_.selectAll(".selection").data([HE("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ip.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=_.selectAll(".handle").data(e.handles,function(b){return b.type});x.exit().remove(),x.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return Ip[b.type]}),_.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(n).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(_,y){_.selection?_.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var x=this,b=x.__brush,S=u(x,arguments),C=b.selection,P=e.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),k=nc(C,P);function O(D){b.selection=D===1&&P===null?null:k(D),c.call(x),S.brush()}return C!==null&&P!==null?O:O(1)}):_.each(function(){var x=this,b=arguments,S=x.__brush,C=e.input(typeof y=="function"?y.apply(x,b):y,S.extent),P=u(x,b).beforestart();hu(x),S.selection=C===null?null:C,c.call(x),P.start().brush().end()})},l.clear=function(_){l.move(_,null)};function c(){var _=Ht(this),y=WY(this).selection;y?(_.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),_.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):_.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(_,y,x){var b=_.__brush.emitter;return b&&(!x||!b.clean)?b:new h(_,y,x)}function h(_,y,x){this.that=_,this.args=y,this.state=_.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(_){Ep(new Uvt(l,_,e.output(this.state.selection)),o.apply,o,[_,this.that,this.args])}};function f(){if(s&&!qt.touches||!r.apply(this,arguments))return;var _=this,y=qt.target.__data__.type,x=(i&&qt.metaKey?y="overlay":y)==="selection"?qvt:i&&qt.altKey?Eb:Mb,b=e===VL?null:bSe[y],S=e===HL?null:wSe[y],C=WY(_),P=C.extent,k=C.selection,O=P[0][0],D,B,I=P[0][1],L,R,F=P[1][0],z,U,W=P[1][1],Z,rt,ot=0,st=0,St,bt=b&&S&&i&&qt.shiftKey,Mt,lt,Kt=qt.touches?vSe(qt.changedTouches[0].identifier):zo,_t=Kt(_),ct=_t,X=u(_,arguments,!0).beforestart();y==="overlay"?(k&&(St=!0),C.selection=k=[[D=e===VL?O:_t[0],L=e===HL?I:_t[1]],[z=e===VL?F:D,Z=e===HL?W:L]]):(D=k[0][0],L=k[0][1],z=k[1][0],Z=k[1][1]),B=D,R=L,U=z,rt=Z;var et=Ht(_).attr("pointer-events","none"),dt=et.selectAll(".overlay").attr("cursor",Ip[y]);if(qt.touches)X.moved=pt,X.ended=wt;else{var q=Ht(qt.view).on("mousemove.brush",pt,!0).on("mouseup.brush",wt,!0);i&&q.on("keydown.brush",kt,!0).on("keyup.brush",ie,!0),Fm(qt.view)}qY(),hu(_),c.call(_),X.start();function pt(){var ee=Kt(_);bt&&!Mt&&!lt&&(Math.abs(ee[0]-ct[0])>Math.abs(ee[1]-ct[1])?lt=!0:Mt=!0),ct=ee,St=!0,BL(),ht()}function ht(){var ee;switch(ot=ct[0]-_t[0],st=ct[1]-_t[1],x){case GY:case qvt:{b&&(ot=Math.max(O-D,Math.min(F-z,ot)),B=D+ot,U=z+ot),S&&(st=Math.max(I-L,Math.min(W-Z,st)),R=L+st,rt=Z+st);break}case Mb:{b<0?(ot=Math.max(O-D,Math.min(F-D,ot)),B=D+ot,U=z):b>0&&(ot=Math.max(O-z,Math.min(F-z,ot)),B=D,U=z+ot),S<0?(st=Math.max(I-L,Math.min(W-L,st)),R=L+st,rt=Z):S>0&&(st=Math.max(I-Z,Math.min(W-Z,st)),R=L,rt=Z+st);break}case Eb:{b&&(B=Math.max(O,Math.min(F,D-ot*b)),U=Math.max(O,Math.min(F,z+ot*b))),S&&(R=Math.max(I,Math.min(W,L-st*S)),rt=Math.max(I,Math.min(W,Z+st*S)));break}}U<B&&(b*=-1,ee=D,D=z,z=ee,ee=B,B=U,U=ee,y in Wvt&&dt.attr("cursor",Ip[y=Wvt[y]])),rt<R&&(S*=-1,ee=L,L=Z,Z=ee,ee=R,R=rt,rt=ee,y in Yvt&&dt.attr("cursor",Ip[y=Yvt[y]])),C.selection&&(k=C.selection),Mt&&(B=k[0][0],U=k[1][0]),lt&&(R=k[0][1],rt=k[1][1]),(k[0][0]!==B||k[0][1]!==R||k[1][0]!==U||k[1][1]!==rt)&&(C.selection=[[B,R],[U,rt]],c.call(_),X.brush())}function wt(){if(qY(),qt.touches){if(qt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Bm(qt.view,St),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);et.attr("pointer-events","all"),dt.attr("cursor",Ip.overlay),C.selection&&(k=C.selection),TSe(k)&&(C.selection=null,c.call(_)),X.end()}function kt(){switch(qt.keyCode){case 16:{bt=b&&S;break}case 18:{x===Mb&&(b&&(z=U-ot*b,D=B+ot*b),S&&(Z=rt-st*S,L=R+st*S),x=Eb,ht());break}case 32:{(x===Mb||x===Eb)&&(b<0?z=U-ot:b>0&&(D=B-ot),S<0?Z=rt-st:S>0&&(L=R-st),x=GY,dt.attr("cursor",Ip.selection),ht());break}default:return}BL()}function ie(){switch(qt.keyCode){case 16:{bt&&(Mt=lt=bt=!1,ht());break}case 18:{x===Eb&&(b<0?z=U:b>0&&(D=B),S<0?Z=rt:S>0&&(L=R),x=Mb,ht());break}case 32:{x===GY&&(qt.altKey?(b&&(z=U-ot*b,D=B+ot*b),S&&(Z=rt-st*S,L=R+st*S),x=Eb):(b<0?z=U:b>0&&(D=B),S<0?Z=rt:S>0&&(L=R),x=Mb),dt.attr("cursor",Ip[y]),ht());break}default:return}BL()}}function p(){u(this,arguments).moved()}function d(){u(this,arguments).ended()}function g(){var _=this.__brush||{selection:null};return _.extent=YY(t.apply(this,arguments)),_.dim=e,_}return l.extent=function(_){return arguments.length?(t=typeof _=="function"?_:FL(YY(_)),l):t},l.filter=function(_){return arguments.length?(r=typeof _=="function"?_:FL(!!_),l):r},l.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:FL(!!_),l):n},l.handleSize=function(_){return arguments.length?(a=+_,l):a},l.keyModifiers=function(_){return arguments.length?(i=!!_,l):i},l.on=function(){var _=o.on.apply(o,arguments);return _===o?l:_},l}var XY=Math.cos,$Y=Math.sin,Xvt=Math.PI,VE=Xvt/2,KY=Xvt*2,ZY=Math.max;function CSe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function $vt(){var e=0,t=null,r=null,n=null;function i(o){var a=o.length,s=[],l=Ir(a),c=[],u=[],h=u.groups=new Array(a),f=new Array(a*a),p,d,g,_,y,x;for(p=0,y=-1;++y<a;){for(d=0,x=-1;++x<a;)d+=o[y][x];s.push(d),c.push(Ir(a)),p+=d}for(t&&l.sort(function(B,I){return t(s[B],s[I])}),r&&c.forEach(function(B,I){B.sort(function(L,R){return r(o[I][L],o[I][R])})}),p=ZY(0,KY-e*a)/p,_=p?e:KY/a,d=0,y=-1;++y<a;){for(g=d,x=-1;++x<a;){var b=l[y],S=c[b][x],C=o[b][S],P=d,k=d+=C*p;f[S*a+b]={index:b,subindex:S,startAngle:P,endAngle:k,value:C}}h[b]={index:b,startAngle:g,endAngle:d,value:s[b]},d+=_}for(y=-1;++y<a;)for(x=y-1;++x<a;){var O=f[x*a+y],D=f[y*a+x];(O.value||D.value)&&u.push(O.value<D.value?{source:D,target:O}:{source:O,target:D})}return n?u.sort(n):u}return i.padAngle=function(o){return arguments.length?(e=ZY(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(r=o,i):r},i.sortChords=function(o){return arguments.length?(o==null?n=null:(n=CSe(o))._=o,i):n&&n._},i}var Kvt=Array.prototype.slice;function WL(e){return function(){return e}}var JY=Math.PI,QY=2*JY,k_=1e-6,ASe=QY-k_;function tj(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Zvt(){return new tj}tj.prototype=Zvt.prototype={constructor:tj,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>k_)if(!(Math.abs(u*s-l*c)>k_)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((JY-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>k_&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>k_||Math.abs(this._y1-c)>k_)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%QY+QY),h>ASe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>k_&&(this._+="A"+r+","+r+",0,"+ +(h>=JY)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var ws=Zvt;function PSe(e){return e.source}function ISe(e){return e.target}function LSe(e){return e.radius}function kSe(e){return e.startAngle}function RSe(e){return e.endAngle}function Jvt(){var e=PSe,t=ISe,r=LSe,n=kSe,i=RSe,o=null;function a(){var s,l=Kvt.call(arguments),c=e.apply(this,l),u=t.apply(this,l),h=+r.apply(this,(l[0]=c,l)),f=n.apply(this,l)-VE,p=i.apply(this,l)-VE,d=h*XY(f),g=h*$Y(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-VE,x=i.apply(this,l)-VE;if(o||(o=s=ws()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*XY(y),_*$Y(y)),o.arc(0,0,_,y,x)),o.quadraticCurveTo(0,0,d,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(r=typeof s=="function"?s:WL(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:WL(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:WL(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}Tb();var OSe=Array.prototype,KL=OSe.slice;function f1t(e,t){return e-t}function p1t(e){for(var t=0,r=e.length,n=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t<r;)n+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return n}function zh(e){return function(){return e}}function d1t(e,t){for(var r=-1,n=t.length,i;++r<n;)if(i=zSe(e,t[r]))return i;return 0}function zSe(e,t){for(var r=t[0],n=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],c=l[0],u=l[1],h=e[s],f=h[0],p=h[1];if(FSe(l,h,t))return 0;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=-i)}return i}function FSe(e,t,r){var n;return BSe(e,t,r)&&HSe(e[n=+(e[0]===t[0])],r[n],t[n])}function BSe(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function HSe(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function m1t(){}var Lp=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ZL(){var e=1,t=1,r=sb,n=l;function i(c){var u=r(c);if(Array.isArray(u))u=u.slice().sort(f1t);else{var h=sa(c),f=h[0],p=h[1];u=el(f,p,u),u=Ir(Math.floor(f/u)*u,Math.floor(p/u)*u,u)}return u.map(function(d){return o(c,d)})}function o(c,u){var h=[],f=[];return a(c,u,function(p){n(p,c,u),p1t(p)>0?h.push([p]):f.push(p)}),f.forEach(function(p){for(var d=0,g=h.length,_;d<g;++d)if(d1t((_=h[d])[0],p)!==-1){_.push(p);return}}),{type:"MultiPolygon",value:u,coordinates:h}}function a(c,u,h){var f=new Array,p=new Array,d,g,_,y,x,b;for(d=g=-1,y=c[0]>=u,Lp[y<<1].forEach(S);++d<e-1;)_=y,y=c[d+1]>=u,Lp[_|y<<1].forEach(S);for(Lp[y<<0].forEach(S);++g<t-1;){for(d=-1,y=c[g*e+e]>=u,x=c[g*e]>=u,Lp[y<<1|x<<2].forEach(S);++d<e-1;)_=y,y=c[g*e+e+d+1]>=u,b=x,x=c[g*e+d+1]>=u,Lp[_|y<<1|x<<2|b<<3].forEach(S);Lp[y|x<<3].forEach(S)}for(d=-1,x=c[g*e]>=u,Lp[x<<2].forEach(S);++d<e-1;)b=x,x=c[g*e+d+1]>=u,Lp[x<<2|b<<3].forEach(S);Lp[x<<3].forEach(S);function S(C){var P=[C[0][0]+d,C[0][1]+g],k=[C[1][0]+d,C[1][1]+g],O=s(P),D=s(k),B,I;(B=p[O])?(I=f[D])?(delete p[B.end],delete f[I.start],B===I?(B.ring.push(k),h(B.ring)):f[B.start]=p[I.end]={start:B.start,end:I.end,ring:B.ring.concat(I.ring)}):(delete p[B.end],B.ring.push(k),p[B.end=D]=B):(B=f[D])?(I=p[O])?(delete f[B.start],delete p[I.end],B===I?(B.ring.push(k),h(B.ring)):f[I.start]=p[B.end]={start:I.start,end:B.end,ring:I.ring.concat(B.ring)}):(delete f[B.start],B.ring.unshift(P),f[B.start=O]=B):f[O]=p[D]={start:O,end:D,ring:[P,k]}}}function s(c){return c[0]*2+c[1]*(e+1)*4}function l(c,u,h){c.forEach(function(f){var p=f[0],d=f[1],g=p|0,_=d|0,y,x=u[_*e+g];p>0&&p<e&&g===p&&(y=u[_*e+g-1],f[0]=p+(h-y)/(x-y)-.5),d>0&&d<t&&_===d&&(y=u[(_-1)*e+g],f[1]=d+(h-y)/(x-y)-.5)})}return i.contour=o,i.size=function(c){if(!arguments.length)return[e,t];var u=Math.ceil(c[0]),h=Math.ceil(c[1]);if(!(u>0)||!(h>0))throw new Error("invalid size");return e=u,t=h,i},i.thresholds=function(c){return arguments.length?(r=typeof c=="function"?c:Array.isArray(c)?zh(KL.call(c)):zh(c),i):r},i.smooth=function(c){return arguments.length?(n=c?l:m1t,i):n===l},i}function JL(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<n+r;++s)s<n&&(l+=e.data[s+a*n]),s>=r&&(s>=o&&(l-=e.data[s-o+a*n]),t.data[s-r+a*n]=l/Math.min(s+1,n-1+o-s,o))}function QL(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,a=0;a<n;++a)for(var s=0,l=0;s<i+r;++s)s<i&&(l+=e.data[a+s*n]),s>=r&&(s>=o&&(l-=e.data[a+(s-o)*n]),t.data[a+(s-r)*n]=l/Math.min(s+1,i-1+o-s,o))}function VSe(e){return e[0]}function USe(e){return e[1]}function qSe(){return 1}function g1t(){var e=VSe,t=USe,r=qSe,n=960,i=500,o=20,a=2,s=o*3,l=n+s*2>>a,c=i+s*2>>a,u=zh(20);function h(y){var x=new Float32Array(l*c),b=new Float32Array(l*c);y.forEach(function(P,k,O){var D=+e(P,k,O)+s>>a,B=+t(P,k,O)+s>>a,I=+r(P,k,O);D>=0&&D<l&&B>=0&&B<c&&(x[D+B*l]+=I)}),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a);var S=u(x);if(!Array.isArray(S)){var C=lu(x);S=el(0,C,S),S=Ir(0,Math.floor(C/S)*S,S),S.shift()}return ZL().thresholds(S).size([l,c])(x).map(f)}function f(y){return y.value*=Math.pow(2,-2*a),y.coordinates.forEach(p),y}function p(y){y.forEach(d)}function d(y){y.forEach(g)}function g(y){y[0]=y[0]*Math.pow(2,a)-s,y[1]=y[1]*Math.pow(2,a)-s}function _(){return s=o*3,l=n+s*2>>a,c=i+s*2>>a,h}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:zh(+y),h):e},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:zh(+y),h):t},h.weight=function(y){return arguments.length?(r=typeof y=="function"?y:zh(+y),h):r},h.size=function(y){if(!arguments.length)return[n,i];var x=Math.ceil(y[0]),b=Math.ceil(y[1]);if(!(x>=0)&&!(x>=0))throw new Error("invalid size");return n=x,i=b,_()},h.cellSize=function(y){if(!arguments.length)return 1<<a;if(!((y=+y)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(y)/Math.LN2),_()},h.thresholds=function(y){return arguments.length?(u=typeof y=="function"?y:Array.isArray(y)?zh(KL.call(y)):zh(y),h):u},h.bandwidth=function(y){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*y*y+1)-1)/2),_()},h}Rm();qE();L_();function XSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function D1t(e,t){return fetch(e,t).then(XSe)}function $Se(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function O1t(e,t){return fetch(e,t).then($Se)}qE();function KSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function O_(e,t){return fetch(e,t).then(KSe)}function z1t(e){return function(t,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),O_(t,r).then(function(i){return e(i,n)})}}function oj(e,t,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=Ym(e);return O_(t,r).then(function(o){return i.parse(o,n)})}var F1t=z1t(Cb),B1t=z1t(Ab);function H1t(e,t){return new Promise(function(r,n){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=n,i.onload=function(){r(i)},i.src=e})}function ZSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function V1t(e,t){return fetch(e,t).then(ZSe)}function aj(e){return function(t,r){return O_(t,r).then(function(n){return new DOMParser().parseFromString(n,e)})}}var U1t=aj("application/xml"),q1t=aj("text/html"),G1t=aj("image/svg+xml");function W1t(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var i,o=r.length,a,s=0,l=0;for(i=0;i<o;++i)a=r[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=r[i],a.x-=s,a.y-=l}return n.initialize=function(i){r=i},n.x=function(i){return arguments.length?(e=+i,n):e},n.y=function(i){return arguments.length?(t=+i,n):t},n}function On(e){return function(){return e}}function fu(){return(Math.random()-.5)*1e-6}function Y1t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return j1t(this.cover(t,r),t,r,e)}function j1t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function X1t(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),r=0;r<n;++r)j1t(this,a[r],s[r],e[r]);return this}function $1t(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a=i-r,s=this._root,l,c;r>e||e>=i||n>t||t>=o;)switch(c=(t<n)<<1|e<r,l=new Array(4),l[c]=s,s=l,a*=2,c){case 0:i=r+a,o=n+a;break;case 1:r=i-a,o=n+a;break;case 2:i=r+a,n=o-a;break;case 3:r=i-a,n=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function K1t(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Z1t(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function yo(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function J1t(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new yo(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new yo(p[3],_,y,l,c),new yo(p[2],a,y,_,c),new yo(p[1],_,s,l,y),new yo(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}function Q1t(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function txt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function ext(){return this._root}function rxt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function nxt(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new yo(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new yo(i,c,u,s,l)),(i=n[2])&&t.push(new yo(i,o,u,c,l)),(i=n[1])&&t.push(new yo(i,c,a,s,u)),(i=n[0])&&t.push(new yo(i,o,a,c,u))}return this}function ixt(e){var t=[],r=[],n;for(this._root&&t.push(new yo(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new yo(o,a,s,u,h)),(o=i[1])&&t.push(new yo(o,u,s,l,h)),(o=i[2])&&t.push(new yo(o,a,h,u,c)),(o=i[3])&&t.push(new yo(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}function oxt(e){return e[0]}function axt(e){return arguments.length?(this._x=e,this):this._x}function sxt(e){return e[1]}function lxt(e){return arguments.length?(this._y=e,this):this._y}function Fh(e,t,r){var n=new sj(t==null?oxt:t,r==null?sxt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function sj(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function cxt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Fa=Fh.prototype=sj.prototype;Fa.copy=function(){var e=new sj(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=cxt(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=cxt(n));return e};Fa.add=Y1t;Fa.addAll=X1t;Fa.cover=$1t;Fa.data=K1t;Fa.extent=Z1t;Fa.find=J1t;Fa.remove=Q1t;Fa.removeAll=txt;Fa.root=ext;Fa.size=rxt;Fa.visit=nxt;Fa.visitAfter=ixt;Fa.x=axt;Fa.y=lxt;function JSe(e){return e.x+e.vx}function QSe(e){return e.y+e.vy}function uxt(e){var t,r,n=1,i=1;typeof e!="function"&&(e=On(e==null?1:+e));function o(){for(var l,c=t.length,u,h,f,p,d,g,_=0;_<i;++_)for(u=Fh(t,JSe,QSe).visitAfter(a),l=0;l<c;++l)h=t[l],d=r[h.index],g=d*d,f=h.x+h.vx,p=h.y+h.vy,u.visit(y);function y(x,b,S,C,P){var k=x.data,O=x.r,D=d+O;if(k){if(k.index>h.index){var B=f-k.x-k.vx,I=p-k.y-k.vy,L=B*B+I*I;L<D*D&&(B===0&&(B=fu(),L+=B*B),I===0&&(I=fu(),L+=I*I),L=(D-(L=Math.sqrt(L)))/L*n,h.vx+=(B*=L)*(D=(O*=O)/(g+O)),h.vy+=(I*=L)*D,k.vx-=B*(D=1-D),k.vy-=I*D)}return}return b>f+D||C<f-D||S>p+D||P<p-D}}function a(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function s(){if(!!t){var l,c=t.length,u;for(r=new Array(c),l=0;l<c;++l)u=t[l],r[u.index]=+e(u,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(n=+l,o):n},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:On(+l),s(),o):e},o}Tb();function t3e(e){return e.index}function hxt(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function fxt(e){var t=t3e,r=u,n,i=On(30),o,a,s,l,c=1;e==null&&(e=[]);function u(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var _=0,y=e.length;_<c;++_)for(var x=0,b,S,C,P,k,O,D;x<y;++x)b=e[x],S=b.source,C=b.target,P=C.x+C.vx-S.x-S.vx||fu(),k=C.y+C.vy-S.y-S.vy||fu(),O=Math.sqrt(P*P+k*k),O=(O-o[x])/O*g*n[x],P*=O,k*=O,C.vx-=P*(D=l[x]),C.vy-=k*D,S.vx+=P*(D=1-D),S.vy+=k*D}function f(){if(!!a){var g,_=a.length,y=e.length,x=Ji(a,t),b;for(g=0,s=new Array(_);g<y;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=hxt(x,b.source)),typeof b.target!="object"&&(b.target=hxt(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(g=0,l=new Array(y);g<y;++g)b=e[g],l[g]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);n=new Array(y),p(),o=new Array(y),d()}}function p(){if(!!a)for(var g=0,_=e.length;g<_;++g)n[g]=+r(e[g],g,e)}function d(){if(!!a)for(var g=0,_=e.length;g<_;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g){a=g,f()},h.links=function(g){return arguments.length?(e=g,f(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(r=typeof g=="function"?g:On(+g),p(),h):r},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:On(+g),d(),h):i},h}Rm();Tb();function pxt(e){return e.x}function dxt(e){return e.y}var e3e=10,r3e=Math.PI*(3-Math.sqrt(5));function mxt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=Ji(),l=P_(u),c=xs("tick","end");e==null&&(e=[]);function u(){h(),c.call("tick",t),r<n&&(l.stop(),c.call("end",t))}function h(d){var g,_=e.length,y;d===void 0&&(d=1);for(var x=0;x<d;++x)for(r+=(o-r)*i,s.each(function(b){b(r)}),g=0;g<_;++g)y=e[g],y.fx==null?y.x+=y.vx*=a:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=a:(y.y=y.fy,y.vy=0);return t}function f(){for(var d=0,g=e.length,_;d<g;++d){if(_=e[d],_.index=d,_.fx!=null&&(_.x=_.fx),_.fy!=null&&(_.y=_.fy),isNaN(_.x)||isNaN(_.y)){var y=e3e*Math.sqrt(d),x=d*r3e;_.x=y*Math.cos(x),_.y=y*Math.sin(x)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function p(d){return d.initialize&&d.initialize(e),d}return f(),t={tick:h,restart:function(){return l.restart(u),t},stop:function(){return l.stop(),t},nodes:function(d){return arguments.length?(e=d,f(),s.each(p),t):e},alpha:function(d){return arguments.length?(r=+d,t):r},alphaMin:function(d){return arguments.length?(n=+d,t):n},alphaDecay:function(d){return arguments.length?(i=+d,t):+i},alphaTarget:function(d){return arguments.length?(o=+d,t):o},velocityDecay:function(d){return arguments.length?(a=1-d,t):1-a},force:function(d,g){return arguments.length>1?(g==null?s.remove(d):s.set(d,p(g)),t):s.get(d)},find:function(d,g,_){var y=0,x=e.length,b,S,C,P,k;for(_==null?_=1/0:_*=_,y=0;y<x;++y)P=e[y],b=d-P.x,S=g-P.y,C=b*b+S*S,C<_&&(k=P,_=C);return k},on:function(d,g){return arguments.length>1?(c.on(d,g),t):c.on(d)}}}function gxt(){var e,t,r,n=On(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=Fh(e,pxt,dxt).visitAfter(u);for(r=f,p=0;p<d;++p)t=e[p],g.visit(h)}function c(){if(!!e){var f,p=e.length,d;for(i=new Array(p),f=0;f<p;++f)d=e[f],i[d.index]=+n(d,f,e)}}function u(f){var p=0,d,g,_=0,y,x,b;if(f.length){for(y=x=b=0;b<4;++b)(d=f[b])&&(g=Math.abs(d.value))&&(p+=d.value,_+=g,y+=g*d.x,x+=g*d.y);f.x=y/_,f.y=x/_}else{d=f,d.x=d.data.x,d.y=d.data.y;do p+=i[d.data.index];while(d=d.next)}f.value=p}function h(f,p,d,g){if(!f.value)return!0;var _=f.x-t.x,y=f.y-t.y,x=g-p,b=_*_+y*y;if(x*x/s<b)return b<a&&(_===0&&(_=fu(),b+=_*_),y===0&&(y=fu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)),t.vx+=_*f.value*r/b,t.vy+=y*f.value*r/b),!0;if(f.length||b>=a)return;(f.data!==t||f.next)&&(_===0&&(_=fu(),b+=_*_),y===0&&(y=fu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)));do f.data!==t&&(x=i[f.data.index]*r/b,t.vx+=_*x,t.vy+=y*x);while(f=f.next)}return l.initialize=function(f){e=f,c()},l.strength=function(f){return arguments.length?(n=typeof f=="function"?f:On(+f),c(),l):n},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}function _xt(e,t,r){var n,i=On(.1),o,a;typeof e!="function"&&(e=On(+e)),t==null&&(t=0),r==null&&(r=0);function s(c){for(var u=0,h=n.length;u<h;++u){var f=n[u],p=f.x-t||1e-6,d=f.y-r||1e-6,g=Math.sqrt(p*p+d*d),_=(a[u]-g)*o[u]*c/g;f.vx+=p*_,f.vy+=d*_}}function l(){if(!!n){var c,u=n.length;for(o=new Array(u),a=new Array(u),c=0;c<u;++c)a[c]=+e(n[c],c,n),o[c]=isNaN(a[c])?0:+i(n[c],c,n)}}return s.initialize=function(c){n=c,l()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:On(+c),l(),s):i},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:On(+c),l(),s):e},s.x=function(c){return arguments.length?(t=+c,s):t},s.y=function(c){return arguments.length?(r=+c,s):r},s}function yxt(e){var t=On(.1),r,n,i;typeof e!="function"&&(e=On(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vx+=(i[l]-u.x)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:On(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:On(+s),a(),o):e},o}function vxt(e){var t=On(.1),r,n,i;typeof e!="function"&&(e=On(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vy+=(i[l]-u.y)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:On(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:On(+s),a(),o):e},o}function xxt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function z_(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Bh(e){return e=z_(Math.abs(e)),e?e[1]:NaN}function bxt(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function wxt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var n3e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kp(e){if(!(t=n3e.exec(e)))throw new Error("invalid format: "+e);var t;return new GE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}kp.prototype=GE.prototype;function GE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}GE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sxt(e){t:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break t;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var lj;function Mxt(e,t){var r=z_(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(lj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+z_(e,Math.max(0,t+o-1))[0]}function cj(e,t){var r=z_(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var uj={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:xxt,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return cj(e*100,t)},r:cj,s:Mxt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function hj(e){return e}var Ext=Array.prototype.map,Txt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ek(e){var t=e.grouping===void 0||e.thousands===void 0?hj:bxt(Ext.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?hj:wxt(Ext.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(h){h=kp(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,_=h.zero,y=h.width,x=h.comma,b=h.precision,S=h.trim,C=h.type;C==="n"?(x=!0,C="g"):uj[C]||(b===void 0&&(b=12),S=!0,C="g"),(_||f==="0"&&p==="=")&&(_=!0,f="0",p="=");var P=g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",k=g==="$"?n:/[%p]/.test(C)?a:"",O=uj[C],D=/[defgprs%]/.test(C);b=b===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function B(I){var L=P,R=k,F,z,U;if(C==="c")R=O(I)+R,I="";else{I=+I;var W=I<0||1/I<0;if(I=isNaN(I)?l:O(Math.abs(I),b),S&&(I=Sxt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?Txt[8+lj/3]:"")+R+(W&&d==="("?")":""),D){for(F=-1,z=I.length;++F<z;)if(U=I.charCodeAt(F),48>U||U>57){R=(U===46?i+I.slice(F+1):I.slice(F))+R,I=I.slice(0,F);break}}}x&&!_&&(I=t(I,1/0));var Z=L.length+I.length+R.length,rt=Z<y?new Array(y-Z+1).join(f):"";switch(x&&_&&(I=t(rt+I,rt.length?y-R.length:1/0),rt=""),p){case"<":I=L+I+R+rt;break;case"=":I=L+rt+I+R;break;case"^":I=rt.slice(0,Z=rt.length>>1)+L+I+R+rt.slice(Z);break;default:I=rt+L+I+R;break}return o(I)}return B.toString=function(){return h+""},B}function u(h,f){var p=c((h=kp(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Bh(f)/3)))*3,g=Math.pow(10,-d),_=Txt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var rk,xn,WE;nk({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function nk(e){return rk=ek(e),xn=rk.format,WE=rk.formatPrefix,rk}function ik(e){return Math.max(0,-Bh(Math.abs(e)))}function ok(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bh(t)/3)))*3-Bh(Math.abs(e)))}function ak(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bh(t)-Bh(e))+1}function Ms(){return new lk}function lk(){this.reset()}lk.prototype={constructor:lk,reset:function(){this.s=this.t=0},add:function(e){Cxt(sk,e,this.t),Cxt(this,sk.s,this.s),this.s?this.t+=sk.t:this.s=sk.t},valueOf:function(){return this.s}};var sk=new lk;function Cxt(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var le=1e-6,F_=1e-12,Be=Math.PI,mn=Be/2,Pb=Be/4,wi=Be*2,vr=180/Be,ye=Be/180,Re=Math.abs,ic=Math.atan,bn=Math.atan2,Zt=Math.cos,YE=Math.ceil,ck=Math.exp;var B_=Math.log,uk=Math.pow,Xt=Math.sin,ua=Math.sign||function(e){return e>0?1:e<0?-1:0},xr=Math.sqrt,Ib=Math.tan;function hk(e){return e>1?0:e<-1?Be:Math.acos(e)}function wn(e){return e>1?mn:e<-1?-mn:Math.asin(e)}function fj(e){return(e=Xt(e/2))*e}function Fr(){}function fk(e,t){e&&Pxt.hasOwnProperty(e.type)&&Pxt[e.type](e,t)}var Axt={Feature:function(e,t){fk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)fk(r[n].geometry,t)}},Pxt={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){pj(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)pj(r[n],t,0)},Polygon:function(e,t){Ixt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)Ixt(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)fk(r[n],t)}};function pj(e,t,r){var n=-1,i=e.length-r,o;for(t.lineStart();++n<i;)o=e[n],t.point(o[0],o[1],o[2]);t.lineEnd()}function Ixt(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)pj(e[r],t,1);t.polygonEnd()}function vo(e,t){e&&Axt.hasOwnProperty(e.type)?Axt[e.type](e,t):fk(e,t)}var jE=Ms(),pk=Ms(),Lxt,kxt,dj,mj,gj,pu={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){jE.reset(),pu.lineStart=i3e,pu.lineEnd=o3e},polygonEnd:function(){var e=+jE;pk.add(e<0?wi+e:e),this.lineStart=this.lineEnd=this.point=Fr},sphere:function(){pk.add(wi)}};function i3e(){pu.point=a3e}function o3e(){Rxt(Lxt,kxt)}function a3e(e,t){pu.point=Rxt,Lxt=e,kxt=t,e*=ye,t*=ye,dj=e,mj=Zt(t=t/2+Pb),gj=Xt(t)}function Rxt(e,t){e*=ye,t*=ye,t=t/2+Pb;var r=e-dj,n=r>=0?1:-1,i=n*r,o=Zt(t),a=Xt(t),s=gj*a,l=mj*o+s*Zt(i),c=s*n*Xt(i);jE.add(bn(c,l)),dj=e,mj=o,gj=a}function Nxt(e){return pk.reset(),vo(e,pu),pk*2}function H_(e){return[bn(e[1],e[0]),wn(e[2])]}function oc(e){var t=e[0],r=e[1],n=Zt(r);return[n*Zt(t),n*Xt(t),Xt(r)]}function XE(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Rp(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function dk(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function $E(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function V_(e){var t=xr(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var ri,Es,ui,il,U_,Fxt,Bxt,Lb,KE=Ms(),jm,Dp,Np={point:_j,lineStart:Dxt,lineEnd:Oxt,polygonStart:function(){Np.point=Vxt,Np.lineStart=s3e,Np.lineEnd=l3e,KE.reset(),pu.polygonStart()},polygonEnd:function(){pu.polygonEnd(),Np.point=_j,Np.lineStart=Dxt,Np.lineEnd=Oxt,jE<0?(ri=-(ui=180),Es=-(il=90)):KE>le?il=90:KE<-le&&(Es=-90),Dp[0]=ri,Dp[1]=ui},sphere:function(){ri=-(ui=180),Es=-(il=90)}};function _j(e,t){jm.push(Dp=[ri=e,ui=e]),t<Es&&(Es=t),t>il&&(il=t)}function Hxt(e,t){var r=oc([e*ye,t*ye]);if(Lb){var n=Rp(Lb,r),i=[n[1],-n[0],0],o=Rp(i,n);V_(o),o=H_(o);var a=e-U_,s=a>0?1:-1,l=o[0]*vr*s,c,u=Re(a)>180;u^(s*U_<l&&l<s*e)?(c=o[1]*vr,c>il&&(il=c)):(l=(l+360)%360-180,u^(s*U_<l&&l<s*e)?(c=-o[1]*vr,c<Es&&(Es=c)):(t<Es&&(Es=t),t>il&&(il=t))),u?e<U_?nl(ri,e)>nl(ri,ui)&&(ui=e):nl(e,ui)>nl(ri,ui)&&(ri=e):ui>=ri?(e<ri&&(ri=e),e>ui&&(ui=e)):e>U_?nl(ri,e)>nl(ri,ui)&&(ui=e):nl(e,ui)>nl(ri,ui)&&(ri=e)}else jm.push(Dp=[ri=e,ui=e]);t<Es&&(Es=t),t>il&&(il=t),Lb=r,U_=e}function Dxt(){Np.point=Hxt}function Oxt(){Dp[0]=ri,Dp[1]=ui,Np.point=_j,Lb=null}function Vxt(e,t){if(Lb){var r=e-U_;KE.add(Re(r)>180?r+(r>0?360:-360):r)}else Fxt=e,Bxt=t;pu.point(e,t),Hxt(e,t)}function s3e(){pu.lineStart()}function l3e(){Vxt(Fxt,Bxt),pu.lineEnd(),Re(KE)>le&&(ri=-(ui=180)),Dp[0]=ri,Dp[1]=ui,Lb=null}function nl(e,t){return(t-=e)<0?t+360:t}function c3e(e,t){return e[0]-t[0]}function zxt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function Uxt(e){var t,r,n,i,o,a,s;if(il=ui=-(ri=Es=1/0),jm=[],vo(e,Np),r=jm.length){for(jm.sort(c3e),t=1,n=jm[0],o=[n];t<r;++t)i=jm[t],zxt(n,i[0])||zxt(n,i[1])?(nl(n[0],i[1])>nl(n[0],n[1])&&(n[1]=i[1]),nl(i[0],n[1])>nl(n[0],n[1])&&(n[0]=i[0])):o.push(n=i);for(a=-1/0,r=o.length-1,t=0,n=o[r];t<=r;n=i,++t)i=o[t],(s=nl(n[1],i[0]))>a&&(a=s,ri=i[0],ui=n[1])}return jm=Dp=null,ri===1/0||Es===1/0?[[NaN,NaN],[NaN,NaN]]:[[ri,Es],[ui,il]]}var ZE,mk,gk,_k,yk,vk,xk,bk,yj,vj,xj,Wxt,Yxt,Ba,Ha,Va,du={sphere:Fr,point:bj,lineStart:qxt,lineEnd:Gxt,polygonStart:function(){du.lineStart=f3e,du.lineEnd=p3e},polygonEnd:function(){du.lineStart=qxt,du.lineEnd=Gxt}};function bj(e,t){e*=ye,t*=ye;var r=Zt(t);JE(r*Zt(e),r*Xt(e),Xt(t))}function JE(e,t,r){++ZE,gk+=(e-gk)/ZE,_k+=(t-_k)/ZE,yk+=(r-yk)/ZE}function qxt(){du.point=u3e}function u3e(e,t){e*=ye,t*=ye;var r=Zt(t);Ba=r*Zt(e),Ha=r*Xt(e),Va=Xt(t),du.point=h3e,JE(Ba,Ha,Va)}function h3e(e,t){e*=ye,t*=ye;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=bn(xr((a=Ha*o-Va*i)*a+(a=Va*n-Ba*o)*a+(a=Ba*i-Ha*n)*a),Ba*n+Ha*i+Va*o);mk+=a,vk+=a*(Ba+(Ba=n)),xk+=a*(Ha+(Ha=i)),bk+=a*(Va+(Va=o)),JE(Ba,Ha,Va)}function Gxt(){du.point=bj}function f3e(){du.point=d3e}function p3e(){jxt(Wxt,Yxt),du.point=bj}function d3e(e,t){Wxt=e,Yxt=t,e*=ye,t*=ye,du.point=jxt;var r=Zt(t);Ba=r*Zt(e),Ha=r*Xt(e),Va=Xt(t),JE(Ba,Ha,Va)}function jxt(e,t){e*=ye,t*=ye;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=Ha*o-Va*i,s=Va*n-Ba*o,l=Ba*i-Ha*n,c=xr(a*a+s*s+l*l),u=wn(c),h=c&&-u/c;yj+=h*a,vj+=h*s,xj+=h*l,mk+=u,vk+=u*(Ba+(Ba=n)),xk+=u*(Ha+(Ha=i)),bk+=u*(Va+(Va=o)),JE(Ba,Ha,Va)}function Xxt(e){ZE=mk=gk=_k=yk=vk=xk=bk=yj=vj=xj=0,vo(e,du);var t=yj,r=vj,n=xj,i=t*t+r*r+n*n;return i<F_&&(t=vk,r=xk,n=bk,mk<le&&(t=gk,r=_k,n=yk),i=t*t+r*r+n*n,i<F_)?[NaN,NaN]:[bn(r,t)*vr,wn(n/xr(i))*vr]}function q_(e){return function(){return e}}function QE(e,t){function r(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(r.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),r}function wj(e,t){return[Re(e)>Be?e+Math.round(-e/wi)*wi:e,t]}wj.invert=wj;function t5(e,t,r){return(e%=wi)?t||r?QE(Kxt(e),Zxt(t,r)):Kxt(e):t||r?Zxt(t,r):wj}function $xt(e){return function(t,r){return t+=e,[t>Be?t-wi:t<-Be?t+wi:t,r]}}function Kxt(e){var t=$xt(e);return t.invert=$xt(-e),t}function Zxt(e,t){var r=Zt(e),n=Xt(e),i=Zt(t),o=Xt(t);function a(s,l){var c=Zt(l),u=Zt(s)*c,h=Xt(s)*c,f=Xt(l),p=f*r+u*n;return[bn(h*i-p*o,u*r-f*n),wn(p*i+h*o)]}return a.invert=function(s,l){var c=Zt(l),u=Zt(s)*c,h=Xt(s)*c,f=Xt(l),p=f*i-h*o;return[bn(h*i+f*o,u*r+p*n),wn(p*r-u*n)]},a}function wk(e){e=t5(e[0]*ye,e[1]*ye,e.length>2?e[2]*ye:0);function t(r){return r=e(r[0]*ye,r[1]*ye),r[0]*=vr,r[1]*=vr,r}return t.invert=function(r){return r=e.invert(r[0]*ye,r[1]*ye),r[0]*=vr,r[1]*=vr,r},t}function Sj(e,t,r,n,i,o){if(!!r){var a=Zt(t),s=Xt(t),l=n*r;i==null?(i=t+n*wi,o=t-l/2):(i=Jxt(a,i),o=Jxt(a,o),(n>0?i<o:i>o)&&(i+=n*wi));for(var c,u=i;n>0?u>o:u<o;u-=l)c=H_([a,-s*Zt(u),-s*Xt(u)]),e.point(c[0],c[1])}}function Jxt(e,t){t=oc(t),t[0]-=e,V_(t);var r=hk(-t[1]);return((-t[2]<0?-r:r)+wi-le)%wi}function Qxt(){var e=q_([0,0]),t=q_(90),r=q_(6),n,i,o={point:a};function a(l,c){n.push(l=i(l,c)),l[0]*=vr,l[1]*=vr}function s(){var l=e.apply(this,arguments),c=t.apply(this,arguments)*ye,u=r.apply(this,arguments)*ye;return n=[],i=t5(-l[0]*ye,-l[1]*ye,0).invert,Sj(o,c,u,1),l={type:"Polygon",coordinates:[n]},n=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:q_([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:q_(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:q_(+l),s):r},s}function Sk(){var e=[],t;return{point:function(r,n,i){t.push([r,n,i])},lineStart:function(){e.push(t=[])},lineEnd:Fr,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function kb(e,t){return Re(e[0]-t[0])<le&&Re(e[1]-t[1])<le}function Mk(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function Ek(e,t,r,n,i){var o=[],a=[],s,l;if(e.forEach(function(d){if(!((g=d.length-1)<=0)){var g,_=d[0],y=d[g],x;if(kb(_,y)){if(!_[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((_=d[s])[0],_[1]);i.lineEnd();return}y[0]+=2*le}o.push(x=new Mk(_,d,null,!0)),a.push(x.o=new Mk(_,null,x,!1)),o.push(x=new Mk(y,d,null,!1)),a.push(x.o=new Mk(y,null,x,!0))}}),!!o.length){for(a.sort(t),tbt(o),tbt(a),s=0,l=a.length;s<l;++s)a[s].e=r=!r;for(var c=o[0],u,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,l=u.length;s<l;++s)i.point((h=u[s])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((h=u[s])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function tbt(e){if(!!(t=e.length)){for(var t,r=0,n=e[0],i;++r<t;)n.n=i=e[r],i.p=n,n=i;n.n=i=e[0],i.p=n}}var Mj=Ms();function Ej(e){return Re(e[0])<=Be?e[0]:ua(e[0])*((Re(e[0])+Be)%wi-Be)}function Tk(e,t){var r=Ej(t),n=t[1],i=Xt(n),o=[Xt(r),-Zt(r),0],a=0,s=0;Mj.reset(),i===1?n=mn+le:i===-1&&(n=-mn-le);for(var l=0,c=e.length;l<c;++l)if(!!(h=(u=e[l]).length))for(var u,h,f=u[h-1],p=Ej(f),d=f[1]/2+Pb,g=Xt(d),_=Zt(d),y=0;y<h;++y,p=b,g=C,_=P,f=x){var x=u[y],b=Ej(x),S=x[1]/2+Pb,C=Xt(S),P=Zt(S),k=b-p,O=k>=0?1:-1,D=O*k,B=D>Be,I=g*C;if(Mj.add(bn(I*O*Xt(D),_*P+I*Zt(D))),a+=B?k+O*wi:k,B^p>=r^b>=r){var L=Rp(oc(f),oc(x));V_(L);var R=Rp(o,L);V_(R);var F=(B^k>=0?-1:1)*wn(R[2]);(n>F||n===F&&(L[0]||L[1]))&&(s+=B^k>=0?1:-1)}}return(a<-le||a<le&&Mj<-le)^s&1}function Ck(e,t,r,n){return function(i){var o=t(i),a=Sk(),s=t(a),l=!1,c,u,h,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=b,u=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,u=Lm(u);var S=Tk(c,n);u.length?(l||(i.polygonStart(),l=!0),Ek(u,g3e,S,r,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(S,C){e(S,C)&&i.point(S,C)}function d(S,C){o.point(S,C)}function g(){f.point=d,o.lineStart()}function _(){f.point=p,o.lineEnd()}function y(S,C){h.push([S,C]),s.point(S,C)}function x(){s.lineStart(),h=[]}function b(){y(h[0][0],h[0][1]),s.lineEnd();var S=s.clean(),C=a.result(),P,k=C.length,O,D,B;if(h.pop(),c.push(h),h=null,!!k){if(S&1){if(D=C[0],(O=D.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),P=0;P<O;++P)i.point((B=D[P])[0],B[1]);i.lineEnd()}return}k>1&&S&2&&C.push(C.pop().concat(C.shift())),u.push(C.filter(m3e))}}return f}}function m3e(e){return e.length>1}function g3e(e,t){return((e=e.x)[0]<0?e[1]-mn-le:mn-e[1])-((t=t.x)[0]<0?t[1]-mn-le:mn-t[1])}var e5=Ck(function(){return!0},_3e,v3e,[-Be,-mn]);function _3e(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?Be:-Be,l=Re(o-t);Re(l-Be)<le?(e.point(t,r=(r+a)/2>0?mn:-mn),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),i=0):n!==s&&l>=Be&&(Re(t-n)<le&&(t-=n*le),Re(o-s)<le&&(o-=s*le),r=y3e(t,r,o,a),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),i=0),e.point(t=o,r=a),n=s},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-i}}}function y3e(e,t,r,n){var i,o,a=Xt(e-r);return Re(a)>le?ic((Xt(t)*(o=Zt(n))*Xt(r)-Xt(n)*(i=Zt(t))*Xt(e))/(i*o*a)):(t+n)/2}function v3e(e,t,r,n){var i;if(e==null)i=r*mn,n.point(-Be,i),n.point(0,i),n.point(Be,i),n.point(Be,0),n.point(Be,-i),n.point(0,-i),n.point(-Be,-i),n.point(-Be,0),n.point(-Be,i);else if(Re(e[0]-t[0])>le){var o=e[0]<t[0]?Be:-Be;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])}function Ak(e){var t=Zt(e),r=6*ye,n=t>0,i=Re(t)>le;function o(u,h,f,p){Sj(p,e,r,f,u,h)}function a(u,h){return Zt(u)*Zt(h)>t}function s(u){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(_,y){var x=[_,y],b,S=a(_,y),C=n?S?0:c(_,y):S?c(_+(_<0?Be:-Be),y):0;if(!h&&(d=p=S)&&u.lineStart(),S!==p&&(b=l(h,x),(!b||kb(h,b)||kb(x,b))&&(x[2]=1)),S!==p)g=0,S?(u.lineStart(),b=l(x,h),u.point(b[0],b[1])):(b=l(h,x),u.point(b[0],b[1],2),u.lineEnd()),h=b;else if(i&&h&&n^S){var P;!(C&f)&&(P=l(x,h,!0))&&(g=0,n?(u.lineStart(),u.point(P[0][0],P[0][1]),u.point(P[1][0],P[1][1]),u.lineEnd()):(u.point(P[1][0],P[1][1]),u.lineEnd(),u.lineStart(),u.point(P[0][0],P[0][1],3)))}S&&(!h||!kb(h,x))&&u.point(x[0],x[1]),h=x,p=S,f=C},lineEnd:function(){p&&u.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function l(u,h,f){var p=oc(u),d=oc(h),g=[1,0,0],_=Rp(p,d),y=XE(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=Rp(g,_),k=$E(g,S),O=$E(_,C);dk(k,O);var D=P,B=XE(k,D),I=XE(D,D),L=B*B-I*(XE(k,k)-1);if(!(L<0)){var R=xr(L),F=$E(D,(-B-R)/I);if(dk(F,k),F=H_(F),!f)return F;var z=u[0],U=h[0],W=u[1],Z=h[1],rt;U<z&&(rt=z,z=U,U=rt);var ot=U-z,st=Re(ot-Be)<le,St=st||ot<le;if(!st&&Z<W&&(rt=W,W=Z,Z=rt),St?st?W+Z>0^F[1]<(Re(F[0]-z)<le?W:Z):W<=F[1]&&F[1]<=Z:ot>Be^(z<=F[0]&&F[0]<=U)){var bt=$E(D,(-B+R)/I);return dk(bt,k),[F,H_(bt)]}}}function c(u,h){var f=n?e:Be-e,p=0;return u<-f?p|=1:u>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return Ck(a,s,o,n?[0,-e]:[-Be,e-Be])}function ebt(e,t,r,n,i,o){var a=e[0],s=e[1],l=t[0],c=t[1],u=0,h=1,f=l-a,p=c-s,d;if(d=r-a,!(!f&&d>0)){if(d/=f,f<0){if(d<u)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>u&&(u=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>u&&(u=d)}else if(f>0){if(d<u)return;d<h&&(h=d)}if(d=n-s,!(!p&&d>0)){if(d/=p,p<0){if(d<u)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>u&&(u=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>u&&(u=d)}else if(p>0){if(d<u)return;d<h&&(h=d)}return u>0&&(e[0]=a+u*f,e[1]=s+u*p),h<1&&(t[0]=a+h*f,t[1]=s+h*p),!0}}}}}var r5=1e9,Pk=-r5;function Op(e,t,r,n){function i(c,u){return e<=c&&c<=r&&t<=u&&u<=n}function o(c,u,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(u,h))||l(c,u)<0^h>0)do f.point(p===0||p===3?e:r,p>1?n:t);while((p=(p+h+4)%4)!==d);else f.point(u[0],u[1])}function a(c,u){return Re(c[0]-e)<le?u>0?0:3:Re(c[0]-r)<le?u>0?2:1:Re(c[1]-t)<le?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var h=a(c,1),f=a(u,1);return h!==f?h-f:h===0?u[1]-c[1]:h===1?c[0]-u[0]:h===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,h=Sk(),f,p,d,g,_,y,x,b,S,C,P,k={point:O,lineStart:L,lineEnd:R,polygonStart:B,polygonEnd:I};function O(z,U){i(z,U)&&u.point(z,U)}function D(){for(var z=0,U=0,W=p.length;U<W;++U)for(var Z=p[U],rt=1,ot=Z.length,st=Z[0],St,bt,Mt=st[0],lt=st[1];rt<ot;++rt)St=Mt,bt=lt,st=Z[rt],Mt=st[0],lt=st[1],bt<=n?lt>n&&(Mt-St)*(n-bt)>(lt-bt)*(e-St)&&++z:lt<=n&&(Mt-St)*(n-bt)<(lt-bt)*(e-St)&&--z;return z}function B(){u=h,f=[],p=[],P=!0}function I(){var z=D(),U=P&&z,W=(f=Lm(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&Ek(f,s,z,o,c),c.polygonEnd()),u=c,f=p=d=null}function L(){k.point=F,p&&p.push(d=[]),C=!0,S=!1,x=b=NaN}function R(){f&&(F(g,_),y&&S&&h.rejoin(),f.push(h.result())),k.point=O,S&&u.lineEnd()}function F(z,U){var W=i(z,U);if(p&&d.push([z,U]),C)g=z,_=U,y=W,C=!1,W&&(u.lineStart(),u.point(z,U));else if(W&&S)u.point(z,U);else{var Z=[x=Math.max(Pk,Math.min(r5,x)),b=Math.max(Pk,Math.min(r5,b))],rt=[z=Math.max(Pk,Math.min(r5,z)),U=Math.max(Pk,Math.min(r5,U))];ebt(Z,rt,e,t,r,n)?(S||(u.lineStart(),u.point(Z[0],Z[1])),u.point(rt[0],rt[1]),W||u.lineEnd(),P=!1):W&&(u.lineStart(),u.point(z,U),P=!1)}x=z,b=U,S=W}return k}}function rbt(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Op(e,t,r,n)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=o=null,a):[[e,t],[r,n]]}}}var Tj=Ms(),Cj,Ik,Lk,Rb={sphere:Fr,point:Fr,lineStart:x3e,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr};function x3e(){Rb.point=w3e,Rb.lineEnd=b3e}function b3e(){Rb.point=Rb.lineEnd=Fr}function w3e(e,t){e*=ye,t*=ye,Cj=e,Ik=Xt(t),Lk=Zt(t),Rb.point=S3e}function S3e(e,t){e*=ye,t*=ye;var r=Xt(t),n=Zt(t),i=Re(e-Cj),o=Zt(i),a=Xt(i),s=n*a,l=Lk*r-Ik*n*o,c=Ik*r+Lk*n*o;Tj.add(bn(xr(s*s+l*l),c)),Cj=e,Ik=r,Lk=n}function kk(e){return Tj.reset(),vo(e,Rb),+Tj}var Aj=[null,null],M3e={type:"LineString",coordinates:Aj};function Nb(e,t){return Aj[0]=e,Aj[1]=t,kk(M3e)}var nbt={Feature:function(e,t){return Rk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(Rk(r[n].geometry,t))return!0;return!1}},ibt={Sphere:function(){return!0},Point:function(e,t){return obt(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(obt(r[n],t))return!0;return!1},LineString:function(e,t){return abt(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(abt(r[n],t))return!0;return!1},Polygon:function(e,t){return sbt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(sbt(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(Rk(r[n],t))return!0;return!1}};function Rk(e,t){return e&&ibt.hasOwnProperty(e.type)?ibt[e.type](e,t):!1}function obt(e,t){return Nb(e,t)===0}function abt(e,t){for(var r,n,i,o=0,a=e.length;o<a;o++){if(n=Nb(e[o],t),n===0||o>0&&(i=Nb(e[o],e[o-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<F_*i))return!0;r=n}return!1}function sbt(e,t){return!!Tk(e.map(E3e),lbt(t))}function E3e(e){return e=e.map(lbt),e.pop(),e}function lbt(e){return[e[0]*ye,e[1]*ye]}function cbt(e,t){return(e&&nbt.hasOwnProperty(e.type)?nbt[e.type]:Rk)(e,t)}function ubt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function hbt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function Nk(){var e,t,r,n,i,o,a,s,l=10,c=l,u=90,h=360,f,p,d,g,_=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return Ir(YE(n/u)*u,r,u).map(d).concat(Ir(YE(s/h)*h,a,h).map(g)).concat(Ir(YE(t/l)*l,e,l).filter(function(b){return Re(b%u)>le}).map(f)).concat(Ir(YE(o/c)*c,i,c).filter(function(b){return Re(b%h)>le}).map(p))}return y.lines=function(){return x().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(g(a).slice(1),d(r).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(n=+b[0][0],r=+b[1][0],s=+b[0][1],a=+b[1][1],n>r&&(b=n,n=r,r=b),s>a&&(b=s,s=a,a=b),y.precision(_)):[[n,s],[r,a]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],o=+b[0][1],i=+b[1][1],t>e&&(b=t,t=e,e=b),o>i&&(b=o,o=i,i=b),y.precision(_)):[[t,o],[e,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],h=+b[1],y):[u,h]},y.stepMinor=function(b){return arguments.length?(l=+b[0],c=+b[1],y):[l,c]},y.precision=function(b){return arguments.length?(_=+b,f=ubt(o,i,90),p=hbt(t,e,_),d=ubt(s,a,90),g=hbt(n,r,_),y):_},y.extentMajor([[-180,-90+le],[180,90-le]]).extentMinor([[-180,-80-le],[180,80+le]])}function fbt(){return Nk()()}function pbt(e,t){var r=e[0]*ye,n=e[1]*ye,i=t[0]*ye,o=t[1]*ye,a=Zt(n),s=Xt(n),l=Zt(o),c=Xt(o),u=a*Zt(r),h=a*Xt(r),f=l*Zt(i),p=l*Xt(i),d=2*wn(xr(fj(o-n)+a*l*fj(i-r))),g=Xt(d),_=d?function(y){var x=Xt(y*=d)/g,b=Xt(d-y)/g,S=b*u+x*f,C=b*h+x*p,P=b*s+x*c;return[bn(C,S)*vr,bn(P,xr(S*S+C*C))*vr]}:function(){return[r*vr,n*vr]};return _.distance=d,_}function Xm(e){return e}var Pj=Ms(),Ij=Ms(),dbt,mbt,Lj,kj,$m={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){$m.lineStart=T3e,$m.lineEnd=A3e},polygonEnd:function(){$m.lineStart=$m.lineEnd=$m.point=Fr,Pj.add(Re(Ij)),Ij.reset()},result:function(){var e=Pj/2;return Pj.reset(),e}};function T3e(){$m.point=C3e}function C3e(e,t){$m.point=gbt,dbt=Lj=e,mbt=kj=t}function gbt(e,t){Ij.add(kj*e-Lj*t),Lj=e,kj=t}function A3e(){gbt(dbt,mbt)}var Rj=$m;var Db=1/0,Dk=Db,n5=-Db,Ok=n5,P3e={point:I3e,lineStart:Fr,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr,result:function(){var e=[[Db,Dk],[n5,Ok]];return n5=Ok=-(Dk=Db=1/0),e}};function I3e(e,t){e<Db&&(Db=e),e>n5&&(n5=e),t<Dk&&(Dk=t),t>Ok&&(Ok=t)}var Ob=P3e;var Nj=0,Dj=0,i5=0,zk=0,Fk=0,zb=0,Oj=0,zj=0,o5=0,vbt,xbt,Hh,Vh,mu={point:G_,lineStart:_bt,lineEnd:ybt,polygonStart:function(){mu.lineStart=R3e,mu.lineEnd=N3e},polygonEnd:function(){mu.point=G_,mu.lineStart=_bt,mu.lineEnd=ybt},result:function(){var e=o5?[Oj/o5,zj/o5]:zb?[zk/zb,Fk/zb]:i5?[Nj/i5,Dj/i5]:[NaN,NaN];return Nj=Dj=i5=zk=Fk=zb=Oj=zj=o5=0,e}};function G_(e,t){Nj+=e,Dj+=t,++i5}function _bt(){mu.point=L3e}function L3e(e,t){mu.point=k3e,G_(Hh=e,Vh=t)}function k3e(e,t){var r=e-Hh,n=t-Vh,i=xr(r*r+n*n);zk+=i*(Hh+e)/2,Fk+=i*(Vh+t)/2,zb+=i,G_(Hh=e,Vh=t)}function ybt(){mu.point=G_}function R3e(){mu.point=D3e}function N3e(){bbt(vbt,xbt)}function D3e(e,t){mu.point=bbt,G_(vbt=Hh=e,xbt=Vh=t)}function bbt(e,t){var r=e-Hh,n=t-Vh,i=xr(r*r+n*n);zk+=i*(Hh+e)/2,Fk+=i*(Vh+t)/2,zb+=i,i=Vh*e-Hh*t,Oj+=i*(Hh+e),zj+=i*(Vh+t),o5+=i*3,G_(Hh=e,Vh=t)}var Fj=mu;function Bk(e){this._context=e}Bk.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,wi);break}}},result:Fr};var Hj=Ms(),Bj,wbt,Sbt,a5,s5,Hk={point:Fr,lineStart:function(){Hk.point=O3e},lineEnd:function(){Bj&&Mbt(wbt,Sbt),Hk.point=Fr},polygonStart:function(){Bj=!0},polygonEnd:function(){Bj=null},result:function(){var e=+Hj;return Hj.reset(),e}};function O3e(e,t){Hk.point=Mbt,wbt=a5=e,Sbt=s5=t}function Mbt(e,t){a5-=e,s5-=t,Hj.add(xr(a5*a5+s5*s5)),a5=e,s5=t}var Vj=Hk;function Vk(){this._string=[]}Vk.prototype={_radius:4.5,_circle:Ebt(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=Ebt(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function Ebt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Tbt(e,t){var r=4.5,n,i;function o(a){return a&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),vo(a,n(i))),i.result()}return o.area=function(a){return vo(a,n(Rj)),Rj.result()},o.measure=function(a){return vo(a,n(Vj)),Vj.result()},o.bounds=function(a){return vo(a,n(Ob)),Ob.result()},o.centroid=function(a){return vo(a,n(Fj)),Fj.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,Xm):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new Vk):new Bk(t=a),typeof r!="function"&&i.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(i.pointRadius(+a),+a),o):r},o.projection(e).context(t)}function Cbt(e){return{stream:Km(e)}}function Km(e){return function(t){var r=new Uj;for(var n in e)r[n]=e[n];return r.stream=t,r}}function Uj(){}Uj.prototype={constructor:Uj,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function qj(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),vo(r,e.stream(Ob)),t(Ob.result()),n!=null&&e.clipExtent(n),e}function W_(e,t,r){return qj(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),s=+t[0][0]+(i-a*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(o-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([s,l])},r)}function Fb(e,t,r){return W_(e,[[0,0],t],r)}function Bb(e,t,r){return qj(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),a=(i-o*(n[1][0]+n[0][0]))/2,s=-o*n[0][1];e.scale(150*o).translate([a,s])},r)}function Hb(e,t,r){return qj(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),a=-o*n[0][0],s=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])},r)}var Abt=16,z3e=Zt(30*ye);function Gj(e,t){return+t?B3e(e,t):F3e(e)}function F3e(e){return Km({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function B3e(e,t){function r(n,i,o,a,s,l,c,u,h,f,p,d,g,_){var y=c-n,x=u-i,b=y*y+x*x;if(b>4*t&&g--){var S=a+f,C=s+p,P=l+d,k=xr(S*S+C*C+P*P),O=wn(P/=k),D=Re(Re(P)-1)<le||Re(o-h)<le?(o+h)/2:bn(C,S),B=e(D,O),I=B[0],L=B[1],R=I-n,F=L-i,z=x*R-y*F;(z*z/b>t||Re((y*R+x*F)/b-.5)>.3||a*f+s*p+l*d<z3e)&&(r(n,i,o,a,s,l,I,L,D,S/=k,C/=k,P,g,_),_.point(I,L),r(I,L,D,S,C,P,c,u,h,f,p,d,g,_))}}return function(n){var i,o,a,s,l,c,u,h,f,p,d,g,_={point:y,lineStart:x,lineEnd:S,polygonStart:function(){n.polygonStart(),_.lineStart=C},polygonEnd:function(){n.polygonEnd(),_.lineStart=x}};function y(O,D){O=e(O,D),n.point(O[0],O[1])}function x(){h=NaN,_.point=b,n.lineStart()}function b(O,D){var B=oc([O,D]),I=e(O,D);r(h,f,u,p,d,g,h=I[0],f=I[1],u=O,p=B[0],d=B[1],g=B[2],Abt,n),n.point(h,f)}function S(){_.point=y,n.lineEnd()}function C(){x(),_.point=P,_.lineEnd=k}function P(O,D){b(i=O,D),o=h,a=f,s=p,l=d,c=g,_.point=b}function k(){r(h,f,u,p,d,g,o,a,i,s,l,c,Abt,n),_.lineEnd=S,S()}return _}}var H3e=Km({point:function(e,t){this.stream.point(e*ye,t*ye)}});function V3e(e){return Km({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function U3e(e,t,r,n,i){function o(a,s){return a*=n,s*=i,[t+e*a,r-e*s]}return o.invert=function(a,s){return[(a-t)/e*n,(r-s)/e*i]},o}function Pbt(e,t,r,n,i,o){var a=Zt(o),s=Xt(o),l=a*e,c=s*e,u=a/e,h=s/e,f=(s*r-a*t)/e,p=(s*t+a*r)/e;function d(g,_){return g*=n,_*=i,[l*g-c*_+t,r-c*g-l*_]}return d.invert=function(g,_){return[n*(u*g-h*_+f),i*(p-h*g-u*_)]},d}function Si(e){return l5(function(){return e})()}function l5(e){var t,r=150,n=480,i=250,o=0,a=0,s=0,l=0,c=0,u,h=0,f=1,p=1,d=null,g=e5,_=null,y,x,b,S=Xm,C=.5,P,k,O,D,B;function I(z){return O(z[0]*ye,z[1]*ye)}function L(z){return z=O.invert(z[0],z[1]),z&&[z[0]*vr,z[1]*vr]}I.stream=function(z){return D&&B===z?D:D=H3e(V3e(u)(g(P(S(B=z)))))},I.preclip=function(z){return arguments.length?(g=z,d=void 0,F()):g},I.postclip=function(z){return arguments.length?(S=z,_=y=x=b=null,F()):S},I.clipAngle=function(z){return arguments.length?(g=+z?Ak(d=z*ye):(d=null,e5),F()):d*vr},I.clipExtent=function(z){return arguments.length?(S=z==null?(_=y=x=b=null,Xm):Op(_=+z[0][0],y=+z[0][1],x=+z[1][0],b=+z[1][1]),F()):_==null?null:[[_,y],[x,b]]},I.scale=function(z){return arguments.length?(r=+z,R()):r},I.translate=function(z){return arguments.length?(n=+z[0],i=+z[1],R()):[n,i]},I.center=function(z){return arguments.length?(o=z[0]%360*ye,a=z[1]%360*ye,R()):[o*vr,a*vr]},I.rotate=function(z){return arguments.length?(s=z[0]%360*ye,l=z[1]%360*ye,c=z.length>2?z[2]%360*ye:0,R()):[s*vr,l*vr,c*vr]},I.angle=function(z){return arguments.length?(h=z%360*ye,R()):h*vr},I.reflectX=function(z){return arguments.length?(f=z?-1:1,R()):f<0},I.reflectY=function(z){return arguments.length?(p=z?-1:1,R()):p<0},I.precision=function(z){return arguments.length?(P=Gj(k,C=z*z),F()):xr(C)},I.fitExtent=function(z,U){return W_(I,z,U)},I.fitSize=function(z,U){return Fb(I,z,U)},I.fitWidth=function(z,U){return Bb(I,z,U)},I.fitHeight=function(z,U){return Hb(I,z,U)};function R(){var z=Pbt(r,0,0,f,p,h).apply(null,t(o,a)),U=(h?Pbt:U3e)(r,n-z[0],i-z[1],f,p,h);return u=t5(s,l,c),k=QE(t,U),O=QE(u,k),P=Gj(k,C),F()}function F(){return D=B=null,I}return function(){return t=e.apply(this,arguments),I.invert=t.invert&&L,R()}}function Vb(e){var t=0,r=Be/3,n=l5(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*ye,r=o[1]*ye):[t*vr,r*vr]},i}function Ibt(e){var t=Zt(e);function r(n,i){return[n*t,Xt(i)/t]}return r.invert=function(n,i){return[n/t,wn(i*t)]},r}function Wj(e,t){var r=Xt(e),n=(r+Xt(t))/2;if(Re(n)<le)return Ibt(e);var i=1+r*(2*n-r),o=xr(i)/n;function a(s,l){var c=xr(i-2*n*Xt(l))/n;return[c*Xt(s*=n),o-c*Zt(s)]}return a.invert=function(s,l){var c=o-l,u=bn(s,Re(c))*ua(c);return c*n<0&&(u-=Be*ua(s)*ua(c)),[u/n,wn((i-(s*s+c*c)*n*n)/(2*n))]},a}function Y_(){return Vb(Wj).scale(155.424).center([0,33.6442])}function Uk(){return Y_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function q3e(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i<t;)e[i].point(r,n)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function Lbt(){var e,t,r=Uk(),n,i=Y_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Y_().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(f,p){l=[f,p]}};function u(f){var p=f[0],d=f[1];return l=null,n.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}u.invert=function(f){var p=r.scale(),d=r.translate(),g=(f[0]-d[0])/p,_=(f[1]-d[1])/p;return(_>=.12&&_<.234&&g>=-.425&&g<-.214?i:_>=.166&&_<.234&&g>=-.214&&g<-.115?a:r).invert(f)},u.stream=function(f){return e&&t===f?e:e=q3e([r.stream(t=f),i.stream(f),a.stream(f)])},u.precision=function(f){return arguments.length?(r.precision(f),i.precision(f),a.precision(f),h()):r.precision()},u.scale=function(f){return arguments.length?(r.scale(f),i.scale(f*.35),a.scale(f),u.translate(r.translate())):r.scale()},u.translate=function(f){if(!arguments.length)return r.translate();var p=r.scale(),d=+f[0],g=+f[1];return n=r.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+le,g+.12*p+le],[d-.214*p-le,g+.234*p-le]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+le,g+.166*p+le],[d-.115*p-le,g+.234*p-le]]).stream(c),h()},u.fitExtent=function(f,p){return W_(u,f,p)},u.fitSize=function(f,p){return Fb(u,f,p)},u.fitWidth=function(f,p){return Bb(u,f,p)},u.fitHeight=function(f,p){return Hb(u,f,p)};function h(){return e=t=null,u}return u.scale(1070)}function qk(e){return function(t,r){var n=Zt(t),i=Zt(r),o=e(n*i);return[o*i*Xt(t),o*Xt(r)]}}function Uh(e){return function(t,r){var n=xr(t*t+r*r),i=e(n),o=Xt(i),a=Zt(i);return[bn(t*o,n*a),wn(n&&r*o/n)]}}var Gk=qk(function(e){return xr(2/(1+e))});Gk.invert=Uh(function(e){return 2*wn(e/2)});function kbt(){return Si(Gk).scale(124.75).clipAngle(180-.001)}var Wk=qk(function(e){return(e=hk(e))&&e/Xt(e)});Wk.invert=Uh(function(e){return e});function Rbt(){return Si(Wk).scale(79.4188).clipAngle(180-.001)}function j_(e,t){return[e,B_(Ib((mn+t)/2))]}j_.invert=function(e,t){return[e,2*ic(ck(t))-mn]};function Nbt(){return Yj(j_).scale(961/wi)}function Yj(e){var t=Si(e),r=t.center,n=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,c;t.scale=function(h){return arguments.length?(n(h),u()):n()},t.translate=function(h){return arguments.length?(i(h),u()):i()},t.center=function(h){return arguments.length?(r(h),u()):r()},t.clipExtent=function(h){return arguments.length?(h==null?a=s=l=c=null:(a=+h[0][0],s=+h[0][1],l=+h[1][0],c=+h[1][1]),u()):a==null?null:[[a,s],[l,c]]};function u(){var h=Be*n(),f=t(wk(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===j_?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,l),c]]:[[a,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,c)]])}return u()}function Yk(e){return Ib((mn+e)/2)}function jj(e,t){var r=Zt(e),n=e===t?Xt(e):B_(r/Zt(t))/B_(Yk(t)/Yk(e)),i=r*uk(Yk(e),n)/n;if(!n)return j_;function o(a,s){i>0?s<-mn+le&&(s=-mn+le):s>mn-le&&(s=mn-le);var l=i/uk(Yk(s),n);return[l*Xt(n*a),i-l*Zt(n*a)]}return o.invert=function(a,s){var l=i-s,c=ua(n)*xr(a*a+l*l),u=bn(a,Re(l))*ua(l);return l*n<0&&(u-=Be*ua(a)*ua(l)),[u/n,2*ic(uk(i/c,1/n))-mn]},o}function Dbt(){return Vb(jj).scale(109.5).parallels([30,30])}function X_(e,t){return[e,t]}X_.invert=X_;function Obt(){return Si(X_).scale(152.63)}function Xj(e,t){var r=Zt(e),n=e===t?Xt(e):(r-Zt(t))/(t-e),i=r/n+e;if(Re(n)<le)return X_;function o(a,s){var l=i-s,c=n*a;return[l*Xt(c),i-l*Zt(c)]}return o.invert=function(a,s){var l=i-s,c=bn(a,Re(l))*ua(l);return l*n<0&&(c-=Be*ua(a)*ua(l)),[c/n,i-ua(n)*xr(a*a+l*l)]},o}function zbt(){return Vb(Xj).scale(131.154).center([0,13.9389])}var c5=1.340264,u5=-.081106,h5=893e-6,f5=.003796,jk=xr(3)/2,G3e=12;function Xk(e,t){var r=wn(jk*Xt(t)),n=r*r,i=n*n*n;return[e*Zt(r)/(jk*(c5+3*u5*n+i*(7*h5+9*f5*n))),r*(c5+u5*n+i*(h5+f5*n))]}Xk.invert=function(e,t){for(var r=t,n=r*r,i=n*n*n,o=0,a,s,l;o<G3e&&(s=r*(c5+u5*n+i*(h5+f5*n))-t,l=c5+3*u5*n+i*(7*h5+9*f5*n),r-=a=s/l,n=r*r,i=n*n*n,!(Re(a)<F_));++o);return[jk*e*(c5+3*u5*n+i*(7*h5+9*f5*n))/Zt(r),wn(Xt(r)/jk)]};function Fbt(){return Si(Xk).scale(177.158)}function $k(e,t){var r=Zt(t),n=Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}$k.invert=Uh(ic);function Bbt(){return Si($k).scale(144.049).clipAngle(60)}function Hbt(){var e=1,t=0,r=0,n=1,i=1,o=0,a,s,l=null,c,u,h,f=1,p=1,d=Km({point:function(S,C){var P=b([S,C]);this.stream.point(P[0],P[1])}}),g=Xm,_,y;function x(){return f=e*n,p=e*i,_=y=null,b}function b(S){var C=S[0]*f,P=S[1]*p;if(o){var k=P*a-C*s;C=C*a+P*s,P=k}return[C+t,P+r]}return b.invert=function(S){var C=S[0]-t,P=S[1]-r;if(o){var k=P*a+C*s;C=C*a-P*s,P=k}return[C/f,P/p]},b.stream=function(S){return _&&y===S?_:_=d(g(y=S))},b.postclip=function(S){return arguments.length?(g=S,l=c=u=h=null,x()):g},b.clipExtent=function(S){return arguments.length?(g=S==null?(l=c=u=h=null,Xm):Op(l=+S[0][0],c=+S[0][1],u=+S[1][0],h=+S[1][1]),x()):l==null?null:[[l,c],[u,h]]},b.scale=function(S){return arguments.length?(e=+S,x()):e},b.translate=function(S){return arguments.length?(t=+S[0],r=+S[1],x()):[t,r]},b.angle=function(S){return arguments.length?(o=S%360*ye,s=Xt(o),a=Zt(o),x()):o*vr},b.reflectX=function(S){return arguments.length?(n=S?-1:1,x()):n<0},b.reflectY=function(S){return arguments.length?(i=S?-1:1,x()):i<0},b.fitExtent=function(S,C){return W_(b,S,C)},b.fitSize=function(S,C){return Fb(b,S,C)},b.fitWidth=function(S,C){return Bb(b,S,C)},b.fitHeight=function(S,C){return Hb(b,S,C)},b}function Kk(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}Kk.invert=function(e,t){var r=t,n=25,i;do{var o=r*r,a=o*o;r-=i=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(Re(i)>le&&--n>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};function Vbt(){return Si(Kk).scale(175.295)}function Zk(e,t){return[Zt(t)*Xt(e),Xt(t)]}Zk.invert=Uh(wn);function Ubt(){return Si(Zk).scale(249.5).clipAngle(90+le)}function Jk(e,t){var r=Zt(t),n=1+Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}Jk.invert=Uh(function(e){return 2*ic(e)});function qbt(){return Si(Jk).scale(250).clipAngle(142)}function Qk(e,t){return[B_(Ib((mn+t)/2)),-e]}Qk.invert=function(e,t){return[-t,2*ic(ck(e))-mn]};function Gbt(){var e=Yj(Qk),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function W3e(e,t){return e.parent===t.parent?1:2}function Y3e(e){return e.reduce(j3e,0)/e.length}function j3e(e,t){return e+t.x}function X3e(e){return 1+e.reduce($3e,0)}function $3e(e,t){return Math.max(e,t.y)}function K3e(e){for(var t;t=e.children;)e=t[0];return e}function Z3e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Wbt(){var e=W3e,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=Y3e(p),f.y=X3e(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=K3e(o),c=Z3e(o),u=l.x-e(l,c)/2,h=c.x+e(c,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-u)/(h-u)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function J3e(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function Ybt(){return this.eachAfter(J3e)}function jbt(e){var t=this,r,n=[t],i,o,a;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);while(n.length);return this}function Xbt(e){for(var t=this,r=[t],n,i;t=r.pop();)if(e(t),n=t.children,n)for(i=n.length-1;i>=0;--i)r.push(n[i]);return this}function $bt(e){for(var t=this,r=[t],n=[],i,o,a;t=r.pop();)if(n.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);for(;t=n.pop();)e(t);return this}function Kbt(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function Zbt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Jbt(e){for(var t=this,r=Q3e(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function Q3e(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function Qbt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function t2t(){var e=[];return this.each(function(t){e.push(t)}),e}function e2t(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function r2t(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function p5(e,t){var r=new Zm(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=eMe);i=o.pop();)if(n&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new Zm(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore($j)}function tMe(){return p5(this).eachBefore(rMe)}function eMe(e){return e.children}function rMe(e){e.data=e.data.data}function $j(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Zm(e){this.data=e,this.depth=this.height=0,this.parent=null}Zm.prototype=p5.prototype={constructor:Zm,count:Ybt,each:jbt,eachAfter:$bt,eachBefore:Xbt,sum:Kbt,sort:Zbt,path:Jbt,ancestors:Qbt,descendants:t2t,leaves:e2t,links:r2t,copy:tMe};var n2t=Array.prototype.slice;function i2t(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}function e8(e){for(var t=0,r=(e=i2t(n2t.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&o2t(o,i)?++t:(o=iMe(n=nMe(n,i)),t=0);return o}function nMe(e,t){var r,n;if(Kj(t,e))return[t];for(r=0;r<e.length;++r)if(t8(t,e[r])&&Kj(d5(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(t8(d5(e[r],e[n]),t)&&t8(d5(e[r],t),e[n])&&t8(d5(e[n],t),e[r])&&Kj(a2t(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function t8(e,t){var r=e.r-t.r,n=t.x-e.x,i=t.y-e.y;return r<0||r*r<n*n+i*i}function o2t(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function Kj(e,t){for(var r=0;r<t.length;++r)if(!o2t(e,t[r]))return!1;return!0}function iMe(e){switch(e.length){case 1:return oMe(e[0]);case 2:return d5(e[0],e[1]);case 3:return a2t(e[0],e[1],e[2])}}function oMe(e){return{x:e.x,y:e.y,r:e.r}}function d5(e,t){var r=e.x,n=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-r,c=a-n,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(r+o+l/h*u)/2,y:(n+a+c/h*u)/2,r:(h+i+s)/2}}function a2t(e,t,r){var n=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=r.x,u=r.y,h=r.r,f=n-a,p=n-c,d=i-s,g=i-u,_=l-o,y=h-o,x=n*n+i*i-o*o,b=x-a*a-s*s+l*l,S=x-c*c-u*u+h*h,C=p*d-f*g,P=(d*S-g*b)/(C*2)-n,k=(g*_-d*y)/C,O=(p*b-f*S)/(C*2)-i,D=(f*y-p*_)/C,B=k*k+D*D-1,I=2*(o+P*k+O*D),L=P*P+O*O-o*o,R=-(B?(I+Math.sqrt(I*I-4*B*L))/(2*B):L/I);return{x:n+P+k*R,y:i+O+D*R,r:R}}function s2t(e,t,r){var n=e.x-t.x,i,o,a=e.y-t.y,s,l,c=n*n+a*a;c?(o=t.r+r.r,o*=o,l=e.r+r.r,l*=l,o>l?(i=(c+l-o)/(2*c),s=Math.sqrt(Math.max(0,l/c-i*i)),r.x=e.x-i*n-s*a,r.y=e.y-i*a+s*n):(i=(c+o-l)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),r.x=t.x+i*n-s*a,r.y=t.y+i*a+s*n)):(r.x=t.x+r.r,r.y=t.y)}function l2t(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function c2t(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function r8(e){this._=e,this.next=null,this.previous=null}function Zj(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,h;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;s2t(r,t,n=e[2]),t=new r8(t),r=new r8(r),n=new r8(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){s2t(t._,r._,n=e[s]),n=new r8(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(l2t(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(l2t(c._,n._)){t=c,t.next=r,r.previous=t,--s;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,o=c2t(t);(n=n.next)!==r;)(a=c2t(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=e8(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function u2t(e){return Zj(e),e}function h2t(e){return e==null?null:Ub(e)}function Ub(e){if(typeof e!="function")throw new Error;return e}function zp(){return 0}function Jm(e){return function(){return e}}function aMe(e){return Math.sqrt(e.value)}function d2t(){var e=null,t=1,r=1,n=zp;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(f2t(e)).eachAfter(Jj(n,.5)).eachBefore(p2t(1)):o.eachBefore(f2t(aMe)).eachAfter(Jj(zp,1)).eachAfter(Jj(n,o.r/Math.min(t,r))).eachBefore(p2t(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=h2t(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.padding=function(o){return arguments.length?(n=typeof o=="function"?o:Jm(+o),i):n},i}function f2t(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Jj(e,t){return function(r){if(n=r.children){var n,i,o=n.length,a=e(r)*t||0,s;if(a)for(i=0;i<o;++i)n[i].r+=a;if(s=Zj(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function p2t(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}function n8(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function qh(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(n-t)/e.value;++s<l;)a=o[s],a.y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function m2t(){var e=1,t=1,r=0,n=!1;function i(a){var s=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),n&&a.eachBefore(n8),a}function o(a,s){return function(l){l.children&&qh(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var c=l.x0,u=l.y0,h=l.x1-r,f=l.y1-r;h<c&&(c=h=(c+h)/2),f<u&&(u=f=(u+f)/2),l.x0=c,l.y0=u,l.x1=h,l.y1=f}}return i.round=function(a){return arguments.length?(n=!!a,i):n},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(r=+a,i):r},i}var g2t="$",sMe={depth:-1},_2t={};function lMe(e){return e.id}function cMe(e){return e.parentId}function y2t(){var e=lMe,t=cMe;function r(n){var i,o,a=n.length,s,l,c,u=new Array(a),h,f,p={};for(o=0;o<a;++o)i=n[o],c=u[o]=new Zm(i),(h=e(i,o,n))!=null&&(h+="")&&(f=g2t+(c.id=h),p[f]=f in p?_2t:c);for(o=0;o<a;++o)if(c=u[o],h=t(n[o],o,n),h==null||!(h+="")){if(s)throw new Error("multiple roots");s=c}else{if(l=p[g2t+h],!l)throw new Error("missing: "+h);if(l===_2t)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}if(!s)throw new Error("no root");if(s.parent=sMe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore($j),s.parent=null,a>0)throw new Error("cycle");return s}return r.id=function(n){return arguments.length?(e=Ub(n),r):e},r.parentId=function(n){return arguments.length?(t=Ub(n),r):t},r}function uMe(e,t){return e.parent===t.parent?1:2}function Qj(e){var t=e.children;return t?t[0]:e.t}function tX(e){var t=e.children;return t?t[t.length-1]:e.t}function hMe(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function fMe(e){for(var t=0,r=0,n=e.children,i=n.length,o;--i>=0;)o=n[i],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function pMe(e,t,r){return e.a.parent===t.parent?e.a:r}function i8(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}i8.prototype=Object.create(Zm.prototype);function dMe(e){for(var t=new i8(e,0),r,n=[t],i,o,a,s;r=n.pop();)if(o=r._.children)for(r.children=new Array(s=o.length),a=s-1;a>=0;--a)n.push(i=r.children[a]=new i8(o[a],a)),i.parent=r;return(t.parent=new i8(null,0)).children=[t],t}function v2t(){var e=uMe,t=1,r=1,n=null;function i(c){var u=dMe(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),n)c.eachBefore(l);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:e(h,f)/2,g=d-h.x,_=t/(f.x+d+g),y=r/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*_,x.y=x.depth*y})}return c}function o(c){var u=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(u){fMe(c);var p=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+e(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,h){if(u){for(var f=c,p=c,d=u,g=f.parent.children[0],_=f.m,y=p.m,x=d.m,b=g.m,S;d=tX(d),f=Qj(f),d&&f;)g=Qj(g),p=tX(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(hMe(pMe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!tX(p)&&(p.t=d,p.m+=x-y),f&&!Qj(g)&&(g.t=f,g.m+=_-b,h=c)}return h}function l(c){c.x*=t,c.y=c.depth*r}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(n=!1,t=+c[0],r=+c[1],i):n?null:[t,r]},i.nodeSize=function(c){return arguments.length?(n=!0,t=+c[0],r=+c[1],i):n?[t,r]:null},i}function Qm(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-r)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var eX=(1+Math.sqrt(5))/2;function rX(e,t,r,n,i,o){for(var a=[],s=t.children,l,c,u=0,h=0,f=s.length,p,d,g=t.value,_,y,x,b,S,C,P;u<f;){p=i-r,d=o-n;do _=s[h++].value;while(!_&&h<f);for(y=x=_,C=Math.max(d/p,p/d)/(g*e),P=_*_*C,S=Math.max(x/P,P/y);h<f;++h){if(_+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),P=_*_*C,b=Math.max(x/P,P/y),b>S){_-=c;break}S=b}a.push(l={value:_,dice:p<d,children:s.slice(u,h)}),l.dice?qh(l,r,n,i,g?n+=d*_/g:o):Qm(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var o8=function e(t){function r(n,i,o,a,s){rX(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(eX);function x2t(){var e=o8,t=!1,r=1,n=1,i=[0],o=zp,a=zp,s=zp,l=zp,c=zp;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(n8),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,_=f.x1-p,y=f.y1-p;_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=_,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,_-=s(f)-p,y-=l(f)-p,_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),e(f,d,g,_,y))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(r=+f[0],n=+f[1],u):[r,n]},u.tile=function(f){return arguments.length?(e=Ub(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Jm(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Jm(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Jm(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Jm(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Jm(+f),u):c},u}function b2t(e,t,r,n,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,r,n,i);function u(h,f,p,d,g,_,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=_,x.y1=y;return}for(var b=c[h],S=p/2+b,C=h+1,P=f-1;C<P;){var k=C+P>>>1;c[k]<S?C=k+1:P=k}S-c[C-1]<c[C]-S&&h+1<C&&--C;var O=c[C]-b,D=p-O;if(_-d>y-g){var B=(d*D+_*O)/p;u(h,C,O,d,g,B,y),u(C,f,D,B,g,_,y)}else{var I=(g*D+y*O)/p;u(h,C,O,d,g,_,I),u(C,f,D,d,I,_,y)}}}function w2t(e,t,r,n,i){(e.depth&1?Qm:qh)(e,t,r,n,i)}var S2t=function e(t){function r(n,i,o,a,s){if((l=n._squarify)&&l.ratio===t)for(var l,c,u,h,f=-1,p,d=l.length,g=n.value;++f<d;){for(c=l[f],u=c.children,h=c.value=0,p=u.length;h<p;++h)c.value+=u[h].value;c.dice?qh(c,i,o,a,o+=(s-o)*c.value/g):Qm(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=rX(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(eX);function M2t(e){for(var t=-1,r=e.length,n,i=e[r-1],o=0;++t<r;)n=i,i=e[t],o+=n[1]*i[0]-n[0]*i[1];return o/2}function E2t(e){for(var t=-1,r=e.length,n=0,i=0,o,a=e[r-1],s,l=0;++t<r;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],n+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[n/l,i/l]}function T2t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function mMe(e,t){return e[0]-t[0]||e[1]-t[1]}function C2t(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&T2t(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function A2t(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t<r;++t)n[t]=[+e[t][0],+e[t][1],t];for(n.sort(mMe),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=C2t(n),a=C2t(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[n[o[t]][2]]);for(t=+s;t<a.length-l;++t)c.push(e[n[a[t]][2]]);return c}function P2t(e,t){for(var r=e.length,n=e[r-1],i=t[0],o=t[1],a=n[0],s=n[1],l,c,u=!1,h=0;h<r;++h)n=e[h],l=n[0],c=n[1],c>o!=s>o&&i<(a-l)*(o-c)/(s-c)+l&&(u=!u),a=l,s=c;return u}function I2t(e){for(var t=-1,r=e.length,n=e[r-1],i,o,a=n[0],s=n[1],l=0;++t<r;)i=a,o=s,n=e[t],a=n[0],s=n[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ac(){return Math.random()}var L2t=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return t()*i+n}}return r.source=e,r}(ac);var a8=function e(t){function r(n,i){var o,a;return n=n==null?0:+n,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return n+i*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=e,r}(ac);var k2t=function e(t){function r(){var n=a8.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(ac);var s8=function e(t){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=t();return i}}return r.source=e,r}(ac);var R2t=function e(t){function r(n){var i=s8.source(t)(n);return function(){return i()/n}}return r.source=e,r}(ac);var N2t=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(ac);function hi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function sc(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}Tb();var D2t=Array.prototype,$_=D2t.map,lc=D2t.slice;var l8={name:"implicit"};function gu(){var e=Ji(),t=[],r=[],n=l8;function i(o){var a=o+"",s=e.get(a);if(!s){if(n!==l8)return n;e.set(a,s=t.push(o))}return r[(s-1)%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=Ji();for(var a=-1,s=o.length,l,c;++a<s;)e.has(c=(l=o[a])+"")||e.set(c,t.push(l));return i},i.range=function(o){return arguments.length?(r=lc.call(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return gu(t,r).unknown(n)},hi.apply(i,arguments),i}function tg(){var e=gu().unknown(void 0),t=e.domain,r=e.range,n=[0,1],i,o,a=!1,s=0,l=0,c=.5;delete e.unknown;function u(){var h=t().length,f=n[1]<n[0],p=n[f-0],d=n[1-f];i=(d-p)/Math.max(1,h-s+l*2),a&&(i=Math.floor(i)),p+=(d-p-i*(h-s))*c,o=i*(1-s),a&&(p=Math.round(p),o=Math.round(o));var g=Ir(h).map(function(_){return p+i*_});return r(f?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),u()):t()},e.range=function(h){return arguments.length?(n=[+h[0],+h[1]],u()):n.slice()},e.rangeRound=function(h){return n=[+h[0],+h[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(a=!!h,u()):a},e.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),u()):s},e.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),u()):s},e.paddingOuter=function(h){return arguments.length?(l=+h,u()):l},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),u()):c},e.copy=function(){return tg(t(),n).round(a).paddingInner(s).paddingOuter(l).align(c)},hi.apply(u(),arguments)}function O2t(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return O2t(t())},e}function eg(){return O2t(tg.apply(null,arguments).paddingInner(1))}function z2t(e){return function(){return e}}function m5(e){return+e}var F2t=[0,1];function ni(e){return e}function nX(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:z2t(isNaN(t)?NaN:.5)}function B2t(e){var t=e[0],r=e[e.length-1],n;return t>r&&(n=t,t=r,r=n),function(i){return Math.max(t,Math.min(r,i))}}function gMe(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=nX(i,n),o=r(a,o)):(n=nX(n,i),o=r(o,a)),function(s){return o(n(s))}}function _Me(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=nX(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=vs(e,s,1,n)-1;return o[l](i[l](s))}}function Gh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function K_(){var e=F2t,t=F2t,r=nc,n,i,o,a=ni,s,l,c;function u(){return s=Math.min(e.length,t.length)>2?_Me:gMe,l=c=null,h}function h(f){return isNaN(f=+f)?o:(l||(l=s(e.map(n),t,r)))(n(a(f)))}return h.invert=function(f){return a(i((c||(c=s(t,e.map(n),zi)))(f)))},h.domain=function(f){return arguments.length?(e=$_.call(f,m5),a===ni||(a=B2t(e)),u()):e.slice()},h.range=function(f){return arguments.length?(t=lc.call(f),u()):t.slice()},h.rangeRound=function(f){return t=lc.call(f),r=dL,u()},h.clamp=function(f){return arguments.length?(a=f?B2t(e):ni,h):a!==ni},h.interpolate=function(f){return arguments.length?(r=f,u()):r},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return n=f,i=p,u()}}function g5(e,t){return K_()(e,t)}function c8(e,t,r,n){var i=el(e,t,r),o;switch(n=kp(n==null?",f":n),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=ok(i,a))&&(n.precision=o),WE(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=ak(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=ik(i))&&(n.precision=o-(n.type==="%")*2);break}}return xn(n)}function ol(e){var t=e.domain;return e.ticks=function(r){var n=t();return ab(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var i=t();return c8(i[0],i[i.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=b_(a,s,r),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=b_(a,s,r)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=b_(a,s,r)),l>0?(n[i]=Math.floor(a/l)*l,n[o]=Math.ceil(s/l)*l,t(n)):l<0&&(n[i]=Math.ceil(a*l)/l,n[o]=Math.floor(s*l)/l,t(n)),e},e}function zn(){var e=g5(ni,ni);return e.copy=function(){return Gh(e,zn())},hi.apply(e,arguments),ol(e)}function u8(e){var t;function r(n){return isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=$_.call(n,m5),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return u8(e).unknown(t)},e=arguments.length?$_.call(e,m5):[0,1],ol(r)}function h8(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}function H2t(e){return Math.log(e)}function V2t(e){return Math.exp(e)}function yMe(e){return-Math.log(-e)}function vMe(e){return-Math.exp(-e)}function xMe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function bMe(e){return e===10?xMe:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function wMe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function U2t(e){return function(t){return-e(-t)}}function _5(e){var t=e(H2t,V2t),r=t.domain,n=10,i,o;function a(){return i=wMe(n),o=bMe(n),r()[0]<0?(i=U2t(i),o=U2t(o),e(yMe,vMe)):e(H2t,V2t),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=function(s){var l=r(),c=l[0],u=l[l.length-1],h;(h=u<c)&&(f=c,c=u,u=f);var f=i(c),p=i(u),d,g,_,y=s==null?10:+s,x=[];if(!(n%1)&&p-f<y){if(f=Math.round(f)-1,p=Math.round(p)+1,c>0){for(;f<p;++f)for(g=1,d=o(f);g<n;++g)if(_=d*g,!(_<c)){if(_>u)break;x.push(_)}}else for(;f<p;++f)for(g=n-1,d=o(f);g>=1;--g)if(_=d*g,!(_<c)){if(_>u)break;x.push(_)}}else x=ab(f,p,Math.min(p-f,y)).map(o);return h?x.reverse():x},t.tickFormat=function(s,l){if(l==null&&(l=n===10?".0e":","),typeof l!="function"&&(l=xn(l)),s===1/0)return l;s==null&&(s=10);var c=Math.max(1,n*s/t.ticks().length);return function(u){var h=u/o(Math.round(i(u)));return h*n<n-.5&&(h*=n),h<=c?l(u):""}},t.nice=function(){return r(h8(r(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function cc(){var e=_5(K_()).domain([1,10]);return e.copy=function(){return Gh(e,cc()).base(e.base())},hi.apply(e,arguments),e}function q2t(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G2t(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function y5(e){var t=1,r=e(q2t(t),G2t(t));return r.constant=function(n){return arguments.length?e(q2t(t=+n),G2t(t)):t},ol(r)}function f8(){var e=y5(K_());return e.copy=function(){return Gh(e,f8()).constant(e.constant())},hi.apply(e,arguments)}function W2t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function SMe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function MMe(e){return e<0?-e*e:e*e}function v5(e){var t=e(ni,ni),r=1;function n(){return r===1?e(ni,ni):r===.5?e(SMe,MMe):e(W2t(r),W2t(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ol(t)}function Z_(){var e=v5(K_());return e.copy=function(){return Gh(e,Z_()).exponent(e.exponent())},hi.apply(e,arguments),e}function Y2t(){return Z_.apply(null,arguments).exponent(.5)}function rg(){var e=[],t=[],r=[],n;function i(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=la(e,a/s);return o}function o(a){return isNaN(a=+a)?n:t[vs(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,c;s<l;++s)c=a[s],c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(aa),i()},o.range=function(a){return arguments.length?(t=lc.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return rg().domain(e).range(t).unknown(n)},hi.apply(o,arguments)}function qb(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function a(l){return l<=l?i[vs(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(r=(i=lc.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return qb().domain([e,t]).range(i).unknown(o)},hi.apply(ol(a),arguments)}function p8(){var e=[.5],t=[0,1],r,n=1;function i(o){return o<=o?t[vs(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=lc.call(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=lc.call(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return p8().domain(e).range(t).unknown(r)},hi.apply(i,arguments)}var iX=new Date,oX=new Date;function br(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return br(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return iX.setTime(+o),oX.setTime(+a),e(iX),e(oX),Math.floor(r(iX,oX))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var d8=br(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});d8.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?br(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):d8};var J_=d8,aX=d8.range;var Q_=1e3,uc=6e4,Gb=36e5,m8=864e5,g8=6048e5;var j2t=br(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Q_)},function(e,t){return(t-e)/Q_},function(e){return e.getUTCSeconds()}),ty=j2t,sX=j2t.range;var X2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Q_)},function(e,t){e.setTime(+e+t*uc)},function(e,t){return(t-e)/uc},function(e){return e.getMinutes()}),_8=X2t,$2t=X2t.range;var K2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Q_-e.getMinutes()*uc)},function(e,t){e.setTime(+e+t*Gb)},function(e,t){return(t-e)/Gb},function(e){return e.getHours()}),y8=K2t,Z2t=K2t.range;var J2t=br(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uc)/m8},function(e){return e.getDate()-1}),ey=J2t,Q2t=J2t.range;function ry(e){return br(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*uc)/g8})}var ng=ry(0),ny=ry(1),lX=ry(2),cX=ry(3),Fp=ry(4),uX=ry(5),hX=ry(6),fX=ng.range,twt=ny.range,ewt=lX.range,rwt=cX.range,nwt=Fp.range,iwt=uX.range,owt=hX.range;var awt=br(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),v8=awt,swt=awt.range;var pX=br(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});pX.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:br(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};var Wh=pX,lwt=pX.range;var cwt=br(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*uc)},function(e,t){return(t-e)/uc},function(e){return e.getUTCMinutes()}),x8=cwt,uwt=cwt.range;var hwt=br(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Gb)},function(e,t){return(t-e)/Gb},function(e){return e.getUTCHours()}),b8=hwt,fwt=hwt.range;var pwt=br(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/m8},function(e){return e.getUTCDate()-1}),iy=pwt,dwt=pwt.range;function oy(e){return br(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/g8})}var ig=oy(0),ay=oy(1),dX=oy(2),mX=oy(3),Bp=oy(4),gX=oy(5),_X=oy(6),yX=ig.range,mwt=ay.range,gwt=dX.range,_wt=mX.range,ywt=Bp.range,vwt=gX.range,xwt=_X.range;var bwt=br(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),w8=bwt,wwt=bwt.range;var vX=br(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});vX.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:br(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};var Yh=vX,Swt=vX.range;function xX(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bX(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function x5(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function S5(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=b5(i),u=w5(i),h=b5(o),f=w5(o),p=b5(a),d=w5(a),g=b5(s),_=w5(s),y=b5(l),x=w5(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:Pwt,e:Pwt,f:jMe,g:nEe,G:oEe,H:GMe,I:WMe,j:YMe,L:Nwt,m:XMe,M:$Me,p:st,q:St,Q:kwt,s:Rwt,S:KMe,u:ZMe,U:JMe,V:QMe,w:tEe,W:eEe,x:null,X:null,y:rEe,Y:iEe,Z:aEe,"%":Lwt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:Iwt,e:Iwt,f:uEe,g:xEe,G:wEe,H:sEe,I:lEe,j:cEe,L:Owt,m:hEe,M:fEe,p:_t,q:ct,Q:kwt,s:Rwt,S:pEe,u:dEe,U:mEe,V:gEe,w:_Ee,W:yEe,x:null,X:null,y:vEe,Y:bEe,Z:SEe,"%":Lwt},C={a:B,A:I,b:L,B:R,c:F,d:Cwt,e:Cwt,f:HMe,g:Twt,G:Ewt,H:Awt,I:Awt,j:OMe,L:BMe,m:DMe,M:zMe,p:D,q:NMe,Q:UMe,s:qMe,S:FMe,u:PMe,U:IMe,V:LMe,w:AMe,W:kMe,x:z,X:U,y:Twt,Y:Ewt,Z:RMe,"%":VMe};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(X,et){return function(dt){var q=[],pt=-1,ht=0,wt=X.length,kt,ie,ee;for(dt instanceof Date||(dt=new Date(+dt));++pt<wt;)X.charCodeAt(pt)===37&&(q.push(X.slice(ht,pt)),(ie=Mwt[kt=X.charAt(++pt)])!=null?kt=X.charAt(++pt):ie=kt==="e"?" ":"0",(ee=et[kt])&&(kt=ee(dt,ie)),q.push(kt),ht=pt+1);return q.push(X.slice(ht,pt)),q.join("")}}function k(X,et){return function(dt){var q=x5(1900,void 0,1),pt=O(q,X,dt+="",0),ht,wt;if(pt!=dt.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(et&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(ht=bX(x5(q.y,0,1)),wt=ht.getUTCDay(),ht=wt>4||wt===0?ay.ceil(ht):ay(ht),ht=iy.offset(ht,(q.V-1)*7),q.y=ht.getUTCFullYear(),q.m=ht.getUTCMonth(),q.d=ht.getUTCDate()+(q.w+6)%7):(ht=xX(x5(q.y,0,1)),wt=ht.getDay(),ht=wt>4||wt===0?ny.ceil(ht):ny(ht),ht=ey.offset(ht,(q.V-1)*7),q.y=ht.getFullYear(),q.m=ht.getMonth(),q.d=ht.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),wt="Z"in q?bX(x5(q.y,0,1)).getUTCDay():xX(x5(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(wt+5)%7:q.w+q.U*7-(wt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,bX(q)):xX(q)}}function O(X,et,dt,q){for(var pt=0,ht=et.length,wt=dt.length,kt,ie;pt<ht;){if(q>=wt)return-1;if(kt=et.charCodeAt(pt++),kt===37){if(kt=et.charAt(pt++),ie=C[kt in Mwt?et.charAt(pt++):kt],!ie||(q=ie(X,dt,q))<0)return-1}else if(kt!=dt.charCodeAt(q++))return-1}return q}function D(X,et,dt){var q=c.exec(et.slice(dt));return q?(X.p=u[q[0].toLowerCase()],dt+q[0].length):-1}function B(X,et,dt){var q=p.exec(et.slice(dt));return q?(X.w=d[q[0].toLowerCase()],dt+q[0].length):-1}function I(X,et,dt){var q=h.exec(et.slice(dt));return q?(X.w=f[q[0].toLowerCase()],dt+q[0].length):-1}function L(X,et,dt){var q=y.exec(et.slice(dt));return q?(X.m=x[q[0].toLowerCase()],dt+q[0].length):-1}function R(X,et,dt){var q=g.exec(et.slice(dt));return q?(X.m=_[q[0].toLowerCase()],dt+q[0].length):-1}function F(X,et,dt){return O(X,t,et,dt)}function z(X,et,dt){return O(X,r,et,dt)}function U(X,et,dt){return O(X,n,et,dt)}function W(X){return a[X.getDay()]}function Z(X){return o[X.getDay()]}function rt(X){return l[X.getMonth()]}function ot(X){return s[X.getMonth()]}function st(X){return i[+(X.getHours()>=12)]}function St(X){return 1+~~(X.getMonth()/3)}function bt(X){return a[X.getUTCDay()]}function Mt(X){return o[X.getUTCDay()]}function lt(X){return l[X.getUTCMonth()]}function Kt(X){return s[X.getUTCMonth()]}function _t(X){return i[+(X.getUTCHours()>=12)]}function ct(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var et=P(X+="",b);return et.toString=function(){return X},et},parse:function(X){var et=k(X+="",!1);return et.toString=function(){return X},et},utcFormat:function(X){var et=P(X+="",S);return et.toString=function(){return X},et},utcParse:function(X){var et=k(X+="",!0);return et.toString=function(){return X},et}}}var Mwt={"-":"",_:" ",0:"0"},xo=/^\s*\d+/,EMe=/^%/,TMe=/[\\^$*+?|[\]().{}]/g;function Br(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function CMe(e){return e.replace(TMe,"\\$&")}function b5(e){return new RegExp("^(?:"+e.map(CMe).join("|")+")","i")}function w5(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function AMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function IMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Ewt(e,t,r){var n=xo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Twt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function RMe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function NMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function DMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Cwt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function OMe(e,t,r){var n=xo.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Awt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function zMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function FMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function BMe(e,t,r){var n=xo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function HMe(e,t,r){var n=xo.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function VMe(e,t,r){var n=EMe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function UMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function qMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Pwt(e,t){return Br(e.getDate(),t,2)}function GMe(e,t){return Br(e.getHours(),t,2)}function WMe(e,t){return Br(e.getHours()%12||12,t,2)}function YMe(e,t){return Br(1+ey.count(Wh(e),e),t,3)}function Nwt(e,t){return Br(e.getMilliseconds(),t,3)}function jMe(e,t){return Nwt(e,t)+"000"}function XMe(e,t){return Br(e.getMonth()+1,t,2)}function $Me(e,t){return Br(e.getMinutes(),t,2)}function KMe(e,t){return Br(e.getSeconds(),t,2)}function ZMe(e){var t=e.getDay();return t===0?7:t}function JMe(e,t){return Br(ng.count(Wh(e)-1,e),t,2)}function Dwt(e){var t=e.getDay();return t>=4||t===0?Fp(e):Fp.ceil(e)}function QMe(e,t){return e=Dwt(e),Br(Fp.count(Wh(e),e)+(Wh(e).getDay()===4),t,2)}function tEe(e){return e.getDay()}function eEe(e,t){return Br(ny.count(Wh(e)-1,e),t,2)}function rEe(e,t){return Br(e.getFullYear()%100,t,2)}function nEe(e,t){return e=Dwt(e),Br(e.getFullYear()%100,t,2)}function iEe(e,t){return Br(e.getFullYear()%1e4,t,4)}function oEe(e,t){var r=e.getDay();return e=r>=4||r===0?Fp(e):Fp.ceil(e),Br(e.getFullYear()%1e4,t,4)}function aEe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Br(t/60|0,"0",2)+Br(t%60,"0",2)}function Iwt(e,t){return Br(e.getUTCDate(),t,2)}function sEe(e,t){return Br(e.getUTCHours(),t,2)}function lEe(e,t){return Br(e.getUTCHours()%12||12,t,2)}function cEe(e,t){return Br(1+iy.count(Yh(e),e),t,3)}function Owt(e,t){return Br(e.getUTCMilliseconds(),t,3)}function uEe(e,t){return Owt(e,t)+"000"}function hEe(e,t){return Br(e.getUTCMonth()+1,t,2)}function fEe(e,t){return Br(e.getUTCMinutes(),t,2)}function pEe(e,t){return Br(e.getUTCSeconds(),t,2)}function dEe(e){var t=e.getUTCDay();return t===0?7:t}function mEe(e,t){return Br(ig.count(Yh(e)-1,e),t,2)}function zwt(e){var t=e.getUTCDay();return t>=4||t===0?Bp(e):Bp.ceil(e)}function gEe(e,t){return e=zwt(e),Br(Bp.count(Yh(e),e)+(Yh(e).getUTCDay()===4),t,2)}function _Ee(e){return e.getUTCDay()}function yEe(e,t){return Br(ay.count(Yh(e)-1,e),t,2)}function vEe(e,t){return Br(e.getUTCFullYear()%100,t,2)}function xEe(e,t){return e=zwt(e),Br(e.getUTCFullYear()%100,t,2)}function bEe(e,t){return Br(e.getUTCFullYear()%1e4,t,4)}function wEe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Bp(e):Bp.ceil(e),Br(e.getUTCFullYear()%1e4,t,4)}function SEe(){return"+0000"}function Lwt(){return"%"}function kwt(e){return+e}function Rwt(e){return Math.floor(+e/1e3)}var Wb,M5,wX,sy,E5;S8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function S8(e){return Wb=S5(e),M5=Wb.format,wX=Wb.parse,sy=Wb.utcFormat,E5=Wb.utcParse,Wb}var SX="%Y-%m-%dT%H:%M:%S.%LZ";function MEe(e){return e.toISOString()}var EEe=Date.prototype.toISOString?MEe:sy(SX),Fwt=EEe;function TEe(e){var t=new Date(e);return isNaN(t)?null:t}var CEe=+new Date("2000-01-01T00:00:00.000Z")?TEe:E5(SX),Bwt=CEe;var T5=1e3,C5=T5*60,A5=C5*60,P5=A5*24,AEe=P5*7,Hwt=P5*30,MX=P5*365;function PEe(e){return new Date(e)}function IEe(e){return e instanceof Date?+e:+new Date(+e)}function M8(e,t,r,n,i,o,a,s,l){var c=g5(ni,ni),u=c.invert,h=c.domain,f=l(".%L"),p=l(":%S"),d=l("%I:%M"),g=l("%I %p"),_=l("%a %d"),y=l("%b %d"),x=l("%B"),b=l("%Y"),S=[[a,1,T5],[a,5,5*T5],[a,15,15*T5],[a,30,30*T5],[o,1,C5],[o,5,5*C5],[o,15,15*C5],[o,30,30*C5],[i,1,A5],[i,3,3*A5],[i,6,6*A5],[i,12,12*A5],[n,1,P5],[n,2,2*P5],[r,1,AEe],[t,1,Hwt],[t,3,3*Hwt],[e,1,MX]];function C(k){return(a(k)<k?f:o(k)<k?p:i(k)<k?d:n(k)<k?g:t(k)<k?r(k)<k?_:y:e(k)<k?x:b)(k)}function P(k,O,D,B){if(k==null&&(k=10),typeof k=="number"){var I=Math.abs(D-O)/k,L=ob(function(R){return R[2]}).right(S,I);L===S.length?(B=el(O/MX,D/MX,k),k=e):L?(L=S[I/S[L-1][2]<S[L][2]/I?L-1:L],B=L[1],k=L[0]):(B=Math.max(el(O,D,k),1),k=s)}return B==null?k:k.every(B)}return c.invert=function(k){return new Date(u(k))},c.domain=function(k){return arguments.length?h($_.call(k,IEe)):h().map(PEe)},c.ticks=function(k,O){var D=h(),B=D[0],I=D[D.length-1],L=I<B,R;return L&&(R=B,B=I,I=R),R=P(k,B,I,O),R=R?R.range(B,I+1):[],L?R.reverse():R},c.tickFormat=function(k,O){return O==null?C:l(O)},c.nice=function(k,O){var D=h();return(k=P(k,D[0],D[D.length-1],O))?h(h8(D,k)):c},c.copy=function(){return Gh(c,M8(e,t,r,n,i,o,a,s,l))},c}function Yb(){return hi.apply(M8(Wh,v8,ng,ey,y8,_8,ty,J_,M5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vwt(){return hi.apply(M8(Yh,w8,ig,iy,b8,x8,ty,J_,sy).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function E8(){var e=0,t=1,r,n,i,o,a=ni,s=!1,l;function c(u){return isNaN(u=+u)?l:a(i===0?.5:(u=(o(u)-r)*i,s?Math.max(0,Math.min(1,u)):u))}return c.domain=function(u){return arguments.length?(r=o(e=+u[0]),n=o(t=+u[1]),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(u){return arguments.length?(s=!!u,c):s},c.interpolator=function(u){return arguments.length?(a=u,c):a},c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,r=u(e),n=u(t),i=r===n?0:1/(n-r),c}}function Hp(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function T8(){var e=ol(E8()(ni));return e.copy=function(){return Hp(e,T8())},sc.apply(e,arguments)}function EX(){var e=_5(E8()).domain([1,10]);return e.copy=function(){return Hp(e,EX()).base(e.base())},sc.apply(e,arguments)}function TX(){var e=y5(E8());return e.copy=function(){return Hp(e,TX()).constant(e.constant())},sc.apply(e,arguments)}function C8(){var e=v5(E8());return e.copy=function(){return Hp(e,C8()).exponent(e.exponent())},sc.apply(e,arguments)}function Uwt(){return C8.apply(null,arguments).exponent(.5)}function A8(){var e=[],t=ni;function r(n){if(!isNaN(n=+n))return t((vs(e,n)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var i=0,o=n.length,a;i<o;++i)a=n[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(aa),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return A8(t).domain(e)},sc.apply(r,arguments)}function P8(){var e=0,t=.5,r=1,n,i,o,a,s,l=ni,c,u=!1,h;function f(p){return isNaN(p=+p)?h:(p=.5+((p=+c(p))-i)*(p<i?a:s),l(u?Math.max(0,Math.min(1,p)):p))}return f.domain=function(p){return arguments.length?(n=c(e=+p[0]),i=c(t=+p[1]),o=c(r=+p[2]),a=n===i?0:.5/(i-n),s=i===o?0:.5/(o-i),f):[e,t,r]},f.clamp=function(p){return arguments.length?(u=!!p,f):u},f.interpolator=function(p){return arguments.length?(l=p,f):l},f.unknown=function(p){return arguments.length?(h=p,f):h},function(p){return c=p,n=p(e),i=p(t),o=p(r),a=n===i?0:.5/(i-n),s=i===o?0:.5/(o-i),f}}function I8(){var e=ol(P8()(ni));return e.copy=function(){return Hp(e,I8())},sc.apply(e,arguments)}function CX(){var e=_5(P8()).domain([.1,1,10]);return e.copy=function(){return Hp(e,CX()).base(e.base())},sc.apply(e,arguments)}function AX(){var e=y5(P8());return e.copy=function(){return Hp(e,AX()).constant(e.constant())},sc.apply(e,arguments)}function L8(){var e=v5(P8());return e.copy=function(){return Hp(e,L8()).exponent(e.exponent())},sc.apply(e,arguments)}function qwt(){return L8.apply(null,arguments).exponent(.5)}function te(e){for(var t=e.length/6|0,r=new Array(t),n=0;n<t;)r[n]="#"+e.slice(n*6,++n*6);return r}var jb=te("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Gwt=te("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var Wwt=te("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var Ywt=te("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var jwt=te("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var Xwt=te("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var $wt=te("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var Kwt=te("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var Zwt=te("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var Jwt=te("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Ie(e){return uL(e[e.length-1])}var PX=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(te),Qwt=Ie(PX);var IX=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(te),tSt=Ie(IX);var LX=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(te),eSt=Ie(LX);var kX=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(te),rSt=Ie(kX);var RX=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(te),nSt=Ie(RX);var NX=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(te),iSt=Ie(NX);var DX=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(te),oSt=Ie(DX);var OX=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(te),aSt=Ie(OX);var zX=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(te),sSt=Ie(zX);var FX=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(te),lSt=Ie(FX);var BX=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(te),cSt=Ie(BX);var HX=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(te),uSt=Ie(HX);var VX=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(te),hSt=Ie(VX);var UX=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(te),fSt=Ie(UX);var qX=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(te),pSt=Ie(qX);var GX=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(te),dSt=Ie(GX);var WX=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(te),mSt=Ie(WX);var YX=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(te),gSt=Ie(YX);var jX=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(te),_St=Ie(jX);var XX=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(te),ySt=Ie(XX);var $X=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(te),vSt=Ie($X);var KX=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(te),xSt=Ie(KX);var ZX=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(te),bSt=Ie(ZX);var JX=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(te),wSt=Ie(JX);var QX=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(te),SSt=Ie(QX);var t$=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(te),MSt=Ie(t$);var e$=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(te),ESt=Ie(e$);function TSt(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}var CSt=T_(ca(300,.5,0),ca(-240,.5,1));var ASt=T_(ca(-100,.75,.35),ca(80,1.5,.8)),PSt=T_(ca(260,.75,.35),ca(80,1.5,.8)),k8=ca();function ISt(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return k8.h=360*e-100,k8.s=1.5-1.5*t,k8.l=.8-.9*t,k8+""}var R8=cu(),LEe=Math.PI/3,kEe=Math.PI*2/3;function LSt(e){var t;return e=(.5-e)*Math.PI,R8.r=255*(t=Math.sin(e))*t,R8.g=255*(t=Math.sin(e+LEe))*t,R8.b=255*(t=Math.sin(e+kEe))*t,R8+""}function kSt(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function N8(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var RSt=N8(te("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),NSt=N8(te("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DSt=N8(te("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),OSt=N8(te("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function qe(e){return function(){return e}}var r$=Math.abs,Bo=Math.atan2,og=Math.cos,zSt=Math.max,D8=Math.min,_u=Math.sin,ly=Math.sqrt,bo=1e-12,yu=Math.PI,I5=yu/2,hc=2*yu;function FSt(e){return e>1?0:e<-1?yu:Math.acos(e)}function n$(e){return e>=1?I5:e<=-1?-I5:Math.asin(e)}function REe(e){return e.innerRadius}function NEe(e){return e.outerRadius}function DEe(e){return e.startAngle}function OEe(e){return e.endAngle}function zEe(e){return e&&e.padAngle}function FEe(e,t,r,n,i,o,a,s){var l=r-e,c=n-t,u=a-i,h=s-o,f=h*l-u*c;if(!(f*f<bo))return f=(u*(t-o)-h*(e-i))/f,[e+f*l,t+f*c]}function O8(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/ly(s*s+l*l),u=c*l,h=-c*s,f=e+u,p=t+h,d=r+u,g=n+h,_=(f+d)/2,y=(p+g)/2,x=d-f,b=g-p,S=x*x+b*b,C=i-o,P=f*g-d*p,k=(b<0?-1:1)*ly(zSt(0,C*C*S-P*P)),O=(P*b-x*k)/S,D=(-P*x-b*k)/S,B=(P*b+x*k)/S,I=(-P*x+b*k)/S,L=O-_,R=D-y,F=B-_,z=I-y;return L*L+R*R>F*F+z*z&&(O=B,D=I),{cx:O,cy:D,x01:-u,y01:-h,x11:O*(i/C-1),y11:D*(i/C-1)}}function BSt(){var e=REe,t=NEe,r=qe(0),n=null,i=DEe,o=OEe,a=zEe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-I5,d=o.apply(this,arguments)-I5,g=r$(d-p),_=d>p;if(s||(s=c=ws()),f<h&&(u=f,f=h,h=u),!(f>bo))s.moveTo(0,0);else if(g>hc-bo)s.moveTo(f*og(p),f*_u(p)),s.arc(0,0,f,p,d,!_),h>bo&&(s.moveTo(h*og(d),h*_u(d)),s.arc(0,0,h,d,p,_));else{var y=p,x=d,b=p,S=d,C=g,P=g,k=a.apply(this,arguments)/2,O=k>bo&&(n?+n.apply(this,arguments):ly(h*h+f*f)),D=D8(r$(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>bo){var F=n$(O/h*_u(k)),z=n$(O/f*_u(k));(C-=F*2)>bo?(F*=_?1:-1,b+=F,S-=F):(C=0,b=S=(p+d)/2),(P-=z*2)>bo?(z*=_?1:-1,y+=z,x-=z):(P=0,y=x=(p+d)/2)}var U=f*og(y),W=f*_u(y),Z=h*og(S),rt=h*_u(S);if(D>bo){var ot=f*og(x),st=f*_u(x),St=h*og(b),bt=h*_u(b),Mt;if(g<yu&&(Mt=FEe(U,W,St,bt,ot,st,Z,rt))){var lt=U-Mt[0],Kt=W-Mt[1],_t=ot-Mt[0],ct=st-Mt[1],X=1/_u(FSt((lt*_t+Kt*ct)/(ly(lt*lt+Kt*Kt)*ly(_t*_t+ct*ct)))/2),et=ly(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=D8(D,(h-et)/(X-1)),I=D8(D,(f-et)/(X+1))}}P>bo?I>bo?(L=O8(St,bt,U,W,f,I,_),R=O8(ot,st,Z,rt,f,I,_),s.moveTo(L.cx+L.x01,L.cy+L.y01),I<D?s.arc(L.cx,L.cy,I,Bo(L.y01,L.x01),Bo(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,I,Bo(L.y01,L.x01),Bo(L.y11,L.x11),!_),s.arc(0,0,f,Bo(L.cy+L.y11,L.cx+L.x11),Bo(R.cy+R.y11,R.cx+R.x11),!_),s.arc(R.cx,R.cy,I,Bo(R.y11,R.x11),Bo(R.y01,R.x01),!_))):(s.moveTo(U,W),s.arc(0,0,f,y,x,!_)):s.moveTo(U,W),!(h>bo)||!(C>bo)?s.lineTo(Z,rt):B>bo?(L=O8(Z,rt,ot,st,h,-B,_),R=O8(U,W,St,bt,h,-B,_),s.lineTo(L.cx+L.x01,L.cy+L.y01),B<D?s.arc(L.cx,L.cy,B,Bo(L.y01,L.x01),Bo(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,B,Bo(L.y01,L.x01),Bo(L.y11,L.x11),!_),s.arc(0,0,h,Bo(L.cy+L.y11,L.cx+L.x11),Bo(R.cy+R.y11,R.cx+R.x11),_),s.arc(R.cx,R.cy,B,Bo(R.y11,R.x11),Bo(R.y01,R.x01),!_))):s.arc(0,0,h,S,b,_)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-yu/2;return[og(u)*c,_u(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:qe(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:qe(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:qe(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:qe(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:qe(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:qe(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:qe(+c),l):a},l.context=function(c){return arguments.length?(s=c==null?null:c,l):s},l}function HSt(e){this._context=e}HSt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function jh(e){return new HSt(e)}function Xb(e){return e[0]}function $b(e){return e[1]}function vu(){var e=Xb,t=$b,r=qe(!0),n=null,i=jh,o=null;function a(s){var l,c=s.length,u,h=!1,f;for(n==null&&(o=i(f=ws())),l=0;l<=c;++l)!(l<c&&r(u=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(u,l,s),+t(u,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:qe(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:qe(+s),a):t},a.defined=function(s){return arguments.length?(r=typeof s=="function"?s:qe(!!s),a):r},a.curve=function(s){return arguments.length?(i=s,n!=null&&(o=i(n)),a):i},a.context=function(s){return arguments.length?(s==null?n=o=null:o=i(n=s),a):n},a}function z8(){var e=Xb,t=null,r=qe(0),n=$b,i=qe(!0),o=null,a=jh,s=null;function l(u){var h,f,p,d=u.length,g,_=!1,y,x=new Array(d),b=new Array(d);for(o==null&&(s=a(y=ws())),h=0;h<=d;++h){if(!(h<d&&i(g=u[h],h,u))===_)if(_=!_)f=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=h-1;p>=f;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}_&&(x[h]=+e(g,h,u),b[h]=+r(g,h,u),s.point(t?+t(g,h,u):x[h],n?+n(g,h,u):b[h]))}if(y)return s=null,y+""||null}function c(){return vu().defined(i).curve(a).context(o)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:qe(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:qe(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:qe(+u),l):t},l.y=function(u){return arguments.length?(r=typeof u=="function"?u:qe(+u),n=null,l):r},l.y0=function(u){return arguments.length?(r=typeof u=="function"?u:qe(+u),l):r},l.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:qe(+u),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(r)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(t).y(r)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:qe(!!u),l):i},l.curve=function(u){return arguments.length?(a=u,o!=null&&(s=a(o)),l):a},l.context=function(u){return arguments.length?(u==null?o=s=null:s=a(o=u),l):o},l}function VSt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function USt(e){return e}function qSt(){var e=USt,t=VSt,r=null,n=qe(0),i=qe(hc),o=qe(0);function a(s){var l,c=s.length,u,h,f=0,p=new Array(c),d=new Array(c),g=+n.apply(this,arguments),_=Math.min(hc,Math.max(-hc,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(_)/c,o.apply(this,arguments)),b=x*(_<0?-1:1),S;for(l=0;l<c;++l)(S=d[p[l]=l]=+e(s[l],l,s))>0&&(f+=S);for(t!=null?p.sort(function(C,P){return t(d[C],d[P])}):r!=null&&p.sort(function(C,P){return r(s[C],s[P])}),l=0,h=f?(_-c*b)/f:0;l<c;++l,g=y)u=p[l],S=d[u],y=g+(S>0?S*h:0)+b,d[u]={data:s[u],index:l,value:S,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:qe(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:qe(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:qe(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:qe(+s),a):o},a}var F8=Kb(jh);function GSt(e){this._curve=e}GSt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Kb(e){function t(r){return new GSt(e(r))}return t._curve=e,t}function Zb(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Kb(r)):t()._curve},e}function i$(){return Zb(vu().curve(F8))}function o$(){var e=z8().curve(F8),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Zb(r())},delete e.lineX0,e.lineEndAngle=function(){return Zb(n())},delete e.lineX1,e.lineInnerRadius=function(){return Zb(i())},delete e.lineY0,e.lineOuterRadius=function(){return Zb(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Kb(a)):t()._curve},e}function cy(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var L5=Array.prototype.slice;function BEe(e){return e.source}function HEe(e){return e.target}function a$(e){var t=BEe,r=HEe,n=Xb,i=$b,o=null;function a(){var s,l=L5.call(arguments),c=t.apply(this,l),u=r.apply(this,l);if(o||(o=s=ws()),e(o,+n.apply(this,(l[0]=c,l)),+i.apply(this,l),+n.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(r=s,a):r},a.x=function(s){return arguments.length?(n=typeof s=="function"?s:qe(+s),a):n},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:qe(+s),a):i},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}function VEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function UEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function qEe(e,t,r,n,i){var o=cy(t,r),a=cy(t,r=(r+i)/2),s=cy(n,r),l=cy(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function WSt(){return a$(VEe)}function YSt(){return a$(UEe)}function jSt(){var e=a$(qEe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var k5={draw:function(e,t){var r=Math.sqrt(t/yu);e.moveTo(r,0),e.arc(0,0,r,0,hc)}};var B8={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var XSt=Math.sqrt(.3333333333333333),GEe=XSt*2,H8={draw:function(e,t){var r=Math.sqrt(t/GEe),n=r*XSt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var WEe=.8908130915292852,$St=Math.sin(yu/10)/Math.sin(7*yu/10),YEe=Math.sin(hc/10)*$St,jEe=-Math.cos(hc/10)*$St,V8={draw:function(e,t){var r=Math.sqrt(t*WEe),n=YEe*r,i=jEe*r;e.moveTo(0,-r),e.lineTo(n,i);for(var o=1;o<5;++o){var a=hc*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}};var U8={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}};var s$=Math.sqrt(3),q8={draw:function(e,t){var r=-Math.sqrt(t/(s$*3));e.moveTo(0,r*2),e.lineTo(-s$*r,-r),e.lineTo(s$*r,-r),e.closePath()}};var fc=-.5,pc=Math.sqrt(3)/2,l$=1/Math.sqrt(12),XEe=(l$/2+1)*3,G8={draw:function(e,t){var r=Math.sqrt(t/XEe),n=r/2,i=r*l$,o=n,a=r*l$+r,s=-o,l=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(fc*n-pc*i,pc*n+fc*i),e.lineTo(fc*o-pc*a,pc*o+fc*a),e.lineTo(fc*s-pc*l,pc*s+fc*l),e.lineTo(fc*n+pc*i,fc*i-pc*n),e.lineTo(fc*o+pc*a,fc*a-pc*o),e.lineTo(fc*s+pc*l,fc*l-pc*s),e.closePath()}};var KSt=[k5,B8,H8,U8,V8,q8,G8];function ZSt(){var e=qe(k5),t=qe(64),r=null;function n(){var i;if(r||(r=i=ws()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(e=typeof i=="function"?i:qe(i),n):e},n.size=function(i){return arguments.length?(t=typeof i=="function"?i:qe(+i),n):t},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}function dc(){}function Jb(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function R5(e){this._context=e}R5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Jb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function W8(e){return new R5(e)}function JSt(e){this._context=e}JSt.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QSt(e){return new JSt(e)}function t3t(e){this._context=e}t3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e3t(e){return new t3t(e)}function r3t(e,t){this._basis=new R5(e),this._beta=t}r3t.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,a=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var n3t=function e(t){function r(n){return t===1?new R5(n):new r3t(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function Qb(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Y8(e,t){this._context=e,this._k=(1-t)/6}Y8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Qb(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var i3t=function e(t){function r(n){return new Y8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function j8(e,t){this._context=e,this._k=(1-t)/6}j8.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var o3t=function e(t){function r(n){return new j8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function X8(e,t){this._context=e,this._k=(1-t)/6}X8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var a3t=function e(t){function r(n){return new X8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function N5(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bo){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bo){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function s3t(e,t){this._context=e,this._alpha=t}s3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var l3t=function e(t){function r(n){return t?new s3t(n,t):new Y8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function c3t(e,t){this._context=e,this._alpha=t}c3t.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var u3t=function e(t){function r(n){return t?new c3t(n,t):new j8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function h3t(e,t){this._context=e,this._alpha=t}h3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var f3t=function e(t){function r(n){return t?new h3t(n,t):new X8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function p3t(e){this._context=e}p3t.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function d3t(e){return new p3t(e)}function m3t(e){return e<0?-1:1}function g3t(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(m3t(o)+m3t(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function _3t(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function c$(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function $8(e){this._context=e}$8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:c$(this,this._t0,_3t(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,c$(this,_3t(this,r=g3t(this,e,t)),r);break;default:c$(this,this._t0,r=g3t(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function y3t(e){this._context=new v3t(e)}(y3t.prototype=Object.create($8.prototype)).point=function(e,t){$8.prototype.point.call(this,t,e)};function v3t(e){this._context=e}v3t.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function x3t(e){return new $8(e)}function b3t(e){return new y3t(e)}function S3t(e){this._context=e}S3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=w3t(e),i=w3t(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function w3t(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function M3t(e){return new S3t(e)}function K8(e,t){this._context=e,this._t=t}K8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function E3t(e){return new K8(e,.5)}function T3t(e){return new K8(e,0)}function C3t(e){return new K8(e,1)}function xu(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,s=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function bu(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function $Ee(e,t){return e[t]}function A3t(){var e=qe([]),t=bu,r=xu,n=$Ee;function i(o){var a=e.apply(this,arguments),s,l=o.length,c=a.length,u=new Array(c),h;for(s=0;s<c;++s){for(var f=a[s],p=u[s]=new Array(l),d=0,g;d<l;++d)p[d]=g=[0,+n(o[d],f,d,o)],g.data=o[d];p.key=f}for(s=0,h=t(u);s<c;++s)u[h[s]].index=s;return r(u,h),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:qe(L5.call(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:qe(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?bu:typeof o=="function"?o:qe(L5.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?xu:o,i):r},i}function P3t(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}xu(e,t)}}function I3t(e,t){if((l=e.length)>0)for(var r,n=0,i,o,a,s,l,c=e[t[0]].length;n<c;++n)for(a=s=0,r=0;r<l;++r)(o=(i=e[t[r]][n])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function L3t(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,s=0;a<i;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}xu(e,t)}}function k3t(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],h=u[n][1]||0,f=u[n-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=e[t[d]],_=g[n][1]||0,y=g[n-1][1]||0;p+=_-y}l+=h,c+=p*h}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,xu(e,t)}}function Z8(e){var t=e.map(KEe);return bu(e).sort(function(r,n){return t[r]-t[n]})}function KEe(e){for(var t=-1,r=0,n=e.length,i,o=-1/0;++t<n;)(i=+e[t][1])>o&&(o=i,r=t);return r}function J8(e){var t=e.map(u$);return bu(e).sort(function(r,n){return t[r]-t[n]})}function u$(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function R3t(e){return J8(e).reverse()}function N3t(e){var t=e.length,r,n,i=e.map(u$),o=Z8(e),a=0,s=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}function D3t(e){return bu(e).reverse()}function h$(e){return function(){return e}}function O3t(e){return e[0]}function z3t(e){return e[1]}function f$(){this._=null}function t2(e){e.U=e.C=e.L=e.R=e.P=e.N=null}f$.prototype={constructor:f$,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=F3t(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(D5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,O5(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(O5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,D5(this,n))),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,r,n=e.L,i=e.R,o,a;if(n?i?o=F3t(i):o=n:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,n&&i?(a=o.C,o.C=e.C,o.L=n,n.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(r=t.R,r.C&&(r.C=!1,t.C=!0,D5(this,t),r=t.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,O5(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,D5(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,O5(this,t),r=t.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,D5(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,O5(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function D5(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function O5(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function F3t(e){for(;e.L;)e=e.L;return e}var p$=f$;function e2(e,t,r,n){var i=[null,null],o=wo.push(i)-1;return i.left=e,i.right=t,r&&z5(i,e,t,r),n&&z5(i,t,e,n),Ua[e.index].halfedges.push(o),Ua[t.index].halfedges.push(o),i}function r2(e,t,r){var n=[t,r];return n.left=e,n}function z5(e,t,r,n){!e[0]&&!e[1]?(e[0]=n,e.left=t,e.right=r):e.left===r?e[1]=n:e[0]=n}function ZEe(e,t,r,n,i){var o=e[0],a=e[1],s=o[0],l=o[1],c=a[0],u=a[1],h=0,f=1,p=c-s,d=u-l,g;if(g=t-s,!(!p&&g>0)){if(g/=p,p<0){if(g<h)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>h&&(h=g)}if(g=n-s,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>h&&(h=g)}else if(p>0){if(g<h)return;g<f&&(f=g)}if(g=r-l,!(!d&&g>0)){if(g/=d,d<0){if(g<h)return;g<f&&(f=g)}else if(d>0){if(g>f)return;g>h&&(h=g)}if(g=i-l,!(!d&&g<0)){if(g/=d,d<0){if(g>f)return;g>h&&(h=g)}else if(d>0){if(g<h)return;g<f&&(f=g)}return!(h>0)&&!(f<1)||(h>0&&(e[0]=[s+h*p,l+h*d]),f<1&&(e[1]=[s+f*p,l+f*d])),!0}}}}}function JEe(e,t,r,n,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,c=s[0],u=s[1],h=l[0],f=l[1],p=(c+h)/2,d=(u+f)/2,g,_;if(f===u){if(p<t||p>=n)return;if(c>h){if(!a)a=[p,r];else if(a[1]>=i)return;o=[p,i]}else{if(!a)a=[p,i];else if(a[1]<r)return;o=[p,r]}}else if(g=(c-h)/(f-u),_=d-g*p,g<-1||g>1)if(c>h){if(!a)a=[(r-_)/g,r];else if(a[1]>=i)return;o=[(i-_)/g,i]}else{if(!a)a=[(i-_)/g,i];else if(a[1]<r)return;o=[(r-_)/g,r]}else if(u<f){if(!a)a=[t,g*t+_];else if(a[0]>=n)return;o=[n,g*n+_]}else{if(!a)a=[n,g*n+_];else if(a[0]<t)return;o=[t,g*t+_]}return e[0]=a,e[1]=o,!0}function B3t(e,t,r,n){for(var i=wo.length,o;i--;)(!JEe(o=wo[i],e,t,r,n)||!ZEe(o,e,t,r,n)||!(Math.abs(o[0][0]-o[1][0])>Hr||Math.abs(o[0][1]-o[1][1])>Hr))&&delete wo[i]}function H3t(e){return Ua[e.index]={site:e,halfedges:[]}}function QEe(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function d$(e,t){return t[+(t.left!==e.site)]}function t5e(e,t){return t[+(t.left===e.site)]}function V3t(){for(var e=0,t=Ua.length,r,n,i,o;e<t;++e)if((r=Ua[e])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=QEe(r,wo[n[i]]);for(a.sort(function(l,c){return s[c]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function U3t(e,t,r,n){var i=Ua.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Ua[o]){for(s=a.site,c=a.halfedges,l=c.length;l--;)wo[c[l]]||c.splice(l,1);for(l=0,u=c.length;l<u;)d=t5e(a,wo[c[l]]),g=d[0],_=d[1],h=d$(a,wo[c[++l%u]]),f=h[0],p=h[1],(Math.abs(g-f)>Hr||Math.abs(_-p)>Hr)&&(c.splice(l,0,wo.push(r2(s,d,Math.abs(g-e)<Hr&&n-_>Hr?[e,Math.abs(f-e)<Hr?p:n]:Math.abs(_-n)<Hr&&r-g>Hr?[Math.abs(p-n)<Hr?f:r,n]:Math.abs(g-r)<Hr&&_-t>Hr?[r,Math.abs(f-r)<Hr?p:t]:Math.abs(_-t)<Hr&&g-e>Hr?[Math.abs(p-t)<Hr?f:e,t]:null))-1),++u);u&&(y=!1)}if(y){var x,b,S,C=1/0;for(o=0,y=null;o<i;++o)(a=Ua[o])&&(s=a.site,x=s[0]-e,b=s[1]-t,S=x*x+b*b,S<C&&(C=S,y=a));if(y){var P=[e,t],k=[e,n],O=[r,n],D=[r,t];y.halfedges.push(wo.push(r2(s=y.site,P,k))-1,wo.push(r2(s,k,O))-1,wo.push(r2(s,O,D))-1,wo.push(r2(s,D,P))-1)}}for(o=0;o<i;++o)(a=Ua[o])&&(a.halfedges.length||delete Ua[o])}var q3t=[],Q8;function e5e(){t2(this),this.x=this.y=this.arc=this.site=this.cy=null}function uy(e){var t=e.P,r=e.N;if(!(!t||!r)){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,c=n[1]-s,u=o[0]-a,h=o[1]-s,f=2*(l*h-c*u);if(!(f>=-G3t)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=q3t.pop()||new e5e;y.arc=e,y.site=i,y.x=g+a,y.y=(y.cy=_+s)+Math.sqrt(g*g+_*_),e.circle=y;for(var x=null,b=n2._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x)if(b.L)b=b.L;else{x=b.P;break}else if(b.R)b=b.R;else{x=b;break}n2.insert(x,y),x||(Q8=y)}}}}function hy(e){var t=e.circle;t&&(t.P||(Q8=t.N),n2.remove(t),q3t.push(t),t2(t),e.circle=null)}var Y3t=[];function r5e(){t2(this),this.edge=this.site=this.circle=null}function W3t(e){var t=Y3t.pop()||new r5e;return t.site=e,t}function m$(e){hy(e),fy.remove(e),Y3t.push(e),t2(e)}function j3t(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];m$(e);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<Hr&&Math.abs(n-l.circle.cy)<Hr;)o=l.P,s.unshift(l),m$(l),l=o;s.unshift(l),hy(l);for(var c=a;c.circle&&Math.abs(r-c.circle.x)<Hr&&Math.abs(n-c.circle.cy)<Hr;)a=c.N,s.push(c),m$(c),c=a;s.push(c),hy(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],z5(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=e2(l.site,c.site,null,i),uy(l),uy(c)}function X3t(e){for(var t=e[0],r=e[1],n,i,o,a,s=fy._;s;)if(o=$3t(s,r)-t,o>Hr)s=s.L;else if(a=t-n5e(s,r),a>Hr){if(!s.R){n=s;break}s=s.R}else{o>-Hr?(n=s.P,i=s):a>-Hr?(n=s,i=s.N):n=i=s;break}H3t(e);var l=W3t(e);if(fy.insert(n,l),!(!n&&!i)){if(n===i){hy(n),i=W3t(n.site),fy.insert(l,i),l.edge=i.edge=e2(n.site,l.site),uy(n),uy(i);return}if(!i){l.edge=e2(n.site,l.site);return}hy(n),hy(i);var c=n.site,u=c[0],h=c[1],f=e[0]-u,p=e[1]-h,d=i.site,g=d[0]-u,_=d[1]-h,y=2*(f*_-p*g),x=f*f+p*p,b=g*g+_*_,S=[(_*x-p*b)/y+u,(f*b-g*x)/y+h];z5(i.edge,c,d,S),l.edge=e2(c,e,null,S),i.edge=e2(e,d,null,S),uy(n),uy(i)}}function $3t(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],c=l-t;if(!c)return s;var u=s-n,h=1/o-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function n5e(e,t){var r=e.N;if(r)return $3t(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var Hr=1e-6,G3t=1e-12,fy,Ua,n2,wo;function i5e(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function o5e(e,t){return t[1]-e[1]||t[0]-e[0]}function F5(e,t){var r=e.sort(o5e).pop(),n,i,o;for(wo=[],Ua=new Array(e.length),fy=new p$,n2=new p$;;)if(o=Q8,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(X3t(r),n=r[0],i=r[1]),r=e.pop();else if(o)j3t(o.arc);else break;if(V3t(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];B3t(a,s,l,c),U3t(a,s,l,c)}this.edges=wo,this.cells=Ua,fy=n2=wo=Ua=null}F5.prototype={constructor:F5,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return d$(t,e[n])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,c=t[o[s-1]],u=c.left===i?c.right:c.left;++a<s;)l=u,c=t[o[a]],u=c.left===i?c.right:c.left,l&&u&&n<l.index&&n<u.index&&i5e(i,l,u)<0&&e.push([i.data,l.data,u.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],c=t-s.site[1],u=l*l+c*c;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(h){var f=n.edges[h],p=f.left;if(!((p===s.site||!p)&&!(p=f.right))){var d=e-p[0],g=t-p[1],_=d*d+g*g;_<u&&(u=_,o=p.index)}});while(o!==null);return n._found=i,r==null||u<=r*r?s.site:null}};function K3t(){var e=O3t,t=z3t,r=null;function n(i){return new F5(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Hr)*Hr,Math.round(t(o,a,i)/Hr)*Hr];return s.index=a,s.data=o,s}),r)}return n.polygons=function(i){return n(i).polygons()},n.links=function(i){return n(i).links()},n.triangles=function(i){return n(i).triangles()},n.x=function(i){return arguments.length?(e=typeof i=="function"?i:h$(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:h$(+i),n):t},n.extent=function(i){return arguments.length?(r=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(i){return arguments.length?(r=i==null?null:[[0,0],[+i[0],+i[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}Rm();function B5(e){return function(){return e}}function g$(e,t,r){this.target=e,this.type=t,this.transform=r}function Xh(e,t,r){this.k=e,this.x=t,this.y=r}Xh.prototype={constructor:Xh,scale:function(e){return e===1?this:new Xh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xh(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $h=new Xh(1,0,0);i2.prototype=Xh.prototype;function i2(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $h;return e.__zoom}function tR(){qt.stopImmediatePropagation()}function o2(){qt.preventDefault(),qt.stopImmediatePropagation()}function a5e(){return!qt.ctrlKey&&!qt.button}function s5e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Z3t(){return this.__zoom||$h}function l5e(){return-qt.deltaY*(qt.deltaMode===1?.05:qt.deltaMode?1:.002)}function c5e(){return navigator.maxTouchPoints||"ontouchstart"in this}function u5e(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function eR(){var e=a5e,t=s5e,r=u5e,n=l5e,i=c5e,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=vL,c=xs("start","zoom","end"),u,h,f=500,p=150,d=0;function g(L){L.property("__zoom",Z3t).on("wheel.zoom",P).on("mousedown.zoom",k).on("dblclick.zoom",O).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(L,R,F){var z=L.selection?L.selection():L;z.property("__zoom",Z3t),L!==z?b(L,R,F):z.interrupt().each(function(){S(this,arguments).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},g.scaleBy=function(L,R,F){g.scaleTo(L,function(){var z=this.__zoom.k,U=typeof R=="function"?R.apply(this,arguments):R;return z*U},F)},g.scaleTo=function(L,R,F){g.transform(L,function(){var z=t.apply(this,arguments),U=this.__zoom,W=F==null?x(z):typeof F=="function"?F.apply(this,arguments):F,Z=U.invert(W),rt=typeof R=="function"?R.apply(this,arguments):R;return r(y(_(U,rt),W,Z),z,a)},F)},g.translateBy=function(L,R,F){g.transform(L,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)})},g.translateTo=function(L,R,F,z){g.transform(L,function(){var U=t.apply(this,arguments),W=this.__zoom,Z=z==null?x(U):typeof z=="function"?z.apply(this,arguments):z;return r($h.translate(Z[0],Z[1]).scale(W.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof F=="function"?-F.apply(this,arguments):-F),U,a)},z)};function _(L,R){return R=Math.max(o[0],Math.min(o[1],R)),R===L.k?L:new Xh(R,L.x,L.y)}function y(L,R,F){var z=R[0]-F[0]*L.k,U=R[1]-F[1]*L.k;return z===L.x&&U===L.y?L:new Xh(L.k,z,U)}function x(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function b(L,R,F){L.on("start.zoom",function(){S(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).end()}).tween("zoom",function(){var z=this,U=arguments,W=S(z,U),Z=t.apply(z,U),rt=F==null?x(Z):typeof F=="function"?F.apply(z,U):F,ot=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),st=z.__zoom,St=typeof R=="function"?R.apply(z,U):R,bt=l(st.invert(rt).concat(ot/st.k),St.invert(rt).concat(ot/St.k));return function(Mt){if(Mt===1)Mt=St;else{var lt=bt(Mt),Kt=ot/lt[2];Mt=new Xh(Kt,rt[0]-lt[0]*Kt,rt[1]-lt[1]*Kt)}W.zoom(null,Mt)}})}function S(L,R,F){return!F&&L.__zooming||new C(L,R)}function C(L,R){this.that=L,this.args=R,this.active=0,this.extent=t.apply(L,R),this.taps=0}C.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,R){return this.mouse&&L!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&L!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(L){Ep(new g$(g,L,this.that.__zoom),c.apply,c,[L,this.that,this.args])}};function P(){if(!e.apply(this,arguments))return;var L=S(this,arguments),R=this.__zoom,F=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,n.apply(this,arguments)))),z=zo(this);if(L.wheel)(L.mouse[0][0]!==z[0]||L.mouse[0][1]!==z[1])&&(L.mouse[1]=R.invert(L.mouse[0]=z)),clearTimeout(L.wheel);else{if(R.k===F)return;L.mouse=[z,R.invert(z)],hu(this),L.start()}o2(),L.wheel=setTimeout(U,p),L.zoom("mouse",r(y(_(R,F),L.mouse[0],L.mouse[1]),L.extent,a));function U(){L.wheel=null,L.end()}}function k(){if(h||!e.apply(this,arguments))return;var L=S(this,arguments,!0),R=Ht(qt.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",Z,!0),F=zo(this),z=qt.clientX,U=qt.clientY;Fm(qt.view),tR(),L.mouse=[F,this.__zoom.invert(F)],hu(this),L.start();function W(){if(o2(),!L.moved){var rt=qt.clientX-z,ot=qt.clientY-U;L.moved=rt*rt+ot*ot>d}L.zoom("mouse",r(y(L.that.__zoom,L.mouse[0]=zo(L.that),L.mouse[1]),L.extent,a))}function Z(){R.on("mousemove.zoom mouseup.zoom",null),Bm(qt.view,L.moved),o2(),L.end()}}function O(){if(!!e.apply(this,arguments)){var L=this.__zoom,R=zo(this),F=L.invert(R),z=L.k*(qt.shiftKey?.5:2),U=r(y(_(L,z),R,F),t.apply(this,arguments),a);o2(),s>0?Ht(this).transition().duration(s).call(b,U,R):Ht(this).call(g.transform,U)}}function D(){if(!!e.apply(this,arguments)){var L=qt.touches,R=L.length,F=S(this,arguments,qt.changedTouches.length===R),z,U,W,Z;for(tR(),U=0;U<R;++U)W=L[U],Z=Cp(this,L,W.identifier),Z=[Z,this.__zoom.invert(Z),W.identifier],F.touch0?!F.touch1&&F.touch0[2]!==Z[2]&&(F.touch1=Z,F.taps=0):(F.touch0=Z,z=!0,F.taps=1+!!u);u&&(u=clearTimeout(u)),z&&(F.taps<2&&(u=setTimeout(function(){u=null},f)),hu(this),F.start())}}function B(){if(!!this.__zooming){var L=S(this,arguments),R=qt.changedTouches,F=R.length,z,U,W,Z;for(o2(),u&&(u=clearTimeout(u)),L.taps=0,z=0;z<F;++z)U=R[z],W=Cp(this,R,U.identifier),L.touch0&&L.touch0[2]===U.identifier?L.touch0[0]=W:L.touch1&&L.touch1[2]===U.identifier&&(L.touch1[0]=W);if(U=L.that.__zoom,L.touch1){var rt=L.touch0[0],ot=L.touch0[1],st=L.touch1[0],St=L.touch1[1],bt=(bt=st[0]-rt[0])*bt+(bt=st[1]-rt[1])*bt,Mt=(Mt=St[0]-ot[0])*Mt+(Mt=St[1]-ot[1])*Mt;U=_(U,Math.sqrt(bt/Mt)),W=[(rt[0]+st[0])/2,(rt[1]+st[1])/2],Z=[(ot[0]+St[0])/2,(ot[1]+St[1])/2]}else if(L.touch0)W=L.touch0[0],Z=L.touch0[1];else return;L.zoom("touch",r(y(U,W,Z),L.extent,a))}}function I(){if(!!this.__zooming){var L=S(this,arguments),R=qt.changedTouches,F=R.length,z,U;for(tR(),h&&clearTimeout(h),h=setTimeout(function(){h=null},f),z=0;z<F;++z)U=R[z],L.touch0&&L.touch0[2]===U.identifier?delete L.touch0:L.touch1&&L.touch1[2]===U.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2){var W=Ht(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return g.wheelDelta=function(L){return arguments.length?(n=typeof L=="function"?L:B5(+L),g):n},g.filter=function(L){return arguments.length?(e=typeof L=="function"?L:B5(!!L),g):e},g.touchable=function(L){return arguments.length?(i=typeof L=="function"?L:B5(!!L),g):i},g.extent=function(L){return arguments.length?(t=typeof L=="function"?L:B5([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),g):t},g.scaleExtent=function(L){return arguments.length?(o[0]=+L[0],o[1]=+L[1],g):[o[0],o[1]]},g.translateExtent=function(L){return arguments.length?(a[0][0]=+L[0][0],a[1][0]=+L[1][0],a[0][1]=+L[0][1],a[1][1]=+L[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(L){return arguments.length?(r=L,g):r},g.duration=function(L){return arguments.length?(s=+L,g):s},g.interpolate=function(L){return arguments.length?(l=L,g):l},g.on=function(){var L=c.on.apply(c,arguments);return L===c?g:L},g.clickDistance=function(L){return arguments.length?(d=(L=+L)*L,g):Math.sqrt(d)},g}var J3t=Ee(Oe(),1);var rR=class extends wp{constructor(){super(...arguments),this._experiments=[]}load(){let t=_e().experiments();return this.requestManager.request(t).then(r=>{J3t.isEqual(this._experiments,r)||(this._experiments=r,this.emitChange())})}getExperiments(){return this._experiments.slice()}},nR=new rR;var h5e={googleStandard:["#db4437","#ff7043","#f4b400","#0f9d58","#00796b","#00acc1","#4285f4","#5c6bc0","#ab47bc"],googleCool:["#9e9d24","#0f9d58","#00796b","#00acc1","#4285f4","#5c6bc0","#607d8b"],googleWarm:["#795548","#ab47bc","#f06292","#c2185b","#db4437","#ff7043","#f4b400"],googleColorBlindAssist:["#ff7043","#00ACC1","#AB47BC","#2A56C6","#0b8043","#F7CB4D","#c0ca33","#5e35b1","#A52714"],tensorboardColorBlindAssist:["#ff7043","#0077bb","#cc3311","#33bbee","#ee3377","#009988","#bbbbbb"],colorBlindAssist1:["#4477aa","#44aaaa","#aaaa44","#aa7744","#aa4455","#aa4488"],colorBlindAssist2:["#88ccee","#44aa99","#117733","#999933","#ddcc77","#cc6677","#882255","#aa4499"],colorBlindAssist3:["#332288","#6699cc","#88ccee","#44aa99","#117733","#999933","#ddcc77","#cc6677","#aa4466","#882255","#661100","#aa4499"],colorBlindAssist4:["#4477aa","#66ccee","#228833","#ccbb44","#ee6677","#aa3377","#bbbbbb"],colorBlindAssist5:["#FF6DB6","#920000","#924900","#DBD100","#24FF24","#006DDB","#490092"],mldash:["#E47EAD","#F4640D","#FAA300","#F5E636","#00A077","#0077B8","#00B7ED"]},iR=h5e.tensorboardColorBlindAssist;var _$=class{constructor(t=iR){this.palette=t,this.identifiers=Ji()}setDomain(t){return this.identifiers=Ji(),t.forEach((r,n)=>{this.identifiers.set(r,this.palette[n%this.palette.length])}),this}getColor(t){if(!this.identifiers.has(t))throw new Error(`String ${t} was not in the domain.`);return this.identifiers.get(t)}};function Q3t(e,t){let r=new _$;function n(){r.setDomain(t())}return e.addListener(n),n(),i=>r.getColor(i)}var fn=Q3t(Sp,()=>Sp.getRuns()),vQr=Q3t(nR,()=>nR.getExperiments().map(({name:e})=>e));var ag=Ee(Oe(),1);ys({moduleName:"run-color-style",styleContent:`
    [color-class='light-blue'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-light-blue-500);
      --paper-checkbox-checked-ink-color: var(--paper-light-blue-500);
      --paper-checkbox-unchecked-color: var(--paper-light-blue-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-light-blue-900);
    }
    [color-class='red'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-red-500);
      --paper-checkbox-checked-ink-color: var(--paper-red-500);
      --paper-checkbox-unchecked-color: var(--paper-red-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-red-900);
    }
    [color-class='green'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-green-500);
      --paper-checkbox-checked-ink-color: var(--paper-green-500);
      --paper-checkbox-unchecked-color: var(--paper-green-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-green-900);
    }
    [color-class='purple'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-purple-500);
      --paper-checkbox-checked-ink-color: var(--paper-purple-500);
      --paper-checkbox-unchecked-color: var(--paper-purple-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-purple-900);
    }
    [color-class='teal'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-teal-500);
      --paper-checkbox-checked-ink-color: var(--paper-teal-500);
      --paper-checkbox-unchecked-color: var(--paper-teal-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-teal-900);
    }
    [color-class='pink'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-pink-500);
      --paper-checkbox-checked-ink-color: var(--paper-pink-500);
      --paper-checkbox-unchecked-color: var(--paper-pink-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-pink-900);
    }
    [color-class='orange'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-orange-500);
      --paper-checkbox-checked-ink-color: var(--paper-orange-500);
      --paper-checkbox-unchecked-color: var(--paper-orange-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-orange-900);
    }
    [color-class='brown'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-brown-500);
      --paper-checkbox-checked-ink-color: var(--paper-brown-500);
      --paper-checkbox-unchecked-color: var(--paper-brown-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-brown-900);
    }
    [color-class='indigo'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-indigo-500);
      --paper-checkbox-checked-ink-color: var(--paper-indigo-500);
      --paper-checkbox-unchecked-color: var(--paper-indigo-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-indigo-900);
    }
  `});var al=class extends Gt(mt){constructor(){super(...arguments),this.names=[],this.coloring={getColor:()=>""},this.regex="",this.selectionState={},this.maxNamesToEnableByDefault=40,this._debouncedRegexChange=this._debouncedRegexChangeImpl()}_debouncedRegexChangeImpl(){var t=ag.debounce(r=>{this.regex=r},150,{leading:!1});return function(){var r=this.$$("#names-regex").value;r==""?this.async(()=>{this.regex=r},30):t(r)}}get _regex(){var t=this.regex;try{return new RegExp(t)}catch(r){return null}}_setIsolatorIcon(){var i;var t=this.selectionState,r=ag.filter(ag.values(t)).length,n=Array.prototype.slice.call((i=this.root)==null?void 0:i.querySelectorAll(".isolator"));n.forEach(function(o){r===1&&t[o.name]?o.icon="radio-button-checked":o.icon="radio-button-unchecked"})}computeNamesMatchingRegex(t,r){let n=this._regex;return n?this.names.filter(i=>n.test(i)):this.names}computeOutSelected(t,r){var n=this.selectionState,i=this.maxNamesToEnableByDefault,o=this.namesMatchingRegex.length<=i;return this.namesMatchingRegex.filter(a=>n[a]==null?o:n[a])}synchronizeColors(t){var i,o,a,s;this._setIsolatorIcon(),((o=(i=this.root)==null?void 0:i.querySelectorAll("paper-checkbox"))!=null?o:[]).forEach(l=>{let c=this.coloring.getColor(l.name);l.updateStyles({"--paper-checkbox-checked-color":c,"--paper-checkbox-checked-ink-color":c,"--paper-checkbox-unchecked-color":c,"--paper-checkbox-unchecked-ink-color":c})}),((s=(a=this.root)==null?void 0:a.querySelectorAll(".isolator"))!=null?s:[]).forEach(l=>{let c=this.coloring.getColor(l.name);l.style.color=c}),window.requestAnimationFrame(()=>{this.updateStyles()})}_isolateName(t){var r=t.target.name,n={};this.names.forEach(function(i){n[i]=i==r}),this.selectionState=n}_checkboxChange(t){var r=t.target;let n=ag.clone(this.selectionState);n[r.name]=r.checked,this.selectionState=n}_isChecked(t,r){return this.outSelected.indexOf(t)!=-1}toggleAll(){let t=this.namesMatchingRegex.some(n=>this.outSelected.includes(n)),r={};this.names.forEach(n=>{r[n]=!t}),this.selectionState=r}};al.template=Q`
    <style include="scrollbar-style"></style>
    <style include="run-color-style"></style>

    <paper-input
      id="names-regex"
      no-label-float=""
      label="Write a regex to filter runs"
      value="[[regex]]"
      on-bind-value-changed="_debouncedRegexChange"
    ></paper-input>
    <div id="outer-container" class="scrollbar">
      <template
        is="dom-repeat"
        items="[[namesMatchingRegex]]"
        on-dom-change="synchronizeColors"
      >
        <div class="name-row">
          <div
            class="icon-container checkbox-container vertical-align-container"
          >
            <paper-checkbox
              class="checkbox vertical-align-center"
              id$="checkbox-[[item]]"
              name="[[item]]"
              checked$="[[_isChecked(item, selectionState.*)]]"
              on-change="_checkboxChange"
            ></paper-checkbox>
          </div>
          <div
            class="icon-container isolator-container vertical-align-container"
          >
            <paper-icon-button
              icon="radio-button-unchecked"
              class="isolator vertical-align-center"
              on-tap="_isolateName"
              name="[[item]]"
            ></paper-icon-button>
          </div>
          <div class="item-label-container">
            <span>[[item]]</span>
          </div>
        </div>
      </template>
    </div>
    <style>
      paper-input {
        --paper-input-container-focus-color: var(--tb-orange-strong);
        --paper-input-container-input: {
          font-size: 14px;
        }
        --paper-input-container-label: {
          font-size: 14px;
        }
      }
      :host {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
      }
      #outer-container {
        contain: content;
        flex-grow: 1;
        flex-shrink: 1;
        overflow-x: hidden;
        overflow-y: auto;
        width: 100%;
        will-change: transform;
        word-wrap: break-word;
      }
      .name-row {
        contain: content;
        padding-top: 5px;
        padding-bottom: 5px;
        display: flex;
        flex-direction: row;
        font-size: 13px;
        word-break: break-all; /* makes wrapping of hyperparam strings better */
      }
      .icon-container {
        flex-grow: 0;
        flex-shrink: 0;
        padding-left: 2px;
      }
      .checkbox {
        padding-left: 2px;
        width: 18px;
        height: 18px;
      }
      .isolator {
        width: 18px;
        height: 18px;
        padding: 0px;
      }
      .isolator-container {
        padding-left: 6px;
        padding-right: 3px;
      }
      .checkbox-container {
        padding-left: 2px;
      }
      .item-label-container {
        padding-left: 5px;
        flex-grow: 1;
        flex-shrink: 1;
        width: 0px; /* hack to get the flex-grow to work properly */
      }
      .tooltip-value-container {
        display: flex;
        justify-content: center;
        flex-grow: 0;
        flex-shrink: 0;
        text-align: right;
        padding-left: 2px;
      }
      .vertical-align-container {
        display: flex;
        justify-content: center;
      }
      .vertical-align-container .vertical-align-center {
        align-self: center;
      }
      .vertical-align-container .vertical-align-top {
        align-self: start;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],al.prototype,"names",void 0);E([A({type:Object}),w("design:type",Object)],al.prototype,"coloring",void 0);E([A({type:String,notify:!0}),w("design:type",String)],al.prototype,"regex",void 0);E([A({type:Array,computed:"computeNamesMatchingRegex(names.*, _regex)"}),w("design:type",Array)],al.prototype,"namesMatchingRegex",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],al.prototype,"selectionState",void 0);E([A({type:Array,notify:!0,computed:"computeOutSelected(namesMatchingRegex.*, selectionState.*)"}),w("design:type",Array)],al.prototype,"outSelected",void 0);E([A({type:Number}),w("design:type",Number)],al.prototype,"maxNamesToEnableByDefault",void 0);E([A({type:Object}),w("design:type",Object)],al.prototype,"_debouncedRegexChange",void 0);E([Rt("regex"),w("design:type",Object),w("design:paramtypes",[])],al.prototype,"_regex",null);E([Bt("selectionState","names"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],al.prototype,"_setIsolatorIcon",null);al=E([yt("tf-multi-checkbox")],al);var a2=class extends mt{get _parts(){var t=this.value,r=this.delimiterPattern;let n=[];for(;;){let i=new RegExp(r,"g");if(i.test(t),i.lastIndex===0){n.push(t);break}else n.push(t.slice(0,i.lastIndex)),t=t.slice(i.lastIndex)}return n}};a2.template=Q`
    <!--
      This ugly formatting is required to prevent spaces from slipping
      into the HTML.
    -->
    <template is="dom-repeat" items="[[_parts]]" as="part"
      >[[part]]<wbr
    /></template>
  `;E([A({type:String}),w("design:type",String)],a2.prototype,"value",void 0);E([A({type:String}),w("design:type",String)],a2.prototype,"delimiterPattern",void 0);E([Rt("value","delimiterPattern"),w("design:type",Array),w("design:paramtypes",[])],a2.prototype,"_parts",null);a2=E([yt("tf-wbr-string")],a2);var mc=class extends Gt(mt){constructor(){super(...arguments),this.runSelectionState=OW("runSelectionState",{defaultValue:{}}).call(this),this.regexInput=v_("regexInput",{defaultValue:""}).call(this),this._dataLocationClipLength=250,this._dataLocationDelimiterPattern="[/=_,-]",this.coloring={getColor:fn},this._storeRunSelectionState=zW("runSelectionState",{defaultValue:{}}),this._regexObserver=x_("regexInput",{defaultValue:""})}attached(){this._runStoreListener=Sp.addListener(()=>{this.set("runs",Sp.getRuns())}),this.set("runs",Sp.getRuns()),this._envStoreListener=ib.addListener(()=>{this.set("dataLocation",ib.getDataLocation())}),this.set("dataLocation",ib.getDataLocation())}detached(){Sp.removeListenerByKey(this._runStoreListener),ib.removeListenerByKey(this._envStoreListener)}_toggleAll(){this.$.multiCheckbox.toggleAll()}get _clippedDataLocation(){var t=this.dataLocation,r=this._dataLocationClipLength;if(t!==void 0)return t.length>r?t.substring(0,r):t}_openDataLocationDialog(t){t.preventDefault(),this.$$("#data-location-dialog").open()}_shouldShowExpandDataLocationButton(t,r){return t&&t.length>r}};mc.template=Q`
    <paper-dialog with-backdrop="" id="data-location-dialog">
      <h2>Data Location</h2>
      <tf-wbr-string
        value="[[dataLocation]]"
        delimiter-pattern="[[_dataLocationDelimiterPattern]]"
      >
      </tf-wbr-string
    ></paper-dialog>
    <div id="top-text">
      <h3 id="tooltip-help" class="tooltip-container">Runs</h3>
    </div>
    <tf-multi-checkbox
      id="multiCheckbox"
      names="[[runs]]"
      selection-state="{{runSelectionState}}"
      out-selected="{{selectedRuns}}"
      regex="{{regexInput}}"
      coloring="[[coloring]]"
    ></tf-multi-checkbox>
    <paper-button class="x-button" id="toggle-all" on-tap="_toggleAll">
      Toggle All Runs
    </paper-button>
    <template is="dom-if" if="[[dataLocation]]">
      <div id="data-location">
        <tf-wbr-string
          value="[[_clippedDataLocation]]"
          delimiter-pattern="[[_dataLocationDelimiterPattern]]"
        ></tf-wbr-string
        ><!--
          We use HTML comments to remove spaces before the ellipsis.
        --><template
          is="dom-if"
          if="[[_shouldShowExpandDataLocationButton(dataLocation, _dataLocationClipLength)]]"
          ><!--
          --><a href="" on-click="_openDataLocationDialog">…</a>
        </template>
      </div>
    </template>
    <style>
      :host {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        padding-bottom: 10px;
      }
      #top-text {
        color: var(--tb-secondary-text-color);
        width: 100%;
        flex-grow: 0;
        flex-shrink: 0;
        padding-right: 16px;
        box-sizing: border-box;
      }
      tf-wbr-string {
        overflow-wrap: break-word;
      }
      tf-multi-checkbox {
        display: flex;
        flex-grow: 1;
        flex-shrink: 1;
        overflow: hidden;
      }
      .x-button {
        font-size: 13px;
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
      }
      #tooltip-help {
        color: var(--tb-secondary-text-color);
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }
      paper-button {
        margin-left: 0;
      }
      #data-location {
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin: 5px 0 0 0;
        max-width: 288px;
      }
    </style>
  `;E([A({type:Object,observer:"_storeRunSelectionState"}),w("design:type",Object)],mc.prototype,"runSelectionState",void 0);E([A({type:String,observer:"_regexObserver"}),w("design:type",String)],mc.prototype,"regexInput",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],mc.prototype,"selectedRuns",void 0);E([A({type:Array}),w("design:type",Array)],mc.prototype,"runs",void 0);E([A({type:String,notify:!0}),w("design:type",String)],mc.prototype,"dataLocation",void 0);E([A({type:Number}),w("design:type",Number)],mc.prototype,"_dataLocationClipLength",void 0);E([A({type:String}),w("design:type",String)],mc.prototype,"_dataLocationDelimiterPattern",void 0);E([A({type:Object}),w("design:type",Object)],mc.prototype,"coloring",void 0);E([Rt("dataLocation","_dataLocationClipLength"),w("design:type",Object),w("design:paramtypes",[])],mc.prototype,"_clippedDataLocation",null);mc=E([yt("tf-runs-selector")],mc);var an=class{constructor(){this.cancellationCount=0}cancellable(t){let r=this.cancellationCount;return n=>{let i=this.cancellationCount!==r;return t({value:n,cancelled:i})}}cancelAll(){this.cancellationCount++}};var H5=class extends Gt(mt){constructor(){super(...arguments),this.html=""}get sanitizedHtml(){return this.html}attached(){window.requestAnimationFrame(()=>{this.scopeSubtree(this.$.markdown,!0)})}};H5.template=Q`
    <div id="markdown" inner-h-t-m-l="[[sanitizedHtml]]"></div>
    <style>
      /*
       * Reduce topmost and bottommost margins from 16px to 0.3em (renders
       * at about 4.8px) to keep the layout compact. This improves the
       * appearance when there is only one line of text; standard Markdown
       * renderers will still include a \`<p>\` element.
       *
       * By targeting only the top-level, extremal elements, we preserve any
       * actual paragraph breaks and only change the padding against the
       * component edges.
       */
      #markdown > p:first-child {
        margin-top: 0.3em;
      }
      #markdown > p:last-child {
        margin-bottom: 0.3em;
      }
      #markdown p {
        /* Some users include multiple spaces and would like them preserved in
         * the text visualization in TB. Googlers, see b/335770352.
         */
        white-space: break-spaces;
      }

      /* Pleasant styles for Markdown tables. */
      #markdown table {
        border-collapse: collapse;
      }
      #markdown table th {
        font-weight: 600;
      }
      #markdown table th,
      #markdown table td {
        padding: 6px 13px;
        border: 1px solid var(--tb-ui-border, #dfe2e5);
      }
      #markdown table tr {
        background-color: inherit;
        border-top: 1px solid var(--tb-ui-border, #c6cbd1);
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],H5.prototype,"html",void 0);E([Rt("html"),w("design:type",Object),w("design:paramtypes",[])],H5.prototype,"sanitizedHtml",null);H5=E([yt("tf-markdown-view")],H5);ys({moduleName:"tf-card-heading-style",styleContent:`
    figcaption {
      width: 100%;
    }

    /** Horizontal line of labels. */
    .heading-row {
      margin-top: -4px;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
    }

    /** Piece of text in the figure caption. */
    .heading-label {
      flex-grow: 1;
      margin-top: 4px;
      max-width: 100%;
      word-wrap: break-word;
    }

    /** Makes label show on the right. */
    .heading-right {
      flex-grow: 0;
    }
  `});function s2(e){return e?e.toString().replace(/GMT-\d+ \(([^)]+)\)/,"$1"):""}function tMt(e){let t=p5e(e);return t?Math.round((t[0]*299+t[1]*587+t[2]*114)/1e3)>125?"inherit":"#eee":"inherit"}function p5e(e){if(!e)return null;let t=e.match(/^#([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})$/);if(!t)return null;if(e.length==4)for(var r=1;r<=3;r++)t[r]=t[r]+t[r];return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}var gc=class extends mt{constructor(){super(...arguments),this.displayName=null,this.tag=null,this.run=null,this.description=null,this.color=null}_updateHeadingStyle(){this.updateStyles({"--tf-card-heading-background-color":this._runBackground,"--tf-card-heading-color":this._runColor})}_computeRunBackground(t){return t||"none"}_computeRunColor(t){return tMt(t)}get _nameLabel(){var t=this.displayName,r=this.tag;return t||r||""}get _tagLabel(){var t=this.displayName,r=this.tag;return r&&r!==t?r:""}_toggleDescriptionDialog(t){let r=this.$.descriptionDialog;r.positionTarget=t.target,r.toggle()}};gc.template=Q`
    <div class="container">
      <figcaption class="content">
        <div class="heading-row">
          <template is="dom-if" if="[[_nameLabel]]">
            <div itemprop="name" class="heading-label name">[[_nameLabel]]</div>
          </template>
          <template is="dom-if" if="[[run]]">
            <!-- Extra wrapping span needed to avoid flexbox blockification. -->
            <!-- (see flexbox spec, section 4 "Flex Items") -->
            <span>
              <span
                itemprop="run"
                id="heading-run"
                class="heading-label heading-right run"
                >[[run]]</span
              >
            </span>
          </template>
        </div>
        <template is="dom-if" if="[[_tagLabel]]">
          <div class="heading-row">
            <div class="heading-label">
              tag: <span itemprop="tag">[[_tagLabel]]</span>
            </div>
          </div>
        </template>
        <slot></slot>
      </figcaption>
      <template is="dom-if" if="[[description]]">
        <paper-icon-button
          icon="info"
          on-tap="_toggleDescriptionDialog"
          title="Show summary description"
        ></paper-icon-button>
      </template>
      <paper-dialog
        id="descriptionDialog"
        no-overlap=""
        horizontal-align="auto"
        vertical-align="auto"
      >
        <paper-dialog-scrollable>
          <tf-markdown-view html="[[description]]"></tf-markdown-view>
        </paper-dialog-scrollable>
      </paper-dialog>
    </div>
    <style include="tf-card-heading-style">
      .container {
        display: flex;
      }
      .content {
        font-size: 12px;
        flex-grow: 1;
      }
      .name {
        font-size: 14px;
      }
      .run {
        font-size: 11px;
        width: auto;
        border-radius: 3px;
        font-weight: bold;
        padding: 1px 4px 2px;
      }
      paper-icon-button {
        flex-grow: 0;
      }
      paper-dialog-scrollable {
        max-width: 640px;
      }
      #heading-run {
        background: var(--tf-card-heading-background-color);
        color: var(--tf-card-heading-color);
      }
    </style>
  `;E([A({type:String}),w("design:type",Object)],gc.prototype,"displayName",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"tag",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"run",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"description",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"color",void 0);E([A({type:String,computed:"_computeRunBackground(color)",readOnly:!0,observer:"_updateHeadingStyle"}),w("design:type",String)],gc.prototype,"_runBackground",void 0);E([A({type:String,computed:"_computeRunColor(color)",readOnly:!0,observer:"_updateHeadingStyle"}),w("design:type",String)],gc.prototype,"_runColor",void 0);E([Rt("displayName","tag"),w("design:type",String),w("design:paramtypes",[])],gc.prototype,"_nameLabel",null);E([Rt("displayName","tag"),w("design:type",String),w("design:paramtypes",[])],gc.prototype,"_tagLabel",null);gc=E([yt("tf-card-heading")],gc);var Fi=class extends Gt(mt){constructor(){super(...arguments),this._metadataCanceller=new an,this._steps=[],this._attached=!1}get _runColor(){var t=this.run;return fn(t)}get _hasAtLeastOneStep(){var t=this._steps;return!!t&&t.length>0}get _hasMultipleSteps(){var t=this._steps;return!!t&&t.length>1}get _maxStepIndex(){var t=this._steps;return t.length-1}get _currentDatum(){var t=this._steps,r=this._stepIndex;return t[r]}get _sampleText(){var t=this.sample;return`${t+1}`}get _hasMultipleSamples(){var t=this.totalSamples;return t>1}attached(){this._attached=!0,this.reload()}_reloadOnRunTagChange(){this.reload()}reload(){if(!this._attached)return;this._metadataCanceller.cancelAll();let r=_e().pluginRoute("audio","/audio",new URLSearchParams({tag:this.tag,run:this.run,sample:String(this.sample)})),n=this._metadataCanceller.cancellable(i=>{if(i.cancelled)return;let a=i.value.map(this._createStepDatum.bind(this));this.set("_steps",a),this.set("_stepIndex",a.length-1)});this.requestManager.request(r).then(n)}_createStepDatum(t){let r=new URLSearchParams(t.query);r.append("ts",String(t.wall_time));let n=_e().pluginRouteForSrc("audio","/individualAudio",r);return{wall_time:s2(new Date(t.wall_time*1e3)),step:t.step,label:t.label,contentType:t.contentType,url:n}}};Fi.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    >
      <template is="dom-if" if="[[_hasMultipleSamples]]">
        <div class="heading-row">
          <div class="heading-label">
            sample: [[_sampleText]] of [[totalSamples]]
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep]]">
        <div class="heading-row">
          <div class="heading-label">
            step <strong>[[_currentDatum.step]]</strong>
          </div>
          <template is="dom-if" if="[[_currentDatum.wall_time]]">
            <div class="heading-label heading-right">
              [[_currentDatum.wall_time]]
            </div>
          </template>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps]]">
        <div class="heading-row">
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_maxStepIndex]]"
            max-markers="[[_maxStepIndex]]"
            snaps=""
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>
    <template is="dom-if" if="[[_hasAtLeastOneStep]]">
      <audio
        controls=""
        src$="[[_currentDatum.url]]"
        type$="[[_currentDatum.contentType]]"
      ></audio>
      <tf-markdown-view html="[[_currentDatum.label]]"></tf-markdown-view>
    </template>
    <div id="main-audio-container"></div>

    <style include="tf-card-heading-style">
      :host {
        display: block;
        width: 350px;
        height: auto;
        position: relative;
        --step-slider-knob-color: #424242;
        margin-right: 15px;
        margin-bottom: 15px;
      }

      #steps {
        height: 15px;
        margin: 0 0 0 -15px;
        width: 100%;
        box-sizing: border-box;
        padding: 0 5px; /* so the slider knob doesn't butt out */
        margin-top: 5px;
        --paper-slider-active-color: var(--step-slider-knob-color);
        --paper-slider-knob-color: var(--step-slider-knob-color);
        --paper-slider-pin-color: var(--step-slider-knob-color);
        --paper-slider-knob-start-color: var(--step-slider-knob-color);
        --paper-slider-knob-start-border-color: var(--step-slider-knob-color);
        --paper-slider-pin-start-color: var(--step-slider-knob-color);
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Fi.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Fi.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"totalSamples",void 0);E([A({type:Object}),w("design:type",Object)],Fi.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Ae)],Fi.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],Fi.prototype,"_metadataCanceller",void 0);E([A({type:Array}),w("design:type",Array)],Fi.prototype,"_steps",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"_stepIndex",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Fi.prototype,"_runColor",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasAtLeastOneStep",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasMultipleSteps",null);E([Rt("_steps"),w("design:type",Number),w("design:paramtypes",[])],Fi.prototype,"_maxStepIndex",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],Fi.prototype,"_currentDatum",null);E([Rt("sample"),w("design:type",String),w("design:paramtypes",[])],Fi.prototype,"_sampleText",null);E([Rt("totalSamples"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasMultipleSamples",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Fi.prototype,"_reloadOnRunTagChange",null);Fi=E([yt("tf-audio-loader")],Fi);var Kh=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._tagFilter="",this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadAudio()})}_fetchTags(){let t=_e().pluginRoute("audio","/tags");return this._requestManager.request(t).then(r=>{if(py.isEqual(r,this._runToTagInfo))return;let n=py.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r)})}_reloadAudio(){var t;(t=this.root)==null||t.querySelectorAll("tf-audio-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=py.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return py.range(c).map(u=>Object.assign({},l,{sample:u,totalSamples:c}))}return o.map(l=>Object.assign({},l,{items:[].concat.apply([],l.items.map(a))}))}_tagMetadata(t,r,n){return t[r][n]}};Kh.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="sidebar-section runs-selector">
          <tf-runs-selector
            id="runs-selector"
            selected-runs="{{_selectedRuns}}"
          ></tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No audio data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any audio data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-audio-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  total-samples="[[item.totalSamples]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  request-manager="[[_requestManager]]"
                ></tf-audio-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Kh.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],Kh.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Kh.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Kh.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Kh.prototype,"_tagFilter",void 0);E([A({type:Object}),w("design:type",Ae)],Kh.prototype,"_requestManager",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter"),w("design:type",Array),w("design:paramtypes",[])],Kh.prototype,"_categories",null);Kh=E([yt("tf-audio-dashboard")],Kh);var V5=class extends Gt(mt){attached(){this.async(function(){this.getEffectiveChildren().forEach(function(t){this.listen(t,"tap","_selectTarget")}.bind(this))})}_selectTarget(t){this.selectedId=t.currentTarget.id}_selectedIdChanged(){var t=this.queryEffectiveChildren("#"+this.selectedId);!t||(this.getEffectiveChildren().forEach(function(r){r.classList.remove("selected")}),t.classList.add("selected"))}};V5.template=Q`
    <div id="wrap">
      <h3>[[name]]</h3>
      <div class="content-wrapper"><slot></slot></div>
    </div>
    <style>
      .content-wrapper ::slotted(*) {
        background: none;
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin-top: 10px;
      }

      .content-wrapper ::slotted(*) {
        background: none;
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin-top: 10px;
      }

      .content-wrapper ::slotted(.selected) {
        background-color: var(--tb-ui-dark-accent);
        color: white !important;
      }

      h3 {
        color: var(--tb-secondary-text-color);
        display: block;
        font-size: 14px;
        font-weight: normal;
        margin: 0 0 5px;
        pointer-events: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],V5.prototype,"name",void 0);E([A({type:String,notify:!0,observer:"_selectedIdChanged"}),w("design:type",String)],V5.prototype,"selectedId",void 0);V5=E([yt("tf-option-selector")],V5);function oR(e,t){let r,n={};Object.keys(e).forEach(a=>{let s=e[a];r===void 0&&(r=s.displayName),r!==s.displayName&&(r=null),n[s.description]===void 0&&(n[s.description]=[]),n[s.description].push(a)});let i=r!=null?r:t,o=(()=>{let a=Object.keys(n);return a.length===0?"":a.length===1?a[0]:`<p><strong>Multiple descriptions:</strong></p><ul>${a.map(c=>{let u=n[c].map(p=>`<code>${p.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;")}</code>`),h=u.length>2?u.slice(0,u.length-1).join(", ")+", and "+u[u.length-1]:u.join(" and ");return`<li><p>For ${d5e(u.length,"run","runs")} ${h}:</p>${c}</li>`}).join("")}</ul>`})();return{displayName:i,description:o}}function d5e(e,t,r){return e===1?t:r}var rMt=Ee(Oe(),1);var Vp=class extends mt{constructor(){super(...arguments),this.weight=.6,this._updateWeight=rMt.debounce(function(t){this.weight=t},250)}_immediateWeightNumberForPaperSliderChanged(){this._inputWeightStringForPaperInput=this._immediateWeightNumberForPaperSlider.toString(),this._updateWeight.call(this,this._immediateWeightNumberForPaperSlider)}_inputWeightStringForPaperInputChanged(){+this._inputWeightStringForPaperInput<0?this._inputWeightStringForPaperInput="0":+this._inputWeightStringForPaperInput>1&&(this._inputWeightStringForPaperInput="1");var t=+this._inputWeightStringForPaperInput;isNaN(t)||this._updateWeight.call(this,t)}};Vp.template=Q`
    <h3 class="title">Smoothing</h3>
    <div class="smoothing-block">
      <paper-slider
        id="slider"
        immediate-value="{{_immediateWeightNumberForPaperSlider}}"
        max="[[max]]"
        min="[[min]]"
        pin
        step="[[step]]"
        type="number"
        value="{{weight}}"
      ></paper-slider>
      <paper-input
        id="input"
        label="weight"
        no-label-float
        value="{{_inputWeightStringForPaperInput}}"
        type="number"
        step="[[step]]"
        min="[[min]]"
        max="[[max]]"
      ></paper-input>
    </div>
    <style>
      .title {
        color: var(--tb-secondary-text-color);
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }

      .smoothing-block {
        display: flex;
      }

      paper-slider {
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
        flex-grow: 2;
      }

      paper-input {
        --paper-input-container-focus-color: var(--tb-orange-strong);
        --paper-input-container-input: {
          font-size: 14px;
        }
        --paper-input-container-label: {
          font-size: 14px;
        }
        width: 60px;
      }
    </style>
  `;E([A({type:Number}),w("design:type",Number)],Vp.prototype,"step",void 0);E([A({type:Number}),w("design:type",Number)],Vp.prototype,"max",void 0);E([A({type:Number}),w("design:type",Number)],Vp.prototype,"min",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],Vp.prototype,"weight",void 0);E([A({type:Number,notify:!0,observer:"_immediateWeightNumberForPaperSliderChanged"}),w("design:type",Number)],Vp.prototype,"_immediateWeightNumberForPaperSlider",void 0);E([A({type:String,notify:!0,observer:"_inputWeightStringForPaperInputChanged"}),w("design:type",String)],Vp.prototype,"_inputWeightStringForPaperInput",void 0);Vp=E([yt("tf-smoothing-input")],Vp);var Yo=Ee(Oe(),1);function Mi(e,t){let r=Object.keys(t).sort().filter(a=>t[a]!==void 0);if(!r.length)return e;let n=e.indexOf("?")!==-1?"&":"?",o=Array().concat(...r.map(a=>{let s=t[a];return(Array.isArray(s)?s:[s]).map(c=>`${a}=${m5e(c)}`)})).join("&");return e+n+o}function m5e(e){return encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29")}var $Kt=Ee(Oe(),1),ZWn=Ee(Sl(),1);var DKt=Ee(Oe(),1);var x4;(function(e){e[e.LOADING=0]="LOADING",e[e.LOADED=1]="LOADED"})(x4||(x4={}));function kS(e){return class extends e{constructor(){super(...arguments),this.loadKey="",this.dataToLoad=[],this.getDataLoadName=r=>String(r),this.dataLoading=!1,this.dataLoadedAtLeastOnce=!1,this._isConnected=!1,this._dataLoadState=new Map,this._canceller=new an,this._loadDataAsync=null,this._loadData=DKt.throttle(this._loadDataImpl,100,{leading:!0,trailing:!0})}connectedCallback(){super.connectedCallback(),this._isConnected=!0}disconnectedCallback(){super.disconnectedCallback(),this._isConnected=!1}static get properties(){return{active:{type:Boolean,observer:"_loadDataIfActive"},_isConnected:{type:Boolean},loadKey:{type:String},dataToLoad:{type:Array},getDataLoadName:{type:Object},loadDataCallback:{type:Object},requestData:{type:Object}}}static get observers(){return["_dataToLoadChanged(_isConnected, dataToLoad.*)"]}onLoadFinish(){}reload(){this._dataLoadState.clear(),this._loadData()}reset(){this._loadDataAsync!=null&&(clearTimeout(this._loadDataAsync),this._loadDataAsync=null),this._canceller&&this._canceller.cancelAll(),this._dataLoadState&&this._dataLoadState.clear(),this._isConnected&&this._loadData()}_dataToLoadChanged(){this._isConnected&&this._loadData()}detached(){this._loadDataAsync!=null&&(clearTimeout(this._loadDataAsync),this._loadDataAsync=null)}_loadDataIfActive(){this.active&&this._loadData()}_loadDataImpl(){!this.active||(this._loadDataAsync!==null&&clearTimeout(this._loadDataAsync),this._loadDataAsync=setTimeout(this._canceller.cancellable(r=>{if(r.cancelled)return;this.dataLoading=!0;let n=this.dataToLoad.filter(a=>{let s=this.getDataLoadName(a);return!this._dataLoadState.has(s)});for(let a of n){let s=this.getDataLoadName(a);this._dataLoadState.set(s,x4.LOADING)}let i=this._canceller.cancellable(a=>{if(a.cancelled)return;let{item:s,data:l}=a.value,c=this.getDataLoadName(s);this._dataLoadState.set(c,x4.LOADED),this.loadDataCallback(this,s,l)}),o=this._canceller.cancellable(a=>{if(!a.cancelled){let l=a.value,c=new Set(n.map(h=>this.getDataLoadName(h)));this.dataToLoad.some(h=>c.has(this.getDataLoadName(h)))&&this.onLoadFinish(),this._loadDataAsync=null,this.dataLoadedAtLeastOnce=!0}Array.from(this._dataLoadState.values()).includes(x4.LOADING)||(this.dataLoading=!1)});this.requestData(n,i,()=>o(void 0))})))}}}var bqe=Ee(Oe(),1),Wo=Ee(Sl(),1),RS=[{character:"\u25FC",method:Wo.SymbolFactories.square},{character:"\u25C6",method:Wo.SymbolFactories.diamond},{character:"\u25B2",method:Wo.SymbolFactories.triangle},{character:"\u2605",method:Wo.SymbolFactories.star},{character:"\u271A",method:Wo.SymbolFactories.cross}],Td;(function(e){e.STEP="step",e.RELATIVE="relative",e.WALL_TIME="wall_time"})(Td||(Td={}));var r0=4,wqe=4,mB=3,gB=20,_B=4,OKt=6;function Wu(e){return t=>{let r=Math.abs(t);r<1e-15&&(r=0);let n;return r>=1e4?n=xn("."+e+"~e"):r>0&&r<.01?n=xn("."+e+"~e"):n=xn("."+e+"~g"),n(t)}}var b4=xn(`.${wqe}~s`);function Xat(){let e=new Wo.Scales.Linear;e.tickGenerator(Wo.Scales.TickGenerators.integerTickGenerator());let t=new Wo.Axes.Numeric(e,"bottom");return t.formatter(b4),{scale:e,axis:t,accessor:r=>r.step}}var yB=Wo.Formatters.time("%a %b %e, %H:%M:%S");function Sqe(){let e=new Wo.Scales.Time;return{scale:e,axis:new Wo.Axes.Time(e,"bottom"),accessor:t=>t.wall_time}}var n0=(e,t,r)=>{if(e.relative!=null)return e.relative;let n=r.data(),i=n.length>0?+n[0].wall_time:0;return(+e.wall_time-i)/(60*60*1e3)},vB=e=>{let t="",r=Math.floor(e/24);e-=r*24,r&&(t+=r+"d ");let n=Math.floor(e);e-=n,e*=60,(n||r)&&(t+=n+"h ");let i=Math.floor(e);e-=i,e*=60,(i||n||r)&&(t+=i+"m ");let o=Math.floor(e);return t+o+"s"};function Mqe(){let e=new Wo.Scales.Linear;return{scale:e,axis:new Wo.Axes.Numeric(e,"bottom"),accessor:n0}}function xB(e){switch(e){case Td.STEP:return Xat();case Td.WALL_TIME:return Sqe();case Td.RELATIVE:return Mqe();default:throw new Error("invalid xType: "+e)}}var Fs=Ee(Oe(),1),Mn=Ee(Sl(),1);var xa=Ee(Sl(),1);function Eqe(e){let t=[],r=e;for(;r&&r instanceof HTMLElement;)if(t.push(r),r.assignedSlot)r=r.assignedSlot;else if(r.parentElement)r=r.parentElement;else{let n=r.parentNode;n instanceof DocumentFragment?r=n.host:r=n!==r?n:null}return t}var Tqe=[1,0,0,1,0,0];function Cqe(e){let t=Eqe(e),r=Tqe,n=null;for(let i of t){let o=xa.Utils.DOM.getElementTransform(i);if(o!=null){let l=i.clientWidth/2,c=i.clientHeight/2;r=xa.Utils.Math.multiplyTranslate(r,[l,c]),r=xa.Utils.Math.multiplyMatrix(r,xa.Utils.Math.invertMatrix(o)),r=xa.Utils.Math.multiplyTranslate(r,[-l,-c])}let a=i.scrollLeft,s=i.scrollTop;(n===null||i===n)&&(a-=i.offsetLeft+i.clientLeft,s-=i.offsetTop+i.clientTop,n=i.offsetParent),r=xa.Utils.Math.multiplyTranslate(r,[a,s])}return r}var wB=class extends xa.Utils.Translator{computePosition(t,r){let n={x:t,y:r},i=Cqe(this._rootElement);return i==null?n:xa.Utils.Math.applyTransform(i,n)}},qv=class extends xa.Dispatchers.Mouse{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new wB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[qv._DISPATCHER_KEY];return n||(n=new qv(t),r[qv._DISPATCHER_KEY]=n),n}},Gv=class extends xa.Dispatchers.Touch{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new wB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[Gv._DISPATCHER_KEY];return n||(n=new Gv(t),r[Gv._DISPATCHER_KEY]=n),n}};xa.Interaction.prototype._isInsideComponent=function(e){return 0<=e.x&&0<=e.y&&e.x<this._componentAttachedTo.width()&&e.y<this._componentAttachedTo.height()};var SB=class extends xa.Interactions.Pointer{_anchor(t){let r=this;r._isAnchored=!0,r._mouseDispatcher=qv.getDispatcher(r._componentAttachedTo),r._mouseDispatcher.onMouseMove(r._mouseMoveCallback),r._touchDispatcher=Gv.getDispatcher(r._componentAttachedTo),r._touchDispatcher.onTouchStart(r._touchStartCallback)}};var zKt=Ee(Oe(),1);var Wv;(function(e){e.AUTO="auto",e.BOTTOM="bottom",e.RIGHT="right"})(Wv||(Wv={}));var Aqe={boxShadow:"0 1px 4px rgba(0, 0, 0, .3)",opacity:0,position:"fixed",willChange:"transform",zIndex:5},w4=class extends Gt(mt){constructor(){super(...arguments),this.position=Wv.AUTO,this.minDistFromEdge=15,this._styleCache=null,this._raf=null,this._tunnel=null}ready(){this._styleCache=null,this._raf=null,this._tunnel=null}attached(){this._tunnel=this._createTunnel(),this._hideOnBlur=()=>{document.hidden&&this.hide()},window.addEventListener("visibilitychange",this._hideOnBlur)}detached(){this.hide(),this._removeTunnel(this._tunnel),this._tunnel=null,window.removeEventListener("visibilitychange",this._hideOnBlur)}content(){return this._tunnel.shadowRoot}hide(){this._raf!==null&&window.cancelAnimationFrame(this._raf),this._styleCache=null,this._tunnel.style.opacity=0}updateAndPosition(t){this._raf!==null&&window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{!this.isAttached||this._repositionImpl(t)})}_repositionImpl(t){let r=this._tunnel,n=t.getBoundingClientRect(),i=r.getBoundingClientRect(),o=window.innerHeight,a=document.body.clientWidth,s=n.top,l=s+n.height,c=i.height+gB,u=null,h=Math.max(this.minDistFromEdge,n.left),f=null,p=s;this.position==Wv.RIGHT?h=n.right:(p=l+gB,a<h+i.width+this.minDistFromEdge&&(h=null,f=this.minDistFromEdge)),this.position==Wv.AUTO&&n.top-c>0&&o<n.top+n.height+c&&(p=null,u=o-s+gB);let d={contain:"content",opacity:1,left:h?`${h}px`:null,right:f?`${f}px`:null,top:p?`${p}px`:null,bottom:u?`${u}px`:null};zKt.isEqual(this._styleCache,d)||(Object.assign(r.style,d),this._styleCache=d)}_createTunnel(){if(!this.contentComponentName)throw new RangeError("Require `contentComponentName` to be a name of a Polymer component");let t=document.createElement(this.contentComponentName);return Object.assign(t.style,Aqe),document.body.appendChild(t),t}_removeTunnel(t){document.body.removeChild(t)}};E([A({type:String}),w("design:type",String)],w4.prototype,"contentComponentName",void 0);E([A({type:String}),w("design:type",String)],w4.prototype,"position",void 0);E([A({type:Number}),w("design:type",Number)],w4.prototype,"minDistFromEdge",void 0);w4=E([yt("vz-chart-tooltip")],w4);var NS=Ee(Sl(),1);var HKt=1e4,VKt=.001,UKt=xn(".2~e"),Pqe=xn(".4~r"),FKt=xn(",~");function BKt(e){if(e===0)return"0";let t=Math.abs(e);return t>=HKt||t<VKt?UKt(e):Pqe(e)}var Kat={formatTick:BKt,formatShort:BKt,formatReadable(e){let t=Math.abs(e);return t>=HKt||t<VKt?UKt(e):FKt(e)},formatLong:FKt},iWn=new Intl.NumberFormat(void 0,{maximumFractionDigits:4});var oWn=xn("0.3~s"),aWn=xn(",.3~f");var Iqe=1e3,Lqe=60*Iqe,kqe=60*Lqe,Rqe=24*kqe,sWn=365*Rqe,lWn=xn(".4~");var Nqe=Yb().tickFormat(),$at,qKt={formatTick(e){return Nqe(new Date(e))},formatShort(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})},formatReadable(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})},formatLong(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})}};var Cd;(function(e){e[e.LINEAR=0]="LINEAR",e[e.LOG10=1]="LOG10",e[e.TIME=2]="TIME"})(Cd||(Cd={}));function GKt(e){switch(e){case Cd.LINEAR:return new Zat;case Cd.LOG10:return new Jat;case Cd.TIME:return new Qat;default:let t=e;throw new RangeError(`ScaleType ${t} not supported.`)}}var Dqe=.05,Zat=class{constructor(){this.defaultFormatter=Kat}transform(t,r,n){let[i,o]=t,a=o-i,[s,l]=r,c=l-s;return a===0?s:c/a*(n-i)+s}forward(t,r,n){return this.transform(t,r,n)}reverse(t,r,n){return this.transform(r,t,n)}niceDomain(t){let[r,n]=t;if(n<r)throw new Error("Unexpected input: min is larger than max");if(n===r)return r===0?[-1,1]:r<0?[2*r,0]:[0,2*r];let i=zn(),o=(n-r+Number.EPSILON)*Dqe,[a,s]=i.domain([r-o,n+o]).nice().domain();return[a,s]}ticks(t,r){return zn().domain(t).ticks(r)}isSafeNumber(t){return Number.isFinite(t)}},Jat=class{constructor(){this.defaultFormatter=Kat}transform(t){return Math.log10(t>0?t:Number.MIN_VALUE)}untransform(t){return Math.exp(t/Math.LOG10E)}forward(t,r,n){if(n<=0)return r[0];let[i,o]=t,[a,s]=r,l=this.transform(i),u=this.transform(o)-l,h=s-a;return n=this.transform(n),h/(u+Number.EPSILON)*(n-l)+a}reverse(t,r,n){let[i,o]=t,[a,s]=r,l=this.transform(i),u=this.transform(o)-l,h=s-a,f=u/(h+Number.EPSILON)*(n-a)+l;return this.untransform(f)}niceDomain(t){let[r,n]=t;if(r>n)throw new Error("Unexpected input: min is larger than max");let i=Math.max(r,Number.MIN_VALUE),o=Math.max(n,Number.MIN_VALUE);return n<=0?[Number.MIN_VALUE,1]:[Math.max(Number.MIN_VALUE,i*.5),o*2]}ticks(t,r){let n=t[0]<=0?Number.MIN_VALUE:t[0],i=t[1]<=0?Number.MIN_VALUE:t[1],o=cc().domain([n,i]).ticks(r);return o.length?o:t}isSafeNumber(t){return Number.isFinite(t)&&t>0}},Qat=class{constructor(){this.scale=Yb(),this.defaultFormatter=qKt}forward(t,r,n){return this.scale.domain(t).range(r)(n)}reverse(t,r,n){return this.scale.domain(t).range(r).invert(n).getTime()}niceDomain(t){let[r,n]=this.scale.domain(t).nice().domain();return[r.getTime(),n.getTime()]}ticks(t,r){return this.scale.domain(t).ticks(r).map(n=>n.getTime())}isSafeNumber(t){return Number.isFinite(t)}};var MB=class extends NS.Scales.Linear{constructor(){super(),this._ignoreOutlier=!1,this.padProportion(.2)}setValueProviderForDomain(t){return this._valueProviderForDomain=t,this}_niceDomain(t,r){let[n,i]=t;return GKt(Cd.LINEAR).niceDomain([n,i])}_getUnboundedExtent(t){let r=this._getAllIncludedValues(t),n=this._defaultExtent();if(r.length!==0){let i=[NS.Utils.Math.min(r,n[0]),NS.Utils.Math.max(r,n[1])];n=this._niceDomain(i)}return n}_getAllIncludedValues(t=!1){let r=this._valueProviderForDomain?this._valueProviderForDomain():[];return this.extentOfValues(r)}extentOfValues(t){let r=t.filter(o=>NS.Utils.Math.isValidNumber(o)),n=r;if(this.ignoreOutlier()){let o=r.sort((l,c)=>l-c),a=la(o,.05),s=la(o,.95);n=r.filter(l=>l>=a&&l<=s)}let i=sa(n);return i[0]==null||i[1]==null?[]:i}ignoreOutlier(t){return typeof t=="boolean"?(this._ignoreOutlier=t,this):this._ignoreOutlier}};var CB=Ee(Sl(),1);var WKt=Ee(Sl(),1),EB=class extends WKt.QuantitativeScale{constructor(){super(...arguments),this._ignoreOutlier=!1}setValueProviderForDomain(t){return this._valueProviderForDomain=t,this}ignoreOutlier(t){return typeof t=="boolean"?(this._ignoreOutlier=t,this):this._ignoreOutlier}_getAllIncludedValues(t=!1){let r=this._valueProviderForDomain?this._valueProviderForDomain():[];return this.extentOfValues(r)}};var TB=Math.pow(2,-1074);function S4(e){return Math.log10(e)}function tst(e){return Math.pow(10,e)}var AB=class extends EB{constructor(){super(),this._d3LogScale=cc(),this.padProportion(.2)}scale(t){return t<=0?NaN:this._d3LogScale(t)}invert(t){return this._d3LogScale.invert(t)}scaleTransformation(t){return this.scale(t)}invertedTransformation(t){return this.invert(t)}getTransformationDomain(){return this.domain()}setTransformationDomain(t){this.domain(t)}getTransformationExtent(){return this._getUnboundedExtent(!0)}_getDomain(){return this._untransformedDomain}_setDomain(t){this._untransformedDomain=t;let[r,n]=t;super._setDomain([Math.max(TB,r),n])}_niceDomain(t,r){let[n,i]=t,o=Math.max(S4(TB),S4(n)),a=S4(i),s=a-o,l=s?s*this.padProportion():1;return[tst(Math.max(S4(TB),o-l)),tst(a+l)]}_getUnboundedExtent(t){let r=this._getAllIncludedValues(t),n=this._defaultExtent();if(r.length!==0){let i=[CB.Utils.Math.min(r,n[0]),CB.Utils.Math.max(r,n[1])];n=this._niceDomain(i)}return n}_getAllIncludedValues(t=!1){return super._getAllIncludedValues().map(n=>n>0?n:TB)}_defaultExtent(){return[1,10]}_backingScaleDomain(t){return t==null?this._d3LogScale.domain():(this._d3LogScale.domain(t),this)}_getRange(){return this._d3LogScale.range()}_setRange(t){this._d3LogScale.range(t)}defaultTicks(){return this._d3LogScale.ticks(1)}ticks(){return this._d3LogScale.ticks()}extentOfValues(t){let r=t.filter(o=>CB.Utils.Math.isValidNumber(o)&&o>0),n=r;if(this.ignoreOutlier()){let a=r.map(S4).sort((c,u)=>c-u),s=la(a,.05),l=la(a,.95);n=a.filter(c=>c>=s&&c<=l).map(tst)}let i=sa(n);return i[0]==null||i[1]==null?[]:i}};var Ad=Ee(Sl(),1);var i0=Ee(Sl(),1),PB=class extends i0.Components.SelectionBoxLayer{constructor(t,r,n){super(),this.easeFn=bs,this._animationTime=750,this.xScale(t),this.yScale(r),this._dragInteraction=new i0.Interactions.Drag,this._doubleClickInteraction=new i0.Interactions.Click,this.setupCallbacks(),this.unzoomMethod=n,this.onDetach(()=>{this._doubleClickInteraction.detachFrom(this),this._dragInteraction.detachFrom(this)}),this.onAnchor(()=>{this._doubleClickInteraction.attachTo(this),this._dragInteraction.attachTo(this)})}interactionStart(t){this.onStart=t}interactionEnd(t){this.onEnd=t}dragInteraction(){return this._dragInteraction}setupCallbacks(){let t=!1;this._dragInteraction.onDragStart(r=>{this.bounds({topLeft:r,bottomRight:r}),this.onStart()}),this._dragInteraction.onDrag((r,n)=>{this.bounds({topLeft:r,bottomRight:n}),this.boxVisible(!0),t=!0}),this._dragInteraction.onDragEnd((r,n)=>{this.boxVisible(!1),this.bounds({topLeft:r,bottomRight:n}),t?this.zoom():this.onEnd(),t=!1}),this._doubleClickInteraction.onDoubleClick(this.unzoom.bind(this))}animationTime(t){if(t==null)return this._animationTime;if(t<0)throw new Error("animationTime cannot be negative");return this._animationTime=t,this}ease(t){if(typeof t!="function")throw new Error("ease function must be a function");return(t(0)!==0||t(1)!==1)&&i0.Utils.Window.warn("Easing function does not maintain invariant f(0)==0 && f(1)==1. Bad behavior may result."),this.easeFn=t,this}zoom(){let t=this.xExtent()[0].valueOf(),r=this.xExtent()[1].valueOf(),n=this.yExtent()[1].valueOf(),i=this.yExtent()[0].valueOf();t===r||n===i||this.interpolateZoom(t,r,n,i)}unzoom(){let t=this.xScale();t._domainMin=null,t._domainMax=null;let r=t._getExtent();this.xScale().domain(r),this.unzoomMethod()}isZooming(t){this._dragInteraction.enabled(!t),this._doubleClickInteraction.enabled(!t)}interpolateZoom(t,r,n,i){let o=this.xScale().domain()[0].valueOf(),a=this.xScale().domain()[1].valueOf(),s=this.yScale().domain()[0].valueOf(),l=this.yScale().domain()[1].valueOf(),c=this.easeFn,u=(p,d,g)=>zi(p,d)(c(g));this.isZooming(!0);let h=Date.now(),f=()=>{let d=Date.now()-h,g=this._animationTime===0?1:Math.min(1,d/this._animationTime),_=u(o,t,g),y=u(a,r,g),x=u(s,n,g),b=u(l,i,g);this.xScale().domain([_,y]),this.yScale().domain([x,b]),g<1?i0.Utils.DOM.requestAnimationFramePolyfill(f):(this.onEnd(),this.isZooming(!1))};f()}};var ba;(function(e){e[e.NONE=0]="NONE",e[e.DRAG_ZOOMING=1]="DRAG_ZOOMING",e[e.PANNING=2]="PANNING"})(ba||(ba={}));var Ff=class extends Ad.Components.Group{constructor(t,r,n){super(),this.state=ba.NONE,this.panStartCallback=new Ad.Utils.CallbackSet,this.panEndCallback=new Ad.Utils.CallbackSet,this.panZoom=new Ad.Interactions.PanZoom(t,r),this.panZoom.dragInteraction().mouseFilter(o=>Ff.isPanKey(o)&&o.button===0),this.panZoom.wheelFilter(this.canScrollZoom),this.dragZoomLayer=new PB(t,r,n),this.dragZoomLayer.dragInteraction().mouseFilter(o=>!Ff.isPanKey(o)&&o.button===0),this.append(this.dragZoomLayer);let i=this.onWheel.bind(this);this.onAnchor(()=>{this._mouseDispatcher=Ad.Dispatchers.Mouse.getDispatcher(this),this._mouseDispatcher.onWheel(i),this.panZoom.attachTo(this)}),this.onDetach(()=>{this.panZoom.detachFrom(this),this._mouseDispatcher&&(this._mouseDispatcher.offWheel(i),this._mouseDispatcher=null)}),this.panZoom.dragInteraction().onDragStart(()=>{this.state==ba.NONE&&this.setState(ba.PANNING)}),this.panZoom.dragInteraction().onDragEnd(()=>{this.state==ba.PANNING&&this.setState(ba.NONE)}),this.dragZoomLayer.dragInteraction().onDragStart(()=>{this.state==ba.NONE&&this.setState(ba.DRAG_ZOOMING)}),this.dragZoomLayer.dragInteraction().onDragEnd(()=>{this.state==ba.DRAG_ZOOMING&&this.setState(ba.NONE)})}onWheel(t,r){if(this.canScrollZoom(r))return;let n=this.element();if(!n.select(".help").empty())return;let i=n.append("div").classed("help",!0);i.append("span").text("Alt + Scroll to Zoom"),i.on("animationend",()=>void i.remove())}static isPanKey(t){return Boolean(t.altKey)||Boolean(t.shiftKey)}canScrollZoom(t){return t.altKey}setState(t){if(this.state==t)return;let r=this.state;this.state=t,this.root().removeClass(this.stateClassName(r)),this.root().addClass(this.stateClassName(t)),r==ba.PANNING&&this.panEndCallback.callCallbacks(),t==ba.PANNING&&this.panStartCallback.callCallbacks()}stateClassName(t){switch(t){case ba.PANNING:return"panning";case ba.DRAG_ZOOMING:return"drag-zooming";case ba.NONE:default:return""}}onPanStart(t){this.panStartCallback.add(t)}onPanEnd(t){this.panEndCallback.add(t)}onScrollZoom(t){this.panZoom.onZoomEnd(t)}onDragZoomStart(t){this.dragZoomLayer.interactionStart(t)}onDragZoomEnd(t){this.dragZoomLayer.interactionEnd(t)}};var IB;(function(e){e[e.TEXT=0]="TEXT",e[e.DOM=1]="DOM"})(IB||(IB={}));var Bf;(function(e){e.LOG="log",e.LINEAR="linear"})(Bf||(Bf={}));var YKt=20,DS=class{constructor(t,r,n,i,o,a,s,l,c,u,h){this.dirtyDatasets=new Set,this.seriesNames=[],this.name2datasets={},this.colorScale=i,this.tooltip=o,this.datasets=[],this._ignoreYOutliers=!1,this.lastPointsDataset=new Mn.Dataset,this.nanDataset=new Mn.Dataset,this.yValueAccessor=r,this.symbolFunction=u,this._defaultXRange=l,this._defaultYRange=c,this.tooltipColumns=a,this.buildChart(t,r,n,s,h)}buildChart(t,r,n,i,o){this.destroy();let a=t();this.xAccessor=a.accessor,this.xScale=a.scale,this.xAxis=a.axis,this.xAxis.margin(1).tickLabelPadding(3),o&&this.xAxis.formatter(o),this.yScale=DS.getYScaleFromType(n),this.yScale.setValueProviderForDomain(()=>this.getValuesForYAxisDomainCompute()),this.yAxis=new Mn.Axes.Numeric(this.yScale,"left");let s=Wu(mB);this.yAxis.margin(0).tickLabelPadding(5).formatter(s),this.yAxis.usesTextWidthApproximation(!0),this.fillArea=i;let l=new Ff(this.xScale,this.yScale,()=>this.resetDomain());this.tooltipInteraction=this.createTooltipInteraction(l),this.tooltipPointsComponent=new Mn.Component;let c=this.buildPlot(this.xScale,this.yScale,i);this.gridlines=new Mn.Components.Gridlines(this.xScale,this.yScale);let u=null;n!==Bf.LOG&&(u=new Mn.Components.GuideLineLayer("horizontal"),u.scale(this.yScale).value(0));let h=new Mn.Components.GuideLineLayer("vertical");h.scale(this.xScale).value(0),this.center=new Mn.Components.Group([this.gridlines,u,h,c,this.tooltipPointsComponent,l]),this.center.addClass("main"),this.outer=new Mn.Components.Table([[this.yAxis,this.center],[null,this.xAxis]])}buildPlot(t,r,n){n&&(this.marginAreaPlot=new Mn.Plots.Area,this.marginAreaPlot.x(this.xAccessor,t),this.marginAreaPlot.y(n.higherAccessor,r),this.marginAreaPlot.y0(n.lowerAccessor),this.marginAreaPlot.attr("fill",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.marginAreaPlot.attr("fill-opacity",.3),this.marginAreaPlot.attr("stroke-width",0)),this.smoothedAccessor=c=>c.smoothed;let i=new Mn.Plots.Line;i.x(this.xAccessor,t),i.y(this.yValueAccessor,r),i.attr("stroke",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.linePlot=i,this.setupTooltips(i);let o=new Mn.Plots.Line;if(o.x(this.xAccessor,t),o.y(this.smoothedAccessor,r),o.attr("stroke",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.smoothLinePlot=o,this.symbolFunction){let c=new Mn.Plots.Scatter;c.x(this.xAccessor,t),c.y(this.yValueAccessor,r),c.attr("fill",(u,h,f)=>this.colorScale.scale(f.metadata().name)),c.attr("opacity",1),c.size(_B*2),c.symbol((u,h,f)=>this.symbolFunction(f.metadata().name)),this.markersScatterPlot=c}let a=new Mn.Plots.Scatter;a.x(this.xAccessor,t),a.y(this.yValueAccessor,r),a.attr("fill",c=>this.colorScale.scale(c.name)),a.attr("opacity",1),a.size(_B*2),a.datasets([this.lastPointsDataset]),this.scatterPlot=a;let s=new Mn.Plots.Scatter;s.x(this.xAccessor,t),s.y(c=>c.displayY,r),s.attr("fill",c=>this.colorScale.scale(c.name)),s.attr("opacity",1),s.size(OKt*2),s.datasets([this.nanDataset]),s.symbol(Mn.SymbolFactories.triangle),this.nanDisplay=s;let l=[s,a,o,i];return this.marginAreaPlot&&l.push(this.marginAreaPlot),this.markersScatterPlot&&l.push(this.markersScatterPlot),new Mn.Components.Group(l)}ignoreYOutliers(t){t!==this._ignoreYOutliers&&(this._ignoreYOutliers=t,this.updateSpecialDatasets(),this.yScale.ignoreOutlier(t),this.resetYDomain())}getValuesForYAxisDomainCompute(){let t=this.getAccessorsForComputingYRange(),r=n=>t.map(i=>n.data().map(o=>i(o,-1,n)));return Fs.flattenDeep(this.datasets.map(r)).filter(isFinite)}updateSpecialDatasets(){let t=this.getYAxisAccessor(),r=this.datasets.map(o=>{let a=null,s=o.data().filter(l=>!isNaN(t(l,-1,o)));if(s.length>0){let l=s.length-1;a=s[l],a.name=o.metadata().name,a.relative=n0(a,-1,o)}return a}).filter(o=>o!=null);this.lastPointsDataset.data(r),this.markersScatterPlot&&this.markersScatterPlot.datasets(this.datasets.map(this.createSampledDatasetForMarkers));let n=o=>{let a=null,s=o.data(),l=0;for(;l<s.length&&a==null;)isNaN(t(s[l],-1,o))||(a=t(s[l],-1,o)),l++;a==null&&(a=0);let c=[];for(l=0;l<s.length;l++)isNaN(t(s[l],-1,o))?(s[l].name=o.metadata().name,s[l].displayY=a,s[l].relative=n0(s[l],-1,o),c.push(s[l])):a=t(s[l],-1,o);return c},i=Fs.flatten(this.datasets.map(n));this.nanDataset.data(i)}resetDomain(){this.resetXDomain(),this.resetYDomain()}resetXDomain(){let t;if(this._defaultXRange!=null)t=this._defaultXRange;else{let r=this.xScale;r._domainMin=null,r._domainMax=null,t=r._getExtent()}this.xScale.domain(t)}resetYDomain(){this._defaultYRange!=null?this.yScale.domain(this._defaultYRange):(this.yScale.autoDomain(),this.yScale.domain(this.yScale.domain()))}getAccessorsForComputingYRange(){let t=[this.getYAxisAccessor()];return this.fillArea&&t.push(this.fillArea.lowerAccessor,this.fillArea.higherAccessor),t}getYAxisAccessor(){return this.smoothingEnabled?this.smoothedAccessor:this.yValueAccessor}createTooltipInteraction(t){let r=new SB,n=()=>{r.enabled(!1),this.hideTooltips()},i=()=>r.enabled(!0);return t.onPanStart(n),t.onDragZoomStart(n),t.onPanEnd(i),t.onDragZoomEnd(i),t.onScrollZoom(()=>this.updateTooltipContent(this._lastMousePosition)),r.onPointerMove(o=>{this._lastMousePosition=o,this.updateTooltipContent(o)}),r.onPointerExit(()=>this.hideTooltips()),r}updateTooltipContent(t){!this.linePlot||(window.cancelAnimationFrame(this._tooltipUpdateAnimationFrame),this._tooltipUpdateAnimationFrame=window.requestAnimationFrame(()=>{let r={x:t.x,y:t.y},n=this.gridlines.content().node().getBBox(),i=this.linePlot.datasets().map(l=>this.findClosestPoint(r,l)).filter(l=>Boolean(l)),o=Mn.Utils.DOM.intersectsBBox,a=i.filter(l=>o(l.x,l.y,n)||isNaN(this.yValueAccessor(l.datum,0,l.dataset))),s=a.filter(l=>!isNaN(this.yValueAccessor(l.datum,0,l.dataset)));if(i.length!==0){this.scatterPlot.attr("display","none");let l=this.tooltipPointsComponent.content().selectAll(".point").data(s,c=>c.dataset.metadata().name);l.enter().append("circle").classed("point",!0),l.attr("r",_B).attr("cx",c=>c.x).attr("cy",c=>c.y).style("stroke","none").attr("fill",c=>this.colorScale.scale(c.dataset.metadata().name)),l.exit().remove(),this.drawTooltips(a,r,this.tooltipColumns)}else this.hideTooltips()}))}hideTooltips(){window.cancelAnimationFrame(this._tooltipUpdateAnimationFrame),this.tooltip.hide(),this.scatterPlot.attr("display","block"),this.tooltipPointsComponent.content().selectAll(".point").remove()}setupTooltips(t){t.onDetach(()=>{this.tooltipInteraction.detachFrom(t),this.tooltipInteraction.enabled(!1)}),t.onAnchor(()=>{this.tooltipInteraction.attachTo(t),this.tooltipInteraction.enabled(!0)})}drawTooltips(t,r,n){if(!t.length){this.tooltip.hide();return}let{colorScale:i}=this;n=[{title:"",static:!1,evalType:IB.DOM,evaluate(d){return Ht(this).select("span").style("background-color",()=>i.scale(d.dataset.metadata().name)),""},enter(d){Ht(this).append("span").classed("swatch",!0).style("background-color",()=>i.scale(d.dataset.metadata().name))}},...n];let a=Wu(r0),s=d=>Math.pow(d.x-r.x,2)+Math.pow(d.y-r.y,2),l=Fs.min(t.map(s)),c=this.smoothingEnabled?this.smoothedAccessor:this.yValueAccessor;this.tooltipSortingMethod==="ascending"?t=Fs.sortBy(t,d=>c(d.datum,-1,d.dataset)):this.tooltipSortingMethod==="descending"?t=Fs.sortBy(t,d=>c(d.datum,-1,d.dataset)).reverse():this.tooltipSortingMethod==="nearest"?t=Fs.sortBy(t,s):t=t.slice(0).reverse();let u=this,h=Ht(this.tooltip.content()).select("table"),f=h.select("thead").selectAll("th").data(n,(d,g,_)=>d.title);f.enter().append("th").text(d=>d.title).nodes(),f.exit().remove();let p=h.select("tbody").selectAll("tr").data(t,(d,g,_)=>d.dataset.metadata().name);p.classed("distant",d=>{let g=d.dataset.data()[0],_=Fs.last(d.dataset.data()),y=this.xScale.scale(this.xAccessor(g,0,d.dataset)),x=this.xScale.scale(this.xAccessor(_,0,d.dataset)),b=this.smoothingEnabled?d.datum.smoothed:this.yValueAccessor(d.datum,0,d.dataset);return r.x<y||r.x>x||isNaN(b)}).classed("closest",d=>s(d)===l).each(function(d){u.drawTooltipRow(this,n,d)}).order(),p.exit().remove(),p.enter().append("tr").each(function(d){u.drawTooltipRow(this,n,d)}).nodes(),this.tooltip.updateAndPosition(this.targetSVG.node())}drawTooltipRow(t,r,n){let i=this,o=Ht(t).selectAll("td").data(r);o.each(function(a){a.static||i.drawTooltipColumn.call(i,this,a,n)}),o.exit().remove(),o.enter().append("td").each(function(a){"enter"in a&&a.enter.call(this,n),i.drawTooltipColumn.call(i,this,a,n)})}drawTooltipColumn(t,r,n){let{smoothingEnabled:i}=this;"evalType"in r&&r.evalType==IB.DOM?r.evaluate.call(t,n,{smoothingEnabled:i}):Ht(t).text(r.evaluate.call(t,n,{smoothingEnabled:i}))}findClosestPoint(t,r){let n=r.data().map((s,l)=>this.xScale.scale(this.xAccessor(s,l,r))),i=Fs.sortedIndex(n,t.x);if(n.length==0)return null;if(i===n.length)i=i-1;else if(i!==0){let s=Math.abs(n[i-1]-t.x),l=Math.abs(n[i]-t.x);i=s<l?i-1:i}let o=r.data()[i],a=this.smoothingEnabled?this.smoothedAccessor(o,i,r):this.yValueAccessor(o,i,r);return{x:n[i],y:this.yScale.scale(a),datum:o,dataset:r}}resmoothDataset(t){let r=t.data(),n=this.smoothingWeight,i=r.length>0?0:NaN,o=0,a=r.map((l,c)=>this.yValueAccessor(l,c,t)),s=a.every(l=>l==a[0]);r.forEach((l,c)=>{let u=a[c];if(s||!Number.isFinite(u))l.smoothed=u;else{i=i*n+(1-n)*u,o++;let h=1;n!==1&&(h=1-Math.pow(n,o)),l.smoothed=i/h}})}getDataset(t){return this.name2datasets[t]===void 0&&(this.name2datasets[t]=new Mn.Dataset([],{name:t,meta:null})),this.name2datasets[t]}static getYScaleFromType(t){if(t===Bf.LOG)return new AB;if(t===Bf.LINEAR)return new MB;throw new Error("Unrecognized yScale type "+t)}setVisibleSeries(t){this.disableChanges(),t=t.sort(),t.reverse(),this.seriesNames=t}disableChanges(){this.dirtyDatasets.size||(this.linePlot.datasets([]),this.smoothLinePlot&&this.smoothLinePlot.datasets([]),this.marginAreaPlot&&this.marginAreaPlot.datasets([]))}commitChanges(){this.datasets=this.seriesNames.map(t=>this.getDataset(t)),[...this.dirtyDatasets].forEach(t=>{this.smoothingEnabled&&this.resmoothDataset(this.getDataset(t))}),this.updateSpecialDatasets(),this.linePlot.datasets(this.datasets),this.smoothingEnabled&&this.smoothLinePlot.datasets(this.datasets),this.marginAreaPlot&&this.marginAreaPlot.datasets(this.datasets),this.measureBBoxAndMaybeInvalidateLayoutInRaf(),this.dirtyDatasets.clear()}createSampledDatasetForMarkers(t){let r=t.data();if(r.length<=YKt)return t;let n=Math.ceil(r.length/YKt),i=new Array(Math.floor(r.length/n));for(let o=0,a=0;o<i.length;o++,a+=n)i[o]=r[a];return new Mn.Dataset(i,t.metadata())}setSeriesData(t,r){this.disableChanges(),this.getDataset(t).data(r),this.dirtyDatasets.add(t)}setSeriesMetadata(t,r){this.disableChanges(),this.getDataset(t).metadata(yh(ia({},this.getDataset(t).metadata()),{meta:r})),this.dirtyDatasets.add(t)}smoothingUpdate(t){this.smoothingWeight=t,this.datasets.forEach(r=>this.resmoothDataset(r)),this.smoothingEnabled||(this.linePlot.addClass("ghost"),this.scatterPlot.y(this.smoothedAccessor,this.yScale),this.smoothingEnabled=!0,this.smoothLinePlot.datasets(this.datasets)),this.markersScatterPlot&&this.markersScatterPlot.y(this.getYAxisAccessor(),this.yScale),this.updateSpecialDatasets()}smoothingDisable(){this.smoothingEnabled&&(this.linePlot.removeClass("ghost"),this.scatterPlot.y(this.yValueAccessor,this.yScale),this.smoothLinePlot.datasets([]),this.smoothingEnabled=!1,this.updateSpecialDatasets()),this.markersScatterPlot&&this.markersScatterPlot.y(this.getYAxisAccessor(),this.yScale)}setColorScale(t){this.colorScale=t}setTooltipColumns(t){this.tooltipColumns=t}setTooltipSortingMethod(t){this.tooltipSortingMethod=t}renderTo(t){this.targetSVG=t,this.outer.renderTo(t),this._defaultXRange!=null&&this.resetXDomain(),this._defaultYRange!=null&&this.resetYDomain(),this.measureBBoxAndMaybeInvalidateLayoutInRaf()}redraw(){window.cancelAnimationFrame(this._redrawRaf),this._redrawRaf=window.requestAnimationFrame(()=>{this.measureBBoxAndMaybeInvalidateLayout(),this.outer.redraw()})}measureBBoxAndMaybeInvalidateLayoutInRaf(){window.cancelAnimationFrame(this._invalidateLayoutRaf),this._invalidateLayoutRaf=window.requestAnimationFrame(()=>{this.measureBBoxAndMaybeInvalidateLayout()})}measureBBoxAndMaybeInvalidateLayout(){if(this._lastDrawBBox){let{width:t}=this._lastDrawBBox,{width:r}=this.targetSVG.node().getBoundingClientRect();t==0&&t<r&&this.outer.invalidateCache()}this._lastDrawBBox=this.targetSVG.node().getBoundingClientRect()}destroy(){window.cancelAnimationFrame(this._redrawRaf),window.cancelAnimationFrame(this._invalidateLayoutRaf),this.outer&&this.outer.destroy()}onAnchor(t){this.outer&&this.outer.onAnchor(t)}isDataFitToDomain(){return t(this.xAxis.getScale())&&t(this.yAxis.getScale());function t(r){let n=r.getTransformationDomain(),i=r.getTransformationExtent();return i[0]===n[0]&&i[1]===n[1]}}};var XKt=Ee(Oe(),1),nst=Ee(Sl(),1);ys({moduleName:"plottable-style",styleContent:`
    
.plottable-colors-0 {
  background-color: #5279c7; /* INDIGO */
}

.plottable-colors-1 {
  background-color: #fd373e; /* CORAL_RED */
}

.plottable-colors-2 {
  background-color: #63c261; /* FERN */
}

.plottable-colors-3 {
  background-color: #fad419; /* BRIGHT_SUN */
}

.plottable-colors-4 {
  background-color: #2c2b6f; /* JACARTA */
}

.plottable-colors-5 {
  background-color: #ff7939; /* BURNING_ORANGE */
}

.plottable-colors-6 {
  background-color: #db2e65; /* CERISE_RED */
}

.plottable-colors-7 {
  background-color: #99ce50; /* CONIFER */
}

.plottable-colors-8 {
  background-color: #962565; /* ROYAL_HEATH */
}

.plottable-colors-9 {
  background-color: #06cccc; /* ROBINS_EGG_BLUE */
}

/**
 * User-supplied renderTo element.
 */
.plottable {
  display: block; /* must be block elements for width/height calculations to work in Firefox. */
  pointer-events: visibleFill;
  position: relative;
  /**
   * Pre 3.0, users could set the dimension of the root element in two ways: either using CSS
   * (inline or through a stylesheet), or using the SVG width/height attributes. By default, we
   * set the SVG width/height attributes to 100%.
   *
   * Post 3.0 the root element is always a normal div and the only way to set the dimensions is
   * to use CSS. To replicate the "100%-by-default" behavior, we apply width/height 100%.
   */
  width: 100%;
  height: 100%;
}

/**
 * The _element that roots each Component's DOM.
 */
.plottable .component {
  /* Allow components to be positioned with explicit left/top/width/height styles */
  position: absolute;
}

.plottable .background-container,
.plottable .content,
.plottable .foreground-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

/**
 * Don't allow svg elements above the content to steal events
 */
.plottable .foreground-container {
  pointer-events: none;
}

.plottable .component-overflow-hidden {
  overflow: hidden;
}

.plottable .component-overflow-visible {
  overflow: visible;
}

.plottable .plot-canvas-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.plottable .plot-canvas {
  width: 100%;
  height: 100%;
  /**
   * Play well with deferred rendering.
   */
  transform-origin: 0px 0px 0px;
}

.plottable text {
  text-rendering: geometricPrecision;
}

.plottable .label text {
  fill: #32313F;
}

.plottable .bar-label-text-area text,
.plottable .scatter-label-text-area text {
  font-size: 12px;
}

.plottable .label-area text {
  fill: #32313F;
  font-size: 14px;
}

.plottable .light-label text {
  fill: white;
}

.plottable .dark-label text {
  fill: #32313F;
}

.plottable .off-bar-label text {
  fill: #32313F;
}

.plottable .stacked-bar-label text {
  fill: #32313F;
  font-style: normal;
}

.plottable .stacked-bar-plot .off-bar-label {
  /* HACKHACK #2795: correct off-bar label logic to be implemented on StackedBar */
  visibility: hidden !important;
}

.plottable .axis-label text {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: normal;
  text-transform: uppercase;
}

.plottable .title-label text {
  font-size: 20px;
  font-weight: bold;
}

.plottable .axis line.baseline {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis line.tick-mark {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis text {
  fill: #32313F;
  font-size: 12px;
  font-weight: 200;
  line-height: normal;
}

.plottable .axis .annotation-circle {
  fill: white;
  stroke-width: 1px;
  stroke: #CCC;
}

.plottable .axis .annotation-line {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis .annotation-rect {
  stroke: #CCC;
  stroke-width: 1px;
  fill: white;
}

.plottable .bar-plot .baseline {
  stroke: #999;
}

.plottable .gridlines line {
  stroke: #3C3C3C; /* hackhack: gridlines should be solid; see #820 */
  opacity: 0.25;
  stroke-width: 1px;
}

.plottable .selection-box-layer .selection-area {
  fill: black;
  fill-opacity: 0.03;
  stroke: #CCC;
}
/* DragBoxLayer */
.plottable .drag-box-layer.x-resizable .drag-edge-lr {
  cursor: ew-resize;
}
.plottable .drag-box-layer.y-resizable .drag-edge-tb {
  cursor: ns-resize;
}

.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tl {
  cursor: nwse-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tr {
  cursor: nesw-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-bl {
  cursor: nesw-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-br {
  cursor: nwse-resize;
}

.plottable .drag-box-layer.movable .selection-area {
  cursor: move; /* IE fallback */
  cursor: -moz-grab;
  cursor: -webkit-grab;
  cursor: grab;
}

.plottable .drag-box-layer.movable .selection-area:active {
  cursor: -moz-grabbing;
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
/* /DragBoxLayer */

.plottable .guide-line-layer line.guide-line {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .drag-line-layer.enabled.vertical line.drag-edge {
  cursor: ew-resize;
}

.plottable .drag-line-layer.enabled.horizontal line.drag-edge {
  cursor: ns-resize;
}

.plottable .legend text {
  fill: #32313F;
  font-size: 12px;
  font-weight: bold;
  line-height: normal;
}

.plottable .interpolated-color-legend rect.swatch-bounding-box {
  fill: none;
  stroke: #CCC;
  stroke-width: 1px;
  pointer-events: none;
}

.plottable .waterfall-plot line.connector {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .pie-plot .arc.outline {
  stroke-linejoin: round;
}

`});var o0;(function(e){e.GROUP="G",e.DIV="DIV",e.SVG="SVG",e.TEXT="TEXT"})(o0||(o0={}));var est=class{constructor(t){this.uniqueId=0,this.root=t}exportAsString(){let t=this.convert(this.root);if(!t)return"";let r=this.createRootSvg();return r.appendChild(t),r.outerHTML}createUniqueId(t){return`${t}_${this.uniqueId++}`}getSize(){return this.root.getBoundingClientRect()}createRootSvg(){let t=document.createElement("svg"),r=this.getSize();return t.setAttributeNS("svg","viewBox",`0 0 ${r.width} ${r.height}`),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t}createConvertedNode(t){let r=t.nodeName.toUpperCase();if(t.nodeType==Node.ELEMENT_NODE&&(r==o0.DIV||r==o0.SVG)){let n=document.createElement(o0.GROUP),i=window.getComputedStyle(t),o=parseInt(i.left,10),a=parseInt(i.top,10);if(o||a){let s=this.createUniqueId("clip");n.setAttribute("transform",`translate(${o}, ${a})`),n.setAttribute("clip-path",`url(#${s})`);let l=parseInt(i.width,10),c=parseInt(i.height,10),u=document.createElement("rect");u.setAttribute("width",String(l)),u.setAttribute("height",String(c));let h=document.createElementNS("svg","clipPath");h.id=s,h.appendChild(u),n.appendChild(h)}return n}else return t.cloneNode()}convert(t){let r=this.createConvertedNode(t);return Array.from(t.childNodes).map(i=>this.convert(i)).filter(Boolean).forEach(i=>{r.appendChild(i)}),r.nodeName.toUpperCase()==o0.GROUP&&!r.hasChildNodes()||this.shouldOmitNode(t)?null:this.stripClass(this.transferStyle(t,r))}stripClass(t){return t.nodeType==Node.ELEMENT_NODE&&t.removeAttribute("class"),t}transferStyle(t,r){if(r.nodeType!=Node.ELEMENT_NODE)return r;let n=r,i=r.nodeName.toUpperCase(),o=window.getComputedStyle(t);return i==o0.TEXT&&Object.assign(n.style,{fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight}),i!=o0.GROUP&&(n.setAttribute("fill",o.fill),n.setAttribute("stroke",o.stroke),n.setAttribute("stroke-width",o.strokeWidth)),o.opacity!="1"&&n.setAttribute("opacity",o.opacity),r}shouldOmitNode(t){return!1}},LB=class extends est{shouldOmitNode(t){return t.nodeType==Node.ELEMENT_NODE?t.classList.contains("scatter-plot"):!1}};ys({moduleName:"vz-pan-zoom-style",styleContent:`
    .help {
      align-items: center;
      animation-delay: 1s;
      animation-duration: 1s;
      animation-name: fade-out;
      background: rgba(30, 30, 30, 0.6);
      bottom: 0;
      color: #fff;
      display: flex;
      justify-content: center;
      left: 0;
      opacity: 1;
      padding: 20px;
      pointer-events: none;
      position: absolute;
      right: 0;
      top: 0;
    }

    .help > span {
      white-space: normal;
    }

    @keyframes fade-out {
      0% {
        opacity: 1;
      }

      100% {
        opacity: 0;
      }
    }
  `});var Oqe=Wu(r0),jKt=e=>isNaN(e)?"NaN":Oqe(e),ist=[{title:"Name",evaluate:e=>e.dataset.metadata().name},{title:"Smoothed",evaluate(e,t){let{smoothingEnabled:r}=t;return jKt(r?e.datum.smoothed:e.datum.scalar)}},{title:"Value",evaluate:e=>jKt(e.datum.scalar)},{title:"Step",evaluate:e=>b4(e.datum.step)},{title:"Time",evaluate:e=>yB(e.datum.wall_time)},{title:"Relative",evaluate:e=>vB(n0(e.datum,-1,e.dataset))}],Zr=class extends Gt(mt){constructor(){super(...arguments),this.colorScale=new nst.Scales.Color().range(jb.slice(0)),this.smoothingEnabled=!1,this.smoothingWeight=.6,this.xType=null,this.xComponentsCreationMethod=null,this.yValueAccessor=t=>t.scalar,this.tooltipColumns=ist,this.yScaleType=Bf.LINEAR,this.ignoreYOutliers=!1,this.tooltipSortingMethod="default",this.tooltipPosition=Wv.BOTTOM,this._visibleSeriesCache=[],this._seriesDataCache={},this._seriesMetadataCache={},this._makeChartAsyncCallbackId=null}ready(){super.ready(),this.scopeSubtree(this.$.chartdiv,!0)}attached(){let t={capture:!0,passive:!0};this._listen(this,"mousedown",this._onMouseDown.bind(this),t),this._listen(this,"mouseup",this._onMouseUp.bind(this),t),this._listen(window,"keydown",this._onKeyDown.bind(this),t),this._listen(window,"keyup",this._onKeyUp.bind(this),t)}detached(){this._makeChartAsyncCallbackId!==null&&(this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=null),this._chart&&(this._chart.destroy(),this._chart=void 0),this._listeners&&(this._listeners.forEach(({node:t,eventName:r,func:n,option:i})=>{t.removeEventListener(r,n,i)}),this._listeners.clear())}_listen(t,r,n,i={}){this._listeners||(this._listeners=new Set),this._listeners.add({node:t,eventName:r,func:n,option:i}),t.addEventListener(r,n,i)}_onKeyDown(t){this.toggleClass("pankey",Ff.isPanKey(t))}_onKeyUp(t){this.toggleClass("pankey",Ff.isPanKey(t))}_onMouseDown(t){this.toggleClass("mousedown",!0)}_onMouseUp(t){this.toggleClass("mousedown",!1)}isDataFitToDomain(){return this._chart?this._chart.isDataFitToDomain():!0}setVisibleSeries(t){XKt.isEqual(this._visibleSeriesCache,t)||(this._visibleSeriesCache=t)}setSeriesData(t,r){this._seriesDataCache[t]=r,this._chart&&this._chart.setSeriesData(t,r)}setSeriesMetadata(t,r){this._seriesMetadataCache[t]=r,this._chart&&this._chart.setSeriesMetadata(t,r)}commitChanges(){!this._chart||this._chart.commitChanges()}resetDomain(){this._chart&&this._chart.resetDomain()}redraw(){this._chart&&this._chart.redraw()}_makeChart(){this._makeChartAsyncCallbackId!==null&&(this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=null),this._makeChartAsyncCallbackId=this.async(function(){this._makeChartAsyncCallbackId=null;let t=this.xComponentsCreationMethod;if(!this.xType&&!t?t=Xat:this.xType&&(t=()=>xB(this.xType)),!(!t||!this.yValueAccessor||!this.tooltipColumns)){var r=new DS(t,this.yValueAccessor,this.yScaleType,this.colorScale,this.$.tooltip,this.tooltipColumns,this.fillArea,this.defaultXRange,this.defaultYRange,this.symbolFunction,this.xAxisFormatter),n=Ht(this.$.chartdiv);r.renderTo(n),this._chart&&this._chart.destroy(),this._chart=r,this._chart.onAnchor(()=>this.fire("chart-attached"))}},350)}_reloadFromCache(){!this._chart||(this._visibleSeriesCache.forEach(t=>{this._chart.setSeriesData(t,this._seriesDataCache[t]||[])}),this._visibleSeriesCache.filter(t=>this._seriesMetadataCache[t]).forEach(t=>{this._chart.setSeriesMetadata(t,this._seriesMetadataCache[t])}),this._chart.setVisibleSeries(this._visibleSeriesCache),this._chart.commitChanges())}_smoothingChanged(){!this._chart||(this.smoothingEnabled?this._chart.smoothingUpdate(this.smoothingWeight):this._chart.smoothingDisable())}_outliersChanged(){!this._chart||this._chart.ignoreYOutliers(this.ignoreYOutliers)}_colorScaleChanged(){!this._chart||(this._chart.setColorScale(this.colorScale),this._chart.redraw())}_tooltipColumnsChanged(){!this._chart||this._chart.setTooltipColumns(this.tooltipColumns)}_tooltipSortingMethodChanged(){!this._chart||this._chart.setTooltipSortingMethod(this.tooltipSortingMethod)}getExporter(){return new LB(this.$.chartdiv)}};Zr.template=Q`
    <div id="chartdiv"></div>
    <vz-chart-tooltip
      id="tooltip"
      position="[[tooltipPosition]]"
      content-component-name="vz-line-chart-tooltip"
    ></vz-chart-tooltip>
    <style include="plottable-style"></style>
    <style include="vz-pan-zoom-style"></style>
    <style>
      :host {
        -moz-user-select: none;
        -webkit-user-select: none;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        outline: none;
        position: relative;
        white-space: nowrap;
      }
      div {
        -webkit-user-select: none;
        -moz-user-select: none;
        flex-grow: 1;
        flex-shrink: 1;
      }

      #chartdiv .main {
        contain: strict;
        cursor: crosshair;
      }

      :host(.pankey) #chartdiv :not(.drag-zooming) .main {
        cursor: -webkit-grab;
        cursor: grab;
      }

      :host(.mousedown) #chartdiv .panning .main {
        cursor: -webkit-grabbing;
        cursor: grabbing;
      }

      #chartdiv {
        contain: strict;
      }

      #chartdiv line.guide-line {
        stroke: #999;
        stroke-width: 1.5px;
      }
      #chartdiv:hover .main {
        will-change: transform;
      }

      .ghost {
        opacity: 0.2;
        stroke-width: 1px;
      }

      .plottable .axis text {
        fill: currentColor;
      }

      .plottable .gridlines line {
        stroke: var(--tb-secondary-text-color);
      }
    </style>
  `;E([A({type:Object}),w("design:type",nst.Scales.Color)],Zr.prototype,"colorScale",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"symbolFunction",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Zr.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Zr.prototype,"smoothingWeight",void 0);E([A({type:String}),w("design:type",Object)],Zr.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"xComponentsCreationMethod",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"xAxisFormatter",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"yValueAccessor",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"tooltipColumns",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"fillArea",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"defaultYRange",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"yScaleType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zr.prototype,"ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"tooltipSortingMethod",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"tooltipPosition",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_chart",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"_visibleSeriesCache",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_seriesDataCache",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_seriesMetadataCache",void 0);E([A({type:Number}),w("design:type",Object)],Zr.prototype,"_makeChartAsyncCallbackId",void 0);E([Bt("xComponentsCreationMethod","xType","yValueAccessor","yScaleType","isAttached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_makeChart",null);E([Bt("_chart","_visibleSeriesCache"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_reloadFromCache",null);E([Bt("smoothingEnabled","smoothingWeight","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_smoothingChanged",null);E([Bt("ignoreYOutliers","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_outliersChanged",null);E([Bt("colorScale"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_colorScaleChanged",null);E([Bt("tooltipColumns"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_tooltipColumnsChanged",null);E([Bt("tooltipSortingMethod","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_tooltipSortingMethodChanged",null);Zr=E([yt("vz-line-chart2")],Zr);var rst=class extends mt{};rst.template=Q`
    <div class="content">
      <table>
        <thead></thead>
        <tbody></tbody>
      </table>
    </div>
    <style>
      :host {
        pointer-events: none;
      }

      .content {
        background: rgba(0, 0, 0, 0.8);
        border-radius: 4px;
        color: #fff;
        overflow: hidden;
        pointer-events: none;
      }

      table {
        font-size: 13px;
        line-height: 1.4em;
        margin-top: 10px;
        padding: 8px;
      }

      thead {
        font-size: 14px;
      }

      tbody {
        font-size: 13px;
        line-height: 21px;
        white-space: nowrap;
      }

      td {
        padding: 0 5px;
      }

      .swatch {
        border-radius: 50%;
        display: block;
        height: 18px;
        width: 18px;
      }

      .closest .swatch {
        box-shadow: inset 0 0 0 2px #fff;
      }

      th {
        padding: 0 5px;
        text-align: left;
      }

      .distant td:not(.swatch) {
        opacity: 0.8;
      }

      .ghost {
        opacity: 0.2;
        stroke-width: 1px;
      }
    </style>
  `;rst=E([yt("vz-line-chart-tooltip")],rst);var ost=[],zqe=0,Fqe=$Kt.throttle(function e(){if(ost.length==0)return;let t=ost.shift();t&&t.active&&(t.redraw(),t._maybeRenderedInBadState=!1),window.cancelAnimationFrame(zqe),window.requestAnimationFrame(e)},100),Vn=class extends kS(Gt(mt)){constructor(){super(...arguments),this._redrawRaf=null,this.active=!1,this.logScaleActive=!1,this.colorScale={scale:fn},this._resetDomainOnNextLoad=!0,this._maybeRenderedInBadState=!1}onLoadFinish(){this.commitChanges(),this.dataToLoad.length>0&&this._resetDomainOnNextLoad&&(this._resetDomainOnNextLoad=!1,this.getChart().resetDomain()),this.redraw()}disconnectedCallback(){super.disconnectedCallback(),this._redrawRaf!==null&&cancelAnimationFrame(this._redrawRaf)}exportAsSvgString(){return this.getChart().getExporter().exportAsString()}getChart(){return this.$.chart}resetDomain(){this.getChart().resetDomain()}setSeriesData(t,r){this.getChart().setSeriesData(t,r)}setSeriesMetadata(t,r){this.getChart().setSeriesMetadata(t,r)}commitChanges(){this.getChart().commitChanges()}redraw(){this._redrawRaf!==null&&cancelAnimationFrame(this._redrawRaf),this._redrawRaf=window.requestAnimationFrame(()=>{this.active?this.getChart().redraw():this._maybeRenderedInBadState=!0})}_loadKeyChanged(){this.reset(),this._resetDomainOnNextLoad=!0}_dataSeriesChanged(){this.getChart().setVisibleSeries(this.dataSeries)}_logScaleChanged(t){let r=this.getChart();r.yScaleType=t?Bf.LOG:Bf.LINEAR,this.redraw()}_fixBadStateWhenActive(){this.active&&this._maybeRenderedInBadState&&(ost.push(this),Fqe())}_onChartAttached(){this.active||(this._maybeRenderedInBadState=!0)}};Vn.template=Q`
    <div id="chart-and-spinner-container">
      <vz-line-chart2
        id="chart"
        data-loading$="[[dataLoading]]"
        data-loaded-once$="[[dataLoadedAtLeastOnce]]"
        color-scale="[[colorScale]]"
        default-x-range="[[defaultXRange]]"
        default-y-range="[[defaultYRange]]"
        fill-area="[[fillArea]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        on-chart-attached="_onChartAttached"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        symbol-function="[[symbolFunction]]"
        tooltip-columns="[[tooltipColumns]]"
        tooltip-position="[[tooltipPosition]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-components-creation-method="[[xComponentsCreationMethod]]"
        x-type="[[xType]]"
        y-value-accessor="[[yValueAccessor]]"
      ></vz-line-chart2>
      <template is="dom-if" if="[[dataLoading]]">
        <div id="loading-spinner-container">
          <paper-spinner-lite active=""></paper-spinner-lite>
        </div>
      </template>
    </div>
    <style>
      :host {
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
      }

      :host([_maybe-rendered-in-bad-state]) vz-line-chart {
        visibility: hidden;
      }

      #chart-and-spinner-container {
        display: flex;
        flex-grow: 1;
        position: relative;
      }

      #loading-spinner-container {
        align-items: center;
        bottom: 0;
        display: flex;
        display: flex;
        justify-content: center;
        left: 0;
        pointer-events: none;
        position: absolute;
        right: 0;
        top: 0;
      }

      vz-line-chart2 {
        -webkit-user-select: none;
        -moz-user-select: none;
      }

      vz-line-chart2[data-loading] {
        opacity: 0.3;
      }
    </style>
  `;E([A({type:Boolean,observer:"_fixBadStateWhenActive"}),w("design:type",Boolean)],Vn.prototype,"active",void 0);E([A({type:Array}),w("design:type",Array)],Vn.prototype,"dataSeries",void 0);E([A({type:Object}),w("design:type",Ae)],Vn.prototype,"requestManager",void 0);E([A({type:Boolean,observer:"_logScaleChanged"}),w("design:type",Boolean)],Vn.prototype,"logScaleActive",void 0);E([A({type:Object}),w("design:type",Object)],Vn.prototype,"xComponentsCreationMethod",void 0);E([A({type:String}),w("design:type",String)],Vn.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Function)],Vn.prototype,"yValueAccessor",void 0);E([A({type:Object}),w("design:type",Object)],Vn.prototype,"fillArea",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vn.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Vn.prototype,"smoothingWeight",void 0);E([A({type:Array}),w("design:type",Array)],Vn.prototype,"tooltipColumns",void 0);E([A({type:String}),w("design:type",Object)],Vn.prototype,"tooltipSortingMethod",void 0);E([A({type:String}),w("design:type",String)],Vn.prototype,"tooltipPosition",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vn.prototype,"ignoreYOutliers",void 0);E([A({type:Array}),w("design:type",Array)],Vn.prototype,"defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],Vn.prototype,"defaultYRange",void 0);E([A({type:Object}),w("design:type",Function)],Vn.prototype,"symbolFunction",void 0);E([A({type:Object}),w("design:type",Object)],Vn.prototype,"colorScale",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vn.prototype,"_resetDomainOnNextLoad",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Vn.prototype,"_maybeRenderedInBadState",void 0);E([Bt("loadKey"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vn.prototype,"_loadKeyChanged",null);E([Bt("dataSeries.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vn.prototype,"_dataSeriesChanged",null);Vn=E([yt("tf-line-chart-data-loader")],Vn);ys({moduleName:"tf-custom-scalar-card-style",styleContent:`
    :host {
      margin: 5px 10px;
      display: inline-block;
      width: 330px;
      vertical-align: text-top;
    }

    :host([_expanded]) {
      width: 100%;
    }

    :host([_expanded]) #tf-line-chart-data-loader-container {
      height: 400px;
    }

    h1 {
      font-size: 19px;
      font-weight: normal;
    }

    #tf-line-chart-data-loader-container {
      height: 200px;
      width: 100%;
    }

    #buttons {
      display: flex;
      flex-direction: row;
    }

    paper-icon-button {
      color: #2196f3;
      border-radius: 100%;
      width: 32px;
      height: 32px;
      padding: 4px;
    }

    paper-icon-button[selected] {
      background: var(--tb-ui-light-accent);
    }

    .download-links {
      display: flex;
      height: 32px;
    }

    .download-links a {
      font-size: 10px;
      align-self: center;
      margin: 2px;
    }

    .download-links paper-dropdown-menu {
      width: 100px;
      --paper-input-container-label: {
        font-size: 10px;
      }
      --paper-input-container-input: {
        font-size: 10px;
      }
    }
  `});var OS=class{constructor(t,r,n,i,o){this.run=t,this.tag=r,this.name=n,this.scalarData=i,this.symbol=o}getName(){return this.name}setData(t){this.scalarData=t}getData(){return this.scalarData}getRun(){return this.run}getTag(){return this.tag}getSymbol(){return this.symbol}};function kB(e,t){return`${t} (${e})`}var Yv=class{constructor(t){this.runBasedColorScale=t}scale(t){return this.runBasedColorScale.scale(this.parseRunName(t))}parseRunName(t){let r=t.match(/\((.*)\)$/);return r?r[1]:""}};var Jr=class extends Gt(mt){constructor(){super(...arguments),this.active=!0,this._colorScale=new Yv({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=_e().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._runToNextAvailableSymbolIndex={},this._matchesListOpened=!1,this._fillArea={lowerAccessor:t=>t.lower,higherAccessor:t=>t.upper},this._tooltipColumns=(()=>{let t=Wu(r0),r=n=>isNaN(n)?"NaN":t(n);return[{title:"Name",evaluate:n=>n.dataset.metadata().name},{title:"Value",evaluate:n=>r(n.datum.scalar)},{title:"Lower Margin",evaluate:n=>r(n.datum.lower)},{title:"Upper Margin",evaluate:n=>r(n.datum.upper)},{title:"Step",evaluate:n=>b4(n.datum.step)},{title:"Time",evaluate:n=>yB(n.datum.wall_time)},{title:"Relative",evaluate:n=>vB(n0(n.datum,-1,n.dataset))}]})(),this._missingTags=[],this._missingTagsCollapsibleOpened=!1}reload(){this.$.loader.reload()}redraw(){this.$.loader.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this.$.loader;t&&t.resetDomain()}_csvUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i=new URLSearchParams({tag:n.getTag(),run:n.getRun()});return _e().pluginRouteForSrc("custom_scalars","/download_data",i)}_createProcessDataFunction(t){return(r,n,i)=>{if(!i.regex_valid){this.set("_tagFilterInvalid",!0);return}let o=Yo.clone(this._nameToDataSeries),a=[];Yo.forEach(t,l=>{let c=!1,u=i.tag_to_events[l.value],h=i.tag_to_events[l.lower],f=i.tag_to_events[l.upper];if(Yo.isUndefined(u)&&(a.push(l.value),c=!0),Yo.isUndefined(h)&&(a.push(l.lower),c=!0),Yo.isUndefined(f)&&(a.push(l.upper),c=!0),c)return;let p=b=>b[1],d=this._findStepMismatch(l,u.map(p),h.map(p),f.map(p));if(d){this.set("_stepsMismatch",d);return}let g=b=>b[2],_=u.map((b,S)=>({wall_time:new Date(b[0]*1e3),step:p(b),scalar:g(b),lower:g(h[S]),upper:g(f[S])})),y=kB(n,l.value),x=o[y];if(x)x.setData(_);else{let b=this._createNewDataSeries(n,l.value,y,_);o[y]=b}}),this.set("_nameToDataSeries",o);let s=Yo.findIndex(this._missingTags,l=>l.run===n);if(a.length&&a.length!=3){let l={run:n,tags:a};s>=0?this.splice("_missingTags",s,1,l):this.push("_missingTags",l)}else s>=0&&this.splice("_missingTags",s,1)}}_findStepMismatch(t,r,n,i){return Yo.isEqual(n,r)&&Yo.isEqual(i,r)?null:{seriesObject:t,valueSteps:r,lowerSteps:n,upperSteps:i}}_createNewDataSeries(t,r,n,i){this._runToNextAvailableSymbolIndex[t]|=0;let o=RS[this._runToNextAvailableSymbolIndex[t]],a=new OS(t,r,n,i,o),s=RS.length;return this._runToNextAvailableSymbolIndex[t]=(this._runToNextAvailableSymbolIndex[t]+1)%s,a}_updateChart(){var t=this._nameToDataSeries;Yo.forOwn(t,r=>{this.$.loader.setSeriesData(r.getName(),r.getData())}),this.$.loader.commitChanges()}get _seriesNames(){let t=new Set(this.runs);return Object.entries(this._nameToDataSeries).filter(([r,n])=>t.has(n.run)).map(([r])=>r)}_determineColor(t,r){return t.scale(r)}_refreshDataSeries(){var t=this._tagFilter;this.set("_nameToDataSeries",{})}_createSymbolFunction(){return t=>this._nameToDataSeries[t].getSymbol().method()}_determineSymbol(t,r){return t[r].getSymbol().character}get _tagFilter(){var t=this.marginChartSeries;return Yo.flatten(t.map(i=>[i.value,i.lower,i.upper])).map(i=>"("+this._escapeRegexCharacters(i)+")").join("|")}_escapeRegexCharacters(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_getToggleCollapsibleIcon(t){return t?"expand-less":"expand-more"}_toggleMatchesOpen(){this.set("_matchesListOpened",!this._matchesListOpened)}get _titleDisplayString(){var t=this.title;return t||"untitled"}_separateWithCommas(t){return t.join(", ")}_toggleMissingTagsCollapsibleOpen(){this.set("_missingTagsCollapsibleOpened",!this._missingTagsCollapsibleOpened)}_matchListEntryColorUpdated(){var r;let t=this.$$("#match-list-repeat");!t||(r=this.root)==null||r.querySelectorAll(".match-list-entry").forEach(n=>{let i=t.itemForElement(n);n.style.color=this._determineColor(this._colorScale,i)})}};Jr.template=Q`
    <tf-card-heading display-name="[[_titleDisplayString]]"></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        id="loader"
        active="[[active]]"
        color-scale="[[_colorScale]]"
        data-series="[[_seriesNames]]"
        fill-area="[[_fillArea]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-key="[[_tagFilter]]"
        data-to-load="[[runs]]"
        request-data="[[_requestData]]"
        log-scale-active="[[_logScaleActive]]"
        load-data-callback="[[_createProcessDataFunction(marginChartSeries)]]"
        request-manager="[[requestManager]]"
        symbol-function="[[_createSymbolFunction()]]"
        tooltip-columns="[[_tooltipColumns]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <paper-dropdown-menu
            no-label-float="true"
            label="series to download"
            selected-item-label="{{_dataSeriesNameToDownload}}"
          >
            <paper-listbox class="dropdown-content" slot="dropdown-content">
              <template
                is="dom-repeat"
                items="[[_seriesNames]]"
                as="dataSeriesName"
              >
                <paper-item no-label-float="true"
                  >[[dataSeriesName]]</paper-item
                >
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
          <a
            download="[[_dataSeriesNameToDownload]].csv"
            href="[[_csvUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >CSV</a
          >
          <a
            download="[[_dataSeriesNameToDownload]].json"
            href="[[_jsonUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >JSON</a
          >
        </div>
      </template>
    </div>

    <!-- here -->
    <template is="dom-if" if="[[_missingTags.length]]">
      <div class="collapsible-list-title">
        <paper-icon-button
          icon="[[_getToggleCollapsibleIcon(_missingTagsCollapsibleOpened)]]"
          on-click="_toggleMissingTagsCollapsibleOpen"
          class="toggle-collapsible-button"
        >
        </paper-icon-button>
        <span class="collapsible-title-text">
          <iron-icon icon="icons:error"></iron-icon> Missing Tags
        </span>
      </div>
      <iron-collapse opened="[[_missingTagsCollapsibleOpened]]">
        <div class="error-content">
          <iron-icon class="error-icon" icon="icons:error"></iron-icon>
          <template is="dom-repeat" items="[[_missingTags]]" as="missingEntry">
            <div class="missing-tags-for-run-container">
              Run "[[missingEntry.run]]" lacks data for tags
              <ul>
                <template
                  is="dom-repeat"
                  items="[[missingEntry.tags]]"
                  as="tag"
                >
                  <li>[[tag]]</li>
                </template>
              </ul>
            </div>
          </template>
        </div>
      </iron-collapse>
    </template>

    <template is="dom-if" if="[[_tagFilterInvalid]]">
      <div class="error-content">
        <iron-icon class="error-icon" icon="icons:error"></iron-icon>
        This regular expresion is invalid:<br />
        <span class="invalid-regex">[[_tagFilter]]</span>
      </div>
    </template>

    <template is="dom-if" if="[[_stepsMismatch]]">
      <div class="error-content">
        <iron-icon class="error-icon" icon="icons:error"></iron-icon>
        The steps for value, lower, and upper tags do not match:
        <ul>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.value]]</span>:
            [[_separateWithCommas(_stepsMismatch.valueSteps)]]
          </li>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.lower]]</span>:
            [[_separateWithCommas(_stepsMismatch.lowerSteps)]]
          </li>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.upper]]</span>:
            [[_separateWithCommas(_stepsMismatch.upperSteps)]]
          </li>
        </ul>
      </div>
    </template>

    <div id="matches-container">
      <div class="collapsible-list-title">
        <template is="dom-if" if="[[_seriesNames.length]]">
          <paper-icon-button
            icon="[[_getToggleCollapsibleIcon(_matchesListOpened)]]"
            on-click="_toggleMatchesOpen"
            class="toggle-matches-button"
          >
          </paper-icon-button>
        </template>

        <span class="collapsible-title-text">
          Matches ([[_seriesNames.length]])
        </span>
      </div>
      <template is="dom-if" if="[[_seriesNames.length]]">
        <iron-collapse opened="[[_matchesListOpened]]">
          <div id="matches-list">
            <template
              is="dom-repeat"
              items="[[_seriesNames]]"
              as="seriesName"
              id="match-list-repeat"
              on-dom-change="_matchListEntryColorUpdated"
            >
              <div class="match-list-entry">
                <span class="match-entry-symbol">
                  [[_determineSymbol(_nameToDataSeries, seriesName)]]
                </span>
                [[seriesName]]
              </div>
            </template>
          </div>
        </iron-collapse>
      </template>
    </div>

    <style include="tf-custom-scalar-card-style"></style>
    <style>
      .error-content {
        background: #f00;
        border-radius: 5px;
        color: #fff;
        margin: 10px 0 0 0;
        padding: 10px;
      }

      .error-icon {
        display: block;
        fill: #fff;
        margin: 0 auto 5px auto;
      }

      .invalid-regex {
        font-weight: bold;
      }

      .error-content ul {
        margin: 1px 0 0 0;
        padding: 0 0 0 19px;
      }

      .tag-name {
        font-weight: bold;
      }

      .collapsible-list-title {
        margin: 10px 0 5px 0;
      }

      .collapsible-title-text {
        vertical-align: middle;
      }

      #matches-list {
        max-height: 200px;
        overflow-y: auto;
      }

      .match-list-entry {
        margin: 0 0 5px 0;
      }

      .match-entry-symbol {
        font-family: arial, sans-serif;
        display: inline-block;
        width: 10px;
      }

      .missing-tags-for-run-container {
        margin: 8px 0 0 0;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],Jr.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"active",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"title",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"marginChartSeries",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],Jr.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"showDownloadLinks",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"tooltipSortingMethod",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_colorScale",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_tagFilterInvalid",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_nameToDataSeries",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Jr.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_logScaleActive",void 0);E([A({type:Object}),w("design:type",Function)],Jr.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_runToNextAvailableSymbolIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_matchesListOpened",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_fillArea",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"_tooltipColumns",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"_missingTags",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_missingTagsCollapsibleOpened",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_stepsMismatch",void 0);E([Bt("_nameToDataSeries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Jr.prototype,"_updateChart",null);E([Rt("_nameToDataSeries","runs"),w("design:type",Object),w("design:paramtypes",[])],Jr.prototype,"_seriesNames",null);E([Bt("_tagFilter"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Jr.prototype,"_refreshDataSeries",null);E([Rt("marginChartSeries"),w("design:type",String),w("design:paramtypes",[])],Jr.prototype,"_tagFilter",null);E([Rt("title"),w("design:type",String),w("design:paramtypes",[])],Jr.prototype,"_titleDisplayString",null);Jr=E([yt("tf-custom-scalar-margin-chart-card")],Jr);var a0=Ee(Oe(),1);var RB={};Zs(RB,{BaseStore:()=>wp,Canceller:()=>an,EnvironmentStore:()=>V9,ExperimentsStore:()=>rR,HttpMethodType:()=>Pm,InvalidRequestOptionsError:()=>Vx,ListenKey:()=>H9,RequestCancellationError:()=>c9,RequestManager:()=>Ae,RequestNetworkError:()=>uE,RequestOptions:()=>Ux,RunsStore:()=>U9,TYPES:()=>Oxe,addParams:()=>Mi,createRouter:()=>Rgt,createSearchParam:()=>Ngt,environmentStore:()=>ib,experimentsStore:()=>nR,filterTags:()=>Fxe,getRouter:()=>_e,getRunsNamed:()=>zxe,getTags:()=>$i,runsStore:()=>Sp});var En=class extends Gt(mt){constructor(){super(...arguments),this.active=!0,this._colorScale=new Yv({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=_e().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._runToNextAvailableSymbolIndex={},this._matchesListOpened=!1}reload(){this.$.loader.reload()}redraw(){this.$.loader.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this.$.loader;t&&t.resetDomain()}_csvUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i=new URLSearchParams({tag:n.getTag(),run:n.getRun()});return _e().pluginRouteForSrc("custom_scalars","/download_data",i)}_createProcessDataFunction(){return(t,r,n)=>{if(n.regex_valid){let i=a0.clone(this._nameToDataSeries);a0.forOwn(n.tag_to_events,(o,a)=>{let s=o.map(u=>({wall_time:new Date(u[0]*1e3),step:u[1],scalar:u[2]})),l=kB(r,a),c=i[l];if(c)c.setData(s);else{a0.isUndefined(this._runToNextAvailableSymbolIndex[r])&&(this._runToNextAvailableSymbolIndex[r]=0);let u=RS[this._runToNextAvailableSymbolIndex[r]],h=new OS(r,a,l,s,u);i[l]=h;let f=RS.length;this._runToNextAvailableSymbolIndex[r]=(this._runToNextAvailableSymbolIndex[r]+1)%f}}),this.set("_nameToDataSeries",i)}}}_updateChart(){var t=this._nameToDataSeries;Object.entries(t).forEach(([r,n])=>{this.$.loader.setSeriesData(r,n.getData())}),this.$.loader.commitChanges()}_computeSelectedRunsSet(t){let r={};return a0.forEach(t,n=>{r[n]=1}),r}get _seriesNames(){let t=new Set(this.runs);return Object.entries(this._nameToDataSeries).filter(([r,n])=>t.has(n.run)).map(([r])=>r)}_determineColor(t,r){return t.scale(r)}_refreshDataSeries(){var t=this._tagFilter;this.set("_nameToDataSeries",{})}_createSymbolFunction(){return t=>this._nameToDataSeries[t].getSymbol().method()}_determineSymbol(t,r){return t[r].getSymbol().character}get _tagFilter(){var t=this.tagRegexes;return t.length===1?t[0]:t.map(r=>"("+r+")").join("|")}_getToggleMatchesIcon(t){return t?"expand-less":"expand-more"}_toggleMatchesOpen(){this.set("_matchesListOpened",!this._matchesListOpened)}get _titleDisplayString(){var t=this.title;return t||"untitled"}_matchListEntryColorUpdated(t){var n;let r=this.$$("#match-list-repeat");!r||(n=this.root)==null||n.querySelectorAll(".match-list-entry").forEach(i=>{let o=r.itemForElement(i);i.style.color=this._determineColor(this._colorScale,o)})}};En.template=Q`
    <tf-card-heading display-name="[[_titleDisplayString]]"></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        id="loader"
        active="[[active]]"
        color-scale="[[_colorScale]]"
        data-series="[[_seriesNames]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-key="[[_tagFilter]]"
        data-to-load="[[runs]]"
        request-data="[[_requestData]]"
        log-scale-active="[[_logScaleActive]]"
        load-data-callback="[[_createProcessDataFunction()]]"
        request-manager="[[requestManager]]"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        symbol-function="[[_createSymbolFunction()]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <paper-dropdown-menu
            no-label-float="true"
            label="series to download"
            selected-item-label="{{_dataSeriesNameToDownload}}"
          >
            <paper-listbox class="dropdown-content" slot="dropdown-content">
              <template
                is="dom-repeat"
                items="[[_seriesNames]]"
                as="dataSeriesName"
              >
                <paper-item no-label-float="true"
                  >[[dataSeriesName]]</paper-item
                >
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
          <a
            download="[[_dataSeriesNameToDownload]].csv"
            href="[[_csvUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >CSV</a
          >
          <a
            download="[[_dataSeriesNameToDownload]].json"
            href="[[_jsonUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >JSON</a
          >
        </div>
      </template>
    </div>
    <div id="matches-container">
      <div id="matches-list-title">
        <template is="dom-if" if="[[_seriesNames.length]]">
          <paper-icon-button
            icon="[[_getToggleMatchesIcon(_matchesListOpened)]]"
            on-click="_toggleMatchesOpen"
            class="toggle-matches-button"
          >
          </paper-icon-button>
        </template>

        <span class="matches-text"> Matches ([[_seriesNames.length]]) </span>
      </div>
      <template is="dom-if" if="[[_seriesNames.length]]">
        <iron-collapse opened="[[_matchesListOpened]]">
          <div id="matches-list">
            <template
              is="dom-repeat"
              items="[[_seriesNames]]"
              as="seriesName"
              id="match-list-repeat"
              on-dom-change="_matchListEntryColorUpdated"
            >
              <div class="match-list-entry">
                <span class="match-entry-symbol">
                  [[_determineSymbol(_nameToDataSeries, seriesName)]]
                </span>
                [[seriesName]]
              </div>
            </template>
          </div>
        </iron-collapse>
      </template>
    </div>

    <style include="tf-custom-scalar-card-style"></style>
    <style>
      #matches-list-title {
        margin: 10px 0 5px 0;
      }

      #matches-list {
        max-height: 200px;
        overflow-y: auto;
      }

      .match-list-entry {
        margin: 0 0 5px 0;
      }

      .match-entry-symbol {
        font-family: arial, sans-serif;
        display: inline-block;
        width: 10px;
      }

      .matches-text {
        vertical-align: middle;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],En.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"active",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"title",void 0);E([A({type:Array}),w("design:type",Array)],En.prototype,"tagRegexes",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],En.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"showDownloadLinks",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],En.prototype,"smoothingWeight",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"tooltipSortingMethod",void 0);E([A({type:Object}),w("design:type",Yv)],En.prototype,"_colorScale",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"_nameToDataSeries",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],En.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"_logScaleActive",void 0);E([A({type:Object}),w("design:type",Function)],En.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"_runToNextAvailableSymbolIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"_matchesListOpened",void 0);E([Bt("_nameToDataSeries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],En.prototype,"_updateChart",null);E([Rt("_nameToDataSeries","runs"),w("design:type",Object),w("design:paramtypes",[])],En.prototype,"_seriesNames",null);E([Bt("_tagFilter"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],En.prototype,"_refreshDataSeries",null);E([Rt("tagRegexes"),w("design:type",String),w("design:paramtypes",[])],En.prototype,"_tagFilter",null);E([Rt("title"),w("design:type",String),w("design:paramtypes",[])],En.prototype,"_titleDisplayString",null);En=E([yt("tf-custom-scalar-multi-line-chart-card")],En);var jo=class extends mt{constructor(){super(...arguments),this._requestManager=new Ae(50),this._canceller=new an,this._showDownloadLinks=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=_E("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType="step",this._active=!0,this.reloadOnReady=!0,this._showDownloadLinksObserver=bp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=yE("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=bp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){let t=_e().pluginsListing(),r=this._canceller.cancellable(n=>{n.cancelled||(this.set("_dataNotFound",!n.value.custom_scalars),!this._dataNotFound&&this._retrieveLayoutAndData())});this._requestManager.request(t).then(r)}_reloadCharts(){var r;let t=(r=this.root)==null?void 0:r.querySelectorAll("tf-custom-scalar-margin-chart-card, tf-custom-scalar-multi-line-chart-card");t==null||t.forEach(n=>{n.reload()})}_retrieveLayoutAndData(){let t=_e().pluginRoute("custom_scalars","/layout"),r=this._canceller.cancellable(n=>{n.cancelled||(this.set("_layout",n.value),this._dataNotFound||this._reloadCharts())});this._requestManager.request(t).then(r)}get _smoothingEnabled(){var t=this._smoothingWeight;return t>0}get _categories(){var t=this._layout;if(!t.category)return[];let r=!1;return this._openedCategories||(r=!0,this._openedCategories={}),t.category.map(i=>(r&&!i.closed&&(this._openedCategories[i.title]=!0),{name:i.title,items:i.chart,metadata:{type:Da.PREFIX_GROUP,opened:!!this._openedCategories[i.title]}}))}_categoryOpenedToggled(t){let r=t.target;r.opened?this._openedCategories[r.category.name]=!0:delete this._openedCategories[r.category.name]}};jo.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox checked="{{_showDownloadLinks}}"
                >Show data download links</paper-checkbox
              >
            </div>
            <div class="line-item">
              <paper-checkbox checked="{{_ignoreYOutliers}}"
                >Ignore outliers in chart scaling</paper-checkbox
              >
            </div>
            <div id="tooltip-sorting">
              <div id="tooltip-sorting-label">Tooltip sorting method:</div>
              <paper-dropdown-menu
                no-label-float=""
                selected-item-label="{{_tooltipSortingMethod}}"
              >
                <paper-listbox
                  class="dropdown-content"
                  selected="0"
                  slot="dropdown-content"
                >
                  <paper-item>default</paper-item>
                  <paper-item>descending</paper-item>
                  <paper-item>ascending</paper-item>
                  <paper-item>nearest</paper-item>
                </paper-listbox>
              </paper-dropdown-menu>
            </div>
          </div>
          <div class="sidebar-section">
            <tf-smoothing-input
              weight="{{_smoothingWeight}}"
              step="0.001"
              min="0"
              max="1"
            ></tf-smoothing-input>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="x-type-selector"
              name="Horizontal Axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button
              ><!--
            --><paper-button id="relative">relative</paper-button
              ><!--
            --><paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center" id="categories-container">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>The custom scalars dashboard is inactive.</h3>
            <p>Probable causes:</p>
            <ol>
              <li>You haven't laid out the dashboard.</li>
              <li>You haven’t written any scalar data to your event files.</li>
            </ol>

            <p>
              To lay out the dashboard, pass a <code>Layout</code> protobuffer
              to the <code>set_layout</code> method. For example,
            </p>
            <pre>
from tensorboard import summary
from tensorboard.plugins.custom_scalar import layout_pb2
...
# This action does not have to be performed at every step, so the action is not
# taken care of by an op in the graph. We only need to specify the layout once
# (instead of per step).
layout_summary = summary_lib.custom_scalar_pb(layout_pb2.Layout(
  category=[
    layout_pb2.Category(
      title='losses',
      chart=[
          layout_pb2.Chart(
              title='losses',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'loss.*'],
              )),
          layout_pb2.Chart(
              title='baz',
              margin=layout_pb2.MarginChartContent(
                series=[
                  layout_pb2.MarginChartContent.Series(
                    value='loss/baz/scalar_summary',
                    lower='baz_lower/baz/scalar_summary',
                    upper='baz_upper/baz/scalar_summary'),
                ],
              )),
      ]),
    layout_pb2.Category(
      title='trig functions',
      chart=[
          layout_pb2.Chart(
              title='wave trig functions',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'trigFunctions/cosine', r'trigFunctions/sine'],
              )),
          # The range of tangent is different. Let's give it its own chart.
          layout_pb2.Chart(
              title='tan',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'trigFunctions/tangent'],
              )),
      ],
      # This category we care less about. Let's make it initially closed.
      closed=True),
  ]))
writer.add_summary(layout_summary)
</pre
            >
            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              as="chart"
              category="[[category]]"
              disable-pagination
              initial-opened="[[category.metadata.opened]]"
            >
              <template>
                <template is="dom-if" if="[[chart.multiline]]">
                  <tf-custom-scalar-multi-line-chart-card
                    active="[[active]]"
                    request-manager="[[_requestManager]]"
                    runs="[[_selectedRuns]]"
                    title="[[chart.title]]"
                    x-type="[[_xType]]"
                    smoothing-enabled="[[_smoothingEnabled]]"
                    smoothing-weight="[[_smoothingWeight]]"
                    tooltip-sorting-method="[[tooltipSortingMethod]]"
                    ignore-y-outliers="[[_ignoreYOutliers]]"
                    show-download-links="[[_showDownloadLinks]]"
                    tag-regexes="[[chart.multiline.tag]]"
                  ></tf-custom-scalar-multi-line-chart-card>
                </template>
                <template is="dom-if" if="[[chart.margin]]">
                  <tf-custom-scalar-margin-chart-card
                    active="[[active]]"
                    request-manager="[[_requestManager]]"
                    runs="[[_selectedRuns]]"
                    title="[[chart.title]]"
                    x-type="[[_xType]]"
                    tooltip-sorting-method="[[tooltipSortingMethod]]"
                    ignore-y-outliers="[[_ignoreYOutliers]]"
                    show-download-links="[[_showDownloadLinks]]"
                    margin-chart-series="[[chart.margin.series]]"
                  ></tf-custom-scalar-margin-chart-card>
                </template>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      #tooltip-sorting {
        align-items: center;
        display: flex;
        font-size: 14px;
        margin-top: 15px;
      }
      #tooltip-sorting paper-dropdown-menu {
        margin-left: 10px;
        --paper-input-container-focus-color: var(--tb-orange-strong);
        width: 105px;
      }
      .line-item {
        display: block;
        padding-top: 5px;
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Ae)],jo.prototype,"_requestManager",void 0);E([A({type:Object}),w("design:type",an)],jo.prototype,"_canceller",void 0);E([A({type:Array}),w("design:type",Array)],jo.prototype,"_selectedRuns",void 0);E([A({type:Boolean,notify:!0,observer:"_showDownloadLinksObserver"}),w("design:type",Boolean)],jo.prototype,"_showDownloadLinks",void 0);E([A({type:Number,notify:!0,observer:"_smoothingWeightObserver"}),w("design:type",Number)],jo.prototype,"_smoothingWeight",void 0);E([A({type:Boolean,observer:"_ignoreYOutliersObserver"}),w("design:type",Boolean)],jo.prototype,"_ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],jo.prototype,"_xType",void 0);E([A({type:Object}),w("design:type",Object)],jo.prototype,"_layout",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"_dataNotFound",void 0);E([A({type:Object}),w("design:type",Object)],jo.prototype,"_openedCategories",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"_active",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"reloadOnReady",void 0);E([Rt("_smoothingWeight"),w("design:type",Boolean),w("design:paramtypes",[])],jo.prototype,"_smoothingEnabled",null);E([Rt("_layout"),w("design:type",Array),w("design:paramtypes",[])],jo.prototype,"_categories",null);jo=E([yt("tf-custom-scalar-dashboard")],jo);var DB=Ee(Oe(),1);var ast=Ee(Oe(),1),wa=Ee(Sl(),1);var NB=class{constructor(t,r){this.run2datasets={},this.colorScale=r,this.buildChart(t)}getDataset(t){return this.run2datasets[t]===void 0&&(this.run2datasets[t]=new wa.Dataset([],{run:t})),this.run2datasets[t]}buildChart(t){this.outer&&this.outer.destroy();let r=xB(t);this.xAccessor=r.accessor,this.xScale=r.scale,this.xAxis=r.axis,this.xAxis.margin(0),this.xAxis.tickLabelPadding(3),this.yScale=new wa.Scales.Linear,this.yAxis=new wa.Axes.Numeric(this.yScale,"left");let n=Wu(mB);this.yAxis.margin(0).tickLabelPadding(5).formatter(n),this.yAxis.usesTextWidthApproximation(!0);let i=this.buildPlot(this.xAccessor,this.xScale,this.yScale);this.gridlines=new wa.Components.Gridlines(this.xScale,this.yScale),this.center=new wa.Components.Group([this.gridlines,i]),this.outer=new wa.Components.Table([[this.yAxis,this.center],[null,this.xAxis]])}buildPlot(t,r,n){let i=[0,228,1587,3085,5e3,6915,8413,9772,1e4],o=ast.range(i.length-1).map(h=>(i[h+1]-i[h])/2500),a=i.map((h,f)=>p=>p[f][1]),s=4,l=a[s],c=ast.range(a.length-1).map(h=>{let f=new wa.Plots.Area;f.x(t,r);let p=h>s?a[h]:a[h+1],d=h>s?a[h+1]:a[h];return f.y(d,n),f.y0(p),f.attr("fill",(g,_,y)=>this.colorScale.scale(y.metadata().run)),f.attr("stroke",(g,_,y)=>this.colorScale.scale(y.metadata().run)),f.attr("stroke-weight",(g,_,y)=>"0.5px"),f.attr("stroke-opacity",()=>o[h]),f.attr("fill-opacity",()=>o[h]),f}),u=new wa.Plots.Line;return u.x(t,r),u.y(l,n),u.attr("stroke",(h,f,p)=>this.colorScale.scale(p.run)),this.plots=c,new wa.Components.Group(c)}setVisibleSeries(t){this.runs=t;let r=t.map(n=>this.getDataset(n));this.plots.forEach(n=>n.datasets(r))}setSeriesData(t,r){this.getDataset(t).data(r)}renderTo(t){this.targetSVG=t,this.outer.renderTo(t)}redraw(){this.outer.redraw()}destroy(){this.outer.destroy()}},Bc=class extends Gt(mt){constructor(){super(...arguments),this.colorScale=new wa.Scales.Color().range(jb.slice()),this.xType="step",this._visibleSeriesCache=[],this._seriesDataCache={},this._makeChartAsyncCallbackId=null}setVisibleSeries(t){this._visibleSeriesCache=t,this._chart&&(this._chart.setVisibleSeries(t),this.redraw())}setSeriesData(t,r){this._seriesDataCache[t]=r,this._chart&&this._chart.setSeriesData(t,r)}redraw(){this._chart.redraw()}_makeChart(){var t=this.xType,r=this.colorScale,n=this._attached;this._makeChartAsyncCallbackId!==null&&this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=this.async(function(){if(this._makeChartAsyncCallbackId=null,!!n){this._chart&&this._chart.destroy();var i=new NB(t,r),o=Ht(this.$.chartdiv);i.renderTo(o),this._chart=i}},350)}_reloadFromCache(){this._chart&&(this._chart.setVisibleSeries(this._visibleSeriesCache),this._visibleSeriesCache.forEach(function(t){this._chart.setSeriesData(t,this._seriesDataCache[t]||[])}.bind(this)))}attached(){this._attached=!0}detached(){this._attached=!1}};Bc.template=Q`
    <style include="plottable-style"></style>
    <div id="chartdiv"></div>
    <style>
      :host {
        -webkit-user-select: none;
        -moz-user-select: none;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        position: relative;
      }
      #chartdiv {
        -webkit-user-select: none;
        -moz-user-select: none;
        flex-grow: 1;
        flex-shrink: 1;
      }
      .plottable .axis text {
        fill: currentColor;
      }
    </style>
  `;E([A({type:Object}),w("design:type",wa.Scales.Color)],Bc.prototype,"colorScale",void 0);E([A({type:String}),w("design:type",String)],Bc.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bc.prototype,"_attached",void 0);E([A({type:Object}),w("design:type",NB)],Bc.prototype,"_chart",void 0);E([A({type:Array}),w("design:type",Array)],Bc.prototype,"_visibleSeriesCache",void 0);E([A({type:Object}),w("design:type",Object)],Bc.prototype,"_seriesDataCache",void 0);E([A({type:Number}),w("design:type",Object)],Bc.prototype,"_makeChartAsyncCallbackId",void 0);E([Bt("xType","colorScale","_attached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Bc.prototype,"_makeChart",null);E([Bt("_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Bc.prototype,"_reloadFromCache",null);Bc=E([yt("vz-distribution-chart")],Bc);var Sa=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=_e().pluginRoute("distributions","/distributions");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this.loadDataCallback=(t,r,n)=>{let i=n.map(a=>{let[s,l,c]=a;return c.wall_time=new Date(s*1e3),c.step=l,c}),o=this.getDataLoadName(r);this.$.chart.setSeriesData(o,i),this.$.chart.setVisibleSeries([o])},this._colorScale={scale:fn},this._expanded=!1,this._canceller=new an}_reloadOnRunTagChange(){this.reload()}_updateDataToLoad(){var t=this.run,r=this.tag;this.dataToLoad=[{run:t,tag:r}]}get _runColor(){var t=this.run;return this._colorScale.scale(t)}redraw(){this.$.chart.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}};Sa.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    ></tf-card-heading>
    <!--
      The main distribution that we render. Data is set directly with
      \`setSeriesData\`, not with a bound property.
    -->
    <vz-distribution-chart
      id="chart"
      x-type="[[xType]]"
      color-scale="[[_colorScale]]"
    ></vz-distribution-chart>
    <div style="display: flex; flex-direction: row;">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
    </div>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 330px;
        height: 235px;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      :host([_expanded]) {
        width: 700px;
        height: 500px;
      }

      vz-histogram-timeseries {
        -moz-user-select: none;
        -webkit-user-select: none;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      tf-card-heading {
        margin-bottom: 10px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Sa.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Sa.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],Sa.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],Sa.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Object)],Sa.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Object)],Sa.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],Sa.prototype,"_colorScale",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Sa.prototype,"_expanded",void 0);E([A({type:Object}),w("design:type",Ae)],Sa.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],Sa.prototype,"_canceller",void 0);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Sa.prototype,"_reloadOnRunTagChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Sa.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Sa.prototype,"_runColor",null);Sa=E([yt("tf-distribution-loader")],Sa);var Ml=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._xType="step",this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadDistributions()})}_fetchTags(){let t=_e().pluginRoute("distributions","/tags");return this._requestManager.request(t).then(r=>{if(DB.isEqual(r,this._runToTagInfo))return;let n=DB.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTag",n),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadDistributions(){var t;(t=this.root)==null||t.querySelectorAll("tf-distribution-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;return Ql(t,r,n)}_tagMetadata(t,r,n){return t[r][n]}};Ml.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="xTypeSelector"
              name="Horizontal axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button>
              <paper-button id="relative">relative</paper-button>
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>

      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No distribution data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any histogram data to your event files.
                (Histograms and distributions both use the histogram summary
                operation.)
              </li>

              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-distribution-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  x-type="[[_xType]]"
                  request-manager="[[_requestManager]]"
                ></tf-distribution-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Ml.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],Ml.prototype,"_xType",void 0);E([A({type:Array}),w("design:type",Array)],Ml.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Ml.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],Ml.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ml.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Ml.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ml.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],Ml.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Ml.prototype,"_categories",null);Ml=E([yt("tf-distribution-dashboard")],Ml);var OB={};Zs(OB,{DISAMBIGUATOR:()=>q0t,ListenKey:()=>mE,addHashListener:()=>gE,addStorageListener:()=>TW,disposeBooleanBinding:()=>t2e,disposeNumberBinding:()=>e2e,disposeObjectBinding:()=>i2e,disposeStringBinding:()=>Zbe,fireStorageChanged:()=>CW,getBoolean:()=>Jbe,getBooleanInitializer:()=>xp,getBooleanObserver:()=>bp,getNumber:()=>NW,getNumberInitializer:()=>_E,getNumberObserver:()=>yE,getObject:()=>r2e,getObjectInitializer:()=>OW,getObjectObserver:()=>zW,getString:()=>$be,getStringInitializer:()=>v_,getStringObserver:()=>x_,getUrlHashDict:()=>B0t,makeBindings:()=>vE,migrateLegacyURLScheme:()=>o2e,removeHashListenerByKey:()=>AW,removeStorageListenerByKey:()=>PW,setBoolean:()=>Qbe,setNumber:()=>DW,setObject:()=>n2e,setString:()=>Kbe});var ict=Ee(Oe(),1);var KKt="Graph dashboard actions",ZKt="Graph dashboard timings",sst;(function(e){e.FETCH_PBTXT_BYTES="FETCH_PBTXT_BYTES",e.FETCH_PBTXT_BYTES_FROM_FILESYSTEM="FETCH_PBTXT_BYTES_FROM_FILESYSTEM",e.FETCH_PBTXT_BYTES_FROM_SERVER="FETCH_PBTXT_BYTES_FROM_SERVER",e.PARSE_PBTXT_INTO_OBJECT="PARSE_PBTXT_INTO_OBJECT",e.FETCH_METADATA_PBTXT_BYTES="FETCH_METADATA_PBTXT_BYTES",e.PARSE_METADATA_PBTXT_INTO_OBJECT="PARSE_METADATA_PBTXT_INTO_OBJECT",e.NORMALIZING_NAMES="NORMALIZING_NAMES",e.BUILD_SLIM_GRAPH="BUILD_SLIM_GRAPH",e.HIERARCHY_ADD_NODES="HIERARCHY_ADD_NODES",e.HIERARCHY_DETECT_SERIES="HIERARCHY_DETECT_SERIES",e.HIERARCHY_ADD_EDGES="HIERARCHY_ADD_EDGES",e.HIERARCHY_FIND_SIMILAR_SUBGRAPHS="HIERARCHY_FIND_SIMILAR_SUBGRAPHS",e.RENDER_BUILD_HIERARCHY="RENDER_BUILD_HIERARCHY",e.RENDER_SCENE_LAYOUT="RENDER_SCENE_LAYOUT",e.RENDER_SCENE_BUILD_SCENE="RENDER_SCENE_BUILD_SCENE",e.GRAPH_LOAD_SUCCEEDED="GRAPH_LOAD_SUCCEEDED",e.GRAPH_LOAD_FAILED="GRAPH_LOAD_FAILED"})(sst||(sst={}));var lst;(function(e){e.NODE_EXPANSION_TOGGLED="NODE_EXPANSION_TOGGLED",e.NODE_SEARCH_RESULT_FOCUSED="NODE_SEARCH_RESULT_FOCUSED",e.NODE_AUXILIARY_EXTRACTION_CHANGED="NODE_AUXILIARY_EXTRACTION_CHANGED",e.GRAPH_TYPE_CHANGED="GRAPH_TYPE_CHANGED",e.TRACE_INPUT_MODE_TOGGLED="TRACE_INPUT_MODE_TOGGLED",e.NODE_COLOR_MODE_CHANGED="NODE_COLOR_MODE_CHANGED",e.UPLOADED_GRAPH_FROM_FILESYSTEM="UPLOADED_GRAPH_FROM_FILESYSTEM"})(lst||(lst={}));var jr=ia(ia({},sst),lst);var nle=Ee(Olt(),1),pn=Ee(Oe(),1);var Bs;(function(e){e.OP_GRAPH="op_graph",e.CONCEPTUAL_GRAPH="conceptual_graph",e.PROFILE="profile"})(Bs||(Bs={}));var ve={Node:{CONTAINER:"nodes",GROUP:"node",SHAPE:"nodeshape",COLOR_TARGET:"nodecolortarget",LABEL:"nodelabel",BUTTON_CONTAINER:"buttoncontainer",BUTTON_CIRCLE:"buttoncircle",EXPAND_BUTTON:"expandbutton",COLLAPSE_BUTTON:"collapsebutton"},Edge:{CONTAINER:"edges",GROUP:"edge",LINE:"edgeline",REFERENCE_EDGE:"referenceedge",REF_LINE:"refline",SELECTABLE:"selectableedge",SELECTED:"selectededge",STRUCTURAL:"structural"},Annotation:{OUTBOX:"out-annotations",INBOX:"in-annotations",GROUP:"annotation",NODE:"annotation-node",EDGE:"annotation-edge",CONTROL_EDGE:"annotation-control-edge",LABEL:"annotation-label",ELLIPSIS:"annotation-ellipsis"},Scene:{GROUP:"scene",CORE:"core",FUNCTION_LIBRARY:"function-library",INEXTRACT:"in-extract",OUTEXTRACT:"out-extract"},Subscene:{GROUP:"subscene"},OPNODE:"op",METANODE:"meta",SERIESNODE:"series",BRIDGENODE:"bridge",ELLIPSISNODE:"ellipsis"},J4={Edge:{LABEL:3.5},Annotation:{LABEL:5},Node:{EXPANDED_LABEL:9,SERIES_LABEL:8,OP_LABEL:6,HEALTH_PILL_STAT_LABEL:4}},ju="http://www.w3.org/2000/svg";function g0(e,t,r){let n=e.node().childNodes;for(let i=0;i<n.length;i++){let o=n[i];if(o.tagName===t){if(r instanceof Array){let a=!0;for(let s=0;s<r.length;s++)a=a&&o.classList.contains(r[s]);if(a)return Ht(o)}else if(!r||o.classList.contains(r))return Ht(o)}}return Ht(null)}function An(e,t,r,n){let i=g0(e,t,r);if(!i.empty())return i;let o=document.createElementNS("http://www.w3.org/2000/svg",t);if(r instanceof Array)for(let a=0;a<r.length;a++)o.classList.add(r[a]);else o.classList.add(r);return n?e.node().insertBefore(o,n):e.node().appendChild(o),Ht(o).datum(e.datum())}var KS=class{constructor(t){this.totalBytes=0,this.outputSize=t}addExecutionTime(t,r){this.startTime!=null?this.startTime=Math.min(this.startTime,t):this.startTime=t,this.endTime!=null?this.endTime=Math.max(this.endTime,r):this.endTime=r}addBytesAllocation(t){this.totalBytes!=null?this.totalBytes=Math.max(this.totalBytes,t):this.totalBytes=t}combine(t){t.totalBytes!=null&&(this.totalBytes+=t.totalBytes),t.getTotalMicros()!=null&&this.addExecutionTime(t.startTime,t.endTime)}getTotalMicros(){return this.startTime==null||this.endTime==null?null:this.endTime-this.startTime}},Q4=.75,tP=12,tcr=.3,ecr=[1,5e6],Xse=Z_().exponent(tcr).domain(ecr).range([Q4,tP]).clamp(!0);var ZS=Ee(Oe(),1);var Kse=20;function rcr(e){return e.hasOwnProperty("timingId")}function Po(e){rcr(e)?(ZKt,e.timingId,e.eventValue,void 0):(KKt,e.actionId,e.eventLabel,void 0)}function Nd(e,t,r){let n=Date.now(),i=t(),o=Date.now()-n;return console.log(e,":",o,"ms"),r&&Po({timingId:r,eventValue:o}),i}function nP(e){return{setMessage:function(t){e.set("progress",{value:e.progress.value,msg:t})},updateProgress:function(t){e.set("progress",{value:e.progress.value+t,msg:e.progress.msg})},reportError:function(t,r){console.error(r.stack),e.set("progress",{value:e.progress.value,msg:t,error:!0})}}}function JS(e,t,r){return{setMessage:function(n){e.setMessage(r+": "+n)},updateProgress:function(n){e.updateProgress(n*t/100)},reportError:function(n,i){e.reportError(r+": "+n,i)}}}function Zse(e,t,r,n,i){n.setMessage(e);try{let o=Nd(e,r,i);return n.updateProgress(t),o}catch(o){return n.reportError("Failed "+e,o),null}}function r1(e,t,r,n,i){return new Promise((o,a)=>{n.setMessage(e),setTimeout(function(){try{let s=Nd(e,r,i);n.updateProgress(t),o(s)}catch(s){n.reportError("Failed "+e,s)}},Kse)})}function mH(e,t,r,n,i){return new Promise((o,a)=>{let s=function(l){n.reportError("Failed "+e,l),a(l)};n.setMessage(e),setTimeout(function(){try{let l=Date.now();r().then(function(c){let u=Date.now()-l;console.log(e,":",u,"ms"),n.updateProgress(t),Po({timingId:i,eventValue:u}),o(c)}).catch(s)}catch(l){s(l)}},Kse)})}function Jse(e){return e.replace(/([:.\[\],/\\\(\)])/g,"\\$1")}var iP=[{symbol:"B"},{symbol:"KB",numUnits:1024},{symbol:"MB",numUnits:1024},{symbol:"GB",numUnits:1024},{symbol:"TB",numUnits:1024},{symbol:"PB",numUnits:1024}],oP=[{symbol:"\xB5s"},{symbol:"ms",numUnits:1e3},{symbol:"s",numUnits:1e3},{symbol:"min",numUnits:60},{symbol:"hr",numUnits:60},{symbol:"days",numUnits:24}];function Dd(e,t,r=0){return r+1<t.length&&e>=t[r+1].numUnits?Dd(e/t[r+1].numUnits,t,r+1):Number(e.toPrecision(3))+" "+t[r].symbol}function gH(e){return!!(e&&(e.totalBytes>0||e.getTotalMicros()>0||e.outputSize))}function zlt(e){if(e.length<2)return e;let t=0,r=0,n=ZS.min(ZS.map(e,i=>i.length));for(;;){t++;let i=ZS.map(e,a=>a.substring(0,t));if(i.every((a,s)=>s===0?!0:a===i[s-1])){if(t>=n)return e;r=t}else break}return ZS.map(e,i=>i.substring(r))}function Qse(e){var t=+new Date-+new Date(e/1e3);return t<3e4?"just now":t<6e4?Math.floor(t/1e3)+" seconds ago":t<12e4?"a minute ago":t<36e5?Math.floor(t/6e4)+" minutes ago":Math.floor(t/36e5)==1?"an hour ago":t<864e5?Math.floor(t/36e5)+" hours ago":t<1728e5?"yesterday":Math.floor(t/864e5)+" days ago"}var ncr=document.createElement("canvas"),rP=ncr.getContext("2d");function $se(e,t){return rP&&(rP.font=`${t}px Roboto, sans-serif`),rP==null?void 0:rP.measureText(e).width}function tle(e,t,r){if(!e)return"";if($se(e,t)<=r)return e;let n=0,i=e.length;for(;n<i;){let o=n+Math.round((i-n)/2),a=e.slice(0,o)+"\u2026";$se(a,t)<=r?n=o:i=o-1}return n===0?e[0]:e.slice(0,n)+"\u2026"}var dH=class{constructor(){this.eventTypeToListeners=new Map}getListeners(t){return this.eventTypeToListeners.has(t)||this.eventTypeToListeners.set(t,[]),this.eventTypeToListeners.get(t)}addListener(t,r){var n;(n=this.getListeners(t))==null||n.push(r)}removeListener(t,r){var i;let n=(i=this.getListeners(t))==null?void 0:i.filter(o=>o!==r);this.eventTypeToListeners.set(t,n)}dispatchEvent(t,r){for(let n of this.getListeners(t))n(r)}};var Pl="/",qc="__root__",Ma="__function_library__",ile="_too_large_attrs";var ole="--",_0;(function(e){e[e.FULL=0]="FULL",e[e.EMBEDDED=1]="EMBEDDED",e[e.META=2]="META",e[e.SERIES=3]="SERIES",e[e.CORE=4]="CORE",e[e.SHADOW=5]="SHADOW",e[e.BRIDGE=6]="BRIDGE",e[e.EDGE=7]="EDGE"})(_0||(_0={}));var jt;(function(e){e[e.META=0]="META",e[e.OP=1]="OP",e[e.SERIES=2]="SERIES",e[e.BRIDGE=3]="BRIDGE",e[e.ELLIPSIS=4]="ELLIPSIS"})(jt||(jt={}));var ur;(function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE",e[e.UNSPECIFIED=2]="UNSPECIFIED"})(ur||(ur={}));var os;(function(e){e[e.GROUP=0]="GROUP",e[e.UNGROUP=1]="UNGROUP"})(os||(os={}));var icr="_output_shapes",ocr="_XlaCluster",Xu=class{constructor(){this.nodes={},this.edges=[]}},_H=class{constructor(t){this.type=jt.ELLIPSIS,this.isGroupNode=!1,this.cardinality=1,this.parentNode=null,this.stats=null,this.setNumMoreNodes(t),this.include=ur.UNSPECIFIED}setNumMoreNodes(t){this.numMoreNodes=t,this.name="... "+t+" more"}},y0=class{constructor(t){this.op=t.op,this.name=t.name,this.device=t.device,this.attr=t.attr,this.inputs=ccr(t.input),this.outputShapes=acr(t.attr),this.xlaCluster=scr(t.attr),this.compatible=!1,this.type=jt.OP,this.isGroupNode=!1,this.cardinality=1,this.inEmbeddings=[],this.outEmbeddings=[],this.parentNode=null,this.include=ur.UNSPECIFIED,this.owningSeries=null}};function lP(e,t={}){return new aP(e,t)}function ale(e,t,r){pn.each(e.nodes,n=>{n.stats=null}),pn.each(t.dev_stats,n=>{r&&!r[n.device]||pn.each(n.node_stats,i=>{let o=i.node_name in e.nodes?i.node_name:sP(i.node_name);if(!(o in e.nodes))return;let a=0;i.memory&&pn.each(i.memory,l=>{l.total_bytes&&(l.total_bytes>0?a+=Number(l.total_bytes):console.log("ignoring negative memory allocation for "+o))});let s=null;i.output&&(s=pn.map(i.output,l=>pn.map(l.tensor_description.shape.dim,c=>Number(c.size)))),e.nodes[o].device=n.device,e.nodes[o].stats==null&&(e.nodes[o].stats=new KS(s)),e.nodes[o].stats.addBytesAllocation(a),i.all_end_rel_micros&&(i.all_end_rel_micros>0?e.nodes[o].stats.addExecutionTime(i.all_start_micros,i.all_start_micros+i.all_end_rel_micros):console.log("ignoring negative runtime for "+o))})})}var aP=class{constructor(t,r={}){this.name=t,this.type=jt.META,this.depth=1,this.isGroupNode=!0,this.cardinality=0,this.metagraph=e3(t,_0.META,r),this.bridgegraph=null,this.opHistogram={},this.deviceHistogram={},this.xlaClusterHistogram={},this.compatibilityHistogram={compatible:0,incompatible:0},this.templateId=null,this.parentNode=null,this.hasNonControlEdges=!1,this.include=ur.UNSPECIFIED,this.associatedFunction=""}getFirstChild(){return this.metagraph.node(this.metagraph.nodes()[0])}getRootOp(){let t=this.name.split("/"),r=this.name+"/("+t[t.length-1]+")";return this.metagraph.node(r)}leaves(){let t=[],r=[this],n;for(;r.length;){let i=r.shift();i!=null&&i.isGroupNode?(n=i.metagraph,pn.each(n.nodes(),o=>r.push(n.node(o)))):t.push(i==null?void 0:i.name)}return t}};function Hlt(e,t){return new Gf(e,t)}var Gf=class{constructor(t,r){this.v=t,this.w=r,this.baseEdgeList=[],this.inbound=null,this.numRegularEdges=0,this.numControlEdges=0,this.numRefEdges=0,this.totalSize=0}addBaseEdge(t,r){this.baseEdgeList.push(t),t.isControlDependency?this.numControlEdges+=1:this.numRegularEdges+=1,t.isReferenceEdge&&(this.numRefEdges+=1),this.totalSize+=Gf.computeSizeOfEdge(t,r),r.maxMetaEdgeSize=Math.max(r.maxMetaEdgeSize,this.totalSize)}static computeSizeOfEdge(t,r){let n=r.node(t.v);if(!n.outputShapes)return 1;r.hasShapeInfo=!0;let i=Object.keys(n.outputShapes).map(o=>n.outputShapes[o]).map(o=>o==null?1:o.reduce((a,s)=>(s===-1&&(s=1),a*s),1));return pn.sum(i)}};function QS(e,t,r,n,i,o){return new Blt(e,t,r,n,i,o)}function t3(e,t,r,n,i){let o=typeof n!="undefined"&&typeof i!="undefined"?"["+n+"-"+i+"]":"#",a=e+o+t;return(r?r+"/":"")+a}var Blt=class{constructor(t,r,n,i,o,a){this.name=o||t3(t,r,n),this.type=jt.SERIES,this.hasLoop=!1,this.prefix=t,this.suffix=r,this.clusterId=i,this.ids=[],this.parent=n,this.isGroupNode=!0,this.cardinality=0,this.metagraph=e3(o,_0.SERIES,a),this.bridgegraph=null,this.parentNode=null,this.deviceHistogram={},this.xlaClusterHistogram={},this.compatibilityHistogram={compatible:0,incompatible:0},this.hasNonControlEdges=!1,this.include=ur.UNSPECIFIED}};function acr(e){let t=null;if(!e)return null;for(let r=0;r<e.length;r++){let{key:n,value:i}=e[r];if(n===icr){if(!i.list||!i.list.shape)return null;let o=i.list.shape.map(a=>a.unknown_rank?null:a.dim==null||a.dim.length===1&&a.dim[0].size==null?[]:a.dim.map(s=>s.size||0));return e.splice(r,1),o}}return null}function scr(e){if(!e)return null;for(let t=0;t<e.length;t++)if(e[t].key===ocr)return e[t].value.s||null;return null}var lcr=/^([^:]+):((\w+:|)\d+)$/;function ccr(e){let t=[],r=null;for(let n of e||[]){let i=n.startsWith("^");i&&(n=n.substring(1));let o=n,a="0",s=n.includes(":")&&n.match(lcr);s&&(o=s[1],a=s[2]),r!==o&&(r=o,t.push({name:o,outputTensorKey:a,isControlDependency:i}))}return t}function Flt(e,t,r,n,i,o){if(t===r.name)return;let a=i.refEdges[r.op+" "+o]===!0;e.edges.push({v:t,w:r.name,outputTensorKey:n.outputTensorKey,isControlDependency:n.isControlDependency,isReferenceEdge:a})}var sle={enableEmbedding:!0,inEmbeddingTypes:["Const"],outEmbeddingTypes:["^[a-zA-Z]+Summary$"],refEdges:{"Assign 0":!0,"AssignAdd 0":!0,"AssignSub 0":!0,"assign 0":!0,"assign_add 0":!0,"assign_sub 0":!0,"count_up_to 0":!0,"ScatterAdd 0":!0,"ScatterSub 0":!0,"ScatterUpdate 0":!0,"scatter_add 0":!0,"scatter_sub 0":!0,"scatter_update 0":!0}};function lle(e,t,r){let n={},i={},o={},a=ele(t.inEmbeddingTypes),s=ele(t.outEmbeddingTypes),l=[],c=e.node,u=new Array(c.length);return r1("Normalizing names",30,()=>{let h=new Array(c.length),f=0,p=g=>{let _=new y0(g);return a(_)?(l.push(_.name),n[_.name]=_,_):s(_)?(l.push(_.name),i[_.name]=_,pn.each(_.inputs,y=>{let x=y.name;o[x]=o[x]||[],o[x].push(_)}),_):(h[f]=_,u[f]=_.name,f++,_)};pn.each(c,p);let d=g=>{let _=Ma+g.signature.name;if(p({name:_,input:[],device:"",op:"",attr:[]}),g.signature.input_arg){let b=0,S=C=>{let P=p({name:_+Pl+C.name,input:[],device:"",op:"input_arg",attr:[{key:"T",value:{type:C.type}}]});P.functionInputIndex=b,b++};g.signature.input_arg.name?S(g.signature.input_arg):pn.each(g.signature.input_arg,S)}let y=0,x={};if(g.signature.output_arg){let b=S=>{x[_+Pl+S.name]=y,y++};g.signature.output_arg.name?b(g.signature.output_arg):pn.each(g.signature.output_arg,b)}pn.each(g.node_def,b=>{b.name=_+"/"+b.name,typeof b.input=="string"&&(b.input=[b.input]);let S=p(b);pn.isNumber(x[b.name])&&(S.functionOutputIndex=x[b.name]),pn.each(S.inputs,C=>{C.name=_+Pl+C.name})})};return e.library&&e.library.function&&pn.each(e.library.function,d),h.splice(f),u.splice(f),h},r,jr.NORMALIZING_NAMES).then(h=>r1("Building the data structure",70,()=>{let f=ucr(u,l),p=new Xu;return pn.each(h,d=>{let g=f[d.name]||d.name;p.nodes[g]=d,d.name in o&&(d.outEmbeddings=o[d.name],pn.each(d.outEmbeddings,_=>{_.name=f[_.name]||_.name})),d.name=g}),pn.each(h,d=>{pn.each(d.inputs,(g,_)=>{let y=g.name;if(y in n){let x=n[y];d.inEmbeddings.push(x);for(let b of x.inputs)Flt(p,f[b.name]||b.name,d,b,t,_)}else if(y in i){let x=i[y];for(let b of x.inputs)Flt(p,f[b.name]||b.name,d,g,t,_)}else Flt(p,f[y]||y,d,g,t,_)})}),pn.each(n,(d,g)=>{d.name=f[d.name]||d.name}),p},r,jr.BUILD_SLIM_GRAPH))}function e3(e,t,r={}){let n=new nle.graphlib.Graph(r);return n.setGraph({name:e,rankdir:r.rankdir||"BT",type:t}),n}function ele(e){return function(t){for(let r=0;r<e.length;r++){let n=new RegExp(e[r]);if(typeof t.op=="string"&&t.op.match(n))return!0}return!1}}function sP(e){let t=e.split(Pl);return e+Pl+"("+t[t.length-1]+")"}function ucr(e,t){let r={},n={};e.sort();for(let i=0;i<e.length-1;++i){let o=e[i];pn.each(cP(o).slice(0,-1),a=>{n[a]=!0});for(let a=i+1;a<e.length;++a){let s=e[a];if(pn.startsWith(s,o)){if(s.length>o.length&&s.charAt(o.length)===Pl){r[o]=sP(o);break}}else break}}return pn.each(t,i=>{i in n&&(r[i]=sP(i))}),r}function rle(e){let t=e.nodes().map(function(r){var n;return(n=e.neighbors(r))==null?void 0:n.length});return t.sort(),t}function cle(e,t){let r=rle(e),n=rle(t);for(let i=0;i<r.length;i++)if(r[i]!==n[i])return!1;return!0}function cP(e,t){let r=[],n=e.indexOf(Pl);for(;n>=0;)r.push(e.substring(0,n)),n=e.indexOf(Pl,n+1);if(t){let i=t[e];i&&r.push(i)}return r.push(e),r}function yH(e){return e===ur.EXCLUDE?"Add to main graph":"Remove from main graph"}function ule(e){return e===os.GROUP?"Ungroup this series of nodes":"Group this series of nodes"}var He=Ee(Oe(),1);var n1=Ee(Oe(),1);function hle(e,t){let r=fcr(e),n=pcr(r,t);return Object.keys(n).sort(i=>n[i].level).reduce((i,o)=>(i[o]=n[o],i),{})}function hcr(e){let t=n1.map({depth:e.depth,"|V|":e.metagraph.nodes().length,"|E|":e.metagraph.edges().length},function(n,i){return i+"="+n}).join(" "),r=n1.map(e.opHistogram,function(n,i){return i+"="+n}).join(",");return t+" [ops] "+r}function fcr(e){let t=e.getNodeMap(),r=Object.keys(t).reduce((n,i)=>{let o=t[i];if(o.type!==jt.META)return n;let a=i.split("/").length-1,s=hcr(o),l=n[s]||{nodes:[],level:a};return n[s]=l,l.nodes.push(o),l.level>a&&(l.level=a),n},{});return Object.keys(r).map(n=>[n,r[n]]).filter(([n,i])=>{let{nodes:o}=i;if(o.length>1)return!0;let a=o[0];return a.type===jt.META&&a.associatedFunction}).sort(([n,i])=>i.nodes[0].depth)}function pcr(e,t){return n1.reduce(e,function(n,i){let o=i[0],a=i[1].nodes,s=[];return a.forEach(function(l){for(let c=0;c<s.length;c++)if(!t||dcr(s[c].metanode.metagraph,l.metagraph)){l.templateId=s[c].metanode.templateId,s[c].members.push(l.name);return}l.templateId=o+"["+s.length+"]",s.push({metanode:l,members:[l.name]})}),s.forEach(function(l){n[l.metanode.templateId]={level:i[1].level,nodes:l.members}}),n},{})}function vH(e,t,r){return n1.sortBy(e,[n=>t.node(n).op,n=>t.node(n).templateId,n=>{var i;return(i=t.neighbors(n))==null?void 0:i.length},n=>{var i;return(i=t.predecessors(n))==null?void 0:i.length},n=>{var i;return(i=t.successors(n))==null?void 0:i.length},n=>n.substr(r.length)])}function dcr(e,t){if(!cle(e,t))return!1;let r=e.graph().name,n=t.graph().name,i={},o={},a=[];function s(u,h){let f=u.substr(r.length),p=h.substr(n.length);return i[f]^o[p]?(console.warn("different visit pattern","["+r+"]",f,"["+n+"]",p),!0):(i[f]||(i[f]=o[p]=!0,a.push({n1:u,n2:h})),!1)}let l=e.sources(),c=t.sources();if(l.length!==c.length)return console.log("different source length"),!1;l=vH(l,e,r),c=vH(c,t,n);for(let u=0;u<l.length;u++)if(s(l[u],c[u]))return!1;for(;a.length>0;){let u=a.pop();if(!mcr(e.node(u==null?void 0:u.n1),t.node(u==null?void 0:u.n2)))return!1;let f=e.successors(u==null?void 0:u.n1),p=t.successors(u==null?void 0:u.n2);if((f==null?void 0:f.length)!==(p==null?void 0:p.length))return console.log("# of successors mismatch",f,p),!1;f=vH(f,e,r),p=vH(p,t,n);for(let d=0;d<(f==null?void 0:f.length);d++)if(s(f==null?void 0:f[d],p==null?void 0:p[d]))return!1}return!0}function mcr(e,t){if(e.type===jt.META){let r=e,n=t;return!!r.templateId&&!!n.templateId&&r.templateId===n.templateId}else{if(e.type===jt.OP&&t.type===jt.OP)return e.op===t.op;if(e.type===jt.SERIES&&t.type===jt.SERIES){let r=e,n=t,i=r.metagraph.nodeCount();return i===n.metagraph.nodeCount()&&(i===0||r.metagraph.node(r.metagraph.nodes()[0]).op===n.metagraph.node(n.metagraph.nodes()[0]).op)}}return!1}var Od;(function(e){e[e.TEMPLATES_UPDATED=0]="TEMPLATES_UPDATED"})(Od||(Od={}));var as=class extends dH{constructor(t){super(),this.hasShapeInfo=!1,this.maxMetaEdgeSize=1,this.graphOptions={},this.templates=null,this.graphOptions.compound=!0,this.graphOptions.rankdir=t.rankDirection,this.root=lP(qc,this.graphOptions),this.libraryFunctions={},this.seriesGroupMap=new Map(t.seriesMap),this.devices=null,this.xlaClusters=null,this.verifyTemplate=t.verifyTemplate,this.index={},this.index[qc]=this.root,this.orderings={}}getSeriesGroupType(t){var r;return(r=this.seriesGroupMap.get(t))!=null?r:os.GROUP}setSeriesGroupType(t,r){return this.seriesGroupMap.set(t,r)}buildSeriesGroupMapToggled(t){let r=this.getSeriesGroupType(t)===os.GROUP?os.UNGROUP:os.GROUP;return new Map([...this.seriesGroupMap,[t,r]])}getNodeMap(){return this.index}node(t){return this.index[t]}setNode(t,r){this.index[t]=r}getBridgegraph(t){let r=this.index[t];if(!r)throw Error("Could not find node in hierarchy: "+t);if(!("metagraph"in r))return null;let n=r;if(n.bridgegraph)return n.bridgegraph;let i=n.bridgegraph=e3("BRIDGEGRAPH",_0.BRIDGE,this.graphOptions);if(!r.parentNode||!("metagraph"in r.parentNode))return i;let o=r.parentNode,a=o.metagraph,s=this.getBridgegraph(o.name);return He.each([a,s],l=>{l.edges().filter(c=>c.v===t||c.w===t).forEach(c=>{let u=c.w===t,h=l.edge(c);He.each(h.baseEdgeList,f=>{let[p,d]=u?[f.w,c.v]:[f.v,c.w],g=this.getChildName(t,p),_={v:u?d:g,w:u?g:d},y=i.edge(_);y||(y=Hlt(_.v,_.w),y.inbound=u,i.setEdge(_.v,_.w,y)),y.addBaseEdge(f,this)})})}),i}getChildName(t,r){let n=this.index[r];for(;n;){if(n.parentNode&&n.parentNode.name===t)return n.name;n=n.parentNode}throw Error("Could not find immediate child for descendant: "+r)}getPredecessors(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);let n=this.getOneWayEdges(r,!0);return r.isGroupNode||He.each(r.inEmbeddings,i=>{He.each(r.inputs,o=>{if(o.name===i.name){let a=new Gf(i.name,t);a.addBaseEdge({isControlDependency:o.isControlDependency,outputTensorKey:o.outputTensorKey,isReferenceEdge:!1,v:i.name,w:t},this),n.regular.push(a)}})}),n}getSuccessors(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);let n=this.getOneWayEdges(r,!1);return r.isGroupNode||He.each(r.outEmbeddings,i=>{He.each(i.inputs,o=>{if(o.name===t){let a=new Gf(t,i.name);a.addBaseEdge({isControlDependency:o.isControlDependency,outputTensorKey:o.outputTensorKey,isReferenceEdge:!1,v:t,w:i.name},this),n.regular.push(a)}})}),n}getOneWayEdges(t,r){let n={control:[],regular:[]};if(!t.parentNode||!t.parentNode.isGroupNode)return n;let i=t.parentNode,o=i.metagraph,a=this.getBridgegraph(i.name);return fle(o,t,r,n),fle(a,t,r,n),n}getTopologicalOrdering(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);if(!r.isGroupNode)return null;if(t in this.orderings)return this.orderings[t];let n={},i={},o=r.metagraph;He.each(o.edges(),c=>{!o.edge(c).numRegularEdges||(c.v in n||(n[c.v]=[]),n[c.v].push(c.w),i[c.w]=!0)});let a=He.difference(He.keys(n),He.keys(i)),s=this.orderings[t]={},l=0;for(;a.length;){let c=a.shift();s[c]=l++,He.each(n[c],u=>a.push(u)),delete n[c]}return s}getTemplateIndex(){if(!this.templates)return null;let t=$L(this.templates);if(!t.length)return null;let r=gu().domain(t).range(Ir(0,t.length));return n=>r(n)}updateTemplates(){Nd("Finding similar subgraphs",()=>{this.templates=hle(this,this.verifyTemplate),this.dispatchEvent(Od.TEMPLATES_UPDATED)},jr.HIERARCHY_FIND_SIMILAR_SUBGRAPHS)}};function fle(e,t,r,n){let i=r?e.inEdges(t.name):e.outEdges(t.name);He.each(i,o=>{let a=e.edge(o);(a.numRegularEdges?n.regular:n.control).push(a)})}var r3={verifyTemplate:!0,seriesNodeMinSize:5,seriesMap:new Map,rankDirection:"BT",useGeneralizedSeriesPatterns:!1};function bH(e,t,r){let n=new as(t),i={};return r1("Adding nodes",30,()=>{let o={},a={};He.each(e.nodes,(s,l)=>{s.device&&(o[s.device]=!0),s.xlaCluster&&(a[s.xlaCluster]=!0)}),n.devices=He.keys(o),n.xlaClusters=He.keys(a),_cr(n,e)},r,jr.HIERARCHY_ADD_NODES).then(()=>r1("Detect series",30,()=>{t.seriesNodeMinSize>0&&mle(n.root,n,i,t.seriesNodeMinSize,t.seriesMap,t.useGeneralizedSeriesPatterns)},r,jr.HIERARCHY_DETECT_SERIES)).then(()=>r1("Adding edges",40,()=>{ycr(n,e,i)},r,jr.HIERARCHY_ADD_EDGES)).then(()=>n)}function ple(e,t){let r={},n={};He.each(e.root.leaves(),i=>{let o=e.node(i);o.device!=null&&(r[o.device]=!0),o.xlaCluster!=null&&(n[o.xlaCluster]=!0)}),e.devices=He.keys(r),e.xlaClusters=He.keys(n),He.each(e.getNodeMap(),(i,o)=>{i.isGroupNode&&(i.stats=new KS(null),i.deviceHistogram={})}),He.each(e.root.leaves(),i=>{let o=e.node(i),a=o;for(;a.parentNode!=null;){if(o.device!=null){let s=a.parentNode.deviceHistogram;s[o.device]=(s[o.device]||0)+1}if(o.xlaCluster!=null){let s=a.parentNode.xlaClusterHistogram;s[o.xlaCluster]=(s[o.xlaCluster]||0)+1}o.stats!=null&&a.parentNode.stats.combine(o.stats),a=a.parentNode}})}function dle(e){let t=[],r={};return He.each(e.root.leaves(),n=>{let i=e.node(n);if(i.type==jt.OP){let o=i;if(!o.compatible)if(o.owningSeries){if(e.getSeriesGroupType(o.owningSeries)===os.UNGROUP)t.push(o);else if(!r[o.owningSeries]){let a=e.node(o.owningSeries);a&&(r[o.owningSeries]=a,t.push(a))}}else t.push(o);He.each(o.inEmbeddings,a=>{a.compatible||t.push(a)}),He.each(o.outEmbeddings,a=>{a.compatible||t.push(a)})}}),t}function _cr(e,t){let r={};He.each(t.nodes,(n,i)=>{let o=cP(n.name),a=e.root;a.depth=Math.max(o.length,a.depth),r[n.op]||(r[n.op]=[]),r[n.op].push(n);for(let s=0;s<o.length&&(a.depth=Math.max(a.depth,o.length-s),a.cardinality+=n.cardinality,a.opHistogram[n.op]=(a.opHistogram[n.op]||0)+1,n.device!=null&&(a.deviceHistogram[n.device]=(a.deviceHistogram[n.device]||0)+1),n.xlaCluster!=null&&(a.xlaClusterHistogram[n.xlaCluster]=(a.xlaClusterHistogram[n.xlaCluster]||0)+1),n.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1,He.each(n.inEmbeddings,u=>{u.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1}),He.each(n.outEmbeddings,u=>{u.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1}),s!==o.length-1);s++){let l=o[s],c=e.node(l);if(!c&&(c=lP(l,e.graphOptions),c.parentNode=a,e.setNode(l,c),a.metagraph.setNode(l,c),l.indexOf(Ma)===0&&a.name===qc)){let u=l.substring(Ma.length);r[u]||(r[u]=[]),e.libraryFunctions[u]={node:c,usages:r[u]},c.associatedFunction=u}a=c}e.setNode(n.name,n),n.parentNode=a,a.metagraph.setNode(n.name,n),He.each(n.inEmbeddings,function(s){e.setNode(s.name,s),s.parentNode=n}),He.each(n.outEmbeddings,function(s){e.setNode(s.name,s),s.parentNode=n})})}function ycr(e,t,r){let n=e.getNodeMap(),i=[],o=[],a=(s,l)=>{let c=0;for(;s;)l[c++]=s.name,s=s.parentNode;return c-1};He.each(t.edges,s=>{let l=a(t.nodes[s.v],i),c=a(t.nodes[s.w],o);if(l===-1||c===-1)return;for(;i[l]===o[c];)if(l--,c--,l<0||c<0)throw Error("No difference found between ancestor paths.");let u=n[i[l+1]],h=i[l],f=o[c],p=u.metagraph.edge(h,f);p||(p=Hlt(h,f),u.metagraph.setEdge(h,f,p)),!u.hasNonControlEdges&&!s.isControlDependency&&(u.hasNonControlEdges=!0),p.addBaseEdge(s,e)})}function mle(e,t,r,n,i,o){let a=e.metagraph;He.each(a.nodes(),u=>{let h=a.node(u);h.type===jt.META&&mle(h,t,r,n,i,o)});let s=vcr(a),c=(o?bcr:xcr)(s,a,t.graphOptions);He.each(c,function(u,h){let f=u.metagraph.nodes();He.each(f,p=>{let d=a.node(p);d.owningSeries||(d.owningSeries=h)}),f.length<n&&t.getSeriesGroupType(u.name)===os.GROUP&&t.setSeriesGroupType(u.name,os.UNGROUP),t.getSeriesGroupType(u.name)!==os.UNGROUP&&(t.setNode(h,u),a.setNode(h,u),He.each(f,p=>{let d=a.node(p);u.metagraph.setNode(p,d),u.parentNode=d.parentNode,u.cardinality++,d.device!=null&&(u.deviceHistogram[d.device]=(u.deviceHistogram[d.device]||0)+1),d.xlaCluster!=null&&(u.xlaClusterHistogram[d.xlaCluster]=(u.xlaClusterHistogram[d.xlaCluster]||0)+1),d.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1,He.each(d.inEmbeddings,g=>{g.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1}),He.each(d.outEmbeddings,g=>{g.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1}),d.parentNode=u,r[p]=h,a.removeNode(p)}))})}function vcr(e){let t={};return He.reduce(e.nodes(),(r,n)=>{let i=e.node(n);if(i.type===jt.META)return r;let o=i.op;return o&&(r[o]=r[o]||[],r[o].push(i.name)),r},t)}function xcr(e,t,r){let n={};return He.each(e,function(i,o){if(i.length<=1)return;let a={};He.each(i,function(s){let l=s.charAt(s.length-1)==="*",c=s.split("/"),u=c[c.length-1],h=c.slice(0,c.length-1).join("/"),f=u.match(/^(\D*)(\d+)$/),p,d,g="";f?(p=f[1],d=f[2]):(p=l?u.substr(0,u.length-1):u,d=0,g=l?"*":"");let _=t3(p,g,h);a[_]=a[_]||[];let y=QS(p,g,h,+d,s,r);a[_].push(y)}),He.each(a,function(s,l){if(s.length<2)return;s.sort(function(u,h){return+u.clusterId-+h.clusterId});let c=[s[0]];for(let u=1;u<s.length;u++){let h=s[u];if(h.clusterId===c[c.length-1].clusterId+1){c.push(h);continue}xH(c,n,+o,t,r),c=[h]}xH(c,n,+o,t,r)})}),n}function bcr(e,t,r){let n={};return He.each(e,function(i,o){if(i.length<=1)return;let a={},s={};He.each(i,function(c){let u=c.charAt(c.length-1)==="*",h=c.split("/"),f=h[h.length-1],p=h.slice(0,h.length-1).join("/"),d=/(\d+)/g,g=[],_,y,x,b,S,C=0;for(;_=d.exec(f);)++C,y=f.slice(0,_.index),x=_[0],b=f.slice(_.index+_[0].length),S=t3(y,b,p),a[S]=a[S],a[S]||(a[S]=QS(y,b,p,+x,c,r)),a[S].ids.push(x),s[c]=s[c]||[],s[c].push([S,x]);C<1&&(y=u?f.substr(0,f.length-1):f,x=0,b=u?"*":"",S=t3(y,b,p),a[S]=a[S],a[S]||(a[S]=QS(y,b,p,+x,c,r)),a[S].ids.push(x),s[c]=s[c]||[],s[c].push([S,x]))});var l={};He.each(s,function(c,u){c.sort(function(y,x){return a[x[0]].ids.length-a[y[0]].ids.length});var h=c[0][0],f=c[0][1];l[h]=l[h]||[];let p=u.split("/"),d=p[p.length-1],g=p.slice(0,p.length-1).join("/");var _=QS(a[h].prefix,a[h].suffix,g,+f,u,r);l[h].push(_)}),He.each(l,function(c,u){if(c.length<2)return;c.sort(function(f,p){return+f.clusterId-+p.clusterId});let h=[c[0]];for(let f=1;f<c.length;f++){let p=c[f];if(p.clusterId===h[h.length-1].clusterId+1){h.push(p);continue}xH(h,n,+o,t,r),h=[p]}xH(h,n,+o,t,r)})}),n}function xH(e,t,r,n,i){if(e.length>1){let o=t3(e[0].prefix,e[0].suffix,e[0].parent,e[0].clusterId,e[e.length-1].clusterId),a=QS(e[0].prefix,e[0].suffix,e[0].parent,r,o,i);He.each(e,function(s){a.ids.push(s.clusterId),a.metagraph.setNode(s.name,n.node(s.name))}),t[o]=a}}var me=Ee(Oe(),1);var v0={DEFAULT_FILL:"#ffffff",DEFAULT_STROKE:"#b2b2b2",COMPATIBLE:"#0f9d58",INCOMPATIBLE:"#db4437"},Ku={DEFAULT_FILL:"#d9d9d9",DEFAULT_STROKE:"#a6a6a6",SATURATION:.6,LIGHTNESS:.85,EXPANDED_COLOR:"#f0f0f0",HUES:[220,100,180,40,20,340,260,300,140,60],STRUCTURE_PALETTE(e,t){let r=Ku.HUES,n=r.length,i=r[e%n],o=Math.sin(i*Math.PI/360),a=t?30:90-60*o,s=t?95:80;return Um(i,.01*a,.01*s).toString()},DEVICE_PALETTE(e){return Ku.STRUCTURE_PALETTE(e)},XLA_CLUSTER_PALETTE(e){return Ku.STRUCTURE_PALETTE(e)},UNKNOWN:"#eee",GRADIENT_OUTLINE:"#888"},Vlt={DEFAULT_FILL:"white",DEFAULT_STROKE:"#b2b2b2"},Xo={minNodeCountForExtraction:15,minDegreeForExtraction:5,maxControlDegree:4,maxBridgePathDegree:4,outExtractTypes:["NoOp"],inExtractTypes:[],detachAllEdgesForHighDegree:!0,extractIsolatedNodesWithAnnotationsOnOneSide:!0,enableBridgegraph:!0,minMaxColors:["#fff5f0","#fb6a4a"],maxAnnotations:5},wcr=new RegExp("^(?:"+Ma+")?(\\w+)_[a-z0-9]{8}(?:_\\d+)?$"),lo=class{constructor(t,r,n){this.hierarchy=t,this.displayingStats=r,this.autoExtractNodes=n,this.index={},this.renderedOpNames=[],this.computeScales(),this.hasSubhierarchy={},this.root=new SH(t.root,t.graphOptions),this.index[t.root.name]=this.root,this.renderedOpNames.push(t.root.name),this.buildSubhierarchy(t.root.name),this.root.expanded=!0,this.traceInputs=!1}computeScales(){this.deviceColorMap=gu().domain(this.hierarchy.devices).range(me.map(Ir(this.hierarchy.devices.length),Ku.DEVICE_PALETTE)),this.xlaClusterColorMap=gu().domain(this.hierarchy.xlaClusters).range(me.map(Ir(this.hierarchy.xlaClusters.length),Ku.XLA_CLUSTER_PALETTE));let t=this.hierarchy.root.metagraph,r=lu(t.nodes(),(i,o)=>{let a=t.node(i);if(a.stats!=null)return a.stats.totalBytes});this.memoryUsageScale=zn().domain([0,r]).range(Xo.minMaxColors);let n=lu(t.nodes(),(i,o)=>{let a=t.node(i);if(a.stats!=null)return a.stats.getTotalMicros()});this.computeTimeScale=zn().domain([0,n]).range(Xo.minMaxColors),this.edgeWidthSizedBasedScale=this.hierarchy.hasShapeInfo?Xse:zn().domain([1,this.hierarchy.maxMetaEdgeSize]).range([Q4,tP])}getRenderNodeByName(t){return this.index[t]}getNodeByName(t){return this.hierarchy.node(t)}colorHistogram(t,r){if(Object.keys(t).length>0){let n=me.sum(Object.keys(t).map(i=>t[i]));return Object.keys(t).map(i=>({color:r(i),proportion:t[i]/n}))}return null}getOrCreateRenderNodeByName(t){if(!t)return null;if(t in this.index)return this.index[t];let r=this.hierarchy.node(t);if(!r)return null;let n=r.isGroupNode?new SH(r,this.hierarchy.graphOptions):new Wf(r);this.index[t]=n,this.renderedOpNames.push(t),r.stats&&(n.memoryColor=this.memoryUsageScale(r.stats.totalBytes),n.computeTimeColor=this.computeTimeScale(r.stats.getTotalMicros())),n.isFadedOut=this.displayingStats&&!gH(r.stats);var i=null,o=null,a=null;if(r.isGroupNode){i=r.deviceHistogram,o=r.xlaClusterHistogram;let s=r.compatibilityHistogram.compatible,l=r.compatibilityHistogram.incompatible;(s!=0||l!=0)&&(a=s/(s+l))}else{let s=n.node.device;s&&(i={[s]:1});let l=n.node.xlaCluster;l&&(o={[l]:1}),n.node.type===jt.OP&&(a=n.node.compatible?1:0)}return i&&(n.deviceColors=this.colorHistogram(i,this.deviceColorMap)),o&&(n.xlaClusterColors=this.colorHistogram(o,this.xlaClusterColorMap)),a!=null&&(n.compatibilityColors=[{color:v0.COMPATIBLE,proportion:a},{color:v0.INCOMPATIBLE,proportion:1-a}]),this.index[t]}getNearestVisibleAncestor(t){let r=cP(t),n=0,i=null,o=t;for(;n<r.length&&(o=r[n],i=this.getRenderNodeByName(o),!!i.expanded);n++);if(n==r.length-2){let a=r[n+1];if(i!=null&&i.inAnnotations.nodeNames[a]||i!=null&&i.outAnnotations.nodeNames[a])return a}return o}setDepth(t){yle(this.root,+t)}isNodeAuxiliary(t){let r=this.getRenderNodeByName(t.node.parentNode.name),n=me.find(r.isolatedInExtract,i=>i.node.name===t.node.name);return n?!0:(n=me.find(r.isolatedOutExtract,i=>i.node.name===t.node.name),!!n)}getNamesOfRenderedOps(){return this.renderedOpNames}cloneAndAddFunctionOpNode(t,r,n,i){let o=n.name.replace(r,i),a=t.metagraph.node(o);if(a)return a;a=new y0({name:o,input:[],device:n.device,op:n.op,attr:me.cloneDeep(n.attr)}),a.cardinality=n.cardinality,a.include=n.include,a.outputShapes=me.cloneDeep(n.outputShapes),a.xlaCluster=n.xlaCluster,a.functionInputIndex=n.functionInputIndex,a.functionOutputIndex=n.functionOutputIndex,a.inputs=n.inputs.map(l=>{let c=me.clone(l);return c.name=l.name.replace(r,i),c}),a.parentNode=t,t.metagraph.setNode(a.name,a),this.hierarchy.setNode(a.name,a);let s=l=>this.cloneAndAddFunctionOpNode(t,r,l,i);return a.inEmbeddings=n.inEmbeddings.map(s),a.outEmbeddings=n.outEmbeddings.map(s),a}cloneFunctionLibraryMetanode(t,r,n,i,o){let a={},s=this.cloneFunctionLibraryMetanodeHelper(t,r,n,i,o,a);return me.isEmpty(a)||this.patchEdgesFromFunctionOutputs(r,a),s}cloneFunctionLibraryMetanodeHelper(t,r,n,i,o,a){let s=lP(n.name.replace(i,o));return s.depth=n.depth,s.cardinality=n.cardinality,s.templateId=n.templateId,s.opHistogram=me.clone(n.opHistogram),s.deviceHistogram=me.clone(n.deviceHistogram),s.xlaClusterHistogram=me.clone(n.xlaClusterHistogram),s.hasNonControlEdges=n.hasNonControlEdges,s.include=n.include,s.nodeAttributes=me.clone(n.nodeAttributes),s.associatedFunction=n.associatedFunction,me.each(n.metagraph.nodes(),l=>{let c=n.metagraph.node(l);switch(c.type){case jt.META:let u=this.cloneFunctionLibraryMetanodeHelper(t,r,c,i,o,a);u.parentNode=s,s.metagraph.setNode(u.name,u),this.hierarchy.setNode(u.name,u);break;case jt.OP:let h=this.cloneAndAddFunctionOpNode(s,i,c,o);me.isNumber(h.functionInputIndex)&&this.patchEdgesIntoFunctionInputs(r,h),me.isNumber(h.functionOutputIndex)&&(a[h.functionOutputIndex]=h);break;default:console.warn(`${c.name} is oddly neither a metanode nor an opnode.`)}}),this.cloneLibraryMetanodeEdges(n,s,i,o),s}cloneLibraryMetanodeEdges(t,r,n,i){me.each(t.metagraph.edges(),o=>{let a=t.metagraph.edge(o),s=a.v.replace(n,i),l=a.w.replace(n,i),c=new Gf(s,l);c.inbound=a.inbound,c.numRegularEdges=a.numRegularEdges,c.numControlEdges=a.numControlEdges,c.numRefEdges=a.numRefEdges,c.totalSize=a.totalSize,a.baseEdgeList&&(c.baseEdgeList=a.baseEdgeList.map(u=>{let h=me.clone(u);return h.v=u.v.replace(n,i),h.w=u.w.replace(n,i),h})),r.metagraph.node(l)?r.metagraph.setEdge(s,l,c):r.metagraph.setEdge(l,s,c)})}patchEdgesIntoFunctionInputs(t,r){let n=Math.min(r.functionInputIndex,t.inputs.length-1),i=me.clone(t.inputs[n]);for(;i.isControlDependency;)n++,i=t.inputs[n];r.inputs.push(i);let o=this.hierarchy.getPredecessors(t.name),a,s=0;me.each(o.regular,l=>{if(s+=l.numRegularEdges,s>n)return a=l,!1}),me.each(a.baseEdgeList,l=>{l.w===t.name&&(l.w=r.name),l.v===t.name&&(l.v=r.name)})}patchEdgesFromFunctionOutputs(t,r){let n=this.hierarchy.getSuccessors(t.name);me.each(n.regular,i=>{me.each(i.baseEdgeList,o=>{let a=this.hierarchy.node(o.w);me.each(a.inputs,s=>{if(s.name===t.name){let l=r[s.outputTensorKey];s.name=l.name,s.outputTensorKey=o.outputTensorKey}})}),me.each(i.baseEdgeList,o=>{o.v=r[o.outputTensorKey].name,o.outputTensorKey="0"})})}buildSubhierarchy(t){if(t in this.hasSubhierarchy)return;this.hasSubhierarchy[t]=!0;let r=this.index[t];if(r.node.type!==jt.META&&r.node.type!==jt.SERIES)return;let n=r,i=n.node.metagraph,o=n.coreGraph,a=[],s=[];me.isEmpty(this.hierarchy.libraryFunctions)||(me.each(i.nodes(),d=>{let g=i.node(d),_=this.hierarchy.libraryFunctions[g.op];if(!_||d.indexOf(Ma)===0)return;let y=this.cloneFunctionLibraryMetanode(i,g,_.node,_.node.name,g.name);a.push(g),s.push(y)}),me.each(s,(d,g)=>{let _=a[g];d.parentNode=_.parentNode,i.setNode(_.name,d),this.hierarchy.setNode(_.name,d)})),me.each(i.nodes(),d=>{let g=this.getOrCreateRenderNodeByName(d),_=g.node;o.setNode(d,g),_.isGroupNode||(me.each(_.inEmbeddings,y=>{let x=new zd(null),b=new Wf(y);gle(g,y,b,x,gi.CONSTANT),this.index[y.name]=b}),me.each(_.outEmbeddings,y=>{let x=new zd(null),b=new Wf(y);_le(g,y,b,x,gi.SUMMARY),this.index[y.name]=b}))}),me.each(i.edges(),d=>{let g=i.edge(d),_=new zd(g);_.isFadedOut=this.index[d.v].isFadedOut||this.index[d.w].isFadedOut,o.setEdge(d.v,d.w,_)}),n.node.type===jt.META&&Pcr(n,this.autoExtractNodes),me.isEmpty(this.hierarchy.libraryFunctions)||this.buildSubhierarchiesForNeededFunctions(i),t===qc&&me.forOwn(this.hierarchy.libraryFunctions,(d,g)=>{let _=d.node,y=this.getOrCreateRenderNodeByName(_.name);n.libraryFunctionsExtract.push(y),y.node.include=ur.EXCLUDE,o.removeNode(_.name)});let l=n.node.parentNode;if(!l)return;let c=this.index[l.name],u=(d,...g)=>g.concat([d?"IN":"OUT"]).join("~~"),h=this.hierarchy.getBridgegraph(t),f={in:{},out:{},control:{}};me.each(h.edges(),d=>{let g=!!i.node(d.w),_=g?d.v:d.w;h.edge(d).numRegularEdges?g?f.out[_]=(f.out[_]||0)+1:f.in[_]=(f.in[_]||0)+1:f.control[_]=(f.control[_]||0)+1});let p=this.hierarchy.getNodeMap();me.each(h.edges(),d=>{let g=h.edge(d),_=!!i.node(d.w),[y,x]=_?[d.w,d.v]:[d.v,d.w],b=this.index[y],S=this.index[x],C=S?S.node:p[x],P=!g.numRegularEdges&&f.control[x]>Xo.maxControlDegree,[,k]=_?[r.inAnnotations,b.inAnnotations]:[r.outAnnotations,b.outAnnotations],D=(_?f.out:f.in)[x]>Xo.maxBridgePathDegree,B=null,I=!1;if(Xo.enableBridgegraph&&!D&&!P&&b.isInCore()){let W=Z=>{let rt=_?{v:Z,w:t}:{v:t,w:Z};return c.coreGraph.edge(rt)};B=W(x),B||(B=W(u(_,x,l.name))),I=!!B}let L=!1;if(B&&!g.numRegularEdges){let W=B,Z=c.node;for(;W.adjoiningMetaedge;)W=W.adjoiningMetaedge,Z=Z.parentNode;let rt=this.hierarchy.getTopologicalOrdering(Z.name),ot=W.metaedge;L=rt[ot.v]>rt[ot.w]}if(I=I&&!L,!I){k.push(new i3(C,S,new zd(g),gi.SHORTCUT,_));return}let R=u(_,t),F=u(_,x,t),z=o.node(F);if(!z){let W=o.node(R);if(!W){let rt={name:R,type:jt.BRIDGE,isGroupNode:!1,cardinality:0,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:_,nodeAttributes:{}};W=new Wf(rt),this.index[R]=W,o.setNode(R,W)}let Z={name:F,type:jt.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:_,nodeAttributes:{}};z=new Wf(Z),this.index[F]=z,o.setNode(F,z),o.setParent(F,R),W.node.cardinality++}let U=new zd(g);U.adjoiningMetaedge=B,_?o.setEdge(F,y,U):o.setEdge(y,F,U)}),me.each([!0,!1],d=>{let g=u(d,t),_=o.node(g);!_||me.each(o.nodes(),y=>{var k,O;if(o.node(y).node.type===jt.BRIDGE||!(d?!((k=o.predecessors(y))!=null&&k.length):!((O=o.successors(y))!=null&&O.length)))return;let S=u(d,t,"STRUCTURAL_TARGET"),C=o.node(S);if(!C){let D={name:S,type:jt.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:d,nodeAttributes:{}};C=new Wf(D),C.structural=!0,this.index[S]=C,o.setNode(S,C),_.node.cardinality++,o.setParent(S,g)}let P=new zd(null);P.structural=!0,P.weight--,d?o.setEdge(S,y,P):o.setEdge(y,S,P)})})}buildSubhierarchiesForNeededFunctions(t){me.each(t.edges(),r=>{let n=t.edge(r),i=new zd(n);me.forEach(i.metaedge.baseEdgeList,o=>{let a=o.v.split(Pl);for(let s=a.length;s>=0;s--){let l=a.slice(0,s),c=this.hierarchy.node(l.join(Pl));if(c){if(c.type===jt.OP&&this.hierarchy.libraryFunctions[c.op])for(let u=1;u<l.length;u++){let h=l.slice(0,u).join(Pl);!h||this.buildSubhierarchy(h)}break}}})})}},i3=class{constructor(t,r,n,i,o){this.node=t,this.renderNodeInfo=r,this.renderMetaedgeInfo=n,this.annotationType=i,this.dx=0,this.dy=0,this.width=0,this.height=0,n&&n.metaedge&&(this.v=n.metaedge.v,this.w=n.metaedge.w),this.isIn=o,this.points=[]}},gi;(function(e){e[e.SHORTCUT=0]="SHORTCUT",e[e.CONSTANT=1]="CONSTANT",e[e.SUMMARY=2]="SUMMARY",e[e.ELLIPSIS=3]="ELLIPSIS"})(gi||(gi={}));var wH=class{constructor(){this.list=[],this.nodeNames={}}push(t){if(t.node.name in this.nodeNames)return;if(this.nodeNames[t.node.name]=!0,this.list.length<Xo.maxAnnotations){this.list.push(t);return}let r=this.list[this.list.length-1];if(r.annotationType===gi.ELLIPSIS){let i=r.node;i.setNumMoreNodes(++i.numMoreNodes);return}let n=new _H(1);this.list.push(new i3(n,new Wf(n),null,gi.ELLIPSIS,t.isIn))}},Wf=class{constructor(t){if(this.node=t,this.expanded=!1,this.inAnnotations=new wH,this.outAnnotations=new wH,this.x=0,this.y=0,this.width=0,this.height=0,this.inboxWidth=0,this.outboxWidth=0,this.excluded=!1,this.structural=!1,this.labelOffset=0,this.radius=0,this.labelHeight=0,this.paddingTop=0,this.paddingLeft=0,this.paddingRight=0,this.paddingBottom=0,this.isInExtract=!1,this.isOutExtract=!1,this.coreBox={width:0,height:0},this.isFadedOut=!1,this.displayName=t.name.substring(t.name.lastIndexOf(Pl)+1),t.type===jt.META&&t.associatedFunction){let r=this.displayName.match(wcr);r?this.displayName=r[1]:me.startsWith(this.displayName,Ma)&&(this.displayName=this.displayName.substring(Ma.length))}}isInCore(){return!this.isInExtract&&!this.isOutExtract&&!this.isLibraryFunction}},zd=class{constructor(t){this.metaedge=t,this.adjoiningMetaedge=null,this.structural=!1,this.weight=1,this.isFadedOut=!1}};function gle(e,t,r,n,i){let o=new i3(t,r,n,i,!0);e.inAnnotations.push(o)}function _le(e,t,r,n,i){let o=new i3(t,r,n,i,!1);e.outAnnotations.push(o)}function Scr(e,t){me.each(e.nodes(),r=>{let n=e.node(r);if(n.expanded=t>1,t>0)switch(n.node.type){case jt.META:case jt.SERIES:yle(n,t-1);break}})}var SH=class extends Wf{constructor(t,r){super(t);let i=t.metagraph.graph();this.coreGraph=e3(i.name,_0.CORE,r),this.inExtractBox={width:0,height:0},this.outExtractBox={width:0,height:0},this.libraryFunctionsBox={width:0,height:0},this.isolatedInExtract=[],this.isolatedOutExtract=[],this.libraryFunctionsExtract=[]}};function yle(e,t){e.coreGraph&&Scr(e.coreGraph,t)}function uP(e,t,r){let n=e.node(t),i=e.node(r),o=e.edge(t,r);(n.node.include===ur.INCLUDE||i.node.include===ur.INCLUDE)&&n.node.include!==ur.EXCLUDE&&i.node.include!==ur.EXCLUDE||(_le(n,i.node,i,o,gi.SHORTCUT),gle(i,n.node,n,o,gi.SHORTCUT),e.removeEdge(t,r))}function Ult(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isOutExtract=!0,me.each(n.predecessors(t),(a,s)=>{uP(n,a,t)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.successors(t),(a,s)=>{uP(n,t,a)}),((o=n.neighbors(t))==null?void 0:o.length)===0&&(i.node.include=ur.EXCLUDE,e.isolatedOutExtract.push(i),n.removeNode(t))}function qlt(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isInExtract=!0,me.each(n.successors(t),(a,s)=>{uP(n,t,a)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.predecessors(t),(a,s)=>{uP(n,a,t)}),((o=n.neighbors(t))==null?void 0:o.length)===0&&(i.node.include=ur.EXCLUDE,e.isolatedInExtract.push(i),n.removeNode(t))}function vle(e,t){if(e.type===jt.OP){for(let r=0;r<t.length;r++)if(e.op===t[r])return!0}else if(e.type===jt.META){let r=e.getRootOp();if(r){for(let n=0;n<t.length;n++)if(r.op===t[n])return!0}}return!1}function Mcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{var i,o;t.node(r).node.include===ur.EXCLUDE&&!r.startsWith(Ma)&&(((i=e.coreGraph.outEdges(r))==null?void 0:i.length)>((o=e.coreGraph.inEdges(r))==null?void 0:o.length)?Ult(e,r,!0):qlt(e,r,!0))})}function Ecr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&vle(n.node,Xo.outExtractTypes)&&Ult(e,r)})}function Tcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&vle(n.node,Xo.inExtractTypes)&&qlt(e,r)})}function Ccr(e){let t=e.coreGraph,r={},n={},i=0;if(me.each(t.nodes(),_=>{var b,S,C,P;if(t.node(_).node.include!==ur.UNSPECIFIED)return;let y=me.reduce(t.predecessors(_),(k,O)=>{let D=t.edge(O,_).metaedge;return k+(D.numRegularEdges?1:0)},0);y===0&&((b=t.predecessors(_))==null?void 0:b.length)>0&&(y=(S=t.predecessors(_))==null?void 0:S.length);let x=me.reduce(t.successors(_),(k,O)=>{let D=t.edge(_,O).metaedge;return k+(D.numRegularEdges?1:0)},0);x===0&&((C=t.successors(_))==null?void 0:C.length)>0&&(x=(P=t.successors(_))==null?void 0:P.length),r[_]=y,n[_]=x,i++}),i<Xo.minNodeCountForExtraction)return;let o=Xo.minDegreeForExtraction-1,a=Math.round(i*.75),s=Math.round(i*.25),l=Object.keys(r).sort((_,y)=>r[_]-r[y]),c=r[l[a]],u=r[l[s]],h=c+c-u;h=Math.max(h,o);for(let _=i-1;r[l[_]]>h;_--)qlt(e,l[_]);let f=Object.keys(n).sort((_,y)=>n[_]-n[y]),p=n[f[a]],d=n[f[s]],g=p+(p-d)*4;g=Math.max(g,o);for(let _=i-1;n[f[_]]>g;_--){let y=t.node(f[_]);!y||y.isInExtract||Ult(e,f[_])}}function Acr(e){let t=e.coreGraph,r={};me.each(t.edges(),n=>{t.edge(n).metaedge.numRegularEdges||((r[n.v]=r[n.v]||[]).push(n),(r[n.w]=r[n.w]||[]).push(n))}),me.each(r,(n,i)=>{n.length>Xo.maxControlDegree&&me.each(n,o=>uP(t,o.v,o.w))})}function Pcr(e,t){Mcr(e),Xo.outExtractTypes.length&&Ecr(e),Xo.inExtractTypes.length&&Tcr(e),t&&Ccr(e),Xo.maxControlDegree&&Acr(e);let r=e.coreGraph;me.each(r.nodes(),n=>{var a;let i=r.node(n),o=(a=r.neighbors(n))==null?void 0:a.length;if(i.node.include===ur.UNSPECIFIED&&o===0){let s=i.outAnnotations.list.length>0,l=i.inAnnotations.list.length>0;i.isInExtract?(e.isolatedInExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):i.isOutExtract?(e.isolatedOutExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):Xo.extractIsolatedNodesWithAnnotationsOnOneSide&&(s&&!l?(i.isInExtract=!0,e.isolatedInExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):l&&!s&&(i.isOutExtract=!0,e.isolatedOutExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)))}})}function xle(e,t,r){let n=r.split("/"),i=n[n.length-1].match(/(.*):\w+/);(i==null?void 0:i.length)===2&&(n[n.length-1]=i==null?void 0:i[1]);let o=n[0],a=t.getRenderNodeByName(o);for(let s=1;s<n.length&&a.node.type!==jt.OP;s++)t.buildSubhierarchy(o),a.expanded=!0,e.setNodeExpanded(a),o+="/"+n[s],a=t.getRenderNodeByName(o);return a.node.name}var Mle=Ee(Olt(),1),Ze=Ee(Oe(),1);var Tr={animation:{duration:250},graph:{meta:{nodeSep:5,rankSep:25,edgeSep:5},series:{nodeSep:5,rankSep:25,edgeSep:5},padding:{paddingTop:40,paddingLeft:20}},subscene:{meta:{paddingTop:10,paddingBottom:10,paddingLeft:10,paddingRight:10,labelHeight:20,extractXOffset:15,extractYOffset:20},series:{paddingTop:10,paddingBottom:10,paddingLeft:10,paddingRight:10,labelHeight:10}},nodeSize:{meta:{radius:5,width:60,maxLabelWidth:52,height:zn().domain([1,200]).range([15,60]).clamp(!0),expandButtonRadius:3},op:{width:15,height:6,radius:3,labelOffset:-8,maxLabelWidth:30},series:{expanded:{radius:10,labelOffset:0},vertical:{width:16,height:13,labelOffset:-13},horizontal:{width:24,height:8,radius:10,labelOffset:-10}},bridge:{width:20,height:20,radius:2,labelOffset:0}},shortcutSize:{op:{width:10,height:4},meta:{width:12,height:4,radius:1},series:{width:14,height:4}},annotations:{inboxWidth:50,outboxWidth:50,xOffset:10,yOffset:3,labelOffset:2,maxLabelWidth:40},constant:{size:{width:4,height:4}},series:{maxStackCount:3,parallelStackOffsetRatio:.2,towerStackOffsetRatio:.5},minimap:{size:150}},o3=140;function MH(e){e.node.isGroupNode&&Lcr(e),e.node.type===jt.META?kcr(e):e.node.type===jt.SERIES&&Rcr(e)}function Icr(e){e.inboxWidth=e.inAnnotations.list.length>0?Tr.annotations.inboxWidth:0,e.outboxWidth=e.outAnnotations.list.length>0?Tr.annotations.outboxWidth:0,e.coreBox.width=e.width,e.coreBox.height=e.height;let t=e.displayName.length,r=3;e.width=Math.max(e.coreBox.width+e.inboxWidth+e.outboxWidth,t*r)}function Lcr(e){let t=e.coreGraph.nodes().map(r=>e.coreGraph.node(r)).concat(e.isolatedInExtract,e.isolatedOutExtract,e.libraryFunctionsExtract);Ze.each(t,r=>{switch(r.node.type){case jt.OP:Ze.extend(r,Tr.nodeSize.op);break;case jt.BRIDGE:Ze.extend(r,Tr.nodeSize.bridge);break;case jt.META:r.expanded?MH(r):(Ze.extend(r,Tr.nodeSize.meta),r.height=Tr.nodeSize.meta.height(r.node.cardinality));break;case jt.SERIES:if(r.expanded)Ze.extend(r,Tr.nodeSize.series.expanded),MH(r);else{let i=r.node.hasNonControlEdges?Tr.nodeSize.series.vertical:Tr.nodeSize.series.horizontal;Ze.extend(r,i)}break;default:throw Error("Unrecognized node type: "+r.node.type)}r.expanded||Icr(r),Ncr(r)})}function Ele(e,t){Ze.extend(e.graph(),{nodesep:t.nodeSep,ranksep:t.rankSep,edgesep:t.edgeSep});let r=[],n=[];if(Ze.each(e.nodes(),l=>{e.node(l).node.type===jt.BRIDGE?r.push(l):n.push(l)}),!n.length)return{width:0,height:0};Mle.layout(e);let i=1/0,o=1/0,a=-1/0,s=-1/0;return Ze.each(n,l=>{let c=e.node(l),u=.5*c.width,h=c.x-u,f=c.x+u;i=h<i?h:i,a=f>a?f:a;let p=.5*c.height,d=c.y-p,g=c.y+p;o=d<o?d:o,s=g>s?g:s}),Ze.each(e.edges(),l=>{let c=e.edge(l);if(c.structural)return;let u=e.node(c.metaedge.v),h=e.node(c.metaedge.w);if(c.points.length===3&&Dcr(c.points)){if(u!=null){let d=u.expanded?u.x:x0(u);c.points[0].x=d}if(h!=null){let d=h.expanded?h.x:x0(h);c.points[2].x=d}c.points=[c.points[0],c.points[1]]}let f=c.points[c.points.length-2];h!=null&&(c.points[c.points.length-1]=Sle(f,h));let p=c.points[1];u!=null&&(c.points[0]=Sle(p,u)),Ze.each(c.points,d=>{i=d.x<i?d.x:i,a=d.x>a?d.x:a,o=d.y<o?d.y:o,s=d.y>s?d.y:s})}),Ze.each(e.nodes(),l=>{let c=e.node(l);c.x-=i,c.y-=o}),Ze.each(e.edges(),l=>{Ze.each(e.edge(l).points,c=>{c.x-=i,c.y-=o})}),{width:a-i,height:s-o}}function kcr(e){let t=Tr.subscene.meta;Ze.extend(e,t),Ze.extend(e.coreBox,Ele(e.coreGraph,Tr.graph.meta));let r=e.isolatedInExtract.length?Ze.maxBy(e.isolatedInExtract,c=>c.width).width:null;e.inExtractBox.width=r!=null?r:0,e.inExtractBox.height=Ze.reduce(e.isolatedInExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let n=e.isolatedOutExtract.length?Ze.maxBy(e.isolatedOutExtract,c=>c.width).width:null;e.outExtractBox.width=n!=null?n:0,e.outExtractBox.height=Ze.reduce(e.isolatedOutExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let i=e.libraryFunctionsExtract.length?Ze.maxBy(e.libraryFunctionsExtract,c=>c.width).width:null;e.libraryFunctionsBox.width=i!=null?i:0,e.libraryFunctionsBox.height=Ze.reduce(e.libraryFunctionsExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let o=0;e.isolatedInExtract.length>0&&o++,e.isolatedOutExtract.length>0&&o++,e.libraryFunctionsExtract.length>0&&o++,e.coreGraph.nodeCount()>0&&o++;let a=Tr.subscene.meta.extractXOffset,s=o<=1?0:o*a,l=Math.max(o3,e.inExtractBox.width+e.outExtractBox.width);e.coreBox.width+=l+s+e.libraryFunctionsBox.width+s,e.coreBox.height=t.labelHeight+Math.max(e.inExtractBox.height,e.coreBox.height,e.libraryFunctionsBox.height,e.outExtractBox.height),e.width=e.coreBox.width+t.paddingLeft+t.paddingRight,e.height=e.paddingTop+e.coreBox.height+e.paddingBottom}function Rcr(e){let t=e.coreGraph,r=Tr.subscene.series;Ze.extend(e,r),Ze.extend(e.coreBox,Ele(e.coreGraph,Tr.graph.series)),Ze.each(t.nodes(),n=>{t.node(n).excluded=!1}),e.width=e.coreBox.width+r.paddingLeft+r.paddingRight,e.height=e.coreBox.height+r.paddingTop+r.paddingBottom}function Ncr(e){if(e.expanded)return;let t=e.inAnnotations.list,r=e.outAnnotations.list;Ze.each(t,u=>ble(u)),Ze.each(r,u=>ble(u));let n=Tr.annotations,i=Ze.reduce(t,(u,h,f)=>{let p=f>0?n.yOffset:0;return h.dx=-(e.coreBox.width+h.width)/2-n.xOffset,h.dy=u+p+h.height/2,u+p+h.height},0);Ze.each(t,u=>{u.dy-=i/2,u.labelOffset=n.labelOffset});let o=Ze.reduce(r,(u,h,f)=>{let p=f>0?n.yOffset:0;return h.dx=(e.coreBox.width+h.width)/2+n.xOffset,h.dy=u+p+h.height/2,u+p+h.height},0);Ze.each(r,u=>{u.dy-=o/2,u.labelOffset=n.labelOffset});let a=Math.min(e.height/2-e.radius,i/2);a=a<0?0:a;let s=zn().domain([0,t.length-1]).range([-a,a]);Ze.each(t,(u,h)=>{u.points=[{dx:u.dx+u.width/2,dy:u.dy},{dx:-e.coreBox.width/2,dy:t.length>1?s(h):0}]});let l=Math.min(e.height/2-e.radius,o/2);l=l<0?0:l;let c=zn().domain([0,r.length-1]).range([-l,l]);Ze.each(r,(u,h)=>{u.points=[{dx:e.coreBox.width/2,dy:r.length>1?c(h):0},{dx:u.dx-u.width/2,dy:u.dy}]}),e.height=Math.max(e.height,i,o)}function ble(e){switch(e.annotationType){case gi.CONSTANT:Ze.extend(e,Tr.constant.size);break;case gi.SHORTCUT:if(e.node.type===jt.OP)Ze.extend(e,Tr.shortcutSize.op);else if(e.node.type===jt.META)Ze.extend(e,Tr.shortcutSize.meta);else if(e.node.type===jt.SERIES)Ze.extend(e,Tr.shortcutSize.series);else throw Error("Invalid node type: "+e.node.type);break;case gi.SUMMARY:Ze.extend(e,Tr.constant.size);break}}function x0(e){if(e.expanded)return e.x;let t=e.inAnnotations.list.length?e.inboxWidth:0;return e.x-e.width/2+t+e.coreBox.width/2}function wle(e,t){let r=t.x-e.x,n=t.y-e.y;return 180*Math.atan(n/r)/Math.PI}function Dcr(e){let t=wle(e[0],e[1]);for(let r=1;r<e.length-1;r++){let n=wle(e[r],e[r+1]);if(Math.abs(n-t)>1)return!1;t=n}return!0}function Sle(e,t){let r=t.expanded?t.x:x0(t),n=t.y,i=e.x-r,o=e.y-n,a=t.expanded?t.width:t.coreBox.width,s=t.expanded?t.height:t.coreBox.height,l,c;return Math.abs(o)*a/2>Math.abs(i)*s/2?(o<0&&(s=-s),l=o===0?0:s/2*i/o,c=s/2):(i<0&&(a=-a),l=a/2,c=i===0?0:a/2*o/i),{x:r+l,y:n+c}}var Il=g0,Hi=ve,Ocr=320,zcr=150,fP=[{background_color:"#CC2F2C",label:"NaN"},{background_color:"#FF8D00",label:"-\u221E"},{background_color:"#EAEAEA",label:"-"},{background_color:"#A5A5A5",label:"0"},{background_color:"#262626",label:"+"},{background_color:"#003ED4",label:"+\u221E"}];function Cle(e,t,r,n){let i=e.getBoundingClientRect(),o=null;try{if(o=t.getBBox(),(o==null?void 0:o.width)===0)return}catch(c){return}let a=.9*Math.min(i.width/(o==null?void 0:o.width),i.height/(o==null?void 0:o.height),2),s=Tr.graph,l=$h.scale(a).translate(s.padding.paddingLeft,s.padding.paddingTop);Ht(e).transition().duration(500).call(r.transform,l).on("end.fitted",()=>{r.on("end.fitted",null),n()})}function Ale(e,t,r,n){let i=Ht(t).select(`[data-name="${e}"]`).node();if(!i)return console.warn(`panToNode() failed for node name "${e}"`),!1;let o=i.getBBox(),a=i.getScreenCTM(),s=t.createSVGPoint(),l=t.createSVGPoint();s.x=o.x,s.y=o.y,l.x=o.x+o.width,l.y=o.y+o.height,s=s.matrixTransform(a),l=l.matrixTransform(a);let c=(p,d,g,_)=>!(p>g&&d<_),u=t.getBoundingClientRect(),h=u.left+u.width-Ocr,f=u.top+u.height-zcr;if(c(s.x,l.x,u.left,h)||c(s.y,l.y,u.top,f)){let p=(s.x+l.x)/2,d=(s.y+l.y)/2,g=u.left+u.width/2-p,_=u.top+u.height/2-d,y=i2(t);return Ht(t).transition().duration(500).call(n.translateBy,g/y.k,_/y.k),!0}return!1}function Ple(e,t){let r=t.node.type===jt.SERIES?0:Tr.subscene.meta.labelHeight;a3(Il(e,"g",Hi.Scene.CORE),0,r);let n=t.isolatedInExtract.length>0,i=t.isolatedOutExtract.length>0,o=t.libraryFunctionsExtract.length>0,a=Tr.subscene.meta.extractXOffset,s=0;if(n&&(s+=t.outExtractBox.width),i&&(s+=t.outExtractBox.width),n){let l=t.coreBox.width;s<o3?l=l-o3+t.inExtractBox.width/2:l=l-t.inExtractBox.width/2-t.outExtractBox.width-(i?a:0),l=l-t.libraryFunctionsBox.width-(o?a:0),a3(Il(e,"g",Hi.Scene.INEXTRACT),l,r)}if(i){let l=t.coreBox.width;s<o3?l=l-o3+t.outExtractBox.width/2:l-=t.outExtractBox.width/2,l=l-t.libraryFunctionsBox.width-(o?a:0),a3(Il(e,"g",Hi.Scene.OUTEXTRACT),l,r)}if(o){let l=t.coreBox.width-t.libraryFunctionsBox.width/2;a3(Il(e,"g",Hi.Scene.FUNCTION_LIBRARY),l,r)}}function Ile(e,t){Ht(e).on("click",()=>{t.fire("graph-select")})}function a3(e,t,r){e.attr("transform")!=null&&(e=e.transition("position")),e.attr("transform","translate("+t+","+r+")")}function Fd(e,t,r,n,i){e.transition().attr("x",t-n/2).attr("y",r-i/2).attr("width",n).attr("height",i)}function Lle(e,t,r,n,i){let o=i/2,a=n/2,s=[[t,r-o],[t+a,r+o],[t-a,r+o]];e.transition().attr("points",s.map(l=>l.join(",")).join(" "))}function kle(e,t){let r=x0(t),n=t.expanded?t.width:t.coreBox.width,i=t.expanded?t.height:t.coreBox.height,o=r+n/2-6,a=t.y-i/2+6;t.node.type===jt.SERIES&&!t.expanded&&(o+=10,a-=2);let s="translate("+o+","+a+")";e.selectAll("path").transition().attr("transform",s),e.select("circle").transition().attr({cx:o,cy:a,r:Tr.nodeSize.meta.expandButtonRadius})}function EH(e,t,r,n,i){e.transition().attr("cx",t).attr("cy",r).attr("rx",n/2).attr("ry",i/2)}function Tle(e,t){return t?e.toFixed(0):Math.abs(e)>=1?e.toFixed(1):e.toExponential(1)}function Fcr(e,t,r,n){let i="Device: "+e.device_name+`
`;i+="dtype: "+e.dtype+`
`;let o="(scalar)";e.shape.length>0&&(o="("+e.shape.join(",")+")"),i+=`
shape: `+o+`

`,i+="#(elements): "+t+`
`;let a=[];for(let s=0;s<r.length;s++)r[s]>0&&a.push("#("+fP[s].label+"): "+r[s]);return i+=a.join(", ")+`

`,n.max>=n.min&&(i+="min: "+n.min+", max: "+n.max+`
`,i+="mean: "+n.mean+", stddev: "+n.stddev),i}function Bcr(e,t,r,n,i=60,o=10,a=0,s){if(Ht(e.parentNode).selectAll(".health-pill").remove(),!t)return;let l=t.value,c=l.slice(2,8),u=c[0],h=c[1],f=c[5],p=l[1],d={min:l[8],max:l[9],mean:l[10],stddev:Math.sqrt(l[11])};i==null&&(i=60),o==null&&(o=10),a==null&&(a=0),r!=null&&r.node.type===jt.OP&&(i/=2,o/=2);let g=document.createElementNS(ju,"g");g.classList.add("health-pill");let _=document.createElementNS(ju,"defs");g.appendChild(_);let y=document.createElementNS(ju,"linearGradient"),x="health-pill-gradient-"+n;y.setAttribute("id",x);let b=0,S="0%";for(let D=0;D<c.length;D++){if(!c[D])continue;b+=c[D];let B=document.createElementNS(ju,"stop");B.setAttribute("offset",S),B.setAttribute("stop-color",fP[D].background_color),y.appendChild(B);let I=document.createElementNS(ju,"stop"),L=b*100/p+"%";I.setAttribute("offset",L),I.setAttribute("stop-color",fP[D].background_color),y.appendChild(I),S=L}_.appendChild(y);let C=document.createElementNS(ju,"rect");C.setAttribute("fill","url(#"+x+")"),C.setAttribute("width",String(i)),C.setAttribute("height",String(o)),C.setAttribute("y",String(a)),g.appendChild(C);let P=document.createElementNS(ju,"title");P.textContent=Fcr(t,p,c,d),g.appendChild(P);let k=!1;if(r!=null){let D=r.x-i/2,B=r.y-o-r.height/2-2;if(r.labelOffset<0&&(B+=r.labelOffset),g.setAttribute("transform","translate("+D+", "+B+")"),c[2]||c[3]||c[4]){let L=r.node.attr;if(L&&L.length){for(let R=0;R<L.length;R++)if(L[R].key==="T"){let F=L[R].value.type;k=F&&/^DT_(BOOL|INT|UINT)/.test(F);break}}}}let O=document.createElementNS(ju,"text");if(Number.isFinite(d.min)&&Number.isFinite(d.max)){let D=Tle(d.min,k),B=Tle(d.max,k);if(p>1?O.textContent=D+" ~ "+B:O.textContent=D,u>0||h>0||f>0){O.textContent+=" (";let I=[];u>0&&I.push(`NaN\xD7${u}`),h>0&&I.push(`-\u221E\xD7${h}`),f>0&&I.push(`+\u221E\xD7${f}`),O.textContent+=I.join("; ")+")"}}else O.textContent="(No finite elements)";O.classList.add("health-pill-stats"),s==null&&(s=i/2),O.setAttribute("x",String(s)),O.setAttribute("y",String(a-2)),g.appendChild(O),zt(e.parentNode).appendChild(g)}function Rle(e,t,r){if(!t)return;let n=1;Ht(e).selectAll("g.nodeshape").each(function(o){let a=t[o.node.name],s=a?a[r]:null;Bcr(this,s,o,n++)})}var Gn;(function(e){e.NONE="none",e.COMPUTE_TIME="compute_time",e.DEVICE="device",e.MEMORY="memory",e.OP_COMPATIBILITY="op_compatibility",e.STRUCTURE="structure",e.XLA_CLUSTER="xla_cluster"})(Gn||(Gn={}));var mP=Ee(Oe(),1);var Vi=Ee(Oe(),1);function Hcr(e){let t=0,r=0,n=e;for(;n&&n.offsetLeft>=0&&n.offsetTop>=0;)t+=n.offsetLeft-n.scrollLeft,r+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{left:t,top:r}}function Wlt(e,t){let r=e.getContextMenu(),n=Ht(e.getContextMenu());return function(i,o){let a=qt,s=Hcr(e);n.style("display","block").style("left",a.clientX-s.left+1+"px").style("top",a.clientY-s.top+1+"px"),a.preventDefault(),a.stopPropagation();function l(u){u&&u.composedPath().includes(r)||(n.style("display","none"),document.body.removeEventListener("mousedown",l,{capture:!0}))}document.body.addEventListener("mousedown",l,{capture:!0}),n.text(""),n.append("ul").selectAll("li").data(t).enter().append("li").on("click",(u,h)=>{u.action(this,i,o),l()}).text(function(u){return u.title(i)})}}var AH=Ee(Oe(),1);var Ucr="\xD7",Nle=qb().domain([Q4,tP]).range(["small","medium","large","xlarge"]),qcr=2.5;function pP(e){return e.v+ole+e.w}function zle(e,t,r){let n=r,i=[];i=AH.reduce(t.edges(),(s,l)=>{let c=t.edge(l);return s.push({v:l.v,w:l.w,label:c}),s},i);let a=An(e,"g",ve.Edge.CONTAINER).selectAll(function(){return this.childNodes}).data(i,pP);return a.enter().append("g").attr("class",ve.Edge.GROUP).attr("data-edge",pP).each(function(s){let l=Ht(this);s.label.edgeGroup=l,n._edgeGroupIndex[pP(s)]=l,n.handleEdgeSelected&&l.on("click",c=>{qt.stopPropagation(),n.fire("edge-select",{edgeData:c,edgeGroup:l})}),Xlt(l,s,n)}).merge(a).each(function(){Wcr(r,this)}).each(function(s){Ycr(Ht(this),s,n)}),a.exit().each(s=>{delete n._edgeGroupIndex[pP(s)]}).remove(),a}function Ylt(e,t){let r=t.getNodeByName(e.v);if(r.outputShapes==null||AH.isEmpty(r.outputShapes))return null;let n=r.outputShapes[e.outputTensorKey];return n==null?null:n.length===0?"scalar":n.map(i=>i===-1?"?":i).join(Ucr)}function jlt(e,t){return t.edgeLabelFunction?t.edgeLabelFunction(e,t):e.baseEdgeList.length>1?e.baseEdgeList.length+" tensors":Ylt(e.baseEdgeList[0],t)}function Dle(e,t,r){let n=document.createElementNS(ju,"path");for(let i=1;i<e.length;i++)if(n.setAttribute("d",r(e.slice(0,i))),n.getTotalLength()>t)return i-1;return e.length-1}function Ole(e,t,r){let n=vu().x(u=>u.x).y(u=>u.y),i=Ht(document.createElementNS("http://www.w3.org/2000/svg","path")).attr("d",n(e)),o=+t.attr("markerWidth"),a=t.attr("viewBox").split(" ").map(Number),s=a[2]-a[0],l=+t.attr("refX"),c=i.node();if(r){let u=1-l/s,h=o*u,f=c.getPointAtLength(h),p=Dle(e,h,n);return e[p-1]={x:f.x,y:f.y},e.slice(p-1)}else{let u=1-l/s,h=c.getTotalLength()-o*u,f=c.getPointAtLength(h),p=Dle(e,h,n);return e[p]={x:f.x,y:f.y},e.slice(0,p+1)}}function Xlt(e,t,r,n){n=n||ve.Edge.LINE,t.label&&t.label.structural&&(n+=" "+ve.Edge.STRUCTURAL),t.label&&t.label.metaedge&&t.label.metaedge.numRefEdges&&(n+=" "+ve.Edge.REFERENCE_EDGE),r.handleEdgeSelected&&(n+=" "+ve.Edge.SELECTABLE);let i="path_"+pP(t),o;if(r.renderHierarchy.edgeWidthFunction)o=r.renderHierarchy.edgeWidthFunction(t,n);else{let c=1;t.label!=null&&t.label.metaedge!=null&&(c=t.label.metaedge.totalSize),o=r.renderHierarchy.edgeWidthSizedBasedScale(c)}let a=e.append("path").attr("id",i).attr("class",n).style("stroke-width",o+"px");if(t.label&&t.label.metaedge)if(t.label.metaedge.numRefEdges){let c=`reference-arrowhead-${Nle(o)}`;a.style("marker-start",`url(#${c})`),t.label.startMarkerId=c}else{let c=`dataflow-arrowhead-${Nle(o)}`;a.style("marker-end",`url(#${c})`),t.label.endMarkerId=c}if(t.label==null||t.label.metaedge==null)return;let s=jlt(t.label.metaedge,r.renderHierarchy);if(s==null)return;let l=o>qcr?"central":"text-after-edge";e.append("text").append("textPath").attr("xlink:href","#"+i).attr("startOffset","50%").attr("text-anchor","middle").attr("dominant-baseline","central").text(s)}var CH=vu().curve(W8).x(e=>e.x).y(e=>e.y);function Gcr(e,t,r,n,i){let o=r.label,a=o.adjoiningMetaedge,s=o.points,{shadowRoot:l}=e;if(r.label.startMarkerId&&(s=Ole(s,Ht(l==null?void 0:l.querySelector("#"+r.label.startMarkerId)),!0)),r.label.endMarkerId&&(s=Ole(s,Ht(l==null?void 0:l.querySelector("#"+r.label.endMarkerId)),!1)),!a)return nc(i,CH(s));let c=a.edgeGroup.node().firstChild,u=o.metaedge.inbound;return function(h){var g;let f=c.getPointAtLength(u?c.getTotalLength():0).matrixTransform(c.getCTM()).matrixTransform((g=t.getCTM())==null?void 0:g.inverse()),p=u?0:s.length-1;return s[p].x=f.x,s[p].y=f.y,CH(s)}}function Wcr(e,t){Ht(t).select("path."+ve.Edge.LINE).transition().attrTween("d",function(r,n,i){return Gcr(e,this,r,n,i)})}function Ycr(e,t,r){e.classed("faded",t.label.isFadedOut);let n=t.label.metaedge;e.select("path."+ve.Edge.LINE).classed("control-dep",n&&!n.numRegularEdges)}function PH(e,t,r){let i=An(e,"g",ve.Node.CONTAINER).selectAll(function(){return this.childNodes}).data(t,o=>o.node.name+":"+o.node.type);return i.enter().append("g").attr("data-name",o=>o.node.name).each(function(o){let a=Ht(this);r.addNodeGroup(o.node.name,a)}).merge(i).attr("class",o=>ve.Node.GROUP+" "+Wle(o)).each(function(o){let a=Ht(this),s=An(a,"g",ve.Annotation.INBOX);Vle(s,o.inAnnotations,o,r);let l=An(a,"g",ve.Annotation.OUTBOX);Vle(l,o.outAnnotations,o,r);let c=Gle(a,o,ve.Node.SHAPE);o.node.isGroupNode&&Xcr(c,o,r),Hle(c,o,r),jcr(a,o,r);let u=Kcr(a,o,r);Hle(u,o,r,o.node.type===jt.META),s3(a,o,r),Jcr(a,o)}),i.exit().each(function(o){r.removeNodeGroup(o.node.name);let a=Ht(this);o.inAnnotations.list.length>0&&a.select("."+ve.Annotation.INBOX).selectAll("."+ve.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)}),o.outAnnotations.list.length>0&&a.select("."+ve.Annotation.OUTBOX).selectAll("."+ve.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)})}).remove(),i}function jcr(e,t,r){if(t.node.isGroupNode){if(t.expanded)return ect(e,t,r,ve.Subscene.GROUP);Il(e,"g",ve.Subscene.GROUP).remove()}return null}function Ble(e,t){let r=t.x-t.width/2+t.paddingLeft,n=t.y-t.height/2+t.paddingTop,i=Il(e,"g",ve.Subscene.GROUP);a3(i,r,n)}function Xcr(e,t,r){let n=An(e,"g",ve.Node.BUTTON_CONTAINER);An(n,"circle",ve.Node.BUTTON_CIRCLE),An(n,"path",ve.Node.EXPAND_BUTTON).attr("d","M0,-2.2 V2.2 M-2.2,0 H2.2"),An(n,"path",ve.Node.COLLAPSE_BUTTON).attr("d","M-2.2,0 H2.2"),n.on("click",i=>{qt.stopPropagation(),r.fire("node-toggle-expand",{name:i.node.name})}),kle(n,t)}function Hle(e,t,r,n){if(n){e.attr("pointer-events","none");return}let i=Wlt(r,Ule(t.node,r));e.on("dblclick",o=>{r.fire("node-toggle-expand",{name:o.node.name})}).on("mouseover",o=>{r.isNodeExpanded(o)||r.fire("node-highlight",{name:o.node.name})}).on("mouseout",o=>{r.isNodeExpanded(o)||r.fire("node-unhighlight",{name:o.node.name})}).on("click",o=>{qt.stopPropagation(),r.fire("node-select",{name:o.node.name})}).on("contextmenu",(o,a)=>{r.fire("node-select",{name:o.node.name}),i.call(o,a)})}function Ule(e,t){let r=[{title:n=>yH(e.include),action:(n,i,o)=>{t.fire("node-toggle-extract",{name:e.name})}}];return t.nodeContextMenuItems&&(r=r.concat(t.nodeContextMenuItems)),Jlt(e)&&r.push({title:n=>Qlt(e),action:(n,i,o)=>{t.fire("node-toggle-seriesgroup",{name:IH(e)})}}),r}function Jlt(e){return IH(e)!==null}function IH(e){return e?e.type===jt.SERIES?e.name:e.type===jt.OP?e.owningSeries:null:null}function $cr(e){let t=null;if(e)e.type===jt.SERIES?t=e:e.parentNode&&e.parentNode.type===jt.SERIES&&(t=e.parentNode);else return null;return t}function Qlt(e){return ule($cr(e)!==null?os.GROUP:os.UNGROUP)}function Kcr(e,t,r){var c;let n=t.displayName,i=t.node.type===jt.META&&!t.expanded,o=An(e,"text",ve.Node.LABEL),a=o.node();(c=a.parentNode)==null||c.appendChild(a),o.attr("dy",".35em").attr("text-anchor","middle");let s=8;switch(t.node.type){case jt.META:s=t.expanded?J4.Node.EXPANDED_LABEL:J4.Node.SERIES_LABEL;break;case jt.OP:s=J4.Node.OP_LABEL;break}if(i){n.length>r.maxMetanodeLabelLength&&(n=n.substr(0,r.maxMetanodeLabelLength-2)+"\u2026");let u=Zcr(r);o.attr("font-size",u(n.length)+"px"),s=u(n.length)}let l=o.text(n);return qle(l,t.node.type,s,t),o}function qle(e,t,r,n){let i=e.node(),o=i.textContent,a=null;switch(t){case jt.META:n&&!n.expanded&&(a=Tr.nodeSize.meta.maxLabelWidth);break;case jt.OP:a=Tr.nodeSize.op.maxLabelWidth;break;case-1:a=Tr.annotations.maxLabelWidth;break;default:break}if(a!==null)return i.textContent=tle(i.textContent,r,a),e.append("title").text(o)}var $lt=null;function Zcr(e){return $lt||($lt=zn().domain([e.maxMetanodeLabelLengthLargeFont,e.maxMetanodeLabelLength]).range([e.maxMetanodeLabelLengthFontSize,e.minMetanodeLabelLengthFontSize]).clamp(!0)),$lt}function dP(e,t,r,n){Il(e,"text",ve.Node.LABEL).transition().attr("x",t).attr("y",r+n)}function Gle(e,t,r){let n=An(e,"g",r);switch(t.node.type){case jt.OP:let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){An(n,"polygon",ve.Node.COLOR_TARGET);break}An(n,"ellipse",ve.Node.COLOR_TARGET);break;case jt.SERIES:let o="annotation",a=t;a.coreGraph&&(o=a.node.hasNonControlEdges?"vertical":"horizontal");let s=[ve.Node.COLOR_TARGET];a.isFadedOut&&s.push("faded-ellipse"),An(n,"use",s).attr("xlink:href","#op-series-"+o+"-stamp"),An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.BRIDGE:An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.META:An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;default:throw Error("Unrecognized node type: "+t.node.type)}return n}function Wle(e){switch(e.node.type){case jt.OP:return ve.OPNODE;case jt.META:return ve.METANODE;case jt.SERIES:return ve.SERIESNODE;case jt.BRIDGE:return ve.BRIDGENODE;case jt.ELLIPSIS:return ve.ELLIPSISNODE}throw Error("Unrecognized node type: "+e.node.type)}function Jcr(e,t){let r=Il(e,"g",ve.Node.SHAPE),n=x0(t);switch(t.node.type){case jt.OP:{let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){let o=Il(r,"polygon");Lle(o,t.x,t.y,t.coreBox.width,t.coreBox.height)}else{let o=Il(r,"ellipse");EH(o,n,t.y,t.coreBox.width,t.coreBox.height)}dP(e,n,t.y,t.labelOffset);break}case jt.META:{let i=r.selectAll("rect");t.expanded?(Fd(i,t.x,t.y,t.width,t.height),Ble(e,t),dP(e,n,t.y,-t.height/2+t.labelHeight/2)):(Fd(i,n,t.y,t.coreBox.width,t.coreBox.height),dP(e,n,t.y,0));break}case jt.SERIES:{let i=Il(r,"use");t.expanded?(Fd(i,t.x,t.y,t.width,t.height),Ble(e,t),dP(e,n,t.y,-t.height/2+t.labelHeight/2)):(Fd(i,n,t.y,t.coreBox.width,t.coreBox.height),dP(e,n,t.y,t.labelOffset));break}case jt.BRIDGE:{let i=Il(r,"rect");Fd(i,t.x,t.y,t.width,t.height);break}default:throw Error("Unrecognized node type: "+t.node.type)}}function Klt(e,t,r){let n=Jse(e);if(!r)return`url(#${n})`;let i=Ht(r),o=i.select("defs#_graph-gradients");o.empty()&&(o=i.append("defs").attr("id","_graph-gradients"));let a=o.select("linearGradient#"+n);if(a.empty()){a=o.append("linearGradient").attr("id",e),a.selectAll("*").remove();let s=0;Vi.each(t,l=>{let c=l.color;a.append("stop").attr("offset",s).attr("stop-color",c),a.append("stop").attr("offset",s+l.proportion).attr("stop-color",c),s+=l.proportion})}return`url(#${n})`}function LH(e){Ht(e).select("defs#_graph-gradients").remove()}function kH(e,t,r,n,i){let o=Ku;switch(e=e||(()=>0),t){case Gn.NONE:case Gn.STRUCTURE:if(r.node.type===jt.META){let a=r.node.templateId;return t===Gn.STRUCTURE&&a!==null?o.STRUCTURE_PALETTE(e(a),n):o.UNKNOWN}else return r.node.type===jt.SERIES?n?o.EXPANDED_COLOR:"white":r.node.type===jt.BRIDGE?r.structural?"#f0e":r.node.inbound?"#0ef":"#fe0":Vi.isNumber(r.node.functionInputIndex)?"#795548":Vi.isNumber(r.node.functionOutputIndex)?"#009688":"white";case Gn.DEVICE:return r.deviceColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("device-"+r.node.name,r.deviceColors,i);case Gn.XLA_CLUSTER:return r.xlaClusterColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("xla-"+r.node.name,r.xlaClusterColors,i);case Gn.COMPUTE_TIME:return n?o.EXPANDED_COLOR:r.computeTimeColor||o.UNKNOWN;case Gn.MEMORY:return n?o.EXPANDED_COLOR:r.memoryColor||o.UNKNOWN;case Gn.OP_COMPATIBILITY:return r.compatibilityColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("op-compat-"+r.node.name,r.compatibilityColors,i);default:throw new Error("Unknown case to color nodes by")}}function s3(e,t,r,n){n=n||ve.Node.SHAPE;let i=r.isNodeHighlighted(t.node.name),o=r.isNodeSelected(t.node.name),a=t.isInExtract||t.isOutExtract||t.isLibraryFunction,s=t.expanded&&n!==ve.Annotation.NODE,l=t.isFadedOut;e.classed("highlighted",i),e.classed("selected",o),e.classed("extract",a),e.classed("expanded",s),e.classed("faded",l);let c=e.select("."+n+" ."+ve.Node.COLOR_TARGET),u=kH(r.templateIndex,r.colorBy,t,s,r.getGraphSvgRoot());c.style("fill",u),c.style("stroke",o?null:tct(u))}function tct(e){return e.substring(0,3)==="url"?Ku.GRADIENT_OUTLINE:cu(e).darker().toString()}function Yle(e,t,r,n){let i=Ht(e);if(i.selectAll(".input-highlight").classed("input-highlight",!1),i.selectAll(".non-input").classed("non-input",!1),i.selectAll(".input-parent").classed("input-parent",!1),i.selectAll(".input-child").classed("input-child",!1),i.selectAll(".input-edge-highlight").classed("input-edge-highlight",!1),i.selectAll(".non-input-edge-highlight").classed("non-input-edge-highlight",!1),i.selectAll(".input-highlight-selected").classed("input-highlight-selected",!1),!t||!n||!r)return;let o=jle(r,t),a={};Vi.each(o,function(c){a=Xle(e,t,c,a)});let s=Object.keys(a),l=tur(t,s);eur(e,l),i.selectAll("g.node:not(.selected):not(.input-highlight):not(.input-parent):not(.input-children)").classed("non-input",!0).each(function(c){let u=c.node.name;i.selectAll(`[data-name="${u}"]`).classed("non-input",!0)}),i.selectAll("g.edge:not(.input-edge-highlight)").classed("non-input-edge-highlight",!0)}function jle(e,t){let r=[],n=t.getNodeByName(e);if(n instanceof y0)return[n].concat(n.inEmbeddings);let i=n.metagraph.nodes();return Vi.each(i,function(o){r=r.concat(jle(o,t))}),r}function Xle(e,t,r,n){if(n[r.name])return n;n[r.name]=!0;let i=r.inputs,o=Zlt(t,r);Ht(e).select(`.node[data-name="${o.name}"]`).classed("input-highlight",!0);let a={};Vi.each(i,function(u){let h=t.getNodeByName(u.name);if(h===void 0)return;if(h instanceof aP){let d=sP(h.name);h=t.getNodeByName(d)}let f=Zlt(t,h),p=a[f.name];p?p.opNodes.push(h):a[f.name]={visibleParent:f,opNodes:[h]}});let s={},l=[o];s[o.name]={traced:!1,index:0,connectionEndpoints:[]};let c=o;for(let u=1;c.name!==qc;u++)c=c.parentNode,s[c.name]={traced:!1,index:u,connectionEndpoints:[]},l[u]=c;return Vi.forOwn(a,function(u,h){let f=u.visibleParent;Vi.each(u.opNodes,function(p){n=Xle(e,t,p,n)}),f.name!==o.name&&Qcr(e,f,s,l)}),n}function Qcr(e,t,r,n){let i=t,o=t,a=[];for(;!r[i.name];)o.name!==i.name&&a.push([o,i]),o=i,i=i.parentNode;let s=r[i.name].index,l=n[Math.max(s-1,0)].name,c=l,u=o.name,h=o.name,f=Ht(e);f.selectAll(`[data-edge="${h}--${l}"]`).classed("input-edge-highlight",!0),Vi.each(a,function(p){let d=p[0],g=p[1],_=`[data-edge="${d.name}--${c}~~${g.name}~~OUT"]`;f.selectAll(_).classed("input-edge-highlight",!0)});for(let p=1;p<s;p++){let d=n[p-1],g=n[p],_=`[data-edge="${u}~~${g.name}~~IN--${d.name}"]`;f.selectAll(_).classed("input-edge-highlight",!0)}}function tur(e,t){let r={};return Vi.each(t,function(n){let i=e.getNodeByName(n),o=Zlt(e,i);r[o.name]=o}),r}function eur(e,t){Vi.forOwn(t,function(r){let n=r;for(;n.name!==qc;){let i=Ht(e).select(`.node[data-name="${n.name}"]`);i.nodes().length&&!i.classed("input-highlight")&&!i.classed("selected")&&!i.classed("op")&&i.classed("input-parent",!0),n=n.parentNode}})}function Zlt(e,t){let r=!1,n=t;for(;!r;)if(t=n,n=t.parentNode,n===void 0)r=!0;else{let i=e.getRenderNodeByName(n.name);i&&(i.expanded||n instanceof y0)&&(r=!0)}return t}function Vle(e,t,r,n){let i=e.selectAll(function(){return this.childNodes}).data(t.list,o=>o.node.name);return i.enter().append("g").attr("data-name",o=>o.node.name).each(function(o){let a=Ht(this);n.addAnnotationGroup(o,r,a);let s=ve.Annotation.EDGE,l=o.renderMetaedgeInfo&&o.renderMetaedgeInfo.metaedge;l&&!l.numRegularEdges&&(s+=" "+ve.Annotation.CONTROL_EDGE),l&&l.numRefEdges&&(s+=" "+ve.Edge.REF_LINE),Xlt(a,o,n,s),o.annotationType!==gi.ELLIPSIS?(iur(a,o),nur(a,o)):$le(a,o.node.name,o,ve.Annotation.ELLIPSIS)}).merge(i).attr("class",o=>ve.Annotation.GROUP+" "+rur(o.annotationType)+" "+Wle(o)).each(function(o){let a=Ht(this);aur(a,r,o,n),o.annotationType!==gi.ELLIPSIS&&our(a,r,o,n)}),i.exit().each(function(o){n.removeAnnotationGroup(o,r)}).remove(),i}function rur(e){return(gi[e]||"").toLowerCase()||null}function nur(e,t){if(t.annotationType===gi.SUMMARY)An(e,"use").attr("class","summary").attr("xlink:href","#summary-icon").attr("cursor","pointer");else{let r=Gle(e,t,ve.Annotation.NODE);An(r,"title").text(t.node.name)}}function iur(e,t){let r=t.node.name.split("/"),n=r[r.length-1];return $le(e,n,t,null)}function $le(e,t,r,n){let i=ve.Annotation.LABEL;n&&(i+=" "+n);let o=e.append("text").attr("class",i).attr("dy",".35em").attr("text-anchor",r.isIn?"end":"start").text(t);return qle(o,-1,J4.Annotation.LABEL)}function our(e,t,r,n){e.on("mouseover",i=>{n.fire("annotation-highlight",{name:i.node.name,hostName:t.node.name})}).on("mouseout",i=>{n.fire("annotation-unhighlight",{name:i.node.name,hostName:t.node.name})}).on("click",i=>{qt.stopPropagation(),n.fire("annotation-select",{name:i.node.name,hostName:t.node.name})}),r.annotationType!==gi.SUMMARY&&r.annotationType!==gi.CONSTANT&&e.on("contextmenu",Wlt(n,Ule(r.node,n)))}function aur(e,t,r,n){let i=x0(t);r.renderNodeInfo&&r.annotationType!==gi.ELLIPSIS&&s3(e,r.renderNodeInfo,n,ve.Annotation.NODE),r.annotationType===gi.SUMMARY&&(r.width+=10),e.select("text."+ve.Annotation.LABEL).transition().attr("x",i+r.dx+(r.isIn?-1:1)*(r.width/2+r.labelOffset)).attr("y",t.y+r.dy),e.select("use.summary").transition().attr("x",i+r.dx-3).attr("y",t.y+r.dy-6),EH(e.select("."+ve.Annotation.NODE+" ellipse"),i+r.dx,t.y+r.dy,r.width,r.height),Fd(e.select("."+ve.Annotation.NODE+" rect"),i+r.dx,t.y+r.dy,r.width,r.height),Fd(e.select("."+ve.Annotation.NODE+" use"),i+r.dx,t.y+r.dy,r.width,r.height),e.select("path."+ve.Annotation.EDGE).transition().attr("d",o=>{let a=o.points.map(s=>({x:s.dx+i,y:s.dy+t.y}));return CH(a)})}function ect(e,t,r,n){n=n||ve.Scene.GROUP;let i=g0(e,"g",n).empty(),o=An(e,"g",n),a=An(o,"g",ve.Scene.CORE),s=Vi.reduce(t.coreGraph.nodes(),(l,c)=>{let u=t.coreGraph.node(c);return u.excluded||l.push(u),l},Array());if(t.node.type===jt.SERIES&&s.reverse(),zle(a,t.coreGraph,r),PH(a,s,r),t.isolatedInExtract.length>0){let l=An(o,"g",ve.Scene.INEXTRACT);PH(l,t.isolatedInExtract,r)}else g0(o,"g",ve.Scene.INEXTRACT).remove();if(t.isolatedOutExtract.length>0){let l=An(o,"g",ve.Scene.OUTEXTRACT);PH(l,t.isolatedOutExtract,r)}else g0(o,"g",ve.Scene.OUTEXTRACT).remove();if(t.libraryFunctionsExtract.length>0){let l=An(o,"g",ve.Scene.FUNCTION_LIBRARY);PH(l,t.libraryFunctionsExtract,r)}else g0(o,"g",ve.Scene.FUNCTION_LIBRARY).remove();return Ple(o,t),i&&o.attr("opacity",0).transition().attr("opacity",1),o}var sur=.8,RH=class{constructor(t,r,n,i,o,a){this.svg=t,this.labelPadding=a,this.zoomG=r,this.mainZoom=n,this.maxWandH=o;let s=Ht(i.shadowRoot),l=s.select("svg"),c=l.select("rect"),u=f=>{this.viewpointCoord.x=qt.x,this.viewpointCoord.y=qt.y,this.updateViewpoint()};this.viewpointCoord={x:0,y:0};let h=pb().subject(Object).on("drag",u);c.datum(this.viewpointCoord).call(h),l.on("click",()=>{if(qt.defaultPrevented)return;let f=Number(c.attr("width")),p=Number(c.attr("height")),d=zo(l.node());this.viewpointCoord.x=d[0]-f/2,this.viewpointCoord.y=d[1]-p/2,this.updateViewpoint()}),this.viewpoint=c.node(),this.minimapSvg=l.node(),this.minimap=i,this.canvas=s.select("canvas.first").node(),this.canvasBuffer=s.select("canvas.second").node(),this.downloadCanvas=s.select("canvas.download").node(),Ht(this.downloadCanvas).style("display","none"),this.update()}updateViewpoint(){Ht(this.viewpoint).attr("x",this.viewpointCoord.x).attr("y",this.viewpointCoord.y);let t=-this.viewpointCoord.x*this.scaleMain/this.scaleMinimap,r=-this.viewpointCoord.y*this.scaleMain/this.scaleMinimap;Ht(this.svg).call(this.mainZoom.transform,$h.translate(t,r).scale(this.scaleMain))}getImageBlob(){return new Promise(t=>{this.downloadCanvas.toBlob(r=>{t(r)},"image/png")})}update(){let t=null;try{if(t=this.zoomG.getBBox(),t.width===0)return}catch(p){return}let r=Ht(this.svg),n="",i=this.svg,a=(i.getRootNode?i.getRootNode():this.svg.parentNode).styleSheets;for(let p=0;p<a.length;p++)try{let d=a[p].cssRules||a[p].rules;if(d==null)continue;for(let g=0;g<d.length;g++)n+=d[g].cssText.replace(/ ?tf-[\w-]+ ?/g,"")+`
`}catch(d){if(d.name!=="SecurityError")throw d}let s=r.append("style");s.text(n);let l=Ht(this.zoomG),c=l.attr("transform");l.attr("transform",null),t.height+=t.y,t.width+=t.x,t.height+=this.labelPadding*2,t.width+=this.labelPadding*2,r.attr("width",t.width).attr("height",t.height),this.scaleMinimap=this.maxWandH/Math.max(t.width,t.height),this.minimapSize={width:t.width*this.scaleMinimap,height:t.height*this.scaleMinimap},Ht(this.minimapSvg).attr(this.minimapSize),Ht(this.canvasBuffer).attr(this.minimapSize);let u=Ht(this.downloadCanvas);u.style("width",t.width),u.style("height",t.height),u.attr("width",3*t.width),u.attr("height",3*t.height),this.translate!=null&&this.zoom!=null&&requestAnimationFrame(()=>this.zoom());let h=new XMLSerializer().serializeToString(this.svg);s.remove(),r.attr("width",null).attr("height",null),l.attr("transform",c);let f=new Image;f.onload=()=>{let p=this.canvasBuffer.getContext("2d");p==null||p.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),p==null||p.drawImage(f,0,0,this.minimapSize.width,this.minimapSize.height),requestAnimationFrame(()=>{Ht(this.canvasBuffer).style("display",null),Ht(this.canvas).style("display","none"),[this.canvas,this.canvasBuffer]=[this.canvasBuffer,this.canvas]});let d=this.downloadCanvas.getContext("2d");d==null||d.clearRect(0,0,this.downloadCanvas.width,this.downloadCanvas.height),d==null||d.drawImage(f,0,0,this.downloadCanvas.width,this.downloadCanvas.height)},f.onerror=()=>{let p=new Blob([h],{type:"image/svg+xml;charset=utf-8"});f.src=URL.createObjectURL(p)},f.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(h)}zoom(t){if(this.scaleMinimap==null)return;t&&(this.translate=[t.x,t.y],this.scaleMain=t.k);let r=this.svg.getBoundingClientRect(),n=Ht(this.viewpoint);this.viewpointCoord.x=-this.translate[0]*this.scaleMinimap/this.scaleMain,this.viewpointCoord.y=-this.translate[1]*this.scaleMinimap/this.scaleMain;let i=r.width*this.scaleMinimap/this.scaleMain,o=r.height*this.scaleMinimap/this.scaleMain;n.attr("x",this.viewpointCoord.x).attr("y",this.viewpointCoord.y).attr("width",i).attr("height",o);let a=this.minimapSize.width,s=this.minimapSize.height,l=this.viewpointCoord.x,c=this.viewpointCoord.y,u=Math.min(Math.max(0,l+i),a)-Math.min(Math.max(0,l),a),h=Math.min(Math.max(0,c+o),s)-Math.min(Math.max(0,c),s);u*h/(a*s)<sur?this.minimap.classList.remove("hidden"):this.minimap.classList.add("hidden")}};var nct=class extends mt{init(t,r,n,i,o){return new RH(t,r,n,this,i,o)}};nct.template=Q`
    <style>
      :host {
        background-color: white;
        transition: opacity 0.3s linear;
        pointer-events: auto;
      }

      :host(.hidden) {
        opacity: 0;
        pointer-events: none;
      }

      canvas {
        border: 1px solid #999;
      }

      rect {
        fill: white;
        stroke: #111111;
        stroke-width: 1px;
        fill-opacity: 0;
        filter: url(#minimapDropShadow);
        cursor: move;
      }

      svg {
        position: absolute;
      }
    </style>
    <svg>
      <defs>
        <filter
          id="minimapDropShadow"
          x="-20%"
          y="-20%"
          width="150%"
          height="150%"
        >
          <feOffset result="offOut" in="SourceGraphic" dx="1" dy="1"></feOffset>
          <feColorMatrix
            result="matrixOut"
            in="offOut"
            type="matrix"
            values="0.1 0 0 0 0 0 0.1 0 0 0 0 0 0.1 0 0 0 0 0 0.5 0"
          ></feColorMatrix>
          <feGaussianBlur
            result="blurOut"
            in="matrixOut"
            stdDeviation="2"
          ></feGaussianBlur>
          <feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend>
        </filter>
      </defs>
      <rect></rect>
    </svg>
    <canvas class="first"></canvas>
    <!-- Additional canvas to use as buffer to avoid flickering between updates -->
    <canvas class="second"></canvas>
    <canvas class="download"></canvas>
  `;nct=E([yt("tf-graph-minimap")],nct);var Kle=Q`
  <style>
    :host(.dark-mode) {
      filter: invert(1);
    }

    :host {
      display: flex;
      font-size: 20px;
      height: 100%;
      width: 100%;
    }

    #svg {
      flex: 1;
      font-family: Roboto, sans-serif;
      height: 100%;
      overflow: hidden;
      width: 100%;
    }

    #hidden {
      position: fixed;
      top: 0px;
      visibility: hidden;
    }

    text {
      user-select: none;
    }

    /* --- Node and annotation-node for Metanode --- */

    .meta > .nodeshape > rect,
    .meta > .annotation-node > rect {
      cursor: pointer;
      fill: hsl(0, 0%, 70%);
    }
    .node.meta.highlighted > .nodeshape > rect,
    .node.meta.highlighted > .annotation-node > rect {
      stroke-width: 2;
    }
    .annotation.meta.highlighted > .nodeshape > rect,
    .annotation.meta.highlighted > .annotation-node > rect {
      stroke-width: 1;
    }
    .meta.selected > .nodeshape > rect,
    .meta.selected > .annotation-node > rect {
      stroke: red;
      stroke-width: 2;
    }
    .node.meta.selected.expanded > .nodeshape > rect,
    .node.meta.selected.expanded > .annotation-node > rect {
      stroke: red;
      stroke-width: 3;
    }
    .annotation.meta.selected > .nodeshape > rect,
    .annotation.meta.selected > .annotation-node > rect {
      stroke: red;
      stroke-width: 2;
    }
    .node.meta.selected.expanded.highlighted > .nodeshape > rect,
    .node.meta.selected.expanded.highlighted > .annotation-node > rect {
      stroke: red;
      stroke-width: 4;
    }

    .faded,
    .faded rect,
    .faded ellipse,
    .faded path,
    .faded use,
    #rectHatch line,
    #ellipseHatch line {
      color: #e0d4b3 !important;
      fill: white;
      stroke: #e0d4b3 !important;
    }

    .faded path {
      stroke-width: 1px !important;
    }

    .faded rect {
      fill: url(#rectHatch) !important;
    }

    .faded ellipse,
    .faded use {
      fill: url(#ellipseHatch) !important;
    }

    .faded text {
      opacity: 0;
    }

    /* Rules used for input-tracing. */
    .input-highlight > * > rect,
    .input-highlight > * > ellipse,
    .input-highlight > * > use {
      fill: white;
      stroke: #ff9800 !important;
    }

    /*  - Faded non-input styling */
    .non-input > * > rect,
.non-input > * > ellipse,
.non-input > * > use,
/* For Const nodes. */
.non-input > * > .constant:not([class*="input-highlight"]) >
  .annotation-node > ellipse,
/* For styling of annotation nodes of non-input nodes. */
.non-input > g > .annotation > .annotation-node > rect {
      stroke: #e0d4b3 !important;
      stroke-width: inherit;
      stroke-dasharray: inherit;
    }

    .non-input path {
      visibility: hidden;
    }

    .non-input > .nodeshape > rect,
.non-input > .annotation-node > rect,
/* For styling of annotation nodes of non-input nodes. */
.non-input > g > .annotation > .annotation-node > rect {
      fill: url(#rectHatch) !important;
    }

    .non-input ellipse,
    .non-input use {
      fill: url(#ellipseHatch) !important;
    }

    .non-input > text {
      opacity: 0;
    }

    .non-input .annotation > .annotation-edge {
      marker-end: url(#annotation-arrowhead-faded);
    }

    .non-input .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead-faded);
    }

    /* Input edges. */
    .input-edge-highlight > text {
      fill: black !important;
    }
    .input-highlight > .in-annotations > .annotation > .annotation-edge,
    .input-highlight-selected
      > .in-annotations
      > .annotation
      > .annotation-edge {
      stroke: #999 !important;
    }

    /* Non-input edges. */
    .non-input-edge-highlight,
.non-input > g > .annotation > path,
/* Annotation styles (label and edges respectively). */
.non-input > g >
.annotation:not(.input-highlight):not(.input-highlight-selected) >
.annotation-label
/*.annotation-edge*/ {
      visibility: hidden;
    }

    /* --- Op Node --- */

    .op > .nodeshape > .nodecolortarget,
    .op > .annotation-node > .nodecolortarget {
      cursor: pointer;
      fill: #fff;
      stroke: #ccc;
    }

    .op.selected > .nodeshape > .nodecolortarget,
    .op.selected > .annotation-node > .nodecolortarget {
      stroke: red;
      stroke-width: 2;
    }

    .op.highlighted > .nodeshape > .nodecolortarget,
    .op.highlighted > .annotation-node > .nodecolortarget {
      stroke-width: 2;
    }

    /* --- Series Node --- */

    /* By default, don't show the series background <rect>. */
    .series > .nodeshape > rect {
      fill: hsl(0, 0%, 70%);
      fill-opacity: 0;
      stroke-dasharray: 5, 5;
      stroke-opacity: 0;
      cursor: pointer;
    }

    /* Once expanded, show the series background <rect> and hide the <use>. */
    .series.expanded > .nodeshape > rect {
      fill-opacity: 0.15;
      stroke: hsl(0, 0%, 70%);
      stroke-opacity: 1;
    }
    .series.expanded > .nodeshape > use {
      visibility: hidden;
    }

    /**
 * TODO: Simplify this by applying a stable class name to all <g>
 * elements that currently have either the nodeshape or annotation-node classes.
 */
    .series > .nodeshape > use,
    .series > .annotation-node > use {
      stroke: #ccc;
    }
    .series.highlighted > .nodeshape > use,
    .series.highlighted > .annotation-node > use {
      stroke-width: 2;
    }
    .series.selected > .nodeshape > use,
    .series.selected > .annotation-node > use {
      stroke: red;
      stroke-width: 2;
    }

    .series.selected > .nodeshape > rect {
      stroke: red;
      stroke-width: 2;
    }

    .annotation.series.selected > .annotation-node > use {
      stroke: red;
      stroke-width: 2;
    }

    /* --- Bridge Node --- */
    .bridge > .nodeshape > rect {
      stroke: #f0f;
      opacity: 0.2;
      display: none;
    }

    /* --- Structural Elements --- */
    .edge > path.edgeline.structural {
      stroke: #f0f;
      opacity: 0.2;
      display: none;
    }

    /* Reference Edge */
    .edge > path.edgeline.referenceedge {
      stroke: #ffb74d;
      opacity: 1;
    }

    /* --- Series Nodes --- */

    /* Hide the rect for a series' annotation. */
    .series > .annotation-node > rect {
      display: none;
    }

    /* --- Node label --- */

    .node {
      /* Provide a hint to browsers to avoid using their static rasterization
      at initial scale, which looks very pixelated on Chromium when zoomed in.
      Note that we intentionally do *not* use 'will-change: transform' and
      'translateZ(0) here, which introduce blurriness on Firefox.
      See https://github.com/tensorflow/tensorboard/issues/4744 */
      transform: translateZ(1px);
    }

    .node > text.nodelabel {
      cursor: pointer;
      fill: #444;
    }

    .meta.expanded > text.nodelabel {
      font-size: 9px;
    }

    .series > text.nodelabel {
      font-size: 8px;
    }

    .op > text.nodelabel {
      font-size: 6px;
    }

    .bridge > text.nodelabel {
      display: none;
    }

    .node.meta.expanded > text.nodelabel {
      cursor: normal;
    }

    .annotation.meta.highlighted > text.annotation-label {
      fill: #50a3f7;
    }

    .annotation.meta.selected > text.annotation-label {
      fill: #4285f4;
    }

    /* --- Annotation --- */

    /* only applied for annotations that are not summary or constant.
(.summary, .constant gets overridden below) */
    .annotation > .annotation-node > * {
      stroke-width: 0.5;
      stroke-dasharray: 1, 1;
    }

    .annotation.summary > .annotation-node > *,
    .annotation.constant > .annotation-node > * {
      stroke-width: 1;
      stroke-dasharray: none;
    }

    .annotation > .annotation-edge {
      fill: none;
      stroke: #aaa;
      stroke-width: 0.5;
      marker-end: url(#annotation-arrowhead);
    }

    .faded .annotation > .annotation-edge {
      marker-end: url(#annotation-arrowhead-faded);
    }

    .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead);
    }

    .faded .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead-faded);
    }

    .annotation > .annotation-control-edge {
      stroke-dasharray: 1, 1;
    }

    #annotation-arrowhead {
      fill: #aaa;
    }

    #annotation-arrowhead-faded {
      fill: #e0d4b3;
    }

    #ref-annotation-arrowhead {
      fill: #aaa;
    }

    #ref-annotation-arrowhead-faded {
      fill: #e0d4b3;
    }

    .annotation > .annotation-label {
      font-size: 5px;
      cursor: pointer;
    }
    .annotation > .annotation-label.annotation-ellipsis {
      cursor: default;
    }

    /* Hide annotations on expanded meta nodes since they're redundant. */
    .expanded > .in-annotations,
    .expanded > .out-annotations {
      display: none;
    }

    /* --- Annotation: Constant --- */

    .constant > .annotation-node > ellipse {
      cursor: pointer;
      fill: white;
      stroke: #848484;
    }

    .constant.selected > .annotation-node > ellipse {
      fill: white;
      stroke: red;
    }

    .constant.highlighted > .annotation-node > ellipse {
      stroke-width: 1.5;
    }

    /* --- Annotation: Summary --- */

    .summary > .annotation-node > ellipse {
      cursor: pointer;
      fill: #db4437;
      stroke: #db4437;
    }

    .summary.selected > .annotation-node > ellipse {
      fill: #a52714;
      stroke: #a52714;
    }

    .summary.highlighted > .annotation-node > ellipse {
      stroke-width: 1.5;
    }

    /* --- Edge --- */

    .edge > path.edgeline {
      fill: none;
      stroke: #bbb;
      stroke-linecap: round;
      stroke-width: 0.75;
    }

    .edge .selectableedge {
      cursor: pointer;
    }

    .selectededge > path.edgeline {
      cursor: default;
      stroke: #f00;
    }

    .edge.selectededge text {
      fill: #000;
    }

    /* Labels showing tensor shapes on edges */
    .edge > text {
      font-size: 3.5px;
      fill: #666;
    }

    .dataflow-arrowhead {
      fill: #bbb;
    }

    .reference-arrowhead {
      fill: #ffb74d;
    }

    .selected-arrowhead {
      fill: #f00;
    }

    .edge .control-dep {
      stroke-dasharray: 2, 2;
    }

    /* --- Group node expand/collapse button --- */

    /* Hides expand/collapse buttons when a node isn't expanded or highlighted. Using
   incredibly small opacity so that the bounding box of the <g> parent still takes
   this container into account even when it isn't visible */
    .node:not(.highlighted):not(.expanded) > .nodeshape > .buttoncontainer {
      opacity: 0.01;
    }
    .node.highlighted > .nodeshape > .buttoncontainer {
      cursor: pointer;
    }
    .buttoncircle {
      fill: #e7811d;
    }
    .buttoncircle:hover {
      fill: #b96717;
    }
    .expandbutton,
    .collapsebutton {
      stroke: #444;
    }
    /* Do not let the path elements in the button take pointer focus */
    .node > .nodeshape > .buttoncontainer > .expandbutton,
    .node > .nodeshape > .buttoncontainer > .collapsebutton {
      pointer-events: none;
    }
    /* Only show the expand button when a node is collapsed and only show the
   collapse button when a node is expanded. */
    .node.expanded > .nodeshape > .buttoncontainer > .expandbutton {
      display: none;
    }
    .node:not(.expanded) > .nodeshape > .buttoncontainer > .collapsebutton {
      display: none;
    }

    .health-pill-stats {
      font-size: 4px;
      text-anchor: middle;
    }

    .health-pill rect {
      filter: url(#health-pill-shadow);
      rx: 3;
      ry: 3;
    }

    .titleContainer {
      position: relative;
      top: 20px;
    }

    .title,
    .auxTitle,
    .functionLibraryTitle {
      position: absolute;
    }

    #minimap {
      position: absolute;
      right: 20px;
      bottom: 20px;
    }

    .context-menu {
      position: absolute;
      display: none;
      background-color: #e2e2e2;
      border-radius: 2px;
      font-size: 14px;
      min-width: 150px;
      border: 1px solid #d4d4d4;
    }

    .context-menu ul {
      list-style-type: none;
      margin: 0;
      padding: 0;
      cursor: default;
    }

    .context-menu ul li {
      padding: 4px 16px;
    }

    .context-menu ul li:hover {
      background-color: #f3913e;
      color: white;
    }
  </style>
  <div class="titleContainer">
    <div id="title" class="title">Main Graph</div>
    <div id="auxTitle" class="auxTitle">Auxiliary Nodes</div>
    <div id="functionLibraryTitle" class="functionLibraryTitle">Functions</div>
  </div>
  <svg id="svg">
    <defs>
      <!-- Arrow heads for reference edge paths of different predefined sizes per color. -->
      <path
        id="reference-arrowhead-path"
        d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"
      ></path>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-small"
        viewBox="0 0 10 10"
        markerWidth="5"
        markerHeight="5"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-medium"
        viewBox="0 0 10 10"
        markerWidth="13"
        markerHeight="13"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-large"
        viewBox="0 0 10 10"
        markerWidth="16"
        markerHeight="16"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-xlarge"
        viewBox="0 0 10 10"
        markerWidth="20"
        markerHeight="20"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>

      <!-- Arrow heads for dataflow edge paths of different predefined sizes per color. -->
      <path
        id="dataflow-arrowhead-path"
        d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"
      ></path>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-small"
        viewBox="0 0 10 10"
        markerWidth="5"
        markerHeight="5"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-medium"
        viewBox="0 0 10 10"
        markerWidth="13"
        markerHeight="13"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-large"
        viewBox="0 0 10 10"
        markerWidth="16"
        markerHeight="16"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-xlarge"
        viewBox="0 0 10 10"
        markerWidth="20"
        markerHeight="20"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>

      <!-- Arrow head for annotation edge paths. -->
      <marker
        id="annotation-arrowhead"
        markerWidth="5"
        markerHeight="5"
        refX="5"
        refY="2.5"
        orient="auto"
      >
        <path d="M 0,0 L 5,2.5 L 0,5 L 0,0"></path>
      </marker>
      <marker
        id="annotation-arrowhead-faded"
        markerWidth="5"
        markerHeight="5"
        refX="5"
        refY="2.5"
        orient="auto"
      >
        <path d="M 0,0 L 5,2.5 L 0,5 L 0,0"></path>
      </marker>
      <marker
        id="ref-annotation-arrowhead"
        markerWidth="5"
        markerHeight="5"
        refX="0"
        refY="2.5"
        orient="auto"
      >
        <path d="M 5,0 L 0,2.5 L 5,5 L 5,0"></path>
      </marker>
      <marker
        id="ref-annotation-arrowhead-faded"
        markerWidth="5"
        markerHeight="5"
        refX="0"
        refY="2.5"
        orient="auto"
      >
        <path d="M 5,0 L 0,2.5 L 5,5 L 5,0"></path>
      </marker>
      <!-- Template for an Op node ellipse. -->
      <ellipse
        id="op-node-stamp"
        rx="7.5"
        ry="3"
        stroke="inherit"
        fill="inherit"
      ></ellipse>
      <!-- Template for an Op node annotation ellipse (smaller). -->
      <ellipse
        id="op-node-annotation-stamp"
        rx="5"
        ry="2"
        stroke="inherit"
        fill="inherit"
      ></ellipse>
      <!-- Vertically stacked series of Op nodes when unexpanded. -->
      <g id="op-series-vertical-stamp">
        <use xlink:href="#op-node-stamp" x="8" y="9"></use>
        <use xlink:href="#op-node-stamp" x="8" y="6"></use>
        <use xlink:href="#op-node-stamp" x="8" y="3"></use>
      </g>
      <!-- Horizontally stacked series of Op nodes when unexpanded. -->
      <g id="op-series-horizontal-stamp">
        <use xlink:href="#op-node-stamp" x="16" y="4"></use>
        <use xlink:href="#op-node-stamp" x="12" y="4"></use>
        <use xlink:href="#op-node-stamp" x="8" y="4"></use>
      </g>
      <!-- Horizontally stacked series of Op nodes for annotation. -->
      <g id="op-series-annotation-stamp">
        <use xlink:href="#op-node-annotation-stamp" x="9" y="2"></use>
        <use xlink:href="#op-node-annotation-stamp" x="7" y="2"></use>
        <use xlink:href="#op-node-annotation-stamp" x="5" y="2"></use>
      </g>
      <svg
        id="summary-icon"
        fill="#848484"
        height="12"
        viewBox="0 0 24 24"
        width="12"
      >
        <path
          d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
        ></path>
      </svg>

      <!-- Hatch patterns for faded out nodes. -->
      <pattern
        id="rectHatch"
        patternTransform="rotate(45 0 0)"
        width="5"
        height="5"
        patternUnits="userSpaceOnUse"
      >
        <line x1="0" y1="0" x2="0" y2="5" style="stroke-width: 1"></line>
      </pattern>
      <pattern
        id="ellipseHatch"
        patternTransform="rotate(45 0 0)"
        width="2"
        height="2"
        patternUnits="userSpaceOnUse"
      >
        <line x1="0" y1="0" x2="0" y2="2" style="stroke-width: 1"></line>
      </pattern>

      <!-- A shadow for health pills. -->
      <filter
        id="health-pill-shadow"
        x="-40%"
        y="-40%"
        width="180%"
        height="180%"
      >
        <feGaussianBlur in="SourceAlpha" stdDeviation="0.8"></feGaussianBlur>
        <feOffset dx="0" dy="0" result="offsetblur"></feOffset>
        <feFlood flood-color="#000000"></feFlood>
        <feComposite in2="offsetblur" operator="in"></feComposite>
        <feMerge>
          <feMergeNode></feMergeNode>
          <feMergeNode in="SourceGraphic"></feMergeNode>
        </feMerge>
      </filter>
    </defs>
    <!-- Make a large rectangle that fills the svg space so that
  zoom events get captured on safari -->
    <rect fill="white" width="10000" height="10000"></rect>
    <g id="root"></g>
  </svg>
  <tf-graph-minimap id="minimap"></tf-graph-minimap>
  <div id="contextMenu" class="context-menu"></div>
`;var Lr=class extends Gt(_o(mt)){constructor(){super(...arguments),this._zoomed=!1,this._zoomStartCoords=null,this._zoomTransform=null,this._maxZoomDistanceForClick=20,this._nodeGroupIndex={},this._annotationGroupIndex={},this._edgeGroupIndex={},this.maxMetanodeLabelLengthFontSize=9,this.minMetanodeLabelLengthFontSize=6,this.maxMetanodeLabelLengthLargeFont=11,this.maxMetanodeLabelLength=18}getNode(t){return this.renderHierarchy.getRenderNodeByName(t)}isNodeExpanded(t){return t.expanded}setNodeExpanded(t){this._build(this.renderHierarchy),this._updateLabels(!this._zoomed)}panToNode(t){Ale(t,this.$.svg,this.$.root,this._zoom)&&(this._zoomed=!0)}getGraphSvgRoot(){return this.$.svg}getContextMenu(){return this.$.contextMenu}_resetState(){this._nodeGroupIndex={},this._annotationGroupIndex={},this._edgeGroupIndex={},this._updateLabels(!1),Ht(this.$.svg).select("#root").selectAll("*").remove(),LH(this.$.svg)}_build(t){this.templateIndex=t.hierarchy.getTemplateIndex(),Nd("tf-graph-scene (layout):",function(){MH(t.root)}.bind(this),jr.RENDER_SCENE_LAYOUT),Nd("tf-graph-scene (build scene):",function(){ect(Ht(this.$.root),t.root,this),Ile(this.$.svg,this),this._updateInputTrace()}.bind(this),jr.RENDER_SCENE_BUILD_SCENE),setTimeout(function(){this._updateHealthPills(this.nodeNamesToHealthPills,this.healthPillStepIndex),this.minimap.update()}.bind(this),Tr.animation.duration)}ready(){super.ready(),this._zoom=eR().on("end",function(){if(this._zoomStartCoords){var t=Math.sqrt(Math.pow(this._zoomStartCoords.x-this._zoomTransform.x,2)+Math.pow(this._zoomStartCoords.y-this._zoomTransform.y,2));t<this._maxZoomDistanceForClick?this._fireEnableClick():setTimeout(this._fireEnableClick.bind(this),50)}this._zoomStartCoords=null}.bind(this)).on("zoom",function(){this._zoomTransform=qt.transform,this._zoomStartCoords||(this._zoomStartCoords=this._zoomTransform,this.fire("disable-click")),this._zoomed=!0,Ht(this.$.root).attr("transform",qt.transform),this.minimap.zoom(qt.transform)}.bind(this)),Ht(this.$.svg).call(this._zoom).on("dblclick.zoom",null),Ht(window).on("resize",function(){this.minimap.zoom()}.bind(this)),this.minimap=this.$.minimap.init(this.$.svg,this.$.root,this._zoom,Tr.minimap.size,Tr.subscene.meta.labelHeight)}attached(){this.set("_isAttached",!0)}detached(){this.set("_isAttached",!1)}_renderHierarchyChanged(){var t=this.renderHierarchy;this._hasRenderHierarchyBeenFitOnce=!1,this._resetState(),this._build(t)}_animateAndFit(){var t=this._isAttached;this._hasRenderHierarchyBeenFitOnce||!t||setTimeout(this.fit.bind(this),Tr.animation.duration)}_updateLabels(t){var r=this.$$(".title"),n=r.style,i=this.$$(".auxTitle"),o=i.style,a=this.$$(".functionLibraryTitle").style;let s=Ht(this.$.svg);var l=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.CORE).node();if(t&&l&&this.progress&&this.progress.value===100){var c=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.INEXTRACT).node()||s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.OUTEXTRACT).node(),u=l.getCTM().e,h=c?c.getCTM().e:null;n.display="inline",n.left=u+"px",h!==null&&h!==u?(o.display="inline",h=Math.max(u+r.getBoundingClientRect().width,h),o.left=h+"px"):o.display="none";let f=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.FUNCTION_LIBRARY).node(),p=f?f.getCTM().e:null;p!==null&&p!==h?(a.display="inline",p=Math.max(h+i.getBoundingClientRect().width,p),a.left=p+"px"):a.display="none"}else n.display="none",o.display="none",a.display="none"}nodeColorsChanged(){this.renderHierarchy!=null&&(this.templateIndex=this.renderHierarchy.hierarchy.getTemplateIndex(),mP.each(this._nodeGroupIndex,(t,r)=>{this._updateNodeState(r)}),this.minimap.update())}fit(){this._hasRenderHierarchyBeenFitOnce=!0,Cle(this.$.svg,this.$.root,this._zoom,function(){this._zoomed=!1}.bind(this))}getImageBlob(){return this.minimap.getImageBlob()}isNodeSelected(t){return t===this.selectedNode}isNodeHighlighted(t){return t===this.highlightedNode}addAnnotationGroup(t,r,n){var i=t.node.name;this._annotationGroupIndex[i]=this._annotationGroupIndex[i]||{},this._annotationGroupIndex[i][r.node.name]=n}getAnnotationGroupsIndex(t){return this._annotationGroupIndex[t]}removeAnnotationGroup(t,r){delete this._annotationGroupIndex[t.node.name][r.node.name]}addNodeGroup(t,r){this._nodeGroupIndex[t]=r}getNodeGroup(t){return this._nodeGroupIndex[t]}removeNodeGroup(t){delete this._nodeGroupIndex[t]}addEdgeGroup(t,r){this._edgeGroupIndex[t]=r}getEdgeGroup(t){return this._edgeGroupIndex[t]}_updateHealthPills(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex;Rle(this.$.svg,t,r)}_updateNodeState(t){var r=this.getNode(t),n=this.getNodeGroup(t);if(n&&s3(n,r,this),r.node.type===jt.META&&r.node.associatedFunction&&!r.isLibraryFunction){var i=Ma+r.node.associatedFunction,o=Ht("."+Hi.Scene.GROUP+">."+Hi.Scene.FUNCTION_LIBRARY+' g[data-name="'+i+'"]');s3(o,r,this)}var a=this.getAnnotationGroupsIndex(t);mP.each(a,(s,l)=>{s3(s,r,this,Hi.Annotation.NODE)})}_selectedNodeChanged(t,r){if(t!==r&&(r&&this._updateNodeState(r),!!t)){this.minimap.update();for(var n=this.renderHierarchy.hierarchy.node(t),i=[];n.parentNode!=null&&n.parentNode.name!=qc;)n=n.parentNode,i.push(n.name);var o;mP.forEachRight(i,a=>{this.renderHierarchy.buildSubhierarchy(a);var s=this.renderHierarchy.getRenderNodeByName(a);s.node.isGroupNode&&!s.expanded&&(s.expanded=!0,o||(o=s))}),o&&(this.setNodeExpanded(o),this._zoomed=!0),t&&this._updateNodeState(t),setTimeout(()=>{this.panToNode(t)},Tr.animation.duration)}}_highlightedNodeChanged(t,r){t!==r&&(t&&this._updateNodeState(t),r&&this._updateNodeState(r))}_onZoomChanged(){this._updateLabels(!this._zoomed)}_fireEnableClick(){this.fire("enable-click")}_updateInputTrace(){Yle(this.getGraphSvgRoot(),this.renderHierarchy,this.selectedNode,this.traceInputs)}};Lr.template=Kle;E([A({type:Object}),w("design:type",lo)],Lr.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],Lr.prototype,"name",void 0);E([A({type:String}),w("design:type",String)],Lr.prototype,"colorBy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"_hasRenderHierarchyBeenFitOnce",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"_isAttached",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoom",void 0);E([A({type:String,observer:"_highlightedNodeChanged"}),w("design:type",String)],Lr.prototype,"highlightedNode",void 0);E([A({type:String,observer:"_selectedNodeChanged"}),w("design:type",String)],Lr.prototype,"selectedNode",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"handleEdgeSelected",void 0);E([A({type:Boolean,observer:"_onZoomChanged"}),w("design:type",Boolean)],Lr.prototype,"_zoomed",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoomStartCoords",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoomTransform",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"_maxZoomDistanceForClick",void 0);E([A({type:Object}),w("design:type",Function)],Lr.prototype,"templateIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_nodeGroupIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_annotationGroupIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_edgeGroupIndex",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLengthFontSize",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"minMetanodeLabelLengthFontSize",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLengthLargeFont",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLength",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"progress",void 0);E([A({type:Array}),w("design:type",Array)],Lr.prototype,"nodeContextMenuItems",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"healthPillStepIndex",void 0);E([Bt("renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_renderHierarchyChanged",null);E([Bt("_isAttached","renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_animateAndFit",null);E([Bt("colorBy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"nodeColorsChanged",null);E([Bt("nodeNamesToHealthPills","healthPillStepIndex"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_updateHealthPills",null);E([Bt("traceInputs","selectedNode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_updateInputTrace",null);Lr=E([yt("tf-graph-scene")],Lr);var Dr=class extends Gt(mt){constructor(){super(...arguments),this._renderDepth=1,this._allowGraphSelect=!0,this.edgeWidthFunction="",this.handleNodeSelected="",this.edgeLabelFunction="",this.handleEdgeSelected=""}panToNode(t){this.$$("tf-graph-scene").panToNode(t)}_autoExtractNodesChanged(){var t=this.graphHierarchy;if(!!t){for(let r of Object.values(t.getNodeMap()))r.include=ur.UNSPECIFIED;this._buildRenderHierarchy(t)}}_buildNewRenderHierarchy(){var t=this.graphHierarchy;!t||this._buildRenderHierarchy(t)}_statsChanged(){var t=this.stats,r=this.devicesForStats;this.graphHierarchy&&(t&&r&&(ale(this.basicGraph,t,r),ple(this.graphHierarchy,t)),this._buildRenderHierarchy(this.graphHierarchy))}ready(){super.ready(),this.addEventListener("graph-select",this._graphSelected.bind(this)),this.addEventListener("disable-click",this._disableClick.bind(this)),this.addEventListener("enable-click",this._enableClick.bind(this)),this.addEventListener("node-toggle-expand",this._nodeToggleExpand.bind(this)),this.addEventListener("node-select",this._nodeSelected.bind(this)),this.addEventListener("node-highlight",this._nodeHighlighted.bind(this)),this.addEventListener("node-unhighlight",this._nodeUnhighlighted.bind(this)),this.addEventListener("node-toggle-extract",this._nodeToggleExtract.bind(this)),this.addEventListener("node-toggle-seriesgroup",this._nodeToggleSeriesGroup.bind(this)),this.addEventListener("edge-select",this._edgeSelected.bind(this)),this.addEventListener("annotation-select",this._nodeSelected.bind(this)),this.addEventListener("annotation-highlight",this._nodeHighlighted.bind(this)),this.addEventListener("annotation-unhighlight",this._nodeUnhighlighted.bind(this))}_buildRenderHierarchy(t){if(t.root.type!==jt.META)return;let r=this,n=Nd("new tf_graph_render.Hierarchy",()=>{let i=new lo(t,!!this.stats,this.autoExtractNodes);i.edgeLabelFunction=this.edgeLabelFunction,i.edgeWidthFunction=this.edgeWidthFunction;function o(a){return{minValue:a.domain()[0],maxValue:a.domain()[1],startColor:a.range()[0],endColor:a.range()[1]}}return r._setColorByParams({compute_time:o(i.computeTimeScale),memory:o(i.memoryUsageScale),device:ict.map(i.deviceColorMap.domain(),function(a){return{device:a,color:i.deviceColorMap(a)}}),xla_cluster:ict.map(i.xlaClusterColorMap.domain(),function(a){return{xla_cluster:a,color:i.xlaClusterColorMap(a)}})}),i},jr.RENDER_BUILD_HIERARCHY);r._setRenderHierarchy(n)}_getVisible(t){return t&&this.renderHierarchy.getNearestVisibleAncestor(t)}fit(){this.$.scene.fit()}getImageBlob(){return this.$.scene.getImageBlob()}_graphChanged(){!this.graphHierarchy||(this.graphHierarchy.addListener(Od.TEMPLATES_UPDATED,()=>{this.$.scene.nodeColorsChanged()}),this.fire("graph-select"))}_graphSelected(t){this._allowGraphSelect&&(this.set("selectedNode",null),this.set("selectedEdge",null)),this._allowGraphSelect=!0}_disableClick(t){this._allowGraphSelect=!1}_enableClick(t){this._allowGraphSelect=!0}_selectedNodeChanged(){var t=this.selectedNode;this.handleNodeSelected&&this.handleNodeSelected(t)}_selectedEdgeChanged(){var t=this.selectedEdge;this._deselectPreviousEdge(),t&&(this._lastSelectedEdgeGroup.classed(Hi.Edge.SELECTED,!0),this._updateMarkerOfSelectedEdge(t)),this.handleEdgeSelected&&this.handleEdgeSelected(t)}_nodeSelected(t){this._allowGraphSelect&&this.set("selectedNode",t.detail.name),this._allowGraphSelect=!0}_edgeSelected(t){this._allowGraphSelect&&(this.set("_lastSelectedEdgeGroup",t.detail.edgeGroup),this.set("selectedEdge",t.detail.edgeData)),this._allowGraphSelect=!0}_nodeHighlighted(t){this.set("highlightedNode",t.detail.name)}_nodeUnhighlighted(t){this.set("highlightedNode",null)}_nodeToggleExpand(t){this._nodeSelected(t);var r=t.detail.name,n=this.renderHierarchy.getRenderNodeByName(r);n.node.type!==jt.OP&&(this.renderHierarchy.buildSubhierarchy(r),n.expanded=!n.expanded,this.async(function(){this.$.scene.setNodeExpanded(n)},75),Po({actionId:jr.NODE_EXPANSION_TOGGLED,eventLabel:n.expanded?"expanded":"collapsed"}))}_nodeToggleExtract(t){var r=t.detail.name;this.nodeToggleExtract(r)}nodeToggleExtract(t){let r=this.renderHierarchy.getRenderNodeByName(t);r.node.include==ur.INCLUDE?r.node.include=ur.EXCLUDE:r.node.include==ur.EXCLUDE?r.node.include=ur.INCLUDE:r.node.include=this.renderHierarchy.isNodeAuxiliary(r)?ur.INCLUDE:ur.EXCLUDE,this._buildRenderHierarchy(this.graphHierarchy),Po({actionId:jr.NODE_AUXILIARY_EXTRACTION_CHANGED,eventLabel:r.node.include===ur.INCLUDE?"Auxiliary to Main":"Main to Auxiliary"})}_nodeToggleSeriesGroup(t){var r=t.detail.name;this.nodeToggleSeriesGroup(r)}nodeToggleSeriesGroup(t){this.set("progress",{value:0,msg:""});var r=nP(this),n=JS(r,100,"Namespace hierarchy");let i=yh(ia({},this.hierarchyParams),{seriesMap:this.graphHierarchy.buildSeriesGroupMapToggled(t)});bH(this.basicGraph,i,n).then(function(o){this.set("graphHierarchy",o),this._buildRenderHierarchy(this.graphHierarchy)}.bind(this))}_deselectPreviousEdge(){let t="."+Hi.Edge.SELECTED;Ht(t).classed(Hi.Edge.SELECTED,!1).each((r,n)=>{if(r.label){let i=Ht(this).selectAll("path.edgeline");r.label.startMarkerId&&i.style("marker-start",`url(#${r.label.startMarkerId})`),r.label.endMarkerId&&i.style("marker-end",`url(#${r.label.endMarkerId})`)}})}_updateMarkerOfSelectedEdge(t){var r;if(t.label){let n=t.label.startMarkerId||t.label.endMarkerId;if(n){let i=n.replace("dataflow-","selected-"),o=this.$$("#"+i);if(!o){let s=this.$.scene.querySelector("#"+n);o=s==null?void 0:s.cloneNode(!0),o.setAttribute("id",i),o.classList.add("selected-arrowhead"),(r=s==null?void 0:s.parentNode)==null||r.appendChild(o)}let a=t.label.startMarkerId?"marker-start":"marker-end";this._lastSelectedEdgeGroup.selectAll("path.edgeline").style(a,`url(#${i})`)}}}not(t){return!t}};Dr.template=Q`
    <style>
      .container {
        width: 100%;
        height: 100%;
        background: white;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
      }

      .vertical {
        width: 100%;
        height: 100%;
        @apply --layout-vertical;
      }

      .auto {
        @apply --layout-flex-auto;
        @apply --layout-vertical;
      }

      h2 {
        text-align: center;
      }

      paper-button {
        text-transform: none;
      }
    </style>
    <div class="container">
      <div class="vertical">
        <template is="dom-if" if="[[title]]">
          <h2>[[title]]</h2>
        </template>
        <tf-graph-scene
          id="scene"
          class="auto"
          render-hierarchy="[[renderHierarchy]]"
          highlighted-node="[[_getVisible(highlightedNode)]]"
          selected-node="{{selectedNode}}"
          selected-edge="{{selectedEdge}}"
          color-by="[[colorBy]]"
          progress="[[progress]]"
          node-context-menu-items="[[nodeContextMenuItems]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          health-pill-step-index="{{healthPillStepIndex}}"
          handle-edge-selected="[[handleEdgeSelected]]"
          trace-inputs="[[traceInputs]]"
        ></tf-graph-scene>
      </div>
    </div>
  `;E([A({type:Object,notify:!0,observer:"_graphChanged"}),w("design:type",as)],Dr.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],Dr.prototype,"basicGraph",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"stats",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"devicesForStats",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"hierarchyParams",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Dr.prototype,"progress",void 0);E([A({type:String}),w("design:type",String)],Dr.prototype,"title",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Dr.prototype,"selectedNode",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Dr.prototype,"selectedEdge",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"_lastSelectedEdgeGroup",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Dr.prototype,"highlightedNode",void 0);E([A({type:String}),w("design:type",String)],Dr.prototype,"colorBy",void 0);E([A({type:Object,notify:!0,readOnly:!0}),w("design:type",Object)],Dr.prototype,"colorByParams",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",lo)],Dr.prototype,"renderHierarchy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"autoExtractNodes",void 0);E([A({type:Array}),w("design:type",Array)],Dr.prototype,"nodeContextMenuItems",void 0);E([A({type:Number}),w("design:type",Number)],Dr.prototype,"_renderDepth",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"_allowGraphSelect",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Dr.prototype,"healthPillStepIndex",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"edgeWidthFunction",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"handleNodeSelected",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"edgeLabelFunction",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"handleEdgeSelected",void 0);E([Bt("autoExtractNodes"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_autoExtractNodesChanged",null);E([Bt("graphHierarchy","edgeWidthFunction","handleNodeSelected","edgeLabelFunction","handleEdgeSelected"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_buildNewRenderHierarchy",null);E([Bt("stats","devicesForStats"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_statsChanged",null);E([Bt("selectedNode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_selectedNodeChanged",null);E([Bt("selectedEdge"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_selectedEdgeChanged",null);Dr=E([yt("tf-graph")],Dr);var co=class extends Gt(mt){constructor(){super(...arguments),this.specificHealthPillStep=0,this.healthPillEntries=fP}ready(){super.ready();var t=document.getElementById("mainContainer"),r=document.querySelector("tf-dashboard-layout .scrollbar");t&&r&&(t.style.overflow="hidden",r.style.overflow="hidden")}_healthPillsAvailable(t,r){return t&&r}_computeTensorCountString(t,r){return t?t[r].toFixed(0):""}get healthPillValuesForSelectedNode(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex,n=this.selectedNode,i=this.allStepsModeEnabled,o=this.areHealthPillsLoading;if(o||!n)return null;let a=t[n];if(!a)return null;let s=a[i?0:r];return s?s.value.slice(2,8):null}get _currentStepDisplayValue(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex,n=this.allStepsModeEnabled,i=this.specificHealthPillStep,o=this.areHealthPillsLoading;if(n)return i.toFixed(0);if(o)return 0;for(let a in t)return t[a][r].step.toFixed(0);return 0}get _biggestStepEverSeen(){var t=this.nodeNamesToHealthPills;for(let n in t){var r=t[n];return Math.max(this._biggestStepEverSeen,r[r.length-1].step)}return this._biggestStepEverSeen||0}get _maxStepIndex(){var t=this.nodeNamesToHealthPills;for(let r in t)return t[r].length-1;return 0}_hasDebuggerNumericAlerts(t){return t&&t.length}_updateAlertsList(){var t=this.debuggerNumericAlerts,r=this.$$("#numeric-alerts-body");if(!!r){r.innerText="";for(var n=0;n<t.length;n++){var i=t[n],o=document.createElement("tr"),a=document.createElement("td");a.innerText=Qse(i.first_timestamp),a.classList.add("first-offense-td"),o.appendChild(a);var s=document.createElement("td");s.classList.add("tensor-device-td");var l=document.createElement("div");l.classList.add("tensor-section-within-table"),l.innerText=i.tensor_name,this._addOpExpansionListener(l,i.tensor_name),s.appendChild(l);var c=document.createElement("div");c.classList.add("device-section-within-table"),c.innerText="("+i.device_name+")",s.appendChild(c),o.appendChild(s);var u=document.createElement("div");u.classList.add("mini-health-pill");var h=document.createElement("td");if(h.classList.add("mini-health-pill-td"),h.appendChild(u),o.appendChild(h),i.neg_inf_event_count){var f=document.createElement("div");f.classList.add("negative-inf-mini-health-pill-section"),f.innerText=i.neg_inf_event_count,f.setAttribute("title",i.neg_inf_event_count+" events with -\u221E"),u.appendChild(f)}if(i.pos_inf_event_count){var p=document.createElement("div");p.classList.add("positive-inf-mini-health-pill-section"),p.innerText=i.pos_inf_event_count,p.setAttribute("title",i.pos_inf_event_count+" events with +\u221E"),u.appendChild(p)}if(i.nan_event_count){var d=document.createElement("div");d.classList.add("nan-mini-health-pill-section"),d.innerText=i.nan_event_count,d.setAttribute("title",i.nan_event_count+" events with NaN"),u.appendChild(d)}zt(r).appendChild(o)}}}_addOpExpansionListener(t,r){t.addEventListener("click",()=>{var n=xle(document.getElementById("scene"),this.renderHierarchy,r),i,o=document.querySelector("tf-graph-info#graph-info");o&&(i=o.scrollHeight-o.scrollTop);var a=this.selectedNode;this.set("selectedNode",n);var s=()=>{o.scrollTop=o.scrollHeight-i};o&&(a?s():window.setTimeout(s,20))})}};co.template=Q`
    <style>
      :host {
        font-size: 12px;
        margin: 0;
        padding: 0;
        display: block;
      }

      h2 {
        padding: 0;
        text-align: center;
        margin: 0;
      }

      .health-pill-legend {
        padding: 15px;
      }

      .health-pill-legend h2 {
        text-align: left;
      }

      .health-pill-entry {
        margin: 10px 10px 10px 0;
      }

      .health-pill-entry .color-preview {
        width: 26px;
        height: 26px;
        border-radius: 3px;
        display: inline-block;
        margin: 0 10px 0 0;
      }

      .health-pill-entry .color-label,
      .health-pill-entry .tensor-count {
        color: #777;
        display: inline-block;
        height: 26px;
        font-size: 22px;
        line-height: 26px;
        vertical-align: top;
      }

      .health-pill-entry .tensor-count {
        float: right;
      }

      #health-pill-step-slider {
        width: 100%;
        margin: 0 0 0 -15px;
        /* 31 comes from adding a padding of 15px from both sides of the paper-slider, subtracting
   * 1px so that the slider width aligns with the image (the last slider marker takes up 1px),
   * and adding 2px to account for a border of 1px on both sides of the image. 30 - 1 + 2.
   * Apparently, the paper-slider lacks a mixin for those padding values. */
        width: calc(100% + 31px);
      }

      #health-pills-loading-spinner {
        width: 20px;
        height: 20px;
        vertical-align: top;
      }

      #health-pill-step-number-input {
        text-align: center;
        vertical-align: top;
      }

      #numeric-alerts-table-container {
        max-height: 400px;
        overflow-x: hidden;
        overflow-y: auto;
      }

      #numeric-alerts-table {
        text-align: left;
      }

      #numeric-alerts-table td {
        vertical-align: top;
      }

      #numeric-alerts-table .first-offense-td {
        display: inline-block;
      }

      .first-offense-td {
        width: 80px;
      }

      .tensor-device-td {
        max-width: 140px;
        word-wrap: break-word;
      }

      .tensor-section-within-table {
        color: #266236;
        cursor: pointer;
        opacity: 0.8;
        text-decoration: underline;
      }

      .tensor-section-within-table:hover {
        opacity: 1;
      }

      .device-section-within-table {
        color: #666;
      }

      .mini-health-pill {
        width: 130px;
      }

      .mini-health-pill > div {
        height: 100%;
        width: 60px;
        border-radius: 3px;
      }

      #event-counts-th {
        padding: 0 0 0 10px;
      }

      .negative-inf-mini-health-pill-section {
        background: rgb(255, 141, 0);
        width: 20px;
      }

      .positive-inf-mini-health-pill-section {
        background: rgb(0, 62, 212);
        width: 20px;
      }

      .nan-mini-health-pill-section {
        background: rgb(204, 47, 44);
        width: 20px;
      }

      .negative-inf-mini-health-pill-section,
      .positive-inf-mini-health-pill-section,
      .nan-mini-health-pill-section {
        color: #fff;
        display: inline-block;
        height: 100%;
        line-height: 20px;
        margin: 0 0 0 10px;
        text-align: center;
      }

      .no-numeric-alerts-notification {
        margin: 0;
      }
    </style>
    <paper-material elevation="1" class="card health-pill-legend">
      <div class="title">
        Enable all (not just sampled) steps. Requires slow disk read.
      </div>
      <paper-toggle-button
        id="enableAllStepsModeToggle"
        checked="{{allStepsModeEnabled}}"
      >
      </paper-toggle-button>
      <h2>
        Step of Health Pills:
        <template is="dom-if" if="[[allStepsModeEnabled]]">
          <input
            type="number"
            id="health-pill-step-number-input"
            min="0"
            max="[[_biggestStepEverSeen]]"
            value="{{specificHealthPillStep::input}}"
          />
        </template>
        <template is="dom-if" if="[[!allStepsModeEnabled]]">
          [[_currentStepDisplayValue]]
        </template>
        <paper-spinner-lite
          active
          hidden$="[[!areHealthPillsLoading]]"
          id="health-pills-loading-spinner"
        ></paper-spinner-lite>
      </h2>
      <template is="dom-if" if="[[allStepsModeEnabled]]">
        <paper-slider
          id="health-pill-step-slider"
          immediate-value="{{specificHealthPillStep}}"
          max="[[_biggestStepEverSeen]]"
          snaps
          step="1"
          value="{{specificHealthPillStep}}"
        ></paper-slider>
      </template>
      <template is="dom-if" if="[[!allStepsModeEnabled]]">
        <template is="dom-if" if="[[_maxStepIndex]]">
          <paper-slider
            id="health-pill-step-slider"
            immediate-value="{{healthPillStepIndex}}"
            max="[[_maxStepIndex]]"
            snaps
            step="1"
            value="{{healthPillStepIndex}}"
          ></paper-slider>
        </template>
      </template>
      <h2>
        Health Pill
        <template is="dom-if" if="[[healthPillValuesForSelectedNode]]">
          Counts for Selected Node
        </template>
        <template is="dom-if" if="[[!healthPillValuesForSelectedNode]]">
          Legend
        </template>
      </h2>
      <template is="dom-repeat" items="[[healthPillEntries]]">
        <div class="health-pill-entry">
          <div
            class="color-preview"
            style="background:[[item.background_color]]"
          ></div>
          <div class="color-label">[[item.label]]</div>
          <div class="tensor-count">
            [[_computeTensorCountString(healthPillValuesForSelectedNode,
            index)]]
          </div>
        </div>
      </template>
      <div hidden$="[[!_hasDebuggerNumericAlerts(debuggerNumericAlerts)]]">
        <h2 id="numeric-alerts-header">Numeric Alerts</h2>
        <p>Alerts are sorted from top to bottom by increasing timestamp.</p>
        <div id="numeric-alerts-table-container">
          <table id="numeric-alerts-table">
            <thead>
              <tr>
                <th>First Offense</th>
                <th>Tensor (Device)</th>
                <th id="event-counts-th">Event Counts</th>
              </tr>
            </thead>
            <tbody id="numeric-alerts-body"></tbody>
          </table>
        </div>
      </div>
      <template
        is="dom-if"
        if="[[!_hasDebuggerNumericAlerts(debuggerNumericAlerts)]]"
      >
        <p class="no-numeric-alerts-notification">
          No numeric alerts so far. That is likely good. Alerts indicate the
          presence of NaN or (+/-) Infinity values, which may be concerning.
        </p>
      </template>
    </paper-material>
  `;E([A({type:Object}),w("design:type",lo)],co.prototype,"renderHierarchy",void 0);E([A({type:Array,notify:!0}),w("design:type",Object)],co.prototype,"debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],co.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number,notify:!0}),w("design:type",Object)],co.prototype,"healthPillStepIndex",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],co.prototype,"specificHealthPillStep",void 0);E([A({type:String,notify:!0}),w("design:type",Object)],co.prototype,"selectedNode",void 0);E([A({type:String,notify:!0}),w("design:type",Object)],co.prototype,"highlightedNode",void 0);E([A({type:Number,notify:!0}),w("design:type",Object)],co.prototype,"selectedNodeInclude",void 0);E([A({type:Boolean}),w("design:type",Object)],co.prototype,"areHealthPillsLoading",void 0);E([A({type:Array}),w("design:type",Array)],co.prototype,"healthPillEntries",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Object)],co.prototype,"allStepsModeEnabled",void 0);E([Rt("nodeNamesToHealthPills","healthPillStepIndex","selectedNode","allStepsModeEnabled","areHealthPillsLoading"),w("design:type",Object),w("design:paramtypes",[])],co.prototype,"healthPillValuesForSelectedNode",null);E([Rt("nodeNamesToHealthPills","healthPillStepIndex","allStepsModeEnabled","specificHealthPillStep","areHealthPillsLoading"),w("design:type",Object),w("design:paramtypes",[])],co.prototype,"_currentStepDisplayValue",null);E([Rt("nodeNamesToHealthPills"),w("design:type",Number),w("design:paramtypes",[])],co.prototype,"_biggestStepEverSeen",null);E([Rt("nodeNamesToHealthPills"),w("design:type",Number),w("design:paramtypes",[])],co.prototype,"_maxStepIndex",null);E([Bt("debuggerNumericAlerts"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],co.prototype,"_updateAlertsList",null);co=E([yt("tf-graph-debugger-data-card")],co);var oct={};Zs(oct,{GraphIconType:()=>i1});var i1;(function(e){e.CONST="CONST",e.META="META",e.OP="OP",e.SERIES="SERIES",e.SUMMARY="SUMMARY"})(i1||(i1={}));var Zu=class extends Gt(_o(mt)){constructor(){super(...arguments),this.vertical=!1,this.fillOverride=null,this.strokeOverride=null,this.height=20,this.faded=!1}getSvgDefinableElement(){return this.$.svgDefs}get _fill(){var t=this.type,r=this.fillOverride;if(r!=null)return r;switch(t){case i1.META:return Ku.DEFAULT_FILL;case i1.SERIES:return Vlt.DEFAULT_FILL;default:return v0.DEFAULT_FILL}}get _stroke(){var t=this.type,r=this.strokeOverride;if(r!=null)return r;switch(t){case i1.META:return Ku.DEFAULT_STROKE;case i1.SERIES:return Vlt.DEFAULT_STROKE;default:return v0.DEFAULT_STROKE}}_isType(t,r){return t===r}_fadedClass(t,r){return t?"faded-"+r:""}};Zu.template=Q`
    <style>
      :host {
        font-size: 0;
      }

      :host(.dark-mode) svg {
        filter: invert(1);
      }

      .faded-rect {
        fill: url(#rectHatch);
      }

      .faded-ellipse {
        fill: url(#ellipseHatch);
      }

      .faded-rect,
      .faded-ellipse,
      .faded-series {
        stroke: var(--tb-graph-faded) !important;
      }
      #rectHatch line,
      #ellipseHatch line {
        color: #e0d4b3 !important;
        fill: white;
        stroke: #e0d4b3 !important;
      }
    </style>
    <!-- SVG for definitions -->
    <svg height="0" width="0" id="svgDefs">
      <defs>
        <!-- Hatch patterns for faded out nodes. -->
        <pattern
          id="rectHatch"
          patternTransform="rotate(45 0 0)"
          width="5"
          height="5"
          patternUnits="userSpaceOnUse"
        >
          <line x1="0" y1="0" x2="0" y2="5" style="stroke-width: 1"></line>
        </pattern>
        <pattern
          id="ellipseHatch"
          patternTransform="rotate(45 0 0)"
          width="2"
          height="2"
          patternUnits="userSpaceOnUse"
        >
          <line x1="0" y1="0" x2="0" y2="2" style="stroke-width: 1"></line>
        </pattern>
        <!-- Template for an Op node ellipse. -->
        <ellipse
          id="op-node-stamp"
          rx="7.5"
          ry="3"
          stroke="inherit"
          fill="inherit"
        ></ellipse>
        <!-- Template for an Op node annotation ellipse (smaller). -->
        <ellipse
          id="op-node-annotation-stamp"
          rx="5"
          ry="2"
          stroke="inherit"
          fill="inherit"
        ></ellipse>
        <!-- Vertically stacked series of Op nodes when unexpanded. -->
        <g id="op-series-vertical-stamp">
          <use xlink:href="#op-node-stamp" x="8" y="9"></use>
          <use xlink:href="#op-node-stamp" x="8" y="6"></use>
          <use xlink:href="#op-node-stamp" x="8" y="3"></use>
        </g>
        <g id="op-series-horizontal-stamp">
          <use xlink:href="#op-node-stamp" x="16" y="4"></use>
          <use xlink:href="#op-node-stamp" x="12" y="4"></use>
          <use xlink:href="#op-node-stamp" x="8" y="4"></use>
        </g>
        <g
          id="summary-icon"
          fill="#848484"
          height="12"
          viewBox="0 0 24 24"
          width="12"
        >
          <path
            d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
          ></path>
        </g>
      </defs>
    </svg>
    <template is="dom-if" if="[[_isType(type, 'CONST')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 10 10"
      >
        <circle
          cx="5"
          cy="5"
          r="3"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
        ></circle>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'SUMMARY')]]">
      <svg
        width$="[[height]]"
        height$="[[height]]"
        viewBox="0 0 24 24"
        fill="#848484"
      >
        <path
          d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
        ></path>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'OP')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 16 8"
      >
        <use
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xlink:href="#op-node-stamp"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
          class$="{{_fadedClass(faded, 'ellipse')}}"
          x="8"
          y="4"
        ></use>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'META')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 37 16"
      >
        <rect
          x="1"
          y="1"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
          class$="{{_fadedClass(faded, 'rect')}}"
          stroke-width="2px"
          height="14"
          width="35"
          rx="5"
          ry="5"
        ></rect>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'SERIES')]]">
      <template is="dom-if" if="[[vertical]]">
        <svg
          height$="[[height]]"
          preserveAspectRatio="xMinYMid meet"
          viewBox="0 0 16 15"
        >
          <use
            xmlns:xlink="http://www.w3.org/1999/xlink"
            xlink:href="#op-series-vertical-stamp"
            fill$="[[_fill]]"
            stroke$="[[_stroke]]"
            class$="{{_fadedClass(faded, 'series')}}"
            x="0"
            y="2"
          ></use>
        </svg>
      </template>
      <template is="dom-if" if="[[!vertical]]">
        <svg
          height$="[[height]]"
          preserveAspectRatio="xMinYMid meet"
          viewBox="0 0 24 10"
        >
          <use
            xmlns:xlink="http://www.w3.org/1999/xlink"
            xlink:href="#op-series-horizontal-stamp"
            fill$="[[_fill]]"
            stroke$="[[_stroke]]"
            class$="{{_fadedClass(faded, 'series')}}"
            x="0"
            y="1"
          ></use>
        </svg>
      </template>
    </template>
  `;E([A({type:String}),w("design:type",String)],Zu.prototype,"type",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zu.prototype,"vertical",void 0);E([A({type:String}),w("design:type",Object)],Zu.prototype,"fillOverride",void 0);E([A({type:String}),w("design:type",Object)],Zu.prototype,"strokeOverride",void 0);E([A({type:Number}),w("design:type",Number)],Zu.prototype,"height",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zu.prototype,"faded",void 0);E([Rt("type","fillOverride"),w("design:type",String),w("design:paramtypes",[])],Zu.prototype,"_fill",null);E([Rt("type","strokeOverride"),w("design:type",String),w("design:paramtypes",[])],Zu.prototype,"_stroke",null);Zu=E([yt("tf-graph-icon")],Zu);var Hs=class extends Gt(mt){constructor(){super(...arguments),this.node=null,this.renderInfo=null,this.colorBy=Gn.STRUCTURE,this.templateIndex=null,this.type=null,this.vertical=!1,this.const=!1,this.summary=!1,this.fill=null,this.height=20}_computeFillOverride(t,r,n,i,o){return t&&r&&i?kH(i,n,r,!1):o}_getStrokeOverride(t){return t?tct(t):null}_getType(t,r,n,i){let{GraphIconType:o}=oct;if(t)switch(t.type){case jt.OP:{let a=t.op;return typeof a!="string"?o.OP:a==="Const"||n?o.CONST:a.endsWith("Summary")||r?o.SUMMARY:o.OP}case jt.META:return o.META;case jt.SERIES:return o.SERIES}return i}_isVertical(t,r){return t?t.hasNonControlEdges:!!r}_getFaded(t){return t&&t.isFadedOut}_onFillOverrideChanged(t,r){let{node:n,renderInfo:i,colorBy:o,templateIndex:a}=this;t!==r&&LH(this.$.icon.getSvgDefinableElement()),n&&i&&a&&kH(a,o,i,!1,this.$.icon.getSvgDefinableElement())}};Hs.template=Q`
    <style>
      tf-graph-icon {
        --tb-graph-faded: var(--tb-graph-faded);
      }
    </style>
    <tf-graph-icon
      id="icon"
      type="[[_getType(node, summary, const, type)]]"
      height="[[height]]"
      fill-override="[[_fillOverride]]"
      stroke-override="[[_getStrokeOverride(_fillOverride)]]"
      faded="[[_getFaded(renderInfo)]]"
      vertical="[[_isVertical(node, vertical)]]"
    ></tf-graph-icon>
  `;E([A({type:Object}),w("design:type",Object)],Hs.prototype,"node",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"renderInfo",void 0);E([A({type:Object}),w("design:type",String)],Hs.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"templateIndex",void 0);E([A({type:String}),w("design:type",Object)],Hs.prototype,"type",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hs.prototype,"vertical",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hs.prototype,"const",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hs.prototype,"summary",void 0);E([A({type:String}),w("design:type",Object)],Hs.prototype,"fill",void 0);E([A({type:Number}),w("design:type",Number)],Hs.prototype,"height",void 0);E([A({type:String,computed:"_computeFillOverride(node, renderInfo, colorBy, templateIndex, fill)",observer:"_onFillOverrideChanged"}),w("design:type",String)],Hs.prototype,"_fillOverride",void 0);Hs=E([yt("tf-node-icon")],Hs);var Gc=class extends Gt(mt){_itemTypeChanged(){this.itemType!=="subnode"?this.$["list-item"].classList.add("clickable"):this.$["list-item"].classList.remove("clickable")}_nodeListener(t){this.fire("node-list-item-"+t.type,{nodeName:this.name,type:this.itemType})}_fadedClass(t){return t&&t.isFadedOut?"faded":""}};Gc.template=Q`
    <style>
      #list-item {
        width: 100%;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
        position: relative;
        display: inline-block;
      }

      #list-item:hover {
        background-color: var(--google-yellow-100);
      }

      .clickable {
        cursor: pointer;
      }

      #list-item span {
        margin-left: 40px;
      }

      #list-item.excluded span {
        color: #999;
      }

      #list-item span.edge-label {
        float: right;
        font-size: 10px;
        margin-left: 3px;
        margin-right: 5px;
      }

      .node-icon {
        position: absolute;
        top: 1px;
        left: 2px;
      }

      .faded span {
        color: var(--tb-graph-faded);
      }
    </style>

    <div
      id="list-item"
      on-mouseover="_nodeListener"
      on-mouseout="_nodeListener"
      on-click="_nodeListener"
    >
      <div class$="{{_fadedClass(itemRenderInfo)}}">
        <tf-node-icon
          class="node-icon"
          height="12"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          node="[[itemNode]]"
          render-info="[[itemRenderInfo]]"
          template-index="[[templateIndex]]"
        >
        </tf-node-icon>
        <span title$="[[name]]">[[name]]</span>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",Object)],Gc.prototype,"cardNode",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"itemNode",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"edgeLabel",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"itemRenderInfo",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"name",void 0);E([A({type:String,observer:"_itemTypeChanged"}),w("design:type",String)],Gc.prototype,"itemType",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"colorByParams",void 0);E([A({type:Object}),w("design:type",Function)],Gc.prototype,"templateIndex",void 0);Gc=E([yt("tf-graph-op-compat-list-item")],Gc);var ss=class extends Gt(_o(mt)){constructor(){super(...arguments),this._expanded=!0,this._opCompatColor=v0.COMPATIBLE,this._opIncompatColor=v0.INCOMPATIBLE,this._templateIndex=null}_getNode(t,r){return r.node(t)}_getRenderInfo(t,r){return this.renderHierarchy.getOrCreateRenderNodeByName(t)}_toggleExpanded(){this._expanded=!this._expanded}_getToggleIcon(t){return t?"expand-less":"expand-more"}_resizeList(t){var r=document.querySelector(t);r&&r.fire("iron-resize")}get _incompatibleOpNodes(){let t=this.graphHierarchy;return!t||!t.root?[]:(this.async(this._resizeList.bind(this,"#incompatibleOpsList")),dle(t))}get _opCompatScore(){var t=this.graphHierarchy;if(t&&t.root){var r=t.root,n=r.compatibilityHistogram.compatible,i=r.compatibilityHistogram.incompatible;if(n==0&&i==0)return 0;var o=n+i;return Math.floor(100*n/o)/100}return 0}get _opCompatScoreLabel(){var t=this._opCompatScore;return xn(".0%")(t)}get _totalIncompatOps(){var t=this.graphHierarchy;return t&&t.root?t.root.compatibilityHistogram.incompatible:0}_graphHierarchyChanged(){this._templateIndex=this.graphHierarchy.getTemplateIndex(),this.graphHierarchy.addListener(Od.TEMPLATES_UPDATED,()=>{this._templateIndex=this.graphHierarchy.getTemplateIndex()})}};ss.template=Q`
    <style>
      :host {
        max-height: 500px;
      }

      .incompatible-ops-list {
        height: 350px;
        max-height: 400px;
        overflow-y: scroll;
        display: flex;
        flex-direction: column;
      }

      iron-list {
        flex: 1 1 auto;
      }

      paper-item {
        padding: 0;
        background: var(--secondary-background-color);
      }

      paper-item-body[two-line] {
        min-height: 0;
        padding: 8px 12px 4px;
      }

      .expandedInfo {
        padding: 8px 12px;
        font-weight: 500;
        font-size: 12pt;
        width: 100%;
      }

      .node-name {
        white-space: normal;
        word-wrap: break-word;
        font-size: 14pt;
        font-weight: 500;
      }

      .subtitle {
        color: var(--secondary-text-color);
        font-size: 12pt;
      }

      .toggle-button {
        float: right;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .non-control-list-item {
        padding-left: 10px;
      }

      div.op-compat-display {
        margin-top: 10px;
        display: inline-block;
      }

      /**
       * Sadly, because the whole body is inverted in color, legends also need
       * to be inverted.
       **/
      :host(.dark-mode) div.op-compat-display {
        filter: invert(1);
      }

      svg.op-compat {
        width: 250px;
        height: 25px;
        float: left;
      }

      div.op-compat-value {
        float: right;
        height: 100%;
        font-size: 14px;
        color: black;
        margin-left: 10px;
      }
    </style>

    <paper-item>
      <paper-item-body two-line>
        <div>
          <paper-icon-button
            icon="{{_getToggleIcon(_expanded)}}"
            on-click="_toggleExpanded"
            class="toggle-button"
          >
          </paper-icon-button>
          <div class="node-name" id="nodetitle">[[nodeTitle]]</div>
        </div>
        <div secondary>
          <div class="subtitle">
            <div class="op-compat-display">
              <svg
                class="op-compat"
                preserveAspectRatio="xMinYMid meet"
                viewBox="0 0 250 25"
              >
                <defs>
                  <linearGradient id="op-compat-fill">
                    <stop offset="0" stop-color$="[[_opCompatColor]]"></stop>
                    <stop
                      offset$="[[_opCompatScore]]"
                      stop-color$="[[_opCompatColor]]"
                    ></stop>
                    <stop
                      offset$="[[_opCompatScore]]"
                      stop-color$="[[_opIncompatColor]]"
                    ></stop>
                    <stop offset="1" stop-color$="[[_opIncompatColor ]]"></stop>
                  </linearGradient>
                </defs>
                <rect
                  height="25"
                  width="250"
                  rx="5"
                  ry="5"
                  style="fill: url('#op-compat-fill');"
                ></rect>
              </svg>
              <div class="op-compat-value">[[_opCompatScoreLabel]]</div>
            </div>
          </div>
        </div>
      </paper-item-body>
    </paper-item>

    <iron-collapse opened="{{_expanded}}">
      <template is="dom-if" if="{{_expanded}}" restamp="true">
        <div class="expandedInfo">
          Incompatible Operations: (<span>[[_totalIncompatOps]]</span>)
          <iron-list
            class="incompatible-ops-list"
            id="incompatibleOpsList"
            items="[[_incompatibleOpNodes]]"
          >
            <template>
              <tf-graph-op-compat-list-item
                class="non-control-list-item"
                item-node="[[item]]"
                item-render-info="[[_getRenderInfo(item.name, renderHierarchy)]]"
                name="[[item.name]]"
                template-index="[[_templateIndex]]"
                color-by="[[colorBy]]"
                item-type="incompatible-ops"
              >
              </tf-graph-op-compat-list-item>
            </template>
          </iron-list>
        </div>
      </template>
    </iron-collapse>
  `;E([A({type:Object}),w("design:type",as)],ss.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",lo)],ss.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"nodeTitle",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ss.prototype,"_expanded",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"_opCompatColor",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"_opIncompatColor",void 0);E([A({type:Object}),w("design:type",Object)],ss.prototype,"_templateIndex",void 0);E([Rt("graphHierarchy"),w("design:type",Array),w("design:paramtypes",[])],ss.prototype,"_incompatibleOpNodes",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],ss.prototype,"_opCompatScore",null);E([Rt("_opCompatScore"),w("design:type",String),w("design:paramtypes",[])],ss.prototype,"_opCompatScoreLabel",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],ss.prototype,"_totalIncompatOps",null);E([Bt("graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ss.prototype,"_graphHierarchyChanged",null);ss=E([yt("tf-graph-op-compat-card")],ss);var l3=Ee(Oe(),1);var Wc=class extends Gt(_o(mt)){_itemTypeChanged(){this.itemType!=="subnode"?this.$["list-item"].classList.add("clickable"):this.$["list-item"].classList.remove("clickable")}_nodeListener(t){this.fire("node-list-item-"+t.type,{cardNode:this.cardNode.name,nodeName:this.name,type:this.itemType})}_fadedClass(t){return t&&t.isFadedOut?"faded":""}};Wc.template=Q`
    <style>
      #list-item {
        width: 100%;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
        position: relative;
        display: inline-block;
      }

      #list-item:hover {
        background-color: var(--google-yellow-100);
      }

      :host(.dark-mode) #list-item:hover {
        background-color: var(--paper-yellow-900);
        color: #fff;
      }

      .clickable {
        cursor: pointer;
      }

      #list-item span {
        margin-left: 40px;
      }

      #list-item.excluded span {
        color: #999;
      }

      #list-item span.edge-label {
        float: right;
        font-size: 10px;
        margin-left: 3px;
        margin-right: 5px;
      }

      .node-icon {
        position: absolute;
        top: 1px;
        left: 2px;
      }

      .faded span {
        color: var(--tb-graph-faded);
      }
    </style>
    <div
      id="list-item"
      on-mouseover="_nodeListener"
      on-mouseout="_nodeListener"
      on-click="_nodeListener"
    >
      <div class$="{{_fadedClass(itemRenderInfo)}}">
        <tf-node-icon
          class="node-icon"
          height="12"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          node="[[itemNode]]"
          render-info="[[itemRenderInfo]]"
          template-index="[[templateIndex]]"
        ></tf-node-icon>
        <span title$="[[name]]">[[name]]</span>
        <span class="edge-label">[[edgeLabel]]</span>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",Object)],Wc.prototype,"cardNode",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"itemNode",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"edgeLabel",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"itemRenderInfo",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"name",void 0);E([A({type:String,observer:"_itemTypeChanged"}),w("design:type",String)],Wc.prototype,"itemType",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"colorByParams",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"templateIndex",void 0);Wc=E([yt("tf-node-list-item")],Wc);var dn=class extends Gt(mt){constructor(){super(...arguments),this._expanded=!0,this._openedControlPred=!1,this._openedControlSucc=!1,this._templateIndex=null}expandNode(){this.fire("_node.expand",this.node)}_getNode(t,r){return r.node(t)}_getNodeStats(t,r){var n=this._getNode(t,r);return n?n.stats:null}_getTotalMicros(t){return t?t.getTotalMicros():0}get _hasDisplayableNodeStats(){var t=this._nodeStats;return gH(t)}get _nodeStatsFormattedBytes(){var t=this._nodeStats;if(!(!t||!t.totalBytes))return Dd(t.totalBytes,iP)}get _nodeStatsFormattedComputeTime(){var t=this._nodeStats;if(!(!t||!t.getTotalMicros()))return Dd(t.getTotalMicros(),oP)}get _nodeStatsFormattedOutputSizes(){var t=this._nodeStats;if(!(!t||!t.outputSize||!t.outputSize.length))return l3.map(t.outputSize,function(r){return r.length===0?"scalar":"["+r.join(", ")+"]"})}_getRenderInfo(t,r){return this.renderHierarchy.getOrCreateRenderNodeByName(t)}get _attributes(){var t=this._node;if(this.async(this._resizeList.bind(this,"#attributesList")),!t||!t.attr)return[];var r=[];return l3.each(t.attr,function(n){n.key===ile?r=r.concat(n.value.list.s.map(function(i){return{key:i,value:"Too large to show..."}})):r.push({key:n.key,value:JSON.stringify(n.value)})}),r}get _device(){var t=this._node;return t?t.device:null}get _successors(){var t=this._node,r=this.graphHierarchy;return this._refreshNodeItemList("inputsList"),t?this._convertEdgeListToEdgeInfoList(r.getSuccessors(t.name),!1,t.isGroupNode):{regular:[],control:[]}}get _predecessors(){var t=this._node,r=this.graphHierarchy;return this._refreshNodeItemList("outputsList"),t?this._convertEdgeListToEdgeInfoList(r.getPredecessors(t.name),!0,t.isGroupNode):{regular:[],control:[]}}get _functionUsages(){var t=this._node,r=this.graphHierarchy;if(this._refreshNodeItemList("functionUsagesList"),!t||t.type!==jt.META)return[];let n=r.libraryFunctions[t.associatedFunction];return n?n.usages:[]}_refreshNodeItemList(t){this.async(this._resizeList.bind(this,`#${t}`))}_convertEdgeListToEdgeInfoList(t,r,n){var i=a=>l3.map(a.baseEdgeList,s=>{var l=r?s.v:s.w;return{name:l,node:this._getNode(l,this.graphHierarchy),edgeLabel:Ylt(s,this.renderHierarchy),renderInfo:this._getRenderInfo(l,this.renderHierarchy)}}),o=function(a){var s=[];return l3.each(a,l=>{var c=r?l.v:l.w;!n||l.baseEdgeList.length==1?s=s.concat(i(l)):s.push({name:c,node:this._getNode(c,this.graphHierarchy),edgeLabel:jlt(l,this.renderHierarchy),renderInfo:this._getRenderInfo(c,this.renderHierarchy)})}),s}.bind(this);return{regular:o(t.regular),control:o(t.control)}}get _subnodes(){var t=this._node;return t&&t.metagraph?t.metagraph.nodes():null}get _totalPredecessors(){var t=this._predecessors;return t.regular.length+t.control.length}get _totalSuccessors(){var t=this._successors;return t.regular.length+t.control.length}_toggleControlPred(){this._openedControlPred=!this._openedControlPred}_toggleControlSucc(){this._openedControlSucc=!this._openedControlSucc}_toggleExpanded(){this._expanded=!this._expanded}_getToggleIcon(t){return t?"expand-less":"expand-more"}_resetState(){this._openedControlPred=!1,this._openedControlSucc=!1,this.set("_groupButtonText",Qlt(this._node))}_resizeList(t){var r=document.querySelector(t);r&&r.fire("iron-resize")}_toggleInclude(){this.fire("node-toggle-inclusion",{name:this.graphNodeName})}_nodeIncludeStateChanged(t,r){this.set("_auxButtonText",yH(t))}_toggleGroup(){var t=IH(this._node);this.fire("node-toggle-seriesgroup",{name:t})}_isLibraryFunction(t){return t&&t.name.startsWith(Ma)}_isInSeries(t){return Jlt(t)}_graphHierarchyChanged(){this._templateIndex=this.graphHierarchy.getTemplateIndex(),this.graphHierarchy.addListener(Od.TEMPLATES_UPDATED,()=>{this._templateIndex=this.graphHierarchy.getTemplateIndex()})}};dn.template=Q`
    <style>
      .sub-list-group {
        font-weight: 500;
        font-size: 12pt;
        padding-bottom: 8px;
        width: 100%;
      }

      .sub-list {
        max-height: 300px;
        overflow-y: scroll;
      }

      .attr-left {
        float: left;
        width: 30%;
        word-wrap: break-word;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
      }

      .attr-right {
        margin-left: 30%;
        word-wrap: break-word;
        color: var(--secondary-text-color);
        font-weight: 400;
      }

      .sub-list-table {
        display: table;
        width: 100%;
      }

      .sub-list-table-row {
        display: table-row;
      }

      .sub-list-table-row .sub-list-table-cell:last-child {
        text-align: right;
      }

      .sub-list-table-cell {
        color: var(--secondary-text-color);
        display: table-cell;
        font-size: 11pt;
        font-weight: 400;
        max-width: 200px;
        padding: 0 4px;
      }

      paper-item {
        padding: 0;
        background: var(--primary-background-color);
      }

      paper-item-body[two-line] {
        min-height: 0;
        padding: 8px 12px 4px;
      }

      .expandedInfo {
        padding: 8px 12px;
      }

      .controlDeps {
        padding: 0 0 0 8px;
      }

      .node-name {
        white-space: normal;
        word-wrap: break-word;
        font-size: 14pt;
        font-weight: 500;
      }

      .node-icon {
        float: right;
      }

      .subtitle {
        color: var(--secondary-text-color);
        font-size: 12pt;
      }

      .controlLine {
        font-size: 11pt;
        font-weight: 400;
      }

      .toggle-button {
        float: right;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .control-toggle-button {
        float: left;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .toggle-include-group {
        padding-top: 4px;
      }

      .toggle-include {
        margin: 5px 6px;
        text-transform: none;
        padding: 4px 6px;
        font-size: 10pt;
        background-color: #fafafa;
        color: #666;
      }

      .toggle-include:hover {
        background-color: var(--google-yellow-100);
      }

      .non-control-list-item {
        padding-left: 10px;
      }
    </style>
    <paper-item>
      <paper-item-body two-line>
        <div>
          <paper-icon-button
            icon="{{_getToggleIcon(_expanded)}}"
            on-click="_toggleExpanded"
            class="toggle-button"
          >
          </paper-icon-button>
          <div class="node-name">
            <tf-wbr-string value="[[_node.name]]" delimiter-pattern="/">
            </tf-wbr-string>
          </div>
        </div>
        <div secondary>
          <tf-node-icon
            class="node-icon"
            node="[[_node]]"
            render-info="[[_getRenderInfo(graphNodeName, renderHierarchy)]]"
            color-by="[[colorBy]]"
            template-index="[[_templateIndex]]"
          ></tf-node-icon>
          <template is="dom-if" if="{{_node.op}}">
            <div class="subtitle">
              Operation:
              <span>[[_node.op]]</span>
            </div>
          </template>
          <template is="dom-if" if="{{_node.metagraph}}">
            <div class="subtitle">
              Subgraph:
              <span>[[_node.cardinality]]</span> nodes
            </div>
          </template>
        </div>
      </paper-item-body>
    </paper-item>
    <iron-collapse opened="{{_expanded}}">
      <template is="dom-if" if="{{_expanded}}" restamp="true">
        <div class="expandedInfo">
          <div class="sub-list-group attributes">
            Attributes (<span>[[_attributes.length]]</span>)
            <iron-list
              class="sub-list"
              id="attributesList"
              items="[[_attributes]]"
            >
              <template>
                <div>
                  <div class="attr-left">[[item.key]]</div>
                  <div class="attr-right">[[item.value]]</div>
                </div>
              </template>
            </iron-list>
          </div>

          <template is="dom-if" if="{{_device}}">
            <div class="sub-list-group device">
              <div class="attr-left">Device</div>
              <div class="attr-right">[[_device]]</div>
            </div>
          </template>

          <div class="sub-list-group predecessors">
            Inputs (<span>[[_totalPredecessors]]</span>)
            <iron-list
              class="sub-list"
              id="inputsList"
              items="[[_predecessors.regular]]"
            >
              <template>
                <tf-node-list-item
                  class="non-control-list-item"
                  card-node="[[_node]]"
                  item-node="[[item.node]]"
                  edge-label="[[item.edgeLabel]]"
                  item-render-info="[[item.renderInfo]]"
                  name="[[item.name]]"
                  item-type="predecessors"
                  color-by="[[colorBy]]"
                  template-index="[[_templateIndex]]"
                >
                </tf-node-list-item>
              </template>
            </iron-list>
            <template is="dom-if" if="[[_predecessors.control.length]]">
              <div class="controlDeps">
                <div class="controlLine">
                  <paper-icon-button
                    icon="{{_getToggleIcon(_openedControlPred)}}"
                    on-click="_toggleControlPred"
                    class="control-toggle-button"
                  >
                  </paper-icon-button>
                  Control dependencies
                </div>
                <iron-collapse opened="{{_openedControlPred}}" no-animation>
                  <template
                    is="dom-if"
                    if="{{_openedControlPred}}"
                    restamp="true"
                  >
                    <iron-list
                      class="sub-list"
                      items="[[_predecessors.control]]"
                    >
                      <template>
                        <tf-node-list-item
                          card-node="[[_node]]"
                          item-node="[[item.node]]"
                          item-render-info="[[item.renderInfo]]"
                          name="[[item.name]]"
                          item-type="predecessors"
                          color-by="[[colorBy]]"
                          template-index="[[_templateIndex]]"
                        >
                        </tf-node-list-item>
                      </template>
                    </iron-list>
                  </template>
                </iron-collapse>
              </div>
            </template>
          </div>

          <div class="sub-list-group successors">
            Outputs (<span>[[_totalSuccessors]]</span>)
            <iron-list
              class="sub-list"
              id="outputsList"
              items="[[_successors.regular]]"
            >
              <template>
                <tf-node-list-item
                  class="non-control-list-item"
                  card-node="[[_node]]"
                  item-node="[[item.node]]"
                  edge-label="[[item.edgeLabel]]"
                  item-render-info="[[item.renderInfo]]"
                  name="[[item.name]]"
                  item-type="successor"
                  color-by="[[colorBy]]"
                  template-index="[[_templateIndex]]"
                >
                </tf-node-list-item>
              </template>
            </iron-list>
            <template is="dom-if" if="[[_successors.control.length]]">
              <div class="controlDeps">
                <div class="controlLine">
                  <paper-icon-button
                    icon="{{_getToggleIcon(_openedControlSucc)}}"
                    on-click="_toggleControlSucc"
                    class="control-toggle-button"
                  >
                  </paper-icon-button>
                  Control dependencies
                </div>
                <iron-collapse opened="{{_openedControlSucc}}" no-animation>
                  <template
                    is="dom-if"
                    if="{{_openedControlSucc}}"
                    restamp="true"
                  >
                    <iron-list class="sub-list" items="[[_successors.control]]">
                      <template>
                        <tf-node-list-item
                          card-node="[[_node]]"
                          item-node="[[item.node]]"
                          item-render-info="[[item.renderInfo]]"
                          name="[[item.name]]"
                          item-type="successors"
                          color-by="[[colorBy]]"
                          template-index="[[_templateIndex]]"
                        >
                        </tf-node-list-item>
                      </template>
                    </iron-list>
                  </template>
                </iron-collapse>
              </div>
            </template>
          </div>
          <template is="dom-if" if="{{_hasDisplayableNodeStats}}">
            <div class="sub-list-group node-stats">
              Node Stats
              <div class="sub-list-table">
                <template is="dom-if" if="{{_nodeStats.totalBytes}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Memory</div>
                    <div class="sub-list-table-cell">
                      [[_nodeStatsFormattedBytes]]
                    </div>
                  </div>
                </template>
                <template is="dom-if" if="{{_getTotalMicros(_nodeStats)}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Compute Time</div>
                    <div class="sub-list-table-cell">
                      [[_nodeStatsFormattedComputeTime]]
                    </div>
                  </div>
                </template>
                <template is="dom-if" if="{{_nodeStats.outputSize}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Tensor Output Sizes</div>
                    <div class="sub-list-table-cell">
                      <template
                        is="dom-repeat"
                        items="{{_nodeStatsFormattedOutputSizes}}"
                      >
                        [[item]] <br />
                      </template>
                    </div>
                  </div>
                </template>
              </div>
            </div>
          </template>

          <template is="dom-if" if="[[_functionUsages.length]]">
            <div class="sub-list-group predecessors">
              Usages of the Function (<span>[[_functionUsages.length]]</span>)
              <iron-list
                class="sub-list"
                id="functionUsagesList"
                items="[[_functionUsages]]"
              >
                <template>
                  <tf-node-list-item
                    class="non-control-list-item"
                    card-node="[[_node]]"
                    item-node="[[item]]"
                    name="[[item.name]]"
                    item-type="functionUsages"
                    color-by="[[colorBy]]"
                    template-index="[[_templateIndex]]"
                  >
                  </tf-node-list-item>
                </template>
              </iron-list>
            </div>
          </template>

          <template is="dom-if" if="[[!_isLibraryFunction(_node)]]">
            <div class="toggle-include-group">
              <paper-button
                raised
                class="toggle-include"
                on-click="_toggleInclude"
              >
                <span>[[_auxButtonText]]</span>
              </paper-button>
            </div>
          </template>

          <template is="dom-if" if="{{_isInSeries(_node)}}">
            <div class="toggle-include-group">
              <paper-button
                raised
                class="toggle-include"
                on-click="_toggleGroup"
              >
                <span>[[_groupButtonText]]</span>
              </paper-button>
            </div>
          </template>
        </div>
      </template>
    </iron-collapse>
  `;E([A({type:String}),w("design:type",String)],dn.prototype,"graphNodeName",void 0);E([A({type:Object}),w("design:type",as)],dn.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Object)],dn.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"colorBy",void 0);E([A({type:Object,computed:"_getNode(graphNodeName, graphHierarchy)",observer:"_resetState"}),w("design:type",Object)],dn.prototype,"_node",void 0);E([A({type:Object,computed:"_getNodeStats(graphNodeName, graphHierarchy)",observer:"_resetState"}),w("design:type",Object)],dn.prototype,"_nodeStats",void 0);E([A({type:Number,observer:"_nodeIncludeStateChanged"}),w("design:type",Number)],dn.prototype,"nodeInclude",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_openedControlPred",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_openedControlSucc",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"_auxButtonText",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"_groupButtonText",void 0);E([A({type:Object}),w("design:type",Function)],dn.prototype,"_templateIndex",void 0);E([Rt("_nodeStats"),w("design:type",Boolean),w("design:paramtypes",[])],dn.prototype,"_hasDisplayableNodeStats",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedBytes",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedComputeTime",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedOutputSizes",null);E([Rt("_node"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_attributes",null);E([Rt("_node"),w("design:type",String),w("design:paramtypes",[])],dn.prototype,"_device",null);E([Rt("_node","graphHierarchy"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_successors",null);E([Rt("_node","graphHierarchy"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_predecessors",null);E([Rt("_node","graphHierarchy"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_functionUsages",null);E([Rt("_node"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_subnodes",null);E([Rt("_predecessors"),w("design:type",Number),w("design:paramtypes",[])],dn.prototype,"_totalPredecessors",null);E([Rt("_successors"),w("design:type",Number),w("design:paramtypes",[])],dn.prototype,"_totalSuccessors",null);E([Bt("graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],dn.prototype,"_graphHierarchyChanged",null);dn=E([yt("tf-node-info")],dn);var ls=class extends Gt(mt){ready(){super.ready(),this.addEventListener("node-list-item-click",this._nodeListItemClicked.bind(this)),this.addEventListener("node-list-item-mouseover",this._nodeListItemMouseover.bind(this)),this.addEventListener("node-list-item-mouseout",this._nodeListItemMouseout.bind(this))}_nodeListItemClicked(t){this.selectedNode=t.detail.nodeName}_nodeListItemMouseover(t){this.highlightedNode=t.detail.nodeName}_nodeListItemMouseout(){this.highlightedNode=null}_healthPillsAvailable(t,r){return t&&r&&Object.keys(r).length>0}_equals(t,r){return t===r}};ls.template=Q`
    <style>
      :host {
        background: var(--secondary-background-color);
        font-size: 12px;
        margin: 0;
        padding: 0;
        display: block;
        max-height: 650px;
        overflow-x: hidden;
        overflow-y: auto;
      }

      h2 {
        padding: 0;
        text-align: center;
        margin: 0;
      }
    </style>
    <template is="dom-if" if="{{selectedNode}}">
      <paper-material elevation="1" class="card">
        <tf-node-info
          graph-hierarchy="[[graphHierarchy]]"
          render-hierarchy="[[renderHierarchy]]"
          flat-graph="[[graph]]"
          graph-node-name="[[selectedNode]]"
          node-include="[[selectedNodeInclude]]"
          highlighted-node="{{highlightedNode}}"
          color-by="[[colorBy]]"
        >
        </tf-node-info>
      </paper-material>
    </template>
    <template is="dom-if" if="[[_equals(colorBy, 'op_compatibility')]]">
      <tf-graph-op-compat-card
        graph-hierarchy="[[graphHierarchy]]"
        render-hierarchy="[[renderHierarchy]]"
        color-by="[[colorBy]]"
        node-title="[[compatNodeTitle]]"
      >
      </tf-graph-op-compat-card>
    </template>
    <template
      is="dom-if"
      if="[[_healthPillsAvailable(debuggerDataEnabled, nodeNamesToHealthPills)]]"
    >
      <tf-graph-debugger-data-card
        render-hierarchy="[[renderHierarchy]]"
        debugger-numeric-alerts="[[debuggerNumericAlerts]]"
        node-names-to-health-pills="[[nodeNamesToHealthPills]]"
        selected-node="{{selectedNode}}"
        highlighted-node="{{highlightedNode}}"
        are-health-pills-loading="[[areHealthPillsLoading]]"
        all-steps-mode-enabled="{{allStepsModeEnabled}}"
        specific-health-pill-step="{{specificHealthPillStep}}"
        health-pill-step-index="{{healthPillStepIndex}}"
      >
      </tf-graph-debugger-data-card>
    </template>
  `;E([A({type:String}),w("design:type",String)],ls.prototype,"title",void 0);E([A({type:Object}),w("design:type",as)],ls.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],ls.prototype,"graph",void 0);E([A({type:Object}),w("design:type",lo)],ls.prototype,"renderHierarchy",void 0);E([A({type:Object}),w("design:type",Object)],ls.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ls.prototype,"healthPillStepIndex",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"colorBy",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"compatNodeTitle",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ls.prototype,"selectedNode",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ls.prototype,"highlightedNode",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ls.prototype,"selectedNodeInclude",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"debuggerDataEnabled",void 0);ls=E([yt("tf-graph-info")],ls);var cur={MAX_NODE_COUNT:1e4,MAX_EDGE_COUNT:1e4},tn=class extends Gt(mt){constructor(){super(...arguments),this.hierarchyParams=r3,this.allStepsModeEnabled=!1,this.specificHealthPillStep=0,this.compatNodeTitle="TPU Compatibility"}fit(){this.$.graph.fit()}downloadAsImage(t){return Ri(this,null,function*(){let r=yield this.$.graph.getImageBlob(),n=document.createElement("a");n.href=URL.createObjectURL(r),n.download=t,n.click(),URL.revokeObjectURL(n.href)})}_isNotComplete(t){return t.value<100}_getContainerClass(t){var r="container";return t.error&&(r+=" error"),this._isNotComplete(t)&&(r+=" loading"),r}_onNodeInclusionToggled(t){this.$.graph.nodeToggleExtract(t.detail.name)}_onNodeSeriesGroupToggled(t){this.$.graph.nodeToggleSeriesGroup(t.detail.name)}_updateNodeInclude(){let t=this.renderHierarchy?this.renderHierarchy.getNodeByName(this.selectedNode):null;this._selectedNodeInclude=t?t.include:ur.UNSPECIFIED}_slimGraphChanged(){if(!this.graph)return;let{MAX_NODE_COUNT:t,MAX_EDGE_COUNT:r}=cur;Object.keys(this.graph.nodes).length>t&&this.graph.edges.length>r&&this.colorBy===Gn.STRUCTURE&&(this.colorBy=Gn.NONE)}_ensureTemplates(){!this.graphHierarchy||this.colorBy!==Gn.STRUCTURE||this.graphHierarchy.getTemplateIndex()||this.graphHierarchy.updateTemplates()}};tn.template=Q`
    <style>
      ::host {
        display: block;
      }

      /deep/ .close {
        position: absolute;
        cursor: pointer;
        left: 15px;
        bottom: 15px;
      }

      .container {
        width: 100%;
        height: 100%;
        opacity: 1;
      }

      .container.loading {
        cursor: progress;
        opacity: 0.1;
      }

      .container.loading.error {
        cursor: auto;
      }

      #info {
        position: absolute;
        right: 5px;
        top: 5px;
        padding: 0px;
        max-width: 380px;
        min-width: 320px;
        background-color: rgba(255, 255, 255, 0.9);
        @apply --shadow-elevation-2dp;
      }

      #main {
        width: 100%;
        height: 100%;
      }

      #progress-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        position: absolute;
        top: 40px;
        left: 0;
        font-size: 13px;
      }

      #progress-msg {
        margin-bottom: 5px;
        white-space: pre-wrap;
        width: 400px;
      }

      paper-progress {
        width: 400px;
        --paper-progress-height: 6px;
        --paper-progress-active-color: #f3913e;
      }

      .context-menu {
        position: absolute;
        display: none;
        background-color: #e2e2e2;
        border-radius: 2px;
        font-size: 14px;
        min-width: 150px;
        border: 1px solid #d4d4d4;
      }

      /deep/ .context-menu ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        cursor: default;
      }

      /deep/ .context-menu ul li {
        padding: 4px 16px;
      }

      /deep/ .context-menu ul li:hover {
        background-color: #f3913e;
        color: white;
      }
    </style>
    <template is="dom-if" if="[[_isNotComplete(progress)]]">
      <div id="progress-bar">
        <div id="progress-msg">[[progress.msg]]</div>
        <paper-progress value="[[progress.value]]"></paper-progress>
      </div>
    </template>
    <div class$="[[_getContainerClass(progress)]]">
      <div id="main">
        <tf-graph
          id="graph"
          graph-hierarchy="{{graphHierarchy}}"
          basic-graph="[[graph]]"
          hierarchy-params="[[hierarchyParams]]"
          render-hierarchy="{{renderHierarchy}}"
          devices-for-stats="[[devicesForStats]]"
          stats="[[stats]]"
          selected-node="{{selectedNode}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="{{colorByParams}}"
          progress="{{progress}}"
          edge-label-function="[[edgeLabelFunction]]"
          edge-width-function="[[edgeWidthFunction]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          health-pill-step-index="[[healthPillStepIndex]]"
          handle-node-selected="[[handleNodeSelected]]"
          handle-edge-selected="[[handleEdgeSelected]]"
          trace-inputs="[[traceInputs]]"
          auto-extract-nodes="[[autoExtractNodes]]"
        ></tf-graph>
      </div>
      <div id="info">
        <tf-graph-info
          id="graph-info"
          title="selected"
          graph-hierarchy="[[graphHierarchy]]"
          render-hierarchy="[[renderHierarchy]]"
          graph="[[graph]]"
          selected-node="{{selectedNode}}"
          selected-node-include="{{_selectedNodeInclude}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          debugger-data-enabled="[[debuggerDataEnabled]]"
          are-health-pills-loading="[[areHealthPillsLoading]]"
          debugger-numeric-alerts="[[debuggerNumericAlerts]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          all-steps-mode-enabled="{{allStepsModeEnabled}}"
          specific-health-pill-step="{{specificHealthPillStep}}"
          health-pill-step-index="{{healthPillStepIndex}}"
          compat-node-title="[[compatNodeTitle]]"
          on-node-toggle-inclusion="_onNodeInclusionToggled"
          on-node-toggle-seriesgroup="_onNodeSeriesGroupToggled"
        ></tf-graph-info>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",as)],tn.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],tn.prototype,"graph",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"hierarchyParams",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"stats",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"progress",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"autoExtractNodes",void 0);E([A({type:String,notify:!0}),w("design:type",String)],tn.prototype,"colorBy",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],tn.prototype,"colorByParams",void 0);E([A({type:Object,notify:!0}),w("design:type",lo)],tn.prototype,"renderHierarchy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"debuggerDataEnabled",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"areHealthPillsLoading",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],tn.prototype,"debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],tn.prototype,"allStepsModeEnabled",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],tn.prototype,"specificHealthPillStep",void 0);E([A({type:Number}),w("design:type",Number)],tn.prototype,"healthPillStepIndex",void 0);E([A({type:String,notify:!0}),w("design:type",String)],tn.prototype,"selectedNode",void 0);E([A({type:String}),w("design:type",String)],tn.prototype,"compatNodeTitle",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"edgeWidthFunction",void 0);E([A({type:Number}),w("design:type",Number)],tn.prototype,"_selectedNodeInclude",void 0);E([A({type:String}),w("design:type",String)],tn.prototype,"_highlightedNode",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"handleNodeSelected",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"edgeLabelFunction",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"handleEdgeSelected",void 0);E([Bt("selectedNode","renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_updateNodeInclude",null);E([Bt("graph"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_slimGraphChanged",null);E([Bt("colorBy","graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_ensureTemplates",null);tn=E([yt("tf-graph-board")],tn);var c3=Ee(Oe(),1);var Ju=class{isNotTpuOp(t){return t.toLowerCase().search("cpu:")!=-1||t.toLowerCase().search("gpu:")!=-1?!0:t.toLowerCase().search("tpu")==-1}opValid(t){return t.name.search(Ma)==0||!t.op||t.device&&this.isNotTpuOp(t.device)||t.device&&t.device.search("TPU_SYSTEM")!=-1?!0:c3.includes(Ju.WHITELIST,t.op)}};Ju.WHITELIST=["Abs","Acos","Acosh","Add","AddN","AddV2","AdjustContrastv2","AdjustHue","AdjustSaturation","All","AllToAll","Angle","Any","ApproximateEqual","ArgMax","ArgMin","Asin","Asinh","Assert","AssignAddVariableOp","AssignSubVariableOp","AssignVariableOp","Atan","Atan2","Atanh","AvgPool","AvgPool3D","AvgPool3DGrad","AvgPoolGrad","BatchMatMul","BatchMatMulV2","BatchToSpace","BatchToSpaceND","BesselI0e","BesselI1e","Betainc","BiasAdd","BiasAddGrad","BiasAddV1","Bitcast","BitwiseAnd","BitwiseOr","BitwiseXor","BroadcastArgs","BroadcastGradientArgs","BroadcastTo","Bucketize","Case","Cast","Ceil","CheckNumerics","Cholesky","ClipByValue","CollectivePermute","CollectiveReduceV2","Complex","ComplexAbs","Concat","ConcatOffset","ConcatV2","Conj","ConjugateTranspose","Const","ControlTrigger","Conv2D","Conv2DBackpropFilter","Conv2DBackpropInput","Conv3D","Conv3DBackpropFilterV2","Conv3DBackpropInputV2","Cos","Cosh","Cross","CrossReplicaSum","Cumprod","Cumsum","DataFormatDimMap","DataFormatVecPermute","DepthToSpace","DepthwiseConv2dNative","DepthwiseConv2dNativeBackpropFilter","DepthwiseConv2dNativeBackpropInput","Dequantize","DeviceIndex","Diag","DiagPart","Digamma","Div","DivNoNan","DynamicStitch","Einsum","Elu","EluGrad","Empty","EmptyTensorList","EnsureShape","Equal","Erf","Erfc","Erfinv","Exp","ExpandDims","Expm1","ExtractImagePatches","FFT","FFT2D","FFT3D","FakeParam","FakeQuantWithMinMaxArgs","FakeQuantWithMinMaxArgsGradient","FakeQuantWithMinMaxVars","FakeQuantWithMinMaxVarsGradient","Fill","Floor","FloorDiv","FloorMod","FusedBatchNorm","FusedBatchNormGrad","FusedBatchNormGradV2","FusedBatchNormGradV3","FusedBatchNormV2","FusedBatchNormV3","Gather","GatherNd","GatherV2","GetItem","Greater","GreaterEqual","HSVToRGB","IFFT","IFFT2D","IFFT3D","IRFFT","IRFFT2D","IRFFT3D","Identity","IdentityN","If","Igamma","IgammaGradA","Igammac","Imag","InTopKV2","InfeedDequeue","InfeedDequeueTuple","InplaceAdd","InplaceUpdate","Inv","Invert","InvertPermutation","IsFinite","IsInf","IsNan","KthOrderStatistic","L2Loss","LRN","LRNGrad","LeakyRelu","LeakyReluGrad","LeftShift","Less","LessEqual","Lgamma","LinSpace","ListDiff","Log","Log1p","LogSoftmax","LogicalAnd","LogicalNot","LogicalOr","LowerBound","MakeUnique","MatMul","MatrixBandPart","MatrixDiag","MatrixDiagPart","MatrixDiagPartV2","MatrixDiagPartV3","MatrixDiagV2","MatrixDiagV3","MatrixInverse","MatrixSetDiag","MatrixSetDiagV2","MatrixSetDiagV3","MatrixSolve","MatrixTriangularSolve","Max","MaxPool","MaxPool3D","MaxPool3DGrad","MaxPool3DGradGrad","MaxPoolGrad","MaxPoolGradGrad","MaxPoolGradGradV2","MaxPoolGradV2","MaxPoolV2","Maximum","Mean","Min","Minimum","MirrorPad","MirrorPadGrad","Mod","Mul","MulNoNan","Multinomial","Ndtri","Neg","NextAfter","NoOp","NonMaxSuppressionV4","NotEqual","OneHot","OnesLike","OutfeedEnqueue","OutfeedEnqueueTuple","Pack","Pad","PadV2","ParallelDynamicStitch","ParameterizedTruncatedNormal","PartitionedCall","PlaceholderWithDefault","Polygamma","PopulationCount","Pow","PreventGradient","Prod","Qr","QuantizeAndDequantizeV2","QuantizeAndDequantizeV3","RFFT","RFFT2D","RFFT3D","RGBToHSV","RandomGammaGrad","RandomShuffle","RandomStandardNormal","RandomUniform","RandomUniformInt","Range","Rank","ReadVariableOp","Real","RealDiv","Reciprocal","ReciprocalGrad","Relu","Relu6","Relu6Grad","ReluGrad","Reshape","ResizeBilinear","ResizeBilinearGrad","ResizeNearestNeighbor","ResizeNearestNeighborGrad","ResourceApplyAdaMax","ResourceApplyAdadelta","ResourceApplyAdagrad","ResourceApplyAdagradDA","ResourceApplyAdagradV2","ResourceApplyAdam","ResourceApplyAddSign","ResourceApplyCenteredRMSProp","ResourceApplyFtrl","ResourceApplyFtrlV2","ResourceApplyGradientDescent","ResourceApplyKerasMomentum","ResourceApplyMomentum","ResourceApplyPowerSign","ResourceApplyProximalAdagrad","ResourceApplyProximalGradientDescent","ResourceApplyRMSProp","ResourceGather","ResourceScatterAdd","ResourceScatterDiv","ResourceScatterMax","ResourceScatterMin","ResourceScatterMul","ResourceScatterNdAdd","ResourceScatterNdSub","ResourceScatterNdUpdate","ResourceScatterSub","ResourceScatterUpdate","ResourceStridedSliceAssign","Reverse","ReverseSequence","ReverseV2","RightShift","Rint","RngReadAndSkip","RngSkip","Roll","Round","Rsqrt","RsqrtGrad","ScatterNd","Select","SelectV2","SelfAdjointEigV2","Selu","SeluGrad","Shape","ShapeN","Sigmoid","SigmoidGrad","Sign","Sin","Sinh","Size","Slice","Snapshot","Softmax","SoftmaxCrossEntropyWithLogits","Softplus","SoftplusGrad","Softsign","SoftsignGrad","SpaceToBatch","SpaceToBatchND","SpaceToDepth","SparseMatMul","SparseSoftmaxCrossEntropyWithLogits","SparseToDense","Split","SplitV","Sqrt","SqrtGrad","Square","SquaredDifference","Squeeze","StackCloseV2","StackPopV2","StackPushV2","StackV2","StatefulPartitionedCall","StatefulStandardNormalV2","StatefulTruncatedNormal","StatefulUniform","StatefulUniformFullInt","StatefulUniformInt","StatelessCase","StatelessIf","StatelessMultinomial","StatelessRandomGetAlg","StatelessRandomGetKeyCounter","StatelessRandomGetKeyCounterAlg","StatelessRandomNormal","StatelessRandomNormalV2","StatelessRandomUniform","StatelessRandomUniformFullInt","StatelessRandomUniformFullIntV2","StatelessRandomUniformInt","StatelessRandomUniformIntV2","StatelessRandomUniformV2","StatelessTruncatedNormal","StatelessTruncatedNormalV2","StatelessWhile","StopGradient","StridedSlice","StridedSliceGrad","Sub","Sum","Svd","SymbolicGradient","TPUEmbeddingActivations","Tan","Tanh","TanhGrad","TensorArrayCloseV3","TensorArrayConcatV3","TensorArrayGatherV3","TensorArrayGradV3","TensorArrayReadV3","TensorArrayScatterV3","TensorArraySizeV3","TensorArraySplitV3","TensorArrayV3","TensorArrayWriteV3","TensorListConcatV2","TensorListElementShape","TensorListFromTensor","TensorListGather","TensorListGetItem","TensorListLength","TensorListPopBack","TensorListPushBack","TensorListReserve","TensorListSetItem","TensorListSplit","TensorListStack","TensorScatterAdd","TensorScatterMax","TensorScatterMin","TensorScatterSub","TensorScatterUpdate","TensorStridedSliceUpdate","Tile","TopKUnique","TopKV2","TopKWithUnique","Transpose","TridiagonalSolve","TruncateDiv","TruncateMod","TruncatedNormal","Unique","Unpack","UnsortedSegmentMax","UnsortedSegmentMin","UnsortedSegmentProd","UnsortedSegmentSum","UpperBound","VarIsInitializedOp","VariableShape","Where","While","Xdivy","XlaBroadcastHelper","XlaConv","XlaConvV2","XlaDequantize","XlaDot","XlaDotV2","XlaDynamicSlice","XlaDynamicUpdateSlice","XlaEinsum","XlaGather","XlaHostCompute","XlaIf","XlaKeyValueSort","XlaPad","XlaRecv","XlaRecvFromHost","XlaReduce","XlaReduceWindow","XlaReplicaId","XlaScatter","XlaSelectAndScatter","XlaSelfAdjointEig","XlaSend","XlaSendToHost","XlaSetBound","XlaSetDynamicDimensionSize","XlaSharding","XlaSort","XlaSpmdFullToShardShape","XlaSpmdShardToFullShape","XlaSvd","XlaVariadicReduce","XlaVariadicSort","XlaWhile","Xlog1py","Xlogy","ZerosLike","Zeta","Enter","Exit","LoopCond","Merge","NextIteration","Switch","_Arg","_ArrayToList","_FusedBatchNormEx","_ListToArray","_ParallelConcatUpdate","_RecvTPUEmbeddingActivations","_RecvTPUEmbeddingDeduplicationData","_Retval","_SendTPUEmbeddingGradients","_TPUCompile","_TPUExecute","_UnaryOpsComposition","TPUCompilationResult","TPUReplicatedInput","TPUReplicatedOutput","TPUReplicateMetadata","MergeV2Checkpoints","RestoreV2","SaveV2","Abort","Assert","Assign","Placeholder","PlaceholderV2","ShardedFilename","StringJoin","Variable","VariableV2","VarHandleOp","AudioSummary","AudioSummaryV2","DebugNumericSummary","HistogramSummary","ImageSummary","MergeSummary","ScalarSummary","StatsAggregatorSummary"];function Zle(e,t){if(t===null)throw new Error("Compatibility provider required, but got: "+t);c3.each(e.nodes,r=>{r.compatible=t.opValid(r),c3.each(r.inEmbeddings,n=>{n.compatible=t.opValid(n)}),c3.each(r.outEmbeddings,n=>{n.compatible=t.opValid(n)})})}var gP=Ee(Oe(),1);var Jle=Ee(Oe(),1);var Ll=class extends Gt(mt){constructor(){super(...arguments),this._rawRegexInput="",this._previousRegexInput="",this._searchTimeoutDelay=150,this._maxRegexResults=42}get _regexInput(){var t=this.renderHierarchy,r=this._rawRegexInput;return r.trim()}_regexInputChanged(){var t=this._regexInput;this._requestSearch()}_clearSearchResults(){this.set("_regexMatches",[])}_requestSearch(){if(!this._searchPending){if(this._regexInput===this._previousRegexInput){this._searchPending=!1;return}this._searchPending=!0,this._executeSearch(),this.async(()=>{this._searchPending=!1,this._requestSearch()},this._searchTimeoutDelay)}}_executeSearch(){if(this._previousRegexInput=this._regexInput,!this._regexInput){this._clearSearchResults();return}try{var t=new RegExp(this._regexInput)}catch(i){this._clearSearchResults();return}let r=[],n=this.renderHierarchy.hierarchy.getNodeMap();Jle.each(n,(i,o)=>{if(r.length>=this._maxRegexResults)return!1;!t.test(o)||r.push(o)}),this.set("_regexMatches",r)}_matchClicked(t){let r=t.model.item;this.set("selectedNode",r),Po({actionId:jr.NODE_SEARCH_RESULT_FOCUSED})}};Ll.template=Q`
    <div id="search-container">
      <paper-input
        id="runs-regex"
        label="Search nodes (regex)"
        value="{{_rawRegexInput}}"
      >
      </paper-input>
      <div id="search-results-anchor">
        <div id="search-results">
          <template is="dom-repeat" items="[[_regexMatches]]">
            <div id="search-match" on-click="_matchClicked">[[item]]</div>
          </template>
        </div>
      </div>
    </div>
    <style>
      #search-container {
        width: 100%;
        overflow: visible;
      }

      #runs-regex {
        width: 100%;
      }

      #search-results-anchor {
        position: relative;
      }

      #search-results {
        color: #fff;
        position: absolute;
        max-height: 200px;
        overflow-x: hidden;
        overflow-y: auto;
        text-align: right;
        max-width: 100%;
        box-sizing: border-box;
      }

      #search-match {
        background: var(--tb-orange-strong);
        padding: 3px;
        float: right;
        width: 100%;
        box-sizing: border-box;
        direction: rtl;
      }

      #search-match:hover {
        background: var(--tb-orange-weak);
        cursor: pointer;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Ll.prototype,"renderHierarchy",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Ll.prototype,"selectedNode",void 0);E([A({type:String}),w("design:type",String)],Ll.prototype,"_rawRegexInput",void 0);E([A({type:String}),w("design:type",String)],Ll.prototype,"_previousRegexInput",void 0);E([A({type:Number}),w("design:type",Number)],Ll.prototype,"_searchTimeoutDelay",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ll.prototype,"_searchPending",void 0);E([A({type:Number}),w("design:type",Number)],Ll.prototype,"_maxRegexResults",void 0);E([A({type:Array}),w("design:type",Array)],Ll.prototype,"_regexMatches",void 0);E([Rt("renderHierarchy","_rawRegexInput"),w("design:type",String),w("design:paramtypes",[])],Ll.prototype,"_regexInput",null);E([Bt("_regexInput"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ll.prototype,"_regexInputChanged",null);Ll=E([yt("tf-graph-node-search")],Ll);var lct=/device:([^:]+:[0-9]+)$/,sct=[{regex:lct}],Qle=[],uur=new Set([Gn.COMPUTE_TIME,Gn.MEMORY]),Pn=class extends Gt(_o(mt)){constructor(){super(...arguments),this.ColorBy=Gn,this.stats=null,this.devicesForStats=null,this.colorBy=Gn.STRUCTURE,this.datasets=[],this._selectedRunIndex=0,this.traceInputs=!1,this.autoExtractNodes=!0,this._selectedTagIndex=0,this._selectedGraphType=Bs.OP_GRAPH,this.showSessionRunsDropdown=!0,this.showUploadButton=!0,this._legendOpened=!0,this._downloadFilename="graph.png"}_onGraphTypeChangedByUserGesture(){Po({actionId:jr.GRAPH_TYPE_CHANGED,eventLabel:this._selectedGraphType})}_onColorByChangedByUserGesture(){Po({actionId:jr.NODE_COLOR_MODE_CHANGED,eventLabel:this.colorBy})}_onTraceInputsChangedByUserGesture(){Po({actionId:jr.TRACE_INPUT_MODE_TOGGLED})}_xlaClustersProvided(t){return t&&t.hierarchy&&t.hierarchy.xlaClusters.length>0}_statsChanged(t){if(t!=null){var r={},n=gP.each(t.dev_stats,function(i){var o=gP.some(sct,function(s){return s.regex.test(i.device)}),a=gP.some(Qle,function(s){return s.regex.test(i.device)});o&&!a&&(r[i.device]=!0)});this.set("devicesForStats",r)}}get _currentDevices(){var t=this.devicesForStats;let r=this.stats,o=(r?r.dev_stats:[]).map(s=>s.device).filter(s=>sct.some(l=>l.regex.test(s))),a=zlt(o);if(a.length==1){let s=a[0].match(lct);s&&(a[0]=s[1])}return o.map((s,l)=>{let c=null;return Qle.forEach(u=>{u.regex.test(s)&&(c=u.msg)}),{device:s,suffix:a[l],used:t==null?void 0:t[s],ignoredMsg:c}})}_deviceCheckboxClicked(t){let r=t.target,n=Object.assign({},this.devicesForStats),i=r.value;r.checked?n[i]=!0:delete n[i],this.set("devicesForStats",n)}_numTags(t,r){return this._getTags(t,r).length}_getTags(t,r){return!t||!t[r]?[]:t[r].tags}_fit(){this.fire("fit-tap")}_isGradientColoring(t,r){return uur.has(r)&&t!=null}_equals(t,r){return t===r}get _currentDeviceParams(){var t=this.colorByParams;let r=t.device.filter(o=>sct.some(a=>a.regex.test(o.device))),n=zlt(r.map(o=>o.device));if(n.length==1){var i=n[0].match(lct);i&&(n[0]=i[1])}return r.map((o,a)=>({device:n[a],color:o.color}))}get _currentXlaClusterParams(){var t=this.colorByParams;return t.xla_cluster}get _currentGradientParams(){var t=this.colorByParams,r=this.colorBy;if(!this._isGradientColoring(this.stats,r))return null;let n=t[r],i=n.minValue,o=n.maxValue;return r===Gn.MEMORY?(i=Dd(i,iP),o=Dd(o,iP)):r===Gn.COMPUTE_TIME&&(i=Dd(i,oP),o=Dd(o,oP)),{minValue:i,maxValue:o,startColor:n.startColor,endColor:n.endColor}}download(){this.fire("download-image-requested",this._downloadFilename)}_updateFileInput(t){var a;let r=(a=t.target.files)==null?void 0:a[0];if(!r)return;let n=r.name,i=n.lastIndexOf(".");i>=0&&(n=n.substring(0,i));let o=n.lastIndexOf("/");o>=0&&(n=n.substring(o+1)),this._setDownloadFilename(n),this.set("selectedFile",t),Po({actionId:jr.UPLOADED_GRAPH_FROM_FILESYSTEM})}_datasetsChanged(t,r){var n;r!=null&&(this._selectedRunIndex=0),this._setDownloadFilename((n=this.datasets[this._selectedRunIndex])==null?void 0:n.name)}_computeSelection(t,r,n,i){return!t[r]||!t[r].tags[n]?null:{run:t[r].name,tag:t[r].tags[n].tag,type:i}}_selectedRunIndexChanged(t){var r;!this.datasets||(this.colorBy=Gn.STRUCTURE,this._selectedTagIndex=0,this._selectedGraphType=this._getDefaultSelectionType(),this.traceInputs=!1,this._setDownloadFilename((r=this.datasets[t])==null?void 0:r.name))}_selectedTagIndexChanged(){this._selectedGraphType=this._getDefaultSelectionType()}_getDefaultSelectionType(){let{datasets:t,_selectedRunIndex:r,_selectedTagIndex:n}=this;if(!t||!t[r]||!t[r].tags[n]||t[r].tags[n].opGraph)return Bs.OP_GRAPH;let i=t[r];return i.tags[n].profile?Bs.PROFILE:i.tags[n].conceptualGraph?Bs.CONCEPTUAL_GRAPH:Bs.OP_GRAPH}_getFile(){this.$$("#file").click()}_setDownloadFilename(t){this._downloadFilename=(t||"graph")+".png"}_statsNotNull(t){return t!==null}_toggleLegendOpen(){this.set("_legendOpened",!this._legendOpened)}_getToggleLegendIcon(t){return t?"expand-more":"expand-less"}_getSelectionOpGraphDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].opGraph}_getSelectionProfileDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].profile}_getSelectionConceptualGraphDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].conceptualGraph}};Pn.template=Q`
    <style>
      :host {
        color: #555;
        display: flex;
        flex-direction: column;
        font-size: 12px;
        width: 100%;
        --tb-graph-controls-title-color: #000;
        --tb-graph-controls-legend-text-color: #000;
        --tb-graph-controls-text-color: #555;
        --tb-graph-controls-title-font-size: 14px;
        --tb-graph-controls-subtitle-font-size: 14px;
        --paper-input-container-shared-input-style_-_font-size: 14px;
        --paper-font-subhead_-_font-size: 14px;
      }

      :host(.dark-mode) {
        --tb-graph-controls-title-color: #fff;
        --tb-graph-controls-legend-text-color: #f3f3f3;
        --tb-graph-controls-text-color: #eee;
      }

      paper-dropdown-menu {
        --paper-dropdown-menu-input: {
          padding: 0;
          color: gray;
        }
        --iron-icon-width: 15px;
        --iron-icon-height: 15px;
        --primary-text-color: gray;
        --paper-item-min-height: 30px;
      }

      paper-button[raised].keyboard-focus {
        font-weight: normal;
      }

      .run-dropdown {
        --paper-input-container: {
          padding: 5px 0 5px 5px;
        }
      }

      table {
        border-collapse: collapse;
        border-spacing: 0;
      }

      table tr {
        height: 20px;
      }

      table td {
        padding: 0;
        margin: 0;
      }

      .allcontrols {
        padding: 0 20px 20px;
        flex-grow: 1;
        overflow-y: auto;
      }

      .legend-holder {
        background: var(--secondary-background-color);
        box-sizing: border-box;
        color: var(--tb-graph-controls-text-color);
        width: 100%;
      }

      .legend-toolbar {
        appearance: none;
        background-color: inherit;
        border-top: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
        border-right: none;
        border-left: none;
        cursor: pointer;
        color: var(--tb-graph-controls-legend-text-color);
        font: inherit;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
      }

      .legend-toolbar,
      .legend-content {
        padding: 8px 20px;
      }

      .toggle-legend-button {
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .toggle-legend-text {
        font-size: var(--tb-graph-controls-subtitle-font-size);
      }

      paper-radio-button {
        display: block;
        padding: 5px;
      }
      svg.icon,
      tf-graph-icon {
        width: 60px;
        height: 18px;
      }
      .domainValues {
        margin-bottom: 10px;
        width: 165px;
      }
      .domainStart {
        float: left;
      }
      .domainEnd {
        float: right;
      }
      .colorBox {
        width: 20px;
      }

      .image-icon {
        width: 24px;
        height: 24px;
      }

      .help-icon {
        height: 15px;
        margin: 0;
        padding: 0;
      }

      .gray {
        color: #666;
      }

      .title {
        font-size: var(--tb-graph-controls-title-font-size);
        margin: 8px 5px 8px 0;
        color: var(--tb-graph-controls-title-color);
      }
      .title small {
        font-weight: normal;
      }
      .deviceList,
      .xlaClusterList {
        max-height: 200px;
        overflow-y: auto;
      }

      #file {
        padding: 8px 0;
      }

      .color-legend-row {
        align-items: center;
        clear: both;
        display: flex;
        height: 20px;
        margin-top: 5px;
      }

      .color-legend-row .label,
      .color-legend-row svg,
      .color-legend-row tf-graph-icon {
        flex: 0 0 40px;
        margin-right: 20px;
      }

      .devices-checkbox input {
        text-align: left;
        vertical-align: middle;
      }

      .control-holder .icon-button {
        font-size: var(--tb-graph-controls-subtitle-font-size);
        margin: 0 -5px;
        padding: 5px;
        display: flex;
        justify-content: flex-start;
        color: var(--tb-graph-controls-text-color);
      }

      .button-text {
        padding-left: 20px;
        text-transform: none;
      }

      .upload-button {
        width: 165px;
        height: 25px;
        text-transform: none;
        margin-top: 4px;
      }

      .button-icon {
        width: 26px;
        height: 26px;
        color: var(--paper-orange-500);
      }

      .hidden-input {
        display: none;
      }

      .allcontrols .control-holder {
        clear: both;
        display: flex;
        justify-content: space-between;
      }

      .allcontrols .control-holder.control-options {
        padding: 0 0 15px 15px;
        flex-direction: column;
      }

      .allcontrols .control-holder paper-toggle-button {
        margin-bottom: 5px;
      }

      span.counter {
        font-size: var(--tb-graph-controls-subtitle-font-size);
        color: gray;
        margin-left: 4px;
      }

      .runs-row .title,
      .tags-row .title {
        display: flex;
        align-items: baseline;
      }

      .runs-row paper-item,
      .tags-row paper-item {
        --paper-item: {
          white-space: nowrap;
        }
      }

      table.control-holder {
        border: 0;
        border-collapse: collapse;
      }

      table.tf-graph-controls td.input-element-table-data {
        padding: 0 0 0 20px;
      }

      .spacer {
        flex-grow: 1;
      }

      .color-text {
        overflow: hidden;
      }

      .color-text.gradient-container {
        margin: 0 5px;
      }

      /** Override inline styles that suppress pointer events for disabled buttons. Otherwise, the */
      /*  tooltips do not appear. */
      paper-radio-group paper-radio-button {
        pointer-events: auto !important;
      }

      .legend-clarifier {
        color: var(--tb-graph-controls-text-color);
        cursor: help;
        display: inline-block;
        text-decoration: underline;
      }

      .legend-clarifier paper-tooltip {
        width: 150px;
      }

      /** Otherwise, polymer UI controls appear atop node search. */
      tf-graph-node-search {
        z-index: 1;
        width: 100%;
      }

      paper-dropdown-menu {
        flex-grow: 1;
      }
    </style>

    <div class="allcontrols">
      <div class="control-holder">
        <tf-graph-node-search
          selected-node="{{selectedNode}}"
          render-hierarchy="[[renderHierarchy]]"
        ></tf-graph-node-search>
      </div>
      <div class="control-holder">
        <paper-button class="icon-button" on-tap="_fit" alt="Fit to screen">
          <iron-icon icon="aspect-ratio" class="button-icon"></iron-icon>
          <span class="button-text">Fit to screen</span>
        </paper-button>
      </div>
      <div class="control-holder">
        <paper-button
          class="icon-button"
          on-click="download"
          alt="Download PNG"
        >
          <iron-icon icon="file-download" class="button-icon"></iron-icon>
          <span class="button-text">Download PNG</span>
        </paper-button>
      </div>
      <template is="dom-if" if="[[showUploadButton]]">
        <div class="control-holder">
          <paper-button
            class="icon-button"
            on-click="_getFile"
            alt="Upload file"
            title="Upload a pbtxt file to view a graph from the local filesystem"
          >
            <iron-icon icon="file-upload" class="button-icon"></iron-icon>
            <span class="button-text">Upload file</span>
          </paper-button>

          <div class="hidden-input">
            <input
              type="file"
              id="file"
              name="file"
              on-change="_updateFileInput"
              accept=".pbtxt"
            />
          </div>
        </div>
      </template>
      <div class="control-holder runs-row">
        <div class="title">
          Run <span class="counter">([[datasets.length]])</span>
        </div>
        <paper-dropdown-menu
          no-label-float
          no-animations
          noink
          horizontal-align="left"
          class="run-dropdown"
        >
          <paper-listbox
            class="dropdown-content"
            selected="{{_selectedRunIndex}}"
            slot="dropdown-content"
          >
            <template is="dom-repeat" items="[[datasets]]">
              <paper-item>[[item.name]]</paper-item>
            </template>
          </paper-listbox>
        </paper-dropdown-menu>
      </div>
      <template is="dom-if" if="[[showSessionRunsDropdown]]">
        <div class="control-holder tags-row">
          <div class="title">
            Tag
            <span class="counter"
              >([[_numTags(datasets, _selectedRunIndex)]])</span
            >
          </div>
          <paper-dropdown-menu
            no-label-float
            no-animations
            horizontal-align="left"
            noink
            class="run-dropdown"
          >
            <paper-listbox
              class="dropdown-content"
              selected="{{_selectedTagIndex}}"
              slot="dropdown-content"
            >
              <template
                is="dom-repeat"
                items="[[_getTags(datasets, _selectedRunIndex)]]"
              >
                <paper-item>[[item.displayName]]</paper-item>
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
        </div>
      </template>
      <div class="title">Graph type</div>
      <div class="control-holder control-options">
        <paper-radio-group
          selected="{{_selectedGraphType}}"
          on-paper-radio-group-changed="_onGraphTypeChangedByUserGesture"
        >
          <!-- Note that the name has to match that of tf_graph_common.SelectionType. -->
          <paper-radio-button
            name="op_graph"
            disabled="[[_getSelectionOpGraphDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Op graph</paper-radio-button
          >
          <paper-radio-button
            name="conceptual_graph"
            disabled="[[_getSelectionConceptualGraphDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Conceptual graph</paper-radio-button
          >
          <paper-radio-button
            name="profile"
            disabled="[[_getSelectionProfileDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Profile</paper-radio-button
          >
        </paper-radio-group>
      </div>
      <div class="title">Node options</div>
      <div class="control-holder control-options">
        <paper-toggle-button
          checked="{{traceInputs}}"
          on-change="_onTraceInputsChangedByUserGesture"
        >
          Trace inputs
        </paper-toggle-button>
        <paper-toggle-button checked="{{autoExtractNodes}}">
          Auto-extract high-degree nodes
        </paper-toggle-button>
      </div>
      <template is="dom-if" if="[[healthPillsFeatureEnabled]]">
        <div class="control-holder">
          <paper-toggle-button checked="{{healthPillsToggledOn}}"
            >Show health pills</paper-toggle-button
          >
        </div>
      </template>
      <div class="title">Color by</div>
      <div class="control-holder control-options">
        <paper-radio-group
          selected="{{colorBy}}"
          on-paper-radio-group-changed="_onColorByChangedByUserGesture"
        >
          <paper-radio-button name="[[ColorBy.NONE]]">None</paper-radio-button>

          <paper-radio-button name="[[ColorBy.STRUCTURE]]"
            >Structure</paper-radio-button
          >

          <paper-radio-button name="[[ColorBy.DEVICE]]"
            >Device</paper-radio-button
          >

          <paper-radio-button
            id="xla-cluster-radio-button"
            name="[[ColorBy.XLA_CLUSTER]]"
            disabled="[[!_xlaClustersProvided(renderHierarchy)]]"
          >
            XLA cluster
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="xla-cluster-radio-button"
            position="right"
            offset="0"
          >
            Coloring by XLA cluster is only enabled if at least 1 op specifies
            an XLA cluster.
          </paper-tooltip>

          <paper-radio-button
            id="compute-time-radio-button"
            name="[[ColorBy.COMPUTE_TIME]]"
            disabled="[[!stats]]"
          >
            Compute time
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="compute-time-radio-button"
            position="right"
            offset="0"
          >
            Coloring by compute time is only enabled if the RunMetadata proto is
            passed to the FileWriter when a specific session is run.
          </paper-tooltip>

          <paper-radio-button
            id="memory-radio-button"
            name="[[ColorBy.MEMORY]]"
            disabled="[[!stats]]"
          >
            Memory
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="memory-radio-button"
            position="right"
            offset="0"
          >
            Coloring by memory is only enabled if the RunMetadata proto is
            passed to the FileWriter when a specific session is run.
          </paper-tooltip>

          <paper-radio-button
            id="tpu-compatibility-radio-button"
            name="[[ColorBy.OP_COMPATIBILITY]]"
          >
            TPU compatibility
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="tpu-compatibility-radio-button"
            position="right"
            offset="0"
          >
            Coloring by whether an operation is compatible for the TPU device.
          </paper-tooltip>
        </paper-radio-group>
        <span class="spacer"></span>
      </div>
    </div>
    <div class="legend-holder">
      <button class="legend-toolbar" on-click="_toggleLegendOpen">
        <span class="toggle-legend-text">Legend</span>
        <iron-icon
          icon="[[_getToggleLegendIcon(_legendOpened)]]"
          class="toggle-legend-button"
        >
        </iron-icon>
      </button>
      <iron-collapse opened="[[_legendOpened]]" class="legend-content">
        <!-- Color-mode-specific legend items -->
        <div>
          <template is="dom-if" if="[[_isGradientColoring(stats, colorBy)]]">
            <svg width="140" height="20" class="color-text gradient-container">
              <defs>
                <linearGradient
                  id="linearGradient"
                  x1="0%"
                  y1="0%"
                  x2="100%"
                  y2="0%"
                >
                  <stop
                    class="start"
                    offset="0%"
                    stop-color$="[[_currentGradientParams.startColor]]"
                  ></stop>
                  <stop
                    class="end"
                    offset="100%"
                    stop-color$="[[_currentGradientParams.endColor]]"
                  ></stop>
                </linearGradient>
              </defs>
              <rect
                x="0"
                y="0"
                width="135"
                height="20"
                fill="url(#linearGradient)"
                stroke="black"
              ></rect>
            </svg>
            <div class="domainValues color-text">
              <div class="domainStart">[[_currentGradientParams.minValue]]</div>
              <div class="domainEnd">[[_currentGradientParams.maxValue]]</div>
            </div>
            <br style="clear: both" />
            <div>Devices included in stats:</div>
            <div class="deviceList">
              <template is="dom-repeat" items="[[_currentDevices]]">
                <div class="color-legend-row devices-checkbox">
                  <span
                    ><input
                      type="checkbox"
                      value$="[[item.device]]"
                      checked$="[[item.used]]"
                      on-click="_deviceCheckboxClicked"
                  /></span>
                  <span>[[item.suffix]]</span>
                  <template is="dom-if" if="[[item.ignoredMsg]]">
                    <paper-icon-button
                      icon="help"
                      class="help-icon"
                    ></paper-icon-button>
                    <paper-tooltip
                      position="right"
                      offset="0"
                      animation-delay="0"
                      >[[item.ignoredMsg]]</paper-tooltip
                    >
                  </template>
                </div>
              </template>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'structure')]]">
            <div class="color-text">
              <div class="color-legend-row">
                <span class="label"> colors </span>
                <span class="color-legend-value">same substructure</span>
              </div>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="META"
                  height="16"
                  fill-override="#eee"
                  stroke-override="#a6a6a6"
                ></tf-graph-icon>
                <span class="color-legend-value">unique substructure</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'device')]]">
            <div>
              <template is="dom-repeat" items="[[_currentDeviceParams]]">
                <div class="color-legend-row">
                  <tf-graph-icon
                    type="META"
                    height="16"
                    fill-override="[[item.color]]"
                    stroke-override="#a6a6a6"
                  ></tf-graph-icon>
                  <span class="color-legend-value">[[item.device]]</span>
                </div>
              </template>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="META"
                  height="16"
                  fill-override="#eee"
                  stroke-override="#a6a6a6"
                ></tf-graph-icon>
                <span class="color-legend-value">unknown device</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'xla_cluster')]]">
            <div>
              <template is="dom-repeat" items="[[_currentXlaClusterParams]]">
                <div class="color-legend-row">
                  <svg>
                    <use
                      xmlns:xlink="http://www.w3.org/1999/xlink"
                      xlink:href="#unfilled-rect"
                      x="0"
                      y="0"
                      style="fill:[[item.color]]"
                    ></use>
                  </svg>
                  <span class="color-legend-value">[[item.xla_cluster]]</span>
                </div>
              </template>
              <div class="color-legend-row">
                <svg>
                  <use
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    xlink:href="#grey-rect"
                    x="0"
                    y="0"
                  ></use>
                </svg>
                <span class="color-legend-value">unknown XLA cluster</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'op_compatibility')]]">
            <div class="color-text">
              <div class="color-legend-row">
                <tf-graph-icon
                  type="OP"
                  height="16"
                  fill-override="#0f9d58"
                  stroke-override="#ccc"
                ></tf-graph-icon>
                <span class="color-legend-value">Valid Op</span>
              </div>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="OP"
                  height="16"
                  fill-override="#db4437"
                  stroke-override="#ccc"
                ></tf-graph-icon>
                <span class="color-legend-value">Invalid Op</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_statsNotNull(stats)]]">
            <div class="color-legend-row">
              <tf-graph-icon type="META" height="16" faded></tf-graph-icon>
              <span class="color-legend-value">unused substructure</span>
            </div>
          </template>
        </div>

        <!-- Common legend items -->
        <div>
          <table>
            <tbody>
              <tr>
                <td></td>
                <td>(* = expandable)</td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon
                    type="META"
                    height="16"
                    fill-override="#d9d9d9"
                    stroke-override="#ccc"
                  ></tf-graph-icon>
                </td>
                <td>
                  Namespace<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Encapsulates a set of nodes. Namespace is hierarchical and
                      based on scope.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="OP" height="16"></tf-graph-icon>
                </td>
                <td>
                  OpNode
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that performs an operation. These nodes cannot
                      expand.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="SERIES" height="16"></tf-graph-icon>
                </td>
                <td>
                  Unconnected series<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Sequence of numbered nodes that are not connected to each
                      other.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon
                    type="SERIES"
                    height="16"
                    vertical
                  ></tf-graph-icon>
                </td>
                <td>
                  Connected series<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Sequence of numbered nodes that are connected to each
                      other.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg class="icon">
                    <circle
                      fill="white"
                      stroke="#848484"
                      cx="10"
                      cy="10"
                      r="5"
                    ></circle>
                  </svg>
                </td>
                <td>
                  Constant
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that outputs a constant value.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="SUMMARY" height="20"></tf-graph-icon>
                </td>
                <td>
                  Summary
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that collects data for visualization within
                      TensorBoard.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <defs>
                      <marker
                        id="dataflow-arrowhead-legend"
                        fill="#bbb"
                        markerWidth="10"
                        markerHeight="10"
                        refX="9"
                        refY="5"
                        orient="auto-start-reverse"
                      >
                        <path d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"></path>
                      </marker>
                    </defs>
                    <path
                      marker-end="url(#dataflow-arrowhead-legend)"
                      stroke="#bbb"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                    ></path>
                  </svg>
                </td>
                <td>
                  Dataflow edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing the data flow between operations. Edges flow
                      upwards unless arrowheads specify otherwise.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <path
                      stroke="#bbb"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                      stroke-dasharray="2, 2"
                    ></path>
                  </svg>
                </td>
                <td>
                  Control dependency edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing the control dependency between operations.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <defs>
                      <marker
                        id="reference-arrowhead-legend"
                        fill="#FFB74D"
                        markerWidth="10"
                        markerHeight="10"
                        refX="9"
                        refY="5"
                        orient="auto-start-reverse"
                      >
                        <path d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"></path>
                      </marker>
                    </defs>
                    <path
                      marker-end="url(#reference-arrowhead-legend)"
                      stroke="#FFB74D"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                    ></path>
                  </svg>
                </td>
                <td>
                  Reference edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing that the outgoing operation node can mutate
                      the incoming tensor.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </iron-collapse>
    </div>
  `;E([A({type:Object,observer:"_statsChanged"}),w("design:type",Object)],Pn.prototype,"stats",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"devicesForStats",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Pn.prototype,"colorBy",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"colorByParams",void 0);E([A({type:Array,observer:"_datasetsChanged"}),w("design:type",Object)],Pn.prototype,"datasets",void 0);E([A({type:Object}),w("design:type",lo)],Pn.prototype,"renderHierarchy",void 0);E([A({type:Object,notify:!0,readOnly:!0,computed:"_computeSelection(datasets, _selectedRunIndex, _selectedTagIndex, _selectedGraphType)"}),w("design:type",Object)],Pn.prototype,"selection",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"selectedFile",void 0);E([A({type:Number,observer:"_selectedRunIndexChanged"}),w("design:type",Number)],Pn.prototype,"_selectedRunIndex",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"traceInputs",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"autoExtractNodes",void 0);E([A({type:Number,observer:"_selectedTagIndexChanged"}),w("design:type",Number)],Pn.prototype,"_selectedTagIndex",void 0);E([A({type:String}),w("design:type",String)],Pn.prototype,"_selectedGraphType",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Pn.prototype,"selectedNode",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"showSessionRunsDropdown",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"showUploadButton",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"healthPillsFeatureEnabled",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"healthPillsToggledOn",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"_legendOpened",void 0);E([Rt("devicesForStats"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentDevices",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentDeviceParams",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentXlaClusterParams",null);E([Rt("colorByParams","colorBy"),w("design:type",Object),w("design:paramtypes",[])],Pn.prototype,"_currentGradientParams",null);Pn=E([yt("tf-graph-controls")],Pn);function hur(e){if(e==="true")return!0;if(e==="false")return!1;if(e[0]==='"')return e.substring(1,e.length-1);let r=parseFloat(e);return isNaN(r)?e:r}function tce(e){return new Promise((t,r)=>{fetch(e).then(n=>{n.ok?n.arrayBuffer().then(t,r):n.text().then(r,r)})})}function ece(e,t){return Zse("Reading metadata pbtxt",40,()=>e==null?Promise.resolve(null):tce(e),t,jr.FETCH_METADATA_PBTXT_BYTES).then(r=>mH("Parsing metadata.pbtxt",60,()=>r!=null?gur(r):Promise.resolve(null),t,jr.PARSE_METADATA_PBTXT_INTO_OBJECT))}function rce(e,t,r){return mH("Reading graph pbtxt",40,()=>Ri(this,null,function*(){let n=Date.now();if(t){let o=yield new Promise(function(a,s){let l=new FileReader;l.onload=()=>a(l.result),l.onerror=()=>s(l.error),l.readAsArrayBuffer(t)});return Po({timingId:jr.FETCH_PBTXT_BYTES_FROM_FILESYSTEM,eventValue:Date.now()-n}),o}let i=yield tce(e);return Po({timingId:jr.FETCH_PBTXT_BYTES_FROM_SERVER,eventValue:Date.now()-n}),i}),r,jr.FETCH_PBTXT_BYTES).then(n=>mH("Parsing graph.pbtxt",60,()=>mur(n),r,jr.PARSE_PBTXT_INTO_OBJECT))}function fur(e,t,r=1e6,n=`
`){return new Promise(function(i,o){function a(s,l,c){let u=c>=e.byteLength,h=l.split(n);h[0]=s+h[0];let f=u?"":h.pop();for(let g of h)try{t(g)}catch(_){o(_);return}if(u){i(!0);return}let p=new Blob([e.slice(c,c+r)]),d=new FileReader;d.onload=function(g){a(f,g.target.result,c+r)},d.readAsText(p)}a("","",0)})}var pur={"library.function":!0,"library.function.node_def":!0,"library.function.node_def.input":!0,"library.function.node_def.attr":!0,"library.function.node_def.attr.value.list.b":!0,"library.function.node_def.attr.value.list.f":!0,"library.function.node_def.attr.value.list.func":!0,"library.function.node_def.attr.value.list.i":!0,"library.function.node_def.attr.value.list.s":!0,"library.function.node_def.attr.value.list.shape":!0,"library.function.node_def.attr.value.list.shape.dim":!0,"library.function.node_def.attr.value.list.tensor":!0,"library.function.node_def.attr.value.list.type":!0,"library.function.node_def.attr.value.shape.dim":!0,"library.function.node_def.attr.value.tensor.string_val":!0,"library.function.node_def.attr.value.tensor.tensor_shape.dim":!0,"library.function.signature.input_arg":!0,"library.function.signature.output_arg":!0,"library.versions":!0,node:!0,"node.input":!0,"node.attr":!0,"node.attr.value.list.b":!0,"node.attr.value.list.f":!0,"node.attr.value.list.func":!0,"node.attr.value.list.i":!0,"node.attr.value.list.s":!0,"node.attr.value.list.shape":!0,"node.attr.value.list.shape.dim":!0,"node.attr.value.list.tensor":!0,"node.attr.value.list.type":!0,"node.attr.value.shape.dim":!0,"node.attr.value.tensor.string_val":!0,"node.attr.value.tensor.tensor_shape.dim":!0},dur={"step_stats.dev_stats":!0,"step_stats.dev_stats.node_stats":!0,"step_stats.dev_stats.node_stats.output":!0,"step_stats.dev_stats.node_stats.memory":!0,"step_stats.dev_stats.node_stats.output.tensor_description.shape.dim":!0};function mur(e){return nce(e,pur)}function gur(e){return nce(e,dur).then(t=>t.step_stats)}function nce(e,t){let r={},n=[],i=[],o=r;function a(l){let c=l.indexOf(":"),u=l.substring(0,c).trim(),h=hur(l.substring(c+2).trim());return{name:u,value:h}}function s(l,c,u,h){let f=l[c];f==null?l[c]=h.join(".")in t?[u]:u:Array.isArray(f)?f.push(u):l[c]=[f,u]}return fur(e,function(l){if(l=l.trim(),!!l)switch(l[l.length-1]){case"{":let c=l.substring(0,l.length-2).trim(),u={};n.push(o),i.push(c),s(o,c,u,i),o=u;break;case"}":o=n.pop(),i.pop();break;default:let h=a(l);s(o,h.name,h.value,i.concat(h.name));break}}).then(function(){return r})}function oce(e,t,r,n=new Ju,i=r3){let o=JS(e,30,"Data"),a=JS(e,20,"Graph"),s=JS(e,50,"Namespace hierarchy"),l=Date.now();return rce(t,r,o).then(function(c){if(!c.node)throw new Error("The graph is empty. This can happen when TensorFlow could not trace any graph. Please refer to https://github.com/tensorflow/tensorboard/issues/1961 for more information.");return lle(c,sle,a)},()=>{throw new Error("Malformed GraphDef. This can sometimes be caused by a bad network connection or difficulty reconciling multiple GraphDefs; for the latter case, please refer to https://github.com/tensorflow/tensorboard/issues/1929.")}).then(c=>Ri(this,null,function*(){Zle(c,n);let u=yield bH(c,i,s);return Po({timingId:jr.GRAPH_LOAD_SUCCEEDED,eventValue:Date.now()-l}),{graph:c,graphHierarchy:u}})).catch(c=>{let u=`Graph visualization failed.

${c}`;throw e.reportError(u,c),Po({timingId:jr.GRAPH_LOAD_FAILED,eventValue:Date.now()-l}),c})}var Vs=class extends Gt(mt){constructor(){super(...arguments),this.compatibilityProvider=new Ju,this.hierarchyParams=r3,this._template=null}_selectionChanged(){!this.selection||this.debounce("selectionchange",()=>{this._load(this.selection)})}_load(t){let{run:r,tag:n,type:i}=t;switch(i){case Bs.OP_GRAPH:case Bs.CONCEPTUAL_GRAPH:{(function(){this._setOutStats(null)}).bind(this)();let o=new URLSearchParams;o.set("run",r),o.set("conceptual",String(i===Bs.CONCEPTUAL_GRAPH)),n&&o.set("tag",n);let a=_e().pluginRouteForSrc("graphs","/graph",o);return this._fetchAndConstructHierarchicalGraph(a).then(()=>{this._graphRunTag={run:r,tag:n}})}case Bs.PROFILE:{let{tags:o}=this.datasets.find(({name:f})=>f===r),s=o.find(f=>f.tag===n).opGraph?n:null;console.assert(o.find(f=>f.tag===s),`Required tag (${s}) is missing.`);let c=!this._graphRunTag||this._graphRunTag.run!==r||this._graphRunTag.tag!==s?this._load({run:r,tag:s,type:Bs.OP_GRAPH}):Promise.resolve(),u=new URLSearchParams;u.set("tag",n),u.set("run",r);let h=_e().pluginRouteForSrc("graphs","/run_metadata",u);return c.then(()=>this._readAndParseMetadata(h))}default:return Promise.reject(new Error(`Unknown selection type: ${i}`))}}_readAndParseMetadata(t){this.set("progress",{value:0,msg:""});var r=nP(this);ece(t,r).then(function(n){this._setOutStats(n)}.bind(this))}_fetchAndConstructHierarchicalGraph(t,r){this.set("progress",{value:0,msg:""});let n=nP(this);return oce(n,t,r!==void 0?r:null,this.compatibilityProvider,this.hierarchyParams).then(function({graph:i,graphHierarchy:o}){this._setOutGraph(i),this._setOutGraphHierarchy(o)}.bind(this))}_selectedFileChanged(){var i;var t=this.selectedFile;if(!t)return;let r=t.target,n=(i=r.files)==null?void 0:i[0];!n||(r.value="",this._fetchAndConstructHierarchicalGraph(null,n))}};E([A({type:Array}),w("design:type",Array)],Vs.prototype,"datasets",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Vs.prototype,"progress",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"selection",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"selectedFile",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"compatibilityProvider",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"hierarchyParams",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",as)],Vs.prototype,"outGraphHierarchy",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Xu)],Vs.prototype,"outGraph",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Object)],Vs.prototype,"outStats",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"_graphRunTag",void 0);E([Bt("selection","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vs.prototype,"_selectionChanged",null);E([Bt("selectedFile","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vs.prototype,"_selectedFileChanged",null);Vs=E([yt("tf-graph-dashboard-loader")],Vs);var ace="run";var Or=class extends Gt(mt){constructor(){super(...arguments),this._datasets=[],this._datasetsFetched=!1,this._selectedDataset=0,this._requestManager=new Ae,this._canceller=new an,this.specificHealthPillStep=0,this.healthPillsToggledOn=!1,this._debuggerNumericAlerts=[],this._nodeNamesToHealthPills={},this._healthPillRequestId=1,this._healthPillStepRequestTimerDelay=500,this.run=v_(ace,{defaultValue:"",useLocalStorage:!1}).call(this),this._runObserver=x_(ace,{defaultValue:"",polymerProperty:"run",useLocalStorage:!1})}attached(){this.set("_isAttached",!0)}detached(){this.set("_isAttached",!1)}ready(){super.ready(),this.addEventListener("node-toggle-expand",this._handleNodeToggleExpand.bind(this))}reload(){this._debuggerDataEnabled||this._requestManager.request(_e().pluginsListing()).then(this._canceller.cancellable(t=>{t.cancelled||t.value.debugger&&this.set("_debuggerDataEnabled",!0)})),this._maybeFetchHealthPills()}_fit(){this.$$("#graphboard").fit()}_onDownloadImageRequested(t){this.$$("#graphboard").downloadAsImage(t.detail)}_getGraphDisplayClassName(t,r){return t||r.length?"":"no-graph"}_fetchDataset(){return this._requestManager.request(_e().pluginRoute("graphs","/info"))}_fetchHealthPills(t,r){let n={node_names:JSON.stringify(t),run:"__debugger_data__"};r!==void 0&&(n.step=r);let i=_e().pluginRoute("debugger","/health_pills");return this._requestManager.request(i,n)}_fetchDebuggerNumericsAlerts(){return this._requestManager.request(_e().pluginRoute("debugger","/numerics_alert_report"))}_graphUrl(t,r,n){return _e().pluginRouteForSrc("graphs","/graph",new URLSearchParams({run:t,limit_attr_size:r,large_attrs_key:n}))}_shouldRequestHealthPills(){return this._debuggerDataEnabled&&this.healthPillsToggledOn&&this._renderHierarchy&&this._datasetsState(this._datasetsFetched,this._datasets,"PRESENT")}_maybeInitializeDashboard(){var t=this._isAttached;this._initialized||!t||(this.set("_compatibilityProvider",new Ju),this._initialized=!0,this._fetchDataset().then(r=>{let n=Object.keys(r);this._datasets=n.sort(bh).map(i=>{let o=r[i],s=Object.keys(o.tags).sort(bh).map(c=>o.tags[c]).map(({tag:c,conceptual_graph:u,op_graph:h,profile:f})=>({tag:c,displayName:c,conceptualGraph:u,opGraph:h,profile:f})),l=o.run_graph?[{tag:null,displayName:"Default",conceptualGraph:!1,opGraph:!0,profile:!1},...s]:s;return{name:i,tags:l}}),this._datasetsFetched=!0}))}_determineSelectedDataset(){var t=this._datasetsFetched,r=this._datasets,n=this.run;if(!n){this.set("_selectedDataset",0);return}let i=r.findIndex(o=>o.name===n);if(i===-1){if(t){let o=this.$$("#error-dialog");o.textContent=`No dataset named "${n}" could be found.`,o.open()}return}this.set("_selectedDataset",i)}_updateSelectedDatasetName(){var t=this._datasetsFetched,r=this._datasets,n=this._selectedDataset;!t||r.length<=n||this.set("run",r[n].name)}_requestHealthPills(){this.set("_areHealthPillsLoading",!0);var t=++this._healthPillRequestId;this._healthPillStepRequestTimerId!==null&&(window.clearTimeout(this._healthPillStepRequestTimerId),this._healthPillStepRequestTimerId=null),this.allStepsModeEnabled?this._healthPillStepRequestTimerId=setTimeout(function(){this._healthPillStepRequestTimerId=null,this._initiateNetworkRequestForHealthPills(t)}.bind(this),this._healthPillStepRequestTimerDelay):this._initiateNetworkRequestForHealthPills(t)}_initiateNetworkRequestForHealthPills(t){if(this._healthPillRequestId!==t)return;let r=this.allStepsModeEnabled?this.specificHealthPillStep:void 0,n=this._fetchHealthPills(this._renderHierarchy.getNamesOfRenderedOps(),r),i=this._fetchDebuggerNumericsAlerts();Promise.all([n,i]).then(function(o){var a=o[0],s=o[1];if(!!this.healthPillsToggledOn&&t===this._healthPillRequestId){for(var l in a){this.set("_healthPillStepIndex",a[l].length-1);break}this.set("_debuggerNumericAlerts",s),this.set("_nodeNamesToHealthPills",a),this.set("_areHealthPillsLoading",!1),this.set("_healthPillStepRequestTimerId",null)}}.bind(this))}_datasetsState(t,r,n){return t?!r||!r.length?n==="EMPTY":n==="PRESENT":n==="NOT_LOADED"}_renderHierarchyChanged(t){this.reload()}_handleNodeToggleExpand(){this._maybeFetchHealthPills()}_healthPillsToggledOnChanged(t){t?this.reload():this.set("_nodeNamesToHealthPills",{})}_maybeFetchHealthPills(){!this._shouldRequestHealthPills()||this._requestHealthPills()}};Or.template=Q`
    <paper-dialog id="error-dialog" with-backdrop></paper-dialog>
    <tf-dashboard-layout>
      <tf-graph-controls
        id="controls"
        class="sidebar"
        slot="sidebar"
        devices-for-stats="{{_devicesForStats}}"
        color-by-params="[[_colorByParams]]"
        stats="[[_stats]]"
        color-by="{{_colorBy}}"
        datasets="[[_datasets]]"
        render-hierarchy="[[_renderHierarchy]]"
        selection="{{_selection}}"
        selected-file="{{_selectedFile}}"
        selected-node="{{_selectedNode}}"
        health-pills-feature-enabled="[[_debuggerDataEnabled]]"
        health-pills-toggled-on="{{healthPillsToggledOn}}"
        on-fit-tap="_fit"
        trace-inputs="{{_traceInputs}}"
        auto-extract-nodes="{{_autoExtractNodes}}"
        on-download-image-requested="_onDownloadImageRequested"
      ></tf-graph-controls>
      <div
        class$="center [[_getGraphDisplayClassName(_selectedFile, _datasets)]]"
        slot="center"
      >
        <tf-graph-dashboard-loader
          id="loader"
          datasets="[[_datasets]]"
          selection="[[_selection]]"
          selected-file="[[_selectedFile]]"
          out-graph-hierarchy="{{_graphHierarchy}}"
          out-graph="{{_graph}}"
          out-stats="{{_stats}}"
          progress="{{_progress}}"
          hierarchy-params="[[_hierarchyParams]]"
          compatibility-provider="[[_compatibilityProvider]]"
        ></tf-graph-dashboard-loader>
        <div class="no-data-message">
          <h3>No graph definition files were found.</h3>
          <p>
            To store a graph, create a
            <code>tf.summary.FileWriter</code>
            and pass the graph either via the constructor, or by calling its
            <code>add_graph()</code> method. You may want to check out the
            <a href="https://www.tensorflow.org/tensorboard/graphs"
              >examining the TensorFlow graph tutorial</a
            >.
          </p>

          <p>
            If you’re new to using TensorBoard, and want to find out how to add
            data and set up your event files, check out the
            <a
              href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
              >README</a
            >
            and perhaps the
            <a
              href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
              >TensorBoard tutorial</a
            >.
          </p>

          <p>
            If you think TensorBoard is configured properly, please see
            <a
              href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
              >the section of the README devoted to missing data problems</a
            >
            and consider filing an issue on GitHub.
          </p>
        </div>
        <div class="graphboard">
          <tf-graph-board
            id="graphboard"
            devices-for-stats="[[_devicesForStats]]"
            color-by="{{_colorBy}}"
            color-by-params="{{_colorByParams}}"
            graph-hierarchy="[[_graphHierarchy]]"
            graph="[[_graph]]"
            hierarchy-params="[[_hierarchyParams]]"
            progress="[[_progress]]"
            debugger-data-enabled="[[_debuggerDataEnabled]]"
            are-health-pills-loading="[[_areHealthPillsLoading]]"
            debugger-numeric-alerts="[[_debuggerNumericAlerts]]"
            node-names-to-health-pills="[[_nodeNamesToHealthPills]]"
            all-steps-mode-enabled="{{allStepsModeEnabled}}"
            specific-health-pill-step="{{specificHealthPillStep}}"
            health-pill-step-index="[[_healthPillStepIndex]]"
            render-hierarchy="{{_renderHierarchy}}"
            selected-node="{{_selectedNode}}"
            stats="[[_stats]]"
            trace-inputs="[[_traceInputs]]"
            auto-extract-nodes="[[_autoExtractNodes]]"
          ></tf-graph-board>
        </div>
      </div>
    </tf-dashboard-layout>
    <style>
      :host /deep/ {
        font-family: 'Roboto', sans-serif;
      }

      .sidebar {
        display: flex;
        height: 100%;
      }

      .center {
        position: relative;
        height: 100%;
      }

      paper-dialog {
        padding: 20px;
      }

      .no-data-message {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      .graphboard {
        height: 100%;
      }

      .no-graph .graphboard {
        display: none;
      }

      .center:not(.no-graph) .no-data-message {
        display: none;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],Or.prototype,"_datasets",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_datasetsFetched",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_selectedDataset",void 0);E([A({type:Object,observer:"_renderHierarchyChanged"}),w("design:type",lo)],Or.prototype,"_renderHierarchy",void 0);E([A({type:Object}),w("design:type",Ae)],Or.prototype,"_requestManager",void 0);E([A({type:Object}),w("design:type",an)],Or.prototype,"_canceller",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_debuggerDataEnabled",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"allStepsModeEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"specificHealthPillStep",void 0);E([A({type:Boolean,observer:"_healthPillsToggledOnChanged"}),w("design:type",Boolean)],Or.prototype,"healthPillsToggledOn",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Or.prototype,"selectedNode",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_isAttached",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_initialized",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_areHealthPillsLoading",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],Or.prototype,"_debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillStepIndex",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillRequestId",void 0);E([A({type:Number}),w("design:type",Object)],Or.prototype,"_healthPillStepRequestTimerId",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillStepRequestTimerDelay",void 0);E([A({type:Array}),w("design:type",Array)],Or.prototype,"runs",void 0);E([A({type:String,notify:!0,observer:"_runObserver"}),w("design:type",String)],Or.prototype,"run",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_selection",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_compatibilityProvider",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_autoExtractNodes",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_selectedFile",void 0);E([Bt("_isAttached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_maybeInitializeDashboard",null);E([Bt("_datasetsFetched","_datasets","run"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_determineSelectedDataset",null);E([Bt("_datasetsFetched","_datasets","_selectedDataset"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_updateSelectedDatasetName",null);Or=E([yt("tf-graph-dashboard")],Or);var NH=Ee(Oe(),1);var kr=Vr,Ea=class extends Gt(_o(mt)){constructor(){super(...arguments),this.mode="offset",this.timeProperty="step",this.bins="bins",this.x="x",this.dx="dx",this.y="y",this.colorScale=kr.scaleOrdinal(kr.schemeCategory10),this.modeTransitionDuration=500,this._name=null,this._data=null}ready(){super.ready(),this.scopeSubtree(this.$.svg,!0)}attached(){this._attached=!0}detached(){this._attached=!1}setSeriesData(t,r){this._name=t,this._data=r,this.redraw()}_redrawOnChange(){this.redraw()}redraw(){this._draw(0)}_modeRedraw(){this._draw(this.modeTransitionDuration)}_draw(t){if(!this._attached||!this._data)return;if(t===void 0)throw new Error("vz-histogram-timeseries _draw needs duration");if(this._data.length<=0)throw new Error("Not enough steps in the data");if(!this._data[0].hasOwnProperty(this.bins))throw new Error("No bins property of '"+this.bins+"' in data");if(this._data[0][this.bins].length<=0)throw new Error("Must have at least one bin in bins in data");if(!this._data[0][this.bins][0].hasOwnProperty(this.x))throw new Error("No x property '"+this.x+"' on bins data");if(!this._data[0][this.bins][0].hasOwnProperty(this.dx))throw new Error("No dx property '"+this.dx+"' on bins data");if(!this._data[0][this.bins][0].hasOwnProperty(this.y))throw new Error("No y property '"+this.y+"' on bins data");var r=this.timeProperty,n=this.x,i=this.bins,o=this.dx,a=this.y,s=this._data,l=this._name,c=this.mode,u=kr.hcl(this.colorScale(l)),h=kr.select(this.$.tooltip),f=function(Nt){return Nt[n]},p=function(Nt){return Nt[a]},d=function(Nt){return Nt[o]},g=function(Nt){return Nt[n]+Nt[o]},_=function(Nt){return Nt[r]};r==="relative"&&(_=function(Nt){return Nt.wall_time-s[0].wall_time});var y=this.$.svg.getBoundingClientRect(),x=y.width,b=y.height,S,C={top:5,right:60,bottom:20,left:24};c==="offset"?(S=b/2.5,C.top=S+5):S=b-C.top-C.bottom;var P=x-C.left-C.right,k=b-C.top-C.bottom,O=kr.min(s,f),D=kr.max(s,g),B=kr.format(".3n"),I=kr.format(".0f");r==="wall_time"?I=kr.timeFormat("%m/%d %X"):r==="relative"&&(I=function(Nt){return kr.format(".1r")(Nt/36e5)+"h"});var L=s.map(function(Nt,ze){return[kr.min(Nt[i],f),kr.max(Nt[i],g)]}),R=s.map(function(Nt){return kr.extent(Nt[i],p)}),F=500,z=kr.extent(s,_),U=(r==="wall_time"?kr.scaleTime():kr.scaleLinear()).domain(z).range([0,c==="offset"?k:0]),W=kr.scaleLinear().domain([0,kr.max(s,function(Nt,ze){return R[ze][1]})]).range([S,0]),Z=kr.scaleLinear().domain(W.domain()).range([F,0]),rt=kr.scaleLinear().domain([kr.min(s,function(Nt,ze){return L[ze][0]}),kr.max(s,function(Nt,ze){return L[ze][1]})]).nice().range([0,P]),ot=kr.scaleLinear().domain(rt.domain()).range([0,F]);let st=kr.scaleLinear().domain(kr.extent(s,_)).range([u.brighter(),u.darker()]).interpolate(kr.interpolateHcl);var St=kr.axisBottom(rt).ticks(Math.max(2,P/20)),bt=kr.axisRight(U).ticks(Math.max(2,k/15)).tickFormat(I),Mt=kr.axisRight(W).ticks(Math.max(2,k/15)).tickSize(P+5).tickFormat(B),lt=function(Nt){return Nt[n]+Nt[o]/2},Kt=kr.line().x(function(Nt){return ot(lt(Nt))}).y(function(Nt){return Z(Nt[a])}),_t=function(Nt){return"M"+ot(lt(Nt[0]))+","+Z(0)+"L"+Kt(Nt).slice(1)+"L"+ot(lt(Nt[Nt.length-1]))+","+Z(0)},ct=this.$.svg,X=kr.select(ct),et=X.transition().duration(t),dt=X.select("g").classed("small",function(){return P>0&&P<=150}).classed("medium",function(){return P>150&&P<=300}).classed("large",function(){return P>300}),q=et.select("g").attr("transform","translate("+C.left+","+C.top+")"),pt=kr.bisector(g).left,ht=dt.select(".stage").on("mouseover",function(){Tt.style("opacity",1),Ct.style("opacity",1),at.style("opacity",1),Ce.style("opacity",1),h.style("opacity",1)}).on("mouseout",function(){Tt.style("opacity",0),Ct.style("opacity",0),at.style("opacity",0),Ce.style("opacity",0),Tt.classed("hover-closest",!1),It.classed("outline-hover",!1),h.style("opacity",0)}).on("mousemove",Pt),wt=ht.select(".background").attr("transform","translate("+-C.left+","+-C.top+")").attr("width",x).attr("height",b),kt=ht.selectAll(".histogram").data(s),ie=kt.exit().remove(),ee=kt.enter().append("g").attr("class","histogram"),Le=ee.merge(kt).sort(function(Nt,ze){return _(Nt)-_(ze)}),ar=q.selectAll(".histogram").attr("transform",function(Nt){return"translate(0, "+(c==="offset"?U(_(Nt))-S:0)+")"}),fr=ee.append("line").attr("class","baseline"),tt=ar.select(".baseline").style("stroke-opacity",function(Nt){return c==="offset"?.1:0}).attr("y1",S).attr("y2",S).attr("x2",P),$=ee.append("path").attr("class","outline"),It=Le.select(".outline").attr("vector-effect","non-scaling-stroke").attr("d",function(Nt){return _t(Nt[i])}).style("stroke-width",1),$t=ar.select(".outline").attr("transform","scale("+P/F+", "+S/F+")").style("stroke",function(Nt){return c==="offset"?"":st(_(Nt))}).style("fill-opacity",function(Nt){return c==="offset"?1:0}).style("fill",function(Nt){return st(_(Nt))}),he=ee.append("g").attr("class","hover"),Tt=Le.select(".hover").style("fill",function(Nt){return st(_(Nt))});he.append("circle").attr("r",2),he.append("text").style("display","none").attr("dx",4);var be=dt.select(".x-axis-hover").selectAll(".label").data(["x"]),nt=be.enter().append("g").attr("class","label"),Ct=be.merge(nt);nt.append("rect").attr("x",-20).attr("y",6).attr("width",40).attr("height",14),nt.append("line").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",6),nt.append("text").attr("dy",18);var Wt=dt.select(".y-axis-hover").selectAll(".label").data(["y"]),fe=Wt.enter().append("g").attr("class","label"),at=Wt.merge(fe);fe.append("rect").attr("x",8).attr("y",-6).attr("width",40).attr("height",14),fe.append("line").attr("x1",0).attr("x2",6).attr("y1",0).attr("y2",0),fe.append("text").attr("dx",8).attr("dy",4);var se=dt.select(".y-slice-axis-hover").selectAll(".label").data(["y"]),Qt=se.enter().append("g").attr("class","label"),Ce=se.merge(Qt);Qt.append("rect").attr("x",8).attr("y",-6).attr("width",40).attr("height",14),Qt.append("line").attr("x1",0).attr("x2",6).attr("y1",0).attr("y2",0),Qt.append("text").attr("dx",8).attr("dy",4),q.select(".y.axis.slice").style("opacity",c==="offset"?0:1).attr("transform","translate(0, "+(c==="offset"?-S:0)+")").call(Mt),q.select(".x.axis").attr("transform","translate(0, "+k+")").call(St),q.select(".y.axis").style("opacity",c==="offset"?1:0).attr("transform","translate("+P+", "+(c==="offset"?0:k)+")").call(bt),q.selectAll(".tick text").attr("fill","#aaa"),q.selectAll(".axis path.domain").attr("stroke","none");function Pt(){var Nt=kr.mouse(this),ze=rt.invert(Nt[0]),yn=U.invert(Nt[1]);function Wi(cn){return Math.min(cn[i].length-1,pt(cn[i],ze))}var Ar,Ia=1/0,ho;Tt.attr("transform",function(cn,ux){var np=Wi(cn);ho=cn;var K=rt(cn[i][np][n]+cn[i][np][o]/2),gt=W(cn[i][np][a]),Et=c==="offset"?U(_(cn))-(S-gt):gt,xt=Math.abs(Nt[1]-Et);return xt<Ia&&(Ia=xt,Ar=cn),"translate("+K+","+gt+")"}),Tt.select("text").text(function(cn){var ux=Wi(cn);return cn[i][ux][a]}),Tt.classed("hover-closest",function(cn){return cn===Ar}),It.classed("outline-hover",function(cn){return cn===Ar});var La=Wi(ho);Ct.attr("transform",function(cn){return"translate("+rt(ho[i][La][n]+ho[i][La][o]/2)+", "+k+")"}).select("text").text(function(cn){return B(ho[i][La][n]+ho[i][La][o]/2)});var cx=bt.tickFormat();at.attr("transform",function(cn){return"translate("+P+", "+(c==="offset"?U(_(Ar)):0)+")"}).style("display",c==="offset"?"":"none").select("text").text(function(cn){return cx(_(Ar))});var um=Mt.tickFormat();Ce.attr("transform",function(cn){return"translate("+P+", "+(c==="offset"?0:W(Ar[i][La][a]))+")"}).style("display",c==="offset"?"none":"").select("text").text(function(cn){return um(Ar[i][La][a])});var Q0=kr.mouse(ct);h.style("transform","translate("+(Q0[0]+15)+"px,"+(Q0[1]-15)+"px)").select("span").text(c==="offset"?um(Ar[i][La][a]):(r==="step"?"step ":"")+cx(_(Ar)))}}};Ea.template=Q`
    <div id="tooltip"><span></span></div>
    <svg id="svg">
      <g>
        <g class="axis x"></g>
        <g class="axis y"></g>
        <g class="axis y slice"></g>
        <g class="stage">
          <rect class="background"></rect>
        </g>
        <g class="x-axis-hover"></g>
        <g class="y-axis-hover"></g>
        <g class="y-slice-axis-hover"></g>
      </g>
    </svg>

    <style>
      :host {
        color: #aaa;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        position: relative;
        --vz-histogram-timeseries-hover-bg-color: #fff;
        --vz-histogram-timeseries-outline-color: #fff;
        --vz-histogram-timeseries-hover-outline-color: #000;
      }

      :host(.dark-mode) {
        --vz-histogram-timeseries-hover-bg-color: var(
          --primary-background-color
        );
        --vz-histogram-timeseries-outline-color: var(--paper-grey-600);
        --vz-histogram-timeseries-hover-outline-color: #fff;
      }

      svg {
        font-family: roboto, sans-serif;
        overflow: visible;
        display: block;
        width: 100%;
        flex-grow: 1;
        flex-shrink: 1;
      }

      text {
        fill: currentColor;
      }

      #tooltip {
        position: absolute;
        display: block;
        opacity: 0;
        font-weight: bold;
        font-size: 11px;
      }

      .background {
        fill-opacity: 0;
        fill: red;
      }

      .histogram {
        pointer-events: none;
      }

      .hover {
        font-size: 9px;
        dominant-baseline: middle;
        opacity: 0;
      }

      .hover circle {
        stroke: white;
        stroke-opacity: 0.5;
        stroke-width: 1px;
      }

      .hover text {
        fill: black;
        opacity: 0;
      }

      .hover.hover-closest circle {
        fill: var(--vz-histogram-timeseries-hover-outline-color) !important;
      }

      .hover.hover-closest text {
        opacity: 1;
      }

      .baseline {
        stroke: black;
        stroke-opacity: 0.1;
      }

      .outline {
        fill: none;
        stroke: var(--vz-histogram-timeseries-outline-color);
        stroke-opacity: 0.5;
      }

      .outline.outline-hover {
        stroke: var(--vz-histogram-timeseries-hover-outline-color) !important;
        stroke-opacity: 1;
      }

      .x-axis-hover,
      .y-axis-hover,
      .y-slice-axis-hover {
        pointer-events: none;
      }

      .x-axis-hover .label,
      .y-axis-hover .label,
      .y-slice-axis-hover .label {
        opacity: 0;
        font-weight: bold;
        font-size: 11px;
        text-anchor: end;
      }

      .x-axis-hover text {
        text-anchor: middle;
      }

      .y-axis-hover text,
      .y-slice-axis-hover text {
        text-anchor: start;
      }

      .x-axis-hover line,
      .y-axis-hover line,
      .y-slice-axis-hover line {
        stroke: currentColor;
      }

      .x-axis-hover rect,
      .y-axis-hover rect,
      .y-slice-axis-hover rect {
        fill: var(--vz-histogram-timeseries-hover-bg-color);
      }

      #tooltip,
      .x-axis-hover text,
      .y-axis-hover text,
      .y-slice-axis-hover text {
        color: var(--vz-histogram-timeseries-hover-outline-color);
      }

      .axis {
        font-size: 11px;
      }

      .axis path.domain {
        fill: none;
      }

      .axis .tick line {
        stroke: #ddd;
      }

      .axis.slice {
        opacity: 0;
      }

      .axis.slice .tick line {
        stroke-dasharray: 2;
      }

      .small .axis text {
        display: none;
      }
      .small .axis .tick:first-of-type text {
        display: block;
      }
      .small .axis .tick:last-of-type text {
        display: block;
      }
      .medium .axis text {
        display: none;
      }
      .medium .axis .tick:nth-child(2n + 1) text {
        display: block;
      }
      .large .axis text {
        display: none;
      }
      .large .axis .tick:nth-child(2n + 1) text {
        display: block;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Ea.prototype,"mode",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"timeProperty",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"bins",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"x",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"dx",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"y",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"colorScale",void 0);E([A({type:Number}),w("design:type",Number)],Ea.prototype,"modeTransitionDuration",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ea.prototype,"_attached",void 0);E([A({type:String}),w("design:type",Object)],Ea.prototype,"_name",void 0);E([A({type:Array}),w("design:type",Object)],Ea.prototype,"_data",void 0);E([Bt("timeProperty","colorScale","_attached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_redrawOnChange",null);E([Bt("mode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_modeRedraw",null);Ea=E([yt("vz-histogram-timeseries")],Ea);function yur(e){let[t,r,n]=e;return{wall_time:t,step:r,min:km(n.map(([i,,])=>i)),max:lu(n.map(([,i])=>i)),buckets:n.map(([i,o,a])=>({left:i,right:o,count:a}))}}function vur(e,t,r,n=30){(t===void 0||r==null)&&(t=0,r=0),r===t&&(r=t*1.1+1,t=t/1.1-1);let i=(r-t)/n,o=0,a=[];for(let s=0;s<n;s++){let l=t+s*i,c=l+i,u=0;for(;o<e.buckets.length;){let h=Math.min(r,e.buckets[o].right),f=Math.max(t,e.buckets[o].left);if(h-f>0){let d=Math.min(h,c)-Math.max(f,l),g=d/(h-f)*e.buckets[o].count;u+=d>0?g:0}else{let d=c>=r;u+=l<=f&&(d?h<=c:h<c)?e.buckets[o].count:0}if(h>c)break;o++}a.push({x:l,dx:i,y:u})}return a}function sce(e){let t=e.map(yur),r=km(t,i=>i.min),n=lu(t,i=>i.max);return t.map(i=>({wall_time:i.wall_time,step:i.step,bins:vur(i,r,n)}))}var Ta=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=_e().pluginRoute("histograms","/histograms");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this.loadDataCallback=(t,r,n)=>{let i=sce(n),o=this.getDataLoadName(r);this.$.chart.setSeriesData(o,i)},this._colorScaleFunction=fn,this._expanded=!1}_reloadOnRunTagRequestManagerChange(){this.reload()}_updateDataToLoad(){var t=this.run,r=this.tag;this.dataToLoad=[{run:t,tag:r}]}get _runColor(){var t=this.run;return this._colorScaleFunction(t)}redraw(){this.$.chart.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}};Ta.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    ></tf-card-heading>
    <!--
      The main histogram that we render. Data is set directly with
      \`setSeriesData\`, not with a bound property.
    -->
    <vz-histogram-timeseries
      id="chart"
      time-property="[[timeProperty]]"
      mode="[[histogramMode]]"
      color-scale="[[_colorScaleFunction]]"
    ></vz-histogram-timeseries>
    <div style="display: flex; flex-direction: row;">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
    </div>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 330px;
        height: 235px;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      :host([_expanded]) {
        width: 700px;
        height: 500px;
      }

      vz-histogram-timeseries {
        -moz-user-select: none;
        -webkit-user-select: none;
        will-change: transform;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }

      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      tf-card-heading {
        margin-bottom: 10px;
        width: 90%;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Ta.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Ta.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],Ta.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Ae)],Ta.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",Object)],Ta.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],Ta.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],Ta.prototype,"timeProperty",void 0);E([A({type:String}),w("design:type",String)],Ta.prototype,"histogramMode",void 0);E([A({type:Object}),w("design:type",Function)],Ta.prototype,"_colorScaleFunction",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Ta.prototype,"_expanded",void 0);E([Bt("run","tag","requestManager"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ta.prototype,"_reloadOnRunTagRequestManagerChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ta.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Ta.prototype,"_runColor",null);Ta=E([yt("tf-histogram-loader")],Ta);var cs=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._histogramMode="offset",this._timeProperty="step",this._restamp=!1,this._requestManager=new Ae}_redrawCategoryPane(t,r){!r||t.target.querySelectorAll("tf-histogram-loader").forEach(n=>n.redraw())}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadHistograms()})}_fetchTags(){let t=_e().pluginRoute("histograms","/tags");return this._requestManager.request(t).then(r=>{if(NH.isEqual(r,this._runToTagInfo))return;let n=NH.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTag",n),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadHistograms(){var t;(t=this.root)==null||t.querySelectorAll("tf-histogram-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;return Ql(t,r,n)}_tagMetadata(t,r,n){return t[r][n]}};cs.template=Q`
    <tf-dashboard-layout>
      <div slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="histogramModeSelector"
              name="Histogram mode"
              selected-id="{{_histogramMode}}"
            >
              <paper-button id="overlay">overlay</paper-button>
              <paper-button id="offset">offset</paper-button>
            </tf-option-selector>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="timePropertySelector"
              name="Offset time axis"
              selected-id="{{_timeProperty}}"
            >
              <paper-button id="step">step</paper-button>
              <paper-button id="relative">relative</paper-button>
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No histogram data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any histogram data to your event files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-histogram-loader
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  active="[[active]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  time-property="[[_timeProperty]]"
                  histogram-mode="[[_histogramMode]]"
                  request-manager="[[_requestManager]]"
                ></tf-histogram-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],cs.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],cs.prototype,"_histogramMode",void 0);E([A({type:String}),w("design:type",String)],cs.prototype,"_timeProperty",void 0);E([A({type:Array}),w("design:type",Array)],cs.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],cs.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],cs.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],cs.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],cs.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],cs.prototype,"_restamp",void 0);E([A({type:Boolean}),w("design:type",Boolean)],cs.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],cs.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],cs.prototype,"_categories",null);cs=E([yt("tf-histogram-dashboard")],cs);var u3=class{constructor(t,r=!0){this._requestManager=t,this._useHttpGet=r}getExperiment(t){return this._sendRequest("/experiment",t)}getDownloadUrl(t,r,n){return _e().pluginRouteForSrc("hparams","/download_data",new URLSearchParams({format:t,columnsVisibility:JSON.stringify(n),request:JSON.stringify(r)}))}listSessionGroups(t){return this._sendRequest("/session_groups",t)}listMetricEvals(t){return this._sendRequest("/metric_evals",t)}_sendRequest(t,r){if(this._useHttpGet){let o=_e().pluginRoute("hparams",t,new URLSearchParams({request:JSON.stringify(r)}));return this._requestManager.request(o)}let n=new Ux;n.withCredentials=!0,n.methodType=Pm.POST,n.contentType="text/plain",n.body=JSON.stringify(r);let i=_e().pluginRoute("hparams",t);return this._requestManager.requestWithOptions(i,n)}};var _ce=Ee(Oe(),1);var DH=class extends mt{constructor(){super(...arguments),this.orientation="horizontal"}};DH.template=Q`
    <slot name="content"></slot>

    <style>
      :host {
        display: block;
      }

      :host slot {
        display: flex;
        height: 100%;
        width: 100%;
      }

      :host ::slotted(*) {
        flex: 0 0 auto;
      }

      :host([orientation='horizontal']) slot {
        flex-direction: row;
        overflow-x: auto;
      }

      :host([orientation='vertical']) slot {
        flex-direction: column;
        overflow-y: auto;
      }

      :host ::slotted(*:not(:last-child)) {
        border: 0 solid var(--divider-color, #ccc);
      }

      :host([orientation='vertical']) ::slotted(*:not(:last-child)) {
        border-bottom-width: 5px;
      }

      :host([orientation='horizontal']) ::slotted(*:not(:last-child)) {
        border-right-width: 5px;
      }
    </style>
  `;E([A({type:String,reflectToAttribute:!0}),w("design:type",String)],DH.prototype,"orientation",void 0);DH=E([yt("hparams-split-layout")],DH);var us={};Zs(us,{columnValueByIndex:()=>b0,columnValueByVisibleIndex:()=>BH,euclideanDist:()=>h3,filterSet:()=>Pur,getAbsoluteColumnIndex:()=>zH,hashOfString:()=>dct,hparamName:()=>Bd,hparamValueByIndex:()=>hce,hparamValueByName:()=>uce,hparamValueByVisibleIndex:()=>mce,isNullOrUndefined:()=>Tur,l2NormSquared:()=>p3,metricName:()=>Qu,metricValueByIndex:()=>fce,metricValueByName:()=>f3,metricValueByVisibleIndex:()=>FH,numColumns:()=>uct,numHParams:()=>lce,numMetrics:()=>cce,numVisibleColumns:()=>wur,numVisibleHParams:()=>pce,numVisibleMetrics:()=>dce,numericColumnExtent:()=>hct,pointToRectangleDist:()=>gce,prettyPrint:()=>w0,prettyPrintHParamValueByName:()=>Sur,prettyPrintMetricValueByName:()=>Mur,quadTreeVisitPointsInDisk:()=>Aur,quadTreeVisitPointsInRect:()=>Cur,rotateStr:()=>Eur,schemaColumnName:()=>cct,schemaVisibleColumnName:()=>bur,sessionGroupWithName:()=>fct,setArrayObservably:()=>pct,translateStr:()=>yP,visibleNumericColumnExtent:()=>_P});var OH=Ee(Oe(),1);function Bd(e){return e.displayName!==""&&e.displayName!==void 0?e.displayName:e.name}function Qu(e){if(e.displayName!==""&&e.displayName!==void 0)return e.displayName;let t=e.name.group,r=e.name.tag;return t===void 0&&(t=""),r===void 0&&(r=""),t===""||t==="."?r:t+"."+r}function cct(e,t){if(t<e.hparamColumns.length)return Bd(e.hparamColumns[t].hparamInfo);let r=t-e.hparamColumns.length;return Qu(e.metricColumns[r].metricInfo)}function lce(e){return e.hparamColumns.length}function cce(e){return e.metricColumns.length}function uct(e){return lce(e)+cce(e)}function uce(e,t){return e[t]}function f3(e,t){return e.find(r=>OH.isEqual(r.name,t))}function hce(e,t,r){return t.hparams[e.hparamColumns[r].hparamInfo.name]}function fce(e,t,r){let n=e.metricColumns[r].metricInfo.name,i=f3(t.metricValues,n);return i===void 0||i.value==="NaN"?void 0:i.value}function b0(e,t,r){return r<e.hparamColumns.length?hce(e,t,r):fce(e,t,r-e.hparamColumns.length)}function hct(e,t,r){return sa(t,n=>b0(e,n,r))}function zH(e,t,r){let n;if(r<t.hparamInfos.length)n=e.hparamColumns.findIndex(i=>i.hparamInfo.name===t.hparamInfos[r].name);else{let i=r-t.hparamInfos.length,o=t.metricInfos[i].name;n=e.hparamColumns.length+e.metricColumns.findIndex(a=>a.metricInfo.name===o)}return console.assert(n!==-1),n}function bur(e,t){if(t<e.hparamInfos.length)return Bd(e.hparamInfos[t]);let r=t-e.hparamInfos.length;return Qu(e.metricInfos[r])}function pce(e){return e.hparamInfos.length}function dce(e){return e.metricInfos.length}function wur(e){return pce(e)+dce(e)}function _P(e,t,r){return sa(t,n=>BH(e,n,r))}function Sur(e,t){return w0(uce(e,t))}function Mur(e,t){return w0(f3(e,t))}function fct(e,t){return e.find(r=>r.name===t)}function mce(e,t,r){return t.hparams[e.hparamInfos[r].name]}function FH(e,t,r){let n=e.metricInfos[r].name,i=f3(t.metricValues,n);return i===void 0||i.value==="NaN"?void 0:i.value}function BH(e,t,r){return r<e.hparamInfos.length?mce(e,t,r):FH(e,t,r-e.hparamInfos.length)}function w0(e){return OH.isNumber(e)?e.toPrecision(5):e==null?"":e.toString()}function p3(e,t){return e*e+t*t}function h3(e,t,r,n){return Math.sqrt(p3(e-r,t-n))}function gce(e,t,r,n,i,o){if(e<r&&t<n)return h3(e,t,r,n);if(r<=e&&e<i&&t<n)return n-t;if(i<=e&&t<n)return h3(e,t,i,n);if(e<r&&n<=t&&t<o)return r-e;if(r<=e&&e<i&&n<=t&&t<o)return 0;if(i<=e&&n<=t&&t<o)return e-i;if(e<r&&o<=t)return h3(e,t,r,o);if(r<=e&&e<i&&o<=t)return t-o;if(i<=e&&o<=t)return h3(e,t,i,o);throw"Point (x,y) must be in one of the regions defined above."}function yP(e,t){return t===void 0?"translate("+e+")":"translate("+e+","+t+")"}function Eur(e,t,r){let n="rotate("+e;return t!==void 0&&r!==void 0&&(n=n+","+t+","+r),n=n+")",n}function Tur(e){return e==null}function Cur(e,t,r,n,i,o){e.visit((a,s,l,c,u)=>{if(a.length===void 0){do{let h=e.x()(a.data),f=e.y()(a.data);t<=h&&h<n&&r<=f&&f<i&&o(a.data)}while(a=a.next);return!0}return s>=n||c<=t||l>=i||u<=r})}function Aur(e,t,r,n,i){e.visit((o,a,s,l,c)=>{if(o.length===void 0){do{let u=e.x()(o.data),h=e.y()(o.data),f=h3(t,r,u,h);f<=n&&i(o.data,f)}while(o=o.next);return!0}return gce(t,r,a,s,l,c)>n})}function Pur(e,t){let r=new Set;return e.forEach(n=>{t(n)&&r.add(n)}),r}function pct(e,t,r){let n=e.get(t,e);if(!Array.isArray(n)){e.set(t,r);return}e.splice.apply(e,[t,0,n.length].concat(r))}function dct(e){let t=0;for(let r=0;r<e.length;++r)t=t*31+e.charCodeAt(r)&4294967295;return t+TI(2,31)}var Iur=10,In=class extends Gt(mt){constructor(){super(...arguments),this.configuration={schema:{hparamColumns:Array(),metricColumns:Array()},columnsVisibility:Array(),visibleSchema:{hparamInfos:Array(),metricInfos:Array()}},this.sessionGroups=[],this.dataLoadedWithNonEmptyHparams=!1,this.dataLoadedWithEmptyHparams=!1,this._maxNumHparamsToLoad=1e3,this._tooManyHparams=!1,this._statuses=[{value:"STATUS_UNKNOWN",displayName:"Unknown",allowed:!0},{value:"STATUS_SUCCESS",displayName:"Success",allowed:!0},{value:"STATUS_FAILURE",displayName:"Failure",allowed:!0},{value:"STATUS_RUNNING",displayName:"Running",allowed:!0}],this._getExperimentResolved=new Promise(t=>{this._resolveGetExperiment=t}),this._listSessionGroupsCanceller=new an,this._pageSizeInput={value:"100",invalid:!1},this._pageNumberInput={value:"1",invalid:!1},this._pageCountStr="?",this._hparamName=Bd,this._metricName=Qu,this._prettyPrint=w0}reload(){this._queryServer()}_csvUrl(t,r){return this._downloadDataUrl(t,r,"csv")}_jsonUrl(t,r){return this._downloadDataUrl(t,r,"json")}_latexUrl(t,r){return this._downloadDataUrl(t,r,"latex")}_downloadDataUrl(t,r,n){let i=r.columnsVisibility;return this.backend.getDownloadUrl(n,t,i)}_computeExperimentAndRelatedProps(){let t=us;if(t.isNullOrUndefined(this.backend)||t.isNullOrUndefined(this.experimentName))return;let r={experimentName:this.experimentName,hparamsLimit:this._maxNumHparamsToLoad};this.backend.getExperiment(r).then(n=>{_ce.isEqual(n,this._experiment)||(this.set("_experiment",n),this._computeHParams(),this._computeMetrics(),this._queryServer(),this._resolveGetExperiment())}).finally(()=>{this._computeDataFound()})}_computeDataFound(){let t=Boolean(this._experiment&&this._experiment.hparamInfos&&this._experiment.hparamInfos.length>0);this.set("dataLoadedWithNonEmptyHparams",t),this.set("dataLoadedWithEmptyHparams",!t)}_computeHParams(){let t=[];this._experiment.hparamInfos.forEach(i=>{let o={info:i,displayed:!1,filter:{}};o.info.hasOwnProperty("domainDiscrete")?o.info.domainDiscrete.length<Iur?(o.filter.domainDiscrete=[],o.info.domainDiscrete.forEach(a=>{o.filter.domainDiscrete.push({value:a,checked:!0})})):o.filter.regexp="":o.info.type==="DATA_TYPE_FLOAT64"?o.filter.interval={min:{value:"",invalid:!1},max:{value:"",invalid:!1}}:console.warn("cannot process domain type %s without discrete domain values",o.info.type),t.push(o)}),t.sort((i,o)=>i.info.differs===o.info.differs?0:i.info.differs?-1:1);let n=Math.min(5,t.length);for(let i=0;i<n;i++)t[i].displayed=!0;this.set("_hparams",t),this.set("_TooManyHparams",t.length>=this._maxNumHparamsToLoad)}_computeMetrics(){let t=[];this._experiment.metricInfos.forEach((n,i)=>{let o={info:n,filter:{interval:{min:{value:"",invalid:!1},max:{value:"",invalid:!1}}},displayed:i<5};t.push(o)}),this.set("_metrics",t)}_computeSchema(){return!this._hparams||!this._metrics?{hparamColumns:[],metricColumns:[]}:{hparamColumns:this._hparams.map(t=>({hparamInfo:t.info})),metricColumns:this._metrics.map(t=>({metricInfo:t.info}))}}_updateConfiguration(){this.debounce("_updateConfiguration",()=>{this.configuration={schema:this._computeSchema(),columnsVisibility:this._computeColumnsVisibility(),visibleSchema:this._computeVisibleSchema()}})}_computeColumnsVisibility(){return!this._hparams||!this._metrics?[]:this._hparams.map(t=>t.displayed).concat(this._metrics.map(t=>t.displayed))}_computeVisibleSchema(){if(!this._hparams||!this._metrics)return{hparamInfos:[],metricInfos:[]};let t=this._hparams.filter(n=>n.displayed).map(n=>n.info),r=this._metrics.filter(n=>n.displayed).map(n=>n.info);return{hparamInfos:t,metricInfos:r}}_hasRegexpFilter(t){return t.filter.regexp!==void 0}_queryServer(){this.debounce("queryServer",()=>this._queryServerNoDebounce(),100)}_queryServerNoDebounce(){if(!(!this._hparams||!this._metrics))return this._sendListSessionGroupsRequest().then(this._listSessionGroupsCanceller.cancellable(({value:t,cancelled:r})=>{if(!r){if(t.totalSize>=0){let n=+this._pageSizeInput.value;this.set("_pageCountStr",String(Math.ceil(t.totalSize/n))),this.set("_totalSessionGroupsCountStr",t.totalSize)}else this.set("_pageCountStr","?"),this.set("_totalSessionGroupsCountStr","Unknown");pct(this,"sessionGroups",t.sessionGroups)}}))}_sendListSessionGroupsRequest(){let t=this._buildListSessionGroupsRequest();if(t!==null)return this.set("_sessionGroupsRequest",t),this._listSessionGroupsCanceller.cancelAll(),this.backend.listSessionGroups(t)}_buildListSessionGroupsRequest(){let t=this,r=!0;function n(h){return h.min.value!==""||h.max.value!==""}function i(h){let f=t.get(h+".min.value");console.assert(f!==void 0);let p=f===""?"-Infinity":+f,d=isNaN(p);t.set(h+".min.invalid",d),r=r&&!d;let g=t.get(h+".max.value");console.assert(g!==void 0);let _=g===""?"Infinity":+g,y=isNaN(_);return t.set(h+".max.invalid",y),r=r&&!y,d||y?null:{minValue:p,maxValue:_}}function o(h){let f=t.get(h+".value");console.assert(f!==void 0);let p=+f,d=Number.isInteger(p)&&p>0;return t.set(h+".invalid",!d),r=r&&d,d?p:null}let a=this._statuses.filter(h=>h.allowed).map(h=>h.value),s=[];if(this._hparams.forEach((h,f)=>{let p={hparam:h.info.name,includeInResult:!0};h.filter.domainDiscrete?h.filter.domainDiscrete.every(g=>g.checked)||(p.filterDiscrete=[],h.filter.domainDiscrete.forEach(g=>{g.checked&&p.filterDiscrete.push(g.value)})):h.filter.interval?n(h.filter.interval)&&(p.filterInterval=i("_hparams."+f+".filter.interval")):h.filter.regexp&&(p.filterRegexp=h.filter.regexp),s.push(p)}),this._metrics.forEach((h,f)=>{let p={metric:h.info.name,includeInResult:!0};n(h.filter.interval)&&(p.filterInterval=i("_metrics."+f+".filter.interval")),s.push(p)}),this._sortByIndex!==void 0&&this._sortDirection!==void 0){if(!(this._sortByIndex in s))return console.error("No column in colParams with index sortByIndex: %s",this._sortByIndex),null;s[this._sortByIndex].order=this._sortDirection===0?"ORDER_ASC":"ORDER_DESC"}let l=o("_pageNumberInput")||0,c=o("_pageSizeInput")||0;if(!r)return null;let u=c*(l-1);return{experimentName:this.experimentName,allowedStatuses:a,colParams:s,startIndex:u,sliceSize:c}}_metricSortByIndex(t){return t+this._hparams.length}};In.template=Q`
    <hparams-split-layout orientation="vertical">
      <div slot="content" class="section hyperparameters">
        <div class="section-title">Hyperparameters</div>
        <template is="dom-if" if="[[_TooManyHparams]]">
          <div class="too-many-hparams">
            Warning: There were too many hparams to load all of them
            efficiently. Only [[_maxNumHparamsToLoad]] were loaded.
          </div>
        </template>
        <template is="dom-repeat" items="{{_hparams}}" as="hparam">
          <div class="hparam">
            <paper-checkbox
              checked="{{hparam.displayed}}"
              class="hparam-checkbox"
            >
              [[_hparamName(hparam.info)]]
            </paper-checkbox>
            <!-- Precisely one of the templates below will be stamped.-->
            <!-- 1. A list of checkboxes -->
            <template is="dom-if" if="[[hparam.filter.domainDiscrete]]">
              <template
                is="dom-repeat"
                items="[[hparam.filter.domainDiscrete]]"
              >
                <paper-checkbox
                  checked="{{item.checked}}"
                  class="discrete-value-checkbox"
                  on-change="_queryServer"
                >
                  [[_prettyPrint(item.value)]]
                </paper-checkbox>
              </template>
            </template>
            <!-- 2. A numeric interval -->
            <template is="dom-if" if="[[hparam.filter.interval]]">
              <paper-input
                label="Min"
                value="{{hparam.filter.interval.min.value}}"
                allowed_pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="[[hparam.filter.interval.min.invalid]]"
                placeholder="-infinity"
              >
              </paper-input>
              <paper-input
                label="Max"
                value="{{hparam.filter.interval.max.value}}"
                allowed_pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="[[hparam.filter.interval.max.invalid]]"
                placeholder="+infinity"
              >
              </paper-input>
            </template>
            <!-- 3. A regexp -->
            <template is="dom-if" if="[[_hasRegexpFilter(hparam)]]">
              <paper-input
                label="Regular expression"
                value="{{hparam.filter.regexp}}"
                on-value-changed="_queryServer"
              >
              </paper-input>
            </template>
          </div>
        </template>
      </div>
      <div slot="content" class="section metrics">
        <div class="section-title">Metrics</div>
        <template is="dom-repeat" items="{{_metrics}}" as="metric">
          <div class="metric">
            <!-- TODO(erez): Make it easier to handle a large number of
                  metrics:
                  1. Add an 'isolator' radio-button to select just one
                  metric and
                  hide all the rest
                  2. Add a 'toggle-all' button that will hide/unhide
                    all the
                  metrics.
                  Use similar logic/appearance to the run-selector of
                  scalars.-->
            <paper-checkbox
              checked="{{metric.displayed}}"
              class="metric-checkbox"
            >
              [[_metricName(metric.info)]]
            </paper-checkbox>
            <div class="inline-element">
              <paper-input
                label="Min"
                value="{{metric.filter.interval.min.value}}"
                allowed-pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="{{metric.filter.interval.min.invalid}}"
                placeholder="-infinity"
              >
              </paper-input>
            </div>
            <div class="inline-element">
              <paper-input
                label="Max"
                allowed-pattern="[0-9.e\\-]"
                value="{{metric.filter.interval.max.value}}"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="{{metric.filter.interval.max.invalid}}"
                placeholder="+infinity"
              >
              </paper-input>
            </div>
          </div>
        </template>
      </div>
      <div slot="content" class="section status">
        <div class="section-title">Status</div>
        <template is="dom-repeat" items="[[_statuses]]" as="status">
          <paper-checkbox checked="{{status.allowed}}" on-change="_queryServer">
            [[status.displayName]]
          </paper-checkbox>
        </template>
      </div>
      <div slot="content" class="section sorting">
        <div class="section-title">Sorting</div>
        <paper-dropdown-menu
          label="Sort by"
          on-selected-item-changed="_queryServer"
          horizontal-align="left"
        >
          <paper-listbox
            class="dropdown-content"
            slot="dropdown-content"
            selected="{{_sortByIndex}}"
            on-selected-item-changed="_queryServer"
          >
            <template is="dom-repeat" items="[[_hparams]]" as="hparam">
              <paper-item> [[_hparamName(hparam.info)]] </paper-item>
            </template>
            <template is="dom-repeat" items="[[_metrics]]" as="metric">
              <paper-item> [[_metricName(metric.info)]] </paper-item>
            </template>
          </paper-listbox>
        </paper-dropdown-menu>
        <paper-dropdown-menu
          label="Direction"
          on-selected-item-changed="_queryServer"
          horizontal-align="left"
        >
          <paper-listbox
            class="dropdown-content"
            slot="dropdown-content"
            selected="{{_sortDirection}}"
          >
            <paper-item>Ascending</paper-item>
            <paper-item>Descending</paper-item>
          </paper-listbox>
        </paper-dropdown-menu>
      </div>
      <div slot="content" class="section paging">
        <div class="section-title">Paging</div>
        <div>
          Number of matching session groups: [[_totalSessionGroupsCountStr]]
        </div>
        <div class="inline-element page-number-input">
          <paper-input
            label="Page #"
            value="{{_pageNumberInput.value}}"
            allowed-pattern="[0-9]"
            error-message="Invalid input"
            invalid="[[_pageNumberInput.invalid]]"
            on-value-changed="_queryServer"
          >
            <div slot="suffix" class="page-suffix">/ [[_pageCountStr]]</div>
          </paper-input>
        </div>
        <div class="inline-element page-size-input">
          <paper-input
            label="Max # of session groups per page:"
            value="{{_pageSizeInput.value}}"
            allowed-pattern="[0-9]"
            error-message="Invalid input"
            invalid="[[_pageSizeInput.invalid]]"
            on-value-changed="_queryServer"
          >
          </paper-input>
        </div>
      </div>
      <div slot="content" class="section download">
        <template is="dom-if" if="[[_sessionGroupsRequest]]">
          Download data as
          <span>
            <a
              id="csvLink"
              download="hparams_table.csv"
              href="[[_csvUrl(_sessionGroupsRequest, configuration)]]"
              >CSV</a
            >
            <a
              id="jsonLink"
              download="hparams_table.json"
              href="[[_jsonUrl(_sessionGroupsRequest, configuration)]]"
              >JSON</a
            >
            <a
              id="latexLink"
              download="hparams_table.tex"
              href="[[_latexUrl(_sessionGroupsRequest, configuration)]]"
              >LaTeX</a
            >
          </span>
        </template>
      </div>
    </hparams-split-layout>
    <style>
      .section {
        padding: 10px;
      }
      .section-title {
        display: block;
        font-weight: bold;
        text-decoration: underline;
        margin-bottom: 7px;
      }
      .too-many-hparams {
        color: var(--tb-orange-dark);
        font-size: 13px;
        font-style: italic;
        margin: 12px 0;
      }
      .discrete-value-checkbox,
      .metric-checkbox,
      .hparam-checkbox {
        display: block;
      }
      .discrete-value-checkbox {
        margin-left: 20px;
      }
      .hparam,
      .metric {
        display: block;
      }
      .inline-element {
        display: inline-block;
        width: 40%;
        margin-left: 10px;
      }
      .page-number-input {
        width: 20%;
      }
      .page-size-input {
        width: 60%;
      }
      vaadin-split-layout {
        height: 100%;
      }
      paper-listbox {
        max-height: 15em;
      }
      .page-suffix {
        white-space: nowrap;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],In.prototype,"experimentName",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],In.prototype,"configuration",void 0);E([A({type:Array,notify:!0}),w("design:type",Object)],In.prototype,"sessionGroups",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],In.prototype,"dataLoadedWithNonEmptyHparams",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],In.prototype,"dataLoadedWithEmptyHparams",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_experiment",void 0);E([A({type:Array}),w("design:type",Array)],In.prototype,"_hparams",void 0);E([A({type:Number}),w("design:type",Number)],In.prototype,"_maxNumHparamsToLoad",void 0);E([A({type:Boolean}),w("design:type",Boolean)],In.prototype,"_tooManyHparams",void 0);E([A({type:Array}),w("design:type",Array)],In.prototype,"_metrics",void 0);E([A({type:Array}),w("design:type",Object)],In.prototype,"_statuses",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_getExperimentResolved",void 0);E([A({type:Object}),w("design:type",Function)],In.prototype,"_resolveGetExperiment",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_listSessionGroupsCanceller",void 0);E([A({type:Number}),w("design:type",Number)],In.prototype,"_sortByIndex",void 0);E([A({type:Number}),w("design:type",Number)],In.prototype,"_sortDirection",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_pageSizeInput",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_pageNumberInput",void 0);E([A({type:String}),w("design:type",String)],In.prototype,"_pageCountStr",void 0);E([A({type:String}),w("design:type",String)],In.prototype,"_totalSessionGroupsCountStr",void 0);E([A({type:Object}),w("design:type",Object)],In.prototype,"_sessionGroupsRequest",void 0);E([Bt("backend","experimentName"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],In.prototype,"_computeExperimentAndRelatedProps",null);E([Bt("_hparams.*","_metrics.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],In.prototype,"_updateConfiguration",null);In=E([yt("tf-hparams-query-pane")],In);var Uct=Ee(Oe(),1);var mct=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0;var o1=(e,t,r=null)=>{for(;t!==r;){let n=t.nextSibling;e.removeChild(t),t=n}};var Yc=`{{lit-${String(Math.random()).slice(2)}}}`,gct=`<!--${Yc}-->`,yce=new RegExp(`${Yc}|${gct}`),d3="$lit$",a1=class{constructor(t,r){this.parts=[],this.element=r;let n=[],i=[],o=document.createTreeWalker(r.content,133,null,!1),a=0,s=-1,l=0,{strings:c,values:{length:u}}=t;for(;l<u;){let h=o.nextNode();if(h===null){o.currentNode=i.pop();continue}if(s++,h.nodeType===1){if(h.hasAttributes()){let f=h.attributes,{length:p}=f,d=0;for(let g=0;g<p;g++)vce(f[g].name,d3)&&d++;for(;d-- >0;){let g=c[l],_=HH.exec(g)[2],y=_.toLowerCase()+d3,x=h.getAttribute(y);h.removeAttribute(y);let b=x.split(yce);this.parts.push({type:"attribute",index:s,name:_,strings:b}),l+=b.length-1}}h.tagName==="TEMPLATE"&&(i.push(h),o.currentNode=h.content)}else if(h.nodeType===3){let f=h.data;if(f.indexOf(Yc)>=0){let p=h.parentNode,d=f.split(yce),g=d.length-1;for(let _=0;_<g;_++){let y,x=d[_];if(x==="")y=jf();else{let b=HH.exec(x);b!==null&&vce(b[2],d3)&&(x=x.slice(0,b.index)+b[1]+b[2].slice(0,-d3.length)+b[3]),y=document.createTextNode(x)}p.insertBefore(y,h),this.parts.push({type:"node",index:++s})}d[g]===""?(p.insertBefore(jf(),h),n.push(h)):h.data=d[g],l+=g}}else if(h.nodeType===8)if(h.data===Yc){let f=h.parentNode;(h.previousSibling===null||s===a)&&(s++,f.insertBefore(jf(),h)),a=s,this.parts.push({type:"node",index:s}),h.nextSibling===null?h.data="":(n.push(h),s--),l++}else{let f=-1;for(;(f=h.data.indexOf(Yc,f+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let h of n)h.parentNode.removeChild(h)}},vce=(e,t)=>{let r=e.length-t.length;return r>=0&&e.slice(r)===t},vP=e=>e.index!==-1,jf=()=>document.createComment(""),HH=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var _ct=133;function yct(e,t){let{element:{content:r},parts:n}=e,i=document.createTreeWalker(r,_ct,null,!1),o=xP(n),a=n[o],s=-1,l=0,c=[],u=null;for(;i.nextNode();){s++;let h=i.currentNode;for(h.previousSibling===u&&(u=null),t.has(h)&&(c.push(h),u===null&&(u=h)),u!==null&&l++;a!==void 0&&a.index===s;)a.index=u!==null?-1:a.index-l,o=xP(n,o),a=n[o]}c.forEach(h=>h.parentNode.removeChild(h))}var Lur=e=>{let t=e.nodeType===11?0:1,r=document.createTreeWalker(e,_ct,null,!1);for(;r.nextNode();)t++;return t},xP=(e,t=-1)=>{for(let r=t+1;r<e.length;r++){let n=e[r];if(vP(n))return r}return-1};function xce(e,t,r=null){let{element:{content:n},parts:i}=e;if(r==null){n.appendChild(t);return}let o=document.createTreeWalker(n,_ct,null,!1),a=xP(i),s=0,l=-1;for(;o.nextNode();)for(l++,o.currentNode===r&&(s=Lur(t),r.parentNode.insertBefore(t,r));a!==-1&&i[a].index===l;){if(s>0){for(;a!==-1;)i[a].index+=s,a=xP(i,a);return}a=xP(i,a)}}var kur=new WeakMap;var s1=e=>typeof e=="function"&&kur.has(e);var kl={},VH={};var S0=class{constructor(t,r,n){this.__parts=[],this.template=t,this.processor=r,this.options=n}update(t){let r=0;for(let n of this.__parts)n!==void 0&&n.setValue(t[r]),r++;for(let n of this.__parts)n!==void 0&&n.commit()}_clone(){let t=mct?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],n=this.template.parts,i=document.createTreeWalker(t,133,null,!1),o=0,a=0,s,l=i.nextNode();for(;o<n.length;){if(s=n[o],!vP(s)){this.__parts.push(void 0),o++;continue}for(;a<s.index;)a++,l.nodeName==="TEMPLATE"&&(r.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=r.pop(),l=i.nextNode());if(s.type==="node"){let c=this.processor.handleTextExpression(this.options);c.insertAfterNode(l.previousSibling),this.__parts.push(c)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,s.name,s.strings,this.options));o++}return mct&&(document.adoptNode(t),customElements.upgrade(t)),t}};var bce=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Nur=` ${Yc} `,M0=class{constructor(t,r,n,i){this.strings=t,this.values=r,this.type=n,this.processor=i}getHTML(){let t=this.strings.length-1,r="",n=!1;for(let i=0;i<t;i++){let o=this.strings[i],a=o.lastIndexOf("<!--");n=(a>-1||n)&&o.indexOf("-->",a+1)===-1;let s=HH.exec(o);s===null?r+=o+(n?Nur:gct):r+=o.substr(0,s.index)+s[1]+s[2]+d3+s[3]+Yc}return r+=this.strings[t],r}getTemplateElement(){let t=document.createElement("template"),r=this.getHTML();return bce!==void 0&&(r=bce.createHTML(r)),t.innerHTML=r,t}};var GH=e=>e===null||!(typeof e=="object"||typeof e=="function"),UH=e=>Array.isArray(e)||!!(e&&e[Symbol.iterator]),m3=class{constructor(t,r,n){this.dirty=!0,this.element=t,this.name=r,this.strings=n,this.parts=[];for(let i=0;i<n.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new bP(this)}_getValue(){let t=this.strings,r=t.length-1,n=this.parts;if(r===1&&t[0]===""&&t[1]===""){let o=n[0].value;if(typeof o=="symbol")return String(o);if(typeof o=="string"||!UH(o))return o}let i="";for(let o=0;o<r;o++){i+=t[o];let a=n[o];if(a!==void 0){let s=a.value;if(GH(s)||!UH(s))i+=typeof s=="string"?s:String(s);else for(let l of s)i+=typeof l=="string"?l:String(l)}}return i+=t[r],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}},bP=class{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==kl&&(!GH(t)||t!==this.value)&&(this.value=t,s1(t)||(this.committer.dirty=!0))}commit(){for(;s1(this.value);){let t=this.value;this.value=kl,t(this)}this.value!==kl&&this.committer.commit()}},Hd=class{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(jf()),this.endNode=t.appendChild(jf())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=jf()),t.__insert(this.endNode=jf())}insertAfterPart(t){t.__insert(this.startNode=jf()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(this.startNode.parentNode===null)return;for(;s1(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=kl,r(this)}let t=this.__pendingValue;t!==kl&&(GH(t)?t!==this.value&&this.__commitText(t):t instanceof M0?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):UH(t)?this.__commitIterable(t):t===VH?(this.value=VH,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){let r=this.startNode.nextSibling;t=t==null?"":t;let n=typeof t=="string"?t:String(t);r===this.endNode.previousSibling&&r.nodeType===3?r.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){let r=this.options.templateFactory(t);if(this.value instanceof S0&&this.value.template===r)this.value.update(t.values);else{let n=new S0(r,t.processor,this.options),i=n._clone();n.update(t.values),this.__commitNode(i),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,n=0,i;for(let o of t)i=r[n],i===void 0&&(i=new Hd(this.options),r.push(i),n===0?i.appendIntoPart(this):i.insertAfterPart(r[n-1])),i.setValue(o),i.commit(),n++;n<r.length&&(r.length=n,this.clear(i&&i.endNode))}clear(t=this.startNode){o1(this.startNode.parentNode,t.nextSibling,this.endNode)}},wP=class{constructor(t,r,n){if(this.value=void 0,this.__pendingValue=void 0,n.length!==2||n[0]!==""||n[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=r,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;s1(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=kl,r(this)}if(this.__pendingValue===kl)return;let t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=kl}},SP=class extends m3{constructor(t,r,n){super(t,r,n),this.single=n.length===2&&n[0]===""&&n[1]===""}_createPart(){return new qH(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}},qH=class extends bP{},wce=!1;(()=>{try{let e={get capture(){return wce=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();var MP=class{constructor(t,r,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=r,this.eventContext=n,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(t){this.__pendingValue=t}commit(){for(;s1(this.__pendingValue);){let o=this.__pendingValue;this.__pendingValue=kl,o(this)}if(this.__pendingValue===kl)return;let t=this.__pendingValue,r=this.value,n=t==null||r!=null&&(t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive),i=t!=null&&(r==null||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=Dur(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=kl}handleEvent(t){typeof this.value=="function"?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}},Dur=e=>e&&(wce?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);function vct(e){let t=l1.get(e.type);t===void 0&&(t={stringsArray:new WeakMap,keyString:new Map},l1.set(e.type,t));let r=t.stringsArray.get(e.strings);if(r!==void 0)return r;let n=e.strings.join(Yc);return r=t.keyString.get(n),r===void 0&&(r=new a1(e,e.getTemplateElement()),t.keyString.set(n,r)),t.stringsArray.set(e.strings,r),r}var l1=new Map;var E0=new WeakMap,xct=(e,t,r)=>{let n=E0.get(t);n===void 0&&(o1(t,t.firstChild),E0.set(t,n=new Hd(Object.assign({templateFactory:vct},r))),n.appendInto(t)),n.setValue(e),n.commit()};var WH=class{handleAttributeExpressions(t,r,n,i){let o=r[0];return o==="."?new SP(t,r.slice(1),n).parts:o==="@"?[new MP(t,r.slice(1),i.eventContext)]:o==="?"?[new wP(t,r.slice(1),n)]:new m3(t,r,n).parts}handleTextExpression(t){return new Hd(t)}},Sce=new WH;typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");var Ece=(e,t)=>`${e}--${t}`,YH=!0;typeof window.ShadyCSS=="undefined"?YH=!1:typeof window.ShadyCSS.prepareTemplateDom=="undefined"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),YH=!1);var Fur=e=>t=>{let r=Ece(t.type,e),n=l1.get(r);n===void 0&&(n={stringsArray:new WeakMap,keyString:new Map},l1.set(r,n));let i=n.stringsArray.get(t.strings);if(i!==void 0)return i;let o=t.strings.join(Yc);if(i=n.keyString.get(o),i===void 0){let a=t.getTemplateElement();YH&&window.ShadyCSS.prepareTemplateDom(a,e),i=new a1(t,a),n.keyString.set(o,i)}return n.stringsArray.set(t.strings,i),i},Bur=["html","svg"],Hur=e=>{Bur.forEach(t=>{let r=l1.get(Ece(t,e));r!==void 0&&r.keyString.forEach(n=>{let{element:{content:i}}=n,o=new Set;Array.from(i.querySelectorAll("style")).forEach(a=>{o.add(a)}),yct(n,o)})})},Tce=new Set,Vur=(e,t,r)=>{Tce.add(e);let n=r?r.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:o}=i;if(o===0){window.ShadyCSS.prepareTemplateStyles(n,e);return}let a=document.createElement("style");for(let c=0;c<o;c++){let u=i[c];u.parentNode.removeChild(u),a.textContent+=u.textContent}Hur(e);let s=n.content;r?xce(r,a,s.firstChild):s.insertBefore(a,s.firstChild),window.ShadyCSS.prepareTemplateStyles(n,e);let l=s.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(r){s.insertBefore(a,s.firstChild);let c=new Set;c.add(a),yct(r,c)}},Cce=(e,t,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let n=r.scopeName,i=E0.has(t),o=YH&&t.nodeType===11&&!!t.host,a=o&&!Tce.has(n),s=a?document.createDocumentFragment():t;if(xct(e,s,Object.assign({templateFactory:Fur(n)},r)),a){let l=E0.get(s);E0.delete(s);let c=l.value instanceof S0?l.value.template:void 0;Vur(n,s,c),o1(t,t.firstChild),t.appendChild(s),E0.set(t,l)}!i&&o&&window.ShadyCSS.styleElement(t.host)};var Ace;window.JSCompiler_renameProperty=(e,t)=>e;var Tct={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return e!==null;case Number:return e===null?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},Pce=(e,t)=>t!==e&&(t===t||e===e),bct={attribute:!0,type:String,converter:Tct,reflect:!1,hasChanged:Pce},wct=1,Sct=1<<2,Mct=1<<3,Ect=1<<4,Cct="finalized",g3=class extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();let t=[];return this._classProperties.forEach((r,n)=>{let i=this._attributeNameForProperty(n,r);i!==void 0&&(this._attributeToPropertyMap.set(i,n),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let t=Object.getPrototypeOf(this)._classProperties;t!==void 0&&t.forEach((r,n)=>this._classProperties.set(n,r))}}static createProperty(t,r=bct){if(this._ensureClassProperties(),this._classProperties.set(t,r),r.noAccessor||this.prototype.hasOwnProperty(t))return;let n=typeof t=="symbol"?Symbol():`__${t}`,i=this.getPropertyDescriptor(t,n,r);i!==void 0&&Object.defineProperty(this.prototype,t,i)}static getPropertyDescriptor(t,r,n){return{get(){return this[r]},set(i){let o=this[t];this[r]=i,this.requestUpdateInternal(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||bct}static finalize(){let t=Object.getPrototypeOf(this);if(t.hasOwnProperty(Cct)||t.finalize(),this[Cct]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,n=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let i of n)this.createProperty(i,r[i])}}static _attributeNameForProperty(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}static _valueHasChanged(t,r,n=Pce){return n(t,r)}static _propertyValueFromAttribute(t,r){let n=r.type,i=r.converter||Tct,o=typeof i=="function"?i:i.fromAttribute;return o?o(t,n):t}static _propertyValueToAttribute(t,r){if(r.reflect===void 0)return;let n=r.type,i=r.converter;return(i&&i.toAttribute||Tct.toAttribute)(t,n)}initialize(){this._updateState=0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,r)=>{if(this.hasOwnProperty(r)){let n=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,n)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,r)=>this[r]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,r,n){r!==n&&this._attributeToProperty(t,n)}_propertyToAttribute(t,r,n=bct){let i=this.constructor,o=i._attributeNameForProperty(t,n);if(o!==void 0){let a=i._propertyValueToAttribute(r,n);if(a===void 0)return;this._updateState=this._updateState|Mct,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._updateState=this._updateState&~Mct}}_attributeToProperty(t,r){if(this._updateState&Mct)return;let n=this.constructor,i=n._attributeToPropertyMap.get(t);if(i!==void 0){let o=n.getPropertyOptions(i);this._updateState=this._updateState|Ect,this[i]=n._propertyValueFromAttribute(r,o),this._updateState=this._updateState&~Ect}}requestUpdateInternal(t,r,n){let i=!0;if(t!==void 0){let o=this.constructor;n=n||o.getPropertyOptions(t),o._valueHasChanged(this[t],r,n.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,r),n.reflect===!0&&!(this._updateState&Ect)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,n))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,r){return this.requestUpdateInternal(t,r),this.updateComplete}_enqueueUpdate(){return Ri(this,null,function*(){this._updateState=this._updateState|Sct;try{yield this._updatePromise}catch(r){}let t=this.performUpdate();return t!=null&&(yield t),!this._hasRequestedUpdate})}get _hasRequestedUpdate(){return this._updateState&Sct}get hasUpdated(){return this._updateState&wct}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1,r=this._changedProperties;try{t=this.shouldUpdate(r),t?this.update(r):this._markUpdated()}catch(n){throw t=!1,this._markUpdated(),n}t&&(this._updateState&wct||(this._updateState=this._updateState|wct,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Sct}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,n)=>this._propertyToAttribute(n,this[n],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}};Ace=Cct;g3[Ace]=!0;var Ice=Element.prototype,Iii=Ice.msMatchesSelector||Ice.webkitMatchesSelector;var jH=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Act=Symbol(),c1=class{constructor(t,r){if(r!==Act)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return this._styleSheet===void 0&&(jH?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}},Pct=e=>new c1(String(e),Act),Uur=e=>{if(e instanceof c1)return e.cssText;if(typeof e=="number")return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but
            take care to ensure page security.`)},Ci=(e,...t)=>{let r=t.reduce((n,i,o)=>n+Uur(i)+e[o+1],e[0]);return new c1(r,Act)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var Lce={},EP=class extends g3{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;let t=this.getStyles();if(Array.isArray(t)){let r=(o,a)=>o.reduceRight((s,l)=>Array.isArray(l)?r(l,s):(s.add(l),s),a),n=r(t,new Set),i=[];n.forEach(o=>i.unshift(o)),this._styles=i}else this._styles=t===void 0?[]:[t];this._styles=this._styles.map(r=>{if(r instanceof CSSStyleSheet&&!jH){let n=Array.prototype.slice.call(r.cssRules).reduce((i,o)=>i+o.cssText,"");return Pct(n)}return r})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){let t=this.constructor._styles;t.length!==0&&(window.ShadyCSS!==void 0&&!window.ShadyCSS.nativeShadow?window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(r=>r.cssText),this.localName):jH?this.renderRoot.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):this._needsShimAdoptedStyleSheets=!0)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(t){let r=this.render();super.update(t),r!==Lce&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(n=>{let i=document.createElement("style");i.textContent=n.cssText,this.renderRoot.appendChild(i)}))}render(){return Lce}};EP.finalized=!0;EP.render=Cce;EP.shadowRootOptions={mode:"open"};var kce=0,Ict={},jc=(e,t,r)=>{let n=r&&r.moduleId||`custom-style-module-${kce++}`;Array.isArray(t)||(t=t?[t]:[]),t.forEach(a=>{if(!(a instanceof c1))throw new Error("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");if(!Ict[a]){let s=document.createElement("dom-module");s.innerHTML=`
        <template>
          <style>${a.toString()}</style>
        </template>
      `;let l=`custom-style-module-${kce++}`;s.register(l),Ict[a]=l}});let i=document.createElement("dom-module");if(e){let a=customElements.get(e);a&&Object.prototype.hasOwnProperty.call(a,"__finalized")&&console.warn(`The custom element definition for "${e}"
      was finalized before a style module was registered.
      Make sure to add component specific style modules before
      importing the corresponding custom element.`),i.setAttribute("theme-for",e)}let o=r&&r.include||[];i.innerHTML=`
    <template>
      ${o.map(a=>`<style include=${a}></style>`)}
      ${t.map(a=>`<style include=${Ict[a]}></style>`)}
    </template>
  `,i.register(n)};var Lct=class extends HTMLElement{static get version(){return"20.0.2"}};customElements.define("vaadin-lumo-styles",Lct);var qur=Ci`
  :host {
    /* Base (background) */
    --lumo-base-color: #fff;

    /* Tint */
    --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
    --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
    --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
    --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
    --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
    --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
    --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
    --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
    --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
    --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
    --lumo-tint: #fff;

    /* Shade */
    --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
    --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
    --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
    --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
    --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
    --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);
    --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);
    --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);
    --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
    --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
    --lumo-shade: hsl(214, 35%, 15%);

    /* Contrast */
    --lumo-contrast-5pct: var(--lumo-shade-5pct);
    --lumo-contrast-10pct: var(--lumo-shade-10pct);
    --lumo-contrast-20pct: var(--lumo-shade-20pct);
    --lumo-contrast-30pct: var(--lumo-shade-30pct);
    --lumo-contrast-40pct: var(--lumo-shade-40pct);
    --lumo-contrast-50pct: var(--lumo-shade-50pct);
    --lumo-contrast-60pct: var(--lumo-shade-60pct);
    --lumo-contrast-70pct: var(--lumo-shade-70pct);
    --lumo-contrast-80pct: var(--lumo-shade-80pct);
    --lumo-contrast-90pct: var(--lumo-shade-90pct);
    --lumo-contrast: var(--lumo-shade);

    /* Text */
    --lumo-header-text-color: var(--lumo-contrast);
    --lumo-body-text-color: var(--lumo-contrast-90pct);
    --lumo-secondary-text-color: var(--lumo-contrast-70pct);
    --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
    --lumo-disabled-text-color: var(--lumo-contrast-30pct);

    /* Primary */
    --lumo-primary-color: hsl(214, 90%, 52%);
    --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);
    --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);
    --lumo-primary-text-color: var(--lumo-primary-color);
    --lumo-primary-contrast-color: #fff;

    /* Error */
    --lumo-error-color: hsl(3, 100%, 61%);
    --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);
    --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);
    --lumo-error-text-color: hsl(3, 92%, 53%);
    --lumo-error-contrast-color: #fff;

    /* Success */
    --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */
    --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);
    --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);
    --lumo-success-text-color: hsl(145, 100%, 32%);
    --lumo-success-contrast-color: #fff;
  }
`,Rce=document.createElement("template");Rce.innerHTML=`<style>${qur.toString().replace(":host","html")}</style>`;document.head.appendChild(Rce.content);var Gur=Ci`
  [theme~='dark'] {
    /* Base (background) */
    --lumo-base-color: hsl(214, 35%, 21%);

    /* Tint */
    --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
    --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
    --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
    --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
    --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
    --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
    --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);
    --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);
    --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
    --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
    --lumo-tint: hsl(214, 100%, 98%);

    /* Shade */
    --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
    --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
    --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
    --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
    --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
    --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
    --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
    --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
    --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
    --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
    --lumo-shade: hsl(214, 33%, 13%);

    /* Contrast */
    --lumo-contrast-5pct: var(--lumo-tint-5pct);
    --lumo-contrast-10pct: var(--lumo-tint-10pct);
    --lumo-contrast-20pct: var(--lumo-tint-20pct);
    --lumo-contrast-30pct: var(--lumo-tint-30pct);
    --lumo-contrast-40pct: var(--lumo-tint-40pct);
    --lumo-contrast-50pct: var(--lumo-tint-50pct);
    --lumo-contrast-60pct: var(--lumo-tint-60pct);
    --lumo-contrast-70pct: var(--lumo-tint-70pct);
    --lumo-contrast-80pct: var(--lumo-tint-80pct);
    --lumo-contrast-90pct: var(--lumo-tint-90pct);
    --lumo-contrast: var(--lumo-tint);

    /* Text */
    --lumo-header-text-color: var(--lumo-contrast);
    --lumo-body-text-color: var(--lumo-contrast-90pct);
    --lumo-secondary-text-color: var(--lumo-contrast-70pct);
    --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
    --lumo-disabled-text-color: var(--lumo-contrast-30pct);

    /* Primary */
    --lumo-primary-color: hsl(214, 86%, 55%);
    --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);
    --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);
    --lumo-primary-text-color: hsl(214, 100%, 70%);
    --lumo-primary-contrast-color: #fff;

    /* Error */
    --lumo-error-color: hsl(3, 90%, 63%);
    --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);
    --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);
    --lumo-error-text-color: hsl(3, 100%, 67%);

    /* Success */
    --lumo-success-color: hsl(145, 65%, 42%);
    --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);
    --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);
    --lumo-success-text-color: hsl(145, 85%, 47%);
  }

  html {
    color: var(--lumo-body-text-color);
    background-color: var(--lumo-base-color);
  }

  [theme~='dark'] {
    color: var(--lumo-body-text-color);
    background-color: var(--lumo-base-color);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: var(--lumo-header-text-color);
  }

  a {
    color: var(--lumo-primary-text-color);
  }

  blockquote {
    color: var(--lumo-secondary-text-color);
  }

  code,
  pre {
    background-color: var(--lumo-contrast-10pct);
    border-radius: var(--lumo-border-radius-m);
  }
`;jc("",Gur,{moduleId:"lumo-color"});var Wur=Ci`
  :host {
    color: var(--lumo-body-text-color) !important;
    background-color: var(--lumo-base-color) !important;
  }
`;jc("",Wur,{moduleId:"lumo-color-legacy",include:["lumo-color"]});var Nce=document.createElement("template");Nce.innerHTML=`
  <style>
    @font-face {
      font-family: 'lumo-icons';
      src: url(data:application/font-woff;charset=utf-8;base64, ) format('woff');
      font-weight: normal;
      font-style: normal;
    }

    html {
      --lumo-icons-align-center: "\\ea01";
      --lumo-icons-align-left: "\\ea02";
      --lumo-icons-align-right: "\\ea03";
      --lumo-icons-angle-down: "\\ea04";
      --lumo-icons-angle-left: "\\ea05";
      --lumo-icons-angle-right: "\\ea06";
      --lumo-icons-angle-up: "\\ea07";
      --lumo-icons-arrow-down: "\\ea08";
      --lumo-icons-arrow-left: "\\ea09";
      --lumo-icons-arrow-right: "\\ea0a";
      --lumo-icons-arrow-up: "\\ea0b";
      --lumo-icons-bar-chart: "\\ea0c";
      --lumo-icons-bell: "\\ea0d";
      --lumo-icons-calendar: "\\ea0e";
      --lumo-icons-checkmark: "\\ea0f";
      --lumo-icons-chevron-down: "\\ea10";
      --lumo-icons-chevron-left: "\\ea11";
      --lumo-icons-chevron-right: "\\ea12";
      --lumo-icons-chevron-up: "\\ea13";
      --lumo-icons-clock: "\\ea14";
      --lumo-icons-cog: "\\ea15";
      --lumo-icons-cross: "\\ea16";
      --lumo-icons-download: "\\ea17";
      --lumo-icons-dropdown: "\\ea18";
      --lumo-icons-edit: "\\ea19";
      --lumo-icons-error: "\\ea1a";
      --lumo-icons-eye: "\\ea1b";
      --lumo-icons-eye-disabled: "\\ea1c";
      --lumo-icons-menu: "\\ea1d";
      --lumo-icons-minus: "\\ea1e";
      --lumo-icons-ordered-list: "\\ea1f";
      --lumo-icons-phone: "\\ea20";
      --lumo-icons-photo: "\\ea21";
      --lumo-icons-play: "\\ea22";
      --lumo-icons-plus: "\\ea23";
      --lumo-icons-redo: "\\ea24";
      --lumo-icons-reload: "\\ea25";
      --lumo-icons-search: "\\ea26";
      --lumo-icons-undo: "\\ea27";
      --lumo-icons-unordered-list: "\\ea28";
      --lumo-icons-upload: "\\ea29";
      --lumo-icons-user: "\\ea2a";
    }
  </style>
`;document.head.appendChild(Nce.content);var Yur=Ci`
  :host {
    --lumo-size-xs: 1.625rem;
    --lumo-size-s: 1.875rem;
    --lumo-size-m: 2.25rem;
    --lumo-size-l: 2.75rem;
    --lumo-size-xl: 3.5rem;

    /* Icons */
    --lumo-icon-size-s: 1.25em;
    --lumo-icon-size-m: 1.5em;
    --lumo-icon-size-l: 2.25em;
    /* For backwards compatibility */
    --lumo-icon-size: var(--lumo-icon-size-m);
  }
`,Dce=document.createElement("template");Dce.innerHTML=`<style>${Yur.toString().replace(":host","html")}</style>`;document.head.appendChild(Dce.content);var jur=Ci`
  :host {
    /* Square */
    --lumo-space-xs: 0.25rem;
    --lumo-space-s: 0.5rem;
    --lumo-space-m: 1rem;
    --lumo-space-l: 1.5rem;
    --lumo-space-xl: 2.5rem;

    /* Wide */
    --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
    --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
    --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
    --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
    --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);

    /* Tall */
    --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
    --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
    --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
    --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
    --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
  }
`,Oce=document.createElement("template");Oce.innerHTML=`<style>${jur.toString().replace(":host","html")}</style>`;document.head.appendChild(Oce.content);var Xur=Ci`
  :host {
    /* Border radius */
    --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
    --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
    --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
    --lumo-border-radius: 0.25em; /* Deprecated */

    /* Shadow */
    --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
    --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
    --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
    --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
    --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);

    /* Clickable element cursor */
    --lumo-clickable-cursor: default;
  }
`,zce=document.createElement("template");zce.innerHTML=`<style>${Xur.toString().replace(":host","html")}</style>`;document.head.appendChild(zce.content);var $ur=Ci`
  :host {
    /* prettier-ignore */
    --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';

    /* Font sizes */
    --lumo-font-size-xxs: 0.75rem;
    --lumo-font-size-xs: 0.8125rem;
    --lumo-font-size-s: 0.875rem;
    --lumo-font-size-m: 1rem;
    --lumo-font-size-l: 1.125rem;
    --lumo-font-size-xl: 1.375rem;
    --lumo-font-size-xxl: 1.75rem;
    --lumo-font-size-xxxl: 2.5rem;

    /* Line heights */
    --lumo-line-height-xs: 1.25;
    --lumo-line-height-s: 1.375;
    --lumo-line-height-m: 1.625;
  }
`,Fce=document.createElement("template");Fce.innerHTML=`<style>${$ur.toString().replace(":host","html")}</style>`;document.head.appendChild(Fce.content);var Kur=Ci`
  html {
    font-family: var(--lumo-font-family);
    font-size: var(--lumo-font-size, var(--lumo-font-size-m));
    line-height: var(--lumo-line-height-m);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */
  :host {
    font-family: var(--lumo-font-family);
    font-size: var(--lumo-font-size, var(--lumo-font-size-m));
    line-height: var(--lumo-line-height-m);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  small,
  [theme~='font-size-s'] {
    font-size: var(--lumo-font-size-s);
    line-height: var(--lumo-line-height-s);
  }

  [theme~='font-size-xs'] {
    font-size: var(--lumo-font-size-xs);
    line-height: var(--lumo-line-height-xs);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 600;
    line-height: var(--lumo-line-height-xs);
    margin-top: 1.25em;
  }

  h1 {
    font-size: var(--lumo-font-size-xxxl);
    margin-bottom: 0.75em;
  }

  h2 {
    font-size: var(--lumo-font-size-xxl);
    margin-bottom: 0.5em;
  }

  h3 {
    font-size: var(--lumo-font-size-xl);
    margin-bottom: 0.5em;
  }

  h4 {
    font-size: var(--lumo-font-size-l);
    margin-bottom: 0.5em;
  }

  h5 {
    font-size: var(--lumo-font-size-m);
    margin-bottom: 0.25em;
  }

  h6 {
    font-size: var(--lumo-font-size-xs);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  p,
  blockquote {
    margin-top: 0.5em;
    margin-bottom: 0.75em;
  }

  a {
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  hr {
    display: block;
    align-self: stretch;
    height: 1px;
    border: 0;
    padding: 0;
    margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
    background-color: var(--lumo-contrast-10pct);
  }

  blockquote {
    border-left: 2px solid var(--lumo-contrast-30pct);
  }

  b,
  strong {
    font-weight: 600;
  }

  /* RTL specific styles */

  blockquote[dir='rtl'] {
    border-left: none;
    border-right: 2px solid var(--lumo-contrast-30pct);
  }
`;jc("",Kur,{moduleId:"lumo-typography"});jc("vaadin-checkbox",Ci`
    :host {
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
      cursor: default;
      outline: none;
    }

    [part='label']:not([empty]) {
      margin: 0.1875em 0.875em 0.1875em 0.375em;
    }

    [part='checkbox'] {
      width: calc(1em + 2px);
      height: calc(1em + 2px);
      margin: 0.1875em;
      position: relative;
      border-radius: var(--lumo-border-radius-s);
      background-color: var(--lumo-contrast-20pct);
      transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
      pointer-events: none;
      line-height: 1.2;
    }

    :host([indeterminate]) [part='checkbox'],
    :host([checked]) [part='checkbox'] {
      background-color: var(--lumo-primary-color);
    }

    /* Needed to align the checkbox nicely on the baseline */
    [part='checkbox']::before {
      content: '\\2003';
    }

    /* Checkmark */
    [part='checkbox']::after {
      content: '';
      display: inline-block;
      width: 0;
      height: 0;
      border: 0 solid var(--lumo-primary-contrast-color);
      border-width: 0.1875em 0 0 0.1875em;
      box-sizing: border-box;
      transform-origin: 0 0;
      position: absolute;
      top: 0.8125em;
      left: 0.5em;
      transform: scale(0.55) rotate(-135deg);
      opacity: 0;
    }

    :host([checked]) [part='checkbox']::after {
      opacity: 1;
      width: 0.625em;
      height: 1.0625em;
    }

    /* Indeterminate checkmark */
    :host([indeterminate]) [part='checkbox']::after {
      transform: none;
      opacity: 1;
      top: 45%;
      height: 10%;
      left: 22%;
      right: 22%;
      width: auto;
      border: 0;
      background-color: var(--lumo-primary-contrast-color);
      transition: opacity 0.25s;
    }

    /* Focus ring */
    :host([focus-ring]) [part='checkbox'] {
      box-shadow: 0 0 0 3px var(--lumo-primary-color-50pct);
    }

    /* Disabled */
    :host([disabled]) {
      pointer-events: none;
      color: var(--lumo-disabled-text-color);
    }

    :host([disabled]) [part='label'] ::slotted(*) {
      color: inherit;
    }

    :host([disabled]) [part='checkbox'] {
      background-color: var(--lumo-contrast-10pct);
    }

    :host([disabled]) [part='checkbox']::after {
      border-color: var(--lumo-contrast-30pct);
    }

    :host([indeterminate][disabled]) [part='checkbox']::after {
      background-color: var(--lumo-contrast-30pct);
    }

    /* RTL specific styles */
    :host([dir='rtl']) [part='label']:not([empty]) {
      margin: 0.1875em 0.375em 0.1875em 0.875em;
    }

    /* Transition the checkmark if activated with the mouse (disabled for grid select-all this way) */
    :host(:hover) [part='checkbox']::after {
      transition: width 0.1s, height 0.25s;
    }

    /* Used for activation "halo" */
    [part='checkbox']::before {
      color: transparent;
      display: inline-block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background-color: inherit;
      transform: scale(1.4);
      opacity: 0;
      transition: transform 0.1s, opacity 0.8s;
    }

    /* Hover */
    :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
      background-color: var(--lumo-contrast-30pct);
    }

    /* Disable hover for touch devices */
    @media (pointer: coarse) {
      :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
        background-color: var(--lumo-contrast-20pct);
      }
    }

    /* Active */
    :host([active]) [part='checkbox'] {
      transform: scale(0.9);
      transition-duration: 0.05s;
    }

    :host([active][checked]) [part='checkbox'] {
      transform: scale(1.1);
    }

    :host([active]:not([checked])) [part='checkbox']::before {
      transition-duration: 0.01s, 0.01s;
      transform: scale(0);
      opacity: 0.4;
    }
  `,{moduleId:"lumo-checkbox"});var Bce=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(r,n,i){super.attributeChangedCallback(r,n,i),r==="theme"&&this._setTheme(i)}};var XH=e=>class extends Bce(e){static finalize(){super.finalize();let r=this.prototype._template,n=Object.getPrototypeOf(this.prototype)._template;n&&Array.from(n.content.querySelectorAll("style[include]")).forEach(i=>{this._includeStyle(i.getAttribute("include"),r)}),this._includeMatchingThemes(r)}static _includeMatchingThemes(r){let i=ou.prototype.modules,o=!1,a=this.is+"-default-theme";Object.keys(i).sort((s,l)=>{let c=s.indexOf("vaadin-")===0,u=l.indexOf("vaadin-")===0,h=["lumo-","material-"],f=h.filter(d=>s.indexOf(d)===0).length>0,p=h.filter(d=>l.indexOf(d)===0).length>0;return c!==u?c?-1:1:f!==p?f?-1:1:0}).forEach(s=>{if(s!==a){let l=i[s].getAttribute("theme-for");l&&l.split(" ").forEach(c=>{new RegExp("^"+c.split("*").join(".*")+"$").test(this.is)&&(o=!0,this._includeStyle(s,r))})}}),!o&&i[a]&&this._includeStyle(a,r)}static _includeStyle(r,n){if(n&&!n.content.querySelector(`style[include="${r}"]`)){let i=document.createElement("style");i.setAttribute("include",r),n.content.appendChild(i)}}};var kct=!1;window.addEventListener("keydown",()=>{kct=!0},{capture:!0});window.addEventListener("mousedown",()=>{kct=!1},{capture:!0});var Zur=e=>class extends e{static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}}}},Hce=e=>class extends Zur(e){static get properties(){return{autofocus:{type:Boolean},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:{type:Boolean}}}ready(){this.addEventListener("focusin",r=>{r.composedPath()[0]===this?this.contains(r.relatedTarget)||this._focus():r.composedPath().indexOf(this.focusElement)!==-1&&!this.disabled&&this._setFocused(!0)}),this.addEventListener("focusout",()=>this._setFocused(!1)),super.ready(),this.addEventListener("keydown",r=>{!r.defaultPrevented&&r.keyCode===9&&r.shiftKey&&(this._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(this),this._setFocused(!1),setTimeout(()=>this._isShiftTabbing=!1,0))}),this.autofocus&&!this.disabled&&window.requestAnimationFrame(()=>{this._focus(),this._setFocused(!0),this.setAttribute("focus-ring","")})}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(r){r?this.setAttribute("focused",""):this.removeAttribute("focused"),r&&kct?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}get focusElement(){return window.console.warn(`Please implement the 'focusElement' property in <${this.localName}>`),this}_focus(){!this.focusElement||this._isShiftTabbing||(this.focusElement.focus(),this._setFocused(!0))}focus(){!this.focusElement||this.disabled||(this.focusElement.focus(),this._setFocused(!0))}blur(){!this.focusElement||(this.focusElement.blur(),this._setFocused(!1))}_disabledChanged(r){this.focusElement.disabled=r,r?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(typeof this._previousTabIndex!="undefined"&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}_tabindexChanged(r){r!==void 0&&(this.focusElement.tabIndex=r),this.disabled&&this.tabindex&&(this.tabindex!==-1&&(this._previousTabIndex=this.tabindex),this.tabindex=r=void 0)}click(){this.disabled||super.click()}};var Jur=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,$H=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Qur(){function e(){return!0}return Vce(e)}function thr(){try{return ehr()?!0:rhr()?$H?!nhr():!Qur():!1}catch(e){return!1}}function ehr(){return localStorage.getItem("vaadin.developmentmode.force")}function rhr(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function nhr(){return!!($H&&Object.keys($H).map(t=>$H[t]).filter(t=>t.productionMode).length>0)}function Vce(e,t){if(typeof e!="function")return;let r=Jur.exec(e.toString());if(r)try{e=new Function(r[1])}catch(n){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",n)}return e(t)}window.Vaadin=window.Vaadin||{};var Rct=function(e,t){if(window.Vaadin.developmentMode)return Vce(e,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=thr());function ihr(){}var Uce=function(){if(typeof Rct=="function")return Rct(ihr)};var _3=class{static detectScrollType(){let t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let r="reverse";return t.scrollLeft>0?r="default":(t.scrollLeft=2,t.scrollLeft<2&&(r="negative")),document.body.removeChild(t),r}static getNormalizedScrollLeft(t,r,n){let{scrollLeft:i}=n;if(r!=="rtl"||!t)return i;switch(t){case"negative":return n.scrollWidth-n.clientWidth+i;case"reverse":return n.scrollWidth-n.clientWidth-i}return i}static setNormalizedScrollLeft(t,r,n,i){if(r!=="rtl"||!t){n.scrollLeft=i;return}switch(t){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+i;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-i;break;default:n.scrollLeft=i;break}}};var T0=[],ohr=function(){let e=Dct();T0.forEach(t=>{Nct(t,e)})},KH,ahr=new MutationObserver(ohr);ahr.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var Nct=function(e,t,r=e.getAttribute("dir")){t?e.setAttribute("dir",t):r!=null&&e.removeAttribute("dir")},Dct=function(){return document.documentElement.getAttribute("dir")},ZH=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0}}}static finalize(){super.finalize(),KH||(KH=_3.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Nct(this,Dct(),null))}attributeChangedCallback(r,n,i){if(super.attributeChangedCallback(r,n,i),r!=="dir")return;let o=Dct(),a=i===o&&T0.indexOf(this)===-1,s=!i&&n&&T0.indexOf(this)===-1;a||s?(this.__subscribe(),Nct(this,o,i)):i!==o&&n===o&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(r,n,i){i==="dir"&&n===""&&!r.hasAttribute("dir")||super._valueToNodeAttribute(r,n,i)}_attributeToProperty(r,n,i){r==="dir"&&!n?this.dir="":super._attributeToProperty(r,n,i)}__subscribe(r=!0){r?T0.indexOf(this)===-1&&T0.push(this):T0.indexOf(this)>-1&&T0.splice(T0.indexOf(this),1)}__getNormalizedScrollLeft(r){return _3.getNormalizedScrollLeft(KH,this.getAttribute("dir")||"ltr",r)}__setNormalizedScrollLeft(r,n){return _3.setNormalizedScrollLeft(KH,this.getAttribute("dir")||"ltr",r,n)}};window.Vaadin=window.Vaadin||{};window.Vaadin.registrations=window.Vaadin.registrations||[];window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{};window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Uce()};var Oct,qce=new Set,JH=e=>class extends ZH(e){static finalize(){super.finalize();let{is:r}=this;r&&!qce.has(r)&&(window.Vaadin.registrations.push(this),qce.add(r),window.Vaadin.developmentModeCallback&&(Oct=sr.debounce(Oct,kx,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),Jl(Oct)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};var QH=class extends JH(Hce(XH(vh(mt)))){static get template(){return Q`
      <style>
        :host {
          display: inline-block;
        }

        :host([hidden]) {
          display: none !important;
        }

        label {
          display: inline-flex;
          align-items: baseline;
          outline: none;
        }

        [part='checkbox'] {
          position: relative;
          display: inline-block;
          flex: none;
        }

        input[type='checkbox'] {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          width: 100%;
          height: 100%;
          opacity: 0;
          cursor: inherit;
          margin: 0;
        }

        :host([disabled]) {
          -webkit-tap-highlight-color: transparent;
        }
      </style>

      <label>
        <span part="checkbox">
          <input
            type="checkbox"
            checked="{{checked::change}}"
            disabled$="[[disabled]]"
            indeterminate="{{indeterminate::change}}"
            role="presentation"
            tabindex="-1"
          />
        </span>

        <span part="label">
          <slot></slot>
        </span>
      </label>
    `}static get is(){return"vaadin-checkbox"}static get version(){return"20.0.2"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},indeterminate:{type:Boolean,notify:!0,observer:"_indeterminateChanged",reflectToAttribute:!0,value:!1},value:{type:String,value:"on"},_nativeCheckbox:{type:Object}}}constructor(){super(),this.name}get name(){return this.checked?this._storedName:""}set name(t){this._storedName=t}ready(){super.ready(),this.setAttribute("role","checkbox"),this._nativeCheckbox=this.shadowRoot.querySelector('input[type="checkbox"]'),this.addEventListener("click",this._handleClick.bind(this)),this._addActiveListeners();let t=this.getAttribute("name");t&&(this.name=t),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){let t=this.shadowRoot.querySelector('[part~="label"]'),r=t.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(r)?t.setAttribute("empty",""):t.removeAttribute("empty")}_isAssignedNodesEmpty(t){return t.length===0||t.length==1&&t[0].nodeType==Node.TEXT_NODE&&t[0].textContent.trim()===""}_checkedChanged(t){this.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",Boolean(t))}_indeterminateChanged(t){t?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",this.checked)}_addActiveListeners(){this._addEventListenerToNode(this,"down",t=>{this.__interactionsAllowed(t)&&this.setAttribute("active","")}),this._addEventListenerToNode(this,"up",()=>this.removeAttribute("active")),this.addEventListener("keydown",t=>{this.__interactionsAllowed(t)&&t.keyCode===32&&(t.preventDefault(),this.setAttribute("active",""))}),this.addEventListener("keyup",t=>{this.__interactionsAllowed(t)&&t.keyCode===32&&(t.preventDefault(),this._toggleChecked(),this.removeAttribute("active"),this.indeterminate&&(this.indeterminate=!1))})}get focusElement(){return this.shadowRoot.querySelector("input")}__interactionsAllowed(t){return!(this.disabled||t.target.localName==="a")}_handleClick(t){this.__interactionsAllowed(t)&&(this.indeterminate?(this.indeterminate=!1,t.preventDefault(),this._toggleChecked()):t.composedPath()[0]!==this._nativeCheckbox&&(t.preventDefault(),this._toggleChecked()))}_toggleChecked(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{composed:!1,bubbles:!0}))}};customElements.define(QH.is,QH);jc("vaadin-grid",Ci`
    :host {
      font-family: var(--lumo-font-family);
      font-size: var(--lumo-font-size-m);
      line-height: var(--lumo-line-height-s);
      color: var(--lumo-body-text-color);
      background-color: var(--lumo-base-color);
      box-sizing: border-box;
      -webkit-text-size-adjust: 100%;
      -webkit-tap-highlight-color: transparent;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;

      /* For internal use only */
      --_lumo-grid-border-color: var(--lumo-contrast-20pct);
      --_lumo-grid-secondary-border-color: var(--lumo-contrast-10pct);
      --_lumo-grid-border-width: 1px;
      --_lumo-grid-selected-row-color: var(--lumo-primary-color-10pct);
    }

    /* No (outer) border */

    :host(:not([theme~='no-border'])) {
      border: var(--_lumo-grid-border-width) solid var(--_lumo-grid-border-color);
    }

    /* Cell styles */

    [part~='cell'] {
      min-height: var(--lumo-size-m);
      background-color: var(--lumo-base-color);
    }

    [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      cursor: default;
      padding: var(--lumo-space-xs) var(--lumo-space-m);
    }

    /* Apply row borders by default and introduce the "no-row-borders" variant */
    :host(:not([theme~='no-row-borders'])) [part~='cell']:not([part~='details-cell']) {
      border-top: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    /* Hide first body row top border */
    :host(:not([theme~='no-row-borders'])) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
      border-top: 0;
      min-height: calc(var(--lumo-size-m) - var(--_lumo-grid-border-width));
    }

    /* Focus-ring */

    [part~='cell']:focus {
      outline: none;
    }

    :host([navigating]) [part~='cell']:focus::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      pointer-events: none;
      box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
    }

    /* Drag and Drop styles */
    :host([dragover])::after {
      content: '';
      position: absolute;
      z-index: 100;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      pointer-events: none;
      box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
    }

    [part~='row'][dragover] {
      z-index: 100 !important;
    }

    [part~='row'][dragover] [part~='cell'] {
      overflow: visible;
    }

    [part~='row'][dragover] [part~='cell']::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      height: calc(var(--_lumo-grid-border-width) + 2px);
      pointer-events: none;
      background: var(--lumo-primary-color-50pct);
    }

    :host([theme~='no-row-borders']) [dragover] [part~='cell']::after {
      height: 2px;
    }

    [part~='row'][dragover='below'] [part~='cell']::after {
      top: 100%;
      bottom: auto;
      margin-top: -1px;
    }

    [part~='row'][dragover='above'] [part~='cell']::after {
      top: auto;
      bottom: 100%;
      margin-bottom: -1px;
    }

    [part~='row'][details-opened][dragover='below'] [part~='cell']:not([part~='details-cell'])::after,
    [part~='row'][details-opened][dragover='above'] [part~='details-cell']::after {
      display: none;
    }

    [part~='row'][dragover][dragover='on-top'] [part~='cell']::after {
      height: 100%;
    }

    [part~='row'][dragstart] {
      /* Add bottom-space to the row so the drag number doesn't get clipped. Needed for IE/Edge */
      border-bottom: 100px solid transparent;
      z-index: 100 !important;
      opacity: 0.9;
    }

    [part~='row'][dragstart] [part~='cell'] {
      border: none !important;
      box-shadow: none !important;
    }

    [part~='row'][dragstart] [part~='cell'][last-column] {
      border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
    }

    [part~='row'][dragstart] [part~='cell'][first-column] {
      border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
    }

    [ios] [part~='row'][dragstart] [part~='cell'] {
      background: var(--lumo-primary-color-50pct);
    }

    #scroller:not([ios]) [part~='row'][dragstart]:not([dragstart=''])::after {
      display: block;
      position: absolute;
      left: var(--_grid-drag-start-x);
      top: var(--_grid-drag-start-y);
      z-index: 100;
      content: attr(dragstart);
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      padding: calc(var(--lumo-space-xs) * 0.8);
      color: var(--lumo-error-contrast-color);
      background-color: var(--lumo-error-color);
      border-radius: var(--lumo-border-radius-m);
      font-family: var(--lumo-font-family);
      font-size: var(--lumo-font-size-xxs);
      line-height: 1;
      font-weight: 500;
      text-transform: initial;
      letter-spacing: initial;
      min-width: calc(var(--lumo-size-s) * 0.7);
      text-align: center;
    }

    /* Headers and footers */

    [part~='header-cell'] ::slotted(vaadin-grid-cell-content),
    [part~='footer-cell'] ::slotted(vaadin-grid-cell-content),
    [part~='reorder-ghost'] {
      font-size: var(--lumo-font-size-s);
      font-weight: 500;
    }

    [part~='footer-cell'] ::slotted(vaadin-grid-cell-content) {
      font-weight: 400;
    }

    [part='row']:only-child [part~='header-cell'] {
      min-height: var(--lumo-size-xl);
    }

    /* Header borders */

    /* Hide first header row top border */
    :host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='header-cell'] {
      border-top: 0;
    }

    [part='row']:last-child [part~='header-cell'] {
      border-bottom: var(--_lumo-grid-border-width) solid transparent;
    }

    :host(:not([theme~='no-row-borders'])) [part='row']:last-child [part~='header-cell'] {
      border-bottom-color: var(--_lumo-grid-secondary-border-color);
    }

    /* Overflow uses a stronger border color */
    :host([overflow~='top']) [part='row']:last-child [part~='header-cell'] {
      border-bottom-color: var(--_lumo-grid-border-color);
    }

    /* Footer borders */

    [part='row']:first-child [part~='footer-cell'] {
      border-top: var(--_lumo-grid-border-width) solid transparent;
    }

    :host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='footer-cell'] {
      border-top-color: var(--_lumo-grid-secondary-border-color);
    }

    /* Overflow uses a stronger border color */
    :host([overflow~='bottom']) [part='row']:first-child [part~='footer-cell'] {
      border-top-color: var(--_lumo-grid-border-color);
    }

    /* Column reordering */

    :host([reordering]) [part~='cell'] {
      background: linear-gradient(var(--lumo-shade-20pct), var(--lumo-shade-20pct)) var(--lumo-base-color);
    }

    :host([reordering]) [part~='cell'][reorder-status='allowed'] {
      background: var(--lumo-base-color);
    }

    :host([reordering]) [part~='cell'][reorder-status='dragging'] {
      background: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)) var(--lumo-base-color);
    }

    [part~='reorder-ghost'] {
      opacity: 0.85;
      box-shadow: var(--lumo-box-shadow-s);
      /* TODO Use the same styles as for the cell element (reorder-ghost copies styles from the cell element) */
      padding: var(--lumo-space-s) var(--lumo-space-m) !important;
    }

    /* Column resizing */

    [part='resize-handle'] {
      width: 3px;
      background-color: var(--lumo-primary-color-50pct);
      opacity: 0;
      transition: opacity 0.2s;
    }

    :host(:not([reordering])) *:not([column-resizing]) [part~='cell']:hover [part='resize-handle'],
    [part='resize-handle']:active {
      opacity: 1;
      transition-delay: 0.15s;
    }

    /* Column borders */

    :host([theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
      border-right: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    /* Frozen columns */

    [last-frozen] {
      border-right: var(--_lumo-grid-border-width) solid transparent;
      overflow: hidden;
    }

    :host([overflow~='left']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
      border-right-color: var(--_lumo-grid-border-color);
    }

    /* Row stripes */

    :host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='body-cell'],
    :host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='details-cell'] {
      background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
      background-repeat: repeat-x;
    }

    /* Selected row */

    /* Raise the selected rows above unselected rows (so that box-shadow can cover unselected rows) */
    :host(:not([reordering])) [part~='row'][selected] {
      z-index: 1;
    }

    :host(:not([reordering])) [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
      background-image: linear-gradient(var(--_lumo-grid-selected-row-color), var(--_lumo-grid-selected-row-color));
      background-repeat: repeat;
    }

    /* Cover the border of an unselected row */
    :host(:not([theme~='no-row-borders'])) [part~='row'][selected] [part~='cell']:not([part~='details-cell']) {
      box-shadow: 0 var(--_lumo-grid-border-width) 0 0 var(--_lumo-grid-selected-row-color);
    }

    /* Compact */

    :host([theme~='compact']) [part='row']:only-child [part~='header-cell'] {
      min-height: var(--lumo-size-m);
    }

    :host([theme~='compact']) [part~='cell'] {
      min-height: var(--lumo-size-s);
    }

    :host([theme~='compact']) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
      min-height: calc(var(--lumo-size-s) - var(--_lumo-grid-border-width));
    }

    :host([theme~='compact']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      padding: var(--lumo-space-xs) var(--lumo-space-s);
    }

    /* Wrap cell contents */

    :host([theme~='wrap-cell-content']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      white-space: normal;
    }

    /* RTL specific styles */

    :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][last-column] {
      border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
    }

    :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][first-column] {
      border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
    }

    :host([dir='rtl'][theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
      border-right: none;
      border-left: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    :host([dir='rtl']) [last-frozen] {
      border-right: none;
      border-left: var(--_lumo-grid-border-width) solid transparent;
    }

    :host([dir='rtl'][overflow~='right']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
      border-left-color: var(--_lumo-grid-border-color);
    }
  `,{moduleId:"lumo-grid"});jc("vaadin-checkbox",Ci`
    :host(.vaadin-grid-select-all-checkbox) {
      font-size: var(--lumo-font-size-m);
    }
  `,{moduleId:"vaadin-grid-select-all-checkbox-lumo"});var Gce=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),shr=Gce&&Gce[1]>=8,Wce=3,Yce=h9({behaviors:[Qs,v9],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedVirtualIndex:-1,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){e=e%this._physicalCount,e<0&&(e=this._physicalCount+e),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let e=this._firstVisibleIndexVal;if(e==null){let t=this._physicalTop+this._scrollOffset;e=this._iterateItems(function(r,n){if(t+=this._physicalSizes[r],t>this._scrollPosition)return n})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let e=this._lastVisibleIndexVal;if(e==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems(function(r,n){t<this._scrollBottom&&(e=n),t+=this._physicalSizes[r]}),this._lastVisibleIndexVal=e}return e},get _scrollOffset(){return this._scrollerPaddingTop},attached:function(){this._debounce("_render",this._render,Ni),this.listen(this,"iron-resize","_resizeHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler")},updateViewportBoundaries:function(){let e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean(e.direction==="rtl"),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight},_scrollHandler:function(){let e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,r=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t=t-this._scrollOffset;let n=Math.round(t/this._physicalAverage);this._virtualStart=this._virtualStart+n,this._physicalStart=this._physicalStart+n,this._physicalTop=Math.floor(this._virtualStart)*this._physicalAverage,this._update()}else if(this._physicalCount>0){let{physicalTop:n,indexes:i}=this._getReusables(r);r?(this._physicalTop=n,this._virtualStart=this._virtualStart+i.length,this._physicalStart=this._physicalStart+i.length):(this._virtualStart=this._virtualStart-i.length,this._physicalStart=this._physicalStart-i.length),this._update(i,r?null:i),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),li)}},_getReusables:function(e){let t,r,n,i=[],o=this._hiddenContentSize*this._ratio,a=this._virtualStart,s=this._virtualEnd,l=this._physicalCount,c=this._physicalTop+this._scrollOffset,u=this._physicalBottom+this._scrollOffset,h=this._scrollTop,f=this._scrollBottom;for(e?(t=this._physicalStart,r=h-c):(t=this._physicalEnd,r=u-f);n=this._physicalSizes[t],r=r-n,!(i.length>=l||r<=o);)if(e){if(s+i.length+1>=this._virtualCount||c+n>=h-this._scrollOffset)break;i.push(t),c=c+n,t=(t+1)%l}else{if(a-i.length<=0||c+this._physicalSize-n<=f)break;i.push(t),c=c-n,t=t===0?l-1:t-1}return{indexes:i,physicalTop:c-this._scrollOffset}},_update:function(e,t){if(!(e&&e.length===0||this._physicalCount===0)){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){let r=t.pop();this._physicalTop-=this._physicalSizes[r]}this._positionItems(),this._updateScrollerSize()}},_isClientFull:function(){return this._scrollBottom!=0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){let r=this._clamp(this._physicalCount+e,Wce,this._virtualCount-this._virtualStart)-this._physicalCount,n=Math.round(this._physicalCount*.5);if(!(r<0)){if(r>0){let i=window.performance.now();[].push.apply(this._physicalItems,this._createPool(r));for(let o=0;o<r;o++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+r,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+r),this._update(),this._templateCost=(window.performance.now()-i)/r,n=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||n===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,n)),kx):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,n),li))}},_render:function(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){let{physicalTop:e,indexes:t}=this._getReusables(!0);this._physicalTop=e,this._virtualStart=this._virtualStart+t.length,this._physicalStart=this._physicalStart+t.length,this._update(t),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(Wce))},_itemsChanged:function(e){e.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Ni))},_iterateItems:function(e,t){let r,n,i,o;if(arguments.length===2&&t){for(o=0;o<t.length;o++)if(r=t[o],n=this._computeVidx(r),(i=e.call(this,r,n))!=null)return i}else{for(r=this._physicalStart,n=this._virtualStart;r<this._physicalCount;r++,n++)if((i=e.call(this,r,n))!=null)return i;for(r=0;r<this._physicalStart;r++,n++)if((i=e.call(this,r,n))!=null)return i}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_updateMetrics:function(e){if(!this._isVisible)return;ci();let t=0,r=0,n=this._physicalAverageCount,i=this._physicalAverage;this._iterateItems(function(o){r+=this._physicalSizes[o],this._physicalSizes[o]=this._physicalItems[o].offsetHeight,t+=this._physicalSizes[o],this._physicalAverageCount+=this._physicalSizes[o]?1:0},e),this._physicalSize=this._physicalSize+t-r,this._physicalAverageCount!==n&&(this._physicalAverage=Math.round((i*n+t)/this._physicalAverageCount))},_positionItems:function(){this._adjustScrollPosition();let e=this._physicalTop;this._iterateItems(function(t){this.translate3d(0,e+"px",0,this._physicalItems[t]),e+=this._physicalSizes[t]})},_adjustScrollPosition:function(){let e=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(e!==0){this._physicalTop=this._physicalTop-e;let t=this._scrollTop;!shr&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,e=e||this._scrollHeight===0,e=e||this._scrollPosition>=this._estScrollHeight-this._physicalSize,(e||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToIndex:function(e){if(typeof e!="number"||e<0||e>this.items.length-1||(ci(),this._physicalCount===0))return;e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart)*this._physicalAverage;let t=this._physicalStart,r=this._virtualStart,n=0,i=this._hiddenContentSize;for(;r<e&&n<=i;)n=n+this._physicalSizes[t],t=(t+1)%this._physicalCount,r++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+n),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this.updateViewportBoundaries(),this._isVisible?(this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Ni)},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:function(e,t,r){return Math.min(r,Math.max(t,e))},_debounce:function(e,t,r){this._debouncers=this._debouncers||{},this._debouncers[e]=sr.debounce(this._debouncers[e],r,t.bind(this)),Jl(this._debouncers[e])}});var tV=class extends Yce{static get properties(){return{size:{type:Number,notify:!0},_vidxOffset:{type:Number,value:0}}}static get observers(){return["_effectiveSizeChanged(_effectiveSize)"]}connectedCallback(){super.connectedCallback(),this._scrollHandler()}_updateScrollerItem(){}_afterScroll(){}_getRowTarget(){}_createScrollerRows(){}_canPopulate(){}scrollToIndex(t){this._warnPrivateAPIAccess("scrollToIndex"),this._scrollingToIndex=!0,t=Math.min(Math.max(t,0),this._effectiveSize-1),this.$.table.scrollTop=t/this._effectiveSize*(this.$.table.scrollHeight-this.$.table.offsetHeight),this._scrollHandler(),this._accessIronListAPI(()=>this._maxScrollTop)&&this._virtualCount<this._effectiveSize&&this._adjustVirtualIndexOffset(1e6),this._accessIronListAPI(()=>super.scrollToIndex(t-this._vidxOffset)),this._scrollHandler();let r=Array.from(this.$.items.children).filter(n=>n.index===t)[0];if(r){let n=r.getBoundingClientRect().top-this.$.header.getBoundingClientRect().bottom;Math.abs(n)>1&&(this.$.table.scrollTop+=n,this._scrollHandler())}this._scrollingToIndex=!1}_effectiveSizeChanged(t){let r,n=0;this._iterateItems((i,o)=>{if(o===this._firstVisibleIndex){let a=this._physicalItems[i];r=a.index,n=a.getBoundingClientRect().top}}),this.items&&t<this.items.length&&(this._scrollTop=0),Array.isArray(this.items)||(this.items={length:Math.min(t,1e5)}),this._accessIronListAPI(()=>super._itemsChanged({path:"items"})),this._virtualCount=Math.min(this.items.length,t)||0,this._scrollTop===0&&(this._accessIronListAPI(()=>this._scrollToIndex(Math.min(t-1,r))),this._iterateItems(i=>{let o=this._physicalItems[i];if(o.index===r&&(this.$.table.scrollTop+=Math.round(o.getBoundingClientRect().top-n)),o.index===this._focusedItemIndex&&this._itemsFocusable&&this.$.items.contains(this.shadowRoot.activeElement)){let a=Array.from(this._itemsFocusable.parentElement.children).indexOf(this._itemsFocusable);o.children[a].focus()}})),this._assignModels(),requestAnimationFrame(()=>this._update()),this.__updateFooterPositioning()}_positionItems(){this._adjustScrollPosition();let t;isNaN(this._physicalTop)&&(t=!0,this._physicalTop=0);let r=this._physicalTop;this._iterateItems(n=>{this._physicalItems[n].style.transform=`translateY(${r}px)`,r+=this._physicalSizes[n]}),t&&this._scrollToIndex(0)}_increasePoolIfNeeded(t){t===0&&this._scrollingToIndex||!this._canPopulate()||!this._effectiveSize||(this._initialPoolCreated?this._optPhysicalSize!==1/0&&(this._debounceIncreasePool=sr.debounce(this._debounceIncreasePool,Ni,()=>{this._updateMetrics();let r=this._optPhysicalSize-this._physicalSize,n=Math.ceil(r/this._physicalAverage);this._physicalCount+n>this._effectiveSize&&(n=Math.max(0,this._effectiveSize-this._physicalCount)),this._physicalSize&&n>0&&this._optPhysicalSize!==1/0&&(super._increasePoolIfNeeded(n),this.__reorderChildNodes())})):(this._initialPoolCreated=!0,super._increasePoolIfNeeded(25)))}__reorderChildNodes(){let t=Array.from(this.$.items.childNodes);!!t.reduce((n,i,o,a)=>{if(o===0||a[o-1].index===i.index-1)return n},!0)||t.sort((n,i)=>n.index-i.index).forEach(n=>this.$.items.appendChild(n))}_createPool(t){let r=document.createDocumentFragment(),n=this._createScrollerRows(t);n.forEach(o=>r.appendChild(o)),this._getRowTarget().appendChild(r);let i=this.querySelector("[slot]");if(i){let o=i.getAttribute("slot");i.setAttribute("slot","foo-bar"),i.setAttribute("slot",o)}return Cm(this,()=>this.notifyResize()),n}_assignModels(t){this._iterateItems((r,n)=>{let i=this._physicalItems[r];this._toggleAttribute("hidden",n>=this._effectiveSize,i),this._updateScrollerItem(i,n+(this._vidxOffset||0))},t)}_scrollHandler(){let t=this.$.table.scrollTop-this._scrollPosition;this._accessIronListAPI(super._scrollHandler);let r=this._vidxOffset;this._accessIronListAPI(()=>this._maxScrollTop)&&this._virtualCount<this._effectiveSize?this._adjustVirtualIndexOffset(t):this._vidxOffset=0,this._vidxOffset!==r&&this._update(),this._afterScroll()}_adjustVirtualIndexOffset(t){if(Math.abs(t)>1e4){if(this._noScale){this._noScale=!1;return}let r=this.$.table.scrollTop/(this.$.table.scrollHeight-this.$.table.offsetHeight),n=r*this._effectiveSize;this._vidxOffset=Math.round(n-r*this._virtualCount)}else{let r=this._vidxOffset||0,n=1e3,i=100;this._scrollTop===0?(this._vidxOffset=0,r!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<n&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),r!==this._vidxOffset&&super.scrollToIndex(this.firstVisibleIndex+(r-this._vidxOffset)),this._noScale=!0);let o=this._effectiveSize-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,r!==this._vidxOffset&&super.scrollToIndex(this._virtualCount)):this.firstVisibleIndex>this._virtualCount-n&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),r!==this._vidxOffset&&super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-r)),this._noScale=!0)}}_accessIronListAPI(t){this._warnPrivateAPIAccessAsyncEnabled=!1;let r=t.apply(this);return this._debouncerWarnPrivateAPIAccess=sr.debounce(this._debouncerWarnPrivateAPIAccess,Ni,()=>this._warnPrivateAPIAccessAsyncEnabled=!0),r}_debounceRender(t,r){super._debounceRender(()=>this._accessIronListAPI(t),r)}_warnPrivateAPIAccess(t){this._warnPrivateAPIAccessAsyncEnabled&&console.warn(`Accessing private API (${t})!`)}_render(){this._accessIronListAPI(super._render)}_itemsChanged(){}get _firstVisibleIndex(){return this._accessIronListAPI(()=>super.firstVisibleIndex)}get _lastVisibleIndex(){return this._accessIronListAPI(()=>super.lastVisibleIndex)}_scrollToIndex(t){this._accessIronListAPI(()=>this.scrollToIndex(t))}get firstVisibleIndex(){return this._warnPrivateAPIAccess("firstVisibleIndex"),super.firstVisibleIndex}set firstVisibleIndex(t){this._warnPrivateAPIAccess("firstVisibleIndex"),super.firstVisibleIndex=t}get lastVisibleIndex(){return this._warnPrivateAPIAccess("lastVisibleIndex"),super.lastVisibleIndex}set lastVisibleIndex(t){this._warnPrivateAPIAccess("lastVisibleIndex"),super.lastVisibleIndex=t}updateViewportBoundaries(){this._warnPrivateAPIAccess("updateViewportBoundaries"),super.updateViewportBoundaries.apply(this,arguments)}_resizeHandler(){super._resizeHandler(),ci()}};var jce=e=>class extends e{static get observers(){return["_a11yUpdateGridSize(size, _columnTree, _columnTree.*)"]}_a11yGetHeaderRowCount(r){return r.filter(n=>n.some(i=>i._headerTemplate||i.headerRenderer||i.path||i.header)).length}_a11yGetFooterRowCount(r){return r.filter(n=>n.some(i=>i._headerTemplate||i.headerRenderer)).length}_a11yUpdateGridSize(r,n){if(r===void 0||n===void 0)return;let i=n[n.length-1];this.$.table.setAttribute("aria-rowcount",r+this._a11yGetHeaderRowCount(n)+this._a11yGetFooterRowCount(n)),this.$.table.setAttribute("aria-colcount",i&&i.length||0),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows()}_a11yUpdateHeaderRows(){Array.from(this.$.header.children).forEach((r,n)=>r.setAttribute("aria-rowindex",n+1))}_a11yUpdateFooterRows(){Array.from(this.$.footer.children).forEach((r,n)=>r.setAttribute("aria-rowindex",this._a11yGetHeaderRowCount(this._columnTree)+this.size+n+1))}_a11yUpdateRowRowindex(r,n){r.setAttribute("aria-rowindex",n+this._a11yGetHeaderRowCount(this._columnTree)+1)}_a11yUpdateRowSelected(r,n){r.setAttribute("aria-selected",Boolean(n)),Array.from(r.children).forEach(i=>i.setAttribute("aria-selected",Boolean(n)))}_a11yUpdateRowLevel(r,n){r.setAttribute("aria-level",n+1)}_a11yUpdateRowDetailsOpened(r,n){Array.from(r.children).forEach(i=>{typeof n=="boolean"?i.setAttribute("aria-expanded",n):i.hasAttribute("aria-expanded")&&i.removeAttribute("aria-expanded")})}_a11ySetRowDetailsCell(r,n){Array.from(r.children).forEach(i=>{i!==n&&i.setAttribute("aria-controls",n.id)})}_a11yUpdateCellColspan(r,n){r.setAttribute("aria-colspan",Number(n))}_a11yUpdateSorters(){Array.from(this.querySelectorAll("vaadin-grid-sorter")).forEach(r=>{let n=r.parentNode;for(;n&&n.localName!=="vaadin-grid-cell-content";)n=n.parentNode;n&&n.assignedSlot&&n.assignedSlot.parentNode.setAttribute("aria-sort",{asc:"ascending",desc:"descending"}[String(r.direction)]||"none")})}};var Xce=e=>class extends e{static get properties(){return{activeItem:{type:Object,notify:!0,value:null}}}ready(){super.ready(),this.$.scroller.addEventListener("click",this._onClick.bind(this)),this.addEventListener("cell-activate",this._activateItem.bind(this))}_activateItem(r){let n=r.detail.model,i=n?n.item:null;i&&(this.activeItem=this._itemsEqual(this.activeItem,i)?null:i)}_onClick(r){if(r.defaultPrevented)return;let n=r.composedPath(),i=n[n.indexOf(this.$.table)-3];if(!i||i.getAttribute("part").indexOf("details-cell")>-1)return;let o=i._content,a=this.getRootNode().activeElement;!o.contains(a)&&!this._isFocusable(r.target)&&this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(i.parentElement)}}))}_isFocusable(r){return lhr(r)}},lhr=e=>{if(!e.parentNode)return!1;let r=Array.from(e.parentNode.querySelectorAll("[tabindex], button, input, select, textarea, object, iframe, label, a[href], area[href]")).filter(n=>n.getAttribute("part")!=="cell body-cell").indexOf(e)!==-1;return!e.disabled&&r};var $ce=e=>class extends e{static get properties(){return{items:Array}}static get observers(){return["_itemsChanged(items, items.*, isAttached)"]}_itemsChanged(r,n,i){if(!!i){if(!Array.isArray(r)){r==null&&(this.size=0),this.dataProvider===this._arrayDataProvider&&(this.dataProvider=void 0);return}this.size=r.length,this.dataProvider=this.dataProvider||this._arrayDataProvider,this.clearCache(),this._ensureFirstPageLoaded()}}_arrayDataProvider(r,n){let i=(Array.isArray(this.items)?this.items:[]).slice(0);this._filters&&this._checkPaths(this._filters,"filtering",i)&&(i=this._filter(i)),this.size=i.length,r.sortOrders.length&&this._checkPaths(this._sorters,"sorting",i)&&(i=i.sort(this._multiSort.bind(this)));let o=r.page*r.pageSize,a=o+r.pageSize,s=i.slice(o,a);n(s,i.length)}_checkPaths(r,n,i){if(!i.length)return!1;let o=!0;for(let a in r){let s=r[a].path;if(!s||s.indexOf(".")===-1)continue;let l=s.replace(/\.[^.]*$/,"");Oa.get(l,i[0])===void 0&&(console.warn(`Path "${s}" used for ${n} does not exist in all of the items, ${n} is disabled.`),o=!1)}return o}_multiSort(r,n){return this._sorters.map(i=>i.direction==="asc"?this._compare(Oa.get(i.path,r),Oa.get(i.path,n)):i.direction==="desc"?this._compare(Oa.get(i.path,n),Oa.get(i.path,r)):0).reduce((i,o)=>i||o,0)}_normalizeEmptyValue(r){return[void 0,null].indexOf(r)>=0?"":isNaN(r)?r.toString():r}_compare(r,n){return r=this._normalizeEmptyValue(r),n=this._normalizeEmptyValue(n),r<n?-1:r>n?1:0}_filter(r){return r.filter(n=>this._filters.filter(i=>{let o=this._normalizeEmptyValue(Oa.get(i.path,n)),a=this._normalizeEmptyValue(i.value).toString().toLowerCase();return o.toString().toLowerCase().indexOf(a)===-1}).length===0)}};var Kce=e=>class extends vh(e){ready(){super.ready();let r=this.$.scroller;Tm(r,"track",this._onHeaderTrack.bind(this)),r.addEventListener("touchmove",n=>r.hasAttribute("column-resizing")&&n.preventDefault()),r.addEventListener("contextmenu",n=>n.target.getAttribute("part")=="resize-handle"&&n.preventDefault()),r.addEventListener("mousedown",n=>n.target.getAttribute("part")==="resize-handle"&&n.preventDefault())}_onHeaderTrack(r){let n=r.target;if(n.getAttribute("part")==="resize-handle"){let o=n.parentElement._column;for(this._toggleAttribute("column-resizing",!0,this.$.scroller);o.localName==="vaadin-grid-column-group";)o=Array.prototype.slice.call(o._childColumns,0).sort(function(l,c){return l._order-c._order}).filter(function(l){return!l.hidden}).pop();let a=Array.from(this.$.header.querySelectorAll('[part~="row"]:last-child [part~="cell"]')),s=a.filter(l=>l._column===o)[0];if(s.offsetWidth){let l=window.getComputedStyle(s),c=10+parseInt(l.paddingLeft)+parseInt(l.paddingRight)+parseInt(l.borderLeftWidth)+parseInt(l.borderRightWidth)+parseInt(l.marginLeft)+parseInt(l.marginRight),u=s.offsetWidth+(this.__isRTL?s.getBoundingClientRect().left-r.detail.x:r.detail.x-s.getBoundingClientRect().right);o.width=Math.max(c,u)+"px",o.flexGrow=0}a.sort(function(l,c){return l._column._order-c._column._order}).forEach(function(l,c,u){c<u.indexOf(s)&&(l._column.width=l.offsetWidth+"px",l._column.flexGrow=0)}),r.detail.state==="end"&&(this._toggleAttribute("column-resizing",!1,this.$.scroller),this.dispatchEvent(new CustomEvent("column-resize",{detail:{resizedColumn:o}}))),this._resizeHandler()}}};var Zce=class Jce{constructor(t,r,n){this.grid=t,this.parentCache=r,this.parentItem=n,this.itemCaches={},this.items={},this.effectiveSize=0,this.size=0,this.pendingRequests={}}isLoading(){return Boolean(Object.keys(this.pendingRequests).length||Object.keys(this.itemCaches).filter(t=>this.itemCaches[t].isLoading())[0])}getItemForIndex(t){let{cache:r,scaledIndex:n}=this.getCacheAndIndex(t);return r.items[n]}updateSize(){this.effectiveSize=!this.parentItem||this.grid._isExpanded(this.parentItem)?this.size+Object.keys(this.itemCaches).reduce((t,r)=>{let n=this.itemCaches[r];return n.updateSize(),t+n.effectiveSize},0):0}ensureSubCacheForScaledIndex(t){if(!this.itemCaches[t]){let r=new Jce(this.grid,this,this.items[t]);this.itemCaches[t]=r,this.grid._loadPage(0,r)}}getCacheAndIndex(t){let r=t,n=Object.keys(this.itemCaches);for(let i=0;i<n.length;i++){let o=Number(n[i]),a=this.itemCaches[o];if(r<=o)return{cache:this,scaledIndex:r};if(r<=o+a.effectiveSize)return a.getCacheAndIndex(r-o-1);r-=a.effectiveSize}return{cache:this,scaledIndex:r}}},Qce=e=>class extends e{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object,notify:!0,observer:"_dataProviderChanged"},loading:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0},_cache:{type:Object,value:function(){return new Zce(this)}},itemIdPath:{type:String,value:null},expandedItems:{type:Object,notify:!0,value:()=>[]}}}static get observers(){return["_sizeChanged(size)","_itemIdPathChanged(itemIdPath)","_expandedItemsChanged(expandedItems.*)"]}_sizeChanged(r){let n=r-this._cache.size;this._cache.size+=n,this._cache.effectiveSize+=n,this._effectiveSize=this._cache.effectiveSize,this._increasePoolIfNeeded(0),this._debounceIncreasePool&&this._debounceIncreasePool.flush()}_getItem(r,n){if(r>=this._effectiveSize)return;n.index=r;let{cache:i,scaledIndex:o}=this._cache.getCacheAndIndex(r),a=i.items[o];a?(this._toggleAttribute("loading",!1,n),this._updateItem(n,a),this._isExpanded(a)&&i.ensureSubCacheForScaledIndex(o)):(this._toggleAttribute("loading",!0,n),this._loadPage(this._getPageForIndex(o),i))}_expandedInstanceChangedCallback(r,n){r.item!==void 0&&(n?this.expandItem(r.item):this.collapseItem(r.item))}getItemId(r){return this.itemIdPath?this.get(this.itemIdPath,r):r}_isExpanded(r){return this.__expandedKeys.has(this.getItemId(r))}_expandedItemsChanged(){this.__cacheExpandedKeys(),this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,this._assignModels()}_itemIdPathChanged(){this.__cacheExpandedKeys()}__cacheExpandedKeys(){this.expandedItems&&(this.__expandedKeys=new Set,this.expandedItems.forEach(r=>{this.__expandedKeys.add(this.getItemId(r))}))}expandItem(r){this._isExpanded(r)||(this.expandedItems=[...this.expandedItems,r])}collapseItem(r){this._isExpanded(r)&&(this.expandedItems=this.expandedItems.filter(n=>!this._itemsEqual(n,r)))}_getIndexLevel(r){let{cache:n}=this._cache.getCacheAndIndex(r),i=0;for(;n.parentCache;)n=n.parentCache,i++;return i}_canPopulate(){return Boolean(this._hasData&&this._columnTree)}_loadPage(r,n){if(!n.pendingRequests[r]&&this.dataProvider){this._setLoading(!0),n.pendingRequests[r]=!0;let i={page:r,pageSize:this.pageSize,sortOrders:this._mapSorters(),filters:this._mapFilters(),parentItem:n.parentItem};this._debounceIncreasePool&&this._debounceIncreasePool.flush(),this.dataProvider(i,(o,a)=>{a!==void 0?n.size=a:i.parentItem&&(n.size=o.length);let s=Array.from(this.$.items.children).map(l=>l._item);o.forEach((l,c)=>{let u=r*this.pageSize+c;n.items[u]=l,this._isExpanded(l)&&s.indexOf(l)>-1&&n.ensureSubCacheForScaledIndex(u)}),this._hasData=!0,delete n.pendingRequests[r],this._debouncerApplyCachedData=sr.debounce(this._debouncerApplyCachedData,mo.after(0),()=>{this._setLoading(!1),this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,Array.from(this.$.items.children).filter(l=>!l.hidden).forEach(l=>{this._cache.getItemForIndex(l.index)&&this._getItem(l.index,l)}),this._increasePoolIfNeeded(0),this.__scrollToPendingIndex()}),this._cache.isLoading()||this._debouncerApplyCachedData.flush(),this.__itemsReceived()})}}_getPageForIndex(r){return Math.floor(r/this.pageSize)}clearCache(){this._cache=new Zce(this),Array.from(this.$.items.children).forEach(r=>{Array.from(r.children).forEach(n=>{n._instance&&n._instance._setPendingProperty("item",{},!1)})}),this._cache.size=this.size||0,this._cache.updateSize(),this._hasData=!1,this._assignModels(),(!this._effectiveSize||!this._initialPoolCreated)&&this._loadPage(0,this._cache)}_pageSizeChanged(r,n){n!==void 0&&r!==n&&this.clearCache()}_checkSize(){this.size===void 0&&this._effectiveSize===0&&console.warn("The <vaadin-grid> needs the total number of items in order to display rows. Set the total number of items to the `size` property, or provide the total number of items in the second argument of the `dataProvider`\u2019s `callback` call.")}_dataProviderChanged(r,n){n!==void 0&&this.clearCache(),r&&this.items&&this.items.length&&this._scrollToIndex(this._firstVisibleIndex),this._ensureFirstPageLoaded(),this._debouncerCheckSize=sr.debounce(this._debouncerCheckSize,mo.after(2e3),this._checkSize.bind(this)),this._scrollHandler()}_ensureFirstPageLoaded(){this._hasData||this._loadPage(0,this._cache)}_itemsEqual(r,n){return this.getItemId(r)===this.getItemId(n)}_getItemIndexInArray(r,n){let i=-1;return n.forEach((o,a)=>{this._itemsEqual(o,r)&&(i=a)}),i}scrollToIndex(r){super.scrollToIndex(r),!isNaN(r)&&(this._cache.isLoading()||!this.clientHeight)&&(this.__pendingScrollToIndex=r)}__scrollToPendingIndex(){if(this.__pendingScrollToIndex&&this.$.items.children.length){let r=this.__pendingScrollToIndex;delete this.__pendingScrollToIndex,this._debounceIncreasePool&&this._debounceIncreasePool.flush(),this.scrollToIndex(r)}}};var tue=e=>class extends e{ready(){super.ready(),this._addNodeObserver()}_hasColumnGroups(r){for(let n=0;n<r.length;n++)if(r[n].localName==="vaadin-grid-column-group")return!0;return!1}_getChildColumns(r){return xh.getFlattenedNodes(r).filter(this._isColumnElement)}_flattenColumnGroups(r){return r.map(n=>n.localName==="vaadin-grid-column-group"?this._getChildColumns(n):[n]).reduce((n,i)=>n.concat(i),[])}_getColumnTree(){let r=xh.getFlattenedNodes(this).filter(this._isColumnElement),n=[];for(let i=r;n.push(i),!!this._hasColumnGroups(i);)i=this._flattenColumnGroups(i);return n}_updateColumnTree(){let r=this._getColumnTree();this._arrayEquals(r,this._columnTree)||(this._columnTree=r)}_addNodeObserver(){this._observer=new xh(this,r=>{let n=r.addedNodes.filter(o=>o.localName==="template"&&o.classList.contains("row-details"))[0];n&&this._rowDetailsTemplate!==n&&(this._rowDetailsTemplate=n);let i=o=>o.filter(this._isColumnElement).length>0;if(i(r.addedNodes)||i(r.removedNodes)){let o=r.removedNodes.flatMap(s=>s._allCells),a=s=>o.filter(l=>l._content.contains(s)).length;this.__removeSorters(this._sorters.filter(a)),this.__removeFilters(this._filters.filter(a)),this._updateColumnTree()}this._debouncerCheckImports=sr.debounce(this._debouncerCheckImports,mo.after(2e3),this._checkImports.bind(this)),this._ensureFirstPageLoaded()})}_arrayEquals(r,n){if(!r||!n||r.length!=n.length)return!1;for(let i=0,o=r.length;i<o;i++)if(r[i]instanceof Array&&n[i]instanceof Array){if(!this._arrayEquals(r[i],n[i]))return!1}else if(r[i]!=n[i])return!1;return!0}_checkImports(){["vaadin-grid-column-group","vaadin-grid-filter","vaadin-grid-filter-column","vaadin-grid-tree-toggle","vaadin-grid-selection-column","vaadin-grid-sort-column","vaadin-grid-sorter"].forEach(r=>{let n=this.querySelector(r);n&&!(n instanceof mt)&&console.warn(`Make sure you have imported the required module for <${r}> element.`)})}_updateFirstAndLastColumn(){Array.from(this.shadowRoot.querySelectorAll("tr")).forEach(r=>this._updateFirstAndLastColumnForRow(r))}_updateFirstAndLastColumnForRow(r){Array.from(r.querySelectorAll('[part~="cell"]:not([part~="details-cell"])')).sort((n,i)=>n._column._order-i._column._order).forEach((n,i,o)=>{this._toggleAttribute("first-column",i===0,n),this._toggleAttribute("last-column",i===o.length-1,n)})}_isColumnElement(r){return r.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/.test(r.localName)}};var eue=e=>class extends e{getEventContext(r){let n={},i=r.composedPath(),o=i[i.indexOf(this.$.table)-3];return o&&(n.section=["body","header","footer","details"].filter(a=>o.getAttribute("part").indexOf(a)>-1)[0],o._column&&(n.column=o._column),(n.section==="body"||n.section==="details")&&Object.assign(n,this.__getRowModel(o.parentElement))),n}};var rue=e=>class extends e{static get properties(){return{_filters:{type:Array,value:function(){return[]}}}}ready(){super.ready(),this.addEventListener("filter-changed",this._filterChanged.bind(this))}_filterChanged(r){r.stopPropagation(),this.__addFilter(r.target),this.__applyFilters()}__removeFilters(r){r.length!=0&&(this._filters=this._filters.filter(n=>r.indexOf(n)<0),this.__applyFilters())}__addFilter(r){this._filters.indexOf(r)===-1&&this._filters.push(r)}__applyFilters(){this.dataProvider&&this.isAttached&&this.clearCache()}_mapFilters(){return this._filters.map(r=>({path:r.path,value:r.value}))}};var C0=class extends mt{static get is(){return"vaadin-grid-templatizer"}static get properties(){return{dataHost:Object,template:Object,_templateInstances:{type:Array,value:function(){return[]}},_parentPathValues:{value:function(){return{}}},_grid:Object}}static get observers(){return["_templateInstancesChanged(_templateInstances.*, _parentPathValues.*)"]}constructor(){super(),this._instanceProps={detailsOpened:!0,index:!0,item:!0,selected:!0,expanded:!0,level:!0}}createInstance(){this._ensureTemplatized();let t=new this._TemplateClass({});return this.addInstance(t),t}addInstance(t){this._templateInstances.indexOf(t)===-1&&(this._templateInstances.push(t),requestAnimationFrame(()=>this.notifyPath("_templateInstances.*",this._templateInstances)))}removeInstance(t){let r=this._templateInstances.indexOf(t);this.splice("_templateInstances",r,1)}_ensureTemplatized(){this._TemplateClass||(this._TemplateClass=tc(this.template,this,{instanceProps:this._instanceProps,parentModel:!0,forwardHostProp:function(t,r){this._forwardParentProp(t,r),this._templateInstances&&this._templateInstances.forEach(n=>n.notifyPath(t,r))},notifyInstanceProp:function(t,r,n){if(r==="index"||r==="item")return;let i=`__${r}__`;if(t[i]===n)return;t[i]=n;let o=Array.from(this._grid.$.items.children).filter(l=>this._grid._itemsEqual(l._item,t.item))[0];o&&Array.from(o.children).forEach(l=>{l._instance&&(l._instance[i]=n,l._instance.notifyPath(r,n))});let a="item.";if(Array.isArray(this._grid.items)&&r.indexOf(a)===0){let l=this._grid.items.indexOf(t.item),c=r.slice(a.length);this._grid.notifyPath(`items.${l}.${c}`,n)}let s=`_${r}InstanceChangedCallback`;this._grid&&this._grid[s]&&this._grid[s](t,n)}}))}_forwardParentProp(t,r){this._parentPathValues[t]=r,this._templateInstances.forEach(n=>n.notifyPath(t,r))}_templateInstancesChanged(t){let r,n;if(t.path==="_templateInstances")r=0,n=this._templateInstances.length;else if(t.path==="_templateInstances.splices")r=t.value.index,n=t.value.addedCount;else return;Object.keys(this._parentPathValues||{}).forEach(i=>{for(let o=r;o<r+n;o++)this._templateInstances[o].set(i,this._parentPathValues[i])})}};customElements.define(C0.is,C0);var nue=e=>class extends e{static get properties(){return{detailsOpenedItems:{type:Array,value:function(){return[]}},_rowDetailsTemplate:Object,rowDetailsRenderer:Function,_detailsCells:{type:Array}}}static get observers(){return["_detailsOpenedItemsChanged(detailsOpenedItems.*, _rowDetailsTemplate, rowDetailsRenderer)","_rowDetailsTemplateOrRendererChanged(_rowDetailsTemplate, rowDetailsRenderer)"]}_rowDetailsTemplateOrRendererChanged(r,n){if(r&&n)throw new Error("You should only use either a renderer or a template for row details");if(r||n){if(r&&!r.templatizer){let i=new C0;i._grid=this,i.dataHost=this.dataHost,i.template=r,r.templatizer=i}this._columnTree&&Array.from(this.$.items.children).forEach(i=>{i.querySelector("[part~=details-cell]")||(this._updateRow(i,this._columnTree[this._columnTree.length-1]),this._a11yUpdateRowDetailsOpened(i,!1)),delete i.querySelector("[part~=details-cell]")._instance}),this.detailsOpenedItems.length&&(Array.from(this.$.items.children).forEach(this._toggleDetailsCell,this),this._update())}}_detailsOpenedItemsChanged(r){r.path==="detailsOpenedItems.length"||!r.value||Array.from(this.$.items.children).forEach(n=>{this._toggleDetailsCell(n,n._item),this._a11yUpdateRowDetailsOpened(n,this._isDetailsOpened(n._item)),this._toggleAttribute("details-opened",this._isDetailsOpened(n._item),n)})}_configureDetailsCell(r){r.setAttribute("part","cell details-cell"),this._toggleAttribute("frozen",!0,r)}_toggleDetailsCell(r,n){let i=r.querySelector('[part~="details-cell"]');if(!i)return;let o=!this._isDetailsOpened(n),a=!!i.hidden!==o;(!i._instance&&!i._renderer||i.hidden!==o)&&(i.hidden=o,o?r.style.removeProperty("padding-bottom"):(this.rowDetailsRenderer?(i._renderer=this.rowDetailsRenderer,i._renderer.call(this,i._content,this,{index:r.index,item:n})):this._rowDetailsTemplate&&!i._instance&&(i._instance=this._rowDetailsTemplate.templatizer.createInstance(),i._content.innerHTML="",i._content.appendChild(i._instance.root),this._updateItem(r,n)),ci(),r.style.setProperty("padding-bottom",`${i.offsetHeight}px`),requestAnimationFrame(()=>this.notifyResize()))),a&&(this._updateMetrics(),this._positionItems())}_updateDetailsCellHeights(){Array.from(this.$.items.querySelectorAll('[part~="details-cell"]:not([hidden])')).forEach(r=>{r.parentElement.style.setProperty("padding-bottom",`${r.offsetHeight}px`)})}_isDetailsOpened(r){return this.detailsOpenedItems&&this._getItemIndexInArray(r,this.detailsOpenedItems)!==-1}openItemDetails(r){this._isDetailsOpened(r)||(this.detailsOpenedItems=[...this.detailsOpenedItems,r])}closeItemDetails(r){this._isDetailsOpened(r)&&(this.detailsOpenedItems=this.detailsOpenedItems.filter(n=>!this._itemsEqual(n,r)))}_detailsOpenedInstanceChangedCallback(r,n){n?this.openItemDetails(r.item):this.closeItemDetails(r.item)}};var zct={SCROLLING:500,IGNORE_WHEEL:500},iue=e=>class extends e{static get properties(){return{_frozenCells:{type:Array,value:()=>[]},_rowWithFocusedElement:Element,_deltaYAcc:{type:Number,value:0},_useSticky:{type:Boolean,value:window.CSS&&window.CSS.supports&&(window.CSS.supports("position","sticky")||window.CSS.supports("position","-webkit-sticky"))}}}static get observers(){return["_scrollViewportHeightUpdated(_viewportHeight)"]}set _scrollTop(r){this.$.table.scrollTop=r}get _scrollTop(){return this.$.table.scrollTop}constructor(){super(),this._scrollLineHeight=this._getScrollLineHeight()}_getScrollLineHeight(){let r=document.createElement("div");r.style.fontSize="initial",r.style.display="none",document.body.appendChild(r);let n=window.getComputedStyle(r).fontSize;return document.body.removeChild(r),n?window.parseInt(n):void 0}_scrollViewportHeightUpdated(r){this._scrollPageHeight=r-this.$.header.clientHeight-this.$.footer.clientHeight-this._scrollLineHeight}ready(){super.ready(),this.$.outerscroller=document.createElement("div"),this.scrollTarget=this.$.table,this.addEventListener("wheel",this._onWheel),this.$.items.addEventListener("focusin",r=>{let n=r.composedPath().indexOf(this.$.items);this._rowWithFocusedElement=r.composedPath()[n-1]}),this.$.items.addEventListener("focusout",()=>this._rowWithFocusedElement=void 0),this.scrollTarget.addEventListener("mousedown",()=>this.__mouseDown=!0),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&(this.__pendingReorder=!1,setTimeout(()=>this._reorderRows(),zct.SCROLLING))})}scrollToIndex(r){this._accessIronListAPI(()=>super.scrollToIndex(r))}_onWheel(r){if(r.ctrlKey||this._hasScrolledAncestor(r.target,r.deltaX,r.deltaY))return;let n=this.$.table,i=r.deltaY;if(r.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._scrollLineHeight:r.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._scrollPageHeight),this._wheelAnimationFrame){this._deltaYAcc+=i,r.preventDefault();return}i+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this._debouncerWheelAnimationFrame=sr.debounce(this._debouncerWheelAnimationFrame,Ni,()=>this._wheelAnimationFrame=!1);let o=Math.abs(r.deltaX)+Math.abs(i);this._canScroll(n,r.deltaX,i)?(r.preventDefault(),n.scrollTop+=i,n.scrollLeft+=r.deltaX,this._scrollHandler(),this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=sr.debounce(this._debouncerIgnoreNewWheel,mo.after(zct.IGNORE_WHEEL),()=>this._ignoreNewWheel=!1)):this._hasResidualMomentum&&o<=this._previousMomentum||this._ignoreNewWheel?r.preventDefault():o>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=o}_hasScrolledAncestor(r,n,i){if(r.localName==="vaadin-grid-cell-content")return!1;if(this._canScroll(r,n,i)&&["auto","scroll"].indexOf(getComputedStyle(r).overflow)!==-1)return!0;if(r!==this&&r.parentElement)return this._hasScrolledAncestor(r.parentElement,n,i)}_canScroll(r,n,i){return i>0&&r.scrollTop<r.scrollHeight-r.offsetHeight||i<0&&r.scrollTop>0||n>0&&r.scrollLeft<r.scrollWidth-r.offsetWidth||n<0&&r.scrollLeft>0}_scheduleScrolling(){this._scrollingFrame||(this._scrollingFrame=requestAnimationFrame(()=>this._toggleAttribute("scrolling",!0,this.$.scroller))),this._debounceScrolling=sr.debounce(this._debounceScrolling,mo.after(zct.SCROLLING),()=>{cancelAnimationFrame(this._scrollingFrame),delete this._scrollingFrame,this._toggleAttribute("scrolling",!1,this.$.scroller),this._reorderRows()})}_afterScroll(){this._translateStationaryElements(),this.hasAttribute("reordering")||this._scheduleScrolling(),this._updateOverflow()}_updateOverflow(){let r="",n=this.$.table;n.scrollTop<n.scrollHeight-n.clientHeight&&(r+=" bottom"),n.scrollTop>0&&(r+=" top"),n.scrollLeft<n.scrollWidth-n.clientWidth&&(r+=" right"),n.scrollLeft>0&&(r+=" left"),this._debounceOverflow=sr.debounce(this._debounceOverflow,Ni,()=>{let i=r.trim();i.length>0&&this.getAttribute("overflow")!==i?this.setAttribute("overflow",i):i.length==0&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")})}_reorderRows(){if(this.__mouseDown){this.__pendingReorder=!0;return}let r=this.$.items,n=r.querySelectorAll("tr");if(!n.length)return;let i=this._virtualStart+this._vidxOffset,o=this._rowWithFocusedElement||Array.from(n).filter(l=>!l.hidden)[0];if(!o)return;let a=o.index-i,s=Array.from(n).indexOf(o)-a;if(s>0)for(let l=0;l<s;l++)r.appendChild(n[l]);else if(s<0)for(let l=n.length+s;l<n.length;l++)r.insertBefore(n[l],n[0]);if(this._safari){let{transform:l}=this.$.header.style;this.$.header.style.transform="",setTimeout(()=>this.$.header.style.transform=l)}}_frozenCellsChanged(){this._debouncerCacheElements=sr.debounce(this._debouncerCacheElements,li,()=>{Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach(function(r){r.style.transform=""}),this._frozenCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen]")),this._updateScrollerMeasurements(),this._translateStationaryElements()}),this._updateLastFrozen()}_updateScrollerMeasurements(){this._frozenCells.length>0&&this.__isRTL&&(this.__scrollerMetrics={scrollWidth:this.$.table.scrollWidth,clientWidth:this.$.table.clientWidth})}_updateLastFrozen(){if(!this._columnTree)return;let r=this._columnTree[this._columnTree.length-1].slice(0);r.sort((i,o)=>i._order-o._order);let n=r.reduce((i,o,a)=>(o._lastFrozen=!1,o.frozen&&!o.hidden?a:i),void 0);n!==void 0&&(r[n]._lastFrozen=!0)}_translateStationaryElements(){let r=Math.max(0,this._scrollLeft),n=Math.max(0,this._scrollTop),i=0,o=0,a=0;if(this._useSticky||(i=r,o=n,a=this.$.table.clientHeight-this.$.footer.offsetHeight-this.$.footer.offsetTop),this.$.header.style.transform=this._getTranslate(-r+i,o),this.$.footer.style.transform=this._getTranslate(-r+i,o+a),this.$.items.style.transform=this._getTranslate(-r+i,0),this._frozenCells.length>0){let s=this.__isRTL?this.__getNormalizedScrollLeft(this.$.table)+this.__scrollerMetrics.clientWidth-this.__scrollerMetrics.scrollWidth:this._scrollLeft,l=this._getTranslate(s,0);for(let c=0;c<this._frozenCells.length;c++)this._frozenCells[c].style.transform=l}}_getTranslate(r,n){return`translate(${r}px, ${n}px)`}};var oue=e=>class extends e{static get properties(){return{selectedItems:{type:Object,notify:!0,value:()=>[]}}}static get observers(){return["_selectedItemsChanged(selectedItems.*)"]}_isSelected(r){return this.selectedItems&&this._getItemIndexInArray(r,this.selectedItems)>-1}selectItem(r){this._isSelected(r)||(this.selectedItems=[...this.selectedItems,r])}deselectItem(r){this._isSelected(r)&&(this.selectedItems=this.selectedItems.filter(n=>!this._itemsEqual(n,r)))}_toggleItem(r){this._getItemIndexInArray(r,this.selectedItems)===-1?this.selectItem(r):this.deselectItem(r)}_selectedItemsChanged(r){this.$.items.children.length&&(r.path==="selectedItems"||r.path==="selectedItems.splices")&&Array.from(this.$.items.children).forEach(n=>{this._updateItem(n,n._item)})}_selectedInstanceChangedCallback(r,n){n?this.selectItem(r.item):this.deselectItem(r.item)}};var aue=e=>class extends e{static get properties(){return{multiSort:{type:Boolean,value:!1},_sorters:{type:Array,value:function(){return[]}},_previousSorters:{type:Array,value:function(){return[]}}}}ready(){super.ready(),this.addEventListener("sorter-changed",this._onSorterChanged)}_onSorterChanged(r){let n=r.target;r.stopPropagation(),this.__updateSorter(n),this.__applySorters()}__removeSorters(r){r.length!=0&&(this._sorters=this._sorters.filter(n=>r.indexOf(n)<0),this.multiSort&&this.__updateSortOrders(),this.__applySorters())}__updateSortOrders(){this._sorters.forEach((r,n)=>r._order=this._sorters.length>1?n:null,this)}__updateSorter(r){if(!(!r.direction&&this._sorters.indexOf(r)===-1)){if(r._order=null,this.multiSort)this._removeArrayItem(this._sorters,r),r.direction&&this._sorters.unshift(r),this.__updateSortOrders();else if(r.direction){let n=this._sorters.filter(i=>i!=r);this._sorters=[r],n.forEach(i=>{i._order=null,i.direction=null})}}}__applySorters(){this.dataProvider&&this.isAttached&&JSON.stringify(this._previousSorters)!==JSON.stringify(this._mapSorters())&&this.clearCache(),this._a11yUpdateSorters(),this._previousSorters=this._mapSorters()}_mapSorters(){return this._sorters.map(r=>({path:r.path,direction:r.direction}))}_removeArrayItem(r,n){let i=r.indexOf(n);i>-1&&r.splice(i,1)}};var sue=e=>class extends e{static get properties(){return{cellClassNameGenerator:Function}}static get observers(){return["__cellClassNameGeneratorChanged(cellClassNameGenerator)"]}__cellClassNameGeneratorChanged(){this.generateCellClassNames()}generateCellClassNames(){Array.from(this.$.items.children).filter(r=>!r.hidden).forEach(r=>this._generateCellClassNames(r,this.__getRowModel(r)))}_generateCellClassNames(r,n){Array.from(r.children).forEach(i=>{if(i.__generatedClasses&&i.__generatedClasses.forEach(o=>i.classList.remove(o)),this.cellClassNameGenerator){let o=this.cellClassNameGenerator(i._column,n);i.__generatedClasses=o&&o.split(" ").filter(a=>a.length>0),i.__generatedClasses&&i.__generatedClasses.forEach(a=>i.classList.add(a))}})}};var TP={BETWEEN:"between",ON_TOP:"on-top",ON_TOP_OR_BETWEEN:"on-top-or-between",ON_GRID:"on-grid"},A0={ON_TOP:"on-top",ABOVE:"above",BELOW:"below",EMPTY:"empty"},lue=e=>class extends e{static get properties(){return{dropMode:String,rowsDraggable:Boolean,dragFilter:Function,dropFilter:Function,__dndAutoScrollThreshold:{value:50}}}static get observers(){return["_dragDropAccessChanged(rowsDraggable, dropMode, dragFilter, dropFilter)"]}ready(){super.ready(),this.$.table.addEventListener("dragstart",this._onDragStart.bind(this)),this.$.table.addEventListener("dragend",this._onDragEnd.bind(this)),this.$.table.addEventListener("dragover",this._onDragOver.bind(this)),this.$.table.addEventListener("dragleave",this._onDragLeave.bind(this)),this.$.table.addEventListener("drop",this._onDrop.bind(this)),this.$.table.addEventListener("dragenter",r=>{this.dropMode&&(r.preventDefault(),r.stopPropagation())})}_onDragStart(r){if(this.rowsDraggable){let n=r.target;if(n.localName==="vaadin-grid-cell-content"&&(n=n.assignedSlot.parentNode.parentNode),n.parentNode!==this.$.items)return;if(r.stopPropagation(),this._toggleAttribute("dragging-rows",!0,this),this._safari){let s=n.style.transform;n.style.top=/translateY\((.*)\)/.exec(s)[1],n.style.transform="none",requestAnimationFrame(()=>{n.style.top="",n.style.transform=s})}let i=n.getBoundingClientRect();this._ios?r.dataTransfer.setDragImage(n):r.dataTransfer.setDragImage(n,r.clientX-i.left,r.clientY-i.top);let o=[n];this._isSelected(n._item)&&(o=this.__getViewportRows().filter(s=>this._isSelected(s._item)).filter(s=>!this.dragFilter||this.dragFilter(this.__getRowModel(s)))),r.dataTransfer.setData("text",this.__formatDefaultTransferData(o)),n.setAttribute("dragstart",o.length>1?o.length:""),this.updateStyles({"--_grid-drag-start-x":`${r.clientX-i.left+20}px`,"--_grid-drag-start-y":`${r.clientY-i.top+10}px`}),requestAnimationFrame(()=>{n.removeAttribute("dragstart"),this.updateStyles({"--_grid-drag-start-x":"","--_grid-drag-start-y":""})});let a=new CustomEvent("grid-dragstart",{detail:{draggedItems:o.map(s=>s._item),setDragData:(s,l)=>r.dataTransfer.setData(s,l),setDraggedItemsCount:s=>n.setAttribute("dragstart",s)}});a.originalEvent=r,this.dispatchEvent(a)}}_onDragEnd(r){this._toggleAttribute("dragging-rows",!1,this),r.stopPropagation();let n=new CustomEvent("grid-dragend");n.originalEvent=r,this.dispatchEvent(n)}_onDragLeave(r){r.stopPropagation(),this._clearDragStyles()}_onDragOver(r){if(this.dropMode){if(this._dropLocation=void 0,this._dragOverItem=void 0,this.__dndAutoScroll(r.clientY)){this._clearDragStyles();return}let n=r.composedPath().filter(i=>i.localName==="tr")[0];if(!this._effectiveSize||this.dropMode===TP.ON_GRID)this._dropLocation=A0.EMPTY;else if(!n||n.parentNode!==this.$.items){if(n)return;if(this.dropMode===TP.BETWEEN||this.dropMode===TP.ON_TOP_OR_BETWEEN)n=Array.from(this.$.items.children).filter(i=>!i.hidden).pop(),this._dropLocation=A0.BELOW;else return}else{let i=n.getBoundingClientRect();if(this._dropLocation=A0.ON_TOP,this.dropMode===TP.BETWEEN){let o=r.clientY-i.top<i.bottom-r.clientY;this._dropLocation=o?A0.ABOVE:A0.BELOW}else this.dropMode===TP.ON_TOP_OR_BETWEEN&&(r.clientY-i.top<i.height/3?this._dropLocation=A0.ABOVE:r.clientY-i.top>i.height/3*2&&(this._dropLocation=A0.BELOW))}if(n&&n.hasAttribute("drop-disabled")){this._dropLocation=void 0;return}r.stopPropagation(),r.preventDefault(),this._dropLocation===A0.EMPTY?this._toggleAttribute("dragover",!0,this):n?(this._dragOverItem=n._item,n.getAttribute("dragover")!==this._dropLocation&&n.setAttribute("dragover",this._dropLocation)):this._clearDragStyles()}}__dndAutoScroll(r){if(this.__dndAutoScrolling)return!0;let n=this.$.header.getBoundingClientRect().bottom,i=this.$.footer.getBoundingClientRect().top,o=n-r+this.__dndAutoScrollThreshold,a=r-i+this.__dndAutoScrollThreshold,s=0;if(a>0?s=a*2:o>0&&(s=-o*2),s){let l=this.$.table.scrollTop;if(this.$.table.scrollTop+=s,l!==this.$.table.scrollTop)return this.__dndAutoScrolling=!0,setTimeout(()=>this.__dndAutoScrolling=!1,20),this._scrollHandler(),!0}}__getViewportRows(){let r=this.$.header.getBoundingClientRect().bottom,n=this.$.footer.getBoundingClientRect().top;return Array.from(this.$.items.children).filter(i=>{let o=i.getBoundingClientRect();return o.bottom>r&&o.top<n})}_clearDragStyles(){this.removeAttribute("dragover"),Array.from(this.$.items.children).forEach(r=>r.removeAttribute("dragover"))}_onDrop(r){if(this.dropMode){r.stopPropagation(),r.preventDefault();let n=r.dataTransfer.types&&Array.from(r.dataTransfer.types).map(o=>({type:o,data:r.dataTransfer.getData(o)}));this._clearDragStyles();let i=new CustomEvent("grid-drop",{bubbles:r.bubbles,cancelable:r.cancelable,detail:{dropTargetItem:this._dragOverItem,dropLocation:this._dropLocation,dragData:n}});i.originalEvent=r,this.dispatchEvent(i)}}__formatDefaultTransferData(r){return r.map(n=>Array.from(n.children).filter(i=>!i.hidden&&i.getAttribute("part").indexOf("details-cell")===-1).sort((i,o)=>i._column._order>o._column._order?1:-1).map(i=>i._content.textContent.trim()).filter(i=>i).join("	")).join(`
`)}_dragDropAccessChanged(){this.filterDragAndDrop()}filterDragAndDrop(){Array.from(this.$.items.children).filter(r=>!r.hidden).forEach(r=>{this._filterDragAndDrop(r,this.__getRowModel(r))})}_filterDragAndDrop(r,n){let i=!this.rowsDraggable||this.dragFilter&&!this.dragFilter(n),o=!this.dropMode||this.dropFilter&&!this.dropFilter(n);Array.from(r.children).map(s=>s._content).forEach(s=>{i?s.removeAttribute("draggable"):s.setAttribute("draggable",!0)}),this._toggleAttribute("drag-disabled",i,r),this._toggleAttribute("drop-disabled",o,r)}};var cue=e=>class extends e{static get properties(){return{_headerFocusable:{type:Object,observer:"_focusableChanged"},_itemsFocusable:{type:Object,observer:"_focusableChanged"},_footerFocusable:{type:Object,observer:"_focusableChanged"},_navigatingIsHidden:Boolean,_focusedItemIndex:{type:Number,value:0},_focusedColumnOrder:Number,interacting:{type:Boolean,value:!1,reflectToAttribute:!0,readOnly:!0,observer:"_interactingChanged"}}}ready(){super.ready(),!(this._ios||this._android)&&(this.addEventListener("keydown",this._onKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.$.table.addEventListener("focusin",this._onCellFocusIn.bind(this)),this.$.table.addEventListener("focusout",this._onCellFocusOut.bind(this)),this.addEventListener("mousedown",()=>{this._toggleAttribute("navigating",!1,this),this._isMousedown=!0}),this.addEventListener("mouseup",()=>this._isMousedown=!1))}_focusableChanged(r,n){n&&n.setAttribute("tabindex","-1"),r&&this._updateGridSectionFocusTarget(r)}_interactingChanged(){this._updateGridSectionFocusTarget(this._headerFocusable),this._updateGridSectionFocusTarget(this._itemsFocusable),this._updateGridSectionFocusTarget(this._footerFocusable)}_onKeyDown(r){let n=r.key,i;switch(n){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"PageUp":case"PageDown":case"Home":case"End":i="Navigation";break;case"Enter":case"Escape":case"F2":i="Interaction";break;case"Tab":i="Tab";break;case" ":i="Space";break}this._detectInteracting(r),this.interacting&&i!=="Interaction"&&(i=void 0),i&&this[`_on${i}KeyDown`](r,n)}_ensureScrolledToIndex(r){Array.from(this.$.items.children).filter(i=>i.index===r)[0]||this._scrollToIndex(r)}_onNavigationKeyDown(r,n){this._scrollHandler(),r.preventDefault();function i(B){return Array.prototype.indexOf.call(B.parentNode.children,B)}let o=this._lastVisibleIndex-this._firstVisibleIndex-1,a=0,s=0;switch(n){case"ArrowRight":a=this.__isRTL?-1:1;break;case"ArrowLeft":a=this.__isRTL?1:-1;break;case"Home":a=-1/0,r.ctrlKey&&(s=-1/0);break;case"End":a=1/0,r.ctrlKey&&(s=1/0);break;case"ArrowDown":s=1;break;case"ArrowUp":s=-1;break;case"PageDown":s=o;break;case"PageUp":s=-o;break}let l=r.composedPath()[0],c=i(l),u=this._elementMatches(l,'[part~="details-cell"]'),h=l.parentNode,f=h.parentNode,p=(f===this.$.items?this._effectiveSize:f.children.length)-1,d=f===this.$.items?this._focusedItemIndex!==void 0?this._focusedItemIndex:h.index:i(h),g=Math.max(0,Math.min(d+s,p)),_=!1;if(f===this.$.items){let B=h._item,I=this._cache.getItemForIndex(g);u?_=s===0:_=s===1&&this._isDetailsOpened(B)||s===-1&&g!==d&&this._isDetailsOpened(I),_!==u&&(s===1&&_||s===-1&&!_)&&(g=d)}if(f!==this.$.items){if(g>d)for(;g<p&&f.children[g].hidden;)g++;else if(g<d)for(;g>0&&f.children[g].hidden;)g--}this._focusedColumnOrder===void 0&&(u?this._focusedColumnOrder=0:this._focusedColumnOrder=this._getColumns(f,d).filter(B=>!B.hidden)[c]._order);let y=this._getColumns(f,g).filter(B=>!B.hidden),x=y.map(B=>B._order).sort((B,I)=>B-I),b=x.length-1,S=x.indexOf(x.slice(0).sort((B,I)=>Math.abs(B-this._focusedColumnOrder)-Math.abs(I-this._focusedColumnOrder))[0]),C=s===0&&u?S:Math.max(0,Math.min(S+a,b));C!==S&&(this._focusedColumnOrder=void 0),f===this.$.items&&this._ensureScrolledToIndex(g),this._toggleAttribute("navigating",!0,this);let k=y.reduce((B,I,L)=>(B[I._order]=L,B),{})[x[C]],O=f===this.$.items?Array.from(f.children).filter(B=>B.index===g)[0]:f.children[g];if(!O)return;let D=_?Array.from(O.children).filter(B=>this._elementMatches(B,'[part~="details-cell"]'))[0]:O.children[k];if(this._scrollHorizontallyToCell(D),f===this.$.items&&(this._focusedItemIndex=g),f===this.$.items){let B=D.getBoundingClientRect(),I=this.$.footer.getBoundingClientRect().top,L=this.$.header.getBoundingClientRect().bottom;B.bottom>I?(this.$.table.scrollTop+=B.bottom-I,this._scrollHandler()):B.top<L&&(this.$.table.scrollTop-=L-B.top,this._scrollHandler())}D.focus()}_onInteractionKeyDown(r,n){let i=r.composedPath()[0],o=i.localName==="input"&&!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/i.test(i.type),a;switch(n){case"Enter":a=this.interacting?!o:!0;break;case"Escape":a=!1;break;case"F2":a=!this.interacting;break}let{cell:s}=this._getGridEventLocation(r);if(this.interacting!==a&&s!==null)if(a){let l=s._content.querySelector("[focus-target]")||s._content.firstElementChild;l&&(r.preventDefault(),l.focus(),this._setInteracting(!0),this._toggleAttribute("navigating",!1,this))}else r.preventDefault(),this._focusedColumnOrder=void 0,s.focus(),this._setInteracting(!1),this._toggleAttribute("navigating",!0,this)}_predictFocusStepTarget(r,n){let i=[this.$.table,this._headerFocusable,this._itemsFocusable,this._footerFocusable,this.$.focusexit],o=i.indexOf(r);for(o+=n;o>=0&&o<=i.length-1&&(!i[o]||i[o].parentNode.hidden);)o+=n;return i[o]}_onTabKeyDown(r){let n=this._predictFocusStepTarget(r.composedPath()[0],r.shiftKey?-1:1);if(n===this.$.table)this.$.table.focus();else if(n===this.$.focusexit)this.$.focusexit.focus();else if(n===this._itemsFocusable){let i=n,o=this._itemsFocusable.parentNode;if(this._ensureScrolledToIndex(this._focusedItemIndex),o.index!==this._focusedItemIndex){let a=Array.from(o.children).indexOf(this._itemsFocusable),s=Array.from(this.$.items.children).filter(l=>l.index===this._focusedItemIndex)[0];s&&(i=s.children[a])}r.preventDefault(),i.focus()}else r.preventDefault(),n.focus();this._toggleAttribute("navigating",!0,this)}_onSpaceKeyDown(r){r.preventDefault();let n=r.composedPath()[0];(!n._content||!n._content.firstElementChild)&&this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(n.parentElement)}}))}_onKeyUp(r){if(!/^( |SpaceBar)$/.test(r.key))return;r.preventDefault();let n=r.composedPath()[0];if(n._content&&n._content.firstElementChild){let i=this.hasAttribute("navigating");n._content.firstElementChild.click(),this._toggleAttribute("navigating",i,this)}}_onFocusIn(r){this._isMousedown||this._toggleAttribute("navigating",!0,this);let n=r.composedPath()[0];n===this.$.table||n===this.$.focusexit?(this._predictFocusStepTarget(n,n===this.$.table?1:-1).focus(),this._setInteracting(!1)):this._detectInteracting(r)}_onFocusOut(r){this._toggleAttribute("navigating",!1,this),this._detectInteracting(r)}_onCellFocusIn(r){let{section:n,cell:i}=this._getGridEventLocation(r);this._detectInteracting(r),n&&i&&(this._activeRowGroup=n,this.$.header===n?this._headerFocusable=i:this.$.items===n?this._itemsFocusable=i:this.$.footer===n&&(this._footerFocusable=i),i._content.dispatchEvent(new CustomEvent("cell-focusin",{bubbles:!1})),i.dispatchEvent(new CustomEvent("cell-focus",{bubbles:!0,composed:!0}))),this._detectFocusedItemIndex(r)}_onCellFocusOut(r){r.composedPath().indexOf(this.$.table)===3&&r.composedPath()[0]._content.dispatchEvent(new CustomEvent("cell-focusout",{bubbles:!1}))}_detectInteracting(r){let n=r.composedPath().some(i=>i.localName==="vaadin-grid-cell-content");this._setInteracting(n)}_detectFocusedItemIndex(r){let{section:n,row:i}=this._getGridEventLocation(r);n===this.$.items&&(this._focusedItemIndex=i.index)}_updateGridSectionFocusTarget(r){if(!r)return;let n=this._getGridSectionFromFocusTarget(r),i=this.interacting&&n===this._activeRowGroup;r.tabIndex=i?-1:0}_preventScrollerRotatingCellFocus(r,n){r.index===this._focusedItemIndex&&this.hasAttribute("navigating")&&this._activeRowGroup===this.$.items&&(this._navigatingIsHidden=!0,this._toggleAttribute("navigating",!1,this)),n===this._focusedItemIndex&&this._navigatingIsHidden&&(this._navigatingIsHidden=!1,this._toggleAttribute("navigating",!0,this))}_getColumns(r,n){let i=this._columnTree.length-1;return r===this.$.header?i=n:r===this.$.footer&&(i=this._columnTree.length-1-n),this._columnTree[i]}_resetKeyboardNavigation(){if(this.$.header.firstElementChild&&(this._headerFocusable=Array.from(this.$.header.firstElementChild.children).filter(r=>!r.hidden)[0]),this.$.items.firstElementChild){let r=this._iterateItems((n,i)=>{if(this._firstVisibleIndex===i)return this.$.items.children[n]});r&&(this._itemsFocusable=Array.from(r.children).filter(n=>!n.hidden)[0])}this.$.footer.firstElementChild&&(this._footerFocusable=Array.from(this.$.footer.firstElementChild.children).filter(r=>!r.hidden)[0])}_scrollHorizontallyToCell(r){if(r.hasAttribute("frozen")||this._elementMatches(r,'[part~="details-cell"]'))return;let n=r.getBoundingClientRect(),i=r.parentNode,o=Array.from(i.children).indexOf(r),a=this.$.table.getBoundingClientRect(),s=a.left,l=a.right;for(let c=o-1;c>=0;c--){let u=i.children[c];if(!(u.hasAttribute("hidden")||this._elementMatches(u,'[part~="details-cell"]'))&&u.hasAttribute("frozen")){s=u.getBoundingClientRect().right;break}}for(let c=o+1;c<i.children.length;c++){let u=i.children[c];if(!(u.hasAttribute("hidden")||this._elementMatches(u,'[part~="details-cell"]'))&&u.hasAttribute("frozen")){l=u.getBoundingClientRect().left;break}}n.left<s&&(this.$.table.scrollLeft+=Math.round(n.left-s)),n.right>l&&(this.$.table.scrollLeft+=Math.round(n.right-l))}_elementMatches(r,n){return r.matches?r.matches(n):Array.from(r.parentNode.querySelectorAll(n)).indexOf(r)!==-1}_getGridEventLocation(r){let n=r.composedPath(),i=n.indexOf(this.$.table),o=i>=1?n[i-1]:null,a=i>=2?n[i-2]:null,s=i>=3?n[i-3]:null;return{section:o,row:a,cell:s}}_getGridSectionFromFocusTarget(r){return r===this._headerFocusable?this.$.header:r===this._itemsFocusable?this.$.items:r===this._footerFocusable?this.$.footer:null}};function uue(e,t,r){let n=1;e.forEach(i=>{n%10===0&&n++,i._order=r+n*t,n++})}var hue=e=>class extends vh(e){static get properties(){return{columnReorderingAllowed:{type:Boolean,value:!1},_orderBaseScope:{type:Number,value:1e7}}}static get observers(){return["_updateOrders(_columnTree, _columnTree.*)"]}ready(){super.ready(),Tm(this,"track",this._onTrackEvent),this._reorderGhost=this.shadowRoot.querySelector('[part="reorder-ghost"]'),this.addEventListener("touchstart",this._onTouchStart.bind(this)),this.addEventListener("touchmove",this._onTouchMove.bind(this)),this.addEventListener("touchend",this._onTouchEnd.bind(this)),this.addEventListener("contextmenu",this._onContextMenu.bind(this))}_onContextMenu(r){this.hasAttribute("reordering")&&r.preventDefault()}_onTouchStart(r){this._startTouchReorderTimeout=setTimeout(()=>{this._onTrackStart({detail:{x:r.touches[0].clientX,y:r.touches[0].clientY}})},100)}_onTouchMove(r){this._draggedColumn&&r.preventDefault(),clearTimeout(this._startTouchReorderTimeout)}_onTouchEnd(){clearTimeout(this._startTouchReorderTimeout),this._onTrackEnd()}_onTrackEvent(r){if(r.detail.state==="start"){let n=r.composedPath(),i=n[n.indexOf(this.$.header)-2];if(!i||!i._content||i._content.contains(this.getRootNode().activeElement)||this.$.scroller.hasAttribute("column-resizing"))return;this._touchDevice||this._onTrackStart(r)}else r.detail.state==="track"?this._onTrack(r):r.detail.state==="end"&&this._onTrackEnd(r)}_onTrackStart(r){if(!this.columnReorderingAllowed)return;let n=r.composedPath&&r.composedPath();if(n&&n.filter(o=>o.hasAttribute&&o.hasAttribute("draggable"))[0])return;let i=this._cellFromPoint(r.detail.x,r.detail.y);if(!(!i||i.getAttribute("part").indexOf("header-cell")===-1)){for(this._toggleAttribute("reordering",!0,this),this._draggedColumn=i._column;this._draggedColumn.parentElement.childElementCount===1;)this._draggedColumn=this._draggedColumn.parentElement;this._setSiblingsReorderStatus(this._draggedColumn,"allowed"),this._draggedColumn._reorderStatus="dragging",this._updateGhost(i),this._reorderGhost.style.visibility="visible",this._updateGhostPosition(r.detail.x,this._touchDevice?r.detail.y-50:r.detail.y),this._autoScroller()}}_onTrack(r){if(!this._draggedColumn)return;let n=this._cellFromPoint(r.detail.x,r.detail.y);if(!n)return;let i=this._getTargetColumn(n,this._draggedColumn);this._isSwapAllowed(this._draggedColumn,i)&&this._isSwappableByPosition(i,r.detail.x)&&this._swapColumnOrders(this._draggedColumn,i),this._updateGhostPosition(r.detail.x,this._touchDevice?r.detail.y-50:r.detail.y),this._lastDragClientX=r.detail.x}_onTrackEnd(){!this._draggedColumn||(this._toggleAttribute("reordering",!1,this),this._draggedColumn._reorderStatus="",this._setSiblingsReorderStatus(this._draggedColumn,""),this._draggedColumn=null,this._lastDragClientX=null,this._reorderGhost.style.visibility="hidden",this.dispatchEvent(new CustomEvent("column-reorder",{detail:{columns:this._getColumnsInOrder()}})))}_getColumnsInOrder(){return this._columnTree.slice(0).pop().filter(r=>!r.hidden).sort((r,n)=>r._order-n._order)}_cellFromPoint(r,n){r=r||0,n=n||0,this._draggedColumn||this._toggleAttribute("no-content-pointer-events",!0,this.$.scroller);let i=this.shadowRoot.elementFromPoint(r,n);if(this._toggleAttribute("no-content-pointer-events",!1,this.$.scroller),i&&i._column)return i}_updateGhostPosition(r,n){let i=this._reorderGhost.getBoundingClientRect(),o=r-i.width/2,a=n-i.height/2,s=parseInt(this._reorderGhost._left||0),l=parseInt(this._reorderGhost._top||0);this._reorderGhost._left=s-(i.left-o),this._reorderGhost._top=l-(i.top-a),this._reorderGhost.style.transform=`translate(${this._reorderGhost._left}px, ${this._reorderGhost._top}px)`}_updateGhost(r){let n=this._reorderGhost;n.textContent=r._content.innerText;let i=window.getComputedStyle(r);return["boxSizing","display","width","height","background","alignItems","padding","border","flex-direction","overflow"].forEach(o=>n.style[o]=i[o]),n}_updateOrders(r,n){r===void 0||n===void 0||(r[0].forEach(i=>i._order=0),uue(r[0],this._orderBaseScope,0))}_setSiblingsReorderStatus(r,n){Array.from(r.parentNode.children).filter(i=>/column/.test(i.localName)&&this._isSwapAllowed(i,r)).forEach(i=>i._reorderStatus=n)}_autoScroller(){if(this._lastDragClientX){let r=this._lastDragClientX-this.getBoundingClientRect().right+50,n=this.getBoundingClientRect().left-this._lastDragClientX+50;r>0?this.$.table.scrollLeft+=r/10:n>0&&(this.$.table.scrollLeft-=n/10),this._scrollHandler()}this._draggedColumn&&this.async(this._autoScroller,10)}_isSwapAllowed(r,n){if(r&&n){let i=r!==n,o=r.parentElement===n.parentElement,a=r.frozen===n.frozen;return i&&o&&a}}_isSwappableByPosition(r,n){let i=Array.from(this.$.header.querySelectorAll('tr:not([hidden]) [part~="cell"]')).filter(s=>r.contains(s._column))[0],o=this.$.header.querySelector("tr:not([hidden]) [reorder-status=dragging]").getBoundingClientRect(),a=i.getBoundingClientRect();return a.left>o.left?n>a.right-o.width:n<a.left+o.width}_swapColumnOrders(r,n){let i=r._order;r._order=n._order,n._order=i,this._updateLastFrozen(),this._updateFirstAndLastColumn()}_getTargetColumn(r,n){if(r&&n){let i=r._column;for(;i.parentElement!==n.parentElement&&i!==this;)i=i.parentElement;return i.parentElement===n.parentElement?i:r._column}}};var chr=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:function(){if(this.localName==="vaadin-grid-column-group")return;let r=this.parentNode;return r&&r.localName==="vaadin-grid-column-group"&&r.resizable||!1}},_headerTemplate:{type:Object},_footerTemplate:{type:Object},frozen:{type:Boolean,value:!1},hidden:{type:Boolean},header:{type:String},textAlign:{type:String},_lastFrozen:{type:Boolean,value:!1},_order:Number,_reorderStatus:Boolean,_emptyCells:Array,_headerCell:Object,_footerCell:Object,_grid:Object,headerRenderer:Function,footerRenderer:Function}}static get observers(){return["_widthChanged(width, _headerCell, _footerCell, _cells.*)","_frozenChanged(frozen, _headerCell, _footerCell, _cells.*)","_flexGrowChanged(flexGrow, _headerCell, _footerCell, _cells.*)","_pathOrHeaderChanged(path, header, _headerCell, _footerCell, _cells.*, renderer, headerRenderer, _bodyTemplate, _headerTemplate)","_textAlignChanged(textAlign, _cells.*, _headerCell, _footerCell)","_orderChanged(_order, _headerCell, _footerCell, _cells.*)","_lastFrozenChanged(_lastFrozen)","_setBodyTemplateOrRenderer(_bodyTemplate, renderer, _cells, _cells.*)","_setHeaderTemplateOrRenderer(_headerTemplate, headerRenderer, _headerCell)","_setFooterTemplateOrRenderer(_footerTemplate, footerRenderer, _footerCell)","_resizableChanged(resizable, _headerCell)","_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells.*)","_hiddenChanged(hidden, _headerCell, _footerCell, _cells.*)"]}connectedCallback(){super.connectedCallback(),this._bodyTemplate&&(this._bodyTemplate.templatizer._grid=this._grid),this._headerTemplate&&(this._headerTemplate.templatizer._grid=this._grid),this._footerTemplate&&(this._footerTemplate.templatizer._grid=this._grid),this._templateObserver.flush(),this._bodyTemplate||this._templateObserver.callback(),requestAnimationFrame(()=>{this._allCells.forEach(r=>{r._content.parentNode||this._grid&&this._grid.appendChild(r._content)})})}disconnectedCallback(){super.disconnectedCallback(),requestAnimationFrame(()=>{this._findHostGrid()||this._allCells.forEach(r=>{r._content.parentNode&&r._content.parentNode.removeChild(r._content)})}),this._gridValue=void 0}_findHostGrid(){let r=this;for(;r&&!/^vaadin.*grid(-pro)?$/.test(r.localName);)r=r.assignedSlot?r.assignedSlot.parentNode:r.parentNode;return r||void 0}get _grid(){return this._gridValue||(this._gridValue=this._findHostGrid()),this._gridValue}get _allCells(){return[].concat(this._cells||[]).concat(this._emptyCells||[]).concat(this._headerCell).concat(this._footerCell).filter(r=>r)}constructor(){super(),this._templateObserver=new xh(this,()=>{this._headerTemplate=this._prepareHeaderTemplate(),this._footerTemplate=this._prepareFooterTemplate(),this._bodyTemplate=this._prepareBodyTemplate()})}_prepareHeaderTemplate(){return this._prepareTemplatizer(this._findTemplate(!0)||null,{})}_prepareFooterTemplate(){return this._prepareTemplatizer(this._findTemplate(!1,!0)||null,{})}_prepareBodyTemplate(){return this._prepareTemplatizer(this._findTemplate()||null)}_prepareTemplatizer(r,n){if(r&&!r.templatizer){let i=new C0;i._grid=this._grid,i.dataHost=this.dataHost,i._instanceProps=n||i._instanceProps,i.template=r,r.templatizer=i}return r}_renderHeaderAndFooter(){this.headerRenderer&&this._headerCell&&this.__runRenderer(this.headerRenderer,this._headerCell),this.footerRenderer&&this._footerCell&&this.__runRenderer(this.footerRenderer,this._footerCell)}__runRenderer(r,n,i){let o=[n._content,this];i&&i.item&&o.push(i),r.apply(this,o)}__setColumnTemplateOrRenderer(r,n,i){if(!this.hidden){if(r&&n)throw new Error("You should only use either a renderer or a template");i.forEach(o=>{let a=this._grid.__getRowModel(o.parentElement);if(n)o._renderer=n,(a.item||n===this.headerRenderer||n===this.footerRenderer)&&this.__runRenderer(n,o,a);else if(o._template!==r){o._template=r,o._content.innerHTML="",r.templatizer._grid=r.templatizer._grid||this._grid;let s=r.templatizer.createInstance();o._content.appendChild(s.root),o._instance=s,a.item&&o._instance.setProperties(a)}})}}_setBodyTemplateOrRenderer(r,n,i){(r||n)&&i&&this.__setColumnTemplateOrRenderer(r,n,i)}_setHeaderTemplateOrRenderer(r,n,i){(r||n)&&i&&this.__setColumnTemplateOrRenderer(r,n,[i])}_setFooterTemplateOrRenderer(r,n,i){(r||n)&&i&&(this.__setColumnTemplateOrRenderer(r,n,[i]),this._grid.__updateHeaderFooterRowVisibility(i.parentElement))}_selectFirstTemplate(r=!1,n=!1){return xh.getFlattenedNodes(this).filter(i=>i.localName==="template"&&i.classList.contains("header")===r&&i.classList.contains("footer")===n)[0]}_findTemplate(r,n){let i=this._selectFirstTemplate(r,n);return i&&this.dataHost&&(i._rootDataHost=this.dataHost._rootDataHost||this.dataHost),i}_flexGrowChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("flexGrow"),this._allCells.forEach(n=>n.style.flexGrow=r)}_orderChanged(r){this._allCells.forEach(n=>n.style.order=r)}_widthChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("width"),this._allCells.forEach(n=>n.style.width=r),this._grid&&this._grid.__forceReflow&&this._grid.__forceReflow()}_frozenChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozen",r),this._allCells.forEach(n=>this._toggleAttribute("frozen",r,n)),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_lastFrozenChanged(r){this._allCells.forEach(n=>this._toggleAttribute("last-frozen",r,n)),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._lastFrozen=r)}_pathOrHeaderChanged(r,n,i,o,a,s,l,c,u){let h=n!==void 0;if(!l&&!u&&h&&i&&this.__setTextContent(i._content,n),r&&a.value){if(!s&&!c){let f=(p,d,{item:g})=>this.__setTextContent(p,this.get(r,g));this.__setColumnTemplateOrRenderer(void 0,f,a.value)}!l&&!u&&!h&&i&&n!==null&&this.__setTextContent(i._content,this._generateHeader(r))}i&&this._grid.__updateHeaderFooterRowVisibility(i.parentElement)}__setTextContent(r,n){r.textContent!==n&&(r.textContent=n)}_generateHeader(r){return r.substr(r.lastIndexOf(".")+1).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/-/g," ").replace(/^./,n=>n.toUpperCase())}_toggleAttribute(r,n,i){i.hasAttribute(r)===!n&&(n?i.setAttribute(r,""):i.removeAttribute(r))}_reorderStatusChanged(r){this._allCells.forEach(n=>n.setAttribute("reorder-status",r))}_resizableChanged(r,n){r===void 0||n===void 0||n&&[n].concat(this._emptyCells).forEach(i=>{if(i){let o=i.querySelector('[part~="resize-handle"]');if(o&&i.removeChild(o),r){let a=document.createElement("div");a.setAttribute("part","resize-handle"),i.appendChild(a)}}})}_textAlignChanged(r){if(r===void 0)return;if(["start","end","center"].indexOf(r)===-1){console.warn('textAlign can only be set as "start", "end" or "center"');return}let n;getComputedStyle(this._grid).direction==="ltr"?r==="start"?n="left":r==="end"&&(n="right"):r==="start"?n="right":r==="end"&&(n="left"),this._allCells.forEach(i=>{i._content.style.textAlign=r,getComputedStyle(i._content).textAlign!==r&&(i._content.style.textAlign=n)})}_hiddenChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("hidden",r),!!r!=!!this._previousHidden&&this._grid&&(r===!0&&this._allCells.forEach(n=>{n._content.parentNode&&n._content.parentNode.removeChild(n._content)}),this._grid._debouncerHiddenChanged=sr.debounce(this._grid._debouncerHiddenChanged,Ni,()=>{this._grid&&this._grid._renderColumnTree&&this._grid._renderColumnTree(this._grid._columnTree)}),this._grid._updateLastFrozen&&this._grid._updateLastFrozen(),this._grid.notifyResize&&this._grid.notifyResize(),this._grid._resetKeyboardNavigation&&this._grid._resetKeyboardNavigation()),this._previousHidden=r}},eV=class extends chr(ZH(mt)){static get is(){return"vaadin-grid-column"}static get properties(){return{width:{type:String,value:"100px"},flexGrow:{type:Number,value:1},renderer:Function,path:{type:String},autoWidth:{type:Boolean,value:!1},_bodyTemplate:{type:Object},_cells:Array}}};customElements.define(eV.is,eV);jc("vaadin-grid",Ci`
    @keyframes vaadin-grid-appear {
      to {
        opacity: 1;
      }
    }

    :host {
      display: block;
      animation: 1ms vaadin-grid-appear;
      height: 400px;
      flex: 1 1 auto;
      align-self: stretch;
      position: relative;
    }

    :host([hidden]) {
      display: none !important;
    }

    #scroller {
      display: block;
      transform: translateY(0);
      width: auto;
      height: auto;
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }

    :host([height-by-rows]) {
      height: auto;
      align-self: flex-start;
      flex-grow: 0;
      width: 100%;
    }

    :host([height-by-rows]) #scroller {
      width: 100%;
      height: 100%;
      position: relative;
    }

    #table {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      overflow: auto;
      position: relative;
      outline: none;
      /* Workaround for a Desktop Safari bug: new stacking context here prevents the scrollbar from getting hidden */
      z-index: 0;
    }

    #header,
    #footer {
      display: block;
      position: -webkit-sticky;
      position: sticky;
      left: 0;
      overflow: visible;
      width: 100%;
      z-index: 1;
    }

    #header {
      top: 0;
    }

    th {
      text-align: inherit;
    }

    /* Safari doesn't work with "inherit" */
    [safari] th {
      text-align: initial;
    }

    #footer {
      bottom: 0;
    }

    #items {
      flex-grow: 1;
      flex-shrink: 0;
      display: block;
      position: -webkit-sticky;
      position: sticky;
      width: 100%;
      left: 0;
      overflow: visible;
    }

    [part~='row'] {
      display: flex;
      width: 100%;
      box-sizing: border-box;
      margin: 0;
    }

    [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
      opacity: 0;
    }

    #items [part~='row'] {
      position: absolute;
    }

    #items [part~='row']:empty {
      height: 1em;
    }

    [part~='cell']:not([part~='details-cell']) {
      flex-shrink: 0;
      flex-grow: 1;
      box-sizing: border-box;
      display: flex;
      width: 100%;
      position: relative;
      align-items: center;
      padding: 0;
      white-space: nowrap;
    }

    [part~='details-cell'] {
      position: absolute;
      bottom: 0;
      width: 100%;
      box-sizing: border-box;
      padding: 0;
    }

    [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      display: block;
      width: 100%;
      box-sizing: border-box;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    [hidden] {
      display: none !important;
    }

    [frozen] {
      z-index: 2;
      will-change: transform;
    }

    [no-scrollbars][safari] #table,
    [no-scrollbars][firefox] #table {
      overflow: hidden;
    }

    /* Reordering styles */
    :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
    :host([reordering]) [part~='resize-handle'],
    #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      pointer-events: none;
    }

    [part~='reorder-ghost'] {
      visibility: hidden;
      position: fixed;
      pointer-events: none;
      opacity: 0.5;

      /* Prevent overflowing the grid in Firefox */
      top: 0;
      left: 0;
    }

    :host([reordering]) {
      -moz-user-select: none;
      -webkit-user-select: none;
      user-select: none;
    }

    /* Resizing styles */
    [part~='resize-handle'] {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      cursor: col-resize;
      z-index: 1;
    }

    [part~='resize-handle']::before {
      position: absolute;
      content: '';
      height: 100%;
      width: 35px;
      transform: translateX(-50%);
    }

    [last-column] [part~='resize-handle']::before,
    [last-frozen] [part~='resize-handle']::before {
      width: 18px;
      transform: none;
      right: 0;
    }

    #scroller[column-resizing] {
      -ms-user-select: none;
      -moz-user-select: none;
      -webkit-user-select: none;
      user-select: none;
    }

    /* Sizer styles */
    #sizer {
      display: flex;
      position: absolute;
      visibility: hidden;
    }

    #sizer [part~='details-cell'] {
      display: none !important;
    }

    #sizer [part~='cell'][hidden] {
      display: none !important;
    }

    #sizer [part~='cell'] {
      display: block;
      flex-shrink: 0;
      line-height: 0;
      height: 0 !important;
      min-height: 0 !important;
      max-height: 0 !important;
      padding: 0 !important;
      border: none !important;
    }

    #sizer [part~='cell']::before {
      content: '-';
    }

    #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      display: none !important;
    }

    /* RTL specific styles */

    :host([dir='rtl']) #items,
    :host([dir='rtl']) #header,
    :host([dir='rtl']) #footer {
      left: auto;
    }

    :host([dir='rtl']) [part~='reorder-ghost'] {
      left: auto;
      right: 0;
    }

    :host([dir='rtl']) [part~='resize-handle'] {
      left: 0;
      right: auto;
    }

    :host([dir='rtl']) [part~='resize-handle']::before {
      transform: translateX(50%);
    }

    :host([dir='rtl']) [last-column] [part~='resize-handle']::before,
    :host([dir='rtl']) [last-frozen] [part~='resize-handle']::before {
      left: 0;
      right: auto;
    }
  `,{moduleId:"vaadin-grid-styles"});var uhr=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),rV=class extends JH(XH(Qce($ce(tue(Xce(iue(oue(aue(nue(cue(jce(rue(hue(Kce(eue(lue(sue(tV)))))))))))))))))){static get template(){return Q`
      <div
        id="scroller"
        safari$="[[_safari]]"
        ios$="[[_ios]]"
        loading$="[[loading]]"
        column-reordering-allowed$="[[columnReorderingAllowed]]"
      >
        <table id="table" role="grid" aria-multiselectable="true" tabindex="0">
          <caption id="sizer" part="row"></caption>
          <thead id="header" role="rowgroup"></thead>
          <tbody id="items" role="rowgroup"></tbody>
          <tfoot id="footer" role="rowgroup"></tfoot>
        </table>

        <div part="reorder-ghost"></div>
      </div>

      <div id="focusexit" tabindex="0"></div>
    `}static get is(){return"vaadin-grid"}static get version(){return"20.0.2"}static get observers(){return["_columnTreeChanged(_columnTree, _columnTree.*)"]}static get properties(){return{_safari:{type:Boolean,value:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},_ios:{type:Boolean,value:/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1},_firefox:{type:Boolean,value:navigator.userAgent.toLowerCase().indexOf("firefox")>-1},_android:{type:Boolean,value:/android/i.test(navigator.userAgent)},_touchDevice:{type:Boolean,value:uhr},heightByRows:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_heightByRowsChanged"},_recalculateColumnWidthOnceLoadingFinished:{type:Boolean,value:!0}}}constructor(){super(),this.addEventListener("animationend",this._onAnimationEnd)}connectedCallback(){super.connectedCallback(),this.recalculateColumnWidths()}attributeChangedCallback(t,r,n){super.attributeChangedCallback(t,r,n),t==="dir"&&(this.__isRTL=n==="rtl",this._updateScrollerMeasurements())}__hasRowsWithClientHeight(){return!!Array.from(this.$.items.children).filter(t=>t.clientHeight).length}__itemsReceived(){this._recalculateColumnWidthOnceLoadingFinished&&!this._cache.isLoading()&&this.__hasRowsWithClientHeight()&&(this._recalculateColumnWidthOnceLoadingFinished=!1,this.recalculateColumnWidths())}_recalculateColumnWidths(t){t.forEach(r=>{r.width="auto",r._origFlexGrow=r.flexGrow,r.flexGrow=0}),t.forEach(r=>{r._currentWidth=0,r._allCells.forEach(n=>{let i=n.offsetWidth+1;r._currentWidth=Math.max(r._currentWidth,i)})}),t.forEach(r=>{r.width=`${r._currentWidth}px`,r.flexGrow=r._origFlexGrow,r._currentWidth=void 0,r._origFlexGrow=void 0})}recalculateColumnWidths(){if(!!this._columnTree)if(this._cache.isLoading())this._recalculateColumnWidthOnceLoadingFinished=!0;else{let t=this._getColumns().filter(r=>!r.hidden&&r.autoWidth);this._recalculateColumnWidths(t)}}_createScrollerRows(t){let r=[];for(let n=0;n<t;n++){let i=document.createElement("tr");i.setAttribute("part","row"),i.setAttribute("role","row"),this._columnTree&&this._updateRow(i,this._columnTree[this._columnTree.length-1],"body",!1,!0),r.push(i)}return this._columnTree&&this._columnTree[this._columnTree.length-1].forEach(n=>n.isConnected&&n.notifyPath&&n.notifyPath("_cells.*",n._cells)),vgt(this,()=>{this._updateFirstAndLastColumn(),this._resetKeyboardNavigation()}),r}_getRowTarget(){return this.$.items}_createCell(t){let r=this._contentIndex=this._contentIndex+1||0,n="vaadin-grid-cell-content-"+r,i=document.createElement("vaadin-grid-cell-content");i.setAttribute("slot",n);let o=document.createElement(t);o.id=n.replace("-content-","-"),o.setAttribute("tabindex","-1"),o.setAttribute("role",t==="td"?"gridcell":"columnheader");let a=document.createElement("slot");return a.setAttribute("name",n),o.appendChild(a),o._content=i,i.addEventListener("mousedown",()=>{if(window.chrome){let s=()=>{i.contains(this.getRootNode().activeElement)||o.focus(),document.removeEventListener("mouseup",s,!0)};document.addEventListener("mouseup",s,!0)}else setTimeout(()=>{i.contains(this.getRootNode().activeElement)||o.focus()})}),o}_updateRow(t,r,n,i,o){n=n||"body";let a=document.createDocumentFragment();Array.from(t.children).forEach(s=>s._vacant=!0),t.innerHTML="",t.id!=="sizer"&&(t.hidden=!0),r.filter(s=>!s.hidden).forEach((s,l,c)=>{let u;if(n==="body"){if(s._cells=s._cells||[],u=s._cells.filter(h=>h._vacant)[0],u||(u=this._createCell("td"),s._cells.push(u)),u.setAttribute("part","cell body-cell"),t.appendChild(u),l===c.length-1&&(this._rowDetailsTemplate||this.rowDetailsRenderer)){this._detailsCells=this._detailsCells||[];let h=this._detailsCells.filter(f=>f._vacant)[0]||this._createCell("td");this._detailsCells.indexOf(h)===-1&&this._detailsCells.push(h),h._content.parentElement||a.appendChild(h._content),this._configureDetailsCell(h),t.appendChild(h),this._a11ySetRowDetailsCell(t,h),h._vacant=!1}s.notifyPath&&!o&&s.notifyPath("_cells.*",s._cells)}else{let h=n==="header"?"th":"td";i||s.localName==="vaadin-grid-column-group"?(u=s[`_${n}Cell`]||this._createCell(h),u._column=s,t.appendChild(u),s[`_${n}Cell`]=u):(s._emptyCells=s._emptyCells||[],u=s._emptyCells.filter(f=>f._vacant)[0]||this._createCell(h),u._column=s,t.appendChild(u),s._emptyCells.indexOf(u)===-1&&s._emptyCells.push(u)),u.setAttribute("part",`cell ${n}-cell`),this.__updateHeaderFooterRowVisibility(t)}u._content.parentElement||a.appendChild(u._content),u._vacant=!1,u._column=s}),this.appendChild(a),this._frozenCellsChanged(),this._updateFirstAndLastColumnForRow(t)}__updateHeaderFooterRowVisibility(t){if(!t)return;let r=Array.from(t.children).filter(n=>{let i=n._column;if(i._emptyCells&&i._emptyCells.indexOf(n)>-1)return!1;if(t.parentElement===this.$.header){if(i.headerRenderer||i._headerTemplate)return!0;if(i.header===null)return!1;if(i.path||i.header!==void 0)return!0}else if(i.footerRenderer||i._footerTemplate)return!0});t.hidden!==!r.length&&(t.hidden=!r.length,this.notifyResize())}_updateScrollerItem(t,r){this._preventScrollerRotatingCellFocus(t,r),this._columnTree&&(this._toggleAttribute("first",r===0,t),this._toggleAttribute("odd",r%2,t),this._a11yUpdateRowRowindex(t,r),this._getItem(r,t))}_columnTreeChanged(t){this._renderColumnTree(t),this.recalculateColumnWidths()}_renderColumnTree(t){for(Array.from(this.$.items.children).forEach(r=>this._updateRow(r,t[t.length-1],null,!1,!0));this.$.header.children.length<t.length;){let r=document.createElement("tr");r.setAttribute("part","row"),r.setAttribute("role","row"),this.$.header.appendChild(r);let n=document.createElement("tr");n.setAttribute("part","row"),n.setAttribute("role","row"),this.$.footer.appendChild(n)}for(;this.$.header.children.length>t.length;)this.$.header.removeChild(this.$.header.firstElementChild),this.$.footer.removeChild(this.$.footer.firstElementChild);Array.from(this.$.header.children).forEach((r,n)=>this._updateRow(r,t[n],"header",n===t.length-1)),Array.from(this.$.footer.children).forEach((r,n)=>this._updateRow(r,t[t.length-1-n],"footer",n===0)),this._updateRow(this.$.sizer,t[t.length-1]),this._resizeHandler(),this._frozenCellsChanged(),this._updateFirstAndLastColumn(),this._resetKeyboardNavigation(),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows(),this.__updateFooterPositioning()}__updateFooterPositioning(){this._firefox&&(this.$.items.style.paddingBottom=0,this.heightByRows||(this.$.items.style.paddingBottom=`${this.$.footer.offsetHeight}px`)),this._ios&&!window.CSS.supports("position","sticky")&&(this.$.table.style.height="",this.$.table.style.minHeight="100%",this.$.table.style.maxHeight="100%",setTimeout(()=>this.$.table.style.height=`${this.$.scroller.offsetHeight}px`))}_updateItem(t,r){t._item=r;let n=this.__getRowModel(t);this._toggleAttribute("selected",n.selected,t),this._a11yUpdateRowSelected(t,n.selected),this._a11yUpdateRowLevel(t,n.level),this._toggleAttribute("expanded",n.expanded,t),this._toggleAttribute("details-opened",this._isDetailsOpened(r),t),(this._rowDetailsTemplate||this.rowDetailsRenderer)&&this._toggleDetailsCell(t,r),this._generateCellClassNames(t,n),this._filterDragAndDrop(t,n),Array.from(t.children).forEach(i=>{if(i._renderer){let o=i._column||this;i._renderer.call(o,i._content,o,n)}else i._instance&&(i._instance.__detailsOpened__=n.detailsOpened,i._instance.__selected__=n.selected,i._instance.__level__=n.level,i._instance.__expanded__=n.expanded,i._instance.setProperties(n))}),this._debouncerUpdateHeights=sr.debounce(this._debouncerUpdateHeights,mo.after(1),()=>{this._updateMetrics(),this._positionItems(),this._updateScrollerSize()})}_resizeHandler(){this._updateDetailsCellHeights(),this._accessIronListAPI(super._resizeHandler,!0),this._updateScrollerMeasurements(),this.__updateFooterPositioning()}_onAnimationEnd(t){t.animationName.indexOf("vaadin-grid-appear")===0&&(this._render(),t.stopPropagation(),this.notifyResize(),this.__itemsReceived(),requestAnimationFrame(()=>{this.__scrollToPendingIndex(),this.$.table.style.webkitOverflowScrolling="touch"}))}_toggleAttribute(t,r,n){n.hasAttribute(t)===!r&&(r?n.setAttribute(t,""):n.removeAttribute(t))}__getRowModel(t){return{index:t.index,item:t._item,level:this._getIndexLevel(t.index),expanded:this._isExpanded(t._item),selected:this._isSelected(t._item),detailsOpened:!!(this._rowDetailsTemplate||this.rowDetailsRenderer)&&this._isDetailsOpened(t._item)}}render(){this._columnTree&&(this._columnTree.forEach(t=>{t.forEach(r=>r._renderHeaderAndFooter())}),this._update())}notifyResize(){super.notifyResize()}_heightByRowsChanged(t,r){(t||r)&&this.notifyResize()}__forceReflow(){this._debouncerForceReflow=sr.debounce(this._debouncerForceReflow,Ni,()=>{this.$.scroller.style.overflow="hidden",setTimeout(()=>this.$.scroller.style.overflow="")})}};customElements.define(rV.is,rV);function fue(e,t){return Bgt(e,t)}var u1=class extends mt{constructor(){super(...arguments),this._run=""}_csvUrl(t,r,n){return r?Mi(n(t,r),{format:"csv"}):""}_jsonUrl(t,r,n){return r?n(t,r):""}_csvName(t,r){return r?`run-${r}-tag-${t}.csv`:""}_jsonName(t,r){return r?`run-${r}-tag-${t}.json`:""}};u1.template=Q`
    <paper-dropdown-menu
      no-label-float="true"
      label="run to download"
      selected-item-label="{{_run}}"
    >
      <paper-listbox slot="dropdown-content">
        <template is="dom-repeat" items="[[runs]]">
          <paper-item no-label-float="true">[[item]]</paper-item>
        </template>
      </paper-listbox>
    </paper-dropdown-menu>
    <template is="dom-if" if="[[_run]]">
      <a download="[[_csvName(tag, _run)]]" href="[[_csvUrl(tag, _run, urlFn)]]"
        >CSV</a
      ><!--
      --><a
        download="[[_jsonName(tag, _run)]]"
        href="[[_jsonUrl(tag, _run, urlFn)]]"
        >JSON</a
      >
    </template>
    <style>
      :host {
        display: flex;
        align-items: center;
        height: 32px;
      }
      paper-dropdown-menu {
        width: 100px;
        --paper-input-container-label: {
          font-size: 10px;
        }
        --paper-input-container-input: {
          font-size: 10px;
        }
      }
      a {
        font-size: 10px;
        margin: 0 0.2em;
      }
      paper-input {
        font-size: 22px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],u1.prototype,"_run",void 0);E([A({type:Array}),w("design:type",Array)],u1.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],u1.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],u1.prototype,"urlFn",void 0);u1=E([yt("tf-downloader")],u1);var hhr=64,Eli=new URLSearchParams(window.location.search),Wn=class extends mt{constructor(){super(...arguments),this.colorScale=null,this._loadDataCallback=(t,r,n)=>{if(n==null){console.error("Failed to load data for:",r);return}let i=n.map(a=>({wall_time:new Date(a[0]*1e3),step:a[1],scalar:a[2]})),o=this._getSeriesNameFromDatum(r);t.setSeriesMetadata(o,r),t.setSeriesData(o,i)},this.getDataLoadUrl=({tag:t,run:r})=>_e().pluginRouteForSrc("scalars","/scalars",new URLSearchParams({tag:t,run:r})),this._downloadUrlFn=(t,r)=>this.getDataLoadUrl({tag:t,run:r}),this.requestData=(t,r,n)=>this.inColab?this._requestDataGet(t,r,n):this._requestDataPost(t,r,n),this._requestDataGet=(t,r,n)=>{let o=_e().pluginRoute("scalars","/scalars");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this._requestDataPost=(t,r,n)=>{var c;let o=_e().pluginRoute("scalars","/scalars_multirun"),a=new Map;for(let{tag:u,run:h}of t){let f=a.get(u);f==null&&a.set(u,f=[]),f.push(h)}let s=(c=this.batchSize)!=null?c:hhr,l=[];for(let[u,h]of a)for(let f=0;f<h.length;f+=s)l.push({tag:u,runs:h.slice(f,f+s)});Promise.all(l.map(({tag:u,runs:h})=>this.requestManager.request(o,{tag:u,runs:h}).then(f=>{for(let p of h){let d={tag:u,run:p};Object.prototype.hasOwnProperty.call(f,p)?r({item:d,data:f[p]}):r({item:d,data:null})}}))).finally(()=>void n())},this._getDataLoadName=t=>this._getSeriesNameFromDatum(t),this._expanded=!1,this._tooltipColumns=(()=>{let t=ist.slice(),r=t.findIndex(n=>n.title=="Name");return t.splice(r,1,{title:"Name",evaluate:n=>{let i=n.dataset.metadata().meta;return this._getSeriesDisplayNameFromDatum(i)}}),t})()}_getChartDataLoader(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("tf-line-chart-data-loader")}reload(){this._getChartDataLoader().reload()}redraw(){this._getChartDataLoader().redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this._getChartDataLoader();t&&t.resetDomain()}_updateDownloadLink(){var n;let t=this._getChartDataLoader().exportAsSvgString(),r=(n=this.shadowRoot)==null?void 0:n.querySelector("#svgLink");r.href=`data:image/svg+xml;base64,${btoa(t)}`}_runsFromData(t){return t.map(r=>r.run)}_getDataSeries(){return this.dataToLoad.map(t=>this._getSeriesNameFromDatum(t))}_getSeriesNameFromDatum({run:t,experiment:r={name:"_default"}}){return JSON.stringify([r.name,t])}_getSeriesDisplayNameFromDatum(t){return t.run}_getColorScale(){return this.colorScale!==null?this.colorScale:{scale:t=>{let[,r]=JSON.parse(t);return fn(r)}}}};Wn.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
    ></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        active="[[active]]"
        color-scale="[[_getColorScale(colorScale)]]"
        data-series="[[_getDataSeries(dataToLoad.*)]]"
        data-to-load="[[dataToLoad]]"
        get-data-load-name="[[_getDataLoadName]]"
        get-data-load-url="[[getDataLoadUrl]]"
        request-data="[[requestData]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-data-callback="[[_loadDataCallback]]"
        load-key="[[tag]]"
        log-scale-active="[[_logScaleActive]]"
        request-manager="[[requestManager]]"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        tag-metadata="[[tagMetadata]]"
        tooltip-columns="[[_tooltipColumns]]"
        tooltip-position="auto"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <paper-menu-button on-paper-dropdown-open="_updateDownloadLink">
          <paper-icon-button
            class="dropdown-trigger"
            slot="dropdown-trigger"
            icon="file-download"
          ></paper-icon-button>
          <paper-listbox class="dropdown-content" slot="dropdown-content">
            <paper-item>
              <a id="svgLink" download="[[tag]].svg">
                Download Current Chart as SVG
              </a>
            </paper-item>
          </paper-listbox>
        </paper-menu-button>
      </template>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <tf-downloader
            runs="[[_runsFromData(dataToLoad)]]"
            tag="[[tag]]"
            url-fn="[[_downloadUrlFn]]"
          ></tf-downloader>
        </div>
      </template>
    </div>
    <style>
      :host {
        margin: 5px;
        display: block;
        width: 330px;
      }

      :host([_expanded]) {
        width: 100%;
      }

      :host([_expanded]) #tf-line-chart-data-loader-container {
        height: 400px;
      }

      #tf-line-chart-data-loader-container {
        height: 200px;
        width: 100%;
      }

      tf-card-heading {
        display: block;
        margin-bottom: 10px;
      }

      #buttons {
        display: flex;
        flex-direction: row;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }

      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      .download-links {
        display: flex;
        height: 32px;
      }

      .download-links a {
        align-self: center;
        font-size: 10px;
        margin: 2px;
      }

      .download-links paper-dropdown-menu {
        width: 100px;
        --paper-input-container-label: {
          font-size: 10px;
        }
        --paper-input-container-input: {
          font-size: 10px;
        }
      }

      paper-menu-button {
        padding: 0;
      }
      paper-item a {
        color: inherit;
        text-decoration: none;
        white-space: nowrap;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Wn.prototype,"tag",void 0);E([A({type:Array}),w("design:type",Array)],Wn.prototype,"dataToLoad",void 0);E([A({type:String}),w("design:type",String)],Wn.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Wn.prototype,"active",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Wn.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],Wn.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Wn.prototype,"showDownLinks",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Wn.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Wn.prototype,"smoothingWeight",void 0);E([A({type:Object}),w("design:type",Object)],Wn.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Object)],Wn.prototype,"colorScale",void 0);E([A({type:String}),w("design:type",String)],Wn.prototype,"tooltipSortingMethod",void 0);E([A({type:Number}),w("design:type",Number)],Wn.prototype,"batchSize",void 0);E([A({type:Boolean}),w("design:type",Number)],Wn.prototype,"inColab",void 0);E([A({type:Object}),w("design:type",Object)],Wn.prototype,"_loadDataCallback",void 0);E([A({type:Object}),w("design:type",Function)],Wn.prototype,"getDataLoadUrl",void 0);E([A({type:Object}),w("design:type",Object)],Wn.prototype,"_downloadUrlFn",void 0);E([A({type:Object}),w("design:type",Function)],Wn.prototype,"requestData",void 0);E([A({type:Object}),w("design:type",Object)],Wn.prototype,"_getDataLoadName",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Wn.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Wn.prototype,"_logScaleActive",void 0);E([A({type:Array}),w("design:type",Array)],Wn.prototype,"_tooltipColumns",void 0);Wn=E([yt("tf-scalar-card")],Wn);var Us=class extends fue([cW],mt){constructor(){super(...arguments),this.sessionGroup=null,this._xType=Td.STEP,this._noMultiExperiments=!1,this._requestData=(t,r,n)=>{Promise.all(t.map(i=>{let o={experimentName:this.experimentName,sessionName:i.run,metricName:i.tag};return this.backend.listMetricEvals(o).then(a=>void r({item:i,data:a}))})).finally(()=>void n())},this._colorScale={scale:t=>{let r=JSON.parse(t)[1],n=this._indexOfSession.get(r),i=iR;return i[(this._sessionGroupNameHash+n)%i.length]}}}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this.redraw.bind(this))}redraw(){var t;(t=this.shadowRoot)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{r.redraw()})}_sessionGroupChanged(){var t;!this.sessionGroup||Object.keys(this.sessionGroup).length==0?(this._indexOfSession=new Map,this._sessionGroupNameHash=0):(this._indexOfSession=new Map(this.sessionGroup.sessions.map((r,n)=>[r.name,n])),this._sessionGroupNameHash=dct(this.sessionGroup.name)),(t=this.shadowRoot)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{let n=r,i=n.get("tag");n.set("tag",""),n.set("tag",i)})}_haveMetrics(){return this.visibleSchema&&Array.isArray(this.visibleSchema.metricInfos)&&this.visibleSchema.metricInfos.length>0}_haveMetricsAndSessionGroup(){return this.sessionGroup&&this._haveMetrics()}_computeSeriesForSessionGroupMetric(t,r){return t===null||Object.keys(t).length==0||r===null?[]:t.sessions.filter(n=>f3(n.metricValues,r.name)!==void 0).map(n=>({tag:r.name,run:n.name}))}_computeTagMetadata(t){return{displayName:Qu(t),description:t.description||""}}};Us.template=Q`
    <template is="dom-if" if="[[!sessionGroup]]">
      <div>
        <h3>No session group selected</h3>
        <p>Please select a session group to see its metric-graphs here.</p>
      </div>
    </template>
    <template is="dom-if" if="[[!_haveMetrics(visibleSchema.*)]]">
      <div>
        <h3>No metrics are enabled</h3>
        <p>Please enable some metrics to see content here.</p>
      </div>
    </template>
    <div class="layout horizontal wrap session-group-details">
      <template
        is="dom-if"
        if="[[_haveMetricsAndSessionGroup(visibleSchema.*, sessionGroup)]]"
      >
        <template
          is="dom-repeat"
          items="[[visibleSchema.metricInfos]]"
          as="metricInfo"
        >
          <!-- Note that we do not provide a request-manager attribute since
               we provide a function in request-data for calling the backend
               to get the metrics data.
            -->
          <tf-scalar-card
            class="scalar-card"
            color-scale="[[_colorScale]]"
            data-to-load="[[_computeSeriesForSessionGroupMetric(sessionGroup, metricInfo)]]"
            tag="[[metricInfo.name.tag]]"
            tag-metadata="[[_computeTagMetadata(metricInfo)]]"
            x-type="[[_xType]]"
            multi-experiments="[[_noMultiExperiments]]"
            request-data="[[_requestData]]"
            active
          >
          </tf-scalar-card>
        </template>
      </template>
    </div>
    <!-- "iron-flex" is needed to use the layout classes in the div above -->
    <style include="iron-flex">
      :host {
        display: block;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Us.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Us.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],Us.prototype,"visibleSchema",void 0);E([A({type:Object}),w("design:type",Object)],Us.prototype,"sessionGroup",void 0);E([A({type:String}),w("design:type",String)],Us.prototype,"_xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Us.prototype,"_noMultiExperiments",void 0);E([A({type:Object}),w("design:type",Object)],Us.prototype,"_indexOfSession",void 0);E([A({type:Number}),w("design:type",Number)],Us.prototype,"_sessionGroupNameHash",void 0);E([A({type:Object}),w("design:type",Function)],Us.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],Us.prototype,"_colorScale",void 0);E([Bt("sessionGroup.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Us.prototype,"_sessionGroupChanged",null);Us=E([yt("tf-hparams-session-group-details")],Us);var Vd=class extends Gt(_o(mt)){constructor(){super(...arguments),this._hparamName=Bd,this._metricName=Qu}_visibleSchemaOrSessionGroupsChanged(){let t=this.$.sessionGroupsTable.get("detailsOpenedItems");this.$.sessionGroupsTable.set("detailsOpenedItems",[]),ci();let r=new Map;this.sessionGroups.forEach(n=>{r.set(n.name,n)}),this.$.sessionGroupsTable.set("detailsOpenedItems",t.map(n=>r.get(n.name)).filter(Boolean))}_sessionGroupHParam(t,r){return t==null||Object.keys(t).length==0||!Object.prototype.hasOwnProperty.call(t.hparams,r)?"":w0(t.hparams[r])}_sessionGroupMetric(t,r){if(t==null||Object.keys(t).length==0)return"";for(let n=0;n<t.metricValues.length;++n){let i=t.metricValues[n];if(i.name.group===r.group&&i.name.tag==r.tag)return w0(i.value)}return""}_rowNumber(t){return t+1}};Vd.template=Q`
    <vaadin-grid
      class="session-group-table"
      id="sessionGroupsTable"
      column-reordering-allowed=""
      items="[[sessionGroups]]"
    >
      <vaadin-grid-column flex-grow="0" width="10em" resizable="">
        <template class="header">
          <div class="table-header table-cell">Trial ID</div>
        </template>
        <template>
          <div class="table-cell">[[item.name]]</div>
        </template>
      </vaadin-grid-column>
      <template is="dom-if" if="[[enableShowMetrics]]">
        <vaadin-grid-column flex-grow="0" autoWidth="" resizable="">
          <template class="header">
            <div class="table-header table-cell">Show Metrics</div>
          </template>
          <template>
            <paper-checkbox class="table-cell" checked="{{detailsOpened}}">
            </paper-checkbox>
          </template>
        </vaadin-grid-column>
      </template>
      <template
        is="dom-repeat"
        items="[[visibleSchema.hparamInfos]]"
        as="hparamInfo"
        index-as="hparamIndex"
      >
        <vaadin-grid-column flex-grow="2" width="10em" resizable="">
          <template class="header">
            <div class="table-header table-cell">
              [[_hparamName(hparamInfo)]]
            </div>
          </template>
          <template>
            <div class="table-cell">
              [[_sessionGroupHParam(item, hparamInfo.name)]]
            </div>
          </template>
        </vaadin-grid-column>
      </template>
      <template
        is="dom-repeat"
        items="{{visibleSchema.metricInfos}}"
        as="metricInfo"
        index-as="metricIndex"
      >
        <vaadin-grid-column flex-grow="2" width="10em" resizable="">
          <template class="header">
            <div class="table-header table-cell">
              [[_metricName(metricInfo)]]
            </div>
          </template>
          <template>
            <div class="table-cell">
              [[_sessionGroupMetric(item, metricInfo.name)]]
            </div>
          </template>
        </vaadin-grid-column>
      </template>
      <template class="row-details">
        <tf-hparams-session-group-details
          backend="[[backend]]"
          experiment-name="[[experimentName]]"
          session-group="[[item]]"
          visible-schema="[[visibleSchema]]"
          class="session-group-details"
        >
        </tf-hparams-session-group-details>
      </template>
    </vaadin-grid>

    <style>
      :host {
        display: inline;
      }

      :host(.dark-mode) {
        --lumo-base-color: #303030;
        --lumo-body-text-color: #fff;
      }

      :host(.dark-mode) vaadin-grid {
        --_lumo-grid-secondary-border-color: #505050;
      }

      .table-cell {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
      .table-header {
        /* line-break overflowing column headers */
        white-space: normal;
        overflow-wrap: break-word;
      }
      .session-group-table {
        height: 100%;
      }
      .session-group-details {
        height: 360px;
        overflow-y: auto;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Vd.prototype,"visibleSchema",void 0);E([A({type:Array}),w("design:type",Array)],Vd.prototype,"sessionGroups",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vd.prototype,"enableShowMetrics",void 0);E([A({type:Object}),w("design:type",Object)],Vd.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Vd.prototype,"experimentName",void 0);E([Bt("visibleSchema.*","sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vd.prototype,"_visibleSchemaOrSessionGroupsChanged",null);Vd=E([yt("tf-hparams-table-view")],Vd);var CP=class extends mt{constructor(){super(...arguments),this.sessionGroup=null,this.visibleSchema=null}_propertiesArePopulated(t,r){return t!=null&&r!==void 0&&r!==null}_singletonSessionGroups(t){return t==null?[]:[t]}};CP.template=Q`
    <!-- If sessionGroup or visibleSchema are not populated, do not display
         anything.
      -->
    <template
      is="dom-if"
      if="[[_propertiesArePopulated(visibleSchema, sessionGroup)]]"
    >
      <!-- Display one row without a "show-metrics" column -->
      <tf-hparams-table-view
        visible-schema="[[visibleSchema]]"
        session-groups="[[_singletonSessionGroups(sessionGroup)]]"
      >
      </tf-hparams-table-view>
    </template>
    <template
      is="dom-if"
      if="[[!_propertiesArePopulated(visibleSchema, sessionGroup)]]"
    >
      <div>Click or hover over a session group to display its values here.</div>
    </template>

    <style>
      :host {
        display: block;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],CP.prototype,"sessionGroup",void 0);E([A({type:Object}),w("design:type",Object)],CP.prototype,"visibleSchema",void 0);CP=E([yt("tf-hparams-session-group-values")],CP);var AP=Ee(Oe(),1);function pue(e,t,r,n){if(t.length<2)return console.error("Less than two axes in parallel coordinates plot."),null;let i=r[0],o=r[1];if(i<=t[0]||i>=t[t.length-1])return null;let a=AP.sortedIndex(t,i);console.assert(a>0),console.assert(a<t.length);let s=a-1;function l(h,f,p,d){let g=h-p,_=f-d,y=i-p,x=o-d,b=(g*y+_*x)/(g*g+_*_);if(b<=0)return p3(y,x);if(b>=1){let S=h-i,C=f-o;return p3(S,C)}return p3(y-b*g,x-b*_)}let c=null,u=null;return e.forEach(h=>{let f=l(h.controlPoints[s][0],h.controlPoints[s][1],h.controlPoints[a][0],h.controlPoints[a][1]);f>n||(c===null||f<c)&&(c=f,u=h)}),u}function due(e,t,r){return e.domain().filter(n=>{let i=e(n);return t<=i&&i<=r})}function mue(e,t,r){let n=e.range(),i=n.filter(o=>t<=o&&o<=r).map(o=>{let a=e.invertExtent(o);return o===n[n.length-1]?[a[0],a[1]+1]:a});return i.length==0?[0,0]:sa(Lm(i))}function gue(e,t,r){return[e.invert(t),e.invert(r)].sort((n,i)=>n-i)}function Fct(e,t,r){function n(){if(e.length===0)return[1,2];let[i,o]=sa(e);return i!==o?[i,o]:i>0?[i*.5,i*1.5]:i<0?[i*1.5,i*.5]:[-1,1]}if(r==="LINEAR")return zn().domain(n()).range([t,0]);if(r==="LOG"){let i=n();return i[0]<=0&&i[1]>=0?Fct(e,t,"LINEAR"):cc().domain(i).range([t,0])}else if(r==="QUANTILE"){let o=Ir(20).map(a=>t-a*t/19);return e.length===0&&(e=[1]),rg().domain(AP.uniq(e)).range(o)}else{if(r==="NON_NUMERIC")return eg().domain(AP.uniq(e.sort())).range([t,0]).padding(.1);throw RangeError("Unknown scale: "+r)}}var h1;(function(e){e.LINEAR="LINEAR",e.LOG="LOG",e.QUANTILE="QUANTILE",e.NON_NUMERIC="NON_NUMERIC"})(h1||(h1={}));var PP=class{isPassing(t){return!0}},nV=class{constructor(t,r,n,i){this._lower=t,this._upper=r,this._lowerOpen=n,this._upperOpen=i}isPassing(t){let r=t;return this._before(this._lower,r,!this._lowerOpen)&&this._before(r,this._upper,!this._upperOpen)}_before(t,r,n){return n?t<=r:t<r}},Hct=class{constructor(t){this._domainSet=t}isPassing(t){return this._domainSet.findIndex(r=>r===t)!==-1}},Vct=class{constructor(t,r,n,i){this._svgProps=t,this._schema=r,this._interactionManager=n,this._colIndex=i,this._isDisplayed=!1,this._yScale=null,this._scaleType=null,this.setBrushSelection(null)}colIndex(){return this._colIndex}yScale(){return this._yScale}scaleType(){return this._scaleType}brushSelection(){return this._brushSelection}isDisplayed(){return this._isDisplayed}setBrushSelection(t){this._brushSelection=t,this._brushFilter=this._buildBrushFilter(this.brushSelection(),this.scaleType(),this.yScale())}setDomainAndScale(t,r){this._scaleType=r,this._yScale=Fct(t.slice(),this._svgProps.height,this.scaleType()),this._brushFilter=this._buildBrushFilter(this.brushSelection(),this.scaleType(),this.yScale())}brushFilter(){return this._brushFilter}updateDOM(t){let r=lb(this.yScale());this.scaleType()===h1.QUANTILE&&(r=r.tickValues(this.yScale().quantiles()).tickFormat(xn("-.6g")));let n=Ht(t);n.selectAll("g").remove(),n.append("g").classed("axis",!0).call(r).append("text").classed("axis-title",!0).style("cursor","move").style("text-anchor","middle").attr("y",-9).text(a=>cct(this._schema,a)),n.call(pb().on("start",()=>{t.setAttribute("is-dragging",""),this._interactionManager.onDragStart(this.colIndex())}).on("drag",()=>this._interactionManager.onDrag(qt.x)).on("end",()=>{this._interactionManager.onDragEnd(),t.removeAttribute("is-dragging")}));let i=qL().extent([[-8,0],[8,this._svgProps.height+1]]).on("start",()=>{!Bct(qt)||(t.setAttribute("is-brushing",""),this._interactionManager.onBrushChanged(this.colIndex(),qt.selection))}).on("brush",()=>{!Bct(qt)||this._interactionManager.onBrushChanged(this.colIndex(),qt.selection)}).on("end",()=>{!Bct(qt)||(this._interactionManager.onBrushChanged(this.colIndex(),qt.selection),t.removeAttribute("is-brushing"))}),o=Ht(t).append("g").classed("brush",!0);o.call(i),i.move(o,this.brushSelection())}setDisplayed(t){this._isDisplayed=t}_buildBrushFilter(t,r,n){if(t===null)return new PP;if(r===null)return console.error("Scale type is null, but brushSelection isn't: ",t),new PP;switch(r){case h1.LINEAR:case h1.LOG:{let[i,o]=gue(n,t[0],t[1]);return new nV(i,o,!1,!1)}case h1.QUANTILE:{let[i,o]=mue(n,t[0],t[1]);return new nV(i,o,!1,!0)}case h1.NON_NUMERIC:return new Hct(due(n,t[0],t[1]))}return console.error("Unknown scale type: ",r),new PP}},iV=class{constructor(t,r,n){this._svgProps=t,this._schema=r,this._axes=this._createAxes(n),this._stationaryAxesPositions=eg().range([1,this._svgProps.width-1]).padding(.5),this._draggedAxis=null,this._svgProps.svgG.selectAll("g.axis-parent").remove(),this._parentsSel=this._svgProps.svgG.selectAll(".axis-parent")}updateAxes(t,r){console.assert(!this.isAxisDragging());let n=new Set;t.columns.forEach(o=>{let a=o.absoluteIndex,s=this._axes[a];s.setDisplayed(!0);let l=r.map(c=>b0(this._schema,c,a));s.setDomainAndScale(l,o.scale),n.add(a)}),this._axes.forEach(o=>{n.has(o.colIndex())||o.setDisplayed(!1)}),this._updateStationaryAxesPositions(n),this._parentsSel=this._parentsSel.data(Array.from(n),o=>o),this._parentsSel.exit().remove(),this._parentsSel=this._parentsSel.enter().append("g").classed("axis-parent",!0).merge(this._parentsSel);let i=this;this._parentsSel.call(o=>this._updateAxesPositionsInDOM(o)).each(function(o){i._axes[o].updateDOM(this)})}mapVisibleAxes(t){return this._stationaryAxesPositions.domain().map(r=>t(this.getAxisPosition(r),this._axes[r]))}allVisibleAxesSatisfy(t){return this._stationaryAxesPositions.domain().every(r=>t(this.getAxisPosition(r),this._axes[r]))}getAxisForColIndex(t){return this._axes[t]}dragStart(t){console.assert(!this.isAxisDragging()),console.assert(this._axes[t].isDisplayed()),this._draggedAxis=this._axes[t],this._draggedAxisPosition=this._stationaryAxesPositions(t)}drag(t){t=Math.min(Math.max(t,0),this._svgProps.width),this._draggedAxisPosition=t;let r=this._stationaryAxesPositions.domain();r.sort((n,i)=>this.getAxisPosition(n)-this.getAxisPosition(i)),this._stationaryAxesPositions.domain(r),this._updateAxesPositionsInDOM(this._parentsSel)}dragEnd(t){console.assert(this.isAxisDragging()),this._draggedAxisPosition=null,this._draggedAxis=null,this._updateAxesPositionsInDOM(this._parentsSel.transition().duration(t))}isAxisDragging(){return this._draggedAxis!==null}getAxisPosition(t){return this._draggedAxis!==null&&this._draggedAxis.colIndex()===t?this._draggedAxisPosition:this._stationaryAxesPositions(t)}_updateStationaryAxesPositions(t){let r=this._stationaryAxesPositions.domain().filter(i=>t.has(i)),n=Array.from(new Set([...r,...Array.from(t)]));this._stationaryAxesPositions.domain(n)}_updateAxesPositionsInDOM(t){t.attr("transform",r=>yP(this.getAxisPosition(r)))}_createAxes(t){return Ir(uct(this._schema)).map(r=>new Vct(this._svgProps,this._schema,t,r))}};function Bct(e){return e.sourceEvent!==null}var Xf;(function(e){e[e.FOREGROUND=0]="FOREGROUND",e[e.BACKGROUND=1]="BACKGROUND"})(Xf||(Xf={}));var th=class{constructor(t){t===void 0&&(t=Tp(null)),console.assert(t.size()<=1),this._sessionGroupSel=t}sessionGroup(){return this._sessionGroupSel.size()===1?this._sessionGroupSel.datum():null}isNull(){return this.sessionGroup()===null}selection(){return this._sessionGroupSel}equalsTo(t){var r,n;return this.isNull()?t.isNull():t.isNull()?!1:((r=t.sessionGroup())==null?void 0:r.name)==((n=this.sessionGroup())==null?void 0:n.name)}},oV=class{constructor(t,r,n){this._svgProps=t,this._schema=r,this._axesCollection=n,this._sessionGroups=[],this._svgProps.svgG.selectAll("g.background").remove(),this._svgProps.svgG.selectAll("g.foreground").remove(),this._bgPathsSel=this._svgProps.svgG.append("g").classed("background",!0).selectAll("path"),this._fgPathsSel=this._svgProps.svgG.append("g").classed("foreground",!0).selectAll("path"),this._updateVisibleFgPathsSel(),this._peakedSessionGroupHandle=new th,this._selectedSessionGroupHandle=new th,this._d3line=vu().curve(jh)}getSessionGroupHandle(t){return t==null?new th:new th(this._fgPathsSel.filter(r=>r.name===t.name))}hideBackgroundLines(){this._bgPathsSel.attr("visibility","hidden")}showBackgroundLines(){this._bgPathsSel.attr("visibility",null)}peakedSessionGroupHandle(){return this._peakedSessionGroupHandle}selectedSessionGroupHandle(){return this._selectedSessionGroupHandle}recomputeControlPoints(t,r=0){(t===Xf.FOREGROUND?this._fgPathsSel:this._bgPathsSel).transition().duration(r).attr("d",i=>this._pathDAttribute(i)),t===Xf.FOREGROUND&&window.setTimeout(()=>{let i=this;this._fgPathsSel.each(function(o){i._setControlPointsProperty(this,o)})})}recomputeForegroundLinesVisibility(){this._fgPathsSel.classed("invisible-path",t=>!this._axesCollection.allVisibleAxesSatisfy((r,n)=>n.brushFilter().isPassing(b0(this._schema,t,n.colIndex())))),this._updateVisibleFgPathsSel()}setForegroundLinesColor(t,r,n){let i=this._createLineColorFunction(t,r,n);this._fgPathsSel.attr("stroke",i)}redraw(t,r,n,i){let o=this._peakedSessionGroupHandle.sessionGroup(),a=this._selectedSessionGroupHandle.sessionGroup();this._sessionGroups=t,this._fgPathsSel=this._recomputePathSelection(this._fgPathsSel),this._bgPathsSel=this._recomputePathSelection(this._bgPathsSel),this._peakedSessionGroupHandle=this.getSessionGroupHandle(o),this._selectedSessionGroupHandle=this.getSessionGroupHandle(a),this.recomputeControlPoints(Xf.FOREGROUND),this.recomputeControlPoints(Xf.BACKGROUND),this.recomputeForegroundLinesVisibility(),this.setForegroundLinesColor(r,n,i)}updatePeakedSessionGroup(t){this._peakedSessionGroupHandle.selection().classed("peaked-path",!1),this._peakedSessionGroupHandle=t,this._peakedSessionGroupHandle.selection().classed("peaked-path",!0)}clearPeakedSessionGroup(){this.updatePeakedSessionGroup(new th)}updateSelectedSessionGroup(t){this._selectedSessionGroupHandle.selection().classed("selected-path",!1),this._selectedSessionGroupHandle=t,this._selectedSessionGroupHandle.selection().classed("selected-path",!0)}findClosestSessionGroup(t,r){let n=this._axesCollection.mapVisibleAxes((o,a)=>o),i=pue(this._visibleFgPathsSel.nodes(),n,[t,r],100);return i===null?new th:new th(Ht(i))}_createLineColorFunction(t,r,n){if(t===null)return()=>"red";let i=zn().domain(hct(this._schema,this._sessionGroups,t)).range([r,n]).interpolate(E_);return o=>i(b0(this._schema,o,t))}_recomputePathSelection(t){return t=t.data(this._sessionGroups,r=>r.name),t.exit().remove(),t.enter().append("path").merge(t)}_setControlPointsProperty(t,r){t.controlPoints=this._computeControlPoints(r)}_computeControlPoints(t){return this._axesCollection.mapVisibleAxes((r,n)=>[r,n.yScale()(b0(this._schema,t,n.colIndex()))])}_pathDAttribute(t){return this._d3line(this._computeControlPoints(t))}_updateVisibleFgPathsSel(){this._visibleFgPathsSel=this._fgPathsSel.filter(":not(.invisible-path)")}};var aV=class{constructor(t,r){this.svg=Ht(t);let n={top:30,right:10,bottom:10,left:10},i=100,o=200,a=r*i+n.left+n.right,s=o+n.top+n.bottom;this.svg.attr("viewBox",`0 0 ${a} ${s}`),this.svg.attr("preserveAspectRatio","xMidYMid"),this.svg.style("min-width",a+"px"),this.svg.style("min-height",s+"px"),this.width=a-n.left-n.right,this.height=s-n.top-n.bottom,this.svgG=this.svg.append("g").attr("transform",yP(n.left,n.top))}},sV=class{constructor(t,r,n,i){this._svgProps=t,this._schema=r,this._peakedSessionGroupChangedCB=n,this._selectedSessionGroupChangedCB=i,this._axesCollection=new iV(t,r,this),this._linesCollection=new oV(t,r,this._axesCollection),this._svgProps.svg.on("click",()=>this.onClick()).on("mousemove mouseenter",()=>{let[o,a]=zo(this._svgProps.svgG.node());this.onMouseMoved(o,a)}).on("mouseleave",()=>this.onMouseLeave())}onDragStart(t){this._axesCollection.dragStart(t),this._linesCollection.hideBackgroundLines()}onDrag(t){this._axesCollection.drag(t),this._linesCollection.recomputeControlPoints(Xf.FOREGROUND)}onDragEnd(){this._axesCollection.dragEnd(500),this._linesCollection.recomputeControlPoints(Xf.FOREGROUND,500),window.setTimeout(()=>{this._linesCollection.recomputeControlPoints(Xf.BACKGROUND),this._linesCollection.showBackgroundLines()},500)}onBrushChanged(t,r){this._axesCollection.getAxisForColIndex(t).setBrushSelection(r),this._linesCollection.recomputeForegroundLinesVisibility()}onMouseMoved(t,r){this._linesCollection.updatePeakedSessionGroup(this._linesCollection.findClosestSessionGroup(t,r)),this._peakedSessionGroupChangedCB(this._linesCollection.peakedSessionGroupHandle().sessionGroup())}onMouseLeave(){this._linesCollection.peakedSessionGroupHandle().isNull()||(this._linesCollection.clearPeakedSessionGroup(),this._peakedSessionGroupChangedCB(null))}onClick(){this._linesCollection.peakedSessionGroupHandle().sessionGroup()===this._linesCollection.selectedSessionGroupHandle().sessionGroup()?this._linesCollection.updateSelectedSessionGroup(new th):this._linesCollection.updateSelectedSessionGroup(this._linesCollection.peakedSessionGroupHandle()),this._selectedSessionGroupChangedCB(this._linesCollection.selectedSessionGroupHandle().sessionGroup())}onOptionsOrSessionGroupsChanged(t,r){this._axesCollection.updateAxes(t,r);let n=this._linesCollection.peakedSessionGroupHandle(),i=this._linesCollection.selectedSessionGroupHandle();this._linesCollection.redraw(r,t.colorByColumnIndex!==void 0?t.columns[t.colorByColumnIndex].absoluteIndex:null,t.minColor,t.maxColor),n.equalsTo(this._linesCollection.peakedSessionGroupHandle())||this._peakedSessionGroupChangedCB(this._linesCollection.peakedSessionGroupHandle().sessionGroup()),i.equalsTo(this._linesCollection.selectedSessionGroupHandle())||this._selectedSessionGroupChangedCB(this._linesCollection.selectedSessionGroupHandle().sessionGroup())}schema(){return this._schema}};var eh=class extends Gt(_o(mt)){constructor(){super(...arguments),this.selectedSessionGroup=null,this.closestSessionGroup=null,this.redrawCount=0}_optionsOrSessionGroupsChanged(){var n;if(!this.options)return;let{configuration:t}=(n=this._prevOptions)!=null?n:{},{configuration:r}=this.options;if(this._interactionManager===void 0||!Uct.isEqual(t==null?void 0:t.schema,r.schema)||!Uct.isEqual(t==null?void 0:t.columnsVisibility,r.columnsVisibility)){Ht(this.$.svg).selectAll("*").remove();let i=new aV(this.$.svg,r.columnsVisibility.filter(Boolean).length);this.scopeSubtree(this.$.svg,!0),this._interactionManager=new sV(i,r.schema,o=>this.closestSessionGroupChanged(o),o=>this.selectedSessionGroupChanged(o))}this._computeValidSessionGroups(),this._interactionManager.onOptionsOrSessionGroupsChanged(this.options,this._validSessionGroups),this.redrawCount++,this._prevOptions=this.options}closestSessionGroupChanged(t){this.closestSessionGroup=t}selectedSessionGroupChanged(t){this.selectedSessionGroup=t}_computeValidSessionGroups(){let t=us;if(this.sessionGroups===void 0){this._validSessionGroups=void 0;return}let r=this.options.configuration.schema;this._validSessionGroups=this.sessionGroups.filter(n=>{for(let i=0;i<t.numColumns(r);++i){if(!this.options.configuration.columnsVisibility[i])continue;let o=t.columnValueByIndex(r,n,i);if(o===void 0||o==="NaN")return!1}return!0})}};eh.template=Q`
    <div id="container">
      <svg id="svg"></svg>
    </div>
    <style>
      :host {
        display: block;
        --tf-hparams-parallel-coords-plot-axis-shadow: 0 1px 0 #fff,
          1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;
      }
      :host(.dark-mode) {
        --tf-hparams-parallel-coords-plot-axis-shadow: 0 1px 0 #000,
          1px 0 0 #000, 0 -1px 0 #000, -1px 0 0 #000;
      }
      svg {
        font: 10px sans-serif;
      }

      .background path {
        fill: none;
        stroke: #ddd;
        shape-rendering: crispEdges;
      }

      .foreground path {
        fill: none;
        stroke-opacity: 0.7;
        stroke-width: 1;
      }

      /* Will be set on foreground paths that are not "contained" in the current
         axes brushes. If no brushes are set, no path will have this class. */
      .foreground .invisible-path {
        display: none;
      }

      /* Style for the path closest to the mouse pointer (typically will become
      the selected path when the user clicks). */
      .foreground .peaked-path {
        stroke-width: 3;
      }

      /* The currently selected path class. We use !important to override the
         inline style that sets the regular color of a path. */
      .foreground .selected-path {
        stroke-width: 3 !important;
        stroke: #0f0 !important;
      }

      #container {
        height: 100%;
        width: 100%;
      }

      svg {
        width: 100%;
        height: 100%;
      }

      .axis text {
        text-shadow: var(--tf-hparams-parallel-coords-plot-axis-shadow);
        fill: currentColor;
        cursor: move;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],eh.prototype,"sessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],eh.prototype,"options",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],eh.prototype,"selectedSessionGroup",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],eh.prototype,"closestSessionGroup",void 0);E([A({type:Number}),w("design:type",Number)],eh.prototype,"redrawCount",void 0);E([A({type:Array}),w("design:type",Object)],eh.prototype,"_validSessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],eh.prototype,"_interactionManager",void 0);E([Bt("options.*","sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],eh.prototype,"_optionsOrSessionGroupsChanged",null);eh=E([yt("tf-hparams-parallel-coords-plot")],eh);var P0=class extends mt{constructor(){super(...arguments),this.options=null}_configurationChanged(){let t=this.configuration.visibleSchema,r=this.configuration.schema,n=(a,s)=>({name:Bd(a),index:s,absoluteIndex:zH(r,t,s),scale:this._isNumericColumn(s)?"LINEAR":"NON_NUMERIC"}),i=(a,s)=>{let l=s+t.hparamInfos.length;return{scale:"LINEAR",name:Qu(a),index:l,absoluteIndex:zH(r,t,l)}},o={columns:t.hparamInfos.map(n).concat(t.metricInfos.map(i)),minColor:"#0000FF",maxColor:"#FF0000",configuration:this.configuration};this.set("options",o),ci(),this.set("options.colorByColumnIndex",this._defaultColorByColumnIndex())}_unselectDisabledLogScales(){this.options!==null&&this.options.columns.forEach(t=>{let r="options.columns."+t.index;!this._allowLogScale(t)&&t.scale==="LOG"&&this.set(r+".scale","LINEAR")})}_allowLogScale(t){if(!this._isNumericColumn(t.index)||!this.sessionGroups)return!1;let[r,n]=_P(this.configuration.visibleSchema,this.sessionGroups,t.index);return r>0||n<0}_isNumericColumn(t){return t>=this.configuration.visibleSchema.hparamInfos.length||this.configuration.visibleSchema.hparamInfos[t].type==="DATA_TYPE_FLOAT64"}_defaultColorByColumnIndex(){if(this.configuration.visibleSchema.metricInfos.length>0)return this.configuration.visibleSchema.hparamInfos.length;let t=this.configuration.visibleSchema.hparamInfos.findIndex(r=>r.type==="DATA_TYPE_FLOAT64");if(t!==-1)return t}};P0.template=Q`
    <div class="control-panel">
      <!-- 'Color by' drop down menu -->
      <paper-dropdown-menu
        label="Color by"
        id="colorByDropDownMenu"
        horizontal-align="left"
      >
        <paper-listbox
          class="dropdown-content"
          slot="dropdown-content"
          selected="{{options.colorByColumnIndex}}"
          id="colorByListBox"
        >
          <template
            is="dom-repeat"
            items="[[options.columns]]"
            as="column"
            id="colorByColumnTemplate"
          >
            <paper-item disabled="[[!_isNumericColumn(column.index)]]">
              [[column.name]]
            </paper-item>
          </template>
        </paper-listbox>
      </paper-dropdown-menu>

      <!-- Columns scales -->
      <div class="columns-container">
        <!-- Scale options for each numeric feature -->
        <template is="dom-repeat" items="{{options.columns}}" as="column">
          <template is="dom-if" if="[[_isNumericColumn(column.index)]]">
            <div class="column">
              <div class="column-title">[[column.name]]</div>
              <div>
                <paper-radio-group
                  class="scale-radio-group"
                  selected="{{column.scale}}"
                >
                  <paper-radio-button name="LINEAR">
                    Linear
                  </paper-radio-button>
                  <!-- The id here is used to access this button in unit
                       tests.-->
                  <paper-radio-button
                    id="logScaleButton_[[column.name]]"
                    name="LOG"
                    disabled="[[!_allowLogScale(column, sessionGroups.*)]]"
                  >
                    Logarithmic
                  </paper-radio-button>
                  <paper-radio-button name="QUANTILE">
                    Quantile
                  </paper-radio-button>
                </paper-radio-group>
              </div>
            </div>
          </template>
        </template>
      </div>
    </div>

    <style>
      :host {
        display: block;
      }
      .control-panel {
        overflow: auto;
      }
      .column {
        flex-grow: 1;
        flex-shrink: 1;
        margin-right: 5px;
        border: solid 1px darkgray;
        padding: 3px;
      }
      .column-title {
        /* Fit every title in one line so the radio boxes align vertically. */
        white-space: nowrap;
        text-decoration: underline;
      }
      .columns-container {
        display: flex;
        flex-direction: row;
      }
      .scale-radio-group paper-radio-button {
        padding: 2px;
        display: block;
      }
      paper-listbox {
        max-height: 15em;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],P0.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],P0.prototype,"sessionGroups",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],P0.prototype,"options",void 0);E([Bt("configuration.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],P0.prototype,"_configurationChanged",null);E([Bt("sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],P0.prototype,"_unselectDisabledLogScales",null);P0=E([yt("tf-hparams-scale-and-color-controls")],P0);var f1=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};f1.template=Q`
    <!-- Controls behavior of parallel coordinates plot
         outputs set options to the _options property.
      -->
    <hparams-split-layout orientation="vertical">
      <!-- The scale and color controls. -->
      <tf-hparams-scale-and-color-controls
        id="controls"
        slot="content"
        class="section"
        configuration="[[configuration]]"
        session-groups="[[sessionGroups]]"
        options="{{_options}}"
      >
      </tf-hparams-scale-and-color-controls>
      <!-- The actual parallel coordinates plot -->
      <tf-hparams-parallel-coords-plot
        id="plot"
        slot="content"
        class="section"
        session-groups="[[sessionGroups]]"
        selected-session-group="{{_selectedGroup}}"
        closest-session-group="{{_closestGroup}}"
        options="[[_options]]"
      >
      </tf-hparams-parallel-coords-plot>
      <tf-hparams-session-group-values
        id="values"
        slot="content"
        class="section"
        visible-schema="[[configuration.visibleSchema]]"
        session-group="[[_closestOrSelected(
                             _closestGroup, _selectedGroup)]]"
      >
      </tf-hparams-session-group-values>
      <tf-hparams-session-group-details
        id="details"
        slot="content"
        class="section"
        backend="[[backend]]"
        experiment-name="[[experimentName]]"
        session-group="[[_selectedGroup]]"
        visible-schema="[[configuration.visibleSchema]]"
      >
      </tf-hparams-session-group-details>
    </hparams-split-layout>

    <style>
      .section {
        padding: 10px;
      }
      #values {
        height: 115px;
      }
      #details {
        flex-grow: 1;
        max-height: fit-content;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],f1.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],f1.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],f1.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],f1.prototype,"sessionGroups",void 0);f1=E([yt("tf-hparams-parallel-coords-view")],f1);var y3=Ee(Oe(),1);var $o=class extends Gt(mt){constructor(){super(...arguments),this.selectedSessionGroup=null,this.closestSessionGroup=null,this._container=null,this._svg=null,this.width=0,this.height=0,this._brushedCellIndex=null,this._brushSelection=null}ready(){super.ready(),this._container=this.$.container,this._svg=Ht(this.$.svg),this._redraw()}_sessionGroupsChanged(){this.selectedSessionGroup!==null&&(this.selectedSessionGroup=fct(this.sessionGroups,this.selectedSessionGroup.name)||null),this._redraw()}_visibleSchemaChanged(){this._brushedCellIndex=null,this._brushSelection=null,this._redraw()}_redraw(){this.debounce("_redraw",()=>{let t=us,r=1200,n=.4*r,i=150,o=.75*i;this.width=Math.max(i*t.numVisibleColumns(this.visibleSchema),r),this.height=Math.max(o*t.numVisibleMetrics(this.visibleSchema),n),this._container.style.width=this.width+"px",this._container.style.height=this.height+"px",this._svg.attr("width",this.width).attr("height",this.height),this._svg.selectAll("g").remove(),this._draw()},100)}_draw(){let t=us,r=this;if(!this.sessionGroups||this.sessionGroups.length==0||!this.visibleSchema||this.visibleSchema.metricInfos.length==0)return;let n=Ir(t.numVisibleColumns(r.visibleSchema)),i=Ir(t.numVisibleMetrics(r.visibleSchema)),o=80,a=50,s=5,l=tg().domain(n).range([o+s,this.width-1-s]).paddingInner(.1),c=tg().domain(i).range([this.height-1-s-a,s]).paddingInner(.1),u=l.bandwidth(),h=c.bandwidth(),f=n.map(ct=>r._cellScale(ct,[0,u-1])),p=i.map(ct=>r._cellScale(ct+t.numVisibleHParams(r.visibleSchema),[h-1,0])),d=this._svg.selectAll(".x-axis").data(n).enter().append("g").classed("x-axis",!0).attr("transform",ct=>t.translateStr(l(ct),0));function g(ct){return"x-axis-clip-path-"+ct}function _(ct){return"x-label-clip-path-"+ct}d.append("clipPath").attr("id",g).append("rect").attr("x",-s).attr("y",0).attr("width",u+2*s).attr("height",r.height-a/2),d.append("clipPath").attr("id",_).append("rect").attr("x",0).attr("y",r.height-a/2).attr("width",u).attr("height",a/2),d.append("g").attr("clip-path",ct=>"url(#"+g(ct)+")").each(function(ct){Ht(this).call(S,Z9(f[ct]).tickSize(r.height-a),u,40,r.options.columns[ct].scale)}),d.append("g").classed("x-axis-label",!0).attr("clip-path",ct=>"url(#"+_(ct)+")").append("text").attr("text-anchor","middle").attr("x",u/2).attr("y",r.height-1-a/4).text(ct=>t.schemaVisibleColumnName(r.visibleSchema,ct)).append("title").text(ct=>t.schemaVisibleColumnName(r.visibleSchema,ct));let y=this._svg.selectAll(".y-axis").data(i).enter().append("g").classed("y-axis",!0).attr("transform",ct=>t.translateStr(r.width-1,c(ct)));function x(ct){return"y-axis-clip-path-"+ct}function b(ct){return"y-label-clip-path-"+ct}y.append("clipPath").attr("id",x).append("rect").attr("x",-(r.width-o/2-1)).attr("y",-s).attr("width",r.width-o/2).attr("height",h+2*s),y.append("clipPath").attr("id",b).append("rect").attr("x",-(r.width-1)).attr("y",0).attr("width",o/2).attr("height",h),y.append("g").attr("clip-path",ct=>"url(#"+x(ct)+")").each(function(ct){Ht(this).call(S,lb(p[ct]).tickSize(r.width-o),h,20,r.options.columns[ct+t.numVisibleHParams(r.visibleSchema)].scale)}),y.append("g").classed("y-axis-label",!0).attr("clip-path",ct=>"url(#"+b(ct)+")").append("text").attr("text-anchor","middle").attr("x",-(r.width-o/4-1)).attr("y",h/2).attr("transform",t.rotateStr(90,-(r.width-o/4-1),h/2)).text(ct=>t.metricName(r.visibleSchema.metricInfos[ct])).append("title").text(ct=>t.metricName(r.visibleSchema.metricInfos[ct]));function S(ct,X,et,dt,q){let pt=Math.floor(et/dt),ht=X.scale();if(q==="QUANTILE"){let wt=ht.quantiles(),kt=Math.ceil(wt.length/pt);wt=Ir(0,wt.length,kt).map(ie=>wt[ie]),X.tickValues(wt).tickFormat(xn("-.2g"))}(q==="LINEAR"||q==="LOG")&&X.ticks(pt),ct.call(X),ct.selectAll(".domain").remove(),ct.selectAll(".tick line").attr("stroke","#ddd")}let C=this._svg.selectAll(".cell").data(q9(n,i)).enter().append("g").classed("cell",!0).attr("transform",([ct,X])=>t.translateStr(l(ct),c(X))),P=C.append("g").classed("frame",!0).append("rect").attr("x",-s).attr("y",-s).attr("width",u+2*s).attr("height",h+2*s).attr("stroke","#000").attr("fill","none").attr("shape-rendering","crispEdges"),k=null;r.options.colorByColumnIndex!==void 0&&(k=zn().domain(this._colExtent(this.options.colorByColumnIndex)).range([this.options.minColor,this.options.maxColor]).interpolate(E_));let O=r.options.colorByColumnIndex===void 0?()=>"red":({sessionGroup:ct})=>k(this._colValue(ct,r.options.colorByColumnIndex));function D(ct,X){return f[X](r._colValue(ct,X))}function B(ct,X){return p[X](r._metricValue(ct,X))}function I(ct,X){let et=ct.selectAll(".data-marker").data(([pt,ht])=>r.sessionGroups.filter(wt=>r._colValue(wt,pt)!==void 0&&r._metricValue(wt,ht)!==void 0).map(wt=>({col:pt,metric:ht,sessionGroup:wt,x:D(wt,pt),y:B(wt,ht),sessionGroupMarkers:null}))).enter().append("circle").classed("data-marker",!0).attr("cx",({x:pt})=>pt).attr("cy",({y:pt})=>pt).attr("r",2).attr("fill",X),dt=new Map;r.sessionGroups.forEach(pt=>{dt.set(pt,[])}),et.each(function(pt){var ht;(ht=dt.get(pt.sessionGroup))==null||ht.push(this)}),et.each(pt=>{let ht=dt.get(pt.sessionGroup);pt.sessionGroupMarkers=new Set(ht)});let q=n.map(pt=>i.map(ht=>et.filter(wt=>wt.col==pt&&wt.metric==ht)));return[et,q,dt]}let[L,R,F]=I(C.append("g"),O);function z(ct,X){let et=[];return R[ct][X].each(function(){et.push(this)}),Fh().x(dt=>Ht(dt).datum().x).y(dt=>Ht(dt).datum().y).addAll(et)}let U=n.map(ct=>i.map(X=>z(ct,X))),W=null;bt()&&(W=C.filter(ct=>y3.isEqual(ct,r._brushedCellIndex)),console.assert(W.size()==1,W));let Z=new Set(L.nodes());rt();function rt(){let ct=new Set(L.nodes());Mt()||(ct=ot(r._brushedCellIndex,r._brushSelection)),Tp(Array.from(t.filterSet(ct,X=>!Z.has(X)))).attr("fill",O),Tp(Array.from(t.filterSet(Z,X=>!ct.has(X)))).attr("fill","#ddd"),Z=ct}function ot(ct,X){console.assert(ct!==null),console.assert(X!==null);let[et,dt]=ct,q=new Set;return t.quadTreeVisitPointsInRect(U[et][dt],X[0][0],X[0][1],X[1][0],X[1][1],pt=>{Ht(pt).datum().sessionGroupMarkers.forEach(wt=>{q.add(wt)})}),q}let st=GL().extent([[-s+1,-s+1],[u-1+s-1,h-1+s-1]]).on("start",function(){bt()&&W.node()!=this&&st.move(W,null),St(this)}).on("brush",function(){St(this)}).on("end",function(){St(this)});function St(ct){let X=UL(ct);!bt()&&X===null||bt()&&ct===W.node()&&y3.isEqual(X,r._brushSelection)||(r._brushSelection=X,X!==null?(W=Ht(ct),r._brushedCellIndex=W.datum()):(W=null,r._brushedCellIndex=null),rt())}function bt(){return r._brushedCellIndex!==null&&r._brushSelection!==null}function Mt(){return!bt()||r._brushSelection[0][0]===r._brushSelection[1][0]||r._brushSelection[0][1]===r._brushSelection[1][1]}C.call(st),bt()&&st.move(W,r._brushSelection);let lt=null,Kt=null;this.selectedSessionGroup!==null&&(Kt=Tp(F.get(this.selectedSessionGroup)).classed("selected-marker",!0)),C.on("click",function(){let ct=lt===Kt?null:lt;if(ct===Kt)return;Kt!==null&&Kt.classed("selected-marker",!1),Kt=ct,Kt!==null&&Kt.classed("selected-marker",!0);let X=Kt===null?null:Kt.datum().sessionGroup;r.selectedSessionGroup=X}).on("mousemove mouseenter",function([ct,X]){let[et,dt]=zo(this),q=_t(ct,X,et,dt,20);lt!==q&&(lt!==null&&lt.classed("closest-marker",!1),lt=q,lt!==null?(lt.classed("closest-marker",!0),r.closestSessionGroup=lt.datum().sessionGroup):r.closestSessionGroup=null)}).on("mouseleave",function([ct,X]){lt!==null&&(lt.classed("closest-marker",!1),lt=null,r.closestSessionGroup=null)});function _t(ct,X,et,dt,q){let pt=1/0,ht=null;return t.quadTreeVisitPointsInDisk(U[ct][X],et,dt,q,(wt,kt)=>{if(Z.has(wt)&&kt<pt){let ie=Ht(wt).datum();pt=kt,ht=ie.sessionGroup}}),ht===null?null:Tp(F.get(ht))}this._svg.selectAll("*").classed("tf-hparams-scatter-plot-matrix-plot",!0)}_cellScale(t,r){let n=this._colExtent(t),i=zn().domain(n).range(r);if(this.options.columns[t].scale==="LINEAR")return i;if(this.options.columns[t].scale==="LOG")return n[0]<=0&&n[1]>=0?i:cc().domain(n).range(r);if(this.options.columns[t].scale==="QUANTILE"){let o=(r[1]-r[0])/19,a=Ir(20).map(s=>r[0]+o*s);return rg().domain(y3.uniq(this.sessionGroups.map(s=>this._colValue(s,t)))).range(a)}else{if(this.options.columns[t].scale==="NON_NUMERIC")return eg().domain(y3.uniq(this.sessionGroups.map(o=>this._colValue(o,t)).sort())).range(r).padding(.1);throw"Unknown scale for column: "+t+". options: "+this.options}}_colValue(t,r){return BH(this.visibleSchema,t,r)}_metricValue(t,r){return FH(this.visibleSchema,t,r)}_colExtent(t){return _P(this.visibleSchema,this.sessionGroups,t)}};$o.template=Q`
    <div id="container">
      <svg id="svg"></svg>
    </div>

    <style>
      :host {
        display: block;
      }
      svg {
        font: 10px sans-serif;
      }

      text {
        fill: currentColor;
      }

      .frame rect {
        stroke: currentColor;
      }

      /* The closest data point marker to the mouse pointer. We use !important
         to override the inline style that sets the regular style of a marker.
      */
      .closest-marker {
        r: 6 !important;
      }

      /* The currently selected data point marker. We use !important to
         override the inline style that sets the regular style of a marker. */
      .selected-marker {
        r: 6 !important;
        fill: #0f0 !important;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],$o.prototype,"visibleSchema",void 0);E([A({type:Array}),w("design:type",Array)],$o.prototype,"sessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"options",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],$o.prototype,"selectedSessionGroup",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],$o.prototype,"closestSessionGroup",void 0);E([A({type:Object}),w("design:type",HTMLElement)],$o.prototype,"_container",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_svg",void 0);E([A({type:Number}),w("design:type",Number)],$o.prototype,"width",void 0);E([A({type:Number}),w("design:type",Number)],$o.prototype,"height",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_brushedCellIndex",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_brushSelection",void 0);E([Bt("sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_sessionGroupsChanged",null);E([Bt("visibleSchema.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_visibleSchemaChanged",null);E([Bt("options.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_redraw",null);$o=E([yt("tf-hparams-scatter-plot-matrix-plot")],$o);var p1=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};p1.template=Q`
    <hparams-split-layout orientation="vertical">
      <!-- Controls behavior of the scatter plot matrix
             outputs the configured options to the _options property. -->
      <tf-hparams-scale-and-color-controls
        slot="content"
        class="section"
        id="controls"
        configuration="[[configuration]]"
        session-groups="[[sessionGroups]]"
        options="{{_options}}"
      >
      </tf-hparams-scale-and-color-controls>
      <!-- The actual scatter plot matrix -->
      <tf-hparams-scatter-plot-matrix-plot
        slot="content"
        class="section"
        id="plot"
        visible-schema="[[configuration.visibleSchema]]"
        session-groups="[[sessionGroups]]"
        selected-session-group="{{_selectedGroup}}"
        closest-session-group="{{_closestGroup}}"
        options="[[_options]]"
      >
      </tf-hparams-scatter-plot-matrix-plot>
      <tf-hparams-session-group-values
        slot="content"
        class="section"
        id="values"
        visible-schema="[[configuration.visibleSchema]]"
        session-group="[[_closestOrSelected(
                                 _closestGroup, _selectedGroup)]]"
      >
      </tf-hparams-session-group-values>
      <!-- Shows session group details for the clicked marker. -->
      <tf-hparams-session-group-details
        slot="content"
        class="section"
        id="details"
        backend="[[backend]]"
        experiment-name="[[experimentName]]"
        session-group="[[_selectedGroup]]"
        visible-schema="[[configuration.visibleSchema]]"
      >
      </tf-hparams-session-group-details>
    </hparams-split-layout>
    <style>
      .section {
        padding: 10px;
      }
      #controls {
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      #plot {
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      #values {
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: auto;
        height: 115px;
        overflow-y: auto;
        max-height: fit-content;
      }
      #details {
        flex-grow: 0;
        flex-shrink: 1;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      vaadin-split-layout {
        height: 100%;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],p1.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],p1.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],p1.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],p1.prototype,"sessionGroups",void 0);p1=E([yt("tf-hparams-scatter-plot-matrix-view")],p1);var $f=class extends mt{constructor(){super(),this._selectedTab=0,this._tableTabClicked=()=>{this.logAction("Tab Clicked","Table")},this._parallelCoordsTabClicked=()=>{this.logAction("Tab Clicked","Parallel Coords")},this._scatterPlotMatrixTabClicked=()=>{this.logAction("Tab Clicked","Scatter Plot Matrix")},this.logAction=(t,r)=>{let n=window.dataLayer||[];function i(){n.push(arguments)}i("event",t,{event_category:"HParams",event_label:r})},this.logAction("Plugin Load")}};$f.template=Q`
    <paper-header-panel>
      <paper-toolbar slot="header" class="tab-bar">
        <paper-tabs selected="{{_selectedTab}}" slot="top">
          <!-- view-id can be used by integration tests to locate a tab.
               It should be the name of the root element implementing the view
               without the 'tf-hparams-' prefix. -->
          <paper-tab on-click="_tableTabClicked" view-id="table-view">
            TABLE VIEW
          </paper-tab>
          <paper-tab
            on-click="_parallelCoordsTabClicked"
            view-id="parallel-coords-view"
          >
            PARALLEL COORDINATES VIEW
          </paper-tab>
          <paper-tab
            on-click="_scatterPlotMatrixTabClicked"
            view-id="scatter-plot-matrix-view"
          >
            SCATTER PLOT MATRIX VIEW
          </paper-tab>
          <div class="help-and-feedback">
            <template is="dom-if" if="[[bugReportUrl]]">
              <a
                href$="[[bugReportUrl]]"
                target="_blank"
                rel="noopener noreferrer"
              >
                <paper-button
                  id="bug-report"
                  raised
                  title="Send a bug report or feature request"
                >
                  Bug Report / Feature Request
                </paper-button>
              </a>
            </template>
            <template is="dom-if" if="[[helpUrl]]">
              <a href$="[[helpUrl]]" target="_blank" rel="noopener noreferrer">
                <paper-icon-button
                  icon="help-outline"
                  title="View documentation"
                >
                </paper-icon-button>
              </a>
            </template>
          </div>
        </paper-tabs>
      </paper-toolbar>
      <iron-pages selected="[[_selectedTab]]" class="fit tab-view">
        <div id="0" class="tab">
          <tf-hparams-table-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            visible-schema="[[configuration.visibleSchema]]"
            session-groups="[[sessionGroups]]"
            enable-show-metrics
          >
          </tf-hparams-table-view>
        </div>
        <div id="1" class="tab">
          <tf-hparams-parallel-coords-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            configuration="[[configuration]]"
            session-groups="[[sessionGroups]]"
          >
          </tf-hparams-parallel-coords-view>
        </div>
        <div id="2" class="tab">
          <tf-hparams-scatter-plot-matrix-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            configuration="[[configuration]]"
            session-groups="[[sessionGroups]]"
          >
          </tf-hparams-scatter-plot-matrix-view>
        </div>
      </iron-pages>
    </paper-header-panel>

    <style>
      .tab-view {
        height: 100%;
      }
      .tab-bar {
        overflow-y: auto;
        color: white;
        background-color: var(
          --tb-toolbar-background-color,
          var(--tb-orange-strong)
        );
      }
      .tab {
        height: 100%;
      }
      paper-tabs {
        flex-grow: 1;
        width: 100%;
        height: 100%;
        --paper-tabs-selection-bar-color: white;
        --paper-tabs-content: {
          -webkit-font-smoothing: antialiased;
        }
      }
      tf-hparams-table-view {
        width: 100%;
        height: 100%;
      }
      .help-and-feedback {
        display: inline-flex; /* Ensure that icons stay aligned */
        justify-content: flex-end;
        align-items: center;
        text-align: right;
        color: white;
      }
      #bug-report {
        border: solid black;
        background: red;
        white-space: normal;
        word-break: break-words;
        font-size: 12px;
        max-width: 150px;
        text-align: left;
      }
      .help-and-feedback a {
        color: white;
        text-decoration: none;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],$f.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],$f.prototype,"helpUrl",void 0);E([A({type:String}),w("design:type",String)],$f.prototype,"bugReportUrl",void 0);E([A({type:String}),w("design:type",String)],$f.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],$f.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],$f.prototype,"sessionGroups",void 0);E([A({type:Number}),w("design:type",Number)],$f.prototype,"_selectedTab",void 0);$f=E([yt("tf-hparams-sessions-pane"),w("design:paramtypes",[])],$f);var rh=class extends Gt(mt){reload(){this.$["query-pane"].reload()}};rh.template=Q`
    <hparams-split-layout>
      <div slot="content" class="sidebar">
        <tf-hparams-query-pane
          id="query-pane"
          backend="[[backend]]"
          experiment-name="[[experimentName]]"
          configuration="{{_configuration}}"
          session-groups="{{_sessionGroups}}"
          data-loaded-with-non-empty-hparams="{{_dataLoadedWithNonEmptyHparams}}"
          data-loaded-with-empty-hparams="{{_dataLoadedWithEmptyHparams}}"
        >
        </tf-hparams-query-pane>
      </div>
      <div slot="content" class="center">
        <template is="dom-if" if="[[_dataLoadedWithEmptyHparams]]">
          <div class="no-data-warning">
            <h3>No hparams data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any hparams data to your event files.</li>
              <li>
                Event files are still being loaded (try reloading this page).
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>

        <template is="dom-if" if="[[_dataLoadedWithNonEmptyHparams]]">
          <tf-hparams-sessions-pane
            id="sessions-pane"
            backend="[[backend]]"
            help-url="[[helpUrl]]"
            bug-report-url="[[bugReportUrl]]"
            experiment-name="[[experimentName]]"
            configuration="[[_configuration]]"
            session-groups="[[_sessionGroups]]"
          >
          </tf-hparams-sessions-pane>
        </template>
      </div>
    </hparams-split-layout>
    <style>
      hparams-split-layout {
        width: 100%;
      }

      .sidebar {
        width: 20%;
        height: 100%;
        overflow: auto;
        flex-grow: 0;
        flex-shrink: 0;
        min-width: 10%;
      }

      .center {
        height: 100%;
        overflow-y: auto;
        flex-grow: 1;
        flex-shrink: 1;
        width: 80%;
      }

      :host {
        display: flex;
        flex-direction: row;
        height: 100%;
        width: 100%;
      }

      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
    </style>
  `;E([A({type:Object}),w("design:type",u3)],rh.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"experimentName",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"helpUrl",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"bugReportUrl",void 0);E([A({type:Object}),w("design:type",Object)],rh.prototype,"_configuration",void 0);E([A({type:Array}),w("design:type",Array)],rh.prototype,"_sessionGroups",void 0);E([A({type:Boolean}),w("design:type",Boolean)],rh.prototype,"_dataLoadedWithNonEmptyHparams",void 0);E([A({type:Boolean}),w("design:type",Boolean)],rh.prototype,"_dataLoadedWithEmptyHparams",void 0);rh=E([yt("tf-hparams-main")],rh);var phr=new URLSearchParams(window.location.search).get("tensorboardColab")==="true",lV=class extends Gt(mt){constructor(){super(...arguments),this._backend=new u3(new Ae,phr)}reload(){this.$["hparams-main"].reload()}};lV.template=Q`
    <!-- TensorBoard does not specify an experimentName. Currently it only
         supports one experiment per invocation. -->
    <tf-hparams-main
      id="hparams-main"
      backend="[[_backend]]"
      experiment-name=""
    >
    </tf-hparams-main>
  `;E([A({type:Object}),w("design:type",Object)],lV.prototype,"_backend",void 0);lV=E([yt("tf-hparams-dashboard")],lV);var d1=Ee(Oe(),1);var _n=class extends Gt(mt){constructor(){super(...arguments),this.actualSize=!1,this.brightnessAdjustment=.5,this.contrastPercentage=0,this._metadataCanceller=new an,this._imageCanceller=new an,this._steps=[],this._isImageLoading=!1}get _runColor(){var t=this.run;return fn(t)}get _hasAtLeastOneStep(){var t=this._steps;return!!t&&t.length>0}get _hasMultipleSteps(){var t=this._steps;return!!t&&t.length>1}get _currentStep(){var t=this._steps,r=this._stepIndex;return t[r]||null}get _stepValue(){var t=this._currentStep;return t?t.step:0}get _currentWallTime(){var t=this._currentStep;return t?s2(t.wall_time):""}get _maxStepIndex(){var t=this._steps;return t.length-1}get _sampleText(){var t=this.sample;return`${t+1}`}get _hasMultipleSamples(){var t=this.ofSamples;return t>1}_getAriaExpanded(){return this.actualSize?"true":"false"}attached(){this.reload()}reload(){if(!this.isAttached)return;this._metadataCanceller.cancelAll();let t=new URLSearchParams({tag:this.tag,run:this.run,sample:this.sample}),r=_e().pluginRoute("images","/images",t),n=this._metadataCanceller.cancellable(i=>{if(i.cancelled)return;let a=i.value.map(this._createStepDatum.bind(this));this.set("_steps",a),this.set("_stepIndex",a.length-1)});this.requestManager.request(r).then(n)}_createStepDatum(t){let r=new URLSearchParams(t.query);r.append("ts",t.wall_time);let n=_e().pluginRouteForSrc("images","/individualImage",r);return{wall_time:new Date(t.wall_time*1e3),step:t.step,url:n}}_updateImageUrl(){var t=this._currentStep,r=this.brightnessAdjustment,n=this.contrastPercentage;if(!t)return;let i=new Image;this._imageCanceller.cancelAll(),i.onload=i.onerror=this._imageCanceller.cancellable(o=>{if(o.cancelled)return;let a=this.$$("#main-image-container");a&&(a.textContent="",zt(a).appendChild(i)),this.set("_isImageLoading",!1)}).bind(this),i.style.filter=`contrast(${n}%) `,i.style.filter+=`brightness(${r})`,this.set("_isImageLoading",!0),i.src=t.url}_handleTap(t){this.set("actualSize",!this.actualSize)}_toLocaleString(t){return t.toLocaleString()}};_n.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    >
      <template is="dom-if" if="[[_hasMultipleSamples]]">
        <div>sample: [[_sampleText]] of [[ofSamples]]</div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep]]">
        <div class="heading-row">
          <div class="heading-label">
            step
            <span style="font-weight: bold"
              >[[_toLocaleString(_stepValue)]]</span
            >
          </div>
          <div class="heading-label heading-right datetime">
            <template is="dom-if" if="[[_currentWallTime]]">
              [[_currentWallTime]]
            </template>
          </div>
          <div class="label right">
            <paper-spinner-lite active hidden$="[[!_isImageLoading]]">
            </paper-spinner-lite>
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps]]">
        <div>
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_maxStepIndex]]"
            max-markers="[[_maxStepIndex]]"
            snaps
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>

    <!-- Semantically a button but <img> inside a <button> disallows user to do
    an interesting operation like "Copy Image" in non-Chromium browsers. -->
    <a
      id="main-image-container"
      role="button"
      aria-label="Toggle actual size"
      aria-expanded$="[[_getAriaExpanded(actualSize)]]"
      on-tap="_handleTap"
    ></a>

    <style include="tf-card-heading-style">
      /** Make button a div. */
      button {
        width: 100%;
        display: block;
        background: none;
        border: 0;
        padding: 0;
      }

      /** Firefox: Get rid of dotted line inside button. */
      button::-moz-focus-inner {
        border: 0;
        padding: 0;
      }

      /** Firefox: Simulate Chrome's outer glow on button when focused. */
      button:-moz-focusring {
        outline: none;
        box-shadow: 0px 0px 1px 2px Highlight;
      }

      :host {
        display: block;
        width: 350px;
        height: auto;
        position: relative;
        margin: 0 15px 40px 0;
        overflow-x: auto;
      }

      /** When actual size shown is on, use the actual image width. */
      :host([actual-size]) {
        max-width: 100%;
        width: auto;
      }

      :host([actual-size]) #main-image-container {
        max-height: none;
        width: auto;
      }

      :host([actual-size]) #main-image-container img {
        width: auto;
      }

      paper-spinner-lite {
        width: 14px;
        height: 14px;
        vertical-align: text-bottom;
        --paper-spinner-color: var(--tb-orange-strong);
      }

      #steps {
        height: 15px;
        margin: 0 0 0 -15px;
        /*
         * 31 comes from adding a padding of 15px from both sides of the
         * paper-slider, subtracting 1px so that the slider width aligns
         * with the image (the last slider marker takes up 1px), and
         * adding 2px to account for a border of 1px on both sides of
         * the image. 30 - 1 + 2.
         */
        width: calc(100% + 31px);
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
      }

      #main-image-container {
        max-height: 1024px;
        overflow: auto;
      }

      #main-image-container img {
        cursor: pointer;
        display: block;
        image-rendering: -moz-crisp-edges;
        image-rendering: pixelated;
        width: 100%;
        height: auto;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }
      [hidden] {
        display: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],_n.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],_n.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"ofSamples",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"tagMetadata",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],_n.prototype,"actualSize",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"brightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"contrastPercentage",void 0);E([A({type:Object}),w("design:type",Ae)],_n.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"_metadataCanceller",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"_imageCanceller",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],_n.prototype,"_steps",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],_n.prototype,"_stepIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],_n.prototype,"_isImageLoading",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_runColor",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasAtLeastOneStep",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasMultipleSteps",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],_n.prototype,"_currentStep",null);E([Rt("_currentStep"),w("design:type",Number),w("design:paramtypes",[])],_n.prototype,"_stepValue",null);E([Rt("_currentStep"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_currentWallTime",null);E([Rt("_steps"),w("design:type",Number),w("design:paramtypes",[])],_n.prototype,"_maxStepIndex",null);E([Rt("sample"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_sampleText",null);E([Rt("ofSamples"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasMultipleSamples",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],_n.prototype,"reload",null);E([Bt("_currentStep","brightnessAdjustment","contrastPercentage"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],_n.prototype,"_updateImageUrl",null);_n=E([yt("tf-image-loader")],_n);var Io=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._defaultBrightnessAdjustment=1,this._defaultContrastPercentage=100,this._brightnessAdjustment=1,this._contrastPercentage=100,this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadImages()})}_fetchTags(){let t=_e().pluginRoute("images","/tags");return this._requestManager.request(t).then(r=>{if(d1.isEqual(r,this._runToTagInfo))return;let n=d1.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadImages(){var t;(t=this.root)==null||t.querySelectorAll("tf-image-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}_resetBrightness(){this._brightnessAdjustment=this._defaultBrightnessAdjustment}_resetContrast(){this._contrastPercentage=this._defaultContrastPercentage}get _brightnessIsDefault(){var t=this._brightnessAdjustment;return t===this._defaultBrightnessAdjustment}get _contrastIsDefault(){var t=this._contrastPercentage;return t===this._defaultContrastPercentage}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;let o=d1.mapValues(t,c=>Object.keys(c)),a=Ql(o,r,n);function s(c){let u=t[c.run][c.tag].samples;return d1.range(u).map(h=>Object.assign({},c,{sample:h,ofSamples:u}))}return a.map(c=>Object.assign({},c,{items:[].concat.apply([],c.items.map(s))}))}_tagMetadata(t,r,n){return t[r][n]}};Io.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox checked="{{_actualSize}}"
                >Show actual image size</paper-checkbox
              >
            </div>
          </div>
          <div class="sidebar-section">
            <h3 class="tooltip-container">Brightness adjustment</h3>
            <div class="resettable-slider-container">
              <paper-slider
                min="0"
                max="2"
                snaps
                pin
                step="0.01"
                value="{{_brightnessAdjustment}}"
                immediate-value="{{_brightnessAdjustment}}"
              ></paper-slider>
              <paper-button
                class="x-button"
                on-tap="_resetBrightness"
                disabled="[[_brightnessIsDefault]]"
                >Reset</paper-button
              >
            </div>
          </div>
          <div class="sidebar-section">
            <h3 class="tooltip-container">Contrast adjustment</h3>
            <div class="resettable-slider-container">
              <paper-slider
                min="0"
                max="500"
                snaps
                pin
                step="1"
                value="{{_contrastPercentage}}"
                immediate-value="{{_contrastPercentage}}"
              ></paper-slider>
              <paper-button
                class="x-button"
                on-tap="_resetContrast"
                disabled="[[_contrastIsDefault]]"
                >Reset</paper-button
              >
            </div>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector
            id="runs-selector"
            selected-runs="{{_selectedRuns}}"
          ></tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No image data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any image data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-image-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  of-samples="[[item.ofSamples]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  request-manager="[[_requestManager]]"
                  actual-size="[[_actualSize]]"
                  brightness-adjustment="[[_brightnessAdjustment]]"
                  contrast-percentage="[[_contrastPercentage]]"
                ></tf-image-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .resettable-slider-container {
        display: flex;
      }
      .resettable-slider-container paper-slider {
        flex-grow: 1;
      }
      .resettable-slider-container paper-button {
        flex-grow: 0;
      }
      .resettable-slider-container paper-button[disabled] {
        background-color: unset;
      }
      .x-button {
        font-size: 13px;
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      paper-slider {
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],Io.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Io.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_dataNotFound",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_actualSize",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_defaultBrightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_defaultContrastPercentage",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_brightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_contrastPercentage",void 0);E([A({type:String}),w("design:type",String)],Io.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],Io.prototype,"_requestManager",void 0);E([Rt("_brightnessAdjustment"),w("design:type",Boolean),w("design:paramtypes",[])],Io.prototype,"_brightnessIsDefault",null);E([Rt("_contrastPercentage"),w("design:type",Boolean),w("design:paramtypes",[])],Io.prototype,"_contrastIsDefault",null);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Io.prototype,"_categories",null);Io=E([yt("tf-image-dashboard")],Io);var lx=Ee(Oe(),1);var m1;(function(e){e[e.CANCELLED=1]="CANCELLED"})(m1||(m1={}));var cV;(function(e){e[e.VERTEX=1]="VERTEX",e[e.FACE=2]="FACE",e[e.COLOR=3]="COLOR"})(cV||(cV={}));var qct;(function(e){e.VERTEX="float32",e.FACE="int32",e.COLOR="uint8"})(qct||(qct={}));var IP=class{constructor(t){this._canceller=new an,this._requestManager=t}reload(t,r,n){return this._canceller.cancelAll(),this._fetchMetadata(t,r,n)}_fetchDataByStep(t,r,n,i,o,a){let s=_e().pluginRoute("mesh","/data",new URLSearchParams({tag:r,run:t,content_type:n,sample:String(i),step:String(o)})),l=function(u){let f=[];for(let p=0;p<u.length/3;p++){let d=[];for(let g=0;g<3;g++)d.push(u[p*3+g]);f.push(d)}return f},c=this._canceller.cancellable(u=>{if(u.cancelled)return Promise.reject({code:m1.CANCELLED,message:"Response was invalidated."});let h=u.value;switch(n){case"VERTEX":a.vertices=l(new Float32Array(h));break;case"FACE":a.faces=l(new Int32Array(h));break;case"COLOR":a.colors=l(new Uint8Array(h));break}return a});return this._requestManager.fetch(s,{method:"GET",headers:{responseType:"arraybuffer",contentType:qct[n]}}).then(u=>u.arrayBuffer()).then(c)}fetchData(t,r,n,i){let o=[],a=new Map;return Object.keys(cV).forEach(s=>{let l=1<<cV[s];t.components&l&&o.push(this._fetchDataByStep(r,n,s,i,t.step,a))}),Promise.all(o)}_fetchMetadata(t,r,n){this._canceller.cancelAll();let i=_e().pluginRoute("mesh","/meshes",new URLSearchParams({tag:r,run:t,sample:n})),o=this._canceller.cancellable(a=>a.cancelled?Promise.reject({code:m1.CANCELLED,message:"Response was invalidated."}):a.value);return this._requestManager.fetch(i).then(a=>a.json()).then(o).then(this._processMetadata.bind(this))}_processMetadata(t){if(!t)return;let r=new Map;for(let i=0;i<t.length;i++){let o=t[i];r.has(o.step)||r.set(o.step,[]),r.get(o.step).push(o)}let n=[];return r.forEach(i=>{let o=this._createStepDatum(i[0]);n.push(o)}),n}_createStepDatum(t){return{wall_time:new Date(t.wall_time*1e3),step:t.step,config:t.config,content_type:t.content_type,components:t.components}}};var wM={};Zs(wM,{ACESFilmicToneMapping:()=>pfe,AddEquation:()=>E1,AddOperation:()=>cfe,AdditiveAnimationBlendMode:()=>kht,AdditiveBlending:()=>Mut,AlphaFormat:()=>xfe,AlwaysDepth:()=>rfe,AlwaysStencilFunc:()=>Ofe,AmbientLight:()=>L6,AmbientLightProbe:()=>zU,AnimationClip:()=>tx,AnimationLoader:()=>oht,AnimationMixer:()=>VU,AnimationObjectGroup:()=>HU,AnimationUtils:()=>jn,ArcCurve:()=>l6,ArrayCamera:()=>n6,ArrowHelper:()=>Mht,Audio:()=>D6,AudioAnalyser:()=>FU,AudioContext:()=>zht,AudioListener:()=>cht,AudioLoader:()=>DU,AxesHelper:()=>vM,AxisHelper:()=>K0r,BackSide:()=>Ii,BasicDepthPacking:()=>Rfe,BasicShadowMap:()=>mhr,BinaryTextureLoader:()=>e_r,Bone:()=>sM,BooleanKeyframeTrack:()=>sm,BoundingBoxHelper:()=>Z0r,Box2:()=>K0,Box3:()=>ta,Box3Helper:()=>wht,BoxBufferGeometry:()=>tp,BoxGeometry:()=>tp,BoxHelper:()=>yM,BufferAttribute:()=>Je,BufferGeometry:()=>Pe,BufferGeometryLoader:()=>RU,ByteType:()=>mfe,Cache:()=>ex,Camera:()=>N1,CameraHelper:()=>bht,CanvasRenderer:()=>n_r,CanvasTexture:()=>xU,CatmullRomCurve3:()=>c6,CineonToneMapping:()=>ffe,CircleBufferGeometry:()=>B1,CircleGeometry:()=>B1,ClampToEdgeWrapping:()=>Jo,Clock:()=>mM,Color:()=>ne,ColorKeyframeTrack:()=>M6,CompressedTexture:()=>a6,CompressedTextureLoader:()=>aht,ConeBufferGeometry:()=>H1,ConeGeometry:()=>H1,CubeCamera:()=>J3,CubeReflectionMapping:()=>ix,CubeRefractionMapping:()=>ox,CubeTexture:()=>V0,CubeTextureLoader:()=>TU,CubeUVReflectionMapping:()=>xM,CubeUVRefractionMapping:()=>z6,CubicBezierCurve:()=>cM,CubicBezierCurve3:()=>u6,CubicInterpolant:()=>SU,CullFaceBack:()=>Sut,CullFaceFront:()=>Vhe,CullFaceFrontBack:()=>dhr,CullFaceNone:()=>Hhe,Curve:()=>ps,CurvePath:()=>wU,CustomBlending:()=>qhe,CustomToneMapping:()=>dfe,CylinderBufferGeometry:()=>am,CylinderGeometry:()=>am,Cylindrical:()=>mht,DataTexture:()=>Qd,DataTexture2DArray:()=>tM,DataTexture3D:()=>r6,DataTextureLoader:()=>CU,DataUtils:()=>Tht,DecrementStencilOp:()=>Thr,DecrementWrapStencilOp:()=>Ahr,DefaultLoadingManager:()=>ipe,DepthFormat:()=>F0,DepthStencilFormat:()=>R1,DepthTexture:()=>nM,DirectionalLight:()=>I6,DirectionalLightHelper:()=>xht,DiscreteInterpolant:()=>MU,DodecahedronBufferGeometry:()=>V1,DodecahedronGeometry:()=>V1,DoubleSide:()=>k1,DstAlphaFactor:()=>Khe,DstColorFactor:()=>Jhe,DynamicBufferAttribute:()=>H0r,DynamicCopyUsage:()=>Uhr,DynamicDrawUsage:()=>Y3,DynamicReadUsage:()=>Bhr,EdgesGeometry:()=>s6,EdgesHelper:()=>J0r,EllipseCurve:()=>U1,EqualDepth:()=>ife,EqualStencilFunc:()=>khr,EquirectangularReflectionMapping:()=>YP,EquirectangularRefractionMapping:()=>jP,Euler:()=>em,EventDispatcher:()=>qs,ExtrudeBufferGeometry:()=>hh,ExtrudeGeometry:()=>hh,FaceColors:()=>P0r,FileLoader:()=>Jc,FlatShading:()=>Aht,Float16BufferAttribute:()=>dU,Float32Attribute:()=>X0r,Float32BufferAttribute:()=>xe,Float64Attribute:()=>$0r,Float64BufferAttribute:()=>mU,FloatType:()=>Xd,Fog:()=>F1,FogExp2:()=>z1,Font:()=>u_r,FontLoader:()=>c_r,FramebufferTexture:()=>vU,FrontSide:()=>L1,Frustum:()=>D1,GLBufferAttribute:()=>qU,GLSL1:()=>Ghr,GLSL3:()=>Kut,GreaterDepth:()=>afe,GreaterEqualDepth:()=>ofe,GreaterEqualStencilFunc:()=>Ohr,GreaterStencilFunc:()=>Nhr,GridHelper:()=>YU,Group:()=>$d,HalfFloatType:()=>A1,HemisphereLight:()=>T6,HemisphereLightHelper:()=>yht,HemisphereLightProbe:()=>OU,IcosahedronBufferGeometry:()=>W1,IcosahedronGeometry:()=>W1,ImageBitmapLoader:()=>NU,ImageLoader:()=>rx,ImageUtils:()=>Zf,ImmediateRenderObject:()=>h_r,IncrementStencilOp:()=>Ehr,IncrementWrapStencilOp:()=>Chr,InstancedBufferAttribute:()=>nm,InstancedBufferGeometry:()=>N6,InstancedInterleavedBuffer:()=>UU,InstancedMesh:()=>i6,Int16Attribute:()=>G0r,Int16BufferAttribute:()=>fU,Int32Attribute:()=>Y0r,Int32BufferAttribute:()=>pU,Int8Attribute:()=>V0r,Int8BufferAttribute:()=>cU,IntType:()=>_fe,InterleavedBuffer:()=>rm,InterleavedBufferAttribute:()=>ep,Interpolant:()=>fh,InterpolateDiscrete:()=>KP,InterpolateLinear:()=>ZP,InterpolateSmooth:()=>rU,InvertStencilOp:()=>Phr,JSONLoader:()=>i_r,KeepStencilOp:()=>nU,KeyframeTrack:()=>Ol,LOD:()=>_U,LatheBufferGeometry:()=>Y1,LatheGeometry:()=>Y1,Layers:()=>X3,LensFlare:()=>a_r,LessDepth:()=>nfe,LessEqualDepth:()=>iU,LessEqualStencilFunc:()=>Rhr,LessStencilFunc:()=>Lhr,Light:()=>zl,LightProbe:()=>nx,Line:()=>ch,Line3:()=>GU,LineBasicMaterial:()=>Gi,LineCurve:()=>q1,LineCurve3:()=>bU,LineDashedMaterial:()=>w6,LineLoop:()=>o6,LinePieces:()=>C0r,LineSegments:()=>Pa,LineStrip:()=>T0r,LinearEncoding:()=>tm,LinearFilter:()=>ii,LinearInterpolant:()=>S6,LinearMipMapLinearFilter:()=>xhr,LinearMipMapNearestFilter:()=>vhr,LinearMipmapLinearFilter:()=>ax,LinearMipmapNearestFilter:()=>Lht,LinearToneMapping:()=>ufe,Loader:()=>ea,LoaderUtils:()=>dM,LoadingManager:()=>E6,LoopOnce:()=>Pfe,LoopPingPong:()=>Lfe,LoopRepeat:()=>Ife,LuminanceAlphaFormat:()=>wfe,LuminanceFormat:()=>bfe,MOUSE:()=>Z0,Material:()=>qi,MaterialLoader:()=>kU,Math:()=>ifr,MathUtils:()=>ifr,Matrix3:()=>ki,Matrix4:()=>Me,MaxEquation:()=>Aut,Mesh:()=>ti,MeshBasicMaterial:()=>sh,MeshDepthMaterial:()=>eM,MeshDistanceMaterial:()=>rM,MeshFaceMaterial:()=>L0r,MeshLambertMaterial:()=>x6,MeshMatcapMaterial:()=>b6,MeshNormalMaterial:()=>v6,MeshPhongMaterial:()=>_6,MeshPhysicalMaterial:()=>g6,MeshStandardMaterial:()=>pM,MeshToonMaterial:()=>y6,MinEquation:()=>Cut,MirroredRepeatWrapping:()=>$P,MixOperation:()=>lfe,MultiMaterial:()=>k0r,MultiplyBlending:()=>Tut,MultiplyOperation:()=>O6,NearestFilter:()=>Li,NearestMipMapLinearFilter:()=>yhr,NearestMipMapNearestFilter:()=>_hr,NearestMipmapLinearFilter:()=>aU,NearestMipmapNearestFilter:()=>oU,NeverDepth:()=>efe,NeverStencilFunc:()=>Ihr,NoBlending:()=>Kd,NoColors:()=>A0r,NoToneMapping:()=>Zd,NormalAnimationBlendMode:()=>$U,NormalBlending:()=>V3,NotEqualDepth:()=>sfe,NotEqualStencilFunc:()=>Dhr,NumberKeyframeTrack:()=>J1,Object3D:()=>or,ObjectLoader:()=>sht,ObjectSpaceNormalMap:()=>Dfe,OctahedronBufferGeometry:()=>Y0,OctahedronGeometry:()=>Y0,OneFactor:()=>jhe,OneMinusDstAlphaFactor:()=>Zhe,OneMinusDstColorFactor:()=>Qhe,OneMinusSrcAlphaFactor:()=>Iht,OneMinusSrcColorFactor:()=>$he,OrthographicCamera:()=>O1,PCFShadowMap:()=>Cht,PCFSoftShadowMap:()=>Uhe,PMREMGenerator:()=>e6,ParametricGeometry:()=>s_r,Particle:()=>N0r,ParticleBasicMaterial:()=>z0r,ParticleSystem:()=>D0r,ParticleSystemMaterial:()=>F0r,Path:()=>G1,PerspectiveCamera:()=>Ui,Plane:()=>$c,PlaneBufferGeometry:()=>U0,PlaneGeometry:()=>U0,PlaneHelper:()=>Sht,PointCloud:()=>R0r,PointCloudMaterial:()=>O0r,PointLight:()=>P6,PointLightHelper:()=>_ht,Points:()=>om,PointsMaterial:()=>im,PolarGridHelper:()=>vht,PolyhedronBufferGeometry:()=>uh,PolyhedronGeometry:()=>uh,PositionalAudio:()=>uht,PropertyBinding:()=>Cr,PropertyMixer:()=>BU,QuadraticBezierCurve:()=>uM,QuadraticBezierCurve3:()=>hM,Quaternion:()=>yi,QuaternionKeyframeTrack:()=>$0,QuaternionLinearInterpolant:()=>EU,REVISION:()=>jU,RGBADepthPacking:()=>Nfe,RGBAFormat:()=>Qo,RGBAIntegerFormat:()=>Cfe,RGBA_ASTC_10x10_Format:()=>Yut,RGBA_ASTC_10x5_Format:()=>qut,RGBA_ASTC_10x6_Format:()=>Gut,RGBA_ASTC_10x8_Format:()=>Wut,RGBA_ASTC_12x10_Format:()=>jut,RGBA_ASTC_12x12_Format:()=>Xut,RGBA_ASTC_4x4_Format:()=>Dut,RGBA_ASTC_5x4_Format:()=>Out,RGBA_ASTC_5x5_Format:()=>zut,RGBA_ASTC_6x5_Format:()=>Fut,RGBA_ASTC_6x6_Format:()=>But,RGBA_ASTC_8x5_Format:()=>Hut,RGBA_ASTC_8x6_Format:()=>Vut,RGBA_ASTC_8x8_Format:()=>Uut,RGBA_BPTC_Format:()=>$ut,RGBA_ETC2_EAC_Format:()=>Nut,RGBA_PVRTC_2BPPV1_Format:()=>kut,RGBA_PVRTC_4BPPV1_Format:()=>Lut,RGBA_S3TC_DXT1_Format:()=>QV,RGBA_S3TC_DXT3_Format:()=>tU,RGBA_S3TC_DXT5_Format:()=>eU,RGB_ETC1_Format:()=>Afe,RGB_ETC2_Format:()=>Rut,RGB_PVRTC_2BPPV1_Format:()=>Iut,RGB_PVRTC_4BPPV1_Format:()=>Put,RGB_S3TC_DXT1_Format:()=>JV,RGFormat:()=>Efe,RGIntegerFormat:()=>Tfe,RawShaderMaterial:()=>q0,Ray:()=>Qf,Raycaster:()=>pht,RectAreaLight:()=>k6,RedFormat:()=>Sfe,RedIntegerFormat:()=>Mfe,ReinhardToneMapping:()=>hfe,RepeatWrapping:()=>XP,ReplaceStencilOp:()=>Mhr,ReverseSubtractEquation:()=>Whe,RingBufferGeometry:()=>j1,RingGeometry:()=>j1,Scene:()=>G0,SceneUtils:()=>o_r,ShaderChunk:()=>hr,ShaderLib:()=>ah,ShaderMaterial:()=>lh,ShadowMaterial:()=>m6,Shape:()=>Kc,ShapeBufferGeometry:()=>j0,ShapeGeometry:()=>j0,ShapePath:()=>Eht,ShapeUtils:()=>Zc,ShortType:()=>gfe,Skeleton:()=>lM,SkeletonHelper:()=>WU,SkinnedMesh:()=>aM,SmoothShading:()=>ghr,Sphere:()=>Jf,SphereBufferGeometry:()=>X0,SphereGeometry:()=>X0,Spherical:()=>_M,SphericalHarmonics3:()=>R6,SplineCurve:()=>fM,SpotLight:()=>A6,SpotLightHelper:()=>ght,Sprite:()=>oM,SpriteMaterial:()=>iM,SrcAlphaFactor:()=>Pht,SrcAlphaSaturateFactor:()=>tfe,SrcColorFactor:()=>Xhe,StaticCopyUsage:()=>Vhr,StaticDrawUsage:()=>W3,StaticReadUsage:()=>Fhr,StereoCamera:()=>lht,StreamCopyUsage:()=>qhr,StreamDrawUsage:()=>zhr,StreamReadUsage:()=>Hhr,StringKeyframeTrack:()=>lm,SubtractEquation:()=>Ghe,SubtractiveBlending:()=>Eut,TOUCH:()=>J0,TangentSpaceNormalMap:()=>sx,TetrahedronBufferGeometry:()=>X1,TetrahedronGeometry:()=>X1,TextGeometry:()=>l_r,Texture:()=>vi,TextureLoader:()=>AU,TorusBufferGeometry:()=>$1,TorusGeometry:()=>$1,TorusKnotBufferGeometry:()=>K1,TorusKnotGeometry:()=>K1,Triangle:()=>oi,TriangleFanDrawMode:()=>whr,TriangleStripDrawMode:()=>bhr,TrianglesDrawMode:()=>kfe,TubeBufferGeometry:()=>Z1,TubeGeometry:()=>Z1,UVMapping:()=>XU,Uint16Attribute:()=>W0r,Uint16BufferAttribute:()=>$3,Uint32Attribute:()=>j0r,Uint32BufferAttribute:()=>K3,Uint8Attribute:()=>U0r,Uint8BufferAttribute:()=>uU,Uint8ClampedAttribute:()=>q0r,Uint8ClampedBufferAttribute:()=>hU,Uniform:()=>gM,UniformsLib:()=>re,UniformsUtils:()=>Vfe,UnsignedByteType:()=>Jd,UnsignedInt248Type:()=>P1,UnsignedIntType:()=>VP,UnsignedShort4444Type:()=>yfe,UnsignedShort5551Type:()=>vfe,UnsignedShortType:()=>G3,VSMShadowMap:()=>F3,Vector2:()=>Lt,Vector3:()=>j,Vector4:()=>en,VectorKeyframeTrack:()=>Q1,Vertex:()=>B0r,VertexColors:()=>I0r,VideoTexture:()=>yU,WebGL1Renderer:()=>gU,WebGLCubeRenderTarget:()=>Q3,WebGLMultipleRenderTargets:()=>lU,WebGLMultisampleRenderTarget:()=>j3,WebGLRenderTarget:()=>hs,WebGLRenderTargetCube:()=>r_r,WebGLRenderer:()=>rn,WebGLUtils:()=>Qfe,WireframeGeometry:()=>d6,WireframeHelper:()=>Q0r,WrapAroundEnding:()=>JP,XHRLoader:()=>t_r,ZeroCurvatureEnding:()=>T1,ZeroFactor:()=>Yhe,ZeroSlopeEnding:()=>C1,ZeroStencilOp:()=>Shr,_SRGBAFormat:()=>sU,sRGBEncoding:()=>Yn});var jU="137",Z0={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},J0={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Hhe=0,Sut=1,Vhe=2,dhr=3,mhr=0,Cht=1,Uhe=2,F3=3,L1=0,Ii=1,k1=2,Aht=1,ghr=2,Kd=0,V3=1,Mut=2,Eut=3,Tut=4,qhe=5,E1=100,Ghe=101,Whe=102,Cut=103,Aut=104,Yhe=200,jhe=201,Xhe=202,$he=203,Pht=204,Iht=205,Khe=206,Zhe=207,Jhe=208,Qhe=209,tfe=210,efe=0,rfe=1,nfe=2,iU=3,ife=4,ofe=5,afe=6,sfe=7,O6=0,lfe=1,cfe=2,Zd=0,ufe=1,hfe=2,ffe=3,pfe=4,dfe=5,XU=300,ix=301,ox=302,YP=303,jP=304,xM=306,z6=307,XP=1e3,Jo=1001,$P=1002,Li=1003,oU=1004,_hr=1004,aU=1005,yhr=1005,ii=1006,Lht=1007,vhr=1007,ax=1008,xhr=1008,Jd=1009,mfe=1010,gfe=1011,G3=1012,_fe=1013,VP=1014,Xd=1015,A1=1016,yfe=1017,vfe=1018,P1=1020,xfe=1021,Qo=1023,bfe=1024,wfe=1025,F0=1026,R1=1027,Sfe=1028,Mfe=1029,Efe=1030,Tfe=1031,Cfe=1033,JV=33776,QV=33777,tU=33778,eU=33779,Put=35840,Iut=35841,Lut=35842,kut=35843,Afe=36196,Rut=37492,Nut=37496,Dut=37808,Out=37809,zut=37810,Fut=37811,But=37812,Hut=37813,Vut=37814,Uut=37815,qut=37816,Gut=37817,Wut=37818,Yut=37819,jut=37820,Xut=37821,$ut=36492,Pfe=2200,Ife=2201,Lfe=2202,KP=2300,ZP=2301,rU=2302,T1=2400,C1=2401,JP=2402,$U=2500,kht=2501,kfe=0,bhr=1,whr=2,tm=3e3,Yn=3001,Rfe=3200,Nfe=3201,sx=0,Dfe=1,Shr=0,nU=7680,Mhr=7681,Ehr=7682,Thr=7683,Chr=34055,Ahr=34056,Phr=5386,Ihr=512,Lhr=513,khr=514,Rhr=515,Nhr=516,Dhr=517,Ohr=518,Ofe=519,W3=35044,Y3=35048,zhr=35040,Fhr=35045,Bhr=35049,Hhr=35041,Vhr=35046,Uhr=35050,qhr=35042,Ghr="100",Kut="300 es",sU=1035,qs=class{addEventListener(t,r){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(r)===-1&&n[t].push(r)}hasEventListener(t,r){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(r)!==-1}removeEventListener(t,r){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let o=i.indexOf(r);o!==-1&&i.splice(o,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let o=0,a=i.length;o<a;o++)i[o].call(this,t);t.target=null}}},Ko=[];for(let e=0;e<256;e++)Ko[e]=(e<16?"0":"")+e.toString(16);var uV=1234567,I1=Math.PI/180,QP=180/Math.PI;function Dl(){let e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ko[e&255]+Ko[e>>8&255]+Ko[e>>16&255]+Ko[e>>24&255]+"-"+Ko[t&255]+Ko[t>>8&255]+"-"+Ko[t>>16&15|64]+Ko[t>>24&255]+"-"+Ko[r&63|128]+Ko[r>>8&255]+"-"+Ko[r>>16&255]+Ko[r>>24&255]+Ko[n&255]+Ko[n>>8&255]+Ko[n>>16&255]+Ko[n>>24&255]).toUpperCase()}function Zo(e,t,r){return Math.max(t,Math.min(r,e))}function Rht(e,t){return(e%t+t)%t}function Whr(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)}function Yhr(e,t,r){return e!==t?(r-e)/(t-e):0}function UP(e,t,r){return(1-r)*e+r*t}function jhr(e,t,r,n){return UP(e,t,1-Math.exp(-r*n))}function Xhr(e,t=1){return t-Math.abs(Rht(e,t*2)-t)}function $hr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*(3-2*e))}function Khr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*e*(e*(e*6-15)+10))}function Zhr(e,t){return e+Math.floor(Math.random()*(t-e+1))}function Jhr(e,t){return e+Math.random()*(t-e)}function Qhr(e){return e*(.5-Math.random())}function tfr(e){return e!==void 0&&(uV=e%2147483647),uV=uV*16807%2147483647,(uV-1)/2147483646}function efr(e){return e*I1}function rfr(e){return e*QP}function Zut(e){return(e&e-1)===0&&e!==0}function zfe(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Ffe(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function nfr(e,t,r,n,i){let o=Math.cos,a=Math.sin,s=o(r/2),l=a(r/2),c=o((t+n)/2),u=a((t+n)/2),h=o((t-n)/2),f=a((t-n)/2),p=o((n-t)/2),d=a((n-t)/2);switch(i){case"XYX":e.set(s*u,l*h,l*f,s*c);break;case"YZY":e.set(l*f,s*u,l*h,s*c);break;case"ZXZ":e.set(l*h,l*f,s*u,s*c);break;case"XZX":e.set(s*u,l*d,l*p,s*c);break;case"YXY":e.set(l*p,s*u,l*d,s*c);break;case"ZYZ":e.set(l*d,l*p,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}var ifr=Object.freeze({__proto__:null,DEG2RAD:I1,RAD2DEG:QP,generateUUID:Dl,clamp:Zo,euclideanModulo:Rht,mapLinear:Whr,inverseLerp:Yhr,lerp:UP,damp:jhr,pingpong:Xhr,smoothstep:$hr,smootherstep:Khr,randInt:Zhr,randFloat:Jhr,randFloatSpread:Qhr,seededRandom:tfr,degToRad:efr,radToDeg:rfr,isPowerOfTwo:Zut,ceilPowerOfTwo:zfe,floorPowerOfTwo:Ffe,setQuaternionFromProperEuler:nfr}),Lt=class{constructor(t=0,r=0){this.x=t,this.y=r}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,r){return this.x=t,this.y=r,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let r=this.x,n=this.y,i=t.elements;return this.x=i[0]*r+i[3]*n+i[6],this.y=i[1]*r+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let r=this.x-t.x,n=this.y-t.y;return r*r+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this}rotateAround(t,r){let n=Math.cos(r),i=Math.sin(r),o=this.x-t.x,a=this.y-t.y;return this.x=o*n-a*i+t.x,this.y=o*i+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};Lt.prototype.isVector2=!0;var ki=class{constructor(){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.")}set(t,r,n,i,o,a,s,l,c){let u=this.elements;return u[0]=t,u[1]=i,u[2]=s,u[3]=r,u[4]=o,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let r=this.elements,n=t.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this}extractBasis(t,r,n){return t.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let r=t.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,r){let n=t.elements,i=r.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],u=n[4],h=n[7],f=n[2],p=n[5],d=n[8],g=i[0],_=i[3],y=i[6],x=i[1],b=i[4],S=i[7],C=i[2],P=i[5],k=i[8];return o[0]=a*g+s*x+l*C,o[3]=a*_+s*b+l*P,o[6]=a*y+s*S+l*k,o[1]=c*g+u*x+h*C,o[4]=c*_+u*b+h*P,o[7]=c*y+u*S+h*k,o[2]=f*g+p*x+d*C,o[5]=f*_+p*b+d*P,o[8]=f*y+p*S+d*k,this}multiplyScalar(t){let r=this.elements;return r[0]*=t,r[3]*=t,r[6]*=t,r[1]*=t,r[4]*=t,r[7]*=t,r[2]*=t,r[5]*=t,r[8]*=t,this}determinant(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8];return r*a*u-r*s*c-n*o*u+n*s*l+i*o*c-i*a*l}invert(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=u*a-s*c,f=s*l-u*o,p=c*o-a*l,d=r*h+n*f+i*p;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/d;return t[0]=h*g,t[1]=(i*c-u*n)*g,t[2]=(s*n-i*a)*g,t[3]=f*g,t[4]=(u*r-i*l)*g,t[5]=(i*o-s*r)*g,t[6]=p*g,t[7]=(n*l-c*r)*g,t[8]=(a*r-n*o)*g,this}transpose(){let t,r=this.elements;return t=r[1],r[1]=r[3],r[3]=t,t=r[2],r[2]=r[6],r[6]=t,t=r[5],r[5]=r[7],r[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let r=this.elements;return t[0]=r[0],t[1]=r[3],t[2]=r[6],t[3]=r[1],t[4]=r[4],t[5]=r[7],t[6]=r[2],t[7]=r[5],t[8]=r[8],this}setUvTransform(t,r,n,i,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+t,-i*c,i*l,-i*(-c*a+l*s)+s+r,0,0,1),this}scale(t,r){let n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=r,n[4]*=r,n[7]*=r,this}rotate(t){let r=Math.cos(t),n=Math.sin(t),i=this.elements,o=i[0],a=i[3],s=i[6],l=i[1],c=i[4],u=i[7];return i[0]=r*o+n*l,i[3]=r*a+n*c,i[6]=r*s+n*u,i[1]=-n*o+r*l,i[4]=-n*a+r*c,i[7]=-n*s+r*u,this}translate(t,r){let n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=r*n[2],n[4]+=r*n[5],n[7]+=r*n[8],this}equals(t){let r=this.elements,n=t.elements;for(let i=0;i<9;i++)if(r[i]!==n[i])return!1;return!0}fromArray(t,r=0){for(let n=0;n<9;n++)this.elements[n]=t[n+r];return this}toArray(t=[],r=0){let n=this.elements;return t[r]=n[0],t[r+1]=n[1],t[r+2]=n[2],t[r+3]=n[3],t[r+4]=n[4],t[r+5]=n[5],t[r+6]=n[6],t[r+7]=n[7],t[r+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}};ki.prototype.isMatrix3=!0;function Bfe(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}var ofr={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function B3(e,t){return new ofr[e](t)}function t6(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}var Hfe={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},nh={h:0,s:0,l:0},hV={h:0,s:0,l:0};function Gct(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*6*(2/3-r):e}function U3(e){return e<.04045?e*.0773993808:Math.pow(e*.9478672986+.0521327014,2.4)}function Wct(e){return e<.0031308?e*12.92:1.055*Math.pow(e,.41666)-.055}var ne=class{constructor(t,r,n){return r===void 0&&n===void 0?this.set(t):this.setRGB(t,r,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this}setRGB(t,r,n){return this.r=t,this.g=r,this.b=n,this}setHSL(t,r,n){if(t=Rht(t,1),r=Zo(r,0,1),n=Zo(n,0,1),r===0)this.r=this.g=this.b=n;else{let i=n<=.5?n*(1+r):n+r-n*r,o=2*n-i;this.r=Gct(o,i,t+1/3),this.g=Gct(o,i,t),this.b=Gct(o,i,t-1/3)}return this}setStyle(t){function r(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let i,o=n[1],a=n[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,r(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,r(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let s=parseFloat(i[1])/360,l=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return r(i[4]),this.setHSL(s,l,c)}break}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){let i=n[1],o=i.length;if(o===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(o===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let r=Hfe[t.toLowerCase()];return r!==void 0?this.setHex(r):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=U3(t.r),this.g=U3(t.g),this.b=U3(t.b),this}copyLinearToSRGB(t){return this.r=Wct(t.r),this.g=Wct(t.g),this.b=Wct(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){let r=this.r,n=this.g,i=this.b,o=Math.max(r,n,i),a=Math.min(r,n,i),s,l,c=(a+o)/2;if(a===o)s=0,l=0;else{let u=o-a;switch(l=c<=.5?u/(o+a):u/(2-o-a),o){case r:s=(n-i)/u+(n<i?6:0);break;case n:s=(i-r)/u+2;break;case i:s=(r-n)/u+4;break}s/=6}return t.h=s,t.s=l,t.l=c,t}getStyle(){return"rgb("+(this.r*255|0)+","+(this.g*255|0)+","+(this.b*255|0)+")"}offsetHSL(t,r,n){return this.getHSL(nh),nh.h+=t,nh.s+=r,nh.l+=n,this.setHSL(nh.h,nh.s,nh.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,r){return this.r=t.r+r.r,this.g=t.g+r.g,this.b=t.b+r.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,r){return this.r+=(t.r-this.r)*r,this.g+=(t.g-this.g)*r,this.b+=(t.b-this.b)*r,this}lerpColors(t,r,n){return this.r=t.r+(r.r-t.r)*n,this.g=t.g+(r.g-t.g)*n,this.b=t.b+(r.b-t.b)*n,this}lerpHSL(t,r){this.getHSL(nh),t.getHSL(hV);let n=UP(nh.h,hV.h,r),i=UP(nh.s,hV.s,r),o=UP(nh.l,hV.l,r);return this.setHSL(n,i,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this}toArray(t=[],r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t}fromBufferAttribute(t,r){return this.r=t.getX(r),this.g=t.getY(r),this.b=t.getZ(r),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}};ne.NAMES=Hfe;ne.prototype.isColor=!0;ne.prototype.r=1;ne.prototype.g=1;ne.prototype.b=1;var v3,Zf=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement=="undefined")return t.src;let r;if(t instanceof HTMLCanvasElement)r=t;else{v3===void 0&&(v3=t6("canvas")),v3.width=t.width,v3.height=t.height;let n=v3.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),r=v3}return r.width>2048||r.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),r.toDataURL("image/jpeg",.6)):r.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let r=t6("canvas");r.width=t.width,r.height=t.height;let n=r.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),o=i.data;for(let a=0;a<o.length;a++)o[a]=U3(o[a]/255)*255;return n.putImageData(i,0,0),r}else if(t.data){let r=t.data.slice(0);for(let n=0;n<r.length;n++)r instanceof Uint8Array||r instanceof Uint8ClampedArray?r[n]=Math.floor(U3(r[n]/255)*255):r[n]=U3(r[n]);return{data:r,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},afr=0,vi=class extends qs{constructor(t=vi.DEFAULT_IMAGE,r=vi.DEFAULT_MAPPING,n=Jo,i=Jo,o=ii,a=ax,s=Qo,l=Jd,c=1,u=tm){super(),Object.defineProperty(this,"id",{value:afr++}),this.uuid=Dl(),this.name="",this.image=t,this.mipmaps=[],this.mapping=r,this.wrapS=n,this.wrapT=i,this.magFilter=o,this.minFilter=a,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=l,this.offset=new Lt(0,0),this.repeat=new Lt(1,1),this.center=new Lt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ki,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){let r=t===void 0||typeof t=="string";if(!r&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let 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(this.image!==void 0){let i=this.image;if(i.uuid===void 0&&(i.uuid=Dl()),!r&&t.images[i.uuid]===void 0){let o;if(Array.isArray(i)){o=[];for(let a=0,s=i.length;a<s;a++)i[a].isDataTexture?o.push(Yct(i[a].image)):o.push(Yct(i[a]))}else o=Yct(i);t.images[i.uuid]={uuid:i.uuid,url:o}}n.image=i.uuid}return JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),r||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==XU)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case XP:t.x=t.x-Math.floor(t.x);break;case Jo:t.x=t.x<0?0:1;break;case $P:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case XP:t.y=t.y-Math.floor(t.y);break;case Jo:t.y=t.y<0?0:1;break;case $P:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&this.version++}};vi.DEFAULT_IMAGE=void 0;vi.DEFAULT_MAPPING=XU;vi.prototype.isTexture=!0;function Yct(e){return typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap?Zf.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var en=class{constructor(t=0,r=0,n=0,i=1){this.x=t,this.y=r,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,r,n,i){return this.x=t,this.y=r,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this.w=t.w+r.w,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this.w+=t.w*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this.w=t.w-r.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let r=this.x,n=this.y,i=this.z,o=this.w,a=t.elements;return this.x=a[0]*r+a[4]*n+a[8]*i+a[12]*o,this.y=a[1]*r+a[5]*n+a[9]*i+a[13]*o,this.z=a[2]*r+a[6]*n+a[10]*i+a[14]*o,this.w=a[3]*r+a[7]*n+a[11]*i+a[15]*o,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let r=Math.sqrt(1-t.w*t.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/r,this.y=t.y/r,this.z=t.z/r),this}setAxisAngleFromRotationMatrix(t){let r,n,i,o,l=t.elements,c=l[0],u=l[4],h=l[8],f=l[1],p=l[5],d=l[9],g=l[2],_=l[6],y=l[10];if(Math.abs(u-f)<.01&&Math.abs(h-g)<.01&&Math.abs(d-_)<.01){if(Math.abs(u+f)<.1&&Math.abs(h+g)<.1&&Math.abs(d+_)<.1&&Math.abs(c+p+y-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;let b=(c+1)/2,S=(p+1)/2,C=(y+1)/2,P=(u+f)/4,k=(h+g)/4,O=(d+_)/4;return b>S&&b>C?b<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(b),i=P/n,o=k/n):S>C?S<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),n=P/i,o=O/i):C<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(C),n=k/o,i=O/o),this.set(n,i,o,r),this}let x=Math.sqrt((_-d)*(_-d)+(h-g)*(h-g)+(f-u)*(f-u));return Math.abs(x)<.001&&(x=1),this.x=(_-d)/x,this.y=(h-g)/x,this.z=(f-u)/x,this.w=Math.acos((c+p+y-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this.z=Math.max(t.z,Math.min(r.z,this.z)),this.w=Math.max(t.w,Math.min(r.w,this.w)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this.z=Math.max(t,Math.min(r,this.z)),this.w=Math.max(t,Math.min(r,this.w)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this.w+=(t.w-this.w)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this.w=t.w+(r.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this.w=t[r+3],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t[r+3]=this.w,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this.w=t.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};en.prototype.isVector4=!0;var hs=class extends qs{constructor(t,r,n={}){super(),this.width=t,this.height=r,this.depth=1,this.scissor=new en(0,0,t,r),this.scissorTest=!1,this.viewport=new en(0,0,t,r),this.texture=new vi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:r,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,r,n=1){(this.width!==t||this.height!==r||this.depth!==n)&&(this.width=t,this.height=r,this.depth=n,this.texture.image.width=t,this.texture.image.height=r,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,r),this.scissor.set(0,0,t,r)}clone(){return new this.constructor().copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image=Object.assign({},t.texture.image),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};hs.prototype.isWebGLRenderTarget=!0;var lU=class extends hs{constructor(t,r,n){super(t,r);let i=this.texture;this.texture=[];for(let o=0;o<n;o++)this.texture[o]=i.clone()}setSize(t,r,n=1){if(this.width!==t||this.height!==r||this.depth!==n){this.width=t,this.height=r,this.depth=n;for(let i=0,o=this.texture.length;i<o;i++)this.texture[i].image.width=t,this.texture[i].image.height=r,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,t,r),this.scissor.set(0,0,t,r),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let r=0,n=t.texture.length;r<n;r++)this.texture[r]=t.texture[r].clone();return this}};lU.prototype.isWebGLMultipleRenderTargets=!0;var j3=class extends hs{constructor(t,r,n={}){super(t,r,n),this.samples=4,this.ignoreDepthForMultisampleCopy=n.ignoreDepth!==void 0?n.ignoreDepth:!0,this.useRenderToTexture=n.useRenderToTexture!==void 0?n.useRenderToTexture:!1,this.useRenderbuffer=this.useRenderToTexture===!1}copy(t){return super.copy.call(this,t),this.samples=t.samples,this.useRenderToTexture=t.useRenderToTexture,this.useRenderbuffer=t.useRenderbuffer,this}};j3.prototype.isWebGLMultisampleRenderTarget=!0;var yi=class{constructor(t=0,r=0,n=0,i=1){this._x=t,this._y=r,this._z=n,this._w=i}static slerp(t,r,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(t,r,i)}static slerpFlat(t,r,n,i,o,a,s){let l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],f=o[a+0],p=o[a+1],d=o[a+2],g=o[a+3];if(s===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=h;return}if(s===1){t[r+0]=f,t[r+1]=p,t[r+2]=d,t[r+3]=g;return}if(h!==g||l!==f||c!==p||u!==d){let _=1-s,y=l*f+c*p+u*d+h*g,x=y>=0?1:-1,b=1-y*y;if(b>Number.EPSILON){let C=Math.sqrt(b),P=Math.atan2(C,y*x);_=Math.sin(_*P)/C,s=Math.sin(s*P)/C}let S=s*x;if(l=l*_+f*S,c=c*_+p*S,u=u*_+d*S,h=h*_+g*S,_===1-s){let C=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=C,c*=C,u*=C,h*=C}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=h}static multiplyQuaternionsFlat(t,r,n,i,o,a){let s=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=o[a],f=o[a+1],p=o[a+2],d=o[a+3];return t[r]=s*d+u*h+l*p-c*f,t[r+1]=l*d+u*f+c*h-s*p,t[r+2]=c*d+u*p+s*f-l*h,t[r+3]=u*d-s*h-l*f-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,i){return this._x=t,this._y=r,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r){if(!(t&&t.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=t._x,i=t._y,o=t._z,a=t._order,s=Math.cos,l=Math.sin,c=s(n/2),u=s(i/2),h=s(o/2),f=l(n/2),p=l(i/2),d=l(o/2);switch(a){case"XYZ":this._x=f*u*h+c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h-f*p*d;break;case"YXZ":this._x=f*u*h+c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h+f*p*d;break;case"ZXY":this._x=f*u*h-c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h-f*p*d;break;case"ZYX":this._x=f*u*h-c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h+f*p*d;break;case"YZX":this._x=f*u*h+c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h-f*p*d;break;case"XZY":this._x=f*u*h-c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h+f*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,r){let n=r/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let r=t.elements,n=r[0],i=r[4],o=r[8],a=r[1],s=r[5],l=r[9],c=r[2],u=r[6],h=r[10],f=n+s+h;if(f>0){let p=.5/Math.sqrt(f+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(a-i)*p}else if(n>s&&n>h){let p=2*Math.sqrt(1+n-s-h);this._w=(u-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+c)/p}else if(s>h){let p=2*Math.sqrt(1+s-n-h);this._w=(o-c)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+u)/p}else{let p=2*Math.sqrt(1+h-n-s);this._w=(a-i)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Zo(this.dot(t),-1,1)))}rotateTowards(t,r){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,r/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,r){return r!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,r)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){let n=t._x,i=t._y,o=t._z,a=t._w,s=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*s+i*c-o*l,this._y=i*u+a*l+o*s-n*c,this._z=o*u+a*c+n*l-i*s,this._w=a*u-n*s-i*l-o*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);let n=this._x,i=this._y,o=this._z,a=this._w,s=a*t._w+n*t._x+i*t._y+o*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=a,this._x=n,this._y=i,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*i+r*this._y,this._z=p*o+r*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),u=Math.atan2(c,s),h=Math.sin((1-r)*u)/c,f=Math.sin(r*u)/c;return this._w=a*h+this._w*f,this._x=n*h+this._x*f,this._y=i*h+this._y*f,this._z=o*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){let t=Math.random(),r=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(r*Math.cos(i),n*Math.sin(o),n*Math.cos(o),r*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};yi.prototype.isQuaternion=!0;var j=class{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t,r){return r!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,r)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(yue.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(yue.setFromAxisAngle(t,r))}applyMatrix3(t){let r=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*r+o[3]*n+o[6]*i,this.y=o[1]*r+o[4]*n+o[7]*i,this.z=o[2]*r+o[5]*n+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let r=this.x,n=this.y,i=this.z,o=t.elements,a=1/(o[3]*r+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*r+o[4]*n+o[8]*i+o[12])*a,this.y=(o[1]*r+o[5]*n+o[9]*i+o[13])*a,this.z=(o[2]*r+o[6]*n+o[10]*i+o[14])*a,this}applyQuaternion(t){let r=this.x,n=this.y,i=this.z,o=t.x,a=t.y,s=t.z,l=t.w,c=l*r+a*i-s*n,u=l*n+s*r-o*i,h=l*i+o*n-a*r,f=-o*r-a*n-s*i;return this.x=c*l+f*-o+u*-s-h*-a,this.y=u*l+f*-a+h*-o-c*-s,this.z=h*l+f*-s+c*-a-u*-o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let r=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*r+o[4]*n+o[8]*i,this.y=o[1]*r+o[5]*n+o[9]*i,this.z=o[2]*r+o[6]*n+o[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this.z=Math.max(t.z,Math.min(r.z,this.z)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this.z=Math.max(t,Math.min(r,this.z)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t,r){return r!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,r)):this.crossVectors(this,t)}crossVectors(t,r){let n=t.x,i=t.y,o=t.z,a=r.x,s=r.y,l=r.z;return this.x=i*l-o*s,this.y=o*a-n*l,this.z=n*s-i*a,this}projectOnVector(t){let r=t.lengthSq();if(r===0)return this.set(0,0,0);let n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return jct.copy(this).projectOnVector(t),this.sub(jct)}reflect(t){return this.sub(jct.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;let n=this.dot(t)/r;return Math.acos(Zo(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let r=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return r*r+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){let i=Math.sin(r)*t;return this.x=i*Math.sin(n),this.y=Math.cos(r)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){let r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){let r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=i,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,r=Math.random()*Math.PI*2,n=Math.sqrt(1-TI(t,2));return this.x=n*Math.cos(r),this.y=n*Math.sin(r),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};j.prototype.isVector3=!0;var jct=new j,yue=new yi,ta=class{constructor(t=new j(1/0,1/0,1/0),r=new j(-1/0,-1/0,-1/0)){this.min=t,this.max=r}set(t,r){return this.min.copy(t),this.max.copy(r),this}setFromArray(t){let r=1/0,n=1/0,i=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.length;l<c;l+=3){let u=t[l],h=t[l+1],f=t[l+2];u<r&&(r=u),h<n&&(n=h),f<i&&(i=f),u>o&&(o=u),h>a&&(a=h),f>s&&(s=f)}return this.min.set(r,n,i),this.max.set(o,a,s),this}setFromBufferAttribute(t){let r=1/0,n=1/0,i=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.count;l<c;l++){let u=t.getX(l),h=t.getY(l),f=t.getZ(l);u<r&&(r=u),h<n&&(n=h),f<i&&(i=f),u>o&&(o=u),h>a&&(a=h),f>s&&(s=f)}return this.min.set(r,n,i),this.max.set(o,a,s),this}setFromPoints(t){this.makeEmpty();for(let r=0,n=t.length;r<n;r++)this.expandByPoint(t[r]);return this}setFromCenterAndSize(t,r){let n=g1.copy(r).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,r=!1){return this.makeEmpty(),this.expandByObject(t,r)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,r=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0)if(r&&n.attributes!=null&&n.attributes.position!==void 0){let o=n.attributes.position;for(let a=0,s=o.count;a<s;a++)g1.fromBufferAttribute(o,a).applyMatrix4(t.matrixWorld),this.expandByPoint(g1)}else n.boundingBox===null&&n.computeBoundingBox(),Xct.copy(n.boundingBox),Xct.applyMatrix4(t.matrixWorld),this.union(Xct);let i=t.children;for(let o=0,a=i.length;o<a;o++)this.expandByObject(i[o],r);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,r){return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,g1),g1.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let r,n;return t.normal.x>0?(r=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(r=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(r+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(r+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(r+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(r+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),r<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(LP),fV.subVectors(this.max,LP),x3.subVectors(t.a,LP),b3.subVectors(t.b,LP),w3.subVectors(t.c,LP),I0.subVectors(b3,x3),L0.subVectors(w3,b3),_1.subVectors(x3,w3);let r=[0,-I0.z,I0.y,0,-L0.z,L0.y,0,-_1.z,_1.y,I0.z,0,-I0.x,L0.z,0,-L0.x,_1.z,0,-_1.x,-I0.y,I0.x,0,-L0.y,L0.x,0,-_1.y,_1.x,0];return!$ct(r,x3,b3,w3,fV)||(r=[1,0,0,0,1,0,0,0,1],!$ct(r,x3,b3,w3,fV))?!1:(pV.crossVectors(I0,L0),r=[pV.x,pV.y,pV.z],$ct(r,x3,b3,w3,fV))}clampPoint(t,r){return r.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return g1.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(g1).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ud[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ud[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ud[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ud[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ud[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ud[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ud[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ud[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ud),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};ta.prototype.isBox3=!0;var Ud=[new j,new j,new j,new j,new j,new j,new j,new j],g1=new j,Xct=new ta,x3=new j,b3=new j,w3=new j,I0=new j,L0=new j,_1=new j,LP=new j,fV=new j,pV=new j,y1=new j;function $ct(e,t,r,n,i){for(let o=0,a=e.length-3;o<=a;o+=3){y1.fromArray(e,o);let s=i.x*Math.abs(y1.x)+i.y*Math.abs(y1.y)+i.z*Math.abs(y1.z),l=t.dot(y1),c=r.dot(y1),u=n.dot(y1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var sfr=new ta,vue=new j,dV=new j,Kct=new j,Jf=class{constructor(t=new j,r=-1){this.center=t,this.radius=r}set(t,r){return this.center.copy(t),this.radius=r,this}setFromPoints(t,r){let n=this.center;r!==void 0?n.copy(r):sfr.setFromPoints(t).getCenter(n);let i=0;for(let o=0,a=t.length;o<a;o++)i=Math.max(i,n.distanceToSquared(t[o]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let r=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=r*r}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,r){let n=this.center.distanceToSquared(t);return r.copy(t),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Kct.subVectors(t,this.center);let r=Kct.lengthSq();if(r>this.radius*this.radius){let n=Math.sqrt(r),i=(n-this.radius)*.5;this.center.add(Kct.multiplyScalar(i/n)),this.radius+=i}return this}union(t){return this.center.equals(t.center)===!0?dV.set(0,0,1).multiplyScalar(t.radius):dV.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(vue.copy(t.center).add(dV)),this.expandByPoint(vue.copy(t.center).sub(dV)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},qd=new j,Zct=new j,mV=new j,k0=new j,Jct=new j,gV=new j,Qct=new j,Qf=class{constructor(t=new j,r=new j(0,0,-1)){this.origin=t,this.direction=r}set(t,r){return this.origin.copy(t),this.direction.copy(r),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,r){return r.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,qd)),this}closestPointToPoint(t,r){r.subVectors(t,this.origin);let n=r.dot(this.direction);return n<0?r.copy(this.origin):r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let r=qd.subVectors(t,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(t):(qd.copy(this.direction).multiplyScalar(r).add(this.origin),qd.distanceToSquared(t))}distanceSqToSegment(t,r,n,i){Zct.copy(t).add(r).multiplyScalar(.5),mV.copy(r).sub(t).normalize(),k0.copy(this.origin).sub(Zct);let o=t.distanceTo(r)*.5,a=-this.direction.dot(mV),s=k0.dot(this.direction),l=-k0.dot(mV),c=k0.lengthSq(),u=Math.abs(1-a*a),h,f,p,d;if(u>0)if(h=a*l-s,f=a*s-l,d=o*u,h>=0)if(f>=-d)if(f<=d){let g=1/u;h*=g,f*=g,p=h*(h+a*f+2*s)+f*(a*h+f+2*l)+c}else f=o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;else f=-o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;else f<=-d?(h=Math.max(0,-(-a*o+s)),f=h>0?-o:Math.min(Math.max(-o,-l),o),p=-h*h+f*(f+2*l)+c):f<=d?(h=0,f=Math.min(Math.max(-o,-l),o),p=f*(f+2*l)+c):(h=Math.max(0,-(a*o+s)),f=h>0?o:Math.min(Math.max(-o,-l),o),p=-h*h+f*(f+2*l)+c);else f=a>0?-o:o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(mV).multiplyScalar(f).add(Zct),p}intersectSphere(t,r){qd.subVectors(t.center,this.origin);let n=qd.dot(this.direction),i=qd.dot(qd)-n*n,o=t.radius*t.radius;if(i>o)return null;let a=Math.sqrt(o-i),s=n-a,l=n+a;return s<0&&l<0?null:s<0?this.at(l,r):this.at(s,r)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let r=t.normal.dot(this.direction);if(r===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/r;return n>=0?n:null}intersectPlane(t,r){let n=this.distanceToPlane(t);return n===null?null:this.at(n,r)}intersectsPlane(t){let r=t.distanceToPoint(this.origin);return r===0||t.normal.dot(this.direction)*r<0}intersectBox(t,r){let n,i,o,a,s,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,f=this.origin;return c>=0?(n=(t.min.x-f.x)*c,i=(t.max.x-f.x)*c):(n=(t.max.x-f.x)*c,i=(t.min.x-f.x)*c),u>=0?(o=(t.min.y-f.y)*u,a=(t.max.y-f.y)*u):(o=(t.max.y-f.y)*u,a=(t.min.y-f.y)*u),n>a||o>i||((o>n||n!==n)&&(n=o),(a<i||i!==i)&&(i=a),h>=0?(s=(t.min.z-f.z)*h,l=(t.max.z-f.z)*h):(s=(t.max.z-f.z)*h,l=(t.min.z-f.z)*h),n>l||s>i)||((s>n||n!==n)&&(n=s),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,r)}intersectsBox(t){return this.intersectBox(t,qd)!==null}intersectTriangle(t,r,n,i,o){Jct.subVectors(r,t),gV.subVectors(n,t),Qct.crossVectors(Jct,gV);let a=this.direction.dot(Qct),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;k0.subVectors(this.origin,t);let l=s*this.direction.dot(gV.crossVectors(k0,gV));if(l<0)return null;let c=s*this.direction.dot(Jct.cross(k0));if(c<0||l+c>a)return null;let u=-s*k0.dot(Qct);return u<0?null:this.at(u/a,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Me=class{constructor(){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.")}set(t,r,n,i,o,a,s,l,c,u,h,f,p,d,g,_){let y=this.elements;return y[0]=t,y[4]=r,y[8]=n,y[12]=i,y[1]=o,y[5]=a,y[9]=s,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=f,y[3]=p,y[7]=d,y[11]=g,y[15]=_,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Me().fromArray(this.elements)}copy(t){let r=this.elements,n=t.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this}copyPosition(t){let r=this.elements,n=t.elements;return r[12]=n[12],r[13]=n[13],r[14]=n[14],this}setFromMatrix3(t){let r=t.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(t,r,n){return t.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,r,n){return this.set(t.x,r.x,n.x,0,t.y,r.y,n.y,0,t.z,r.z,n.z,0,0,0,0,1),this}extractRotation(t){let r=this.elements,n=t.elements,i=1/S3.setFromMatrixColumn(t,0).length(),o=1/S3.setFromMatrixColumn(t,1).length(),a=1/S3.setFromMatrixColumn(t,2).length();return r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=0,r[4]=n[4]*o,r[5]=n[5]*o,r[6]=n[6]*o,r[7]=0,r[8]=n[8]*a,r[9]=n[9]*a,r[10]=n[10]*a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let r=this.elements,n=t.x,i=t.y,o=t.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),h=Math.sin(o);if(t.order==="XYZ"){let f=a*u,p=a*h,d=s*u,g=s*h;r[0]=l*u,r[4]=-l*h,r[8]=c,r[1]=p+d*c,r[5]=f-g*c,r[9]=-s*l,r[2]=g-f*c,r[6]=d+p*c,r[10]=a*l}else if(t.order==="YXZ"){let f=l*u,p=l*h,d=c*u,g=c*h;r[0]=f+g*s,r[4]=d*s-p,r[8]=a*c,r[1]=a*h,r[5]=a*u,r[9]=-s,r[2]=p*s-d,r[6]=g+f*s,r[10]=a*l}else if(t.order==="ZXY"){let f=l*u,p=l*h,d=c*u,g=c*h;r[0]=f-g*s,r[4]=-a*h,r[8]=d+p*s,r[1]=p+d*s,r[5]=a*u,r[9]=g-f*s,r[2]=-a*c,r[6]=s,r[10]=a*l}else if(t.order==="ZYX"){let f=a*u,p=a*h,d=s*u,g=s*h;r[0]=l*u,r[4]=d*c-p,r[8]=f*c+g,r[1]=l*h,r[5]=g*c+f,r[9]=p*c-d,r[2]=-c,r[6]=s*l,r[10]=a*l}else if(t.order==="YZX"){let f=a*l,p=a*c,d=s*l,g=s*c;r[0]=l*u,r[4]=g-f*h,r[8]=d*h+p,r[1]=h,r[5]=a*u,r[9]=-s*u,r[2]=-c*u,r[6]=p*h+d,r[10]=f-g*h}else if(t.order==="XZY"){let f=a*l,p=a*c,d=s*l,g=s*c;r[0]=l*u,r[4]=-h,r[8]=c*u,r[1]=f*h+g,r[5]=a*u,r[9]=p*h-d,r[2]=d*h-p,r[6]=s*u,r[10]=g*h+f}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(t){return this.compose(lfr,t,cfr)}lookAt(t,r,n){let i=this.elements;return Rl.subVectors(t,r),Rl.lengthSq()===0&&(Rl.z=1),Rl.normalize(),R0.crossVectors(n,Rl),R0.lengthSq()===0&&(Math.abs(n.z)===1?Rl.x+=1e-4:Rl.z+=1e-4,Rl.normalize(),R0.crossVectors(n,Rl)),R0.normalize(),_V.crossVectors(Rl,R0),i[0]=R0.x,i[4]=_V.x,i[8]=Rl.x,i[1]=R0.y,i[5]=_V.y,i[9]=Rl.y,i[2]=R0.z,i[6]=_V.z,i[10]=Rl.z,this}multiply(t,r){return r!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,r)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,r){let n=t.elements,i=r.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],u=n[1],h=n[5],f=n[9],p=n[13],d=n[2],g=n[6],_=n[10],y=n[14],x=n[3],b=n[7],S=n[11],C=n[15],P=i[0],k=i[4],O=i[8],D=i[12],B=i[1],I=i[5],L=i[9],R=i[13],F=i[2],z=i[6],U=i[10],W=i[14],Z=i[3],rt=i[7],ot=i[11],st=i[15];return o[0]=a*P+s*B+l*F+c*Z,o[4]=a*k+s*I+l*z+c*rt,o[8]=a*O+s*L+l*U+c*ot,o[12]=a*D+s*R+l*W+c*st,o[1]=u*P+h*B+f*F+p*Z,o[5]=u*k+h*I+f*z+p*rt,o[9]=u*O+h*L+f*U+p*ot,o[13]=u*D+h*R+f*W+p*st,o[2]=d*P+g*B+_*F+y*Z,o[6]=d*k+g*I+_*z+y*rt,o[10]=d*O+g*L+_*U+y*ot,o[14]=d*D+g*R+_*W+y*st,o[3]=x*P+b*B+S*F+C*Z,o[7]=x*k+b*I+S*z+C*rt,o[11]=x*O+b*L+S*U+C*ot,o[15]=x*D+b*R+S*W+C*st,this}multiplyScalar(t){let r=this.elements;return r[0]*=t,r[4]*=t,r[8]*=t,r[12]*=t,r[1]*=t,r[5]*=t,r[9]*=t,r[13]*=t,r[2]*=t,r[6]*=t,r[10]*=t,r[14]*=t,r[3]*=t,r[7]*=t,r[11]*=t,r[15]*=t,this}determinant(){let t=this.elements,r=t[0],n=t[4],i=t[8],o=t[12],a=t[1],s=t[5],l=t[9],c=t[13],u=t[2],h=t[6],f=t[10],p=t[14],d=t[3],g=t[7],_=t[11],y=t[15];return d*(+o*l*h-i*c*h-o*s*f+n*c*f+i*s*p-n*l*p)+g*(+r*l*p-r*c*f+o*a*f-i*a*p+i*c*u-o*l*u)+_*(+r*c*h-r*s*p-o*a*h+n*a*p+o*s*u-n*c*u)+y*(-i*s*u-r*l*h+r*s*f+i*a*h-n*a*f+n*l*u)}transpose(){let t=this.elements,r;return r=t[1],t[1]=t[4],t[4]=r,r=t[2],t[2]=t[8],t[8]=r,r=t[6],t[6]=t[9],t[9]=r,r=t[3],t[3]=t[12],t[12]=r,r=t[7],t[7]=t[13],t[13]=r,r=t[11],t[11]=t[14],t[14]=r,this}setPosition(t,r,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=r,i[14]=n),this}invert(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],p=t[11],d=t[12],g=t[13],_=t[14],y=t[15],x=h*_*c-g*f*c+g*l*p-s*_*p-h*l*y+s*f*y,b=d*f*c-u*_*c-d*l*p+a*_*p+u*l*y-a*f*y,S=u*g*c-d*h*c+d*s*p-a*g*p-u*s*y+a*h*y,C=d*h*l-u*g*l-d*s*f+a*g*f+u*s*_-a*h*_,P=r*x+n*b+i*S+o*C;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let k=1/P;return t[0]=x*k,t[1]=(g*f*o-h*_*o-g*i*p+n*_*p+h*i*y-n*f*y)*k,t[2]=(s*_*o-g*l*o+g*i*c-n*_*c-s*i*y+n*l*y)*k,t[3]=(h*l*o-s*f*o-h*i*c+n*f*c+s*i*p-n*l*p)*k,t[4]=b*k,t[5]=(u*_*o-d*f*o+d*i*p-r*_*p-u*i*y+r*f*y)*k,t[6]=(d*l*o-a*_*o-d*i*c+r*_*c+a*i*y-r*l*y)*k,t[7]=(a*f*o-u*l*o+u*i*c-r*f*c-a*i*p+r*l*p)*k,t[8]=S*k,t[9]=(d*h*o-u*g*o-d*n*p+r*g*p+u*n*y-r*h*y)*k,t[10]=(a*g*o-d*s*o+d*n*c-r*g*c-a*n*y+r*s*y)*k,t[11]=(u*s*o-a*h*o-u*n*c+r*h*c+a*n*p-r*s*p)*k,t[12]=C*k,t[13]=(u*g*i-d*h*i+d*n*f-r*g*f-u*n*_+r*h*_)*k,t[14]=(d*s*i-a*g*i-d*n*l+r*g*l+a*n*_-r*s*_)*k,t[15]=(a*h*i-u*s*i+u*n*l-r*h*l-a*n*f+r*s*f)*k,this}scale(t){let r=this.elements,n=t.x,i=t.y,o=t.z;return r[0]*=n,r[4]*=i,r[8]*=o,r[1]*=n,r[5]*=i,r[9]*=o,r[2]*=n,r[6]*=i,r[10]*=o,r[3]*=n,r[7]*=i,r[11]*=o,this}getMaxScaleOnAxis(){let t=this.elements,r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(r,n,i))}makeTranslation(t,r,n){return this.set(1,0,0,t,0,1,0,r,0,0,1,n,0,0,0,1),this}makeRotationX(t){let r=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,r,-n,0,0,n,r,0,0,0,0,1),this}makeRotationY(t){let r=Math.cos(t),n=Math.sin(t);return this.set(r,0,n,0,0,1,0,0,-n,0,r,0,0,0,0,1),this}makeRotationZ(t){let r=Math.cos(t),n=Math.sin(t);return this.set(r,-n,0,0,n,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,r){let n=Math.cos(r),i=Math.sin(r),o=1-n,a=t.x,s=t.y,l=t.z,c=o*a,u=o*s;return this.set(c*a+n,c*s-i*l,c*l+i*s,0,c*s+i*l,u*s+n,u*l-i*a,0,c*l-i*s,u*l+i*a,o*l*l+n,0,0,0,0,1),this}makeScale(t,r,n){return this.set(t,0,0,0,0,r,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,r,n,i,o,a){return this.set(1,n,o,0,t,1,a,0,r,i,1,0,0,0,0,1),this}compose(t,r,n){let i=this.elements,o=r._x,a=r._y,s=r._z,l=r._w,c=o+o,u=a+a,h=s+s,f=o*c,p=o*u,d=o*h,g=a*u,_=a*h,y=s*h,x=l*c,b=l*u,S=l*h,C=n.x,P=n.y,k=n.z;return i[0]=(1-(g+y))*C,i[1]=(p+S)*C,i[2]=(d-b)*C,i[3]=0,i[4]=(p-S)*P,i[5]=(1-(f+y))*P,i[6]=(_+x)*P,i[7]=0,i[8]=(d+b)*k,i[9]=(_-x)*k,i[10]=(1-(f+g))*k,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,r,n){let i=this.elements,o=S3.set(i[0],i[1],i[2]).length(),a=S3.set(i[4],i[5],i[6]).length(),s=S3.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),t.x=i[12],t.y=i[13],t.z=i[14],ih.copy(this);let c=1/o,u=1/a,h=1/s;return ih.elements[0]*=c,ih.elements[1]*=c,ih.elements[2]*=c,ih.elements[4]*=u,ih.elements[5]*=u,ih.elements[6]*=u,ih.elements[8]*=h,ih.elements[9]*=h,ih.elements[10]*=h,r.setFromRotationMatrix(ih),n.x=o,n.y=a,n.z=s,this}makePerspective(t,r,n,i,o,a){a===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let s=this.elements,l=2*o/(r-t),c=2*o/(n-i),u=(r+t)/(r-t),h=(n+i)/(n-i),f=-(a+o)/(a-o),p=-2*a*o/(a-o);return s[0]=l,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=c,s[9]=h,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=p,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,r,n,i,o,a){let s=this.elements,l=1/(r-t),c=1/(n-i),u=1/(a-o),h=(r+t)*l,f=(n+i)*c,p=(a+o)*u;return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-h,s[1]=0,s[5]=2*c,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=-2*u,s[14]=-p,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(t){let r=this.elements,n=t.elements;for(let i=0;i<16;i++)if(r[i]!==n[i])return!1;return!0}fromArray(t,r=0){for(let n=0;n<16;n++)this.elements[n]=t[n+r];return this}toArray(t=[],r=0){let n=this.elements;return t[r]=n[0],t[r+1]=n[1],t[r+2]=n[2],t[r+3]=n[3],t[r+4]=n[4],t[r+5]=n[5],t[r+6]=n[6],t[r+7]=n[7],t[r+8]=n[8],t[r+9]=n[9],t[r+10]=n[10],t[r+11]=n[11],t[r+12]=n[12],t[r+13]=n[13],t[r+14]=n[14],t[r+15]=n[15],t}};Me.prototype.isMatrix4=!0;var S3=new j,ih=new Me,lfr=new j(0,0,0),cfr=new j(1,1,1),R0=new j,_V=new j,Rl=new j,xue=new Me,bue=new yi,em=class{constructor(t=0,r=0,n=0,i=em.DefaultOrder){this._x=t,this._y=r,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,r,n,i=this._order){return this._x=t,this._y=r,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,r=this._order,n=!0){let i=t.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],f=i[6],p=i[10];switch(r){case"XYZ":this._y=Math.asin(Zo(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Zo(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(Zo(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Zo(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Zo(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-Zo(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,r,n){return xue.makeRotationFromQuaternion(t),this.setFromRotationMatrix(xue,r,n)}setFromVector3(t,r=this._order){return this.set(t.x,t.y,t.z,r)}reorder(t){return bue.setFromEuler(this),this.setFromQuaternion(bue,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new j(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};em.prototype.isEuler=!0;em.DefaultOrder="XYZ";em.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var X3=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},ufr=0,wue=new j,M3=new yi,Gd=new Me,yV=new j,kP=new j,hfr=new j,ffr=new yi,Sue=new j(1,0,0),Mue=new j(0,1,0),Eue=new j(0,0,1),pfr={type:"added"},Tue={type:"removed"},or=class extends qs{constructor(){super(),Object.defineProperty(this,"id",{value:ufr++}),this.uuid=Dl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=or.DefaultUp.clone();let t=new j,r=new em,n=new yi,i=new j(1,1,1);function o(){n.setFromEuler(r,!1)}function a(){r.setFromQuaternion(n,void 0,!1)}r._onChange(o),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Me},normalMatrix:{value:new ki}}),this.matrix=new Me,this.matrixWorld=new Me,this.matrixAutoUpdate=or.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new X3,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,r){this.quaternion.setFromAxisAngle(t,r)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,r){return M3.setFromAxisAngle(t,r),this.quaternion.multiply(M3),this}rotateOnWorldAxis(t,r){return M3.setFromAxisAngle(t,r),this.quaternion.premultiply(M3),this}rotateX(t){return this.rotateOnAxis(Sue,t)}rotateY(t){return this.rotateOnAxis(Mue,t)}rotateZ(t){return this.rotateOnAxis(Eue,t)}translateOnAxis(t,r){return wue.copy(t).applyQuaternion(this.quaternion),this.position.add(wue.multiplyScalar(r)),this}translateX(t){return this.translateOnAxis(Sue,t)}translateY(t){return this.translateOnAxis(Mue,t)}translateZ(t){return this.translateOnAxis(Eue,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(Gd.copy(this.matrixWorld).invert())}lookAt(t,r,n){t.isVector3?yV.copy(t):yV.set(t,r,n);let i=this.parent;this.updateWorldMatrix(!0,!1),kP.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Gd.lookAt(kP,yV,this.up):Gd.lookAt(yV,kP,this.up),this.quaternion.setFromRotationMatrix(Gd),i&&(Gd.extractRotation(i.matrixWorld),M3.setFromRotationMatrix(Gd),this.quaternion.premultiply(M3.invert()))}add(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(pfr)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let r=this.children.indexOf(t);return r!==-1&&(t.parent=null,this.children.splice(r,1),t.dispatchEvent(Tue)),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){let r=this.children[t];r.parent=null,r.dispatchEvent(Tue)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Gd.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Gd.multiply(t.parent.matrixWorld)),t.applyMatrix4(Gd),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,r){if(this[t]===r)return this;for(let n=0,i=this.children.length;n<i;n++){let a=this.children[n].getObjectByProperty(t,r);if(a!==void 0)return a}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kP,t,hfr),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kP,ffr,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let r=this.matrixWorld.elements;return t.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(t){t(this);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverseVisible(t)}traverseAncestors(t){let r=this.parent;r!==null&&(t(r),r.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].updateMatrixWorld(t)}updateWorldMatrix(t,r){let n=this.parent;if(t===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),r===!0){let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(t){let r=t===void 0||typeof t=="string",n={};r&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function o(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(t.geometries,this.geometry);let s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){let l=s.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){let h=l[c];o(t.shapes,h)}else o(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let s=[];for(let l=0,c=this.material.length;l<c;l++)s.push(o(t.materials,this.material[l]));i.material=s}else i.material=o(t.materials,this.material);if(this.children.length>0){i.children=[];for(let s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let s=0;s<this.animations.length;s++){let l=this.animations[s];i.animations.push(o(t.animations,l))}}if(r){let s=a(t.geometries),l=a(t.materials),c=a(t.textures),u=a(t.images),h=a(t.shapes),f=a(t.skeletons),p=a(t.animations);s.length>0&&(n.geometries=s),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),f.length>0&&(n.skeletons=f),p.length>0&&(n.animations=p)}return n.object=i,n;function a(s){let l=[];for(let c in s){let u=s[c];delete u.metadata,l.push(u)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,r=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),r===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};or.DefaultUp=new j(0,1,0);or.DefaultMatrixAutoUpdate=!0;or.prototype.isObject3D=!0;var oh=new j,Wd=new j,tut=new j,Yd=new j,E3=new j,T3=new j,Cue=new j,eut=new j,rut=new j,nut=new j,oi=class{constructor(t=new j,r=new j,n=new j){this.a=t,this.b=r,this.c=n}static getNormal(t,r,n,i){i.subVectors(n,r),oh.subVectors(t,r),i.cross(oh);let o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(t,r,n,i,o){oh.subVectors(i,r),Wd.subVectors(n,r),tut.subVectors(t,r);let a=oh.dot(oh),s=oh.dot(Wd),l=oh.dot(tut),c=Wd.dot(Wd),u=Wd.dot(tut),h=a*c-s*s;if(h===0)return o.set(-2,-1,-1);let f=1/h,p=(c*l-s*u)*f,d=(a*u-s*l)*f;return o.set(1-p-d,d,p)}static containsPoint(t,r,n,i){return this.getBarycoord(t,r,n,i,Yd),Yd.x>=0&&Yd.y>=0&&Yd.x+Yd.y<=1}static getUV(t,r,n,i,o,a,s,l){return this.getBarycoord(t,r,n,i,Yd),l.set(0,0),l.addScaledVector(o,Yd.x),l.addScaledVector(a,Yd.y),l.addScaledVector(s,Yd.z),l}static isFrontFacing(t,r,n,i){return oh.subVectors(n,r),Wd.subVectors(t,r),oh.cross(Wd).dot(i)<0}set(t,r,n){return this.a.copy(t),this.b.copy(r),this.c.copy(n),this}setFromPointsAndIndices(t,r,n,i){return this.a.copy(t[r]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,r,n,i){return this.a.fromBufferAttribute(t,r),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return oh.subVectors(this.c,this.b),Wd.subVectors(this.a,this.b),oh.cross(Wd).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return oi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,r){return oi.getBarycoord(t,this.a,this.b,this.c,r)}getUV(t,r,n,i,o){return oi.getUV(t,this.a,this.b,this.c,r,n,i,o)}containsPoint(t){return oi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return oi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,r){let n=this.a,i=this.b,o=this.c,a,s;E3.subVectors(i,n),T3.subVectors(o,n),eut.subVectors(t,n);let l=E3.dot(eut),c=T3.dot(eut);if(l<=0&&c<=0)return r.copy(n);rut.subVectors(t,i);let u=E3.dot(rut),h=T3.dot(rut);if(u>=0&&h<=u)return r.copy(i);let f=l*h-u*c;if(f<=0&&l>=0&&u<=0)return a=l/(l-u),r.copy(n).addScaledVector(E3,a);nut.subVectors(t,o);let p=E3.dot(nut),d=T3.dot(nut);if(d>=0&&p<=d)return r.copy(o);let g=p*c-l*d;if(g<=0&&c>=0&&d<=0)return s=c/(c-d),r.copy(n).addScaledVector(T3,s);let _=u*d-p*h;if(_<=0&&h-u>=0&&p-d>=0)return Cue.subVectors(o,i),s=(h-u)/(h-u+(p-d)),r.copy(i).addScaledVector(Cue,s);let y=1/(_+g+f);return a=g*y,s=f*y,r.copy(n).addScaledVector(E3,a).addScaledVector(T3,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},dfr=0,qi=class extends qs{constructor(){super(),Object.defineProperty(this,"id",{value:dfr++}),this.uuid=Dl(),this.name="",this.type="Material",this.fog=!0,this.blending=V3,this.side=L1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Pht,this.blendDst=Iht,this.blendEquation=E1,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=iU,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Ofe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=nU,this.stencilZFail=nU,this.stencilZPass=nU,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.alphaWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let r in t){let n=t[r];if(n===void 0){console.warn("THREE.Material: '"+r+"' parameter is undefined.");continue}if(r==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===Aht;continue}let i=this[r];if(i===void 0){console.warn("THREE."+this.type+": '"+r+"' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[r]=n}}toJSON(t){let r=t===void 0||typeof t=="string";r&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==V3&&(n.blending=this.blending),this.side!==L1&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.alphaWrite=this.alphaWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function i(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(r){let o=i(t.textures),a=i(t.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let r=t.clippingPlanes,n=null;if(r!==null){let i=r.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=r[o].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.alphaWrite=t.alphaWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}};qi.prototype.isMaterial=!0;var sh=class extends qi{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new ne(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};sh.prototype.isMeshBasicMaterial=!0;var Ln=new j,vV=new Lt,Je=class{constructor(t,r,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=r,this.count=t!==void 0?t.length/r:0,this.normalized=n===!0,this.usage=W3,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,r,n){t*=this.itemSize,n*=r.itemSize;for(let i=0,o=this.itemSize;i<o;i++)this.array[t+i]=r.array[n+i];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),a=new ne),r[n++]=a.r,r[n++]=a.g,r[n++]=a.b}return this}copyVector2sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),a=new Lt),r[n++]=a.x,r[n++]=a.y}return this}copyVector3sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),a=new j),r[n++]=a.x,r[n++]=a.y,r[n++]=a.z}return this}copyVector4sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),a=new en),r[n++]=a.x,r[n++]=a.y,r[n++]=a.z,r[n++]=a.w}return this}applyMatrix3(t){if(this.itemSize===2)for(let r=0,n=this.count;r<n;r++)vV.fromBufferAttribute(this,r),vV.applyMatrix3(t),this.setXY(r,vV.x,vV.y);else if(this.itemSize===3)for(let r=0,n=this.count;r<n;r++)Ln.fromBufferAttribute(this,r),Ln.applyMatrix3(t),this.setXYZ(r,Ln.x,Ln.y,Ln.z);return this}applyMatrix4(t){for(let r=0,n=this.count;r<n;r++)Ln.x=this.getX(r),Ln.y=this.getY(r),Ln.z=this.getZ(r),Ln.applyMatrix4(t),this.setXYZ(r,Ln.x,Ln.y,Ln.z);return this}applyNormalMatrix(t){for(let r=0,n=this.count;r<n;r++)Ln.x=this.getX(r),Ln.y=this.getY(r),Ln.z=this.getZ(r),Ln.applyNormalMatrix(t),this.setXYZ(r,Ln.x,Ln.y,Ln.z);return this}transformDirection(t){for(let r=0,n=this.count;r<n;r++)Ln.x=this.getX(r),Ln.y=this.getY(r),Ln.z=this.getZ(r),Ln.transformDirection(t),this.setXYZ(r,Ln.x,Ln.y,Ln.z);return this}set(t,r=0){return this.array.set(t,r),this}getX(t){return this.array[t*this.itemSize]}setX(t,r){return this.array[t*this.itemSize]=r,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,r){return this.array[t*this.itemSize+1]=r,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,r){return this.array[t*this.itemSize+2]=r,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,r){return this.array[t*this.itemSize+3]=r,this}setXY(t,r,n){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this}setXYZ(t,r,n,i){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,r,n,i,o){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==W3&&(t.usage=this.usage),(this.updateRange.offset!==0||this.updateRange.count!==-1)&&(t.updateRange=this.updateRange),t}};Je.prototype.isBufferAttribute=!0;var cU=class extends Je{constructor(t,r,n){super(new Int8Array(t),r,n)}},uU=class extends Je{constructor(t,r,n){super(new Uint8Array(t),r,n)}},hU=class extends Je{constructor(t,r,n){super(new Uint8ClampedArray(t),r,n)}},fU=class extends Je{constructor(t,r,n){super(new Int16Array(t),r,n)}},$3=class extends Je{constructor(t,r,n){super(new Uint16Array(t),r,n)}},pU=class extends Je{constructor(t,r,n){super(new Int32Array(t),r,n)}},K3=class extends Je{constructor(t,r,n){super(new Uint32Array(t),r,n)}},dU=class extends Je{constructor(t,r,n){super(new Uint16Array(t),r,n)}};dU.prototype.isFloat16BufferAttribute=!0;var xe=class extends Je{constructor(t,r,n){super(new Float32Array(t),r,n)}},mU=class extends Je{constructor(t,r,n){super(new Float64Array(t),r,n)}},mfr=0,Xc=new Me,iut=new or,C3=new j,Nl=new ta,RP=new ta,Lo=new j,Pe=class extends qs{constructor(){super(),Object.defineProperty(this,"id",{value:mfr++}),this.uuid=Dl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Bfe(t)?K3:$3)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,r){return this.attributes[t]=r,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,r,n=0){this.groups.push({start:t,count:r,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,r){this.drawRange.start=t,this.drawRange.count=r}applyMatrix4(t){let r=this.attributes.position;r!==void 0&&(r.applyMatrix4(t),r.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new ki().getNormalMatrix(t);n.applyNormalMatrix(o),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Xc.makeRotationFromQuaternion(t),this.applyMatrix4(Xc),this}rotateX(t){return Xc.makeRotationX(t),this.applyMatrix4(Xc),this}rotateY(t){return Xc.makeRotationY(t),this.applyMatrix4(Xc),this}rotateZ(t){return Xc.makeRotationZ(t),this.applyMatrix4(Xc),this}translate(t,r,n){return Xc.makeTranslation(t,r,n),this.applyMatrix4(Xc),this}scale(t,r,n){return Xc.makeScale(t,r,n),this.applyMatrix4(Xc),this}lookAt(t){return iut.lookAt(t),iut.updateMatrix(),this.applyMatrix4(iut.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(C3).negate(),this.translate(C3.x,C3.y,C3.z),this}setFromPoints(t){let r=[];for(let n=0,i=t.length;n<i;n++){let o=t[n];r.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new xe(r,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ta);let t=this.attributes.position,r=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new j(-1/0,-1/0,-1/0),new j(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),r)for(let n=0,i=r.length;n<i;n++){let o=r[n];Nl.setFromBufferAttribute(o),this.morphTargetsRelative?(Lo.addVectors(this.boundingBox.min,Nl.min),this.boundingBox.expandByPoint(Lo),Lo.addVectors(this.boundingBox.max,Nl.max),this.boundingBox.expandByPoint(Lo)):(this.boundingBox.expandByPoint(Nl.min),this.boundingBox.expandByPoint(Nl.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Jf);let t=this.attributes.position,r=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new j,1/0);return}if(t){let n=this.boundingSphere.center;if(Nl.setFromBufferAttribute(t),r)for(let o=0,a=r.length;o<a;o++){let s=r[o];RP.setFromBufferAttribute(s),this.morphTargetsRelative?(Lo.addVectors(Nl.min,RP.min),Nl.expandByPoint(Lo),Lo.addVectors(Nl.max,RP.max),Nl.expandByPoint(Lo)):(Nl.expandByPoint(RP.min),Nl.expandByPoint(RP.max))}Nl.getCenter(n);let i=0;for(let o=0,a=t.count;o<a;o++)Lo.fromBufferAttribute(t,o),i=Math.max(i,n.distanceToSquared(Lo));if(r)for(let o=0,a=r.length;o<a;o++){let s=r[o],l=this.morphTargetsRelative;for(let c=0,u=s.count;c<u;c++)Lo.fromBufferAttribute(s,c),l&&(C3.fromBufferAttribute(t,c),Lo.add(C3)),i=Math.max(i,n.distanceToSquared(Lo))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,r=this.attributes;if(t===null||r.position===void 0||r.normal===void 0||r.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.array,i=r.position.array,o=r.normal.array,a=r.uv.array,s=i.length/3;r.tangent===void 0&&this.setAttribute("tangent",new Je(new Float32Array(4*s),4));let l=r.tangent.array,c=[],u=[];for(let B=0;B<s;B++)c[B]=new j,u[B]=new j;let h=new j,f=new j,p=new j,d=new Lt,g=new Lt,_=new Lt,y=new j,x=new j;function b(B,I,L){h.fromArray(i,B*3),f.fromArray(i,I*3),p.fromArray(i,L*3),d.fromArray(a,B*2),g.fromArray(a,I*2),_.fromArray(a,L*2),f.sub(h),p.sub(h),g.sub(d),_.sub(d);let R=1/(g.x*_.y-_.x*g.y);!isFinite(R)||(y.copy(f).multiplyScalar(_.y).addScaledVector(p,-g.y).multiplyScalar(R),x.copy(p).multiplyScalar(g.x).addScaledVector(f,-_.x).multiplyScalar(R),c[B].add(y),c[I].add(y),c[L].add(y),u[B].add(x),u[I].add(x),u[L].add(x))}let S=this.groups;S.length===0&&(S=[{start:0,count:n.length}]);for(let B=0,I=S.length;B<I;++B){let L=S[B],R=L.start,F=L.count;for(let z=R,U=R+F;z<U;z+=3)b(n[z+0],n[z+1],n[z+2])}let C=new j,P=new j,k=new j,O=new j;function D(B){k.fromArray(o,B*3),O.copy(k);let I=c[B];C.copy(I),C.sub(k.multiplyScalar(k.dot(I))).normalize(),P.crossVectors(O,I);let R=P.dot(u[B])<0?-1:1;l[B*4]=C.x,l[B*4+1]=C.y,l[B*4+2]=C.z,l[B*4+3]=R}for(let B=0,I=S.length;B<I;++B){let L=S[B],R=L.start,F=L.count;for(let z=R,U=R+F;z<U;z+=3)D(n[z+0]),D(n[z+1]),D(n[z+2])}}computeVertexNormals(){let t=this.index,r=this.getAttribute("position");if(r!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Je(new Float32Array(r.count*3),3),this.setAttribute("normal",n);else for(let f=0,p=n.count;f<p;f++)n.setXYZ(f,0,0,0);let i=new j,o=new j,a=new j,s=new j,l=new j,c=new j,u=new j,h=new j;if(t)for(let f=0,p=t.count;f<p;f+=3){let d=t.getX(f+0),g=t.getX(f+1),_=t.getX(f+2);i.fromBufferAttribute(r,d),o.fromBufferAttribute(r,g),a.fromBufferAttribute(r,_),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),s.fromBufferAttribute(n,d),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,_),s.add(u),l.add(u),c.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(_,c.x,c.y,c.z)}else for(let f=0,p=r.count;f<p;f+=3)i.fromBufferAttribute(r,f+0),o.fromBufferAttribute(r,f+1),a.fromBufferAttribute(r,f+2),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),n.setXYZ(f+0,u.x,u.y,u.z),n.setXYZ(f+1,u.x,u.y,u.z),n.setXYZ(f+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(t,r){if(!(t&&t.isBufferGeometry)){console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);return}r===void 0&&(r=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));let n=this.attributes;for(let i in n){if(t.attributes[i]===void 0)continue;let a=n[i].array,s=t.attributes[i],l=s.array,c=s.itemSize*r,u=Math.min(l.length,a.length-c);for(let h=0,f=c;h<u;h++,f++)a[f]=l[h]}return this}normalizeNormals(){let t=this.attributes.normal;for(let r=0,n=t.count;r<n;r++)Lo.fromBufferAttribute(t,r),Lo.normalize(),t.setXYZ(r,Lo.x,Lo.y,Lo.z)}toNonIndexed(){function t(s,l){let c=s.array,u=s.itemSize,h=s.normalized,f=new c.constructor(l.length*u),p=0,d=0;for(let g=0,_=l.length;g<_;g++){s.isInterleavedBufferAttribute?p=l[g]*s.data.stride+s.offset:p=l[g]*u;for(let y=0;y<u;y++)f[d++]=c[p++]}return new Je(f,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let r=new Pe,n=this.index.array,i=this.attributes;for(let s in i){let l=i[s],c=t(l,n);r.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let u=0,h=c.length;u<h;u++){let f=c[u],p=t(f,n);l.push(p)}r.morphAttributes[s]=l}r.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];r.addGroup(c.start,c.count,c.materialIndex)}return r}toJSON(){let t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let r=this.index;r!==null&&(t.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,f=c.length;h<f;h++){let p=c[h];u.push(p.toJSON(t.data))}u.length>0&&(i[l]=u,o=!0)}o&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let r={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(r));let i=t.attributes;for(let c in i){let u=i[c];this.setAttribute(c,u.clone(r))}let o=t.morphAttributes;for(let c in o){let u=[],h=o[c];for(let f=0,p=h.length;f<p;f++)u.push(h[f].clone(r));this.morphAttributes[c]=u}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let c=0,u=a.length;c<u;c++){let h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}let s=t.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,t.parameters!==void 0&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}};Pe.prototype.isBufferGeometry=!0;var Aue=new Me,A3=new Qf,out=new Jf,N0=new j,D0=new j,O0=new j,aut=new j,sut=new j,lut=new j,xV=new j,bV=new j,wV=new j,SV=new Lt,MV=new Lt,EV=new Lt,cut=new j,TV=new j,ti=class extends or{constructor(t=new Pe,r=new sh){super(),this.type="Mesh",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,r){let n=this.geometry,i=this.material,o=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),out.copy(n.boundingSphere),out.applyMatrix4(o),t.ray.intersectsSphere(out)===!1)||(Aue.copy(o).invert(),A3.copy(t.ray).applyMatrix4(Aue),n.boundingBox!==null&&A3.intersectsBox(n.boundingBox)===!1))return;let a;if(n.isBufferGeometry){let s=n.index,l=n.attributes.position,c=n.morphAttributes.position,u=n.morphTargetsRelative,h=n.attributes.uv,f=n.attributes.uv2,p=n.groups,d=n.drawRange;if(s!==null)if(Array.isArray(i))for(let g=0,_=p.length;g<_;g++){let y=p[g],x=i[y.materialIndex],b=Math.max(y.start,d.start),S=Math.min(s.count,Math.min(y.start+y.count,d.start+d.count));for(let C=b,P=S;C<P;C+=3){let k=s.getX(C),O=s.getX(C+1),D=s.getX(C+2);a=CV(this,x,t,A3,l,c,u,h,f,k,O,D),a&&(a.faceIndex=Math.floor(C/3),a.face.materialIndex=y.materialIndex,r.push(a))}}else{let g=Math.max(0,d.start),_=Math.min(s.count,d.start+d.count);for(let y=g,x=_;y<x;y+=3){let b=s.getX(y),S=s.getX(y+1),C=s.getX(y+2);a=CV(this,i,t,A3,l,c,u,h,f,b,S,C),a&&(a.faceIndex=Math.floor(y/3),r.push(a))}}else if(l!==void 0)if(Array.isArray(i))for(let g=0,_=p.length;g<_;g++){let y=p[g],x=i[y.materialIndex],b=Math.max(y.start,d.start),S=Math.min(l.count,Math.min(y.start+y.count,d.start+d.count));for(let C=b,P=S;C<P;C+=3){let k=C,O=C+1,D=C+2;a=CV(this,x,t,A3,l,c,u,h,f,k,O,D),a&&(a.faceIndex=Math.floor(C/3),a.face.materialIndex=y.materialIndex,r.push(a))}}else{let g=Math.max(0,d.start),_=Math.min(l.count,d.start+d.count);for(let y=g,x=_;y<x;y+=3){let b=y,S=y+1,C=y+2;a=CV(this,i,t,A3,l,c,u,h,f,b,S,C),a&&(a.faceIndex=Math.floor(y/3),r.push(a))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}};ti.prototype.isMesh=!0;function gfr(e,t,r,n,i,o,a,s){let l;if(t.side===Ii?l=n.intersectTriangle(a,o,i,!0,s):l=n.intersectTriangle(i,o,a,t.side!==k1,s),l===null)return null;TV.copy(s),TV.applyMatrix4(e.matrixWorld);let c=r.ray.origin.distanceTo(TV);return c<r.near||c>r.far?null:{distance:c,point:TV.clone(),object:e}}function CV(e,t,r,n,i,o,a,s,l,c,u,h){N0.fromBufferAttribute(i,c),D0.fromBufferAttribute(i,u),O0.fromBufferAttribute(i,h);let f=e.morphTargetInfluences;if(o&&f){xV.set(0,0,0),bV.set(0,0,0),wV.set(0,0,0);for(let d=0,g=o.length;d<g;d++){let _=f[d],y=o[d];_!==0&&(aut.fromBufferAttribute(y,c),sut.fromBufferAttribute(y,u),lut.fromBufferAttribute(y,h),a?(xV.addScaledVector(aut,_),bV.addScaledVector(sut,_),wV.addScaledVector(lut,_)):(xV.addScaledVector(aut.sub(N0),_),bV.addScaledVector(sut.sub(D0),_),wV.addScaledVector(lut.sub(O0),_)))}N0.add(xV),D0.add(bV),O0.add(wV)}e.isSkinnedMesh&&(e.boneTransform(c,N0),e.boneTransform(u,D0),e.boneTransform(h,O0));let p=gfr(e,t,r,n,N0,D0,O0,cut);if(p){s&&(SV.fromBufferAttribute(s,c),MV.fromBufferAttribute(s,u),EV.fromBufferAttribute(s,h),p.uv=oi.getUV(cut,N0,D0,O0,SV,MV,EV,new Lt)),l&&(SV.fromBufferAttribute(l,c),MV.fromBufferAttribute(l,u),EV.fromBufferAttribute(l,h),p.uv2=oi.getUV(cut,N0,D0,O0,SV,MV,EV,new Lt));let d={a:c,b:u,c:h,normal:new j,materialIndex:0};oi.getNormal(N0,D0,O0,d.normal),p.face=d}return p}var tp=class extends Pe{constructor(t=1,r=1,n=1,i=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:r,depth:n,widthSegments:i,heightSegments:o,depthSegments:a};let s=this;i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],u=[],h=[],f=0,p=0;d("z","y","x",-1,-1,n,r,t,a,o,0),d("z","y","x",1,-1,n,r,-t,a,o,1),d("x","z","y",1,1,t,n,r,i,a,2),d("x","z","y",1,-1,t,n,-r,i,a,3),d("x","y","z",1,-1,t,r,n,i,o,4),d("x","y","z",-1,-1,t,r,-n,i,o,5),this.setIndex(l),this.setAttribute("position",new xe(c,3)),this.setAttribute("normal",new xe(u,3)),this.setAttribute("uv",new xe(h,2));function d(g,_,y,x,b,S,C,P,k,O,D){let B=S/k,I=C/O,L=S/2,R=C/2,F=P/2,z=k+1,U=O+1,W=0,Z=0,rt=new j;for(let ot=0;ot<U;ot++){let st=ot*I-R;for(let St=0;St<z;St++){let bt=St*B-L;rt[g]=bt*x,rt[_]=st*b,rt[y]=F,c.push(rt.x,rt.y,rt.z),rt[g]=0,rt[_]=0,rt[y]=P>0?1:-1,u.push(rt.x,rt.y,rt.z),h.push(St/k),h.push(1-ot/O),W+=1}}for(let ot=0;ot<O;ot++)for(let st=0;st<k;st++){let St=f+st+z*ot,bt=f+st+z*(ot+1),Mt=f+(st+1)+z*(ot+1),lt=f+(st+1)+z*ot;l.push(St,bt,lt),l.push(bt,Mt,lt),Z+=6}s.addGroup(p,Z,D),p+=Z,f+=W}}static fromJSON(t){return new tp(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Z3(e){let t={};for(let r in e){t[r]={};for(let n in e[r]){let i=e[r][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[r][n]=i.clone():Array.isArray(i)?t[r][n]=i.slice():t[r][n]=i}}return t}function Ca(e){let t={};for(let r=0;r<e.length;r++){let n=Z3(e[r]);for(let i in n)t[i]=n[i]}return t}var Vfe={clone:Z3,merge:Ca},_fr=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,yfr=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`,lh=class extends qi{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=_fr,this.fragmentShader=yfr,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Z3(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){let r=super.toJSON(t);r.glslVersion=this.glslVersion,r.uniforms={};for(let i in this.uniforms){let a=this.uniforms[i].value;a&&a.isTexture?r.uniforms[i]={type:"t",value:a.toJSON(t).uuid}:a&&a.isColor?r.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?r.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?r.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?r.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?r.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?r.uniforms[i]={type:"m4",value:a.toArray()}:r.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(r.defines=this.defines),r.vertexShader=this.vertexShader,r.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(r.extensions=n),r}};lh.prototype.isShaderMaterial=!0;var N1=class extends or{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Me,this.projectionMatrix=new Me,this.projectionMatrixInverse=new Me}copy(t,r){return super.copy(t,r),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let r=this.matrixWorld.elements;return t.set(-r[8],-r[9],-r[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,r){super.updateWorldMatrix(t,r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};N1.prototype.isCamera=!0;var Ui=class extends N1{constructor(t=50,r=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=r,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,r){return super.copy(t,r),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let r=.5*this.getFilmHeight()/t;this.fov=QP*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(I1*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return QP*2*Math.atan(Math.tan(I1*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,r,n,i,o,a){this.aspect=t/r,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,r=t*Math.tan(I1*.5*this.fov)/this.zoom,n=2*r,i=this.aspect*n,o=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let l=a.fullWidth,c=a.fullHeight;o+=a.offsetX*i/l,r-=a.offsetY*n/c,i*=a.width/l,n*=a.height/c}let s=this.filmOffset;s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,r,r-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let r=super.toJSON(t);return r.object.fov=this.fov,r.object.zoom=this.zoom,r.object.near=this.near,r.object.far=this.far,r.object.focus=this.focus,r.object.aspect=this.aspect,this.view!==null&&(r.object.view=Object.assign({},this.view)),r.object.filmGauge=this.filmGauge,r.object.filmOffset=this.filmOffset,r}};Ui.prototype.isPerspectiveCamera=!0;var P3=90,I3=1,J3=class extends or{constructor(t,r,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let i=new Ui(P3,I3,t,r);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new j(1,0,0)),this.add(i);let o=new Ui(P3,I3,t,r);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new j(-1,0,0)),this.add(o);let a=new Ui(P3,I3,t,r);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(new j(0,1,0)),this.add(a);let s=new Ui(P3,I3,t,r);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new j(0,-1,0)),this.add(s);let l=new Ui(P3,I3,t,r);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new j(0,0,1)),this.add(l);let c=new Ui(P3,I3,t,r);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new j(0,0,-1)),this.add(c)}update(t,r){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,o,a,s,l,c]=this.children,u=t.xr.enabled,h=t.getRenderTarget();t.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(r,i),t.setRenderTarget(n,1),t.render(r,o),t.setRenderTarget(n,2),t.render(r,a),t.setRenderTarget(n,3),t.render(r,s),t.setRenderTarget(n,4),t.render(r,l),n.texture.generateMipmaps=f,t.setRenderTarget(n,5),t.render(r,c),t.setRenderTarget(h),t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},V0=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u){t=t!==void 0?t:[],r=r!==void 0?r:ix,super(t,r,n,i,o,a,s,l,c,u),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};V0.prototype.isCubeTexture=!0;var Q3=class extends hs{constructor(t,r,n){Number.isInteger(r)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),r=n),super(t,t,r),r=r||{},this.texture=new V0(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:ii}fromEquirectangularTexture(t,r){this.texture.type=r.type,this.texture.format=Qo,this.texture.encoding=r.encoding,this.texture.generateMipmaps=r.generateMipmaps,this.texture.minFilter=r.minFilter,this.texture.magFilter=r.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`},i=new tp(5,5,5),o=new lh({name:"CubemapFromEquirect",uniforms:Z3(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ii,blending:Kd});o.uniforms.tEquirect.value=r;let a=new ti(i,o),s=r.minFilter;return r.minFilter===ax&&(r.minFilter=ii),new J3(1,10,this).update(t,a),r.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(t,r,n,i){let o=t.getRenderTarget();for(let a=0;a<6;a++)t.setRenderTarget(this,a),t.clear(r,n,i);t.setRenderTarget(o)}};Q3.prototype.isWebGLCubeRenderTarget=!0;var uut=new j,vfr=new j,xfr=new ki,$c=class{constructor(t=new j(1,0,0),r=0){this.normal=t,this.constant=r}set(t,r){return this.normal.copy(t),this.constant=r,this}setComponents(t,r,n,i){return this.normal.set(t,r,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,r){return this.normal.copy(t),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(t,r,n){let i=uut.subVectors(n,r).cross(vfr.subVectors(t,r)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,r){return r.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,r){let n=t.delta(uut),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?r.copy(t.start):null;let o=-(t.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:r.copy(n).multiplyScalar(o).add(t.start)}intersectsLine(t){let r=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return r<0&&n>0||n<0&&r>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,r){let n=r||xfr.getNormalMatrix(t),i=this.coplanarPoint(uut).applyMatrix4(t),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}};$c.prototype.isPlane=!0;var L3=new Jf,AV=new j,D1=class{constructor(t=new $c,r=new $c,n=new $c,i=new $c,o=new $c,a=new $c){this.planes=[t,r,n,i,o,a]}set(t,r,n,i,o,a){let s=this.planes;return s[0].copy(t),s[1].copy(r),s[2].copy(n),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(t){let r=this.planes;for(let n=0;n<6;n++)r[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let r=this.planes,n=t.elements,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],u=n[6],h=n[7],f=n[8],p=n[9],d=n[10],g=n[11],_=n[12],y=n[13],x=n[14],b=n[15];return r[0].setComponents(s-i,h-l,g-f,b-_).normalize(),r[1].setComponents(s+i,h+l,g+f,b+_).normalize(),r[2].setComponents(s+o,h+c,g+p,b+y).normalize(),r[3].setComponents(s-o,h-c,g-p,b-y).normalize(),r[4].setComponents(s-a,h-u,g-d,b-x).normalize(),r[5].setComponents(s+a,h+u,g+d,b+x).normalize(),this}intersectsObject(t){let r=t.geometry;return r.boundingSphere===null&&r.computeBoundingSphere(),L3.copy(r.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(L3)}intersectsSprite(t){return L3.center.set(0,0,0),L3.radius=.7071067811865476,L3.applyMatrix4(t.matrixWorld),this.intersectsSphere(L3)}intersectsSphere(t){let r=this.planes,n=t.center,i=-t.radius;for(let o=0;o<6;o++)if(r[o].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){let r=this.planes;for(let n=0;n<6;n++){let i=r[n];if(AV.x=i.normal.x>0?t.max.x:t.min.x,AV.y=i.normal.y>0?t.max.y:t.min.y,AV.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(AV)<0)return!1}return!0}containsPoint(t){let r=this.planes;for(let n=0;n<6;n++)if(r[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Ufe(){let e=null,t=!1,r=null,n=null;function i(o,a){r(o,a),n=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&r!==null&&(n=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(o){r=o},setContext:function(o){e=o}}}function bfr(e,t){let r=t.isWebGL2,n=new WeakMap;function i(c,u){let h=c.array,f=c.usage,p=e.createBuffer();e.bindBuffer(u,p),e.bufferData(u,h,f),c.onUploadCallback();let d=5126;return h instanceof Float32Array?d=5126:h instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):h instanceof Uint16Array?c.isFloat16BufferAttribute?r?d=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):d=5123:h instanceof Int16Array?d=5122:h instanceof Uint32Array?d=5125:h instanceof Int32Array?d=5124:h instanceof Int8Array?d=5120:(h instanceof Uint8Array||h instanceof Uint8ClampedArray)&&(d=5121),{buffer:p,type:d,bytesPerElement:h.BYTES_PER_ELEMENT,version:c.version}}function o(c,u,h){let f=u.array,p=u.updateRange;e.bindBuffer(h,c),p.count===-1?e.bufferSubData(h,0,f):(r?e.bufferSubData(h,p.offset*f.BYTES_PER_ELEMENT,f,p.offset,p.count):e.bufferSubData(h,p.offset*f.BYTES_PER_ELEMENT,f.subarray(p.offset,p.offset+p.count)),p.count=-1)}function a(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function s(c){c.isInterleavedBufferAttribute&&(c=c.data);let u=n.get(c);u&&(e.deleteBuffer(u.buffer),n.delete(c))}function l(c,u){if(c.isGLBufferAttribute){let f=n.get(c);(!f||f.version<c.version)&&n.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version});return}c.isInterleavedBufferAttribute&&(c=c.data);let h=n.get(c);h===void 0?n.set(c,i(c,u)):h.version<c.version&&(o(h.buffer,c,u),h.version=c.version)}return{get:a,remove:s,update:l}}var U0=class extends Pe{constructor(t=1,r=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:r,widthSegments:n,heightSegments:i};let o=t/2,a=r/2,s=Math.floor(n),l=Math.floor(i),c=s+1,u=l+1,h=t/s,f=r/l,p=[],d=[],g=[],_=[];for(let y=0;y<u;y++){let x=y*f-a;for(let b=0;b<c;b++){let S=b*h-o;d.push(S,-x,0),g.push(0,0,1),_.push(b/s),_.push(1-y/l)}}for(let y=0;y<l;y++)for(let x=0;x<s;x++){let b=x+c*y,S=x+c*(y+1),C=x+1+c*(y+1),P=x+1+c*y;p.push(b,S,P),p.push(S,C,P)}this.setIndex(p),this.setAttribute("position",new xe(d,3)),this.setAttribute("normal",new xe(g,3)),this.setAttribute("uv",new xe(_,2))}static fromJSON(t){return new U0(t.width,t.height,t.widthSegments,t.heightSegments)}},wfr=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vUv ).g;
#endif`,Sfr=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,Mfr=`#ifdef USE_ALPHATEST
	if ( diffuseColor.a < alphaTest ) discard;
#endif`,Efr=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,Tfr=`#ifdef USE_AOMAP
	float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
	reflectedLight.indirectDiffuse *= ambientOcclusion;
	#if defined( USE_ENVMAP ) && defined( STANDARD )
		float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
	#endif
#endif`,Cfr=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,Afr="vec3 transformed = vec3( position );",Pfr=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,Ifr=`vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
	return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
	float a2 = pow2( alpha );
	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
	return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
	float a2 = pow2( alpha );
	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
	return RECIPROCAL_PI * a2 / pow2( denom );
}
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {
	float alpha = pow2( roughness );
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( f0, f90, dotVH );
	float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
	float D = D_GGX( alpha, dotNH );
	return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
	const float LUT_SIZE = 64.0;
	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
	const float LUT_BIAS = 0.5 / LUT_SIZE;
	float dotNV = saturate( dot( N, V ) );
	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
	uv = uv * LUT_SCALE + LUT_BIAS;
	return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
	float l = length( f );
	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
	float x = dot( v1, v2 );
	float y = abs( x );
	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
	float b = 3.4175940 + ( 4.1616724 + y ) * y;
	float v = a / b;
	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
	return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
	vec3 lightNormal = cross( v1, v2 );
	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
	vec3 T1, T2;
	T1 = normalize( V - N * dot( V, N ) );
	T2 = - cross( N, T1 );
	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
	vec3 coords[ 4 ];
	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
	coords[ 0 ] = normalize( coords[ 0 ] );
	coords[ 1 ] = normalize( coords[ 1 ] );
	coords[ 2 ] = normalize( coords[ 2 ] );
	coords[ 3 ] = normalize( coords[ 3 ] );
	vec3 vectorFormFactor = vec3( 0.0 );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
	return vec3( result );
}
float G_BlinnPhong_Implicit( ) {
	return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
	float G = G_BlinnPhong_Implicit( );
	float D = D_BlinnPhong( shininess, dotNH );
	return F * ( G * D );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
	float alpha = pow2( roughness );
	float invAlpha = 1.0 / alpha;
	float cos2h = dotNH * dotNH;
	float sin2h = max( 1.0 - cos2h, 0.0078125 );
	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float D = D_Charlie( sheenRoughness, dotNH );
	float V = V_Neubelt( dotNV, dotNL );
	return sheenColor * ( D * V );
}
#endif`,Lfr=`#ifdef USE_BUMPMAP
	uniform sampler2D bumpMap;
	uniform float bumpScale;
	vec2 dHdxy_fwd() {
		vec2 dSTdx = dFdx( vUv );
		vec2 dSTdy = dFdy( vUv );
		float Hll = bumpScale * texture2D( bumpMap, vUv ).x;
		float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;
		float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;
		return vec2( dBx, dBy );
	}
	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
		vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );
		vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );
		vec3 vN = surf_norm;
		vec3 R1 = cross( vSigmaY, vN );
		vec3 R2 = cross( vN, vSigmaX );
		float fDet = dot( vSigmaX, R1 ) * faceDirection;
		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
		return normalize( abs( fDet ) * surf_norm - vGrad );
	}
#endif`,kfr=`#if NUM_CLIPPING_PLANES > 0
	vec4 plane;
	#pragma unroll_loop_start
	for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
		plane = clippingPlanes[ i ];
		if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
	}
	#pragma unroll_loop_end
	#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
		bool clipped = true;
		#pragma unroll_loop_start
		for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
		}
		#pragma unroll_loop_end
		if ( clipped ) discard;
	#endif
#endif`,Rfr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,Nfr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,Dfr=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,Ofr=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,zfr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,Ffr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	varying vec3 vColor;
#endif`,Bfr=`#if defined( USE_COLOR_ALPHA )
	vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
	vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
	vColor.xyz *= instanceColor.xyz;
#endif`,Hfr=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
highp float rand( const in vec2 uv ) {
	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
	return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
	float precisionSafeLength( vec3 v ) { return length( v ); }
#else
	float precisionSafeLength( vec3 v ) {
		float maxComponent = max3( abs( v ) );
		return length( v / maxComponent ) * maxComponent;
	}
#endif
struct IncidentLight {
	vec3 color;
	vec3 direction;
	bool visible;
};
struct ReflectedLight {
	vec3 directDiffuse;
	vec3 directSpecular;
	vec3 indirectDiffuse;
	vec3 indirectSpecular;
};
struct GeometricContext {
	vec3 position;
	vec3 normal;
	vec3 viewDir;
#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal;
#endif
};
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
	mat3 tmp;
	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
	return tmp;
}
float linearToRelativeLuminance( const in vec3 color ) {
	vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
	return dot( weights, color.rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
	return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
	return vec2( u, v );
}`,Vfr=`#ifdef ENVMAP_TYPE_CUBE_UV
	#define cubeUV_maxMipLevel 8.0
	#define cubeUV_minMipLevel 4.0
	#define cubeUV_maxTileSize 256.0
	#define cubeUV_minTileSize 16.0
	float getFace( vec3 direction ) {
		vec3 absDirection = abs( direction );
		float face = - 1.0;
		if ( absDirection.x > absDirection.z ) {
			if ( absDirection.x > absDirection.y )
				face = direction.x > 0.0 ? 0.0 : 3.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		} else {
			if ( absDirection.z > absDirection.y )
				face = direction.z > 0.0 ? 2.0 : 5.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		}
		return face;
	}
	vec2 getUV( vec3 direction, float face ) {
		vec2 uv;
		if ( face == 0.0 ) {
			uv = vec2( direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 1.0 ) {
			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
		} else if ( face == 2.0 ) {
			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
		} else if ( face == 3.0 ) {
			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 4.0 ) {
			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
		} else {
			uv = vec2( direction.x, direction.y ) / abs( direction.z );
		}
		return 0.5 * ( uv + 1.0 );
	}
	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
		float face = getFace( direction );
		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
		mipInt = max( mipInt, cubeUV_minMipLevel );
		float faceSize = exp2( mipInt );
		float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );
		vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;
		if ( face > 2.0 ) {
			uv.y += faceSize;
			face -= 3.0;
		}
		uv.x += face * faceSize;
		if ( mipInt < cubeUV_maxMipLevel ) {
			uv.y += 2.0 * cubeUV_maxTileSize;
		}
		uv.y += filterInt * 2.0 * cubeUV_minTileSize;
		uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );
		uv *= texelSize;
		return texture2D( envMap, uv ).rgb;
	}
	#define r0 1.0
	#define v0 0.339
	#define m0 - 2.0
	#define r1 0.8
	#define v1 0.276
	#define m1 - 1.0
	#define r4 0.4
	#define v4 0.046
	#define m4 2.0
	#define r5 0.305
	#define v5 0.016
	#define m5 3.0
	#define r6 0.21
	#define v6 0.0038
	#define m6 4.0
	float roughnessToMip( float roughness ) {
		float mip = 0.0;
		if ( roughness >= r1 ) {
			mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;
		} else if ( roughness >= r4 ) {
			mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;
		} else if ( roughness >= r5 ) {
			mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;
		} else if ( roughness >= r6 ) {
			mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;
		} else {
			mip = - 2.0 * log2( 1.16 * roughness );		}
		return mip;
	}
	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
		float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );
		float mipF = fract( mip );
		float mipInt = floor( mip );
		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
		if ( mipF == 0.0 ) {
			return vec4( color0, 1.0 );
		} else {
			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
			return vec4( mix( color0, color1, mipF ), 1.0 );
		}
	}
#endif`,Ufr=`vec3 transformedNormal = objectNormal;
#ifdef USE_INSTANCING
	mat3 m = mat3( instanceMatrix );
	transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
	transformedNormal = m * transformedNormal;
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
	transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
	vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#ifdef FLIP_SIDED
		transformedTangent = - transformedTangent;
	#endif
#endif`,qfr=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,Gfr=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
#endif`,Wfr=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vUv );
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,Yfr=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,jfr="gl_FragColor = linearToOutputTexel( gl_FragColor );",Xfr=`vec4 LinearToLinear( in vec4 value ) {
	return value;
}
vec4 LinearTosRGB( in vec4 value ) {
	return 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 );
}`,$fr=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vec3 cameraToFrag;
		if ( isOrthographic ) {
			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToFrag = normalize( vWorldPosition - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
		#else
			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
		#endif
	#else
		vec3 reflectVec = vReflect;
	#endif
	#ifdef ENVMAP_TYPE_CUBE
		vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
	#elif defined( ENVMAP_TYPE_CUBE_UV )
		vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );
	#else
		vec4 envColor = vec4( 0.0 );
	#endif
	#ifdef ENVMAP_BLENDING_MULTIPLY
		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_MIX )
		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_ADD )
		outgoingLight += envColor.xyz * specularStrength * reflectivity;
	#endif
#endif`,Kfr=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,Zfr=`#ifdef USE_ENVMAP
	uniform float reflectivity;
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		varying vec3 vWorldPosition;
		uniform float refractionRatio;
	#else
		varying vec3 vReflect;
	#endif
#endif`,Jfr=`#ifdef USE_ENVMAP
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		
		varying vec3 vWorldPosition;
	#else
		varying vec3 vReflect;
		uniform float refractionRatio;
	#endif
#endif`,Qfr=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vWorldPosition = worldPosition.xyz;
	#else
		vec3 cameraToVertex;
		if ( isOrthographic ) {
			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vReflect = reflect( cameraToVertex, worldNormal );
		#else
			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
		#endif
	#endif
#endif`,tpr=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,epr=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,rpr=`#ifdef USE_FOG
	#ifdef FOG_EXP2
		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
	#else
		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
	#endif
	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,npr=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,ipr=`#ifdef USE_GRADIENTMAP
	uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
	float dotNL = dot( normal, lightDirection );
	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
	#ifdef USE_GRADIENTMAP
		return vec3( texture2D( gradientMap, coord ).r );
	#else
		return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
	#endif
}`,opr=`#ifdef USE_LIGHTMAP
	vec4 lightMapTexel = texture2D( lightMap, vUv2 );
	vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
	#ifndef PHYSICALLY_CORRECT_LIGHTS
		lightMapIrradiance *= PI;
	#endif
	reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,apr=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,spr=`vec3 diffuse = vec3( 1.0 );
GeometricContext geometry;
geometry.position = mvPosition.xyz;
geometry.normal = normalize( transformedNormal );
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );
GeometricContext backGeometry;
backGeometry.position = geometry.position;
backGeometry.normal = -geometry.normal;
backGeometry.viewDir = geometry.viewDir;
vLightFront = vec3( 0.0 );
vIndirectFront = vec3( 0.0 );
#ifdef DOUBLE_SIDED
	vLightBack = vec3( 0.0 );
	vIndirectBack = vec3( 0.0 );
#endif
IncidentLight directLight;
float dotNL;
vec3 directLightColor_Diffuse;
vIndirectFront += getAmbientLightIrradiance( ambientLightColor );
vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );
#ifdef DOUBLE_SIDED
	vIndirectBack += getAmbientLightIrradiance( ambientLightColor );
	vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );
#endif
#if NUM_POINT_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		getPointLightInfo( pointLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		getSpotLightInfo( spotLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_DIR_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		getDirectionalLightInfo( directionalLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_HEMI_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
		vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );
		#ifdef DOUBLE_SIDED
			vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );
		#endif
	}
	#pragma unroll_loop_end
#endif`,lpr=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
uniform vec3 lightProbe[ 9 ];
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
	float x = normal.x, y = normal.y, z = normal.z;
	vec3 result = shCoefficients[ 0 ] * 0.886227;
	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
	return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
	return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
	vec3 irradiance = ambientLightColor;
	return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
	#if defined ( PHYSICALLY_CORRECT_LIGHTS )
		float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
		if ( cutoffDistance > 0.0 ) {
			distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
		}
		return distanceFalloff;
	#else
		if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
			return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );
		}
		return 1.0;
	#endif
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
	return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
	struct DirectionalLight {
		vec3 direction;
		vec3 color;
	};
	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
	void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {
		light.color = directionalLight.color;
		light.direction = directionalLight.direction;
		light.visible = true;
	}
#endif
#if NUM_POINT_LIGHTS > 0
	struct PointLight {
		vec3 position;
		vec3 color;
		float distance;
		float decay;
	};
	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
	void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {
		vec3 lVector = pointLight.position - geometry.position;
		light.direction = normalize( lVector );
		float lightDistance = length( lVector );
		light.color = pointLight.color;
		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
		light.visible = ( light.color != vec3( 0.0 ) );
	}
#endif
#if NUM_SPOT_LIGHTS > 0
	struct SpotLight {
		vec3 position;
		vec3 direction;
		vec3 color;
		float distance;
		float decay;
		float coneCos;
		float penumbraCos;
	};
	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
	void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {
		vec3 lVector = spotLight.position - geometry.position;
		light.direction = normalize( lVector );
		float angleCos = dot( light.direction, spotLight.direction );
		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
		if ( spotAttenuation > 0.0 ) {
			float lightDistance = length( lVector );
			light.color = spotLight.color * spotAttenuation;
			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
			light.visible = ( light.color != vec3( 0.0 ) );
		} else {
			light.color = vec3( 0.0 );
			light.visible = false;
		}
	}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
	struct RectAreaLight {
		vec3 color;
		vec3 position;
		vec3 halfWidth;
		vec3 halfHeight;
	};
	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
	struct HemisphereLight {
		vec3 direction;
		vec3 skyColor;
		vec3 groundColor;
	};
	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
		float dotNL = dot( normal, hemiLight.direction );
		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
		return irradiance;
	}
#endif`,cpr=`#if defined( USE_ENVMAP )
	#ifdef ENVMAP_MODE_REFRACTION
		uniform float refractionRatio;
	#endif
	vec3 getIBLIrradiance( const in vec3 normal ) {
		#if defined( ENVMAP_TYPE_CUBE_UV )
			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
			return PI * envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
		#if defined( ENVMAP_TYPE_CUBE_UV )
			vec3 reflectVec;
			#ifdef ENVMAP_MODE_REFLECTION
				reflectVec = reflect( - viewDir, normal );
				reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
			#else
				reflectVec = refract( - viewDir, normal, refractionRatio );
			#endif
			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
			return envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
#endif`,upr=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,hpr=`varying vec3 vViewPosition;
struct ToonMaterial {
	vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Toon
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon
#define Material_LightProbeLOD( material )	(0)`,fpr=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,ppr=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
	vec3 diffuseColor;
	vec3 specularColor;
	float specularShininess;
	float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_BlinnPhong
#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong
#define Material_LightProbeLOD( material )	(0)`,dpr=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
	#ifdef SPECULAR
		float specularIntensityFactor = specularIntensity;
		vec3 specularColorFactor = specularColor;
		#ifdef USE_SPECULARINTENSITYMAP
			specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;
		#endif
		#ifdef USE_SPECULARCOLORMAP
			specularColorFactor *= texture2D( specularColorMap, vUv ).rgb;
		#endif
		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
	#else
		float specularIntensityFactor = 1.0;
		vec3 specularColorFactor = vec3( 1.0 );
		material.specularF90 = 1.0;
	#endif
	material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
	material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
	material.clearcoat = clearcoat;
	material.clearcoatRoughness = clearcoatRoughness;
	material.clearcoatF0 = vec3( 0.04 );
	material.clearcoatF90 = 1.0;
	#ifdef USE_CLEARCOATMAP
		material.clearcoat *= texture2D( clearcoatMap, vUv ).x;
	#endif
	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;
	#endif
	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
	material.clearcoatRoughness += geometryRoughness;
	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_SHEEN
	material.sheenColor = sheenColor;
	#ifdef USE_SHEENCOLORMAP
		material.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;
	#endif
	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
	#ifdef USE_SHEENROUGHNESSMAP
		material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;
	#endif
#endif`,mpr=`struct PhysicalMaterial {
	vec3 diffuseColor;
	float roughness;
	vec3 specularColor;
	float specularF90;
	#ifdef USE_CLEARCOAT
		float clearcoat;
		float clearcoatRoughness;
		vec3 clearcoatF0;
		float clearcoatF90;
	#endif
	#ifdef USE_SHEEN
		vec3 sheenColor;
		float sheenRoughness;
	#endif
};
vec3 clearcoatSpecular = vec3( 0.0 );
vec3 sheenSpecular = vec3( 0.0 );
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {
	float dotNV = saturate( dot( normal, viewDir ) );
	float r2 = roughness * roughness;
	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
	return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
	vec4 r = roughness * c0 + c1;
	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
	return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	return specularColor * fab.x + specularF90 * fab.y;
}
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	vec3 FssEss = specularColor * fab.x + specularF90 * fab.y;
	float Ess = fab.x + fab.y;
	float Ems = 1.0 - Ess;
	vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
	singleScatter += FssEss;
	multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
		vec3 normal = geometry.normal;
		vec3 viewDir = geometry.viewDir;
		vec3 position = geometry.position;
		vec3 lightPos = rectAreaLight.position;
		vec3 halfWidth = rectAreaLight.halfWidth;
		vec3 halfHeight = rectAreaLight.halfHeight;
		vec3 lightColor = rectAreaLight.color;
		float roughness = material.roughness;
		vec3 rectCoords[ 4 ];
		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
		vec2 uv = LTC_Uv( normal, viewDir, roughness );
		vec4 t1 = texture2D( ltc_1, uv );
		vec4 t2 = texture2D( ltc_2, uv );
		mat3 mInv = mat3(
			vec3( t1.x, 0, t1.y ),
			vec3(    0, 1,    0 ),
			vec3( t1.z, 0, t1.w )
		);
		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
	}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	#ifdef USE_CLEARCOAT
		float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );
		vec3 ccIrradiance = dotNLcc * directLight.color;
		clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );
	#endif
	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void 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) {
	#ifdef USE_CLEARCOAT
		clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );
	#endif
	vec3 singleScattering = vec3( 0.0 );
	vec3 multiScattering = vec3( 0.0 );
	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
	computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
	vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
	reflectedLight.indirectSpecular += radiance * singleScattering;
	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct				RE_Direct_Physical
#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,gpr=`
GeometricContext geometry;
geometry.position = - vViewPosition;
geometry.normal = normal;
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
#ifdef USE_CLEARCOAT
	geometry.clearcoatNormal = clearcoatNormal;
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
	PointLight pointLight;
	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		pointLight = pointLights[ i ];
		getPointLightInfo( pointLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
		pointLightShadow = pointLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
	SpotLight spotLight;
	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		spotLight = spotLights[ i ];
		getSpotLightInfo( spotLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		spotLightShadow = spotLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
	DirectionalLight directionalLight;
	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		directionalLight = directionalLights[ i ];
		getDirectionalLightInfo( directionalLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
		directionalLightShadow = directionalLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
	RectAreaLight rectAreaLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
		rectAreaLight = rectAreaLights[ i ];
		RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
	vec3 iblIrradiance = vec3( 0.0 );
	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
	irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
	#if ( NUM_HEMI_LIGHTS > 0 )
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );
		}
		#pragma unroll_loop_end
	#endif
#endif
#if defined( RE_IndirectSpecular )
	vec3 radiance = vec3( 0.0 );
	vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,_pr=`#if defined( RE_IndirectDiffuse )
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vUv2 );
		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
		#ifndef PHYSICALLY_CORRECT_LIGHTS
			lightMapIrradiance *= PI;
		#endif
		irradiance += lightMapIrradiance;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
		iblIrradiance += getIBLIrradiance( geometry.normal );
	#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
	radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );
	#ifdef USE_CLEARCOAT
		clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );
	#endif
#endif`,ypr=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif`,vpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,xpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,bpr=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		varying float vFragDepth;
		varying float vIsPerspective;
	#else
		uniform float logDepthBufFC;
	#endif
#endif`,wpr=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		vFragDepth = 1.0 + gl_Position.w;
		vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
	#else
		if ( isPerspectiveMatrix( projectionMatrix ) ) {
			gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
			gl_Position.z *= gl_Position.w;
		}
	#endif
#endif`,Spr=`#ifdef USE_MAP
	vec4 sampledDiffuseColor = texture2D( map, vUv );
	#ifdef DECODE_VIDEO_TEXTURE
		sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
	#endif
	diffuseColor *= sampledDiffuseColor;
#endif`,Mpr=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,Epr=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#ifdef USE_MAP
	diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,Tpr=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	uniform mat3 uvTransform;
#endif
#ifdef USE_MAP
	uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,Cpr=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vUv );
	metalnessFactor *= texelMetalness.b;
#endif`,Apr=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,Ppr=`#ifdef USE_MORPHNORMALS
	objectNormal *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];
		}
	#else
		objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
		objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
		objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
		objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
	#endif
#endif`,Ipr=`#ifdef USE_MORPHTARGETS
	uniform float morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
		uniform sampler2DArray morphTargetsTexture;
		uniform vec2 morphTargetsTextureSize;
		vec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {
			float texelIndex = float( vertexIndex * stride + offset );
			float y = floor( texelIndex / morphTargetsTextureSize.x );
			float x = texelIndex - y * morphTargetsTextureSize.x;
			vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );
			return texture( morphTargetsTexture, morphUV ).xyz;
		}
	#else
		#ifndef USE_MORPHNORMALS
			uniform float morphTargetInfluences[ 8 ];
		#else
			uniform float morphTargetInfluences[ 4 ];
		#endif
	#endif
#endif`,Lpr=`#ifdef USE_MORPHTARGETS
	transformed *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			#ifndef USE_MORPHNORMALS
				if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];
			#else
				if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];
			#endif
		}
	#else
		transformed += morphTarget0 * morphTargetInfluences[ 0 ];
		transformed += morphTarget1 * morphTargetInfluences[ 1 ];
		transformed += morphTarget2 * morphTargetInfluences[ 2 ];
		transformed += morphTarget3 * morphTargetInfluences[ 3 ];
		#ifndef USE_MORPHNORMALS
			transformed += morphTarget4 * morphTargetInfluences[ 4 ];
			transformed += morphTarget5 * morphTargetInfluences[ 5 ];
			transformed += morphTarget6 * morphTargetInfluences[ 6 ];
			transformed += morphTarget7 * morphTargetInfluences[ 7 ];
		#endif
	#endif
#endif`,kpr=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
	vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );
	vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );
	vec3 normal = normalize( cross( fdx, fdy ) );
#else
	vec3 normal = normalize( vNormal );
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	#ifdef USE_TANGENT
		vec3 tangent = normalize( vTangent );
		vec3 bitangent = normalize( vBitangent );
		#ifdef DOUBLE_SIDED
			tangent = tangent * faceDirection;
			bitangent = bitangent * faceDirection;
		#endif
		#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )
			mat3 vTBN = mat3( tangent, bitangent, normal );
		#endif
	#endif
#endif
vec3 geometryNormal = normal;`,Rpr=`#ifdef OBJECTSPACE_NORMALMAP
	normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
	#ifdef FLIP_SIDED
		normal = - normal;
	#endif
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	normal = normalize( normalMatrix * normal );
#elif defined( TANGENTSPACE_NORMALMAP )
	vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
	mapN.xy *= normalScale;
	#ifdef USE_TANGENT
		normal = normalize( vTBN * mapN );
	#else
		normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );
	#endif
#elif defined( USE_BUMPMAP )
	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,Npr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Dpr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Opr=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,zpr=`#ifdef USE_NORMALMAP
	uniform sampler2D normalMap;
	uniform vec2 normalScale;
#endif
#ifdef OBJECTSPACE_NORMALMAP
	uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )
	vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {
		vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );
		vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );
		vec2 st0 = dFdx( vUv.st );
		vec2 st1 = dFdy( vUv.st );
		vec3 N = surf_norm;
		vec3 q1perp = cross( q1, N );
		vec3 q0perp = cross( N, q0 );
		vec3 T = q1perp * st0.x + q0perp * st1.x;
		vec3 B = q1perp * st0.y + q0perp * st1.y;
		float det = max( dot( T, T ), dot( B, B ) );
		float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );
		return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );
	}
#endif`,Fpr=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = geometryNormal;
#endif`,Bpr=`#ifdef USE_CLEARCOAT_NORMALMAP
	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
	clearcoatMapN.xy *= clearcoatNormalScale;
	#ifdef USE_TANGENT
		clearcoatNormal = normalize( vTBN * clearcoatMapN );
	#else
		clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );
	#endif
#endif`,Hpr=`#ifdef USE_CLEARCOATMAP
	uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform sampler2D clearcoatRoughnessMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform sampler2D clearcoatNormalMap;
	uniform vec2 clearcoatNormalScale;
#endif`,Vpr=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= transmissionAlpha + 0.1;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Upr=`vec3 packNormalToRGB( const in vec3 normal ) {
	return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
	return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
	vec4 r = vec4( fract( v * PackFactors ), v );
	r.yzw -= r.xyz * ShiftRight8;	return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
	return dot( v, UnpackFactors );
}
vec4 pack2HalfToRGBA( vec2 v ) {
	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( vec4 v ) {
	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
	return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
	return linearClipZ * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
	return ( near * far ) / ( ( far - near ) * invClipZ - far );
}`,qpr=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,Gpr=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,Wpr=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,Ypr=`#ifdef DITHERING
	vec3 dithering( vec3 color ) {
		float grid_position = rand( gl_FragCoord.xy );
		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
		return color + dither_shift_RGB;
	}
#endif`,jpr=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vUv );
	roughnessFactor *= texelRoughness.g;
#endif`,Xpr=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,$pr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
		varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
	}
	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
		return unpackRGBATo2Half( texture2D( shadow, uv ) );
	}
	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
		float occlusion = 1.0;
		vec2 distribution = texture2DDistribution( shadow, uv );
		float hard_shadow = step( compare , distribution.x );
		if (hard_shadow != 1.0 ) {
			float distance = compare - distribution.x ;
			float variance = max( 0.00000, distribution.y * distribution.y );
			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
		}
		return occlusion;
	}
	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
		float shadow = 1.0;
		shadowCoord.xyz /= shadowCoord.w;
		shadowCoord.z += shadowBias;
		bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
		bool inFrustum = all( inFrustumVec );
		bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
		bool frustumTest = all( frustumTestVec );
		if ( frustumTest ) {
		#if defined( SHADOWMAP_TYPE_PCF )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx0 = - texelSize.x * shadowRadius;
			float dy0 = - texelSize.y * shadowRadius;
			float dx1 = + texelSize.x * shadowRadius;
			float dy1 = + texelSize.y * shadowRadius;
			float dx2 = dx0 / 2.0;
			float dy2 = dy0 / 2.0;
			float dx3 = dx1 / 2.0;
			float dy3 = dy1 / 2.0;
			shadow = (
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
			) * ( 1.0 / 17.0 );
		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx = texelSize.x;
			float dy = texelSize.y;
			vec2 uv = shadowCoord.xy;
			vec2 f = fract( uv * shadowMapSize + 0.5 );
			uv -= f * texelSize;
			shadow = (
				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
						  f.x ),
					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
						  f.x ),
					 f.y )
			) * ( 1.0 / 9.0 );
		#elif defined( SHADOWMAP_TYPE_VSM )
			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
		#else
			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
		#endif
		}
		return shadow;
	}
	vec2 cubeToUV( vec3 v, float texelSizeY ) {
		vec3 absV = abs( v );
		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
		absV *= scaleToCube;
		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
		vec2 planar = v.xy;
		float almostATexel = 1.5 * texelSizeY;
		float almostOne = 1.0 - almostATexel;
		if ( absV.z >= almostOne ) {
			if ( v.z > 0.0 )
				planar.x = 4.0 - v.x;
		} else if ( absV.x >= almostOne ) {
			float signX = sign( v.x );
			planar.x = v.z * signX + 2.0 * signX;
		} else if ( absV.y >= almostOne ) {
			float signY = sign( v.y );
			planar.x = v.x + 2.0 * signY + 2.0;
			planar.y = v.z * signY - 2.0;
		}
		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
	}
	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
		vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
		vec3 lightToPosition = shadowCoord.xyz;
		float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );		dp += shadowBias;
		vec3 bd3D = normalize( lightToPosition );
		#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
			vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
			return (
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
			) * ( 1.0 / 9.0 );
		#else
			return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
		#endif
	}
#endif`,Kpr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];
		varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
#endif`,Zpr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0
		vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		vec4 shadowWorldPosition;
	#endif
	#if NUM_DIR_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
		vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );
		vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
		vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
#endif`,Jpr=`float getShadowMask() {
	float shadow = 1.0;
	#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		directionalLight = directionalLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		spotLight = spotLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		pointLight = pointLightShadows[ i ];
		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#endif
	return shadow;
}`,Qpr=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,tdr=`#ifdef USE_SKINNING
	uniform mat4 bindMatrix;
	uniform mat4 bindMatrixInverse;
	#ifdef BONE_TEXTURE
		uniform highp sampler2D boneTexture;
		uniform int boneTextureSize;
		mat4 getBoneMatrix( const in float i ) {
			float j = i * 4.0;
			float x = mod( j, float( boneTextureSize ) );
			float y = floor( j / float( boneTextureSize ) );
			float dx = 1.0 / float( boneTextureSize );
			float dy = 1.0 / float( boneTextureSize );
			y = dy * ( y + 0.5 );
			vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
			vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
			vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
			vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
			mat4 bone = mat4( v1, v2, v3, v4 );
			return bone;
		}
	#else
		uniform mat4 boneMatrices[ MAX_BONES ];
		mat4 getBoneMatrix( const in float i ) {
			mat4 bone = boneMatrices[ int(i) ];
			return bone;
		}
	#endif
#endif`,edr=`#ifdef USE_SKINNING
	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
	vec4 skinned = vec4( 0.0 );
	skinned += boneMatX * skinVertex * skinWeight.x;
	skinned += boneMatY * skinVertex * skinWeight.y;
	skinned += boneMatZ * skinVertex * skinWeight.z;
	skinned += boneMatW * skinVertex * skinWeight.w;
	transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,rdr=`#ifdef USE_SKINNING
	mat4 skinMatrix = mat4( 0.0 );
	skinMatrix += skinWeight.x * boneMatX;
	skinMatrix += skinWeight.y * boneMatY;
	skinMatrix += skinWeight.z * boneMatZ;
	skinMatrix += skinWeight.w * boneMatW;
	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
	#ifdef USE_TANGENT
		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#endif
#endif`,ndr=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,idr=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,odr=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,adr=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
	return toneMappingExposure * color;
}
vec3 ReinhardToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	color = max( vec3( 0.0 ), color - 0.004 );
	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
	return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
	const mat3 ACESInputMat = mat3(
		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
		vec3( 0.04823, 0.01566, 0.83777 )
	);
	const mat3 ACESOutputMat = mat3(
		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
		vec3( -0.07367, -0.00605,  1.07602 )
	);
	color *= toneMappingExposure / 0.6;
	color = ACESInputMat * color;
	color = RRTAndODTFit( color );
	color = ACESOutputMat * color;
	return saturate( color );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,sdr=`#ifdef USE_TRANSMISSION
	float transmissionAlpha = 1.0;
	float transmissionFactor = transmission;
	float thicknessFactor = thickness;
	#ifdef USE_TRANSMISSIONMAP
		transmissionFactor *= texture2D( transmissionMap, vUv ).r;
	#endif
	#ifdef USE_THICKNESSMAP
		thicknessFactor *= texture2D( thicknessMap, vUv ).g;
	#endif
	vec3 pos = vWorldPosition;
	vec3 v = normalize( cameraPosition - pos );
	vec3 n = inverseTransformDirection( normal, viewMatrix );
	vec4 transmission = getIBLVolumeRefraction(
		n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,
		pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
		attenuationColor, attenuationDistance );
	totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );
	transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );
#endif`,ldr=`#ifdef USE_TRANSMISSION
	uniform float transmission;
	uniform float thickness;
	uniform float attenuationDistance;
	uniform vec3 attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		uniform sampler2D transmissionMap;
	#endif
	#ifdef USE_THICKNESSMAP
		uniform sampler2D thicknessMap;
	#endif
	uniform vec2 transmissionSamplerSize;
	uniform sampler2D transmissionSamplerMap;
	uniform mat4 modelMatrix;
	uniform mat4 projectionMatrix;
	varying vec3 vWorldPosition;
	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
		vec3 modelScale;
		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
		return normalize( refractionVector ) * thickness * modelScale;
	}
	float applyIorToRoughness( const in float roughness, const in float ior ) {
		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
	}
	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
		float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
		#ifdef TEXTURE_LOD_EXT
			return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );
		#else
			return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );
		#endif
	}
	vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
		if ( attenuationDistance == 0.0 ) {
			return radiance;
		} else {
			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance * radiance;
		}
	}
	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
		const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
		const in vec3 attenuationColor, const in float attenuationDistance ) {
		vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
		vec3 refractedRayExit = position + transmissionRay;
		vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
		vec2 refractionCoords = ndcPos.xy / ndcPos.w;
		refractionCoords += 1.0;
		refractionCoords /= 2.0;
		vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
		vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );
		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
		return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );
	}
#endif`,cdr=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
	varying vec2 vUv;
#endif`,udr=`#ifdef USE_UV
	#ifdef UVS_VERTEX_ONLY
		vec2 vUv;
	#else
		varying vec2 vUv;
	#endif
	uniform mat3 uvTransform;
#endif`,hdr=`#ifdef USE_UV
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif`,fdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	varying vec2 vUv2;
#endif`,pdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	attribute vec2 uv2;
	varying vec2 vUv2;
	uniform mat3 uv2Transform;
#endif`,ddr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
#endif`,mdr=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )
	vec4 worldPosition = vec4( transformed, 1.0 );
	#ifdef USE_INSTANCING
		worldPosition = instanceMatrix * worldPosition;
	#endif
	worldPosition = modelMatrix * worldPosition;
#endif`,gdr=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,_dr=`uniform sampler2D t2D;
varying vec2 vUv;
void main() {
	gl_FragColor = texture2D( t2D, vUv );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,ydr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,vdr=`#include <envmap_common_pars_fragment>
uniform float opacity;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
	vec3 vReflect = vWorldDirection;
	#include <envmap_fragment>
	gl_FragColor = envColor;
	gl_FragColor.a *= opacity;
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,xdr=`#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
	#include <uv_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vHighPrecisionZW = gl_Position.zw;
}`,bdr=`#if DEPTH_PACKING == 3200
	uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#if DEPTH_PACKING == 3200
		diffuseColor.a = opacity;
	#endif
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <logdepthbuf_fragment>
	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
	#if DEPTH_PACKING == 3200
		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
	#elif DEPTH_PACKING == 3201
		gl_FragColor = packDepthToRGBA( fragCoordZ );
	#endif
}`,wdr=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <clipping_planes_vertex>
	vWorldPosition = worldPosition.xyz;
}`,Sdr=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	float dist = length( vWorldPosition - referencePosition );
	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
	dist = saturate( dist );
	gl_FragColor = packDepthToRGBA( dist );
}`,Mdr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,Edr=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
	vec3 direction = normalize( vWorldDirection );
	vec2 sampleUV = equirectUv( direction );
	gl_FragColor = texture2D( tEquirect, sampleUV );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,Tdr=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	vLineDistance = scale * lineDistance;
	#include <color_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,Cdr=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	if ( mod( vLineDistance, totalSize ) > dashSize ) {
		discard;
	}
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <color_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,Adr=`#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinbase_vertex>
		#include <skinnormal_vertex>
		#include <defaultnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <fog_vertex>
}`,Pdr=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
	varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel= texture2D( lightMap, vUv2 );
		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;
	#else
		reflectedLight.indirectDiffuse += vec3( 1.0 );
	#endif
	#include <aomap_fragment>
	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
	vec3 outgoingLight = reflectedLight.indirectDiffuse;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Idr=`#define LAMBERT
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
	varying vec3 vLightBack;
	varying vec3 vIndirectBack;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <bsdfs>
#include <lights_pars_begin>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <lights_lambert_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Ldr=`uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
	varying vec3 vLightBack;
	varying vec3 vIndirectBack;
#endif
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <fog_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	#include <emissivemap_fragment>
	#ifdef DOUBLE_SIDED
		reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;
	#else
		reflectedLight.indirectDiffuse += vIndirectFront;
	#endif
	#include <lightmap_fragment>
	reflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );
	#ifdef DOUBLE_SIDED
		reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;
	#else
		reflectedLight.directDiffuse = vLightFront;
	#endif
	reflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,kdr=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
	vViewPosition = - mvPosition.xyz;
}`,Rdr=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	vec3 viewDir = normalize( vViewPosition );
	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
	vec3 y = cross( viewDir, x );
	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
	#ifdef USE_MATCAP
		vec4 matcapColor = texture2D( matcap, uv );
	#else
		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
	#endif
	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Ndr=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	varying vec3 vViewPosition;
#endif
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	vViewPosition = - mvPosition.xyz;
#endif
}`,Ddr=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
}`,Odr=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,zdr=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_phong_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Fdr=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
	varying vec3 vWorldPosition;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
#ifdef USE_TRANSMISSION
	vWorldPosition = worldPosition.xyz;
#endif
}`,Bdr=`#define STANDARD
#ifdef PHYSICAL
	#define IOR
	#define SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
	uniform float ior;
#endif
#ifdef SPECULAR
	uniform float specularIntensity;
	uniform vec3 specularColor;
	#ifdef USE_SPECULARINTENSITYMAP
		uniform sampler2D specularIntensityMap;
	#endif
	#ifdef USE_SPECULARCOLORMAP
		uniform sampler2D specularColorMap;
	#endif
#endif
#ifdef USE_CLEARCOAT
	uniform float clearcoat;
	uniform float clearcoatRoughness;
#endif
#ifdef USE_SHEEN
	uniform vec3 sheenColor;
	uniform float sheenRoughness;
	#ifdef USE_SHEENCOLORMAP
		uniform sampler2D sheenColorMap;
	#endif
	#ifdef USE_SHEENROUGHNESSMAP
		uniform sampler2D sheenRoughnessMap;
	#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <bsdfs>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <roughnessmap_fragment>
	#include <metalnessmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <clearcoat_normal_fragment_begin>
	#include <clearcoat_normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_physical_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
	#include <transmission_fragment>
	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
	#ifdef USE_SHEEN
		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;
	#endif
	#ifdef USE_CLEARCOAT
		float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );
		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
	#endif
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Hdr=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Vdr=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_toon_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Udr=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <color_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	gl_PointSize = size;
	#ifdef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
	#endif
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <fog_vertex>
}`,qdr=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_particle_fragment>
	#include <color_fragment>
	#include <alphatest_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,Gdr=`#include <common>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Wdr=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
}`,Ydr=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec2 scale;
	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
	#ifndef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) scale *= - mvPosition.z;
	#endif
	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
	vec2 rotatedPosition;
	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
	mvPosition.xy += rotatedPosition;
	gl_Position = projectionMatrix * mvPosition;
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,jdr=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
}`,hr={alphamap_fragment:wfr,alphamap_pars_fragment:Sfr,alphatest_fragment:Mfr,alphatest_pars_fragment:Efr,aomap_fragment:Tfr,aomap_pars_fragment:Cfr,begin_vertex:Afr,beginnormal_vertex:Pfr,bsdfs:Ifr,bumpmap_pars_fragment:Lfr,clipping_planes_fragment:kfr,clipping_planes_pars_fragment:Rfr,clipping_planes_pars_vertex:Nfr,clipping_planes_vertex:Dfr,color_fragment:Ofr,color_pars_fragment:zfr,color_pars_vertex:Ffr,color_vertex:Bfr,common:Hfr,cube_uv_reflection_fragment:Vfr,defaultnormal_vertex:Ufr,displacementmap_pars_vertex:qfr,displacementmap_vertex:Gfr,emissivemap_fragment:Wfr,emissivemap_pars_fragment:Yfr,encodings_fragment:jfr,encodings_pars_fragment:Xfr,envmap_fragment:$fr,envmap_common_pars_fragment:Kfr,envmap_pars_fragment:Zfr,envmap_pars_vertex:Jfr,envmap_physical_pars_fragment:cpr,envmap_vertex:Qfr,fog_vertex:tpr,fog_pars_vertex:epr,fog_fragment:rpr,fog_pars_fragment:npr,gradientmap_pars_fragment:ipr,lightmap_fragment:opr,lightmap_pars_fragment:apr,lights_lambert_vertex:spr,lights_pars_begin:lpr,lights_toon_fragment:upr,lights_toon_pars_fragment:hpr,lights_phong_fragment:fpr,lights_phong_pars_fragment:ppr,lights_physical_fragment:dpr,lights_physical_pars_fragment:mpr,lights_fragment_begin:gpr,lights_fragment_maps:_pr,lights_fragment_end:ypr,logdepthbuf_fragment:vpr,logdepthbuf_pars_fragment:xpr,logdepthbuf_pars_vertex:bpr,logdepthbuf_vertex:wpr,map_fragment:Spr,map_pars_fragment:Mpr,map_particle_fragment:Epr,map_particle_pars_fragment:Tpr,metalnessmap_fragment:Cpr,metalnessmap_pars_fragment:Apr,morphnormal_vertex:Ppr,morphtarget_pars_vertex:Ipr,morphtarget_vertex:Lpr,normal_fragment_begin:kpr,normal_fragment_maps:Rpr,normal_pars_fragment:Npr,normal_pars_vertex:Dpr,normal_vertex:Opr,normalmap_pars_fragment:zpr,clearcoat_normal_fragment_begin:Fpr,clearcoat_normal_fragment_maps:Bpr,clearcoat_pars_fragment:Hpr,output_fragment:Vpr,packing:Upr,premultiplied_alpha_fragment:qpr,project_vertex:Gpr,dithering_fragment:Wpr,dithering_pars_fragment:Ypr,roughnessmap_fragment:jpr,roughnessmap_pars_fragment:Xpr,shadowmap_pars_fragment:$pr,shadowmap_pars_vertex:Kpr,shadowmap_vertex:Zpr,shadowmask_pars_fragment:Jpr,skinbase_vertex:Qpr,skinning_pars_vertex:tdr,skinning_vertex:edr,skinnormal_vertex:rdr,specularmap_fragment:ndr,specularmap_pars_fragment:idr,tonemapping_fragment:odr,tonemapping_pars_fragment:adr,transmission_fragment:sdr,transmission_pars_fragment:ldr,uv_pars_fragment:cdr,uv_pars_vertex:udr,uv_vertex:hdr,uv2_pars_fragment:fdr,uv2_pars_vertex:pdr,uv2_vertex:ddr,worldpos_vertex:mdr,background_vert:gdr,background_frag:_dr,cube_vert:ydr,cube_frag:vdr,depth_vert:xdr,depth_frag:bdr,distanceRGBA_vert:wdr,distanceRGBA_frag:Sdr,equirect_vert:Mdr,equirect_frag:Edr,linedashed_vert:Tdr,linedashed_frag:Cdr,meshbasic_vert:Adr,meshbasic_frag:Pdr,meshlambert_vert:Idr,meshlambert_frag:Ldr,meshmatcap_vert:kdr,meshmatcap_frag:Rdr,meshnormal_vert:Ndr,meshnormal_frag:Ddr,meshphong_vert:Odr,meshphong_frag:zdr,meshphysical_vert:Fdr,meshphysical_frag:Bdr,meshtoon_vert:Hdr,meshtoon_frag:Vdr,points_vert:Udr,points_frag:qdr,shadow_vert:Gdr,shadow_frag:Wdr,sprite_vert:Ydr,sprite_frag:jdr},re={common:{diffuse:{value:new ne(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new ki},uv2Transform:{value:new ki},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},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 Lt(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 ne(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ne(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ki}},sprite:{diffuse:{value:new ne(16777215)},opacity:{value:1},center:{value:new Lt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ki}}},ah={basic:{uniforms:Ca([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.fog]),vertexShader:hr.meshbasic_vert,fragmentShader:hr.meshbasic_frag},lambert:{uniforms:Ca([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.fog,re.lights,{emissive:{value:new ne(0)}}]),vertexShader:hr.meshlambert_vert,fragmentShader:hr.meshlambert_frag},phong:{uniforms:Ca([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.fog,re.lights,{emissive:{value:new ne(0)},specular:{value:new ne(1118481)},shininess:{value:30}}]),vertexShader:hr.meshphong_vert,fragmentShader:hr.meshphong_frag},standard:{uniforms:Ca([re.common,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.roughnessmap,re.metalnessmap,re.fog,re.lights,{emissive:{value:new ne(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:hr.meshphysical_vert,fragmentShader:hr.meshphysical_frag},toon:{uniforms:Ca([re.common,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.gradientmap,re.fog,re.lights,{emissive:{value:new ne(0)}}]),vertexShader:hr.meshtoon_vert,fragmentShader:hr.meshtoon_frag},matcap:{uniforms:Ca([re.common,re.bumpmap,re.normalmap,re.displacementmap,re.fog,{matcap:{value:null}}]),vertexShader:hr.meshmatcap_vert,fragmentShader:hr.meshmatcap_frag},points:{uniforms:Ca([re.points,re.fog]),vertexShader:hr.points_vert,fragmentShader:hr.points_frag},dashed:{uniforms:Ca([re.common,re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hr.linedashed_vert,fragmentShader:hr.linedashed_frag},depth:{uniforms:Ca([re.common,re.displacementmap]),vertexShader:hr.depth_vert,fragmentShader:hr.depth_frag},normal:{uniforms:Ca([re.common,re.bumpmap,re.normalmap,re.displacementmap,{opacity:{value:1}}]),vertexShader:hr.meshnormal_vert,fragmentShader:hr.meshnormal_frag},sprite:{uniforms:Ca([re.sprite,re.fog]),vertexShader:hr.sprite_vert,fragmentShader:hr.sprite_frag},background:{uniforms:{uvTransform:{value:new ki},t2D:{value:null}},vertexShader:hr.background_vert,fragmentShader:hr.background_frag},cube:{uniforms:Ca([re.envmap,{opacity:{value:1}}]),vertexShader:hr.cube_vert,fragmentShader:hr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hr.equirect_vert,fragmentShader:hr.equirect_frag},distanceRGBA:{uniforms:Ca([re.common,re.displacementmap,{referencePosition:{value:new j},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hr.distanceRGBA_vert,fragmentShader:hr.distanceRGBA_frag},shadow:{uniforms:Ca([re.lights,re.fog,{color:{value:new ne(0)},opacity:{value:1}}]),vertexShader:hr.shadow_vert,fragmentShader:hr.shadow_frag}};ah.physical={uniforms:Ca([ah.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Lt(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new ne(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Lt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new ne(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new ne(1,1,1)},specularColorMap:{value:null}}]),vertexShader:hr.meshphysical_vert,fragmentShader:hr.meshphysical_frag};function Xdr(e,t,r,n,i,o){let a=new ne(0),s=i===!0?0:1,l,c,u=null,h=0,f=null;function p(g,_){let y=!1,x=_.isScene===!0?_.background:null;x&&x.isTexture&&(x=t.get(x));let b=e.xr,S=b.getSession&&b.getSession();S&&S.environmentBlendMode==="additive"&&(x=null),x===null?d(a,s):x&&x.isColor&&(d(x,1),y=!0),(e.autoClear||y)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),x&&(x.isCubeTexture||x.mapping===xM)?(c===void 0&&(c=new ti(new tp(1,1,1),new lh({name:"BackgroundCubeMaterial",uniforms:Z3(ah.cube.uniforms),vertexShader:ah.cube.vertexShader,fragmentShader:ah.cube.fragmentShader,side:Ii,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(C,P,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),c.material.uniforms.envMap.value=x,c.material.uniforms.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,(u!==x||h!==x.version||f!==e.toneMapping)&&(c.material.needsUpdate=!0,u=x,h=x.version,f=e.toneMapping),g.unshift(c,c.geometry,c.material,0,0,null)):x&&x.isTexture&&(l===void 0&&(l=new ti(new U0(2,2),new lh({name:"BackgroundMaterial",uniforms:Z3(ah.background.uniforms),vertexShader:ah.background.vertexShader,fragmentShader:ah.background.fragmentShader,side:L1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(l)),l.material.uniforms.t2D.value=x,x.matrixAutoUpdate===!0&&x.updateMatrix(),l.material.uniforms.uvTransform.value.copy(x.matrix),(u!==x||h!==x.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,u=x,h=x.version,f=e.toneMapping),g.unshift(l,l.geometry,l.material,0,0,null))}function d(g,_){r.buffers.color.setClear(g.r,g.g,g.b,_,o)}return{getClearColor:function(){return a},setClearColor:function(g,_=1){a.set(g),s=_,d(a,s)},getClearAlpha:function(){return s},setClearAlpha:function(g){s=g,d(a,s)},render:p}}function $dr(e,t,r,n){let i=e.getParameter(34921),o=n.isWebGL2?null:t.get("OES_vertex_array_object"),a=n.isWebGL2||o!==null,s={},l=g(null),c=l;function u(R,F,z,U,W){let Z=!1;if(a){let rt=d(U,z,F);c!==rt&&(c=rt,f(c.object)),Z=_(U,W),Z&&y(U,W)}else{let rt=F.wireframe===!0;(c.geometry!==U.id||c.program!==z.id||c.wireframe!==rt)&&(c.geometry=U.id,c.program=z.id,c.wireframe=rt,Z=!0)}R.isInstancedMesh===!0&&(Z=!0),W!==null&&r.update(W,34963),Z&&(k(R,F,z,U),W!==null&&e.bindBuffer(34963,r.get(W).buffer))}function h(){return n.isWebGL2?e.createVertexArray():o.createVertexArrayOES()}function f(R){return n.isWebGL2?e.bindVertexArray(R):o.bindVertexArrayOES(R)}function p(R){return n.isWebGL2?e.deleteVertexArray(R):o.deleteVertexArrayOES(R)}function d(R,F,z){let U=z.wireframe===!0,W=s[R.id];W===void 0&&(W={},s[R.id]=W);let Z=W[F.id];Z===void 0&&(Z={},W[F.id]=Z);let rt=Z[U];return rt===void 0&&(rt=g(h()),Z[U]=rt),rt}function g(R){let F=[],z=[],U=[];for(let W=0;W<i;W++)F[W]=0,z[W]=0,U[W]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:z,attributeDivisors:U,object:R,attributes:{},index:null}}function _(R,F){let z=c.attributes,U=R.attributes,W=0;for(let Z in U){let rt=z[Z],ot=U[Z];if(rt===void 0||rt.attribute!==ot||rt.data!==ot.data)return!0;W++}return c.attributesNum!==W||c.index!==F}function y(R,F){let z={},U=R.attributes,W=0;for(let Z in U){let rt=U[Z],ot={};ot.attribute=rt,rt.data&&(ot.data=rt.data),z[Z]=ot,W++}c.attributes=z,c.attributesNum=W,c.index=F}function x(){let R=c.newAttributes;for(let F=0,z=R.length;F<z;F++)R[F]=0}function b(R){S(R,0)}function S(R,F){let z=c.newAttributes,U=c.enabledAttributes,W=c.attributeDivisors;z[R]=1,U[R]===0&&(e.enableVertexAttribArray(R),U[R]=1),W[R]!==F&&((n.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](R,F),W[R]=F)}function C(){let R=c.newAttributes,F=c.enabledAttributes;for(let z=0,U=F.length;z<U;z++)F[z]!==R[z]&&(e.disableVertexAttribArray(z),F[z]=0)}function P(R,F,z,U,W,Z){n.isWebGL2===!0&&(z===5124||z===5125)?e.vertexAttribIPointer(R,F,z,W,Z):e.vertexAttribPointer(R,F,z,U,W,Z)}function k(R,F,z,U){if(n.isWebGL2===!1&&(R.isInstancedMesh||U.isInstancedBufferGeometry)&&t.get("ANGLE_instanced_arrays")===null)return;x();let W=U.attributes,Z=z.getAttributes(),rt=F.defaultAttributeValues;for(let ot in Z){let st=Z[ot];if(st.location>=0){let St=W[ot];if(St===void 0&&(ot==="instanceMatrix"&&R.instanceMatrix&&(St=R.instanceMatrix),ot==="instanceColor"&&R.instanceColor&&(St=R.instanceColor)),St!==void 0){let bt=St.normalized,Mt=St.itemSize,lt=r.get(St);if(lt===void 0)continue;let Kt=lt.buffer,_t=lt.type,ct=lt.bytesPerElement;if(St.isInterleavedBufferAttribute){let X=St.data,et=X.stride,dt=St.offset;if(X&&X.isInstancedInterleavedBuffer){for(let q=0;q<st.locationSize;q++)S(st.location+q,X.meshPerAttribute);R.isInstancedMesh!==!0&&U._maxInstanceCount===void 0&&(U._maxInstanceCount=X.meshPerAttribute*X.count)}else for(let q=0;q<st.locationSize;q++)b(st.location+q);e.bindBuffer(34962,Kt);for(let q=0;q<st.locationSize;q++)P(st.location+q,Mt/st.locationSize,_t,bt,et*ct,(dt+Mt/st.locationSize*q)*ct)}else{if(St.isInstancedBufferAttribute){for(let X=0;X<st.locationSize;X++)S(st.location+X,St.meshPerAttribute);R.isInstancedMesh!==!0&&U._maxInstanceCount===void 0&&(U._maxInstanceCount=St.meshPerAttribute*St.count)}else for(let X=0;X<st.locationSize;X++)b(st.location+X);e.bindBuffer(34962,Kt);for(let X=0;X<st.locationSize;X++)P(st.location+X,Mt/st.locationSize,_t,bt,Mt*ct,Mt/st.locationSize*X*ct)}}else if(rt!==void 0){let bt=rt[ot];if(bt!==void 0)switch(bt.length){case 2:e.vertexAttrib2fv(st.location,bt);break;case 3:e.vertexAttrib3fv(st.location,bt);break;case 4:e.vertexAttrib4fv(st.location,bt);break;default:e.vertexAttrib1fv(st.location,bt)}}}}C()}function O(){I();for(let R in s){let F=s[R];for(let z in F){let U=F[z];for(let W in U)p(U[W].object),delete U[W];delete F[z]}delete s[R]}}function D(R){if(s[R.id]===void 0)return;let F=s[R.id];for(let z in F){let U=F[z];for(let W in U)p(U[W].object),delete U[W];delete F[z]}delete s[R.id]}function B(R){for(let F in s){let z=s[F];if(z[R.id]===void 0)continue;let U=z[R.id];for(let W in U)p(U[W].object),delete U[W];delete z[R.id]}}function I(){L(),c!==l&&(c=l,f(c.object))}function L(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:u,reset:I,resetDefaultState:L,dispose:O,releaseStatesOfGeometry:D,releaseStatesOfProgram:B,initAttributes:x,enableAttribute:b,disableUnusedAttributes:C}}function Kdr(e,t,r,n){let i=n.isWebGL2,o;function a(c){o=c}function s(c,u){e.drawArrays(o,c,u),r.update(u,o,1)}function l(c,u,h){if(h===0)return;let f,p;if(i)f=e,p="drawArraysInstanced";else if(f=t.get("ANGLE_instanced_arrays"),p="drawArraysInstancedANGLE",f===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}f[p](o,c,u,h),r.update(u,o,h)}this.setMode=a,this.render=s,this.renderInstances=l}function Zdr(e,t,r){let n;function i(){if(n!==void 0)return n;if(t.has("EXT_texture_filter_anisotropic")===!0){let k=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(k.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function o(k){if(k==="highp"){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";k="mediump"}return k==="mediump"&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext!="undefined"&&e instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&e instanceof WebGL2ComputeRenderingContext,s=r.precision!==void 0?r.precision:"highp",l=o(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);let c=a||t.has("WEBGL_draw_buffers"),u=r.logarithmicDepthBuffer===!0,h=e.getParameter(34930),f=e.getParameter(35660),p=e.getParameter(3379),d=e.getParameter(34076),g=e.getParameter(34921),_=e.getParameter(36347),y=e.getParameter(36348),x=e.getParameter(36349),b=f>0,S=a||t.has("OES_texture_float"),C=b&&S,P=a?e.getParameter(36183):0;return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:s,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:f,maxTextureSize:p,maxCubemapSize:d,maxAttributes:g,maxVertexUniforms:_,maxVaryings:y,maxFragmentUniforms:x,vertexTextures:b,floatFragmentTextures:S,floatVertexTextures:C,maxSamples:P}}function Jdr(e){let t=this,r=null,n=0,i=!1,o=!1,a=new $c,s=new ki,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f,p){let d=h.length!==0||f||n!==0||i;return i=f,r=u(h,p,0),n=h.length,d},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(h,f,p){let d=h.clippingPlanes,g=h.clipIntersection,_=h.clipShadows,y=e.get(h);if(!i||d===null||d.length===0||o&&!_)o?u(null):c();else{let x=o?0:n,b=x*4,S=y.clippingState||null;l.value=S,S=u(d,f,b,p);for(let C=0;C!==b;++C)S[C]=r[C];y.clippingState=S,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==r&&(l.value=r,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(h,f,p,d){let g=h!==null?h.length:0,_=null;if(g!==0){if(_=l.value,d!==!0||_===null){let y=p+g*4,x=f.matrixWorldInverse;s.getNormalMatrix(x),(_===null||_.length<y)&&(_=new Float32Array(y));for(let b=0,S=p;b!==g;++b,S+=4)a.copy(h[b]).applyMatrix4(x,s),a.normal.toArray(_,S),_[S+3]=a.constant}l.value=_,l.needsUpdate=!0}return t.numPlanes=g,t.numIntersection=0,_}}function Qdr(e){let t=new WeakMap;function r(a,s){return s===YP?a.mapping=ix:s===jP&&(a.mapping=ox),a}function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let s=a.mapping;if(s===YP||s===jP)if(t.has(a)){let l=t.get(a).texture;return r(l,a.mapping)}else{let l=a.image;if(l&&l.height>0){let c=new Q3(l.height/2);return c.fromEquirectangularTexture(e,a),t.set(a,c),a.addEventListener("dispose",i),r(c.texture,a.mapping)}else return null}}return a}function i(a){let s=a.target;s.removeEventListener("dispose",i);let l=t.get(s);l!==void 0&&(t.delete(s),l.dispose())}function o(){t=new WeakMap}return{get:n,dispose:o}}var O1=class extends N1{constructor(t=-1,r=1,n=1,i=-1,o=.1,a=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=r,this.top=n,this.bottom=i,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(t,r){return super.copy(t,r),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,r,n,i,o,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=n-t,a=n+t,s=i+r,l=i-r;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,a=o+c*this.view.width,s-=u*this.view.offsetY,l=s-u*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let r=super.toJSON(t);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}};O1.prototype.isOrthographicCamera=!0;var q0=class extends lh{constructor(t){super(t),this.type="RawShaderMaterial"}};q0.prototype.isRawShaderMaterial=!0;var q3=4,B0=8,Kf=Math.pow(2,B0),qfe=[.125,.215,.35,.446,.526,.582],Gfe=B0-q3+1+qfe.length,k3=20,hut=new O1,{_lodPlanes:NP,_sizeLods:Pue,_sigmas:PV}=tmr(),Iue=new ne,fut=null,M1=(1+Math.sqrt(5))/2,R3=1/M1,Lue=[new j(1,1,1),new j(-1,1,1),new j(1,1,-1),new j(-1,1,-1),new j(0,M1,R3),new j(0,M1,-R3),new j(R3,0,M1),new j(-R3,0,M1),new j(M1,R3,0),new j(-M1,R3,0)],e6=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=emr(k3),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,r=0,n=.1,i=100){fut=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(t,n,i,o),r>0&&this._blur(o,0,0,r),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t,r=null){return this._fromTexture(t,r)}fromCubemap(t,r=null){return this._fromTexture(t,r)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=Nue(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Rue(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let t=0;t<NP.length;t++)NP[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(fut),t.scissorTest=!1,IV(t,0,0,t.width,t.height)}_fromTexture(t,r){fut=this._renderer.getRenderTarget();let n=r||this._allocateTargets(t);return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(t){let r={magFilter:ii,minFilter:ii,generateMipmaps:!1,type:A1,format:Qo,encoding:tm,depthBuffer:!1},n=kue(r);return n.depthBuffer=!t,this._pingPongRenderTarget===null&&(this._pingPongRenderTarget=kue(r)),n}_compileMaterial(t){let r=new ti(NP[0],t);this._renderer.compile(r,hut)}_sceneToCubeUV(t,r,n,i){let s=new Ui(90,1,r,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,f=u.toneMapping;u.getClearColor(Iue),u.toneMapping=Zd,u.autoClear=!1;let p=new sh({name:"PMREM.Background",side:Ii,depthWrite:!1,depthTest:!1}),d=new ti(new tp,p),g=!1,_=t.background;_?_.isColor&&(p.color.copy(_),t.background=null,g=!0):(p.color.copy(Iue),g=!0);for(let y=0;y<6;y++){let x=y%3;x===0?(s.up.set(0,l[y],0),s.lookAt(c[y],0,0)):x===1?(s.up.set(0,0,l[y]),s.lookAt(0,c[y],0)):(s.up.set(0,l[y],0),s.lookAt(0,0,c[y])),IV(i,x*Kf,y>2?Kf:0,Kf,Kf),u.setRenderTarget(i),g&&u.render(d,s),u.render(t,s)}d.geometry.dispose(),d.material.dispose(),u.toneMapping=f,u.autoClear=h,t.background=_}_textureToCubeUV(t,r){let n=this._renderer,i=t.mapping===ix||t.mapping===ox;i?(this._cubemapShader===null&&(this._cubemapShader=Nue()),this._cubemapShader.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=Rue());let o=i?this._cubemapShader:this._equirectShader,a=new ti(NP[0],o),s=o.uniforms;s.envMap.value=t,i||s.texelSize.value.set(1/t.image.width,1/t.image.height),IV(r,0,0,3*Kf,2*Kf),n.setRenderTarget(r),n.render(a,hut)}_applyPMREM(t){let r=this._renderer,n=r.autoClear;r.autoClear=!1;for(let i=1;i<Gfe;i++){let o=Math.sqrt(PV[i]*PV[i]-PV[i-1]*PV[i-1]),a=Lue[(i-1)%Lue.length];this._blur(t,i-1,i,o,a)}r.autoClear=n}_blur(t,r,n,i,o){let a=this._pingPongRenderTarget;this._halfBlur(t,a,r,n,i,"latitudinal",o),this._halfBlur(a,t,n,n,i,"longitudinal",o)}_halfBlur(t,r,n,i,o,a,s){let l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");let u=3,h=new ti(NP[i],c),f=c.uniforms,p=Pue[n]-1,d=isFinite(o)?Math.PI/(2*p):2*Math.PI/(2*k3-1),g=o/d,_=isFinite(o)?1+Math.floor(u*g):k3;_>k3&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${k3}`);let y=[],x=0;for(let P=0;P<k3;++P){let k=P/g,O=Math.exp(-k*k/2);y.push(O),P===0?x+=O:P<_&&(x+=2*O)}for(let P=0;P<y.length;P++)y[P]=y[P]/x;f.envMap.value=t.texture,f.samples.value=_,f.weights.value=y,f.latitudinal.value=a==="latitudinal",s&&(f.poleAxis.value=s),f.dTheta.value=d,f.mipInt.value=B0-n;let b=Pue[i],S=3*Math.max(0,Kf-2*b),C=(i===0?0:2*Kf)+2*b*(i>B0-q3?i-B0+q3:0);IV(r,S,C,3*b,2*b),l.setRenderTarget(r),l.render(h,hut)}};function tmr(){let e=[],t=[],r=[],n=B0;for(let i=0;i<Gfe;i++){let o=Math.pow(2,n);t.push(o);let a=1/o;i>B0-q3?a=qfe[i-B0+q3-1]:i===0&&(a=0),r.push(a);let s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,f=6,p=3,d=2,g=1,_=new Float32Array(p*f*h),y=new Float32Array(d*f*h),x=new Float32Array(g*f*h);for(let S=0;S<h;S++){let C=S%3*2/3-1,P=S>2?0:-1,k=[C,P,0,C+2/3,P,0,C+2/3,P+1,0,C,P,0,C+2/3,P+1,0,C,P+1,0];_.set(k,p*f*S),y.set(u,d*f*S);let O=[S,S,S,S,S,S];x.set(O,g*f*S)}let b=new Pe;b.setAttribute("position",new Je(_,p)),b.setAttribute("uv",new Je(y,d)),b.setAttribute("faceIndex",new Je(x,g)),e.push(b),n>q3&&n--}return{_lodPlanes:e,_sizeLods:t,_sigmas:r}}function kue(e){let t=new hs(3*Kf,3*Kf,e);return t.texture.mapping=xM,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function IV(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function emr(e){let t=new Float32Array(e),r=new j(0,1,0);return new q0({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:Kd,depthTest:!1,depthWrite:!1})}function Rue(){let e=new Lt(1,1);return new q0({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform vec2 texelSize;

			#include <common>

			void main() {

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				vec2 f = fract( uv / texelSize - 0.5 );
				uv -= f * texelSize;
				vec3 tl = texture2D ( envMap, uv ).rgb;
				uv.x += texelSize.x;
				vec3 tr = texture2D ( envMap, uv ).rgb;
				uv.y += texelSize.y;
				vec3 br = texture2D ( envMap, uv ).rgb;
				uv.x -= texelSize.x;
				vec3 bl = texture2D ( envMap, uv ).rgb;

				vec3 tm = mix( tl, tr, f.x );
				vec3 bm = mix( bl, br, f.x );
				gl_FragColor.rgb = mix( tm, bm, f.y );

			}
		`,blending:Kd,depthTest:!1,depthWrite:!1})}function Nue(){return new q0({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:Kd,depthTest:!1,depthWrite:!1})}function Nht(){return`

		precision mediump float;
		precision mediump int;

		attribute vec3 position;
		attribute vec2 uv;
		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function rmr(e){let t=new WeakMap,r=null;function n(s){if(s&&s.isTexture){let l=s.mapping,c=l===YP||l===jP,u=l===ix||l===ox;if(c||u)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let h=t.get(s);return r===null&&(r=new e6(e)),h=c?r.fromEquirectangular(s,h):r.fromCubemap(s,h),t.set(s,h),h.texture}else{if(t.has(s))return t.get(s).texture;{let h=s.image;if(c&&h&&h.height>0||u&&h&&i(h)){r===null&&(r=new e6(e));let f=c?r.fromEquirectangular(s):r.fromCubemap(s);return t.set(s,f),s.addEventListener("dispose",o),f.texture}else return null}}}return s}function i(s){let l=0,c=6;for(let u=0;u<c;u++)s[u]!==void 0&&l++;return l===c}function o(s){let l=s.target;l.removeEventListener("dispose",o);let c=t.get(l);c!==void 0&&(t.delete(l),c.dispose())}function a(){t=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:n,dispose:a}}function nmr(e){let t={};function r(n){if(t[n]!==void 0)return t[n];let i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(n){return r(n)!==null},init:function(n){n.isWebGL2?r("EXT_color_buffer_float"):(r("WEBGL_depth_texture"),r("OES_texture_float"),r("OES_texture_half_float"),r("OES_texture_half_float_linear"),r("OES_standard_derivatives"),r("OES_element_index_uint"),r("OES_vertex_array_object"),r("ANGLE_instanced_arrays")),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture")},get:function(n){let i=r(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function imr(e,t,r,n){let i={},o=new WeakMap;function a(h){let f=h.target;f.index!==null&&t.remove(f.index);for(let d in f.attributes)t.remove(f.attributes[d]);f.removeEventListener("dispose",a),delete i[f.id];let p=o.get(f);p&&(t.remove(p),o.delete(f)),n.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,r.memory.geometries--}function s(h,f){return i[f.id]===!0||(f.addEventListener("dispose",a),i[f.id]=!0,r.memory.geometries++),f}function l(h){let f=h.attributes;for(let d in f)t.update(f[d],34962);let p=h.morphAttributes;for(let d in p){let g=p[d];for(let _=0,y=g.length;_<y;_++)t.update(g[_],34962)}}function c(h){let f=[],p=h.index,d=h.attributes.position,g=0;if(p!==null){let x=p.array;g=p.version;for(let b=0,S=x.length;b<S;b+=3){let C=x[b+0],P=x[b+1],k=x[b+2];f.push(C,P,P,k,k,C)}}else{let x=d.array;g=d.version;for(let b=0,S=x.length/3-1;b<S;b+=3){let C=b+0,P=b+1,k=b+2;f.push(C,P,P,k,k,C)}}let _=new(Bfe(f)?K3:$3)(f,1);_.version=g;let y=o.get(h);y&&t.remove(y),o.set(h,_)}function u(h){let f=o.get(h);if(f){let p=h.index;p!==null&&f.version<p.version&&c(h)}else c(h);return o.get(h)}return{get:s,update:l,getWireframeAttribute:u}}function omr(e,t,r,n){let i=n.isWebGL2,o;function a(f){o=f}let s,l;function c(f){s=f.type,l=f.bytesPerElement}function u(f,p){e.drawElements(o,p,s,f*l),r.update(p,o,1)}function h(f,p,d){if(d===0)return;let g,_;if(i)g=e,_="drawElementsInstanced";else if(g=t.get("ANGLE_instanced_arrays"),_="drawElementsInstancedANGLE",g===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}g[_](o,p,s,f*l,d),r.update(p,o,d)}this.setMode=a,this.setIndex=c,this.render=u,this.renderInstances=h}function amr(e){let t={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function n(o,a,s){switch(r.calls++,a){case 4:r.triangles+=s*(o/3);break;case 1:r.lines+=s*(o/2);break;case 3:r.lines+=s*(o-1);break;case 2:r.lines+=s*o;break;case 0:r.points+=s*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a);break}}function i(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0}return{memory:t,render:r,programs:null,autoReset:!0,reset:i,update:n}}var tM=class extends vi{constructor(t=null,r=1,n=1,i=1){super(null),this.image={data:t,width:r,height:n,depth:i},this.magFilter=Li,this.minFilter=Li,this.wrapR=Jo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};tM.prototype.isDataTexture2DArray=!0;function smr(e,t){return e[0]-t[0]}function lmr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Due(e,t){let r=1,n=t.isInterleavedBufferAttribute?t.data.array:t.array;n instanceof Int8Array?r=127:n instanceof Int16Array?r=32767:n instanceof Int32Array?r=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",n),e.divideScalar(r)}function cmr(e,t,r){let n={},i=new Float32Array(8),o=new WeakMap,a=new j,s=[];for(let c=0;c<8;c++)s[c]=[c,0];function l(c,u,h,f){let p=c.morphTargetInfluences;if(t.isWebGL2===!0){let d=u.morphAttributes.position.length,g=o.get(u);if(g===void 0||g.count!==d){let L=function(){B.dispose(),o.delete(u),u.removeEventListener("dispose",L)};g!==void 0&&g.texture.dispose();let x=u.morphAttributes.normal!==void 0,b=u.morphAttributes.position,S=u.morphAttributes.normal||[],C=u.attributes.position.count,P=x===!0?2:1,k=C*P,O=1;k>t.maxTextureSize&&(O=Math.ceil(k/t.maxTextureSize),k=t.maxTextureSize);let D=new Float32Array(k*O*4*d),B=new tM(D,k,O,d);B.format=Qo,B.type=Xd,B.needsUpdate=!0;let I=P*4;for(let R=0;R<d;R++){let F=b[R],z=S[R],U=k*O*4*R;for(let W=0;W<F.count;W++){a.fromBufferAttribute(F,W),F.normalized===!0&&Due(a,F);let Z=W*I;D[U+Z+0]=a.x,D[U+Z+1]=a.y,D[U+Z+2]=a.z,D[U+Z+3]=0,x===!0&&(a.fromBufferAttribute(z,W),z.normalized===!0&&Due(a,z),D[U+Z+4]=a.x,D[U+Z+5]=a.y,D[U+Z+6]=a.z,D[U+Z+7]=0)}}g={count:d,texture:B,size:new Lt(k,O)},o.set(u,g),u.addEventListener("dispose",L)}let _=0;for(let x=0;x<p.length;x++)_+=p[x];let y=u.morphTargetsRelative?1:1-_;f.getUniforms().setValue(e,"morphTargetBaseInfluence",y),f.getUniforms().setValue(e,"morphTargetInfluences",p),f.getUniforms().setValue(e,"morphTargetsTexture",g.texture,r),f.getUniforms().setValue(e,"morphTargetsTextureSize",g.size)}else{let d=p===void 0?0:p.length,g=n[u.id];if(g===void 0||g.length!==d){g=[];for(let S=0;S<d;S++)g[S]=[S,0];n[u.id]=g}for(let S=0;S<d;S++){let C=g[S];C[0]=S,C[1]=p[S]}g.sort(lmr);for(let S=0;S<8;S++)S<d&&g[S][1]?(s[S][0]=g[S][0],s[S][1]=g[S][1]):(s[S][0]=Number.MAX_SAFE_INTEGER,s[S][1]=0);s.sort(smr);let _=u.morphAttributes.position,y=u.morphAttributes.normal,x=0;for(let S=0;S<8;S++){let C=s[S],P=C[0],k=C[1];P!==Number.MAX_SAFE_INTEGER&&k?(_&&u.getAttribute("morphTarget"+S)!==_[P]&&u.setAttribute("morphTarget"+S,_[P]),y&&u.getAttribute("morphNormal"+S)!==y[P]&&u.setAttribute("morphNormal"+S,y[P]),i[S]=k,x+=k):(_&&u.hasAttribute("morphTarget"+S)===!0&&u.deleteAttribute("morphTarget"+S),y&&u.hasAttribute("morphNormal"+S)===!0&&u.deleteAttribute("morphNormal"+S),i[S]=0)}let b=u.morphTargetsRelative?1:1-x;f.getUniforms().setValue(e,"morphTargetBaseInfluence",b),f.getUniforms().setValue(e,"morphTargetInfluences",i)}}return{update:l}}function umr(e,t,r,n){let i=new WeakMap;function o(l){let c=n.render.frame,u=l.geometry,h=t.get(l,u);return i.get(h)!==c&&(t.update(h),i.set(h,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",s)===!1&&l.addEventListener("dispose",s),r.update(l.instanceMatrix,34962),l.instanceColor!==null&&r.update(l.instanceColor,34962)),h}function a(){i=new WeakMap}function s(l){let c=l.target;c.removeEventListener("dispose",s),r.remove(c.instanceMatrix),c.instanceColor!==null&&r.remove(c.instanceColor)}return{update:o,dispose:a}}var r6=class extends vi{constructor(t=null,r=1,n=1,i=1){super(null),this.image={data:t,width:r,height:n,depth:i},this.magFilter=Li,this.minFilter=Li,this.wrapR=Jo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};r6.prototype.isDataTexture3D=!0;var Wfe=new vi,Yfe=new tM,jfe=new r6,Xfe=new V0,Oue=[],zue=[],Fue=new Float32Array(16),Bue=new Float32Array(9),Hue=new Float32Array(4);function bM(e,t,r){let n=e[0];if(n<=0||n>0)return e;let i=t*r,o=Oue[i];if(o===void 0&&(o=new Float32Array(i),Oue[i]=o),t!==0){n.toArray(o,0);for(let a=1,s=0;a!==t;++a)s+=r,e[a].toArray(o,s)}return o}function fs(e,t){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Aa(e,t){for(let r=0,n=t.length;r<n;r++)e[r]=t[r]}function KU(e,t){let r=zue[t];r===void 0&&(r=new Int32Array(t),zue[t]=r);for(let n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function hmr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function fmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(fs(r,t))return;e.uniform2fv(this.addr,t),Aa(r,t)}}function pmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(t.r!==void 0)(r[0]!==t.r||r[1]!==t.g||r[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(fs(r,t))return;e.uniform3fv(this.addr,t),Aa(r,t)}}function dmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(fs(r,t))return;e.uniform4fv(this.addr,t),Aa(r,t)}}function mmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(fs(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),Aa(r,t)}else{if(fs(r,n))return;Hue.set(n),e.uniformMatrix2fv(this.addr,!1,Hue),Aa(r,n)}}function gmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(fs(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),Aa(r,t)}else{if(fs(r,n))return;Bue.set(n),e.uniformMatrix3fv(this.addr,!1,Bue),Aa(r,n)}}function _mr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(fs(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),Aa(r,t)}else{if(fs(r,n))return;Fue.set(n),e.uniformMatrix4fv(this.addr,!1,Fue),Aa(r,n)}}function ymr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function vmr(e,t){let r=this.cache;fs(r,t)||(e.uniform2iv(this.addr,t),Aa(r,t))}function xmr(e,t){let r=this.cache;fs(r,t)||(e.uniform3iv(this.addr,t),Aa(r,t))}function bmr(e,t){let r=this.cache;fs(r,t)||(e.uniform4iv(this.addr,t),Aa(r,t))}function wmr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function Smr(e,t){let r=this.cache;fs(r,t)||(e.uniform2uiv(this.addr,t),Aa(r,t))}function Mmr(e,t){let r=this.cache;fs(r,t)||(e.uniform3uiv(this.addr,t),Aa(r,t))}function Emr(e,t){let r=this.cache;fs(r,t)||(e.uniform4uiv(this.addr,t),Aa(r,t))}function Tmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTexture2D(t||Wfe,i)}function Cmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||jfe,i)}function Amr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTextureCube(t||Xfe,i)}function Pmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||Yfe,i)}function Imr(e){switch(e){case 5126:return hmr;case 35664:return fmr;case 35665:return pmr;case 35666:return dmr;case 35674:return mmr;case 35675:return gmr;case 35676:return _mr;case 5124:case 35670:return ymr;case 35667:case 35671:return vmr;case 35668:case 35672:return xmr;case 35669:case 35673:return bmr;case 5125:return wmr;case 36294:return Smr;case 36295:return Mmr;case 36296:return Emr;case 35678:case 36198:case 36298:case 36306:case 35682:return Tmr;case 35679:case 36299:case 36307:return Cmr;case 35680:case 36300:case 36308:case 36293:return Amr;case 36289:case 36303:case 36311:case 36292:return Pmr}}function Lmr(e,t){e.uniform1fv(this.addr,t)}function kmr(e,t){let r=bM(t,this.size,2);e.uniform2fv(this.addr,r)}function Rmr(e,t){let r=bM(t,this.size,3);e.uniform3fv(this.addr,r)}function Nmr(e,t){let r=bM(t,this.size,4);e.uniform4fv(this.addr,r)}function Dmr(e,t){let r=bM(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function Omr(e,t){let r=bM(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function zmr(e,t){let r=bM(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function Fmr(e,t){e.uniform1iv(this.addr,t)}function Bmr(e,t){e.uniform2iv(this.addr,t)}function Hmr(e,t){e.uniform3iv(this.addr,t)}function Vmr(e,t){e.uniform4iv(this.addr,t)}function Umr(e,t){e.uniform1uiv(this.addr,t)}function qmr(e,t){e.uniform2uiv(this.addr,t)}function Gmr(e,t){e.uniform3uiv(this.addr,t)}function Wmr(e,t){e.uniform4uiv(this.addr,t)}function Ymr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTexture2D(t[o]||Wfe,i[o])}function jmr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture3D(t[o]||jfe,i[o])}function Xmr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTextureCube(t[o]||Xfe,i[o])}function $mr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture2DArray(t[o]||Yfe,i[o])}function Kmr(e){switch(e){case 5126:return Lmr;case 35664:return kmr;case 35665:return Rmr;case 35666:return Nmr;case 35674:return Dmr;case 35675:return Omr;case 35676:return zmr;case 5124:case 35670:return Fmr;case 35667:case 35671:return Bmr;case 35668:case 35672:return Hmr;case 35669:case 35673:return Vmr;case 5125:return Umr;case 36294:return qmr;case 36295:return Gmr;case 36296:return Wmr;case 35678:case 36198:case 36298:case 36306:case 35682:return Ymr;case 35679:case 36299:case 36307:return jmr;case 35680:case 36300:case 36308:case 36293:return Xmr;case 36289:case 36303:case 36311:case 36292:return $mr}}function Zmr(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=Imr(t.type)}function $fe(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=Kmr(t.type)}$fe.prototype.updateCache=function(e){let t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Aa(t,e)};function Kfe(e){this.id=e,this.seq=[],this.map={}}Kfe.prototype.setValue=function(e,t,r){let n=this.seq;for(let i=0,o=n.length;i!==o;++i){let a=n[i];a.setValue(e,t[a.id],r)}};var put=/(\w+)(\])?(\[|\.)?/g;function Vue(e,t){e.seq.push(t),e.map[t.id]=t}function Jmr(e,t,r){let n=e.name,i=n.length;for(put.lastIndex=0;;){let o=put.exec(n),a=put.lastIndex,s=o[1],l=o[2]==="]",c=o[3];if(l&&(s=s|0),c===void 0||c==="["&&a+2===i){Vue(r,c===void 0?new Zmr(s,e,t):new $fe(s,e,t));break}else{let h=r.map[s];h===void 0&&(h=new Kfe(s),Vue(r,h)),r=h}}}function H0(e,t){this.seq=[],this.map={};let r=e.getProgramParameter(t,35718);for(let n=0;n<r;++n){let i=e.getActiveUniform(t,n),o=e.getUniformLocation(t,i.name);Jmr(i,o,this)}}H0.prototype.setValue=function(e,t,r,n){let i=this.map[t];i!==void 0&&i.setValue(e,r,n)};H0.prototype.setOptional=function(e,t,r){let n=t[r];n!==void 0&&this.setValue(e,r,n)};H0.upload=function(e,t,r,n){for(let i=0,o=t.length;i!==o;++i){let a=t[i],s=r[a.id];s.needsUpdate!==!1&&a.setValue(e,s.value,n)}};H0.seqWithValue=function(e,t){let r=[];for(let n=0,i=e.length;n!==i;++n){let o=e[n];o.id in t&&r.push(o)}return r};function Uue(e,t,r){let n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}var Qmr=0;function tgr(e){let t=e.split(`
`);for(let r=0;r<t.length;r++)t[r]=r+1+": "+t[r];return t.join(`
`)}function egr(e){switch(e){case tm:return["Linear","( value )"];case Yn:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function que(e,t,r){let n=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return n&&i===""?"":r.toUpperCase()+`

`+i+`

`+tgr(e.getShaderSource(t))}function rgr(e,t){let r=egr(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function ngr(e,t){let r;switch(t){case ufe:r="Linear";break;case hfe:r="Reinhard";break;case ffe:r="OptimizedCineon";break;case pfe:r="ACESFilmic";break;case dfe:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),r="Linear"}return"vec3 "+e+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function igr(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||e.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(HP).join(`
`)}function ogr(e){let t=[];for(let r in e){let n=e[r];n!==!1&&t.push("#define "+r+" "+n)}return t.join(`
`)}function agr(e,t){let r={},n=e.getProgramParameter(t,35721);for(let i=0;i<n;i++){let o=e.getActiveAttrib(t,i),a=o.name,s=1;o.type===35674&&(s=2),o.type===35675&&(s=3),o.type===35676&&(s=4),r[a]={type:o.type,location:e.getAttribLocation(t,a),locationSize:s}}return r}function HP(e){return e!==""}function Gue(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Wue(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var sgr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Jut(e){return e.replace(sgr,lgr)}function lgr(e,t){let r=hr[t];if(r===void 0)throw new Error("Can not resolve #include <"+t+">");return Jut(r)}var cgr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,ugr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Yue(e){return e.replace(ugr,Zfe).replace(cgr,hgr)}function hgr(e,t,r,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Zfe(e,t,r,n)}function Zfe(e,t,r,n){let i="";for(let o=parseInt(t);o<parseInt(r);o++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function jue(e){let t="precision "+e.precision+` float;
precision `+e.precision+" int;";return e.precision==="highp"?t+=`
#define HIGH_PRECISION`:e.precision==="mediump"?t+=`
#define MEDIUM_PRECISION`:e.precision==="lowp"&&(t+=`
#define LOW_PRECISION`),t}function fgr(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===Cht?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===Uhe?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===F3&&(t="SHADOWMAP_TYPE_VSM"),t}function pgr(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ix:case ox:t="ENVMAP_TYPE_CUBE";break;case xM:case z6:t="ENVMAP_TYPE_CUBE_UV";break}return t}function dgr(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ox:case z6:t="ENVMAP_MODE_REFRACTION";break}return t}function mgr(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case O6:t="ENVMAP_BLENDING_MULTIPLY";break;case lfe:t="ENVMAP_BLENDING_MIX";break;case cfe:t="ENVMAP_BLENDING_ADD";break}return t}function ggr(e,t,r,n){let i=e.getContext(),o=r.defines,a=r.vertexShader,s=r.fragmentShader,l=fgr(r),c=pgr(r),u=dgr(r),h=mgr(r),f=r.isWebGL2?"":igr(r),p=ogr(o),d=i.createProgram(),g,_,y=r.glslVersion?"#version "+r.glslVersion+`
`:"";r.isRawShaderMaterial?(g=[p].filter(HP).join(`
`),g.length>0&&(g+=`
`),_=[f,p].filter(HP).join(`
`),_.length>0&&(_+=`
`)):(g=[jue(r),"#define SHADER_NAME "+r.shaderName,p,r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","	attribute vec3 morphTarget0;","	attribute vec3 morphTarget1;","	attribute vec3 morphTarget2;","	attribute vec3 morphTarget3;","	#ifdef USE_MORPHNORMALS","		attribute vec3 morphNormal0;","		attribute vec3 morphNormal1;","		attribute vec3 morphNormal2;","		attribute vec3 morphNormal3;","	#else","		attribute vec3 morphTarget4;","		attribute vec3 morphTarget5;","		attribute vec3 morphTarget6;","		attribute vec3 morphTarget7;","	#endif","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
`].filter(HP).join(`
`),_=[f,jue(r),"#define SHADER_NAME "+r.shaderName,p,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+c:"",r.envMap?"#define "+u:"",r.envMap?"#define "+h:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensionShaderTextureLOD||r.envMap)&&r.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==Zd?"#define TONE_MAPPING":"",r.toneMapping!==Zd?hr.tonemapping_pars_fragment:"",r.toneMapping!==Zd?ngr("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.alphaWrite?"":"#define OPAQUE",hr.encodings_pars_fragment,rgr("linearToOutputTexel",r.outputEncoding),r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",`
`].filter(HP).join(`
`)),a=Jut(a),a=Gue(a,r),a=Wue(a,r),s=Jut(s),s=Gue(s,r),s=Wue(s,r),a=Yue(a),s=Yue(s),r.isWebGL2&&r.isRawShaderMaterial!==!0&&(y=`#version 300 es
`,g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+g,_=["#define varying in",r.glslVersion===Kut?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Kut?"":"#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(`
`)+`
`+_);let x=y+g+a,b=y+_+s,S=Uue(i,35633,x),C=Uue(i,35632,b);if(i.attachShader(d,S),i.attachShader(d,C),r.index0AttributeName!==void 0?i.bindAttribLocation(d,0,r.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(d,0,"position"),i.linkProgram(d),e.debug.checkShaderErrors){let O=i.getProgramInfoLog(d).trim(),D=i.getShaderInfoLog(S).trim(),B=i.getShaderInfoLog(C).trim(),I=!0,L=!0;if(i.getProgramParameter(d,35714)===!1){I=!1;let R=que(i,S,"vertex"),F=que(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(d,35715)+`

Program Info Log: `+O+`
`+R+`
`+F)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(D===""||B==="")&&(L=!1);L&&(this.diagnostics={runnable:I,programLog:O,vertexShader:{log:D,prefix:g},fragmentShader:{log:B,prefix:_}})}i.deleteShader(S),i.deleteShader(C);let P;this.getUniforms=function(){return P===void 0&&(P=new H0(i,d)),P};let k;return this.getAttributes=function(){return k===void 0&&(k=agr(i,d)),k},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(d),this.program=void 0},this.name=r.shaderName,this.id=Qmr++,this.cacheKey=t,this.usedTimes=1,this.program=d,this.vertexShader=S,this.fragmentShader=C,this}var _gr=0,Qut=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let r=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(r),o=this._getShaderStage(n),a=this._getShaderCacheForMaterial(t);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(t){let r=this.materialCache.get(t);for(let n of r)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let r=this.materialCache;return r.has(t)===!1&&r.set(t,new Set),r.get(t)}_getShaderStage(t){let r=this.shaderCache;if(r.has(t)===!1){let n=new tht;r.set(t,n)}return r.get(t)}},tht=class{constructor(){this.id=_gr++,this.usedTimes=0}};function ygr(e,t,r,n,i,o,a){let s=new X3,l=new Qut,c=[],u=i.isWebGL2,h=i.logarithmicDepthBuffer,f=i.floatVertexTextures,p=i.maxVertexUniforms,d=i.vertexTextures,g=i.precision,_={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function y(I){let R=I.skeleton.bones;if(f)return 1024;{let z=Math.floor((p-20)/4),U=Math.min(z,R.length);return U<R.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+R.length+" bones. This GPU supports "+U+"."),0):U}}function x(I,L,R,F,z){let U=F.fog,W=I.isMeshStandardMaterial?F.environment:null,Z=(I.isMeshStandardMaterial?r:t).get(I.envMap||W),rt=_[I.type],ot=z.isSkinnedMesh?y(z):0;I.precision!==null&&(g=i.getMaxPrecision(I.precision),g!==I.precision&&console.warn("THREE.WebGLProgram.getParameters:",I.precision,"not supported, using",g,"instead."));let st,St,bt,Mt;if(rt){let X=ah[rt];st=X.vertexShader,St=X.fragmentShader}else st=I.vertexShader,St=I.fragmentShader,l.update(I),bt=l.getVertexShaderID(I),Mt=l.getFragmentShaderID(I);let lt=e.getRenderTarget(),Kt=I.alphaTest>0,_t=I.clearcoat>0;return{isWebGL2:u,shaderID:rt,shaderName:I.type,vertexShader:st,fragmentShader:St,defines:I.defines,customVertexShaderID:bt,customFragmentShaderID:Mt,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:g,instancing:z.isInstancedMesh===!0,instancingColor:z.isInstancedMesh===!0&&z.instanceColor!==null,supportsVertexTextures:d,outputEncoding:lt===null?e.outputEncoding:lt.isXRRenderTarget===!0?lt.texture.encoding:tm,map:!!I.map,matcap:!!I.matcap,envMap:!!Z,envMapMode:Z&&Z.mapping,envMapCubeUV:!!Z&&(Z.mapping===xM||Z.mapping===z6),lightMap:!!I.lightMap,aoMap:!!I.aoMap,emissiveMap:!!I.emissiveMap,bumpMap:!!I.bumpMap,normalMap:!!I.normalMap,objectSpaceNormalMap:I.normalMapType===Dfe,tangentSpaceNormalMap:I.normalMapType===sx,decodeVideoTexture:!!I.map&&I.map.isVideoTexture===!0&&I.map.encoding===Yn,clearcoat:_t,clearcoatMap:_t&&!!I.clearcoatMap,clearcoatRoughnessMap:_t&&!!I.clearcoatRoughnessMap,clearcoatNormalMap:_t&&!!I.clearcoatNormalMap,displacementMap:!!I.displacementMap,roughnessMap:!!I.roughnessMap,metalnessMap:!!I.metalnessMap,specularMap:!!I.specularMap,specularIntensityMap:!!I.specularIntensityMap,specularColorMap:!!I.specularColorMap,alphaMap:!!I.alphaMap,alphaTest:Kt,alphaWrite:I.alphaWrite||I.transparent,gradientMap:!!I.gradientMap,sheen:I.sheen>0,sheenColorMap:!!I.sheenColorMap,sheenRoughnessMap:!!I.sheenRoughnessMap,transmission:I.transmission>0,transmissionMap:!!I.transmissionMap,thicknessMap:!!I.thicknessMap,combine:I.combine,vertexTangents:!!I.normalMap&&!!z.geometry&&!!z.geometry.attributes.tangent,vertexColors:I.vertexColors,vertexAlphas:I.vertexColors===!0&&!!z.geometry&&!!z.geometry.attributes.color&&z.geometry.attributes.color.itemSize===4,vertexUvs:!!I.map||!!I.bumpMap||!!I.normalMap||!!I.specularMap||!!I.alphaMap||!!I.emissiveMap||!!I.roughnessMap||!!I.metalnessMap||!!I.clearcoatMap||!!I.clearcoatRoughnessMap||!!I.clearcoatNormalMap||!!I.displacementMap||!!I.transmissionMap||!!I.thicknessMap||!!I.specularIntensityMap||!!I.specularColorMap||!!I.sheenColorMap||!!I.sheenRoughnessMap,uvsVertexOnly:!(!!I.map||!!I.bumpMap||!!I.normalMap||!!I.specularMap||!!I.alphaMap||!!I.emissiveMap||!!I.roughnessMap||!!I.metalnessMap||!!I.clearcoatNormalMap||I.transmission>0||!!I.transmissionMap||!!I.thicknessMap||!!I.specularIntensityMap||!!I.specularColorMap||I.sheen>0||!!I.sheenColorMap||!!I.sheenRoughnessMap)&&!!I.displacementMap,fog:!!U,useFog:I.fog,fogExp2:U&&U.isFogExp2,flatShading:!!I.flatShading,sizeAttenuation:I.sizeAttenuation,logarithmicDepthBuffer:h,skinning:z.isSkinnedMesh===!0&&ot>0,maxBones:ot,useVertexTexture:f,morphTargets:!!z.geometry&&!!z.geometry.morphAttributes.position,morphNormals:!!z.geometry&&!!z.geometry.morphAttributes.normal,morphTargetsCount:!!z.geometry&&!!z.geometry.morphAttributes.position?z.geometry.morphAttributes.position.length:0,numDirLights:L.directional.length,numPointLights:L.point.length,numSpotLights:L.spot.length,numRectAreaLights:L.rectArea.length,numHemiLights:L.hemi.length,numDirLightShadows:L.directionalShadowMap.length,numPointLightShadows:L.pointShadowMap.length,numSpotLightShadows:L.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:I.dithering,shadowMapEnabled:e.shadowMap.enabled&&R.length>0,shadowMapType:e.shadowMap.type,toneMapping:I.toneMapped?e.toneMapping:Zd,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===k1,flipSided:I.side===Ii,depthPacking:I.depthPacking!==void 0?I.depthPacking:!1,index0AttributeName:I.index0AttributeName,extensionDerivatives:I.extensions&&I.extensions.derivatives,extensionFragDepth:I.extensions&&I.extensions.fragDepth,extensionDrawBuffers:I.extensions&&I.extensions.drawBuffers,extensionShaderTextureLOD:I.extensions&&I.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||n.has("EXT_shader_texture_lod"),customProgramCacheKey:I.customProgramCacheKey()}}function b(I){let L=[];if(I.shaderID?L.push(I.shaderID):(L.push(I.customVertexShaderID),L.push(I.customFragmentShaderID)),I.defines!==void 0)for(let R in I.defines)L.push(R),L.push(I.defines[R]);return I.isRawShaderMaterial===!1&&(S(L,I),C(L,I),L.push(e.outputEncoding)),L.push(I.customProgramCacheKey),L.join()}function S(I,L){I.push(L.precision),I.push(L.outputEncoding),I.push(L.envMapMode),I.push(L.combine),I.push(L.vertexUvs),I.push(L.fogExp2),I.push(L.sizeAttenuation),I.push(L.maxBones),I.push(L.morphTargetsCount),I.push(L.numDirLights),I.push(L.numPointLights),I.push(L.numSpotLights),I.push(L.numHemiLights),I.push(L.numRectAreaLights),I.push(L.numDirLightShadows),I.push(L.numPointLightShadows),I.push(L.numSpotLightShadows),I.push(L.shadowMapType),I.push(L.toneMapping),I.push(L.numClippingPlanes),I.push(L.numClipIntersection),I.push(L.alphaWrite)}function C(I,L){s.disableAll(),L.isWebGL2&&s.enable(0),L.supportsVertexTextures&&s.enable(1),L.instancing&&s.enable(2),L.instancingColor&&s.enable(3),L.map&&s.enable(4),L.matcap&&s.enable(5),L.envMap&&s.enable(6),L.envMapCubeUV&&s.enable(7),L.lightMap&&s.enable(8),L.aoMap&&s.enable(9),L.emissiveMap&&s.enable(10),L.bumpMap&&s.enable(11),L.normalMap&&s.enable(12),L.objectSpaceNormalMap&&s.enable(13),L.tangentSpaceNormalMap&&s.enable(14),L.clearcoat&&s.enable(15),L.clearcoatMap&&s.enable(16),L.clearcoatRoughnessMap&&s.enable(17),L.clearcoatNormalMap&&s.enable(18),L.displacementMap&&s.enable(19),L.specularMap&&s.enable(20),L.roughnessMap&&s.enable(21),L.metalnessMap&&s.enable(22),L.gradientMap&&s.enable(23),L.alphaMap&&s.enable(24),L.alphaTest&&s.enable(25),L.vertexColors&&s.enable(26),L.vertexAlphas&&s.enable(27),L.vertexUvs&&s.enable(28),L.vertexTangents&&s.enable(29),L.uvsVertexOnly&&s.enable(30),L.fog&&s.enable(31),I.push(s.mask),s.disableAll(),L.useFog&&s.enable(0),L.flatShading&&s.enable(1),L.logarithmicDepthBuffer&&s.enable(2),L.skinning&&s.enable(3),L.useVertexTexture&&s.enable(4),L.morphTargets&&s.enable(5),L.morphNormals&&s.enable(6),L.premultipliedAlpha&&s.enable(7),L.shadowMapEnabled&&s.enable(8),L.physicallyCorrectLights&&s.enable(9),L.doubleSided&&s.enable(10),L.flipSided&&s.enable(11),L.depthPacking&&s.enable(12),L.dithering&&s.enable(13),L.specularIntensityMap&&s.enable(14),L.specularColorMap&&s.enable(15),L.transmission&&s.enable(16),L.transmissionMap&&s.enable(17),L.thicknessMap&&s.enable(18),L.sheen&&s.enable(19),L.sheenColorMap&&s.enable(20),L.sheenRoughnessMap&&s.enable(21),L.decodeVideoTexture&&s.enable(22),I.push(s.mask)}function P(I){let L=_[I.type],R;if(L){let F=ah[L];R=Vfe.clone(F.uniforms)}else R=I.uniforms;return R}function k(I,L){let R;for(let F=0,z=c.length;F<z;F++){let U=c[F];if(U.cacheKey===L){R=U,++R.usedTimes;break}}return R===void 0&&(R=new ggr(e,L,I,o),c.push(R)),R}function O(I){if(--I.usedTimes===0){let L=c.indexOf(I);c[L]=c[c.length-1],c.pop(),I.destroy()}}function D(I){l.remove(I)}function B(){l.dispose()}return{getParameters:x,getProgramCacheKey:b,getUniforms:P,acquireProgram:k,releaseProgram:O,releaseShaderCache:D,programs:c,dispose:B}}function vgr(){let e=new WeakMap;function t(o){let a=e.get(o);return a===void 0&&(a={},e.set(o,a)),a}function r(o){e.delete(o)}function n(o,a,s){e.get(o)[a]=s}function i(){e=new WeakMap}return{get:t,remove:r,update:n,dispose:i}}function xgr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Xue(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function $ue(){let e=[],t=0,r=[],n=[],i=[];function o(){t=0,r.length=0,n.length=0,i.length=0}function a(h,f,p,d,g,_){let y=e[t];return y===void 0?(y={id:h.id,object:h,geometry:f,material:p,groupOrder:d,renderOrder:h.renderOrder,z:g,group:_},e[t]=y):(y.id=h.id,y.object=h,y.geometry=f,y.material=p,y.groupOrder=d,y.renderOrder=h.renderOrder,y.z=g,y.group=_),t++,y}function s(h,f,p,d,g,_){let y=a(h,f,p,d,g,_);p.transmission>0?n.push(y):p.transparent===!0?i.push(y):r.push(y)}function l(h,f,p,d,g,_){let y=a(h,f,p,d,g,_);p.transmission>0?n.unshift(y):p.transparent===!0?i.unshift(y):r.unshift(y)}function c(h,f){r.length>1&&r.sort(h||xgr),n.length>1&&n.sort(f||Xue),i.length>1&&i.sort(f||Xue)}function u(){for(let h=t,f=e.length;h<f;h++){let p=e[h];if(p.id===null)break;p.id=null,p.object=null,p.geometry=null,p.material=null,p.group=null}}return{opaque:r,transmissive:n,transparent:i,init:o,push:s,unshift:l,finish:u,sort:c}}function bgr(){let e=new WeakMap;function t(n,i){let o;return e.has(n)===!1?(o=new $ue,e.set(n,[o])):i>=e.get(n).length?(o=new $ue,e.get(n).push(o)):o=e.get(n)[i],o}function r(){e=new WeakMap}return{get:t,dispose:r}}function wgr(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let r;switch(t.type){case"DirectionalLight":r={direction:new j,color:new ne};break;case"SpotLight":r={position:new j,direction:new j,color:new ne,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new j,color:new ne,distance:0,decay:0};break;case"HemisphereLight":r={direction:new j,skyColor:new ne,groundColor:new ne};break;case"RectAreaLight":r={color:new ne,position:new j,halfWidth:new j,halfHeight:new j};break}return e[t.id]=r,r}}}function Sgr(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let r;switch(t.type){case"DirectionalLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt};break;case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=r,r}}}var Mgr=0;function Egr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Tgr(e,t){let r=new wgr,n=Sgr(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)i.probe.push(new j);let o=new j,a=new Me,s=new Me;function l(u,h){let f=0,p=0,d=0;for(let D=0;D<9;D++)i.probe[D].set(0,0,0);let g=0,_=0,y=0,x=0,b=0,S=0,C=0,P=0;u.sort(Egr);let k=h!==!0?Math.PI:1;for(let D=0,B=u.length;D<B;D++){let I=u[D],L=I.color,R=I.intensity,F=I.distance,z=I.shadow&&I.shadow.map?I.shadow.map.texture:null;if(I.isAmbientLight)f+=L.r*R*k,p+=L.g*R*k,d+=L.b*R*k;else if(I.isLightProbe)for(let U=0;U<9;U++)i.probe[U].addScaledVector(I.sh.coefficients[U],R);else if(I.isDirectionalLight){let U=r.get(I);if(U.color.copy(I.color).multiplyScalar(I.intensity*k),I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,i.directionalShadow[g]=Z,i.directionalShadowMap[g]=z,i.directionalShadowMatrix[g]=I.shadow.matrix,S++}i.directional[g]=U,g++}else if(I.isSpotLight){let U=r.get(I);if(U.position.setFromMatrixPosition(I.matrixWorld),U.color.copy(L).multiplyScalar(R*k),U.distance=F,U.coneCos=Math.cos(I.angle),U.penumbraCos=Math.cos(I.angle*(1-I.penumbra)),U.decay=I.decay,I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,i.spotShadow[y]=Z,i.spotShadowMap[y]=z,i.spotShadowMatrix[y]=I.shadow.matrix,P++}i.spot[y]=U,y++}else if(I.isRectAreaLight){let U=r.get(I);U.color.copy(L).multiplyScalar(R),U.halfWidth.set(I.width*.5,0,0),U.halfHeight.set(0,I.height*.5,0),i.rectArea[x]=U,x++}else if(I.isPointLight){let U=r.get(I);if(U.color.copy(I.color).multiplyScalar(I.intensity*k),U.distance=I.distance,U.decay=I.decay,I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,Z.shadowCameraNear=W.camera.near,Z.shadowCameraFar=W.camera.far,i.pointShadow[_]=Z,i.pointShadowMap[_]=z,i.pointShadowMatrix[_]=I.shadow.matrix,C++}i.point[_]=U,_++}else if(I.isHemisphereLight){let U=r.get(I);U.skyColor.copy(I.color).multiplyScalar(R*k),U.groundColor.copy(I.groundColor).multiplyScalar(R*k),i.hemi[b]=U,b++}}x>0&&(t.isWebGL2||e.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=re.LTC_FLOAT_1,i.rectAreaLTC2=re.LTC_FLOAT_2):e.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=re.LTC_HALF_1,i.rectAreaLTC2=re.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=p,i.ambient[2]=d;let O=i.hash;(O.directionalLength!==g||O.pointLength!==_||O.spotLength!==y||O.rectAreaLength!==x||O.hemiLength!==b||O.numDirectionalShadows!==S||O.numPointShadows!==C||O.numSpotShadows!==P)&&(i.directional.length=g,i.spot.length=y,i.rectArea.length=x,i.point.length=_,i.hemi.length=b,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=C,i.pointShadowMap.length=C,i.spotShadow.length=P,i.spotShadowMap.length=P,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=C,i.spotShadowMatrix.length=P,O.directionalLength=g,O.pointLength=_,O.spotLength=y,O.rectAreaLength=x,O.hemiLength=b,O.numDirectionalShadows=S,O.numPointShadows=C,O.numSpotShadows=P,i.version=Mgr++)}function c(u,h){let f=0,p=0,d=0,g=0,_=0,y=h.matrixWorldInverse;for(let x=0,b=u.length;x<b;x++){let S=u[x];if(S.isDirectionalLight){let C=i.directional[f];C.direction.setFromMatrixPosition(S.matrixWorld),o.setFromMatrixPosition(S.target.matrixWorld),C.direction.sub(o),C.direction.transformDirection(y),f++}else if(S.isSpotLight){let C=i.spot[d];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),C.direction.setFromMatrixPosition(S.matrixWorld),o.setFromMatrixPosition(S.target.matrixWorld),C.direction.sub(o),C.direction.transformDirection(y),d++}else if(S.isRectAreaLight){let C=i.rectArea[g];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),s.identity(),a.copy(S.matrixWorld),a.premultiply(y),s.extractRotation(a),C.halfWidth.set(S.width*.5,0,0),C.halfHeight.set(0,S.height*.5,0),C.halfWidth.applyMatrix4(s),C.halfHeight.applyMatrix4(s),g++}else if(S.isPointLight){let C=i.point[p];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),p++}else if(S.isHemisphereLight){let C=i.hemi[_];C.direction.setFromMatrixPosition(S.matrixWorld),C.direction.transformDirection(y),C.direction.normalize(),_++}}}return{setup:l,setupView:c,state:i}}function Kue(e,t){let r=new Tgr(e,t),n=[],i=[];function o(){n.length=0,i.length=0}function a(h){n.push(h)}function s(h){i.push(h)}function l(h){r.setup(n,h)}function c(h){r.setupView(n,h)}return{init:o,state:{lightsArray:n,shadowsArray:i,lights:r},setupLights:l,setupLightsView:c,pushLight:a,pushShadow:s}}function Cgr(e,t){let r=new WeakMap;function n(o,a=0){let s;return r.has(o)===!1?(s=new Kue(e,t),r.set(o,[s])):a>=r.get(o).length?(s=new Kue(e,t),r.get(o).push(s)):s=r.get(o)[a],s}function i(){r=new WeakMap}return{get:n,dispose:i}}var eM=class extends qi{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=Rfe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}};eM.prototype.isMeshDepthMaterial=!0;var rM=class extends qi{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new j,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}};rM.prototype.isMeshDistanceMaterial=!0;var Agr=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,Pgr=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function Jfe(e,t,r){let n=new D1,i=new Lt,o=new Lt,a=new en,s=new eM({depthPacking:Nfe}),l=new rM,c={},u=r.maxTextureSize,h={0:Ii,1:L1,2:k1},f=new lh({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Lt},radius:{value:4}},vertexShader:Agr,fragmentShader:Pgr}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let d=new Pe;d.setAttribute("position",new Je(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new ti(d,f),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Cht,this.render=function(S,C,P){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||S.length===0)return;let k=e.getRenderTarget(),O=e.getActiveCubeFace(),D=e.getActiveMipmapLevel(),B=e.state;B.setBlending(Kd),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);for(let I=0,L=S.length;I<L;I++){let R=S[I],F=R.shadow;if(F===void 0){console.warn("THREE.WebGLShadowMap:",R,"has no shadow.");continue}if(F.autoUpdate===!1&&F.needsUpdate===!1)continue;i.copy(F.mapSize);let z=F.getFrameExtents();if(i.multiply(z),o.copy(F.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/z.x),i.x=o.x*z.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/z.y),i.y=o.y*z.y,F.mapSize.y=o.y)),F.map===null&&!F.isPointLightShadow&&this.type===F3){let W={minFilter:ii,magFilter:ii,format:Qo};F.map=new hs(i.x,i.y,W),F.map.texture.name=R.name+".shadowMap",F.mapPass=new hs(i.x,i.y,W),F.camera.updateProjectionMatrix()}if(F.map===null){let W={minFilter:Li,magFilter:Li,format:Qo};F.map=new hs(i.x,i.y,W),F.map.texture.name=R.name+".shadowMap",F.camera.updateProjectionMatrix()}e.setRenderTarget(F.map),e.clear();let U=F.getViewportCount();for(let W=0;W<U;W++){let Z=F.getViewport(W);a.set(o.x*Z.x,o.y*Z.y,o.x*Z.z,o.y*Z.w),B.viewport(a),F.updateMatrices(R,W),n=F.getFrustum(),b(C,P,F.camera,R,this.type)}!F.isPointLightShadow&&this.type===F3&&y(F,P),F.needsUpdate=!1}_.needsUpdate=!1,e.setRenderTarget(k,O,D)};function y(S,C){let P=t.update(g);f.defines.VSM_SAMPLES!==S.blurSamples&&(f.defines.VSM_SAMPLES=S.blurSamples,p.defines.VSM_SAMPLES=S.blurSamples,f.needsUpdate=!0,p.needsUpdate=!0),f.uniforms.shadow_pass.value=S.map.texture,f.uniforms.resolution.value=S.mapSize,f.uniforms.radius.value=S.radius,e.setRenderTarget(S.mapPass),e.clear(),e.renderBufferDirect(C,null,P,f,g,null),p.uniforms.shadow_pass.value=S.mapPass.texture,p.uniforms.resolution.value=S.mapSize,p.uniforms.radius.value=S.radius,e.setRenderTarget(S.map),e.clear(),e.renderBufferDirect(C,null,P,p,g,null)}function x(S,C,P,k,O,D,B){let I=null,L=k.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(L!==void 0?I=L:I=k.isPointLight===!0?l:s,e.localClippingEnabled&&P.clipShadows===!0&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0){let R=I.uuid,F=P.uuid,z=c[R];z===void 0&&(z={},c[R]=z);let U=z[F];U===void 0&&(U=I.clone(),z[F]=U),I=U}return I.visible=P.visible,I.wireframe=P.wireframe,B===F3?I.side=P.shadowSide!==null?P.shadowSide:P.side:I.side=P.shadowSide!==null?P.shadowSide:h[P.side],I.alphaMap=P.alphaMap,I.alphaTest=P.alphaTest,I.clipShadows=P.clipShadows,I.clippingPlanes=P.clippingPlanes,I.clipIntersection=P.clipIntersection,I.displacementMap=P.displacementMap,I.displacementScale=P.displacementScale,I.displacementBias=P.displacementBias,I.wireframeLinewidth=P.wireframeLinewidth,I.linewidth=P.linewidth,k.isPointLight===!0&&I.isMeshDistanceMaterial===!0&&(I.referencePosition.setFromMatrixPosition(k.matrixWorld),I.nearDistance=O,I.farDistance=D),I}function b(S,C,P,k,O){if(S.visible===!1)return;if(S.layers.test(C.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&O===F3)&&(!S.frustumCulled||n.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,S.matrixWorld);let I=t.update(S),L=S.material;if(Array.isArray(L)){let R=I.groups;for(let F=0,z=R.length;F<z;F++){let U=R[F],W=L[U.materialIndex];if(W&&W.visible){let Z=x(S,I,W,k,P.near,P.far,O);e.renderBufferDirect(P,null,I,Z,S,U)}}}else if(L.visible){let R=x(S,I,L,k,P.near,P.far,O);e.renderBufferDirect(P,null,I,R,S,null)}}let B=S.children;for(let I=0,L=B.length;I<L;I++)b(B[I],C,P,k,O)}}function Igr(e,t,r){let n=r.isWebGL2;function i(){let at=!1,se=new en,Qt=null,Ce=new en(0,0,0,0);return{setMask:function(Pt){Qt!==Pt&&!at&&(e.colorMask(Pt,Pt,Pt,Pt),Qt=Pt)},setLocked:function(Pt){at=Pt},setClear:function(Pt,Nt,ze,yn,Wi){Wi===!0&&(Pt*=yn,Nt*=yn,ze*=yn),se.set(Pt,Nt,ze,yn),Ce.equals(se)===!1&&(e.clearColor(Pt,Nt,ze,yn),Ce.copy(se))},reset:function(){at=!1,Qt=null,Ce.set(-1,0,0,0)}}}function o(){let at=!1,se=null,Qt=null,Ce=null;return{setTest:function(Pt){Pt?lt(2929):Kt(2929)},setMask:function(Pt){se!==Pt&&!at&&(e.depthMask(Pt),se=Pt)},setFunc:function(Pt){if(Qt!==Pt){if(Pt)switch(Pt){case efe:e.depthFunc(512);break;case rfe:e.depthFunc(519);break;case nfe:e.depthFunc(513);break;case iU:e.depthFunc(515);break;case ife:e.depthFunc(514);break;case ofe:e.depthFunc(518);break;case afe:e.depthFunc(516);break;case sfe:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);Qt=Pt}},setLocked:function(Pt){at=Pt},setClear:function(Pt){Ce!==Pt&&(e.clearDepth(Pt),Ce=Pt)},reset:function(){at=!1,se=null,Qt=null,Ce=null}}}function a(){let at=!1,se=null,Qt=null,Ce=null,Pt=null,Nt=null,ze=null,yn=null,Wi=null;return{setTest:function(Ar){at||(Ar?lt(2960):Kt(2960))},setMask:function(Ar){se!==Ar&&!at&&(e.stencilMask(Ar),se=Ar)},setFunc:function(Ar,Ia,ho){(Qt!==Ar||Ce!==Ia||Pt!==ho)&&(e.stencilFunc(Ar,Ia,ho),Qt=Ar,Ce=Ia,Pt=ho)},setOp:function(Ar,Ia,ho){(Nt!==Ar||ze!==Ia||yn!==ho)&&(e.stencilOp(Ar,Ia,ho),Nt=Ar,ze=Ia,yn=ho)},setLocked:function(Ar){at=Ar},setClear:function(Ar){Wi!==Ar&&(e.clearStencil(Ar),Wi=Ar)},reset:function(){at=!1,se=null,Qt=null,Ce=null,Pt=null,Nt=null,ze=null,yn=null,Wi=null}}}let s=new i,l=new o,c=new a,u={},h={},f=new WeakMap,p=[],d=null,g=!1,_=null,y=null,x=null,b=null,S=null,C=null,P=null,k=!1,O=null,D=null,B=null,I=null,L=null,R=e.getParameter(35661),F=!1,z=0,U=e.getParameter(7938);U.indexOf("WebGL")!==-1?(z=parseFloat(/^WebGL (\d)/.exec(U)[1]),F=z>=1):U.indexOf("OpenGL ES")!==-1&&(z=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),F=z>=2);let W=null,Z={},rt=e.getParameter(3088),ot=e.getParameter(2978),st=new en().fromArray(rt),St=new en().fromArray(ot);function bt(at,se,Qt){let Ce=new Uint8Array(4),Pt=e.createTexture();e.bindTexture(at,Pt),e.texParameteri(at,10241,9728),e.texParameteri(at,10240,9728);for(let Nt=0;Nt<Qt;Nt++)e.texImage2D(se+Nt,0,6408,1,1,0,6408,5121,Ce);return Pt}let Mt={};Mt[3553]=bt(3553,3553,1),Mt[34067]=bt(34067,34069,6),s.setClear(0,0,0,1),l.setClear(1),c.setClear(0),lt(2929),l.setFunc(iU),ht(!1),wt(Sut),lt(2884),q(Kd);function lt(at){u[at]!==!0&&(e.enable(at),u[at]=!0)}function Kt(at){u[at]!==!1&&(e.disable(at),u[at]=!1)}function _t(at,se){return h[at]!==se?(e.bindFramebuffer(at,se),h[at]=se,n&&(at===36009&&(h[36160]=se),at===36160&&(h[36009]=se)),!0):!1}function ct(at,se){let Qt=p,Ce=!1;if(at)if(Qt=f.get(se),Qt===void 0&&(Qt=[],f.set(se,Qt)),at.isWebGLMultipleRenderTargets){let Pt=at.texture;if(Qt.length!==Pt.length||Qt[0]!==36064){for(let Nt=0,ze=Pt.length;Nt<ze;Nt++)Qt[Nt]=36064+Nt;Qt.length=Pt.length,Ce=!0}}else Qt[0]!==36064&&(Qt[0]=36064,Ce=!0);else Qt[0]!==1029&&(Qt[0]=1029,Ce=!0);Ce&&(r.isWebGL2?e.drawBuffers(Qt):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(Qt))}function X(at){return d!==at?(e.useProgram(at),d=at,!0):!1}let et={[E1]:32774,[Ghe]:32778,[Whe]:32779};if(n)et[Cut]=32775,et[Aut]=32776;else{let at=t.get("EXT_blend_minmax");at!==null&&(et[Cut]=at.MIN_EXT,et[Aut]=at.MAX_EXT)}let dt={[Yhe]:0,[jhe]:1,[Xhe]:768,[Pht]:770,[tfe]:776,[Jhe]:774,[Khe]:772,[$he]:769,[Iht]:771,[Qhe]:775,[Zhe]:773};function q(at,se,Qt,Ce,Pt,Nt,ze,yn){if(at===Kd){g===!0&&(Kt(3042),g=!1);return}if(g===!1&&(lt(3042),g=!0),at!==qhe){if(at!==_||yn!==k){if((y!==E1||S!==E1)&&(e.blendEquation(32774),y=E1,S=E1),yn)switch(at){case V3:e.blendFuncSeparate(1,771,1,771);break;case Mut:e.blendFunc(1,1);break;case Eut:e.blendFuncSeparate(0,769,0,1);break;case Tut:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",at);break}else switch(at){case V3:e.blendFuncSeparate(770,771,1,771);break;case Mut:e.blendFunc(770,1);break;case Eut:e.blendFuncSeparate(0,769,0,1);break;case Tut:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",at);break}x=null,b=null,C=null,P=null,_=at,k=yn}return}Pt=Pt||se,Nt=Nt||Qt,ze=ze||Ce,(se!==y||Pt!==S)&&(e.blendEquationSeparate(et[se],et[Pt]),y=se,S=Pt),(Qt!==x||Ce!==b||Nt!==C||ze!==P)&&(e.blendFuncSeparate(dt[Qt],dt[Ce],dt[Nt],dt[ze]),x=Qt,b=Ce,C=Nt,P=ze),_=at,k=null}function pt(at,se){at.side===k1?Kt(2884):lt(2884);let Qt=at.side===Ii;se&&(Qt=!Qt),ht(Qt),at.blending===V3&&at.transparent===!1?q(Kd):q(at.blending,at.blendEquation,at.blendSrc,at.blendDst,at.blendEquationAlpha,at.blendSrcAlpha,at.blendDstAlpha,at.premultipliedAlpha),l.setFunc(at.depthFunc),l.setTest(at.depthTest),l.setMask(at.depthWrite),s.setMask(at.colorWrite);let Ce=at.stencilWrite;c.setTest(Ce),Ce&&(c.setMask(at.stencilWriteMask),c.setFunc(at.stencilFunc,at.stencilRef,at.stencilFuncMask),c.setOp(at.stencilFail,at.stencilZFail,at.stencilZPass)),ie(at.polygonOffset,at.polygonOffsetFactor,at.polygonOffsetUnits),at.alphaToCoverage===!0?lt(32926):Kt(32926)}function ht(at){O!==at&&(at?e.frontFace(2304):e.frontFace(2305),O=at)}function wt(at){at!==Hhe?(lt(2884),at!==D&&(at===Sut?e.cullFace(1029):at===Vhe?e.cullFace(1028):e.cullFace(1032))):Kt(2884),D=at}function kt(at){at!==B&&(F&&e.lineWidth(at),B=at)}function ie(at,se,Qt){at?(lt(32823),(I!==se||L!==Qt)&&(e.polygonOffset(se,Qt),I=se,L=Qt)):Kt(32823)}function ee(at){at?lt(3089):Kt(3089)}function Le(at){at===void 0&&(at=33984+R-1),W!==at&&(e.activeTexture(at),W=at)}function ar(at,se){W===null&&Le();let Qt=Z[W];Qt===void 0&&(Qt={type:void 0,texture:void 0},Z[W]=Qt),(Qt.type!==at||Qt.texture!==se)&&(e.bindTexture(at,se||Mt[at]),Qt.type=at,Qt.texture=se)}function fr(){let at=Z[W];at!==void 0&&at.type!==void 0&&(e.bindTexture(at.type,null),at.type=void 0,at.texture=void 0)}function tt(){try{e.compressedTexImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function $(){try{e.texSubImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function It(){try{e.texSubImage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function $t(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function he(){try{e.texStorage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function Tt(){try{e.texStorage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function be(){try{e.texImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function nt(){try{e.texImage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function Ct(at){st.equals(at)===!1&&(e.scissor(at.x,at.y,at.z,at.w),st.copy(at))}function Wt(at){St.equals(at)===!1&&(e.viewport(at.x,at.y,at.z,at.w),St.copy(at))}function fe(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),n===!0&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),u={},W=null,Z={},h={},f=new WeakMap,p=[],d=null,g=!1,_=null,y=null,x=null,b=null,S=null,C=null,P=null,k=!1,O=null,D=null,B=null,I=null,L=null,st.set(0,0,e.canvas.width,e.canvas.height),St.set(0,0,e.canvas.width,e.canvas.height),s.reset(),l.reset(),c.reset()}return{buffers:{color:s,depth:l,stencil:c},enable:lt,disable:Kt,bindFramebuffer:_t,drawBuffers:ct,useProgram:X,setBlending:q,setMaterial:pt,setFlipSided:ht,setCullFace:wt,setLineWidth:kt,setPolygonOffset:ie,setScissorTest:ee,activeTexture:Le,bindTexture:ar,unbindTexture:fr,compressedTexImage2D:tt,texImage2D:be,texImage3D:nt,texStorage2D:he,texStorage3D:Tt,texSubImage2D:$,texSubImage3D:It,compressedTexSubImage2D:$t,scissor:Ct,viewport:Wt,reset:fe}}function Lgr(e,t,r,n,i,o,a){let s=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,h=i.maxSamples,p=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,d=new WeakMap,g,_=!1;try{_=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(tt){}function y(tt,$){return _?new OffscreenCanvas(tt,$):t6("canvas")}function x(tt,$,It,$t){let he=1;if((tt.width>$t||tt.height>$t)&&(he=$t/Math.max(tt.width,tt.height)),he<1||$===!0)if(typeof HTMLImageElement!="undefined"&&tt instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&tt instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&tt instanceof ImageBitmap){let Tt=$?Ffe:Math.floor,be=Tt(he*tt.width),nt=Tt(he*tt.height);g===void 0&&(g=y(be,nt));let Ct=It?y(be,nt):g;return Ct.width=be,Ct.height=nt,Ct.getContext("2d").drawImage(tt,0,0,be,nt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+tt.width+"x"+tt.height+") to ("+be+"x"+nt+")."),Ct}else return"data"in tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+tt.width+"x"+tt.height+")."),tt;return tt}function b(tt){return Zut(tt.width)&&Zut(tt.height)}function S(tt){return s?!1:tt.wrapS!==Jo||tt.wrapT!==Jo||tt.minFilter!==Li&&tt.minFilter!==ii}function C(tt,$){return tt.generateMipmaps&&$&&tt.minFilter!==Li&&tt.minFilter!==ii}function P(tt){e.generateMipmap(tt)}function k(tt,$,It,$t,he=!1){if(s===!1)return $;if(tt!==null){if(e[tt]!==void 0)return e[tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+tt+"'")}let Tt=$;return $===6403&&(It===5126&&(Tt=33326),It===5131&&(Tt=33325),It===5121&&(Tt=33321)),$===33319&&(It===5126&&(Tt=33328),It===5131&&(Tt=33327),It===5121&&(Tt=33323)),$===6408&&(It===5126&&(Tt=34836),It===5131&&(Tt=34842),It===5121&&(Tt=$t===Yn&&he===!1?35907:32856),It===32819&&(Tt=32854),It===32820&&(Tt=32855)),(Tt===33325||Tt===33326||Tt===33327||Tt===33328||Tt===34842||Tt===34836)&&t.get("EXT_color_buffer_float"),Tt}function O(tt,$,It){return C(tt,It)===!0||tt.isFramebufferTexture&&tt.minFilter!==Li&&tt.minFilter!==ii?Math.log2(Math.max($.width,$.height))+1:tt.mipmaps!==void 0&&tt.mipmaps.length>0?tt.mipmaps.length:tt.isCompressedTexture&&Array.isArray(tt.image)?$.mipmaps.length:1}function D(tt){return tt===Li||tt===oU||tt===aU?9728:9729}function B(tt){let $=tt.target;$.removeEventListener("dispose",B),L($),$.isVideoTexture&&d.delete($),a.memory.textures--}function I(tt){let $=tt.target;$.removeEventListener("dispose",I),R($)}function L(tt){let $=n.get(tt);$.__webglInit!==void 0&&(e.deleteTexture($.__webglTexture),n.remove(tt))}function R(tt){let $=tt.texture,It=n.get(tt),$t=n.get($);if(!!tt){if($t.__webglTexture!==void 0&&(e.deleteTexture($t.__webglTexture),a.memory.textures--),tt.depthTexture&&tt.depthTexture.dispose(),tt.isWebGLCubeRenderTarget)for(let he=0;he<6;he++)e.deleteFramebuffer(It.__webglFramebuffer[he]),It.__webglDepthbuffer&&e.deleteRenderbuffer(It.__webglDepthbuffer[he]);else e.deleteFramebuffer(It.__webglFramebuffer),It.__webglDepthbuffer&&e.deleteRenderbuffer(It.__webglDepthbuffer),It.__webglMultisampledFramebuffer&&e.deleteFramebuffer(It.__webglMultisampledFramebuffer),It.__webglColorRenderbuffer&&e.deleteRenderbuffer(It.__webglColorRenderbuffer),It.__webglDepthRenderbuffer&&e.deleteRenderbuffer(It.__webglDepthRenderbuffer);if(tt.isWebGLMultipleRenderTargets)for(let he=0,Tt=$.length;he<Tt;he++){let be=n.get($[he]);be.__webglTexture&&(e.deleteTexture(be.__webglTexture),a.memory.textures--),n.remove($[he])}n.remove($),n.remove(tt)}}let F=0;function z(){F=0}function U(){let tt=F;return tt>=l&&console.warn("THREE.WebGLTextures: Trying to use "+tt+" texture units while this GPU supports only "+l),F+=1,tt}function W(tt,$){let It=n.get(tt);if(tt.isVideoTexture&&kt(tt),tt.version>0&&It.__version!==tt.version){let $t=tt.image;if($t===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if($t.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{lt(It,tt,$);return}}r.activeTexture(33984+$),r.bindTexture(3553,It.__webglTexture)}function Z(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){lt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(35866,It.__webglTexture)}function rt(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){lt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(32879,It.__webglTexture)}function ot(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){Kt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(34067,It.__webglTexture)}let st={[XP]:10497,[Jo]:33071,[$P]:33648},St={[Li]:9728,[oU]:9984,[aU]:9986,[ii]:9729,[Lht]:9985,[ax]:9987};function bt(tt,$,It){if(It?(e.texParameteri(tt,10242,st[$.wrapS]),e.texParameteri(tt,10243,st[$.wrapT]),(tt===32879||tt===35866)&&e.texParameteri(tt,32882,st[$.wrapR]),e.texParameteri(tt,10240,St[$.magFilter]),e.texParameteri(tt,10241,St[$.minFilter])):(e.texParameteri(tt,10242,33071),e.texParameteri(tt,10243,33071),(tt===32879||tt===35866)&&e.texParameteri(tt,32882,33071),($.wrapS!==Jo||$.wrapT!==Jo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(tt,10240,D($.magFilter)),e.texParameteri(tt,10241,D($.minFilter)),$.minFilter!==Li&&$.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let $t=t.get("EXT_texture_filter_anisotropic");if($.type===Xd&&t.has("OES_texture_float_linear")===!1||s===!1&&$.type===A1&&t.has("OES_texture_half_float_linear")===!1)return;($.anisotropy>1||n.get($).__currentAnisotropy)&&(e.texParameterf(tt,$t.TEXTURE_MAX_ANISOTROPY_EXT,Math.min($.anisotropy,i.getMaxAnisotropy())),n.get($).__currentAnisotropy=$.anisotropy)}}function Mt(tt,$){tt.__webglInit===void 0&&(tt.__webglInit=!0,$.addEventListener("dispose",B),tt.__webglTexture=e.createTexture(),a.memory.textures++)}function lt(tt,$,It){let $t=3553;$.isDataTexture2DArray&&($t=35866),$.isDataTexture3D&&($t=32879),Mt(tt,$),r.activeTexture(33984+It),r.bindTexture($t,tt.__webglTexture),e.pixelStorei(37440,$.flipY),e.pixelStorei(37441,$.premultiplyAlpha),e.pixelStorei(3317,$.unpackAlignment),e.pixelStorei(37443,0);let he=S($)&&b($.image)===!1,Tt=x($.image,he,!1,u);Tt=ie($,Tt);let be=b(Tt)||s,nt=o.convert($.format,$.encoding),Ct=o.convert($.type),Wt=k($.internalFormat,nt,Ct,$.encoding,$.isVideoTexture);bt($t,$,be);let fe,at=$.mipmaps,se=s&&$.isVideoTexture!==!0,Qt=tt.__version===void 0,Ce=O($,Tt,be);if($.isDepthTexture)Wt=6402,s?$.type===Xd?Wt=36012:$.type===VP?Wt=33190:$.type===P1?Wt=35056:Wt=33189:$.type===Xd&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),$.format===F0&&Wt===6402&&$.type!==G3&&$.type!==VP&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),$.type=G3,Ct=o.convert($.type)),$.format===R1&&Wt===6402&&(Wt=34041,$.type!==P1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),$.type=P1,Ct=o.convert($.type))),se&&Qt?r.texStorage2D(3553,1,Wt,Tt.width,Tt.height):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,null);else if($.isDataTexture)if(at.length>0&&be){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],se?r.texSubImage2D(3553,0,0,0,fe.width,fe.height,nt,Ct,fe.data):r.texImage2D(3553,Pt,Wt,fe.width,fe.height,0,nt,Ct,fe.data);$.generateMipmaps=!1}else se?(Qt&&r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height),r.texSubImage2D(3553,0,0,0,Tt.width,Tt.height,nt,Ct,Tt.data)):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,Tt.data);else if($.isCompressedTexture){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],$.format!==Qo?nt!==null?se?r.compressedTexSubImage2D(3553,Pt,0,0,fe.width,fe.height,nt,fe.data):r.compressedTexImage2D(3553,Pt,Wt,fe.width,fe.height,0,fe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):se?r.texSubImage2D(3553,Pt,0,0,fe.width,fe.height,nt,Ct,fe.data):r.texImage2D(3553,Pt,Wt,fe.width,fe.height,0,nt,Ct,fe.data)}else if($.isDataTexture2DArray)se?(Qt&&r.texStorage3D(35866,Ce,Wt,Tt.width,Tt.height,Tt.depth),r.texSubImage3D(35866,0,0,0,0,Tt.width,Tt.height,Tt.depth,nt,Ct,Tt.data)):r.texImage3D(35866,0,Wt,Tt.width,Tt.height,Tt.depth,0,nt,Ct,Tt.data);else if($.isDataTexture3D)se?(Qt&&r.texStorage3D(32879,Ce,Wt,Tt.width,Tt.height,Tt.depth),r.texSubImage3D(32879,0,0,0,0,Tt.width,Tt.height,Tt.depth,nt,Ct,Tt.data)):r.texImage3D(32879,0,Wt,Tt.width,Tt.height,Tt.depth,0,nt,Ct,Tt.data);else if($.isFramebufferTexture)se&&Qt?r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,null);else if(at.length>0&&be){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],se?r.texSubImage2D(3553,Pt,0,0,nt,Ct,fe):r.texImage2D(3553,Pt,Wt,nt,Ct,fe);$.generateMipmaps=!1}else se?(Qt&&r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height),r.texSubImage2D(3553,0,0,0,nt,Ct,Tt)):r.texImage2D(3553,0,Wt,nt,Ct,Tt);C($,be)&&P($t),tt.__version=$.version,$.onUpdate&&$.onUpdate($)}function Kt(tt,$,It){if($.image.length!==6)return;Mt(tt,$),r.activeTexture(33984+It),r.bindTexture(34067,tt.__webglTexture),e.pixelStorei(37440,$.flipY),e.pixelStorei(37441,$.premultiplyAlpha),e.pixelStorei(3317,$.unpackAlignment),e.pixelStorei(37443,0);let $t=$&&($.isCompressedTexture||$.image[0].isCompressedTexture),he=$.image[0]&&$.image[0].isDataTexture,Tt=[];for(let Pt=0;Pt<6;Pt++)!$t&&!he?Tt[Pt]=x($.image[Pt],!1,!0,c):Tt[Pt]=he?$.image[Pt].image:$.image[Pt],Tt[Pt]=ie($,Tt[Pt]);let be=Tt[0],nt=b(be)||s,Ct=o.convert($.format,$.encoding),Wt=o.convert($.type),fe=k($.internalFormat,Ct,Wt,$.encoding),at=s&&$.isVideoTexture!==!0,se=tt.__version===void 0,Qt=O($,be,nt);bt(34067,$,nt);let Ce;if($t){at&&se&&r.texStorage2D(34067,Qt,fe,be.width,be.height);for(let Pt=0;Pt<6;Pt++){Ce=Tt[Pt].mipmaps;for(let Nt=0;Nt<Ce.length;Nt++){let ze=Ce[Nt];$.format!==Qo?Ct!==null?at?r.compressedTexSubImage2D(34069+Pt,Nt,0,0,ze.width,ze.height,Ct,ze.data):r.compressedTexImage2D(34069+Pt,Nt,fe,ze.width,ze.height,0,ze.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):at?r.texSubImage2D(34069+Pt,Nt,0,0,ze.width,ze.height,Ct,Wt,ze.data):r.texImage2D(34069+Pt,Nt,fe,ze.width,ze.height,0,Ct,Wt,ze.data)}}}else{Ce=$.mipmaps,at&&se&&(Ce.length>0&&Qt++,r.texStorage2D(34067,Qt,fe,Tt[0].width,Tt[0].height));for(let Pt=0;Pt<6;Pt++)if(he){at?r.texSubImage2D(34069+Pt,0,0,0,Tt[Pt].width,Tt[Pt].height,Ct,Wt,Tt[Pt].data):r.texImage2D(34069+Pt,0,fe,Tt[Pt].width,Tt[Pt].height,0,Ct,Wt,Tt[Pt].data);for(let Nt=0;Nt<Ce.length;Nt++){let yn=Ce[Nt].image[Pt].image;at?r.texSubImage2D(34069+Pt,Nt+1,0,0,yn.width,yn.height,Ct,Wt,yn.data):r.texImage2D(34069+Pt,Nt+1,fe,yn.width,yn.height,0,Ct,Wt,yn.data)}}else{at?r.texSubImage2D(34069+Pt,0,0,0,Ct,Wt,Tt[Pt]):r.texImage2D(34069+Pt,0,fe,Ct,Wt,Tt[Pt]);for(let Nt=0;Nt<Ce.length;Nt++){let ze=Ce[Nt];at?r.texSubImage2D(34069+Pt,Nt+1,0,0,Ct,Wt,ze.image[Pt]):r.texImage2D(34069+Pt,Nt+1,fe,Ct,Wt,ze.image[Pt])}}}C($,nt)&&P(34067),tt.__version=$.version,$.onUpdate&&$.onUpdate($)}function _t(tt,$,It,$t,he){let Tt=o.convert(It.format,It.encoding),be=o.convert(It.type),nt=k(It.internalFormat,Tt,be,It.encoding);n.get($).__hasExternalTextures||(he===32879||he===35866?r.texImage3D(he,0,nt,$.width,$.height,$.depth,0,Tt,be,null):r.texImage2D(he,0,nt,$.width,$.height,0,Tt,be,null)),r.bindFramebuffer(36160,tt),$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,$t,he,n.get(It).__webglTexture,0,wt($)):e.framebufferTexture2D(36160,$t,he,n.get(It).__webglTexture,0),r.bindFramebuffer(36160,null)}function ct(tt,$,It){if(e.bindRenderbuffer(36161,tt),$.depthBuffer&&!$.stencilBuffer){let $t=33189;if(It||$.useRenderToTexture){let he=$.depthTexture;he&&he.isDepthTexture&&(he.type===Xd?$t=36012:he.type===VP&&($t=33190));let Tt=wt($);$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,Tt,$t,$.width,$.height):e.renderbufferStorageMultisample(36161,Tt,$t,$.width,$.height)}else e.renderbufferStorage(36161,$t,$.width,$.height);e.framebufferRenderbuffer(36160,36096,36161,tt)}else if($.depthBuffer&&$.stencilBuffer){let $t=wt($);It&&$.useRenderbuffer?e.renderbufferStorageMultisample(36161,$t,35056,$.width,$.height):$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,$t,35056,$.width,$.height):e.renderbufferStorage(36161,34041,$.width,$.height),e.framebufferRenderbuffer(36160,33306,36161,tt)}else{let $t=$.isWebGLMultipleRenderTargets===!0?$.texture[0]:$.texture,he=o.convert($t.format,$t.encoding),Tt=o.convert($t.type),be=k($t.internalFormat,he,Tt,$t.encoding),nt=wt($);It&&$.useRenderbuffer?e.renderbufferStorageMultisample(36161,nt,be,$.width,$.height):$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,nt,be,$.width,$.height):e.renderbufferStorage(36161,be,$.width,$.height)}e.bindRenderbuffer(36161,null)}function X(tt,$){if($&&$.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(r.bindFramebuffer(36160,tt),!($.depthTexture&&$.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get($.depthTexture).__webglTexture||$.depthTexture.image.width!==$.width||$.depthTexture.image.height!==$.height)&&($.depthTexture.image.width=$.width,$.depthTexture.image.height=$.height,$.depthTexture.needsUpdate=!0),W($.depthTexture,0);let $t=n.get($.depthTexture).__webglTexture,he=wt($);if($.depthTexture.format===F0)$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,36096,3553,$t,0,he):e.framebufferTexture2D(36160,36096,3553,$t,0);else if($.depthTexture.format===R1)$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,33306,3553,$t,0,he):e.framebufferTexture2D(36160,33306,3553,$t,0);else throw new Error("Unknown depthTexture format")}function et(tt){let $=n.get(tt),It=tt.isWebGLCubeRenderTarget===!0;if(tt.depthTexture&&!$.__autoAllocateDepthBuffer){if(It)throw new Error("target.depthTexture not supported in Cube render targets");X($.__webglFramebuffer,tt)}else if(It){$.__webglDepthbuffer=[];for(let $t=0;$t<6;$t++)r.bindFramebuffer(36160,$.__webglFramebuffer[$t]),$.__webglDepthbuffer[$t]=e.createRenderbuffer(),ct($.__webglDepthbuffer[$t],tt,!1)}else r.bindFramebuffer(36160,$.__webglFramebuffer),$.__webglDepthbuffer=e.createRenderbuffer(),ct($.__webglDepthbuffer,tt,!1);r.bindFramebuffer(36160,null)}function dt(tt,$,It){let $t=n.get(tt);$!==void 0&&_t($t.__webglFramebuffer,tt,tt.texture,36064,3553),It!==void 0&&et(tt)}function q(tt){let $=tt.texture,It=n.get(tt),$t=n.get($);tt.addEventListener("dispose",I),tt.isWebGLMultipleRenderTargets!==!0&&($t.__webglTexture===void 0&&($t.__webglTexture=e.createTexture()),$t.__version=$.version,a.memory.textures++);let he=tt.isWebGLCubeRenderTarget===!0,Tt=tt.isWebGLMultipleRenderTargets===!0,be=$.isDataTexture3D||$.isDataTexture2DArray,nt=b(tt)||s;if(he){It.__webglFramebuffer=[];for(let Ct=0;Ct<6;Ct++)It.__webglFramebuffer[Ct]=e.createFramebuffer()}else if(It.__webglFramebuffer=e.createFramebuffer(),Tt)if(i.drawBuffers){let Ct=tt.texture;for(let Wt=0,fe=Ct.length;Wt<fe;Wt++){let at=n.get(Ct[Wt]);at.__webglTexture===void 0&&(at.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(tt.useRenderbuffer)if(s){It.__webglMultisampledFramebuffer=e.createFramebuffer(),It.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,It.__webglColorRenderbuffer);let Ct=o.convert($.format,$.encoding),Wt=o.convert($.type),fe=k($.internalFormat,Ct,Wt,$.encoding),at=wt(tt);e.renderbufferStorageMultisample(36161,at,fe,tt.width,tt.height),r.bindFramebuffer(36160,It.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,It.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),tt.depthBuffer&&(It.__webglDepthRenderbuffer=e.createRenderbuffer(),ct(It.__webglDepthRenderbuffer,tt,!0)),r.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(he){r.bindTexture(34067,$t.__webglTexture),bt(34067,$,nt);for(let Ct=0;Ct<6;Ct++)_t(It.__webglFramebuffer[Ct],tt,$,36064,34069+Ct);C($,nt)&&P(34067),r.unbindTexture()}else if(Tt){let Ct=tt.texture;for(let Wt=0,fe=Ct.length;Wt<fe;Wt++){let at=Ct[Wt],se=n.get(at);r.bindTexture(3553,se.__webglTexture),bt(3553,at,nt),_t(It.__webglFramebuffer,tt,at,36064+Wt,3553),C(at,nt)&&P(3553)}r.unbindTexture()}else{let Ct=3553;be&&(s?Ct=$.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),r.bindTexture(Ct,$t.__webglTexture),bt(Ct,$,nt),_t(It.__webglFramebuffer,tt,$,36064,Ct),C($,nt)&&P(Ct),r.unbindTexture()}tt.depthBuffer&&et(tt)}function pt(tt){let $=b(tt)||s,It=tt.isWebGLMultipleRenderTargets===!0?tt.texture:[tt.texture];for(let $t=0,he=It.length;$t<he;$t++){let Tt=It[$t];if(C(Tt,$)){let be=tt.isWebGLCubeRenderTarget?34067:3553,nt=n.get(Tt).__webglTexture;r.bindTexture(be,nt),P(be),r.unbindTexture()}}}function ht(tt){if(tt.useRenderbuffer)if(s){let $=tt.width,It=tt.height,$t=16384,he=[36064],Tt=tt.stencilBuffer?33306:36096;tt.depthBuffer&&he.push(Tt),tt.ignoreDepthForMultisampleCopy||(tt.depthBuffer&&($t|=256),tt.stencilBuffer&&($t|=1024));let be=n.get(tt);r.bindFramebuffer(36008,be.__webglMultisampledFramebuffer),r.bindFramebuffer(36009,be.__webglFramebuffer),tt.ignoreDepthForMultisampleCopy&&(e.invalidateFramebuffer(36008,[Tt]),e.invalidateFramebuffer(36009,[Tt])),e.blitFramebuffer(0,0,$,It,0,0,$,It,$t,9728),e.invalidateFramebuffer(36008,he),r.bindFramebuffer(36008,null),r.bindFramebuffer(36009,be.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")}function wt(tt){return s&&(tt.useRenderbuffer||tt.useRenderToTexture)?Math.min(h,tt.samples):0}function kt(tt){let $=a.render.frame;d.get(tt)!==$&&(d.set(tt,$),tt.update())}function ie(tt,$){let It=tt.encoding,$t=tt.format,he=tt.type;return tt.isCompressedTexture===!0||tt.isVideoTexture===!0||tt.format===sU||It!==tm&&(It===Yn?s===!1?t.has("EXT_sRGB")===!0&&$t===Qo?(tt.format=sU,tt.minFilter=ii,tt.generateMipmaps=!1):$=Zf.sRGBToLinear($):($t!==Qo||he!==Jd)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",It)),$}let ee=!1,Le=!1;function ar(tt,$){tt&&tt.isWebGLRenderTarget&&(ee===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ee=!0),tt=tt.texture),W(tt,$)}function fr(tt,$){tt&&tt.isWebGLCubeRenderTarget&&(Le===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Le=!0),tt=tt.texture),ot(tt,$)}this.allocateTextureUnit=U,this.resetTextureUnits=z,this.setTexture2D=W,this.setTexture2DArray=Z,this.setTexture3D=rt,this.setTextureCube=ot,this.rebindTextures=dt,this.setupRenderTarget=q,this.updateRenderTargetMipmap=pt,this.updateMultisampleRenderTarget=ht,this.setupDepthRenderbuffer=et,this.setupFrameBufferTexture=_t,this.safeSetTexture2D=ar,this.safeSetTextureCube=fr}function Qfe(e,t,r){let n=r.isWebGL2;function i(o,a=null){let s;if(o===Jd)return 5121;if(o===yfe)return 32819;if(o===vfe)return 32820;if(o===mfe)return 5120;if(o===gfe)return 5122;if(o===G3)return 5123;if(o===_fe)return 5124;if(o===VP)return 5125;if(o===Xd)return 5126;if(o===A1)return n?5131:(s=t.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(o===xfe)return 6406;if(o===Qo)return 6408;if(o===bfe)return 6409;if(o===wfe)return 6410;if(o===F0)return 6402;if(o===R1)return 34041;if(o===Sfe)return 6403;if(o===sU)return s=t.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(o===Mfe)return 36244;if(o===Efe)return 33319;if(o===Tfe)return 33320;if(o===Cfe)return 36249;if(o===JV||o===QV||o===tU||o===eU)if(a===Yn)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(o===JV)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===tU)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===eU)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(o===JV)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===tU)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===eU)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===Put||o===Iut||o===Lut||o===kut)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(o===Put)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===Iut)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===Lut)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===kut)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===Afe)return s=t.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===Rut||o===Nut)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(o===Rut)return a===Yn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===Nut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===Dut||o===Out||o===zut||o===Fut||o===But||o===Hut||o===Vut||o===Uut||o===qut||o===Gut||o===Wut||o===Yut||o===jut||o===Xut)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(o===Dut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===Out)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===zut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===Fut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===But)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===Hut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===Vut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===Uut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===qut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===Gut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===Wut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===Yut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===jut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===Xut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===$ut)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(o===$ut)return a===Yn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(o===P1)return n?34042:(s=t.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null)}return{convert:i}}var n6=class extends Ui{constructor(t=[]){super(),this.cameras=t}};n6.prototype.isArrayCamera=!0;var $d=class extends or{constructor(){super(),this.type="Group"}};$d.prototype.isGroup=!0;var kgr={type:"move"},qP=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new $d,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new $d,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new j,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new j),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new $d,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new j,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new j),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,r,n){let i=null,o=null,a=null,s=this._targetRay,l=this._grip,c=this._hand;if(t&&r.session.visibilityState!=="visible-blurred")if(s!==null&&(i=r.getPose(t.targetRaySpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(kgr))),c&&t.hand){a=!0;for(let g of t.hand.values()){let _=r.getJointPose(g,n);if(c.joints[g.jointName]===void 0){let x=new $d;x.matrixAutoUpdate=!1,x.visible=!1,c.joints[g.jointName]=x,c.add(x)}let y=c.joints[g.jointName];_!==null&&(y.matrix.fromArray(_.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.jointRadius=_.radius),y.visible=_!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],f=u.position.distanceTo(h.position),p=.02,d=.005;c.inputState.pinching&&f>p+d?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=p-d&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(o=r.getPose(t.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=a!==null),this}},nM=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u){if(u=u!==void 0?u:F0,u!==F0&&u!==R1)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&u===F0&&(n=G3),n===void 0&&u===R1&&(n=P1),super(null,i,o,a,s,l,u,n,c),this.image={width:t,height:r},this.magFilter=s!==void 0?s:Li,this.minFilter=l!==void 0?l:Li,this.flipY=!1,this.generateMipmaps=!1}};nM.prototype.isDepthTexture=!0;var eht=class extends qs{constructor(t,r){super();let n=this,i=null,o=1,a=null,s="local-floor",l=t.extensions.has("WEBGL_multisampled_render_to_texture"),c=null,u=null,h=null,f=null,p=!1,d=null,g=r.getContextAttributes(),_=null,y=null,x=[],b=new Map,S=new Ui;S.layers.enable(1),S.viewport=new en;let C=new Ui;C.layers.enable(2),C.viewport=new en;let P=[S,C],k=new n6;k.layers.enable(1),k.layers.enable(2);let O=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getTargetRaySpace()},this.getControllerGrip=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getGripSpace()},this.getHand=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getHandSpace()};function B(ot){let st=b.get(ot.inputSource);st&&st.dispatchEvent({type:ot.type,data:ot.inputSource})}function I(){b.forEach(function(ot,st){ot.disconnect(st)}),b.clear(),O=null,D=null,t.setRenderTarget(_),f=null,h=null,u=null,i=null,y=null,rt.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ot){o=ot,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ot){s=ot,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:f},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return i},this.setSession=function(ot){return Ri(this,null,function*(){if(i=ot,i!==null){if(_=t.getRenderTarget(),i.addEventListener("select",B),i.addEventListener("selectstart",B),i.addEventListener("selectend",B),i.addEventListener("squeeze",B),i.addEventListener("squeezestart",B),i.addEventListener("squeezeend",B),i.addEventListener("end",I),i.addEventListener("inputsourceschange",L),g.xrCompatible!==!0&&(yield r.makeXRCompatible()),i.renderState.layers===void 0||t.capabilities.isWebGL2===!1){let st={antialias:i.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:o};f=new XRWebGLLayer(i,r,st),i.updateRenderState({baseLayer:f}),y=new hs(f.framebufferWidth,f.framebufferHeight,{format:Qo,type:Jd,encoding:t.outputEncoding})}else{p=g.antialias;let st=null,St=null,bt=null;g.depth&&(bt=g.stencil?35056:33190,st=g.stencil?R1:F0,St=g.stencil?P1:G3);let Mt={colorFormat:t.outputEncoding===Yn?35907:32856,depthFormat:bt,scaleFactor:o};u=new XRWebGLBinding(i,r),h=u.createProjectionLayer(Mt),i.updateRenderState({layers:[h]}),p?y=new j3(h.textureWidth,h.textureHeight,{format:Qo,type:Jd,depthTexture:new nM(h.textureWidth,h.textureHeight,St,void 0,void 0,void 0,void 0,void 0,void 0,st),stencilBuffer:g.stencil,ignoreDepth:h.ignoreDepthValues,useRenderToTexture:l,encoding:t.outputEncoding}):y=new hs(h.textureWidth,h.textureHeight,{format:Qo,type:Jd,depthTexture:new nM(h.textureWidth,h.textureHeight,St,void 0,void 0,void 0,void 0,void 0,void 0,st),stencilBuffer:g.stencil,ignoreDepth:h.ignoreDepthValues,encoding:t.outputEncoding})}y.isXRRenderTarget=!0,this.setFoveation(1),a=yield i.requestReferenceSpace(s),rt.setContext(i),rt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function L(ot){let st=i.inputSources;for(let St=0;St<x.length;St++)b.set(st[St],x[St]);for(let St=0;St<ot.removed.length;St++){let bt=ot.removed[St],Mt=b.get(bt);Mt&&(Mt.dispatchEvent({type:"disconnected",data:bt}),b.delete(bt))}for(let St=0;St<ot.added.length;St++){let bt=ot.added[St],Mt=b.get(bt);Mt&&Mt.dispatchEvent({type:"connected",data:bt})}}let R=new j,F=new j;function z(ot,st,St){R.setFromMatrixPosition(st.matrixWorld),F.setFromMatrixPosition(St.matrixWorld);let bt=R.distanceTo(F),Mt=st.projectionMatrix.elements,lt=St.projectionMatrix.elements,Kt=Mt[14]/(Mt[10]-1),_t=Mt[14]/(Mt[10]+1),ct=(Mt[9]+1)/Mt[5],X=(Mt[9]-1)/Mt[5],et=(Mt[8]-1)/Mt[0],dt=(lt[8]+1)/lt[0],q=Kt*et,pt=Kt*dt,ht=bt/(-et+dt),wt=ht*-et;st.matrixWorld.decompose(ot.position,ot.quaternion,ot.scale),ot.translateX(wt),ot.translateZ(ht),ot.matrixWorld.compose(ot.position,ot.quaternion,ot.scale),ot.matrixWorldInverse.copy(ot.matrixWorld).invert();let kt=Kt+ht,ie=_t+ht,ee=q-wt,Le=pt+(bt-wt),ar=ct*_t/ie*kt,fr=X*_t/ie*kt;ot.projectionMatrix.makePerspective(ee,Le,ar,fr,kt,ie)}function U(ot,st){st===null?ot.matrixWorld.copy(ot.matrix):ot.matrixWorld.multiplyMatrices(st.matrixWorld,ot.matrix),ot.matrixWorldInverse.copy(ot.matrixWorld).invert()}this.updateCamera=function(ot){if(i===null)return;k.near=C.near=S.near=ot.near,k.far=C.far=S.far=ot.far,(O!==k.near||D!==k.far)&&(i.updateRenderState({depthNear:k.near,depthFar:k.far}),O=k.near,D=k.far);let st=ot.parent,St=k.cameras;U(k,st);for(let Mt=0;Mt<St.length;Mt++)U(St[Mt],st);k.matrixWorld.decompose(k.position,k.quaternion,k.scale),ot.position.copy(k.position),ot.quaternion.copy(k.quaternion),ot.scale.copy(k.scale),ot.matrix.copy(k.matrix),ot.matrixWorld.copy(k.matrixWorld);let bt=ot.children;for(let Mt=0,lt=bt.length;Mt<lt;Mt++)bt[Mt].updateMatrixWorld(!0);St.length===2?z(k,S,C):k.projectionMatrix.copy(S.projectionMatrix)},this.getCamera=function(){return k},this.getFoveation=function(){if(h!==null)return h.fixedFoveation;if(f!==null)return f.fixedFoveation},this.setFoveation=function(ot){h!==null&&(h.fixedFoveation=ot),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=ot)};let W=null;function Z(ot,st){if(c=st.getViewerPose(a),d=st,c!==null){let bt=c.views;f!==null&&(t.setRenderTargetFramebuffer(y,f.framebuffer),t.setRenderTarget(y));let Mt=!1;bt.length!==k.cameras.length&&(k.cameras.length=0,Mt=!0);for(let lt=0;lt<bt.length;lt++){let Kt=bt[lt],_t=null;if(f!==null)_t=f.getViewport(Kt);else{let X=u.getViewSubImage(h,Kt);_t=X.viewport,lt===0&&(t.setRenderTargetTextures(y,X.colorTexture,h.ignoreDepthValues?void 0:X.depthStencilTexture),t.setRenderTarget(y))}let ct=P[lt];ct.matrix.fromArray(Kt.transform.matrix),ct.projectionMatrix.fromArray(Kt.projectionMatrix),ct.viewport.set(_t.x,_t.y,_t.width,_t.height),lt===0&&k.matrix.copy(ct.matrix),Mt===!0&&k.cameras.push(ct)}}let St=i.inputSources;for(let bt=0;bt<x.length;bt++){let Mt=x[bt],lt=St[bt];Mt.update(lt,st,a)}W&&W(ot,st),d=null}let rt=new Ufe;rt.setAnimationLoop(Z),this.setAnimationLoop=function(ot){W=ot},this.dispose=function(){}}};function Rgr(e){function t(y,x){y.fogColor.value.copy(x.color),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)}function r(y,x,b,S,C){x.isMeshBasicMaterial?n(y,x):x.isMeshLambertMaterial?(n(y,x),l(y,x)):x.isMeshToonMaterial?(n(y,x),u(y,x)):x.isMeshPhongMaterial?(n(y,x),c(y,x)):x.isMeshStandardMaterial?(n(y,x),x.isMeshPhysicalMaterial?f(y,x,C):h(y,x)):x.isMeshMatcapMaterial?(n(y,x),p(y,x)):x.isMeshDepthMaterial?(n(y,x),d(y,x)):x.isMeshDistanceMaterial?(n(y,x),g(y,x)):x.isMeshNormalMaterial?(n(y,x),_(y,x)):x.isLineBasicMaterial?(i(y,x),x.isLineDashedMaterial&&o(y,x)):x.isPointsMaterial?a(y,x,b,S):x.isSpriteMaterial?s(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function n(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let b=e.get(x).envMap;b&&(y.envMap.value=b,y.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap&&(y.lightMap.value=x.lightMap,y.lightMapIntensity.value=x.lightMapIntensity),x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity);let S;x.map?S=x.map:x.specularMap?S=x.specularMap:x.displacementMap?S=x.displacementMap:x.normalMap?S=x.normalMap:x.bumpMap?S=x.bumpMap:x.roughnessMap?S=x.roughnessMap:x.metalnessMap?S=x.metalnessMap:x.alphaMap?S=x.alphaMap:x.emissiveMap?S=x.emissiveMap:x.clearcoatMap?S=x.clearcoatMap:x.clearcoatNormalMap?S=x.clearcoatNormalMap:x.clearcoatRoughnessMap?S=x.clearcoatRoughnessMap:x.specularIntensityMap?S=x.specularIntensityMap:x.specularColorMap?S=x.specularColorMap:x.transmissionMap?S=x.transmissionMap:x.thicknessMap?S=x.thicknessMap:x.sheenColorMap?S=x.sheenColorMap:x.sheenRoughnessMap&&(S=x.sheenRoughnessMap),S!==void 0&&(S.isWebGLRenderTarget&&(S=S.texture),S.matrixAutoUpdate===!0&&S.updateMatrix(),y.uvTransform.value.copy(S.matrix));let C;x.aoMap?C=x.aoMap:x.lightMap&&(C=x.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),y.uv2Transform.value.copy(C.matrix))}function i(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}function o(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}function a(y,x,b,S){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*b,y.scale.value=S*.5,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let C;x.map?C=x.map:x.alphaMap&&(C=x.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),y.uvTransform.value.copy(C.matrix))}function s(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let b;x.map?b=x.map:x.alphaMap&&(b=x.alphaMap),b!==void 0&&(b.matrixAutoUpdate===!0&&b.updateMatrix(),y.uvTransform.value.copy(b.matrix))}function l(y,x){x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap)}function c(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function u(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function h(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),e.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}function f(y,x,b){h(y,x),y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Ii&&y.clearcoatNormalScale.value.negate())),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}function p(y,x){x.matcap&&(y.matcap.value=x.matcap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function d(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function g(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}function _(y,x){x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}return{refreshFogUniforms:t,refreshMaterialUniforms:r}}function Ngr(){let e=t6("canvas");return e.style.display="block",e}function rn(e={}){let t=e.canvas!==void 0?e.canvas:Ngr(),r=e.context!==void 0?e.context:null,n=e.alpha!==void 0?e.alpha:!1,i=e.depth!==void 0?e.depth:!0,o=e.stencil!==void 0?e.stencil:!0,a=e.antialias!==void 0?e.antialias:!1,s=e.premultipliedAlpha!==void 0?e.premultipliedAlpha:!0,l=e.preserveDrawingBuffer!==void 0?e.preserveDrawingBuffer:!1,c=e.powerPreference!==void 0?e.powerPreference:"default",u=e.failIfMajorPerformanceCaveat!==void 0?e.failIfMajorPerformanceCaveat:!1,h=null,f=null,p=[],d=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=tm,this.physicallyCorrectLights=!1,this.toneMapping=Zd,this.toneMappingExposure=1;let g=this,_=!1,y=0,x=0,b=null,S=-1,C=null,P=new en,k=new en,O=null,D=t.width,B=t.height,I=1,L=null,R=null,F=new en(0,0,D,B),z=new en(0,0,D,B),U=!1,W=new D1,Z=!1,rt=!1,ot=null,st=new Me,St=new j,bt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Mt(){return b===null?I:1}let lt=r;function Kt(K,gt){for(let Et=0;Et<K.length;Et++){let xt=K[Et],Ft=t.getContext(xt,gt);if(Ft!==null)return Ft}return null}try{let K={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${jU}`),t.addEventListener("webglcontextlost",fe,!1),t.addEventListener("webglcontextrestored",at,!1),lt===null){let gt=["webgl2","webgl","experimental-webgl"];if(g.isWebGL1Renderer===!0&&gt.shift(),lt=Kt(gt,K),lt===null)throw Kt(gt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}lt.getShaderPrecisionFormat===void 0&&(lt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(K){throw console.error("THREE.WebGLRenderer: "+K.message),K}let _t,ct,X,et,dt,q,pt,ht,wt,kt,ie,ee,Le,ar,fr,tt,$,It,$t,he,Tt,be,nt;function Ct(){_t=new nmr(lt),ct=new Zdr(lt,_t,e),_t.init(ct),be=new Qfe(lt,_t,ct),X=new Igr(lt,_t,ct),et=new amr(lt),dt=new vgr,q=new Lgr(lt,_t,X,dt,ct,be,et),pt=new Qdr(g),ht=new rmr(g),wt=new bfr(lt,ct),nt=new $dr(lt,_t,wt,ct),kt=new imr(lt,wt,et,nt),ie=new umr(lt,kt,wt,et),$t=new cmr(lt,ct,q),tt=new Jdr(dt),ee=new ygr(g,pt,ht,_t,ct,nt,tt),Le=new Rgr(dt),ar=new bgr,fr=new Cgr(_t,ct),It=new Xdr(g,pt,X,ie,n,s),$=new Jfe(g,ie,ct),he=new Kdr(lt,_t,et,ct),Tt=new omr(lt,_t,et,ct),et.programs=ee.programs,g.capabilities=ct,g.extensions=_t,g.properties=dt,g.renderLists=ar,g.shadowMap=$,g.state=X,g.info=et}Ct();let Wt=new eht(g,lt);this.xr=Wt,this.getContext=function(){return lt},this.getContextAttributes=function(){return lt.getContextAttributes()},this.forceContextLoss=function(){let K=_t.get("WEBGL_lose_context");K&&K.loseContext()},this.forceContextRestore=function(){let K=_t.get("WEBGL_lose_context");K&&K.restoreContext()},this.getPixelRatio=function(){return I},this.setPixelRatio=function(K){K!==void 0&&(I=K,this.setSize(D,B,!1))},this.getSize=function(K){return K.set(D,B)},this.setSize=function(K,gt,Et){if(Wt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}D=K,B=gt,t.width=Math.floor(K*I),t.height=Math.floor(gt*I),Et!==!1&&(t.style.width=K+"px",t.style.height=gt+"px"),this.setViewport(0,0,K,gt)},this.getDrawingBufferSize=function(K){return K.set(D*I,B*I).floor()},this.setDrawingBufferSize=function(K,gt,Et){D=K,B=gt,I=Et,t.width=Math.floor(K*Et),t.height=Math.floor(gt*Et),this.setViewport(0,0,K,gt)},this.getCurrentViewport=function(K){return K.copy(P)},this.getViewport=function(K){return K.copy(F)},this.setViewport=function(K,gt,Et,xt){K.isVector4?F.set(K.x,K.y,K.z,K.w):F.set(K,gt,Et,xt),X.viewport(P.copy(F).multiplyScalar(I).floor())},this.getScissor=function(K){return K.copy(z)},this.setScissor=function(K,gt,Et,xt){K.isVector4?z.set(K.x,K.y,K.z,K.w):z.set(K,gt,Et,xt),X.scissor(k.copy(z).multiplyScalar(I).floor())},this.getScissorTest=function(){return U},this.setScissorTest=function(K){X.setScissorTest(U=K)},this.setOpaqueSort=function(K){L=K},this.setTransparentSort=function(K){R=K},this.getClearColor=function(K){return K.copy(It.getClearColor())},this.setClearColor=function(){It.setClearColor.apply(It,arguments)},this.getClearAlpha=function(){return It.getClearAlpha()},this.setClearAlpha=function(){It.setClearAlpha.apply(It,arguments)},this.clear=function(K,gt,Et){let xt=0;(K===void 0||K)&&(xt|=16384),(gt===void 0||gt)&&(xt|=256),(Et===void 0||Et)&&(xt|=1024),lt.clear(xt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",fe,!1),t.removeEventListener("webglcontextrestored",at,!1),ar.dispose(),fr.dispose(),dt.dispose(),pt.dispose(),ht.dispose(),ie.dispose(),nt.dispose(),ee.dispose(),Wt.dispose(),Wt.removeEventListener("sessionstart",ze),Wt.removeEventListener("sessionend",yn),ot&&(ot.dispose(),ot=null),Wi.stop()};function fe(K){K.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function at(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;let K=et.autoReset,gt=$.enabled,Et=$.autoUpdate,xt=$.needsUpdate,Ft=$.type;Ct(),et.autoReset=K,$.enabled=gt,$.autoUpdate=Et,$.needsUpdate=xt,$.type=Ft}function se(K){let gt=K.target;gt.removeEventListener("dispose",se),Qt(gt)}function Qt(K){Ce(K),dt.remove(K)}function Ce(K){let gt=dt.get(K).programs;gt!==void 0&&(gt.forEach(function(Et){ee.releaseProgram(Et)}),K.isShaderMaterial&&ee.releaseShaderCache(K))}this.renderBufferDirect=function(K,gt,Et,xt,Ft,Ve){gt===null&&(gt=bt);let Ue=Ft.isMesh&&Ft.matrixWorld.determinant()<0,tr=cn(K,gt,Et,xt,Ft);X.setMaterial(xt,Ue);let Ke=Et.index,Xr=Et.attributes.position;if(Ke===null){if(Xr===void 0||Xr.count===0)return}else if(Ke.count===0)return;let _r=1;xt.wireframe===!0&&(Ke=kt.getWireframeAttribute(Et),_r=2),nt.setup(Ft,xt,tr,Et,Ke);let Pr,Xn=he;Ke!==null&&(Pr=wt.get(Ke),Xn=Tt,Xn.setIndex(Pr));let ip=Ke!==null?Ke.count:Xr.count,hm=Et.drawRange.start*_r,mr=Et.drawRange.count*_r,Bl=Ve!==null?Ve.start*_r:0,$n=Ve!==null?Ve.count*_r:1/0,Hl=Math.max(hm,Bl),hx=Math.min(ip,hm+mr,Bl+$n)-1,Vl=Math.max(0,hx-Hl+1);if(Vl!==0){if(Ft.isMesh)xt.wireframe===!0?(X.setLineWidth(xt.wireframeLinewidth*Mt()),Xn.setMode(1)):Xn.setMode(4);else if(Ft.isLine){let Ul=xt.linewidth;Ul===void 0&&(Ul=1),X.setLineWidth(Ul*Mt()),Ft.isLineSegments?Xn.setMode(1):Ft.isLineLoop?Xn.setMode(2):Xn.setMode(3)}else Ft.isPoints?Xn.setMode(0):Ft.isSprite&&Xn.setMode(4);if(Ft.isInstancedMesh)Xn.renderInstances(Hl,Vl,Ft.count);else if(Et.isInstancedBufferGeometry){let Ul=Math.min(Et.instanceCount,Et._maxInstanceCount);Xn.renderInstances(Hl,Vl,Ul)}else Xn.render(Hl,Vl)}},this.compile=function(K,gt){f=fr.get(K),f.init(),d.push(f),K.traverseVisible(function(Et){Et.isLight&&Et.layers.test(gt.layers)&&(f.pushLight(Et),Et.castShadow&&f.pushShadow(Et))}),f.setupLights(g.physicallyCorrectLights),K.traverse(function(Et){let xt=Et.material;if(xt)if(Array.isArray(xt))for(let Ft=0;Ft<xt.length;Ft++){let Ve=xt[Ft];um(Ve,K,Et)}else um(xt,K,Et)}),d.pop(),f=null};let Pt=null;function Nt(K){Pt&&Pt(K)}function ze(){Wi.stop()}function yn(){Wi.start()}let Wi=new Ufe;Wi.setAnimationLoop(Nt),typeof window!="undefined"&&Wi.setContext(window),this.setAnimationLoop=function(K){Pt=K,Wt.setAnimationLoop(K),K===null?Wi.stop():Wi.start()},Wt.addEventListener("sessionstart",ze),Wt.addEventListener("sessionend",yn),this.render=function(K,gt){if(gt!==void 0&&gt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_===!0)return;K.autoUpdate===!0&&K.updateMatrixWorld(),gt.parent===null&&gt.updateMatrixWorld(),Wt.enabled===!0&&Wt.isPresenting===!0&&(Wt.cameraAutoUpdate===!0&&Wt.updateCamera(gt),gt=Wt.getCamera()),K.isScene===!0&&K.onBeforeRender(g,K,gt,b),f=fr.get(K,d.length),f.init(),d.push(f),st.multiplyMatrices(gt.projectionMatrix,gt.matrixWorldInverse),W.setFromProjectionMatrix(st),rt=this.localClippingEnabled,Z=tt.init(this.clippingPlanes,rt,gt),h=ar.get(K,p.length),h.init(),p.push(h),Ar(K,gt,0,g.sortObjects),h.finish(),g.sortObjects===!0&&h.sort(L,R),Z===!0&&tt.beginShadows();let Et=f.state.shadowsArray;if($.render(Et,K,gt),Z===!0&&tt.endShadows(),this.info.autoReset===!0&&this.info.reset(),It.render(h,K),f.setupLights(g.physicallyCorrectLights),gt.isArrayCamera){let xt=gt.cameras;for(let Ft=0,Ve=xt.length;Ft<Ve;Ft++){let Ue=xt[Ft];Ia(h,K,Ue,Ue.viewport)}}else Ia(h,K,gt);b!==null&&(q.updateMultisampleRenderTarget(b),q.updateRenderTargetMipmap(b)),K.isScene===!0&&K.onAfterRender(g,K,gt),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1),nt.resetDefaultState(),S=-1,C=null,d.pop(),d.length>0?f=d[d.length-1]:f=null,p.pop(),p.length>0?h=p[p.length-1]:h=null};function Ar(K,gt,Et,xt){if(K.visible===!1)return;if(K.layers.test(gt.layers)){if(K.isGroup)Et=K.renderOrder;else if(K.isLOD)K.autoUpdate===!0&&K.update(gt);else if(K.isLight)f.pushLight(K),K.castShadow&&f.pushShadow(K);else if(K.isSprite){if(!K.frustumCulled||W.intersectsSprite(K)){xt&&St.setFromMatrixPosition(K.matrixWorld).applyMatrix4(st);let Ue=ie.update(K),tr=K.material;tr.visible&&h.push(K,Ue,tr,Et,St.z,null)}}else if((K.isMesh||K.isLine||K.isPoints)&&(K.isSkinnedMesh&&K.skeleton.frame!==et.render.frame&&(K.skeleton.update(),K.skeleton.frame=et.render.frame),!K.frustumCulled||W.intersectsObject(K))){xt&&St.setFromMatrixPosition(K.matrixWorld).applyMatrix4(st);let Ue=ie.update(K),tr=K.material;if(Array.isArray(tr)){let Ke=Ue.groups;for(let Xr=0,_r=Ke.length;Xr<_r;Xr++){let Pr=Ke[Xr],Xn=tr[Pr.materialIndex];Xn&&Xn.visible&&h.push(K,Ue,Xn,Et,St.z,Pr)}}else tr.visible&&h.push(K,Ue,tr,Et,St.z,null)}}let Ve=K.children;for(let Ue=0,tr=Ve.length;Ue<tr;Ue++)Ar(Ve[Ue],gt,Et,xt)}function Ia(K,gt,Et,xt){let Ft=K.opaque,Ve=K.transmissive,Ue=K.transparent;f.setupLightsView(Et),Ve.length>0&&ho(Ft,gt,Et),xt&&X.viewport(P.copy(xt)),Ft.length>0&&La(Ft,gt,Et),Ve.length>0&&La(Ve,gt,Et),Ue.length>0&&La(Ue,gt,Et)}function ho(K,gt,Et){if(ot===null){let Ue=a===!0&&ct.isWebGL2===!0?j3:hs;ot=new Ue(1024,1024,{generateMipmaps:!0,type:be.convert(A1)!==null?A1:Jd,minFilter:ax,magFilter:Li,wrapS:Jo,wrapT:Jo,useRenderToTexture:_t.has("WEBGL_multisampled_render_to_texture")})}let xt=g.getRenderTarget();g.setRenderTarget(ot),g.clear();let Ft=g.toneMapping;g.toneMapping=Zd,La(K,gt,Et),g.toneMapping=Ft,q.updateMultisampleRenderTarget(ot),q.updateRenderTargetMipmap(ot),g.setRenderTarget(xt)}function La(K,gt,Et){let xt=gt.isScene===!0?gt.overrideMaterial:null;for(let Ft=0,Ve=K.length;Ft<Ve;Ft++){let Ue=K[Ft],tr=Ue.object,Ke=Ue.geometry,Xr=xt===null?Ue.material:xt,_r=Ue.group;tr.layers.test(Et.layers)&&cx(tr,gt,Et,Ke,Xr,_r)}}function cx(K,gt,Et,xt,Ft,Ve){K.onBeforeRender(g,gt,Et,xt,Ft,Ve),K.modelViewMatrix.multiplyMatrices(Et.matrixWorldInverse,K.matrixWorld),K.normalMatrix.getNormalMatrix(K.modelViewMatrix),Ft.onBeforeRender(g,gt,Et,xt,K,Ve),Ft.transparent===!0&&Ft.side===k1?(Ft.side=Ii,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=L1,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=k1):g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),K.onAfterRender(g,gt,Et,xt,Ft,Ve)}function um(K,gt,Et){gt.isScene!==!0&&(gt=bt);let xt=dt.get(K),Ft=f.state.lights,Ve=f.state.shadowsArray,Ue=Ft.state.version,tr=ee.getParameters(K,Ft.state,Ve,gt,Et),Ke=ee.getProgramCacheKey(tr),Xr=xt.programs;xt.environment=K.isMeshStandardMaterial?gt.environment:null,xt.fog=gt.fog,xt.envMap=(K.isMeshStandardMaterial?ht:pt).get(K.envMap||xt.environment),Xr===void 0&&(K.addEventListener("dispose",se),Xr=new Map,xt.programs=Xr);let _r=Xr.get(Ke);if(_r!==void 0){if(xt.currentProgram===_r&&xt.lightsStateVersion===Ue)return Q0(K,tr),_r}else tr.uniforms=ee.getUniforms(K),K.onBuild(Et,tr,g),K.onBeforeCompile(tr,g),_r=ee.acquireProgram(tr,Ke),Xr.set(Ke,_r),xt.uniforms=tr.uniforms;let Pr=xt.uniforms;(!K.isShaderMaterial&&!K.isRawShaderMaterial||K.clipping===!0)&&(Pr.clippingPlanes=tt.uniform),Q0(K,tr),xt.needsLights=np(K),xt.lightsStateVersion=Ue,xt.needsLights&&(Pr.ambientLightColor.value=Ft.state.ambient,Pr.lightProbe.value=Ft.state.probe,Pr.directionalLights.value=Ft.state.directional,Pr.directionalLightShadows.value=Ft.state.directionalShadow,Pr.spotLights.value=Ft.state.spot,Pr.spotLightShadows.value=Ft.state.spotShadow,Pr.rectAreaLights.value=Ft.state.rectArea,Pr.ltc_1.value=Ft.state.rectAreaLTC1,Pr.ltc_2.value=Ft.state.rectAreaLTC2,Pr.pointLights.value=Ft.state.point,Pr.pointLightShadows.value=Ft.state.pointShadow,Pr.hemisphereLights.value=Ft.state.hemi,Pr.directionalShadowMap.value=Ft.state.directionalShadowMap,Pr.directionalShadowMatrix.value=Ft.state.directionalShadowMatrix,Pr.spotShadowMap.value=Ft.state.spotShadowMap,Pr.spotShadowMatrix.value=Ft.state.spotShadowMatrix,Pr.pointShadowMap.value=Ft.state.pointShadowMap,Pr.pointShadowMatrix.value=Ft.state.pointShadowMatrix);let Xn=_r.getUniforms(),ip=H0.seqWithValue(Xn.seq,Pr);return xt.currentProgram=_r,xt.uniformsList=ip,_r}function Q0(K,gt){let Et=dt.get(K);Et.outputEncoding=gt.outputEncoding,Et.instancing=gt.instancing,Et.skinning=gt.skinning,Et.morphTargets=gt.morphTargets,Et.morphNormals=gt.morphNormals,Et.morphTargetsCount=gt.morphTargetsCount,Et.numClippingPlanes=gt.numClippingPlanes,Et.numIntersection=gt.numClipIntersection,Et.vertexAlphas=gt.vertexAlphas,Et.vertexTangents=gt.vertexTangents,Et.toneMapping=gt.toneMapping}function cn(K,gt,Et,xt,Ft){gt.isScene!==!0&&(gt=bt),q.resetTextureUnits();let Ve=gt.fog,Ue=xt.isMeshStandardMaterial?gt.environment:null,tr=b===null?g.outputEncoding:b.isXRRenderTarget===!0?b.texture.encoding:tm,Ke=(xt.isMeshStandardMaterial?ht:pt).get(xt.envMap||Ue),Xr=xt.vertexColors===!0&&!!Et.attributes.color&&Et.attributes.color.itemSize===4,_r=!!xt.normalMap&&!!Et.attributes.tangent,Pr=!!Et.morphAttributes.position,Xn=!!Et.morphAttributes.normal,ip=Et.morphAttributes.position?Et.morphAttributes.position.length:0,hm=xt.toneMapped?g.toneMapping:Zd,mr=dt.get(xt),Bl=f.state.lights;if(Z===!0&&(rt===!0||K!==C)){let Gs=K===C&&xt.id===S;tt.setState(xt,K,Gs)}let $n=!1;xt.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==Bl.state.version||mr.outputEncoding!==tr||Ft.isInstancedMesh&&mr.instancing===!1||!Ft.isInstancedMesh&&mr.instancing===!0||Ft.isSkinnedMesh&&mr.skinning===!1||!Ft.isSkinnedMesh&&mr.skinning===!0||mr.envMap!==Ke||xt.fog&&mr.fog!==Ve||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==tt.numPlanes||mr.numIntersection!==tt.numIntersection)||mr.vertexAlphas!==Xr||mr.vertexTangents!==_r||mr.morphTargets!==Pr||mr.morphNormals!==Xn||mr.toneMapping!==hm||ct.isWebGL2===!0&&mr.morphTargetsCount!==ip)&&($n=!0):($n=!0,mr.__version=xt.version);let Hl=mr.currentProgram;$n===!0&&(Hl=um(xt,gt,Ft));let hx=!1,Vl=!1,Ul=!1,Yi=Hl.getUniforms(),fm=mr.uniforms;if(X.useProgram(Hl.program)&&(hx=!0,Vl=!0,Ul=!0),xt.id!==S&&(S=xt.id,Vl=!0),hx||C!==K){if(Yi.setValue(lt,"projectionMatrix",K.projectionMatrix),ct.logarithmicDepthBuffer&&Yi.setValue(lt,"logDepthBufFC",2/(Math.log(K.far+1)/Math.LN2)),C!==K&&(C=K,Vl=!0,Ul=!0),xt.isShaderMaterial||xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshStandardMaterial||xt.envMap){let Gs=Yi.map.cameraPosition;Gs!==void 0&&Gs.setValue(lt,St.setFromMatrixPosition(K.matrixWorld))}(xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshLambertMaterial||xt.isMeshBasicMaterial||xt.isMeshStandardMaterial||xt.isShaderMaterial)&&Yi.setValue(lt,"isOrthographic",K.isOrthographicCamera===!0),(xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshLambertMaterial||xt.isMeshBasicMaterial||xt.isMeshStandardMaterial||xt.isShaderMaterial||xt.isShadowMaterial||Ft.isSkinnedMesh)&&Yi.setValue(lt,"viewMatrix",K.matrixWorldInverse)}if(Ft.isSkinnedMesh){Yi.setOptional(lt,Ft,"bindMatrix"),Yi.setOptional(lt,Ft,"bindMatrixInverse");let Gs=Ft.skeleton;Gs&&(ct.floatVertexTextures?(Gs.boneTexture===null&&Gs.computeBoneTexture(),Yi.setValue(lt,"boneTexture",Gs.boneTexture,q),Yi.setValue(lt,"boneTextureSize",Gs.boneTextureSize)):Yi.setOptional(lt,Gs,"boneMatrices"))}return!!Et&&(Et.morphAttributes.position!==void 0||Et.morphAttributes.normal!==void 0)&&$t.update(Ft,Et,xt,Hl),(Vl||mr.receiveShadow!==Ft.receiveShadow)&&(mr.receiveShadow=Ft.receiveShadow,Yi.setValue(lt,"receiveShadow",Ft.receiveShadow)),Vl&&(Yi.setValue(lt,"toneMappingExposure",g.toneMappingExposure),mr.needsLights&&ux(fm,Ul),Ve&&xt.fog&&Le.refreshFogUniforms(fm,Ve),Le.refreshMaterialUniforms(fm,xt,I,B,ot),H0.upload(lt,mr.uniformsList,fm,q)),xt.isShaderMaterial&&xt.uniformsNeedUpdate===!0&&(H0.upload(lt,mr.uniformsList,fm,q),xt.uniformsNeedUpdate=!1),xt.isSpriteMaterial&&Yi.setValue(lt,"center",Ft.center),Yi.setValue(lt,"modelViewMatrix",Ft.modelViewMatrix),Yi.setValue(lt,"normalMatrix",Ft.normalMatrix),Yi.setValue(lt,"modelMatrix",Ft.matrixWorld),Hl}function ux(K,gt){K.ambientLightColor.needsUpdate=gt,K.lightProbe.needsUpdate=gt,K.directionalLights.needsUpdate=gt,K.directionalLightShadows.needsUpdate=gt,K.pointLights.needsUpdate=gt,K.pointLightShadows.needsUpdate=gt,K.spotLights.needsUpdate=gt,K.spotLightShadows.needsUpdate=gt,K.rectAreaLights.needsUpdate=gt,K.hemisphereLights.needsUpdate=gt}function np(K){return K.isMeshLambertMaterial||K.isMeshToonMaterial||K.isMeshPhongMaterial||K.isMeshStandardMaterial||K.isShadowMaterial||K.isShaderMaterial&&K.lights===!0}this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return b},this.setRenderTargetTextures=function(K,gt,Et){dt.get(K.texture).__webglTexture=gt,dt.get(K.depthTexture).__webglTexture=Et;let xt=dt.get(K);xt.__hasExternalTextures=!0,xt.__hasExternalTextures&&(xt.__autoAllocateDepthBuffer=Et===void 0,xt.__autoAllocateDepthBuffer||K.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),K.useRenderToTexture=!1,K.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(K,gt){let Et=dt.get(K);Et.__webglFramebuffer=gt,Et.__useDefaultFramebuffer=gt===void 0},this.setRenderTarget=function(K,gt=0,Et=0){b=K,y=gt,x=Et;let xt=!0;if(K){let Ke=dt.get(K);Ke.__useDefaultFramebuffer!==void 0?(X.bindFramebuffer(36160,null),xt=!1):Ke.__webglFramebuffer===void 0?q.setupRenderTarget(K):Ke.__hasExternalTextures&&q.rebindTextures(K,dt.get(K.texture).__webglTexture,dt.get(K.depthTexture).__webglTexture)}let Ft=null,Ve=!1,Ue=!1;if(K){let Ke=K.texture;(Ke.isDataTexture3D||Ke.isDataTexture2DArray)&&(Ue=!0);let Xr=dt.get(K).__webglFramebuffer;K.isWebGLCubeRenderTarget?(Ft=Xr[gt],Ve=!0):K.useRenderbuffer?Ft=dt.get(K).__webglMultisampledFramebuffer:Ft=Xr,P.copy(K.viewport),k.copy(K.scissor),O=K.scissorTest}else P.copy(F).multiplyScalar(I).floor(),k.copy(z).multiplyScalar(I).floor(),O=U;if(X.bindFramebuffer(36160,Ft)&&ct.drawBuffers&&xt&&X.drawBuffers(K,Ft),X.viewport(P),X.scissor(k),X.setScissorTest(O),Ve){let Ke=dt.get(K.texture);lt.framebufferTexture2D(36160,36064,34069+gt,Ke.__webglTexture,Et)}else if(Ue){let Ke=dt.get(K.texture),Xr=gt||0;lt.framebufferTextureLayer(36160,36064,Ke.__webglTexture,Et||0,Xr)}S=-1},this.readRenderTargetPixels=function(K,gt,Et,xt,Ft,Ve,Ue){if(!(K&&K.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let tr=dt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&Ue!==void 0&&(tr=tr[Ue]),tr){X.bindFramebuffer(36160,tr);try{let Ke=K.texture,Xr=Ke.format,_r=Ke.type;if(Xr!==Qo&&be.convert(Xr)!==lt.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Pr=_r===A1&&(_t.has("EXT_color_buffer_half_float")||ct.isWebGL2&&_t.has("EXT_color_buffer_float"));if(_r!==Jd&&be.convert(_r)!==lt.getParameter(35738)&&!(_r===Xd&&(ct.isWebGL2||_t.has("OES_texture_float")||_t.has("WEBGL_color_buffer_float")))&&!Pr){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}lt.checkFramebufferStatus(36160)===36053?gt>=0&&gt<=K.width-xt&&Et>=0&&Et<=K.height-Ft&&lt.readPixels(gt,Et,xt,Ft,be.convert(Xr),be.convert(_r),Ve):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let Ke=b!==null?dt.get(b).__webglFramebuffer:null;X.bindFramebuffer(36160,Ke)}}},this.copyFramebufferToTexture=function(K,gt,Et=0){if(gt.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let xt=Math.pow(2,-Et),Ft=Math.floor(gt.image.width*xt),Ve=Math.floor(gt.image.height*xt);q.setTexture2D(gt,0),lt.copyTexSubImage2D(3553,Et,0,0,K.x,K.y,Ft,Ve),X.unbindTexture()},this.copyTextureToTexture=function(K,gt,Et,xt=0){let Ft=gt.image.width,Ve=gt.image.height,Ue=be.convert(Et.format),tr=be.convert(Et.type);q.setTexture2D(Et,0),lt.pixelStorei(37440,Et.flipY),lt.pixelStorei(37441,Et.premultiplyAlpha),lt.pixelStorei(3317,Et.unpackAlignment),gt.isDataTexture?lt.texSubImage2D(3553,xt,K.x,K.y,Ft,Ve,Ue,tr,gt.image.data):gt.isCompressedTexture?lt.compressedTexSubImage2D(3553,xt,K.x,K.y,gt.mipmaps[0].width,gt.mipmaps[0].height,Ue,gt.mipmaps[0].data):lt.texSubImage2D(3553,xt,K.x,K.y,Ue,tr,gt.image),xt===0&&Et.generateMipmaps&&lt.generateMipmap(3553),X.unbindTexture()},this.copyTextureToTexture3D=function(K,gt,Et,xt,Ft=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Ve=K.max.x-K.min.x+1,Ue=K.max.y-K.min.y+1,tr=K.max.z-K.min.z+1,Ke=be.convert(xt.format),Xr=be.convert(xt.type),_r;if(xt.isDataTexture3D)q.setTexture3D(xt,0),_r=32879;else if(xt.isDataTexture2DArray)q.setTexture2DArray(xt,0),_r=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}lt.pixelStorei(37440,xt.flipY),lt.pixelStorei(37441,xt.premultiplyAlpha),lt.pixelStorei(3317,xt.unpackAlignment);let Pr=lt.getParameter(3314),Xn=lt.getParameter(32878),ip=lt.getParameter(3316),hm=lt.getParameter(3315),mr=lt.getParameter(32877),Bl=Et.isCompressedTexture?Et.mipmaps[0]:Et.image;lt.pixelStorei(3314,Bl.width),lt.pixelStorei(32878,Bl.height),lt.pixelStorei(3316,K.min.x),lt.pixelStorei(3315,K.min.y),lt.pixelStorei(32877,K.min.z),Et.isDataTexture||Et.isDataTexture3D?lt.texSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Xr,Bl.data):Et.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),lt.compressedTexSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Bl.data)):lt.texSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Xr,Bl),lt.pixelStorei(3314,Pr),lt.pixelStorei(32878,Xn),lt.pixelStorei(3316,ip),lt.pixelStorei(3315,hm),lt.pixelStorei(32877,mr),Ft===0&&xt.generateMipmaps&&lt.generateMipmap(_r),X.unbindTexture()},this.initTexture=function(K){q.setTexture2D(K,0),X.unbindTexture()},this.resetState=function(){y=0,x=0,b=null,X.reset(),nt.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}rn.prototype.isWebGLRenderer=!0;var gU=class extends rn{};gU.prototype.isWebGL1Renderer=!0;var z1=class{constructor(t,r=25e-5){this.name="",this.color=new ne(t),this.density=r}clone(){return new z1(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};z1.prototype.isFogExp2=!0;var F1=class{constructor(t,r=1,n=1e3){this.name="",this.color=new ne(t),this.near=r,this.far=n}clone(){return new F1(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};F1.prototype.isFog=!0;var G0=class extends or{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,r){return super.copy(t,r),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let r=super.toJSON(t);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),r}};G0.prototype.isScene=!0;var rm=class{constructor(t,r){this.array=t,this.stride=r,this.count=t!==void 0?t.length/r:0,this.usage=W3,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Dl()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,r,n){t*=this.stride,n*=r.stride;for(let i=0,o=this.stride;i<o;i++)this.array[t+i]=r.array[n+i];return this}set(t,r=0){return this.array.set(t,r),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Dl()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let r=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(r,this.stride);return n.setUsage(this.usage),n}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Dl()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};rm.prototype.isInterleavedBuffer=!0;var Ai=new j,ep=class{constructor(t,r,n,i=!1){this.name="",this.data=t,this.itemSize=r,this.offset=n,this.normalized=i===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let r=0,n=this.data.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.applyMatrix4(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}applyNormalMatrix(t){for(let r=0,n=this.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.applyNormalMatrix(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}transformDirection(t){for(let r=0,n=this.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.transformDirection(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}setX(t,r){return this.data.array[t*this.data.stride+this.offset]=r,this}setY(t,r){return this.data.array[t*this.data.stride+this.offset+1]=r,this}setZ(t,r){return this.data.array[t*this.data.stride+this.offset+2]=r,this}setW(t,r){return this.data.array[t*this.data.stride+this.offset+3]=r,this}getX(t){return this.data.array[t*this.data.stride+this.offset]}getY(t){return this.data.array[t*this.data.stride+this.offset+1]}getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}getW(t){return this.data.array[t*this.data.stride+this.offset+3]}setXY(t,r,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this}setXYZ(t,r,n,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this.data.array[t+2]=i,this}setXYZW(t,r,n,i,o){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=o,this}clone(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)r.push(this.data.array[i+o])}return new Je(new this.array.constructor(r),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new ep(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)r.push(this.data.array[i+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}};ep.prototype.isInterleavedBufferAttribute=!0;var iM=class extends qi{constructor(t){super(),this.type="SpriteMaterial",this.color=new ne(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}};iM.prototype.isSpriteMaterial=!0;var N3,DP=new j,D3=new j,O3=new j,z3=new Lt,OP=new Lt,tpe=new Me,LV=new j,zP=new j,kV=new j,Zue=new Lt,dut=new Lt,Jue=new Lt,oM=class extends or{constructor(t){if(super(),this.type="Sprite",N3===void 0){N3=new Pe;let r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new rm(r,5);N3.setIndex([0,1,2,0,2,3]),N3.setAttribute("position",new ep(n,3,0,!1)),N3.setAttribute("uv",new ep(n,2,3,!1))}this.geometry=N3,this.material=t!==void 0?t:new iM,this.center=new Lt(.5,.5)}raycast(t,r){t.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),D3.setFromMatrixScale(this.matrixWorld),tpe.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),O3.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&D3.multiplyScalar(-O3.z);let n=this.material.rotation,i,o;n!==0&&(o=Math.cos(n),i=Math.sin(n));let a=this.center;RV(LV.set(-.5,-.5,0),O3,a,D3,i,o),RV(zP.set(.5,-.5,0),O3,a,D3,i,o),RV(kV.set(.5,.5,0),O3,a,D3,i,o),Zue.set(0,0),dut.set(1,0),Jue.set(1,1);let s=t.ray.intersectTriangle(LV,zP,kV,!1,DP);if(s===null&&(RV(zP.set(-.5,.5,0),O3,a,D3,i,o),dut.set(0,1),s=t.ray.intersectTriangle(LV,kV,zP,!1,DP),s===null))return;let l=t.ray.origin.distanceTo(DP);l<t.near||l>t.far||r.push({distance:l,point:DP.clone(),uv:oi.getUV(DP,LV,zP,kV,Zue,dut,Jue,new Lt),face:null,object:this})}copy(t){return super.copy(t),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}};oM.prototype.isSprite=!0;function RV(e,t,r,n,i,o){z3.subVectors(e,r).addScalar(.5).multiply(n),i!==void 0?(OP.x=o*z3.x-i*z3.y,OP.y=i*z3.x+o*z3.y):OP.copy(z3),e.copy(t),e.x+=OP.x,e.y+=OP.y,e.applyMatrix4(tpe)}var NV=new j,Que=new j,_U=class extends or{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);let r=t.levels;for(let n=0,i=r.length;n<i;n++){let o=r[n];this.addLevel(o.object.clone(),o.distance)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,r=0){r=Math.abs(r);let n=this.levels,i;for(i=0;i<n.length&&!(r<n[i].distance);i++);return n.splice(i,0,{distance:r,object:t}),this.add(t),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){let r=this.levels;if(r.length>0){let n,i;for(n=1,i=r.length;n<i&&!(t<r[n].distance);n++);return r[n-1].object}return null}raycast(t,r){if(this.levels.length>0){NV.setFromMatrixPosition(this.matrixWorld);let i=t.ray.origin.distanceTo(NV);this.getObjectForDistance(i).raycast(t,r)}}update(t){let r=this.levels;if(r.length>1){NV.setFromMatrixPosition(t.matrixWorld),Que.setFromMatrixPosition(this.matrixWorld);let n=NV.distanceTo(Que)/t.zoom;r[0].object.visible=!0;let i,o;for(i=1,o=r.length;i<o&&n>=r[i].distance;i++)r[i-1].object.visible=!1,r[i].object.visible=!0;for(this._currentLevel=i-1;i<o;i++)r[i].object.visible=!1}}toJSON(t){let r=super.toJSON(t);this.autoUpdate===!1&&(r.object.autoUpdate=!1),r.object.levels=[];let n=this.levels;for(let i=0,o=n.length;i<o;i++){let a=n[i];r.object.levels.push({object:a.object.uuid,distance:a.distance})}return r}},the=new j,ehe=new en,rhe=new en,Dgr=new j,nhe=new Me,aM=class extends ti{constructor(t,r){super(t,r),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Me,this.bindMatrixInverse=new Me}copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,r){this.skeleton=t,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let t=new en,r=this.geometry.attributes.skinWeight;for(let n=0,i=r.count;n<i;n++){t.x=r.getX(n),t.y=r.getY(n),t.z=r.getZ(n),t.w=r.getW(n);let o=1/t.manhattanLength();o!==1/0?t.multiplyScalar(o):t.set(1,0,0,0),r.setXYZW(n,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,r){let n=this.skeleton,i=this.geometry;ehe.fromBufferAttribute(i.attributes.skinIndex,t),rhe.fromBufferAttribute(i.attributes.skinWeight,t),the.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let o=0;o<4;o++){let a=rhe.getComponent(o);if(a!==0){let s=ehe.getComponent(o);nhe.multiplyMatrices(n.bones[s].matrixWorld,n.boneInverses[s]),r.addScaledVector(Dgr.copy(the).applyMatrix4(nhe),a)}}return r.applyMatrix4(this.bindMatrixInverse)}};aM.prototype.isSkinnedMesh=!0;var sM=class extends or{constructor(){super(),this.type="Bone"}};sM.prototype.isBone=!0;var Qd=class extends vi{constructor(t=null,r=1,n=1,i,o,a,s,l,c=Li,u=Li,h,f){super(null,a,s,l,c,u,i,o,h,f),this.image={data:t,width:r,height:n},this.magFilter=c,this.minFilter=u,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};Qd.prototype.isDataTexture=!0;var ihe=new Me,Ogr=new Me,lM=class{constructor(t=[],r=[]){this.uuid=Dl(),this.bones=t.slice(0),this.boneInverses=r,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){let t=this.bones,r=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),r.length===0)this.calculateInverses();else if(t.length!==r.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Me)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,r=this.bones.length;t<r;t++){let n=new Me;this.bones[t]&&n.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let t=0,r=this.bones.length;t<r;t++){let n=this.bones[t];n&&n.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,r=this.bones.length;t<r;t++){let n=this.bones[t];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){let t=this.bones,r=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let o=0,a=t.length;o<a;o++){let s=t[o]?t[o].matrixWorld:Ogr;ihe.multiplyMatrices(s,r[o]),ihe.toArray(n,o*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new lM(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=zfe(t),t=Math.max(t,4);let r=new Float32Array(t*t*4);r.set(this.boneMatrices);let n=new Qd(r,t,t,Qo,Xd);return n.needsUpdate=!0,this.boneMatrices=r,this.boneTexture=n,this.boneTextureSize=t,this}getBoneByName(t){for(let r=0,n=this.bones.length;r<n;r++){let i=this.bones[r];if(i.name===t)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,r){this.uuid=t.uuid;for(let n=0,i=t.bones.length;n<i;n++){let o=t.bones[n],a=r[o];a===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),a=new sM),this.bones.push(a),this.boneInverses.push(new Me().fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){let t={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;let r=this.bones,n=this.boneInverses;for(let i=0,o=r.length;i<o;i++){let a=r[i];t.bones.push(a.uuid);let s=n[i];t.boneInverses.push(s.toArray())}return t}},nm=class extends Je{constructor(t,r,n,i=1){typeof n=="number"&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(t,r,n),this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){let t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}};nm.prototype.isInstancedBufferAttribute=!0;var ohe=new Me,ahe=new Me,DV=[],FP=new ti,i6=class extends ti{constructor(t,r,n){super(t,r),this.instanceMatrix=new nm(new Float32Array(n*16),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,r){r.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,r){r.fromArray(this.instanceMatrix.array,t*16)}raycast(t,r){let n=this.matrixWorld,i=this.count;if(FP.geometry=this.geometry,FP.material=this.material,FP.material!==void 0)for(let o=0;o<i;o++){this.getMatrixAt(o,ohe),ahe.multiplyMatrices(n,ohe),FP.matrixWorld=ahe,FP.raycast(t,DV);for(let a=0,s=DV.length;a<s;a++){let l=DV[a];l.instanceId=o,l.object=this,r.push(l)}DV.length=0}}setColorAt(t,r){this.instanceColor===null&&(this.instanceColor=new nm(new Float32Array(this.instanceMatrix.count*3),3)),r.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,r){r.toArray(this.instanceMatrix.array,t*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}};i6.prototype.isInstancedMesh=!0;var Gi=class extends qi{constructor(t){super(),this.type="LineBasicMaterial",this.color=new ne(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this}};Gi.prototype.isLineBasicMaterial=!0;var she=new j,lhe=new j,che=new Me,mut=new Qf,OV=new Jf,ch=class extends or{constructor(t=new Pe,r=new Gi){super(),this.type="Line",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(t.index===null){let r=t.attributes.position,n=[0];for(let i=1,o=r.count;i<o;i++)she.fromBufferAttribute(r,i-1),lhe.fromBufferAttribute(r,i),n[i]=n[i-1],n[i]+=she.distanceTo(lhe);t.setAttribute("lineDistance",new xe(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(t,r){let n=this.geometry,i=this.matrixWorld,o=t.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),OV.copy(n.boundingSphere),OV.applyMatrix4(i),OV.radius+=o,t.ray.intersectsSphere(OV)===!1)return;che.copy(i).invert(),mut.copy(t.ray).applyMatrix4(che);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,c=new j,u=new j,h=new j,f=new j,p=this.isLineSegments?2:1;if(n.isBufferGeometry){let d=n.index,_=n.attributes.position;if(d!==null){let y=Math.max(0,a.start),x=Math.min(d.count,a.start+a.count);for(let b=y,S=x-1;b<S;b+=p){let C=d.getX(b),P=d.getX(b+1);if(c.fromBufferAttribute(_,C),u.fromBufferAttribute(_,P),mut.distanceSqToSegment(c,u,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);let O=t.ray.origin.distanceTo(f);O<t.near||O>t.far||r.push({distance:O,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else{let y=Math.max(0,a.start),x=Math.min(_.count,a.start+a.count);for(let b=y,S=x-1;b<S;b+=p){if(c.fromBufferAttribute(_,b),u.fromBufferAttribute(_,b+1),mut.distanceSqToSegment(c,u,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);let P=t.ray.origin.distanceTo(f);P<t.near||P>t.far||r.push({distance:P,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};ch.prototype.isLine=!0;var uhe=new j,hhe=new j,Pa=class extends ch{constructor(t,r){super(t,r),this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(t.index===null){let r=t.attributes.position,n=[];for(let i=0,o=r.count;i<o;i+=2)uhe.fromBufferAttribute(r,i),hhe.fromBufferAttribute(r,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+uhe.distanceTo(hhe);t.setAttribute("lineDistance",new xe(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}};Pa.prototype.isLineSegments=!0;var o6=class extends ch{constructor(t,r){super(t,r),this.type="LineLoop"}};o6.prototype.isLineLoop=!0;var im=class extends qi{constructor(t){super(),this.type="PointsMaterial",this.color=new ne(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this}};im.prototype.isPointsMaterial=!0;var fhe=new Me,rht=new Qf,zV=new Jf,FV=new j,om=class extends or{constructor(t=new Pe,r=new im){super(),this.type="Points",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}raycast(t,r){let n=this.geometry,i=this.matrixWorld,o=t.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),zV.copy(n.boundingSphere),zV.applyMatrix4(i),zV.radius+=o,t.ray.intersectsSphere(zV)===!1)return;fhe.copy(i).invert(),rht.copy(t.ray).applyMatrix4(fhe);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s;if(n.isBufferGeometry){let c=n.index,h=n.attributes.position;if(c!==null){let f=Math.max(0,a.start),p=Math.min(c.count,a.start+a.count);for(let d=f,g=p;d<g;d++){let _=c.getX(d);FV.fromBufferAttribute(h,_),phe(FV,_,l,i,t,r,this)}}else{let f=Math.max(0,a.start),p=Math.min(h.count,a.start+a.count);for(let d=f,g=p;d<g;d++)FV.fromBufferAttribute(h,d),phe(FV,d,l,i,t,r,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};om.prototype.isPoints=!0;function phe(e,t,r,n,i,o,a){let s=rht.distanceSqToPoint(e);if(s<r){let l=new j;rht.closestPointToPoint(e,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}var yU=class extends vi{constructor(t,r,n,i,o,a,s,l,c){super(t,r,n,i,o,a,s,l,c),this.minFilter=a!==void 0?a:ii,this.magFilter=o!==void 0?o:ii,this.generateMipmaps=!1;let u=this;function h(){u.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};yU.prototype.isVideoTexture=!0;var vU=class extends vi{constructor(t,r,n){super({width:t,height:r}),this.format=n,this.magFilter=Li,this.minFilter=Li,this.generateMipmaps=!1,this.needsUpdate=!0}};vU.prototype.isFramebufferTexture=!0;var a6=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u,h,f){super(null,a,s,l,c,u,i,o,h,f),this.image={width:r,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}};a6.prototype.isCompressedTexture=!0;var xU=class extends vi{constructor(t,r,n,i,o,a,s,l,c){super(t,r,n,i,o,a,s,l,c),this.needsUpdate=!0}};xU.prototype.isCanvasTexture=!0;var B1=class extends Pe{constructor(t=1,r=8,n=0,i=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:r,thetaStart:n,thetaLength:i},r=Math.max(3,r);let o=[],a=[],s=[],l=[],c=new j,u=new Lt;a.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let h=0,f=3;h<=r;h++,f+=3){let p=n+h/r*i;c.x=t*Math.cos(p),c.y=t*Math.sin(p),a.push(c.x,c.y,c.z),s.push(0,0,1),u.x=(a[f]/t+1)/2,u.y=(a[f+1]/t+1)/2,l.push(u.x,u.y)}for(let h=1;h<=r;h++)o.push(h,h+1,0);this.setIndex(o),this.setAttribute("position",new xe(a,3)),this.setAttribute("normal",new xe(s,3)),this.setAttribute("uv",new xe(l,2))}static fromJSON(t){return new B1(t.radius,t.segments,t.thetaStart,t.thetaLength)}},am=class extends Pe{constructor(t=1,r=1,n=1,i=8,o=1,a=!1,s=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:r,height:n,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:l};let c=this;i=Math.floor(i),o=Math.floor(o);let u=[],h=[],f=[],p=[],d=0,g=[],_=n/2,y=0;x(),a===!1&&(t>0&&b(!0),r>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new xe(h,3)),this.setAttribute("normal",new xe(f,3)),this.setAttribute("uv",new xe(p,2));function x(){let S=new j,C=new j,P=0,k=(r-t)/n;for(let O=0;O<=o;O++){let D=[],B=O/o,I=B*(r-t)+t;for(let L=0;L<=i;L++){let R=L/i,F=R*l+s,z=Math.sin(F),U=Math.cos(F);C.x=I*z,C.y=-B*n+_,C.z=I*U,h.push(C.x,C.y,C.z),S.set(z,k,U).normalize(),f.push(S.x,S.y,S.z),p.push(R,1-B),D.push(d++)}g.push(D)}for(let O=0;O<i;O++)for(let D=0;D<o;D++){let B=g[D][O],I=g[D+1][O],L=g[D+1][O+1],R=g[D][O+1];u.push(B,I,R),u.push(I,L,R),P+=6}c.addGroup(y,P,0),y+=P}function b(S){let C=d,P=new Lt,k=new j,O=0,D=S===!0?t:r,B=S===!0?1:-1;for(let L=1;L<=i;L++)h.push(0,_*B,0),f.push(0,B,0),p.push(.5,.5),d++;let I=d;for(let L=0;L<=i;L++){let F=L/i*l+s,z=Math.cos(F),U=Math.sin(F);k.x=D*U,k.y=_*B,k.z=D*z,h.push(k.x,k.y,k.z),f.push(0,B,0),P.x=z*.5+.5,P.y=U*.5*B+.5,p.push(P.x,P.y),d++}for(let L=0;L<i;L++){let R=C+L,F=I+L;S===!0?u.push(F,F+1,R):u.push(F+1,F,R),O+=3}c.addGroup(y,O,S===!0?1:2),y+=O}}static fromJSON(t){return new am(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},H1=class extends am{constructor(t=1,r=1,n=8,i=1,o=!1,a=0,s=Math.PI*2){super(0,t,r,n,i,o,a,s),this.type="ConeGeometry",this.parameters={radius:t,height:r,radialSegments:n,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s}}static fromJSON(t){return new H1(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},uh=class extends Pe{constructor(t=[],r=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:r,radius:n,detail:i};let o=[],a=[];s(i),c(n),u(),this.setAttribute("position",new xe(o,3)),this.setAttribute("normal",new xe(o.slice(),3)),this.setAttribute("uv",new xe(a,2)),i===0?this.computeVertexNormals():this.normalizeNormals();function s(x){let b=new j,S=new j,C=new j;for(let P=0;P<r.length;P+=3)p(r[P+0],b),p(r[P+1],S),p(r[P+2],C),l(b,S,C,x)}function l(x,b,S,C){let P=C+1,k=[];for(let O=0;O<=P;O++){k[O]=[];let D=x.clone().lerp(S,O/P),B=b.clone().lerp(S,O/P),I=P-O;for(let L=0;L<=I;L++)L===0&&O===P?k[O][L]=D:k[O][L]=D.clone().lerp(B,L/I)}for(let O=0;O<P;O++)for(let D=0;D<2*(P-O)-1;D++){let B=Math.floor(D/2);D%2===0?(f(k[O][B+1]),f(k[O+1][B]),f(k[O][B])):(f(k[O][B+1]),f(k[O+1][B+1]),f(k[O+1][B]))}}function c(x){let b=new j;for(let S=0;S<o.length;S+=3)b.x=o[S+0],b.y=o[S+1],b.z=o[S+2],b.normalize().multiplyScalar(x),o[S+0]=b.x,o[S+1]=b.y,o[S+2]=b.z}function u(){let x=new j;for(let b=0;b<o.length;b+=3){x.x=o[b+0],x.y=o[b+1],x.z=o[b+2];let S=_(x)/2/Math.PI+.5,C=y(x)/Math.PI+.5;a.push(S,1-C)}d(),h()}function h(){for(let x=0;x<a.length;x+=6){let b=a[x+0],S=a[x+2],C=a[x+4],P=Math.max(b,S,C),k=Math.min(b,S,C);P>.9&&k<.1&&(b<.2&&(a[x+0]+=1),S<.2&&(a[x+2]+=1),C<.2&&(a[x+4]+=1))}}function f(x){o.push(x.x,x.y,x.z)}function p(x,b){let S=x*3;b.x=t[S+0],b.y=t[S+1],b.z=t[S+2]}function d(){let x=new j,b=new j,S=new j,C=new j,P=new Lt,k=new Lt,O=new Lt;for(let D=0,B=0;D<o.length;D+=9,B+=6){x.set(o[D+0],o[D+1],o[D+2]),b.set(o[D+3],o[D+4],o[D+5]),S.set(o[D+6],o[D+7],o[D+8]),P.set(a[B+0],a[B+1]),k.set(a[B+2],a[B+3]),O.set(a[B+4],a[B+5]),C.copy(x).add(b).add(S).divideScalar(3);let I=_(C);g(P,B+0,x,I),g(k,B+2,b,I),g(O,B+4,S,I)}}function g(x,b,S,C){C<0&&x.x===1&&(a[b]=x.x-1),S.x===0&&S.z===0&&(a[b]=C/2/Math.PI+.5)}function _(x){return Math.atan2(x.z,-x.x)}function y(x){return Math.atan2(-x.y,Math.sqrt(x.x*x.x+x.z*x.z))}}static fromJSON(t){return new uh(t.vertices,t.indices,t.radius,t.details)}},V1=class extends uh{constructor(t=1,r=0){let n=(1+Math.sqrt(5))/2,i=1/n,o=[-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,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],a=[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];super(o,a,t,r),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new V1(t.radius,t.detail)}},BV=new j,HV=new j,gut=new j,VV=new oi,s6=class extends Pe{constructor(t=null,r=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:r},t!==null){let i=Math.pow(10,4),o=Math.cos(I1*r),a=t.getIndex(),s=t.getAttribute("position"),l=a?a.count:s.count,c=[0,0,0],u=["a","b","c"],h=new Array(3),f={},p=[];for(let d=0;d<l;d+=3){a?(c[0]=a.getX(d),c[1]=a.getX(d+1),c[2]=a.getX(d+2)):(c[0]=d,c[1]=d+1,c[2]=d+2);let{a:g,b:_,c:y}=VV;if(g.fromBufferAttribute(s,c[0]),_.fromBufferAttribute(s,c[1]),y.fromBufferAttribute(s,c[2]),VV.getNormal(gut),h[0]=`${Math.round(g.x*i)},${Math.round(g.y*i)},${Math.round(g.z*i)}`,h[1]=`${Math.round(_.x*i)},${Math.round(_.y*i)},${Math.round(_.z*i)}`,h[2]=`${Math.round(y.x*i)},${Math.round(y.y*i)},${Math.round(y.z*i)}`,!(h[0]===h[1]||h[1]===h[2]||h[2]===h[0]))for(let x=0;x<3;x++){let b=(x+1)%3,S=h[x],C=h[b],P=VV[u[x]],k=VV[u[b]],O=`${S}_${C}`,D=`${C}_${S}`;D in f&&f[D]?(gut.dot(f[D].normal)<=o&&(p.push(P.x,P.y,P.z),p.push(k.x,k.y,k.z)),f[D]=null):O in f||(f[O]={index0:c[x],index1:c[b],normal:gut.clone()})}}for(let d in f)if(f[d]){let{index0:g,index1:_}=f[d];BV.fromBufferAttribute(s,g),HV.fromBufferAttribute(s,_),p.push(BV.x,BV.y,BV.z),p.push(HV.x,HV.y,HV.z)}this.setAttribute("position",new xe(p,3))}}},ps=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,r){let n=this.getUtoTmapping(t);return this.getPoint(n,r)}getPoints(t=5){let r=[];for(let n=0;n<=t;n++)r.push(this.getPoint(n/t));return r}getSpacedPoints(t=5){let r=[];for(let n=0;n<=t;n++)r.push(this.getPointAt(n/t));return r}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let r=[],n,i=this.getPoint(0),o=0;r.push(0);for(let a=1;a<=t;a++)n=this.getPoint(a/t),o+=n.distanceTo(i),r.push(o),i=n;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,r){let n=this.getLengths(),i=0,o=n.length,a;r?a=r:a=t*n[o-1];let s=0,l=o-1,c;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),c=n[i]-a,c<0)s=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(o-1);let u=n[i],f=n[i+1]-u,p=(a-u)/f;return(i+p)/(o-1)}getTangent(t,r){let i=t-1e-4,o=t+1e-4;i<0&&(i=0),o>1&&(o=1);let a=this.getPoint(i),s=this.getPoint(o),l=r||(a.isVector2?new Lt:new j);return l.copy(s).sub(a).normalize(),l}getTangentAt(t,r){let n=this.getUtoTmapping(t);return this.getTangent(n,r)}computeFrenetFrames(t,r){let n=new j,i=[],o=[],a=[],s=new j,l=new Me;for(let p=0;p<=t;p++){let d=p/t;i[p]=this.getTangentAt(d,new j)}o[0]=new j,a[0]=new j;let c=Number.MAX_VALUE,u=Math.abs(i[0].x),h=Math.abs(i[0].y),f=Math.abs(i[0].z);u<=c&&(c=u,n.set(1,0,0)),h<=c&&(c=h,n.set(0,1,0)),f<=c&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],s),a[0].crossVectors(i[0],o[0]);for(let p=1;p<=t;p++){if(o[p]=o[p-1].clone(),a[p]=a[p-1].clone(),s.crossVectors(i[p-1],i[p]),s.length()>Number.EPSILON){s.normalize();let d=Math.acos(Zo(i[p-1].dot(i[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(s,d))}a[p].crossVectors(i[p],o[p])}if(r===!0){let p=Math.acos(Zo(o[0].dot(o[t]),-1,1));p/=t,i[0].dot(s.crossVectors(o[0],o[t]))>0&&(p=-p);for(let d=1;d<=t;d++)o[d].applyMatrix4(l.makeRotationAxis(i[d],p*d)),a[d].crossVectors(i[d],o[d])}return{tangents:i,normals:o,binormals:a}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}},U1=class extends ps{constructor(t=0,r=0,n=1,i=1,o=0,a=Math.PI*2,s=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=r,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(t,r){let n=r||new Lt,i=Math.PI*2,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=i;for(;o>i;)o-=i;o<Number.EPSILON&&(a?o=0:o=i),this.aClockwise===!0&&!a&&(o===i?o=-i:o=o-i);let s=this.aStartAngle+t*o,l=this.aX+this.xRadius*Math.cos(s),c=this.aY+this.yRadius*Math.sin(s);if(this.aRotation!==0){let u=Math.cos(this.aRotation),h=Math.sin(this.aRotation),f=l-this.aX,p=c-this.aY;l=f*u-p*h+this.aX,c=f*h+p*u+this.aY}return n.set(l,c)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){let t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}};U1.prototype.isEllipseCurve=!0;var l6=class extends U1{constructor(t,r,n,i,o,a){super(t,r,n,n,i,o,a),this.type="ArcCurve"}};l6.prototype.isArcCurve=!0;function Dht(){let e=0,t=0,r=0,n=0;function i(o,a,s,l){e=o,t=s,r=-3*o+3*a-2*s-l,n=2*o-2*a+s+l}return{initCatmullRom:function(o,a,s,l,c){i(a,s,c*(s-o),c*(l-a))},initNonuniformCatmullRom:function(o,a,s,l,c,u,h){let f=(a-o)/c-(s-o)/(c+u)+(s-a)/u,p=(s-a)/u-(l-a)/(u+h)+(l-s)/h;f*=u,p*=u,i(a,s,f,p)},calc:function(o){let a=o*o,s=a*o;return e+t*o+r*a+n*s}}}var UV=new j,_ut=new Dht,yut=new Dht,vut=new Dht,c6=class extends ps{constructor(t=[],r=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=r,this.curveType=n,this.tension=i}getPoint(t,r=new j){let n=r,i=this.points,o=i.length,a=(o-(this.closed?0:1))*t,s=Math.floor(a),l=a-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/o)+1)*o:l===0&&s===o-1&&(s=o-2,l=1);let c,u;this.closed||s>0?c=i[(s-1)%o]:(UV.subVectors(i[0],i[1]).add(i[0]),c=UV);let h=i[s%o],f=i[(s+1)%o];if(this.closed||s+2<o?u=i[(s+2)%o]:(UV.subVectors(i[o-1],i[o-2]).add(i[o-1]),u=UV),this.curveType==="centripetal"||this.curveType==="chordal"){let p=this.curveType==="chordal"?.5:.25,d=Math.pow(c.distanceToSquared(h),p),g=Math.pow(h.distanceToSquared(f),p),_=Math.pow(f.distanceToSquared(u),p);g<1e-4&&(g=1),d<1e-4&&(d=g),_<1e-4&&(_=g),_ut.initNonuniformCatmullRom(c.x,h.x,f.x,u.x,d,g,_),yut.initNonuniformCatmullRom(c.y,h.y,f.y,u.y,d,g,_),vut.initNonuniformCatmullRom(c.z,h.z,f.z,u.z,d,g,_)}else this.curveType==="catmullrom"&&(_ut.initCatmullRom(c.x,h.x,f.x,u.x,this.tension),yut.initCatmullRom(c.y,h.y,f.y,u.y,this.tension),vut.initCatmullRom(c.z,h.z,f.z,u.z,this.tension));return n.set(_ut.calc(l),yut.calc(l),vut.calc(l)),n}copy(t){super.copy(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(i.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){let t=super.toJSON();t.points=[];for(let r=0,n=this.points.length;r<n;r++){let i=this.points[r];t.points.push(i.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(new j().fromArray(i))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}};c6.prototype.isCatmullRomCurve3=!0;function dhe(e,t,r,n,i){let o=(n-t)*.5,a=(i-r)*.5,s=e*e,l=e*s;return(2*r-2*n+o+a)*l+(-3*r+3*n-2*o-a)*s+o*e+r}function zgr(e,t){let r=1-e;return r*r*t}function Fgr(e,t){return 2*(1-e)*e*t}function Bgr(e,t){return e*e*t}function GP(e,t,r,n){return zgr(e,t)+Fgr(e,r)+Bgr(e,n)}function Hgr(e,t){let r=1-e;return r*r*r*t}function Vgr(e,t){let r=1-e;return 3*r*r*e*t}function Ugr(e,t){return 3*(1-e)*e*e*t}function qgr(e,t){return e*e*e*t}function WP(e,t,r,n,i){return Hgr(e,t)+Vgr(e,r)+Ugr(e,n)+qgr(e,i)}var cM=class extends ps{constructor(t=new Lt,r=new Lt,n=new Lt,i=new Lt){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=r,this.v2=n,this.v3=i}getPoint(t,r=new Lt){let n=r,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(WP(t,i.x,o.x,a.x,s.x),WP(t,i.y,o.y,a.y,s.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};cM.prototype.isCubicBezierCurve=!0;var u6=class extends ps{constructor(t=new j,r=new j,n=new j,i=new j){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=r,this.v2=n,this.v3=i}getPoint(t,r=new j){let n=r,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(WP(t,i.x,o.x,a.x,s.x),WP(t,i.y,o.y,a.y,s.y),WP(t,i.z,o.z,a.z,s.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};u6.prototype.isCubicBezierCurve3=!0;var q1=class extends ps{constructor(t=new Lt,r=new Lt){super(),this.type="LineCurve",this.v1=t,this.v2=r}getPoint(t,r=new Lt){let n=r;return t===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,r){return this.getPoint(t,r)}getTangent(t,r){let n=r||new Lt;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};q1.prototype.isLineCurve=!0;var bU=class extends ps{constructor(t=new j,r=new j){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=r}getPoint(t,r=new j){let n=r;return t===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,r){return this.getPoint(t,r)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}},uM=class extends ps{constructor(t=new Lt,r=new Lt,n=new Lt){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=r,this.v2=n}getPoint(t,r=new Lt){let n=r,i=this.v0,o=this.v1,a=this.v2;return n.set(GP(t,i.x,o.x,a.x),GP(t,i.y,o.y,a.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};uM.prototype.isQuadraticBezierCurve=!0;var hM=class extends ps{constructor(t=new j,r=new j,n=new j){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=r,this.v2=n}getPoint(t,r=new j){let n=r,i=this.v0,o=this.v1,a=this.v2;return n.set(GP(t,i.x,o.x,a.x),GP(t,i.y,o.y,a.y),GP(t,i.z,o.z,a.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};hM.prototype.isQuadraticBezierCurve3=!0;var fM=class extends ps{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,r=new Lt){let n=r,i=this.points,o=(i.length-1)*t,a=Math.floor(o),s=o-a,l=i[a===0?a:a-1],c=i[a],u=i[a>i.length-2?i.length-1:a+1],h=i[a>i.length-3?i.length-1:a+2];return n.set(dhe(s,l.x,c.x,u.x,h.x),dhe(s,l.y,c.y,u.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(i.clone())}return this}toJSON(){let t=super.toJSON();t.points=[];for(let r=0,n=this.points.length;r<n;r++){let i=this.points[r];t.points.push(i.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(new Lt().fromArray(i))}return this}};fM.prototype.isSplineCurve=!0;var Oht=Object.freeze({__proto__:null,ArcCurve:l6,CatmullRomCurve3:c6,CubicBezierCurve:cM,CubicBezierCurve3:u6,EllipseCurve:U1,LineCurve:q1,LineCurve3:bU,QuadraticBezierCurve:uM,QuadraticBezierCurve3:hM,SplineCurve:fM}),wU=class extends ps{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){let t=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);t.equals(r)||this.curves.push(new q1(r,t))}getPoint(t,r){let n=t*this.getLength(),i=this.getCurveLengths(),o=0;for(;o<i.length;){if(i[o]>=n){let a=i[o]-n,s=this.curves[o],l=s.getLength(),c=l===0?0:1-a/l;return s.getPointAt(c,r)}o++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],r=0;for(let n=0,i=this.curves.length;n<i;n++)r+=this.curves[n].getLength(),t.push(r);return this.cacheLengths=t,t}getSpacedPoints(t=40){let r=[];for(let n=0;n<=t;n++)r.push(this.getPoint(n/t));return this.autoClose&&r.push(r[0]),r}getPoints(t=12){let r=[],n;for(let i=0,o=this.curves;i<o.length;i++){let a=o[i],s=a&&a.isEllipseCurve?t*2:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?t*a.points.length:t,l=a.getPoints(s);for(let c=0;c<l.length;c++){let u=l[c];n&&n.equals(u)||(r.push(u),n=u)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(t){super.copy(t),this.curves=[];for(let r=0,n=t.curves.length;r<n;r++){let i=t.curves[r];this.curves.push(i.clone())}return this.autoClose=t.autoClose,this}toJSON(){let t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let r=0,n=this.curves.length;r<n;r++){let i=this.curves[r];t.curves.push(i.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let r=0,n=t.curves.length;r<n;r++){let i=t.curves[r];this.curves.push(new Oht[i.type]().fromJSON(i))}return this}},G1=class extends wU{constructor(t){super(),this.type="Path",this.currentPoint=new Lt,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let r=1,n=t.length;r<n;r++)this.lineTo(t[r].x,t[r].y);return this}moveTo(t,r){return this.currentPoint.set(t,r),this}lineTo(t,r){let n=new q1(this.currentPoint.clone(),new Lt(t,r));return this.curves.push(n),this.currentPoint.set(t,r),this}quadraticCurveTo(t,r,n,i){let o=new uM(this.currentPoint.clone(),new Lt(t,r),new Lt(n,i));return this.curves.push(o),this.currentPoint.set(n,i),this}bezierCurveTo(t,r,n,i,o,a){let s=new cM(this.currentPoint.clone(),new Lt(t,r),new Lt(n,i),new Lt(o,a));return this.curves.push(s),this.currentPoint.set(o,a),this}splineThru(t){let r=[this.currentPoint.clone()].concat(t),n=new fM(r);return this.curves.push(n),this.currentPoint.copy(t[t.length-1]),this}arc(t,r,n,i,o,a){let s=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(t+s,r+l,n,i,o,a),this}absarc(t,r,n,i,o,a){return this.absellipse(t,r,n,n,i,o,a),this}ellipse(t,r,n,i,o,a,s,l){let c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(t+c,r+u,n,i,o,a,s,l),this}absellipse(t,r,n,i,o,a,s,l){let c=new U1(t,r,n,i,o,a,s,l);if(this.curves.length>0){let h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);let u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}},Kc=class extends G1{constructor(t){super(t),this.uuid=Dl(),this.type="Shape",this.holes=[]}getPointsHoles(t){let r=[];for(let n=0,i=this.holes.length;n<i;n++)r[n]=this.holes[n].getPoints(t);return r}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let r=0,n=t.holes.length;r<n;r++){let i=t.holes[r];this.holes.push(i.clone())}return this}toJSON(){let t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let r=0,n=this.holes.length;r<n;r++){let i=this.holes[r];t.holes.push(i.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let r=0,n=t.holes.length;r<n;r++){let i=t.holes[r];this.holes.push(new G1().fromJSON(i))}return this}},Ggr={triangulate:function(e,t,r=2){let n=t&&t.length,i=n?t[0]*r:e.length,o=epe(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,f,p;if(n&&(o=$gr(e,t,o,r)),e.length>80*r){s=c=e[0],l=u=e[1];for(let d=r;d<i;d+=r)h=e[d],f=e[d+1],h<s&&(s=h),f<l&&(l=f),h>c&&(c=h),f>u&&(u=f);p=Math.max(c-s,u-l),p=p!==0?1/p:0}return h6(o,a,r,s,l,p),a}};function epe(e,t,r,n,i){let o,a;if(i===a0r(e,t,r,n)>0)for(o=t;o<r;o+=n)a=mhe(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=mhe(o,e[o],e[o+1],a);return a&&ZU(a,a.next)&&(p6(a),a=a.next),a}function W0(e,t){if(!e)return e;t||(t=e);let r=e,n;do if(n=!1,!r.steiner&&(ZU(r,r.next)||ai(r.prev,r,r.next)===0)){if(p6(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function h6(e,t,r,n,i,o,a){if(!e)return;!a&&o&&t0r(e,n,i,o);let s=e,l,c;for(;e.prev!==e.next;){if(l=e.prev,c=e.next,o?Ygr(e,n,i,o):Wgr(e)){t.push(l.i/r),t.push(e.i/r),t.push(c.i/r),p6(e),e=c.next,s=c.next;continue}if(e=c,e===s){a?a===1?(e=jgr(W0(e),t,r),h6(e,t,r,n,i,o,2)):a===2&&Xgr(e,t,r,n,i,o):h6(W0(e),t,r,n,i,o,1);break}}}function Wgr(e){let t=e.prev,r=e,n=e.next;if(ai(t,r,n)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(H3(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ai(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Ygr(e,t,r,n){let i=e.prev,o=e,a=e.next;if(ai(i,o,a)>=0)return!1;let s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=nht(s,l,t,r,n),f=nht(c,u,t,r,n),p=e.prevZ,d=e.nextZ;for(;p&&p.z>=h&&d&&d.z<=f;){if(p!==e.prev&&p!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ai(p.prev,p,p.next)>=0||(p=p.prevZ,d!==e.prev&&d!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ai(d.prev,d,d.next)>=0))return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ai(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ai(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function jgr(e,t,r){let n=e;do{let i=n.prev,o=n.next.next;!ZU(i,o)&&rpe(i,n,n.next,o)&&f6(i,o)&&f6(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),p6(n),p6(n.next),n=e=o),n=n.next}while(n!==e);return W0(n)}function Xgr(e,t,r,n,i,o){let a=e;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&n0r(a,s)){let l=npe(a,s);a=W0(a,a.next),l=W0(l,l.next),h6(a,t,r,n,i,o),h6(l,t,r,n,i,o);return}s=s.next}a=a.next}while(a!==e)}function $gr(e,t,r,n){let i=[],o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,c=epe(e,s,l,n,!1),c===c.next&&(c.steiner=!0),i.push(r0r(c));for(i.sort(Kgr),o=0;o<i.length;o++)Zgr(i[o],r),r=W0(r,r.next);return r}function Kgr(e,t){return e.x-t.x}function Zgr(e,t){if(t=Jgr(e,t),t){let r=npe(t,e);W0(t,t.next),W0(r,r.next)}}function Jgr(e,t){let r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){let f=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(f<=n&&f>o){if(o=f,f===n){if(i===r.y)return r;if(i===r.next.y)return r.next}a=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!a)return null;if(n===o)return a;let s=a,l=a.x,c=a.y,u=1/0,h;r=a;do n>=r.x&&r.x>=l&&n!==r.x&&H3(i<c?n:o,i,l,c,i<c?o:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),f6(r,e)&&(h<u||h===u&&(r.x>a.x||r.x===a.x&&Qgr(a,r)))&&(a=r,u=h)),r=r.next;while(r!==s);return a}function Qgr(e,t){return ai(e.prev,e,t.prev)<0&&ai(t.next,e,e.next)<0}function t0r(e,t,r,n){let i=e;do i.z===null&&(i.z=nht(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,e0r(i)}function e0r(e){let t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ,!!n);t++);for(l=c;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1);return e}function nht(e,t,r,n,i){return e=32767*(e-r)*i,t=32767*(t-n)*i,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function r0r(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function H3(e,t,r,n,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function n0r(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!i0r(e,t)&&(f6(e,t)&&f6(t,e)&&o0r(e,t)&&(ai(e.prev,e,t.prev)||ai(e,t.prev,t))||ZU(e,t)&&ai(e.prev,e,e.next)>0&&ai(t.prev,t,t.next)>0)}function ai(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function ZU(e,t){return e.x===t.x&&e.y===t.y}function rpe(e,t,r,n){let i=GV(ai(e,t,r)),o=GV(ai(e,t,n)),a=GV(ai(r,n,e)),s=GV(ai(r,n,t));return!!(i!==o&&a!==s||i===0&&qV(e,r,t)||o===0&&qV(e,n,t)||a===0&&qV(r,e,n)||s===0&&qV(r,t,n))}function qV(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function GV(e){return e>0?1:e<0?-1:0}function i0r(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&rpe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function f6(e,t){return ai(e.prev,e,e.next)<0?ai(e,t,e.next)>=0&&ai(e,e.prev,t)>=0:ai(e,t,e.prev)<0||ai(e,e.next,t)<0}function o0r(e,t){let r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function npe(e,t){let r=new iht(e.i,e.x,e.y),n=new iht(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function mhe(e,t,r,n){let i=new iht(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function p6(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 iht(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function a0r(e,t,r,n){let i=0;for(let o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}var Zc=class{static area(t){let r=t.length,n=0;for(let i=r-1,o=0;o<r;i=o++)n+=t[i].x*t[o].y-t[o].x*t[i].y;return n*.5}static isClockWise(t){return Zc.area(t)<0}static triangulateShape(t,r){let n=[],i=[],o=[];ghe(t),_he(n,t);let a=t.length;r.forEach(ghe);for(let l=0;l<r.length;l++)i.push(a),a+=r[l].length,_he(n,r[l]);let s=Ggr.triangulate(n,i);for(let l=0;l<s.length;l+=3)o.push(s.slice(l,l+3));return o}};function ghe(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function _he(e,t){for(let r=0;r<t.length;r++)e.push(t[r].x),e.push(t[r].y)}var hh=class extends Pe{constructor(t=new Kc([new Lt(.5,.5),new Lt(-.5,.5),new Lt(-.5,-.5),new Lt(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:r},t=Array.isArray(t)?t:[t];let n=this,i=[],o=[];for(let s=0,l=t.length;s<l;s++){let c=t[s];a(c)}this.setAttribute("position",new xe(i,3)),this.setAttribute("uv",new xe(o,2)),this.computeVertexNormals();function a(s){let l=[],c=r.curveSegments!==void 0?r.curveSegments:12,u=r.steps!==void 0?r.steps:1,h=r.depth!==void 0?r.depth:1,f=r.bevelEnabled!==void 0?r.bevelEnabled:!0,p=r.bevelThickness!==void 0?r.bevelThickness:.2,d=r.bevelSize!==void 0?r.bevelSize:p-.1,g=r.bevelOffset!==void 0?r.bevelOffset:0,_=r.bevelSegments!==void 0?r.bevelSegments:3,y=r.extrudePath,x=r.UVGenerator!==void 0?r.UVGenerator:s0r;r.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),h=r.amount);let b,S=!1,C,P,k,O;y&&(b=y.getSpacedPoints(u),S=!0,f=!1,C=y.computeFrenetFrames(u,!1),P=new j,k=new j,O=new j),f||(_=0,p=0,d=0,g=0);let D=s.extractPoints(c),B=D.shape,I=D.holes;if(!Zc.isClockWise(B)){B=B.reverse();for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];Zc.isClockWise(ht)&&(I[q]=ht.reverse())}}let R=Zc.triangulateShape(B,I),F=B;for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];B=B.concat(ht)}function z(q,pt,ht){return pt||console.error("THREE.ExtrudeGeometry: vec does not exist"),pt.clone().multiplyScalar(ht).add(q)}let U=B.length,W=R.length;function Z(q,pt,ht){let wt,kt,ie,ee=q.x-pt.x,Le=q.y-pt.y,ar=ht.x-q.x,fr=ht.y-q.y,tt=ee*ee+Le*Le,$=ee*fr-Le*ar;if(Math.abs($)>Number.EPSILON){let It=Math.sqrt(tt),$t=Math.sqrt(ar*ar+fr*fr),he=pt.x-Le/It,Tt=pt.y+ee/It,be=ht.x-fr/$t,nt=ht.y+ar/$t,Ct=((be-he)*fr-(nt-Tt)*ar)/(ee*fr-Le*ar);wt=he+ee*Ct-q.x,kt=Tt+Le*Ct-q.y;let Wt=wt*wt+kt*kt;if(Wt<=2)return new Lt(wt,kt);ie=Math.sqrt(Wt/2)}else{let It=!1;ee>Number.EPSILON?ar>Number.EPSILON&&(It=!0):ee<-Number.EPSILON?ar<-Number.EPSILON&&(It=!0):Math.sign(Le)===Math.sign(fr)&&(It=!0),It?(wt=-Le,kt=ee,ie=Math.sqrt(tt)):(wt=ee,kt=Le,ie=Math.sqrt(tt/2))}return new Lt(wt/ie,kt/ie)}let rt=[];for(let q=0,pt=F.length,ht=pt-1,wt=q+1;q<pt;q++,ht++,wt++)ht===pt&&(ht=0),wt===pt&&(wt=0),rt[q]=Z(F[q],F[ht],F[wt]);let ot=[],st,St=rt.concat();for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];st=[];for(let wt=0,kt=ht.length,ie=kt-1,ee=wt+1;wt<kt;wt++,ie++,ee++)ie===kt&&(ie=0),ee===kt&&(ee=0),st[wt]=Z(ht[wt],ht[ie],ht[ee]);ot.push(st),St=St.concat(st)}for(let q=0;q<_;q++){let pt=q/_,ht=p*Math.cos(pt*Math.PI/2),wt=d*Math.sin(pt*Math.PI/2)+g;for(let kt=0,ie=F.length;kt<ie;kt++){let ee=z(F[kt],rt[kt],wt);_t(ee.x,ee.y,-ht)}for(let kt=0,ie=I.length;kt<ie;kt++){let ee=I[kt];st=ot[kt];for(let Le=0,ar=ee.length;Le<ar;Le++){let fr=z(ee[Le],st[Le],wt);_t(fr.x,fr.y,-ht)}}}let bt=d+g;for(let q=0;q<U;q++){let pt=f?z(B[q],St[q],bt):B[q];S?(k.copy(C.normals[0]).multiplyScalar(pt.x),P.copy(C.binormals[0]).multiplyScalar(pt.y),O.copy(b[0]).add(k).add(P),_t(O.x,O.y,O.z)):_t(pt.x,pt.y,0)}for(let q=1;q<=u;q++)for(let pt=0;pt<U;pt++){let ht=f?z(B[pt],St[pt],bt):B[pt];S?(k.copy(C.normals[q]).multiplyScalar(ht.x),P.copy(C.binormals[q]).multiplyScalar(ht.y),O.copy(b[q]).add(k).add(P),_t(O.x,O.y,O.z)):_t(ht.x,ht.y,h/u*q)}for(let q=_-1;q>=0;q--){let pt=q/_,ht=p*Math.cos(pt*Math.PI/2),wt=d*Math.sin(pt*Math.PI/2)+g;for(let kt=0,ie=F.length;kt<ie;kt++){let ee=z(F[kt],rt[kt],wt);_t(ee.x,ee.y,h+ht)}for(let kt=0,ie=I.length;kt<ie;kt++){let ee=I[kt];st=ot[kt];for(let Le=0,ar=ee.length;Le<ar;Le++){let fr=z(ee[Le],st[Le],wt);S?_t(fr.x,fr.y+b[u-1].y,b[u-1].x+ht):_t(fr.x,fr.y,h+ht)}}}Mt(),lt();function Mt(){let q=i.length/3;if(f){let pt=0,ht=U*pt;for(let wt=0;wt<W;wt++){let kt=R[wt];ct(kt[2]+ht,kt[1]+ht,kt[0]+ht)}pt=u+_*2,ht=U*pt;for(let wt=0;wt<W;wt++){let kt=R[wt];ct(kt[0]+ht,kt[1]+ht,kt[2]+ht)}}else{for(let pt=0;pt<W;pt++){let ht=R[pt];ct(ht[2],ht[1],ht[0])}for(let pt=0;pt<W;pt++){let ht=R[pt];ct(ht[0]+U*u,ht[1]+U*u,ht[2]+U*u)}}n.addGroup(q,i.length/3-q,0)}function lt(){let q=i.length/3,pt=0;Kt(F,pt),pt+=F.length;for(let ht=0,wt=I.length;ht<wt;ht++){let kt=I[ht];Kt(kt,pt),pt+=kt.length}n.addGroup(q,i.length/3-q,1)}function Kt(q,pt){let ht=q.length;for(;--ht>=0;){let wt=ht,kt=ht-1;kt<0&&(kt=q.length-1);for(let ie=0,ee=u+_*2;ie<ee;ie++){let Le=U*ie,ar=U*(ie+1),fr=pt+wt+Le,tt=pt+kt+Le,$=pt+kt+ar,It=pt+wt+ar;X(fr,tt,$,It)}}}function _t(q,pt,ht){l.push(q),l.push(pt),l.push(ht)}function ct(q,pt,ht){et(q),et(pt),et(ht);let wt=i.length/3,kt=x.generateTopUV(n,i,wt-3,wt-2,wt-1);dt(kt[0]),dt(kt[1]),dt(kt[2])}function X(q,pt,ht,wt){et(q),et(pt),et(wt),et(pt),et(ht),et(wt);let kt=i.length/3,ie=x.generateSideWallUV(n,i,kt-6,kt-3,kt-2,kt-1);dt(ie[0]),dt(ie[1]),dt(ie[3]),dt(ie[1]),dt(ie[2]),dt(ie[3])}function et(q){i.push(l[q*3+0]),i.push(l[q*3+1]),i.push(l[q*3+2])}function dt(q){o.push(q.x),o.push(q.y)}}}toJSON(){let t=super.toJSON(),r=this.parameters.shapes,n=this.parameters.options;return l0r(r,n,t)}static fromJSON(t,r){let n=[];for(let o=0,a=t.shapes.length;o<a;o++){let s=r[t.shapes[o]];n.push(s)}let i=t.options.extrudePath;return i!==void 0&&(t.options.extrudePath=new Oht[i.type]().fromJSON(i)),new hh(n,t.options)}},s0r={generateTopUV:function(e,t,r,n,i){let o=t[r*3],a=t[r*3+1],s=t[n*3],l=t[n*3+1],c=t[i*3],u=t[i*3+1];return[new Lt(o,a),new Lt(s,l),new Lt(c,u)]},generateSideWallUV:function(e,t,r,n,i,o){let a=t[r*3],s=t[r*3+1],l=t[r*3+2],c=t[n*3],u=t[n*3+1],h=t[n*3+2],f=t[i*3],p=t[i*3+1],d=t[i*3+2],g=t[o*3],_=t[o*3+1],y=t[o*3+2];return Math.abs(s-u)<Math.abs(a-c)?[new Lt(a,1-l),new Lt(c,1-h),new Lt(f,1-d),new Lt(g,1-y)]:[new Lt(s,1-l),new Lt(u,1-h),new Lt(p,1-d),new Lt(_,1-y)]}};function l0r(e,t,r){if(r.shapes=[],Array.isArray(e))for(let n=0,i=e.length;n<i;n++){let o=e[n];r.shapes.push(o.uuid)}else r.shapes.push(e.uuid);return t.extrudePath!==void 0&&(r.options.extrudePath=t.extrudePath.toJSON()),r}var W1=class extends uh{constructor(t=1,r=0){let n=(1+Math.sqrt(5))/2,i=[-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],o=[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];super(i,o,t,r),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new W1(t.radius,t.detail)}},Y1=class extends Pe{constructor(t=[new Lt(0,.5),new Lt(.5,0),new Lt(0,-.5)],r=12,n=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:r,phiStart:n,phiLength:i},r=Math.floor(r),i=Zo(i,0,Math.PI*2);let o=[],a=[],s=[],l=[],c=[],u=1/r,h=new j,f=new Lt,p=new j,d=new j,g=new j,_=0,y=0;for(let x=0;x<=t.length-1;x++)switch(x){case 0:_=t[x+1].x-t[x].x,y=t[x+1].y-t[x].y,p.x=y*1,p.y=-_,p.z=y*0,g.copy(p),p.normalize(),l.push(p.x,p.y,p.z);break;case t.length-1:l.push(g.x,g.y,g.z);break;default:_=t[x+1].x-t[x].x,y=t[x+1].y-t[x].y,p.x=y*1,p.y=-_,p.z=y*0,d.copy(p),p.x+=g.x,p.y+=g.y,p.z+=g.z,p.normalize(),l.push(p.x,p.y,p.z),g.copy(d)}for(let x=0;x<=r;x++){let b=n+x*u*i,S=Math.sin(b),C=Math.cos(b);for(let P=0;P<=t.length-1;P++){h.x=t[P].x*S,h.y=t[P].y,h.z=t[P].x*C,a.push(h.x,h.y,h.z),f.x=x/r,f.y=P/(t.length-1),s.push(f.x,f.y);let k=l[3*P+0]*S,O=l[3*P+1],D=l[3*P+0]*C;c.push(k,O,D)}}for(let x=0;x<r;x++)for(let b=0;b<t.length-1;b++){let S=b+x*t.length,C=S,P=S+t.length,k=S+t.length+1,O=S+1;o.push(C,P,O),o.push(k,O,P)}this.setIndex(o),this.setAttribute("position",new xe(a,3)),this.setAttribute("uv",new xe(s,2)),this.setAttribute("normal",new xe(c,3))}static fromJSON(t){return new Y1(t.points,t.segments,t.phiStart,t.phiLength)}},Y0=class extends uh{constructor(t=1,r=0){let n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],i=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(n,i,t,r),this.type="OctahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new Y0(t.radius,t.detail)}},j1=class extends Pe{constructor(t=.5,r=1,n=8,i=1,o=0,a=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:r,thetaSegments:n,phiSegments:i,thetaStart:o,thetaLength:a},n=Math.max(3,n),i=Math.max(1,i);let s=[],l=[],c=[],u=[],h=t,f=(r-t)/i,p=new j,d=new Lt;for(let g=0;g<=i;g++){for(let _=0;_<=n;_++){let y=o+_/n*a;p.x=h*Math.cos(y),p.y=h*Math.sin(y),l.push(p.x,p.y,p.z),c.push(0,0,1),d.x=(p.x/r+1)/2,d.y=(p.y/r+1)/2,u.push(d.x,d.y)}h+=f}for(let g=0;g<i;g++){let _=g*(n+1);for(let y=0;y<n;y++){let x=y+_,b=x,S=x+n+1,C=x+n+2,P=x+1;s.push(b,S,P),s.push(S,C,P)}}this.setIndex(s),this.setAttribute("position",new xe(l,3)),this.setAttribute("normal",new xe(c,3)),this.setAttribute("uv",new xe(u,2))}static fromJSON(t){return new j1(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}},j0=class extends Pe{constructor(t=new Kc([new Lt(0,.5),new Lt(-.5,-.5),new Lt(.5,-.5)]),r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:r};let n=[],i=[],o=[],a=[],s=0,l=0;if(Array.isArray(t)===!1)c(t);else for(let u=0;u<t.length;u++)c(t[u]),this.addGroup(s,l,u),s+=l,l=0;this.setIndex(n),this.setAttribute("position",new xe(i,3)),this.setAttribute("normal",new xe(o,3)),this.setAttribute("uv",new xe(a,2));function c(u){let h=i.length/3,f=u.extractPoints(r),p=f.shape,d=f.holes;Zc.isClockWise(p)===!1&&(p=p.reverse());for(let _=0,y=d.length;_<y;_++){let x=d[_];Zc.isClockWise(x)===!0&&(d[_]=x.reverse())}let g=Zc.triangulateShape(p,d);for(let _=0,y=d.length;_<y;_++){let x=d[_];p=p.concat(x)}for(let _=0,y=p.length;_<y;_++){let x=p[_];i.push(x.x,x.y,0),o.push(0,0,1),a.push(x.x,x.y)}for(let _=0,y=g.length;_<y;_++){let x=g[_],b=x[0]+h,S=x[1]+h,C=x[2]+h;n.push(b,S,C),l+=3}}}toJSON(){let t=super.toJSON(),r=this.parameters.shapes;return c0r(r,t)}static fromJSON(t,r){let n=[];for(let i=0,o=t.shapes.length;i<o;i++){let a=r[t.shapes[i]];n.push(a)}return new j0(n,t.curveSegments)}};function c0r(e,t){if(t.shapes=[],Array.isArray(e))for(let r=0,n=e.length;r<n;r++){let i=e[r];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}var X0=class extends Pe{constructor(t=1,r=32,n=16,i=0,o=Math.PI*2,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:r,heightSegments:n,phiStart:i,phiLength:o,thetaStart:a,thetaLength:s},r=Math.max(3,Math.floor(r)),n=Math.max(2,Math.floor(n));let l=Math.min(a+s,Math.PI),c=0,u=[],h=new j,f=new j,p=[],d=[],g=[],_=[];for(let y=0;y<=n;y++){let x=[],b=y/n,S=0;y==0&&a==0?S=.5/r:y==n&&l==Math.PI&&(S=-.5/r);for(let C=0;C<=r;C++){let P=C/r;h.x=-t*Math.cos(i+P*o)*Math.sin(a+b*s),h.y=t*Math.cos(a+b*s),h.z=t*Math.sin(i+P*o)*Math.sin(a+b*s),d.push(h.x,h.y,h.z),f.copy(h).normalize(),g.push(f.x,f.y,f.z),_.push(P+S,1-b),x.push(c++)}u.push(x)}for(let y=0;y<n;y++)for(let x=0;x<r;x++){let b=u[y][x+1],S=u[y][x],C=u[y+1][x],P=u[y+1][x+1];(y!==0||a>0)&&p.push(b,S,P),(y!==n-1||l<Math.PI)&&p.push(S,C,P)}this.setIndex(p),this.setAttribute("position",new xe(d,3)),this.setAttribute("normal",new xe(g,3)),this.setAttribute("uv",new xe(_,2))}static fromJSON(t){return new X0(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}},X1=class extends uh{constructor(t=1,r=0){let n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],i=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,i,t,r),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new X1(t.radius,t.detail)}},$1=class extends Pe{constructor(t=1,r=.4,n=8,i=6,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:r,radialSegments:n,tubularSegments:i,arc:o},n=Math.floor(n),i=Math.floor(i);let a=[],s=[],l=[],c=[],u=new j,h=new j,f=new j;for(let p=0;p<=n;p++)for(let d=0;d<=i;d++){let g=d/i*o,_=p/n*Math.PI*2;h.x=(t+r*Math.cos(_))*Math.cos(g),h.y=(t+r*Math.cos(_))*Math.sin(g),h.z=r*Math.sin(_),s.push(h.x,h.y,h.z),u.x=t*Math.cos(g),u.y=t*Math.sin(g),f.subVectors(h,u).normalize(),l.push(f.x,f.y,f.z),c.push(d/i),c.push(p/n)}for(let p=1;p<=n;p++)for(let d=1;d<=i;d++){let g=(i+1)*p+d-1,_=(i+1)*(p-1)+d-1,y=(i+1)*(p-1)+d,x=(i+1)*p+d;a.push(g,_,x),a.push(_,y,x)}this.setIndex(a),this.setAttribute("position",new xe(s,3)),this.setAttribute("normal",new xe(l,3)),this.setAttribute("uv",new xe(c,2))}static fromJSON(t){return new $1(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}},K1=class extends Pe{constructor(t=1,r=.4,n=64,i=8,o=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:r,tubularSegments:n,radialSegments:i,p:o,q:a},n=Math.floor(n),i=Math.floor(i);let s=[],l=[],c=[],u=[],h=new j,f=new j,p=new j,d=new j,g=new j,_=new j,y=new j;for(let b=0;b<=n;++b){let S=b/n*o*Math.PI*2;x(S,o,a,t,p),x(S+.01,o,a,t,d),_.subVectors(d,p),y.addVectors(d,p),g.crossVectors(_,y),y.crossVectors(g,_),g.normalize(),y.normalize();for(let C=0;C<=i;++C){let P=C/i*Math.PI*2,k=-r*Math.cos(P),O=r*Math.sin(P);h.x=p.x+(k*y.x+O*g.x),h.y=p.y+(k*y.y+O*g.y),h.z=p.z+(k*y.z+O*g.z),l.push(h.x,h.y,h.z),f.subVectors(h,p).normalize(),c.push(f.x,f.y,f.z),u.push(b/n),u.push(C/i)}}for(let b=1;b<=n;b++)for(let S=1;S<=i;S++){let C=(i+1)*(b-1)+(S-1),P=(i+1)*b+(S-1),k=(i+1)*b+S,O=(i+1)*(b-1)+S;s.push(C,P,O),s.push(P,k,O)}this.setIndex(s),this.setAttribute("position",new xe(l,3)),this.setAttribute("normal",new xe(c,3)),this.setAttribute("uv",new xe(u,2));function x(b,S,C,P,k){let O=Math.cos(b),D=Math.sin(b),B=C/S*b,I=Math.cos(B);k.x=P*(2+I)*.5*O,k.y=P*(2+I)*D*.5,k.z=P*Math.sin(B)*.5}}static fromJSON(t){return new K1(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}},Z1=class extends Pe{constructor(t=new hM(new j(-1,-1,0),new j(-1,1,0),new j(1,1,0)),r=64,n=1,i=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:r,radius:n,radialSegments:i,closed:o};let a=t.computeFrenetFrames(r,o);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;let s=new j,l=new j,c=new Lt,u=new j,h=[],f=[],p=[],d=[];g(),this.setIndex(d),this.setAttribute("position",new xe(h,3)),this.setAttribute("normal",new xe(f,3)),this.setAttribute("uv",new xe(p,2));function g(){for(let b=0;b<r;b++)_(b);_(o===!1?r:0),x(),y()}function _(b){u=t.getPointAt(b/r,u);let S=a.normals[b],C=a.binormals[b];for(let P=0;P<=i;P++){let k=P/i*Math.PI*2,O=Math.sin(k),D=-Math.cos(k);l.x=D*S.x+O*C.x,l.y=D*S.y+O*C.y,l.z=D*S.z+O*C.z,l.normalize(),f.push(l.x,l.y,l.z),s.x=u.x+n*l.x,s.y=u.y+n*l.y,s.z=u.z+n*l.z,h.push(s.x,s.y,s.z)}}function y(){for(let b=1;b<=r;b++)for(let S=1;S<=i;S++){let C=(i+1)*(b-1)+(S-1),P=(i+1)*b+(S-1),k=(i+1)*b+S,O=(i+1)*(b-1)+S;d.push(C,P,O),d.push(P,k,O)}}function x(){for(let b=0;b<=r;b++)for(let S=0;S<=i;S++)c.x=b/r,c.y=S/i,p.push(c.x,c.y)}}toJSON(){let t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new Z1(new Oht[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}},d6=class extends Pe{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},t!==null){let r=[],n=new Set,i=new j,o=new j;if(t.index!==null){let a=t.attributes.position,s=t.index,l=t.groups;l.length===0&&(l=[{start:0,count:s.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){let h=l[c],f=h.start,p=h.count;for(let d=f,g=f+p;d<g;d+=3)for(let _=0;_<3;_++){let y=s.getX(d+_),x=s.getX(d+(_+1)%3);i.fromBufferAttribute(a,y),o.fromBufferAttribute(a,x),yhe(i,o,n)===!0&&(r.push(i.x,i.y,i.z),r.push(o.x,o.y,o.z))}}}else{let a=t.attributes.position;for(let s=0,l=a.count/3;s<l;s++)for(let c=0;c<3;c++){let u=3*s+c,h=3*s+(c+1)%3;i.fromBufferAttribute(a,u),o.fromBufferAttribute(a,h),yhe(i,o,n)===!0&&(r.push(i.x,i.y,i.z),r.push(o.x,o.y,o.z))}}this.setAttribute("position",new xe(r,3))}}};function yhe(e,t,r){let n=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return r.has(n)===!0||r.has(i)===!0?!1:(r.add(n,i),!0)}var vhe=Object.freeze({__proto__:null,BoxGeometry:tp,BoxBufferGeometry:tp,CircleGeometry:B1,CircleBufferGeometry:B1,ConeGeometry:H1,ConeBufferGeometry:H1,CylinderGeometry:am,CylinderBufferGeometry:am,DodecahedronGeometry:V1,DodecahedronBufferGeometry:V1,EdgesGeometry:s6,ExtrudeGeometry:hh,ExtrudeBufferGeometry:hh,IcosahedronGeometry:W1,IcosahedronBufferGeometry:W1,LatheGeometry:Y1,LatheBufferGeometry:Y1,OctahedronGeometry:Y0,OctahedronBufferGeometry:Y0,PlaneGeometry:U0,PlaneBufferGeometry:U0,PolyhedronGeometry:uh,PolyhedronBufferGeometry:uh,RingGeometry:j1,RingBufferGeometry:j1,ShapeGeometry:j0,ShapeBufferGeometry:j0,SphereGeometry:X0,SphereBufferGeometry:X0,TetrahedronGeometry:X1,TetrahedronBufferGeometry:X1,TorusGeometry:$1,TorusBufferGeometry:$1,TorusKnotGeometry:K1,TorusKnotBufferGeometry:K1,TubeGeometry:Z1,TubeBufferGeometry:Z1,WireframeGeometry:d6}),m6=class extends qi{constructor(t){super(),this.type="ShadowMaterial",this.color=new ne(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}};m6.prototype.isShadowMaterial=!0;var pM=class extends qi{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ne(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sx,this.normalScale=new Lt(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.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}};pM.prototype.isMeshStandardMaterial=!0;var g6=class extends pM{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Lt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Zo(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(r){this.ior=(1+.4*r)/(1-.4*r)}}),this.sheenColor=new ne(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new ne(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new ne(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}};g6.prototype.isMeshPhysicalMaterial=!0;var _6=class extends qi{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new ne(16777215),this.specular=new ne(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sx,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}};_6.prototype.isMeshPhongMaterial=!0;var y6=class extends qi{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ne(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sx,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};y6.prototype.isMeshToonMaterial=!0;var v6=class extends qi{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sx,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}};v6.prototype.isMeshNormalMaterial=!0;var x6=class extends qi{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new ne(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};x6.prototype.isMeshLambertMaterial=!0;var b6=class extends qi{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ne(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sx,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this}};b6.prototype.isMeshMatcapMaterial=!0;var w6=class extends Gi{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}};w6.prototype.isLineDashedMaterial=!0;var u0r=Object.freeze({__proto__:null,ShadowMaterial:m6,SpriteMaterial:iM,RawShaderMaterial:q0,ShaderMaterial:lh,PointsMaterial:im,MeshPhysicalMaterial:g6,MeshStandardMaterial:pM,MeshPhongMaterial:_6,MeshToonMaterial:y6,MeshNormalMaterial:v6,MeshLambertMaterial:x6,MeshDepthMaterial:eM,MeshDistanceMaterial:rM,MeshBasicMaterial:sh,MeshMatcapMaterial:b6,LineDashedMaterial:w6,LineBasicMaterial:Gi,Material:qi}),jn={arraySlice:function(e,t,r){return jn.isTypedArray(e)?new e.constructor(e.subarray(t,r!==void 0?r:e.length)):e.slice(t,r)},convertArray:function(e,t,r){return!e||!r&&e.constructor===t?e:typeof t.BYTES_PER_ELEMENT=="number"?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){function t(i,o){return e[i]-e[o]}let r=e.length,n=new Array(r);for(let i=0;i!==r;++i)n[i]=i;return n.sort(t),n},sortedArray:function(e,t,r){let n=e.length,i=new e.constructor(n);for(let o=0,a=0;a!==n;++o){let s=r[o]*t;for(let l=0;l!==t;++l)i[a++]=e[s+l]}return i},flattenJSON:function(e,t,r,n){let i=1,o=e[0];for(;o!==void 0&&o[n]===void 0;)o=e[i++];if(o===void 0)return;let a=o[n];if(a!==void 0)if(Array.isArray(a))do a=o[n],a!==void 0&&(t.push(o.time),r.push.apply(r,a)),o=e[i++];while(o!==void 0);else if(a.toArray!==void 0)do a=o[n],a!==void 0&&(t.push(o.time),a.toArray(r,r.length)),o=e[i++];while(o!==void 0);else do a=o[n],a!==void 0&&(t.push(o.time),r.push(a)),o=e[i++];while(o!==void 0)},subclip:function(e,t,r,n,i=30){let o=e.clone();o.name=t;let a=[];for(let l=0;l<o.tracks.length;++l){let c=o.tracks[l],u=c.getValueSize(),h=[],f=[];for(let p=0;p<c.times.length;++p){let d=c.times[p]*i;if(!(d<r||d>=n)){h.push(c.times[p]);for(let g=0;g<u;++g)f.push(c.values[p*u+g])}}h.length!==0&&(c.times=jn.convertArray(h,c.times.constructor),c.values=jn.convertArray(f,c.values.constructor),a.push(c))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,r=e,n=30){n<=0&&(n=30);let i=r.tracks.length,o=t/n;for(let a=0;a<i;++a){let s=r.tracks[a],l=s.ValueTypeName;if(l==="bool"||l==="string")continue;let c=e.tracks.find(function(y){return y.name===s.name&&y.ValueTypeName===l});if(c===void 0)continue;let u=0,h=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=h/3);let f=0,p=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=p/3);let d=s.times.length-1,g;if(o<=s.times[0]){let y=u,x=h-u;g=jn.arraySlice(s.values,y,x)}else if(o>=s.times[d]){let y=d*h+u,x=y+h-u;g=jn.arraySlice(s.values,y,x)}else{let y=s.createInterpolant(),x=u,b=h-u;y.evaluate(o),g=jn.arraySlice(y.resultBuffer,x,b)}l==="quaternion"&&new yi().fromArray(g).normalize().conjugate().toArray(g);let _=c.times.length;for(let y=0;y<_;++y){let x=y*p+f;if(l==="quaternion")yi.multiplyQuaternionsFlat(c.values,x,g,0,c.values,x);else{let b=p-f*2;for(let S=0;S<b;++S)c.values[x+S]-=g[S]}}}return e.blendMode=kht,e}},fh=class{constructor(t,r,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new r.constructor(n),this.sampleValues=r,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let r=this.parameterPositions,n=this._cachedIndex,i=r[n],o=r[n-1];t:{e:{let a;r:{n:if(!(t<i)){for(let s=n+2;;){if(i===void 0){if(t<o)break n;return n=r.length,this._cachedIndex=n,this.afterEnd_(n-1,t,o)}if(n===s)break;if(o=i,i=r[++n],t<i)break e}a=r.length;break r}if(!(t>=o)){let s=r[1];t<s&&(n=2,o=s);for(let l=n-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(n===l)break;if(i=o,o=r[--n-1],t>=o)break e}a=n,n=0;break r}break t}for(;n<a;){let s=n+a>>>1;t<r[s]?a=s:n=s+1}if(i=r[n],o=r[n-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(i===void 0)return n=r.length,this._cachedIndex=n,this.afterEnd_(n-1,o,t)}this._cachedIndex=n,this.intervalChanged_(n,o,i)}return this.interpolate_(n,o,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let r=this.resultBuffer,n=this.sampleValues,i=this.valueSize,o=t*i;for(let a=0;a!==i;++a)r[a]=n[o+a];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};fh.prototype.beforeStart_=fh.prototype.copySampleValue_;fh.prototype.afterEnd_=fh.prototype.copySampleValue_;var SU=class extends fh{constructor(t,r,n,i){super(t,r,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:T1,endingEnd:T1}}intervalChanged_(t,r,n){let i=this.parameterPositions,o=t-2,a=t+1,s=i[o],l=i[a];if(s===void 0)switch(this.getSettings_().endingStart){case C1:o=t,s=2*r-n;break;case JP:o=i.length-2,s=r+i[o]-i[o+1];break;default:o=t,s=n}if(l===void 0)switch(this.getSettings_().endingEnd){case C1:a=t,l=2*n-r;break;case JP:a=1,l=n+i[1]-i[0];break;default:a=t-1,l=r}let c=(n-r)*.5,u=this.valueSize;this._weightPrev=c/(r-s),this._weightNext=c/(l-n),this._offsetPrev=o*u,this._offsetNext=a*u}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,u=this._offsetPrev,h=this._offsetNext,f=this._weightPrev,p=this._weightNext,d=(n-r)/(i-r),g=d*d,_=g*d,y=-f*_+2*f*g-f*d,x=(1+f)*_+(-1.5-2*f)*g+(-.5+f)*d+1,b=(-1-p)*_+(1.5+p)*g+.5*d,S=p*_-p*g;for(let C=0;C!==s;++C)o[C]=y*a[u+C]+x*a[c+C]+b*a[l+C]+S*a[h+C];return o}},S6=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,u=(n-r)/(i-r),h=1-u;for(let f=0;f!==s;++f)o[f]=a[c+f]*h+a[l+f]*u;return o}},MU=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},Ol=class{constructor(t,r,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=jn.convertArray(r,this.TimeBufferType),this.values=jn.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let r=t.constructor,n;if(r.toJSON!==this.toJSON)n=r.toJSON(t);else{n={name:t.name,times:jn.convertArray(t.times,Array),values:jn.convertArray(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new MU(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new S6(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new SU(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let r;switch(t){case KP:r=this.InterpolantFactoryMethodDiscrete;break;case ZP:r=this.InterpolantFactoryMethodLinear;break;case rU:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return KP;case this.InterpolantFactoryMethodLinear:return ZP;case this.InterpolantFactoryMethodSmooth:return rU}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]+=t}return this}scale(t){if(t!==1){let r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]*=t}return this}trim(t,r){let n=this.times,i=n.length,o=0,a=i-1;for(;o!==i&&n[o]<t;)++o;for(;a!==-1&&n[a]>r;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);let s=this.getValueSize();this.times=jn.arraySlice(n,o,a),this.values=jn.arraySlice(this.values,o*s,a*s)}return this}validate(){let t=!0,r=this.getValueSize();r-Math.floor(r)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let s=0;s!==o;s++){let l=n[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),t=!1;break}a=l}if(i!==void 0&&jn.isTypedArray(i))for(let s=0,l=i.length;s!==l;++s){let c=i[s];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,c),t=!1;break}}return t}optimize(){let t=jn.arraySlice(this.times),r=jn.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===rU,o=t.length-1,a=1;for(let s=1;s<o;++s){let l=!1,c=t[s],u=t[s+1];if(c!==u&&(s!==1||c!==t[0]))if(i)l=!0;else{let h=s*n,f=h-n,p=h+n;for(let d=0;d!==n;++d){let g=r[h+d];if(g!==r[f+d]||g!==r[p+d]){l=!0;break}}}if(l){if(s!==a){t[a]=t[s];let h=s*n,f=a*n;for(let p=0;p!==n;++p)r[f+p]=r[h+p]}++a}}if(o>0){t[a]=t[o];for(let s=o*n,l=a*n,c=0;c!==n;++c)r[l+c]=r[s+c];++a}return a!==t.length?(this.times=jn.arraySlice(t,0,a),this.values=jn.arraySlice(r,0,a*n)):(this.times=t,this.values=r),this}clone(){let t=jn.arraySlice(this.times,0),r=jn.arraySlice(this.values,0),n=this.constructor,i=new n(this.name,t,r);return i.createInterpolant=this.createInterpolant,i}};Ol.prototype.TimeBufferType=Float32Array;Ol.prototype.ValueBufferType=Float32Array;Ol.prototype.DefaultInterpolation=ZP;var sm=class extends Ol{};sm.prototype.ValueTypeName="bool";sm.prototype.ValueBufferType=Array;sm.prototype.DefaultInterpolation=KP;sm.prototype.InterpolantFactoryMethodLinear=void 0;sm.prototype.InterpolantFactoryMethodSmooth=void 0;var M6=class extends Ol{};M6.prototype.ValueTypeName="color";var J1=class extends Ol{};J1.prototype.ValueTypeName="number";var EU=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(n-r)/(i-r),c=t*s;for(let u=c+s;c!==u;c+=4)yi.slerpFlat(o,0,a,c-s,a,c,l);return o}},$0=class extends Ol{InterpolantFactoryMethodLinear(t){return new EU(this.times,this.values,this.getValueSize(),t)}};$0.prototype.ValueTypeName="quaternion";$0.prototype.DefaultInterpolation=ZP;$0.prototype.InterpolantFactoryMethodSmooth=void 0;var lm=class extends Ol{};lm.prototype.ValueTypeName="string";lm.prototype.ValueBufferType=Array;lm.prototype.DefaultInterpolation=KP;lm.prototype.InterpolantFactoryMethodLinear=void 0;lm.prototype.InterpolantFactoryMethodSmooth=void 0;var Q1=class extends Ol{};Q1.prototype.ValueTypeName="vector";var tx=class{constructor(t,r=-1,n,i=$U){this.name=t,this.tracks=n,this.duration=r,this.blendMode=i,this.uuid=Dl(),this.duration<0&&this.resetDuration()}static parse(t){let r=[],n=t.tracks,i=1/(t.fps||1);for(let a=0,s=n.length;a!==s;++a)r.push(f0r(n[a]).scale(i));let o=new this(t.name,t.duration,r,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){let r=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:r,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,a=n.length;o!==a;++o)r.push(Ol.toJSON(n[o]));return i}static CreateFromMorphTargetSequence(t,r,n,i){let o=r.length,a=[];for(let s=0;s<o;s++){let l=[],c=[];l.push((s+o-1)%o,s,(s+1)%o),c.push(0,1,0);let u=jn.getKeyframeOrder(l);l=jn.sortedArray(l,1,u),c=jn.sortedArray(c,1,u),!i&&l[0]===0&&(l.push(o),c.push(c[0])),a.push(new J1(".morphTargetInfluences["+r[s].name+"]",l,c).scale(1/n))}return new this(t,-1,a)}static findByName(t,r){let n=t;if(!Array.isArray(t)){let i=t;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===r)return n[i];return null}static CreateClipsFromMorphTargetSequences(t,r,n){let i={},o=/^([\w-]*?)([\d]+)$/;for(let s=0,l=t.length;s<l;s++){let c=t[s],u=c.name.match(o);if(u&&u.length>1){let h=u[1],f=i[h];f||(i[h]=f=[]),f.push(c)}}let a=[];for(let s in i)a.push(this.CreateFromMorphTargetSequence(s,i[s],r,n));return a}static parseAnimation(t,r){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(h,f,p,d,g){if(p.length!==0){let _=[],y=[];jn.flattenJSON(p,_,y,d),_.length!==0&&g.push(new h(f,_,y))}},i=[],o=t.name||"default",a=t.fps||30,s=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let h=0;h<c.length;h++){let f=c[h].keys;if(!(!f||f.length===0))if(f[0].morphTargets){let p={},d;for(d=0;d<f.length;d++)if(f[d].morphTargets)for(let g=0;g<f[d].morphTargets.length;g++)p[f[d].morphTargets[g]]=-1;for(let g in p){let _=[],y=[];for(let x=0;x!==f[d].morphTargets.length;++x){let b=f[d];_.push(b.time),y.push(b.morphTarget===g?1:0)}i.push(new J1(".morphTargetInfluence["+g+"]",_,y))}l=p.length*(a||1)}else{let p=".bones["+r[h].name+"]";n(Q1,p+".position",f,"pos",i),n($0,p+".quaternion",f,"rot",i),n(Q1,p+".scale",f,"scl",i)}}return i.length===0?null:new this(o,l,i,s)}resetDuration(){let t=this.tracks,r=0;for(let n=0,i=t.length;n!==i;++n){let o=this.tracks[n];r=Math.max(r,o.times[o.times.length-1])}return this.duration=r,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let r=0;r<this.tracks.length;r++)t=t&&this.tracks[r].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){let t=[];for(let r=0;r<this.tracks.length;r++)t.push(this.tracks[r].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}};function h0r(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return J1;case"vector":case"vector2":case"vector3":case"vector4":return Q1;case"color":return M6;case"quaternion":return $0;case"bool":case"boolean":return sm;case"string":return lm}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function f0r(e){if(e.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=h0r(e.type);if(e.times===void 0){let r=[],n=[];jn.flattenJSON(e.keys,r,n,"value"),e.times=r,e.values=n}return t.parse!==void 0?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}var ex={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(this.files[e]=t)},get:function(e){if(this.enabled!==!1)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},E6=class{constructor(t,r,n){let i=this,o=!1,a=0,s=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=r,this.onError=n,this.itemStart=function(u){s++,o===!1&&i.onStart!==void 0&&i.onStart(u,a,s),o=!0},this.itemEnd=function(u){a++,i.onProgress!==void 0&&i.onProgress(u,a,s),a===s&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){let h=c.indexOf(u);return h!==-1&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,f=c.length;h<f;h+=2){let p=c[h],d=c[h+1];if(p.global&&(p.lastIndex=0),p.test(u))return d}return null}}},ipe=new E6,ea=class{constructor(t){this.manager=t!==void 0?t:ipe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,r){let n=this;return new Promise(function(i,o){n.load(t,i,r,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}},jd={},Jc=class extends ea{constructor(t){super(t)}load(t,r,n,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=ex.get(t);if(o!==void 0)return this.manager.itemStart(t),setTimeout(()=>{r&&r(o),this.manager.itemEnd(t)},0),o;if(jd[t]!==void 0){jd[t].push({onLoad:r,onProgress:n,onError:i});return}jd[t]=[],jd[t].push({onLoad:r,onProgress:n,onError:i});let a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||c.body.getReader===void 0)return c;let u=jd[t],h=c.body.getReader(),f=c.headers.get("Content-Length"),p=f?parseInt(f):0,d=p!==0,g=0,_=new ReadableStream({start(y){x();function x(){h.read().then(({done:b,value:S})=>{if(b)y.close();else{g+=S.byteLength;let C=new ProgressEvent("progress",{lengthComputable:d,loaded:g,total:p});for(let P=0,k=u.length;P<k;P++){let O=u[P];O.onProgress&&O.onProgress(C)}y.enqueue(S),x()}})}}});return new Response(_)}else throw Error(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,s));case"json":return c.json();default:if(s===void 0)return c.text();{let h=/charset="?([^;"\s]*)"?/i.exec(s),f=h&&h[1]?h[1].toLowerCase():void 0,p=new TextDecoder(f);return c.arrayBuffer().then(d=>p.decode(d))}}}).then(c=>{ex.add(t,c);let u=jd[t];delete jd[t];for(let h=0,f=u.length;h<f;h++){let p=u[h];p.onLoad&&p.onLoad(c)}}).catch(c=>{let u=jd[t];if(u===void 0)throw this.manager.itemError(t),c;delete jd[t];for(let h=0,f=u.length;h<f;h++){let p=u[h];p.onError&&p.onError(c)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}},oht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r=[];for(let n=0;n<t.length;n++){let i=tx.parse(t[n]);r.push(i)}return r}},aht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=[],s=new a6,l=new Jc(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(o.withCredentials);let c=0;function u(h){l.load(t[h],function(f){let p=o.parse(f,!0);a[h]={width:p.width,height:p.height,format:p.format,mipmaps:p.mipmaps},c+=1,c===6&&(p.mipmapCount===1&&(s.minFilter=ii),s.image=a,s.format=p.format,s.needsUpdate=!0,r&&r(s))},n,i)}if(Array.isArray(t))for(let h=0,f=t.length;h<f;++h)u(h);else l.load(t,function(h){let f=o.parse(h,!0);if(f.isCubemap){let p=f.mipmaps.length/f.mipmapCount;for(let d=0;d<p;d++){a[d]={mipmaps:[]};for(let g=0;g<f.mipmapCount;g++)a[d].mipmaps.push(f.mipmaps[d*f.mipmapCount+g]),a[d].format=f.format,a[d].width=f.width,a[d].height=f.height}s.image=a}else s.image.width=f.width,s.image.height=f.height,s.mipmaps=f.mipmaps;f.mipmapCount===1&&(s.minFilter=ii),s.format=f.format,s.needsUpdate=!0,r&&r(s)},n,i);return s}},rx=class extends ea{constructor(t){super(t)}load(t,r,n,i){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=ex.get(t);if(a!==void 0)return o.manager.itemStart(t),setTimeout(function(){r&&r(a),o.manager.itemEnd(t)},0),a;let s=t6("img");function l(){u(),ex.add(t,this),r&&r(this),o.manager.itemEnd(t)}function c(h){u(),i&&i(h),o.manager.itemError(t),o.manager.itemEnd(t)}function u(){s.removeEventListener("load",l,!1),s.removeEventListener("error",c,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",c,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),o.manager.itemStart(t),s.src=t,s}},TU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new V0,a=new rx(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;function l(c){a.load(t[c],function(u){o.images[c]=u,s++,s===6&&(o.needsUpdate=!0,r&&r(o))},void 0,i)}for(let c=0;c<t.length;++c)l(c);return o}},CU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Qd,s=new Jc(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(o.withCredentials),s.load(t,function(l){let c=o.parse(l);!c||(c.image!==void 0?a.image=c.image:c.data!==void 0&&(a.image.width=c.width,a.image.height=c.height,a.image.data=c.data),a.wrapS=c.wrapS!==void 0?c.wrapS:Jo,a.wrapT=c.wrapT!==void 0?c.wrapT:Jo,a.magFilter=c.magFilter!==void 0?c.magFilter:ii,a.minFilter=c.minFilter!==void 0?c.minFilter:ii,a.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.encoding!==void 0&&(a.encoding=c.encoding),c.flipY!==void 0&&(a.flipY=c.flipY),c.format!==void 0&&(a.format=c.format),c.type!==void 0&&(a.type=c.type),c.mipmaps!==void 0&&(a.mipmaps=c.mipmaps,a.minFilter=ax),c.mipmapCount===1&&(a.minFilter=ii),c.generateMipmaps!==void 0&&(a.generateMipmaps=c.generateMipmaps),a.needsUpdate=!0,r&&r(a,c))},n,i),a}},AU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new vi,a=new rx(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(s){o.image=s,o.needsUpdate=!0,r!==void 0&&r(o)},n,i),o}},zl=class extends or{constructor(t,r=1){super(),this.type="Light",this.color=new ne(t),this.intensity=r}dispose(){}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let r=super.toJSON(t);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,this.groundColor!==void 0&&(r.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(r.object.distance=this.distance),this.angle!==void 0&&(r.object.angle=this.angle),this.decay!==void 0&&(r.object.decay=this.decay),this.penumbra!==void 0&&(r.object.penumbra=this.penumbra),this.shadow!==void 0&&(r.object.shadow=this.shadow.toJSON()),r}};zl.prototype.isLight=!0;var T6=class extends zl{constructor(t,r,n){super(t,n),this.type="HemisphereLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.groundColor=new ne(r)}copy(t){return zl.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}};T6.prototype.isHemisphereLight=!0;var xhe=new Me,bhe=new j,whe=new j,C6=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Lt(512,512),this.map=null,this.mapPass=null,this.matrix=new Me,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new D1,this._frameExtents=new Lt(1,1),this._viewportCount=1,this._viewports=[new en(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let r=this.camera,n=this.matrix;bhe.setFromMatrixPosition(t.matrixWorld),r.position.copy(bhe),whe.setFromMatrixPosition(t.target.matrixWorld),r.lookAt(whe),r.updateMatrixWorld(),xhe.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(xhe),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(r.projectionMatrix),n.multiply(r.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}},PU=class extends C6{constructor(){super(new Ui(50,1,.5,500)),this.focus=1}updateMatrices(t){let r=this.camera,n=QP*2*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=t.distance||r.far;(n!==r.fov||i!==r.aspect||o!==r.far)&&(r.fov=n,r.aspect=i,r.far=o,r.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}};PU.prototype.isSpotLightShadow=!0;var A6=class extends zl{constructor(t,r,n=0,i=Math.PI/3,o=0,a=1){super(t,r),this.type="SpotLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.target=new or,this.distance=n,this.angle=i,this.penumbra=o,this.decay=a,this.shadow=new PU}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};A6.prototype.isSpotLight=!0;var She=new Me,BP=new j,xut=new j,IU=class extends C6{constructor(){super(new Ui(90,1,.5,500)),this._frameExtents=new Lt(4,2),this._viewportCount=6,this._viewports=[new en(2,1,1,1),new en(0,1,1,1),new en(3,1,1,1),new en(1,1,1,1),new en(3,0,1,1),new en(1,0,1,1)],this._cubeDirections=[new j(1,0,0),new j(-1,0,0),new j(0,0,1),new j(0,0,-1),new j(0,1,0),new j(0,-1,0)],this._cubeUps=[new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,0,1),new j(0,0,-1)]}updateMatrices(t,r=0){let n=this.camera,i=this.matrix,o=t.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),BP.setFromMatrixPosition(t.matrixWorld),n.position.copy(BP),xut.copy(n.position),xut.add(this._cubeDirections[r]),n.up.copy(this._cubeUps[r]),n.lookAt(xut),n.updateMatrixWorld(),i.makeTranslation(-BP.x,-BP.y,-BP.z),She.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(She)}};IU.prototype.isPointLightShadow=!0;var P6=class extends zl{constructor(t,r,n=0,i=1){super(t,r),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new IU}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}};P6.prototype.isPointLight=!0;var LU=class extends C6{constructor(){super(new O1(-5,5,5,-5,.5,500))}};LU.prototype.isDirectionalLightShadow=!0;var I6=class extends zl{constructor(t,r){super(t,r),this.type="DirectionalLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.target=new or,this.shadow=new LU}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};I6.prototype.isDirectionalLight=!0;var L6=class extends zl{constructor(t,r){super(t,r),this.type="AmbientLight"}};L6.prototype.isAmbientLight=!0;var k6=class extends zl{constructor(t,r,n=10,i=10){super(t,r),this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){let r=super.toJSON(t);return r.object.width=this.width,r.object.height=this.height,r}};k6.prototype.isRectAreaLight=!0;var R6=class{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new j)}set(t){for(let r=0;r<9;r++)this.coefficients[r].copy(t[r]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,r){let n=t.x,i=t.y,o=t.z,a=this.coefficients;return r.copy(a[0]).multiplyScalar(.282095),r.addScaledVector(a[1],.488603*i),r.addScaledVector(a[2],.488603*o),r.addScaledVector(a[3],.488603*n),r.addScaledVector(a[4],1.092548*(n*i)),r.addScaledVector(a[5],1.092548*(i*o)),r.addScaledVector(a[6],.315392*(3*o*o-1)),r.addScaledVector(a[7],1.092548*(n*o)),r.addScaledVector(a[8],.546274*(n*n-i*i)),r}getIrradianceAt(t,r){let n=t.x,i=t.y,o=t.z,a=this.coefficients;return r.copy(a[0]).multiplyScalar(.886227),r.addScaledVector(a[1],2*.511664*i),r.addScaledVector(a[2],2*.511664*o),r.addScaledVector(a[3],2*.511664*n),r.addScaledVector(a[4],2*.429043*n*i),r.addScaledVector(a[5],2*.429043*i*o),r.addScaledVector(a[6],.743125*o*o-.247708),r.addScaledVector(a[7],2*.429043*n*o),r.addScaledVector(a[8],.429043*(n*n-i*i)),r}add(t){for(let r=0;r<9;r++)this.coefficients[r].add(t.coefficients[r]);return this}addScaledSH(t,r){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],r);return this}scale(t){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(t);return this}lerp(t,r){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],r);return this}equals(t){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(t.coefficients[r]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(t,r=0){let n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,r+i*3);return this}toArray(t=[],r=0){let n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,r+i*3);return t}static getBasisAt(t,r){let n=t.x,i=t.y,o=t.z;r[0]=.282095,r[1]=.488603*i,r[2]=.488603*o,r[3]=.488603*n,r[4]=1.092548*n*i,r[5]=1.092548*i*o,r[6]=.315392*(3*o*o-1),r[7]=1.092548*n*o,r[8]=.546274*(n*n-i*i)}};R6.prototype.isSphericalHarmonics3=!0;var nx=class extends zl{constructor(t=new R6,r=1){super(void 0,r),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){let r=super.toJSON(t);return r.object.sh=this.sh.toArray(),r}};nx.prototype.isLightProbe=!0;var kU=class extends ea{constructor(t){super(t),this.textures={}}load(t,r,n,i){let o=this,a=new Jc(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r=this.textures;function n(o){return r[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),r[o]}let i=new u0r[t.type];if(t.uuid!==void 0&&(i.uuid=t.uuid),t.name!==void 0&&(i.name=t.name),t.color!==void 0&&i.color!==void 0&&i.color.setHex(t.color),t.roughness!==void 0&&(i.roughness=t.roughness),t.metalness!==void 0&&(i.metalness=t.metalness),t.sheen!==void 0&&(i.sheen=t.sheen),t.sheenColor!==void 0&&(i.sheenColor=new ne().setHex(t.sheenColor)),t.sheenRoughness!==void 0&&(i.sheenRoughness=t.sheenRoughness),t.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(t.emissive),t.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(t.specular),t.specularIntensity!==void 0&&(i.specularIntensity=t.specularIntensity),t.specularColor!==void 0&&i.specularColor!==void 0&&i.specularColor.setHex(t.specularColor),t.shininess!==void 0&&(i.shininess=t.shininess),t.clearcoat!==void 0&&(i.clearcoat=t.clearcoat),t.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=t.clearcoatRoughness),t.transmission!==void 0&&(i.transmission=t.transmission),t.thickness!==void 0&&(i.thickness=t.thickness),t.attenuationDistance!==void 0&&(i.attenuationDistance=t.attenuationDistance),t.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(t.attenuationColor),t.fog!==void 0&&(i.fog=t.fog),t.flatShading!==void 0&&(i.flatShading=t.flatShading),t.blending!==void 0&&(i.blending=t.blending),t.combine!==void 0&&(i.combine=t.combine),t.side!==void 0&&(i.side=t.side),t.shadowSide!==void 0&&(i.shadowSide=t.shadowSide),t.opacity!==void 0&&(i.opacity=t.opacity),t.transparent!==void 0&&(i.transparent=t.transparent),t.alphaTest!==void 0&&(i.alphaTest=t.alphaTest),t.depthTest!==void 0&&(i.depthTest=t.depthTest),t.depthWrite!==void 0&&(i.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(i.colorWrite=t.colorWrite),t.alphaWrite!==void 0&&(i.alphaWrite=t.alphaWrite),t.stencilWrite!==void 0&&(i.stencilWrite=t.stencilWrite),t.stencilWriteMask!==void 0&&(i.stencilWriteMask=t.stencilWriteMask),t.stencilFunc!==void 0&&(i.stencilFunc=t.stencilFunc),t.stencilRef!==void 0&&(i.stencilRef=t.stencilRef),t.stencilFuncMask!==void 0&&(i.stencilFuncMask=t.stencilFuncMask),t.stencilFail!==void 0&&(i.stencilFail=t.stencilFail),t.stencilZFail!==void 0&&(i.stencilZFail=t.stencilZFail),t.stencilZPass!==void 0&&(i.stencilZPass=t.stencilZPass),t.wireframe!==void 0&&(i.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(i.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(i.rotation=t.rotation),t.linewidth!==1&&(i.linewidth=t.linewidth),t.dashSize!==void 0&&(i.dashSize=t.dashSize),t.gapSize!==void 0&&(i.gapSize=t.gapSize),t.scale!==void 0&&(i.scale=t.scale),t.polygonOffset!==void 0&&(i.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=t.polygonOffsetUnits),t.dithering!==void 0&&(i.dithering=t.dithering),t.alphaToCoverage!==void 0&&(i.alphaToCoverage=t.alphaToCoverage),t.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=t.premultipliedAlpha),t.visible!==void 0&&(i.visible=t.visible),t.toneMapped!==void 0&&(i.toneMapped=t.toneMapped),t.userData!==void 0&&(i.userData=t.userData),t.vertexColors!==void 0&&(typeof t.vertexColors=="number"?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),t.uniforms!==void 0)for(let o in t.uniforms){let a=t.uniforms[o];switch(i.uniforms[o]={},a.type){case"t":i.uniforms[o].value=n(a.value);break;case"c":i.uniforms[o].value=new ne().setHex(a.value);break;case"v2":i.uniforms[o].value=new Lt().fromArray(a.value);break;case"v3":i.uniforms[o].value=new j().fromArray(a.value);break;case"v4":i.uniforms[o].value=new en().fromArray(a.value);break;case"m3":i.uniforms[o].value=new ki().fromArray(a.value);break;case"m4":i.uniforms[o].value=new Me().fromArray(a.value);break;default:i.uniforms[o].value=a.value}}if(t.defines!==void 0&&(i.defines=t.defines),t.vertexShader!==void 0&&(i.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(i.fragmentShader=t.fragmentShader),t.extensions!==void 0)for(let o in t.extensions)i.extensions[o]=t.extensions[o];if(t.shading!==void 0&&(i.flatShading=t.shading===1),t.size!==void 0&&(i.size=t.size),t.sizeAttenuation!==void 0&&(i.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(i.map=n(t.map)),t.matcap!==void 0&&(i.matcap=n(t.matcap)),t.alphaMap!==void 0&&(i.alphaMap=n(t.alphaMap)),t.bumpMap!==void 0&&(i.bumpMap=n(t.bumpMap)),t.bumpScale!==void 0&&(i.bumpScale=t.bumpScale),t.normalMap!==void 0&&(i.normalMap=n(t.normalMap)),t.normalMapType!==void 0&&(i.normalMapType=t.normalMapType),t.normalScale!==void 0){let o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Lt().fromArray(o)}return t.displacementMap!==void 0&&(i.displacementMap=n(t.displacementMap)),t.displacementScale!==void 0&&(i.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(i.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(i.roughnessMap=n(t.roughnessMap)),t.metalnessMap!==void 0&&(i.metalnessMap=n(t.metalnessMap)),t.emissiveMap!==void 0&&(i.emissiveMap=n(t.emissiveMap)),t.emissiveIntensity!==void 0&&(i.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(i.specularMap=n(t.specularMap)),t.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(t.specularIntensityMap)),t.specularColorMap!==void 0&&(i.specularColorMap=n(t.specularColorMap)),t.envMap!==void 0&&(i.envMap=n(t.envMap)),t.envMapIntensity!==void 0&&(i.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(i.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(i.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(i.lightMap=n(t.lightMap)),t.lightMapIntensity!==void 0&&(i.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(i.aoMap=n(t.aoMap)),t.aoMapIntensity!==void 0&&(i.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(i.gradientMap=n(t.gradientMap)),t.clearcoatMap!==void 0&&(i.clearcoatMap=n(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Lt().fromArray(t.clearcoatNormalScale)),t.transmissionMap!==void 0&&(i.transmissionMap=n(t.transmissionMap)),t.thicknessMap!==void 0&&(i.thicknessMap=n(t.thicknessMap)),t.sheenColorMap!==void 0&&(i.sheenColorMap=n(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}},dM=class{static decodeText(t){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(t);let r="";for(let n=0,i=t.length;n<i;n++)r+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(r))}catch(n){return r}}static extractUrlBase(t){let r=t.lastIndexOf("/");return r===-1?"./":t.substr(0,r+1)}static resolveURL(t,r){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(t)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:r+t)}},N6=class extends Pe{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){let t=super.toJSON(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}};N6.prototype.isInstancedBufferGeometry=!0;var RU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r={},n={};function i(p,d){if(r[d]!==void 0)return r[d];let _=p.interleavedBuffers[d],y=o(p,_.buffer),x=B3(_.type,y),b=new rm(x,_.stride);return b.uuid=_.uuid,r[d]=b,b}function o(p,d){if(n[d]!==void 0)return n[d];let _=p.arrayBuffers[d],y=new Uint32Array(_).buffer;return n[d]=y,y}let a=t.isInstancedBufferGeometry?new N6:new Pe,s=t.data.index;if(s!==void 0){let p=B3(s.type,s.array);a.setIndex(new Je(p,1))}let l=t.data.attributes;for(let p in l){let d=l[p],g;if(d.isInterleavedBufferAttribute){let _=i(t.data,d.data);g=new ep(_,d.itemSize,d.offset,d.normalized)}else{let _=B3(d.type,d.array),y=d.isInstancedBufferAttribute?nm:Je;g=new y(_,d.itemSize,d.normalized)}d.name!==void 0&&(g.name=d.name),d.usage!==void 0&&g.setUsage(d.usage),d.updateRange!==void 0&&(g.updateRange.offset=d.updateRange.offset,g.updateRange.count=d.updateRange.count),a.setAttribute(p,g)}let c=t.data.morphAttributes;if(c)for(let p in c){let d=c[p],g=[];for(let _=0,y=d.length;_<y;_++){let x=d[_],b;if(x.isInterleavedBufferAttribute){let S=i(t.data,x.data);b=new ep(S,x.itemSize,x.offset,x.normalized)}else{let S=B3(x.type,x.array);b=new Je(S,x.itemSize,x.normalized)}x.name!==void 0&&(b.name=x.name),g.push(b)}a.morphAttributes[p]=g}t.data.morphTargetsRelative&&(a.morphTargetsRelative=!0);let h=t.data.groups||t.data.drawcalls||t.data.offsets;if(h!==void 0)for(let p=0,d=h.length;p!==d;++p){let g=h[p];a.addGroup(g.start,g.count,g.materialIndex)}let f=t.data.boundingSphere;if(f!==void 0){let p=new j;f.center!==void 0&&p.fromArray(f.center),a.boundingSphere=new Jf(p,f.radius)}return t.name&&(a.name=t.name),t.userData&&(a.userData=t.userData),a}},sht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=this.path===""?dM.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||a;let s=new Jc(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(l){let c=null;try{c=JSON.parse(l)}catch(h){i!==void 0&&i(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}let u=c.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry"){console.error("THREE.ObjectLoader: Can't load "+t);return}o.parse(c,r)},n,i)}loadAsync(t,r){return Ri(this,null,function*(){let n=this,i=this.path===""?dM.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||i;let o=new Jc(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);let a=yield o.loadAsync(t,r),s=JSON.parse(a),l=s.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+t);return yield n.parseAsync(s)})}parse(t,r){let n=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),o=this.parseGeometries(t.geometries,i),a=this.parseImages(t.images,function(){r!==void 0&&r(c)}),s=this.parseTextures(t.textures,a),l=this.parseMaterials(t.materials,s),c=this.parseObject(t.object,o,l,s,n),u=this.parseSkeletons(t.skeletons,c);if(this.bindSkeletons(c,u),r!==void 0){let h=!1;for(let f in a)if(a[f]instanceof HTMLImageElement){h=!0;break}h===!1&&r(c)}return c}parseAsync(t){return Ri(this,null,function*(){let r=this.parseAnimations(t.animations),n=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,n),o=yield this.parseImagesAsync(t.images),a=this.parseTextures(t.textures,o),s=this.parseMaterials(t.materials,a),l=this.parseObject(t.object,i,s,a,r),c=this.parseSkeletons(t.skeletons,l);return this.bindSkeletons(l,c),l})}parseShapes(t){let r={};if(t!==void 0)for(let n=0,i=t.length;n<i;n++){let o=new Kc().fromJSON(t[n]);r[o.uuid]=o}return r}parseSkeletons(t,r){let n={},i={};if(r.traverse(function(o){o.isBone&&(i[o.uuid]=o)}),t!==void 0)for(let o=0,a=t.length;o<a;o++){let s=new lM().fromJSON(t[o],i);n[s.uuid]=s}return n}parseGeometries(t,r){let n={};if(t!==void 0){let i=new RU;for(let o=0,a=t.length;o<a;o++){let s,l=t[o];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:l.type in vhe?s=vhe[l.type].fromJSON(l,r):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}s.uuid=l.uuid,l.name!==void 0&&(s.name=l.name),s.isBufferGeometry===!0&&l.userData!==void 0&&(s.userData=l.userData),n[l.uuid]=s}}return n}parseMaterials(t,r){let n={},i={};if(t!==void 0){let o=new kU;o.setTextures(r);for(let a=0,s=t.length;a<s;a++){let l=t[a];if(l.type==="MultiMaterial"){let c=[];for(let u=0;u<l.materials.length;u++){let h=l.materials[u];n[h.uuid]===void 0&&(n[h.uuid]=o.parse(h)),c.push(n[h.uuid])}i[l.uuid]=c}else n[l.uuid]===void 0&&(n[l.uuid]=o.parse(l)),i[l.uuid]=n[l.uuid]}}return i}parseAnimations(t){let r={};if(t!==void 0)for(let n=0;n<t.length;n++){let i=t[n],o=tx.parse(i);r[o.uuid]=o}return r}parseImages(t,r){let n=this,i={},o;function a(l){return n.manager.itemStart(l),o.load(l,function(){n.manager.itemEnd(l)},void 0,function(){n.manager.itemError(l),n.manager.itemEnd(l)})}function s(l){if(typeof l=="string"){let c=l,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:n.resourcePath+c;return a(u)}else return l.data?{data:B3(l.type,l.data),width:l.width,height:l.height}:null}if(t!==void 0&&t.length>0){let l=new E6(r);o=new rx(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=t.length;c<u;c++){let h=t[c],f=h.url;if(Array.isArray(f)){i[h.uuid]=[];for(let p=0,d=f.length;p<d;p++){let g=f[p],_=s(g);_!==null&&(_ instanceof HTMLImageElement?i[h.uuid].push(_):i[h.uuid].push(new Qd(_.data,_.width,_.height)))}}else{let p=s(h.url);p!==null&&(i[h.uuid]=p)}}}return i}parseImagesAsync(t){return Ri(this,null,function*(){let r=this,n={},i;function o(a){return Ri(this,null,function*(){if(typeof a=="string"){let s=a,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(s)?s:r.resourcePath+s;return yield i.loadAsync(l)}else return a.data?{data:B3(a.type,a.data),width:a.width,height:a.height}:null})}if(t!==void 0&&t.length>0){i=new rx(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,s=t.length;a<s;a++){let l=t[a],c=l.url;if(Array.isArray(c)){n[l.uuid]=[];for(let u=0,h=c.length;u<h;u++){let f=c[u],p=yield o(f);p!==null&&(p instanceof HTMLImageElement?n[l.uuid].push(p):n[l.uuid].push(new Qd(p.data,p.width,p.height)))}}else{let u=yield o(l.url);u!==null&&(n[l.uuid]=u)}}}return n})}parseTextures(t,r){function n(o,a){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),a[o])}let i={};if(t!==void 0)for(let o=0,a=t.length;o<a;o++){let s=t[o];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),r[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);let l,c=r[s.image];Array.isArray(c)?(l=new V0(c),c.length===6&&(l.needsUpdate=!0)):(c&&c.data?l=new Qd(c.data,c.width,c.height):l=new vi(c),c&&(l.needsUpdate=!0)),l.uuid=s.uuid,s.name!==void 0&&(l.name=s.name),s.mapping!==void 0&&(l.mapping=n(s.mapping,p0r)),s.offset!==void 0&&l.offset.fromArray(s.offset),s.repeat!==void 0&&l.repeat.fromArray(s.repeat),s.center!==void 0&&l.center.fromArray(s.center),s.rotation!==void 0&&(l.rotation=s.rotation),s.wrap!==void 0&&(l.wrapS=n(s.wrap[0],Mhe),l.wrapT=n(s.wrap[1],Mhe)),s.format!==void 0&&(l.format=s.format),s.type!==void 0&&(l.type=s.type),s.encoding!==void 0&&(l.encoding=s.encoding),s.minFilter!==void 0&&(l.minFilter=n(s.minFilter,Ehe)),s.magFilter!==void 0&&(l.magFilter=n(s.magFilter,Ehe)),s.anisotropy!==void 0&&(l.anisotropy=s.anisotropy),s.flipY!==void 0&&(l.flipY=s.flipY),s.premultiplyAlpha!==void 0&&(l.premultiplyAlpha=s.premultiplyAlpha),s.unpackAlignment!==void 0&&(l.unpackAlignment=s.unpackAlignment),s.userData!==void 0&&(l.userData=s.userData),i[s.uuid]=l}return i}parseObject(t,r,n,i,o){let a;function s(f){return r[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),r[f]}function l(f){if(f!==void 0){if(Array.isArray(f)){let p=[];for(let d=0,g=f.length;d<g;d++){let _=f[d];n[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",_),p.push(n[_])}return p}return n[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),n[f]}}function c(f){return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",f),i[f]}let u,h;switch(t.type){case"Scene":a=new G0,t.background!==void 0&&(Number.isInteger(t.background)?a.background=new ne(t.background):a.background=c(t.background)),t.environment!==void 0&&(a.environment=c(t.environment)),t.fog!==void 0&&(t.fog.type==="Fog"?a.fog=new F1(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(a.fog=new z1(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":a=new Ui(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(a.focus=t.focus),t.zoom!==void 0&&(a.zoom=t.zoom),t.filmGauge!==void 0&&(a.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(a.filmOffset=t.filmOffset),t.view!==void 0&&(a.view=Object.assign({},t.view));break;case"OrthographicCamera":a=new O1(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(a.zoom=t.zoom),t.view!==void 0&&(a.view=Object.assign({},t.view));break;case"AmbientLight":a=new L6(t.color,t.intensity);break;case"DirectionalLight":a=new I6(t.color,t.intensity);break;case"PointLight":a=new P6(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":a=new k6(t.color,t.intensity,t.width,t.height);break;case"SpotLight":a=new A6(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":a=new T6(t.color,t.groundColor,t.intensity);break;case"LightProbe":a=new nx().fromJSON(t);break;case"SkinnedMesh":u=s(t.geometry),h=l(t.material),a=new aM(u,h),t.bindMode!==void 0&&(a.bindMode=t.bindMode),t.bindMatrix!==void 0&&a.bindMatrix.fromArray(t.bindMatrix),t.skeleton!==void 0&&(a.skeleton=t.skeleton);break;case"Mesh":u=s(t.geometry),h=l(t.material),a=new ti(u,h);break;case"InstancedMesh":u=s(t.geometry),h=l(t.material);let f=t.count,p=t.instanceMatrix,d=t.instanceColor;a=new i6(u,h,f),a.instanceMatrix=new nm(new Float32Array(p.array),16),d!==void 0&&(a.instanceColor=new nm(new Float32Array(d.array),d.itemSize));break;case"LOD":a=new _U;break;case"Line":a=new ch(s(t.geometry),l(t.material));break;case"LineLoop":a=new o6(s(t.geometry),l(t.material));break;case"LineSegments":a=new Pa(s(t.geometry),l(t.material));break;case"PointCloud":case"Points":a=new om(s(t.geometry),l(t.material));break;case"Sprite":a=new oM(l(t.material));break;case"Group":a=new $d;break;case"Bone":a=new sM;break;default:a=new or}if(a.uuid=t.uuid,t.name!==void 0&&(a.name=t.name),t.matrix!==void 0?(a.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=t.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(t.position!==void 0&&a.position.fromArray(t.position),t.rotation!==void 0&&a.rotation.fromArray(t.rotation),t.quaternion!==void 0&&a.quaternion.fromArray(t.quaternion),t.scale!==void 0&&a.scale.fromArray(t.scale)),t.castShadow!==void 0&&(a.castShadow=t.castShadow),t.receiveShadow!==void 0&&(a.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(a.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(a.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(a.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(a.visible=t.visible),t.frustumCulled!==void 0&&(a.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(a.renderOrder=t.renderOrder),t.userData!==void 0&&(a.userData=t.userData),t.layers!==void 0&&(a.layers.mask=t.layers),t.children!==void 0){let f=t.children;for(let p=0;p<f.length;p++)a.add(this.parseObject(f[p],r,n,i,o))}if(t.animations!==void 0){let f=t.animations;for(let p=0;p<f.length;p++){let d=f[p];a.animations.push(o[d])}}if(t.type==="LOD"){t.autoUpdate!==void 0&&(a.autoUpdate=t.autoUpdate);let f=t.levels;for(let p=0;p<f.length;p++){let d=f[p],g=a.getObjectByProperty("uuid",d.object);g!==void 0&&a.addLevel(g,d.distance)}}return a}bindSkeletons(t,r){Object.keys(r).length!==0&&t.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){let i=r[n.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}setTexturePath(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}},p0r={UVMapping:XU,CubeReflectionMapping:ix,CubeRefractionMapping:ox,EquirectangularReflectionMapping:YP,EquirectangularRefractionMapping:jP,CubeUVReflectionMapping:xM,CubeUVRefractionMapping:z6},Mhe={RepeatWrapping:XP,ClampToEdgeWrapping:Jo,MirroredRepeatWrapping:$P},Ehe={NearestFilter:Li,NearestMipmapNearestFilter:oU,NearestMipmapLinearFilter:aU,LinearFilter:ii,LinearMipmapNearestFilter:Lht,LinearMipmapLinearFilter:ax},NU=class extends ea{constructor(t){super(t),typeof createImageBitmap=="undefined"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,r,n,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=ex.get(t);if(a!==void 0)return o.manager.itemStart(t),setTimeout(function(){r&&r(a),o.manager.itemEnd(t)},0),a;let s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader,fetch(t,s).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){ex.add(t,l),r&&r(l),o.manager.itemEnd(t)}).catch(function(l){i&&i(l),o.manager.itemError(t),o.manager.itemEnd(t)}),o.manager.itemStart(t)}};NU.prototype.isImageBitmapLoader=!0;var WV,zht={getContext:function(){return WV===void 0&&(WV=new(window.AudioContext||window.webkitAudioContext)),WV},setContext:function(e){WV=e}},DU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(s){try{let l=s.slice(0);zht.getContext().decodeAudioData(l,function(u){r(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}},OU=class extends nx{constructor(t,r,n=1){super(void 0,n);let i=new ne().set(t),o=new ne().set(r),a=new j(i.r,i.g,i.b),s=new j(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(s).multiplyScalar(l),this.sh.coefficients[1].copy(a).sub(s).multiplyScalar(c)}};OU.prototype.isHemisphereLightProbe=!0;var zU=class extends nx{constructor(t,r=1){super(void 0,r);let n=new ne().set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};zU.prototype.isAmbientLightProbe=!0;var The=new Me,Che=new Me,v1=new Me,lht=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ui,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ui,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){let r=this._cache;if(r.focus!==t.focus||r.fov!==t.fov||r.aspect!==t.aspect*this.aspect||r.near!==t.near||r.far!==t.far||r.zoom!==t.zoom||r.eyeSep!==this.eyeSep){r.focus=t.focus,r.fov=t.fov,r.aspect=t.aspect*this.aspect,r.near=t.near,r.far=t.far,r.zoom=t.zoom,r.eyeSep=this.eyeSep,v1.copy(t.projectionMatrix);let i=r.eyeSep/2,o=i*r.near/r.focus,a=r.near*Math.tan(I1*r.fov*.5)/r.zoom,s,l;Che.elements[12]=-i,The.elements[12]=i,s=-a*r.aspect+o,l=a*r.aspect+o,v1.elements[0]=2*r.near/(l-s),v1.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(v1),s=-a*r.aspect-o,l=a*r.aspect-o,v1.elements[0]=2*r.near/(l-s),v1.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(v1)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Che),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(The)}},mM=class{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ahe(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let r=Ahe();t=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=t}return t}};function Ahe(){return(typeof performance=="undefined"?Date:performance).now()}var x1=new j,Phe=new yi,d0r=new j,b1=new j,cht=class extends or{constructor(){super(),this.type="AudioListener",this.context=zht.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new mM}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);let r=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(x1,Phe,d0r),b1.set(0,0,-1).applyQuaternion(Phe),r.positionX){let i=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(x1.x,i),r.positionY.linearRampToValueAtTime(x1.y,i),r.positionZ.linearRampToValueAtTime(x1.z,i),r.forwardX.linearRampToValueAtTime(b1.x,i),r.forwardY.linearRampToValueAtTime(b1.y,i),r.forwardZ.linearRampToValueAtTime(b1.z,i),r.upX.linearRampToValueAtTime(n.x,i),r.upY.linearRampToValueAtTime(n.y,i),r.upZ.linearRampToValueAtTime(n.z,i)}else r.setPosition(x1.x,x1.y,x1.z),r.setOrientation(b1.x,b1.y,b1.z,n.x,n.y,n.z)}},D6=class extends or{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;let r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,r=this.filters.length;t<r;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,r=this.filters.length;t<r;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),this._connected===!0?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}},w1=new j,Ihe=new yi,m0r=new j,S1=new j,uht=class extends D6{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,r,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=r,this.panner.coneOuterGain=n,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(w1,Ihe,m0r),S1.set(0,0,1).applyQuaternion(Ihe);let r=this.panner;if(r.positionX){let n=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(w1.x,n),r.positionY.linearRampToValueAtTime(w1.y,n),r.positionZ.linearRampToValueAtTime(w1.z,n),r.orientationX.linearRampToValueAtTime(S1.x,n),r.orientationY.linearRampToValueAtTime(S1.y,n),r.orientationZ.linearRampToValueAtTime(S1.z,n)}else r.setPosition(w1.x,w1.y,w1.z),r.setOrientation(S1.x,S1.y,S1.z)}},FU=class{constructor(t,r=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0,r=this.getFrequencyData();for(let n=0;n<r.length;n++)t+=r[n];return t/r.length}},BU=class{constructor(t,r,n){this.binding=t,this.valueSize=n;let i,o,a;switch(r){case"quaternion":i=this._slerp,o=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,o=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,o=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=o,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,r){let n=this.buffer,i=this.valueSize,o=t*i+i,a=this.cumulativeWeight;if(a===0){for(let s=0;s!==i;++s)n[o+s]=n[s];a=r}else{a+=r;let s=r/a;this._mixBufferRegion(n,o,0,s,i)}this.cumulativeWeight=a}accumulateAdditive(t){let r=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,i,0,t,n),this.cumulativeWeightAdditive+=t}apply(t){let r=this.valueSize,n=this.buffer,i=t*r+r,o=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){let l=r*this._origIndex;this._mixBufferRegion(n,i,l,1-o,r)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*r,1,r);for(let l=r,c=r+r;l!==c;++l)if(n[l]!==n[l+r]){s.setValue(n,i);break}}saveOriginalState(){let t=this.binding,r=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(r,i);for(let o=n,a=i;o!==a;++o)r[o]=r[i+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,r=t+this.valueSize;for(let n=t;n<r;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let t=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[r+n]=this.buffer[t+n]}_select(t,r,n,i,o){if(i>=.5)for(let a=0;a!==o;++a)t[r+a]=t[n+a]}_slerp(t,r,n,i){yi.slerpFlat(t,r,t,r,t,n,i)}_slerpAdditive(t,r,n,i,o){let a=this._workIndex*o;yi.multiplyQuaternionsFlat(t,a,t,r,t,n),yi.slerpFlat(t,r,t,r,t,a,i)}_lerp(t,r,n,i,o){let a=1-i;for(let s=0;s!==o;++s){let l=r+s;t[l]=t[l]*a+t[n+s]*i}}_lerpAdditive(t,r,n,i,o){for(let a=0;a!==o;++a){let s=r+a;t[s]=t[s]+t[n+a]*i}}},Fht="\\[\\]\\.:\\/",g0r=new RegExp("["+Fht+"]","g"),Bht="[^"+Fht+"]",_0r="[^"+Fht.replace("\\.","")+"]",y0r=/((?:WC+[\/:])*)/.source.replace("WC",Bht),v0r=/(WCOD+)?/.source.replace("WCOD",_0r),x0r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Bht),b0r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Bht),w0r=new RegExp("^"+y0r+v0r+x0r+b0r+"$"),S0r=["material","materials","bones"],hht=class{constructor(t,r,n){let i=n||Cr.parseTrackName(r);this._targetGroup=t,this._bindings=t.subscribe_(r,i)}getValue(t,r){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,r)}setValue(t,r){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=n.length;i!==o;++i)n[i].setValue(t,r)}bind(){let t=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=t.length;r!==n;++r)t[r].bind()}unbind(){let t=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=t.length;r!==n;++r)t[r].unbind()}},Cr=class{constructor(t,r,n){this.path=r,this.parsedPath=n||Cr.parseTrackName(r),this.node=Cr.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,r,n){return t&&t.isAnimationObjectGroup?new Cr.Composite(t,r,n):new Cr(t,r,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(g0r,"")}static parseTrackName(t){let r=w0r.exec(t);if(!r)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let o=n.nodeName.substring(i+1);S0r.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,r){if(!r||r===""||r==="."||r===-1||r===t.name||r===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(r);if(n!==void 0)return n}if(t.children){let n=function(o){for(let a=0;a<o.length;a++){let s=o[a];if(s.name===r||s.uuid===r)return s;let l=n(s.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,r){t[r]=this.targetObject[this.propertyName]}_getValue_array(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)t[r++]=n[i]}_getValue_arrayElement(t,r){t[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,r){this.resolvedProperty.toArray(t,r)}_setValue_direct(t,r){this.targetObject[this.propertyName]=t[r]}_setValue_direct_setNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++]}_setValue_array_setNeedsUpdate(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,r){this.resolvedProperty[this.propertyIndex]=t[r]}_setValue_arrayElement_setNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,r){this.resolvedProperty.fromArray(t,r)}_setValue_fromArray_setNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,r){this.bind(),this.getValue(t,r)}_setValue_unbound(t,r){this.bind(),this.setValue(t,r)}bind(){let t=this.node,r=this.parsedPath,n=r.objectName,i=r.propertyName,o=r.propertyIndex;if(t||(t=Cr.findNode(this.rootNode,r.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");return}if(n){let c=r.objectIndex;switch(n){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let u=0;u<t.length;u++)if(t[u].name===c){c=u;break}break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let a=t[i];if(a===void 0){let c=r.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let s=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?s=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(o!==void 0){if(i==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[o]!==void 0&&(o=t.morphTargetDictionary[o])}else{console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);return}}l=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=o}else a.fromArray!==void 0&&a.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(l=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};Cr.Composite=hht;Cr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Cr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Cr.prototype.GetterByBindingType=[Cr.prototype._getValue_direct,Cr.prototype._getValue_array,Cr.prototype._getValue_arrayElement,Cr.prototype._getValue_toArray];Cr.prototype.SetterByBindingTypeAndVersioning=[[Cr.prototype._setValue_direct,Cr.prototype._setValue_direct_setNeedsUpdate,Cr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_array,Cr.prototype._setValue_array_setNeedsUpdate,Cr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_arrayElement,Cr.prototype._setValue_arrayElement_setNeedsUpdate,Cr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_fromArray,Cr.prototype._setValue_fromArray_setNeedsUpdate,Cr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var HU=class{constructor(){this.uuid=Dl(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let t={};this._indicesByUUID=t;for(let n=0,i=arguments.length;n!==i;++n)t[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){let t=this._objects,r=this._indicesByUUID,n=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length,s,l=t.length,c=this.nCachedObjects_;for(let u=0,h=arguments.length;u!==h;++u){let f=arguments[u],p=f.uuid,d=r[p];if(d===void 0){d=l++,r[p]=d,t.push(f);for(let g=0,_=a;g!==_;++g)o[g].push(new Cr(f,n[g],i[g]))}else if(d<c){s=t[d];let g=--c,_=t[g];r[_.uuid]=d,t[d]=_,r[p]=g,t[g]=f;for(let y=0,x=a;y!==x;++y){let b=o[y],S=b[g],C=b[d];b[d]=S,C===void 0&&(C=new Cr(f,n[y],i[y])),b[g]=C}}else t[d]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){let t=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length,o=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){let l=arguments[a],c=l.uuid,u=r[c];if(u!==void 0&&u>=o){let h=o++,f=t[h];r[f.uuid]=u,t[u]=f,r[c]=h,t[h]=l;for(let p=0,d=i;p!==d;++p){let g=n[p],_=g[h],y=g[u];g[u]=_,g[h]=y}}}this.nCachedObjects_=o}uncache(){let t=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length,o=this.nCachedObjects_,a=t.length;for(let s=0,l=arguments.length;s!==l;++s){let c=arguments[s],u=c.uuid,h=r[u];if(h!==void 0)if(delete r[u],h<o){let f=--o,p=t[f],d=--a,g=t[d];r[p.uuid]=h,t[h]=p,r[g.uuid]=f,t[f]=g,t.pop();for(let _=0,y=i;_!==y;++_){let x=n[_],b=x[f],S=x[d];x[h]=b,x[f]=S,x.pop()}}else{let f=--a,p=t[f];f>0&&(r[p.uuid]=h),t[h]=p,t.pop();for(let d=0,g=i;d!==g;++d){let _=n[d];_[h]=_[f],_.pop()}}}this.nCachedObjects_=o}subscribe_(t,r){let n=this._bindingsIndicesByPath,i=n[t],o=this._bindings;if(i!==void 0)return o[i];let a=this._paths,s=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,h=new Array(c);i=o.length,n[t]=i,a.push(t),s.push(r),o.push(h);for(let f=u,p=l.length;f!==p;++f){let d=l[f];h[f]=new Cr(d,t,r)}return h}unsubscribe_(t){let r=this._bindingsIndicesByPath,n=r[t];if(n!==void 0){let i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length-1,l=a[s],c=t[s];r[c]=n,a[n]=l,a.pop(),o[n]=o[s],o.pop(),i[n]=i[s],i.pop()}}};HU.prototype.isAnimationObjectGroup=!0;var fht=class{constructor(t,r,n=null,i=r.blendMode){this._mixer=t,this._clip=r,this._localRoot=n,this.blendMode=i;let o=r.tracks,a=o.length,s=new Array(a),l={endingStart:T1,endingEnd:T1};for(let c=0;c!==a;++c){let u=o[c].createInterpolant(null);s[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ife,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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,r){return this.loop=t,this.repetitions=r,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,r,n){if(t.fadeOut(r),this.fadeIn(r),n){let i=this._clip.duration,o=t._clip.duration,a=o/i,s=i/o;t.warp(1,a,r),this.warp(s,1,r)}return this}crossFadeTo(t,r,n){return t.crossFadeFrom(this,r,n)}stopFading(){let t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,r,n){let i=this._mixer,o=i.time,a=this.timeScale,s=this._timeScaleInterpolant;s===null&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);let l=s.parameterPositions,c=s.sampleValues;return l[0]=o,l[1]=o+n,c[0]=t/a,c[1]=r/a,this}stopWarping(){let t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,r,n,i){if(!this.enabled){this._updateWeight(t);return}let o=this._startTime;if(o!==null){let l=(t-o)*n;if(l<0||n===0)return;this._startTime=null,r=n*l}r*=this._updateTimeScale(t);let a=this._updateTime(r),s=this._updateWeight(t);if(s>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case kht:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case $U:default:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulate(i,s)}}}_updateWeight(t){let r=0;if(this.enabled){r=this.weight;let n=this._weightInterpolant;if(n!==null){let i=n.evaluate(t)[0];r*=i,t>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(t){let r=0;if(!this.paused){r=this.timeScale;let n=this._timeScaleInterpolant;n!==null&&(r*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r))}return this._effectiveTimeScale=r,r}_updateTime(t){let r=this._clip.duration,n=this.loop,i=this.time+t,o=this._loopCount,a=n===Lfe;if(t===0)return o===-1?i:a&&(o&1)===1?r-i:i;if(n===Pfe){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=r)i=r;else if(i<0)i=0;else{this.time=i;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(o===-1&&(t>=0?(o=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=r||i<0){let s=Math.floor(i/r);i-=r*s,o+=Math.abs(s);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?r:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(l===1){let c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=i;if(a&&(o&1)===1)return r-i}return i}_setEndings(t,r,n){let i=this._interpolantSettings;n?(i.endingStart=C1,i.endingEnd=C1):(t?i.endingStart=this.zeroSlopeAtStart?C1:T1:i.endingStart=JP,r?i.endingEnd=this.zeroSlopeAtEnd?C1:T1:i.endingEnd=JP)}_scheduleFading(t,r,n){let i=this._mixer,o=i.time,a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,l=a.sampleValues;return s[0]=o,l[0]=r,s[1]=o+t,l[1]=n,this}},VU=class extends qs{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,r){let n=t._localRoot||this._root,i=t._clip.tracks,o=i.length,a=t._propertyBindings,s=t._interpolants,l=n.uuid,c=this._bindingsByRootAndName,u=c[l];u===void 0&&(u={},c[l]=u);for(let h=0;h!==o;++h){let f=i[h],p=f.name,d=u[p];if(d!==void 0)++d.referenceCount,a[h]=d;else{if(d=a[h],d!==void 0){d._cacheIndex===null&&(++d.referenceCount,this._addInactiveBinding(d,l,p));continue}let g=r&&r._propertyBindings[h].binding.parsedPath;d=new BU(Cr.create(n,p,g),f.ValueTypeName,f.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,p),a[h]=d}s[h].resultBuffer=d.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){let n=(t._localRoot||this._root).uuid,i=t._clip.uuid,o=this._actionsByClip[i];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,i,n)}let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){let r=t._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(t,r,n){let i=this._actions,o=this._actionsByClip,a=o[r];if(a===void 0)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[r]=a;else{let s=a.knownActions;t._byClipCacheIndex=s.length,s.push(t)}t._cacheIndex=i.length,i.push(t),a.actionByRoot[n]=t}_removeInactiveAction(t){let r=this._actions,n=r[r.length-1],i=t._cacheIndex;n._cacheIndex=i,r[i]=n,r.pop(),t._cacheIndex=null;let o=t._clip.uuid,a=this._actionsByClip,s=a[o],l=s.knownActions,c=l[l.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),t._byClipCacheIndex=null;let h=s.actionByRoot,f=(t._localRoot||this._root).uuid;delete h[f],l.length===0&&delete a[o],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(t){let r=this._actions,n=t._cacheIndex,i=this._nActiveActions++,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_takeBackAction(t){let r=this._actions,n=t._cacheIndex,i=--this._nActiveActions,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_addInactiveBinding(t,r,n){let i=this._bindingsByRootAndName,o=this._bindings,a=i[r];a===void 0&&(a={},i[r]=a),a[n]=t,t._cacheIndex=o.length,o.push(t)}_removeInactiveBinding(t){let r=this._bindings,n=t.binding,i=n.rootNode.uuid,o=n.path,a=this._bindingsByRootAndName,s=a[i],l=r[r.length-1],c=t._cacheIndex;l._cacheIndex=c,r[c]=l,r.pop(),delete s[o],Object.keys(s).length===0&&delete a[i]}_lendBinding(t){let r=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_takeBackBinding(t){let r=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_lendControlInterpolant(){let t=this._controlInterpolants,r=this._nActiveControlInterpolants++,n=t[r];return n===void 0&&(n=new S6(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=r,t[r]=n),n}_takeBackControlInterpolant(t){let r=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,o=r[i];t.__cacheIndex=i,r[i]=t,o.__cacheIndex=n,r[n]=o}clipAction(t,r,n){let i=r||this._root,o=i.uuid,a=typeof t=="string"?tx.findByName(i,t):t,s=a!==null?a.uuid:t,l=this._actionsByClip[s],c=null;if(n===void 0&&(a!==null?n=a.blendMode:n=$U),l!==void 0){let h=l.actionByRoot[o];if(h!==void 0&&h.blendMode===n)return h;c=l.knownActions[0],a===null&&(a=c._clip)}if(a===null)return null;let u=new fht(this,a,r,n);return this._bindAction(u,c),this._addInactiveAction(u,s,o),u}existingAction(t,r){let n=r||this._root,i=n.uuid,o=typeof t=="string"?tx.findByName(n,t):t,a=o?o.uuid:t,s=this._actionsByClip[a];return s!==void 0&&s.actionByRoot[i]||null}stopAllAction(){let t=this._actions,r=this._nActiveActions;for(let n=r-1;n>=0;--n)t[n].stop();return this}update(t){t*=this.timeScale;let r=this._actions,n=this._nActiveActions,i=this.time+=t,o=Math.sign(t),a=this._accuIndex^=1;for(let c=0;c!==n;++c)r[c]._update(i,t,o,a);let s=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)s[c].apply(a);return this}setTime(t){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){let r=this._actions,n=t.uuid,i=this._actionsByClip,o=i[n];if(o!==void 0){let a=o.knownActions;for(let s=0,l=a.length;s!==l;++s){let c=a[s];this._deactivateAction(c);let u=c._cacheIndex,h=r[r.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,h._cacheIndex=u,r[u]=h,r.pop(),this._removeInactiveBindingsForAction(c)}delete i[n]}}uncacheRoot(t){let r=t.uuid,n=this._actionsByClip;for(let a in n){let s=n[a].actionByRoot,l=s[r];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}let i=this._bindingsByRootAndName,o=i[r];if(o!==void 0)for(let a in o){let s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}}uncacheAction(t,r){let n=this.existingAction(t,r);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}};VU.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var gM=class{constructor(t){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new gM(this.value.clone===void 0?this.value:this.value.clone())}},UU=class extends rm{constructor(t,r,n=1){super(t,r),this.meshPerAttribute=n}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){let r=super.clone(t);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(t){let r=super.toJSON(t);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}};UU.prototype.isInstancedInterleavedBuffer=!0;var qU=class{constructor(t,r,n,i,o){this.buffer=t,this.type=r,this.itemSize=n,this.elementSize=i,this.count=o,this.version=0}set needsUpdate(t){t===!0&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,r){return this.type=t,this.elementSize=r,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}};qU.prototype.isGLBufferAttribute=!0;var pht=class{constructor(t,r,n=0,i=1/0){this.ray=new Qf(t,r),this.near=n,this.far=i,this.camera=null,this.layers=new X3,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,r){this.ray.set(t,r)}setFromCamera(t,r){r&&r.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(r.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(r).sub(this.ray.origin).normalize(),this.camera=r):r&&r.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(r.near+r.far)/(r.near-r.far)).unproject(r),this.ray.direction.set(0,0,-1).transformDirection(r.matrixWorld),this.camera=r):console.error("THREE.Raycaster: Unsupported camera type: "+r.type)}intersectObject(t,r=!0,n=[]){return dht(t,this,n,r),n.sort(Lhe),n}intersectObjects(t,r=!0,n=[]){for(let i=0,o=t.length;i<o;i++)dht(t[i],this,n,r);return n.sort(Lhe),n}};function Lhe(e,t){return e.distance-t.distance}function dht(e,t,r,n){if(e.layers.test(t.layers)&&e.raycast(t,r),n===!0){let i=e.children;for(let o=0,a=i.length;o<a;o++)dht(i[o],t,r,!0)}}var _M=class{constructor(t=1,r=0,n=0){return this.radius=t,this.phi=r,this.theta=n,this}set(t,r,n){return this.radius=t,this.phi=r,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,r,n){return this.radius=Math.sqrt(t*t+r*r+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(Zo(r/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}},mht=class{constructor(t=1,r=0,n=0){return this.radius=t,this.theta=r,this.y=n,this}set(t,r,n){return this.radius=t,this.theta=r,this.y=n,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,r,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=r,this}clone(){return new this.constructor().copy(this)}},khe=new Lt,K0=class{constructor(t=new Lt(1/0,1/0),r=new Lt(-1/0,-1/0)){this.min=t,this.max=r}set(t,r){return this.min.copy(t),this.max.copy(r),this}setFromPoints(t){this.makeEmpty();for(let r=0,n=t.length;r<n;r++)this.expandByPoint(t[r]);return this}setFromCenterAndSize(t,r){let n=khe.copy(r).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,r){return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,r){return r.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return khe.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};K0.prototype.isBox2=!0;var Rhe=new j,YV=new j,GU=class{constructor(t=new j,r=new j){this.start=t,this.end=r}set(t,r){return this.start.copy(t),this.end.copy(r),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,r){return this.delta(r).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,r){Rhe.subVectors(t,this.start),YV.subVectors(this.end,this.start);let n=YV.dot(YV),o=YV.dot(Rhe)/n;return r&&(o=Zo(o,0,1)),o}closestPointToPoint(t,r,n){let i=this.closestPointToPointParameter(t,r);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Nhe=new j,ght=class extends or{constructor(t,r){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=r;let n=new Pe,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,s=1,l=32;a<l;a++,s++){let c=a/l*Math.PI*2,u=s/l*Math.PI*2;i.push(Math.cos(c),Math.sin(c),1,Math.cos(u),Math.sin(u),1)}n.setAttribute("position",new xe(i,3));let o=new Gi({fog:!1,toneMapped:!1});this.cone=new Pa(n,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();let t=this.light.distance?this.light.distance:1e3,r=t*Math.tan(this.light.angle);this.cone.scale.set(r,r,t),Nhe.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Nhe),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},z0=new j,jV=new Me,but=new Me,WU=class extends Pa{constructor(t){let r=ope(t),n=new Pe,i=[],o=[],a=new ne(0,0,1),s=new ne(0,1,0);for(let c=0;c<r.length;c++){let u=r[c];u.parent&&u.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),o.push(a.r,a.g,a.b),o.push(s.r,s.g,s.b))}n.setAttribute("position",new xe(i,3)),n.setAttribute("color",new xe(o,3));let l=new Gi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,l),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=r,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){let r=this.bones,n=this.geometry,i=n.getAttribute("position");but.copy(this.root.matrixWorld).invert();for(let o=0,a=0;o<r.length;o++){let s=r[o];s.parent&&s.parent.isBone&&(jV.multiplyMatrices(but,s.matrixWorld),z0.setFromMatrixPosition(jV),i.setXYZ(a,z0.x,z0.y,z0.z),jV.multiplyMatrices(but,s.parent.matrixWorld),z0.setFromMatrixPosition(jV),i.setXYZ(a+1,z0.x,z0.y,z0.z),a+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}};function ope(e){let t=[];e&&e.isBone&&t.push(e);for(let r=0;r<e.children.length;r++)t.push.apply(t,ope(e.children[r]));return t}var _ht=class extends ti{constructor(t,r,n){let i=new X0(r,4,2),o=new sh({wireframe:!0,fog:!1,toneMapped:!1});super(i,o),this.light=t,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},M0r=new j,Dhe=new ne,Ohe=new ne,yht=class extends or{constructor(t,r,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;let i=new Y0(r);i.rotateY(Math.PI*.5),this.material=new sh({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);let o=i.getAttribute("position"),a=new Float32Array(o.count*3);i.setAttribute("color",new Je(a,3)),this.add(new ti(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){let t=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{let r=t.geometry.getAttribute("color");Dhe.copy(this.light.color),Ohe.copy(this.light.groundColor);for(let n=0,i=r.count;n<i;n++){let o=n<i/2?Dhe:Ohe;r.setXYZ(n,o.r,o.g,o.b)}r.needsUpdate=!0}t.lookAt(M0r.setFromMatrixPosition(this.light.matrixWorld).negate())}},YU=class extends Pa{constructor(t=10,r=10,n=4473924,i=8947848){n=new ne(n),i=new ne(i);let o=r/2,a=t/r,s=t/2,l=[],c=[];for(let f=0,p=0,d=-s;f<=r;f++,d+=a){l.push(-s,0,d,s,0,d),l.push(d,0,-s,d,0,s);let g=f===o?n:i;g.toArray(c,p),p+=3,g.toArray(c,p),p+=3,g.toArray(c,p),p+=3,g.toArray(c,p),p+=3}let u=new Pe;u.setAttribute("position",new xe(l,3)),u.setAttribute("color",new xe(c,3));let h=new Gi({vertexColors:!0,toneMapped:!1});super(u,h),this.type="GridHelper"}},vht=class extends Pa{constructor(t=10,r=16,n=8,i=64,o=4473924,a=8947848){o=new ne(o),a=new ne(a);let s=[],l=[];for(let h=0;h<=r;h++){let f=h/r*(Math.PI*2),p=Math.sin(f)*t,d=Math.cos(f)*t;s.push(0,0,0),s.push(p,0,d);let g=h&1?o:a;l.push(g.r,g.g,g.b),l.push(g.r,g.g,g.b)}for(let h=0;h<=n;h++){let f=h&1?o:a,p=t-t/n*h;for(let d=0;d<i;d++){let g=d/i*(Math.PI*2),_=Math.sin(g)*p,y=Math.cos(g)*p;s.push(_,0,y),l.push(f.r,f.g,f.b),g=(d+1)/i*(Math.PI*2),_=Math.sin(g)*p,y=Math.cos(g)*p,s.push(_,0,y),l.push(f.r,f.g,f.b)}}let c=new Pe;c.setAttribute("position",new xe(s,3)),c.setAttribute("color",new xe(l,3));let u=new Gi({vertexColors:!0,toneMapped:!1});super(c,u),this.type="PolarGridHelper"}},zhe=new j,XV=new j,Fhe=new j,xht=class extends or{constructor(t,r,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,r===void 0&&(r=1);let i=new Pe;i.setAttribute("position",new xe([-r,r,0,r,r,0,r,-r,0,-r,-r,0,-r,r,0],3));let o=new Gi({fog:!1,toneMapped:!1});this.lightPlane=new ch(i,o),this.add(this.lightPlane),i=new Pe,i.setAttribute("position",new xe([0,0,0,0,0,1],3)),this.targetLine=new ch(i,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){zhe.setFromMatrixPosition(this.light.matrixWorld),XV.setFromMatrixPosition(this.light.target.matrixWorld),Fhe.subVectors(XV,zhe),this.lightPlane.lookAt(XV),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(XV),this.targetLine.scale.z=Fhe.length()}},$V=new j,_i=new N1,bht=class extends Pa{constructor(t){let r=new Pe,n=new Gi({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],o=[],a={},s=new ne(16755200),l=new ne(16711680),c=new ne(43775),u=new ne(16777215),h=new ne(3355443);f("n1","n2",s),f("n2","n4",s),f("n4","n3",s),f("n3","n1",s),f("f1","f2",s),f("f2","f4",s),f("f4","f3",s),f("f3","f1",s),f("n1","f1",s),f("n2","f2",s),f("n3","f3",s),f("n4","f4",s),f("p","n1",l),f("p","n2",l),f("p","n3",l),f("p","n4",l),f("u1","u2",c),f("u2","u3",c),f("u3","u1",c),f("c","t",u),f("p","c",h),f("cn1","cn2",h),f("cn3","cn4",h),f("cf1","cf2",h),f("cf3","cf4",h);function f(d,g,_){p(d,_),p(g,_)}function p(d,g){i.push(0,0,0),o.push(g.r,g.g,g.b),a[d]===void 0&&(a[d]=[]),a[d].push(i.length/3-1)}r.setAttribute("position",new xe(i,3)),r.setAttribute("color",new xe(o,3)),super(r,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}update(){let t=this.geometry,r=this.pointMap,n=1,i=1;_i.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Pi("c",r,t,_i,0,0,-1),Pi("t",r,t,_i,0,0,1),Pi("n1",r,t,_i,-n,-i,-1),Pi("n2",r,t,_i,n,-i,-1),Pi("n3",r,t,_i,-n,i,-1),Pi("n4",r,t,_i,n,i,-1),Pi("f1",r,t,_i,-n,-i,1),Pi("f2",r,t,_i,n,-i,1),Pi("f3",r,t,_i,-n,i,1),Pi("f4",r,t,_i,n,i,1),Pi("u1",r,t,_i,n*.7,i*1.1,-1),Pi("u2",r,t,_i,-n*.7,i*1.1,-1),Pi("u3",r,t,_i,0,i*2,-1),Pi("cf1",r,t,_i,-n,0,1),Pi("cf2",r,t,_i,n,0,1),Pi("cf3",r,t,_i,0,-i,1),Pi("cf4",r,t,_i,0,i,1),Pi("cn1",r,t,_i,-n,0,-1),Pi("cn2",r,t,_i,n,0,-1),Pi("cn3",r,t,_i,0,-i,-1),Pi("cn4",r,t,_i,0,i,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function Pi(e,t,r,n,i,o,a){$V.set(i,o,a).unproject(n);let s=t[e];if(s!==void 0){let l=r.getAttribute("position");for(let c=0,u=s.length;c<u;c++)l.setXYZ(s[c],$V.x,$V.y,$V.z)}}var KV=new ta,yM=class extends Pa{constructor(t,r=16776960){let n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(8*3),o=new Pe;o.setIndex(new Je(n,1)),o.setAttribute("position",new Je(i,3)),super(o,new Gi({color:r,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(t!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&KV.setFromObject(this.object),KV.isEmpty())return;let r=KV.min,n=KV.max,i=this.geometry.attributes.position,o=i.array;o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=r.x,o[4]=n.y,o[5]=n.z,o[6]=r.x,o[7]=r.y,o[8]=n.z,o[9]=n.x,o[10]=r.y,o[11]=n.z,o[12]=n.x,o[13]=n.y,o[14]=r.z,o[15]=r.x,o[16]=n.y,o[17]=r.z,o[18]=r.x,o[19]=r.y,o[20]=r.z,o[21]=n.x,o[22]=r.y,o[23]=r.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t){return Pa.prototype.copy.call(this,t),this.object=t.object,this}},wht=class extends Pa{constructor(t,r=16776960){let n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new Pe;o.setIndex(new Je(n,1)),o.setAttribute("position",new xe(i,3)),super(o,new Gi({color:r,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){let r=this.box;r.isEmpty()||(r.getCenter(this.position),r.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}},Sht=class extends ch{constructor(t,r=1,n=16776960){let i=n,o=[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,0,1,0,0,0],a=new Pe;a.setAttribute("position",new xe(o,3)),a.computeBoundingSphere(),super(a,new Gi({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=r;let s=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],l=new Pe;l.setAttribute("position",new xe(s,3)),l.computeBoundingSphere(),this.add(new ti(l,new sh({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){let r=-this.plane.constant;Math.abs(r)<1e-8&&(r=1e-8),this.scale.set(.5*this.size,.5*this.size,r),this.children[0].material.side=r<0?Ii:L1,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}},Bhe=new j,ZV,wut,Mht=class extends or{constructor(t=new j(0,0,1),r=new j(0,0,0),n=1,i=16776960,o=n*.2,a=o*.2){super(),this.type="ArrowHelper",ZV===void 0&&(ZV=new Pe,ZV.setAttribute("position",new xe([0,0,0,0,1,0],3)),wut=new am(0,.5,1,5,1),wut.translate(0,-.5,0)),this.position.copy(r),this.line=new ch(ZV,new Gi({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ti(wut,new sh({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,o,a)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{Bhe.set(t.z,0,-t.x).normalize();let r=Math.acos(t.y);this.quaternion.setFromAxisAngle(Bhe,r)}}setLength(t,r=t*.2,n=r*.2){this.line.scale.set(1,Math.max(1e-4,t-r),1),this.line.updateMatrix(),this.cone.scale.set(n,r,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}},vM=class extends Pa{constructor(t=1){let r=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Pe;i.setAttribute("position",new xe(r,3)),i.setAttribute("color",new xe(n,3));let o=new Gi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(t,r,n){let i=new ne,o=this.geometry.attributes.color.array;return i.set(t),i.toArray(o,0),i.toArray(o,3),i.set(r),i.toArray(o,6),i.toArray(o,9),i.set(n),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},Eht=class{constructor(){this.type="ShapePath",this.color=new ne,this.subPaths=[],this.currentPath=null}moveTo(t,r){return this.currentPath=new G1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,r),this}lineTo(t,r){return this.currentPath.lineTo(t,r),this}quadraticCurveTo(t,r,n,i){return this.currentPath.quadraticCurveTo(t,r,n,i),this}bezierCurveTo(t,r,n,i,o,a){return this.currentPath.bezierCurveTo(t,r,n,i,o,a),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t,r){function n(x){let b=[];for(let S=0,C=x.length;S<C;S++){let P=x[S],k=new Kc;k.curves=P.curves,b.push(k)}return b}function i(x,b){let S=b.length,C=!1;for(let P=S-1,k=0;k<S;P=k++){let O=b[P],D=b[k],B=D.x-O.x,I=D.y-O.y;if(Math.abs(I)>Number.EPSILON){if(I<0&&(O=b[k],B=-B,D=b[P],I=-I),x.y<O.y||x.y>D.y)continue;if(x.y===O.y){if(x.x===O.x)return!0}else{let L=I*(x.x-O.x)-B*(x.y-O.y);if(L===0)return!0;if(L<0)continue;C=!C}}else{if(x.y!==O.y)continue;if(D.x<=x.x&&x.x<=O.x||O.x<=x.x&&x.x<=D.x)return!0}}return C}let o=Zc.isClockWise,a=this.subPaths;if(a.length===0)return[];if(r===!0)return n(a);let s,l,c,u=[];if(a.length===1)return l=a[0],c=new Kc,c.curves=l.curves,u.push(c),u;let h=!o(a[0].getPoints());h=t?!h:h;let f=[],p=[],d=[],g=0,_;p[g]=void 0,d[g]=[];for(let x=0,b=a.length;x<b;x++)l=a[x],_=l.getPoints(),s=o(_),s=t?!s:s,s?(!h&&p[g]&&g++,p[g]={s:new Kc,p:_},p[g].s.curves=l.curves,h&&g++,d[g]=[]):d[g].push({h:l,p:_[0]});if(!p[0])return n(a);if(p.length>1){let x=!1,b=[];for(let S=0,C=p.length;S<C;S++)f[S]=[];for(let S=0,C=p.length;S<C;S++){let P=d[S];for(let k=0;k<P.length;k++){let O=P[k],D=!0;for(let B=0;B<p.length;B++)i(O.p,p[B].p)&&(S!==B&&b.push({froms:S,tos:B,hole:k}),D?(D=!1,f[B].push(O)):x=!0);D&&f[S].push(O)}}b.length>0&&(x||(d=f))}let y;for(let x=0,b=p.length;x<b;x++){c=p[x].s,u.push(c),y=d[x];for(let S=0,C=y.length;S<C;S++)c.holes.push(y[S].h)}return u}},ape=new Float32Array(1),E0r=new Int32Array(ape.buffer),Tht=class{static toHalfFloat(t){t>65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),t=65504),ape[0]=t;let r=E0r[0],n=r>>16&32768,i=r>>12&2047,o=r>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&r&8388607,n):o<113?(i|=2048,n|=(i>>114-o)+(i>>113-o&1),n):(n|=o-112<<10|i>>1,n+=i&1,n)}},T0r=0,C0r=1,A0r=0,P0r=1,I0r=2;function L0r(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function k0r(e=[]){return 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 R0r(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new om(e,t)}function N0r(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new oM(e)}function D0r(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new om(e,t)}function O0r(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new im(e)}function z0r(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new im(e)}function F0r(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new im(e)}function B0r(e,t,r){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new j(e,t,r)}function H0r(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Je(e,t).setUsage(Y3)}function V0r(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new cU(e,t)}function U0r(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new uU(e,t)}function q0r(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new hU(e,t)}function G0r(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new fU(e,t)}function W0r(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new $3(e,t)}function Y0r(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new pU(e,t)}function j0r(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new K3(e,t)}function X0r(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new xe(e,t)}function $0r(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new mU(e,t)}ps.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(ps.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e};G1.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)};function K0r(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new vM(e)}function Z0r(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new yM(e,t)}function J0r(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Pa(new s6(e.geometry),new Gi({color:t!==void 0?t:16777215}))}YU.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};WU.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Q0r(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Pa(new d6(e.geometry),new Gi({color:t!==void 0?t:16777215}))}ea.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),dM.extractUrlBase(e)};ea.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function t_r(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Jc(e)}function e_r(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new CU(e)}K0.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)};K0.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};K0.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};K0.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)};ta.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)};ta.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};ta.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};ta.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)};ta.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)};Jf.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};D1.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)};GU.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)};ki.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)};ki.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)};ki.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};ki.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)};ki.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};ki.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()};Me.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)};Me.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)};Me.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new j().setFromMatrixColumn(this,3)};Me.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)};Me.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};Me.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};Me.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)};Me.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};Me.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};Me.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};Me.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};Me.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};Me.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};Me.prototype.makeFrustum=function(e,t,r,n,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,n,r,i,o)};Me.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()};$c.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)};yi.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)};yi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};Qf.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};Qf.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)};Qf.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)};oi.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};oi.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)};oi.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)};oi.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)};oi.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)};oi.barycoordFromPoint=function(e,t,r,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),oi.getBarycoord(e,t,r,n,i)};oi.normal=function(e,t,r,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),oi.getNormal(e,t,r,n)};Kc.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)};Kc.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new hh(this,e)};Kc.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new j0(this,e)};Lt.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};Lt.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)};Lt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};j.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};j.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};j.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)};j.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)};j.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)};j.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)};j.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};j.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)};j.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};en.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};en.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};or.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)};or.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};or.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)};or.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};or.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)};Object.defineProperties(or.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});ti.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(ti.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),kfe},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});aM.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Ui.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),t!==void 0&&(this.filmGauge=t),this.setFocalLength(e)};Object.defineProperties(zl.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}});Object.defineProperties(Je.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Y3},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Y3)}}});Je.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(e===!0?Y3:W3),this};Je.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Je.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};Pe.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)};Pe.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(t&&t.isBufferAttribute)&&!(t&&t.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Je(arguments[1],arguments[2]))):e==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t)};Pe.prototype.addDrawCall=function(e,t,r){r!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)};Pe.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};Pe.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};Pe.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)};Pe.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)};Object.defineProperties(Pe.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});rm.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(e===!0?Y3:W3),this};rm.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};hh.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};hh.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};hh.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};G0.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};gM.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(qi.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new ne}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===Aht}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(lh.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}});rn.prototype.clearTarget=function(e,t,r,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,r,n)};rn.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)};rn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};rn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};rn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};rn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};rn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};rn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};rn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};rn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};rn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};rn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};rn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};rn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};rn.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)};rn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};rn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};rn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};rn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};rn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};rn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};rn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};rn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};rn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};rn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(rn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=e===!0?Yn:tm}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}});Object.defineProperties(Jfe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function r_r(e,t,r){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Q3(e,r)}Object.defineProperties(hs.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}});D6.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return new DU().load(e,function(n){t.setBuffer(n)}),this};FU.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};J3.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)};J3.prototype.clear=function(e,t,r,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,r,n)};Zf.crossOrigin=void 0;Zf.loadTexture=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let i=new AU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Zf.loadTextureCube=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let i=new TU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Zf.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Zf.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function n_r(){console.error("THREE.CanvasRenderer has been removed")}function i_r(){console.error("THREE.JSONLoader has been removed.")}var o_r={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function a_r(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function s_r(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Pe}function l_r(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Pe}function c_r(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function u_r(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function h_r(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:jU}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=jU);var spe={type:"change"},Hht={type:"start"},lpe={type:"end"},JU=class extends qs{constructor(t,r){super(),r===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),r===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=t,this.domElement=r,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new j,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Z0.ROTATE,MIDDLE:Z0.DOLLY,RIGHT:Z0.PAN},this.touches={ONE:J0.ROTATE,TWO:J0.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return s.phi},this.getAzimuthalAngle=function(){return s.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(nt){nt.addEventListener("keydown",fr),this._domElementKeyEvents=nt},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(spe),n.update(),o=i.NONE},this.update=function(){let nt=new j,Ct=new yi().setFromUnitVectors(t.up,new j(0,1,0)),Wt=Ct.clone().invert(),fe=new j,at=new yi,se=2*Math.PI;return function(){let Ce=n.object.position;nt.copy(Ce).sub(n.target),nt.applyQuaternion(Ct),s.setFromVector3(nt),n.autoRotate&&o===i.NONE&&D(k()),n.enableDamping?(s.theta+=l.theta*n.dampingFactor,s.phi+=l.phi*n.dampingFactor):(s.theta+=l.theta,s.phi+=l.phi);let Pt=n.minAzimuthAngle,Nt=n.maxAzimuthAngle;return isFinite(Pt)&&isFinite(Nt)&&(Pt<-Math.PI?Pt+=se:Pt>Math.PI&&(Pt-=se),Nt<-Math.PI?Nt+=se:Nt>Math.PI&&(Nt-=se),Pt<=Nt?s.theta=Math.max(Pt,Math.min(Nt,s.theta)):s.theta=s.theta>(Pt+Nt)/2?Math.max(Pt,s.theta):Math.min(Nt,s.theta)),s.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,s.phi)),s.makeSafe(),s.radius*=c,s.radius=Math.max(n.minDistance,Math.min(n.maxDistance,s.radius)),n.enableDamping===!0?n.target.addScaledVector(u,n.dampingFactor):n.target.add(u),nt.setFromSpherical(s),nt.applyQuaternion(Wt),Ce.copy(n.target).add(nt),n.object.lookAt(n.target),n.enableDamping===!0?(l.theta*=1-n.dampingFactor,l.phi*=1-n.dampingFactor,u.multiplyScalar(1-n.dampingFactor)):(l.set(0,0,0),u.set(0,0,0)),c=1,h||fe.distanceToSquared(n.object.position)>a||8*(1-at.dot(n.object.quaternion))>a?(n.dispatchEvent(spe),fe.copy(n.object.position),at.copy(n.object.quaternion),h=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",It),n.domElement.removeEventListener("pointerdown",ht),n.domElement.removeEventListener("pointercancel",ie),n.domElement.removeEventListener("wheel",ar),n.domElement.removeEventListener("pointermove",wt),n.domElement.removeEventListener("pointerup",kt),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",fr)};let n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},o=i.NONE,a=1e-6,s=new _M,l=new _M,c=1,u=new j,h=!1,f=new Lt,p=new Lt,d=new Lt,g=new Lt,_=new Lt,y=new Lt,x=new Lt,b=new Lt,S=new Lt,C=[],P={};function k(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return Math.pow(.95,n.zoomSpeed)}function D(nt){l.theta-=nt}function B(nt){l.phi-=nt}let I=function(){let nt=new j;return function(Wt,fe){nt.setFromMatrixColumn(fe,0),nt.multiplyScalar(-Wt),u.add(nt)}}(),L=function(){let nt=new j;return function(Wt,fe){n.screenSpacePanning===!0?nt.setFromMatrixColumn(fe,1):(nt.setFromMatrixColumn(fe,0),nt.crossVectors(n.object.up,nt)),nt.multiplyScalar(Wt),u.add(nt)}}(),R=function(){let nt=new j;return function(Wt,fe){let at=n.domElement;if(n.object.isPerspectiveCamera){let se=n.object.position;nt.copy(se).sub(n.target);let Qt=nt.length();Qt*=Math.tan(n.object.fov/2*Math.PI/180),I(2*Wt*Qt/at.clientHeight,n.object.matrix),L(2*fe*Qt/at.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(I(Wt*(n.object.right-n.object.left)/n.object.zoom/at.clientWidth,n.object.matrix),L(fe*(n.object.top-n.object.bottom)/n.object.zoom/at.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function F(nt){n.object.isPerspectiveCamera?c/=nt:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*nt)),n.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function z(nt){n.object.isPerspectiveCamera?c*=nt:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/nt)),n.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function U(nt){f.set(nt.clientX,nt.clientY)}function W(nt){x.set(nt.clientX,nt.clientY)}function Z(nt){g.set(nt.clientX,nt.clientY)}function rt(nt){p.set(nt.clientX,nt.clientY),d.subVectors(p,f).multiplyScalar(n.rotateSpeed);let Ct=n.domElement;D(2*Math.PI*d.x/Ct.clientHeight),B(2*Math.PI*d.y/Ct.clientHeight),f.copy(p),n.update()}function ot(nt){b.set(nt.clientX,nt.clientY),S.subVectors(b,x),S.y>0?F(O()):S.y<0&&z(O()),x.copy(b),n.update()}function st(nt){_.set(nt.clientX,nt.clientY),y.subVectors(_,g).multiplyScalar(n.panSpeed),R(y.x,y.y),g.copy(_),n.update()}function St(nt){nt.deltaY<0?z(O()):nt.deltaY>0&&F(O()),n.update()}function bt(nt){let Ct=!1;switch(nt.code){case n.keys.UP:R(0,n.keyPanSpeed),Ct=!0;break;case n.keys.BOTTOM:R(0,-n.keyPanSpeed),Ct=!0;break;case n.keys.LEFT:R(n.keyPanSpeed,0),Ct=!0;break;case n.keys.RIGHT:R(-n.keyPanSpeed,0),Ct=!0;break}Ct&&(nt.preventDefault(),n.update())}function Mt(){if(C.length===1)f.set(C[0].pageX,C[0].pageY);else{let nt=.5*(C[0].pageX+C[1].pageX),Ct=.5*(C[0].pageY+C[1].pageY);f.set(nt,Ct)}}function lt(){if(C.length===1)g.set(C[0].pageX,C[0].pageY);else{let nt=.5*(C[0].pageX+C[1].pageX),Ct=.5*(C[0].pageY+C[1].pageY);g.set(nt,Ct)}}function Kt(){let nt=C[0].pageX-C[1].pageX,Ct=C[0].pageY-C[1].pageY,Wt=Math.sqrt(nt*nt+Ct*Ct);x.set(0,Wt)}function _t(){n.enableZoom&&Kt(),n.enablePan&&lt()}function ct(){n.enableZoom&&Kt(),n.enableRotate&&Mt()}function X(nt){if(C.length==1)p.set(nt.pageX,nt.pageY);else{let Wt=be(nt),fe=.5*(nt.pageX+Wt.x),at=.5*(nt.pageY+Wt.y);p.set(fe,at)}d.subVectors(p,f).multiplyScalar(n.rotateSpeed);let Ct=n.domElement;D(2*Math.PI*d.x/Ct.clientHeight),B(2*Math.PI*d.y/Ct.clientHeight),f.copy(p)}function et(nt){if(C.length===1)_.set(nt.pageX,nt.pageY);else{let Ct=be(nt),Wt=.5*(nt.pageX+Ct.x),fe=.5*(nt.pageY+Ct.y);_.set(Wt,fe)}y.subVectors(_,g).multiplyScalar(n.panSpeed),R(y.x,y.y),g.copy(_)}function dt(nt){let Ct=be(nt),Wt=nt.pageX-Ct.x,fe=nt.pageY-Ct.y,at=Math.sqrt(Wt*Wt+fe*fe);b.set(0,at),S.set(0,Math.pow(b.y/x.y,n.zoomSpeed)),F(S.y),x.copy(b)}function q(nt){n.enableZoom&&dt(nt),n.enablePan&&et(nt)}function pt(nt){n.enableZoom&&dt(nt),n.enableRotate&&X(nt)}function ht(nt){n.enabled!==!1&&(C.length===0&&(n.domElement.setPointerCapture(nt.pointerId),n.domElement.addEventListener("pointermove",wt),n.domElement.addEventListener("pointerup",kt)),$t(nt),nt.pointerType==="touch"?tt(nt):ee(nt))}function wt(nt){n.enabled!==!1&&(nt.pointerType==="touch"?$(nt):Le(nt))}function kt(nt){he(nt),C.length===0&&(n.domElement.releasePointerCapture(nt.pointerId),n.domElement.removeEventListener("pointermove",wt),n.domElement.removeEventListener("pointerup",kt)),n.dispatchEvent(lpe),o=i.NONE}function ie(nt){he(nt)}function ee(nt){let Ct;switch(nt.button){case 0:Ct=n.mouseButtons.LEFT;break;case 1:Ct=n.mouseButtons.MIDDLE;break;case 2:Ct=n.mouseButtons.RIGHT;break;default:Ct=-1}switch(Ct){case Z0.DOLLY:if(n.enableZoom===!1)return;W(nt),o=i.DOLLY;break;case Z0.ROTATE:if(nt.ctrlKey||nt.metaKey||nt.shiftKey){if(n.enablePan===!1)return;Z(nt),o=i.PAN}else{if(n.enableRotate===!1)return;U(nt),o=i.ROTATE}break;case Z0.PAN:if(nt.ctrlKey||nt.metaKey||nt.shiftKey){if(n.enableRotate===!1)return;U(nt),o=i.ROTATE}else{if(n.enablePan===!1)return;Z(nt),o=i.PAN}break;default:o=i.NONE}o!==i.NONE&&n.dispatchEvent(Hht)}function Le(nt){if(n.enabled!==!1)switch(o){case i.ROTATE:if(n.enableRotate===!1)return;rt(nt);break;case i.DOLLY:if(n.enableZoom===!1)return;ot(nt);break;case i.PAN:if(n.enablePan===!1)return;st(nt);break}}function ar(nt){n.enabled===!1||n.enableZoom===!1||o!==i.NONE||(nt.preventDefault(),n.dispatchEvent(Hht),St(nt),n.dispatchEvent(lpe))}function fr(nt){n.enabled===!1||n.enablePan===!1||bt(nt)}function tt(nt){switch(Tt(nt),C.length){case 1:switch(n.touches.ONE){case J0.ROTATE:if(n.enableRotate===!1)return;Mt(),o=i.TOUCH_ROTATE;break;case J0.PAN:if(n.enablePan===!1)return;lt(),o=i.TOUCH_PAN;break;default:o=i.NONE}break;case 2:switch(n.touches.TWO){case J0.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_t(),o=i.TOUCH_DOLLY_PAN;break;case J0.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ct(),o=i.TOUCH_DOLLY_ROTATE;break;default:o=i.NONE}break;default:o=i.NONE}o!==i.NONE&&n.dispatchEvent(Hht)}function $(nt){switch(Tt(nt),o){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;X(nt),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;et(nt),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;q(nt),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;pt(nt),n.update();break;default:o=i.NONE}}function It(nt){n.enabled!==!1&&nt.preventDefault()}function $t(nt){C.push(nt)}function he(nt){delete P[nt.pointerId];for(let Ct=0;Ct<C.length;Ct++)if(C[Ct].pointerId==nt.pointerId){C.splice(Ct,1);return}}function Tt(nt){let Ct=P[nt.pointerId];Ct===void 0&&(Ct=new Lt,P[nt.pointerId]=Ct),Ct.set(nt.pageX,nt.pageY)}function be(nt){let Ct=nt.pointerId===C[0].pointerId?C[1]:C[0];return P[Ct.pointerId]}n.domElement.addEventListener("contextmenu",It),n.domElement.addEventListener("pointerdown",ht),n.domElement.addEventListener("pointercancel",ie),n.domElement.addEventListener("wheel",ar,{passive:!1}),this.update()}};var F6=class extends qs{constructor(t){super(),this._lastMesh=null,this._clock=new mM,this._canvasSize=null,this._layersConfig=null,this._runColor=t}_isObject(t){var r=typeof t;return r=="object"&&t!=null&&!Array.isArray(t)}_applyDefaults(t,r){let n={},i=[t,r];for(let o=0;o<i.length;o++){let a=i[o];for(let s in a){let l=s in n;this._isObject(a[s])?n[s]=this._applyDefaults(n[s]||{},a[s]):l||(n[s]=a[s])}}return n}_createLayers(){if(!(!this._layersConfig||!this._scene||!this._lastMesh)){if(this._layersConfig.showBoundingBox){var t=new yM(this._lastMesh,new ne("rgb(0, 0, 255)"));this._scene.add(t)}if(this._layersConfig.showAxes){var r=new vM(5);this._scene.add(r)}}}setLayersConfig(t){this._layersConfig=this._applyDefaults(t,this._layersConfig||{})}_createWorld(t,r){var a,s,l,c;if(this.isReady())return;this._scene=new G0;var n=new wM[t.camera.cls](t.camera.fov,((a=this._canvasSize)==null?void 0:a.width)/((s=this._canvasSize)==null?void 0:s.height),t.camera.near,t.camera.far);this._camera=n,this.initCameraPosition=void 0,t.camera.position&&(this.initCameraPosition=new j().fromArray(t.camera.position)),this.initCameraLookAt=void 0,t.camera.lookAt&&(this.initCameraLookAt=new j().fromArray(t.camera.lookAt));var i=new JU(n,r);let o=i;o.lookSpeed=.4,o.movementSpeed=20,o.noFly=!0,o.lookVertical=!0,o.constrainVertical=!0,o.verticalMin=1,o.verticalMax=2,o.addEventListener("change",this._onCameraPositionChange.bind(this)),this._cameraControls=i,this._renderer=new rn({antialias:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize((l=this._canvasSize)==null?void 0:l.width,(c=this._canvasSize)==null?void 0:c.height),this._renderer.setClearColor(16777215,1)}_clearScene(){var t;if(this._scene)for(;this._scene.children.length>0;)this._scene.remove((t=this._scene)==null?void 0:t.children[0])}getRenderer(){return this._renderer}getCameraControls(){return this._cameraControls}isReady(){return!!this._camera&&!!this._cameraControls}getCameraPosition(){var t,r,n;return{far:(t=this._camera)==null?void 0:t.far,position:(r=this._camera)==null?void 0:r.position.clone(),target:(n=this._cameraControls)==null?void 0:n.target.clone()}}setCanvasSize(t){this._canvasSize=t}draw(){var r,n,i,o;this._animationFrameIndex&&cancelAnimationFrame(this._animationFrameIndex),this._camera&&(this._camera.aspect=((r=this._canvasSize)==null?void 0:r.width)/((n=this._canvasSize)==null?void 0:n.height),this._camera.updateProjectionMatrix()),this._renderer.setSize((i=this._canvasSize)==null?void 0:i.width,(o=this._canvasSize)==null?void 0:o.height);let t=function(){var a=this._clock.getDelta();this._cameraControls.update(a),this._animationFrameIndex=requestAnimationFrame(t),this._renderer.render(this._scene,this._camera)}.bind(this);t()}updateScene(t,r){let n={};"config"in t&&t.config&&(n=JSON.parse(t.config)),this.dispatchEvent({type:"beforeUpdateScene"});let i={camera:{cls:"PerspectiveCamera",fov:75,near:.1,far:1e3},lights:[{cls:"AmbientLight",color:"#ffffff",intensity:.75},{cls:"DirectionalLight",color:"#ffffff",intensity:.75,position:[0,-1,2]}]};n=this._applyDefaults(n,i),this._createWorld(n,r),this._clearScene(),this._createLights(this._scene,n),this._createGeometry(t,n),this._createLayers(),this.draw()}resetView(t){var n,i;if(!this.isReady())return;(n=this._cameraControls)==null||n.reset();let r;!t&&this._lastMesh&&(r=this._lastMesh),r&&(this._fitObjectToViewport(r),this._lastMesh=r),(i=this._cameraControls)==null||i.update()}_createGeometry(t,r){let n=t.mesh;n.vertices&&n.faces&&n.faces.length?this._createMesh(n,r):this._createPointCloud(n,r)}_createPointCloud(t,r){var h;let n=t.vertices,i=t.colors,o={material:{cls:"PointsMaterial",size:.005}};i&&i.length==n.length?o.material.vertexColors=!0:o.material.color=this._runColor;let a=this._applyDefaults(r,o),s=new Pe,l=new Float32Array(n.flat());if(s.setAttribute("position",new Je(l,3)),i&&i.length==n.length){let f=new Float32Array(i.flat());for(let p=0;p<f.length;p++)f[p]=f[p]/255;s.setAttribute("color",new Je(f,3))}var c=new wM[a.material.cls](a.material),u=new om(s,c);(h=this._scene)==null||h.add(u),this._lastMesh=u}setCameraViewpoint(t,r,n){this._silent=!0,this._camera&&(this._camera.far=r,this._camera.position.set(t.x,t.y,t.z),this._camera.lookAt(n.clone()),this._camera.updateProjectionMatrix()),this._cameraControls&&(this._cameraControls.target=n.clone(),this._cameraControls.update()),this._silent=!1}_onCameraPositionChange(t){this._silent||this.dispatchEvent({type:"cameraPositionChange",event:t})}_fitObjectToViewport(t){var p,d,g;let n=new ta,i=new j,o=new j;n.setFromObject(t),n.getCenter(i),n.getSize(o);let a=Math.max(o.x,o.y,o.z),s=((p=this._camera)==null?void 0:p.fov)*(Math.PI/180),l=Math.abs(a/(2*Math.tan(s/2)))*1.25,c=n.min.z,u=c<0?-c+l:l-c,h=(d=this.initCameraPosition)!=null?d:new j(i.x,i.y,l),f=(g=this.initCameraLookAt)!=null?g:i;this.setCameraViewpoint(h,u*3,f)}_createMesh(t,r){var f;let n=t.vertices,i=t.faces,o=t.colors,a=this._applyDefaults(r,{material:{cls:"MeshStandardMaterial",color:"#a0a0a0",roughness:1,metalness:0}}),s=new Pe,l=new Float32Array(n.flat());s.setAttribute("position",new Je(l,3));let c=new Uint16Array(i.flat());if(o&&o.length){let p=o.flat();for(let d=0;d<p.length;d++)p[d]=p[d]/255;s.setAttribute("color",new Je(new Float32Array(p),3)),a.material=a.material||{},a.material.vertexColors=!0}s.center(),s.computeBoundingSphere(),s.setIndex(new Je(c,1)),s.computeVertexNormals();let u=new wM[a.material.cls](a.material),h=new ti(s,u);h.castShadow=!0,h.receiveShadow=!0,(f=this._scene)==null||f.add(h),this._lastMesh=h}_createLights(t,r){for(let n=0;n<r.lights.length;n++){let i=r.lights[n],o=new wM[i.cls](i.color,i.intensity);i.position&&o.position.set(i.position[0],i.position[1],i.position[2]),t.add(o)}}};var kn=class extends Gt(mt){constructor(){super(...arguments),this.selectedView="all",this.active=!1,this._colorScaleFunction=fn,this._steps=[],this._meshViewerAttached=!1,this._cameraPositionInitialized=!1,this._isMeshLoading=!1}get _runColor(){var t=this.run;return this._colorScaleFunction(t)}connectedCallback(){super.connectedCallback(),this._dataProvider=new IP(this.requestManager);let t=new F6(this._runColor);t.addEventListener("beforeUpdateScene",this._updateCanvasSize.bind(this)),t.addEventListener("cameraPositionChange",this._onCameraPositionChange.bind(this)),this._meshViewer=t}reload(){!this.active||!this._dataProvider||(this._isMeshLoading=!0,this._dataProvider.reload(this.run,this.tag,this.sample).then(t=>{!t||(this._steps=t,this._stepIndex=t.length-1)}).catch(t=>{if(!t||!t.code||t.code!=m1.CANCELLED)throw t=t||"Response processing failed.",new Error(t)}))}_updateScene(){var r;let t=this._currentStep;!t||!t.mesh||(this._meshViewer.updateScene(t,this),this._cameraPositionInitialized||(this._meshViewer.resetView(),this._cameraPositionInitialized=!0),this._meshViewerAttached||((r=this.shadowRoot)==null||r.appendChild(this._meshViewer.getRenderer().domElement),this._meshViewerAttached=!0))}_debouncedFetchMesh(){this.debounce("fetchMesh",()=>this._maybeFetchMesh(),100)}_maybeFetchMesh(){return Ri(this,null,function*(){let t=this._currentStep;if(!(!t||t.mesh||t.meshFetching)){t.meshFetching=!0,this._isMeshLoading=!0;try{let r=yield this._dataProvider.fetchData(t,this.run,this.tag,this.sample);t.mesh=r[0],this.notifyPath("_currentStep.mesh")}catch(r){if(!r||!r.code||r.code!=m1.CANCELLED)throw r=r||"Response processing failed.",new Error(r)}finally{this._isMeshLoading=!1,t.meshFetching=!1}}})}_onCameraPositionChange(){if(!this._meshViewer.isReady())return;let t=new CustomEvent("camera-position-change",{detail:this._meshViewer.getCameraPosition()});this.dispatchEvent(t)}setCameraViewpoint(t,r,n){this._meshViewer.setCameraViewpoint(t,r,n)}_updateCanvasSize(){let t=this.offsetWidth,r=t,n=this.$$(".tf-mesh-loader-header").offsetHeight,i={width:t,height:r-n};this._meshViewer.setCanvasSize(i)}redraw(){this._updateCanvasSize(),this.isConnected&&this._meshViewer.draw()}_hasAtLeastOneStep(t){return!!t&&t.length>0}_hasMultipleSteps(t){return!!t&&t.length>1}get _currentStep(){var t=this._steps,r=this._stepIndex;return t[r]||null}get _stepValue(){let t=this._currentStep;return t?t.step:0}get _currentWallTime(){let t=this._currentStep;return t?s2(t.wall_time):""}_getMaxStepIndex(t){return t.length-1}_getSampleText(t){return String(t+1)}_hasMultipleSamples(t){return t>1}_updateView(){var t=this.selectedView;this._meshViewer&&t=="all"&&this._meshViewer.resetView()}toLocaleString_(t){return t.toLocaleString()}};kn.template=Q`
    <tf-card-heading color="[[_runColor]]" class="tf-mesh-loader-header">
      <template is="dom-if" if="[[_hasMultipleSamples(ofSamples)]]">
        <div>sample: [[_getSampleText(sample)]] of [[ofSamples]]</div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep(_steps)]]">
        <div class="heading-row">
          <div class="heading-label">
            step
            <span style="font-weight: bold"
              >[[toLocaleString_(_stepValue)]]</span
            >
          </div>
          <div class="heading-label heading-right">
            <template is="dom-if" if="[[_currentWallTime]]">
              [[_currentWallTime]]
            </template>
          </div>
          <div class="label right">
            <paper-spinner-lite active hidden$="[[!_isMeshLoading]]">
            </paper-spinner-lite>
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps(_steps)]]">
        <div>
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_getMaxStepIndex(_steps)]]"
            max-markers="[[_getMaxStepIndex(_steps)]]"
            snaps
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>
    <style>
      paper-slider {
        width: 100%;
        margin-left: 1px;
        margin-right: 1px;
      }
      .tf-mesh-loader-header {
        display: block;
        height: 105px;
      }
      [hidden] {
        display: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],kn.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],kn.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],kn.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],kn.prototype,"ofSamples",void 0);E([A({type:String}),w("design:type",String)],kn.prototype,"selectedView",void 0);E([A({type:Boolean}),w("design:type",Boolean)],kn.prototype,"active",void 0);E([A({type:Object}),w("design:type",Ae)],kn.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",F6)],kn.prototype,"_meshViewer",void 0);E([A({type:Object}),w("design:type",IP)],kn.prototype,"_dataProvider",void 0);E([A({type:Object}),w("design:type",Object)],kn.prototype,"_colorScaleFunction",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],kn.prototype,"_steps",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],kn.prototype,"_stepIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],kn.prototype,"_meshViewerAttached",void 0);E([A({type:Boolean}),w("design:type",Boolean)],kn.prototype,"_cameraPositionInitialized",void 0);E([A({type:Boolean}),w("design:type",Boolean)],kn.prototype,"_isMeshLoading",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],kn.prototype,"_runColor",null);E([Bt("run","tag","active","_dataProvider","_meshViewer"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],kn.prototype,"reload",null);E([Bt("_currentStep.*","_meshViewer"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],kn.prototype,"_updateScene",null);E([Bt("_currentStep"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],kn.prototype,"_debouncedFetchMesh",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],kn.prototype,"_currentStep",null);E([Rt("_currentStep"),w("design:type",Number),w("design:paramtypes",[])],kn.prototype,"_stepValue",null);E([Rt("_currentStep"),w("design:type",String),w("design:paramtypes",[])],kn.prototype,"_currentWallTime",null);E([Bt("selectedView"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],kn.prototype,"_updateView",null);kn=E([yt("tf-mesh-loader")],kn);var ph=class extends mt{constructor(){super(),this.reloadOnReady=!0,this._tagFilter=".*",this._selectedView="all",this._requestManager=new Ae,window.addEventListener("resize",()=>{this._handleWindowResize()},!1),this.reloadOnReady&&this.reload()}_getAllChildren(){var t;return Array.from((t=this.shadowRoot)==null?void 0:t.querySelectorAll("tf-mesh-loader"))}_onCameraPositionChanged(t){this._selectedView=="share"&&this._getAllChildren().forEach(r=>{t.target!=r&&r.setCameraViewpoint(t.detail.position,t.detail.far,t.detail.target)})}_shouldOpen(t){return t<=2}reload(){this._fetchTags().then(this._reloadMeshes.bind(this))}_handleWindowResize(){this._getAllChildren().forEach(t=>{t.redraw()})}_fetchTags(){let t=_e().pluginRoute("mesh","/tags");return this._requestManager.request(t).then(r=>{if(lx.isEqual(r,this._runToTagInfo))return;let n=lx.mapValues(r,o=>Object.keys(o)),i=$i(n);this._dataNotFound=i.length===0,this._runToTagInfo=r})}_reloadMeshes(){this._getAllChildren().forEach(t=>{t.reload()})}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=lx.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return lx.range(c).map(u=>Object.assign({},l,{sample:u,ofSamples:c}))}return o.map(l=>Object.assign({},l,{items:[].concat.apply([],l.items.map(a))}))}};ph.template=Q`
    <tf-dashboard-layout>
      <div slot="sidebar" class="all-controls">
        <div class="settings">
          <div class="sidebar-section view-control">
            <h3 class="title">Point of view</h3>
            <div>
              <paper-radio-group
                id="view-radio-group"
                selected="{{_selectedView}}"
              >
                <paper-radio-button id="all-radio-button" name="all">
                  Display all points
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="all-radio-button"
                  position="right"
                  offset="0"
                >
                  Zoom and center camera to display all points at once. Note,
                  that some points could be too far (i.e. too small) to be
                  visible.
                </paper-tooltip>
                <paper-radio-button id="user-radio-button" name="user">
                  Current view
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="user-radio-button"
                  position="right"
                  offset="0"
                >
                  Keep current camera position and zoom level.
                </paper-tooltip>
                <paper-radio-button id="share-radio-button" name="share">
                  Share viewpoint
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="share-radio-button"
                  position="right"
                  offset="0"
                >
                  Share viewpoint among all cameras.
                </paper-tooltip>
              </paper-radio-group>
            </div>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No point cloud data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any point cloud data to your event files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-mesh-loader
                  active="[[active]]"
                  selected-view="[[_selectedView]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  of-samples="[[item.ofSamples]]"
                  request-manager="[[_requestManager]]"
                  class="tf-mesh-loader-container"
                  on-camera-position-change="_onCameraPositionChanged"
                >
                </tf-mesh-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      paper-radio-button {
        display: block;
        padding: 5px;
      }
      .sidebar-section h3 {
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }

      .runs-selector {
        flex-grow: 1;
      }

      tf-runs-selector {
        display: flex;
      }

      .view-control {
        display: block !important;
      }

      .view-control h3.title {
        padding-top: 16px;
        padding-bottom: 16px;
      }

      .allcontrols .view-control paper-radio-group {
        margin-top: 5px;
      }
      /* Layout must be horizontal, i.e. items arranged in a row. If items cannot fit in a row,
       * they should be moved to next line. All items must be square at all times. Minimum size of
       * the item is 480px. This means that maximum size of the item must be 480px + 479px = 959px.
       * */
      .horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
      }
      tf-mesh-loader {
        width: 480px;
        flex-basis: 480px;
        flex-grow: 1;
        display: block;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],ph.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],ph.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ph.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ph.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ph.prototype,"_tagFilter",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ph.prototype,"_selectedView",void 0);E([A({type:Object}),w("design:type",Object)],ph.prototype,"_requestManager",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter"),w("design:type",Array),w("design:paramtypes",[])],ph.prototype,"_categories",null);ph=E([yt("mesh-dashboard"),w("design:paramtypes",[])],ph);var QU=class extends Gt(mt){constructor(){super(...arguments),this._installCommand="pip install -U tensorboard-plugin-profile"}_copyInstallCommand(){return Ri(this,null,function*(){let t=()=>Ri(this,null,function*(){this.$.commandTextarea.select();try{yield navigator.clipboard.writeText(this._installCommand)}catch(i){if(!document.execCommand("copy"))return Promise.reject()}}),r=this.$.copiedMessage;try{yield t(),r.innerText="Copied."}catch(n){r.innerText="Failed to copy to clipboard."}})}_removeCopiedMessage(){let t=this.$.copiedMessage;t.innerText=""}};QU.template=Q`
    <div class="message">
      <h3>The profile plugin has moved.</h3>
      <p>
        Please install the new version of the profile plugin from PyPI by
        running the following command from the machine running TensorBoard:
      </p>
      <textarea
        id="commandTextarea"
        readonly=""
        rows="1"
        on-blur="_removeCopiedMessage"
      >
[[_installCommand]]</textarea
      >
      <div id="copyContainer">
        <span id="copiedMessage"></span>
        <paper-button raised="" on-tap="_copyInstallCommand"
          >Copy to clipboard</paper-button
        >
      </div>
    </div>

    <style>
      :host {
        display: flex;
      }

      .message {
        margin: 80px auto 0 auto;
        max-width: 540px;
      }
      #commandTextarea {
        margin-top: 1ex;
        padding: 1ex 1em;
        resize: vertical;
        width: 100%;
      }
      #copyContainer {
        display: flex;
      }
      #copiedMessage {
        align-self: center;
        flex-grow: 1;
        font-style: italic;
        padding-right: 1em;
        text-align: right;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],QU.prototype,"_installCommand",void 0);QU=E([yt("tf-profile-redirect-dashboard")],QU);var cm=Ee(Oe(),1);var Fl=Ee(Oe(),1),tq=Ee(Sl(),1);var nn=class extends mt{constructor(){super(...arguments),this._expanded=!1,this._runToPrCurveEntry={},this._previousRunToPrCurveEntry={},this._colorScaleFunction={scale:fn},this._canceller=new an,this._xComponentsCreationMethod=()=>{let t=new tq.Scales.Linear;return{scale:t,axis:new tq.Axes.Numeric(t,"bottom"),accessor:r=>r.recall}},this._yValueAccessor=t=>t.precision,this._tooltipColumns=(()=>{let t=Wu(r0),r=n=>isNaN(n)?"NaN":t(n);return[{title:"Run",evaluate:n=>n.dataset.metadata().name},{title:"Threshold",evaluate:n=>r(n.datum.thresholds)},{title:"Precision",evaluate:n=>r(n.datum.precision)},{title:"Recall",evaluate:n=>r(n.datum.recall)},{title:"TP",evaluate:n=>n.datum.true_positives},{title:"FP",evaluate:n=>n.datum.false_positives},{title:"TN",evaluate:n=>n.datum.true_negatives},{title:"FN",evaluate:n=>n.datum.false_negatives}]})(),this._seriesDataFields=["thresholds","precision","recall","true_positives","false_positives","true_negatives","false_negatives"],this._defaultXRange=[-.05,1.05],this._defaultYRange=[-.05,1.05],this._requestData=(t,r,n)=>{let o=_e().pluginRoute("pr_curves","/pr_curves");Promise.all(t.map(a=>{let s=a,l=this.tag,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._smoothingEnabled=!1}_createProcessDataFunction(){return(t,r,n)=>{this.set("_runToDataOverTime",Object.assign({},this._runToDataOverTime,n))}}_computeRunColor(t){return fn(t)}connectedCallback(){super.connectedCallback(),this._attached=!0,this.reload()}_getChartDataLoader(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("tf-line-chart-data-loader")}reload(){if(!!this._attached){if(this.runs.length===0){this.set("_runToDataOverTime",{});return}this._getChartDataLoader().reload()}}_setChartData(){var t=this._runToPrCurveEntry,r=this._previousRunToPrCurveEntry,n=this._setOfRelevantRuns;Fl.forOwn(t,(i,o)=>{let a=r[o];if(!(a&&t[o].step===a.step)){if(!n[o]){this._clearSeriesData(o);return}this._updateSeriesDataForRun(o,i)}})}_updateSeriesDataForRun(t,r){let n=Fl.reduce(this._seriesDataFields,(a,s)=>(a[s]=r[s].slice().reverse(),a),{}),i=new Array(n[this._seriesDataFields[0]].length);for(let a=0;a<i.length;a++)i[a]=Fl.mapValues(n,s=>s[a]);let o=this._getChartDataLoader();o.setSeriesData(t,i),o.commitChanges()}_clearSeriesData(t){let r=this._getChartDataLoader();r.setSeriesData(t,[]),r.commitChanges()}_updateRunToPrCurveEntry(){var t=this._runToDataOverTime,r=this.runToStepCap;let n={};Fl.forOwn(t,(i,o)=>{!i||!i.length||(n[o]=this._computeEntryClosestOrEqualToStepCap(r[o],i))}),this.set("_previousRunToPrCurveEntry",this._runToPrCurveEntry),this.set("_runToPrCurveEntry",n)}_notifyDataChange(){var t=this._runToDataOverTime;this.onDataChange&&this.onDataChange(t)}_computeEntryClosestOrEqualToStepCap(t,r){let n=Math.min(Fl.sortedIndex(r.map(i=>i.step),t),r.length-1);return r[n]}get _runsWithStepAvailable(){var t=this.runs,r=this._runToPrCurveEntry;return Fl.filter(t,n=>r[n]).sort()}get _setOfRelevantRuns(){var t=this._runsWithStepAvailable;let r={};return Fl.forEach(t,n=>{r[n]=!0}),r}_computeCurrentStepForRun(t,r){let n=t[r];return n?n.step:null}_computeCurrentWallTimeForRun(t,r){let n=t[r];return n?new Date(n.wall_time*1e3).toString():null}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_resetDomain(){this._getChartDataLoader().resetDomain()}redraw(){this._getChartDataLoader().redraw()}};nn.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
    ></tf-card-heading>

    <tf-line-chart-data-loader
      x-components-creation-method="[[_xComponentsCreationMethod]]"
      y-value-accessor="[[_yValueAccessor]]"
      tooltip-columns="[[_tooltipColumns]]"
      color-scale="[[_colorScaleFunction]]"
      default-x-range="[[_defaultXRange]]"
      default-y-range="[[_defaultYRange]]"
      smoothing-enabled="[[_smoothingEnabled]]"
      request-manager="[[requestManager]]"
      data-to-load="[[runs]]"
      data-series="[[runs]]"
      load-key="[[tag]]"
      request-data="[[_requestData]]"
      load-data-callback="[[_createProcessDataFunction()]]"
      active="[[active]]"
    ></tf-line-chart-data-loader>

    <div id="buttons-row">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Reset axes to [0, 1]."
      ></paper-icon-button>
    </div>

    <div id="step-legend">
      <template is="dom-repeat" items="[[_runsWithStepAvailable]]" as="run">
        <div class="legend-row">
          <div
            class="color-box"
            style="background: [[_computeRunColor(run)]];"
          ></div>
          [[run]] is at
          <span class="step-label-text">
            step [[_computeCurrentStepForRun(_runToPrCurveEntry, run)]] </span
          ><br />
          <span class="wall-time-label-text">
            ([[_computeCurrentWallTimeForRun(_runToPrCurveEntry, run)]])
          </span>
        </div>
      </template>
    </div>

    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 500px;
        margin-right: 10px;
        margin-bottom: 25px;
      }
      :host([_expanded]) {
        width: 100%;
      }
      tf-line-chart-data-loader {
        height: 300px;
        position: relative;
      }
      :host([_expanded]) tf-line-chart-data-loader {
        height: 600px;
      }
      #buttons-row {
        display: flex;
        flex-direction: row;
      }
      #buttons-row paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      #buttons-row paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }
      #step-legend {
        box-sizing: border-box;
        font-size: 0.8em;
        max-height: 200px;
        overflow-y: auto;
        padding: 0 0 0 10px;
        width: 100%;
      }
      .legend-row {
        margin: 5px 0 5px 0;
        width: 100%;
      }
      .color-box {
        display: inline-block;
        border-radius: 1px;
        width: 10px;
        height: 10px;
      }
      .step-label-text {
        font-weight: bold;
      }
      .wall-time-label-text {
        color: #888;
        font-size: 0.8em;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],nn.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],nn.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"runToStepCap",void 0);E([A({type:Object}),w("design:type",Ae)],nn.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"active",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],nn.prototype,"_expanded",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_runToPrCurveEntry",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_previousRunToPrCurveEntry",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_runToDataOverTime",void 0);E([A({type:Object}),w("design:type",Function)],nn.prototype,"onDataChange",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_colorScaleFunction",void 0);E([A({type:Object}),w("design:type",an)],nn.prototype,"_canceller",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"_attached",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_xComponentsCreationMethod",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_yValueAccessor",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_tooltipColumns",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_seriesDataFields",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_defaultYRange",void 0);E([A({type:Object}),w("design:type",Function)],nn.prototype,"_requestData",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"_smoothingEnabled",void 0);E([Bt("runs","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"reload",null);E([Bt("_runToPrCurveEntry","_previousRunToPrCurveEntry","_setOfRelevantRuns"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_setChartData",null);E([Bt("_runToDataOverTime","runToStepCap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_updateRunToPrCurveEntry",null);E([Bt("_runToDataOverTime"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_notifyDataChange",null);E([Rt("runs","_runToPrCurveEntry"),w("design:type",Array),w("design:paramtypes",[])],nn.prototype,"_runsWithStepAvailable",null);E([Rt("_runsWithStepAvailable"),w("design:type",Object),w("design:paramtypes",[])],nn.prototype,"_setOfRelevantRuns",null);nn=E([yt("tf-pr-curve-card")],nn);var SM=Ee(Oe(),1);var rp=class extends mt{constructor(){super(...arguments),this._runToStepIndex={}}_computeColorForRun(t){return fn(t)}_computeTimeTextForRun(t,r,n,i){let o=r[n];if(!SM.isNumber(o))return"";let a=t[n];if(!a)return"";let s=a[o][i];if(i==="step")return`step ${s}`;if(i==="relative")return s<1?`${(s*1e3).toFixed(2)} ms`:`${s.toFixed(2)} s`;if(i==="wall_time")return new Date(s*1e3).toString();throw new Error(`The display type of ${i} is not recognized.`)}_sliderValueChanged(t){let r=t.target.dataset.run,n=t.target.immediateValue,i=Object.assign({},this._runToStepIndex);isNaN(n)?delete i[r]:i[r]=t.target.immediateValue,this._runToStepIndex=i}_computeMaxStepIndexForRun(t,r){let n=t[r];return n&&n.length?n.length-1:0}_updateStepsForNewRuns(){var t=this.runToAvailableTimeEntries;let r=Object.assign({},this._runToStepIndex);SM.forOwn(t,(n,i)=>{SM.isNumber(r[i])||(r[i]=n.length-1)}),this._runToStepIndex=r}_getStep(t,r){return this._runToStepIndex?this._runToStepIndex[r]:0}_computeRunToStep(t,r){let n={};return SM.forOwn(r,(i,o)=>{let a=t[o];!a||(n[o]=a[i].step)}),n}get _runsWithSliders(){var t=this.runs,r=this.runToAvailableTimeEntries;return t.filter(n=>r[n])}};rp.template=Q`
    <template is="dom-repeat" items="[[_runsWithSliders]]" as="run">
      <div class="run-widget">
        <div class="run-display-container">
          <div
            class="run-color-box"
            style="background:[[_computeColorForRun(run)]];"
          ></div>
          <div class="run-text">[[run]]</div>
        </div>
        <div class="step-display-container">
          [[_computeTimeTextForRun(runToAvailableTimeEntries, _runToStepIndex,
          run, timeDisplayType)]]
        </div>
        <paper-slider
          data-run$="[[run]]"
          step="1"
          type="number"
          min="0"
          max="[[_computeMaxStepIndexForRun(runToAvailableTimeEntries, run)]]"
          value="[[_getStep(_runToStepIndex, run)]]"
          on-immediate-value-changed="_sliderValueChanged"
        ></paper-slider>
      </div>
    </template>
    <style>
      .run-widget {
        margin: 10px 0 0 0;
      }
      paper-slider {
        margin: -8px 0 0 -15px;
        width: 100%;
      }
      .step-display-container {
        font-size: 0.9em;
        margin: 0 15px 0 0;
      }
      .run-text {
        display: inline-block;
      }
      .run-color-box {
        width: 12px;
        height: 12px;
        border-radius: 3px;
        display: inline-block;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],rp.prototype,"runs",void 0);E([A({type:Object}),w("design:type",Object)],rp.prototype,"runToAvailableTimeEntries",void 0);E([A({type:Object,notify:!0,computed:"_computeRunToStep(runToAvailableTimeEntries, _runToStepIndex)"}),w("design:type",Object)],rp.prototype,"runToStep",void 0);E([A({type:String}),w("design:type",String)],rp.prototype,"timeDisplayType",void 0);E([A({type:Object}),w("design:type",Object)],rp.prototype,"_runToStepIndex",void 0);E([Bt("runToAvailableTimeEntries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],rp.prototype,"_updateStepsForNewRuns",null);E([Rt("runs","runToAvailableTimeEntries"),w("design:type",Array),w("design:paramtypes",[])],rp.prototype,"_runsWithSliders",null);rp=E([yt("tf-pr-curve-steps-selector")],rp);var ko=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._timeDisplayType="step",this._selectedRuns=[],this._runToTagInfo={},this._tagToRunToData={},this._getCategoryItemKey=t=>t.tag,this._requestManager=new Ae,this._step=0}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){Promise.all([this._fetchTags()]).then(()=>{this._reloadCards()})}_shouldOpen(t){return t<=2}_fetchTags(){let t=_e().pluginRoute("pr_curves","/tags");return this._requestManager.request(t).then(r=>{if(cm.isEqual(r,this._runToTagInfo))return;let n=cm.mapValues(r,o=>cm.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadCards(){var t;cm.forEach((t=this.root)==null?void 0:t.querySelectorAll("tf-pr-curve-card"),r=>{r.reload()})}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=cm.mapValues(t,o=>Object.keys(o));return hE(i,r,n)}get _relevantSelectedRuns(){var t=this._selectedRuns,r=this._runToTagInfo;return t.filter(n=>r[n])}_tagMetadata(t,r,n){let i={};r.forEach(a=>{i[a]=t[a][n]});let o=n.replace(/\/pr_curves$/,"");return oR(i,o)}_createDataChangeCallback(t){return r=>{this.set("_tagToRunToData",yh(ia({},this._tagToRunToData),{[t]:r}))}}get _runToAvailableTimeEntries(){var t=this._tagToRunToData;let r={};for(let[i,o]of Object.entries(t))for(let[a]of Object.entries(o))(r[a]==null||i<r[a])&&(r[a]=i);let n={};for(let[i,o]of Object.entries(r)){let a=t[o][i];n[i]=a.map(s=>({step:s.step,wall_time:s.wall_time,relative:s.wall_time-a[0].wall_time}))}return n}};ko.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="time-type-selector"
              name="Time Display Type"
              selected-id="{{_timeDisplayType}}"
            >
              <paper-button id="step">step</paper-button>
              <!--
            -->
              <paper-button id="relative">relative</paper-button>
              <!--
            -->
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
          <template is="dom-if" if="[[_runToAvailableTimeEntries]]">
            <div class="sidebar-section" id="steps-selector-container">
              <tf-pr-curve-steps-selector
                runs="[[_relevantSelectedRuns]]"
                run-to-step="{{_runToStep}}"
                run-to-available-time-entries="[[_runToAvailableTimeEntries]]"
                time-display-type="[[_timeDisplayType]]"
              >
              </tf-pr-curve-steps-selector>
            </div>
          </template>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No precision–recall curve data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any precision–recall data to your event
                files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>
            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
              get-category-item-key="[[_getCategoryItemKey]]"
            >
              <template>
                <tf-pr-curve-card
                  active="[[active]]"
                  runs="[[item.runs]]"
                  tag="[[item.tag]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.runs, item.tag)]]"
                  request-manager="[[_requestManager]]"
                  run-to-step-cap="[[_runToStep]]"
                  on-data-change="[[_createDataChangeCallback(item.tag)]]"
                ></tf-pr-curve-card>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      /** Do not let the steps selector occlude the run selector. */
      #steps-selector-container {
        max-height: 60%;
        overflow-y: auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],ko.prototype,"_timeDisplayType",void 0);E([A({type:Array}),w("design:type",Array)],ko.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_runToTagInfo",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_tagToRunToData",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],ko.prototype,"_runToStep",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ko.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_getCategoryItemKey",void 0);E([A({type:Object}),w("design:type",Ae)],ko.prototype,"_requestManager",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ko.prototype,"_step",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],ko.prototype,"_categories",null);E([Rt("_selectedRuns","_runToTagInfo"),w("design:type",Array),w("design:paramtypes",[])],ko.prototype,"_relevantSelectedRuns",null);E([Rt("_tagToRunToData"),w("design:type",Object),w("design:paramtypes",[])],ko.prototype,"_runToAvailableTimeEntries",null);ko=E([yt("tf-pr-curve-dashboard")],ko);var B6=Ee(Oe(),1);var uo=class extends Gt(nb){constructor(){super(...arguments),this.reloadOnReady=!0,this._showDownloadLinks=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=_E("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType=Td.STEP,this._selectedRuns=[],this._tagFilter="",this._categories=[],this._getCategoryItemKey=t=>t.tag,this._requestManager=new Ae(50),this._showDownloadLinksObserver=bp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=yE("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=bp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}get _smoothingEnabled(){var t=this._smoothingWeight;return t>0}_getCategoryKey(t){return t.metadata.type==Da.SEARCH_RESULTS?"":t.name}_shouldOpen(t){return t<=2}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadCharts()})}_fetchTags(){let t=_e().pluginRoute("scalars","/tags");return this._requestManager.request(t).then(r=>{if(B6.isEqual(r,this._runToTagInfo))return;let n=B6.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadCharts(){var t;(t=this.root)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{r.reload()})}_updateCategories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i,o=n,a=B6.mapValues(t,s=>Object.keys(s));i=hE(a,r,o),i.forEach(s=>{s.items=s.items.map(l=>({tag:l.tag,series:l.runs.map(c=>({run:c,tag:l.tag}))}))}),this.updateArrayProp("_categories",i,this._getCategoryKey)}_tagMetadata(t,r,n){let i=t.name,o=n.tag,a={};n.series.forEach(({run:u})=>{a[u]=r[u][o]});let s=o.replace(/\/scalar_summary$/,""),{description:l,displayName:c}=oR(a,s);return t.metadata.type==Da.PREFIX_GROUP&&c.startsWith(i+"/")&&(c=c.slice(i.length+1)),{description:l,displayName:c}}};uo.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox
                id="show-download-links"
                checked="{{_showDownloadLinks}}"
                >Show data download links</paper-checkbox
              >
            </div>
            <div class="line-item">
              <paper-checkbox
                id="ignore-y-outlier"
                checked="{{_ignoreYOutliers}}"
                >Ignore outliers in chart scaling</paper-checkbox
              >
            </div>
            <div id="tooltip-sorting">
              <div>Tooltip sorting method:</div>
              <paper-dropdown-menu
                no-label-float
                selected-item-label="{{_tooltipSortingMethod}}"
              >
                <paper-listbox
                  class="dropdown-content"
                  selected="0"
                  slot="dropdown-content"
                >
                  <paper-item>default</paper-item>
                  <paper-item>descending</paper-item>
                  <paper-item>ascending</paper-item>
                  <paper-item>nearest</paper-item>
                </paper-listbox>
              </paper-dropdown-menu>
            </div>
          </div>
          <div class="sidebar-section">
            <tf-smoothing-input
              weight="{{_smoothingWeight}}"
              step="0.001"
              min="0"
              max="0.999"
            ></tf-smoothing-input>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="x-type-selector"
              name="Horizontal Axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button
              ><!--
            --><paper-button id="relative">relative</paper-button
              ><!--
            --><paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No scalar data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any scalar data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
              get-category-item-key="[[_getCategoryItemKey]]"
            >
              <template>
                <tf-scalar-card
                  active="[[active]]"
                  data-to-load="[[item.series]]"
                  ignore-y-outliers="[[_ignoreYOutliers]]"
                  multi-experiments="[[_getMultiExperiments(dataSelection)]]"
                  request-manager="[[_requestManager]]"
                  show-download-links="[[_showDownloadLinks]]"
                  smoothing-enabled="[[_smoothingEnabled]]"
                  smoothing-weight="[[_smoothingWeight]]"
                  tag-metadata="[[_tagMetadata(category, _runToTagInfo, item)]]"
                  tag="[[item.tag]]"
                  tooltip-sorting-method="[[_tooltipSortingMethod]]"
                  x-type="[[_xType]]"
                  batch-size="[[featureFlags.scalarsBatchSize]]"
                  in-colab="[[featureFlags.inColab]]"
                ></tf-scalar-card>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      #tooltip-sorting {
        align-items: center;
        display: flex;
        font-size: 14px;
        margin-top: 15px;
      }

      #tooltip-sorting paper-dropdown-menu {
        margin-left: 10px;
        --paper-input-container-focus-color: var(--tb-orange-strong);
        width: 105px;
      }

      .line-item {
        display: block;
        padding-top: 5px;
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      .center {
        overflow-x: hidden;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"reloadOnReady",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"featureFlags",void 0);E([A({type:Boolean,notify:!0,observer:"_showDownloadLinksObserver"}),w("design:type",Boolean)],uo.prototype,"_showDownloadLinks",void 0);E([A({type:Number,notify:!0,observer:"_smoothingWeightObserver"}),w("design:type",Number)],uo.prototype,"_smoothingWeight",void 0);E([A({type:Boolean,observer:"_ignoreYOutliersObserver"}),w("design:type",Boolean)],uo.prototype,"_ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],uo.prototype,"_xType",void 0);E([A({type:Array}),w("design:type",Array)],uo.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],uo.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"_categoriesDomReady",void 0);E([A({type:Array}),w("design:type",Array)],uo.prototype,"_categories",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"_getCategoryItemKey",void 0);E([A({type:Object}),w("design:type",Ae)],uo.prototype,"_requestManager",void 0);E([Rt("_smoothingWeight"),w("design:type",Boolean),w("design:paramtypes",[])],uo.prototype,"_smoothingEnabled",null);E([Bt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],uo.prototype,"_updateCategories",null);uo=E([yt("tf-scalar-dashboard")],uo);var cpe=Ee(Oe(),1);var dh=class extends Gt(mt){constructor(){super(...arguments),this._texts=[],this._canceller=new an}get _runColor(){var t=this.run;return fn(t)}_changeRunColor(){var t=this._runColor;this.updateStyles({"--tb-text-loader-outline":t})}attached(){this.reload()}reload(){if(!this.isAttached)return;this._canceller.cancelAll();let t=_e(),r=Mi(t.pluginRoute("text","/text"),{tag:this.tag,run:this.run,markdown:this.markdownEnabled?"true":"false"}),n=this._canceller.cancellable(i=>{if(i.cancelled)return;let o=i.value.map(a=>({wall_time:new Date(a.wall_time*1e3),step:a.step,text:a.text}));this.set("_texts",o.slice().reverse())});this.requestManager.request(r).then(n)}_formatStep(t){return xn(",")(t)}};dh.template=Q`
    <tf-card-heading run="[[run]]" tag="[[tag]]" color="[[_runColor]]">
    </tf-card-heading>
    <paper-material
      elevation="1"
      id="steps-container"
      class="container scrollbar"
    >
      <template is="dom-repeat" items="[[_texts]]">
        <paper-material elevation="1" class="step-container">
          step <span class="step-value">[[_formatStep(item.step)]]</span>
        </paper-material>
        <paper-material elevation="1" class="text">
          <tf-markdown-view html="[[item.text]]"></tf-markdown-view>
        </paper-material>
      </template>
    </paper-material>
    <style include="scrollbar-style"></style>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      .scrollbar {
        will-change: transform;
      }
      #steps-container {
        border-radius: 3px;
        border: 2px solid /* color computed and set as inline style */;
        display: block;
        max-height: 500px;
        overflow: auto;
        padding: 10px;
        border-color: var(--tb-text-loader-outline);
      }
      .text {
        background-color: inherit;
        border-radius: 0 3px 3px 3px;
        padding: 5px;
        word-break: break-word;
      }
      .step-container {
        background-color: var(--tb-ui-light-accent);
        border-bottom: none;
        border-radius: 3px 3px 0 0;
        border: 1px solid var(--tb-ui-border);
        display: inline-block;
        font-size: 12px;
        font-style: italic;
        margin-left: -1px; /* to correct for border */
        padding: 3px;
      }
      .step-container:not(:first-child) {
        margin-top: 15px;
      }

      tf-card-heading {
        margin-bottom: 10px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],dh.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],dh.prototype,"tag",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dh.prototype,"markdownEnabled",void 0);E([A({type:Array}),w("design:type",Array)],dh.prototype,"_texts",void 0);E([A({type:Object}),w("design:type",Ae)],dh.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],dh.prototype,"_canceller",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],dh.prototype,"_runColor",null);E([Bt("_runColor"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],dh.prototype,"_changeRunColor",null);dh=E([yt("tf-text-loader")],dh);var Qc=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._markdownEnabled=xp("_markdownEnabled",{defaultValue:!0,useLocalStorage:!0}).call(this),this._requestManager=new Ae,this._markdownEnabledStorageObserver=bp("_markdownEnabled",{defaultValue:!0,useLocalStorage:!0})}static get observers(){return["_markdownEnabledObserver(_markdownEnabled)"]}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadTexts()})}_shouldOpen(t){return t<=2}_fetchTags(){let t=_e().pluginRoute("text","/tags");return this._requestManager.request(t).then(r=>{if(cpe.isEqual(r,this._runToTag))return;let n=$i(r);this.set("_dataNotFound",n.length===0),this.set("_runToTag",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadTexts(){var t;(t=this.root)==null||t.querySelectorAll("tf-text-loader").forEach(r=>{r.reload()})}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter;return Ql(t,r,n)}_markdownEnabledObserver(){this._reloadTexts()}};Qc.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="sidebar-section">
          <div class="line-item">
            <paper-checkbox checked="{{_markdownEnabled}}"
              >Enable Markdown</paper-checkbox
            >
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No text data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any text data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-text-loader
                  active="[[active]]"
                  tag="[[item.tag]]"
                  run="[[item.run]]"
                  request-manager="[[_requestManager]]"
                  markdown-enabled="[[_markdownEnabled]]"
                ></tf-text-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"reloadOnReady",void 0);E([A({type:Boolean,notify:!0,observer:"_markdownEnabledStorageObserver"}),w("design:type",Boolean)],Qc.prototype,"_markdownEnabled",void 0);E([A({type:Array}),w("design:type",Array)],Qc.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Qc.prototype,"_runToTag",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Qc.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],Qc.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Qc.prototype,"_categories",null);Qc=E([yt("tf-text-dashboard")],Qc);var Vht=class extends Gt(mt){};Vht.template=Q`
    <div class="message">
      <h3>The What-If Tool is no longer supported.</h3>
      <p>
        The
        <a href="https://pair-code.github.io/lit/"
          >Learning Interpretability Tool (LIT)</a
        >
        is an actively maintained alternative. Please follow the instructions
        <a href="https://pair-code.github.io/lit/setup/">here</a> to install and
        use this tool.
      </p>
      <style>
        :host {
          display: flex;
        }

        .message {
          margin: 80px auto 0 auto;
          max-width: 540px;
        }
        #commandTextarea {
          margin-top: 1ex;
          padding: 1ex 1em;
          resize: vertical;
          width: 100%;
        }
        #copyContainer {
          display: flex;
        }
        #copiedMessage {
          align-self: center;
          flex-grow: 1;
          font-style: italic;
          padding-right: 1em;
          text-align: right;
        }
      </style>
    </div>
  `;Vht=E([yt("tf-wit-redirect-dashboard")],Vht);var upe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_backend=RB}};upe=E([yt("tf-backend")],upe);var hpe=class extends mt{constructor(){super(...arguments),this._template=null,this.runsColorScale=fn}};hpe=E([yt("tf-color-scale")],hpe);var fpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_feature_flags=tW}};fpe=E([yt("tf-feature-flags")],fpe);var ppe;(function(e){e.STEP="step",e.WALL_TIME="wall_time",e.RELATIVE="relative"})(ppe||(ppe={}));var dpe;(function(e){e.OFFSET="offset",e.OVERLAY="overlay"})(dpe||(dpe={}));window.tensorboard=yh(ia({},window.tensorboard),{tf_globals:kW});var Uht={};Zs(Uht,{TfDomRepeat:()=>Oi,addLimitListener:()=>UW,getLimit:()=>GW,removeLimitListener:()=>qW,setLimit:()=>s2e});var mpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_paginated_view=Uht}};mpe=E([yt("tf-paginated-view-store")],mpe);window.tensorboard=yh(ia({},window.tensorboard),{tf_storage:OB});})();
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/**
 * @fileoverview
 * @suppress {checkPrototypalTypes}
 * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2021 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
/**
 * @license
 * Copyright 2010-2022 Three.js Authors
 * SPDX-License-Identifier: MIT
 */
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 *
 * @fileoverview manually add d3-selection-multi to d3 default bundle. Most of this code is
 * copied from d3-selection-multi@1.0.0.
 * See https://github.com/d3/d3-selection-multi/issues/11 for why we have to do this
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements a convenient thunk function to handle the common case
 * of creating a memoized function that takes its inputs from mutable class properties.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements a function memoizer using the Signature API.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements the Signature API to help in comparing when two
 * Plottable objects have "changed".
 *
 * Memoization in Plottable is complicated by mutable scales and datasets. We cannot simply
 * reference compare two e.g. scales since it may have internally mutated. To resolve this,
 * we write a recursive Signature interface that holds an immutable snapshot of whatever
 * state the scale/data was in at the time. Then on memoized function invocation we sign the
 * new inputs and compare the signatures to decide if we should recompute.
 *
 * We must hand-write a signature for each custom class we wish to support.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 */
/**
 * Copyright 2017-present Palantir Technologies
 * @license MIT
 */
/**
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

(()=>{var qie=Object.create,FA=Object.defineProperty,Xie=Object.getOwnPropertyDescriptor,Yie=Object.getOwnPropertyNames,Qie=Object.getPrototypeOf,Zie=Object.prototype.hasOwnProperty,JV=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),NA=(n,t)=>{for(var e in t)FA(n,e,{get:t[e],enumerable:!0})},$V=(n,t,e)=>(e=null!=n?qie(Qie(n)):{},((n,t,e,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of Yie(t))!Zie.call(n,r)&&undefined!==r&&FA(n,r,{get:()=>t[r],enumerable:!(i=Xie(t,r))||i.enumerable});return n})(!t&&n&&n.__esModule?e:FA(e,"default",{value:n,enumerable:!0}),n)),L4=JV((RUe,bC)=>{var p4,h4,m4,f4,g4,_4,b4,v4,y4,x4,C4,M4,w4,gC,ZA,S4,E4,T4,Lm,D4,I4,A4,R4,P4,k4,O4,F4,N4,_C;!function(n){var t="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function e(i,r){return i!==t&&("function"==typeof Object.create?Object.defineProperty(i,"__esModule",{value:!0}):i.__esModule=!0),function(o,a){return i[o]=r?r(o,a):a}}"function"==typeof define&&define.amd?define("tslib",["exports"],function(i){n(e(t,e(i)))}):n("object"==typeof bC&&"object"==typeof bC.exports?e(t,e(bC.exports)):e(t))}(function(n){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])};p4=function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=i}t(i,r),i.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)},h4=Object.assign||function(i){for(var r,o=1,a=arguments.length;o<a;o++)for(var s in r=arguments[o])Object.prototype.hasOwnProperty.call(r,s)&&(i[s]=r[s]);return i},m4=function(i,r){var o={};for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&r.indexOf(a)<0&&(o[a]=i[a]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(a=Object.getOwnPropertySymbols(i);s<a.length;s++)r.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(i,a[s])&&(o[a[s]]=i[a[s]])}return o},f4=function(i,r,o,a){var c,s=arguments.length,l=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,r,o,a);else for(var d=i.length-1;d>=0;d--)(c=i[d])&&(l=(s<3?c(l):s>3?c(r,o,l):c(r,o))||l);return s>3&&l&&Object.defineProperty(r,o,l),l},g4=function(i,r){return function(o,a){r(o,a,i)}},_4=function(i,r,o,a,s,l){function c(I){if(void 0!==I&&"function"!=typeof I)throw new TypeError("Function expected");return I}for(var m,d=a.kind,u="getter"===d?"get":"setter"===d?"set":"value",p=!r&&i?a.static?i:i.prototype:null,h=r||(p?Object.getOwnPropertyDescriptor(p,a.name):{}),_=!1,M=o.length-1;M>=0;M--){var y={};for(var x in a)y[x]="access"===x?{}:a[x];for(var x in a.access)y.access[x]=a.access[x];y.addInitializer=function(I){if(_)throw new TypeError("Cannot add initializers after decoration has completed");l.push(c(I||null))};var R=(0,o[M])("accessor"===d?{get:h.get,set:h.set}:h[u],y);if("accessor"===d){if(void 0===R)continue;if(null===R||"object"!=typeof R)throw new TypeError("Object expected");(m=c(R.get))&&(h.get=m),(m=c(R.set))&&(h.set=m),(m=c(R.init))&&s.push(m)}else(m=c(R))&&("field"===d?s.push(m):h[u]=m)}p&&Object.defineProperty(p,a.name,h),_=!0},b4=function(i,r,o){for(var a=arguments.length>2,s=0;s<r.length;s++)o=a?r[s].call(i,o):r[s].call(i);return a?o:void 0},v4=function(i){return"symbol"==typeof i?i:"".concat(i)},y4=function(i,r,o){return"symbol"==typeof r&&(r=r.description?"[".concat(r.description,"]"):""),Object.defineProperty(i,"name",{configurable:!0,value:o?"".concat(o," ",r):r})},x4=function(i,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(i,r)},C4=function(i,r,o,a){return new(o||(o=Promise))(function(l,c){function d(h){try{p(a.next(h))}catch(m){c(m)}}function u(h){try{p(a.throw(h))}catch(m){c(m)}}function p(h){h.done?l(h.value):function(l){return l instanceof o?l:new o(function(c){c(l)})}(h.value).then(d,u)}p((a=a.apply(i,r||[])).next())})},M4=function(i,r){var a,s,l,c,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return c={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return function(p){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,p[0]&&(o=0)),o;)try{if(a=1,s&&(l=2&p[0]?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[2&p[0],l.value]),p[0]){case 0:case 1:l=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,s=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(!(l=(l=o.trys).length>0&&l[l.length-1])&&(6===p[0]||2===p[0])){o=0;continue}if(3===p[0]&&(!l||p[1]>l[0]&&p[1]<l[3])){o.label=p[1];break}if(6===p[0]&&o.label<l[1]){o.label=l[1],l=p;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(p);break}l[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(i,o)}catch(h){p=[6,h],s=0}finally{a=l=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,h])}}},w4=function(i,r){for(var o in i)"default"!==o&&!Object.prototype.hasOwnProperty.call(r,o)&&_C(r,i,o)},_C=Object.create?function(i,r,o,a){void 0===a&&(a=o);var s=Object.getOwnPropertyDescriptor(r,o);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(i,a,s)}:function(i,r,o,a){void 0===a&&(a=o),i[a]=r[o]},gC=function(i){var r="function"==typeof Symbol&&Symbol.iterator,o=r&&i[r],a=0;if(o)return o.call(i);if(i&&"number"==typeof i.length)return{next:function(){return i&&a>=i.length&&(i=void 0),{value:i&&i[a++],done:!i}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},ZA=function(i,r){var o="function"==typeof Symbol&&i[Symbol.iterator];if(!o)return i;var s,c,a=o.call(i),l=[];try{for(;(void 0===r||r-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(c)throw c.error}}return l},S4=function(){for(var i=[],r=0;r<arguments.length;r++)i=i.concat(ZA(arguments[r]));return i},E4=function(){for(var i=0,r=0,o=arguments.length;r<o;r++)i+=arguments[r].length;var a=Array(i),s=0;for(r=0;r<o;r++)for(var l=arguments[r],c=0,d=l.length;c<d;c++,s++)a[s]=l[c];return a},T4=function(i,r,o){if(o||2===arguments.length)for(var l,a=0,s=r.length;a<s;a++)(l||!(a in r))&&(l||(l=Array.prototype.slice.call(r,0,a)),l[a]=r[a]);return i.concat(l||Array.prototype.slice.call(r))},Lm=function(i){return this instanceof Lm?(this.v=i,this):new Lm(i)},D4=function(i,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,a=o.apply(i,r||[]),l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(_){a[_]&&(s[_]=function(M){return new Promise(function(y,x){l.push([_,M,y,x])>1||d(_,M)})})}function d(_,M){try{!function(_){_.value instanceof Lm?Promise.resolve(_.value.v).then(p,h):m(l[0][2],_)}(a[_](M))}catch(y){m(l[0][3],y)}}function p(_){d("next",_)}function h(_){d("throw",_)}function m(_,M){_(M),l.shift(),l.length&&d(l[0][0],l[0][1])}},I4=function(i){var r,o;return r={},a("next"),a("throw",function(s){throw s}),a("return"),r[Symbol.iterator]=function(){return this},r;function a(s,l){r[s]=i[s]?function(c){return(o=!o)?{value:Lm(i[s](c)),done:!1}:l?l(c):c}:l}},A4=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=i[Symbol.asyncIterator];return r?r.call(i):(i=gC(i),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(l){o[l]=i[l]&&function(c){return new Promise(function(d,u){!function(l,c,d,u){Promise.resolve(u).then(function(p){l({value:p,done:d})},c)}(d,u,(c=i[l](c)).done,c.value)})}}},R4=function(i,r){return Object.defineProperty?Object.defineProperty(i,"raw",{value:r}):i.raw=r,i};var e=Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r};P4=function(i){if(i&&i.__esModule)return i;var r={};if(null!=i)for(var o in i)"default"!==o&&Object.prototype.hasOwnProperty.call(i,o)&&_C(r,i,o);return e(r,i),r},k4=function(i){return i&&i.__esModule?i:{default:i}},O4=function(i,r,o,a){if("a"===o&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?i!==r||!a:!r.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?a:"a"===o?a.call(i):a?a.value:r.get(i)},F4=function(i,r,o,a,s){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?i!==r||!s:!r.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?s.call(i,o):s?s.value=o:r.set(i,o),o},N4=function(i,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof i?r===i:i.has(r)},n("__extends",p4),n("__assign",h4),n("__rest",m4),n("__decorate",f4),n("__param",g4),n("__esDecorate",_4),n("__runInitializers",b4),n("__propKey",v4),n("__setFunctionName",y4),n("__metadata",x4),n("__awaiter",C4),n("__generator",M4),n("__exportStar",w4),n("__createBinding",_C),n("__values",gC),n("__read",ZA),n("__spread",S4),n("__spreadArrays",E4),n("__spreadArray",T4),n("__await",Lm),n("__asyncGenerator",D4),n("__asyncDelegator",I4),n("__asyncValues",A4),n("__makeTemplateObject",R4),n("__importStar",P4),n("__importDefault",k4),n("__classPrivateFieldGet",O4),n("__classPrivateFieldSet",F4),n("__classPrivateFieldIn",N4)})}),uG=JV(cO=>{"use strict";var n,uu=cO&&cO.__spreadArray||function(n,t,e){if(e||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return n.concat(o||Array.prototype.slice.call(t))};n=function(){!function(j){var J=j.performance;function le(ft){J&&J.mark&&J.mark(ft)}function E(ft,me){J&&J.measure&&J.measure(ft,me)}le("Zone");var V=j.__Zone_symbol_prefix||"__zone_symbol__";function X(ft){return V+ft}var Z=!0===j[X("forceDuplicateZoneCheck")];if(j.Zone){if(Z||"function"!=typeof j.Zone.__symbol__)throw new Error("Zone already loaded.");return j.Zone}var ae=function(){function ft(me,ge){this._parent=me,this._name=ge?ge.name||"unnamed":"<root>",this._properties=ge&&ge.properties||{},this._zoneDelegate=new et(this,this._parent&&this._parent._zoneDelegate,ge)}return ft.assertZonePatched=function(){if(j.Promise!==On.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(ft,"root",{get:function(){for(var me=ft.current;me.parent;)me=me.parent;return me},enumerable:!1,configurable:!0}),Object.defineProperty(ft,"current",{get:function(){return ir.zone},enumerable:!1,configurable:!0}),Object.defineProperty(ft,"currentTask",{get:function(){return Sa},enumerable:!1,configurable:!0}),ft.__load_patch=function(me,ge,Pe){if(void 0===Pe&&(Pe=!1),On.hasOwnProperty(me)){if(!Pe&&Z)throw Error("Already loaded patch: "+me)}else if(!j["__Zone_disable_"+me]){var Mn="Zone:"+me;le(Mn),On[me]=ge(j,ft,cr),E(Mn,Mn)}},Object.defineProperty(ft.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),ft.prototype.get=function(me){var ge=this.getZoneWith(me);if(ge)return ge._properties[me]},ft.prototype.getZoneWith=function(me){for(var ge=this;ge;){if(ge._properties.hasOwnProperty(me))return ge;ge=ge._parent}return null},ft.prototype.fork=function(me){if(!me)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,me)},ft.prototype.wrap=function(me,ge){if("function"!=typeof me)throw new Error("Expecting function got: "+me);var Pe=this._zoneDelegate.intercept(this,me,ge),Mn=this;return function(){return Mn.runGuarded(Pe,this,arguments,ge)}},ft.prototype.run=function(me,ge,Pe,Mn){ir={parent:ir,zone:this};try{return this._zoneDelegate.invoke(this,me,ge,Pe,Mn)}finally{ir=ir.parent}},ft.prototype.runGuarded=function(me,ge,Pe,Mn){void 0===ge&&(ge=null),ir={parent:ir,zone:this};try{try{return this._zoneDelegate.invoke(this,me,ge,Pe,Mn)}catch(ur){if(this._zoneDelegate.handleError(this,ur))throw ur}}finally{ir=ir.parent}},ft.prototype.runTask=function(me,ge,Pe){if(me.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(me.zone||Et).name+"; Execution: "+this.name+")");if(me.state!==gi||me.type!==_i&&me.type!==Pn){var Mn=me.state!=Qn;Mn&&me._transitionTo(Qn,Hn),me.runCount++;var ur=Sa;Sa=me,ir={parent:ir,zone:this};try{me.type==Pn&&me.data&&!me.data.isPeriodic&&(me.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,me,ge,Pe)}catch(hl){if(this._zoneDelegate.handleError(this,hl))throw hl}}finally{me.state!==gi&&me.state!==Bi&&(me.type==_i||me.data&&me.data.isPeriodic?Mn&&me._transitionTo(Hn,Qn):(me.runCount=0,this._updateTaskCount(me,-1),Mn&&me._transitionTo(gi,Qn,gi))),ir=ir.parent,Sa=ur}}},ft.prototype.scheduleTask=function(me){if(me.zone&&me.zone!==this)for(var ge=this;ge;){if(ge===me.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(me.zone.name));ge=ge.parent}me._transitionTo(ti,gi);var Pe=[];me._zoneDelegates=Pe,me._zone=this;try{me=this._zoneDelegate.scheduleTask(this,me)}catch(Mn){throw me._transitionTo(Bi,ti,gi),this._zoneDelegate.handleError(this,Mn),Mn}return me._zoneDelegates===Pe&&this._updateTaskCount(me,1),me.state==ti&&me._transitionTo(Hn,ti),me},ft.prototype.scheduleMicroTask=function(me,ge,Pe,Mn){return this.scheduleTask(new qe(_n,me,ge,Pe,Mn,void 0))},ft.prototype.scheduleMacroTask=function(me,ge,Pe,Mn,ur){return this.scheduleTask(new qe(Pn,me,ge,Pe,Mn,ur))},ft.prototype.scheduleEventTask=function(me,ge,Pe,Mn,ur){return this.scheduleTask(new qe(_i,me,ge,Pe,Mn,ur))},ft.prototype.cancelTask=function(me){if(me.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(me.zone||Et).name+"; Execution: "+this.name+")");if(me.state===Hn||me.state===Qn){me._transitionTo(zt,Hn,Qn);try{this._zoneDelegate.cancelTask(this,me)}catch(ge){throw me._transitionTo(Bi,zt),this._zoneDelegate.handleError(this,ge),ge}return this._updateTaskCount(me,-1),me._transitionTo(gi,zt),me.runCount=0,me}},ft.prototype._updateTaskCount=function(me,ge){var Pe=me._zoneDelegates;-1==ge&&(me._zoneDelegates=null);for(var Mn=0;Mn<Pe.length;Mn++)Pe[Mn]._updateTaskCount(me.type,ge)},ft}();ae.__symbol__=X;var qi,ze={name:"",onHasTask:function(ft,me,ge,Pe){return ft.hasTask(ge,Pe)},onScheduleTask:function(ft,me,ge,Pe){return ft.scheduleTask(ge,Pe)},onInvokeTask:function(ft,me,ge,Pe,Mn,ur){return ft.invokeTask(ge,Pe,Mn,ur)},onCancelTask:function(ft,me,ge,Pe){return ft.cancelTask(ge,Pe)}},et=function(){function ft(me,ge,Pe){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=me,this._parentDelegate=ge,this._forkZS=Pe&&(Pe&&Pe.onFork?Pe:ge._forkZS),this._forkDlgt=Pe&&(Pe.onFork?ge:ge._forkDlgt),this._forkCurrZone=Pe&&(Pe.onFork?this.zone:ge._forkCurrZone),this._interceptZS=Pe&&(Pe.onIntercept?Pe:ge._interceptZS),this._interceptDlgt=Pe&&(Pe.onIntercept?ge:ge._interceptDlgt),this._interceptCurrZone=Pe&&(Pe.onIntercept?this.zone:ge._interceptCurrZone),this._invokeZS=Pe&&(Pe.onInvoke?Pe:ge._invokeZS),this._invokeDlgt=Pe&&(Pe.onInvoke?ge:ge._invokeDlgt),this._invokeCurrZone=Pe&&(Pe.onInvoke?this.zone:ge._invokeCurrZone),this._handleErrorZS=Pe&&(Pe.onHandleError?Pe:ge._handleErrorZS),this._handleErrorDlgt=Pe&&(Pe.onHandleError?ge:ge._handleErrorDlgt),this._handleErrorCurrZone=Pe&&(Pe.onHandleError?this.zone:ge._handleErrorCurrZone),this._scheduleTaskZS=Pe&&(Pe.onScheduleTask?Pe:ge._scheduleTaskZS),this._scheduleTaskDlgt=Pe&&(Pe.onScheduleTask?ge:ge._scheduleTaskDlgt),this._scheduleTaskCurrZone=Pe&&(Pe.onScheduleTask?this.zone:ge._scheduleTaskCurrZone),this._invokeTaskZS=Pe&&(Pe.onInvokeTask?Pe:ge._invokeTaskZS),this._invokeTaskDlgt=Pe&&(Pe.onInvokeTask?ge:ge._invokeTaskDlgt),this._invokeTaskCurrZone=Pe&&(Pe.onInvokeTask?this.zone:ge._invokeTaskCurrZone),this._cancelTaskZS=Pe&&(Pe.onCancelTask?Pe:ge._cancelTaskZS),this._cancelTaskDlgt=Pe&&(Pe.onCancelTask?ge:ge._cancelTaskDlgt),this._cancelTaskCurrZone=Pe&&(Pe.onCancelTask?this.zone:ge._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var Mn=Pe&&Pe.onHasTask;(Mn||ge&&ge._hasTaskZS)&&(this._hasTaskZS=Mn?Pe:ze,this._hasTaskDlgt=ge,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=me,Pe.onScheduleTask||(this._scheduleTaskZS=ze,this._scheduleTaskDlgt=ge,this._scheduleTaskCurrZone=this.zone),Pe.onInvokeTask||(this._invokeTaskZS=ze,this._invokeTaskDlgt=ge,this._invokeTaskCurrZone=this.zone),Pe.onCancelTask||(this._cancelTaskZS=ze,this._cancelTaskDlgt=ge,this._cancelTaskCurrZone=this.zone))}return ft.prototype.fork=function(me,ge){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,me,ge):new ae(me,ge)},ft.prototype.intercept=function(me,ge,Pe){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,me,ge,Pe):ge},ft.prototype.invoke=function(me,ge,Pe,Mn,ur){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,me,ge,Pe,Mn,ur):ge.apply(Pe,Mn)},ft.prototype.handleError=function(me,ge){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,me,ge)},ft.prototype.scheduleTask=function(me,ge){var Pe=ge;if(this._scheduleTaskZS)this._hasTaskZS&&Pe._zoneDelegates.push(this._hasTaskDlgtOwner),(Pe=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,me,ge))||(Pe=ge);else if(ge.scheduleFn)ge.scheduleFn(ge);else{if(ge.type!=_n)throw new Error("Task is missing scheduleFn.");pn(ge)}return Pe},ft.prototype.invokeTask=function(me,ge,Pe,Mn){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,me,ge,Pe,Mn):ge.callback.apply(Pe,Mn)},ft.prototype.cancelTask=function(me,ge){var Pe;if(this._cancelTaskZS)Pe=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,me,ge);else{if(!ge.cancelFn)throw Error("Task is not cancelable");Pe=ge.cancelFn(ge)}return Pe},ft.prototype.hasTask=function(me,ge){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,me,ge)}catch(Pe){this.handleError(me,Pe)}},ft.prototype._updateTaskCount=function(me,ge){var Pe=this._taskCounts,Mn=Pe[me],ur=Pe[me]=Mn+ge;if(ur<0)throw new Error("More tasks executed then were scheduled.");0!=Mn&&0!=ur||this.hasTask(this.zone,{microTask:Pe.microTask>0,macroTask:Pe.macroTask>0,eventTask:Pe.eventTask>0,change:me})},ft}(),qe=function(){function ft(me,ge,Pe,Mn,ur,hl){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=me,this.source=ge,this.data=Mn,this.scheduleFn=ur,this.cancelFn=hl,!Pe)throw new Error("callback is not defined");this.callback=Pe;var tt=this;this.invoke=me===_i&&Mn&&Mn.useG?ft.invokeTask:function(){return ft.invokeTask.call(j,tt,this,arguments)}}return ft.invokeTask=function(me,ge,Pe){me||(me=this),yr++;try{return me.runCount++,me.zone.runTask(me,ge,Pe)}finally{1==yr&&Rn(),yr--}},Object.defineProperty(ft.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(ft.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),ft.prototype.cancelScheduleRequest=function(){this._transitionTo(gi,ti)},ft.prototype._transitionTo=function(me,ge,Pe){if(this._state!==ge&&this._state!==Pe)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(me,"', expecting state '").concat(ge,"'").concat(Pe?" or '"+Pe+"'":"",", was '").concat(this._state,"'."));this._state=me,me==gi&&(this._zoneDelegates=null)},ft.prototype.toString=function(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)},ft.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},ft}(),rt=X("setTimeout"),dt=X("Promise"),St=X("then"),At=[],cn=!1;function yi(ft){if(qi||j[dt]&&(qi=j[dt].resolve(0)),qi){var me=qi[St];me||(me=qi.then),me.call(qi,ft)}else j[rt](ft,0)}function pn(ft){0===yr&&0===At.length&&yi(Rn),ft&&At.push(ft)}function Rn(){if(!cn){for(cn=!0;At.length;){var ft=At;At=[];for(var me=0;me<ft.length;me++){var ge=ft[me];try{ge.zone.runTask(ge,null,null)}catch(Pe){cr.onUnhandledError(Pe)}}}cr.microtaskDrainDone(),cn=!1}}var Et={name:"NO ZONE"},gi="notScheduled",ti="scheduling",Hn="scheduled",Qn="running",zt="canceling",Bi="unknown",_n="microTask",Pn="macroTask",_i="eventTask",On={},cr={symbol:X,currentZoneFrame:function(){return ir},onUnhandledError:dr,microtaskDrainDone:dr,scheduleMicroTask:pn,showUncaughtError:function(){return!ae[X("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:dr,patchMethod:function(){return dr},bindArguments:function(){return[]},patchThen:function(){return dr},patchMacroTask:function(){return dr},patchEventPrototype:function(){return dr},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return dr},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return dr},wrapWithCurrentZone:function(){return dr},filterProperties:function(){return[]},attachOriginToPatched:function(){return dr},_redefineProperty:function(){return dr},patchCallbacks:function(){return dr},nativeScheduleMicroTask:yi},ir={parent:null,zone:new ae(null,null)},Sa=null,yr=0;function dr(){}E("Zone","Zone"),j.Zone=ae}(typeof window<"u"&&window||typeof self<"u"&&self||global);var n=Object.getOwnPropertyDescriptor,t=Object.defineProperty,e=Object.getPrototypeOf,i=Object.create,r=Array.prototype.slice,o="addEventListener",a="removeEventListener",s=Zone.__symbol__(o),l=Zone.__symbol__(a),c="true",d="false",u=Zone.__symbol__("");function p(j,J){return Zone.current.wrap(j,J)}function h(j,J,le,E,V){return Zone.current.scheduleMacroTask(j,J,le,E,V)}var m=Zone.__symbol__,_=typeof window<"u",M=_?window:void 0,y=_&&M||"object"==typeof self&&self||global,x="removeAttribute";function R(j,J){for(var le=j.length-1;le>=0;le--)"function"==typeof j[le]&&(j[le]=p(j[le],J+"_"+le));return j}function B(j){return!j||!1!==j.writable&&!("function"==typeof j.get&&typeof j.set>"u")}var ee=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Q=!("nw"in y)&&typeof y.process<"u"&&"[object process]"==={}.toString.call(y.process),we=!Q&&!ee&&!(!_||!M.HTMLElement),Qe=typeof y.process<"u"&&"[object process]"==={}.toString.call(y.process)&&!ee&&!(!_||!M.HTMLElement),Ae={},D=function(j){if(j=j||y.event){var J=Ae[j.type];J||(J=Ae[j.type]=m("ON_PROPERTY"+j.type));var V,le=this||j.target||y,E=le[J];return we&&le===M&&"error"===j.type?!0===(V=E&&E.call(this,j.message,j.filename,j.lineno,j.colno,j.error))&&j.preventDefault():null!=(V=E&&E.apply(this,arguments))&&!V&&j.preventDefault(),V}};function re(j,J,le){var E=n(j,J);if(!E&&le&&n(le,J)&&(E={enumerable:!0,configurable:!0}),E&&E.configurable){var X=m("on"+J+"patched");if(!j.hasOwnProperty(X)||!j[X]){delete E.writable,delete E.value;var Z=E.get,ae=E.set,ze=J.slice(2),et=Ae[ze];et||(et=Ae[ze]=m("ON_PROPERTY"+ze)),E.set=function(qe){var rt=this;!rt&&j===y&&(rt=y),rt&&("function"==typeof rt[et]&&rt.removeEventListener(ze,D),ae&&ae.call(rt,null),rt[et]=qe,"function"==typeof qe&&rt.addEventListener(ze,D,!1))},E.get=function(){var qe=this;if(!qe&&j===y&&(qe=y),!qe)return null;var rt=qe[et];if(rt)return rt;if(Z){var dt=Z.call(this);if(dt)return E.set.call(this,dt),"function"==typeof qe[x]&&qe.removeAttribute(J),dt}return null},t(j,J,E),j[X]=!0}}}function ce(j,J,le){if(J)for(var E=0;E<J.length;E++)re(j,"on"+J[E],le);else{var V=[];for(var X in j)"on"==X.slice(0,2)&&V.push(X);for(var Z=0;Z<V.length;Z++)re(j,V[Z],le)}}var he=m("originalInstance");function _e(j){var J=y[j];if(J){y[m(j)]=J,y[j]=function(){var V=R(arguments,j);switch(V.length){case 0:this[he]=new J;break;case 1:this[he]=new J(V[0]);break;case 2:this[he]=new J(V[0],V[1]);break;case 3:this[he]=new J(V[0],V[1],V[2]);break;case 4:this[he]=new J(V[0],V[1],V[2],V[3]);break;default:throw new Error("Arg list too long.")}},pe(y[j],J);var E,le=new J(function(){});for(E in le)"XMLHttpRequest"===j&&"responseBlob"===E||function(V){"function"==typeof le[V]?y[j].prototype[V]=function(){return this[he][V].apply(this[he],arguments)}:t(y[j].prototype,V,{set:function(X){"function"==typeof X?(this[he][V]=p(X,j+"."+V),pe(this[he][V],X)):this[he][V]=X},get:function(){return this[he][V]}})}(E);for(E in J)"prototype"!==E&&J.hasOwnProperty(E)&&(y[j][E]=J[E])}}function $(j,J,le){for(var E=j;E&&!E.hasOwnProperty(J);)E=e(E);!E&&j[J]&&(E=j);var V=m(J),X=null;if(E&&(!(X=E[V])||!E.hasOwnProperty(V))&&(X=E[V]=E[J],B(E&&n(E,J)))){var ae=le(X,V,J);E[J]=function(){return ae(this,arguments)},pe(E[J],X)}return X}function de(j,J,le){var E=null;function V(X){var Z=X.data;return Z.args[Z.cbIdx]=function(){X.invoke.apply(this,arguments)},E.apply(Z.target,Z.args),X}E=$(j,J,function(X){return function(Z,ae){var ze=le(Z,ae);return ze.cbIdx>=0&&"function"==typeof ae[ze.cbIdx]?h(ze.name,ae[ze.cbIdx],ze,V):X.apply(Z,ae)}})}function pe(j,J){j[m("OriginalDelegate")]=J}var Ge=!1,Se=!1;function lt(){if(Ge)return Se;Ge=!0;try{var j=M.navigator.userAgent;(-1!==j.indexOf("MSIE ")||-1!==j.indexOf("Trident/")||-1!==j.indexOf("Edge/"))&&(Se=!0)}catch{}return Se}Zone.__load_patch("ZoneAwarePromise",function(j,J,le){var E=Object.getOwnPropertyDescriptor,V=Object.defineProperty,Z=le.symbol,ae=[],ze=!0===j[Z("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],et=Z("Promise"),qe=Z("then"),rt="__creationTrace__";le.onUnhandledError=function(tt){if(le.showUncaughtError()){var Pt=tt&&tt.rejection;Pt?console.error("Unhandled Promise rejection:",Pt instanceof Error?Pt.message:Pt,"; Zone:",tt.zone.name,"; Task:",tt.task&&tt.task.source,"; Value:",Pt,Pt instanceof Error?Pt.stack:void 0):console.error(tt)}},le.microtaskDrainDone=function(){for(var tt=function(){var Pt=ae.shift();try{Pt.zone.runGuarded(function(){throw Pt.throwOriginal?Pt.rejection:Pt})}catch(Ct){!function(tt){le.onUnhandledError(tt);try{var Pt=J[dt];"function"==typeof Pt&&Pt.call(this,tt)}catch{}}(Ct)}};ae.length;)tt()};var dt=Z("unhandledPromiseRejectionHandler");function At(tt){return tt&&tt.then}function cn(tt){return tt}function qi(tt){return ge.reject(tt)}var yi=Z("state"),pn=Z("value"),Rn=Z("finally"),Et=Z("parentPromiseValue"),gi=Z("parentPromiseState"),ti="Promise.then",Hn=null,Qn=!0,zt=!1,Bi=0;function _n(tt,Pt){return function(Ct){try{cr(tt,Pt,Ct)}catch(Je){cr(tt,!1,Je)}}}var Pn=function(){var tt=!1;return function(Ct){return function(){tt||(tt=!0,Ct.apply(null,arguments))}}},_i="Promise resolved with itself",On=Z("currentTaskTrace");function cr(tt,Pt,Ct){var Je=Pn();if(tt===Ct)throw new TypeError(_i);if(tt[yi]===Hn){var Zt=null;try{("object"==typeof Ct||"function"==typeof Ct)&&(Zt=Ct&&Ct.then)}catch(li){return Je(function(){cr(tt,!1,li)})(),tt}if(Pt!==zt&&Ct instanceof ge&&Ct.hasOwnProperty(yi)&&Ct.hasOwnProperty(pn)&&Ct[yi]!==Hn)Sa(Ct),cr(tt,Ct[yi],Ct[pn]);else if(Pt!==zt&&"function"==typeof Zt)try{Zt.call(Ct,Je(_n(tt,Pt)),Je(_n(tt,!1)))}catch(li){Je(function(){cr(tt,!1,li)})()}else{tt[yi]=Pt;var Ln=tt[pn];if(tt[pn]=Ct,tt[Rn]===Rn&&Pt===Qn&&(tt[yi]=tt[gi],tt[pn]=tt[Et]),Pt===zt&&Ct instanceof Error){var Dn=J.currentTask&&J.currentTask.data&&J.currentTask.data[rt];Dn&&V(Ct,On,{configurable:!0,enumerable:!1,writable:!0,value:Dn})}for(var ni=0;ni<Ln.length;)yr(tt,Ln[ni++],Ln[ni++],Ln[ni++],Ln[ni++]);if(0==Ln.length&&Pt==zt){tt[yi]=Bi;var ii=Ct;try{throw new Error("Uncaught (in promise): "+function(tt){return tt&&tt.toString===Object.prototype.toString?(tt.constructor&&tt.constructor.name||"")+": "+JSON.stringify(tt):tt?tt.toString():Object.prototype.toString.call(tt)}(Ct)+(Ct&&Ct.stack?"\n"+Ct.stack:""))}catch(li){ii=li}ze&&(ii.throwOriginal=!0),ii.rejection=Ct,ii.promise=tt,ii.zone=J.current,ii.task=J.currentTask,ae.push(ii),le.scheduleMicroTask()}}}return tt}var ir=Z("rejectionHandledHandler");function Sa(tt){if(tt[yi]===Bi){try{var Pt=J[ir];Pt&&"function"==typeof Pt&&Pt.call(this,{rejection:tt[pn],promise:tt})}catch{}tt[yi]=zt;for(var Ct=0;Ct<ae.length;Ct++)tt===ae[Ct].promise&&ae.splice(Ct,1)}}function yr(tt,Pt,Ct,Je,Zt){Sa(tt);var Ln=tt[yi],Dn=Ln?"function"==typeof Je?Je:cn:"function"==typeof Zt?Zt:qi;Pt.scheduleMicroTask(ti,function(){try{var ni=tt[pn],ii=!!Ct&&Rn===Ct[Rn];ii&&(Ct[Et]=ni,Ct[gi]=Ln);var li=Pt.run(Dn,void 0,ii&&Dn!==qi&&Dn!==cn?[]:[ni]);cr(Ct,!0,li)}catch(xi){cr(Ct,!1,xi)}},Ct)}var ft=function(){},me=j.AggregateError,ge=function(){function tt(Pt){var Ct=this;if(!(Ct instanceof tt))throw new Error("Must be an instanceof Promise.");Ct[yi]=Hn,Ct[pn]=[];try{var Je=Pn();Pt&&Pt(Je(_n(Ct,Qn)),Je(_n(Ct,zt)))}catch(Zt){cr(Ct,!1,Zt)}}return tt.toString=function(){return"function ZoneAwarePromise() { [native code] }"},tt.resolve=function(Pt){return cr(new this(null),Qn,Pt)},tt.reject=function(Pt){return cr(new this(null),zt,Pt)},tt.any=function(Pt){if(!Pt||"function"!=typeof Pt[Symbol.iterator])return Promise.reject(new me([],"All promises were rejected"));var Ct=[],Je=0;try{for(var Zt=0,Ln=Pt;Zt<Ln.length;Zt++)Je++,Ct.push(tt.resolve(Ln[Zt]))}catch{return Promise.reject(new me([],"All promises were rejected"))}if(0===Je)return Promise.reject(new me([],"All promises were rejected"));var ni=!1,ii=[];return new tt(function(li,xi){for(var pr=0;pr<Ct.length;pr++)Ct[pr].then(function(No){ni||(ni=!0,li(No))},function(No){ii.push(No),0==--Je&&(ni=!0,xi(new me(ii,"All promises were rejected")))})})},tt.race=function(Pt){var Ct,Je,Zt=new this(function(xi,pr){Ct=xi,Je=pr});function Ln(xi){Ct(xi)}function Dn(xi){Je(xi)}for(var ni=0,ii=Pt;ni<ii.length;ni++){var li=ii[ni];At(li)||(li=this.resolve(li)),li.then(Ln,Dn)}return Zt},tt.all=function(Pt){return tt.allWithCallback(Pt)},tt.allSettled=function(Pt){return(this&&this.prototype instanceof tt?this:tt).allWithCallback(Pt,{thenCallback:function(Je){return{status:"fulfilled",value:Je}},errorCallback:function(Je){return{status:"rejected",reason:Je}}})},tt.allWithCallback=function(Pt,Ct){for(var Je,Zt,Ln=new this(function(Zr,xo){Je=Zr,Zt=xo}),Dn=2,ni=0,ii=[],li=function(Zr){At(Zr)||(Zr=xi.resolve(Zr));var xo=ni;try{Zr.then(function(Hr){ii[xo]=Ct?Ct.thenCallback(Hr):Hr,0==--Dn&&Je(ii)},function(Hr){Ct?(ii[xo]=Ct.errorCallback(Hr),0==--Dn&&Je(ii)):Zt(Hr)})}catch(Hr){Zt(Hr)}Dn++,ni++},xi=this,pr=0,No=Pt;pr<No.length;pr++)li(No[pr]);return 0==(Dn-=2)&&Je(ii),Ln},Object.defineProperty(tt.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,Symbol.species,{get:function(){return tt},enumerable:!1,configurable:!0}),tt.prototype.then=function(Pt,Ct){var Je,Zt=null===(Je=this.constructor)||void 0===Je?void 0:Je[Symbol.species];(!Zt||"function"!=typeof Zt)&&(Zt=this.constructor||tt);var Ln=new Zt(ft),Dn=J.current;return this[yi]==Hn?this[pn].push(Dn,Ln,Pt,Ct):yr(this,Dn,Ln,Pt,Ct),Ln},tt.prototype.catch=function(Pt){return this.then(null,Pt)},tt.prototype.finally=function(Pt){var Ct,Je=null===(Ct=this.constructor)||void 0===Ct?void 0:Ct[Symbol.species];(!Je||"function"!=typeof Je)&&(Je=tt);var Zt=new Je(ft);Zt[Rn]=Rn;var Ln=J.current;return this[yi]==Hn?this[pn].push(Ln,Zt,Pt,Pt):yr(this,Ln,Zt,Pt,Pt),Zt},tt}();ge.resolve=ge.resolve,ge.reject=ge.reject,ge.race=ge.race,ge.all=ge.all;var Pe=j[et]=j.Promise;j.Promise=ge;var Mn=Z("thenPatched");function ur(tt){var Pt=tt.prototype,Ct=E(Pt,"then");if(!Ct||!1!==Ct.writable&&Ct.configurable){var Je=Pt.then;Pt[qe]=Je,tt.prototype.then=function(Zt,Ln){var Dn=this;return new ge(function(ii,li){Je.call(Dn,ii,li)}).then(Zt,Ln)},tt[Mn]=!0}}return le.patchThen=ur,Pe&&(ur(Pe),$(j,"fetch",function(tt){return function(tt){return function(Pt,Ct){var Je=tt.apply(Pt,Ct);if(Je instanceof ge)return Je;var Zt=Je.constructor;return Zt[Mn]||ur(Zt),Je}}(tt)})),Promise[J.__symbol__("uncaughtPromiseErrors")]=ae,ge}),Zone.__load_patch("toString",function(j){var J=Function.prototype.toString,le=m("OriginalDelegate"),E=m("Promise"),V=m("Error"),X=function(){if("function"==typeof this){var et=this[le];if(et)return"function"==typeof et?J.call(et):Object.prototype.toString.call(et);if(this===Promise){var qe=j[E];if(qe)return J.call(qe)}if(this===Error){var rt=j[V];if(rt)return J.call(rt)}}return J.call(this)};X[le]=J,Function.prototype.toString=X;var Z=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":Z.call(this)}});var Mt=!1;if(typeof window<"u")try{var pt=Object.defineProperty({},"passive",{get:function(){Mt=!0}});window.addEventListener("test",pt,pt),window.removeEventListener("test",pt,pt)}catch{Mt=!1}var si,Ni,Li,Y,L,ke={useG:!0},Tn={},wt={},on=new RegExp("^"+u+"(\\w+)(true|false)$"),Ce=m("propagationStopped");function mt(j,J){var le=(J?J(j):j)+d,E=(J?J(j):j)+c,V=u+le,X=u+E;Tn[j]={},Tn[j][d]=V,Tn[j][c]=X}function ht(j,J,le,E){var V=E&&E.add||o,X=E&&E.rm||a,Z=E&&E.listeners||"eventListeners",ae=E&&E.rmAll||"removeAllListeners",ze=m(V),et="."+V+":",qe="prependListener",rt="."+qe+":",dt=function(Rn,Et,gi){if(!Rn.isRemoved){var Hn,ti=Rn.callback;"object"==typeof ti&&ti.handleEvent&&(Rn.callback=function(Bi){return ti.handleEvent(Bi)},Rn.originalDelegate=ti);try{Rn.invoke(Rn,Et,[gi])}catch(Bi){Hn=Bi}var Qn=Rn.options;return Qn&&"object"==typeof Qn&&Qn.once&&Et[X].call(Et,gi.type,Rn.originalDelegate?Rn.originalDelegate:Rn.callback,Qn),Hn}};function St(Rn,Et,gi){if(Et=Et||j.event){var ti=Rn||Et.target||j,Hn=ti[Tn[Et.type][gi?c:d]];if(Hn){var Qn=[];if(1===Hn.length)(zt=dt(Hn[0],ti,Et))&&Qn.push(zt);else for(var Bi=Hn.slice(),_n=0;_n<Bi.length&&(!Et||!0!==Et[Ce]);_n++){var zt;(zt=dt(Bi[_n],ti,Et))&&Qn.push(zt)}if(1===Qn.length)throw Qn[0];var Pn=function(_i){var On=Qn[_i];J.nativeScheduleMicroTask(function(){throw On})};for(_n=0;_n<Qn.length;_n++)Pn(_n)}}}var At=function(Rn){return St(this,Rn,!1)},cn=function(Rn){return St(this,Rn,!0)};function qi(Rn,Et){if(!Rn)return!1;var gi=!0;Et&&void 0!==Et.useG&&(gi=Et.useG);var ti=Et&&Et.vh,Hn=!0;Et&&void 0!==Et.chkDup&&(Hn=Et.chkDup);var Qn=!1;Et&&void 0!==Et.rt&&(Qn=Et.rt);for(var zt=Rn;zt&&!zt.hasOwnProperty(V);)zt=e(zt);if(!zt&&Rn[V]&&(zt=Rn),!zt||zt[ze])return!1;var ir,Bi=Et&&Et.eventNameToString,_n={},Pn=zt[ze]=zt[V],_i=zt[m(X)]=zt[X],On=zt[m(Z)]=zt[Z],cr=zt[m(ae)]=zt[ae];Et&&Et.prepend&&(ir=zt[m(Et.prepend)]=zt[Et.prepend]);var Pe=gi?function(Je){if(!_n.isExisting)return Pn.call(_n.target,_n.eventName,_n.capture?cn:At,_n.options)}:function(Je){return Pn.call(_n.target,_n.eventName,Je.invoke,_n.options)},Mn=gi?function(Je){if(!Je.isRemoved){var Zt=Tn[Je.eventName],Ln=void 0;Zt&&(Ln=Zt[Je.capture?c:d]);var Dn=Ln&&Je.target[Ln];if(Dn)for(var ni=0;ni<Dn.length;ni++)if(Dn[ni]===Je){Dn.splice(ni,1),Je.isRemoved=!0,0===Dn.length&&(Je.allRemoved=!0,Je.target[Ln]=null);break}}if(Je.allRemoved)return _i.call(Je.target,Je.eventName,Je.capture?cn:At,Je.options)}:function(Je){return _i.call(Je.target,Je.eventName,Je.invoke,Je.options)},hl=Et&&Et.diff?Et.diff:function(Je,Zt){var Ln=typeof Zt;return"function"===Ln&&Je.callback===Zt||"object"===Ln&&Je.originalDelegate===Zt},tt=Zone[m("UNPATCHED_EVENTS")],Pt=j[m("PASSIVE_EVENTS")],Ct=function(Je,Zt,Ln,Dn,ni,ii){return void 0===ni&&(ni=!1),void 0===ii&&(ii=!1),function(){var li=this||j,xi=arguments[0];Et&&Et.transferEventName&&(xi=Et.transferEventName(xi));var pr=arguments[1];if(!pr)return Je.apply(this,arguments);if(Q&&"uncaughtException"===xi)return Je.apply(this,arguments);var No=!1;if("function"!=typeof pr){if(!pr.handleEvent)return Je.apply(this,arguments);No=!0}if(!ti||ti(Je,pr,li,arguments)){var Yc=Mt&&!!Pt&&-1!==Pt.indexOf(xi),Zr=function(Je,Zt){return!Mt&&"object"==typeof Je&&Je?!!Je.capture:Mt&&Zt?"boolean"==typeof Je?{capture:Je,passive:!0}:Je?"object"==typeof Je&&!1!==Je.passive?Object.assign(Object.assign({},Je),{passive:!0}):Je:{passive:!0}:Je}(arguments[2],Yc);if(tt)for(var xo=0;xo<tt.length;xo++)if(xi===tt[xo])return Yc?Je.call(li,xi,pr,Zr):Je.apply(this,arguments);var Hr=!!Zr&&("boolean"==typeof Zr||Zr.capture),Im=!(!Zr||"object"!=typeof Zr)&&Zr.once,Wie=Zone.current,OA=Tn[xi];OA||(mt(xi,Bi),OA=Tn[xi]);var YV=OA[Hr?c:d],Am=li[YV],QV=!1;if(Am){if(QV=!0,Hn)for(xo=0;xo<Am.length;xo++)if(hl(Am[xo],pr))return}else Am=li[YV]=[];var nC,ZV=li.constructor.name,KV=wt[ZV];KV&&(nC=KV[xi]),nC||(nC=ZV+Zt+(Bi?Bi(xi):xi)),_n.options=Zr,Im&&(_n.options.once=!1),_n.target=li,_n.capture=Hr,_n.eventName=xi,_n.isExisting=QV;var E_=gi?ke:void 0;E_&&(E_.taskData=_n);var Yd=Wie.scheduleEventTask(nC,pr,E_,Ln,Dn);if(_n.target=null,E_&&(E_.taskData=null),Im&&(Zr.once=!0),!Mt&&"boolean"==typeof Yd.options||(Yd.options=Zr),Yd.target=li,Yd.capture=Hr,Yd.eventName=xi,No&&(Yd.originalDelegate=pr),ii?Am.unshift(Yd):Am.push(Yd),ni)return li}}};return zt[V]=Ct(Pn,et,Pe,Mn,Qn),ir&&(zt[qe]=Ct(ir,rt,function(Je){return ir.call(_n.target,_n.eventName,Je.invoke,_n.options)},Mn,Qn,!0)),zt[X]=function(){var Je=this||j,Zt=arguments[0];Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));var Ln=arguments[2],Dn=!!Ln&&("boolean"==typeof Ln||Ln.capture),ni=arguments[1];if(!ni)return _i.apply(this,arguments);if(!ti||ti(_i,ni,Je,arguments)){var li,ii=Tn[Zt];ii&&(li=ii[Dn?c:d]);var xi=li&&Je[li];if(xi)for(var pr=0;pr<xi.length;pr++){var No=xi[pr];if(hl(No,ni))return xi.splice(pr,1),No.isRemoved=!0,0===xi.length&&(No.allRemoved=!0,Je[li]=null,"string"==typeof Zt)&&(Je[u+"ON_PROPERTY"+Zt]=null),No.zone.cancelTask(No),Qn?Je:void 0}return _i.apply(this,arguments)}},zt[Z]=function(){var Je=this||j,Zt=arguments[0];Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));for(var Ln=[],Dn=oe(Je,Bi?Bi(Zt):Zt),ni=0;ni<Dn.length;ni++){var ii=Dn[ni];Ln.push(ii.originalDelegate?ii.originalDelegate:ii.callback)}return Ln},zt[ae]=function(){var Je=this||j,Zt=arguments[0];if(Zt){Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));var xi=Tn[Zt];if(xi){var Yc=Je[xi[d]],Zr=Je[xi[c]];if(Yc)for(var xo=Yc.slice(),Dn=0;Dn<xo.length;Dn++)this[X].call(this,Zt,(Hr=xo[Dn]).originalDelegate?Hr.originalDelegate:Hr.callback,Hr.options);if(Zr)for(xo=Zr.slice(),Dn=0;Dn<xo.length;Dn++){var Hr;this[X].call(this,Zt,(Hr=xo[Dn]).originalDelegate?Hr.originalDelegate:Hr.callback,Hr.options)}}}else{var Ln=Object.keys(Je);for(Dn=0;Dn<Ln.length;Dn++){var ii=on.exec(Ln[Dn]),li=ii&&ii[1];li&&"removeListener"!==li&&this[ae].call(this,li)}this[ae].call(this,"removeListener")}if(Qn)return this},pe(zt[V],Pn),pe(zt[X],_i),cr&&pe(zt[ae],cr),On&&pe(zt[Z],On),!0}for(var yi=[],pn=0;pn<le.length;pn++)yi[pn]=qi(le[pn],E);return yi}function oe(j,J){if(!J){var le=[];for(var E in j){var V=on.exec(E),X=V&&V[1];if(X&&(!J||X===J)){var Z=j[E];if(Z)for(var ae=0;ae<Z.length;ae++)le.push(Z[ae])}}return le}var ze=Tn[J];ze||(mt(J),ze=Tn[J]);var et=j[ze[d]],qe=j[ze[c]];return et?qe?et.concat(qe):et.slice():qe?qe.slice():[]}function at(j,J){var le=j.Event;le&&le.prototype&&J.patchMethod(le.prototype,"stopImmediatePropagation",function(E){return function(V,X){V[Ce]=!0,E&&E.apply(V,X)}})}function Ye(j,J,le,E,V){var X=Zone.__symbol__(E);if(!J[X]){var Z=J[X]=J[E];J[E]=function(ae,ze,et){return ze&&ze.prototype&&V.forEach(function(qe){var rt="".concat(le,".").concat(E,"::")+qe,dt=ze.prototype;try{if(dt.hasOwnProperty(qe)){var St=j.ObjectGetOwnPropertyDescriptor(dt,qe);St&&St.value?(St.value=j.wrapWithCurrentZone(St.value,rt),j._redefineProperty(ze.prototype,qe,St)):dt[qe]&&(dt[qe]=j.wrapWithCurrentZone(dt[qe],rt))}else dt[qe]&&(dt[qe]=j.wrapWithCurrentZone(dt[qe],rt))}catch{}}),Z.call(J,ae,ze,et)},j.attachOriginToPatched(J[E],Z)}}function _t(j,J,le){if(!le||0===le.length)return J;var E=le.filter(function(X){return X.target===j});if(!E||0===E.length)return J;var V=E[0].ignoreProperties;return J.filter(function(X){return-1===V.indexOf(X)})}function ut(j,J,le,E){j&&ce(j,_t(j,J,le),E)}function an(j){return Object.getOwnPropertyNames(j).filter(function(J){return J.startsWith("on")&&J.length>2}).map(function(J){return J.substring(2)})}function yt(j,J,le){var E=le.configurable;return hn(j,J,le=Le(j,J,le),E)}function en(j,J){return j&&j[L]&&j[L][J]}function Le(j,J,le){return Object.isFrozen(le)||(le.configurable=!0),le.configurable||(!j[L]&&!Object.isFrozen(j)&&Ni(j,L,{writable:!0,value:{}}),j[L]&&(j[L][J]=!0)),le}function hn(j,J,le,E){try{return Ni(j,J,le)}catch(Z){if(!le.configurable)throw Z;typeof E>"u"?delete le.configurable:le.configurable=E;try{return Ni(j,J,le)}catch(ae){var V=!1;if(("createdCallback"===J||"attachedCallback"===J||"detachedCallback"===J||"attributeChangedCallback"===J)&&(V=!0),!V)throw ae;var X=null;try{X=JSON.stringify(le)}catch{X=le.toString()}console.log("Attempting to configure '".concat(J,"' with descriptor '").concat(X,"' on object '").concat(j,"' and got error, giving up: ").concat(ae))}}}Zone.__load_patch("util",function(j,J,le){var E=an(j);le.patchOnProperties=ce,le.patchMethod=$,le.bindArguments=R,le.patchMacroTask=de;var V=J.__symbol__("BLACK_LISTED_EVENTS"),X=J.__symbol__("UNPATCHED_EVENTS");j[X]&&(j[V]=j[X]),j[V]&&(J[V]=J[X]=j[V]),le.patchEventPrototype=at,le.patchEventTarget=ht,le.isIEOrEdge=lt,le.ObjectDefineProperty=t,le.ObjectGetOwnPropertyDescriptor=n,le.ObjectCreate=i,le.ArraySlice=r,le.patchClass=_e,le.wrapWithCurrentZone=p,le.filterProperties=_t,le.attachOriginToPatched=pe,le._redefineProperty=Object.defineProperty,le.patchCallbacks=Ye,le.getGlobalObjects=function(){return{globalSources:wt,zoneSymbolEventNames:Tn,eventNames:E,isBrowser:we,isMix:Qe,isNode:Q,TRUE_STR:c,FALSE_STR:d,ZONE_SYMBOL_PREFIX:u,ADD_EVENT_LISTENER_STR:o,REMOVE_EVENT_LISTENER_STR:a}}});var j,Wo=uu(uu(uu(uu(uu(uu(uu(uu([],["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],!0),["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],!0),["autocomplete","autocompleteerror"],!0),["toggle"],!0),["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],!0),["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],!0),["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],!0),["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],!0);(j=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{})[("legacyPatch",(j.__Zone_symbol_prefix||"__zone_symbol__")+"legacyPatch")]=function(){var E=j.Zone;E.__load_patch("defineProperty",function(V,X,Z){Z._redefineProperty=yt,si=Zone.__symbol__,Ni=Object[si("defineProperty")]=Object.defineProperty,Li=Object[si("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,Y=Object.create,L=si("unconfigurables"),Object.defineProperty=function(j,J,le){if(en(j,J))throw new TypeError("Cannot assign to read only property '"+J+"' of "+j);var E=le.configurable;return"prototype"!==J&&(le=Le(j,J,le)),hn(j,J,le,E)},Object.defineProperties=function(j,J){Object.keys(J).forEach(function(Z){Object.defineProperty(j,Z,J[Z])});for(var le=0,E=Object.getOwnPropertySymbols(J);le<E.length;le++){var V=E[le];Object.getOwnPropertyDescriptor(J,V)?.enumerable&&Object.defineProperty(j,V,J[V])}return j},Object.create=function(j,J){return"object"==typeof J&&!Object.isFrozen(J)&&Object.keys(J).forEach(function(le){J[le]=Le(j,le,J[le])}),Y(j,J)},Object.getOwnPropertyDescriptor=function(j,J){var le=Li(j,J);return le&&en(j,J)&&(le.configurable=!1),le}}),E.__load_patch("registerElement",function(V,X,Z){!function(j,J){var le=J.getGlobalObjects();(le.isBrowser||le.isMix)&&"registerElement"in j.document&&J.patchCallbacks(J,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(V,Z)}),E.__load_patch("EventTargetLegacy",function(V,X,Z){(function(j,J){var le=J.getGlobalObjects(),E=le.eventNames,V=le.globalSources,X=le.zoneSymbolEventNames,Z=le.TRUE_STR,ae=le.FALSE_STR,ze=le.ZONE_SYMBOL_PREFIX,qe="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),rt="EventTarget",dt=[],St=j.wtf,At="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video".split(",");St?dt=At.map(function(yr){return"HTML"+yr+"Element"}).concat(qe):j[rt]?dt.push(rt):dt=qe;for(var cn=j.__Zone_disable_IE_check||!1,qi=j.__Zone_enable_cross_context_check||!1,yi=J.isIEOrEdge(),Rn="[object FunctionWrapper]",Et="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",gi={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},ti=0;ti<E.length;ti++){var Bi=ze+((Hn=E[ti])+ae),_n=ze+(Hn+Z);X[Hn]={},X[Hn][ae]=Bi,X[Hn][Z]=_n}for(ti=0;ti<At.length;ti++)for(var Pn=At[ti],_i=V[Pn]={},On=0;On<E.length;On++){var Hn;_i[Hn=E[On]]=Pn+".addEventListener:"+Hn}var ir=[];for(ti=0;ti<dt.length;ti++){var Sa=j[dt[ti]];ir.push(Sa&&Sa.prototype)}J.patchEventTarget(j,J,ir,{vh:function(yr,dr,ft,me){if(!cn&&yi)if(qi)try{if((ge=dr.toString())===Rn||ge==Et)return yr.apply(ft,me),!1}catch{return yr.apply(ft,me),!1}else{var ge;if((ge=dr.toString())===Rn||ge==Et)return yr.apply(ft,me),!1}else if(qi)try{dr.toString()}catch{return yr.apply(ft,me),!1}return!0},transferEventName:function(yr){return gi[yr]||yr}}),Zone[J.symbol("patchEventTarget")]=!!j[rt]})(V,Z),function(j,J){var le=j.getGlobalObjects();if((!le.isNode||le.isMix)&&!function(j,J){var le=j.getGlobalObjects();if((le.isBrowser||le.isMix)&&!j.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&typeof Element<"u"){var X=j.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(X&&!X.configurable)return!1;if(X){j.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var ae=!!document.createElement("div").onclick;return j.ObjectDefineProperty(Element.prototype,"onclick",X),ae}}var ze=J.XMLHttpRequest;if(!ze)return!1;var et="onreadystatechange",qe=ze.prototype,rt=j.ObjectGetOwnPropertyDescriptor(qe,et);if(rt)return j.ObjectDefineProperty(qe,et,{enumerable:!0,configurable:!0,get:function(){return!0}}),ae=!!(dt=new ze).onreadystatechange,j.ObjectDefineProperty(qe,et,rt||{}),ae;var St=j.symbol("fake");j.ObjectDefineProperty(qe,et,{enumerable:!0,configurable:!0,get:function(){return this[St]},set:function(yi){this[St]=yi}});var dt,At=function(){};return(dt=new ze).onreadystatechange=At,ae=dt[St]===At,dt.onreadystatechange=null,ae}(j,J)){var X=typeof WebSocket<"u";(function(j){for(var J=j.symbol("unbound"),le=function(V){var X=Wo[V],Z="on"+X;self.addEventListener(X,function(ae){var et,qe,ze=ae.target;for(qe=ze?ze.constructor.name+"."+Z:"unknown."+Z;ze;)ze[Z]&&!ze[Z][J]&&((et=j.wrapWithCurrentZone(ze[Z],qe))[J]=ze[Z],ze[Z]=et),ze=ze.parentElement},!0)},E=0;E<Wo.length;E++)le(E)})(j),j.patchClass("XMLHttpRequest"),X&&function(j,J){var le=j.getGlobalObjects(),E=le.ADD_EVENT_LISTENER_STR,V=le.REMOVE_EVENT_LISTENER_STR,X=J.WebSocket;J.EventTarget||j.patchEventTarget(J,j,[X.prototype]),J.WebSocket=function(ze,et){var rt,dt,qe=arguments.length>1?new X(ze,et):new X(ze),St=j.ObjectGetOwnPropertyDescriptor(qe,"onmessage");return St&&!1===St.configurable?(rt=j.ObjectCreate(qe),dt=qe,[E,V,"send","close"].forEach(function(At){rt[At]=function(){var cn=j.ArraySlice.call(arguments);if(At===E||At===V){var qi=cn.length>0?cn[0]:void 0;if(qi){var yi=Zone.__symbol__("ON_PROPERTY"+qi);qe[yi]=rt[yi]}}return qe[At].apply(qe,cn)}})):rt=qe,j.patchOnProperties(rt,["close","error","message","open"],dt),rt};var Z=J.WebSocket;for(var ae in X)Z[ae]=X[ae]}(j,J),Zone[j.symbol("patchEvents")]=!0}}(Z,V)})};var wa=m("zoneTask");function pl(j,J,le,E){var V=null,X=null;le+=E;var Z={};function ae(et){var qe=et.data;return qe.args[0]=function(){return et.invoke.apply(this,arguments)},qe.handleId=V.apply(j,qe.args),et}function ze(et){return X.call(j,et.data.handleId)}V=$(j,J+=E,function(et){return function(qe,rt){if("function"==typeof rt[0]){var dt={isPeriodic:"Interval"===E,delay:"Timeout"===E||"Interval"===E?rt[1]||0:void 0,args:rt},St=rt[0];rt[0]=function(){try{return St.apply(this,arguments)}finally{dt.isPeriodic||("number"==typeof dt.handleId?delete Z[dt.handleId]:dt.handleId&&(dt.handleId[wa]=null))}};var At=h(J,rt[0],dt,ae,ze);if(!At)return At;var cn=At.data.handleId;return"number"==typeof cn?Z[cn]=At:cn&&(cn[wa]=At),cn&&cn.ref&&cn.unref&&"function"==typeof cn.ref&&"function"==typeof cn.unref&&(At.ref=cn.ref.bind(cn),At.unref=cn.unref.bind(cn)),"number"==typeof cn||cn?cn:At}return et.apply(j,rt)}}),X=$(j,le,function(et){return function(qe,rt){var St,dt=rt[0];"number"==typeof dt?St=Z[dt]:(St=dt&&dt[wa])||(St=dt),St&&"string"==typeof St.type?"notScheduled"!==St.state&&(St.cancelFn&&St.data.isPeriodic||0===St.runCount)&&("number"==typeof dt?delete Z[dt]:dt&&(dt[wa]=null),St.zone.cancelTask(St)):et.apply(j,rt)}})}Zone.__load_patch("legacy",function(j){var J=j[Zone.__symbol__("legacyPatch")];J&&J()}),Zone.__load_patch("queueMicrotask",function(j,J,le){le.patchMethod(j,"queueMicrotask",function(E){return function(V,X){J.current.scheduleMicroTask("queueMicrotask",X[0])}})}),Zone.__load_patch("timers",function(j){var J="set",le="clear";pl(j,J,le,"Timeout"),pl(j,J,le,"Interval"),pl(j,J,le,"Immediate")}),Zone.__load_patch("requestAnimationFrame",function(j){pl(j,"request","cancel","AnimationFrame"),pl(j,"mozRequest","mozCancel","AnimationFrame"),pl(j,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(j,J){for(var le=["alert","prompt","confirm"],E=0;E<le.length;E++)$(j,le[E],function(X,Z,ae){return function(ze,et){return J.current.run(X,j,et,ae)}})}),Zone.__load_patch("EventTarget",function(j,J,le){(function(j,J){J.patchEventPrototype(j,J)})(j,le),function(j,J){if(!Zone[J.symbol("patchEventTarget")]){for(var le=J.getGlobalObjects(),E=le.eventNames,V=le.zoneSymbolEventNames,X=le.TRUE_STR,Z=le.FALSE_STR,ae=le.ZONE_SYMBOL_PREFIX,ze=0;ze<E.length;ze++){var et=E[ze],dt=ae+(et+Z),St=ae+(et+X);V[et]={},V[et][Z]=dt,V[et][X]=St}var At=j.EventTarget;At&&At.prototype&&J.patchEventTarget(j,J,[At&&At.prototype])}}(j,le);var E=j.XMLHttpRequestEventTarget;E&&E.prototype&&le.patchEventTarget(j,le,[E.prototype])}),Zone.__load_patch("MutationObserver",function(j,J,le){_e("MutationObserver"),_e("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",function(j,J,le){_e("IntersectionObserver")}),Zone.__load_patch("FileReader",function(j,J,le){_e("FileReader")}),Zone.__load_patch("on_property",function(j,J,le){!function(j,J){if((!Q||Qe)&&!Zone[j.symbol("patchEvents")]){var le=J.__Zone_ignore_on_properties,E=[];if(we){var V=window;E=E.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var X=function(){try{var j=M.navigator.userAgent;if(-1!==j.indexOf("MSIE ")||-1!==j.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:V,ignoreProperties:["error"]}]:[];ut(V,an(V),le&&le.concat(X),e(V))}E=E.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var Z=0;Z<E.length;Z++){var ae=J[E[Z]];ae&&ae.prototype&&ut(ae.prototype,an(ae.prototype),le)}}}(le,j)}),Zone.__load_patch("customElements",function(j,J,le){!function(j,J){var le=J.getGlobalObjects();(le.isBrowser||le.isMix)&&j.customElements&&"customElements"in j&&J.patchCallbacks(J,j.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(j,le)}),Zone.__load_patch("XHR",function(j,J){!function(et){var qe=et.XMLHttpRequest;if(qe){var rt=qe.prototype,St=rt[s],At=rt[l];if(!St){var cn=et.XMLHttpRequestEventTarget;if(cn){var qi=cn.prototype;St=qi[s],At=qi[l]}}var yi="readystatechange",pn="scheduled",ti=$(rt,"open",function(){return function(Pn,_i){return Pn[E]=0==_i[2],Pn[Z]=_i[1],ti.apply(Pn,_i)}}),Qn=m("fetchTaskAborting"),zt=m("fetchTaskScheduling"),Bi=$(rt,"send",function(){return function(Pn,_i){if(!0===J.current[zt]||Pn[E])return Bi.apply(Pn,_i);var On={target:Pn,url:Pn[Z],isPeriodic:!1,args:_i,aborted:!1},cr=h("XMLHttpRequest.send",Et,On,Rn,gi);Pn&&!0===Pn[ae]&&!On.aborted&&cr.state===pn&&cr.invoke()}}),_n=$(rt,"abort",function(){return function(Pn,_i){var On=function(Pn){return Pn[le]}(Pn);if(On&&"string"==typeof On.type){if(null==On.cancelFn||On.data&&On.data.aborted)return;On.zone.cancelTask(On)}else if(!0===J.current[Qn])return _n.apply(Pn,_i)}})}function Rn(Pn){var _i=Pn.data,On=_i.target;On[X]=!1,On[ae]=!1;var cr=On[V];St||(St=On[s],At=On[l]),cr&&At.call(On,yi,cr);var ir=On[V]=function(){if(On.readyState===On.DONE)if(!_i.aborted&&On[X]&&Pn.state===pn){var yr=On[J.__symbol__("loadfalse")];if(0!==On.status&&yr&&yr.length>0){var dr=Pn.invoke;Pn.invoke=function(){for(var ft=On[J.__symbol__("loadfalse")],me=0;me<ft.length;me++)ft[me]===Pn&&ft.splice(me,1);!_i.aborted&&Pn.state===pn&&dr.call(Pn)},yr.push(Pn)}else Pn.invoke()}else!_i.aborted&&!1===On[X]&&(On[ae]=!0)};return St.call(On,yi,ir),On[le]||(On[le]=Pn),Bi.apply(On,_i.args),On[X]=!0,Pn}function Et(){}function gi(Pn){var _i=Pn.data;return _i.aborted=!0,_n.apply(_i.target,_i.args)}}(j);var le=m("xhrTask"),E=m("xhrSync"),V=m("xhrListener"),X=m("xhrScheduled"),Z=m("xhrURL"),ae=m("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(j){j.navigator&&j.navigator.geolocation&&function(j,J){for(var le=j.constructor.name,E=function(X){var et,qe,Z=J[X],ae=j[Z];if(ae){if(!B(n(j,Z)))return"continue";j[Z]=(qe=function(){return et.apply(this,R(arguments,le+"."+Z))},pe(qe,et=ae),qe)}},V=0;V<J.length;V++)E(V)}(j.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(j,J){function le(E){return function(V){oe(j,E).forEach(function(Z){var ae=j.PromiseRejectionEvent;if(ae){var ze=new ae(E,{promise:V.promise,reason:V.rejection});Z.invoke(ze)}})}}j.PromiseRejectionEvent&&(J[m("unhandledPromiseRejectionHandler")]=le("unhandledrejection"),J[m("rejectionHandledHandler")]=le("rejectionhandled"))})},"function"==typeof define&&define.amd?define(n):n()});function mn(n){return"function"==typeof n}function Rm(n){let e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var iC=Rm(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=e});function Op(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var En=class{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(mn(i))try{i()}catch(o){t=o instanceof iC?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{e4(o)}catch(a){t=t??[],a instanceof iC?t=[...t,...a.errors]:t.push(a)}}if(t)throw new iC(t)}}add(t){var e;if(t&&t!==this)if(this.closed)e4(t);else{if(t instanceof En){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&Op(e,t)}remove(t){let{_finalizers:e}=this;e&&Op(e,t),t instanceof En&&t._removeParent(this)}};En.EMPTY=(()=>{let n=new En;return n.closed=!0,n})();var LA=En.EMPTY;function rC(n){return n instanceof En||n&&"closed"in n&&mn(n.remove)&&mn(n.add)&&mn(n.unsubscribe)}function e4(n){mn(n)?n():n.unsubscribe()}var ml={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Pm={setTimeout(n,t,...e){let{delegate:i}=Pm;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Pm;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function oC(n){Pm.setTimeout(()=>{let{onUnhandledError:t}=ml;if(!t)throw n;t(n)})}function fl(){}var t4=BA("C",void 0,void 0);function BA(n,t,e){return{kind:n,value:t,error:e}}var Fp=null;function km(n){if(ml.useDeprecatedSynchronousErrorHandling){let t=!Fp;if(t&&(Fp={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Fp;if(Fp=null,e)throw i}}else n()}var Np=class extends En{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,rC(t)&&t.add(this)):this.destination=ere}static create(t,e,i){return new gl(t,e,i)}next(t){this.isStopped?HA(BA("N",t,void 0),this):this._next(t)}error(t){this.isStopped?HA(BA("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?HA(t4,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Jie=Function.prototype.bind;function VA(n,t){return Jie.call(n,t)}var gl=class extends Np{constructor(t,e,i){let r;if(super(),mn(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&ml.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&VA(t.next,o),error:t.error&&VA(t.error,o),complete:t.complete&&VA(t.complete,o)}):r=t}this.destination=new class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){aC(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){aC(i)}else aC(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){aC(e)}}}(r)}};function aC(n){ml.useDeprecatedSynchronousErrorHandling?function(n){ml.useDeprecatedSynchronousErrorHandling&&Fp&&(Fp.errorThrown=!0,Fp.error=n)}(n):oC(n)}function HA(n,t){let{onStoppedNotification:e}=ml;e&&Pm.setTimeout(()=>e(n,t))}var ere={closed:!0,next:fl,error:function(n){throw n},complete:fl},Om="function"==typeof Symbol&&Symbol.observable||"@@observable";function sa(n){return n}function jA(n){return 0===n.length?sa:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var Kt=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=function(n){return n&&n instanceof Np||function(n){return n&&mn(n.next)&&mn(n.error)&&mn(n.complete)}(n)&&rC(n)}(e)?e:new gl(e,i,r);return km(()=>{let{operator:a,source:s}=this;o.add(a?a.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=o4(i))((r,o)=>{let a=new gl({next:s=>{try{e(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:r});this.subscribe(a)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[Om](){return this}pipe(...e){return jA(e)(this)}toPromise(e){return new(e=o4(e))((i,r)=>{let o;this.subscribe(a=>o=a,a=>r(a),()=>i(o))})}}return n.create=t=>new n(t),n})();function o4(n){var t;return null!==(t=n??ml.Promise)&&void 0!==t?t:Promise}function GA(n){return mn(n?.lift)}function Yt(n){return t=>{if(GA(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ht(n,t,e,i,r){return new T_(n,t,e,i,r)}var WA,T_=class extends Np{constructor(t,e,i,r,o,a){super(t),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=e?function(s){try{e(s)}catch(l){t.error(l)}}:super._next,this._error=r?function(s){try{r(s)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(s){t.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}},D_=class extends Kt{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,GA(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new En;let e=this.getSubject();t.add(this.source.subscribe(Ht(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=En.EMPTY)}return t}refCount(){return Yt((n,t)=>{let e=null;n._refCount++;let i=Ht(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);let r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})(this)}},Fm={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Fm;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new En(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Fm;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Fm;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},s4=Rm(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),Ee=(()=>{class n extends Kt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new sC(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new s4}next(e){km(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){km(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){km(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:r,observers:o}=this;return i||r?LA:(this.currentObservers=null,o.push(e),new En(()=>{this.currentObservers=null,Op(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new Kt;return e.source=this,e}}return n.create=(t,e)=>new sC(t,e),n})(),sC=class extends Ee{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:LA}},xr=class extends Ee{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}},I_={now:()=>(I_.delegate||Date).now(),delegate:void 0},Lp=class extends Ee{constructor(t=1/0,e=1/0,i=I_){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:a}=this;e||(i.push(t),!r&&i.push(o.now()+a)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let a=0;a<o.length&&!t.closed;a+=i?1:2)t.next(o[a]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*t;if(t<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let a=e.now(),s=0;for(let l=1;l<i.length&&i[l]<=a;l+=2)s=l;s&&i.splice(0,s+1)}}},lC=class extends En{constructor(t,e){super()}schedule(t,e=0){return this}},A_={setInterval(n,t,...e){let{delegate:i}=A_;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=A_;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},Jl=class extends lC{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var i;if(this.closed)return this;this.state=t;let r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return A_.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;null!=e&&A_.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,Op(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},ire=1,qA={};function l4(n){return n in qA&&(delete qA[n],!0)}var c4={setImmediate(n){let t=ire++;return qA[t]=!0,WA||(WA=Promise.resolve()),WA.then(()=>l4(t)&&n()),t},clearImmediate(n){l4(n)}},{setImmediate:rre,clearImmediate:ore}=c4,R_={setImmediate(...n){let{delegate:t}=R_;return(t?.setImmediate||rre)(...n)},clearImmediate(n){let{delegate:t}=R_;return(t?.clearImmediate||ore)(n)},delegate:void 0},Qd=class{constructor(t,e=Qd.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};Qd.now=I_.now;var $l=class extends Qd{constructor(t,e=Qd.now){super(t,e),this.actions=[],this._active=!1}flush(t){let i,{actions:e}=this;if(this._active)e.push(t);else{this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}},Nm=new class extends $l{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let r,{actions:i}=this;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class extends Jl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=R_.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(R_.clearImmediate(e),t._scheduled=void 0)}}),Qc=new $l(Jl),d4=Qc,XA=new class extends $l{}(class extends Jl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!=i&&i>0||null==i&&this.delay>0?super.requestAsyncId(t,e,i):(t.flush(this),0)}}),YA=new class extends $l{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let r,{actions:i}=this;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class extends Jl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Fm.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(Fm.cancelAnimationFrame(e),t._scheduled=void 0)}}),Kr=new Kt(n=>n.complete());function fC(n){return n&&mn(n.schedule)}function QA(n){return n[n.length-1]}function ec(n){return mn(QA(n))?n.pop():void 0}function tc(n){return fC(QA(n))?n.pop():void 0}var B4=$V(L4(),1),{__decorate:V4,__awaiter:H4,__await:vC,__asyncGenerator:z4,__asyncValues:U4}=B4.default,Bm=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function yC(n){return mn(n?.then)}function xC(n){return mn(n[Om])}function CC(n){return Symbol.asyncIterator&&mn(n?.[Symbol.asyncIterator])}function MC(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}var wC="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function SC(n){return mn(n?.[wC])}function EC(n){return z4(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield vC(e.read());if(r)return yield vC(void 0);yield yield vC(i)}}finally{e.releaseLock()}})}function TC(n){return mn(n?.getReader)}function ci(n){if(n instanceof Kt)return n;if(null!=n){if(xC(n))return function(n){return new Kt(t=>{let e=n[Om]();if(mn(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(Bm(n))return function(n){return new Kt(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}(n);if(yC(n))return function(n){return new Kt(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,oC)})}(n);if(CC(n))return j4(n);if(SC(n))return function(n){return new Kt(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(TC(n))return function(n){return j4(EC(n))}(n)}throw MC(n)}function j4(n){return new Kt(t=>{(function(n,t){var e,i,r,o;return H4(this,void 0,void 0,function*(){try{for(e=U4(n);!(i=yield e.next()).done;)if(t.next(i.value),t.closed)return}catch(a){r={error:a}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})})(n,t).catch(e=>t.error(e))})}function Ea(n,t,e,i=0,r=!1){let o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function Bp(n,t=0){return Yt((e,i)=>{e.subscribe(Ht(i,r=>Ea(i,n,()=>i.next(r),t),()=>Ea(i,n,()=>i.complete(),t),r=>Ea(i,n,()=>i.error(r),t)))})}function DC(n,t=0){return Yt((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function IC(n,t){if(!n)throw new Error("Iterable cannot be null");return new Kt(e=>{Ea(e,t,()=>{let i=n[Symbol.asyncIterator]();Ea(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Jr(n,t){return t?function(n,t){if(null!=n){if(xC(n))return function(n,t){return ci(n).pipe(DC(t),Bp(t))}(n,t);if(Bm(n))return function(n,t){return new Kt(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(yC(n))return function(n,t){return ci(n).pipe(DC(t),Bp(t))}(n,t);if(CC(n))return IC(n,t);if(SC(n))return function(n,t){return new Kt(e=>{let i;return Ea(e,t,()=>{i=n[wC](),Ea(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(a){return void e.error(a)}o?e.complete():e.next(r)},0,!0)}),()=>mn(i?.return)&&i.return()})}(n,t);if(TC(n))return function(n,t){return IC(EC(n),t)}(n,t)}throw MC(n)}(n,t):ci(n)}function $t(...n){return Jr(n,tc(n))}function _l(n,t){let e=mn(n)?n:()=>n,i=r=>r.error(e());return new Kt(t?r=>t.schedule(i,0,r):i)}var As=class{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){return KA(this,t)}do(t,e,i){let{kind:r,value:o,error:a}=this;return"N"===r?t?.(o):"E"===r?e?.(a):i?.()}accept(t,e,i){var r;return mn(null===(r=t)||void 0===r?void 0:r.next)?this.observe(t):this.do(t,e,i)}toObservable(){let{kind:t,value:e,error:i}=this,r="N"===t?$t(e):"E"===t?_l(()=>i):"C"===t?Kr:0;if(!r)throw new TypeError(`Unexpected notification kind ${t}`);return r}static createNext(t){return new As("N",t)}static createError(t){return new As("E",void 0,t)}static createComplete(){return As.completeNotification}};function KA(n,t){var e,i,r;let{kind:o,value:a,error:s}=n;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(e=t.next)||void 0===e||e.call(t,a):"E"===o?null===(i=t.error)||void 0===i||i.call(t,s):null===(r=t.complete)||void 0===r||r.call(t)}function P_(n){return!!n&&(n instanceof Kt||mn(n.lift)&&mn(n.subscribe))}As.completeNotification=new As("C");var Vm=Rm(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function AC(n,t){let e="object"==typeof t;return new Promise((i,r)=>{let o=new gl({next:a=>{i(a),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new Vm)}});n.subscribe(o)})}function q(n,t){return Yt((e,i)=>{let r=0;e.subscribe(Ht(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:hre}=Array;function Zd(n){return q(t=>function(n,t){return hre(t)?n(...t):n(t)}(n,t))}var{isArray:fre}=Array,{getPrototypeOf:gre,prototype:_re,keys:bre}=Object;function RC(n){if(1===n.length){let t=n[0];if(fre(t))return{args:t,keys:null};if(function(n){return n&&"object"==typeof n&&gre(n)===_re}(t)){let e=bre(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function PC(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function In(...n){let t=tc(n),e=ec(n),{args:i,keys:r}=RC(n);if(0===i.length)return Jr([],t);let o=new Kt(JA(i,t,r?a=>PC(r,a):sa));return e?o.pipe(Zd(e)):o}function JA(n,t,e=sa){return i=>{K4(t,()=>{let{length:r}=n,o=new Array(r),a=r,s=r;for(let l=0;l<r;l++)K4(t,()=>{let c=Jr(n[l],t),d=!1;c.subscribe(Ht(i,u=>{o[l]=u,d||(d=!0,s--),s||i.next(e(o.slice()))},()=>{--a||i.complete()}))},i)},i)}}function K4(n,t,e){n?Ea(e,n,t):t()}function xn(n,t,e=1/0){return mn(t)?xn((i,r)=>q((o,a)=>t(i,o,r,a))(ci(n(i,r))),e):("number"==typeof t&&(e=t),Yt((i,r)=>function(n,t,e,i,r,o,a,s){let l=[],c=0,d=0,u=!1,p=()=>{u&&!l.length&&!c&&t.complete()},h=_=>c<i?m(_):l.push(_),m=_=>{c++;let M=!1;ci(e(_,d++)).subscribe(Ht(t,y=>{t.next(y)},()=>{M=!0},void 0,()=>{if(M)try{for(c--;l.length&&c<i;){let y=l.shift();m(y)}p()}catch(y){t.error(y)}}))};return n.subscribe(Ht(t,h,()=>{u=!0,p()})),()=>{}}(i,r,n,e)))}function kC(n=1/0){return xn(sa,n)}function Kd(...n){return kC(1)(Jr(n,tc(n)))}function is(n){return new Kt(t=>{ci(n()).subscribe(t)})}function Co(...n){let t=ec(n),{args:e,keys:i}=RC(n),r=new Kt(o=>{let{length:a}=e;if(!a)return void o.complete();let s=new Array(a),l=a,c=a;for(let d=0;d<a;d++){let u=!1;ci(e[d]).subscribe(Ht(o,p=>{u||(u=!0,c--),s[d]=p},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(i?PC(i,s):s),o.complete())}))}});return t?r.pipe(Zd(t)):r}var yre=["addListener","removeListener"],xre=["addEventListener","removeEventListener"],Cre=["on","off"];function Ei(n,t,e,i){if(mn(e)&&(i=e,e=void 0),i)return Ei(n,t,e).pipe(Zd(i));let[r,o]=function(n){return mn(n.addEventListener)&&mn(n.removeEventListener)}(n)?xre.map(a=>s=>n[a](t,s,e)):function(n){return mn(n.addListener)&&mn(n.removeListener)}(n)?yre.map(eH(n,t)):function(n){return mn(n.on)&&mn(n.off)}(n)?Cre.map(eH(n,t)):[];if(!r&&Bm(n))return xn(a=>Ei(a,t,e))(ci(n));if(!r)throw new TypeError("Invalid event target");return new Kt(a=>{let s=(...l)=>a.next(1<l.length?l:l[0]);return r(s),()=>o(s)})}function eH(n,t){return e=>i=>n[e](t,i)}function rs(n=0,t,e=d4){let i=-1;return null!=t&&(fC(t)?e=t:i=t),new Kt(r=>{let o=function(n){return n instanceof Date&&!isNaN(n)}(n)?+n-e.now():n;o<0&&(o=0);let a=0;return e.schedule(function(){r.closed||(r.next(a++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function tn(...n){let t=tc(n),e=function(n,t){return"number"==typeof QA(n)?n.pop():1/0}(n),i=n;return i.length?1===i.length?ci(i[0]):kC(e)(Jr(i,t)):Kr}var{isArray:Ere}=Array;function OC(n){return 1===n.length&&Ere(n[0])?n[0]:n}function Oe(n,t){return Yt((e,i)=>{let r=0;e.subscribe(Ht(i,o=>n.call(t,o,r++)&&i.next(o)))})}function nc(n,t=Qc){return function(n){return Yt((t,e)=>{let i=!1,r=null,o=null,a=!1,s=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,e.next(c)}a&&e.complete()},l=()=>{o=null,a&&e.complete()};t.subscribe(Ht(e,c=>{i=!0,r=c,o||ci(n()).subscribe(o=Ht(e,s,l))},()=>{a=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>rs(n,t))}function co(n){return Yt((t,e)=>{let o,i=null,r=!1;i=t.subscribe(Ht(e,void 0,void 0,a=>{o=ci(n(a,co(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function tR(...n){let t=ec(n);return t?function(...n){return jA(n)}(tR(...n),Zd(t)):Yt((e,i)=>{JA([e,...OC(n)])(i)})}function Vi(...n){return tR(...n)}function Cr(n,t=Qc){return Yt((e,i)=>{let r=null,o=null,a=null,s=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=a+n,d=t.now();if(d<c)return r=this.schedule(void 0,c-d),void i.add(r);s()}e.subscribe(Ht(i,c=>{o=c,a=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{s(),i.complete()},void 0,()=>{o=r=null}))})}function Lt(n){return n<=0?()=>Kr:Yt((t,e)=>{let i=0;t.subscribe(Ht(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function k_(){return Yt((n,t)=>{n.subscribe(Ht(t,fl))})}function Hm(n,t){return t?e=>Kd(t.pipe(Lt(1),k_()),e.pipe(Hm(n))):xn((e,i)=>n(e,i).pipe(Lt(1),function(n){return q(()=>n)}(e)))}function Rs(n,t=Qc){let e=rs(n,t);return Hm(()=>e)}function ri(n,t=sa){return n=n??Tre,Yt((e,i)=>{let r,o=!0;e.subscribe(Ht(i,a=>{let s=t(a);(o||!n(r,s))&&(o=!1,r=s,i.next(a))}))})}function Tre(n,t){return n===t}function oH(n=Dre){return Yt((t,e)=>{let i=!1;t.subscribe(Ht(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function Dre(){return new Vm}function NC(n,t){return t?e=>e.pipe(NC((i,r)=>ci(n(i,r)).pipe(q((o,a)=>t(i,o,r,a))))):Yt((e,i)=>{let r=0,o=null,a=!1;e.subscribe(Ht(i,s=>{o||(o=Ht(i,void 0,()=>{o=null,a&&i.complete()}),ci(n(s,r++)).subscribe(o))},()=>{a=!0,!o&&i.complete()}))})}function zm(n,t){let e=arguments.length>=2;return i=>i.pipe(n?Oe((r,o)=>n(r,o,i)):sa,Lt(1),e?function(n){return Yt((t,e)=>{let i=!1;t.subscribe(Ht(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}(t):oH(()=>new Vm))}function BC(n,t,e,i){return Yt((r,o)=>{let a;t&&"function"!=typeof t?({duration:e,element:a,connector:i}=t):a=t;let s=new Map,l=m=>{s.forEach(m),m(o)},c=m=>l(_=>_.error(m)),d=0,u=!1,p=new T_(o,m=>{try{let _=n(m),M=s.get(_);if(!M){s.set(_,M=i?i():new Ee);let y=function(m,_){let M=new Kt(y=>{d++;let x=_.subscribe(y);return()=>{x.unsubscribe(),0==--d&&u&&p.unsubscribe()}});return M.key=m,M}(_,M);if(o.next(y),e){let x=Ht(M,()=>{M.complete(),x?.unsubscribe()},void 0,void 0,()=>s.delete(_));p.add(ci(e(y)).subscribe(x))}}M.next(a?a(m):m)}catch(_){c(_)}},()=>l(m=>m.complete()),c,()=>s.clear(),()=>(u=!0,0===d));r.subscribe(p)})}function Ta(n={}){let{connector:t=(()=>new Ee),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let a,s,l,c=0,d=!1,u=!1,p=()=>{s?.unsubscribe(),s=void 0},h=()=>{p(),a=l=void 0,d=u=!1},m=()=>{let _=a;h(),_?.unsubscribe()};return Yt((_,M)=>{c++,!u&&!d&&p();let y=l=l??t();M.add(()=>{c--,0===c&&!u&&!d&&(s=lR(m,r))}),y.subscribe(M),!a&&c>0&&(a=new gl({next:x=>y.next(x),error:x=>{u=!0,p(),s=lR(h,e,x),y.error(x)},complete:()=>{d=!0,p(),s=lR(h,i),y.complete()}}),ci(_).subscribe(a))})(o)}}function lR(n,t,...e){if(!0===t)return void n();if(!1===t)return;let i=new gl({next:()=>{i.unsubscribe(),n()}});return t(...e).subscribe(i)}function Da(n,t,e){let i,r=!1;return n&&"object"==typeof n?({bufferSize:i=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=n):i=n??1/0,Ta({connector:()=>new Lp(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function os(n){return Oe((t,e)=>n<=e)}function kn(...n){let t=tc(n);return Yt((e,i)=>{(t?Kd(n,e,t):Kd(n,e)).subscribe(i)})}function Jn(n,t){return Yt((e,i)=>{let r=null,o=0,a=!1,s=()=>a&&!r&&i.complete();e.subscribe(Ht(i,l=>{r?.unsubscribe();let c=0,d=o++;ci(n(l,d)).subscribe(r=Ht(i,u=>i.next(t?t(l,u,d,c++):u),()=>{r=null,s()}))},()=>{a=!0,s()}))})}function it(n){return Yt((t,e)=>{ci(n).subscribe(Ht(e,()=>e.complete(),fl)),!e.closed&&t.subscribe(e)})}function O_(n,t=!1){return Yt((e,i)=>{let r=0;e.subscribe(Ht(i,o=>{let a=n(o,r++);(a||t)&&i.next(o),!a&&i.complete()}))})}function Dt(n,t,e){let i=mn(n)||t||e?{next:n,error:t,complete:e}:n;return i?Yt((r,o)=>{var a;null===(a=i.subscribe)||void 0===a||a.call(i);let s=!0;r.subscribe(Ht(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;s=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;s=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.error(l)},()=>{var l,c;s&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):sa}var cR={leading:!0,trailing:!1};function ic(n,t=Qc,e=cR){let i=rs(n,t);return function(n,t=cR){return Yt((e,i)=>{let{leading:r,trailing:o}=t,a=!1,s=null,l=null,c=!1,d=()=>{l?.unsubscribe(),l=null,o&&(h(),c&&i.complete())},u=()=>{l=null,c&&i.complete()},p=m=>l=ci(n(m)).subscribe(Ht(i,d,u)),h=()=>{if(a){a=!1;let m=s;s=null,i.next(m),!c&&p(m)}};e.subscribe(Ht(i,m=>{a=!0,s=m,(!l||l.closed)&&(r?h():p(m))},()=>{c=!0,(!(o&&a&&l)||l.closed)&&i.complete()}))})}(()=>i,e)}function It(...n){let t=ec(n);return Yt((e,i)=>{let r=n.length,o=new Array(r),a=n.map(()=>!1),s=!1;for(let l=0;l<r;l++)ci(n[l]).subscribe(Ht(i,c=>{o[l]=c,!s&&!a[l]&&(a[l]=!0,(s=a.every(sa))&&(a=null))},fl));e.subscribe(Ht(i,l=>{if(s){let c=[l,...o];i.next(t?t(...c):c)}}))})}function $i(n){for(let t in n)if(n[t]===$i)return t;throw Error("Could not find renamed property on target object.")}function dR(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function po(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(po).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;let t=n.toString();if(null==t)return""+t;let e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function RR(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}var Ire=$i({__forward_ref__:$i});function Wn(n){return n.__forward_ref__=Wn,n.toString=function(){return po(this())},n}function Ai(n){return t5(n)?n():n}function t5(n){return"function"==typeof n&&n.hasOwnProperty(Ire)&&n.__forward_ref__===Wn}function n5(n){return n&&!!n.\u0275providers}var ob="https://g.co/ng/security#xss",xt=class extends Error{constructor(t,e){super(function(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}};function jn(n){return"string"==typeof n?n:null==n?"":String(n)}function BP(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():jn(n)}function VP(n,t){throw new xt(-201,!1)}function i5(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}function ue(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function H(n){return{providers:n.providers||[],imports:n.imports||[]}}function HP(n){return sH(n,$C)||sH(n,r5)}function sH(n,t){return n.hasOwnProperty(t)?n[t]:null}function lH(n){return n&&(n.hasOwnProperty(PR)||n.hasOwnProperty(Ore))?n[PR]:null}var kR,$C=$i({"\u0275prov":$i}),PR=$i({"\u0275inj":$i}),r5=$i({ngInjectableDef:$i}),Ore=$i({ngInjectorDef:$i}),Ci=(()=>{return(n=Ci||(Ci={}))[n.Default=0]="Default",n[n.Host=1]="Host",n[n.Self=2]="Self",n[n.SkipSelf=4]="SkipSelf",n[n.Optional=8]="Optional",Ci;var n})();function Ps(n){let t=kR;return kR=n,t}function o5(n,t,e){let i=HP(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&Ci.Optional?null:void 0!==t?t:void VP(po(n))}var L_,zr=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),X_={},OR="__NG_DI_FLAG__",eM="ngTempTokenPath",Lre="ngTokenPath",Bre=/\n/gm,Vre="\u0275",cH="__source";function Um(n){let t=L_;return L_=n,t}function Hre(n,t=Ci.Default){if(void 0===L_)throw new xt(-203,!1);return null===L_?o5(n,void 0,t):L_.get(n,t&Ci.Optional?null:void 0,t)}function O(n,t=Ci.Default){return(kR||Hre)(Ai(n),t)}function a5(n){throw new xt(202,!1)}function $n(n,t=Ci.Default){return O(n,SM(t))}function SM(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function FR(n){let t=[];for(let e=0;e<n.length;e++){let i=Ai(n[e]);if(Array.isArray(i)){if(0===i.length)throw new xt(900,!1);let r,o=Ci.Default;for(let a=0;a<i.length;a++){let s=i[a],l=zre(s);"number"==typeof l?-1===l?r=s.token:o|=l:r=s}t.push(O(r,o))}else t.push(O(i))}return t}function ab(n,t){return n[OR]=t,n.prototype[OR]=t,n}function zre(n){return n[OR]}function ru(n){return{toString:n}.toString()}var B_=(()=>{return(n=B_||(B_={}))[n.OnPush=0]="OnPush",n[n.Default=1]="Default",B_;var n})(),as=(()=>{return(n=as||(as={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",as;var n})(),Zc={},ji=[],EM=$i({"\u0275cmp":$i}),zP=$i({"\u0275dir":$i}),UP=$i({"\u0275pipe":$i}),s5=$i({"\u0275mod":$i}),Kc=$i({"\u0275fac":$i}),V_=$i({__NG_ELEMENT_ID__:$i}),Gre=0;function P(n){return ru(()=>{let t=c5(n),e={...t,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===B_.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||as.Emulated,id:"c"+Gre++,styles:n.styles||ji,_:null,schemas:n.schemas||null,tView:null};d5(e);let i=n.dependencies;return e.directiveDefs=tM(i,!1),e.pipeDefs=tM(i,!0),e})}function sb(n,t,e){let i=n.\u0275cmp;i.directiveDefs=tM(t,!1),i.pipeDefs=tM(e,!0)}function Wre(n){return Os(n)||eu(n)}function qre(n){return null!==n}function z(n){return ru(()=>({type:n.type,bootstrap:n.bootstrap||ji,declarations:n.declarations||ji,imports:n.imports||ji,exports:n.exports||ji,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function dH(n,t){if(null==n)return Zc;let e={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}function Me(n){return ru(()=>{let t=c5(n);return d5(t),t})}function rf(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Os(n){return n[EM]||null}function eu(n){return n[zP]||null}function tu(n){return n[UP]||null}function l5(n){let t=Os(n)||eu(n)||tu(n);return null!==t&&t.standalone}function Zm(n,t){let e=n[s5]||null;if(!e&&!0===t)throw new Error(`Type ${po(n)} does not have '\u0275mod' property.`);return e}function c5(n){let t={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||ji,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:dH(n.inputs,t),outputs:dH(n.outputs)}}function d5(n){n.features?.forEach(t=>t(n))}function tM(n,t){if(!n)return null;let e=t?tu:Wre;return()=>("function"==typeof n?n():n).map(i=>e(i)).filter(qre)}var ou=0,Fn=1,di=2,jr=3,yl=4,zp=5,Aa=6,Y_=7,Ra=8,nM=9,iM=10,ui=11,NR=12,Q_=13,uH=14,of=15,xl=16,lb=17,jm=18,oc=19,TM=20,u5=21,Gr=22,jP=1,p5=2,GP=7,rM=8,Km=9,Ia=10;function Up(n){return Array.isArray(n)&&"object"==typeof n[jP]}function $c(n){return Array.isArray(n)&&!0===n[jP]}function WP(n){return 0!=(4&n.flags)}function DM(n){return n.componentOffset>-1}function IM(n){return 1==(1&n.flags)}function Cl(n){return!!n.template}function Xre(n){return 0!=(256&n[di])}function Gp(n,t){return n.hasOwnProperty(Kc)?n[Kc]:null}var LR=class{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function qt(){return h5}function h5(n){return n.type.prototype.ngOnChanges&&(n.setInput=Qre),Yre}function Yre(){let n=f5(this),t=n?.current;if(t){let e=n.previous;if(e===Zc)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Qre(n,t,e,i){let r=this.declaredInputs[e],o=f5(n)||function(n,t){return n[m5]=t}(n,{previous:Zc,current:null}),a=o.current||(o.current={}),s=o.previous,l=s[r];a[r]=new LR(l&&l.currentValue,t,s===Zc),n[i]=t}qt.ngInherit=!0;var m5="__ngSimpleChanges__";function f5(n){return n[m5]||null}var ks=function(n,t,e){},g5="svg",_5="math";function Ls(n){for(;Array.isArray(n);)n=n[ou];return n}function AM(n,t){return Ls(t[n])}function ss(n,t){return Ls(t[n.index])}function b5(n,t){return n.data[t]}function af(n,t){return n[t]}function ed(n,t){let e=t[n];return Up(e)?e:e[ou]}function oM(n){return 64==(64&n[di])}function nu(n,t){return null==t?null:n[t]}function v5(n){n[jm]=0}function qP(n,t){n[zp]+=t;let e=n,i=n[jr];for(;null!==i&&(1===t&&1===e[zp]||-1===t&&0===e[zp]);)i[zp]+=t,e=i,i=i[jr]}var Gn={lFrame:T5(null),bindingsEnabled:!0};function y5(){return Gn.bindingsEnabled}function Ze(){return Gn.lFrame.lView}function Ti(){return Gn.lFrame.tView}function ne(n){return Gn.lFrame.contextLView=n,n[Ra]}function ie(n){return Gn.lFrame.contextLView=null,n}function Lo(){let n=x5();for(;null!==n&&64===n.type;)n=n.parent;return n}function x5(){return Gn.lFrame.currentTNode}function Z_(){let n=Gn.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function ac(n,t){let e=Gn.lFrame;e.currentTNode=n,e.isParent=t}function XP(){return Gn.lFrame.isParent}function YP(){Gn.lFrame.isParent=!1}function ca(){let n=Gn.lFrame,t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function td(){return Gn.lFrame.bindingIndex}function C5(n){return Gn.lFrame.bindingIndex=n}function sf(){return Gn.lFrame.bindingIndex++}function nd(n){let t=Gn.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function M5(n){Gn.lFrame.inI18n=n}function soe(n,t){let e=Gn.lFrame;e.bindingIndex=e.bindingRootIndex=n,BR(t)}function BR(n){Gn.lFrame.currentDirectiveIndex=n}function QP(n){let t=Gn.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function w5(){return Gn.lFrame.currentQueryIndex}function ZP(n){Gn.lFrame.currentQueryIndex=n}function coe(n){let t=n[Fn];return 2===t.type?t.declTNode:1===t.type?n[Aa]:null}function S5(n,t,e){if(e&Ci.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&Ci.Host||(r=coe(o),null===r||(o=o[of],10&r.type))););if(null===r)return!1;t=r,n=o}let i=Gn.lFrame=E5();return i.currentTNode=t,i.lView=n,!0}function KP(n){let t=E5(),e=n[Fn];Gn.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function E5(){let n=Gn.lFrame,t=null===n?null:n.child;return null===t?T5(n):t}function T5(n){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function D5(){let n=Gn.lFrame;return Gn.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var I5=D5;function JP(){let n=D5();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function da(){return Gn.lFrame.selectedIndex}function Wp(n){Gn.lFrame.selectedIndex=n}function Pr(){let n=Gn.lFrame;return b5(n.tView,n.selectedIndex)}function qn(){Gn.lFrame.currentNamespace=g5}function ua(){Gn.lFrame.currentNamespace=null}function RM(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:a,ngAfterContentChecked:s,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;a&&(n.contentHooks??(n.contentHooks=[])).push(-e,a),s&&((n.contentHooks??(n.contentHooks=[])).push(e,s),(n.contentCheckHooks??(n.contentCheckHooks=[])).push(e,s)),l&&(n.viewHooks??(n.viewHooks=[])).push(-e,l),c&&((n.viewHooks??(n.viewHooks=[])).push(e,c),(n.viewCheckHooks??(n.viewCheckHooks=[])).push(e,c)),null!=d&&(n.destroyHooks??(n.destroyHooks=[])).push(e,d)}}function GC(n,t,e){A5(n,t,3,e)}function WC(n,t,e,i){(3&n[di])===e&&A5(n,t,e,i)}function uR(n,t){let e=n[di];(3&e)===t&&(e&=2047,e+=1,n[di]=e)}function A5(n,t,e,i){let o=i??-1,a=t.length-1,s=0;for(let l=void 0!==i?65535&n[jm]:0;l<a;l++)if("number"==typeof t[l+1]){if(s=t[l],null!=i&&s>=i)break}else t[l]<0&&(n[jm]+=65536),(s<o||-1==o)&&(goe(n,e,t,l),n[jm]=(4294901760&n[jm])+l+2),l++}function goe(n,t,e,i){let r=e[i]<0,o=e[i+1],s=n[r?-e[i]:e[i]];if(r){if(n[di]>>11<n[jm]>>16&&(3&n[di])===t){n[di]+=2048,ks(4,s,o);try{o.call(s)}finally{ks(5,s,o)}}}else{ks(4,s,o);try{o.call(s)}finally{ks(5,s,o)}}}var Qm=-1,qp=class{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}};function VR(n,t,e){let i=0;for(;i<e.length;){let r=e[i];if("number"==typeof r){if(0!==r)break;i++;let o=e[i++],a=e[i++],s=e[i++];n.setAttribute(t,a,s,o)}else{let o=r,a=e[++i];yoe(o)?n.setProperty(t,o,a):n.setAttribute(t,o,a),i++}}return i}function R5(n){return 3===n||4===n||6===n}function yoe(n){return 64===n.charCodeAt(0)}function K_(n,t){if(null!==t&&0!==t.length)if(null===n||0===n.length)n=t.slice();else{let e=-1;for(let i=0;i<t.length;i++){let r=t[i];"number"==typeof r?e=r:0===e||hH(n,e,r,null,-1===e||2===e?t[++i]:null)}}return n}function hH(n,t,e,i,r){let o=0,a=n.length;if(-1===t)a=-1;else for(;o<n.length;){let s=n[o++];if("number"==typeof s){if(s===t){a=-1;break}if(s>t){a=o-1;break}}}for(;o<n.length;){let s=n[o];if("number"==typeof s)break;if(s===e){if(null===i)return void(null!==r&&(n[o+1]=r));if(i===n[o+1])return void(n[o+2]=r)}o++,null!==i&&o++,null!==r&&o++}-1!==a&&(n.splice(a,0,t),o=a+1),n.splice(o++,0,e),null!==i&&n.splice(o++,0,i),null!==r&&n.splice(o++,0,r)}function P5(n){return n!==Qm}function aM(n){return 32767&n}function sM(n,t){let e=function(n){return n>>16}(n),i=t;for(;e>0;)i=i[of],e--;return i}var HR=!0;function lM(n){let t=HR;return HR=n,t}var k5=255,O5=5,Moe=0,rc={};function cM(n,t){let e=F5(n,t);if(-1!==e)return e;let i=t[Fn];i.firstCreatePass&&(n.injectorIndex=t.length,pR(i.data,n),pR(t,null),pR(i.blueprint,null));let r=$P(n,t),o=n.injectorIndex;if(P5(r)){let a=aM(r),s=sM(r,t),l=s[Fn].data;for(let c=0;c<8;c++)t[o+c]=s[a+c]|l[a+c]}return t[o+8]=r,o}function pR(n,t){n.push(0,0,0,0,0,0,0,0,t)}function F5(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function $P(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=H5(r),null===i)return Qm;if(e++,r=r[of],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Qm}function zR(n,t,e){!function(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(V_)&&(i=e[V_]),null==i&&(i=e[V_]=Moe++);let r=i&k5;t.data[n+(r>>O5)]|=1<<r}(n,t,e)}function N5(n,t,e){if(e&Ci.Optional||void 0!==n)return n;VP()}function L5(n,t,e,i){if(e&Ci.Optional&&void 0===i&&(i=null),0==(e&(Ci.Self|Ci.Host))){let r=n[nM],o=Ps(void 0);try{return r?r.get(t,i,e&Ci.Optional):o5(t,i,e&Ci.Optional)}finally{Ps(o)}}return N5(i,0,e)}function B5(n,t,e,i=Ci.Default,r){if(null!==n){if(1024&t[di]){let a=function(n,t,e,i,r){let o=n,a=t;for(;null!==o&&null!==a&&1024&a[di]&&!(256&a[di]);){let s=V5(o,a,e,i|Ci.Self,rc);if(s!==rc)return s;let l=o.parent;if(!l){let c=a[u5];if(c){let d=c.get(e,rc,i);if(d!==rc)return d}l=H5(a),a=a[of]}o=l}return r}(n,t,e,i,rc);if(a!==rc)return a}let o=V5(n,t,e,i,rc);if(o!==rc)return o}return L5(t,e,i,r)}function V5(n,t,e,i,r){let o=function(n){if("string"==typeof n)return n.charCodeAt(0)||0;let t=n.hasOwnProperty(V_)?n[V_]:void 0;return"number"==typeof t?t>=0?t&k5:Doe:t}(e);if("function"==typeof o){if(!S5(t,n,i))return i&Ci.Host?N5(r,0,i):L5(t,e,i,r);try{let a=o(i);if(null!=a||i&Ci.Optional)return a;VP()}finally{I5()}}else if("number"==typeof o){let a=null,s=F5(n,t),l=Qm,c=i&Ci.Host?t[xl][Aa]:null;for((-1===s||i&Ci.SkipSelf)&&(l=-1===s?$P(n,t):t[s+8],l!==Qm&&fH(i,!1)?(a=t[Fn],s=aM(l),t=sM(l,t)):s=-1);-1!==s;){let d=t[Fn];if(mH(o,s,d.data)){let u=Eoe(s,t,e,a,i,c);if(u!==rc)return u}l=t[s+8],l!==Qm&&fH(i,t[Fn].data[s+8]===c)&&mH(o,s,t)?(a=d,s=aM(l),t=sM(l,t)):s=-1}}return r}function Eoe(n,t,e,i,r,o){let a=t[Fn],s=a.data[n+8],d=qC(s,a,e,null==i?DM(s)&&HR:i!=a&&0!=(3&s.type),r&Ci.Host&&o===s);return null!==d?Xp(t,a,d,s):rc}function qC(n,t,e,i,r){let o=n.providerIndexes,a=t.data,s=1048575&o,l=n.directiveStart,d=o>>20,p=r?s+d:n.directiveEnd;for(let h=i?s:s+d;h<p;h++){let m=a[h];if(h<l&&e===m||h>=l&&m.type===e)return h}if(r){let h=a[l];if(h&&Cl(h)&&h.type===e)return l}return null}function Xp(n,t,e,i){let r=n[e],o=t.data;if(function(n){return n instanceof qp}(r)){let a=r;a.resolving&&function(n,t){throw new xt(-200,`Circular dependency in DI detected for ${n}`)}(BP(o[e]));let s=lM(a.canSeeViewProviders);a.resolving=!0;let l=a.injectImpl?Ps(a.injectImpl):null;S5(n,i,Ci.Default);try{r=n[e]=a.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let a=h5(t);(e.preOrderHooks??(e.preOrderHooks=[])).push(n,a),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,a)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&Ps(l),lM(s),a.resolving=!1,I5()}}return r}function mH(n,t,e){return!!(e[t+(n>>O5)]&1<<n)}function fH(n,t){return!(n&Ci.Self||n&Ci.Host&&t)}var jp=class{constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return B5(this._tNode,this._lView,t,SM(i),e)}};function Doe(){return new jp(Lo(),Ze())}function Xn(n){return ru(()=>{let t=n.prototype.constructor,e=t[Kc]||UR(t),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[Kc]||UR(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function UR(n){return t5(n)?()=>{let t=UR(Ai(n));return t&&t()}:Gp(n)}function H5(n){let t=n[Fn],e=t.type;return 2===e?t.declTNode:1===e?n[Aa]:null}function Mo(n){return function(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;let e=n.attrs;if(e){let i=e.length,r=0;for(;r<i;){let o=e[r];if(R5(o))break;if(0===o)r+=2;else if("number"==typeof o)for(r++;r<i&&"string"==typeof e[r];)r++;else{if(o===t)return e[r+1];r+=2}}}return null}(Lo(),n)}var Gm="__annotations__",Wm="__parameters__",qm="__prop__metadata__";function cb(n,t,e,i,r){return ru(()=>{let o=ek(t);function a(...s){if(this instanceof a)return o.call(this,...s),this;let l=new a(...s);return function(d){return r&&r(d,...s),(d.hasOwnProperty(Gm)?d[Gm]:Object.defineProperty(d,Gm,{value:[]})[Gm]).push(l),i&&i(d),d}}return e&&(a.prototype=Object.create(e.prototype)),a.prototype.ngMetadataName=n,a.annotationCls=a,a})}function ek(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function lf(n,t,e){return ru(()=>{let i=ek(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;let a=new r(...o);return s.annotation=a,s;function s(l,c,d){let u=l.hasOwnProperty(Wm)?l[Wm]:Object.defineProperty(l,Wm,{value:[]})[Wm];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(a),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}function au(n,t,e,i){return ru(()=>{let r=ek(t);function o(...a){if(this instanceof o)return r.apply(this,a),this;let s=new o(...a);return function(c,d){let u=c.constructor,p=u.hasOwnProperty(qm)?u[qm]:Object.defineProperty(u,qm,{value:{}})[qm];p[d]=p.hasOwnProperty(d)&&p[d]||[],p[d].unshift(s),i&&i(c,d,...a)}}return e&&(o.prototype=Object.create(e.prototype)),o.prototype.ngMetadataName=n,o.annotationCls=o,o})}var Aoe=lf("Attribute",n=>({attributeName:n,__NG_ELEMENT_ID__:()=>Mo(n)})),te=class{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ue({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}},Jm=(new te("AnalyzeForEntryComponents"),class{});function Fs(n){let t=zr.ng;if(t&&t.\u0275compilerFacade)return t.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}au("ContentChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:!0,...t}),Jm),au("ContentChild",(n,t={})=>({selector:n,first:!0,isViewQuery:!1,descendants:!0,...t}),Jm),au("ViewChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:!0,...t}),Jm),au("ViewChild",(n,t)=>({selector:n,first:!0,isViewQuery:!0,descendants:!0,...t}),Jm);var Roe=Function;function F_(n){return"function"==typeof n}function Jd(n){return n.flat(Number.POSITIVE_INFINITY)}function tk(n,t){n.forEach(e=>Array.isArray(e)?tk(e,t):t(e))}function U5(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function dM(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function H_(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function ls(n,t,e){let i=db(n,t);return i>=0?n[1|i]=e:(i=~i,function(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function hR(n,t){let e=db(n,t);if(e>=0)return n[1|e]}function db(n,t){return function(n,t,e){let i=0,r=n.length>>1;for(;r!==i;){let o=i+(r-i>>1),a=n[o<<1];if(t===a)return o<<1;a>t?r=o:i=o+1}return~(r<<1)}(n,t)}var Foe=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,Noe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,Loe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,Boe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/,jR=class{constructor(t){this._reflect=t||zr.Reflect}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let i;i=H_(typeof t>"u"?e.length:t.length);for(let r=0;r<i.length;r++)i[r]=typeof t>"u"?[]:t[r]&&t[r]!=Object?[t[r]]:[],e&&null!=e[r]&&(i[r]=i[r].concat(e[r]));return i}_ownParameters(t,e){let i=t.toString();if(Foe.test(n=i)||Boe.test(n)||Noe.test(n)&&!Loe.test(n))return null;var n;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;let r=t.ctorParameters;if(r&&r!==e.ctorParameters){let s="function"==typeof r?r():r,l=s.map(d=>d&&d.type),c=s.map(d=>d&&mR(d.decorators));return this._zipTypesAndAnnotations(l,c)}let o=t.hasOwnProperty(Wm)&&t[Wm],a=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return a||o?this._zipTypesAndAnnotations(a,o):H_(t.length)}parameters(t){if(!F_(t))return[];let e=VC(t),i=this._ownParameters(t,e);return!i&&e!==Object&&(i=this.parameters(e)),i||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let i=t.annotations;return"function"==typeof i&&i.annotations&&(i=i.annotations),i}return t.decorators&&t.decorators!==e.decorators?mR(t.decorators):t.hasOwnProperty(Gm)?t[Gm]:null}annotations(t){if(!F_(t))return[];let e=VC(t),i=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(i)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let i=t.propMetadata;return"function"==typeof i&&i.propMetadata&&(i=i.propMetadata),i}if(t.propDecorators&&t.propDecorators!==e.propDecorators){let i=t.propDecorators,r={};return Object.keys(i).forEach(o=>{r[o]=mR(i[o])}),r}return t.hasOwnProperty(qm)?t[qm]:null}propMetadata(t){if(!F_(t))return{};let e=VC(t),i={};if(e!==Object){let o=this.propMetadata(e);Object.keys(o).forEach(a=>{i[a]=o[a]})}let r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach(o=>{let a=[];i.hasOwnProperty(o)&&a.push(...i[o]),a.push(...r[o]),i[o]=a}),i}ownPropMetadata(t){return F_(t)&&this._ownPropMetadata(t,VC(t))||{}}hasLifecycleHook(t,e){return t instanceof Roe&&e in t.prototype}};function mR(n){return n?n.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function VC(n){let t=n.prototype?Object.getPrototypeOf(n.prototype):null;return(t?t.constructor:null)||Object}var cf=ab(lf("Inject",n=>({token:n})),-1),ka=ab(lf("Optional"),8),Hoe=ab(lf("Self"),2),id=ab(lf("SkipSelf"),4),zoe=ab(lf("Host"),1),gH=null;function nk(){return gH=gH||new jR}function PM(n){return j5(nk().parameters(n))}function j5(n){return n.map(t=>function(n){let t={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(n)&&n.length>0)for(let e=0;e<n.length;e++){let i=n[e];if(void 0===i)continue;let r=Object.getPrototypeOf(i);if(i instanceof ka||"Optional"===r.ngMetadataName)t.optional=!0;else if(i instanceof id||"SkipSelf"===r.ngMetadataName)t.skipSelf=!0;else if(i instanceof Hoe||"Self"===r.ngMetadataName)t.self=!0;else if(i instanceof zoe||"Host"===r.ngMetadataName)t.host=!0;else if(i instanceof cf)t.token=i.token;else if(i instanceof Aoe){if(void 0===i.attributeName)throw new xt(204,!1);t.attribute=i.attributeName}else t.token=i}else t.token=void 0===n||Array.isArray(n)&&0===n.length?null:n;return t}(t))}var J_=new Map,G5=new Set;function W5(n){return!!(n.templateUrl&&!n.hasOwnProperty("template")||n.styleUrls&&n.styleUrls.length)}var _H=new Map,Qoe=!0;function q5(n,t){(function(n,t,e){if(t&&t!==e&&Qoe)throw new Error(`Duplicate module registered for ${n} - ${po(t)} vs ${po(t.name)}`)})(t,_H.get(t)||null,n),_H.set(t,n)}var GR,Ns=(()=>{return(n=Ns||(Ns={}))[n.Important=1]="Important",n[n.DashCase=2]="DashCase",Ns;var n})(),Koe=/^>|^->|<!--|-->|--!>|<!-$/g,Joe=/(<|>)/,$oe="\u200b$1\u200b",X5=new Map,tae=0,bH="__ngContext__";function sc(n,t){Up(t)?(n[bH]=t[TM],function(n){X5.set(n[TM],n)}(t)):n[bH]=t}function ik(n,t){return GR(n,t)}function rk(n){let t=n[jr];return $c(t)?t[jr]:t}function ok(n){return Y5(n[Q_])}function ak(n){return Y5(n[yl])}function Y5(n){for(;null!==n&&!$c(n);)n=n[yl];return n}function Xm(n,t,e,i,r){if(null!=i){let o,a=!1;$c(i)?o=i:Up(i)&&(a=!0,i=i[ou]);let s=Ls(i);0===n&&null!==e?null==r?ez(t,e,s):Yp(t,e,s,r||null,!0):1===n&&null!==e?Yp(t,e,s,r||null,!0):2===n?ck(t,s,a):3===n&&t.destroyNode(s),null!=o&&function(n,t,e,i,r){let o=e[GP];o!==Ls(e)&&Xm(t,n,i,o,r);for(let s=Ia;s<e.length;s++){let l=e[s];ub(l[Fn],l,n,t,i,o)}}(t,n,o,e,r)}}function sk(n,t){return n.createText(t)}function Q5(n,t,e){n.setValue(t,e)}function aae(n,t){return n.createComment(function(n){return n.replace(Koe,t=>t.replace(Joe,$oe))}(t))}function lk(n,t,e){return n.createElement(t,e)}function Z5(n,t){let e=n[Km],i=e.indexOf(t),r=t[jr];512&t[di]&&(t[di]&=-513,qP(r,-1)),e.splice(i,1)}function WR(n,t){if(n.length<=Ia)return;let e=Ia+t,i=n[e];if(i){let r=i[lb];null!==r&&r!==n&&Z5(r,i),t>0&&(n[e-1][yl]=i[yl]);let o=dM(n,Ia+t);!function(n,t){ub(n,t,t[ui],2,null,null),t[ou]=null,t[Aa]=null}(i[Fn],i);let a=o[oc];null!==a&&a.detachView(o[Fn]),i[jr]=null,i[yl]=null,i[di]&=-65}return i}function K5(n,t){if(!(128&t[di])){let e=t[ui];e.destroyNode&&ub(n,t,e,3,null,null),function(n){let t=n[Q_];if(!t)return fR(n[Fn],n);for(;t;){let e=null;if(Up(t))e=t[Q_];else{let i=t[Ia];i&&(e=i)}if(!e){for(;t&&!t[yl]&&t!==n;)Up(t)&&fR(t[Fn],t),t=t[jr];null===t&&(t=n),Up(t)&&fR(t[Fn],t),e=t&&t[yl]}t=e}}(t)}}function fR(n,t){if(!(128&t[di])){t[di]&=-65,t[di]|=128,function(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i<e.length;i+=2){let r=t[e[i]];if(!(r instanceof qp)){let o=e[i+1];if(Array.isArray(o))for(let a=0;a<o.length;a+=2){let s=r[o[a]],l=o[a+1];ks(4,s,l);try{l.call(s)}finally{ks(5,s,l)}}else{ks(4,r,o);try{o.call(r)}finally{ks(5,r,o)}}}}}(n,t),function(n,t){let e=n.cleanup,i=t[Y_],r=-1;if(null!==e)for(let o=0;o<e.length-1;o+=2)if("string"==typeof e[o]){let a=e[o+3];a>=0?i[r=a]():i[r=-a].unsubscribe(),o+=2}else{let a=i[r=e[o+1]];e[o].call(a)}if(null!==i){for(let o=r+1;o<i.length;o++)(0,i[o])();t[Y_]=null}}(n,t),1===t[Fn].type&&t[ui].destroy();let e=t[lb];if(null!==e&&$c(t[jr])){e!==t[jr]&&Z5(e,t);let i=t[oc];null!==i&&i.detachView(n)}!function(n){X5.delete(n[TM])}(t)}}function J5(n,t,e){return $5(n,t.parent,e)}function $5(n,t,e){let i=t;for(;null!==i&&40&i.type;)i=(t=i).parent;if(null===i)return e[ou];{let{componentOffset:r}=i;if(r>-1){let{encapsulation:o}=n.data[i.directiveStart+r];if(o===as.None||o===as.Emulated)return null}return ss(i,e)}}function Yp(n,t,e,i,r){n.insertBefore(t,e,i,r)}function ez(n,t,e){n.appendChild(t,e)}function vH(n,t,e,i,r){null!==i?Yp(n,t,e,i,r):ez(n,t,e)}function kM(n,t){return n.parentNode(t)}function tz(n,t,e){return iz(n,t,e)}function nz(n,t,e){return 40&n.type?ss(n,e):null}var qR,HC,YR,zC,iz=nz;function rz(n,t){iz=n,qR=t}function OM(n,t,e,i){let r=J5(n,i,t),o=t[ui],s=tz(i.parent||t[Aa],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;l<e.length;l++)vH(o,r,e[l],s,!1);else vH(o,r,e,s,!1);void 0!==qR&&qR(o,i,t,e,r)}function XC(n,t){if(null!==t){let e=t.type;if(3&e)return ss(t,n);if(4&e)return XR(-1,n[t.index]);if(8&e){let i=t.child;if(null!==i)return XC(n,i);{let r=n[t.index];return $c(r)?XR(-1,r):Ls(r)}}if(32&e)return ik(t,n)()||Ls(n[t.index]);{let i=oz(n,t);return null!==i?Array.isArray(i)?i[0]:XC(rk(n[xl]),i):XC(n,t.next)}}return null}function oz(n,t){return null!==t?n[xl][Aa].projection[t.projection]:null}function XR(n,t){let e=Ia+n+1;if(e<t.length){let i=t[e],r=i[Fn].firstChild;if(null!==r)return XC(i,r)}return t[GP]}function ck(n,t,e){let i=kM(n,t);i&&function(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}function dk(n,t,e,i,r,o,a){for(;null!=e;){let s=i[e.index],l=e.type;if(a&&0===t&&(s&&sc(Ls(s),i),e.flags|=2),32!=(32&e.flags))if(8&l)dk(n,t,e.child,i,r,o,!1),Xm(t,n,r,s,o);else if(32&l){let d,c=ik(e,i);for(;d=c();)Xm(t,n,r,d,o);Xm(t,n,r,s,o)}else 16&l?az(n,t,i,e,r,o):Xm(t,n,r,s,o);e=a?e.projectionNext:e.next}}function ub(n,t,e,i,r,o){dk(e,i,n.firstChild,t,r,o,!1)}function az(n,t,e,i,r,o){let a=e[xl],l=a[Aa].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)Xm(t,n,r,l[c],o);else dk(n,t,l,a[jr],r,o,!0)}function sz(n,t,e){""===e?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function lz(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;null!==i&&VR(n,t,i),null!==r&&sz(n,t,r),null!==o&&function(n,t,e){n.setAttribute(t,"style",e)}(n,t,o)}function cz(){if(void 0===HC&&(HC=null,zr.trustedTypes))try{HC=zr.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return HC}function df(n){return cz()?.createHTML(n)||n}function uz(){return void 0!==YR?YR:typeof document<"u"?document:void 0}function uk(){if(void 0===zC&&(zC=null,zr.trustedTypes))try{zC=zr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return zC}function yH(n){return uk()?.createHTML(n)||n}function xH(n){return uk()?.createScript(n)||n}function CH(n){return uk()?.createScriptURL(n)||n}var Jc=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${ob})`}},QR=class extends Jc{getTypeName(){return"HTML"}},ZR=class extends Jc{getTypeName(){return"Style"}},KR=class extends Jc{getTypeName(){return"Script"}},JR=class extends Jc{getTypeName(){return"URL"}},$R=class extends Jc{getTypeName(){return"ResourceURL"}};function Oa(n){return n instanceof Jc?n.changingThisBreaksApplicationSecurity:n}function wl(n,t){let e=function(n){return n instanceof Jc&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${ob})`)}return e===t}function _z(n){let t=new tP(n);return function(){try{return!!(new window.DOMParser).parseFromString(df(""),"text/html")}catch{return!1}}()?new eP(t):t}var eP=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=(new window.DOMParser).parseFromString(df(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}},tP=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=df(t),e}},Sae=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function pb(n){return(n=String(n)).match(Sae)?n:"unsafe:"+n}function rd(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function hb(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var UC,bz=rd("area,br,col,hr,img,wbr"),vz=rd("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),yz=rd("rp,rt"),Eae=hb(yz,vz),Tae=hb(vz,rd("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Dae=hb(yz,rd("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),nP=hb(bz,Tae,Dae,Eae),pk=rd("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Iae=rd("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Aae=rd("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),xz=hb(pk,Iae,Aae),Rae=rd("script,style,template"),iP=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){let e=t.nodeName.toLowerCase();if(!nP.hasOwnProperty(e))return this.sanitizedSomething=!0,!Rae.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=t.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),a=o.name,s=a.toLowerCase();if(!xz.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let l=o.value;pk[s]&&(l=pb(l)),this.buf.push(" ",a,'="',MH(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=t.nodeName.toLowerCase();nP.hasOwnProperty(e)&&!bz.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(MH(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}},Pae=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kae=/([^\#-~ |!])/g;function MH(n){return n.replace(/&/g,"&amp;").replace(Pae,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(kae,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function hk(n,t){let e=null;try{UC=UC||_z(n);let i=t?String(t):"";e=UC.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=UC.getInertBodyElement(i)}while(i!==o);return df((new iP).sanitizeChildren(rP(e)||e))}finally{if(e){let i=rP(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function rP(n){return"content"in n&&function(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ur=(()=>{return(n=Ur||(Ur={}))[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",Ur;var n})();function mk(n){let t=mb();return t?yH(t.sanitize(Ur.HTML,n)||""):wl(n,"HTML")?yH(Oa(n)):hk(uz(),jn(n))}function Vs(n){let t=mb();return t?t.sanitize(Ur.URL,n)||"":wl(n,"URL")?Oa(n):pb(jn(n))}function Cz(n){let t=mb();if(t)return CH(t.sanitize(Ur.RESOURCE_URL,n)||"");if(wl(n,"ResourceURL"))return CH(Oa(n));throw new xt(904,!1)}function mb(){let n=Ze();return n&&n[NR]}var FM=new te("ENVIRONMENT_INITIALIZER"),Mz=new te("INJECTOR",-1),wz=new te("INJECTOR_DEF_TYPES"),uM=class{get(t,e=X_){if(e===X_){let i=new Error(`NullInjectorError: No provider for ${po(t)}!`);throw i.name="NullInjectorError",i}return e}};function zae(...n){return{"\u0275providers":Sz(0,n),"\u0275fromNgModule":!0}}function Sz(n,...t){let r,e=[],i=new Set;return tk(t,o=>{let a=o;oP(a,e,[],i)&&(r||(r=[]),r.push(a))}),void 0!==r&&Ez(r,e),e}function Ez(n,t){for(let e=0;e<n.length;e++){let{providers:r}=n[e];fk(r,o=>{t.push(o)})}}function oP(n,t,e,i){if(!(n=Ai(n)))return!1;let r=null,o=lH(n),a=!o&&Os(n);if(o||a){if(a&&!a.standalone)return!1;r=n}else{let l=n.ngModule;if(o=lH(l),!o)return!1;r=l}let s=i.has(r);if(a){if(s)return!1;if(i.add(r),a.dependencies){let l="function"==typeof a.dependencies?a.dependencies():a.dependencies;for(let c of l)oP(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!s){let c;i.add(r);try{tk(o.imports,d=>{oP(d,t,e,i)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&Ez(c,t)}if(!s){let c=Gp(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:ji},{provide:wz,useValue:r,multi:!0},{provide:FM,useValue:()=>O(r),multi:!0})}let l=o.providers;null==l||s||fk(l,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}function fk(n,t){for(let e of n)n5(e)&&(e=e.\u0275providers),Array.isArray(e)?fk(e,t):t(e)}var Uae=$i({provide:String,useValue:$i});function Tz(n){return null!==n&&"object"==typeof n&&Uae in n}function $m(n){return"function"==typeof n}var gR,LM=new te("Set Injector scope."),YC={},qae={};function gk(){return void 0===gR&&(gR=new uM),gR}var lc=class{},pM=class extends lc{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,sP(t,a=>this.processProvider(a)),this.records.set(Mz,Ym(void 0,this)),r.has("environment")&&this.records.set(lc,Ym(void 0,this));let o=this.records.get(LM);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(wz.multi,ji,Ci.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let t of this._ngOnDestroyHooks)t.ngOnDestroy();for(let t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();let e=Um(this),i=Ps(void 0);try{return t()}finally{Um(e),Ps(i)}}get(t,e=X_,i=Ci.Default){this.assertNotDestroyed(),i=SM(i);let r=Um(this),o=Ps(void 0);try{if(!(i&Ci.SkipSelf)){let s=this.records.get(t);if(void 0===s){let l=("function"==typeof(n=t)||"object"==typeof n&&n instanceof te)&&HP(t);s=l&&this.injectableDefInScope(l)?Ym(aP(t),YC):null,this.records.set(t,s)}if(null!=s)return this.hydrate(t,s)}return(i&Ci.Self?gk():this.parent).get(t,e=i&Ci.Optional&&e===X_?null:e)}catch(a){if("NullInjectorError"===a.name){if((a[eM]=a[eM]||[]).unshift(po(t)),r)throw a;return function(n,t,e,i){let r=n[eM];throw t[cH]&&r.unshift(t[cH]),n.message=function(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==Vre?n.slice(2):n;let r=po(t);if(Array.isArray(t))r=t.map(po).join(" -> ");else if("object"==typeof t){let o=[];for(let a in t)if(t.hasOwnProperty(a)){let s=t[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):po(s)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(Bre,"\n  ")}`}("\n"+n.message,r,e,i),n[Lre]=r,n[eM]=null,n}(a,t,"R3InjectorError",this.source)}throw a}finally{Ps(o),Um(r)}var n}resolveInjectorInitializers(){let t=Um(this),e=Ps(void 0);try{let i=this.get(FM.multi,ji,Ci.Self);for(let r of i)r()}finally{Um(t),Ps(e)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(po(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new xt(205,!1)}processProvider(t){let e=$m(t=Ai(t))?t:Ai(t&&t.provide),i=function(n){return Tz(n)?Ym(void 0,n.useValue):Ym(Dz(n),YC)}(t);if($m(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ym(void 0,YC,!0),r.factory=()=>FR(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===YC&&(e.value=qae,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this._ngOnDestroyHooks.add(e.value),e.value;var n}injectableDefInScope(t){if(!t.providedIn)return!1;let e=Ai(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}};function aP(n){let t=HP(n),e=null!==t?t.factory:Gp(n);if(null!==e)return e;if(n instanceof te)throw new xt(204,!1);if(n instanceof Function)return function(n){let t=n.length;if(t>0)throw H_(t,"?"),new xt(204,!1);let e=function(n){return n&&(n[$C]||n[r5])||null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new xt(204,!1)}function Dz(n,t,e){let i;if($m(n)){let r=Ai(n);return Gp(r)||aP(r)}if(Tz(n))i=()=>Ai(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...FR(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))i=()=>O(Ai(n.useExisting));else{let r=Ai(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return Gp(r)||aP(r);i=()=>new r(...FR(n.deps))}return i}function Ym(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function sP(n,t){for(let e of n)Array.isArray(e)?sP(e,t):e&&n5(e)?sP(e.\u0275providers,t):t(e)}var lP=class{},hM=class{},cP=class{resolveComponentFactory(t){throw function(n){let t=Error(`No component factory found for ${po(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}},ho=(()=>{class n{}return n.NULL=new cP,n})();function ese(){return uf(Lo(),Ze())}function uf(n,t){return new xe(ss(n,t))}var xe=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=ese,n})();function tse(n){return n instanceof xe?n.nativeElement:n}var cc=class{},dc=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function(){let n=Ze(),e=ed(Lo().index,n);return(Up(e)?e:n)[ui]}(),n})(),ise=(()=>{class n{}return n.\u0275prov=ue({token:n,providedIn:"root",factory:()=>null}),n})(),Ml=class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}},rse=new Ml("15.2.9"),_R={},ose="ngOriginalError";function bR(n){return n[ose]}var la=class{constructor(){this._console=console}handleError(t){let e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&bR(t);for(;e&&bR(e);)e=bR(e);return e||null}};function su(n){return n.ownerDocument}function QC(n){return n instanceof Function?n():n}function Iz(n,t,e){let i=n.length;for(;;){let r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){let o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}var Az="ng-template";function lse(n,t,e){let i=0,r=!0;for(;i<n.length;){let o=n[i++];if("string"==typeof o&&r){let a=n[i++];if(e&&"class"===o&&-1!==Iz(a.toLowerCase(),t,0))return!0}else{if(1===o){for(;i<n.length&&"string"==typeof(o=n[i++]);)if(o.toLowerCase()===t)return!0;return!1}"number"==typeof o&&(r=!1)}}return!1}function Rz(n){return 4===n.type&&n.value!==Az}function cse(n,t,e){return t===(4!==n.type||e?n.value:Az)}function dse(n,t,e){let i=4,r=n.attrs||[],o=function(n){for(let t=0;t<n.length;t++)if(R5(n[t]))return t;return n.length}(r),a=!1;for(let s=0;s<t.length;s++){let l=t[s];if("number"!=typeof l){if(!a)if(4&i){if(i=2|1&i,""!==l&&!cse(n,l,e)||""===l&&1===t.length){if(bl(i))return!1;a=!0}}else{let c=8&i?l:t[++s];if(8&i&&null!==n.attrs){if(!lse(n.attrs,c,e)){if(bl(i))return!1;a=!0}continue}let u=use(8&i?"class":l,r,Rz(n),e);if(-1===u){if(bl(i))return!1;a=!0;continue}if(""!==c){let p;p=u>o?"":r[u+1].toLowerCase();let h=8&i?p:null;if(h&&-1!==Iz(h,c,0)||2&i&&c!==p){if(bl(i))return!1;a=!0}}}}else{if(!a&&!bl(i)&&!bl(l))return!1;if(a&&bl(l))continue;a=!1,i=l|1&i}}return bl(i)||a}function bl(n){return 0==(1&n)}function use(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let a=t[r];if(a===n)return r;if(3===a||6===a)o=!0;else{if(1===a||2===a){let s=t[++r];for(;"string"==typeof s;)s=t[++r];continue}if(4===a)break;if(0===a){r+=4;continue}}r+=o?1:2}return-1}return function(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let i=n[e];if("number"==typeof i)return-1;if(i===t)return e;e++}return-1}(t,n)}function Pz(n,t,e=!1){for(let i=0;i<t.length;i++)if(dse(n,t[i],e))return!0;return!1}function fse(n,t){e:for(let e=0;e<t.length;e++){let i=t[e];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function wH(n,t){return n?":not("+t.trim()+")":t}function gse(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let a=n[e];if("string"==typeof a)if(2&i){let s=n[++e];r+="["+a+(s.length>0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""!==r&&!bl(a)&&(t+=wH(o,r),r=""),i=a,o=o||!bl(i);e++}return""!==r&&(t+=wH(o,r)),t}var zn={};function v(n){kz(Ti(),Ze(),da()+n,!1)}function kz(n,t,e,i){if(!i)if(3==(3&t[di])){let o=n.preOrderCheckHooks;null!==o&&GC(t,o,e)}else{let o=n.preOrderHooks;null!==o&&WC(t,o,0,e)}Wp(e)}var SH={"\u0275\u0275defineInjectable":ue,"\u0275\u0275defineInjector":H,"\u0275\u0275inject":O,"\u0275\u0275invalidFactoryDep":a5,resolveForwardRef:Ai};var yse=$i({provide:String,useValue:$i});function EH(n){return void 0!==n.useClass}function TH(n){return void 0!==n.useFactory}var Oz=cb("Injectable",void 0,void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;n.hasOwnProperty($C)||Object.defineProperty(n,$C,{get:()=>(null===e&&(e=Fs().compileInjectable(SH,`ng:///${n.name}/\u0275prov.js`,function(n,t){let e=t||{providedIn:null},i={name:n.name,type:n,typeArgumentCount:0,providedIn:e.providedIn};return(EH(e)||TH(e))&&void 0!==e.deps&&(i.deps=j5(e.deps)),EH(e)?i.useClass=e.useClass:function(n){return yse in n}(e)?i.useValue=e.useValue:TH(e)?i.useFactory=e.useFactory:function(n){return void 0!==n.useExisting}(e)&&(i.useExisting=e.useExisting),i}(n,t))),e)}),n.hasOwnProperty(Kc)||Object.defineProperty(n,Kc,{get:()=>{if(null===i){let r=Fs();i=r.compileFactory(SH,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,typeArgumentCount:0,deps:PM(n),target:r.FactoryTarget.Injectable})}return i},configurable:!0})}(n,t));function DH(n,t=null,e=null,i){let r=Fz(n,t,e,i);return r.resolveInjectorInitializers(),r}function Fz(n,t=null,e=null,i,r=new Set){let o=[e||ji,zae(n)];return i=i||("object"==typeof n?void 0:po(n)),new pM(o,t||gk(),i||null,r)}var wi=(()=>{class n{static create(e,i){if(Array.isArray(e))return DH({name:""},i,e,"");{let r=e.name??"";return DH({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=X_,n.NULL=new uM,n.\u0275prov=ue({token:n,providedIn:"any",factory:()=>O(Mz)}),n.__NG_ELEMENT_ID__=-1,n})(),z_=class{constructor(t,e){if(this.token=t,this.id=e,!t)throw new xt(208,!1);this.displayName=po(this.token)}static get(t){return IH.get(Ai(t))}static get numberOfKeys(){return IH.numberOfKeys}},IH=new class{constructor(){this._allKeys=new Map}get(t){if(t instanceof z_)return t;if(this._allKeys.has(t))return this._allKeys.get(t);let e=new z_(t,z_.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}};function C(n,t=Ci.Default){let e=Ze();return null===e?O(n,t):B5(Lo(),e,Ai(n),t)}function cs(){throw new Error("invalid")}function Nz(n,t){let e=n.contentQueries;if(null!==e)for(let i=0;i<e.length;i+=2){let o=e[i+1];if(-1!==o){let a=n.data[o];ZP(e[i]),a.contentQueries(2,t[o],o)}}}function BM(n,t,e,i,r,o,a,s,l,c,d){let u=t.blueprint.slice();return u[ou]=r,u[di]=76|i,(null!==d||n&&1024&n[di])&&(u[di]|=1024),v5(u),u[jr]=u[of]=n,u[Ra]=e,u[iM]=a||n&&n[iM],u[ui]=s||n&&n[ui],u[NR]=l||n&&n[NR]||null,u[nM]=c||n&&n[nM]||null,u[Aa]=o,u[TM]=tae++,u[u5]=d,u[xl]=2==t.type?n[xl]:u,u}function pf(n,t,e,i,r){let o=n.data[t];if(null===o)o=_k(n,t,e,i,r),Gn.lFrame.inI18n&&(o.flags|=32);else if(64&o.type){o.type=e,o.value=i,o.attrs=r;let a=Z_();o.injectorIndex=null===a?-1:a.injectorIndex}return ac(o,!0),o}function _k(n,t,e,i,r){let o=x5(),a=XP(),l=n.data[t]=function(n,t,e,i,r,o){return{type:e,index:i,insertBeforeIndex:null,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,a?o:o&&o.parent,e,t,i,r);return null===n.firstChild&&(n.firstChild=l),null!==o&&(a?null==o.child&&null!==l.parent&&(o.child=l):null===o.next&&(o.next=l,l.prev=o)),l}function fb(n,t,e,i){if(0===e)return-1;let r=t.length;for(let o=0;o<e;o++)t.push(i),n.blueprint.push(i),n.data.push(null);return r}function bk(n,t,e){KP(t);try{let i=n.viewQuery;null!==i&&hP(1,i,e);let r=n.template;null!==r&&Lz(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&Nz(n,t),n.staticViewQueries&&hP(2,n.viewQuery,e);let o=n.components;null!==o&&function(n,t){for(let e=0;e<t.length;e++)Yse(n,t[e])}(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[di]&=-5,JP()}}function VM(n,t,e,i){let r=t[di];if(128!=(128&r)){KP(t);try{v5(t),C5(n.bindingStartIndex),null!==e&&Lz(n,t,e,2,i);let a=3==(3&r);if(a){let c=n.preOrderCheckHooks;null!==c&&GC(t,c,null)}else{let c=n.preOrderHooks;null!==c&&WC(t,c,0,null),uR(t,0)}if(function(n){for(let t=ok(n);null!==t;t=ak(t)){if(!t[p5])continue;let e=t[Km];for(let i=0;i<e.length;i++){let r=e[i];0==(512&r[di])&&qP(r[jr],1),r[di]|=512}}}(t),function(n){for(let t=ok(n);null!==t;t=ak(t))for(let e=Ia;e<t.length;e++){let i=t[e],r=i[Fn];oM(i)&&VM(r,i,r.template,i[Ra])}}(t),null!==n.contentQueries&&Nz(n,t),a){let c=n.contentCheckHooks;null!==c&&GC(t,c)}else{let c=n.contentHooks;null!==c&&WC(t,c,1),uR(t,1)}!function(n,t){let e=n.hostBindingOpCodes;if(null!==e)try{for(let i=0;i<e.length;i++){let r=e[i];if(r<0)Wp(~r);else{let o=r,a=e[++i],s=e[++i];soe(a,o),s(2,t[o])}}}finally{Wp(-1)}}(n,t);let s=n.components;null!==s&&function(n,t){for(let e=0;e<t.length;e++)Xse(n,t[e])}(t,s);let l=n.viewQuery;if(null!==l&&hP(2,l,i),a){let c=n.viewCheckHooks;null!==c&&GC(t,c)}else{let c=n.viewHooks;null!==c&&WC(t,c,2),uR(t,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),t[di]&=-41,512&t[di]&&(t[di]&=-513,qP(t[jr],-1))}finally{JP()}}}function Lz(n,t,e,i,r){let o=da(),a=2&i;try{Wp(-1),a&&t.length>Gr&&kz(n,t,Gr,!1),ks(a?2:0,r),e(i,r)}finally{Wp(o),ks(a?3:1,r)}}function vk(n,t,e){if(WP(t)){let r=t.directiveEnd;for(let o=t.directiveStart;o<r;o++){let a=n.data[o];a.contentQueries&&a.contentQueries(1,e[o],o)}}}function yk(n,t,e){!y5()||(function(n,t,e,i){let r=e.directiveStart,o=e.directiveEnd;DM(e)&&function(n,t,e){let i=ss(t,n),r=Bz(e),o=n[iM],a=HM(n,BM(n,r,null,e.onPush?32:16,i,t,o,o.createRenderer(i,e),null,null,null));n[t.index]=a}(t,e,n.data[r+e.componentOffset]),n.firstCreatePass||cM(e,t),sc(i,t);let a=e.initialInputs;for(let s=r;s<o;s++){let l=n.data[s],c=Xp(t,n,s,e);sc(c,t),null!==a&&jse(0,s-r,c,l,0,a),Cl(l)&&(ed(e.index,t)[Ra]=Xp(t,n,s,e))}}(n,t,e,ss(e,t)),64==(64&e.flags)&&zz(n,t,e))}function xk(n,t,e=ss){let i=t.localNames;if(null!==i){let r=t.index+1;for(let o=0;o<i.length;o+=2){let a=i[o+1],s=-1===a?e(t,n):n[a];n[r++]=s}}}function Bz(n){let t=n.tView;return null===t||t.incompleteFirstPass?n.tView=Ck(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):t}function Ck(n,t,e,i,r,o,a,s,l,c){let d=Gr+i,u=d+r,p=function(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:zn);return e}(d,u),h="function"==typeof c?c():c;return p[Fn]={type:n,blueprint:p,template:e,queries:null,viewQuery:s,declTNode:t,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof a?a():a,firstChild:null,schemas:l,consts:h,incompleteFirstPass:!1}}function Vz(n,t,e,i){let r=Gz(t);null===e?r.push(i):(r.push(e),n.firstCreatePass&&Wz(n).push(i,r.length-1))}function AH(n,t,e,i){for(let r in n)if(n.hasOwnProperty(r)){e=null===e?{}:e;let o=n[r];null===i?RH(e,t,r,o):i.hasOwnProperty(r)&&RH(e,t,i[r],o)}return e}function RH(n,t,e,i){n.hasOwnProperty(e)?n[e].push(t,i):n[e]=[t,i]}function ds(n,t,e,i,r,o,a,s){let d,l=ss(t,e),c=t.inputs;!s&&null!=c&&(d=c[i])?(Ek(n,e,d,i,r),DM(t)&&function(n,t){let e=ed(t,n);16&e[di]||(e[di]|=32)}(e,t.index)):3&t.type&&(i=function(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),r=null!=a?a(r,t.value||"",i):r,o.setProperty(l,i,r))}function Mk(n,t,e,i){if(y5()){let a,s,r=null===i?null:{"":-1},o=function(n,t){let e=n.directiveRegistry,i=null,r=null;if(e)for(let o=0;o<e.length;o++){let a=e[o];if(Pz(t,a.selectors,!1))if(i||(i=[]),Cl(a))if(null!==a.findHostDirectiveDefs){let s=[];r=r||new Map,a.findHostDirectiveDefs(a,s,r),i.unshift(...s,a),uP(n,t,s.length)}else i.unshift(a),uP(n,t,0);else r=r||new Map,a.findHostDirectiveDefs?.(a,i,r),i.push(a)}return null===i?null:[i,r]}(n,e);null===o?a=s=null:[a,s]=o,null!==a&&Hz(n,t,e,a,r,s),r&&function(n,t,e){if(t){let i=n.localNames=[];for(let r=0;r<t.length;r+=2){let o=e[t[r+1]];if(null==o)throw new xt(-301,!1);i.push(t[r],o)}}}(e,i,r)}e.mergedAttrs=K_(e.mergedAttrs,e.attrs)}function Hz(n,t,e,i,r,o){for(let c=0;c<i.length;c++)zR(cM(e,t),n,i[c].type);!function(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}(e,n.data.length,i.length);for(let c=0;c<i.length;c++){let d=i[c];d.providersResolver&&d.providersResolver(d)}let a=!1,s=!1,l=fb(n,t,i.length,null);for(let c=0;c<i.length;c++){let d=i[c];e.mergedAttrs=K_(e.mergedAttrs,d.hostAttrs),zse(n,e,t,l,d),Vse(l,d,r),null!==d.contentQueries&&(e.flags|=4),(null!==d.hostBindings||null!==d.hostAttrs||0!==d.hostVars)&&(e.flags|=64);let u=d.type.prototype;!a&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((n.preOrderHooks??(n.preOrderHooks=[])).push(e.index),a=!0),!s&&(u.ngOnChanges||u.ngDoCheck)&&((n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(e.index),s=!0),l++}!function(n,t,e){let r=t.directiveEnd,o=n.data,a=t.attrs,s=[],l=null,c=null;for(let d=t.directiveStart;d<r;d++){let u=o[d],p=e?e.get(u):null,m=p?p.outputs:null;l=AH(u.inputs,d,l,p?p.inputs:null),c=AH(u.outputs,d,c,m);let _=null===l||null===a||Rz(t)?null:Gse(l,d,a);s.push(_)}null!==l&&(l.hasOwnProperty("class")&&(t.flags|=8),l.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=s,t.inputs=l,t.outputs=c}(n,e,o)}function zz(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,a=Gn.lFrame.currentDirectiveIndex;try{Wp(o);for(let s=i;s<r;s++){let l=n.data[s],c=t[s];BR(s),(null!==l.hostBindings||0!==l.hostVars||null!==l.hostAttrs)&&Nse(l,c)}}finally{Wp(-1),BR(a)}}function Nse(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function uP(n,t,e){t.componentOffset=e,(n.components??(n.components=[])).push(t.index)}function Vse(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;Cl(t)&&(e[""]=n)}}function zse(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Gp(r.type)),a=new qp(o,Cl(r),C);n.blueprint[i]=a,e[i]=a,function(n,t,e,i,r){let o=r.hostBindings;if(o){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);let s=~t.index;(function(n){let t=n.length;for(;t>0;){let e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(a)!=s&&a.push(s),a.push(e,i,o)}}(n,t,i,fb(n,e,r.hostVars,zn),r)}function uc(n,t,e,i,r,o){let a=ss(n,t);wk(t[ui],a,o,n.value,e,i,r)}function wk(n,t,e,i,r,o,a){if(null==o)n.removeAttribute(t,r,e);else{let s=null==a?jn(o):a(o,i||"",r);n.setAttribute(t,r,s,e)}}function jse(n,t,e,i,r,o){let a=o[t];if(null!==a){let s=i.setInput;for(let l=0;l<a.length;){let c=a[l++],d=a[l++],u=a[l++];null!==s?i.setInput(e,u,c,d):e[d]=u}}}function Gse(n,t,e){let i=null,r=0;for(;r<e.length;){let o=e[r];if(0!==o)if(5!==o){if("number"==typeof o)break;if(n.hasOwnProperty(o)){null===i&&(i=[]);let a=n[o];for(let s=0;s<a.length;s+=2)if(a[s]===t){i.push(o,a[s+1],e[r+1]);break}}r+=2}else r+=2;else r+=4}return i}function Uz(n,t,e,i){return[n,!0,!1,t,null,0,i,e,null,null]}function Xse(n,t){let e=ed(t,n);if(oM(e)){let i=e[Fn];48&e[di]?VM(i,e,i.template,e[Ra]):e[zp]>0&&pP(e)}}function pP(n){for(let i=ok(n);null!==i;i=ak(i))for(let r=Ia;r<i.length;r++){let o=i[r];if(oM(o))if(512&o[di]){let a=o[Fn];VM(a,o,a.template,o[Ra])}else o[zp]>0&&pP(o)}let e=n[Fn].components;if(null!==e)for(let i=0;i<e.length;i++){let r=ed(e[i],n);oM(r)&&r[zp]>0&&pP(r)}}function Yse(n,t){let e=ed(t,n),i=e[Fn];(function(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])})(i,e),bk(i,e,e[Ra])}function HM(n,t){return n[Q_]?n[uH][yl]=t:n[Q_]=t,n[uH]=t,t}function Sk(n){for(;n;){n[di]|=32;let t=rk(n);if(Xre(n)&&!t)return n;n=t}return null}function jz(n,t,e,i=!0){let r=t[iM];r.begin&&r.begin();try{VM(n,t,n.template,e)}catch(a){throw i&&Xz(t,a),a}finally{r.end&&r.end()}}function hP(n,t,e){ZP(0),t(n,e)}function Gz(n){return n[Y_]||(n[Y_]=[])}function Wz(n){return n.cleanup||(n.cleanup=[])}function qz(n,t,e){return(null===n||Cl(n))&&(e=function(n){for(;Array.isArray(n);){if("object"==typeof n[jP])return n;n=n[ou]}return null}(e[t.index])),e[ui]}function Xz(n,t){let e=n[nM],i=e?e.get(la,null):null;i&&i.handleError(t)}function Ek(n,t,e,i,r){for(let o=0;o<e.length;){let a=e[o++],s=e[o++],l=t[a],c=n.data[a];null!==c.setInput?c.setInput(l,r,i,s):l[s]=r}}function od(n,t,e){let i=AM(t,n);Q5(n[ui],i,e)}function mM(n,t,e){let i=e?n.styles:null,r=e?n.classes:null,o=0;if(null!==t)for(let a=0;a<t.length;a++){let s=t[a];"number"==typeof s?o=s:1==o?r=RR(r,s):2==o&&(i=RR(i,s+": "+t[++a]+";"))}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function ZC(n,t,e,i,r=!1){for(;null!==e;){let o=t[e.index];if(null!==o&&i.push(Ls(o)),$c(o))for(let s=Ia;s<o.length;s++){let l=o[s],c=l[Fn].firstChild;null!==c&&ZC(l[Fn],l,c,i)}let a=e.type;if(8&a)ZC(n,t,e.child,i);else if(32&a){let l,s=ik(e,t);for(;l=s();)i.push(l)}else if(16&a){let s=oz(t,e);if(Array.isArray(s))i.push(...s);else{let l=rk(t[xl]);ZC(l[Fn],l,s,i,!0)}}e=r?e.projectionNext:e.next}return i}var Qp=class{get rootNodes(){let t=this._lView,e=t[Fn];return ZC(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[Ra]}set context(t){this._lView[Ra]=t}get destroyed(){return 128==(128&this._lView[di])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[jr];if($c(t)){let e=t[rM],i=e?e.indexOf(this):-1;i>-1&&(WR(t,i),dM(e,i))}this._attachedToViewContainer=!1}K5(this._lView[Fn],this._lView)}onDestroy(t){Vz(this._lView[Fn],this._lView,null,t)}markForCheck(){Sk(this._cdRefInjectingView||this._lView)}detach(){this._lView[di]&=-65}reattach(){this._lView[di]|=64}detectChanges(){jz(this._lView[Fn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new xt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,ub(this._lView[Fn],t=this._lView,t[ui],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new xt(902,!1);this._appRef=t}},mP=class extends Qp{constructor(t){super(t),this._view=t}detectChanges(){let t=this._view;jz(t[Fn],t,t[Ra],!1)}checkNoChanges(){}get context(){return null}},fM=class extends ho{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Os(t);return new gM(e,this.ngModule)}};function PH(n){let t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}var gM=class extends hM{get inputs(){return PH(this.componentDef.inputs)}get outputs(){return PH(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(gse).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof lc?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);let a=o?new class{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=SM(i);let r=this.injector.get(t,_R,i);return r!==_R||e===_R?r:this.parentInjector.get(t,e,i)}}(t,o):t,s=a.get(cc,null);if(null===s)throw new xt(407,!1);let _,M,l=a.get(ise,null),c=s.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",u=i?function(n,t,e){return n.selectRootElement(t,e===as.ShadowDom)}(c,i,this.componentDef.encapsulation):lk(c,d,function(n){let t=n.toLowerCase();return"svg"===t?g5:"math"===t?_5:null}(d)),p=this.componentDef.onPush?288:272,h=Ck(0,null,null,1,0,null,null,null,null,null),m=BM(null,h,null,p,null,null,s,c,l,a,null);KP(m);try{let x,y=this.componentDef,R=null;y.findHostDirectiveDefs?(x=[],R=new Map,y.findHostDirectiveDefs(y,x,R),x.push(y)):x=[y];let I=function(n,t){let e=n[Fn],i=Gr;return n[i]=t,pf(e,i,2,"#host",null)}(m,u),B=function(n,t,e,i,r,o,a,s){let l=r[Fn];!function(n,t,e,i){for(let r of n)t.mergedAttrs=K_(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(mM(t,t.mergedAttrs,!0),null!==e&&lz(i,e,t))}(i,n,t,a);let c=o.createRenderer(t,e),d=BM(r,Bz(e),null,e.onPush?32:16,r[n.index],n,o,c,null,null,null);return l.firstCreatePass&&uP(l,n,i.length-1),HM(r,d),r[n.index]=d}(I,u,y,x,m,s,c);M=b5(h,Gr),u&&function(n,t,e,i){if(i)VR(n,e,["ng-version",rse.full]);else{let{attrs:r,classes:o}=function(n){let t=[],e=[],i=1,r=2;for(;i<n.length;){let o=n[i];if("string"==typeof o)2===r?""!==o&&t.push(o,n[++i]):8===r&&e.push(o);else{if(!bl(r))break;r=o}i++}return{attrs:t,classes:e}}(t.selectors[0]);r&&VR(n,e,r),o&&o.length>0&&sz(n,e,o.join(" "))}}(c,y,u,i),void 0!==e&&function(n,t,e){let i=n.projection=[];for(let r=0;r<t.length;r++){let o=e[r];i.push(null!=o?Array.from(o):null)}}(M,this.ngContentSelectors,e),_=function(n,t,e,i,r,o){let a=Lo(),s=r[Fn],l=ss(a,r);Hz(s,r,a,e,null,i);for(let d=0;d<e.length;d++)sc(Xp(r,s,a.directiveStart+d,a),r);zz(s,r,a),l&&sc(l,r);let c=Xp(r,s,a.directiveStart+a.componentOffset,a);if(n[Ra]=r[Ra]=c,null!==o)for(let d of o)d(c,t);return vk(s,a,n),c}(B,y,x,R,m,[ile]),bk(h,m,null)}finally{JP()}return new gP(this.componentType,_,uf(M,m),m,M)}},gP=class extends lP{constructor(t,e,i,r,o){super(),this.location=i,this._rootLView=r,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new mP(r),this.componentType=t}setInput(t,e){let r,i=this._tNode.inputs;if(null!==i&&(r=i[t])){let o=this._rootLView;Ek(o[Fn],o,r,t,e),Sk(ed(this._tNode.index,o))}}get injector(){return new jp(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function ile(){let n=Lo();RM(Ze()[Fn],n)}function Yz(n){return Object.getPrototypeOf(n.prototype).constructor}function Xe(n){let t=Yz(n.type),e=!0,i=[n];for(;t;){let r;if(Cl(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new xt(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let a=n;a.inputs=vR(n.inputs),a.declaredInputs=vR(n.declaredInputs),a.outputs=vR(n.outputs);let s=r.hostBindings;s&&sle(n,s);let l=r.viewQuery,c=r.contentQueries;if(l&&ole(n,l),c&&ale(n,c),dR(n.inputs,r.inputs),dR(n.declaredInputs,r.declaredInputs),dR(n.outputs,r.outputs),Cl(r)&&r.data.animation){let d=n.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let a=0;a<o.length;a++){let s=o[a];s&&s.ngInherit&&s(n),s===Xe&&(e=!1)}}t=Object.getPrototypeOf(t)}!function(n){let t=0,e=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=K_(r.hostAttrs,e=K_(e,r.hostAttrs))}}(i)}function vR(n){return n===Zc?{}:n===ji?[]:n}function ole(n,t){let e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function ale(n,t){let e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function sle(n,t){let e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}var lle=["providersResolver"],cle=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function Qz(n,t,e){if(null!==n.hostDirectives)for(let i of n.hostDirectives){let r=eu(i.directive);ple(r.declaredInputs,i.inputs),Qz(r,t,e),e.set(r,i),t.push(r)}}function kH(n){if(void 0===n||0===n.length)return Zc;let t={};for(let e=0;e<n.length;e+=2)t[n[e]]=n[e+1];return t}function ple(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[t[e]]=n[e])}function Zz(n){return!!Tk(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function Tk(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function pc(n,t,e){return n[t]=e}function gb(n,t){return n[t]}function qo(n,t,e){return!Object.is(n[t],e)&&(n[t]=e,!0)}function Zp(n,t,e,i){let r=qo(n,t,e);return qo(n,t+1,i)||r}function zM(n,t,e,i,r){let o=Zp(n,t,e,i);return qo(n,t+2,r)||o}function Bs(n,t,e,i,r,o){let a=Zp(n,t,e,i);return Zp(n,t+2,r,o)||a}function Be(n,t,e,i){let r=Ze();return qo(r,sf(),t)&&(Ti(),uc(Pr(),r,n,t,e,i)),Be}function hf(n,t){let e=!1,i=td();for(let o=1;o<t.length;o+=2)e=qo(n,i++,t[o])||e;if(C5(i),!e)return zn;let r=t[0];for(let o=1;o<t.length;o+=2)r+=jn(t[o])+t[o+1];return r}function mf(n,t,e,i){return qo(n,sf(),e)?t+jn(e)+i:zn}function ff(n,t,e,i,r,o){let s=Zp(n,td(),e,r);return nd(2),s?t+jn(e)+i+jn(r)+o:zn}function gf(n,t,e,i,r,o,a,s){let c=zM(n,td(),e,r,a);return nd(3),c?t+jn(e)+i+jn(r)+o+jn(a)+s:zn}function _f(n,t,e,i,r,o,a,s,l,c){let u=Bs(n,td(),e,r,a,l);return nd(4),u?t+jn(e)+i+jn(r)+o+jn(a)+s+jn(l)+c:zn}function bf(n,t,e,i,r,o,a,s,l,c,d,u){let p=td(),h=Bs(n,p,e,r,a,l);return h=qo(n,p+4,d)||h,nd(5),h?t+jn(e)+i+jn(r)+o+jn(a)+s+jn(l)+c+jn(d)+u:zn}function vf(n,t,e,i,r,o,a,s,l,c,d,u,p,h){let m=td(),_=Bs(n,m,e,r,a,l);return _=Zp(n,m+4,d,p)||_,nd(6),_?t+jn(e)+i+jn(r)+o+jn(a)+s+jn(l)+c+jn(d)+u+jn(p)+h:zn}function yf(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_){let M=td(),y=Bs(n,M,e,r,a,l);return y=zM(n,M+4,d,p,m)||y,nd(7),y?t+jn(e)+i+jn(r)+o+jn(a)+s+jn(l)+c+jn(d)+u+jn(p)+h+jn(m)+_:zn}function xf(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y){let x=td(),R=Bs(n,x,e,r,a,l);return R=Bs(n,x+4,d,p,m,M)||R,nd(8),R?t+jn(e)+i+jn(r)+o+jn(a)+s+jn(l)+c+jn(d)+u+jn(p)+h+jn(m)+_+jn(M)+y:zn}function S(n,t,e,i,r,o,a,s){let l=Ze(),c=Ti(),d=n+Gr,u=c.firstCreatePass?function(n,t,e,i,r,o,a,s,l){let c=t.consts,d=pf(t,n,4,a||null,nu(c,s));Mk(t,e,d,nu(c,l)),RM(t,d);let u=d.tView=Ck(2,d,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),u.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,i,r,o,a):c.data[d];ac(u,!1);let p=l[ui].createComment("");OM(c,l,p,u),sc(p,l),HM(l,l[d]=Uz(p,l,p,u)),IM(u)&&yk(c,l,u),null!=a&&xk(l,u,s)}function st(n){return af(Gn.lFrame.contextLView,Gr+n)}function b(n,t,e){let i=Ze();return qo(i,sf(),t)&&ds(Ti(),Pr(),i,n,t,i[ui],e,!1),b}function _P(n,t,e,i,r){let a=r?"class":"style";Ek(n,e,t.inputs[a],a,i)}function f(n,t,e,i){let r=Ze(),o=Ti(),a=Gr+n,s=r[ui],l=o.firstCreatePass?function(n,t,e,i,r,o){let a=t.consts,l=pf(t,n,2,i,nu(a,r));return Mk(t,e,l,nu(a,o)),null!==l.attrs&&mM(l,l.attrs,!1),null!==l.mergedAttrs&&mM(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(a,o,r,t,e,i):o.data[a],c=r[a]=lk(s,t,Gn.lFrame.currentNamespace),d=IM(l);return ac(l,!0),lz(s,c,l),32!=(32&l.flags)&&OM(o,r,c,l),0===Gn.lFrame.elementDepthCount&&sc(c,r),Gn.lFrame.elementDepthCount++,d&&(yk(o,r,l),vk(o,l,r)),null!==i&&xk(r,l),f}function g(){let n=Lo();XP()?YP():(n=n.parent,ac(n,!1));let t=n;Gn.lFrame.elementDepthCount--;let e=Ti();return e.firstCreatePass&&(RM(e,n),WP(n)&&e.queries.elementEnd(n)),null!=t.classesWithoutHost&&function(n){return 0!=(8&n.flags)}(t)&&_P(e,t,Ze(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(n){return 0!=(16&n.flags)}(t)&&_P(e,t,Ze(),t.stylesWithoutHost,!1),g}function k(n,t,e,i){return f(n,t,e,i),g(),k}function Gt(n,t,e){let i=Ze(),r=Ti(),o=n+Gr,a=r.firstCreatePass?function(n,t,e,i,r){let o=t.consts,a=nu(o,i),s=pf(t,n,8,"ng-container",a);return null!==a&&mM(s,a,!0),Mk(t,e,s,nu(o,r)),null!==t.queries&&t.queries.elementStart(t,s),s}(o,r,i,t,e):r.data[o];ac(a,!0);let s=i[o]=i[ui].createComment("");return OM(r,i,s,a),sc(s,i),IM(a)&&(yk(r,i,a),vk(r,a,i)),null!=e&&xk(i,a),Gt}function Wt(){let n=Lo(),t=Ti();return XP()?YP():(n=n.parent,ac(n,!1)),t.firstCreatePass&&(RM(t,n),WP(n)&&t.queries.elementEnd(n)),Wt}function hi(n,t,e){return Gt(n,t,e),Wt(),hi}function Te(){return Ze()}function Cf(n){return!!n&&"function"==typeof n.then}function Dk(n){return!!n&&"function"==typeof n.subscribe}var Ik=Dk;function A(n,t,e,i){let r=Ze(),o=Ti(),a=Lo();return aU(o,r,r[ui],a,n,t,i),A}function UM(n,t){let e=Lo(),i=Ze(),r=Ti();return aU(r,i,qz(QP(r.data),e,i),e,n,t),UM}function aU(n,t,e,i,r,o,a){let s=IM(i),c=n.firstCreatePass&&Wz(n),d=t[Ra],u=Gz(t),p=!0;if(3&i.type||a){let _=ss(i,t),M=a?a(_):_,y=u.length,x=a?I=>a(Ls(I[i.index])):i.index,R=null;if(!a&&s&&(R=function(n,t,e,i){let r=n.cleanup;if(null!=r)for(let o=0;o<r.length-1;o+=2){let a=r[o];if(a===e&&r[o+1]===i){let s=t[Y_],l=r[o+2];return s.length>l?s[l]:null}"string"==typeof a&&(o+=2)}return null}(n,t,r,i.index)),null!==R)(R.__ngLastListenerFn__||R).__ngNextListenerFn__=o,R.__ngLastListenerFn__=o,p=!1;else{o=FH(i,t,d,o,!1);let I=e.listen(M,r,o);u.push(o,I),c&&c.push(r,x,y,y+1)}}else o=FH(i,t,d,o,!1);let m,h=i.outputs;if(p&&null!==h&&(m=h[r])){let _=m.length;if(_)for(let M=0;M<_;M+=2){let B=t[m[M]][m[M+1]].subscribe(o),ee=u.length;u.push(o,B),c&&c.push(r,i.index,ee,-(ee+1))}}}function OH(n,t,e,i){try{return ks(6,t,e),!1!==e(i)}catch(r){return Xz(n,r),!1}finally{ks(7,t,e)}}function FH(n,t,e,i,r){return function o(a){if(a===Function)return i;Sk(n.componentOffset>-1?ed(n.index,t):t);let l=OH(t,e,i,a),c=o.__ngNextListenerFn__;for(;c;)l=OH(t,e,c,a)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(a.preventDefault(),a.returnValue=!1),l}}function w(n=1){return function(n){return(Gn.lFrame.contextLView=function(n,t){for(;n>0;)t=t[of],n--;return t}(n,Gn.lFrame.contextLView))[Ra]}(n)}function vle(n,t){let e=null,i=function(n){let t=n.attrs;if(null!=t){let e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let r=0;r<t.length;r++){let o=t[r];if("*"!==o){if(null===i?Pz(n,o,!0):fse(i,o))return r}else e=r}return e}function fn(n){let t=Ze()[xl][Aa];if(!t.projection){let i=t.projection=H_(n?n.length:1,null),r=i.slice(),o=t.child;for(;null!==o;){let a=n?vle(o,n):0;null!==a&&(r[a]?r[a].projectionNext=o:i[a]=o,r[a]=o),o=o.next}}}function Tt(n,t=0,e){let i=Ze(),r=Ti(),o=pf(r,Gr+n,16,null,e||null);null===o.projection&&(o.projection=t),YP(),32!=(32&o.flags)&&function(n,t,e){az(t[ui],0,t,e,J5(n,e,t),tz(e.parent||t[Aa],e,t))}(r,i,o)}function Zi(n,t,e){return _b(n,"",t,"",e),Zi}function _b(n,t,e,i,r){let o=Ze(),a=mf(o,t,e,i);return a!==zn&&ds(Ti(),Pr(),o,n,a,o[ui],r,!1),_b}function jM(n,t,e,i,r,o,a){let s=Ze(),l=ff(s,t,e,i,r,o);return l!==zn&&ds(Ti(),Pr(),s,n,l,s[ui],a,!1),jM}function jC(n,t){return n<<17|t<<2}function Kp(n){return n>>17&32767}function bP(n){return 2|n}function ef(n){return(131068&n)>>2}function yR(n,t){return-131069&n|t<<2}function vP(n){return 1|n}function NH(n,t,e,i,r){let o=n[e+1],a=null===t,s=i?Kp(o):ef(o),l=!1;for(;0!==s&&(!1===l||a);){let d=n[s+1];Sle(n[s],t)&&(l=!0,n[s+1]=i?vP(d):bP(d)),s=i?Kp(d):ef(d)}l&&(n[e+1]=i?bP(o):vP(o))}function Sle(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&db(n,t)>=0}var uo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function mU(n){return n.substring(uo.key,uo.keyEnd)}function Ele(n){return n.substring(uo.value,uo.valueEnd)}function fU(n,t){let e=uo.textEnd;return e===t?-1:(t=uo.keyEnd=function(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}(n,uo.key=t,e),tf(n,t,e))}function gU(n,t){let e=uo.textEnd,i=uo.key=tf(n,t,e);return e===i?-1:(i=uo.keyEnd=function(n,t,e){let i;for(;t<e&&(45===(i=n.charCodeAt(t))||95===i||(-33&i)>=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=LH(n,i,e),i=uo.value=tf(n,i,e),i=uo.valueEnd=function(n,t,e){let i=-1,r=-1,o=-1,a=t,s=a;for(;a<e;){let l=n.charCodeAt(a++);if(59===l)return s;34===l||39===l?s=a=BH(n,l,a,e):t===a-4&&85===o&&82===r&&76===i&&40===l?s=a=BH(n,41,a,e):l>32&&(s=a),o=r,r=i,i=-33&l}return s}(n,i,e),LH(n,i,e))}function _U(n){uo.key=0,uo.keyEnd=0,uo.value=0,uo.valueEnd=0,uo.textEnd=n.length}function tf(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function LH(n,t,e,i){return(t=tf(n,t,e))<e&&t++,t}function BH(n,t,e,i){let r=-1,o=e;for(;o<i;){let a=n.charCodeAt(o++);if(a==t&&92!==r)return o;r=92==a&&92===r?0:a}throw new Error}function Bt(n,t,e){return Sl(n,t,e,!1),Bt}function nt(n,t){return Sl(n,t,null,!0),nt}function Hs(n){El(yU,Ple,n,!1)}function Ple(n,t){for(let e=function(n){return _U(n),gU(n,tf(n,0,uo.textEnd))}(t);e>=0;e=gU(t,e))yU(n,mU(t),Ele(t))}function Xo(n){El(Ble,hc,n,!0)}function hc(n,t){for(let e=function(n){return _U(n),fU(n,tf(n,0,uo.textEnd))}(t);e>=0;e=fU(t,e))ls(n,mU(t),!0)}function Sl(n,t,e,i){let r=Ze(),o=Ti(),a=nd(2);o.firstUpdatePass&&vU(o,n,a,i),t!==zn&&qo(r,a,t)&&xU(o,o.data[da()],r,r[ui],n,r[a+1]=function(n,t){return null==n||""===n||("string"==typeof t?n+=t:"object"==typeof n&&(n=po(Oa(n)))),n}(t,e),i,a)}function El(n,t,e,i){let r=Ti(),o=nd(2);r.firstUpdatePass&&vU(r,null,o,i);let a=Ze();if(e!==zn&&qo(a,o,e)){let s=r.data[da()];if(CU(s,i)&&!bU(r,o)){let l=i?s.classesWithoutHost:s.stylesWithoutHost;null!==l&&(e=RR(l,e||"")),_P(r,s,a,e,i)}else!function(n,t,e,i,r,o,a,s){r===zn&&(r=ji);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;null!==d||null!==u;){let _,p=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,m=null;d===u?(l+=2,c+=2,p!==h&&(m=u,_=h)):null===u||null!==d&&d<u?(l+=2,m=d):(c+=2,m=u,_=h),null!==m&&xU(n,t,e,i,m,_,a,s),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}(r,s,a,a[ui],a[o+1],a[o+1]=function(n,t,e){if(null==e||""===e)return ji;let i=[],r=Oa(e);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if("object"==typeof r)for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else"string"==typeof r&&t(i,r);return i}(n,t,e),i,o)}}function bU(n,t){return t>=n.expandoStartIndex}function vU(n,t,e,i){let r=n.data;if(null===r[e+1]){let o=r[da()],a=bU(n,e);CU(o,i)&&null===t&&!a&&(t=!1),t=function(n,t,e,i){let r=QP(n),o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=$_(e=xR(null,n,t,e,i),t.attrs,i),o=null);else{let a=t.directiveStylingLast;if(-1===a||n[a]!==r)if(e=xR(r,n,t,e,i),null===o){let l=function(n,t,e){let i=e?t.classBindings:t.styleBindings;if(0!==ef(i))return n[Kp(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=xR(null,n,t,l[1],i),l=$_(l,t.attrs,i),function(n,t,e,i){n[Kp(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++)i=$_(i,n[o].hostAttrs,e);return $_(i,t.attrs,e)}(n,t,i)}return void 0!==o&&(i?t.residualClasses=o:t.residualStyles=o),e}(r,o,t,i),function(n,t,e,i,r,o){let a=o?t.classBindings:t.styleBindings,s=Kp(a),l=ef(a);n[i]=e;let d,c=!1;if(Array.isArray(e)?(d=e[1],(null===d||db(e,d)>0)&&(c=!0)):d=e,r)if(0!==l){let p=Kp(n[s+1]);n[i+1]=jC(p,s),0!==p&&(n[p+1]=yR(n[p+1],i)),n[s+1]=function(n,t){return 131071&n|t<<17}(n[s+1],i)}else n[i+1]=jC(s,0),0!==s&&(n[s+1]=yR(n[s+1],i)),s=i;else n[i+1]=jC(l,0),0===s?s=i:n[l+1]=yR(n[l+1],i),l=i;c&&(n[i+1]=bP(n[i+1])),NH(n,d,i,!0),NH(n,d,i,!1),function(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&db(o,t)>=0&&(e[i+1]=vP(e[i+1]))}(t,d,n,i,o),a=jC(s,l),o?t.classBindings=a:t.styleBindings=a}(r,o,t,e,a,i)}}function xR(n,t,e,i,r){let o=null,a=e.directiveEnd,s=e.directiveStylingLast;for(-1===s?s=e.directiveStart:s++;s<a&&(o=t[s],i=$_(i,o.hostAttrs,r),o!==n);)s++;return null!==n&&(e.directiveStylingLast=s),i}function $_(n,t,e){let i=e?1:2,r=-1;if(null!==t)for(let o=0;o<t.length;o++){let a=t[o];"number"==typeof a?r=a:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),ls(n,a,!!e||t[++o]))}return void 0===n?null:n}function yU(n,t,e){ls(n,t,Oa(e))}function Ble(n,t,e){let i=String(t);""!==i&&!i.includes(" ")&&ls(n,i,e)}function xU(n,t,e,i,r,o,a,s){if(!(3&t.type))return;let l=n.data,c=l[s+1],d=function(n){return 1==(1&n)}(c)?VH(l,t,e,r,ef(c),a):void 0;_M(d)||(_M(o)||function(n){return 2==(2&n)}(c)&&(o=VH(l,null,e,r,s,a)),function(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=-1===i.indexOf("-")?void 0:Ns.DashCase;null==r?n.removeStyle(e,i,o):("string"==typeof r&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Ns.Important),n.setStyle(e,i,r,o))}}(i,a,AM(da(),e),r,o))}function VH(n,t,e,i,r,o){let s,a=null===t;for(;r>0;){let l=n[r],c=Array.isArray(l),d=c?l[1]:l,u=null===d,p=e[r+1];p===zn&&(p=u?ji:void 0);let h=u?hR(p,i):d===i?p:void 0;if(c&&!_M(h)&&(h=hR(l,i)),_M(h)&&(s=h,a))return s;let m=n[r+1];r=a?Kp(m):ef(m)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(s=hR(l,i))}return s}function _M(n){return void 0!==n}function CU(n,t){return 0!=(n.flags&(t?8:16))}function T(n,t=""){let e=Ze(),i=Ti(),r=n+Gr,o=i.firstCreatePass?pf(i,r,1,t,null):i.data[r],a=e[r]=sk(e[ui],t);OM(i,e,a,o),ac(o,!1)}function kt(n){return Ve("",n,""),kt}function Ve(n,t,e){let i=Ze(),r=mf(i,n,t,e);return r!==zn&&od(i,da(),r),Ve}function lu(n,t,e,i,r){let o=Ze(),a=ff(o,n,t,e,i,r);return a!==zn&&od(o,da(),a),lu}function GM(n,t,e,i,r,o,a){let s=Ze(),l=gf(s,n,t,e,i,r,o,a);return l!==zn&&od(s,da(),l),GM}function bb(n,t,e){El(ls,hc,mf(Ze(),n,t,e),!0)}function wo(n,t,e){let i=Ze();return qo(i,sf(),t)&&ds(Ti(),Pr(),i,n,t,i[ui],e,!0),wo}function WM(n,t,e){let i=Ze();if(qo(i,sf(),t)){let o=Ti(),a=Pr();ds(o,a,i,n,t,qz(QP(o.data),a,i),e,!0)}return WM}var Vp=void 0,oce=["en",[["a","p"],["AM","PM"],Vp],[["AM","PM"],Vp,Vp],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Vp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Vp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Vp,"{1} 'at' {0}",Vp],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(n){let e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}],CR={};function Fa(n){let t=function(n){return n.toLowerCase().replace(/_/g,"-")}(n),e=HH(t);if(e)return e;let i=t.split("-")[0];if(e=HH(i),e)return e;if("en"===i)return oce;throw new xt(701,!1)}function HH(n){return n in CR||(CR[n]=zr.ng&&zr.ng.common&&zr.ng.common.locales&&zr.ng.common.locales[n]),CR[n]}var hr=(()=>{return(n=hr||(hr={}))[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",hr;var n})(),sce=["zero","one","two","few","many"];var bM="en-US",VU={marker:"element"},HU={marker:"ICU"},vl=(()=>{return(n=vl||(vl={}))[n.SHIFT=2]="SHIFT",n[n.APPEND_EAGERLY=1]="APPEND_EAGERLY",n[n.COMMENT=2]="COMMENT",vl;var n})(),zU=bM;function UU(n,t,e){let i=t.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?nz(n,0,e):Ls(e[r])}function jU(n,t,e,i,r){let o=t.insertBeforeIndex;if(Array.isArray(o)){let a=i,s=null;if(3&t.type||(s=a,a=r),null!==a&&-1===t.componentOffset)for(let l=1;l<o.length;l++)Yp(n,a,e[o[l]],s,!1)}}function GU(n,t){if(n.push(t),n.length>1)for(let e=n.length-2;e>=0;e--){let i=n[e];WU(i)||pce(i,t)&&null===hce(i)&&mce(i,t.index)}}function WU(n){return!(64&n.type)}function pce(n,t){return WU(t)||n.index>t.index}function hce(n){let t=n.insertBeforeIndex;return Array.isArray(t)?t[0]:t}function mce(n,t){let e=n.insertBeforeIndex;Array.isArray(e)?e[0]=t:(rz(UU,jU),n.insertBeforeIndex=t)}function U_(n,t){let e=n.data[t];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function _ce(n,t,e){let i=_k(n,e,64,null,null);return GU(t,i),i}function qM(n,t){let e=t[n.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function bce(n){return n>>>17}function vce(n){return(131070&n)>>>1}var eb=0,j_=0;function qU(n,t,e,i){let a,r=e[ui],o=null;for(let s=0;s<t.length;s++){let l=t[s];if("string"==typeof l){let c=t[++s];null===e[c]&&(e[c]=sk(r,l))}else if("number"==typeof l)switch(1&l){case 0:let d,u,c=bce(l);if(null===o&&(o=c,a=kM(r,i)),c===o?(d=i,u=a):(d=null,u=Ls(e[c])),null!==u){let _=vce(l);Yp(r,u,e[_],d,!1);let y=U_(n,_);if(null!==y&&"object"==typeof y){let x=qM(y,e);null!==x&&qU(n,y.create[x],e,e[y.anchorIdx])}}break;case 1:let h=t[++s],m=t[++s];wk(r,AM(l>>>1,e),null,null,h,m,null)}else switch(l){case HU:let c=t[++s],d=t[++s];null===e[d]&&sc(e[d]=aae(r,c),e);break;case VU:let u=t[++s],p=t[++s];null===e[p]&&sc(e[p]=lk(r,u,null),e)}}}function XU(n,t,e,i,r){for(let o=0;o<e.length;o++){let a=e[o],s=e[++o];if(a&r){let l="";for(let c=o+1;c<=o+s;c++){let d=e[c];if("string"==typeof d)l+=d;else if("number"==typeof d)if(d<0)l+=jn(t[i-d]);else{let u=d>>>2;switch(3&d){case 1:let p=e[++c],h=e[++c],m=n.data[u];"string"==typeof m?wk(t[ui],t[u],null,m,p,l,h):ds(n,m,t,p,l,t[ui],h,!1);break;case 0:let _=t[u];null!==_&&Q5(t[ui],_,l);break;case 2:wce(n,U_(n,u),t,l);break;case 3:zH(n,U_(n,u),i,t)}}}}else{let l=e[o+1];if(l>0&&3==(3&l)){let d=U_(n,l>>>2);t[d.currentCaseLViewIndex]<0&&zH(n,d,i,t)}}o+=s}}function zH(n,t,e,i){let r=i[t.currentCaseLViewIndex];if(null!==r){let o=eb;r<0&&(r=i[t.currentCaseLViewIndex]=~r,o=-1),XU(n,i,t.update[r],e,o)}}function wce(n,t,e,i){let r=function(n,t){let e=n.cases.indexOf(t);if(-1===e)switch(n.type){case 1:{let i=function(n,t){let e=function(n){return Fa(n)[hr.PluralCase]}(t)(parseInt(n,10)),i=sce[e];return void 0!==i?i:"other"}(t,zU);e=n.cases.indexOf(i),-1===e&&"other"!==i&&(e=n.cases.indexOf("other"));break}case 0:e=n.cases.indexOf("other")}return-1===e?null:e}(t,i);if(qM(t,e)!==r&&(YU(n,t,e),e[t.currentCaseLViewIndex]=null===r?null:~r,null!==r)){let a=e[t.anchorIdx];a&&qU(n,t.create[r],e,a)}}function YU(n,t,e){let i=qM(t,e);if(null!==i){let r=t.remove[i];for(let o=0;o<r.length;o++){let a=r[o];if(a>0){let s=AM(a,e);null!==s&&ck(e[ui],s)}else YU(n,U_(n,~a),e)}}}function Ece(){let e,i,n=[],t=-1;function o(s,l){t=0;let c=qM(s,l);i=null!==c?s.remove[c]:ji}function a(){if(t<i.length){let s=i[t++];return s>0?e[s]:(n.push(t,i),o(e[Fn].data[~s],e),a())}return 0===n.length?null:(i=n.pop(),t=n.pop(),a())}return function(s,l){for(e=l;n.length;)n.pop();return o(s.value,l),a}}var vM=/\ufffd(\d+):?\d*\ufffd/gi,Tce=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,Dce=/\ufffd(\d+)\ufffd/,QU=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,G_="\ufffd",Ice=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,Ace=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Rce=/\uE500/g;function ZU(n,t,e,i,r,o,a){let s=fb(n,i,1,null),l=s<<vl.SHIFT,c=Z_();t===c&&(c=null),null===c&&(l|=vl.APPEND_EAGERLY),a&&(l|=vl.COMMENT,function(n){void 0===GR&&(GR=n())}(Ece)),r.push(l,null===o?"":o);let d=_k(n,s,a?32:1,null===o?"":o,null);GU(e,d);let u=d.index;return ac(d,!1),null!==c&&t!==c&&function(n,t){let e=n.insertBeforeIndex;null===e?(rz(UU,jU),e=n.insertBeforeIndex=[null,t]):(function(n,t,e){1!=n&&i5("Expecting array here",n,!0,"==")}(Array.isArray(e)),e.push(t))}(c,u),d}function Oce(n,t,e,i,r,o,a){let s=a.match(vM),l=ZU(n,t,e,o,i,s?null:a,!1);s&&W_(r,a,l.index,null,0,null)}function W_(n,t,e,i,r,o){let a=n.length,s=a+1;n.push(null,null);let l=a+2,c=t.split(vM),d=0;for(let u=0;u<c.length;u++){let p=c[u];if(1&u){let h=r+parseInt(p,10);n.push(-1-h),d|=KU(h)}else""!==p&&n.push(p)}return n.push(e<<2|(i?1:0)),i&&n.push(i,o),n[a]=d,n[s]=n.length-l,d}function Nce(n){let t=0;for(let e=0;e<n.length;e++){let i=n[e];"number"==typeof i&&i<0&&t++}return t}function KU(n){return 1<<Math.min(n,31)}function UH(n){let t,o,e="",i=0,r=!1;for(;null!==(t=Ice.exec(n));)r?t[0]===`${G_}/*${o}${G_}`&&(i=t.index,r=!1):(e+=n.substring(i,t.index+t[0].length),o=t[1],r=!0);return e+=n.slice(i),e}function JU(n,t,e,i,r,o){let a=0,s={type:r.type,currentCaseLViewIndex:fb(n,t,1,null),anchorIdx:o,cases:[],create:[],remove:[],update:[]};(function(n,t,e){n.push(KU(t.mainBinding),2,-1-t.mainBinding,e<<2|2)})(e,r,o),function(n,t,e){let i=n.data[t];null===i?n.data[t]=e:i.value=e}(n,o,s);let l=r.values;for(let c=0;c<l.length;c++){let d=l[c],u=[];for(let p=0;p<d.length;p++){let h=d[p];if("string"!=typeof h){let m=u.push(h)-1;d[p]=`\x3c!--\ufffd${m}\ufffd--\x3e`}}a=Hce(n,s,t,e,i,r.cases[c],d.join(""),u)|a}a&&function(n,t,e){n.push(t,1,e<<2|3)}(e,a,o)}function Vce(n){let t=[],e=[],i=1,r=0,o=yP(n=n.replace(QU,function(a,s,l){return i="select"===l?0:1,r=parseInt(s.slice(1),10),""}));for(let a=0;a<o.length;){let s=o[a++].trim();1===i&&(s=s.replace(/\s*(?:=)?(\w+)\s*/,"$1")),s.length&&t.push(s);let l=yP(o[a++]);t.length>e.length&&e.push(l)}return{type:i,mainBinding:r,cases:t,values:e}}function yP(n){if(!n)return[];let o,t=0,e=[],i=[],r=/[{}]/g;for(r.lastIndex=0;o=r.exec(n);){let s=o.index;if("}"==o[0]){if(e.pop(),0==e.length){let l=n.substring(t,s);QU.test(l)?i.push(Vce(l)):i.push(l),t=s+1}}else{if(0==e.length){let l=n.substring(t,s);i.push(l),t=s+1}e.push("{")}}let a=n.substring(t);return i.push(a),i}function Hce(n,t,e,i,r,o,a,s){let l=[],c=[],d=[];t.cases.push(o),t.create.push(l),t.remove.push(c),t.update.push(d);let p=_z(uz()).getInertBodyElement(a),h=rP(p)||p;return h?$U(n,t,e,i,l,c,d,h,r,s,0):0}function $U(n,t,e,i,r,o,a,s,l,c,d){let u=0,p=s.firstChild;for(;p;){let h=fb(n,e,1,null);switch(p.nodeType){case Node.ELEMENT_NODE:let m=p,_=m.tagName.toLowerCase();if(nP.hasOwnProperty(_)){MR(r,VU,_,l,h),n.data[h]=_;let R=m.attributes;for(let I=0;I<R.length;I++){let B=R.item(I),ee=B.name.toLowerCase();B.value.match(vM)?xz.hasOwnProperty(ee)&&W_(a,B.value,h,B.name,0,pk[ee]?pb:null):Gce(r,h,B)}u=$U(n,t,e,i,r,o,a,p,h,c,d+1)|u,jH(o,h,d)}break;case Node.TEXT_NODE:let M=p.textContent||"",y=M.match(vM);MR(r,null,y?"":M,l,h),jH(o,h,d),y&&(u=W_(a,M,h,null,0,null)|u);break;case Node.COMMENT_NODE:let x=Dce.exec(p.textContent||"");if(x){let I=c[parseInt(x[1],10)];MR(r,HU,"",l,h),JU(n,e,i,l,I,h),zce(o,h,d)}}p=p.nextSibling}return u}function jH(n,t,e){0===e&&n.push(t)}function zce(n,t,e){0===e&&(n.push(~t),n.push(t))}function MR(n,t,e,i,r){null!==t&&n.push(t),n.push(e,r,function(n,t,e){return 0|t<<17|e<<1}(0,i,r))}function Gce(n,t,e){n.push(t<<1|1,e.name,e.value)}var GH=0,Wce=/\[(\ufffd.+?\ufffd?)\]/,qce=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,Xce=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Yce=/{([A-Z0-9_]+)}/g,Qce=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Zce=/\/\*/,Kce=/\d+\:(\d+)/;function ej(n,t,e=-1){let i=Ti(),r=Ze(),o=Gr+n,a=nu(i.consts,t),s=Z_();i.firstCreatePass&&function(n,t,e,i,r,o){let a=Z_(),s=[],l=[],c=[[]];r=function(n,t){if(function(n){return-1===n}(t))return UH(n);{let e=n.indexOf(`:${t}${G_}`)+2+t.toString().length,i=n.search(new RegExp(`${G_}\\/\\*\\d+:${t}${G_}`));return UH(n.substring(e,i))}}(r,o);let d=function(n){return n.replace(Rce," ")}(r).split(Ace);for(let u=0;u<d.length;u++){let p=d[u];if(0==(1&u)){let h=yP(p);for(let m=0;m<h.length;m++){let _=h[m];if(0==(1&m))""!==_&&Oce(n,a,c[0],s,l,e,_);else{let M=_;if("object"!=typeof M)throw new Error(`Unable to parse ICU expression in "${r}" message.`);JU(n,e,l,t,M,ZU(n,a,c[0],e,s,"",!0).index)}}}else{let h=47===p.charCodeAt(0),_=(p.charCodeAt(h?1:0),Gr+Number.parseInt(p.substring(h?2:1)));if(h)c.shift(),ac(Z_(),!1);else{let M=_ce(n,c[0],_);c.unshift([]),ac(M,!0)}}}n.data[i]={create:s,update:l}}(i,null===s?0:s.index,r,o,a,e);let l=i.data[o],d=$5(i,s===r[Aa]?null:s,r);(function(n,t,e,i){let r=n[ui];for(let o=0;o<t.length;o++){let a=t[o++],s=t[o],c=(a&vl.APPEND_EAGERLY)===vl.APPEND_EAGERLY,d=a>>>vl.SHIFT,u=n[d];null===u&&(u=n[d]=(a&vl.COMMENT)===vl.COMMENT?r.createComment(s):sk(r,s)),c&&null!==e&&Yp(r,e,u,i,!1)}})(r,l.create,d,s&&8&s.type?r[s.index]:null),M5(!0)}function tj(){M5(!1)}function XM(n,t,e){ej(n,t,e),tj()}function vb(n){return function(n){n&&(eb|=1<<Math.min(j_,31)),j_++}(qo(Ze(),sf(),n)),vb}function YM(n){!function(n,t,e){if(j_>0){let i=n.data[e];XU(n,t,Array.isArray(i)?i:i.update,td()-j_-1,eb)}eb=0,j_=0}(Ti(),Ze(),n+Gr)}function QM(n,t={}){return function(n,t={}){let e=n;if(Wce.test(n)){let i={},r=[GH];e=e.replace(qce,(o,a,s)=>{let l=a||s,c=i[l]||[];if(c.length||(l.split("|").forEach(_=>{let M=_.match(Kce),y=M?parseInt(M[1],10):GH,x=Zce.test(_);c.push([y,x,_])}),i[l]=c),!c.length)throw new Error(`i18n postprocess: unmatched placeholder - ${l}`);let d=r[r.length-1],u=0;for(let _=0;_<c.length;_++)if(c[_][0]===d){u=_;break}let[p,h,m]=c[u];return h?r.pop():d!==p&&r.push(p),c.splice(u,1),m})}return Object.keys(t).length&&(e=e.replace(Xce,(i,r,o,a,s,l)=>t.hasOwnProperty(o)?`${r}${t[o]}${l}`:i),e=e.replace(Yce,(i,r)=>t.hasOwnProperty(r)?t[r]:i),e=e.replace(Qce,(i,r)=>{if(t.hasOwnProperty(r)){let o=t[r];if(!o.length)throw new Error(`i18n postprocess: unmatched ICU - ${i} with key: ${r}`);return o.shift()}return i})),e}(n,t)}function xP(n,t,e,i,r){if(n=Ai(n),Array.isArray(n))for(let o=0;o<n.length;o++)xP(n[o],t,e,i,r);else{let o=Ti(),a=Ze(),s=$m(n)?n:Ai(n.provide),l=Dz(n),c=Lo(),d=1048575&c.providerIndexes,u=c.directiveStart,p=c.providerIndexes>>20;if($m(n)||!n.multi){let h=new qp(l,r,C),m=SR(s,t,r?d:d+p,u);-1===m?(zR(cM(c,a),o,s),wR(o,n,t.length),t.push(s),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(h),a.push(h)):(e[m]=h,a[m]=h)}else{let h=SR(s,t,d+p,u),m=SR(s,t,d,d+p),M=m>=0&&e[m];if(r&&!M||!r&&!(h>=0&&e[h])){zR(cM(c,a),o,s);let y=function(n,t,e,i,r){let o=new qp(n,e,C);return o.multi=[],o.index=t,o.componentProviders=0,nj(o,r,i&&!e),o}(r?nde:tde,e.length,r,i,l);!r&&M&&(e[m].providerFactory=y),wR(o,n,t.length,0),t.push(s),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),a.push(y)}else wR(o,n,h>-1?h:m,nj(e[r?m:h],l,!r&&i));!r&&i&&M&&e[m].componentProviders++}}}function wR(n,t,e,i){let r=$m(t),o=function(n){return!!n.useClass}(t);if(r||o){let l=(o?Ai(t.useClass):t).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let d=c.indexOf(e);-1===d?c.push(e,[i,l]):c[d+1].push(i,l)}else c.push(e,l)}}}function nj(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function SR(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function tde(n,t,e,i){return CP(this.multi,[])}function nde(n,t,e,i){let o,r=this.multi;if(this.providerFactory){let a=this.providerFactory.componentProviders,s=Xp(e,e[Fn],this.providerFactory.index,i);o=s.slice(0,a),CP(r,o);for(let l=a;l<s.length;l++)o.push(s[l])}else o=[],CP(r,o);return o}function CP(n,t){for(let e=0;e<n.length;e++)t.push((0,n[e])());return t}function Vt(n,t=[]){return e=>{e.providersResolver=(i,r)=>function(n,t,e){let i=Ti();if(i.firstCreatePass){let r=Cl(n);xP(e,i.data,i.blueprint,r,!0),xP(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}var iu=class{},MP=class{},wP=class extends iu{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new fM(this);let i=Zm(t);this._bootstrapComponents=QC(i.bootstrap),this._r3Injector=Fz(t,e,[{provide:iu,useValue:this},{provide:ho,useValue:this.componentFactoryResolver}],po(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},SP=class extends MP{constructor(t){super(),this.moduleType=t}create(t){return new wP(this.moduleType,t)}},EP=class extends iu{constructor(t,e,i){super(),this.componentFactoryResolver=new fM(this),this.instance=null;let r=new pM([...t,{provide:iu,useValue:this},{provide:ho,useValue:this.componentFactoryResolver}],e||gk(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}},ode=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){let i=Sz(0,e.type),r=i.length>0?function(n,t,e=null){return new EP(n,t,e).injector}([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ue({token:n,providedIn:"environment",factory:()=>new n(O(lc))}),n})();function Ak(n){n.getStandaloneInjector=t=>t.get(ode).getOrCreateStandaloneInjector(n)}function mc(n,t,e){let i=ca()+n,r=Ze();return r[i]===zn?pc(r,i,e?t.call(e):t()):gb(r,i)}function Un(n,t,e,i){return ij(Ze(),ca(),n,t,e,i)}function So(n,t,e,i,r){return rj(Ze(),ca(),n,t,e,i,r)}function yb(n,t,e,i,r,o){return oj(Ze(),ca(),n,t,e,i,r,o)}function Rk(n,t,e,i,r,o,a){return aj(Ze(),ca(),n,t,e,i,r,o,a)}function Pk(n,t,e,i,r,o,a,s){let l=ca()+n,c=Ze(),d=Bs(c,l,e,i,r,o);return qo(c,l+4,a)||d?pc(c,l+5,s?t.call(s,e,i,r,o,a):t(e,i,r,o,a)):gb(c,l+5)}function xb(n,t){let e=n[t];return e===zn?void 0:e}function ij(n,t,e,i,r,o){let a=t+e;return qo(n,a,r)?pc(n,a+1,o?i.call(o,r):i(r)):xb(n,a+1)}function rj(n,t,e,i,r,o,a){let s=t+e;return Zp(n,s,r,o)?pc(n,s+2,a?i.call(a,r,o):i(r,o)):xb(n,s+2)}function oj(n,t,e,i,r,o,a,s){let l=t+e;return zM(n,l,r,o,a)?pc(n,l+3,s?i.call(s,r,o,a):i(r,o,a)):xb(n,l+3)}function aj(n,t,e,i,r,o,a,s,l){let c=t+e;return Bs(n,c,r,o,a,s)?pc(n,c+4,l?i.call(l,r,o,a,s):i(r,o,a,s)):xb(n,c+4)}function sj(n,t,e,i,r,o){let a=t+e,s=!1;for(let l=0;l<r.length;l++)qo(n,a++,r[l])&&(s=!0);return s?pc(n,a,i.apply(o,r)):xb(n,a)}function U(n,t){let i,e=Ti(),r=n+Gr;e.firstCreatePass?(i=function(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];let o=i.factory||(i.factory=Gp(i.type)),a=Ps(C);try{let s=lM(!1),l=o();return lM(s),function(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,Ze(),r,l),l}finally{Ps(a)}}function G(n,t,e){let i=n+Gr,r=Ze(),o=af(r,i);return Cb(r,i)?ij(r,ca(),t,o.transform,e,o):o.transform(e)}function Jp(n,t,e,i){let r=n+Gr,o=Ze(),a=af(o,r);return Cb(o,r)?rj(o,ca(),t,a.transform,e,i,a):a.transform(e,i)}function kk(n,t,e,i,r){let o=n+Gr,a=Ze(),s=af(a,o);return Cb(a,o)?oj(a,ca(),t,s.transform,e,i,r,s):s.transform(e,i,r)}function Cb(n,t){return n[Fn].data[t].pure}function ER(n){return t=>{setTimeout(n,void 0,t)}}var F=class extends Ee{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),a=i;if(t&&"object"==typeof t){let l=t;r=l.next?.bind(l),o=l.error?.bind(l),a=l.complete?.bind(l)}this.__isAsync&&(o=ER(o),r&&(r=ER(r)),a&&(a=ER(a)));let s=super.subscribe({next:r,error:o,complete:a});return t instanceof En&&t.add(s),s}};function hde(){return this._results[Symbol.iterator]()}var Pa=class{get changes(){return this._changes||(this._changes=new F)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;let e=Pa.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=hde)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){let i=this;i.dirty=!1;let r=Jd(t);(this._changesDetected=!function(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=t[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}(i._results,r,e))&&(i._results=r,i.length=r.length,i.last=r[this.length-1],i.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}},oi=(()=>{class n{}return n.__NG_ELEMENT_ID__=gde,n})(),mde=oi,fde=class extends mde{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){let i=this._declarationTContainer.tView,r=BM(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[lb]=this._declarationLView[this._declarationTContainer.index];let a=this._declarationLView[oc];return null!==a&&(r[oc]=a.createEmbeddedView(i)),bk(i,r,t),new Qp(r)}};function gde(){return ZM(Lo(),Ze())}function ZM(n,t){return 4&n.type?new fde(t,n,uf(n,t)):null}var ei=(()=>{class n{}return n.__NG_ELEMENT_ID__=_de,n})();function _de(){return cj(Lo(),Ze())}var bde=ei,lj=class extends bde{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return uf(this._hostTNode,this._hostLView)}get injector(){return new jp(this._hostTNode,this._hostLView)}get parentInjector(){let t=$P(this._hostTNode,this._hostLView);if(P5(t)){let e=sM(t,this._hostLView),i=aM(t);return new jp(e[Fn].data[i+8],e)}return new jp(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=WH(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-Ia}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);let a=t.createEmbeddedView(e||{},o);return this.insert(a,r),a}createComponent(t,e,i,r,o){let s,a=t&&!F_(t);if(a)s=e;else{let u=e||{};s=u.index,i=u.injector,r=u.projectableNodes,o=u.environmentInjector||u.ngModuleRef}let l=a?t:new gM(Os(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){let p=(a?c:this.parentInjector).get(lc,null);p&&(o=p)}let d=l.create(c,r,void 0,o);return this.insert(d.hostView,s),d}insert(t,e){let i=t._lView,r=i[Fn];if($c(i[jr])){let d=this.indexOf(t);if(-1!==d)this.detach(d);else{let u=i[jr],p=new lj(u,u[Aa],u[jr]);p.detach(p.indexOf(t))}}let o=this._adjustIndex(e),a=this._lContainer;!function(n,t,e,i){let r=Ia+i,o=e.length;i>0&&(e[r-1][yl]=t),i<o-Ia?(t[yl]=e[r],U5(e,Ia+i,t)):(e.push(t),t[yl]=null),t[jr]=e;let a=t[lb];null!==a&&e!==a&&function(n,t){let e=n[Km];t[xl]!==t[jr][jr][xl]&&(n[p5]=!0),null===e?n[Km]=[t]:e.push(t)}(a,t);let s=t[oc];null!==s&&s.insertView(n),t[di]|=64}(r,i,a,o);let s=XR(o,a),l=i[ui],c=kM(l,a[GP]);return null!==c&&function(n,t,e,i,r,o){i[ou]=r,i[Aa]=t,ub(n,i,e,1,r,o)}(r,a[Aa],l,i,c,s),t.attachToViewContainerRef(),U5(TR(a),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=WH(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=WR(this._lContainer,e);i&&(dM(TR(this._lContainer),e),K5(i[Fn],i))}detach(t){let e=this._adjustIndex(t,-1),i=WR(this._lContainer,e);return i&&null!=dM(TR(this._lContainer),e)?new Qp(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function WH(n){return n[rM]}function TR(n){return n[rM]||(n[rM]=[])}function cj(n,t){let e,i=t[n.index];if($c(i))e=i;else{let r;if(8&n.type)r=Ls(i);else{let o=t[ui];r=o.createComment("");let a=ss(n,t);Yp(o,kM(o,a),r,function(n,t){return n.nextSibling(t)}(o,a),!1)}t[n.index]=e=Uz(i,t,r,n),HM(t,e)}return new lj(e,n,t)}var tb=class{constructor(t){this.queryList=t,this.matches=null}clone(){return new tb(this.queryList)}setDirty(){this.queryList.setDirty()}},nb=class{constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(null!==e){let i=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let o=0;o<i;o++){let a=e.getByIndex(o);r.push(this.queries[a.indexInDeclarationView].clone())}return new nb(r)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==hj(t,e).matches&&this.queries[e].setDirty()}},yM=class{constructor(t,e,i=null){this.predicate=t,this.flags=e,this.read=i}},ib=class{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){let r=null!==e?e.length:0,o=this.getByIndex(i).embeddedTView(t,r);o&&(o.indexInDeclarationView=i,null!==e?e.push(o):e=[o])}return null!==e?new ib(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},rb=class{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new rb(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){let e=this._declarationNodeIndex,i=t.parent;for(;null!==i&&8&i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(t,e,vde(e,o)),this.matchTNodeWithReadOption(t,e,qC(e,t,o,!1,!1))}else i===oi?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,qC(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){let r=this.metadata.read;if(null!==r)if(r===xe||r===ei||r===oi&&4&e.type)this.addMatch(e.index,-2);else{let o=qC(e,t,r,!1,!1);null!==o&&this.addMatch(e.index,o)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}};function vde(n,t){let e=n.localNames;if(null!==e)for(let i=0;i<e.length;i+=2)if(e[i]===t)return e[i+1];return null}function xde(n,t,e,i){return-1===e?function(n,t){return 11&n.type?uf(n,t):4&n.type?ZM(n,t):null}(t,n):-2===e?function(n,t,e){return e===xe?uf(t,n):e===oi?ZM(t,n):e===ei?cj(t,n):void 0}(n,t,i):Xp(n,n[Fn],e,t)}function dj(n,t,e,i){let r=t[oc].queries[i];if(null===r.matches){let o=n.data,a=e.matches,s=[];for(let l=0;l<a.length;l+=2){let c=a[l];s.push(c<0?null:xde(t,o[c],a[l+1],e.metadata.read))}r.matches=s}return r.matches}function DP(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(null!==o){let a=dj(n,t,r,e);for(let s=0;s<o.length;s+=2){let l=o[s];if(l>0)i.push(a[s/2]);else{let c=o[s+1],d=t[-l];for(let u=Ia;u<d.length;u++){let p=d[u];p[lb]===p[jr]&&DP(p[Fn],p,c,i)}if(null!==d[Km]){let u=d[Km];for(let p=0;p<u.length;p++){let h=u[p];DP(h[Fn],h,c,i)}}}}}return i}function be(n){let t=Ze(),e=Ti(),i=w5();ZP(i+1);let r=hj(e,i);if(n.dirty&&function(n){return 4==(4&n[di])}(t)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{let o=r.crossesNgTemplate?DP(e,t,i,[]):dj(e,t,r,i);n.reset(o,tse),n.notifyOnChanges()}return!0}return!1}function Ue(n,t,e){let i=Ti();i.firstCreatePass&&(pj(i,new yM(n,t,e),-1),2==(2&t)&&(i.staticViewQueries=!0)),uj(i,Ze(),t)}function Bn(n,t,e,i){let r=Ti();if(r.firstCreatePass){let o=Lo();pj(r,new yM(t,e,i),o.index),function(n,t){let e=n.contentQueries||(n.contentQueries=[]);t!==(e.length?e[e.length-1]:-1)&&e.push(n.queries.length-1,t)}(r,n),2==(2&e)&&(r.staticContentQueries=!0)}uj(r,Ze(),e)}function ve(){return n=Ze(),t=w5(),n[oc].queries[t].queryList;var n,t}function uj(n,t,e){let i=new Pa(4==(4&e));Vz(n,t,i,i.destroy),null===t[oc]&&(t[oc]=new nb),t[oc].queries.push(new tb(i))}function pj(n,t,e){null===n.queries&&(n.queries=new ib),n.queries.track(new rb(t,e))}function hj(n,t){return n.queries.getByIndex(t)}function jt(n,t){return ZM(n,t)}var $d={"\u0275\u0275attribute":Be,"\u0275\u0275attributeInterpolate1":function Kz(n,t,e,i,r,o){let a=Ze(),s=mf(a,t,e,i);return s!==zn&&uc(Pr(),a,n,s,r,o),Kz},"\u0275\u0275attributeInterpolate2":function Jz(n,t,e,i,r,o,a,s){let l=Ze(),c=ff(l,t,e,i,r,o);return c!==zn&&uc(Pr(),l,n,c,a,s),Jz},"\u0275\u0275attributeInterpolate3":function $z(n,t,e,i,r,o,a,s,l,c){let d=Ze(),u=gf(d,t,e,i,r,o,a,s);return u!==zn&&uc(Pr(),d,n,u,l,c),$z},"\u0275\u0275attributeInterpolate4":function eU(n,t,e,i,r,o,a,s,l,c,d,u){let p=Ze(),h=_f(p,t,e,i,r,o,a,s,l,c);return h!==zn&&uc(Pr(),p,n,h,d,u),eU},"\u0275\u0275attributeInterpolate5":function tU(n,t,e,i,r,o,a,s,l,c,d,u,p,h){let m=Ze(),_=bf(m,t,e,i,r,o,a,s,l,c,d,u);return _!==zn&&uc(Pr(),m,n,_,p,h),tU},"\u0275\u0275attributeInterpolate6":function nU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_){let M=Ze(),y=vf(M,t,e,i,r,o,a,s,l,c,d,u,p,h);return y!==zn&&uc(Pr(),M,n,y,m,_),nU},"\u0275\u0275attributeInterpolate7":function iU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y){let x=Ze(),R=yf(x,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_);return R!==zn&&uc(Pr(),x,n,R,M,y),iU},"\u0275\u0275attributeInterpolate8":function rU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y,x,R){let I=Ze(),B=xf(I,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y);return B!==zn&&uc(Pr(),I,n,B,x,R),rU},"\u0275\u0275attributeInterpolateV":function oU(n,t,e,i){let r=Ze(),o=hf(r,t);return o!==zn&&uc(Pr(),r,n,o,e,i),oU},"\u0275\u0275defineComponent":P,"\u0275\u0275defineDirective":Me,"\u0275\u0275defineInjectable":ue,"\u0275\u0275defineInjector":H,"\u0275\u0275defineNgModule":z,"\u0275\u0275definePipe":rf,"\u0275\u0275directiveInject":C,"\u0275\u0275getInheritedFactory":Xn,"\u0275\u0275inject":O,"\u0275\u0275injectAttribute":Mo,"\u0275\u0275invalidFactory":cs,"\u0275\u0275invalidFactoryDep":a5,"\u0275\u0275templateRefExtractor":jt,"\u0275\u0275resetView":ie,"\u0275\u0275HostDirectivesFeature":function(n){return t=>{t.findHostDirectiveDefs=Qz,t.hostDirectives=(Array.isArray(n)?n:n()).map(e=>"function"==typeof e?{directive:Ai(e),inputs:Zc,outputs:Zc}:{directive:Ai(e.directive),inputs:kH(e.inputs),outputs:kH(e.outputs)})}},"\u0275\u0275NgOnChangesFeature":qt,"\u0275\u0275ProvidersFeature":Vt,"\u0275\u0275CopyDefinitionFeature":function(n){let e,t=Yz(n.type);e=Cl(n)?t.\u0275cmp:t.\u0275dir;let i=n;for(let r of lle)i[r]=e[r];if(Cl(e))for(let r of cle)i[r]=e[r]},"\u0275\u0275InheritDefinitionFeature":Xe,"\u0275\u0275StandaloneFeature":Ak,"\u0275\u0275nextContext":w,"\u0275\u0275namespaceHTML":ua,"\u0275\u0275namespaceMathML":function(){Gn.lFrame.currentNamespace=_5},"\u0275\u0275namespaceSVG":qn,"\u0275\u0275enableBindings":function(){Gn.bindingsEnabled=!0},"\u0275\u0275disableBindings":function(){Gn.bindingsEnabled=!1},"\u0275\u0275elementStart":f,"\u0275\u0275elementEnd":g,"\u0275\u0275element":k,"\u0275\u0275elementContainerStart":Gt,"\u0275\u0275elementContainerEnd":Wt,"\u0275\u0275elementContainer":hi,"\u0275\u0275pureFunction0":mc,"\u0275\u0275pureFunction1":Un,"\u0275\u0275pureFunction2":So,"\u0275\u0275pureFunction3":yb,"\u0275\u0275pureFunction4":Rk,"\u0275\u0275pureFunction5":Pk,"\u0275\u0275pureFunction6":function(n,t,e,i,r,o,a,s,l){let c=ca()+n,d=Ze(),u=Bs(d,c,e,i,r,o);return Zp(d,c+4,a,s)||u?pc(d,c+6,l?t.call(l,e,i,r,o,a,s):t(e,i,r,o,a,s)):gb(d,c+6)},"\u0275\u0275pureFunction7":function(n,t,e,i,r,o,a,s,l,c){let d=ca()+n,u=Ze(),p=Bs(u,d,e,i,r,o);return zM(u,d+4,a,s,l)||p?pc(u,d+7,c?t.call(c,e,i,r,o,a,s,l):t(e,i,r,o,a,s,l)):gb(u,d+7)},"\u0275\u0275pureFunction8":function(n,t,e,i,r,o,a,s,l,c,d){let u=ca()+n,p=Ze(),h=Bs(p,u,e,i,r,o);return Bs(p,u+4,a,s,l,c)||h?pc(p,u+8,d?t.call(d,e,i,r,o,a,s,l,c):t(e,i,r,o,a,s,l,c)):gb(p,u+8)},"\u0275\u0275pureFunctionV":function(n,t,e,i){return sj(Ze(),ca(),n,t,e,i)},"\u0275\u0275getCurrentView":Te,"\u0275\u0275restoreView":ne,"\u0275\u0275listener":A,"\u0275\u0275projection":Tt,"\u0275\u0275syntheticHostProperty":WM,"\u0275\u0275syntheticHostListener":UM,"\u0275\u0275pipeBind1":G,"\u0275\u0275pipeBind2":Jp,"\u0275\u0275pipeBind3":kk,"\u0275\u0275pipeBind4":function(n,t,e,i,r,o){let a=n+Gr,s=Ze(),l=af(s,a);return Cb(s,a)?aj(s,ca(),t,l.transform,e,i,r,o,l):l.transform(e,i,r,o)},"\u0275\u0275pipeBindV":function(n,t,e){let i=n+Gr,r=Ze(),o=af(r,i);return Cb(r,i)?sj(r,ca(),t,o.transform,e,o):o.transform.apply(o,e)},"\u0275\u0275projectionDef":fn,"\u0275\u0275hostProperty":wo,"\u0275\u0275property":b,"\u0275\u0275propertyInterpolate":Zi,"\u0275\u0275propertyInterpolate1":_b,"\u0275\u0275propertyInterpolate2":jM,"\u0275\u0275propertyInterpolate3":function sU(n,t,e,i,r,o,a,s,l){let c=Ze(),d=gf(c,t,e,i,r,o,a,s);return d!==zn&&ds(Ti(),Pr(),c,n,d,c[ui],l,!1),sU},"\u0275\u0275propertyInterpolate4":function lU(n,t,e,i,r,o,a,s,l,c,d){let u=Ze(),p=_f(u,t,e,i,r,o,a,s,l,c);return p!==zn&&ds(Ti(),Pr(),u,n,p,u[ui],d,!1),lU},"\u0275\u0275propertyInterpolate5":function cU(n,t,e,i,r,o,a,s,l,c,d,u,p){let h=Ze(),m=bf(h,t,e,i,r,o,a,s,l,c,d,u);return m!==zn&&ds(Ti(),Pr(),h,n,m,h[ui],p,!1),cU},"\u0275\u0275propertyInterpolate6":function dU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m){let _=Ze(),M=vf(_,t,e,i,r,o,a,s,l,c,d,u,p,h);return M!==zn&&ds(Ti(),Pr(),_,n,M,_[ui],m,!1),dU},"\u0275\u0275propertyInterpolate7":function uU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){let y=Ze(),x=yf(y,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_);return x!==zn&&ds(Ti(),Pr(),y,n,x,y[ui],M,!1),uU},"\u0275\u0275propertyInterpolate8":function pU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y,x){let R=Ze(),I=xf(R,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y);return I!==zn&&ds(Ti(),Pr(),R,n,I,R[ui],x,!1),pU},"\u0275\u0275propertyInterpolateV":function hU(n,t,e){let i=Ze(),r=hf(i,t);return r!==zn&&ds(Ti(),Pr(),i,n,r,i[ui],e,!1),hU},"\u0275\u0275pipe":U,"\u0275\u0275queryRefresh":be,"\u0275\u0275viewQuery":Ue,"\u0275\u0275loadQuery":ve,"\u0275\u0275contentQuery":Bn,"\u0275\u0275reference":st,"\u0275\u0275classMap":Xo,"\u0275\u0275classMapInterpolate1":bb,"\u0275\u0275classMapInterpolate2":function(n,t,e,i,r){El(ls,hc,ff(Ze(),n,t,e,i,r),!0)},"\u0275\u0275classMapInterpolate3":function(n,t,e,i,r,o,a){El(ls,hc,gf(Ze(),n,t,e,i,r,o,a),!0)},"\u0275\u0275classMapInterpolate4":function(n,t,e,i,r,o,a,s,l){El(ls,hc,_f(Ze(),n,t,e,i,r,o,a,s,l),!0)},"\u0275\u0275classMapInterpolate5":function(n,t,e,i,r,o,a,s,l,c,d){El(ls,hc,bf(Ze(),n,t,e,i,r,o,a,s,l,c,d),!0)},"\u0275\u0275classMapInterpolate6":function(n,t,e,i,r,o,a,s,l,c,d,u,p){El(ls,hc,vf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p),!0)},"\u0275\u0275classMapInterpolate7":function(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m){El(ls,hc,yf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p,h,m),!0)},"\u0275\u0275classMapInterpolate8":function(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){El(ls,hc,xf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M),!0)},"\u0275\u0275classMapInterpolateV":function(n){El(ls,hc,hf(Ze(),n),!0)},"\u0275\u0275styleMap":Hs,"\u0275\u0275styleMapInterpolate1":function(n,t,e){Hs(mf(Ze(),n,t,e))},"\u0275\u0275styleMapInterpolate2":function(n,t,e,i,r){Hs(ff(Ze(),n,t,e,i,r))},"\u0275\u0275styleMapInterpolate3":function(n,t,e,i,r,o,a){Hs(gf(Ze(),n,t,e,i,r,o,a))},"\u0275\u0275styleMapInterpolate4":function(n,t,e,i,r,o,a,s,l){Hs(_f(Ze(),n,t,e,i,r,o,a,s,l))},"\u0275\u0275styleMapInterpolate5":function(n,t,e,i,r,o,a,s,l,c,d){Hs(bf(Ze(),n,t,e,i,r,o,a,s,l,c,d))},"\u0275\u0275styleMapInterpolate6":function(n,t,e,i,r,o,a,s,l,c,d,u,p){Hs(vf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p))},"\u0275\u0275styleMapInterpolate7":function(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m){Hs(yf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p,h,m))},"\u0275\u0275styleMapInterpolate8":function(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){Hs(xf(Ze(),n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M))},"\u0275\u0275styleMapInterpolateV":function(n){Hs(hf(Ze(),n))},"\u0275\u0275styleProp":Bt,"\u0275\u0275stylePropInterpolate1":function IU(n,t,e,i,r){return Sl(n,mf(Ze(),t,e,i),r,!1),IU},"\u0275\u0275stylePropInterpolate2":function AU(n,t,e,i,r,o,a){return Sl(n,ff(Ze(),t,e,i,r,o),a,!1),AU},"\u0275\u0275stylePropInterpolate3":function RU(n,t,e,i,r,o,a,s,l){return Sl(n,gf(Ze(),t,e,i,r,o,a,s),l,!1),RU},"\u0275\u0275stylePropInterpolate4":function PU(n,t,e,i,r,o,a,s,l,c,d){return Sl(n,_f(Ze(),t,e,i,r,o,a,s,l,c),d,!1),PU},"\u0275\u0275stylePropInterpolate5":function kU(n,t,e,i,r,o,a,s,l,c,d,u,p){return Sl(n,bf(Ze(),t,e,i,r,o,a,s,l,c,d,u),p,!1),kU},"\u0275\u0275stylePropInterpolate6":function OU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m){return Sl(n,vf(Ze(),t,e,i,r,o,a,s,l,c,d,u,p,h),m,!1),OU},"\u0275\u0275stylePropInterpolate7":function FU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){return Sl(n,yf(Ze(),t,e,i,r,o,a,s,l,c,d,u,p,h,m,_),M,!1),FU},"\u0275\u0275stylePropInterpolate8":function NU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y,x){return Sl(n,xf(Ze(),t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y),x,!1),NU},"\u0275\u0275stylePropInterpolateV":function LU(n,t,e){return Sl(n,hf(Ze(),t),e,!1),LU},"\u0275\u0275classProp":nt,"\u0275\u0275advance":v,"\u0275\u0275template":S,"\u0275\u0275text":T,"\u0275\u0275textInterpolate":kt,"\u0275\u0275textInterpolate1":Ve,"\u0275\u0275textInterpolate2":lu,"\u0275\u0275textInterpolate3":GM,"\u0275\u0275textInterpolate4":function MU(n,t,e,i,r,o,a,s,l){let c=Ze(),d=_f(c,n,t,e,i,r,o,a,s,l);return d!==zn&&od(c,da(),d),MU},"\u0275\u0275textInterpolate5":function wU(n,t,e,i,r,o,a,s,l,c,d){let u=Ze(),p=bf(u,n,t,e,i,r,o,a,s,l,c,d);return p!==zn&&od(u,da(),p),wU},"\u0275\u0275textInterpolate6":function SU(n,t,e,i,r,o,a,s,l,c,d,u,p){let h=Ze(),m=vf(h,n,t,e,i,r,o,a,s,l,c,d,u,p);return m!==zn&&od(h,da(),m),SU},"\u0275\u0275textInterpolate7":function EU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m){let _=Ze(),M=yf(_,n,t,e,i,r,o,a,s,l,c,d,u,p,h,m);return M!==zn&&od(_,da(),M),EU},"\u0275\u0275textInterpolate8":function TU(n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){let y=Ze(),x=xf(y,n,t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M);return x!==zn&&od(y,da(),x),TU},"\u0275\u0275textInterpolateV":function DU(n){let t=Ze(),e=hf(t,n);return e!==zn&&od(t,da(),e),DU},"\u0275\u0275i18n":XM,"\u0275\u0275i18nAttributes":function(n,t){let e=Ti(),i=nu(e.consts,t);!function(n,t,e){let r=Lo().index,o=[];if(n.firstCreatePass&&null===n.data[t]){for(let a=0;a<e.length;a+=2){let s=e[a],l=e[a+1];if(""!==l){if(Tce.test(l))throw new Error(`ICU expressions are not supported in attributes. Message: "${l}".`);W_(o,l,r,s,Nce(o),null)}}n.data[t]=o}}(e,n+Gr,i)},"\u0275\u0275i18nExp":vb,"\u0275\u0275i18nStart":ej,"\u0275\u0275i18nEnd":tj,"\u0275\u0275i18nApply":YM,"\u0275\u0275i18nPostprocess":QM,"\u0275\u0275resolveWindow":function(n){return n.ownerDocument.defaultView},"\u0275\u0275resolveDocument":su,"\u0275\u0275resolveBody":function(n){return n.ownerDocument.body},"\u0275\u0275setComponentScope":sb,"\u0275\u0275setNgModuleScope":function(n,t){return ru(()=>{let e=Zm(n,!0);e.declarations=t.declarations||ji,e.imports=t.imports||ji,e.exports=t.exports||ji})},"\u0275\u0275registerNgModuleType":q5,"\u0275\u0275sanitizeHtml":mk,"\u0275\u0275sanitizeStyle":function(n){let t=mb();return t?t.sanitize(Ur.STYLE,n)||"":wl(n,"Style")?Oa(n):jn(n)},"\u0275\u0275sanitizeResourceUrl":Cz,"\u0275\u0275sanitizeScript":function(n){let t=mb();if(t)return xH(t.sanitize(Ur.SCRIPT,n)||"");if(wl(n,"Script"))return xH(Oa(n));throw new xt(905,!1)},"\u0275\u0275sanitizeUrl":Vs,"\u0275\u0275sanitizeUrlOrResourceUrl":function(n,t,e){return function(n,t){return"src"===t&&("embed"===n||"frame"===n||"iframe"===n||"media"===n||"script"===n)||"href"===t&&("base"===n||"link"===n)?Cz:Vs}(t,e)(n)},"\u0275\u0275trustConstantHtml":function(n){return df(n[0])},"\u0275\u0275trustConstantResourceUrl":function(n){return function(n){return cz()?.createScriptURL(n)||n}(n[0])},"\u0275\u0275validateIframeAttribute":function(n,t,e){let i=Ze(),r=Pr(),o=ss(r,i);if(2===r.type&&"iframe"===t.toLowerCase()){let a=o;throw a.src="",a.srcdoc=df(""),ck(i[ui],a),new xt(-910,!1)}return n},forwardRef:Wn,resolveForwardRef:Ai},N_=null;function mj(n){return!!Zm(n)}var KC=[],DR=!1;function fj(n){return Array.isArray(n)?n.every(fj):!!Ai(n)}function Pde(n,t){let e=Jd(t.declarations||ji),i=nf(n);e.forEach(r=>{(r=Ai(r)).hasOwnProperty(EM)?gj(Os(r),i):!r.hasOwnProperty(zP)&&!r.hasOwnProperty(UP)&&(r.ngSelectorScope=n)})}function gj(n,t){n.directiveDefs=()=>Array.from(t.compilation.directives).map(e=>e.hasOwnProperty(EM)?Os(e):eu(e)).filter(e=>!!e),n.pipeDefs=()=>Array.from(t.compilation.pipes).map(e=>tu(e)),n.schemas=t.schemas,n.tView=null}function nf(n){if(mj(n))return function(n){let t=Zm(n,!0);if(null!==t.transitiveCompileScopes)return t.transitiveCompileScopes;let e={schemas:t.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return QC(t.imports).forEach(i=>{let r=nf(i);r.exported.directives.forEach(o=>e.compilation.directives.add(o)),r.exported.pipes.forEach(o=>e.compilation.pipes.add(o))}),QC(t.declarations).forEach(i=>{tu(i)?e.compilation.pipes.add(i):e.compilation.directives.add(i)}),QC(t.exports).forEach(i=>{let r=i;if(mj(r)){let o=nf(r);o.exported.directives.forEach(a=>{e.compilation.directives.add(a),e.exported.directives.add(a)}),o.exported.pipes.forEach(a=>{e.compilation.pipes.add(a),e.exported.pipes.add(a)})}else tu(r)?e.exported.pipes.add(r):e.exported.directives.add(r)}),t.transitiveCompileScopes=e,e}(n);if(l5(n)){if(null!==(Os(n)||eu(n)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([n]),pipes:new Set}};if(null!==tu(n))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([n])}}}throw new Error(`${n.name} does not have a module def (\u0275mod property)`)}function qH(n){return function(n){return void 0!==n.ngModule}(n)?n.ngModule:n}var IR=0;function _j(n,t){let e=null;vj(n,t||{}),Object.defineProperty(n,zP,{get:()=>{if(null===e){let i=bj(n,t||{});e=Fs().compileDirective($d,i.sourceMapUrl,i.metadata)}return e},configurable:!1})}function bj(n,t){let e=n&&n.name,i=`ng:///${e}/\u0275dir.js`,r=Fs(),o=yj(n,t);return o.typeSourceSpan=r.createParseSourceSpan("Directive",e,i),o.usesInheritance&&xj(n),{metadata:o,sourceMapUrl:i}}function vj(n,t){let e=null;Object.defineProperty(n,Kc,{get:()=>{if(null===e){let i=bj(n,t),r=Fs();e=r.compileFactory($d,`ng:///${n.name}/\u0275fac.js`,{name:i.metadata.name,type:i.metadata.type,typeArgumentCount:0,deps:PM(n),target:r.FactoryTarget.Directive})}return e},configurable:!1})}function Lde(n){return Object.getPrototypeOf(n.prototype)===Object.prototype}function yj(n,t){let e=nk(),i=e.ownPropMetadata(n);return{name:n.name,type:n,selector:void 0!==t.selector?t.selector:null,host:t.host||Zc,propMetadata:i,inputs:t.inputs||ji,outputs:t.outputs||ji,queries:XH(n,i,Cj),lifecycle:{usesOnChanges:e.hasLifecycleHook(n,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!Lde(n),exportAs:Hde(t.exportAs),providers:t.providers||null,viewQueries:XH(n,i,Mj),isStandalone:!!t.standalone,hostDirectives:t.hostDirectives?.map(r=>"function"==typeof r?{directive:r}:r)||null}}function xj(n){let t=Object.prototype,e=Object.getPrototypeOf(n.prototype).constructor;for(;e&&e!==t;)!eu(e)&&!Os(e)&&Ude(e)&&_j(e,null),e=Object.getPrototypeOf(e)}function Bde(n){return"string"==typeof n?Sj(n):Ai(n)}function Vde(n,t){return{propertyName:n,predicate:Bde(t.selector),descendants:t.descendants,first:t.first,read:t.read?t.read:null,static:!!t.static,emitDistinctChangesOnly:!!t.emitDistinctChangesOnly}}function XH(n,t,e){let i=[];for(let r in t)if(t.hasOwnProperty(r)){let o=t[r];o.forEach(a=>{if(e(a)){if(!a.selector)throw new Error(`Can't construct a query for the property "${r}" of "${BP(n)}" since the query selector wasn't defined.`);if(o.some(wj))throw new Error("Cannot combine @Input decorators with query decorators");i.push(Vde(r,a))}})}return i}function Hde(n){return void 0===n?null:Sj(n)}function Cj(n){let t=n.ngMetadataName;return"ContentChild"===t||"ContentChildren"===t}function Mj(n){let t=n.ngMetadataName;return"ViewChild"===t||"ViewChildren"===t}function wj(n){return"Input"===n.ngMetadataName}function Sj(n){return n.split(",").map(t=>t.trim())}var zde=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function Ude(n){let t=nk();if(zde.some(i=>t.hasLifecycleHook(n,i)))return!0;let e=t.propMetadata(n);for(let i in e){let r=e[i];for(let o=0;o<r.length;o++){let a=r[o],s=a.ngMetadataName;if(wj(a)||Cj(a)||Mj(a)||"Output"===s||"HostBinding"===s||"HostListener"===s)return!0}}return!1}function YH(n,t){return{type:n,name:n.name,pipeName:t.name,pure:void 0===t.pure||t.pure,isStandalone:!!t.standalone}}var Gde=cb("Directive",(n={})=>n,void 0,void 0,(n,t)=>_j(n,t));function xM(...n){}cb("Component",(n={})=>({changeDetection:B_.Default,...n}),Gde,void 0,(n,t)=>function(n,t){let e=null;(function(n,t){W5(t)&&(J_.set(n,t),G5.add(n))})(n,t),vj(n,t),Object.defineProperty(n,EM,{get:()=>{if(null===e){let i=Fs();if(W5(t)){let c=[`Component '${n.name}' is not resolved:`];throw t.templateUrl&&c.push(` - templateUrl: ${t.templateUrl}`),t.styleUrls&&t.styleUrls.length&&c.push(` - styleUrls: ${JSON.stringify(t.styleUrls)}`),c.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(c.join("\n"))}let o=t.preserveWhitespaces;void 0===o&&(o=null!==N_&&void 0!==N_.preserveWhitespaces&&N_.preserveWhitespaces);let a=t.encapsulation;void 0===a&&(a=null!==N_&&void 0!==N_.defaultEncapsulation?N_.defaultEncapsulation:as.Emulated);let s=t.templateUrl||`ng:///${n.name}/template.html`,l={...yj(n,t),typeSourceSpan:i.createParseSourceSpan("Component",n.name,s),template:t.template||"",preserveWhitespaces:o,styles:t.styles||ji,animations:t.animations,declarations:[],changeDetection:t.changeDetection,encapsulation:a,interpolation:t.interpolation,viewProviders:t.viewProviders||null};IR++;try{if(l.usesInheritance&&xj(n),e=i.compileComponent($d,s,l),t.standalone){let c=Jd(t.imports||ji),{directiveDefs:d,pipeDefs:u}=function(n,t){let e=null,i=null;return{directiveDefs:()=>{if(null===e){e=[Os(n)];let a=new Set;for(let s of t){let l=Ai(s);if(!a.has(l))if(a.add(l),Zm(l)){let c=nf(l);for(let d of c.exported.directives){let u=Os(d)||eu(d);u&&!a.has(d)&&(a.add(d),e.push(u))}}else{let c=Os(l)||eu(l);c&&e.push(c)}}}return e},pipeDefs:()=>{if(null===i){i=[];let a=new Set;for(let s of t){let l=Ai(s);if(!a.has(l))if(a.add(l),Zm(l)){let c=nf(l);for(let d of c.exported.pipes){let u=tu(d);u&&!a.has(d)&&(a.add(d),i.push(u))}}else{let c=tu(l);c&&i.push(c)}}}return i}}}(n,c);e.directiveDefs=d,e.pipeDefs=u,e.dependencies=()=>c.map(Ai)}}finally{IR--}if(0===IR&&function(){if(!DR){DR=!0;try{for(let n=KC.length-1;n>=0;n--){let{moduleType:t,ngModule:e}=KC[n];e.declarations&&e.declarations.every(fj)&&(KC.splice(n,1),Pde(t,e))}}finally{DR=!1}}}(),function(n){return void 0!==n.ngSelectorScope}(n)){let c=nf(n.ngSelectorScope);gj(e,c)}if(t.schemas){if(!t.standalone)throw new Error(`The 'schemas' was specified for the ${BP(n)} but is only valid on a component that is standalone.`);e.schemas=t.schemas}else t.standalone&&(e.schemas=[])}return e},configurable:!1})}(n,t)),cb("Pipe",n=>({pure:!0,...n}),void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;Object.defineProperty(n,Kc,{get:()=>{if(null===i){let r=YH(n,t),o=Fs();i=o.compileFactory($d,`ng:///${r.name}/\u0275fac.js`,{name:r.name,type:r.type,typeArgumentCount:0,deps:PM(n),target:o.FactoryTarget.Pipe})}return i},configurable:!1}),Object.defineProperty(n,UP,{get:()=>{if(null===e){let r=YH(n,t);e=Fs().compilePipe($d,`ng:///${r.name}/\u0275pipe.js`,r)}return e},configurable:!1})}(n,t)),au("Input",n=>({bindingPropertyName:n})),au("Output",n=>({bindingPropertyName:n})),au("HostBinding",n=>({hostPropertyName:n})),au("HostListener",(n,t)=>({eventName:n,args:t})),cb("NgModule",n=>n,void 0,void 0,(n,t)=>function(n,t={}){(function(n,t,e=!1){let i=Jd(t.declarations||ji),r=null;Object.defineProperty(n,s5,{configurable:!0,get:()=>(null===r&&(r=Fs().compileNgModule($d,`ng:///${n.name}/\u0275mod.js`,{type:n,bootstrap:Jd(t.bootstrap||ji).map(Ai),declarations:i.map(Ai),imports:Jd(t.imports||ji).map(Ai).map(qH),exports:Jd(t.exports||ji).map(Ai).map(qH),schemas:t.schemas?Jd(t.schemas):null,id:t.id||null}),r.schemas||(r.schemas=[])),r)});let o=null;Object.defineProperty(n,Kc,{get:()=>{if(null===o){let s=Fs();o=s.compileFactory($d,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,deps:PM(n),target:s.FactoryTarget.NgModule,typeArgumentCount:0})}return o},configurable:!1});let a=null;Object.defineProperty(n,PR,{get:()=>{if(null===a){let s={name:n.name,type:n,providers:t.providers||ji,imports:[(t.imports||ji).map(Ai),(t.exports||ji).map(Ai)]};a=Fs().compileInjector($d,`ng:///${n.name}/\u0275inj.js`,s)}return a},configurable:!1})})(n,t),void 0!==t.id&&q5(n,t.id),function(n,t){KC.push({moduleType:n,ngModule:t})}(n,t)}(n,t));var Ok=new te("Application Initializer"),KM=(()=>{class n{constructor(e){this.appInits=e,this.resolve=xM,this.reject=xM,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;let e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r<this.appInits.length;r++){let o=this.appInits[r]();if(Cf(o))e.push(o);else if(Ik(o)){let a=new Promise((s,l)=>{o.subscribe({complete:s,error:l})});e.push(a)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(O(Ok,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$p=new te("AppId",{providedIn:"root",factory:function(){return`${AR()}${AR()}${AR()}`}});function AR(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var Fk=new te("Platform Initializer"),fc=new te("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),pi=(new te("Application Packages Root URL"),new te("AnimationModuleType")),ad=new te("LocaleId",{providedIn:"root",factory:()=>$n(ad,Ci.Optional|Ci.SkipSelf)||typeof $localize<"u"&&$localize.locale||bM}),Qde=(new te("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"}),new te("Translations"),new te("TranslationsFormat"),new te("compilerOptions"),Promise.resolve(0));function IP(n){typeof Zone>"u"?Qde.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}var ot=class{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new F(!1),this.onMicrotaskEmpty=new F(!1),this.onStable=new F(!1),this.onError=new F(!1),typeof Zone>"u")throw new xt(908,!1);Zone.assertZonePatched();let r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function(){let n=zr.requestAnimationFrame,t=zr.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){let e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);let i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(n){let t=()=>{!function(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(zr,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,AP(n),n.isCheckStableRunning=!0,Nk(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),AP(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,a,s)=>{try{return QH(n),e.invokeTask(r,o,a,s)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),ZH(n)}},onInvoke:(e,i,r,o,a,s,l)=>{try{return QH(n),e.invoke(r,o,a,s,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),ZH(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,AP(n),Nk(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ot.isInAngularZone())throw new xt(909,!1)}static assertNotInAngularZone(){if(ot.isInAngularZone())throw new xt(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+r,t,Kde,xM,xM);try{return o.runTask(a,e,i)}finally{o.cancelTask(a)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},Kde={};function Nk(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function AP(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function QH(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function ZH(n){n._nesting--,Nk(n)}var Bk,Lk=new te(""),Mb=new te(""),JM=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Bk||(function(n){Bk=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ot.assertNotInAngularZone(),IP(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())IP(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(O(ot),O($M),O(Mb))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),$M=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return Bk?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),q_=null,Ej=new te("AllowMultipleToken"),Tj=new te("PlatformDestroyListeners"),tue=new te("appBootstrapListener");function Vk(n,t,e=[]){let i=`Platform: ${t}`,r=new te(i);return(o=[])=>{let a=Dj();if(!a||a.injector.get(Ej,!1)){let s=[...e,...o,{provide:r,useValue:!0}];n?n(s):function(n){if(q_&&!q_.get(Ej,!1))throw new xt(400,!1);q_=n;let t=n.get(Ij);(function(n){let t=n.get(Fk,null);t&&t.forEach(e=>e())})(n)}(function(n=[],t){return wi.create({name:t,providers:[{provide:LM,useValue:"platform"},{provide:Tj,useValue:new Set([()=>q_=null])},...n]})}(s,i))}return function(n){let t=Dj();if(!t)throw new xt(401,!1);return t}()}}function Dj(){return q_?.get(Ij)??null}var Ij=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){let r=function(n,t){let e;return e="noop"===n?new class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new F,this.onMicrotaskEmpty=new F,this.onStable=new F,this.onError=new F}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}:("zone.js"===n?void 0:n)||new ot(t),e}(i?.ngZone,function(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:ot,useValue:r}];return r.run(()=>{let a=wi.create({providers:o,parent:this.injector,name:e.moduleType.name}),s=e.create(a),l=s.injector.get(la,null);if(!l)throw new xt(402,!1);return r.runOutsideAngular(()=>{let c=r.onError.subscribe({next:d=>{l.handleError(d)}});s.onDestroy(()=>{JC(this._modules,s),c.unsubscribe()})}),function(n,t,e){try{let i=e();return Cf(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{let c=s.injector.get(KM);return c.runInitializers(),c.donePromise.then(()=>(function(n){(function(n,t){null==n&&i5("Expected localeId to be defined",n,null,"!=")})(n),"string"==typeof n&&(zU=n.toLowerCase().replace(/_/g,"-"))}(s.injector.get(ad,bM)||bM),this._moduleDoBootstrap(s),s))})})}bootstrapModule(e,i=[]){let r=Aj({},i);return function(n,t,e){let i=new SP(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){let i=e.injector.get(gc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new xt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new xt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let e=this._injector.get(Tj,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(O(wi))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function Aj(n,t){return Array.isArray(t)?t.reduce(Aj,n):{...n,...t}}var gc=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});let o=new Kt(s=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{s.next(this._stable),s.complete()})}),a=new Kt(s=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{ot.assertNotInAngularZone(),IP(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,s.next(!0))})})});let c=this._zone.onUnstable.subscribe(()=>{ot.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{s.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=tn(o,a.pipe(Ta()))}bootstrap(e,i){let a,r=e instanceof hM;if(!this._injector.get(KM).done)throw!r&&l5(e),new xt(405,false);a=r?e:this._injector.get(ho).resolveComponentFactory(e),this.componentTypes.push(a.componentType);let s=function(n){return n.isBoundToModule}(a)?void 0:this._injector.get(iu),c=a.create(wi.NULL,[],i||a.selector,s),d=c.location.nativeElement,u=c.injector.get(Lk,null);return u?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),JC(this.components,c),u?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new xt(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;JC(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);let i=this._injector.get(tue,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>JC(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new xt(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(O(ot),O(lc),O(la))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function JC(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Qt=(()=>{class n{}return n.__NG_ELEMENT_ID__=pue,n})();function pue(n){return function(n,t,e){if(DM(n)&&!e){let i=ed(n.index,t);return new Qp(i,i)}return 47&n.type?new Qp(t[xl],t):null}(Lo(),Ze(),16==(16&n))}var CM=class{constructor(){}supports(t){return Zz(t)}create(t){return new PP(t)}},mue=(n,t)=>t,PP=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||mue}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){let a=!i||e&&e.currentIndex<JH(i,r,o)?e:i,s=JH(a,r,o),l=a.currentIndex;if(a===i)r--,i=i._nextRemoved;else if(e=e._next,null==a.previousIndex)r++;else{o||(o=[]);let c=s-r,d=l-r;if(c!=d){for(let p=0;p<c;p++){let h=p<o.length?o[p]:o[p]=0,m=h+p;d<=m&&m<c&&(o[p]=h+1)}o[a.previousIndex]=d-c}}s!==l&&t(a,s,l)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Zz(t))throw new xt(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let r,o,a,e=this._itHead,i=!1;if(Array.isArray(t)){this.length=t.length;for(let s=0;s<this.length;s++)o=t[s],a=this._trackByFn(s,o),null!==e&&Object.is(e.trackById,a)?(i&&(e=this._verifyReinsertion(e,o,a,s)),Object.is(e.item,o)||this._addIdentityChange(e,o)):(e=this._mismatch(e,o,a,s),i=!0),e=e._next}else r=0,function(n,t){if(Array.isArray(n))for(let e=0;e<n.length;e++)t(n[e]);else{let i,e=n[Symbol.iterator]();for(;!(i=e.next()).done;)t(i.value)}}(t,s=>{a=this._trackByFn(r,s),null!==e&&Object.is(e.trackById,a)?(i&&(e=this._verifyReinsertion(e,s,a,r)),Object.is(e.item,s)||this._addIdentityChange(e,s)):(e=this._mismatch(e,s,a,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new kP(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){let r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new MM),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);let e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new MM),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}},kP=class{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},MM=class{constructor(){this.map=new Map}put(t){let e=t.trackById,i=this.map.get(e);i||(i=new class{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){let e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}},this.map.set(e,i)),i.add(t)}get(t,e){let r=this.map.get(t);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}};function JH(n,t,e){let i=n.previousIndex;if(null===i)return i;let r=0;return e&&i<e.length&&(r=e[i]),i+t+r}var wM=class{constructor(){}supports(t){return t instanceof Map||Tk(t)}create(){return new FP}},FP=class{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Tk(t)))throw new xt(900,!1)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(i,r)=>{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{let o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){let i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){let r=this._records.get(t);this._maybeAddToChanges(r,e);let o=r._prev,a=r._next;return o&&(o._next=a),a&&(a._prev=o),r._next=null,r._prev=null,r}let i=new NP(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}},NP=class{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function $H(){return new Tl([new CM])}var Tl=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||$H()),deps:[[n,new id,new ka]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new xt(901,!1)}}return n.\u0275prov=ue({token:n,providedIn:"root",factory:$H}),n})();function e5(){return new Sb([new wM])}var Sb=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||e5()),deps:[[n,new id,new ka]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(i)return i;throw new xt(901,!1)}}return n.\u0275prov=ue({token:n,providedIn:"root",factory:e5}),n})(),fue=[new wM],gue=[new CM],Rj=(new Tl(gue),new Sb(fue),Vk(null,"core",[])),Pj=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(O(gc))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})();function ew(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}var _ue=":",cu=class{static zero(){return new cu([0])}static one(){return new cu([1])}constructor(t){this.digits=t}clone(){return new cu(this.digits.slice())}add(t){let e=this.clone();return e.addToSelf(t),e}addToSelf(t){let e=Math.max(this.digits.length,t.digits.length),i=0;for(let r=0;r<e;r++){let o=i;r<this.digits.length&&(o+=this.digits[r]),r<t.digits.length&&(o+=t.digits[r]),o>=10?(this.digits[r]=o-10,i=1):(this.digits[r]=o,i=0)}i>0&&(this.digits[e]=1)}toString(){let t="";for(let e=this.digits.length-1;e>=0;e--)t+=this.digits[e];return t}},tw=class{constructor(t){this.powerOfTwos=[t]}getValue(){return this.powerOfTwos[0]}multiplyBy(t){let e=cu.zero();return this.multiplyByAndAddTo(t,e),e}multiplyByAndAddTo(t,e){for(let i=0;0!==t;t>>>=1,i++)if(1&t){let r=this.getMultipliedByPowerOfTwo(i);e.addToSelf(r)}}getMultipliedByPowerOfTwo(t){for(let e=this.powerOfTwos.length;e<=t;e++){let i=this.powerOfTwos[e-1];this.powerOfTwos[e]=i.add(i)}return this.powerOfTwos[t]}};new class{visitText(t,e){return t.value}visitContainer(t,e){return`[${t.children.map(i=>i.visit(this)).join(", ")}]`}visitIcu(t,e){let i=Object.keys(t.cases).map(r=>`${r} {${t.cases[r].visit(this)}}`);return`{${t.expression}, ${t.type}, ${i.join(", ")}}`}visitTagPlaceholder(t,e){return t.isVoid?`<ph tag name="${t.startName}"/>`:`<ph tag name="${t.startName}">${t.children.map(i=>i.visit(this)).join(", ")}</ph name="${t.closeName}">`}visitPlaceholder(t,e){return t.value?`<ph name="${t.name}">${t.value}</ph>`:`<ph name="${t.name}"/>`}visitIcuPlaceholder(t,e){return`<ph icu name="${t.name}">${t.value.visit(this)}</ph>`}},new class{constructor(t){this.base=t,this.exponents=[new tw(cu.one())]}toThePowerOf(t){for(let e=this.exponents.length;e<=t;e++){let i=this.exponents[e-1].multiplyBy(this.base);this.exponents[e]=new tw(i)}return this.exponents[t]}}(256);var nw=function(n,...t){if(nw.translate){let i=nw.translate(n,t);n=i[0],t=i[1]}let e=kj(n[0],n.raw[0]);for(let i=1;i<n.length;i++)e+=t[i-1]+kj(n[i],n.raw[i]);return e},vue=":";function kj(n,t){return t.charAt(0)===vue?n.substring(function(n,t){for(let e=1,i=1;e<n.length;e++,i++)if("\\"===t[i])i++;else if(n[e]===_ue)return e;throw new Error(`Unterminated $localize metadata block in "${t}".`)}(n,t)+1):n}(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)().$localize=nw;var Yk=null;function Al(){return Yk}var uw=class{},Nt=new te("DocumentToken"),Wj=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(){return O(qj)},providedIn:"platform"}),n})();new te("Location Initialized");var qj=(()=>{class n extends Wj{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Al().getBaseHref(this._doc)}onPopState(e){let i=Al().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=Al().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Fj()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Fj()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:function(){return new qj(O(Nt))},providedIn:"platform"}),n})();function Fj(){return!!window.history.pushState}function Xj(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function Nj(n){let t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function eh(n){return n&&"?"!==n[0]?"?"+n:n}var $k=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(){return $n(Mue)},providedIn:"root"}),n})(),Cue=new te("appBaseHref"),Mue=(()=>{class n extends $k{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??$n(Nt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Xj(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+eh(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){let a=this.prepareExternalUrl(r+eh(o));this._platformLocation.pushState(e,i,a)}replaceState(e,i,r,o){let a=this.prepareExternalUrl(r+eh(o));this._platformLocation.replaceState(e,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Wj),O(Cue,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Db=(()=>{class n{constructor(e){this._subject=new F,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._basePath=function(n){if(new RegExp("^(https?:)?//").test(n)){let[,e]=n.split(/\/\/[^\/]+/);return e}return n}(Nj(Lj(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+eh(i))}normalize(e){return n.stripTrailingSlash(function(n,t){if(!n||!t.startsWith(n))return t;let e=t.substring(n.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,Lj(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+eh(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+eh(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{let i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=eh,n.joinWithSlash=Xj,n.stripTrailingSlash=Nj,n.\u0275fac=function(e){return new(e||n)(O($k))},n.\u0275prov=ue({token:n,factory:function(){return new Db(O($k))},providedIn:"root"}),n})();function Lj(n){return n.replace(/\/index.html$/,"")}var cw=(()=>{return(n=cw||(cw={}))[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",cw;var n})(),Bo=(()=>{return(n=Bo||(Bo={}))[n.Format=0]="Format",n[n.Standalone=1]="Standalone",Bo;var n})(),Xi=(()=>{return(n=Xi||(Xi={}))[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",Xi;var n})(),pa=(()=>{return(n=pa||(pa={}))[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",pa;var n})(),Yo=(()=>{return(n=Yo||(Yo={}))[n.Decimal=0]="Decimal",n[n.Group=1]="Group",n[n.List=2]="List",n[n.PercentSign=3]="PercentSign",n[n.PlusSign=4]="PlusSign",n[n.MinusSign=5]="MinusSign",n[n.Exponential=6]="Exponential",n[n.SuperscriptingExponent=7]="SuperscriptingExponent",n[n.PerMille=8]="PerMille",n[n.Infinity=9]="Infinity",n[n.NaN=10]="NaN",n[n.TimeSeparator=11]="TimeSeparator",n[n.CurrencyDecimal=12]="CurrencyDecimal",n[n.CurrencyGroup=13]="CurrencyGroup",Yo;var n})();function iw(n,t){return zs(Fa(n)[hr.DateFormat],t)}function rw(n,t){return zs(Fa(n)[hr.TimeFormat],t)}function ow(n,t){return zs(Fa(n)[hr.DateTimeFormat],t)}function ld(n,t){let e=Fa(n),i=e[hr.NumberSymbols][t];if(typeof i>"u"){if(t===Yo.CurrencyDecimal)return e[hr.NumberSymbols][Yo.Decimal];if(t===Yo.CurrencyGroup)return e[hr.NumberSymbols][Yo.Group]}return i}function Yj(n){if(!n[hr.ExtraData])throw new Error(`Missing extra locale data for the locale "${n[hr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function zs(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Error("Locale data API: locale data undefined")}function Uk(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var Fue=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Eb={},Nue=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,Il=(()=>{return(n=Il||(Il={}))[n.Short=0]="Short",n[n.ShortGMT=1]="ShortGMT",n[n.Long=2]="Long",n[n.Extended=3]="Extended",Il;var n})(),Ii=(()=>{return(n=Ii||(Ii={}))[n.FullYear=0]="FullYear",n[n.Month=1]="Month",n[n.Date=2]="Date",n[n.Hours=3]="Hours",n[n.Minutes=4]="Minutes",n[n.Seconds=5]="Seconds",n[n.FractionalSeconds=6]="FractionalSeconds",n[n.Day=7]="Day",Ii;var n})(),Di=(()=>{return(n=Di||(Di={}))[n.DayPeriods=0]="DayPeriods",n[n.Days=1]="Days",n[n.Months=2]="Months",n[n.Eras=3]="Eras",Di;var n})();function Lue(n,t,e,i){let r=function(n){if(Bj(n))return n;if("number"==typeof n&&!isNaN(n))return new Date(n);if("string"==typeof n){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[r,o=1,a=1]=n.split("-").map(s=>+s);return pw(r,o-1,a)}let i,e=parseFloat(n);if(!isNaN(n-e))return new Date(e);if(i=n.match(Fue))return function(n){let t=new Date(0),e=0,i=0,r=n[8]?t.setUTCFullYear:t.setFullYear,o=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let a=Number(n[4]||0)-e,s=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(1e3*parseFloat("0."+(n[7]||0)));return o.call(t,a,s,l,c),t}(i)}let t=new Date(n);if(!Bj(t))throw new Error(`Unable to convert "${n}" into a date`);return t}(n);t=sd(e,t)||t;let s,a=[];for(;t;){if(s=Nue.exec(t),!s){a.push(t);break}{a=a.concat(s.slice(1));let d=a.pop();if(!d)break;t=d}}let l=r.getTimezoneOffset();i&&(l=Zj(i,l),r=function(n,t,e){let r=n.getTimezoneOffset();return function(n,t){return(n=new Date(n.getTime())).setMinutes(n.getMinutes()+t),n}(n,-1*(Zj(t,r)-r))}(r,i));let c="";return a.forEach(d=>{let u=function(n){if(Gk[n])return Gk[n];let t;switch(n){case"G":case"GG":case"GGG":t=rr(Di.Eras,Xi.Abbreviated);break;case"GGGG":t=rr(Di.Eras,Xi.Wide);break;case"GGGGG":t=rr(Di.Eras,Xi.Narrow);break;case"y":t=$r(Ii.FullYear,1,0,!1,!0);break;case"yy":t=$r(Ii.FullYear,2,0,!0,!0);break;case"yyy":t=$r(Ii.FullYear,3,0,!1,!0);break;case"yyyy":t=$r(Ii.FullYear,4,0,!1,!0);break;case"Y":t=lw(1);break;case"YY":t=lw(2,!0);break;case"YYY":t=lw(3);break;case"YYYY":t=lw(4);break;case"M":case"L":t=$r(Ii.Month,1,1);break;case"MM":case"LL":t=$r(Ii.Month,2,1);break;case"MMM":t=rr(Di.Months,Xi.Abbreviated);break;case"MMMM":t=rr(Di.Months,Xi.Wide);break;case"MMMMM":t=rr(Di.Months,Xi.Narrow);break;case"LLL":t=rr(Di.Months,Xi.Abbreviated,Bo.Standalone);break;case"LLLL":t=rr(Di.Months,Xi.Wide,Bo.Standalone);break;case"LLLLL":t=rr(Di.Months,Xi.Narrow,Bo.Standalone);break;case"w":t=jk(1);break;case"ww":t=jk(2);break;case"W":t=jk(1,!0);break;case"d":t=$r(Ii.Date,1);break;case"dd":t=$r(Ii.Date,2);break;case"c":case"cc":t=$r(Ii.Day,1);break;case"ccc":t=rr(Di.Days,Xi.Abbreviated,Bo.Standalone);break;case"cccc":t=rr(Di.Days,Xi.Wide,Bo.Standalone);break;case"ccccc":t=rr(Di.Days,Xi.Narrow,Bo.Standalone);break;case"cccccc":t=rr(Di.Days,Xi.Short,Bo.Standalone);break;case"E":case"EE":case"EEE":t=rr(Di.Days,Xi.Abbreviated);break;case"EEEE":t=rr(Di.Days,Xi.Wide);break;case"EEEEE":t=rr(Di.Days,Xi.Narrow);break;case"EEEEEE":t=rr(Di.Days,Xi.Short);break;case"a":case"aa":case"aaa":t=rr(Di.DayPeriods,Xi.Abbreviated);break;case"aaaa":t=rr(Di.DayPeriods,Xi.Wide);break;case"aaaaa":t=rr(Di.DayPeriods,Xi.Narrow);break;case"b":case"bb":case"bbb":t=rr(Di.DayPeriods,Xi.Abbreviated,Bo.Standalone,!0);break;case"bbbb":t=rr(Di.DayPeriods,Xi.Wide,Bo.Standalone,!0);break;case"bbbbb":t=rr(Di.DayPeriods,Xi.Narrow,Bo.Standalone,!0);break;case"B":case"BB":case"BBB":t=rr(Di.DayPeriods,Xi.Abbreviated,Bo.Format,!0);break;case"BBBB":t=rr(Di.DayPeriods,Xi.Wide,Bo.Format,!0);break;case"BBBBB":t=rr(Di.DayPeriods,Xi.Narrow,Bo.Format,!0);break;case"h":t=$r(Ii.Hours,1,-12);break;case"hh":t=$r(Ii.Hours,2,-12);break;case"H":t=$r(Ii.Hours,1);break;case"HH":t=$r(Ii.Hours,2);break;case"m":t=$r(Ii.Minutes,1);break;case"mm":t=$r(Ii.Minutes,2);break;case"s":t=$r(Ii.Seconds,1);break;case"ss":t=$r(Ii.Seconds,2);break;case"S":t=$r(Ii.FractionalSeconds,1);break;case"SS":t=$r(Ii.FractionalSeconds,2);break;case"SSS":t=$r(Ii.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=sw(Il.Short);break;case"ZZZZZ":t=sw(Il.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=sw(Il.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=sw(Il.Long);break;default:return null}return Gk[n]=t,t}(d);c+=u?u(r,e,l):"''"===d?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function pw(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function sd(n,t){let e=function(n){return Fa(n)[hr.LocaleId]}(n);if(Eb[e]=Eb[e]||{},Eb[e][t])return Eb[e][t];let i="";switch(t){case"shortDate":i=iw(n,pa.Short);break;case"mediumDate":i=iw(n,pa.Medium);break;case"longDate":i=iw(n,pa.Long);break;case"fullDate":i=iw(n,pa.Full);break;case"shortTime":i=rw(n,pa.Short);break;case"mediumTime":i=rw(n,pa.Medium);break;case"longTime":i=rw(n,pa.Long);break;case"fullTime":i=rw(n,pa.Full);break;case"short":let r=sd(n,"shortTime"),o=sd(n,"shortDate");i=aw(ow(n,pa.Short),[r,o]);break;case"medium":let a=sd(n,"mediumTime"),s=sd(n,"mediumDate");i=aw(ow(n,pa.Medium),[a,s]);break;case"long":let l=sd(n,"longTime"),c=sd(n,"longDate");i=aw(ow(n,pa.Long),[l,c]);break;case"full":let d=sd(n,"fullTime"),u=sd(n,"fullDate");i=aw(ow(n,pa.Full),[d,u])}return i&&(Eb[e][t]=i),i}function aw(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return null!=t&&i in t?t[i]:e})),n}function Dl(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=1-n:(n=-n,o=e));let a=String(n);for(;a.length<t;)a="0"+a;return i&&(a=a.slice(a.length-t)),o+a}function $r(n,t,e=0,i=!1,r=!1){return function(o,a){let s=function(n,t){switch(n){case Ii.FullYear:return t.getFullYear();case Ii.Month:return t.getMonth();case Ii.Date:return t.getDate();case Ii.Hours:return t.getHours();case Ii.Minutes:return t.getMinutes();case Ii.Seconds:return t.getSeconds();case Ii.FractionalSeconds:return t.getMilliseconds();case Ii.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${n}".`)}}(n,o);if((e>0||s>-e)&&(s+=e),n===Ii.Hours)0===s&&-12===e&&(s=12);else if(n===Ii.FractionalSeconds)return function(n,t){return Dl(n,3).substring(0,t)}(s,t);let l=ld(a,Yo.MinusSign);return Dl(s,t,l,i,r)}}function rr(n,t,e=Bo.Format,i=!1){return function(r,o){return function(n,t,e,i,r,o){switch(e){case Di.Months:return function(n,t,e){let i=Fa(n),o=zs([i[hr.MonthsFormat],i[hr.MonthsStandalone]],t);return zs(o,e)}(t,r,i)[n.getMonth()];case Di.Days:return function(n,t,e){let i=Fa(n),o=zs([i[hr.DaysFormat],i[hr.DaysStandalone]],t);return zs(o,e)}(t,r,i)[n.getDay()];case Di.DayPeriods:let a=n.getHours(),s=n.getMinutes();if(o){let c=function(n){let t=Fa(n);return Yj(t),(t[hr.ExtraData][2]||[]).map(i=>"string"==typeof i?Uk(i):[Uk(i[0]),Uk(i[1])])}(t),d=function(n,t,e){let i=Fa(n);Yj(i);let o=zs([i[hr.ExtraData][0],i[hr.ExtraData][1]],t)||[];return zs(o,e)||[]}(t,r,i),u=c.findIndex(p=>{if(Array.isArray(p)){let[h,m]=p,_=a>=h.hours&&s>=h.minutes,M=a<m.hours||a===m.hours&&s<m.minutes;if(h.hours<m.hours){if(_&&M)return!0}else if(_||M)return!0}else if(p.hours===a&&p.minutes===s)return!0;return!1});if(-1!==u)return d[u]}return function(n,t,e){let i=Fa(n),o=zs([i[hr.DayPeriodsFormat],i[hr.DayPeriodsStandalone]],t);return zs(o,e)}(t,r,i)[a<12?0:1];case Di.Eras:return function(n,t){return zs(Fa(n)[hr.Eras],t)}(t,i)[n.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${e}`)}}(r,o,n,t,e,i)}}function sw(n){return function(t,e,i){let r=-1*i,o=ld(e,Yo.MinusSign),a=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case Il.Short:return(r>=0?"+":"")+Dl(a,2,o)+Dl(Math.abs(r%60),2,o);case Il.ShortGMT:return"GMT"+(r>=0?"+":"")+Dl(a,1,o);case Il.Long:return"GMT"+(r>=0?"+":"")+Dl(a,2,o)+":"+Dl(Math.abs(r%60),2,o);case Il.Extended:return 0===i?"Z":(r>=0?"+":"")+Dl(a,2,o)+":"+Dl(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${n}"`)}}}var zue=0,dw=4;function Qj(n){return pw(n.getFullYear(),n.getMonth(),n.getDate()+(dw-n.getDay()))}function jk(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,a=e.getDate();r=1+Math.floor((a+o)/7)}else{let o=Qj(e),a=function(n){let t=pw(n,zue,1).getDay();return pw(n,0,1+(t<=dw?dw:dw+7)-t)}(o.getFullYear()),s=o.getTime()-a.getTime();r=1+Math.round(s/6048e5)}return Dl(r,n,ld(i,Yo.MinusSign))}}function lw(n,t=!1){return function(e,i){return Dl(Qj(e).getFullYear(),n,ld(i,Yo.MinusSign),t)}}var Gk={};function Zj(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function Bj(n){return n instanceof Date&&!isNaN(n.valueOf())}var Yue=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Vj=22,hw=".",Tb="0",Que=";",Zue=",",Wk="#";function eO(n,t,e){let i=function(n,t){return Fa(n)[hr.NumberFormats][t]}(t,cw.Decimal),r=function(n,t="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(Que),r=i[0],o=i[1],a=-1!==r.indexOf(hw)?r.split(hw):[r.substring(0,r.lastIndexOf(Tb)+1),r.substring(r.lastIndexOf(Tb)+1)],s=a[0],l=a[1]||"";e.posPre=s.substring(0,s.indexOf(Wk));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===Tb?e.minFrac=e.maxFrac=d+1:u===Wk?e.maxFrac=d+1:e.posSuf+=u}let c=s.split(Zue);if(e.gSize=c[1]?c[1].length:0,e.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-e.posPre.length-e.posSuf.length,u=o.indexOf(Wk);e.negPre=o.substring(0,u).replace(/'/g,""),e.negSuf=o.slice(u+d).replace(/'/g,"")}else e.negPre=t+e.posPre,e.negSuf=e.posSuf;return e}(i,ld(t,Yo.MinusSign));return function(n,t,e,i,r,o,a=!1){let s="",l=!1;if(isFinite(n)){let c=function(n){let i,r,o,a,s,t=Math.abs(n)+"",e=0;for((r=t.indexOf(hw))>-1&&(t=t.replace(hw,"")),(o=t.search(/e/i))>0?(r<0&&(r=o),r+=+t.slice(o+1),t=t.substring(0,o)):r<0&&(r=t.length),o=0;t.charAt(o)===Tb;o++);if(o===(s=t.length))i=[0],r=1;else{for(s--;t.charAt(s)===Tb;)s--;for(r-=o,i=[],a=0;o<=s;o++,a++)i[a]=Number(t.charAt(o))}return r>Vj&&(i=i.splice(0,Vj-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);a&&(c=function(n){if(0===n.digits[0])return n;let t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let d=t.minInt,u=t.minFrac,p=t.maxFrac;if(o){let x=o.match(Yue);if(null===x)throw new Error(`${o} is not a valid digit info`);let R=x[1],I=x[3],B=x[5];null!=R&&(d=qk(R)),null!=I&&(u=qk(I)),null!=B?p=qk(B):null!=I&&u>p&&(p=u)}!function(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen,o=Math.min(Math.max(t,r),e),a=o+n.integerLen,s=i[a];if(a>0){i.splice(Math.max(n.integerLen,a));for(let u=a;u<i.length;u++)i[u]=0}else{r=Math.max(0,r),n.integerLen=1,i.length=Math.max(1,a=o+1),i[0]=0;for(let u=1;u<a;u++)i[u]=0}if(s>=5)if(a-1<0){for(let u=0;u>a;u--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[a-1]++;for(;r<Math.max(0,o);r++)i.push(0);let l=0!==o,c=t+n.integerLen,d=i.reduceRight(function(u,p,h,m){return m[h]=(p+=u)<10?p:p-10,l&&(0===m[h]&&h>=c?m.pop():l=!1),p>=10?1:0},0);d&&(i.unshift(d),n.integerLen++)}(c,u,p);let h=c.digits,m=c.integerLen,_=c.exponent,M=[];for(l=h.every(x=>!x);m<d;m++)h.unshift(0);for(;m<0;m++)h.unshift(0);m>0?M=h.splice(m,h.length):(M=h,h=[0]);let y=[];for(h.length>=t.lgSize&&y.unshift(h.splice(-t.lgSize,h.length).join(""));h.length>t.gSize;)y.unshift(h.splice(-t.gSize,h.length).join(""));h.length&&y.unshift(h.join("")),s=y.join(ld(e,i)),M.length&&(s+=ld(e,r)+M.join("")),_&&(s+=ld(e,Yo.Exponential)+"+"+_)}else s=ld(e,Yo.Infinity);return s=n<0&&!l?t.negPre+s+t.negSuf:t.posPre+s+t.posSuf,s}(n,r,t,Yo.Group,Yo.Decimal,e)}function qk(n){let t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function fw(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var Xk=/\s+/,Hj=[],wn=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=Hj,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(Xk):Hj}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(Xk):e}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let i of e)this._updateState(i,!0);else if(null!=e)for(let i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){let r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(Xk).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(C(Tl),C(Sb),C(xe),C(dc))},n.\u0275dir=Me({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})(),nn=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let i=this._viewContainer;e.forEachOperation((r,o,a)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new class{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}(r.item,this._ngForOf,-1,-1),null===a?void 0:a);else if(null==a)i.remove(null===o?void 0:o);else if(null!==o){let s=i.get(o);i.move(s,a),Uj(s,r)}});for(let r=0,o=i.length;r<o;r++){let s=i.get(r).context;s.index=r,s.count=o,s.ngForOf=this._ngForOf}e.forEachIdentityChange(r=>{Uj(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(oi),C(Tl))},n.\u0275dir=Me({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function Uj(n,t){n.context.$implicit=t.item}var Ne=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new Zk,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){jj("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){jj("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(oi))},n.\u0275dir=Me({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})(),Zk=class{constructor(){this.$implicit=null,this.ngIf=null}};function jj(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${po(t)}'.`)}var mw=class{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}},mr=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),kr=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new mw(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(oi),C(mr,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),du=(()=>{class n{constructor(e,i,r){r._addDefault(new mw(e,i))}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(oi),C(mr,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),Mf=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){let[r,o]=e.split("."),a=-1===r.indexOf("-")?void 0:Ns.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,r,a)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Sb),C(dc))},n.\u0275dir=Me({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),eo=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){let{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:a}=this;this._viewRef=i.createEmbeddedView(r,o,a?{injector:a}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(C(ei))},n.\u0275dir=Me({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[qt]}),n})();function gw(n,t){return new xt(2100,!1)}var ipe=new class{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}},rpe=new class{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}},ct=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(Cf(e))return ipe;if(Dk(e))return rpe;throw gw()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(C(Qt,16))},n.\u0275pipe=rf({name:"async",type:n,pure:!1,standalone:!0}),n})(),ape=new te("DATE_PIPE_DEFAULT_TIMEZONE"),spe=new te("DATE_PIPE_DEFAULT_OPTIONS"),wf=(()=>{class n{constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(null==e||""===e||e!=e)return null;try{return Lue(e,i??this.defaultOptions?.dateFormat??"mediumDate",o||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(a){throw gw()}}}return n.\u0275fac=function(e){return new(e||n)(C(ad,16),C(ape,24),C(spe,24))},n.\u0275pipe=rf({name:"date",type:n,pure:!0,standalone:!0}),n})(),Us=(()=>{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{let o=function(n){if("string"==typeof n&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if("number"!=typeof n)throw new Error(`${n} is not a number`);return n}(e);return eO(o,r,i)}catch(o){throw gw()}}}return n.\u0275fac=function(e){return new(e||n)(C(ad,16))},n.\u0275pipe=rf({name:"number",type:n,pure:!0,standalone:!0}),n})(),Kj=(()=>{class n{transform(e,i,r){if(null==e)return null;if(!this.supports(e))throw gw();return e.slice(i,r)}supports(e){return"string"==typeof e||Array.isArray(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=rf({name:"slice",type:n,pure:!1,standalone:!0}),n})(),De=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),tO="browser";function _w(n){return n===tO}new Ml("15.2.9");var th=class{};function hpe(n){return n.startsWith("/")?n.slice(1):n}var mpe=n=>n.src,fpe=new te("ImageLoader",{providedIn:"root",factory:()=>mpe});function bw(n,t){return function(i){return function(n){if("string"!=typeof n||""===n.trim())return!1;try{return new URL(n),!0}catch{return!1}}(i)||function(n,t){throw new xt(2959,!1)}(),i=function(n){return n.endsWith("/")?n.slice(0,-1):n}(i),[{provide:fpe,useValue:a=>(function(n){return/^https?:\/\//.test(n)}(a.src)&&function(n,t){throw new xt(2959,!1)}(),n(i,{...a,src:hpe(a.src)}))}]}}bw(function(n,t){let e="format=auto";return t.width&&(e+=`,width=${t.width}`),`${n}/cdn-cgi/image/${e}/${t.src}`}),bw(function(n,t){let e="f_auto,q_auto";return t.width&&(e+=`,w_${t.width}`),`${n}/image/upload/${e}/${t.src}`}),bw(function(n,t){let r,{src:e,width:i}=t;return r=i?[n,`tr:w-${i}`,e]:[n,e],r.join("/")}),bw(function(n,t){let e=new URL(`${n}/${t.src}`);return e.searchParams.set("auto","format"),t.width&&e.searchParams.set("w",t.width.toString()),e.href}),new te("PRECONNECT_CHECK_BLOCKLIST"),new te("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});var vw,Cpe={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},iO=(new te("ImageConfig",{providedIn:"root",factory:()=>Cpe}),class extends uw{constructor(){super(...arguments),this.supportsDOMEvents=!0}}),Pb=class extends iO{static makeCurrent(){var n;n=new Pb,Yk||(Yk=n)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){let e=(Ib=Ib||document.querySelector("base"))?Ib.getAttribute("href"):null;return null==e?null:function(n){(vw=vw||document.createElement("a")).setAttribute("href",n);let t=vw.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Ib=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return fw(document.cookie,t)}},Ib=null,iG=new te("TRANSITION_ID"),Tpe=[{provide:Ok,useFactory:function(n,t,e){return()=>{e.get(KM).donePromise.then(()=>{let i=Al(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o<r.length;o++)i.remove(r[o])})}},deps:[iG,Nt,wi],multi:!0}],Dpe=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),yw=new te("EventManagerPlugins"),xw=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;let r=this._plugins;for(let o=0;o<r.length;o++){let a=r[o];if(a.supports(e))return this._eventNameToPlugin.set(e,a),a}throw new Error(`No event manager plugin found for event ${e}`)}}return n.\u0275fac=function(e){return new(e||n)(O(yw),O(ot))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Cw=class{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){let r=Al().getGlobalEventTarget(this._doc,t);if(!r)throw new Error(`Unsupported event target ${r} for event ${e}`);return this.addEventListener(r,e,i)}},rG=(()=>{class n{constructor(){this.usageCount=new Map}addStyles(e){for(let i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(let i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){let r=this.usageCount,o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(let e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ab=(()=>{class n extends rG{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(let i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){let i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){let r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);let o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),nO={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},aO=/%COMP%/g,aG=new te("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function sG(n,t){return t.flat(100).map(e=>e.replace(aO,n))}function $j(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}var Rb=(()=>{class n{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new kb(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof Mw?r.applyToHost(e):r instanceof Ob&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let a=this.eventManager,s=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case as.Emulated:o=new Mw(a,s,i,this.appId,l);break;case as.ShadowDom:return new oO(a,s,e,i);default:o=new Ob(a,s,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(O(xw),O(Ab),O($p),O(aG))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),kb=class{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(nO[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(tG(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(tG(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=nO[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=nO[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Ns.DashCase|Ns.Important)?t.style.setProperty(e,i,r&Ns.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Ns.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,$j(i)):this.eventManager.addEventListener(t,e,$j(i))}};function tG(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}"@".charCodeAt(0);var oO=class extends kb{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let o=sG(r.id,r.styles);for(let a of o){let s=document.createElement("style");s.textContent=a,this.shadowRoot.appendChild(s)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Ob=class extends kb{constructor(t,e,i,r,o=i.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=sG(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){!this.removeStylesOnCompDestory||(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}},Mw=class extends Ob{constructor(t,e,i,r,o){let a=r+"-"+i.id;super(t,e,i,o,a),this.contentAttr="_ngcontent-%COMP%".replace(aO,a),this.hostAttr=function(n){return"_nghost-%COMP%".replace(aO,n)}(a)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},Fpe=(()=>{class n extends Cw{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),nG=["alt","control","meta","shift"],Npe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Lpe={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Bpe=(()=>{class n extends Cw{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){let o=n.parseEventName(i),a=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Al().onAndCancel(e,o.domEventName,a))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;let o=n._normalizeKey(i.pop()),a="",s=i.indexOf("code");if(s>-1&&(i.splice(s,1),a="code."),nG.forEach(c=>{let d=i.indexOf(c);d>-1&&(i.splice(d,1),a+=c+".")}),a+=o,0!=i.length||0===o.length)return null;let l={};return l.domEventName=r,l.fullKey=a,l}static matchEventFullKeyCode(e,i){let r=Npe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),nG.forEach(a=>{a!==r&&(0,Lpe[a])(e)&&(o+=a+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Upe=[{provide:fc,useValue:tO},{provide:Fk,useValue:function(){Pb.makeCurrent()},multi:!0},{provide:Nt,useFactory:function(){return n=document,YR=n,document;var n},deps:[]}],lO=Vk(Rj,"browser",Upe),lG=new te(""),jpe=[{provide:Mb,useClass:class{addToWindow(t){zr.getAngularTestability=(i,r=!0)=>{let o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},zr.getAllAngularTestabilities=()=>t.getAllTestabilities(),zr.getAllAngularRootElements=()=>t.getAllRootElements(),zr.frameworkStabilizers||(zr.frameworkStabilizers=[]),zr.frameworkStabilizers.push(i=>{let r=zr.getAllAngularTestabilities(),o=r.length,a=!1,s=function(l){a=a||l,o--,0==o&&i(a)};r.forEach(function(l){l.whenStable(s)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Al().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:Lk,useClass:JM,deps:[ot,$M,Mb]},{provide:JM,useClass:JM,deps:[ot,$M,Mb]}],Gpe=[{provide:LM,useValue:"root"},{provide:la,useFactory:function(){return new la},deps:[]},{provide:yw,useClass:Fpe,multi:!0,deps:[Nt,ot,fc]},{provide:yw,useClass:Bpe,multi:!0,deps:[Nt]},{provide:Rb,useClass:Rb,deps:[xw,Ab,$p,aG]},{provide:cc,useExisting:Rb},{provide:rG,useExisting:Ab},{provide:Ab,useClass:Ab,deps:[Nt]},{provide:xw,useClass:xw,deps:[yw,ot]},{provide:th,useClass:Dpe,deps:[]},[]],ww=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:$p,useValue:e.appId},{provide:iG,useExisting:$p},Tpe]}}}return n.\u0275fac=function(e){return new(e||n)(O(lG,12))},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[...Gpe,...jpe],imports:[De,Pj]}),n})(),nh=(new te("HammerGestureConfig"),new te("HammerLoader"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(e){let i=null;return i=e?new(e||n):O(cG),i},providedIn:"root"}),n})()),cG=(()=>{class n extends nh{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Ur.NONE:return i;case Ur.HTML:return wl(i,"HTML")?Oa(i):hk(this._doc,String(i)).toString();case Ur.STYLE:return wl(i,"Style")?Oa(i):i;case Ur.SCRIPT:if(wl(i,"Script"))return Oa(i);throw new Error("unsafe value used in a script context");case Ur.URL:return wl(i,"URL")?Oa(i):pb(String(i));case Ur.RESOURCE_URL:if(wl(i,"ResourceURL"))return Oa(i);throw new Error(`unsafe value used in a resource URL context (see ${ob})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${ob})`)}}bypassSecurityTrustHtml(e){return function(n){return new QR(n)}(e)}bypassSecurityTrustStyle(e){return function(n){return new ZR(n)}(e)}bypassSecurityTrustScript(e){return function(n){return new KR(n)}(e)}bypassSecurityTrustUrl(e){return function(n){return new JR(n)}(e)}bypassSecurityTrustResourceUrl(e){return function(n){return new $R(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:function(e){let i=null;return i=e?new e:function(n){return new cG(n.get(Nt))}(O(wi)),i},providedIn:"root"}),n})(),Fb=(new Ml("15.2.9"),$V(uG(),1),class{}),Sw=class{},_c="*";function fr(n,t){return{type:7,name:n,definitions:t,options:{}}}function Mi(n,t=null){return{type:4,styles:t,timings:n}}function Lb(n,t=null){return{type:3,steps:n,options:t}}function Ew(n,t=null){return{type:2,steps:n,options:t}}function rn(n){return{type:6,styles:n,offset:null}}function Si(n,t,e){return{type:0,name:n,styles:t,options:e}}function Bb(n){return{type:5,steps:n}}function bi(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function ih(n=null){return{type:9,options:n}}function rh(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function pG(n){Promise.resolve().then(n)}var pu=class{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){pG(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},Nb=class{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0,o=this.players.length;0==o?pG(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==o&&this._onFinish()}),a.onDestroy(()=>{++i==o&&this._onDestroy()}),a.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,s)=>Math.max(a,s.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(i=>{let r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){let t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},Tw="!";function hG(n){return new xt(3e3,!1)}function AO(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function hu(n){switch(n.length){case 0:return new pu;case 1:return n[0];default:return new Nb(n)}}function DG(n,t,e,i,r=new Map,o=new Map){let a=[],s=[],l=-1,c=null;if(i.forEach(d=>{let u=d.get("offset"),p=u==l,h=p&&c||new Map;d.forEach((m,_)=>{let M=_,y=m;if("offset"!==_)switch(M=t.normalizePropertyName(M,a),y){case Tw:y=r.get(_);break;case _c:y=o.get(_);break;default:y=t.normalizeStyleValue(_,M,y,a)}h.set(M,y)}),p||s.push(h),c=h,l=u}),a.length)throw new xt(3502,!1);return s}function RO(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&dO(e,"start",n)));break;case"done":n.onDone(()=>i(e&&dO(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&dO(e,"destroy",n)))}}function dO(n,t,e){let o=PO(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),a=n._data;return null!=a&&(o._data=a),o}function PO(n,t,e,i,r="",o=0,a){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!a}}function ps(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function mG(n){let t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}var gO=(n,t)=>!1,IG=(n,t,e)=>[],AG=null;function kO(n){let t=n.parentNode||n.host;return t===AG?null:t}(AO()||typeof Element<"u")&&(typeof window<"u"&&typeof window.document<"u"?(AG=(()=>document.documentElement)(),gO=(n,t)=>{for(;t;){if(t===n)return!0;t=kO(t)}return!1}):gO=(n,t)=>n.contains(t),IG=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));let i=n.querySelector(t);return i?[i]:[]});var oh=null,fG=!1;var RG=gO,PG=IG,OO=(()=>{class n{validateStyleProperty(e){return function(n){oh||(oh=(typeof document<"u"?document.body:null)||{},fG=!!oh.style&&"WebkitAppearance"in oh.style);let t=!0;return oh.style&&!function(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in oh.style,!t&&fG&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in oh.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return RG(e,i)}getParentElement(e){return kO(e)}query(e,i,r){return PG(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,a,s=[],l){return new pu(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),qb=(()=>{class n{}return n.NOOP=new OO,n})(),Dhe=1e3,OG="ng-enter",_O="ng-leave",Dw="ng-trigger",Pw=".ng-trigger",gG="ng-animating",bO=".ng-animating";function cd(n){if("number"==typeof n)return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:vO(parseFloat(t[1]),t[2])}function vO(n,t){return"s"===t?n*Dhe:n}function kw(n,t,e){return n.hasOwnProperty("duration")?n:function(n,t,e){let r,o=0,a="";if("string"==typeof n){let s=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return t.push(hG()),{duration:0,delay:0,easing:""};r=vO(parseFloat(s[1]),s[2]);let l=s[3];null!=l&&(o=vO(parseFloat(l),s[4]));let c=s[5];c&&(a=c)}else r=n;if(!e){let s=!1,l=t.length;r<0&&(t.push(new xt(3100,!1)),s=!0),o<0&&(t.push(new xt(3101,!1)),s=!0),s&&t.splice(l,0,hG())}return{duration:r,delay:o,easing:a}}(n,t,e)}function Xb(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function FG(n){let t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Ef(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function _G(n,t,e){return e?t+":"+e+";":""}function NG(n){let t="";for(let e=0;e<n.style.length;e++){let i=n.style.item(e);t+=_G(0,i,n.style.getPropertyValue(i))}for(let e in n.style)n.style.hasOwnProperty(e)&&!e.startsWith("_")&&(t+=_G(0,Ohe(e),n.style[e]));n.setAttribute("style",t)}function bc(n,t,e){n.style&&(t.forEach((i,r)=>{let o=FO(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),AO()&&NG(n))}function sh(n,t){n.style&&(t.forEach((e,i)=>{let r=FO(i);n.style[r]=""}),AO()&&NG(n))}function Vb(n){return Array.isArray(n)?1==n.length?n[0]:Ew(n):n}var yO=new RegExp("{{\\s*(.+?)\\s*}}","g");function LG(n){let t=[];if("string"==typeof n){let e;for(;e=yO.exec(n);)t.push(e[1]);yO.lastIndex=0}return t}function zb(n,t,e){let i=n.toString(),r=i.replace(yO,(o,a)=>{let s=t[a];return null==s&&(e.push(new xt(3003,!1)),s=""),s.toString()});return r==i?n:r}function Ow(n){let t=[],e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}var khe=/-+([a-z0-9])/g;function FO(n){return n.replace(khe,(...t)=>t[1].toUpperCase())}function Ohe(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function us(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw new xt(3004,!1)}}function BG(n,t){return window.getComputedStyle(n)[t]}var Fw="*";function Vhe(n,t){let e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function(n,t,e){if(":"==n[0]){let l=function(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i)<parseFloat(e);default:return t.push(new xt(3016,!1)),"* => *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}let i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(new xt(3015,!1)),t;let r=i[1],o=i[2],a=i[3];t.push(bG(r,a)),"<"==o[0]&&!(r==Fw&&a==Fw)&&t.push(bG(a,r))}(i,e,t)):e.push(n),e}var Iw=new Set(["true","1"]),Aw=new Set(["false","0"]);function bG(n,t){let e=Iw.has(n)||Aw.has(n),i=Iw.has(t)||Aw.has(t);return(r,o)=>{let a=n==Fw||n==r,s=t==Fw||t==o;return!a&&e&&"boolean"==typeof r&&(a=r?Iw.has(n):Aw.has(n)),!s&&i&&"boolean"==typeof o&&(s=o?Iw.has(t):Aw.has(t)),a&&s}}var Uhe=new RegExp("s*:selfs*,?","g");function UG(n,t,e,i){return new xO(n).build(t,e,i)}var xO=class{constructor(t){this._driver=t}build(t,e,i){let r=new CO(e);return this._resetContextStyleTimingState(r),us(this,Vb(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0,o=[],a=[];return"@"==t.name.charAt(0)&&e.errors.push(new xt(3006,!1)),t.definitions.forEach(s=>{if(this._resetContextStyleTimingState(e),0==s.type){let l=s,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,e))}),l.name=c}else if(1==s.type){let l=this.visitTransition(s,e);i+=l.queryCount,r+=l.depCount,a.push(l)}else e.errors.push(new xt(3007,!1))}),{type:7,name:t.name,states:o,transitions:a,queryCount:i,depCount:r,options:null}}visitState(t,e){let i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){let o=new Set,a=r||{};i.styles.forEach(s=>{s instanceof Map&&s.forEach(l=>{LG(l).forEach(c=>{a.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Ow(o.values()),e.errors.push(new xt(3008,!1)))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;let i=us(this,Vb(t.animation),e);return{type:1,matchers:Vhe(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:ah(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>us(this,i,e)),options:ah(t.options)}}visitGroup(t,e){let i=e.currentTime,r=0,o=t.steps.map(a=>{e.currentTime=i;let s=us(this,a,e);return r=Math.max(r,e.currentTime),s});return e.currentTime=r,{type:3,steps:o,options:ah(t.options)}}visitAnimate(t,e){let i=function(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return uO(kw(n,t).duration,0,"");let e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){let o=uO(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=kw(e,t);return uO(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:rn({});if(5==o.type)r=this.visitKeyframes(o,e);else{let a=t.styles,s=!1;if(!a){s=!0;let c={};i.easing&&(c.easing=i.easing),a=rn(c)}e.currentTime+=i.duration+i.delay;let l=this.visitStyle(a,e);l.isEmptyStep=s,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){let i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){let i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let s of r)"string"==typeof s?s===_c?i.push(s):e.errors.push(new xt(3002,!1)):i.push(FG(s));let o=!1,a=null;return i.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!o))for(let l of s.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:a,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){let i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(a=>{"string"!=typeof a&&a.forEach((s,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(e.errors.push(new xt(3010,!1)),u=!1),o=d.startTime),u&&c.set(l,{startTime:o,endTime:r}),e.options&&function(n,t,e){let i=t.params||{},r=LG(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(new xt(3001,!1))})}(s,e.options,e.errors)})})}visitKeyframes(t,e){let i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(new xt(3011,!1)),i;let o=0,a=[],s=!1,l=!1,c=0,d=t.steps.map(y=>{let x=this._makeStyleAst(y,e),R=null!=x.offset?x.offset:function(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(x.styles),I=0;return null!=R&&(o++,I=x.offset=R),l=l||I<0||I>1,s=s||I<c,c=I,a.push(I),x});l&&e.errors.push(new xt(3012,!1)),s&&e.errors.push(new xt(3200,!1));let u=t.steps.length,p=0;o>0&&o<u?e.errors.push(new xt(3202,!1)):0==o&&(p=1/(u-1));let h=u-1,m=e.currentTime,_=e.currentAnimateTimings,M=_.duration;return d.forEach((y,x)=>{let R=p>0?x==h?1:p*x:a[x],I=R*M;e.currentTime=m+_.delay+I,_.duration=I,this._validateStyleAst(y,e),y.offset=R,i.styles.push(y)}),i}visitReference(t,e){return{type:8,animation:us(this,Vb(t.animation),e),options:ah(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ah(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ah(t.options)}}visitQuery(t,e){let i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;let[o,a]=function(n){let t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(Uhe,"")),n=n.replace(/@\*/g,Pw).replace(/@\w+/g,e=>Pw+"-"+e.slice(1)).replace(/:animating/g,bO),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,ps(e.collectedStyles,e.currentQuerySelector,new Map);let s=us(this,Vb(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:ah(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(new xt(3013,!1));let i="full"===t.timings?{duration:0,delay:0,easing:"full"}:kw(t.timings,e.errors,!0);return{type:12,animation:us(this,Vb(t.animation),e),timings:i,options:null}}},CO=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function ah(n){return n?(n=Xb(n)).params&&(n.params=function(n){return n?Xb(n):null}(n.params)):n={},n}function uO(n,t,e){return{duration:n,delay:t,easing:e}}function NO(n,t,e,i,r,o,a=null,s=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:s}}var Ub=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}},Qhe=new RegExp(":enter","g"),Khe=new RegExp(":leave","g");function jG(n,t,e,i,r,o=new Map,a=new Map,s,l,c=[]){return(new MO).buildKeyframes(n,t,e,i,r,o,a,s,l,c)}var MO=class{buildKeyframes(t,e,i,r,o,a,s,l,c,d=[]){c=c||new Ub;let u=new jb(t,e,c,r,o,d,[]);u.options=l;let p=l.delay?cd(l.delay):0;u.currentTimeline.delayNextStep(p),u.currentTimeline.setStyles([a],null,u.errors,l),us(this,i,u);let h=u.timelines.filter(m=>m.containsAnimation());if(h.length&&s.size){let m;for(let _=h.length-1;_>=0;_--){let M=h[_];if(M.element===e){m=M;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([s],null,u.errors,l)}return h.length?h.map(m=>m.buildKeyframes()):[NO(e,[],[],[],0,p,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){let i=e.subInstructions.get(e.element);if(i){let r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,a=this._visitSubInstructions(i,r,r.options);o!=a&&e.transformIntoNewTimeline(a)}e.previousNode=t}visitAnimateRef(t,e){let i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(let r of t){let o=r?.delay;if(o){let a="number"==typeof o?o:cd(zb(o,r?.params??{},e.errors));i.delayNextStep(a)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime,a=null!=i.duration?cd(i.duration):null,s=null!=i.delay?cd(i.delay):null;return 0!==a&&t.forEach(l=>{let c=e.appendInstructionToTimeline(l,a,s);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),us(this,t.animation,e),e.previousNode=t}visitSequence(t,e){let i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Nw);let a=cd(o.delay);r.delayNextStep(a)}t.steps.length&&(t.steps.forEach(a=>us(this,a,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){let i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?cd(t.options.delay):0;t.steps.forEach(a=>{let s=e.createSubContext(t.options);o&&s.delayNextStep(o),us(this,a,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)}),i.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let i=t.strValue;return kw(e.params?zb(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){let i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());let o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){let i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();let o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){let i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,s=e.createSubContext().currentTimeline;s.easing=i.easing,t.styles.forEach(l=>{s.forwardTime((l.offset||0)*o),s.setStyles(l.styles,l.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){let i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?cd(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Nw);let a=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;let l=null;s.forEach((c,d)=>{e.currentQueryIndex=d;let u=e.createSubContext(t.options,c);o&&u.delayNextStep(o),c===e.element&&(l=u.currentTimeline),us(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,u.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let i=e.parentContext,r=e.currentTimeline,o=t.timings,a=Math.abs(o.duration),s=a*(e.currentQueryTotal-1),l=a*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=s-l;break;case"full":l=i.currentStaggerTime}let d=e.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;us(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}},Nw={},jb=class{constructor(t,e,i,r,o,a,s,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Nw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Tf(this._driver,e,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;let i=t,r=this.options;null!=i.duration&&(r.duration=cd(i.duration)),null!=i.delay&&(r.delay=cd(i.delay));let o=i.params;if(o){let a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach(s=>{(!e||!a.hasOwnProperty(s))&&(a[s]=zb(o[s],a,this.errors))})}}_copyOptions(){let t={};if(this.options){let e=this.options.params;if(e){let i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){let r=e||this.element,o=new jb(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Nw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){let r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new wO(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,a){let s=[];if(r&&s.push(this.element),t.length>0){t=(t=t.replace(Qhe,"."+this._enterClassName)).replace(Khe,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),s.push(...c)}return!o&&0==s.length&&a.push(new xt(3014,!1)),s}},Tf=class{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Tf(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||_c),this._currentKeyframe.set(e,_c);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},a=function(n,t){let i,e=new Map;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,_c)}else Ef(r,e)}),e}(t,this._globalTimelineStyles);for(let[s,l]of a){let c=zb(l,o,i);this._pendingStyles.set(s,c),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??_c),this._updateStyle(s,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{let r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((s,l)=>{let c=Ef(s,new Map,this._backFill);c.forEach((d,u)=>{d===Tw?t.add(u):d===_c&&e.add(u)}),i||c.set("offset",l/this.duration),r.push(c)});let o=t.size?Ow(t.values()):[],a=e.size?Ow(e.values()):[];if(i){let s=r[0],l=new Map(s);s.set("offset",0),l.set("offset",1),r=[s,l]}return NO(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}},wO=class extends Tf{constructor(t,e,i,r,o,a,s=!1){super(t,e,a.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],a=i+e,s=e/a,l=Ef(t[0]);l.set("offset",0),o.push(l);let c=Ef(t[0]);c.set("offset",yG(s)),o.push(c);let d=t.length-1;for(let u=1;u<=d;u++){let p=Ef(t[u]),h=p.get("offset");p.set("offset",yG((e+h*i)/a)),o.push(p)}i=a,e=0,r="",t=o}return NO(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}};function yG(n,t=3){let e=Math.pow(10,t-1);return Math.round(n*e)/e}var lh=class{},$he=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Lw=class extends lh{normalizePropertyName(t,e){return FO(t)}normalizeStyleValue(t,e,i,r){let o="",a=i.toString().trim();if($he.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{let s=i.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push(new xt(3005,!1))}return a+o}};function xG(n,t,e,i,r,o,a,s,l,c,d,u,p){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:p}}var pO={},Bw=class{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,a,s,l,c,d){let u=[],p=this.ast.options&&this.ast.options.params||pO,m=this.buildStyles(i,s&&s.params||pO,u),_=l&&l.params||pO,M=this.buildStyles(r,_,u),y=new Set,x=new Map,R=new Map,I="void"===r,B={params:tme(_,p),delay:this.ast.options?.delay},ee=d?[]:jG(t,e,this.ast.animation,o,a,m,M,B,c,u),Q=0;if(ee.forEach(Qe=>{Q=Math.max(Qe.duration+Qe.delay,Q)}),u.length)return xG(e,this._triggerName,i,r,I,m,M,[],[],x,R,Q,u);ee.forEach(Qe=>{let Ae=Qe.element,D=ps(x,Ae,new Set);Qe.preStyleProps.forEach(ce=>D.add(ce));let re=ps(R,Ae,new Set);Qe.postStyleProps.forEach(ce=>re.add(ce)),Ae!==e&&y.add(Ae)});let we=Ow(y.values());return xG(e,this._triggerName,i,r,I,m,M,ee,we,x,R,Q)}};function tme(n,t){let e=Xb(t);for(let i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}function CG(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}var rme=new Ub,MG="ng-animate-queued",hO="ng-animate-disabled",cme=[],GG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},dme={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},js="__ng_removed",Gb=class{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;let i=t&&t.hasOwnProperty("value");if(this.value=(i?t.value:t)??null,i){let o=Xb(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let e=t.params;if(e){let i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}},Hb="void",mO=new Gb(Hb),Wb=class{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new pu,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>RO(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ps(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let e=this._player;e.triggerCallback&&e.triggerCallback(t)}};function Rw(n){return n&&1===n.nodeType}function wG(n,t){let e=n.style.display;return n.style.display=t??"none",e}function SG(n,t,e,i,r){let o=[];e.forEach(l=>o.push(wG(l)));let a=[];i.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let p=t.computeStyle(c,u,r);d.set(u,p),(!p||0==p.length)&&(c[js]=dme,a.push(c))}),n.set(c,d)});let s=0;return e.forEach(l=>wG(l,o[s++])),a}function EG(n,t){let e=new Map;if(n.forEach(s=>e.set(s,[])),0==t.length)return e;let i=1,r=new Set(t),o=new Map;function a(s){if(!s)return i;let l=o.get(s);if(l)return l;let c=s.parentNode;return l=e.has(c)?c:r.has(c)?i:a(c),o.set(s,l),l}return t.forEach(s=>{let l=a(s);l!==i&&e.get(l).push(s)}),e}function Gs(n,t){n.classList?.add(t)}function Sf(n,t){n.classList?.remove(t)}function mme(n,t,e){hu(e).onDone(()=>n.processLeaveNode(t))}function WG(n,t){for(let e=0;e<n.length;e++){let i=n[e];i instanceof Nb?WG(i.players,t):t.push(i)}}function TG(n,t,e){let i=e.get(n);if(!i)return!1;let r=t.get(n);return r?i.forEach(o=>r.add(o)):t.set(n,i),e.delete(n),!0}var mu=class{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new class{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){let i=new class{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Gs(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw new xt(3302,!1);if(null==i||0==i.length)throw new xt(3303,!1);if("start"!=(n=i)&&"done"!=n)throw new xt(3400,!1);var n;let o=ps(this._elementListeners,t,[]),a={name:e,phase:i,callback:r};o.push(a);let s=ps(this._engine.statesByElement,t,new Map);return s.has(e)||(Gs(t,Dw),Gs(t,Dw+"-"+e),s.set(e,mO)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(a);l>=0&&o.splice(l,1),this._triggers.has(e)||s.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){let e=this._triggers.get(t);if(!e)throw new xt(3401,!1);return e}trigger(t,e,i,r=!0){let o=this._getTrigger(e),a=new Wb(this.id,e,t),s=this._engine.statesByElement.get(t);s||(Gs(t,Dw),Gs(t,Dw+"-"+e),this._engine.statesByElement.set(t,s=new Map));let l=s.get(e),c=new Gb(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),s.set(e,c),l||(l=mO),c.value!==Hb&&l.value===c.value){if(!function(n,t){let e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r<e.length;r++){let o=e[r];if(!t.hasOwnProperty(o)||n[o]!==t[o])return!1}return!0}(l.params,c.params)){let _=[],M=o.matchStyles(l.value,l.params,_),y=o.matchStyles(c.value,c.params,_);_.length?this._engine.reportError(_):this._engine.afterFlush(()=>{sh(t,M),bc(t,y)})}return}let p=ps(this._engine.playersByElement,t,[]);p.forEach(_=>{_.namespaceId==this.id&&_.triggerName==e&&_.queued&&_.destroy()});let h=o.matchTransition(l.value,c.value,t,c.params),m=!1;if(!h){if(!r)return;h=o.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:l,toState:c,player:a,isFallbackTransition:m}),m||(Gs(t,MG),a.onStart(()=>{Sf(t,MG)})),a.onDone(()=>{let _=this.players.indexOf(a);_>=0&&this.players.splice(_,1);let M=this._engine.playersByElement.get(t);if(M){let y=M.indexOf(a);y>=0&&M.splice(y,1)}}),this.players.push(a),p.push(a),a}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){let i=this._engine.driver.query(t,Pw,!0);i.forEach(r=>{if(r[js])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(a=>a.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){let o=this._engine.statesByElement.get(t),a=new Map;if(o){let s=[];if(o.forEach((l,c)=>{if(a.set(c,l.value),this._triggers.has(c)){let d=this.trigger(t,c,Hb,r);d&&s.push(d)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,a),i&&hu(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){let r=new Set;e.forEach(o=>{let a=o.name;if(r.has(a))return;r.add(a);let l=this._triggers.get(a).fallbackTransition,c=i.get(a)||mO,d=new Gb(Hb),u=new Wb(this.id,a,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:a,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){let i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){let o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let a=t;for(;a=a.parentNode;)if(i.statesByElement.get(a)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{let o=t[js];(!o||o===GG)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Gs(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let o=i.element,a=this._elementListeners.get(o);a&&a.forEach(s=>{if(s.name==i.triggerName){let l=PO(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,RO(i.player,s.phase,l,s.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{let o=i.transition.ast.depCount,a=r.transition.ast.depCount;return 0==o||0==a?o-a:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){let i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let a=!1,s=this.driver.getParentElement(e);for(;s;){let l=r.get(s);if(l){let c=i.indexOf(l);i.splice(c+1,0,t),a=!0;break}s=this.driver.getParentElement(s)}a||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;let i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];let r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Rw(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Rw(e))return;let o=e[js];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(t){let a=this._fetchNamespace(t);a&&a.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Gs(t,hO)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Sf(t,hO))}removeNode(t,e,i,r){if(Rw(e)){let o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){let a=this.namespacesByHostElement.get(e);a&&a.id!==t&&a.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[js]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Rw(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,Pw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,bO,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){let e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){let e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return hu(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[js];if(e&&e.setForRemoval){if(t[js]=GG,e.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(hO)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Gs(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{e=this._flushAnimations(i,t)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],e.length?hu(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw new xt(3402,!1)}_flushAnimations(t,e){let i=new Ub,r=[],o=new Map,a=[],s=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach($=>{d.add($);let de=this.driver.query($,".ng-animate-queued",!0);for(let pe=0;pe<de.length;pe++)d.add(de[pe])});let u=this.bodyNode,p=Array.from(this.statesByElement.keys()),h=EG(p,this.collectedEnterElements),m=new Map,_=0;h.forEach(($,de)=>{let pe=OG+_++;m.set(de,pe),$.forEach(Ge=>Gs(Ge,pe))});let M=[],y=new Set,x=new Set;for(let $=0;$<this.collectedLeaveElements.length;$++){let de=this.collectedLeaveElements[$],pe=de[js];pe&&pe.setForRemoval&&(M.push(de),y.add(de),pe.hasAnimation?this.driver.query(de,".ng-star-inserted",!0).forEach(Ge=>y.add(Ge)):x.add(de))}let R=new Map,I=EG(p,Array.from(y));I.forEach(($,de)=>{let pe=_O+_++;R.set(de,pe),$.forEach(Ge=>Gs(Ge,pe))}),t.push(()=>{h.forEach(($,de)=>{let pe=m.get(de);$.forEach(Ge=>Sf(Ge,pe))}),I.forEach(($,de)=>{let pe=R.get(de);$.forEach(Ge=>Sf(Ge,pe))}),M.forEach($=>{this.processLeaveNode($)})});let B=[],ee=[];for(let $=this._namespaceList.length-1;$>=0;$--)this._namespaceList[$].drainQueuedTransitions(e).forEach(pe=>{let Ge=pe.player,Se=pe.element;if(B.push(Ge),this.collectedEnterElements.length){let wt=Se[js];if(wt&&wt.setForMove){if(wt.previousTriggersValues&&wt.previousTriggersValues.has(pe.triggerName)){let on=wt.previousTriggersValues.get(pe.triggerName),Ce=this.statesByElement.get(pe.element);if(Ce&&Ce.has(pe.triggerName)){let mt=Ce.get(pe.triggerName);mt.value=on,Ce.set(pe.triggerName,mt)}}return void Ge.destroy()}}let Fe=!u||!this.driver.containsElement(u,Se),lt=R.get(Se),Mt=m.get(Se),pt=this._buildInstruction(pe,i,Mt,lt,Fe);if(pt.errors&&pt.errors.length)return void ee.push(pt);if(Fe)return Ge.onStart(()=>sh(Se,pt.fromStyles)),Ge.onDestroy(()=>bc(Se,pt.toStyles)),void r.push(Ge);if(pe.isFallbackTransition)return Ge.onStart(()=>sh(Se,pt.fromStyles)),Ge.onDestroy(()=>bc(Se,pt.toStyles)),void r.push(Ge);let ke=[];pt.timelines.forEach(wt=>{wt.stretchStartingKeyframe=!0,this.disabledNodes.has(wt.element)||ke.push(wt)}),pt.timelines=ke,i.append(Se,pt.timelines),a.push({instruction:pt,player:Ge,element:Se}),pt.queriedElements.forEach(wt=>ps(s,wt,[]).push(Ge)),pt.preStyleProps.forEach((wt,on)=>{if(wt.size){let Ce=l.get(on);Ce||l.set(on,Ce=new Set),wt.forEach((mt,ht)=>Ce.add(ht))}}),pt.postStyleProps.forEach((wt,on)=>{let Ce=c.get(on);Ce||c.set(on,Ce=new Set),wt.forEach((mt,ht)=>Ce.add(ht))})});if(ee.length){let $=[];ee.forEach(de=>{$.push(new xt(3505,!1))}),B.forEach(de=>de.destroy()),this.reportError($)}let Q=new Map,we=new Map;a.forEach($=>{let de=$.element;i.has(de)&&(we.set(de,de),this._beforeAnimationBuild($.player.namespaceId,$.instruction,Q))}),r.forEach($=>{let de=$.element;this._getPreviousPlayers(de,!1,$.namespaceId,$.triggerName,null).forEach(Ge=>{ps(Q,de,[]).push(Ge),Ge.destroy()})});let Qe=M.filter($=>TG($,l,c)),Ae=new Map;SG(Ae,this.driver,x,c,_c).forEach($=>{TG($,l,c)&&Qe.push($)});let re=new Map;h.forEach(($,de)=>{SG(re,this.driver,new Set($),l,Tw)}),Qe.forEach($=>{let de=Ae.get($),pe=re.get($);Ae.set($,new Map([...Array.from(de?.entries()??[]),...Array.from(pe?.entries()??[])]))});let ce=[],he=[],_e={};a.forEach($=>{let{element:de,player:pe,instruction:Ge}=$;if(i.has(de)){if(d.has(de))return pe.onDestroy(()=>bc(de,Ge.toStyles)),pe.disabled=!0,pe.overrideTotalTime(Ge.totalTime),void r.push(pe);let Se=_e;if(we.size>1){let lt=de,Mt=[];for(;lt=lt.parentNode;){let pt=we.get(lt);if(pt){Se=pt;break}Mt.push(lt)}Mt.forEach(pt=>we.set(pt,Se))}let Fe=this._buildAnimation(pe.namespaceId,Ge,Q,o,re,Ae);if(pe.setRealPlayer(Fe),Se===_e)ce.push(pe);else{let lt=this.playersByElement.get(Se);lt&&lt.length&&(pe.parentPlayer=hu(lt)),r.push(pe)}}else sh(de,Ge.fromStyles),pe.onDestroy(()=>bc(de,Ge.toStyles)),he.push(pe),d.has(de)&&r.push(pe)}),he.forEach($=>{let de=o.get($.element);if(de&&de.length){let pe=hu(de);$.setRealPlayer(pe)}}),r.forEach($=>{$.parentPlayer?$.syncPlayerEvents($.parentPlayer):$.destroy()});for(let $=0;$<M.length;$++){let de=M[$],pe=de[js];if(Sf(de,_O),pe&&pe.hasAnimation)continue;let Ge=[];if(s.size){let Fe=s.get(de);Fe&&Fe.length&&Ge.push(...Fe);let lt=this.driver.query(de,bO,!0);for(let Mt=0;Mt<lt.length;Mt++){let pt=s.get(lt[Mt]);pt&&pt.length&&Ge.push(...pt)}}let Se=Ge.filter(Fe=>!Fe.destroyed);Se.length?mme(this,de,Se):this.processLeaveNode(de)}return M.length=0,ce.forEach($=>{this.players.push($),$.onDone(()=>{$.destroy();let de=this.players.indexOf($);this.players.splice(de,1)}),$.play()}),ce}elementContainsData(t,e){let i=!1,r=e[js];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let a=[];if(e){let s=this.playersByQueriedElement.get(t);s&&(a=s)}else{let s=this.playersByElement.get(t);if(s){let l=!o||o==Hb;s.forEach(c=>{c.queued||!l&&c.triggerName!=r||a.push(c)})}}return(i||r)&&(a=a.filter(s=>!(i&&i!=s.namespaceId||r&&r!=s.triggerName))),a}_beforeAnimationBuild(t,e,i){let o=e.element,a=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(let l of e.timelines){let c=l.element,d=c!==o,u=ps(i,c,[]);this._getPreviousPlayers(c,d,a,s,e.toState).forEach(h=>{let m=h.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),h.destroy(),u.push(h)})}sh(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,a){let s=e.triggerName,l=e.element,c=[],d=new Set,u=new Set,p=e.timelines.map(m=>{let _=m.element;d.add(_);let M=_[js];if(M&&M.removedBeforeQueried)return new pu(m.duration,m.delay);let y=_!==l,x=function(n){let t=[];return WG(n,t),t}((i.get(_)||cme).map(Q=>Q.getRealPlayer())).filter(Q=>!!Q.element&&Q.element===_),R=o.get(_),I=a.get(_),B=DG(0,this._normalizer,0,m.keyframes,R,I),ee=this._buildPlayer(m,B,x);if(m.subTimeline&&r&&u.add(_),y){let Q=new Wb(t,s,_);Q.setRealPlayer(ee),c.push(Q)}return ee});c.forEach(m=>{ps(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function(n,t,e){let i=n.get(t);if(i){if(i.length){let r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,m.element,m))}),d.forEach(m=>Gs(m,gG));let h=hu(p);return h.onDestroy(()=>{d.forEach(m=>Sf(m,gG)),bc(l,e.toStyles)}),u.forEach(m=>{ps(r,m,[]).push(h)}),h}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new pu(t.duration,t.delay)}}(t,e,i),this._timelineEngine=new class{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){let i=[],r=[],o=UG(this._driver,e,i,r);if(i.length)throw new xt(3503,!1);this._animations.set(t,o)}_buildPlayer(t,e,i){let r=t.element,o=DG(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){let a,r=[],o=this._animations.get(t),s=new Map;if(o?(a=jG(this._driver,e,o,OG,_O,new Map,new Map,i,rme,r),a.forEach(d=>{let u=ps(s,d.element,new Map);d.postStyleProps.forEach(p=>u.set(p,null))})):(r.push(new xt(3300,!1)),a=[]),r.length)throw new xt(3504,!1);s.forEach((d,u)=>{d.forEach((p,h)=>{d.set(h,this._driver.computeStyle(u,h,_c))})});let c=hu(a.map(d=>{let u=s.get(d.element);return this._buildPlayer(d,new Map,u)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){let e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);let i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){let e=this._playersById.get(t);if(!e)throw new xt(3301,!1);return e}listen(t,e,i,r){let o=PO(e,"","","");return RO(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});let o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){let a=t+"-"+r,s=this._triggerCache[a];if(!s){let l=[],c=[],d=UG(this._driver,o,l,c);if(l.length)throw new xt(3404,!1);s=function(n,t,e){return new class{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new class{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){let i=new Map,r=Xb(this.defaultParams);return Object.keys(t).forEach(o=>{let a=t[o];null!==a&&(r[o]=a)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,s)=>{a&&(a=zb(a,r,e));let l=this.normalizer.normalizePropertyName(s,e);a=this.normalizer.normalizeStyleValue(s,l,a,e),i.set(s,a)})}),i}}(r.style,o,i))}),CG(this.states,"true","1"),CG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new Bw(t,r,this.states))}),this.fallbackTransition=function(n,t,e){return new Bw(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(a,s)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(a=>a.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}(n,t,e)}(r,d,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(e,r,s)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){let[o,a]=mG(i);this._timelineEngine.command(o,e,a,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){let[a,s]=mG(i);return this._timelineEngine.listen(a,e,s,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}},bme=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&bc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(bc(this._element,this._initialStyles),this._endStyles&&(bc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(sh(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(sh(this._element,this._endStyles),this._endStyles=null),bc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function fO(n){let t=null;return n.forEach((e,i)=>{(function(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}var Vw=class{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:BG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){let e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},xme=(()=>{class n extends Fb{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:as.None,styles:[],data:{animation:[]}})}build(e){let i=this._nextAnimationId.toString();this._nextAnimationId++;let r=Array.isArray(e)?Ew(e):e;return XG(this._renderer,null,i,"register",[r]),new LO(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(O(cc),O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),LO=class extends Sw{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new BO(this._id,t,e||{},this._renderer)}},BO=class{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return XG(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}};function XG(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}var YG="@.disabled",Cme=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,a)=>{let s=a?.parentNode(o);s&&a.removeChild(s,o)}}createRenderer(e,i){let o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(o);return d||(d=new Uw("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,d)),d}let a=i.id,s=i.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(a,s,e,d.name,d)};return i.data.animation.forEach(l),new VO(this,s,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&e<this._microtaskId?this._zone.run(()=>i(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{let[a,s]=o;a(s)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(O(cc),O(mu),O(ot))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Uw=class{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==YG?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}},VO=class extends Uw{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==YG?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){let r=function(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t),o=e.slice(1),a="";return"@"!=o.charAt(0)&&([o,a]=function(n){let t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,a,s=>{this.factory.scheduleListenerCallback(s._data||-1,i,s)})}return this.delegate.listen(t,e,i)}},Sme=(()=>{class n extends mu{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(qb),O(lh),O(gc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),QG=[{provide:Fb,useClass:xme},{provide:lh,useFactory:function(){return new Lw}},{provide:mu,useClass:Sme},{provide:cc,useFactory:function(n,t,e){return new Cme(n,t,e)},deps:[Rb,mu,ot]}],qG=[{provide:qb,useFactory:()=>new class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return RG(t,e)}getParentElement(t){return kO(t)}query(t,e,i){return PG(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,a=[]){let l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);let c=new Map,d=a.filter(h=>h instanceof Vw);(function(n,t){return 0===n||0===t})(i,r)&&d.forEach(h=>{h.currentSnapshot.forEach((m,_)=>c.set(_,m))});let u=(n=e,n.length?n[0]instanceof Map?n:n.map(t=>FG(t)):[]).map(h=>Ef(h));var n;u=function(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,a)=>{i.has(a)||r.push(a),i.set(a,o)}),r.length)for(let o=1;o<t.length;o++){let a=t[o];r.forEach(s=>a.set(s,BG(n,s)))}}return t}(t,u,c);let p=function(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=fO(t[0]),t.length>1&&(i=fO(t[t.length-1]))):t instanceof Map&&(e=fO(t)),e||i?new bme(n,e,i):null}(t,u);return new Vw(t,u,l,p)}}},{provide:pi,useValue:"BrowserAnimations"},...QG],Dme=[{provide:qb,useClass:OO},{provide:pi,useValue:"NoopAnimations"},...QG],ZG=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?Dme:qG}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:qG,imports:[ww]}),n})(),jO={};function fe(n,t){if(jO[n]=(jO[n]||0)+1,"function"==typeof t)return HO(n,(...i)=>({...t(...i),type:n}));switch(t?t._as:"empty"){case"empty":return HO(n,()=>({type:n}));case"props":return HO(n,i=>({...i,type:n}));default:throw new Error("Unexpected config.")}}function HO(n,t){return Object.defineProperty(t,"type",{value:n,writable:!1})}var p8="@ngrx/store/init",If=(()=>{class n extends xr{constructor(){super({type:p8})}next(e){if("function"==typeof e)throw new TypeError("\n        Dispatch expected an object, instead it received a function.\n        If you're using the createAction function, make sure to invoke the function\n        before dispatching the action. For example, someAction should be someAction().");if(typeof e>"u")throw new TypeError("Actions must be objects");if(typeof e.type>"u")throw new TypeError("Actions must have a type property");super.next(e)}complete(){}ngOnDestroy(){super.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ime=[If],h8=new te("@ngrx/store Internal Root Guard"),KG=new te("@ngrx/store Internal Initial State"),XO=new te("@ngrx/store Initial State"),m8=new te("@ngrx/store Reducer Factory"),JG=new te("@ngrx/store Internal Reducer Factory Provider"),f8=new te("@ngrx/store Initial Reducers"),zO=new te("@ngrx/store Internal Initial Reducers"),$G=new te("@ngrx/store Store Features"),e8=new te("@ngrx/store Internal Store Reducers"),UO=new te("@ngrx/store Internal Feature Reducers"),t8=new te("@ngrx/store Internal Feature Configs"),g8=new te("@ngrx/store Internal Store Features"),n8=new te("@ngrx/store Internal Feature Reducers Token"),_8=new te("@ngrx/store Feature Reducers"),i8=new te("@ngrx/store User Provided Meta Reducers"),Df=new te("@ngrx/store Meta Reducers"),r8=new te("@ngrx/store Internal Resolved Meta Reducers"),o8=new te("@ngrx/store User Runtime Checks Config"),a8=new te("@ngrx/store Internal User Runtime Checks Config"),Yb=new te("@ngrx/store Internal Runtime Checks"),YO=new te("@ngrx/store Check if Action types are unique");function ch(n,t={}){let e=Object.keys(n),i={};for(let o=0;o<e.length;o++){let a=e[o];"function"==typeof n[a]&&(i[a]=n[a])}let r=Object.keys(i);return function(a,s){a=void 0===a?t:a;let l=!1,c={};for(let d=0;d<r.length;d++){let u=r[d],h=a[u],m=(0,i[u])(h,s);c[u]=m,l=l||m!==h}return l?c:a}}function b8(...n){return function(t){if(0===n.length)return t;let e=n[n.length-1];return n.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function v8(n,t){return Array.isArray(t)&&t.length>0&&(n=b8.apply(null,[...t,n])),(e,i)=>{let r=n(e);return(o,a)=>r(o=void 0===o?i:o,a)}}new te("@ngrx/store Root Store Provider"),new te("@ngrx/store Feature State Provider");var Qb=class extends Kt{},jw=class extends If{},Gw=(()=>{class n extends xr{constructor(e,i,r,o){super(o(r,i)),this.dispatcher=e,this.initialState=i,this.reducers=r,this.reducerFactory=o}get currentReducers(){return this.reducers}addFeature(e){this.addFeatures([e])}addFeatures(e){let i=e.reduce((r,{reducers:o,reducerFactory:a,metaReducers:s,initialState:l,key:c})=>{let d="function"==typeof o?function(n){let t=Array.isArray(n)&&n.length>0?b8(...n):e=>e;return(e,i)=>(e=t(e),(r,o)=>e(r=void 0===r?i:r,o))}(s)(o,l):v8(a,s)(o,l);return r[c]=d,r},{});this.addReducers(i)}removeFeature(e){this.removeFeatures([e])}removeFeatures(e){this.removeReducers(e.map(i=>i.key))}addReducer(e,i){this.addReducers({[e]:i})}addReducers(e){this.reducers={...this.reducers,...e},this.updateReducers(Object.keys(e))}removeReducer(e){this.removeReducers([e])}removeReducers(e){e.forEach(i=>{this.reducers=function(n,t){return Object.keys(n).filter(e=>e!==t).reduce((e,i)=>Object.assign(e,{[i]:n[i]}),{})}(this.reducers,i)}),this.updateReducers(e)}updateReducers(e){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:"@ngrx/store/update-reducers",features:e})}ngOnDestroy(){this.complete()}}return n.\u0275fac=function(e){return new(e||n)(O(jw),O(XO),O(f8),O(m8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Fme=[Gw,{provide:Qb,useExisting:Gw},{provide:jw,useExisting:If}],Zb=(()=>{class n extends Ee{ngOnDestroy(){this.complete()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Nme=[Zb],Ww=class extends Kt{},s8=(()=>{class n extends xr{constructor(e,i,r,o){super(o);let c=e.pipe(Bp(XA)).pipe(It(i)).pipe(function(n,t){return Yt(function(n,t,e,i,r){return(o,a)=>{let s=e,l=t,c=0;o.subscribe(Ht(a,d=>{let u=c++;l=s?n(l,d,u):(s=!0,d),a.next(l)},void 0))}}(n,t,arguments.length>=2))}(Lme,{state:o}));this.stateSubscription=c.subscribe(({state:d,action:u})=>{this.next(d),r.next(u)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return n.INIT=p8,n.\u0275fac=function(e){return new(e||n)(O(If),O(Qb),O(Zb),O(XO))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function Lme(n={state:void 0},[t,e]){let{state:i}=n;return{state:e(i,t),action:t}}var Bme=[s8,{provide:Ww,useExisting:s8}],Ie=(()=>{class n extends Kt{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e}select(e,...i){return un.call(null,e,...i)(this)}lift(e){let i=new n(this,this.actionsObserver,this.reducerManager);return i.operator=e,i}dispatch(e){this.actionsObserver.next(e)}next(e){this.actionsObserver.next(e)}error(e){this.actionsObserver.error(e)}complete(){this.actionsObserver.complete()}addReducer(e,i){this.reducerManager.addReducer(e,i)}removeReducer(e){this.reducerManager.removeReducer(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Ww),O(If),O(Gw))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Vme=[Ie];function un(n,t,...e){return function(r){let o;if("string"==typeof n){let a=[t,...e].filter(Boolean);o=r.pipe(function(...n){let t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return q(e=>{let i=e;for(let r=0;r<t;r++){let o=i?.[n[r]];if(!(typeof o<"u"))return;i=o}return i})}(n,...a))}else{if("function"!=typeof n)throw new TypeError(`Unexpected type '${typeof n}' in select operator, expected 'string' or 'function'`);o=r.pipe(q(a=>n(a,t)))}return o.pipe(ri())}}var QO="https://ngrx.io/guide/store/configuration/runtime-checks";function l8(n){return void 0===n}function c8(n){return null===n}function y8(n){return Array.isArray(n)}function x8(n){return"object"==typeof n&&null!==n}function GO(n){return"function"==typeof n}function d8(n,t){return n===t}function C8(n,t=d8,e=d8){let o,i=null,r=null;return{memoized:function(){if(void 0!==o)return o.result;if(!i)return r=n.apply(null,arguments),i=arguments,r;if(!function(n,t,e){for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!0;return!1}(arguments,i,t))return r;let d=n.apply(null,arguments);return i=arguments,e(r,d)?r:(r=d,d)},reset:function(){i=null,r=null},setResult:function(d){o={result:d}},clearResult:function(){o=void 0}}}function W(...n){return function(n,t={stateFn:Zme}){return function(...e){let i=e;if(Array.isArray(i[0])){let[d,...u]=i;i=[...d,...u]}else 1===i.length&&function(n){return!!n&&"object"==typeof n&&Object.values(n).every(t=>"function"==typeof t)}(i[0])&&(i=function(n){let t=Object.values(n),e=Object.keys(n);return[...t,(...r)=>e.reduce((o,a,s)=>({...o,[a]:r[s]}),{})]}(i[0]));let r=i.slice(0,i.length-1),o=i[i.length-1],a=r.filter(d=>d.release&&"function"==typeof d.release),s=n(function(...d){return o.apply(null,d)}),l=C8(function(d,u){return t.stateFn.apply(null,[d,r,u,s])});return Object.assign(l.memoized,{release:function(){l.reset(),s.reset(),a.forEach(d=>d.release())},projector:s.memoized,setResult:l.setResult,clearResult:l.clearResult})}}(C8)(...n)}function Zme(n,t,e,i){if(void 0===e){let o=t.map(a=>a(n));return i.memoized.apply(null,o)}let r=t.map(o=>o(n,e));return i.memoized.apply(null,[...r,e])}function Mr(n){return W(t=>t[n],t=>t)}function efe(n){return n instanceof te?$n(n):n}function tfe(n,t){return t.map((e,i)=>{if(n[i]instanceof te){let r=$n(n[i]);return{key:e.key,reducerFactory:r.reducerFactory?r.reducerFactory:ch,metaReducers:r.metaReducers?r.metaReducers:[],initialState:r.initialState}}return e})}function nfe(n){return n.map(t=>t instanceof te?$n(t):t)}function M8(n){return"function"==typeof n?n():n}function ife(n,t){return n.concat(t)}function rfe(){if($n(Ie,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function WO(n){Object.freeze(n);let t=GO(n);return Object.getOwnPropertyNames(n).forEach(e=>{if(!e.startsWith("\u0275")&&function(n,t){return Object.prototype.hasOwnProperty.call(n,t)}(n,e)&&(!t||"caller"!==e&&"callee"!==e&&"arguments"!==e)){let i=n[e];(x8(i)||GO(i))&&!Object.isFrozen(i)&&WO(i)}}),n}function qO(n,t=[]){return(l8(n)||c8(n))&&0===t.length?{path:["root"],value:n}:Object.keys(n).reduce((i,r)=>{if(i)return i;let o=n[r];return function(n){return GO(n)&&n.hasOwnProperty("\u0275cmp")}(o)?i:!(l8(o)||c8(o)||function(n){return"number"==typeof n}(o)||function(n){return"boolean"==typeof n}(o)||function(n){return"string"==typeof n}(o)||y8(o))&&(function(n){if(!function(n){return x8(n)&&!y8(n)}(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||null===t}(o)?qO(o,[...t,r]):{path:[...t,r],value:o})},!1)}function u8(n,t){if(!1===n)return;let e=n.path.join("."),i=new Error(`Detected unserializable ${t} at "${e}". ${QO}#strict${t}serializability`);throw i.value=n.value,i.unserializablePath=e,i}function lfe(n){return{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function cfe({strictActionSerializability:n,strictStateSerializability:t}){return e=>n||t?function(n,t){return function(e,i){t.action(i)&&u8(qO(i),"action");let r=n(e,i);return t.state()&&u8(qO(r),"state"),r}}(e,{action:i=>n&&!ZO(i),state:()=>t}):e}function dfe({strictActionImmutability:n,strictStateImmutability:t}){return e=>n||t?function(n,t){return function(e,i){let r=t.action(i)?WO(i):i,o=n(e,r);return t.state()?WO(o):o}}(e,{action:i=>n&&!ZO(i),state:()=>t}):e}function ZO(n){return n.type.startsWith("@ngrx")}function ufe({strictActionWithinNgZone:n}){return t=>n?function(n,t){return function(e,i){if(t.action(i)&&!ot.isInAngularZone())throw new Error(`Action '${i.type}' running outside NgZone. ${QO}#strictactionwithinngzone`);return n(e,i)}}(t,{action:e=>n&&!ZO(e)}):t}function pfe(n){return[{provide:a8,useValue:n},{provide:o8,useFactory:hfe,deps:[a8]},{provide:Yb,deps:[o8],useFactory:lfe},{provide:Df,multi:!0,deps:[Yb],useFactory:dfe},{provide:Df,multi:!0,deps:[Yb],useFactory:cfe},{provide:Df,multi:!0,deps:[Yb],useFactory:ufe}]}function w8(){return[{provide:YO,multi:!0,deps:[Yb],useFactory:mfe}]}function hfe(n){return n}function mfe(n){if(!n.strictActionTypeUniqueness)return;let t=Object.entries(jO).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${QO}#strictactiontypeuniqueness`)}function ffe(n={},t={}){return[{provide:h8,useFactory:rfe},{provide:KG,useValue:t.initialState},{provide:XO,useFactory:M8,deps:[KG]},{provide:zO,useValue:n},{provide:e8,useExisting:n instanceof te?n:zO},{provide:f8,deps:[zO,[new cf(e8)]],useFactory:efe},{provide:i8,useValue:t.metaReducers?t.metaReducers:[]},{provide:r8,deps:[Df,i8],useFactory:ife},{provide:JG,useValue:t.reducerFactory?t.reducerFactory:ch},{provide:m8,deps:[JG,r8],useFactory:v8},Ime,Fme,Nme,Bme,Vme,pfe(t.runtimeChecks),w8()]}function gfe(n,t,e={}){return[{provide:t8,multi:!0,useValue:n instanceof Object?{}:e},{provide:$G,multi:!0,useValue:{key:n instanceof Object?n.name:n,reducerFactory:e instanceof te||!e.reducerFactory?ch:e.reducerFactory,metaReducers:e instanceof te||!e.metaReducers?[]:e.metaReducers,initialState:e instanceof te||!e.initialState?void 0:e.initialState}},{provide:g8,deps:[t8,$G],useFactory:tfe},{provide:UO,multi:!0,useValue:n instanceof Object?n.reducer:t},{provide:n8,multi:!0,useExisting:t instanceof te?t:UO},{provide:_8,multi:!0,deps:[UO,[new cf(n8)]],useFactory:nfe},w8()]}var Kb=(()=>{class n{constructor(e,i,r,o,a,s){}}return n.\u0275fac=function(e){return new(e||n)(O(If),O(Qb),O(Zb),O(Ie),O(h8,8),O(YO,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),qw=(()=>{class n{constructor(e,i,r,o,a){this.features=e,this.featureReducers=i,this.reducerManager=r;let s=e.map((l,c)=>{let u=i.shift()[c];return{...l,reducers:u,initialState:M8(l.initialState)}});r.addFeatures(s)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return n.\u0275fac=function(e){return new(e||n)(O(g8),O(_8),O(Gw),O(Kb),O(YO,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),wr=(()=>{class n{static forRoot(e,i){return{ngModule:Kb,providers:[...ffe(e,i)]}}static forFeature(e,i,r={}){return{ngModule:qw,providers:[...gfe(e,i,r)]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})();function ye(...n){return{reducer:n.pop(),types:n.map(i=>i.type)}}function gr(n,...t){let e=new Map;for(let i of t)for(let r of i.types){let o=e.get(r);e.set(r,o?(s,l)=>i.reducer(o(s,l),l):i.reducer)}return function(i=n,r){let o=e.get(r.type);return o?o(i,r):i}}var _fe={dispatch:!0,functional:!1,useEffectsErrorHandler:!0},Yw="__@ngrx/effects_create__";function _r(n,t={}){let e=t.functional?n:n(),i={..._fe,...t};return Object.defineProperty(e,Yw,{value:i}),e}function D8(n){return Object.getPrototypeOf(n)}function I8(n){return"function"==typeof n}function S8(n){return n.filter(I8)}function xfe(n,t,e){let i=D8(n).constructor.name,r=function(n){return function(n){return Object.getOwnPropertyNames(n).filter(i=>!(!n[i]||!n[i].hasOwnProperty(Yw))&&n[i][Yw].hasOwnProperty("dispatch")).map(i=>({propertyName:i,...n[i][Yw]}))}(n)}(n).map(({propertyName:o,dispatch:a,useEffectsErrorHandler:s})=>{let l="function"==typeof n[o]?n[o]():n[o],c=s?e(l,t):l;return!1===a?c.pipe(k_()):c.pipe(Yt((n,t)=>{n.subscribe(Ht(t,e=>{t.next(As.createNext(e))},()=>{t.next(As.createComplete()),t.complete()},e=>{t.next(As.createError(e)),t.complete()}))})).pipe(q(u=>({effect:n[o],notification:u,propertyName:o,sourceName:i,sourceInstance:n})))});return tn(...r)}var Cfe=10;function A8(n,t,e=Cfe){return n.pipe(co(i=>(t&&t.handleError(i),e<=1?n:A8(n,t,e-1))))}var Eo=(()=>{class n extends Kt{constructor(e){super(),e&&(this.source=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}}return n.\u0275fac=function(e){return new(e||n)(O(Zb))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Zn(...n){return Oe(t=>n.some(e=>"string"==typeof e?e===t.type:e.type===t.type))}var R8=new te("@ngrx/effects Internal Root Guard"),Xw=new te("@ngrx/effects User Provided Effects"),KO=new te("@ngrx/effects Internal Root Effects"),P8=new te("@ngrx/effects Internal Root Effects Instances"),E8=new te("@ngrx/effects Internal Feature Effects"),k8=new te("@ngrx/effects Internal Feature Effects Instance Groups"),Mfe=new te("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>A8}),O8="@ngrx/effects/init";fe(O8);var Dfe="ngrxOnIdentifyEffects",Pfe="ngrxOnInitEffects";function kfe(n){return JO(n,Pfe)}function JO(n,t){return n&&t in n&&"function"==typeof n[t]}var F8=(()=>{class n extends Ee{constructor(e,i){super(),this.errorHandler=e,this.effectsErrorHandler=i}addEffects(e){this.next(e)}toActions(){return this.pipe(BC(e=>function(n){return"Object"!==n.constructor.name&&"Function"!==n.constructor.name}(e)?D8(e):e),xn(e=>e.pipe(BC(Ofe))),xn(e=>{let i=e.pipe(NC(o=>function(n,t){return e=>{let i=xfe(e,n,t);return function(n){return JO(n,"ngrxOnRunEffects")}(e)?e.ngrxOnRunEffects(i):i}}(this.errorHandler,this.effectsErrorHandler)(o)),q(o=>(function(n,t){if("N"===n.notification.kind){let e=n.notification.value;!function(n){return"function"!=typeof n&&n&&n.type&&"string"==typeof n.type}(e)&&t.handleError(new Error(`Effect ${function({propertyName:n,sourceInstance:t,sourceName:e}){let i="function"==typeof t[n];return`"${e}.${String(n)}${i?"()":""}"`}(n)} dispatched an invalid action: ${function(n){try{return JSON.stringify(n)}catch{return n}}(e)}`))}}(o,this.errorHandler),o.notification)),Oe(o=>"N"===o.kind&&null!=o.value),Yt((n,t)=>{n.subscribe(Ht(t,e=>KA(e,t)))}));return tn(i,e.pipe(Lt(1),Oe(kfe),q(o=>o.ngrxOnInitEffects())))}))}}return n.\u0275fac=function(e){return new(e||n)(O(la),O(Mfe))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Ofe(n){return function(n){return JO(n,Dfe)}(n)?n.ngrxOnIdentifyEffects():""}var N8=(()=>{class n{constructor(e,i){this.effectSources=e,this.store=i,this.effectsSubscription=null}get isStarted(){return!!this.effectsSubscription}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(O(F8),O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),L8=(()=>{class n{constructor(e,i,r,o,a,s,l){this.sources=e,i.start();for(let c of o)e.addEffects(c);r.dispatch({type:O8})}addEffects(e){this.sources.addEffects(e)}}return n.\u0275fac=function(e){return new(e||n)(O(F8),O(N8),O(Ie),O(P8),O(Kb,8),O(qw,8),O(R8,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),Nfe=(()=>{class n{constructor(e,i,r,o){let a=i.flat();for(let s of a)e.addEffects(s)}}return n.\u0275fac=function(e){return new(e||n)(O(L8),O(k8),O(Kb,8),O(qw,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),to=(()=>{class n{static forFeature(...e){let i=e.flat(),r=S8(i);return{ngModule:Nfe,providers:[r,{provide:E8,multi:!0,useValue:i},{provide:Xw,multi:!0,useValue:[]},{provide:k8,multi:!0,useFactory:T8,deps:[E8,Xw]}]}}static forRoot(...e){let i=e.flat(),r=S8(i);return{ngModule:L8,providers:[r,{provide:KO,useValue:[i]},{provide:R8,useFactory:Lfe},{provide:Xw,multi:!0,useValue:[]},{provide:P8,useFactory:T8,deps:[KO,Xw]}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})();function T8(n,t){let e=[];for(let i of n)e.push(...i);for(let i of t)e.push(...i);return e.map(i=>I8(i)?$n(i):i)}function Lfe(){let n=$n(N8,{optional:!0,skipSelf:!0}),t=$n(KO,{self:!0});if((1!==t.length||0!==t[0].length)&&n)throw new TypeError("EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.");return"guarded"}var Cn=(()=>{return(n=Cn||(Cn={}))[n.UNKNOWN=0]="UNKNOWN",n[n.EXPERIMENTS=1]="EXPERIMENTS",n[n.EXPERIMENT=2]="EXPERIMENT",n[n.COMPARE_EXPERIMENT=3]="COMPARE_EXPERIMENT",n[n.CARD=4]="CARD",n[n.NOT_SET=5]="NOT_SET",Cn;var n})(),Qw="defaultExperimentId",Af=(()=>{return(n=Af||(Af={}))[n.EXPERIMENTS=0]="EXPERIMENTS",n[n.DASHBOARD=1]="DASHBOARD",Af;var n})();function Rf(n){return n.split(",").map(t=>{let e=t.indexOf(":");if(e<0)throw new Error(`Expect colon delimiting name and ID: ${t}`);let i=t.slice(0,e),r=t.slice(e+1);if(!r)throw new Error(`Expect id to be non-falsy: ${t}`);return{name:i,id:r}})}function B8(n){return n.map(({alias:t,id:e})=>`${t}:${e}`).join(",")}function Jb(n,t){switch(n){case Cn.EXPERIMENT:return Object.prototype.hasOwnProperty.call(t,"experimentId")?[t.experimentId]:[Qw];case Cn.CARD:{let e=t.experimentIds;return e.indexOf(",")<0?[e]:Rf(e).map(({id:i})=>i)}case Cn.COMPARE_EXPERIMENT:return Rf(t.experimentIds).map(({id:i})=>i);default:return null}}function Vo(n,t){if(!n||!t)return n===t;if(n.routeKind!==t.routeKind)return!1;let e=Jb(n.routeKind,n.params),i=Jb(t.routeKind,t.params);if(null===e||null===i)return e===i;if(e.length!==i.length)return!1;let r=i.sort();return e.sort().every((o,a)=>r[a]===o)}function $O(n){switch(n){case Cn.EXPERIMENTS:return Af.EXPERIMENTS;case Cn.EXPERIMENT:case Cn.CARD:case Cn.COMPARE_EXPERIMENT:return Af.DASHBOARD;case Cn.UNKNOWN:case Cn.NOT_SET:return null}}function Zw(n,t,e){let i=$O(n);return null!==i&&!e.some(r=>r.deepLinkGroup===i&&r.namespaceId===t)}var U8_getHref=()=>window.location.href,dh=(()=>{class n{getHref(){return U8_getHref()}getSearch(){let e=new URLSearchParams(window.location.search),i=[];return e.forEach((r,o)=>{i.push({key:o,value:r})}),i}getHash(){return window.location.hash}getPath(){return window.location.pathname}getHistoryState(){return window.history.state}replaceStateUrl(e){window.history.replaceState(window.history.state,"",e)}pushStateUrl(e){window.history.pushState(null,"",e)}replaceStateData(e){window.history.replaceState(e,"")}onPopState(){return Ei(window,"popstate").pipe(q(e=>({pathname:this.getPath(),state:e.state})))}getResolvedPath(e){return new URL(e,U8_getHref()).pathname}getFullPath(e,i,r){let o=this.getResolvedPath(e),a="";return i.length&&(a="?"+function(n){let t=new URLSearchParams;for(let{key:e,value:i}of n)t.append(e,i);return t}(i).toString()),`${o}${a}${r?this.getHash():""}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),uh=(()=>{class n{constructor(e){this.appRoot=this.getAppRootFromMetaElement(e)}getAppRootFromMetaElement(e){let i=document.querySelector('head meta[name="tb-relative-root"]');if(!i)return"/";let{pathname:r}=new URL(i.content,e.getHref());return r.replace(/\/*$/,"/")}getAbsPathnameWithAppRoot(e){return this.appRoot.slice(0,-1)+e}getAppRootlessPathname(e){return e.startsWith(this.appRoot)?"/"+e.slice(this.appRoot.length):e}}return n.\u0275fac=function(e){return new(e||n)(O(dh))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Pf=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[dh]}),n})(),kf=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[uh],imports:[Pf]}),n})(),nF=new te("[App Routing] Dirty Updates"),Kw=(()=>{class n{constructor(e){this.dirtyUpdatesSelectorFactories=e}getDirtyUpdatesSelectors(){return this.dirtyUpdatesSelectorFactories??[]}static registerDirtyUpdates(e){return{ngModule:n,providers:[{provide:nF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(O(nF,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),j8=fe("[App Routing] Discarding Unsaved Updates"),fu=fe("[App Routing] State Rehydrated From Url",{_as:"props",_p:void 0}),Jw=fe("[App Routing] Route Config Loaded",{_as:"props",_p:void 0}),iF=fe("[App Routing] In App Navigation Requested",{_as:"props",_p:void 0}),Of=fe("[App Routing] In App Navigating",{_as:"props",_p:void 0}),Na=fe("[App Routing] In App Navigated",{_as:"props",_p:void 0}),oF=new te("[App Routing] Programmatical Navigation Provider"),$w=(()=>{class n{constructor(e){this.providers=new Map;for(let i of e||[]){if(this.providers.has(i.actionCreator.type))throw new RangeError(`"${i.actionCreator.type}" is already registered for nav. Multiple navigations on same kick is not allowed.`);this.providers.set(i.actionCreator.type,i.lambda)}}getNavigation(e){let i=this.providers.get(e.type);return i?i(e):null}static registerProgrammaticalNavigation(e){return{ngModule:n,providers:[{provide:oF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(O(oF,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})();function $b(n){return null!=n.routeKind}function lF(n){return q8(n).map(e=>{let i=e.startsWith(":");return i?{pathPart:e,isParam:!0,paramName:e.slice(1)}:{pathPart:e,isParam:i}})}var Ff=class{static getMatcher(t){return $b(t)?new ev(t):void 0!==t.redirectionPath?new aF(t):new sF(t)}constructor(t){this.validateConfig(t),this.pathFragments=lF(t.path),this.pathMatchers=this.getPathMatchers(this.pathFragments)}validateConfig({path:t}){if(!t.startsWith("/"))throw new RangeError(`config.path should start with '/'. ${t}`);let e=0;for(;(e=t.indexOf(":",e+1))>=0;){if("/"!==t[e-1])throw new RangeError(`config.path parameter should come after '/'. ${t}`);if(void 0===t[e+1]||"/"===t[e+1])throw new RangeError(`config.path parameter should have non-empty name. ${t}`)}}getPathMatchers(t){return t.map(e=>{let{pathPart:i}=e;return e.isParam?r=>({isParamPathPart:!0,partMatched:!0,paramName:e.paramName,paramValue:r}):r=>({isParamPathPart:!1,partMatched:r===i})})}match(t){let e={};if(this.pathMatchers.length!==t.length)return{result:!1};let i=0;for(let r of this.pathMatchers){let a=r(t[i++]);if(!a.partMatched)return{result:!1};a.isParamPathPart&&(e={...e,[a.paramName]:a.paramValue})}return{result:!0,params:e,pathParts:t,isRedirection:!1,redirectionQueryParams:void 0}}matchByParams(t){return{result:!0,params:t,pathParts:this.reprojectPathByParams(this.pathFragments,t),isRedirection:!1,redirectionQueryParams:void 0}}reprojectPathByParams(t,e){let i=[];for(let r of t)if(r.isParam){let{paramName:o}=r;if(!e.hasOwnProperty(o))throw new RangeError(`Failed to reproject parameter. "${o}" parameter should be present.`);i.push(e[o])}else i.push(r.pathPart);return i}},ev=class extends Ff{constructor(t){super(t),this.definition=t}},aF=class extends Ff{constructor(t){super(t),this.definition=t,this.redirectionFragments=lF(t.redirectionPath)}match(t){let e=super.match(t);if(!e.result)return e;let i=this.reprojectPathByParams(this.redirectionFragments,e.params);return{result:!0,params:e.params,pathParts:i,isRedirection:!0,redirectionQueryParams:void 0}}},sF=class extends Ff{constructor(t){super(t),this.definition=t}match(t){let e=super.match(t);if(!e.result)return e;let{pathParts:i,queryParams:r}=this.definition.redirector(t);return{result:!0,params:e.params,pathParts:i,isRedirection:!0,redirectionQueryParams:r}}},tv=class{constructor(t,e=3){if(this.maxRedirection=e,e<0)throw new RangeError("maxRedirection has to be non-negative number");this.validateRouteConfigs(t),this.defaultRouteConfig=null,this.routeKindToConcreteConfigMatchers=new Map,this.configMatchers=[];for(let i of t){let r=Ff.getMatcher(i);this.configMatchers.push(r),r instanceof ev&&(this.routeKindToConcreteConfigMatchers.set(r.definition.routeKind,r),r.definition.defaultRoute&&(this.defaultRouteConfig=r))}}validateRouteConfigs(t){let e=t.filter($b),i=e.filter(o=>o.defaultRoute);if(i.length>1){let o=i.map(({path:a})=>a).join(", ");throw new RangeError(`There are more than one defaultRoutes. ${o}`)}if(1===i.length){let{path:o}=i[0];if(Boolean(lF(o).find(({isParam:s})=>s)))throw new RangeError(`A defaultRoute cannot have any params. ${o}`)}let r=new Set;for(let{routeKind:o}of e){if(r.has(o))throw new RangeError(`Multiple route configuration for kind: ${o}. Configurations should have unique routeKinds`);r.add(o)}}generateAction(t,e){return t.actionGenerator?t.actionGenerator(e):null}match(t){if(!t.pathname.startsWith("/"))throw new RangeError('Navigation has to made with pathname that starts with "/"');let o,e=q8(t.pathname),i=0,r=!1;for(;;){let a=!1;for(let s of this.configMatchers){let l=s.match(e);if(l.result){a=!0;let{params:c,pathParts:d,isRedirection:u}=l;if(u){e=d,r=!0,o=l.redirectionQueryParams;break}if(!(s instanceof ev))throw new RangeError("No concrete route definition `match` return redirection");let{definition:p}=s,h={routeKind:p.routeKind,params:c,pathname:W8(d),deepLinkProvider:p.deepLinkProvider||null,action:this.generateAction(p,d)};return r?{...h,originateFromRedirection:!0,redirectionOnlyQueryParams:o}:{...h,originateFromRedirection:!1}}}if(r&&i++,!a||i>this.maxRedirection)break}if(i>this.maxRedirection)throw new Error(`Potential redirection loop (redirecting more than ${this.maxRedirection} times. Please do not have cycles in the routes.`);if(this.defaultRouteConfig){let{definition:a}=this.defaultRouteConfig;return{routeKind:a.routeKind,deepLinkProvider:a.deepLinkProvider??null,pathname:a.path,params:{},originateFromRedirection:!0,redirectionOnlyQueryParams:void 0,action:this.generateAction(a,e)}}return null}matchByRouteKind(t,e){let i=this.routeKindToConcreteConfigMatchers.get(t);if(!i)throw new RangeError(`Requires configuration for routeKind: ${t}`);let r=i.matchByParams(e);return{routeKind:t,params:e,pathname:W8(r.pathParts),deepLinkProvider:i.definition.deepLinkProvider||null,originateFromRedirection:!1,action:this.generateAction(i.definition,r.pathParts)}}};function q8(n){return n.split("/").slice(1)}function W8(n){return"/"+n.join("/")}var cF=new te("[App Routing] Route Config"),Rl=(()=>{class n{constructor(e){if(this.routeKindToNgComponent=new Map,!e)return void(this.routeConfigs=new tv([]));let i=[];for(let r of e)for(let o of r)i.push(o);this.routeConfigs=new tv(i),i.forEach(r=>{$b(r)&&this.routeKindToNgComponent.set(r.routeKind,r.ngComponent)})}getRegisteredRouteKinds(){return this.routeKindToNgComponent.keys()}getRouteConfigs(){return this.routeConfigs}getNgComponentByRouteKind(e){return this.routeKindToNgComponent.get(e)||null}static registerRoutes(e){return{ngModule:n,providers:[{provide:cF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(O(cF,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),eS="app_routing",nv=Mr(eS),Ho=W(nv,n=>n.activeRoute),Q8=W(nv,n=>n.nextRoute),Z8=W(nv,n=>n.activeNamespaceId),K8=W(nv,n=>n.rehydratedDeepLinks),J8=W(nv,n=>n.registeredRouteKeys),Ws=W(Ho,n=>n?n.routeKind:Cn.NOT_SET),uF=W(Ho,n=>n?n.params:{}),or=W(Ws,uF,(n,t)=>Jb(n,t)),qs=(W(Ws,uF,(n,t)=>{if(n!==Cn.COMPARE_EXPERIMENT)return{};let i=function(n){let t=new Map,e=Rf(n.experimentIds);for(let{id:i,name:r}of e)r&&t.set(i,r);return t}(t);return Object.fromEntries(i.entries())}),W(Ws,uF,(n,t)=>{let e=t;if(n!==Cn.COMPARE_EXPERIMENT&&(n!==Cn.CARD||-1===e.experimentIds.indexOf(",")))return{};let i=function(n){let t=new Map,e=Rf(n.experimentIds),i=0;for(let{id:r,name:o}of e)i++,!t.has(r)&&t.set(r,{aliasText:o,aliasNumber:i});return t}(e);return Object.fromEntries(i.entries())})),pF=fe("[App Routing] Effects Init"),ha=(()=>{return(n=ha||(ha={}))[n.UNCHANGED=0]="UNCHANGED",n[n.NEW=1]="NEW",n[n.FROM_HISTORY=2]="FROM_HISTORY",ha;var n})(),$8=(()=>{class n{constructor(e,i,r,o,a,s,l){this.actions$=e,this.store=i,this.location=r,this.dirtyUpdatesRegistry=o,this.registry=a,this.programmaticalNavModule=s,this.appRootProvider=l,this.onNavigationRequested$=this.actions$.pipe(Zn(iF),q(c=>({pathname:c.pathname.startsWith("/")?this.appRootProvider.getAbsPathnameWithAppRoot(c.pathname):this.location.getResolvedPath(c.pathname),options:{browserInitiated:!1,replaceState:c.replaceState??!1,namespaceUpdate:{option:c.resetNamespacedState?ha.NEW:ha.UNCHANGED}}}))),this.bootstrapReducers$=_r(()=>this.actions$.pipe(Zn(pF),q(()=>Jw({routeKinds:new Set(this.registry.getRegisteredRouteKinds())})))),this.onInit$=this.actions$.pipe(Zn(pF)).pipe(Rs(0),q(()=>{let c=this.location.getHistoryState()?.namespaceId,d=void 0===c?{option:ha.NEW}:{option:ha.FROM_HISTORY,namespaceId:c};return{pathname:this.location.getPath(),options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:d}}})),this.onPopState$=this.location.onPopState().pipe(q(c=>({pathname:c.pathname,options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:void 0===c.state?.namespaceId?{option:ha.UNCHANGED}:{option:ha.FROM_HISTORY,namespaceId:c.state.namespaceId}}}))),this.userInitNavRoute$=tn(this.onNavigationRequested$,this.onInit$,this.onPopState$).pipe(q(c=>{if(!c.pathname.startsWith("/"))throw new Error(`[App routing] pathname must start with '/'. Got: ${c.pathname}`);return{...c,pathname:this.appRootProvider.getAppRootlessPathname(c.pathname)}}),q(c=>({routeMatch:this.routeConfigs.match(c),options:c.options}))),this.programmaticalNavRoute$=this.actions$.pipe(q(c=>this.programmaticalNavModule.getNavigation(c)),Oe(c=>null!==c),q(c=>{let m,d=c,{replaceState:u=!1,resetNamespacedState:p,routeKind:h}=d;return m=d.routeKind===Cn.COMPARE_EXPERIMENT?{experimentIds:B8(d.routeParams.aliasAndExperimentIds)}:d.routeParams,{replaceState:u,routeKind:h,routeParams:m,resetNamespacedState:p}}),q(({replaceState:c,routeKind:d,routeParams:u,resetNamespacedState:p})=>({routeMatch:this.routeConfigs?this.routeConfigs.matchByRouteKind(d,u):null,options:{replaceState:c,browserInitiated:!1,namespaceUpdate:{option:p?ha.NEW:ha.UNCHANGED}}}))),this.validatedRouteMatch$=tn(this.userInitNavRoute$,this.programmaticalNavRoute$).pipe(Oe(({routeMatch:c})=>Boolean(c)),q(({routeMatch:c,options:d})=>({routeMatch:c,options:d}))),this.navigate$=_r(()=>this.validatedRouteMatch$.pipe(It(this.store.select(Ho)),xn(([u,p])=>{let h=null!==p&&Vo(p,u.routeMatch),m=this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors();return h||!m.length?$t(u):Co(this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors().map(_=>this.store.select(_).pipe(Lt(1)))).pipe(q(_=>void 0!==_[0].experimentIds&&_[0].experimentIds.length>0),Oe(_=>{if(_){let M=window.confirm("You have unsaved edits, are you sure you want to discard them?");return M&&this.store.dispatch(j8()),M}return!0}),q(()=>u))}),It(this.store.select(K8)),Dt(([{routeMatch:u,options:p},h])=>{if(!p.browserInitiated||!u.deepLinkProvider||p.namespaceUpdate.option===ha.FROM_HISTORY&&!Zw(u.routeKind,p.namespaceUpdate.namespaceId,h))return;let m=u.originateFromRedirection&&u.redirectionOnlyQueryParams?u.redirectionOnlyQueryParams:this.location.getSearch(),_=u.deepLinkProvider.deserializeQueryParams(m);this.store.dispatch(fu({routeKind:u.routeKind,partialState:_}))}),Dt(([{routeMatch:u}])=>{u.action&&this.store.dispatch(u.action)}),Jn(([{routeMatch:u,options:p}])=>null===u.deepLinkProvider?$t({route:{routeKind:u.routeKind,params:u.params},pathname:u.pathname,queryParams:[],options:p}):u.deepLinkProvider.serializeStateToQueryParams(this.store).pipe(q((h,m)=>({route:{routeKind:u.routeKind,params:u.params},pathname:u.pathname,queryParams:h,options:0===m?p:{...p,namespaceUpdate:{option:ha.UNCHANGED},replaceState:!0}})))),Dt(({route:u})=>{this.store.dispatch(Of({after:u}))}),Cr(0)).pipe(It(this.store.select(Ho)),q(([u,p])=>{let h=null===p||null===u.route||Vo(p,u.route);return{...u,preserveHash:h}}),Dt(({preserveHash:u,pathname:p,queryParams:h,options:m})=>{(function(n,t){return n.pathname===t.pathname&&n.queryParams.length===t.queryParams.length&&n.queryParams.every((e,i)=>{let r=t.queryParams[i];return e.key===r.key&&e.value===r.value})})({pathname:p,queryParams:h},{pathname:this.appRootProvider.getAppRootlessPathname(this.location.getPath()),queryParams:this.location.getSearch()})||(m.replaceState?this.location.replaceStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,h,u))):this.location.pushStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,h,u))))})).pipe(It(this.store.select(Ho),this.store.select(Z8)),q(([{route:u,options:p},h,m])=>{let _=function(n,t,e){return t.namespaceUpdate.option===ha.FROM_HISTORY?t.namespaceUpdate.namespaceId:null==e||t.namespaceUpdate.option===ha.NEW?`${Date.now().toString()}:${function(){let n=new Uint8Array(32);crypto.getRandomValues(n);let t="";for(let e of n)t+=(e>>4).toString(16);return t}()}`:e}(0,p,m);return this.location.replaceStateData({...this.location.getHistoryState(),namespaceId:_}),Na({before:h,after:u,beforeNamespaceId:m,afterNamespaceId:_})}))),this.routeConfigs=a.getRouteConfigs()}ngrxOnInitEffects(){return pF()}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(dh),O(Kw),O(Rl),O($w),O(uh))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ufe=gr({activeRoute:null,nextRoute:null,activeNamespaceId:null,rehydratedDeepLinks:[],registeredRouteKeys:new Set},ye(Of,(n,{after:t})=>({...n,nextRoute:t})),ye(Na,(n,{after:t,afterNamespaceId:e})=>{let i=n.rehydratedDeepLinks;return Zw(t.routeKind,e,i)&&(i=[...i],i.push({deepLinkGroup:$O(t.routeKind),namespaceId:e})),{...n,activeRoute:t,nextRoute:null,activeNamespaceId:e,rehydratedDeepLinks:i}}),ye(Jw,(n,{routeKinds:t})=>({...n,registeredRouteKeys:t})));function e6(n,t){return Ufe(n,t)}var Nf=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Kw,$w],imports:[Rl,wr.forFeature(eS,e6),to.forFeature([$8]),kf,Pf]}),n})(),no=(()=>{return(n=no||(no={})).STEP="step",n.WALL_TIME="wall_time",n.RELATIVE="relative",no;var n})(),Sr=(()=>{return(n=Sr||(Sr={})).OFFSET="offset",n.OVERLAY="overlay",Sr;var n})(),t6="__tab__",n6=(()=>{class n{constructor(){window.tensorboard.tf_storage.migrateLegacyURLScheme(),window.tensorboard.tf_globals.setUseHash(!0)}getString(e){return window.tensorboard.tf_storage.getString(e)}setString(e,i,r){window.tensorboard.tf_storage.setString(e,i,r)}getPluginId(){return window.tensorboard.tf_storage.getString(t6)}setPluginId(e,i){this.setString(t6,e,i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),gu=class{},La=(()=>{return(n=La||(La={})).BROWSER_DEFAULT="browser_default",n.LIGHT="light",n.DARK="dark",La;var n})(),hs=fe("[Persistent Settings] Global Settings Loaded",{_as:"props",_p:void 0}),hF=new te("[Persistent Settings] Global Settings"),Ri=(()=>{class n{constructor(e){this.globalSettingSelectors=[],e&&(this.globalSettingSelectors=e.map(i=>i()))}getGlobalSettingSelectors(){return this.globalSettingSelectors??[]}static defineGlobalSetting(e){return{ngModule:n,providers:[{provide:hF,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(O(hF,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),i6="_tb_global_settings.timeseries",r6="_tb_global_settings",o6="notificationLastReadTimestamp";function a6(n){n.forEach(t=>{t.sortable=!0,"RUN"===t.type?(t.movable=!1,t.removable=!1):(t.movable=!0,t.removable=!0)})}var tS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),nS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),mF=(()=>{class n extends nS{uiToBackend(e){let i={};return void 0!==e.ignoreOutliers&&(i.ignoreOutliers=e.ignoreOutliers),void 0!==e.scalarSmoothing&&(i.scalarSmoothing=e.scalarSmoothing),void 0!==e.tooltipSort&&(i.tooltipSort=e.tooltipSort),void 0!==e.autoReload&&(i.autoReload=e.autoReload),void 0!==e.autoReloadPeriodInMs&&(i.autoReloadPeriodInMs=e.autoReloadPeriodInMs),void 0!==e.pageSize&&(i.paginationSize=e.pageSize),void 0!==e.themeOverride&&(i.theme=e.themeOverride),void 0!==e.notificationLastReadTimeInMs&&(i.notificationLastReadTimeInMs=e.notificationLastReadTimeInMs),void 0!==e.sideBarWidthInPercent&&(i.sideBarWidthInPercent=e.sideBarWidthInPercent),void 0!==e.timeSeriesSettingsPaneOpened&&(i.timeSeriesSettingsPaneOpened=e.timeSeriesSettingsPaneOpened),void 0!==e.timeSeriesCardMinWidth&&(i.timeSeriesCardMinWidth=e.timeSeriesCardMinWidth),void 0!==e.stepSelectorEnabled&&(i.stepSelectorEnabled=e.stepSelectorEnabled),void 0!==e.rangeSelectionEnabled&&(i.rangeSelectionEnabled=e.rangeSelectionEnabled),void 0!==e.linkedTimeEnabled&&(i.linkedTimeEnabled=e.linkedTimeEnabled),void 0!==e.singleSelectionHeaders&&(i.singleSelectionHeaders=e.singleSelectionHeaders),void 0!==e.rangeSelectionHeaders&&(i.rangeSelectionHeaders=e.rangeSelectionHeaders),void 0!==e.dashboardDisplayedHparamColumns&&(i.dashboardDisplayedHparamColumns=e.dashboardDisplayedHparamColumns),void 0!==e.savingPinsEnabled&&(i.savingPinsEnabled=e.savingPinsEnabled),i}backendToUi(e){let i={};return e.hasOwnProperty("scalarSmoothing")&&"number"==typeof e.scalarSmoothing&&(i.scalarSmoothing=e.scalarSmoothing),e.hasOwnProperty("ignoreOutliers")&&"boolean"==typeof e.ignoreOutliers&&(i.ignoreOutliers=e.ignoreOutliers),e.hasOwnProperty("tooltipSort")&&"string"==typeof e.tooltipSort&&(i.tooltipSort=e.tooltipSort),e.hasOwnProperty("autoReload")&&"boolean"==typeof e.autoReload&&(i.autoReload=e.autoReload),e.hasOwnProperty("autoReloadPeriodInMs")&&"number"==typeof e.autoReloadPeriodInMs&&(i.autoReloadPeriodInMs=e.autoReloadPeriodInMs),e.hasOwnProperty("paginationSize")&&"number"==typeof e.paginationSize&&(i.pageSize=e.paginationSize),e.hasOwnProperty("theme")&&"string"==typeof e.theme&&new Set(Object.values(La)).has(e.theme)&&(i.themeOverride=e.theme),e.hasOwnProperty("notificationLastReadTimeInMs")&&"number"==typeof e.notificationLastReadTimeInMs&&(i.notificationLastReadTimeInMs=e.notificationLastReadTimeInMs),e.hasOwnProperty("sideBarWidthInPercent")&&"number"==typeof e.sideBarWidthInPercent&&(i.sideBarWidthInPercent=e.sideBarWidthInPercent),e.hasOwnProperty("timeSeriesSettingsPaneOpened")&&"boolean"==typeof e.timeSeriesSettingsPaneOpened&&(i.timeSeriesSettingsPaneOpened=e.timeSeriesSettingsPaneOpened),e.hasOwnProperty("timeSeriesCardMinWidth")&&"number"==typeof e.timeSeriesCardMinWidth&&(i.timeSeriesCardMinWidth=e.timeSeriesCardMinWidth),e.hasOwnProperty("stepSelectorEnabled")&&"boolean"==typeof e.stepSelectorEnabled&&(i.stepSelectorEnabled=e.stepSelectorEnabled),e.hasOwnProperty("rangeSelectionEnabled")&&"boolean"==typeof e.rangeSelectionEnabled&&(i.rangeSelectionEnabled=e.rangeSelectionEnabled),e.hasOwnProperty("linkedTimeEnabled")&&"boolean"==typeof e.linkedTimeEnabled&&(i.linkedTimeEnabled=e.linkedTimeEnabled),Array.isArray(e.singleSelectionHeaders)&&void 0!==e.singleSelectionHeaders[0].name&&"RUN"===e.singleSelectionHeaders[0].type&&(a6(e.singleSelectionHeaders),i.singleSelectionHeaders=e.singleSelectionHeaders),Array.isArray(e.rangeSelectionHeaders)&&void 0!==e.rangeSelectionHeaders[0].name&&"RUN"===e.rangeSelectionHeaders[0].type&&(a6(e.rangeSelectionHeaders),i.rangeSelectionHeaders=e.rangeSelectionHeaders),Array.isArray(e.dashboardDisplayedHparamColumns)&&(i.dashboardDisplayedHparamColumns=e.dashboardDisplayedHparamColumns),e.hasOwnProperty("savingPinsEnabled")&&"boolean"==typeof e.savingPinsEnabled&&(i.savingPinsEnabled=e.savingPinsEnabled),i}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),s6=(()=>{class n{constructor(e){this.converter=e}setSettings(e){return Object.keys(e)?this.getSettings().pipe(Dt(i=>{window.localStorage.setItem(r6,JSON.stringify(this.converter.uiToBackend({...i,...e}))),window.localStorage.removeItem(i6),window.localStorage.removeItem(o6)}),q(()=>{})):Kr}deserialize(e){try{return JSON.parse(e)}catch{return{}}}getSettings(){let e=window.localStorage.getItem(o6);return $t({...this.converter.backendToUi(this.deserialize(e?JSON.stringify({notificationLastReadTimeInMs:Number(e)}):"{}")),...this.converter.backendToUi(this.deserialize(window.localStorage.getItem(i6)??"{}")),...this.converter.backendToUi(this.deserialize(window.localStorage.getItem(r6)??"{}"))})}}return n.\u0275fac=function(e){return new(e||n)(O(nS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),l6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:tS,useClass:s6},mF,{provide:nS,useExisting:mF}]}),n})(),iS="persistent_settings",ph=W(Mr(iS),n=>n.shouldPersistSettings),c6=(()=>{class n{constructor(e,i,r,o){this.actions$=e,this.store=i,this.configModule=r,this.dataSource=o,this.initializeAndUpdateSettings$=_r(()=>{let a=this.actions$.pipe(Zn(Of),Lt(1),It(this.store.select(ph)),Oe(([,s])=>s),xn(()=>this.dataSource.getSettings()),Dt(s=>{this.store.dispatch(hs({partialSettings:s}))}),Rs(0),xn(()=>tn(...this.configModule.getGlobalSettingSelectors().map(l=>this.store.select(l).pipe(ri((c,d)=>{let u=Object.values(c),p=Object.values(d);return u.length===p.length&&u.every((h,m)=>h===p[m])}),os(1))))),Ta());return a.pipe(function(n){return Yt((t,e)=>{let i=[];return t.subscribe(Ht(e,r=>i.push(r),()=>{e.next(i),e.complete()})),n.subscribe(Ht(e,()=>{let r=i;i=[],e.next(r)},fl)),()=>{i=null}})}(a.pipe(Cr(500))),xn(s=>{if(0===s.length)return Kr;let l={};for(let c of s)Object.assign(l,c);return this.dataSource.setSettings(l)}))},{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(Ri),O(tS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Yfe=gr({shouldPersistSettings:!0});function d6(n,t){return Yfe(n,t)}var iv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Ri],imports:[wr.forFeature(iS,d6),to.forFeature([c6]),l6]}),n})(),rv=class{},aS=class{},ms=class{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=r.toLowerCase(),a=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(a):this.headers.set(o,[a])}})}:()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){let o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof ms?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new ms;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof ms?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);let r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(o){let a=this.headers.get(e);if(!a)return;a=a.filter(s=>-1===o.indexOf(s)),0===a.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}},Zfe=/%(\d[a-f0-9])/gi,Kfe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function u6(n){return encodeURIComponent(n).replace(Zfe,(t,e)=>Kfe[e]??t)}function rS(n){return`${n}`}var vc=class{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new class{encodeKey(t){return u6(t)}encodeValue(t){return u6(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}},t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[a,s]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(a)||[];l.push(s),e.set(a,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(rS):[rS(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){let e=new vc({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(rS(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[],r=i.indexOf(rS(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}};function p6(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function h6(n){return typeof Blob<"u"&&n instanceof Blob}function m6(n){return typeof FormData<"u"&&n instanceof FormData}var hh=class{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new ms),this.context||(this.context=new class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}),this.params){let a=this.params.toString();if(0===a.length)this.urlWithParams=e;else{let s=e.indexOf("?");this.urlWithParams=e+(-1===s?"?":s<e.length-1?"&":"")+a}}else this.params=new vc,this.urlWithParams=e}serializeBody(){return null===this.body?null:p6(this.body)||h6(this.body)||m6(this.body)||typeof URLSearchParams<"u"&&this.body instanceof URLSearchParams||"string"==typeof this.body?this.body:this.body instanceof vc?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||m6(this.body)?null:h6(this.body)?this.body.type||null:p6(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof vc?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,a=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,c=t.params||this.params,d=t.context??this.context;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((u,p)=>u.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((u,p)=>u.set(p,t.setParams[p]),c)),new hh(e,i,o,{params:c,headers:l,context:d,reportProgress:s,responseType:r,withCredentials:a})}},_u=(()=>{return(n=_u||(_u={}))[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",_u;var n})(),ov=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new ms,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},av=class extends ov{constructor(t={}){super(t),this.type=_u.ResponseHeader}clone(t={}){return new av({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Bf=class extends ov{constructor(t={}){super(t),this.type=_u.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Bf({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ud=class extends ov{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}};function fF(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}var mh=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof hh)o=e;else{let l,c;l=r.headers instanceof ms?r.headers:new ms(r.headers),r.params&&(c=r.params instanceof vc?r.params:new vc({fromObject:r.params})),o=new hh(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}let a=$t(o).pipe(function(n,t){return mn(t)?xn(n,t,1):xn(n,1)}(l=>this.handler.handle(l)));if(e instanceof hh||"events"===r.observe)return a;let s=a.pipe(Oe(l=>l instanceof Bf));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return s.pipe(q(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return s.pipe(q(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return s.pipe(q(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return s.pipe(q(l=>l.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new vc).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,fF(r,i))}post(e,i,r={}){return this.request("POST",e,fF(r,i))}put(e,i,r={}){return this.request("PUT",e,fF(r,i))}}return n.\u0275fac=function(e){return new(e||n)(O(rv))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function b6(n,t){return t(n)}function ege(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}var bF=new te("HTTP_INTERCEPTORS"),vF=new te("HTTP_INTERCEPTOR_FNS");function nge(){let n=null;return(t,e)=>(null===n&&(n=($n(bF,{optional:!0})??[]).reduceRight(ege,b6)),n(t,e))}var f6=(()=>{class n extends rv{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){let i=Array.from(new Set(this.injector.get(vF)));this.chain=i.reduceRight((r,o)=>function(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),b6)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(O(aS),O(lc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),ige=/^\)\]\}',?\n/,g6=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Kt(i=>{let r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((h,m)=>r.setRequestHeader(h,m.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let h=e.detectContentTypeHeader();null!==h&&r.setRequestHeader("Content-Type",h)}if(e.responseType){let h=e.responseType.toLowerCase();r.responseType="json"!==h?h:"text"}let o=e.serializeBody(),a=null,s=()=>{if(null!==a)return a;let h=r.statusText||"OK",m=new ms(r.getAllResponseHeaders()),_=function(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return a=new av({headers:m,status:r.status,statusText:h,url:_}),a},l=()=>{let{headers:h,status:m,statusText:_,url:M}=s(),y=null;204!==m&&(y=typeof r.response>"u"?r.responseText:r.response),0===m&&(m=y?200:0);let x=m>=200&&m<300;if("json"===e.responseType&&"string"==typeof y){let R=y;y=y.replace(ige,"");try{y=""!==y?JSON.parse(y):null}catch(I){y=R,x&&(x=!1,y={error:I,text:y})}}x?(i.next(new Bf({body:y,headers:h,status:m,statusText:_,url:M||void 0})),i.complete()):i.error(new ud({error:y,headers:h,status:m,statusText:_,url:M||void 0}))},c=h=>{let{url:m}=s(),_=new ud({error:h,status:r.status||0,statusText:r.statusText||"Unknown Error",url:m||void 0});i.error(_)},d=!1,u=h=>{d||(i.next(s()),d=!0);let m={type:_u.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(m.total=h.total),"text"===e.responseType&&!!r.responseText&&(m.partialText=r.responseText),i.next(m)},p=h=>{let m={type:_u.UploadProgress,loaded:h.loaded};h.lengthComputable&&(m.total=h.total),i.next(m)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",u),null!==o&&r.upload&&r.upload.addEventListener("progress",p)),r.send(o),i.next({type:_u.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",u),null!==o&&r.upload&&r.upload.removeEventListener("progress",p)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(O(th))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),v6=new te("XSRF_ENABLED"),age=new te("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),lge=new te("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"}),sS=class{},cge=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=fw(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(fc),O(age))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function dge(n,t){let e=n.url.toLowerCase();if(!$n(v6)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=$n(sS).getToken(),r=$n(lge);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var oS=(()=>{return(n=oS||(oS={}))[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",oS;var n})();function pge(...n){let t=[mh,g6,f6,{provide:rv,useExisting:f6},{provide:aS,useExisting:g6},{provide:vF,useValue:dge,multi:!0},{provide:v6,useValue:!0},{provide:sS,useClass:cge}];for(let e of n)t.push(...e.\u0275providers);return function(n){return{"\u0275providers":n}}(t)}var _6=new te("LEGACY_INTERCEPTOR_FN"),y6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[pge({"\u0275kind":oS.LegacyInterceptors,"\u0275providers":[{provide:_6,useFactory:nge},{provide:vF,useExisting:_6,multi:!0}]})]}),n})(),lS="feature",Vf=Mr(lS),bu=W(Vf,n=>n.isFeatureFlagsLoaded),Qo=W(Vf,n=>({...n.defaultFlags,...n.flagOverrides})),C6=W(Vf,n=>n.defaultFlags),sv=W(Vf,n=>n.flagOverrides||{}),fh=W(Vf,n=>n.metadata),Hf=W(Vf,n=>{let t={};for(let e in n.flagOverrides){let i=n.metadata[e];i&&i.queryParamOverride&&i.sendToServerWhenOverridden&&(t[e]=n.flagOverrides[e])}return t}),M6=W(Qo,n=>n.isAutoDarkModeAllowed),Pl=W(Qo,n=>null!==n.enableDarkModeOverride?n.enableDarkModeOverride:n.defaultEnableDarkMode),cS=W(Qo,n=>n.enableDarkModeOverride),w6=W(Qo,n=>n.enabledExperimentalPlugins),S6=W(Qo,n=>n.inColab),dS=W(Qo,n=>n.metricsImageSupportEnabled),yF=W(Qo,n=>n.forceSvg),E6=W(Qo,n=>void 0!==n.showFlags),uS=W(Qo,n=>n.enableScalarColumnCustomization),T6=W(Qo,n=>n.enableScalarColumnContextMenus),pd=W(Qo,n=>n.enableGlobalPins),D6=W(Qo,n=>n.enableColorByExperiment);function fge(n,t){if(!n)return;let e=n instanceof FormData?function(n){let t={};for(let[e,i]of n.entries())t[e]=i;return t}(n):n;return t?{[t]:JSON.stringify(e)}:e}var gge="X-XSRF-Protected";function xF(n){let t=n.headers||new ms;return t=t.append(gge,"1"),{...n,headers:t}}var Xs=(()=>{class n{constructor(e,i,r){this.appRootProvider=e,this.http=i,this.store=r}resolveAppRoot(e){return e.startsWith("/")?this.appRootProvider.getAbsPathnameWithAppRoot(e):e}get(e,i={}){return this.http.get(this.resolveAppRoot(e),i)}post(e,i,r={},o){return r=xF(r),this.store.select(bu).pipe(Oe(a=>Boolean(a)),Lt(1),It(this.store.select(S6)),xn(([,a])=>{let s=this.resolveAppRoot(e);return a?this.http.get(s,{headers:r.headers??{},params:fge(i,o)}):this.http.post(s,i,r)}))}put(e,i,r={}){return this.http.put(this.resolveAppRoot(e),i,xF(r))}delete(e,i={}){return this.http.delete(this.resolveAppRoot(e),xF(i))}}return n.\u0275fac=function(e){return new(e||n)(O(uh),O(mh),O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),zf=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Xs],imports:[y6,kf]}),n})(),Ys=(()=>{return(n=Ys||(Ys={})).UNKNOWN="UNKNOWN",n.NOT_FOUND="NOT_FOUND",n.PERMISSION_DENIED="PERMISSION_DENIED",Ys;var n})(),I6=new te("TensorBoard brand name");function A6(n){let t=Ys.UNKNOWN;return n instanceof ud&&(404===n.status&&(t=Ys.NOT_FOUND),403===n.status&&(t=Ys.PERMISSION_DENIED)),_l(new cv(t))}var cv=class{constructor(t){this.failureCode=t}},pS=(()=>{class n{constructor(e){this.http=e,this.tfBackend=document.createElement("tf-backend").tf_backend}fetchPluginsListing(e){let i=function(n){if(!n.length)return null;let t=new URLSearchParams;for(let e of n)t.append("experimentalPlugin",e);return t}(e),r=i?`data/plugins_listing?${i.toString()}`:"data/plugins_listing";return this.http.get(r).pipe(co(A6))}fetchEnvironment(){return Co([this.http.get("data/environment"),Jr(this.tfBackend.environmentStore.refresh())]).pipe(q(([r])=>r),co(A6))}}return n.\u0275fac=function(e){return new(e||n)(O(Xs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),R6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[pS],imports:[zf]}),n})(),Re=(()=>{return(n=Re||(Re={}))[n.NOT_LOADED=0]="NOT_LOADED",n[n.LOADED=1]="LOADED",n[n.LOADING=2]="LOADING",n[n.FAILED=3]="FAILED",Re;var n})(),yc=fe("[Core] Plugin Changed",{_as:"props",_p:void 0}),hS=fe("[Core] Plugin Url Hash Changed",{_as:"props",_p:void 0}),P6=fe("[Core] Loaded"),Ba=fe("[Core] User Triggered Reload"),ma=fe("[Core] Auto Reload"),mS=fe("[Core] PluginListing Fetch Requested"),gh=fe("[Core] PluginListing Fetch Successful",{_as:"props",_p:void 0}),dv=fe("[Core] PluginListing Fetch Failed",{_as:"props",_p:void 0}),fS=fe("[Core] Polymer Component Runs Fetch Requested"),gS=fe("[Core] Polymer Component Runs Fetch Successful"),_S=fe("[Core] Polymer Component Runs Fetch Failed"),bS=fe("[Core] Environment Fetch Successful",{_as:"props",_p:void 0}),k6=fe("[Core] Run Selection Changed",{_as:"props",_p:void 0}),O6=fe("[Core] Run Fetch Successful",{_as:"props",_p:void 0}),Uf=fe("[Core] Side Bar Width Changed",{_as:"props",_p:void 0}),vS=fe("[Core] Runs Table Full Screen Toggled");function _h(n,t,e){let i=Object.keys(n),r={...n,...t,privateNamespacedState:{}};return{initialState:r,reducers:gr(r,ye(Na,(s,{before:l,after:c,beforeNamespaceId:d,afterNamespaceId:u})=>{let p=s;return d!==u&&(p=function(s,l,c){let d={...s.privateNamespacedState};if(l){let p={};for(let h of i)p[h]=s[h];d={...d,[l]:p}}let u={};return s.privateNamespacedState?.[c]?u=s.privateNamespacedState[c]:l&&(u=n),{...s,...u,privateNamespacedState:d}}(s,d,u)),e&&(p=e(p,l,c)),p}))}}function bh(...n){return(t,e)=>{let i=t;for(let r of n)i=r(i,e);return i}}var pv={activePlugin:null,plugins:{},coreDataLoadState:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},pluginsListLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null,failureCode:null},environment:{data_location:"",window_title:""},polymerRunsLoadState:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},polymerInteropRuns:[],polymerInteropRunSelection:new Set,sideBarWidthInPercent:20,runsTableFullScreen:!1,unknownQueryParams:{}},vge=gr(pv,ye(yc,hS,(n,{plugin:t})=>({...n,activePlugin:t})),ye(mS,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Re.LOADING},pluginsListLoaded:{...n.pluginsListLoaded,state:Re.LOADING}})),ye(dv,(n,{failureCode:t})=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Re.FAILED},pluginsListLoaded:{...n.pluginsListLoaded,state:Re.FAILED,failureCode:t}})),ye(gh,(n,{plugins:t})=>{let e=Object.keys(t).find(a=>t[a].enabled)||null,i=n.activePlugin||e,r=Date.now(),o=n.coreDataLoadState;return n.polymerRunsLoadState.state===Re.LOADED&&(o={state:Re.LOADED,lastLoadedTimeInMs:r}),{...n,activePlugin:i,coreDataLoadState:o,plugins:t,pluginsListLoaded:{state:Re.LOADED,lastLoadedTimeInMs:r,failureCode:null}}}),ye(fS,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Re.LOADING},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Re.LOADING}})),ye(gS,n=>{let t=Date.now(),e=n.coreDataLoadState;return n.pluginsListLoaded.state===Re.LOADED&&(e={state:Re.LOADED,lastLoadedTimeInMs:t}),{...n,coreDataLoadState:e,polymerRunsLoadState:{...n.polymerRunsLoadState,state:Re.LOADED,lastLoadedTimeInMs:t}}}),ye(_S,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Re.FAILED},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Re.FAILED}})),ye(bS,(n,{environment:t})=>({...n,environment:t})),ye(O6,(n,{runs:t})=>({...n,polymerInteropRuns:t})),ye(k6,(n,{nextSelection:t})=>({...n,polymerInteropRunSelection:new Set(t)})),ye(Uf,(n,{widthInPercent:t})=>({...n,sideBarWidthInPercent:Math.min(Math.max(0,t),100)})),ye(hs,(n,{partialSettings:t})=>{let e={...n},i=t.sideBarWidthInPercent;return"number"==typeof i&&i>=0&&i<=100&&(e.sideBarWidthInPercent=i),e}),ye(vS,n=>({...n,runsTableFullScreen:!n.runsTableFullScreen})),ye(fu,(n,{partialState:t})=>{let{unknownQueryParams:e={}}=t;return{...n,unknownQueryParams:e}})),{reducers:yge}=_h(pv,{});function F6(n,t){return bh(vge,yge)(n,t)}var xc=Mr("core"),xS=W(xc,n=>n.pluginsListLoaded),N6=W(xc,n=>n.polymerRunsLoadState),L6=W(xc,n=>n.coreDataLoadState.state),jf=W(xc,n=>n.coreDataLoadState.lastLoadedTimeInMs),Zo=W(xc,n=>n.activePlugin),Gf=W(xc,n=>n.plugins),B6=W(xc,n=>n.unknownQueryParams),CS=W(xc,n=>n.environment),MS=W(xc,n=>n.sideBarWidthInPercent),wS=W(xc,n=>n.runsTableFullScreen),V6=new Set([Cn.COMPARE_EXPERIMENT,Cn.EXPERIMENT,Cn.NOT_SET]),H6=(()=>{class n{refreshPolymerRuns(){return Jr(this.tfBackend.ref.runsStore.refresh())}fetchEnvironment(){return this.webappDataSource.fetchEnvironment().pipe(Dt(e=>{this.store.dispatch(bS({environment:e}))}))}constructor(e,i,r){this.actions$=e,this.store=i,this.webappDataSource=r,this.tfBackend={ref:document.createElement("tf-backend").tf_backend},this.onDashboardLoad$=tn(this.actions$.pipe(Zn(P6,Na),It(this.store.select(Ho)),ri(([,o],[,a])=>Vo(o,a))),this.actions$.pipe(Zn(ma,Ba))).pipe(It(this.store.select(Ws)),Oe(([,o])=>V6.has(o)),ic(1,void 0,{leading:!0})),this.fetchWebAppData$=_r(()=>{let o=this.onDashboardLoad$.pipe(It(this.store.select(xS),this.store.select(w6)),Oe(([,{state:s}])=>s!==Re.LOADING),Dt(()=>this.store.dispatch(mS())),xn(([,,s])=>function(...n){let t=ec(n),e=OC(n);return e.length?new Kt(i=>{let r=e.map(()=>[]),o=e.map(()=>!1);i.add(()=>{r=o=null});for(let a=0;!i.closed&&a<e.length;a++)ci(e[a]).subscribe(Ht(i,s=>{if(r[a].push(s),r.every(l=>l.length)){let l=r.map(c=>c.shift());i.next(t?t(...l):l),r.some((c,d)=>!c.length&&o[d])&&i.complete()}},()=>{o[a]=!0,!r[a].length&&i.complete()}));return()=>{r=o=null}}):Kr}(this.webappDataSource.fetchPluginsListing(s),this.fetchEnvironment()).pipe(q(([l])=>{this.store.dispatch(gh({plugins:l}))}),co(l=>(this.store.dispatch(dv(l instanceof cv?{failureCode:l.failureCode}:{failureCode:Ys.UNKNOWN})),Kr)))));return tn(o,this.onDashboardLoad$.pipe(q(([,s])=>s),Jn(s=>s!==Cn.COMPARE_EXPERIMENT?$t([]):this.store.select(qs).pipe(ri((l,c)=>{let d=Object.entries(l),u=new Map(Object.entries(c));if(d.length!==u.size)return!1;for(let[p,h]of d)if(!u.get(p)||u.get(p).aliasText!==h.aliasText||u.get(p).aliasNumber!==h.aliasNumber)return!1;return!0}),Rs(0),ic(500,void 0,{leading:!0,trailing:!0}))),It(this.store.select(Ws),this.store.select(N6)),Oe(([,s,l])=>V6.has(s)&&l.state!==Re.LOADING),Dt(()=>{this.store.dispatch(fS())}),Jn(()=>this.refreshPolymerRuns()),Dt(()=>{this.store.dispatch(gS())}),co(()=>(this.store.dispatch(_S()),Kr))))},{dispatch:!1}),this.dispatchChangePlugin$=_r(()=>tn(this.onDashboardLoad$,this.actions$.pipe(Zn(gh))).pipe(It(this.store.select(Zo)),q(([,o])=>o),ri(),Oe(o=>null!==o),Lt(1),Dt(o=>{this.store.dispatch(yc({plugin:o}))})),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(pS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),CF=new te("Core Feature Config");function z6(n){return{initialState:{...pv,activePlugin:n.getPluginId()||null}}}function Mge(){return W(MS,n=>({sideBarWidthInPercent:n}))}var Qs=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:CF,deps:[gu],useFactory:z6}],imports:[to.forFeature([H6]),wr.forFeature("core",F6,CF),R6,Ri.defineGlobalSetting(Mge)]}),n})(),U6=new te("[Alert] Action-To-Alert Provider"),Cc=(()=>{class n{constructor(e){this.providers=new Map;for(let i of e||[])for(let r of i){if(this.providers.has(r.actionCreator.type))throw new RangeError(`"${r.actionCreator.type}" is already registered for alerts. Multiple alerts for the same action is not allowed.`);this.providers.set(r.actionCreator.type,r.alertFromAction)}}getAlertFromAction(e){let i=this.providers.get(e.type);return i?i(e):null}static registerAlertActions(e){return{ngModule:n,providers:[{provide:U6,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(O(U6,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),gt=(()=>{return(n=gt||(gt={})).COLOR="COLOR",n.RELATIVE_TIME="RELATIVE_TIME",n.RUN="RUN",n.STEP="STEP",n.EXPERIMENT="EXPERIMENT",n.TIME="TIME",n.VALUE="VALUE",n.SMOOTHED="SMOOTHED",n.VALUE_CHANGE="VALUE_CHANGE",n.START_STEP="START_STEP",n.END_STEP="END_STEP",n.START_VALUE="START_VALUE",n.END_VALUE="END_VALUE",n.MIN_VALUE="MIN_VALUE",n.MAX_VALUE="MAX_VALUE",n.PERCENTAGE_CHANGE="PERCENTAGE_CHANGE",n.STEP_AT_MAX="STEP_AT_MAX",n.STEP_AT_MIN="STEP_AT_MIN",n.MEAN="MEAN",n.RAW_CHANGE="RAW_CHANGE",n.HPARAM="HPARAM",n.METRIC="METRIC",n.CUSTOM="CUSTOM",gt;var n})(),io=(()=>{return(n=io||(io={}))[n.DISCRETE=0]="DISCRETE",n[n.INTERVAL=1]="INTERVAL",io;var n})(),Lr=(()=>{return(n=Lr||(Lr={}))[n.ASCENDING=0]="ASCENDING",n[n.DESCENDING=1]="DESCENDING",Lr;var n})(),Wr=(()=>{return(n=Wr||(Wr={}))[n.SINGLE=0]="SINGLE",n[n.RANGE=1]="RANGE",Wr;var n})(),mo=(()=>{return(n=mo||(mo={}))[n.RIGHT=0]="RIGHT",n[n.LEFT=1]="LEFT",mo;var n})(),Zs=(()=>{return(n=Zs||(Zs={})).RUN="RUN",n.EXPERIMENT_ALIAS="EXPERIMENT_ALIAS",n.HPARAM="HPARAM",n.OTHER="OTHER",Zs;var n})(),vu=(()=>{return(n=vu||(vu={})).DEFAULT="DEFAULT",n.SMALL="SMALL",vu;var n})();function j6(n){return"RUN"===n.type?Zs.RUN:"CUSTOM"===n.type&&"experimentAlias"===n.name?Zs.EXPERIMENT_ALIAS:"HPARAM"===n.type?Zs.HPARAM:Zs.OTHER}var kl={moveColumn:function(n,t,e,i){let r=n.findIndex(s=>s.name===t.name),o=n.findIndex(s=>s.name===e.name);if(-1===r||r===o)return n;if(-1===o){if(void 0===i)return n;o=i===mo.LEFT?0:n.length-1}let a=[...n];return a.splice(r,1),a.splice(o,0,t),a},groupColumns:function(n){let t=new Map([[Zs.RUN,[]],[Zs.EXPERIMENT_ALIAS,[]],[Zs.HPARAM,[]],[Zs.OTHER,[]]]);return n.forEach(e=>{t.get(j6(e))?.push(e)}),Array.from(t.values()).flat()},columnToGroup:j6},ro={};NA(ro,{dashboardHparamColumnAdded:()=>EF,dashboardHparamColumnOrderChanged:()=>IF,dashboardHparamColumnRemoved:()=>TF,dashboardHparamColumnToggled:()=>DF,dashboardHparamFilterAdded:()=>wF,dashboardHparamFilterRemoved:()=>mv,dashboardMetricFilterAdded:()=>SF,dashboardMetricFilterRemoved:()=>fv,hparamsFetchSessionGroupsSucceeded:()=>hv,loadAllDashboardHparams:()=>gv});var hv=fe("[Hparams] Hparams Fetch Session Groups Succeeded",{_as:"props",_p:void 0}),wF=fe("[Hparams] Dashboard Hparam Filter Added",{_as:"props",_p:void 0}),SF=fe("[Hparams] Dashboard Metric Filter Added",{_as:"props",_p:void 0}),mv=fe("[Hparams] Dashboard Hparam Filter Removed",{_as:"props",_p:void 0}),fv=fe("[Hparams] Dashboard Metric Filter Removed",{_as:"props",_p:void 0}),EF=fe("[Hparams] Dashboard Hparam Column Added",{_as:"props",_p:void 0}),TF=fe("[Hparams] Dashboard Hparam Column Removed",{_as:"props",_p:void 0}),DF=fe("[Hparams] Dashboard Hparam Column Toggled",{_as:"props",_p:void 0}),IF=fe("[Hparams] Dashboard Hparam Column Order Changed",{_as:"props",_p:void 0}),gv=fe("[Hparams] Load all Hparams"),Dge=gr({dashboardHparamSpecs:[],dashboardSessionGroups:[],dashboardFilters:{hparams:new Map,metrics:new Map},dashboardDisplayedHparamColumns:[],numDashboardHparamsToLoad:1e3,numDashboardHparamsLoaded:0},ye(hs,(n,{partialSettings:t})=>{let{dashboardDisplayedHparamColumns:e}=t;return e?{...n,dashboardDisplayedHparamColumns:e}:n}),ye(hv,(n,t)=>{let e=t.hparamSpecs;return{...n,dashboardHparamSpecs:e,dashboardSessionGroups:t.sessionGroups,numDashboardHparamsLoaded:e.length}}),ye(wF,(n,t)=>{let e=new Map(n.dashboardFilters.hparams);return e.set(t.name,t.filter),{...n,dashboardFilters:{...n.dashboardFilters,hparams:e}}}),ye(SF,(n,t)=>{let e=new Map(n.dashboardFilters.metrics);return e.set(t.name,t.filter),{...n,dashboardFilters:{...n.dashboardFilters,metrics:e}}}),ye(mv,(n,t)=>{let e=new Map(n.dashboardFilters.hparams);return e.delete(t.name),{...n,dashboardFilters:{...n.dashboardFilters,hparams:e}}}),ye(fv,(n,t)=>{let e=new Map(n.dashboardFilters.metrics);return e.delete(t.name),{...n,dashboardFilters:{...n.dashboardFilters,metrics:e}}}),ye(EF,(n,{column:t,nextTo:e,side:i})=>{let{dashboardDisplayedHparamColumns:r}=n,o=r.length;if(void 0!==e&&void 0!==i){let l=r.findIndex(c=>c.name===e.name);-1!==l&&(o=i===mo.RIGHT?l+1:l)}let a={...t,enabled:!0},s=[...r];return s.splice(o,0,a),{...n,dashboardDisplayedHparamColumns:s}}),ye(TF,(n,{column:t})=>{let e=n.dashboardDisplayedHparamColumns.filter(({name:i})=>i!==t.name);return{...n,dashboardDisplayedHparamColumns:e}}),ye(DF,(n,{column:t})=>{let e=n.dashboardDisplayedHparamColumns.map(i=>i.name===t.name?{...i,enabled:!t.enabled}:i);return{...n,dashboardDisplayedHparamColumns:e}}),ye(IF,(n,{source:t,destination:e,side:i})=>{let{dashboardDisplayedHparamColumns:r}=n,o=kl.moveColumn(r,t,e,i);return{...n,dashboardDisplayedHparamColumns:o}}),ye(gv,n=>({...n,numDashboardHparamsToLoad:0})));function G6(n,t){return Dge(n,t)}var SS="hparams",hd=(()=>{return(n=hd||(hd={})).STATUS_UNKNOWN="STATUS_UNKNOWN",n.STATUS_SUCCESS="STATUS_SUCCESS",n.STATUS_FAILURE="STATUS_FAILURE",n.STATUS_RUNNING="STATUS_RUNNING",hd;var n})(),ES=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),q6="data/plugin/hparams";function kge(n){return function(n){return Boolean(n.domainDiscrete)}(n)?{type:io.DISCRETE,values:n.domainDiscrete}:function(n){return Boolean(n.domainInterval)}(n)?{...n.domainInterval,type:io.INTERVAL}:{values:[],type:io.DISCRETE}}var TS=(()=>{class n{constructor(e){this.http=e}getPrefix(e){return e.length>1?"compare":"experiment"}formatExperimentIds(e){return 1===e.length?e[0]:e.map((i,r)=>`${r}:${i}`).join(",")}fetchExperimentInfo(e,i){let r=this.formatExperimentIds(e),o={experimentName:r,hparamsLimit:i,includeMetrics:!1};return this.http.post(`/${this.getPrefix(e)}/${r}/${q6}/experiment`,o,{},"request").pipe(q(a=>a.hparamInfos.map(s=>{let l={...s,domain:kge(s)};return delete l.domainInterval,delete l.domainDiscrete,l})))}fetchSessionGroups(e,i){let r=this.formatExperimentIds(e),o=[];for(let s of i)o.push({hparam:s.name,includeInResult:!0});let a={experimentName:r,allowedStatuses:[hd.STATUS_FAILURE,hd.STATUS_RUNNING,hd.STATUS_SUCCESS,hd.STATUS_UNKNOWN],colParams:o,startIndex:0,sliceSize:1e6,includeMetrics:!1};return this.http.post(`/${this.getPrefix(e)}/${r}/${q6}/session_groups`,a,{},"request").pipe(q(s=>s.sessionGroups.map(l=>(l.sessions=l.sessions.map(c=>{if(e.length>1){let[,...d]=c.name.split(" "),[u,...p]=d.join(" ").split("/");c.name=[e[parseInt(u)],...p].join("/")}else c.name=[e[0],c.name].join("/");return c}),l))))}}return n.\u0275fac=function(e){return new(e||n)(O(Xs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Mc={};function X6(n){return n.domain.type===io.DISCRETE?{type:io.DISCRETE,includeUndefined:!0,possibleValues:n.domain.values,filterValues:n.domain.values}:{type:io.INTERVAL,includeUndefined:!0,minValue:n.domain.minValue,maxValue:n.domain.maxValue,filterLowerValue:n.domain.minValue,filterUpperValue:n.domain.maxValue}}NA(Mc,{getDashboardDefaultHparamFilters:()=>RF,getDashboardDisplayedHparamColumns:()=>md,getDashboardHparamFilterMap:()=>IS,getDashboardHparamSpecs:()=>DS,getDashboardMetricsFilterMap:()=>AS,getDashboardSessionGroups:()=>AF,getNumDashboardHparamsLoaded:()=>Fge,getNumDashboardHparamsToLoad:()=>PF});var vh=Mr(SS),DS=W(vh,n=>n.dashboardHparamSpecs),AF=W(vh,n=>n.dashboardSessionGroups),RF=W(DS,n=>new Map(n.map(e=>[e.name,X6(e)]))),md=W(vh,n=>{let t=new Set(n.dashboardHparamSpecs.map(e=>e.name));return n.dashboardDisplayedHparamColumns.filter(e=>t.has(e.name))}),IS=W(vh,n=>n.dashboardFilters.hparams),AS=W(vh,n=>n.dashboardFilters.metrics),PF=W(vh,n=>n.numDashboardHparamsToLoad),Fge=W(vh,n=>n.numDashboardHparamsLoaded),Y6=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.navigated$=this.actions$.pipe(Zn(Na),It(this.store.select(or)),Oe(([,o])=>Boolean(o)),q(([,o])=>o),ri((o,a)=>o.join("")===a.join(""))),this.loadHparamsOnReload$=this.actions$.pipe(Zn(ma,Ba,gv),It(this.store.select(or)),Oe(([,o])=>Boolean(o)),q(([,o])=>o)),this.loadHparamsData$=_r(()=>tn(this.navigated$,this.loadHparamsOnReload$).pipe(It(this.store.select(Ho),this.store.select(PF)),Oe(([,o])=>o?.routeKind===Cn.EXPERIMENT||o?.routeKind===Cn.COMPARE_EXPERIMENT),ic(10),Jn(([o,,a])=>this.loadHparamsForExperiments(o,a)),q(o=>hv(o))))}loadHparamsForExperiments(e,i){return this.dataSource.fetchExperimentInfo(e,i).pipe(Jn(r=>this.dataSource.fetchSessionGroups(e,r).pipe(co(o=>o instanceof ud&&400===o.status?$t([]):_l(()=>o)),q(o=>({hparamSpecs:r,sessionGroups:o})))))}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(TS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Q6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[TS],imports:[wr.forFeature(SS,G6),to.forFeature([Y6])]}),n})();function Nge(){return W(md,n=>({dashboardDisplayedHparamColumns:n}))}var RS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Q6,Ri.defineGlobalSetting(Nge)]}),n})(),PS=fe("[Runs] Fetch Runs Requested",{_as:"props",_p:void 0}),Wf=fe("[Runs] Fetch Runs Succeeded",{_as:"props",_p:void 0}),qf=fe("[Runs] Fetch Runs Failed",{_as:"props",_p:void 0}),kS=fe("[Runs] Run Selection Toggled",{_as:"props",_p:void 0}),OS=fe("[Runs] Single Run Selected",{_as:"props",_p:void 0}),FS=fe("[Runs] Run Page Selection Toggled",{_as:"props",_p:void 0}),NS=fe("[Runs] Run Selector Regex Filter Changed",{_as:"props",_p:void 0}),LS=fe("[Runs] Run Color Changed",{_as:"props",_p:void 0}),Xf=fe("[Runs] Run Group By Changed",{_as:"props",_p:void 0}),Z6=fe("[Runs] Runs Table Header Added",{_as:"props",_p:void 0}),BS=fe("[Runs] Runs Table Header Removed",{_as:"props",_p:void 0}),K6=fe("[Runs] Runs Table Header Order Changed",{_as:"props",_p:void 0}),VS=fe("[Runs] Runs Table Sorting Info Changed",{_as:"props",_p:void 0});function Lge(n,t){return`${t}/${n}`}var J6=(()=>{class n{constructor(e){this.http=e}fetchRuns(e){return this.http.get(`/experiment/${e}/data/runs`).pipe(q(i=>i.map(r=>({id:Lge(r,e),name:r,startTime:0}))))}}return n.\u0275fac=function(e){return new(e||n)(O(Xs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),$6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:ES,useClass:J6}]}),n})(),eW=W(Mr("alerts"),n=>n.latestAlert),zS="experiments",tW=W(Mr(zS),n=>n.data),US=W(tW,(n,t)=>{let{experimentId:e}=t;return n.experimentMap[e]||null}),yu=W(tW,or,(n,t)=>(t??[]).map(e=>n.experimentMap[e]).filter(Boolean).reduce((e,i)=>(e[i.id]=i.name,e),{}));function jS(n,t,e){return n<t?t:n>e?e:n}function Yf(n,t,e){let i=jS(n.start.step,t,e),r=n.end?jS(n.end.step,t,e):null;return{startStep:i,endStep:r,clipped:i!==n.start.step||r!==(n.end?.step??null)}}function GS(n,t){let e=t[n.id];return e&&e.visible&&!Boolean(e.aux)}function OF(n,t){return t?n:{start:n.start,end:null}}function FF(n,t,e){return OF(function(n,{minStep:t,maxStep:e}){return{start:{step:jS(n.start.step,t,e)},end:n.end?{step:jS(n.end.step,t,e)}:null}}(n,t),e)}var An=(()=>{return(n=An||(An={})).SCALARS="scalars",n.HISTOGRAMS="histograms",n.IMAGES="images",An;var n})(),Pi=(()=>{return(n=Pi||(Pi={})).STEP="step",n.RELATIVE="relative",n.WALL_TIME="walltime",Pi;var n})(),_v="timeseries";function aW(n){return n===An.SCALARS||n===An.HISTOGRAMS||n===An.IMAGES}var Uge=[An.IMAGES];function fs(n){return Uge.includes(n)}var jge=[An.HISTOGRAMS,An.IMAGES];function gs(n){return jge.includes(n)}function NF(n){return gs(n.plugin)}var wc=class{};function qS(n){return n.hasOwnProperty("error")}var LF="data/plugin/timeseries";function sW(n){let t=n.indexOf("/");return{run:n.substring(t+1),experimentId:n.substring(0,t)}}function cW(n,t){return`${t}/${n}`}function lW(n,t){let{runToSeries:e,run:i,...r}=n,o={...r};return e&&(o.runToSeries=BF(e,t)),i&&(o.runId=cW(i,t)),o}function BF(n,t){let e={};for(let i in n)n.hasOwnProperty(i)&&(e[cW(i,t)]=n[i]);return e}var dW=(()=>{class n{constructor(e,i){this.http=e,this.store=i}fetchTagMetadata(e){let i=e.map(o=>this.http.get(`/experiment/${o}/${LF}/tags`).pipe(q(s=>function(n,t){let e={};for(let i of Object.keys(n)){let r=i;if(fs(r)){let{tagRunSampledInfo:o,...a}=n[r],s={};for(let l in o)o.hasOwnProperty(l)&&(s[l]=BF(o[l],t));e[r]={...a,tagRunSampledInfo:s}}else{let{runTagInfo:o,...a}=n[r];e[r]={...a,runTagInfo:BF(o,t)}}}return e}(s,o)))),r=this.store.select(bu).pipe(Oe(Boolean),Lt(1),It(this.store.select(dS)),q(([,o])=>o));return Co(i).pipe(It(r),q(([o,a])=>{let s=function(n){let t={};for(let e of n)for(let i of Object.values(An))if(fs(i)){t[i]=t[i]||{tagDescriptions:{},tagRunSampledInfo:{}};let{tagDescriptions:r,tagRunSampledInfo:o}=e[i];t[i].tagDescriptions={...t[i].tagDescriptions,...r};let a=t[i].tagRunSampledInfo;for(let s of Object.keys(o)){a[s]=a[s]||{};for(let l of Object.keys(o[s]))a[s][l]=o[s][l]}}else{t[i]=t[i]||{tagDescriptions:{},runTagInfo:{}};let{tagDescriptions:r,runTagInfo:o}=e[i];t[i].tagDescriptions={...t[i].tagDescriptions,...r},t[i].runTagInfo={...t[i].runTagInfo,...o}}return t}(o);return a||(s[An.IMAGES]={tagDescriptions:{},tagRunSampledInfo:{}}),s}))}fetchTimeSeries(e){let i=e.map(r=>{if(gs(r.plugin)){let{runId:l,...c}=r,{run:d,experimentId:u}=sW(l),p={...c,run:d};return this.fetchTimeSeriesBackendRequest(p,u).pipe(q(({response:h,experimentId:m})=>lW(h,m)))}let{experimentIds:o,...a}=r;return Co(o.map(l=>this.fetchTimeSeriesBackendRequest(a,l))).pipe(q(l=>{let{runToSeries:c,error:d,...u}=l[0].response,p=u;for(let{response:h,experimentId:m}of l){let _=lW(h,m);if(p.error)continue;let{runToSeries:M,error:y}=_;if(y)p.error=y,p.runToSeries=void 0;else{p.runToSeries=p.runToSeries||{};for(let x of Object.keys(M))p.runToSeries[x]=M[x]}}return p}))});return Co(i)}fetchTimeSeriesBackendRequest(e,i){let r=new FormData;return r.append("requests",JSON.stringify([e])),this.http.post(`/experiment/${i}/${LF}/timeSeries`,r).pipe(q(o=>({response:o[0],experimentId:i})))}imageUrl(e){return`${LF}/imageData?imageId=${e}`}downloadUrl(e,i,r,o){let l,{run:a,experimentId:s}=sW(r);if(e!==An.SCALARS)throw new Error(`Not implemented: downloadUrl for ${e} is not implemented yet`);if(l="scalars/scalars",!s)throw new Error("experimentId is empty; it is required to form downloadUrl.");return`/experiment/${s}/data/plugin/scalars/scalars?${new URLSearchParams({tag:i,run:a,format:o})}`}}return n.\u0275fac=function(e){return new(e||n)(O(Xs),O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),bv="tb-saved-scalar-pins",XS=(()=>{class n{saveScalarPin(e){let i=this.getSavedScalarPins();i.includes(e)||i.push(e),window.localStorage.setItem(bv,JSON.stringify(i))}saveScalarPins(e){let i=this.getSavedScalarPins(),r=e.filter(o=>!i.includes(o));i.push(...r),window.localStorage.setItem(bv,JSON.stringify(i))}removeScalarPin(e){let i=this.getSavedScalarPins();window.localStorage.setItem(bv,JSON.stringify(i.filter(r=>r!==e)))}getSavedScalarPins(){let e=window.localStorage.getItem(bv);return e?JSON.parse(e):[]}removeAllScalarPins(){window.localStorage.setItem(bv,JSON.stringify([]))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Xge=new URLSearchParams(window.location.search),YS=(()=>{class n{getParams(){return Xge}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),vv="tb_feature_flag_storage_key",VF=(()=>{class n{constructor(e){this.queryParams=e}getFeatures(e,i){let r=e?this.getPartialFeaturesFromMediaQuery():{},o=function(n,t){return Object.entries(n).reduce((e,[i,r])=>{let o=function(n,t){let e=n.queryParamOverride;if(!e||!t.has(e))return null;let i=t.get(e);return null==i?null:n.parseValue(i)}(r,t);return null!==o&&(e[i]=o),e},{})}(i,this.queryParams.getParams());return{...r,...Object.fromEntries(Object.entries(this.getPersistentFeatureFlags()).filter(([s])=>i[s])),...o}}persistFeatureFlags(e){let r={...this.getPersistentFeatureFlags(),...e};window.localStorage.setItem(vv,JSON.stringify(r))}resetPersistedFeatureFlag(e){let i=this.getPersistentFeatureFlags();if(null!=i[e]){if(delete i[e],0===Object.keys(i).length)return void window.localStorage.removeItem(vv);window.localStorage.setItem(vv,JSON.stringify(i))}}resetAllPersistedFeatureFlags(){window.localStorage.removeItem(vv)}getPersistentFeatureFlags(){let e=window.localStorage.getItem(vv);return null==e?{}:JSON.parse(e)}getPartialFeaturesFromMediaQuery(){let e={};return window.matchMedia("(prefers-color-scheme: dark)").matches&&(e.defaultEnableDarkMode=!0),e}}return n.\u0275fac=function(e){return new(e||n)(O(YS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),QS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),hW=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[VF,YS,{provide:QS,useClass:VF}]}),n})(),yv=fe("[FEATURE FLAG] Partial Feature Flags Loaded",{_as:"props",_p:void 0}),ZS=fe("[FEATURE FLAG] Enable Dark Mode Override Changed",{_as:"props",_p:void 0}),yh=fe("[FEATURE FLAG] Store the feature flags in persistent localStorage",{_as:"props",_p:void 0}),xu=fe("[FEATURE FLAG] Reset feature flag overrides",{_as:"props",_p:void 0}),Qf=fe("[FEATURE FLAG] Reset all feature flag overrides"),mW=fe("[FEATURE FLAG] Effects Init"),fW=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.tfFeatureFlags={ref:document.createElement("tf-feature-flags").tf_feature_flags},this.getFeatureFlags$=_r(()=>this.actions$.pipe(Zn(mW),Vi(this.store.select(M6),this.store.select(fh)),q(([,o,a])=>{let s=this.dataSource.getFeatures(o,a);return yv({features:s})}))),this.updatePolymerFeatureFlags$=_r(()=>this.actions$.pipe(Zn(yv),It(this.store.select(Qo),this.store.select(Hf)),Dt(([,o,a])=>{this.tfFeatureFlags.ref.setFeatureFlags(o,a)})),{dispatch:!1}),this.storeFeatureFlag$=_r(()=>this.actions$.pipe(Zn(yh),Dt(({flags:o})=>{this.dataSource.persistFeatureFlags(o)})),{dispatch:!1}),this.resetFeatureFlagOverrides$=_r(()=>this.actions$.pipe(Zn(xu),Dt(({flags:o})=>{o.forEach(a=>{this.dataSource.resetPersistedFeatureFlag(a)})})),{dispatch:!1}),this.resetAllFeatureFlagOverrides$=_r(()=>this.actions$.pipe(Zn(Qf),Dt(()=>{this.dataSource.resetAllPersistedFeatureFlags()})),{dispatch:!1})}ngrxOnInitEffects(){return mW()}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(QS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),bW=(()=>{class n{constructor(e){this.store=e}intercept(e,i){return this.store.pipe(un(Hf),zm(),Jn(r=>(e=e.clone({headers:e.headers.set("X-TensorBoard-Feature-Flags",JSON.stringify(r))}),i.handle(e))))}}return n.\u0275fac=function(e){return new(e||n)(O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function Cu(n){return"false"!==n}var n,HF={scalarsBatchSize:{defaultValue:void 0,queryParamOverride:"scalarsBatchSize",parseValue:parseInt},enabledExperimentalPlugins:{defaultValue:[],queryParamOverride:"experimentalPlugin",parseValue:function(n){return n?n.split(","):[]}},forceSvg:{defaultValue:!1,queryParamOverride:"forceSVG",parseValue:Cu},enableDarkModeOverride:{defaultValue:null,queryParamOverride:null},defaultEnableDarkMode:{defaultValue:!1,queryParamOverride:"darkMode",parseValue:Cu},isAutoDarkModeAllowed:{defaultValue:!0,queryParamOverride:null},inColab:{defaultValue:!1,queryParamOverride:"tensorboardColab",parseValue:Cu},metricsImageSupportEnabled:{defaultValue:!0,queryParamOverride:null},showFlags:{defaultValue:void 0,queryParamOverride:"showFlags",parseValue:n=>n},enableScalarColumnCustomization:{defaultValue:!1,queryParamOverride:"enableScalarColumnCustomization",parseValue:Cu},enableScalarColumnContextMenus:{defaultValue:!1,queryParamOverride:"enableScalarColumnContextMenus",parseValue:Cu},enableSuggestedCards:{defaultValue:!1,queryParamOverride:"enableSuggestedCards",parseValue:Cu},enableGlobalPins:{defaultValue:!0,queryParamOverride:"enableGlobalPins",parseValue:Cu},enableColorByExperiment:{defaultValue:!1,queryParamOverride:"enableColorByExperiment",parseValue:Cu}},zF={isFeatureFlagsLoaded:!1,defaultFlags:(n=HF,Object.entries(n).reduce((t,[e,i])=>(t[e]=i.defaultValue,t),{})),metadata:HF,flagOverrides:{}},UF=new te("[Feature Flag] Store Config");function yW(){return{initialState:zF}}var e0e=gr(zF,ye(yv,(n,{features:t})=>({...n,isFeatureFlagsLoaded:!0,flagOverrides:{...n.flagOverrides,...t}})),ye(ZS,(n,{enableDarkMode:t})=>({...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:t}})),ye(yh,(n,t)=>({...n,flagOverrides:{...n.flagOverrides,...t.flags}})),ye(xu,(n,t)=>{if(!t||!t.flags||!t.flags.length)return n;let e={...n.flagOverrides};return t.flags.forEach(i=>{delete e[i]}),{...n,flagOverrides:e}}),ye(Qf,n=>({...n,flagOverrides:{}})),ye(hs,(n,{partialSettings:t})=>{if(!t.themeOverride)return n;let e;switch(t.themeOverride){case La.BROWSER_DEFAULT:e=null;break;case La.DARK:e=!0;break;case La.LIGHT:e=!1}return{...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:e}}}));function xW(n,t){return e0e(n,t)}function t0e(){return W(cS,n=>null===n?{themeOverride:La.BROWSER_DEFAULT}:{themeOverride:n?La.DARK:La.LIGHT})}var Mu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:UF,useFactory:yW},{provide:bF,useClass:bW,multi:!0}],imports:[hW,wr.forFeature(lS,xW,UF),to.forFeature([fW]),Ri.defineGlobalSetting(t0e)]}),n})(),KS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:wc,useClass:dW}],imports:[Mu,zf]}),n})(),CW=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[XS]}),n})(),oo=(()=>(function(n){n.DEFAULT="default",n.ALPHABETICAL="alphabetical",n.ASCENDING="ascending",n.DESCENDING="descending",n.NEAREST="nearest",n.NEAREST_Y="nearest_Y"}(oo||(oo={})),oo))(),JS="metrics",Va=(()=>(function(n){n[n.NONE=0]="NONE",n[n.OVERRIDE_AS_ENABLED=1]="OVERRIDE_AS_ENABLED",n[n.OVERRIDE_AS_DISABLED=2]="OVERRIDE_AS_DISABLED"}(Va||(Va={})),Va))(),$S={cardMinWidth:null,tooltipSort:oo.ALPHABETICAL,ignoreOutliers:!0,xAxisType:Pi.STEP,hideEmptyCards:!0,scalarSmoothing:.6,scalarPartitionNonMonotonicX:!1,imageBrightnessInMilli:1e3,imageContrastInMilli:1e3,imageShowActualSize:!1,histogramMode:Sr.OFFSET,savingPinsEnabled:!0},n0e=.1;function fd(n,t,e,i){return n[t].hasOwnProperty(e)?fs(t)?n[t][e].hasOwnProperty(i)?n[t][e][i]:null:n[t][e]:null}function e1(n,t,e,i){if(fs(t)){let a={...n[t]},s=function(n,t,e){let r=n.hasOwnProperty(t)?{...n[t]}:{},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}(a,e,i);return a[e]=s,a}let r={...n[t]},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}function jF(n){return JSON.stringify(n)}function t1(n,t,e){let i={...e};for(let r of t)i[r]=n;return i}function Zf(n,t,e,i){if(fs(t)){let o=n[t].tagRunSampledInfo;return o.hasOwnProperty(e)?Object.keys(o[e]).filter(s=>i<o[e][s].maxSamplesPerStep):[]}let r=n[t].tagToRuns;return r.hasOwnProperty(e)?r[e]:[]}function o0e(n,t){return n.plugin===t.plugin&&n.tag===t.tag&&n.sample===t.sample&&(n.runId===t.runId||!n.runId&&!t.runId)}function GF(n,t,e,i,r,o,a,s){let l=new Set(n),c=[];for(let u of n)for(let p of t)if(o0e(e[p],u)){c.push(p),l.delete(u);break}if(!c.length)return{unresolvedImportedPinnedCards:n,cardMetadataMap:e,cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:a,cardStateMap:s};let d={cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:a,cardMetadataMap:e,cardStateMap:s};for(let u of c)d=WF(u,d.cardToPinnedCopy,d.cardToPinnedCopyCache,d.pinnedCardToOriginal,d.cardStepIndex,d.cardMetadataMap,s);return{...d,unresolvedImportedPinnedCards:[...l]}}function WF(n,t,e,i,r,o,a){if(t.has(n))return{cardToPinnedCopy:t,cardToPinnedCopyCache:e,pinnedCardToOriginal:i,cardStepIndex:r,cardMetadataMap:o,cardStateMap:a};let s=new Map(t),l=new Map(e),c=new Map(i),d={...r},u={...o},p={...a},h=function(n){return JSON.stringify({baseCardId:n})}(n);s.set(n,h),l.set(n,h),c.set(h,n),r.hasOwnProperty(n)&&(d[h]=r[n]);let m=o[n];if(!m)throw new Error("Cannot pin a card without metadata");return u[h]=m,p[n]&&(p[h]=p[n]),{cardToPinnedCopy:s,cardToPinnedCopyCache:l,pinnedCardToOriginal:c,cardStepIndex:d,cardMetadataMap:u,cardStateMap:p}}var a0e={MAX_PIN_COUNT:10};function n1(n){return n.pinnedCardToOriginal.size+n.unresolvedImportedPinnedCards.length<a0e.MAX_PIN_COUNT}function qF(n,t,e,i){let r={...n};return Object.keys(n).forEach(o=>{if(!o.includes('"plugin":"images"'))return;let a=XF(o,t,e),s=null;if(null===i.end)s=function(n,t){let e=t.indexOf(n);if(-1!==e)return{index:e,isClosest:!1};for(let i=0;i<t.length-1;i++){let r=t[i],o=t[i+1],a=(o-r)*n0e;if(n<r)return null;if(!(n>o)){if(n-r<=a)return{index:i,isClosest:!0};if(o-n<=a)return{index:i+1,isClosest:!0}}}return null}(i.start.step,a);else{let c=a[n[o].index],d=function(n,t){if(!n)return[];if(null===n.end)return-1!==t.indexOf(n.start.step)?[n.start.step]:[];let e=[];for(let i of t)i>=n.start.step&&i<=n.end.step&&e.push(i);return e}(i,a);s=function(n,t,e){if(0===n.length)return null;let i=n[0],r=n[n.length-1];return e>r?{index:t.indexOf(r),isClosest:!1}:e<i?{index:t.indexOf(i),isClosest:!1}:null}(d,a,c)}null!==s&&(r[o]=s)}),r}function XF(n,t,e){if(!t.hasOwnProperty(n))return[];let{plugin:i,tag:r,sample:o,runId:a}=t[n];if(null===a)return[];let s=fd(e,i,r,o);return null!==s&&s.runToSeries.hasOwnProperty(a)?s.runToSeries[a].map(l=>l.step):[]}function YF(n){let{dataMinMax:t,userViewBox:e}=n,i=e?.x;if(!i)return t;let r=i[0]<i[1]?i[0]:i[1],o=r===i[0]?i[1]:i[0];return{minStep:Math.ceil(r),maxStep:Math.floor(o)}}function i1(n,t){switch(n){case Va.OVERRIDE_AS_ENABLED:return!0;case Va.OVERRIDE_AS_DISABLED:return!1;default:return t}}function r1(n,t,e,i){return e?t:i1(n[i]?.rangeSelectionOverride,t)}function _s(n){let t=new Map;return(...e)=>{let i=JSON.stringify(e);if(t.has(i))return t.get(i);{let r=n(...e);return t.set(i,r),r}}}var Hi=Mr(JS),xv=W(Hi,n=>n.tagMetadataLoadState),DW=W(Hi,n=>n.tagMetadata),u0e=W(Hi,n=>n.cardList),gd=W(Hi,(n,t)=>{if(!n.cardMetadataMap.hasOwnProperty(t))return Re.NOT_LOADED;let{plugin:e,tag:i,runId:r,sample:o}=n.cardMetadataMap[t],a=fd(n.timeSeriesData,e,i,o);if(!a)return Re.NOT_LOADED;let s=a.runToLoadState;if(r)return s.hasOwnProperty(r)?s[r]:Re.NOT_LOADED;let l=Zf(n.tagMetadata,e,i,o);if(!l.length)throw new Error("Cannot load a card whose tag has no runs");return l.every(c=>s[c]===Re.LOADED)?Re.LOADED:l.some(c=>s[c]===Re.LOADING)?Re.LOADING:Re.NOT_LOADED}),p0e=_s(n=>W(t=>t,t=>{let{plugin:e,tag:i,sample:r}=n,o=fd(t.timeSeriesData,e,i,r);return o?o.runToSeries:null})),wu=W(Hi,(n,t)=>n.cardMetadataMap.hasOwnProperty(t)?p0e(n.cardMetadataMap[t])(n):null),QF=W(Hi,n=>n.cardMetadataMap),Ks=W(QF,(n,t)=>n.hasOwnProperty(t)?n[t]:null),Js=W(Hi,n=>n.cardStateMap),h0e=W(Hi,n=>n.visibleCardMap),IW=W(h0e,n=>new Set(n.values())),o1=W(u0e,QF,(n,t)=>n.filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),ZF=W(Hi,(n,t)=>n.cardStepIndex.hasOwnProperty(t)?n.cardStepIndex[t]:null),AW=W(Hi,(n,t)=>XF(t,n.cardMetadataMap,n.timeSeriesData)),RW=W(Hi,n=>n.cardToPinnedCopy),m0e=W(Hi,n=>n.pinnedCardToOriginal),Kf=W(RW,QF,(n,t)=>[...n.values()].filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),Su=W(RW,m0e,(n,t,e)=>n.has(e)||t.has(e)),PW=W(Hi,n=>n.unresolvedImportedPinnedCards),kW=W(Hi,n=>n1(n)),OW=W(Hi,n=>n.lastPinnedCardTime),$s=W(Hi,n=>({...n.settings,...n.settingOverrides})),FW=W(Hi,n=>n.settingOverrides),Jf=W($s,n=>n.cardMinWidth),xh=W($s,n=>n.tooltipSort),Ch=W($s,n=>n.ignoreOutliers),Ol=W($s,n=>n.xAxisType),a1=W($s,n=>n.histogramMode),NW=W($s,n=>n.hideEmptyCards),_d=W($s,n=>n.scalarSmoothing),s1=W($s,n=>n.scalarPartitionNonMonotonicX),l1=W($s,n=>n.imageBrightnessInMilli),c1=W($s,n=>n.imageContrastInMilli),d1=W($s,n=>n.imageShowActualSize),bd=W($s,n=>n.savingPinsEnabled),Fl=W(Hi,n=>n.tagFilter),u1=W(Hi,(n,t)=>Boolean(n.tagGroupExpanded.get(t))),Eu=W(Hi,n=>n.linkedTimeEnabled),Cv=W(Hi,n=>n.stepSelectorEnabled),Tu=W(Hi,n=>n.rangeSelectionEnabled),KF=W(Hi,n=>{let{min:t,max:e}=n.stepMinMax;return{min:t===1/0?0:t,max:e===-1/0?1e3:e}}),JF=W(Hi,KF,(n,t)=>n.linkedTimeSelection?n.linkedTimeSelection:{start:{step:t.max},end:null}),Du=W(Hi,JF,(n,t)=>n.linkedTimeEnabled?t:null),Sc=W(Hi,n=>n.filteredPluginTypes),p1=W(Hi,n=>n.isSettingsPaneOpen),h1=W(Hi,n=>n.isSlideoutMenuOpen),LW=W(Hi,n=>n.tableEditorSelectedTab),m1=_s(n=>W(Js,Tu,Eu,(t,e,i)=>r1(t,e,i,n))),BW=W(Js,(n,t)=>{if(n[t])return YF(n[t])}),VW=W(Js,(n,t)=>n[t]?.dataMinMax),$F=W(Js,(n,t)=>n[t]?.userViewBox??null),HW=W(Js,Cv,Tu,Eu,Du,(n,t,e,i,r,o)=>{let a=n[o];if(!a)return;let s=YF(a);if(!s)return;if(i&&r)return FF(r,s,e);if(!i1(a.stepSelectionOverride,t))return;let l=i1(a.rangeSelectionOverride,e),c=a.timeSelection;return c||(c={start:{step:s.minStep},end:{step:s.maxStep}}),l?c.end||(c={start:{step:s.minStep},end:c.start}):c={start:c.end??c.start,end:null},FF(c,s,l)}),Mv=W(Hi,n=>n.singleSelectionHeaders),wv=W(Hi,n=>n.rangeSelectionHeaders),e2=_s(n=>W(m1(n),Mv,wv,(t,e,i)=>t?i:e)),zW=_s(n=>W(e2(n),md,(t,e)=>kl.groupColumns([...t,...e]))),jW=Mr("notification"),Yn=(W(jW,n=>n.notifications),W(jW,n=>n.lastReadTimestampInMs??-1),(()=>(function(n){n[n.RUN=0]="RUN",n[n.EXPERIMENT=1]="EXPERIMENT",n[n.REGEX=2]="REGEX",n[n.REGEX_BY_EXP=3]="REGEX_BY_EXP"}(Yn||(Yn={})),Yn))());function Ev(n,t,e,i){let s,r={},o=[],a={matches:r,nonMatches:o};switch(n.key){case Yn.RUN:for(let l of t)r[l.id]=[l];break;case Yn.EXPERIMENT:for(let l of t){let c=e[l.id],d=r[c]||[];d.push(l),r[c]=d}break;case Yn.REGEX:if(!n.regexString)break;try{s=new RegExp(n.regexString)}catch{break}for(let l of t){let c=l.name.match(s);if(c){let u=c.length>1?JSON.stringify(c.slice(1)):"pseudo_group",p=r[u]||[];p.push(l),r[u]=p}else o.push(l)}break;case Yn.REGEX_BY_EXP:if(!n.regexString||!i||0===Object.keys(i).length)break;try{s=new RegExp(n.regexString)}catch{break}for(let l of t){let d=i[e[l.id]].match(s);if(d){let p=d.length>1?JSON.stringify(d.slice(1)):"pseudo_group",h=r[p]||[];h.push(l),r[p]=h}else o.push(l)}}return a}function g1(n,t){switch(n){case Yn.REGEX:case Yn.REGEX_BY_EXP:return{key:n,regexString:t??""};default:return{key:n}}}var GW=Mr("runs"),fa=W(GW,n=>n.data),WW=W(fa,n=>n.runIdToExpId),_1=W(fa,(n,t)=>n.runIdToExpId[t.runId]??null),b1=W(fa,(n,t)=>n.runMetadata[t.runId]??null),Iu=W(fa,(n,t)=>(n.runIds[t.experimentId]||[]).filter(i=>Boolean(n.runMetadata[i])).map(i=>n.runMetadata[i])),qW=W(AF,or,fa,(n,t,e)=>{if(!t)return{};let i=[];for(let s of t)i.push(...e.runIds[s]||[]);let r={};for(let s of n){let l=Object.entries(s.hparams).map(c=>{let[d,u]=c;return{name:d,value:u}});for(let c of s.sessions)r[c.name]=l}let o=Object.keys(r).sort((s,l)=>l.length-s.length),a={};for(let s of i)for(let l of o)if(s.startsWith(l)){a[s]={hparams:r[l],metrics:[]};break}return a}),XW=W(qW,n=>{let t={};for(let[e,{hparams:i}]of Object.entries(n))t[e]=new Map(i.map(({name:r,value:o})=>[r,o]));return t}),v1=W(fa,or,qW,(n,t,e)=>t?t.map(i=>(n.runIds[i]||[]).filter(r=>Boolean(n.runMetadata[r])).map(r=>{let o={...n.runMetadata[r],experimentId:i};return o.hparams=e[r]?.hparams??null,o.metrics=e[r]?.metrics??null,o})).flat():[]),YW=W(fa,(n,t)=>n.runIds[t.experimentId]??[]),QW=W(fa,n=>new Map(Object.entries(n.runMetadata))),Tv=W(fa,(n,t)=>n.runsLoadState[t.experimentId]||{lastLoadedTimeInMs:null,state:Re.NOT_LOADED}),t2=W(fa,n=>null!==n.userSetGroupByKey?g1(n.userSetGroupByKey,n.colorGroupRegexString):null),Dv=W(t2,fa,(n,t)=>n??t.initialGroupBy),Au=W(fa,n=>n.regexFilter),n2=W(GW,n=>n.ui),ZW=W(n2,n=>n.selectionState),KW=W(fa,n=>n.runColorOverrideForGroupBy),JW=W(fa,n=>n.defaultRunColorIdForGroupBy),y1=W(fa,n=>n.colorGroupRegexString),f0e=W(n2,n=>n.runsTableHeaders),$W=W(n2,n=>n.sortingInfo),e7=W(f0e,md,(n,t)=>kl.groupColumns([...n,...t])),x1=fe("[Settings] Reload Enable Toggled"),C1=fe("[Settings] Reload Period Change",{_as:"props",_p:void 0}),M1=fe("[Settings] Page Size Change",{_as:"props",_p:void 0}),Ha={};NA(Ha,{getColorPalette:()=>g0e,getPageSize:()=>Mh,getReloadEnabled:()=>Av,getReloadPeriodInMs:()=>Rv,getSettingsLoadState:()=>i2});var w1="settings",i7={state:Re.LOADED,lastLoadedTimeInMs:Date.now(),settings:{reloadPeriodInMs:3e4,reloadEnabled:!1,pageSize:12,colorPalette:{id:"default",name:"Defalt",colors:[{name:"Slate",lightHex:"#425066",darkHex:"#8e98a3"},{name:"Cyan",lightHex:"#12b5cb",darkHex:"#12b5cb"},{name:"Pink",lightHex:"#e52592",darkHex:"#e52592"},{name:"Yellow",lightHex:"#f9ab00",darkHex:"#f9ab00"},{name:"Purple",lightHex:"#9334e6",darkHex:"#9334e6"},{name:"Light Green",lightHex:"#7cb342",darkHex:"#7cb342"},{name:"Orange",lightHex:"#e8710a",darkHex:"#e8710a"}],inactive:{name:"Gray",lightHex:"#e0e0e0",darkHex:"#3b3b3b"}}}},Iv=Mr(w1),i2=W(Iv,n=>n.state),Av=W(Iv,n=>n.settings.reloadEnabled),Rv=W(Iv,n=>n.settings.reloadPeriodInMs),Mh=W(Iv,n=>n.settings.pageSize),g0e=W(Iv,n=>n.settings.colorPalette);function S1(n,t,e){if(!t)return!0;let i;try{i=new RegExp(t,"i")}catch{return!1}let r=[n.runName];return e&&r.push(n.experimentAlias.aliasText,`${n.experimentAlias.aliasText}/${n.runName}`),r.some(o=>i.test(o))}var _0e=W(or,ZW,WW,(n,t,e)=>{if(!n)return new Map;let i=new Map;for(let[r,o]of t.entries()){let a=e[r];a&&n.indexOf(a)>=0&&i.set(r,o)}return i}),b0e=W(qs,v1,(n,t)=>{let e=new Map;for(let i of t)e.set(i.id,{runName:i.name,experimentAlias:n[i.experimentId]});return e}),Ru=W(or,_0e,Au,b0e,Ws,(n,t,e,i,r)=>{if(!n)return null;let o=r===Cn.COMPARE_EXPERIMENT,a=new Map;for(let[s,l]of t.entries()){let c=i.get(s);a.set(s,S1(c,e,o)&&l)}return a}),Pu=W(Ha.getColorPalette,JW,KW,Pl,(n,t,e,i)=>{let r={};return t.forEach((o,a)=>{let s=i?n.inactive.darkHex:n.inactive.lightHex;if(e.has(a))s=e.get(a);else if(o>=0){let l=n.colors[o%n.colors.length];s=i?l.darkHex:l.lightHex}r[a]=s}),r}),r7=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.runsDataSource=r,this.experimentsWithStaleRunsOnRouteChange$=this.actions$.pipe(Zn(Na),It(this.store.select(Ho)),ri(([,o],[,a])=>Vo(o,a)),It(this.store.select(or)),Oe(([,o])=>!!o),q(([,o])=>o),xn(o=>this.getExperimentsWithLoadState(o,a=>a===Re.FAILED||a===Re.NOT_LOADED).pipe(q(a=>({experimentIds:o,experimentIdsToBeFetched:a}))))),this.experimentsWithStaleRunsOnReload$=this.actions$.pipe(Zn(ma,Ba),It(this.store.select(or)),Oe(([,o])=>!!o),q(([,o])=>o),xn(o=>this.getExperimentsWithLoadState(o,a=>a!==Re.LOADING).pipe(q(a=>({experimentIds:o,experimentIdsToBeFetched:a}))))),this.loadRunsOnNavigationOrReload$=_r(()=>tn(this.experimentsWithStaleRunsOnRouteChange$,this.experimentsWithStaleRunsOnReload$).pipe(It(this.store.select(Ho)),Oe(([,o])=>null!==o&&o.routeKind!==Cn.CARD),xn(([{experimentIds:o,experimentIdsToBeFetched:a}])=>this.fetchAllRunsList(o,a))),{dispatch:!1}),this.removeHparamFilterWhenColumnIsRemoved$=_r(()=>this.actions$.pipe(Zn(BS),Dt(({header:o})=>{o.type!==gt.HPARAM?o.type===gt.METRIC&&this.store.dispatch(fv({name:o.name})):this.store.dispatch(mv({name:o.name}))})),{dispatch:!1})}getRunsListLoadState(e){return this.store.select(Tv,{experimentId:e}).pipe(Lt(1))}getExperimentsWithLoadState(e,i){return Co(e.map(r=>this.getRunsListLoadState(r))).pipe(q(r=>e.filter((o,a)=>i(r[a].state))))}fetchAllRunsList(e,i){return $t({experimentIds:e,experimentIdsToBeFetched:i}).pipe(Dt(()=>{this.store.dispatch(PS({experimentIds:e,requestedExperimentIds:i}))}),xn(()=>{let r=new Set(i);return Co(e.map(a=>r.has(a)?this.fetchRunsForExperiment(a):this.maybeWaitForRunsAndGetRuns(a)))}),q(r=>{let o={},a=[];for(let s of r)a.push(...s.runs),s.fromRemote&&(o[s.experimentId]={runs:s.runs});return{newRuns:o,runsForAllExperiments:a}}),It(this.store.select(yu)),Dt(([r,o])=>{let{newRuns:a,runsForAllExperiments:s}=r;this.store.dispatch(Wf({experimentIds:e,newRuns:a,runsForAllExperiments:s,expNameByExpId:o}))}),co(r=>(this.store.dispatch(qf({experimentIds:e,requestedExperimentIds:i})),$t(null))),q(()=>null))}maybeWaitForRunsAndGetRuns(e){return this.store.select(Tv,{experimentId:e}).pipe(Oe(i=>i.state!==Re.LOADING),Lt(1),xn(i=>i.state===Re.FAILED?_l(new Error("Pending request failed")):$t(i)),It(this.store.select(Iu,{experimentId:e})),q(([,i])=>({fromRemote:!1,experimentId:e,runs:i})))}fetchRunsForExperiment(e){return this.runsDataSource.fetchRuns(e).pipe(q(i=>({fromRemote:!0,experimentId:e,runs:i})))}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(ES))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),{initialState:v0e,reducers:y0e}=_h({runColorOverrideForGroupBy:new Map,defaultRunColorIdForGroupBy:new Map,groupKeyToColorId:new Map,initialGroupBy:{key:Yn.RUN},userSetGroupByKey:null,colorGroupRegexString:"",regexFilter:""},{runIds:{},runIdToExpId:{},runMetadata:{},runsLoadState:{}},(n,t,e)=>Vo(t,e)?n:{...n,initialGroupBy:{key:e.routeKind===Cn.COMPARE_EXPERIMENT?Yn.EXPERIMENT:Yn.RUN}}),x0e=gr(v0e,ye(fu,(n,{routeKind:t,partialState:e})=>{if(t!==Cn.COMPARE_EXPERIMENT&&t!==Cn.EXPERIMENT)return n;let r=e.runs.groupBy,o=e.runs.regexFilter??"";if(!r&&!o)return n;let{colorGroupRegexString:a,userSetGroupByKey:s}=n;return r&&(a=r.key===Yn.REGEX||r.key===Yn.REGEX_BY_EXP?r.regexString:n.colorGroupRegexString,s=r.key??null),{...n,colorGroupRegexString:a,regexFilter:o,userSetGroupByKey:s}}),ye(PS,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Re.LOADING}:{lastLoadedTimeInMs:null,state:Re.LOADING};return{...n,runsLoadState:e}}),ye(Wf,(n,t)=>{let e={...n.runIds},i={...n.runMetadata},r={...n.runIdToExpId},o={...n.runsLoadState};for(let a of Object.keys(t.newRuns)){let{runs:s}=t.newRuns[a];e[a]=s.map(({id:l})=>l),o[a]={...o[a],lastLoadedTimeInMs:Date.now(),state:Re.LOADED};for(let l of s)i[l.id]={...l,hparams:null,metrics:null},r[l.id]=a}return{...n,runIds:e,runIdToExpId:r,runMetadata:i,runsLoadState:o}}),ye(qf,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Re.FAILED}:{lastLoadedTimeInMs:null,state:Re.FAILED};return{...n,runsLoadState:e}}),ye(Wf,(n,{runsForAllExperiments:t,expNameByExpId:e})=>{let i=new Map(n.groupKeyToColorId),r=new Map(n.defaultRunColorIdForGroupBy),o=n.initialGroupBy;null!==n.userSetGroupByKey&&(o=g1(n.userSetGroupByKey,n.colorGroupRegexString));let a=Ev(o,t,n.runIdToExpId,e);Object.entries(a.matches).forEach(([s,l])=>{let c=i.get(s)??i.size;i.set(s,c);for(let d of l)r.set(d.id,c)});for(let s of a.nonMatches)r.set(s.id,-1);return{...n,defaultRunColorIdForGroupBy:r,groupKeyToColorId:i}}),ye(Xf,(n,{experimentIds:t,groupBy:e,expNameByExpId:i})=>{let r=new Map,o=new Map(n.defaultRunColorIdForGroupBy),s=Ev(e,t.flatMap(c=>n.runIds[c]).map(c=>n.runMetadata[c]),n.runIdToExpId,i);Object.entries(s.matches).forEach(([c,d])=>{let u=r.get(c)??r.size;r.set(c,u);for(let p of d)o.set(p.id,u)});for(let c of s.nonMatches)o.set(c.id,-1);let l=e.key===Yn.REGEX||e.key===Yn.REGEX_BY_EXP?e.regexString:n.colorGroupRegexString;return{...n,colorGroupRegexString:l,userSetGroupByKey:e.key,defaultRunColorIdForGroupBy:o,groupKeyToColorId:r,runColorOverrideForGroupBy:new Map}}),ye(LS,(n,{runId:t,newColor:e})=>{let i=new Map(n.runColorOverrideForGroupBy);return i.set(t,e),{...n,runColorOverrideForGroupBy:i}}),ye(NS,(n,t)=>({...n,regexFilter:t.regexString}))),C0e=bh(x0e,y0e),{initialState:M0e,reducers:w0e}=_h({selectionState:new Map,runsTableHeaders:[{type:gt.RUN,name:"run",displayName:"Run",enabled:!0,sortable:!0,removable:!1,movable:!1,filterable:!1}],sortingInfo:{name:"run",order:Lr.ASCENDING}},{},(n,t,e)=>{if(!Vo(t,e)){if(e.routeKind===Cn.COMPARE_EXPERIMENT&&!n.runsTableHeaders.find(i=>"experimentAlias"===i.name)){let i=[...n.runsTableHeaders,{type:gt.CUSTOM,name:"experimentAlias",displayName:"Experiment",enabled:!0,movable:!1,sortable:!0}];return{...n,runsTableHeaders:i}}if(t?.routeKind===Cn.COMPARE_EXPERIMENT&&e.routeKind!==Cn.COMPARE_EXPERIMENT){let i=n.runsTableHeaders.filter(r=>"experimentAlias"!==r.name);return{...n,runsTableHeaders:i}}}return n}),S0e=gr(M0e,ye(Wf,(n,t)=>{let e=new Map(n.selectionState),i=t.runsForAllExperiments.length<=500;for(let r of t.runsForAllExperiments)e.has(r.id)||e.set(r.id,i);return{...n,selectionState:e}}),ye(kS,(n,{runId:t})=>{let e=new Map(n.selectionState);return e.set(t,!Boolean(e.get(t))),{...n,selectionState:e}}),ye(OS,(n,{runId:t})=>{let e=new Map;for(let i of n.selectionState.keys())e.set(i,t===i);return{...n,selectionState:e}}),ye(FS,(n,{runIds:t})=>{let e=new Map(n.selectionState),i=!t.every(r=>Boolean(e.get(r)));for(let r of t)e.set(r,i);return{...n,selectionState:e}}),ye(Z6,(n,{header:t,index:e})=>{let i=[...n.runsTableHeaders];return void 0===e?i.push(t):i.splice(e,0,t),{...n,runsTableHeaders:i}}),ye(BS,(n,{header:t})=>{let e=n.runsTableHeaders.filter(({name:i})=>i!==t.name);return{...n,runsTableHeaders:e}}),ye(K6,(n,{newHeaderOrder:t})=>({...n,runsTableHeaders:t})),ye(VS,(n,{sortingInfo:t})=>({...n,sortingInfo:t}))),E0e=bh(S0e,w0e);function o7(n,t){return ch({data:C0e,ui:E0e})(n,t)}function T0e(){return[{actionCreator:qf,alertFromAction:()=>({localizedMessage:"Failed to fetch runs"})}]}var E1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[wr.forFeature("runs",o7),to.forFeature([r7]),$6,Cc.registerAlertActions(T0e),RS]}),n})(),vd=(()=>(function(n){n.RUNS_CHANGED="experimental.RunsChanged",n.GET_RUNS="experimental.GetRuns",n.GET_URL_DATA="experimental.GetURLPluginData",n.DATA_RELOADED="experimental.DataReloaded"}(vd||(vd={})),vd))(),s7=new WeakMap,$f=new Set,r2=new Map,D1=new Map;function l7(n,t){return e=>{let i=D1.get(t),r=s7.get(i)||null;return n(r,e)}}window.addEventListener("message",n=>{if("experimental.bootstrap"!==n.data)return;let t=n.ports[0];if(!t)return;let e=n.source?n.source.frameElement:null;!e||function(n,t){let e=new class{constructor(t){this.port=t,this.id=0,this.responseWaits=new Map,this.listeners=new Map,this.port.addEventListener("message",e=>this.onMessage(e))}listen(t,e){this.listeners.set(t,e)}unlisten(t){this.listeners.delete(t)}async onMessage(t){let e=JSON.parse(t.data),i=e.type,r=e.id,o=e.payload,a=e.error;if(e.isReply){if(!this.responseWaits.has(r))return;let{resolve:u,reject:p}=this.responseWaits.get(r);return this.responseWaits.delete(r),void(a?p(new Error(a)):u(o))}let l=null,c=null;if(this.listeners.has(i)){let u=this.listeners.get(i);try{l=await u(o)}catch(p){c=p}}this.postMessage({type:i,id:r,payload:l,error:c,isReply:!0})}postMessage(t){this.port.postMessage(JSON.stringify(t))}sendMessage(t,e){let i=this.id++;return this.postMessage({type:t,id:i,payload:e,error:null,isReply:!1}),new Promise((o,a)=>{this.responseWaits.set(i,{resolve:o,reject:a})})}}(n);$f.add(e),D1.set(e,t),n.start();for(let[i,r]of r2){let o=l7(r,e);e.listen(i,o)}}(t,e)});var a2,eg=(()=>{class n{broadcast(e,i){return function(n,t){for(let i of $f)D1.get(i).isConnected||($f.delete(i),D1.delete(i));let e=[...$f].map(i=>i.sendMessage(n,t));return Promise.all(e)}(e,i)}listen(e,i){!function(n,t){r2.set(n,t);for(let e of $f){let i=l7(t,e);e.listen(n,i)}}(e,i)}unlisten(e){!function(n){r2.delete(n);for(let t of $f)t.unlisten(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),I1=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){this.ipc.listen(vd.GET_URL_DATA,e=>{if(!e)return;let i=`p.${e.pluginName}.`,r={},o=window.tensorboard.tf_storage.getUrlHashDict();for(let a in o)a.startsWith(i)&&(r[a.substring(i.length)]=o[a]);return r}),this.store.select(jf).pipe(Oe(e=>null!==e),ri()).subscribe(()=>{this.ipc.broadcast(vd.DATA_RELOADED,void 0)})}}return n.\u0275fac=function(e){return new(e||n)(O(eg),O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),A1=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){let e=this.store.select(or).pipe(xn(i=>i?In(i.map(o=>this.store.select(Iu,{experimentId:o}))).pipe(q(o=>o.flat()),ri((o,a)=>o.length===a.length&&o.every((s,l)=>a[l].id===s.id)),q(o=>o.map(({name:a})=>a))):$t([])));e.subscribe(i=>{this.ipc.broadcast(vd.RUNS_CHANGED,i)}),this.ipc.listen(vd.GET_RUNS,()=>e.pipe(Lt(1)).toPromise())}}return n.\u0275fac=function(e){return new(e||n)(O(eg),O(Ie))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),R1=(()=>{class n{constructor(e,i){i.init(),e.init()}registerPluginIframe(e,i){!function(n,t){s7.set(n,{pluginName:t})}(e,i)}}return n.\u0275fac=function(e){return new(e||n)(O(A1),O(I1))},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[eg,I1,A1],imports:[Nf,Qs,E1]}),n})(),tg=fe("[Alert] Alert Reported",{_as:"props",_p:void 0}),u7=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.alertActionModule=r,this.reportRegisteredActionAlerts$=_r(()=>this.actions$.pipe(Dt(o=>{let a=this.alertActionModule.getAlertFromAction(o);a&&this.store.dispatch(tg(a))})),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(Cc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),L0e=gr({latestAlert:null},ye(tg,(n,{localizedMessage:t,followupAction:e})=>{let i={localizedMessage:t,created:Date.now()};return e&&(i.followupAction=e),{...n,latestAlert:i}}));function p7(n,t){return L0e(n,t)}try{a2=typeof Intl<"u"&&Intl.v8BreakIterator}catch{a2=!1}var ng,kv,P1,wh,o2,Vn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?_w(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!a2)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(O(fc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),h7=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function s2(){if(ng)return ng;if("object"!=typeof document||!document)return ng=new Set(h7);let n=document.createElement("input");return ng=new Set(h7.filter(t=>(n.setAttribute("type",t),n.type===t)))}function za(n){return function(){if(null==kv&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>kv=!0}))}finally{kv=kv||!1}return kv}()?n:!!n.capture}function k1(){if(null==wh){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return wh=!1;if("scrollBehavior"in document.documentElement.style)wh=!0;else{let n=Element.prototype.scrollTo;wh=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return wh}function ig(){if("object"!=typeof document||!document)return 0;if(null==P1){let n=document.createElement("div"),t=n.style;n.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),P1=0,0===n.scrollLeft&&(n.scrollLeft=1,P1=0===n.scrollLeft?1:2),n.remove()}return P1}function Ov(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){let t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function bs(n){return n.composedPath?n.composedPath()[0]:n.target}function Fv(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Or(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}function vt(n){return null!=n&&"false"!=`${n}`}function mi(n,t=0){return function(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):t}function rg(n){return Array.isArray(n)?n:[n]}function qr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Ua(n){return n instanceof xe?n.nativeElement:n}var ag,g7=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),z0e=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){let i=Ua(e);return new Kt(r=>{let a=this._observeElement(i).subscribe(r);return()=>{a.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let i=new Ee,r=this._mutationObserverFactory.create(o=>i.next(o));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(O(g7))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),O1=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=mi(e),this._subscribe()}constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new F,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(Cr(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(z0e),C(xe),C(ot))},n.\u0275dir=Me({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),og=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[g7]}),n})(),b7=new Set,U0e=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):G0e}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function(n){if(!b7.has(n))try{ag||((ag=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(ag)),ag.sheet&&(ag.sheet.insertRule(`@media ${n} {body{ }}`,0),b7.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Vn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function G0e(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}var Nv=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new Ee}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return v7(rg(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let o=In(v7(rg(e)).map(a=>this._registerQuery(a).observable));return o=Kd(o.pipe(Lt(1)),o.pipe(os(1),Cr(0))),o.pipe(q(a=>{let s={matches:!1,breakpoints:{}};return a.forEach(({matches:l,query:c})=>{s.matches=s.matches||l,s.breakpoints[c]=l}),s}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),o={observable:new Kt(a=>{let s=l=>this._zone.run(()=>a.next(l));return i.addListener(s),()=>{i.removeListener(s)}}).pipe(kn(i),q(({matches:a})=>({query:e,matches:a})),it(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(O(U0e),O(ot))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function v7(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function L1(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}var E7="cdk-describedby-message",F1="cdk-describedby-host",d2=0,T7=(()=>{class n{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+d2++,this._document=e,this._id=$n($p)+"-"+d2++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;let o=l2(i,r);"string"!=typeof i?(x7(i,this._id),this._messageRegistry.set(o,{messageElement:i,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;let o=l2(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),"string"==typeof i){let a=this._messageRegistry.get(o);a&&0===a.referenceCount&&this._deleteMessageElement(o)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${F1}="${this._id}"]`);for(let i=0;i<e.length;i++)this._removeCdkDescribedByReferenceIds(e[i]),e[i].removeAttribute(F1);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,i){let r=this._document.createElement("div");x7(r,this._id),r.textContent=e,i&&r.setAttribute("role",i),this._createMessagesContainer(),this._messagesContainer.appendChild(r),this._messageRegistry.set(l2(e,i),{messageElement:r,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",i=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let o=0;o<i.length;o++)i[o].remove();let r=this._document.createElement("div");r.style.visibility="hidden",r.classList.add(e),r.classList.add("cdk-visually-hidden"),this._platform&&!this._platform.isBrowser&&r.setAttribute("platform","server"),this._document.body.appendChild(r),this._messagesContainer=r}_removeCdkDescribedByReferenceIds(e){let i=L1(e,"aria-describedby").filter(r=>0!=r.indexOf(E7));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let r=this._messageRegistry.get(i);(function(n,t,e){let i=L1(n,t);i.some(r=>r.trim()==e.trim())||(i.push(e.trim()),n.setAttribute(t,i.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(F1,this._id),r.referenceCount++}_removeMessageReference(e,i){let r=this._messageRegistry.get(i);r.referenceCount--,function(n,t,e){let r=L1(n,t).filter(o=>o!=e.trim());r.length?n.setAttribute(t,r.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(F1)}_isElementDescribedByMessage(e,i){let r=L1(e,"aria-describedby"),o=this._messageRegistry.get(i),a=o&&o.messageElement.id;return!!a&&-1!=r.indexOf(a)}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&"object"==typeof i)return!0;let r=null==i?"":`${i}`.trim(),o=e.getAttribute("aria-label");return!(!r||o&&o.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(Vn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function l2(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function x7(n,t){n.id||(n.id=`${E7}-${t}-${d2++}`)}var B1=class{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ee,this._typeaheadSubscription=En.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new Ee,this.change=new Ee,t instanceof Pa&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){let r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Dt(e=>this._pressedLetters.push(e)),Cr(t),Oe(()=>this._pressedLetters.length>0),q(()=>this._pressedLetters.join(""))).subscribe(e=>{let i=this._getItemsArray();for(let r=1;r<i.length+1;r++){let o=(this._activeItemIndex+r)%i.length,a=i[o];if(!this._skipPredicateFn(a)&&0===a.getLabel().toUpperCase().trim().indexOf(e)){this.setActiveItem(o);break}}this._pressedLetters=[]}),this}cancelTypeahead(){return this._pressedLetters=[],this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}withPageUpDown(t=!0,e=10){return this._pageUpAndDown={enabled:t,delta:e},this}setActiveItem(t){let e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){let e=t.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(o<a?o:a-1,-1);break}return;default:return void((r||Or(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){let e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){let e=this._getItemsArray();for(let i=1;i<=e.length;i++){let r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){let i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof Pa?this._items.toArray():this._items}},lg=class extends B1{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}},ku=class extends B1{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}},ug=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=function(n){try{return n.frameElement}catch{return null}}(function(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===C7(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=C7(e);return e.hasAttribute("contenteditable")?-1!==o:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==o:"video"===r?-1!==o&&(null!==o||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function(n){return!function(n){return function(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function(n){return function(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||D7(n))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(O(Vn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function D7(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function C7(n){if(!D7(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var Lv=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new class{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,i,r,o=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=0;i<e.length;i++){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=e.length-1;i>=0;i--){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Lt(1)).subscribe(t)}}(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(O(ug),O(ot),O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Bv(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function Vv(n){let t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}new te("FOCUS_TRAP_INERT_STRATEGY");var g_e=new te("cdk-input-modality-detector-options"),__e={ignoreKeys:[18,17,224,91,16]},sg=za({passive:!0,capture:!0}),b_e=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new xr(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(s=>s===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=bs(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs<650||(this._modality.next(Bv(a)?"keyboard":"mouse"),this._mostRecentTarget=bs(a))},this._onTouchstart=a=>{Vv(a)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=bs(a))},this._options={...__e,...o},this.modalityDetected=this._modality.pipe(os(1)),this.modalityChanged=this.modalityDetected.pipe(ri()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,sg),r.addEventListener("mousedown",this._onMousedown,sg),r.addEventListener("touchstart",this._onTouchstart,sg)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,sg),document.removeEventListener("mousedown",this._onMousedown,sg),document.removeEventListener("touchstart",this._onTouchstart,sg))}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(ot),O(Nt),O(g_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),v_e=new te("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),x_e=new te("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),C_e=0,Hv=(()=>{class n{constructor(e,i,r,o){this._ngZone=i,this._defaultOptions=o,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){let o,a,r=this._defaultOptions;return 1===i.length&&"number"==typeof i[0]?a=i[0]:[o,a]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==a&&r&&(a=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(s=>this._currentResolve=s)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof a&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o<i.length;o++)i[o].remove();return r.classList.add(e),r.classList.add("cdk-visually-hidden"),r.setAttribute("aria-atomic","true"),r.setAttribute("aria-live","polite"),r.id="cdk-live-announcer-"+C_e++,this._document.body.appendChild(r),r}_exposeAnnouncerToModals(e){let i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],a=o.getAttribute("aria-owns");a?-1===a.indexOf(e)&&o.setAttribute("aria-owns",a+" "+e):o.setAttribute("aria-owns",e)}}}return n.\u0275fac=function(e){return new(e||n)(O(v_e,8),O(ot),O(Nt),O(x_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),M_e=new te("cdk-focus-monitor-default-options"),N1=za({passive:!0,capture:!0}),fo=(()=>{class n{constructor(e,i,r,o,a){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Ee,this._rootNodeFocusAndBlurListener=s=>{for(let c=bs(s);c;c=c.parentElement)"focus"===s.type?this._onFocus(s,c):this._onBlur(s,c)},this._document=o,this._detectionMode=a?.detectionMode||0}monitor(e,i=!1){let r=Ua(e);if(!this._platform.isBrowser||1!==r.nodeType)return $t(null);let o=function(n){if(function(){if(null==o2){let n=typeof document<"u"?document.head:null;o2=!(!n||!n.createShadowRoot&&!n.attachShadow)}return o2}()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(r)||this._getDocument(),a=this._elementInfo.get(r);if(a)return i&&(a.checkChildren=!0),a.subject;let s={checkChildren:i,subject:new Ee,rootNode:o};return this._elementInfo.set(r,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(e){let i=Ua(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){let o=Ua(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([s,l])=>this._originChanged(s,i,l)):(this._setOrigin(i),"function"==typeof o.focus&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){let r=this._elementInfo.get(i),o=bs(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){let r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,N1),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,N1)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(it(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,N1),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,N1),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;let o=e.labels;if(o)for(let a=0;a<o.length;a++)if(o[a].contains(i))return!0;return!1}}return n.\u0275fac=function(e){return new(e||n)(O(ot),O(Vn),O(b_e),O(Nt,8),O(M_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),A7=(()=>{class n{constructor(e,i){this._elementRef=e,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new F}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(fo))},n.\u0275dir=Me({type:n,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]}),n})(),M7="cdk-high-contrast-black-on-white",w7="cdk-high-contrast-white-on-black",c2="cdk-high-contrast-active",h2=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=$n(Nv).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(c2,M7,w7),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();1===i?e.add(c2,M7):2===i&&e.add(c2,w7)}}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pg=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(O(h2))},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[og]}),n})(),w_e=new te("cdk-dir-doc",{providedIn:"root",factory:function(){return $n(Nt)}}),E_e=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,zi=(()=>{class n{constructor(e){this.value="ltr",this.change=new F,e&&(this.value=function(n){let t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?E_e.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(O(w_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Fu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),D_e=["text"];function I_e(n,t){if(1&n&&k(0,"mat-pseudo-checkbox",6),2&n){let e=w();b("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function A_e(n,t){1&n&&k(0,"mat-pseudo-checkbox",7),2&n&&b("disabled",w().disabled)}function R_e(n,t){if(1&n&&(f(0,"span",8),T(1),g()),2&n){let e=w();v(1),Ve("(",e.group.label,")")}}var P_e=[[["mat-icon"]],"*"],k_e=["mat-icon","*"],N7=(new Ml("15.2.9"),(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})()),L7=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})(),F_e=new te("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),dn=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!Fv()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(O(h2),O(F_e,8),O(Nt))},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Fu,Fu]}),n})();function ao(n){return class extends n{get disabled(){return this._disabled}set disabled(t){this._disabled=vt(t)}constructor(...t){super(...t),this._disabled=!1}}}function Ko(n,t){return class extends n{get color(){return this._color}set color(e){let i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...e){super(...e),this.defaultColor=t,this.color=t}}}function go(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=vt(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function Dc(n,t=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?mi(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function hg(n){return class extends n{updateErrorState(){let t=this.errorState,o=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);o!==t&&(this.errorState=o,this.stateChanges.next())}constructor(...t){super(...t),this.errorState=!1}}}function H1(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Kt(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}new te("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return $n(ad)}}),new te("mat-date-formats");var Eh=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),R7=za({passive:!0,capture:!0}),P7={enterDuration:225,exitDuration:150},k7=za({passive:!0,capture:!0}),O7=["mousedown","touchstart"],F7=["mouseup","mouseleave","touchend","touchcancel"],Sh=class{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Ua(i))}fadeInRipple(t,e,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...P7,...i.animation};i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let a=i.radius||function(n,t,e){let i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),s=t-r.left,l=e-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=s-a+"px",d.style.top=l-a+"px",d.style.height=2*a+"px",d.style.width=2*a+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),h=u.transitionDuration,m="none"===u.transitionProperty||"0s"===h||"0s, 0s"===h||0===r.width&&0===r.height,_=new class{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}(this,d,i,m);d.style.transform="scale3d(1, 1, 1)",_.state=0,i.persistent||(this._mostRecentTransientRipple=_);let M=null;return!m&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let y=()=>this._finishRippleTransition(_),x=()=>this._destroyRipple(_);d.addEventListener("transitionend",y),d.addEventListener("transitioncancel",x),M={onTransitionEnd:y,onTransitionCancel:x}}),this._activeRipples.set(_,M),(m||!c)&&this._finishRippleTransition(_),_}fadeOutRipple(t){if(2===t.state||3===t.state)return;let e=t.element,i={...P7,...t.config.animation};e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=Ua(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,O7.forEach(i=>{Sh._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{F7.forEach(e=>{this._triggerElement.addEventListener(e,this,k7)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==e&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){let e=Bv(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Vv(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){!this._isPointerDown||(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(O7.forEach(e=>Sh._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&F7.forEach(e=>t.removeEventListener(e,this,k7)))}};Sh._eventManager=new class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=bs(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,i,r){let o=this._events.get(e);if(o){let a=o.get(i);a?a.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,R7)})}removeHandler(t,e,i){let r=this._events.get(t);if(!r)return;let o=r.get(e);!o||(o.delete(i),0===o.size&&r.delete(e),0===r.size&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,R7)))}};var Th=new te("mat-ripple-global-options"),Ki=(()=>{class n{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(e,i,r,o,a){this._elementRef=e,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new Sh(this,i,e,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ot),C(Vn),C(Th,8),C(pi,8))},n.\u0275dir=Me({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),_a=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,dn]}),n})(),V_e=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(e){return new(e||n)(C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&nt("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),H_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn]}),n})(),Uv=new te("MAT_OPTION_PARENT_COMPONENT"),jv=(ao(class{}),new te("MatOptgroup")),z_e=0,zv=class{constructor(t,e=!1){this.source=t,this.isUserInput=e}},U_e=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=vt(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(e,i,r,o){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+z_e++,this.onSelectionChange=new F,this._stateChanges=new Ee}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){let r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!Or(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new zv(this,e))}}return n.\u0275fac=function(e){cs()},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&Ue(D_e,7),2&e){let r;be(r=ve())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),ja=(()=>{class n extends U_e{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(Uv,8),C(jv,8))},n.\u0275cmp=P({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,i){1&e&&A("click",function(){return i._selectViaInteraction()})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(wo("id",i.id),Be("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),nt("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[Xe],ngContentSelectors:k_e,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(fn(P_e),S(0,I_e,1,2,"mat-pseudo-checkbox",0),Tt(1),f(2,"span",1,2),Tt(4,1),g(),S(5,A_e,1,1,"mat-pseudo-checkbox",3),S(6,R_e,2,1,"span",4),k(7,"div",5)),2&e&&(b("ngIf",i.multiple),v(5),b("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),v(1),b("ngIf",i.group&&i.group._inert),v(1),b("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Ki,Ne,V_e],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})();function z1(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let a=0;a<n+1;a++)i[a].group&&i[a].group===r[o]&&o++;return o}return 0}function U1(n,t,e,i){return n<e?n:n+t>e+i?Math.max(0,n-i+t):e}var mg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[_a,De,dn,H_e]}),n})(),B7=["mat-button",""],g2=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],_2=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],b2=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",V7=["mat-icon-button",""],G_e=["*"],q_e=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],X_e=Ko(ao(go(class{constructor(n){this._elementRef=n}}))),v2=(()=>{class n extends X_e{constructor(e,i,r,o){super(e),this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=$n(fo),this._isFab=!1;let a=e.nativeElement.classList;for(let s of q_e)this._hasHostAttributes(s.selector)&&s.mdcClasses.forEach(l=>{a.add(l)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...e){return e.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(e){cs()},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&Ue(Ki,5),2&e){let r;be(r=ve())&&(i.ripple=r.first)}},features:[Xe]}),n})(),H7=(()=>{class n extends v2{constructor(e,i,r,o){super(e,i,r,o),this._haltDisabledEvents=a=>{this.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return n.\u0275fac=function(e){cs()},n.\u0275dir=Me({type:n,features:[Xe]}),n})(),ki=(()=>{class n extends v2{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(ot),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Xe],attrs:B7,ngContentSelectors:_2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(fn(g2),k(0,"span",0),Tt(1),f(2,"span",1),Tt(3,1),g(),Tt(4,2),k(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),b("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Ki],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),z7=(()=>{class n extends H7{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(ot),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[Xe],attrs:B7,ngContentSelectors:_2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(fn(g2),k(0,"span",0),Tt(1),f(2,"span",1),Tt(3,1),g(),Tt(4,2),k(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),b("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Ki],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',b2],encapsulation:2,changeDetection:0}),n})();new te("mat-mdc-fab-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});var Er=(()=>{class n extends v2{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(ot),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Xe],attrs:V7,ngContentSelectors:G_e,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(fn(),k(0,"span",0),Tt(1),k(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(v(3),b("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Ki],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',b2],encapsulation:2,changeDetection:0}),n})(),j7=(()=>{class n extends H7{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(ot),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["a","mat-icon-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[Xe],attrs:V7,ngContentSelectors:_2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(fn(g2),k(0,"span",0),Tt(1),f(2,"span",1),Tt(3,1),g(),Tt(4,2),k(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),b("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[Ki],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',b2],encapsulation:2,changeDetection:0}),n})(),Kn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,_a,dn]}),n})(),Gv=class{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}},Ll=class extends Gv{constructor(t,e,i,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}},To=class extends Gv{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},y2=class extends Gv{constructor(t){super(),this.element=t instanceof xe?t.nativeElement:t}},Nu=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Ll?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof To?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof y2?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Wv=class extends Nu{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=a=>{let s=a.element,l=this._document.createComment("dom-portal");s.parentNode.insertBefore(l,s),this.outletElement.appendChild(s),this._attachedPortal=a,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(s,l)})},this._document=o}attachComponentPortal(t){let r,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||wi.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},G7=(()=>{class n extends To{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(C(oi),C(ei))},n.\u0275dir=Me({type:n,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Xe]}),n})(),ba=(()=>{class n extends Nu{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new F,this.attachDomPortal=o=>{let a=o.element,s=this._document.createComment("dom-portal");o.setAttachedHost(this),a.parentNode.insertBefore(s,a),this._getRootNode().appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{s.parentNode&&s.parentNode.replaceChild(a,s)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),a=i.createComponent(o,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=e,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(C(ho),C(ei),C(Nt))},n.\u0275dir=Me({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Xe]}),n})(),Bl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),x2=class{},G1=class extends x2{constructor(t){super(),this._data=t}connect(){return P_(this._data)?this._data:$t(this._data)}disconnect(){}},W1=class{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(t,e,i,r,o){t.forEachOperation((a,s,l)=>{let c,d;null==a.previousIndex?(c=this._insertView(()=>i(a,s,l),l,e,r(a)),d=c?1:0):null==l?(this._detachAndCacheView(s,e),d=3):(c=this._moveView(s,l,e,r(a)),d=2),o&&o({context:c?.context,operation:d,record:a})})}detach(){for(let t of this._viewCache)t.destroy();this._viewCache=[]}_insertView(t,e,i,r){let o=this._insertViewFromCache(e,i);if(o)return void(o.context.$implicit=r);let a=t();return i.createEmbeddedView(a.templateRef,a.context,a.index)}_detachAndCacheView(t,e){let i=e.detach(t);this._maybeCacheView(i,e)}_moveView(t,e,i,r){let o=i.get(t);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{let i=e.indexOf(t);-1===i?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){let i=this._viewCache.pop();return i&&e.insert(i,t),i||null}},fg=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,i=!0,r){this._multiple=t,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Ee,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);let e=this.selected,i=new Set(t);t.forEach(o=>this._markSelected(o)),e.filter(o=>!i.has(o)).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();let e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(t){if(this.compareWith){for(let e of this._selection)if(this.compareWith(t,e))return e;return t}return t}},C2=new te("_ViewRepeater"),Q_e=["contentWrapper"],Z_e=["*"],Y7=new te("VIRTUAL_SCROLL_STRATEGY");function K_e(n){return n._scrollStrategy}var Q7=(()=>{class n{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new class{constructor(t,e,i){this._scrolledIndexChange=new Ee,this.scrolledIndexChange=this._scrolledIndexChange.pipe(ri()),this._viewport=null,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),a=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(a,r-l));a!=c&&(a=c,o=c*this._itemSize,e.start=Math.floor(a)),e.end=Math.max(0,Math.min(r,e.start+l))}let s=o-e.start*this._itemSize;if(s<this._minBufferPx&&0!=e.start){let l=Math.ceil((this._maxBufferPx-s)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(a+(i+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(o+i);if(l<this._minBufferPx&&e.end!=r){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(e.end=Math.min(r,e.end+c),e.start=Math.max(0,Math.floor(a-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(a))}}(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=mi(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=mi(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=mi(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},standalone:!0,features:[Vt([{provide:Y7,useFactory:K_e,deps:[Wn(()=>n)]}]),qt]}),n})(),Lu=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new Ee,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Kt(i=>{this._globalSubscription||this._addGlobalListener();let r=e>0?this._scrolled.pipe(nc(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):$t()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(Oe(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Ua(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Ei(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(O(ot),O(Vn),O(Nt,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),xd=(()=>{class n{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new Ee,this._elementScrolled=new Kt(a=>this.ngZone.runOutsideAngular(()=>Ei(this.elementRef.nativeElement,"scroll").pipe(it(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=ig()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==ig()?e.left=e.right:1==ig()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;k1()?i.scrollTo(e):(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;let a=this.dir&&"rtl"==this.dir.value;return"start"==e?e=a?r:i:"end"==e&&(e=a?i:r),a&&2==ig()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:a&&1==ig()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Lu),C(ot),C(zi,8))},n.\u0275dir=Me({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),Wa=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new Ee,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(nc(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(ot),O(Nt,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),q7=new te("VIRTUAL_SCROLLABLE"),ebe=(()=>{class n extends xd{constructor(e,i,r,o){super(e,i,r,o)}measureViewportSize(e){let i=this.elementRef.nativeElement;return"horizontal"===e?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Lu),C(ot),C(zi,8))},n.\u0275dir=Me({type:n,features:[Xe]}),n})(),nbe=typeof requestAnimationFrame<"u"?YA:Nm,gg=(()=>{class n extends ebe{get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=vt(e)}constructor(e,i,r,o,a,s,l,c){super(e,s,r,a),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this.scrollable=c,this._platform=$n(Vn),this._detachedSubject=new Ee,this._renderedRangeSubject=new Ee,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Kt(d=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=En.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){!this._platform.isBrowser||(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(kn(null),nc(0,nbe)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(it(this._detachedSubject)).subscribe(i=>{let r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function(n,t){return n.start==t.start&&n.end==t.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&"to-start"===i?0:e;let o="horizontal"==this.orientation,a=o?"X":"Y",l=`translate${a}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(l+=` translate${a}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){let r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i,r="left",o="right",a="rtl"==this.dir?.value;i="start"==e?a?o:r:"end"==e?a?r:o:e||("horizontal"===this.orientation?"left":"top");let s=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-s}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(ot),C(Y7,8),C(zi,8),C(Lu),C(Wa),C(q7,8))},n.\u0275cmp=P({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&Ue(Q_e,7),2&e){let r;be(r=ve())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&nt("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Vt([{provide:xd,useFactory:(t,e)=>t||e,deps:[[new ka,new cf(q7)],n]}]),Xe,Ak],ngContentSelectors:Z_e,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(fn(),f(0,"div",0,1),Tt(2),g(),k(3,"div",2)),2&e&&(v(3),Bt("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),n})();function X7(n,t,e){if(!e.getBoundingClientRect)return 0;let r=e.getBoundingClientRect();return"horizontal"===n?"start"===t?r.left:r.right:"start"===t?r.top:r.bottom}var Z7=(()=>{class n{get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function(n){return n&&"function"==typeof n.connect&&!(n instanceof D_)}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new G1(P_(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=mi(e)}constructor(e,i,r,o,a,s){this._viewContainerRef=e,this._template=i,this._differs=r,this._viewRepeater=o,this._viewport=a,this.viewChange=new Ee,this._dataSourceChanges=new Ee,this.dataStream=this._dataSourceChanges.pipe(kn(null),Yt((n,t)=>{let e,i=!1;n.subscribe(Ht(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))}),Jn(([l,c])=>this._changeDataSource(l,c)),Da(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new Ee,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(it(this._destroyed)).subscribe(l=>{this._renderedRange=l,this.viewChange.observers.length&&s.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,i){if(e.start>=e.end)return 0;let a,s,r=e.start-this._renderedRange.start,o=e.end-e.start;for(let l=0;l<o;l++){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=s=c.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){s=c.rootNodes[c.rootNodes.length-1];break}}return a&&s?X7(i,"end",s)-X7(i,"start",a):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):$t()}_updateContext(){let e=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,a,s)=>this._getEmbeddedViewArgs(o,s),o=>o.item),e.forEachIdentityChange(o=>{this._viewContainerRef.get(o.currentIndex).context.$implicit=o.item});let i=this._data.length,r=this._viewContainerRef.length;for(;r--;){let o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(oi),C(Tl),C(C2),C(gg,4),C(ot))},n.\u0275dir=Me({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},standalone:!0,features:[Vt([{provide:C2,useClass:W1}])]}),n})(),Ic=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),Cd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Fu,Ic,gg,Fu,Ic]}),n})(),K7=k1(),q1=class{enable(){}disable(){}attach(){}};function E2(n,t){return t.some(e=>n.bottom<e.top||n.top>e.bottom||n.right<e.left||n.left>e.right)}function J7(n,t){return t.some(e=>n.top<e.top||n.bottom>e.bottom||n.left<e.left||n.right>e.right)}var Ih=class{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();E2(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},ibe=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new q1,this.close=a=>new class{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(Oe(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new class{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=qr(-this._previousScrollPosition.left),t.style.top=qr(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,i=t.style,r=this._document.body.style,o=i.scrollBehavior||"",a=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),K7&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),K7&&(i.scrollBehavior=o,r.scrollBehavior=a)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}(this._viewportRuler,this._document),this.reposition=a=>new Ih(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=o}}return n.\u0275fac=function(e){return new(e||n)(O(Lu),O(Wa),O(ot),O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),el=class{constructor(t){if(this.scrollStrategy=new q1,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){let e=Object.keys(t);for(let i of e)void 0!==t[i]&&(this[i]=t[i])}}},i9=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(O(Nt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),rbe=(()=>{class n extends i9{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{let o=this._attachedOverlays;for(let a=o.length-1;a>-1;a--)if(o[a]._keydownEvents.observers.length>0){let s=o[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>s.next(r)):s.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(ot,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),obe=(()=>{class n extends i9{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=bs(o)},this._clickListener=o=>{let a=bs(o),s="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(a)||d.overlayElement.contains(s))break;let u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(e){if(super.add(e),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(Vn),O(ot,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),_g=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Fv()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let i=this._document.createElement("div");i.classList.add(e),Fv()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}}return n.\u0275fac=function(e){return new(e||n)(O(Nt),O(Vn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ac=class{constructor(t,e,i,r,o,a,s,l,c,d=!1){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=a,this._document=s,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._backdropElement=null,this._backdropClick=new Ee,this._attachments=new Ee,this._detachments=new Ee,this._locationChanges=En.EMPTY,this._backdropClickHandler=u=>this._backdropClick.next(u),this._backdropTransitionendHandler=u=>{this._disposeBackdrop(u.target)},this._keydownEvents=new Ee,this._outsidePointerEvents=new Ee,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Lt(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof e?.onDestroy&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config={...this._config,...t},this._updateElementSize()}setDirection(t){this._config={...this._config,direction:t},this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=qr(this._config.width),t.height=qr(this._config.height),t.minWidth=qr(this._config.minWidth),t.minHeight=qr(this._config.minHeight),t.maxWidth=qr(this._config.maxWidth),t.maxHeight=qr(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){let r=rg(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{let t=this._ngZone.onStable.pipe(it(tn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},$7="cdk-overlay-connected-position-bounding-box",abe=/([A-Za-z%]+)$/;function Dh(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function e9(n){if("number"!=typeof n&&null!=n){let[t,e]=n.split(abe);return e&&"px"!==e?null:parseFloat(t)}return n||null}function t9(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}var n9="cdk-global-overlay-wrapper",sbe=(()=>{class n{constructor(e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(n9),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:a,maxHeight:s}=i,l=!("100%"!==r&&"100vw"!==r||a&&"100%"!==a&&"100vw"!==a),c=!("100%"!==o&&"100vh"!==o||s&&"100%"!==s&&"100vh"!==s),d=this._xPosition,u=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction,h="",m="",_="";l?_="flex-start":"center"===d?(_="center",p?m=u:h=u):p?"left"===d||"end"===d?(_="flex-end",h=u):("right"===d||"start"===d)&&(_="flex-start",m=u):"left"===d||"start"===d?(_="flex-start",h=u):("right"===d||"end"===d)&&(_="flex-end",m=u),t.position=this._cssPosition,t.marginLeft=l?"0":h,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":m,e.justifyContent=_,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(n9),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}flexibleConnectedTo(e){return new class{get positions(){return this._preferredPositions}constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Ee,this._resizeSubscription=En.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add($7),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let a,t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];for(let s of this._preferredPositions){let l=this._getOriginPoint(t,r,s),c=this._getOverlayPoint(l,e,s),d=this._getOverlayFit(c,e,i,s);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,l);this._canFitWithFlexibleDimensions(d,c,i)?o.push({position:s,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,s)}):(!a||a.overlayFit.visibleArea<d.visibleArea)&&(a={overlayFit:d,overlayPoint:c,originPoint:l,position:s,overlayRect:e})}if(o.length){let s=null,l=-1;for(let c of o){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,s=c)}return this._isPushed=!1,void this._applyPosition(s.position,s.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(a.position,a.originPoint);this._applyPosition(a.position,a.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Dh(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove($7),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,o;if("center"==i.originX)r=t.left+t.width/2;else{let a=this._isRtl()?t.right:t.left,s=this._isRtl()?t.left:t.right;r="start"==i.originX?a:s}return e.left<0&&(r-=e.left),o="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r,o;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,o="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){let o=t9(e),{x:a,y:s}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(a+=l),c&&(s+=c);let p=0-s,h=s+o.height-i.height,m=this._subtractOverflows(o.width,0-a,a+o.width-i.width),_=this._subtractOverflows(o.height,p,h),M=m*_;return{visibleArea:M,isCompletelyWithinViewport:o.width*o.height===M,fitsInViewportVertically:_===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let r=i.bottom-e.y,o=i.right-e.x,a=e9(this._overlayRef.getConfig().minHeight),s=e9(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=a&&a<=r)&&(t.fitsInViewportHorizontally||null!=s&&s<=o)}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=t9(e),o=this._viewportRect,a=Math.max(t.x+r.width-o.width,0),s=Math.max(t.y+r.height-o.height,0),l=Math.max(o.top-i.top-t.y,0),c=Math.max(o.left-i.left-t.x,0),d=0,u=0;return d=r.width<=o.width?c||-a:t.x<this._viewportMargin?o.left-i.left-t.x:0,u=r.height<=o.height?l||-s:t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:d,y:u},{x:t.x+d,y:t.y+u}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){let i=this._getScrollVisibility(),r=new class{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}(t,i);this._positionChanges.next(r)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let i,e=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${i} ${r}`}_calculateBoundingBoxRect(t,e){let o,a,s,d,u,p,i=this._viewportRect,r=this._isRtl();if("top"===e.overlayY)a=t.y,o=i.height-a+this._viewportMargin;else if("bottom"===e.overlayY)s=i.height-t.y+2*this._viewportMargin,o=i.height-s+this._viewportMargin;else{let h=Math.min(i.bottom-t.y+i.top,t.y),m=this._lastBoundingBoxSize.height;o=2*h,a=t.y-h,o>m&&!this._isInitialRender&&!this._growAfterOpen&&(a=t.y-m/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)p=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)u=t.x,d=i.right-t.x;else{let h=Math.min(i.right-t.x+i.left,t.x),m=this._lastBoundingBoxSize.width;d=2*h,u=t.x-h,d>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-m/2)}return{top:a,left:u,bottom:s,right:p,width:d,height:o}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;r.height=qr(i.height),r.top=qr(i.top),r.bottom=qr(i.bottom),r.width=qr(i.width),r.left=qr(i.left),r.right=qr(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",o&&(r.maxHeight=qr(o)),a&&(r.maxWidth=qr(a))}this._lastBoundingBoxSize=i,Dh(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Dh(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Dh(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();Dh(i,this._getExactOverlayY(e,t,d)),Dh(i,this._getExactOverlayX(e,t,d))}else i.position="static";let s="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(s+=`translateX(${l}px) `),c&&(s+=`translateY(${c}px)`),i.transform=s.trim(),a.maxHeight&&(r?i.maxHeight=qr(a.maxHeight):o&&(i.maxHeight="")),a.maxWidth&&(r?i.maxWidth=qr(a.maxWidth):o&&(i.maxWidth="")),Dh(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":r.top=qr(o.y),r}_getExactOverlayX(t,e,i){let a,r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),a=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===a?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=qr(o.x),r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:J7(t,i),isOriginOutsideView:E2(t,i),isOverlayClipped:J7(e,i),isOverlayOutsideView:E2(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&rg(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof xe)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(O(Wa),O(Nt),O(Vn),O(_g))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lbe=0,Oi=(()=>{class n{constructor(e,i,r,o,a,s,l,c,d,u,p,h){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=a,this._injector=s,this._ngZone=l,this._document=c,this._directionality=d,this._location=u,this._outsideClickDispatcher=p,this._animationsModuleType=h}create(e){let i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),a=new el(e);return a.direction=a.direction||this._directionality.value,new Ac(o,i,r,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){let i=this._document.createElement("div");return i.id="cdk-overlay-"+lbe++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(gc)),new Wv(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(O(ibe),O(_g),O(ho),O(sbe),O(rbe),O(wi),O(ot),O(Nt),O(zi),O(Db),O(obe),O(pi,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),cbe=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r9=new te("cdk-connected-overlay-scroll-strategy"),Md=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275dir=Me({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),Vu=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=vt(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=vt(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=vt(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=vt(e)}get push(){return this._push}set push(e){this._push=vt(e)}constructor(e,i,r,o,a){this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=En.EMPTY,this._attachSubscription=En.EMPTY,this._detachSubscription=En.EMPTY,this._positionSubscription=En.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new F,this.positionChange=new F,this.attach=new F,this.detach=new F,this.overlayKeydown=new F,this.overlayOutsideClick=new F,this._templatePortal=new To(i,r),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=cbe);let e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!Or(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new el({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof Md?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(O_(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(Oi),C(oi),C(ei),C(r9),C(zi,8))},n.\u0275dir=Me({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[qt]}),n})(),ube={provide:r9,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},Do=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Oi,ube],imports:[Fu,Bl,Cd,Cd]}),n})();function pbe(n,t){if(1&n){let e=Te();f(0,"div",2)(1,"button",3),A("click",function(){return ne(e),ie(w().action())}),T(2),g()()}if(2&n){let e=w();v(2),Ve(" ",e.data.action," ")}}var hbe=["label"];function mbe(n,t){}var fbe=Math.pow(2,31)-1,Ah=class{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Ee,this._afterOpened=new Ee,this._onAction=new Ee,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,fbe))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},X1=new te("MatSnackBarData"),bg=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},gbe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),_be=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),bbe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),vbe=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(C(Ah),C(X1))},n.\u0275cmp=P({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(e,i){1&e&&(f(0,"div",0),T(1),g(),S(2,pbe,3,1,"div",1)),2&e&&(v(1),Ve(" ",i.data.message,"\n"),v(1),b("ngIf",i.hasAction))},dependencies:[Ne,ki,gbe,_be,bbe],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})(),ybe={snackBarState:fr("state",[Si("void, hidden",rn({transform:"scale(0.8)",opacity:0})),Si("visible",rn({transform:"scale(1)",opacity:1})),bi("* => visible",Mi("150ms cubic-bezier(0, 0, 0.2, 1)")),bi("* => void, * => hidden",Mi("75ms cubic-bezier(0.4, 0.0, 1, 1)",rn({opacity:0})))])},xbe=0,Cbe=(()=>{class n extends Nu{constructor(e,i,r,o,a){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=a,this._document=$n(Nt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ee,this._onExit=new Ee,this._onEnter=new Ee,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+xbe++,this.attachDomPortal=s=>{this._assertNotAttached();let l=this._portalOutlet.attachDomPortal(s);return this._afterPortalAttached(),l},this._live="assertive"!==a.politeness||a.announcementMessage?"off"===a.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){let{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){let o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Lt(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){let e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i)),this._exposeToModals()}_exposeToModals(){let e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],a=o.getAttribute("aria-owns");this._trackedModals.add(o),a?-1===a.indexOf(e)&&o.setAttribute("aria-owns",a+" "+e):o.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let i=e.getAttribute("aria-owns");if(i){let r=i.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(C(ot),C(xe),C(Qt),C(Vn),C(bg))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&Ue(ba,7),2&e){let r;be(r=ve())&&(i._portalOutlet=r.first)}},features:[Xe]}),n})(),Mbe=(()=>{class n extends Cbe{_afterPortalAttached(){super._afterPortalAttached();let e=this._label.nativeElement,i="mdc-snackbar__label";e.classList.toggle(i,!e.querySelector(`.${i}`))}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,i){if(1&e&&Ue(hbe,7),2&e){let r;be(r=ve())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,i){1&e&&UM("@state.done",function(o){return i.onAnimationEnd(o)}),2&e&&WM("@state",i._animationState)},features:[Xe],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1,2)(3,"div",3),S(4,mbe,0,0,"ng-template",4),g(),k(5,"div"),g()()),2&e&&(v(5),Be("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[ba],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[ybe.snackBarState]}}),n})(),A2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Do,Bl,De,Kn,dn,dn]}),n})(),o9=new te("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new bg}}),Sbe=(()=>{class n{get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(e,i,r,o,a,s){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){let o={...this._defaultConfig,...r};return o.data={message:e,action:i},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){let o=wi.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:bg,useValue:i}]}),a=new Ll(this.snackBarContainerComponent,i.viewContainerRef,o),s=e.attach(a);return s.instance.snackBarConfig=i,s.instance}_attach(e,i){let r={...new bg,...this._defaultConfig,...i},o=this._createOverlay(r),a=this._attachSnackBarContainer(o,r),s=new Ah(a,o);if(e instanceof oi){let l=new To(e,null,{$implicit:r.data,snackBarRef:s});s.instance=a.attachTemplatePortal(l)}else{let l=this._createInjector(r,s),c=new Ll(e,void 0,l),d=a.attachComponentPortal(c);s.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(it(o.detachments())).subscribe(l=>{o.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(s,r),this._openedSnackBarRef=s,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){let i=new el;i.direction=e.direction;let r=this._overlay.position().global(),o="rtl"===e.direction,a="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!o||"end"===e.horizontalPosition&&o,s=!a&&"center"!==e.horizontalPosition;return a?r.left("0"):s?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return wi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:Ah,useValue:i},{provide:X1,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(O(Oi),O(Hv),O(wi),O(Nv),O(n,12),O(o9))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),a9=(()=>{class n extends Sbe{constructor(e,i,r,o,a,s){super(e,i,r,o,a,s),this.simpleSnackBarComponent=vbe,this.snackBarContainerComponent=Mbe,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(O(Oi),O(Hv),O(wi),O(Nv),O(n,12),O(o9))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:A2}),n})(),Ebe=/[\\^$.*+?()[\]{}|]/g,l9="\\u0000-\\u0020\\u007f-\\u009f",Dbe=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+l9+'"]{2,}[^\\s'+l9+"\"')}\\],:;.!?]","gu");function d9(n){return function(n,t){t.flags.includes("g")||(t=new RegExp(t,t.flags+"g"));let e=[],i=0;for(let r of n.matchAll(t)){let o=r.index,a=r[0];o>i&&e.push({index:i,text:n.substring(i,o),matchesRegex:!1}),e.push({index:o,text:a,matchesRegex:!0}),i=o+a.length}return n.length>i&&e.push({index:i,text:n.substring(i,n.length),matchesRegex:!1}),e}(n,Dbe).map(({matchesRegex:t,text:e})=>({isURL:t,text:e}))}function Ibe(n,t){if(1&n&&(Gt(0),T(1),Wt()),2&n){let e=w().$implicit;v(1),Ve(" ",e.text," ")}}function Abe(n,t){if(1&n&&(f(0,"a",7),T(1),g()),2&n){let e=w().$implicit;Zi("href",e.text,Vs),v(1),kt(e.text)}}function Rbe(n,t){if(1&n&&(Gt(0),S(1,Ibe,2,1,"ng-container",5),S(2,Abe,2,2,"ng-template",null,6,jt),Wt()),2&n){let e=t.$implicit,i=st(3);v(1),b("ngIf",!e.isURL)("ngIfElse",i)}}function Pbe(n,t){if(1&n){let e=Te();f(0,"button",8),A("click",function(){return ne(e),ie(w().onActionButtonClicked())}),T(1),g()}if(2&n){let e=w();v(1),Ve(" ",e.alert.followupAction.localizedLabel," ")}}var u9=(()=>{class n{constructor(e,i,r){this.snackBarRef=e,this.unknownData=i,this.store=r,this.splitByURL=d9,this.alert=i}async onActionButtonClicked(){this.snackBarRef.dismiss();let e=await this.alert.followupAction.getFollowupAction();this.store.dispatch(e)}onCloseButtonClicked(){this.snackBarRef.dismiss()}}return n.\u0275fac=function(e){return new(e||n)(C(Ah),C(X1),C(Ie))},n.\u0275cmp=P({type:n,selectors:[["alert-display-snackbar"]],decls:6,vars:2,consts:function(){let t;return t=$localize`:A button to close the snackbar message␟ea4d9fe61420a3fce81cf54c4c615e3c19c646a6␟1536087519743707362:Dismiss`,[[1,"message"],[4,"ngFor","ngForOf"],[1,"controls"],["mat-button","","class","followup-button",3,"click",4,"ngIf"],["mat-button","","aria-label",t,1,"dismiss-button",3,"click"],[4,"ngIf","ngIfElse"],["linkPiece",""],["rel","noreferrer noopener","target","_blank",3,"href"],["mat-button","",1,"followup-button",3,"click"]]},template:function(e,i){1&e&&(f(0,"div",0),S(1,Rbe,4,2,"ng-container",1),g(),f(2,"div",2),S(3,Pbe,2,1,"button",3),f(4,"button",4),A("click",function(){return i.onCloseButtonClicked()}),T(5," Dismiss "),g()()),2&e&&(v(1),b("ngForOf",i.splitByURL(i.alert.localizedMessage)),v(2),b("ngIf",i.alert.followupAction))},dependencies:[nn,Ne,ki],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap}.message[_ngcontent-%COMP%]{font-size:14px;align-self:center;margin:5px 0;word-break:break-word}.message[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:inherit}.controls[_ngcontent-%COMP%]{white-space:nowrap;margin-left:auto}button.mat-mdc-button[_ngcontent-%COMP%]{color:inherit;text-transform:uppercase}"],changeDetection:0}),n})(),p9=(()=>{class n{constructor(e,i){this.store=e,this.snackBar=i,this.ngUnsubscribe=new Ee}ngOnInit(){this.store.select(eW).pipe(it(this.ngUnsubscribe),Oe(e=>Boolean(e))).subscribe(e=>{this.showAlert(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}showAlert(e){this.snackBar.openFromComponent(u9,{duration:5e3,horizontalPosition:"start",verticalPosition:"bottom",data:e})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(a9))},n.\u0275cmp=P({type:n,selectors:[["alert-snackbar"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Y1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Kn,A2]}),n})(),Q1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Cc,Y1,wr.forFeature("alerts",p7),to.forFeature([u7])]}),n})();function Obe(n,t){}var Rh=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}},P2=(()=>{class n extends Nu{constructor(e,i,r,o,a,s,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=a,this._ngZone=s,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();let u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){let e=this._config.restoreFocus,i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){let r=Ov(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,i=Ov();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Ov())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Lv),C(Nt,8),C(Rh),C(ug),C(ot),C(Ac),C(fo))},n.\u0275cmp=P({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&Ue(ba,7),2&e){let r;be(r=ve())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&Be("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[Xe],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&S(0,Obe,0,0,"ng-template",0)},dependencies:[ba],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})(),qv=class{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Ee,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!Or(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{!1!==e.closeOnOverlayDetachments&&this.close()})}close(t,e){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},h9=new te("DialogScrollStrategy"),Fbe=new te("DialogData"),Nbe=new te("DefaultDialogConfig"),Bbe={provide:h9,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.block()}},Vbe=0,k2=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,o,a,s){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ee,this._afterOpenedAtThisLevel=new Ee,this._ariaHiddenElements=new Map,this.afterAllClosed=is(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(kn(void 0))),this._scrollStrategy=s}open(e,i){(i={...this._defaultOptions||new Rh,...i}).id=i.id||"cdk-dialog-"+Vbe++,i.id&&this.getDialogById(i.id);let o=this._getOverlayConfig(i),a=this._overlay.create(o),s=new qv(a,i),l=this._attachContainer(a,s,i);return s.containerInstance=l,this._attachDialogContent(e,s,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.closed.subscribe(()=>this._removeOpenDialog(s,!0)),this.afterOpened.next(s),s}closeAll(){R2(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){R2(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),R2(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new el({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){let s,o=r.injector||r.viewContainerRef?.injector,a=[{provide:Rh,useValue:r},{provide:qv,useValue:i},{provide:Ac,useValue:e}];r.container?"function"==typeof r.container?s=r.container:(s=r.container.type,a.push(...r.container.providers(r))):s=P2;let l=new Ll(s,r.viewContainerRef,wi.create({parent:o||this._injector,providers:a}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,i,r,o){if(e instanceof oi){let a=this._createInjector(o,i,r,void 0),s={$implicit:o.data,dialogRef:i};o.templateContext&&(s={...s,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new To(e,null,s,a))}else{let a=this._createInjector(o,i,r,this._injector),s=r.attachComponentPortal(new Ll(e,o.viewContainerRef,a,o.componentFactoryResolver));i.componentInstance=s.instance}}_createInjector(e,i,r,o){let a=e.injector||e.viewContainerRef?.injector,s=[{provide:Fbe,useValue:e.data},{provide:qv,useValue:i}];return e.providers&&("function"==typeof e.providers?s.push(...e.providers(i,e,r)):s.push(...e.providers)),e.direction&&(!a||!a.get(zi,null,{optional:!0}))&&s.push({provide:zi,useValue:{value:e.direction,change:$t()}}),wi.create({parent:a||o,providers:s})}_removeOpenDialog(e,i){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,a)=>{o?a.setAttribute("aria-hidden",o):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){let o=i[r];o!==e&&"SCRIPT"!==o.nodeName&&"STYLE"!==o.nodeName&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(O(Oi),O(wi),O(Nbe,8),O(n,12),O(_g),O(h9))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function R2(n,t){let e=n.length;for(;e--;)t(n[e])}var m9=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[k2,Bbe],imports:[Do,Bl,pg,Bl]}),n})();function Hbe(n,t){}var vg=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},O2="mdc-dialog--open",f9="mdc-dialog--opening",g9="mdc-dialog--closing",jbe=(()=>{class n extends P2{constructor(e,i,r,o,a,s,l,c){super(e,i,r,o,a,s,l,c),this._animationStateChanged=new F}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Lv),C(Nt,8),C(vg),C(ug),C(ot),C(Ac),C(fo))},n.\u0275cmp=P({type:n,selectors:[["ng-component"]],features:[Xe],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),_9="--mat-dialog-transition-duration";function b9(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?mi(n.substring(0,n.length-2)):n.endsWith("s")?1e3*mi(n.substring(0,n.length-1)):"0"===n?0:null}var Gbe=(()=>{class n extends jbe{constructor(e,i,r,o,a,s,l,c,d){super(e,i,r,o,a,s,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?b9(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?b9(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(_9,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(f9,O2)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(O2),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(O2),this._animationsEnabled?(this._hostElement.style.setProperty(_9,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(g9)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(f9,g9)}_waitForAnimationToComplete(e,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Lv),C(Nt,8),C(vg),C(ug),C(ot),C(Ac),C(pi,8),C(fo))},n.\u0275cmp=P({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,i){2&e&&(wo("id",i._config.id),Be("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),nt("_mat-animation-noopable",!i._animationsEnabled))},features:[Xe],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1),S(2,Hbe,0,0,"ng-template",2),g()())},dependencies:[ba],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})(),Vl=class{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new Ee,this._beforeClosed=new Ee,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(Oe(r=>"opened"===r.state),Lt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(Oe(r=>"closed"===r.state),Lt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),tn(this.backdropClick(),this.keydownEvents().pipe(Oe(r=>27===r.keyCode&&!this.disableClose&&!Or(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),y9(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(Oe(e=>"closing"===e.state),Lt(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function y9(n,t,e){return n._closeInteractionType=t,n.close(e)}var Xv=new te("MatMdcDialogData"),Wbe=new te("mat-mdc-dialog-default-options"),x9=new te("mat-mdc-dialog-scroll-strategy"),Xbe={provide:x9,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.block()}},Ybe=0,Qbe=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,i,r,o,a,s,l,c,d,u){this._overlay=e,this._defaultOptions=r,this._parentDialog=o,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ee,this._afterOpenedAtThisLevel=new Ee,this._idPrefix="mat-dialog-",this.dialogConfigClass=vg,this.afterAllClosed=is(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(kn(void 0))),this._scrollStrategy=s,this._dialog=i.get(k2)}open(e,i){let r;(i={...this._defaultOptions||new vg,...i}).id=i.id||`${this._idPrefix}${Ybe++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Rh,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(a,s,l)=>(r=new this._dialogRefConstructor(a,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:s.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(r);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){cs()},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),ys=(()=>{class n extends Qbe{constructor(e,i,r,o,a,s,l,c){super(e,i,o,s,l,a,Vl,Gbe,Xv,c),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(e){return new(e||n)(O(Oi),O(wi),O(Db,8),O(Wbe,8),O(x9),O(n,12),O(_g),O(pi,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Zbe=0,Z1=(()=>{class n{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=M9(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){y9(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(e){return new(e||n)(C(Vl,8),C(xe),C(ys))},n.\u0275dir=Me({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&A("click",function(o){return i._onButtonClick(o)}),2&e&&Be("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[qt]}),n})(),C9=(()=>{class n{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+Zbe++}ngOnInit(){this._dialogRef||(this._dialogRef=M9(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{let e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(e){return new(e||n)(C(Vl,8),C(xe),C(ys))},n.\u0275dir=Me({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,i){2&e&&wo("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),K1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),J1=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function M9(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}var Hu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[ys,Xbe],imports:[m9,Do,Bl,dn,dn]}),n})(),v9={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},Kbe=(fr("dialogContainer",[Si("void, exit",rn({opacity:0,transform:"scale(0.7)"})),Si("enter",rn({transform:"none"})),bi("* => enter",Lb([Mi("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",rn({transform:"none",opacity:1})),rh("@*",ih(),{optional:!0})]),v9),bi("* => void, * => exit",Lb([Mi("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",rn({opacity:0})),rh("@*",ih(),{optional:!0})]),v9)]),["matFormFieldNotchedOutline",""]),Jbe=["*"],$be=["textField"],eve=["iconPrefixContainer"],tve=["textPrefixContainer"];function nve(n,t){1&n&&k(0,"span",19)}function ive(n,t){if(1&n){let e=Te();f(0,"label",17),A("cdkObserveContent",function(){return ne(e),ie(w(2)._refreshOutlineNotchWidth())}),Tt(1,1),S(2,nve,1,0,"span",18),g()}if(2&n){let e=w(2);b("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Be("for",e._control.id)("aria-owns",e._control.id),v(2),b("ngIf",!e.hideRequiredMarker&&e._control.required)}}function rve(n,t){1&n&&S(0,ive,3,6,"label",16),2&n&&b("ngIf",w()._hasFloatingLabel())}function ove(n,t){1&n&&k(0,"div",20)}function ave(n,t){}function sve(n,t){1&n&&S(0,ave,0,0,"ng-template",22),2&n&&(w(2),b("ngTemplateOutlet",st(1)))}function lve(n,t){if(1&n&&(f(0,"div",21),S(1,sve,1,1,"ng-template",9),g()),2&n){let e=w();b("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),v(1),b("ngIf",!e._forceDisplayInfixLabel())}}function cve(n,t){1&n&&(f(0,"div",23,24),Tt(2,2),g())}function dve(n,t){1&n&&(f(0,"div",25,26),Tt(2,3),g())}function uve(n,t){}function pve(n,t){1&n&&S(0,uve,0,0,"ng-template",22),2&n&&(w(),b("ngTemplateOutlet",st(1)))}function hve(n,t){1&n&&(f(0,"div",27),Tt(1,4),g())}function mve(n,t){1&n&&(f(0,"div",28),Tt(1,5),g())}function fve(n,t){1&n&&k(0,"div",29)}function gve(n,t){1&n&&(f(0,"div",30),Tt(1,6),g()),2&n&&b("@transitionMessages",w()._subscriptAnimationState)}function _ve(n,t){if(1&n&&(f(0,"mat-hint",34),T(1),g()),2&n){let e=w(2);b("id",e._hintLabelId),v(1),kt(e.hintLabel)}}function bve(n,t){if(1&n&&(f(0,"div",31),S(1,_ve,2,2,"mat-hint",32),Tt(2,7),k(3,"div",33),Tt(4,8),g()),2&n){let e=w();b("@transitionMessages",e._subscriptAnimationState),v(1),b("ngIf",e.hintLabel)}}var vve=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],yve=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"],nl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-label"]]}),n})(),xve=0,P9=new te("MatError"),k9=(()=>{class n{constructor(e,i){this.id="mat-mdc-error-"+xve++,e||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(e){return new(e||n)(Mo("aria-live"),C(xe))},n.\u0275dir=Me({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(e,i){2&e&&wo("id",i.id)},inputs:{id:"id"},features:[Vt([{provide:P9,useExisting:n}])]}),n})(),Cve=0,w9=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+Cve++}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(e,i){2&e&&(wo("id",i.id),Be("align",null),nt("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})(),O9=new te("MatPrefix"),F9=(()=>{class n{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Vt([{provide:O9,useExisting:n}])]}),n})(),Mve=new te("MatSuffix"),S9=(()=>{class n{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function(n){if(null!==n.offsetParent)return n.scrollWidth;let e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275dir=Me({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})(),E9="mdc-line-ripple--active",$1="mdc-line-ripple--deactivating",T9=(()=>{class n{constructor(e,i){this._elementRef=e,this._handleTransitionEnd=r=>{let o=this._elementRef.nativeElement.classList,a=o.contains($1);"opacity"===r.propertyName&&a&&o.remove(E9,$1)},i.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove($1),e.add(E9)}deactivate(){this._elementRef.nativeElement.classList.add($1)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ot))},n.\u0275dir=Me({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),D9=(()=>{class n{constructor(e,i){this._elementRef=e,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ot))},n.\u0275cmp=P({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:Kbe,ngContentSelectors:Jbe,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(e,i){1&e&&(fn(),k(0,"div",0),f(1,"div",1),Tt(2),g(),k(3,"div",2)),2&e&&(v(1),Bt("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})(),Sve={transitionMessages:fr("transitionMessages",[Si("enter",rn({opacity:1,transform:"translateY(0%)"})),bi("void => enter",[rn({opacity:0,transform:"translateY(-5px)"}),Mi("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Yv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n}),n})(),Ph=new te("MatFormField"),Eve=new te("MAT_FORM_FIELD_DEFAULT_OPTIONS"),I9=0,Pc=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vt(e)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(e){let i=this._appearance;this._appearance=e||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}constructor(e,i,r,o,a,s,l,c){this._elementRef=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=o,this._platform=a,this._defaults=s,this._animationMode=l,this._document=c,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+I9++,this._hintLabelId="mat-mdc-hint-"+I9++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ee,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,s&&(s.appearance&&(this.appearance=s.appearance),this._hideRequiredMarker=Boolean(s?.hideRequiredMarker),s.color&&(this.color=s.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){let e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${e.controlType}`),e.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(it(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),tn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(it(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(it(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){let i=this._hintChildren?this._hintChildren.find(o=>"start"===o.align):null,r=this._hintChildren?this._hintChildren.find(o=>"end"===o.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(e.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);let i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=i?.getBoundingClientRect().width??0,a=r?.getBoundingClientRect().width??0;e.style.transform=`var(\n        --mat-mdc-form-field-label-transform,\n        translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${o+a}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n    )`}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(ot),C(zi),C(Vn),C(Eve,8),C(pi,8),C(Nt))},n.\u0275cmp=P({type:n,selectors:[["mat-form-field"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,nl,5),Bn(r,nl,7),Bn(r,Yv,5),Bn(r,O9,5),Bn(r,Mve,5),Bn(r,P9,5),Bn(r,w9,5)),2&e){let o;be(o=ve())&&(i._labelChildNonStatic=o.first),be(o=ve())&&(i._labelChildStatic=o.first),be(o=ve())&&(i._formFieldControl=o.first),be(o=ve())&&(i._prefixChildren=o),be(o=ve())&&(i._suffixChildren=o),be(o=ve())&&(i._errorChildren=o),be(o=ve())&&(i._hintChildren=o)}},viewQuery:function(e,i){if(1&e&&(Ue($be,5),Ue(eve,5),Ue(tve,5),Ue(S9,5),Ue(D9,5),Ue(T9,5)),2&e){let r;be(r=ve())&&(i._textField=r.first),be(r=ve())&&(i._iconPrefixContainer=r.first),be(r=ve())&&(i._textPrefixContainer=r.first),be(r=ve())&&(i._floatingLabel=r.first),be(r=ve())&&(i._notchedOutline=r.first),be(r=ve())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,i){2&e&&nt("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Vt([{provide:Ph,useExisting:n}])],ngContentSelectors:yve,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(e,i){1&e&&(fn(vve),S(0,rve,1,1,"ng-template",null,0,jt),f(2,"div",1,2),A("click",function(o){return i._control.onContainerClick&&i._control.onContainerClick(o)}),S(4,ove,1,0,"div",3),f(5,"div",4),S(6,lve,2,3,"div",5),S(7,cve,3,0,"div",6),S(8,dve,3,0,"div",7),f(9,"div",8),S(10,pve,1,1,"ng-template",9),Tt(11),g(),S(12,hve,2,0,"div",10),S(13,mve,2,0,"div",11),g(),S(14,fve,1,0,"div",12),g(),f(15,"div",13),S(16,gve,2,1,"div",14),S(17,bve,5,2,"div",15),g()),2&e&&(v(2),nt("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),v(2),b("ngIf",!i._hasOutline()&&!i._control.disabled),v(2),b("ngIf",i._hasOutline()),v(1),b("ngIf",i._hasIconPrefix),v(1),b("ngIf",i._hasTextPrefix),v(2),b("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),v(2),b("ngIf",i._hasTextSuffix),v(1),b("ngIf",i._hasIconSuffix),v(1),b("ngIf",!i._hasOutline()),v(1),nt("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),b("ngSwitch",i._getDisplayedMessages()),v(1),b("ngSwitchCase","error"),v(1),b("ngSwitchCase","hint"))},dependencies:[Ne,eo,mr,kr,O1,w9,S9,D9,T9],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[Sve.transitionMessages]},changeDetection:0}),n})(),Qv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,De,og,dn]}),n})(),j9=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(C(dc),C(xe))},n.\u0275dir=Me({type:n}),n})(),kh=(()=>{class n extends j9{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,features:[Xe]}),n})(),Xr=new te("NgValueAccessor"),Ive={provide:Xr,useExisting:Wn(()=>Ave),multi:!0},Ave=(()=>{class n extends kh{writeValue(e){this.setProperty("checked",e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&A("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Vt([Ive]),Xe]}),n})(),Rve={provide:Xr,useExisting:Wn(()=>Uu),multi:!0},kve=new te("CompositionEventMode"),Uu=(()=>{class n extends j9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){let n=Al()?Al().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(C(dc),C(xe),C(kve,8))},n.\u0275dir=Me({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&A("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Vt([Rve]),Xe]}),n})(),Ove=!1;function zu(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function G9(n){return null!=n&&"number"==typeof n.length}var Io=new te("NgValidators"),ju=new te("NgAsyncValidators"),Fve=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,il=class{static min(t){return W9(t)}static max(t){return q9(t)}static required(t){return X9(t)}static requiredTrue(t){return Y9(t)}static email(t){return Q9(t)}static minLength(t){return Z9(t)}static maxLength(t){return K9(t)}static pattern(t){return J9(t)}static nullValidator(t){return null}static compose(t){return rq(t)}static composeAsync(t){return oq(t)}};function W9(n){return t=>{if(zu(t.value)||zu(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function q9(n){return t=>{if(zu(t.value)||zu(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function X9(n){return zu(n.value)?{required:!0}:null}function Y9(n){return!0===n.value?null:{required:!0}}function Q9(n){return zu(n.value)||Fve.test(n.value)?null:{email:!0}}function Z9(n){return t=>zu(t.value)||!G9(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function K9(n){return t=>G9(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function J9(n){if(!n)return tE;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(zu(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function tE(n){return null}function $9(n){return null!=n}function eq(n){let t=Cf(n)?Jr(n):n;if(Ove&&!Ik(t)){let e="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(e+=" Are you using a synchronous validator where an async validator is expected?"),new xt(-1101,e)}return t}function tq(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function nq(n,t){return t.map(e=>e(n))}function iq(n){return n.map(t=>function(n){return!n.validate}(t)?t:e=>t.validate(e))}function rq(n){if(!n)return null;let t=n.filter($9);return 0==t.length?null:function(e){return tq(nq(e,t))}}function B2(n){return null!=n?rq(iq(n)):null}function oq(n){if(!n)return null;let t=n.filter($9);return 0==t.length?null:function(e){return Co(nq(e,t).map(eq)).pipe(q(tq))}}function V2(n){return null!=n?oq(iq(n)):null}function N9(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function aq(n){return n._rawValidators}function sq(n){return n._rawAsyncValidators}function F2(n){return n?Array.isArray(n)?n:[n]:[]}function nE(n,t){return Array.isArray(n)?n.includes(t):n===t}function L9(n,t){let e=F2(t);return F2(n).forEach(r=>{nE(e,r)||e.push(r)}),e}function B9(n,t){return F2(t).filter(e=>!nE(n,e))}var iE=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=B2(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=V2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}},Jo=class extends iE{get formDirective(){return null}get path(){return null}},qa=class extends iE{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},N2=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},xg=(()=>{class n extends N2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(C(qa,2))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&nt("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Xe]}),n})();function lq(n,t){return n?`with name: '${t}'`:`at index: ${t}`}var L2=!1,Kv="VALID",eE="INVALID",yg="PENDING",Jv="DISABLED";function cq(n){return(cE(n)?n.validators:n)||null}function dq(n,t){return(cE(t)?t.asyncValidators:n)||null}function cE(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}var rE=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Kv}get invalid(){return this.status===eE}get pending(){return this.status==yg}get disabled(){return this.status===Jv}get enabled(){return this.status!==Jv}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(L9(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(L9(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(B9(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(B9(t,this._rawAsyncValidators))}hasValidator(t){return nE(this._rawValidators,t)}hasAsyncValidator(t){return nE(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=yg,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Jv,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Kv,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Kv||this.status===yg)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Jv:Kv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=yg,this._hasOwnPendingAsyncValidator=!0;let e=eq(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new F,this.statusChanges=new F}_calculateStatus(){return this._allControlsDisabled()?Jv:this.errors?eE:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(yg)?yg:this._anyControlsHaveStatus(eE)?eE:Kv}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){cE(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function(n){return Array.isArray(n)?B2(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function(n){return Array.isArray(n)?V2(n):n||null}(this._rawAsyncValidators)}},oE=class extends rE{constructor(t,e,i){super(cq(e),dq(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){(function(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new xt(1002,L2?function(n,t){return`Must supply a value for form control ${lq(n,t)}`}(t,r):"")})})(this,!0,t),Object.keys(t).forEach(i=>{(function(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new xt(1e3,L2?function(n){return`\n    There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n    you may want to check next tick (e.g. use setTimeout).\n  `}(t):"");if(!i[e])throw new xt(1001,L2?function(n,t){return`Cannot find form control ${lq(n,t)}`}(t,e):"")})(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}},Oh=new te("CallSetDisabledState",{providedIn:"root",factory:()=>ty}),ty="always";function dE(n,t){return[...t.path,n]}function ey(n,t,e=ty){H2(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&uq(n,t)})}(n,t),function(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&uq(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function aE(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),lE(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function sE(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function H2(n,t){let e=aq(n);null!==t.validator?n.setValidators(N9(e,t.validator)):"function"==typeof e&&n.setValidators([e]);let i=sq(n);null!==t.asyncValidator?n.setAsyncValidators(N9(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();sE(t._rawValidators,r),sE(t._rawAsyncValidators,r)}function lE(n,t){let e=!1;if(null!==n){if(null!==t.validator){let r=aq(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){let r=sq(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return sE(t._rawValidators,i),sE(t._rawAsyncValidators,i),e}function uq(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function pq(n,t){H2(n,t)}function z2(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function hq(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function U2(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===Uu?e=o:function(n){return Object.getPrototypeOf(n.constructor)===kh}(o)?i=o:r=o}),r||i||e||null}var Jve={provide:Jo,useExisting:Wn(()=>Cg)},$v=Promise.resolve(),Cg=(()=>{class n extends Jo{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new F,this.form=new oE({},B2(e),V2(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){$v.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),ey(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){$v.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){$v.then(()=>{let i=this._findContainer(e.path),r=new oE({});pq(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){$v.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){$v.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,hq(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(C(Io,10),C(ju,10),C(Oh,8))},n.\u0275dir=Me({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&A("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Vt([Jve]),Xe]}),n})();function V9(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function H9(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}var ny=class extends rE{constructor(t=null,e,i){super(cq(e),dq(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),cE(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=H9(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){V9(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){V9(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){H9(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},mq=(()=>{class n extends Jo{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return dE(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,features:[Xe]}),n})(),eye={provide:Jo,useExisting:Wn(()=>tye)},tye=(()=>{class n extends mq{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){}}return n.\u0275fac=function(e){return new(e||n)(C(Jo,5),C(Io,10),C(ju,10))},n.\u0275dir=Me({type:n,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Vt([eye]),Xe]}),n})(),nye={provide:qa,useExisting:Wn(()=>iy)},z9=Promise.resolve(),iy=(()=>{class n extends qa{constructor(e,i,r,o,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this.control=new ny,this._registered=!1,this.update=new F,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=U2(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),z2(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){ey(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){z9.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=0!==i&&ew(i);z9.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?dE(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(C(Jo,9),C(Io,10),C(ju,10),C(Xr,10),C(Qt,8),C(Oh,8))},n.\u0275dir=Me({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Vt([nye]),Xe,qt]}),n})(),iye={provide:Xr,useExisting:Wn(()=>j2),multi:!0},j2=(()=>{class n extends kh{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&A("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Vt([iye]),Xe]}),n})(),rye={provide:Xr,useExisting:Wn(()=>aye),multi:!0},fq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),oye=(()=>{class n{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:fq}),n})(),aye=(()=>{class n extends kh{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=$n(Oh,{optional:!0})??ty}ngOnInit(){this._control=this._injector.get(qa),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return n.\u0275fac=function(e){return new(e||n)(C(dc),C(xe),C(oye),C(wi))},n.\u0275dir=Me({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&A("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Vt([rye]),Xe]}),n})(),sye={provide:Xr,useExisting:Wn(()=>lye),multi:!0},lye=(()=>{class n extends kh{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,i){1&e&&A("change",function(o){return i.onChange(o.target.value)})("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Vt([sye]),Xe]}),n})(),G2=new te("NgModelWithFormControlWarning"),cye={provide:qa,useExisting:Wn(()=>W2)},W2=(()=>{class n extends qa{set isDisabled(e){}constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this.update=new F,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=U2(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&aE(i,this,!1),ey(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}z2(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&aE(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(C(Io,10),C(ju,10),C(Xr,10),C(G2,8),C(Oh,8))},n.\u0275dir=Me({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Vt([cye]),Xe,qt]}),n})(),dye={provide:Jo,useExisting:Wn(()=>Mg)},Mg=(()=>{class n extends Jo{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new F,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(lE(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return ey(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){aE(e.control||null,e,!1),function(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,hq(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(aE(i||null,e),(n=>n instanceof ny)(r)&&(ey(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);pq(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&function(n,t){return lE(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){H2(this.form,this),this._oldForm&&lE(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(C(Io,10),C(ju,10),C(Oh,8))},n.\u0275dir=Me({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&A("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Vt([dye]),Xe,qt]}),n})(),uye={provide:Jo,useExisting:Wn(()=>gq)},gq=(()=>{class n extends mq{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){bq(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(C(Jo,13),C(Io,10),C(ju,10))},n.\u0275dir=Me({type:n,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Vt([uye]),Xe]}),n})(),pye={provide:Jo,useExisting:Wn(()=>_q)},_q=(()=>{class n extends Jo{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return dE(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){bq(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(C(Jo,13),C(Io,10),C(ju,10))},n.\u0275dir=Me({type:n,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Vt([pye]),Xe]}),n})();function bq(n){return!(n instanceof gq||n instanceof Mg||n instanceof _q)}var hye={provide:qa,useExisting:Wn(()=>mye)},mye=(()=>{class n extends qa{set isDisabled(e){}constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.update=new F,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=U2(0,o)}ngOnChanges(e){this._added||this._setUpControl(),z2(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return dE(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(C(Jo,13),C(Io,10),C(ju,10),C(Xr,10),C(G2,8))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Vt([hye]),Xe,qt]}),n})(),fye={provide:Xr,useExisting:Wn(()=>yq),multi:!0};function vq(n,t){return null==n?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var yq=(()=>{class n extends kh{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let r=vq(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=function(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&A("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Vt([fye]),Xe]}),n})(),xq=(()=>{class n{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(vq(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(dc),C(yq,9))},n.\u0275dir=Me({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})(),_ye={provide:Xr,useExisting:Wn(()=>Cq),multi:!0};function U9(n,t){return null==n?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var Cq=(()=>{class n extends kh{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(void 0!==o){let a=o;for(let s=0;s<a.length;s++){let c=this._getOptionValue(a[s].value);r.push(c)}}else{let a=i.options;for(let s=0;s<a.length;s++){let l=a[s];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=function(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,i){1&e&&A("change",function(o){return i.onChange(o.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Vt([_ye]),Xe]}),n})(),Mq=(()=>{class n{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(U9(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(U9(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(dc),C(Cq,9))},n.\u0275dir=Me({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})();function wq(n){return"number"==typeof n?n:parseInt(n,10)}function Sq(n){return"number"==typeof n?n:parseFloat(n)}var Fh=(()=>{class n{constructor(){this._validator=tE}ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):tE,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,features:[qt]}),n})(),vye={provide:Io,useExisting:Wn(()=>yye),multi:!0},yye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Sq(e),this.createValidator=e=>q9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[Vt([vye]),Xe]}),n})(),xye={provide:Io,useExisting:Wn(()=>Cye),multi:!0},Cye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Sq(e),this.createValidator=e=>W9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Vt([xye]),Xe]}),n})(),Mye={provide:Io,useExisting:Wn(()=>Eq),multi:!0},wye={provide:Io,useExisting:Wn(()=>q2),multi:!0},Eq=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=ew,this.createValidator=e=>X9}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&Be("required",i._enabled?"":null)},inputs:{required:"required"},features:[Vt([Mye]),Xe]}),n})(),q2=(()=>{class n extends Eq{constructor(){super(...arguments),this.createValidator=e=>Y9}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("required",i._enabled?"":null)},features:[Vt([wye]),Xe]}),n})(),Sye={provide:Io,useExisting:Wn(()=>Eye),multi:!0},Eye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=ew,this.createValidator=e=>Q9}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Vt([Sye]),Xe]}),n})(),Tye={provide:Io,useExisting:Wn(()=>Dye),multi:!0},Dye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>wq(e),this.createValidator=e=>Z9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[Vt([Tye]),Xe]}),n})(),Iye={provide:Io,useExisting:Wn(()=>Aye),multi:!0},Aye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>wq(e),this.createValidator=e=>K9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Vt([Iye]),Xe]}),n})(),Rye={provide:Io,useExisting:Wn(()=>Pye),multi:!0},Pye=(()=>{class n extends Fh{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>J9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[Vt([Rye]),Xe]}),n})(),Tq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[fq]}),n})(),Gu=(new Ml("15.2.9"),(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Oh,useValue:e.callSetDisabledState??ty}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Tq]}),n})()),uE=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:G2,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Oh,useValue:e.callSetDisabledState??ty}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Tq]}),n})(),kye=["trigger"],Oye=["panel"];function Fye(n,t){if(1&n&&(f(0,"span",10),T(1),g()),2&n){let e=w();v(1),kt(e.placeholder)}}function Nye(n,t){if(1&n&&(f(0,"span",14),T(1),g()),2&n){let e=w(2);v(1),kt(e.triggerValue)}}function Lye(n,t){1&n&&Tt(0,0,["*ngSwitchCase","true"])}function Bye(n,t){1&n&&(f(0,"span",11),S(1,Nye,2,1,"span",12),S(2,Lye,1,0,"ng-content",13),g()),2&n&&(b("ngSwitch",!!w().customTrigger),v(2),b("ngSwitchCase",!0))}function Vye(n,t){if(1&n){let e=Te();qn(),ua(),f(0,"div",15,16),A("@transformPanel.done",function(r){return ne(e),ie(w()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return ne(e),ie(w()._handleKeydown(r))}),Tt(2,1),g()}if(2&n){let e=w();bb("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),b("ngClass",e.panelClass)("@transformPanel","showing"),Be("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var Hye=[[["mat-select-trigger"]],"*"],zye=["mat-select-trigger","*"],Uye={transformPanelWrap:fr("transformPanelWrap",[bi("* => void",rh("@transformPanel",[ih()],{optional:!0}))]),transformPanel:fr("transformPanel",[Si("void",rn({opacity:0,transform:"scale(1, 0.8)"})),bi("void => showing",Mi("120ms cubic-bezier(0, 0, 0.2, 1)",rn({opacity:1,transform:"scale(1, 1)"}))),bi("* => void",Mi("100ms linear",rn({opacity:0})))])},Dq=0,Iq=new te("mat-select-scroll-strategy"),Gye=new te("MAT_SELECT_CONFIG"),Wye={provide:Iq,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},qye=new te("MatSelectTrigger"),Xye=go(Dc(ao(hg(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Ee}})))),Yye=(()=>{class n extends Xye{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(il.required)??!1}set required(e){this._required=vt(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=vt(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=vt(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=mi(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,r,o,a,s,l,c,d,u,p,h,m,_){super(a,o,l,c,u),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=s,this._parentFormField=d,this._liveAnnouncer=m,this._defaultOptions=_,this._panelOpen=!1,this._compareWith=(M,y)=>M===y,this._uid="mat-select-"+Dq++,this._triggerAriaLabelledBy=null,this._destroy=new Ee,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+Dq++,this._panelDoneAnimatingStream=new Ee,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=is(()=>{let M=this.options;return M?M.changes.pipe(kn(M),Jn(()=>tn(...M.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Lt(1),Jn(()=>this.optionSelectionChanges))}),this.openedChange=new F,this._openedStream=this.openedChange.pipe(Oe(M=>M),q(()=>{})),this._closedStream=this.openedChange.pipe(Oe(M=>!M),q(()=>{})),this.selectionChange=new F,this.valueChange=new F,this.ngControl&&(this.ngControl.valueAccessor=this),null!=_?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=_.typeaheadDebounceInterval),this._scrollStrategyFactory=h,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new fg(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ri(),it(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(it(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(kn(null),it(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let i=e.keyCode,r=40===i||38===i||37===i||39===i,o=13===i||32===i,a=this._keyManager;if(!a.isTyping()&&o&&!Or(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let s=this.selected;a.onKeydown(e);let l=this.selected;l&&s!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,r=e.keyCode,o=40===r||38===r,a=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(a||13!==r&&32!==r||!i.activeItem||Or(e))if(!a&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();let s=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(s?l.select():l.deselect())})}else{let s=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==s&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Lt(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{let i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new lg(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=tn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(it(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),tn(...this.options.map(i=>i._stateChanges)).pipe(it(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){let r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(C(Wa),C(Qt),C(ot),C(Eh),C(xe),C(zi,8),C(Cg,8),C(Mg,8),C(Ph,8),C(qa,10),Mo("tabindex"),C(Iq),C(Hv),C(Gye,8))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&(Ue(kye,5),Ue(Oye,5),Ue(Vu,5)),2&e){let r;be(r=ve())&&(i.trigger=r.first),be(r=ve())&&(i.panel=r.first),be(r=ve())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Xe,qt]}),n})(),Wu=(()=>{class n extends Yye{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(it(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){let i=this.options.toArray()[e];if(i){let r=this.panel.nativeElement,o=z1(e,this.options,this.optionGroups),a=i._getHostElement();r.scrollTop=0===e&&1===o?0:U1(a.offsetTop,a.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new class{constructor(t,e){this.source=t,this.value=e}}(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof Md?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=vt(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,qye,5),Bn(r,ja,5),Bn(r,jv,5)),2&e){let o;be(o=ve())&&(i.customTrigger=o.first),be(o=ve())&&(i.options=o),be(o=ve())&&(i.optionGroups=o)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,i){1&e&&A("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(Be("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),nt("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[Vt([{provide:Yv,useExisting:n},{provide:Uv,useExisting:n}]),Xe],ngContentSelectors:zye,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(fn(Hye),f(0,"div",0,1),A("click",function(){return i.toggle()}),f(3,"div",2),S(4,Fye,2,1,"span",3),S(5,Bye,3,2,"span",4),g(),f(6,"div",5)(7,"div",6),qn(),f(8,"svg",7),k(9,"path",8),g()()()(),S(10,Vye,3,9,"ng-template",9),A("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){let r=st(1);Be("aria-owns",i.panelOpen?i.id+"-panel":null),v(3),b("ngSwitch",i.empty),Be("id",i._valueId),v(1),b("ngSwitchCase",!0),v(1),b("ngSwitchCase",!1),v(5),b("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[wn,mr,kr,du,Vu,Md],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Uye.transformPanel]},changeDetection:0}),n})(),Xa=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Wye],imports:[De,Do,mg,dn,Ic,Qv,mg,dn]}),n})();function Qye(n,t){1&n&&(Gt(0),f(1,"div",1),T(2," There is a difference between Default - (Enabled/Disabled) and (Enabled/Disabled) "),g(),f(3,"div",1),T(4," Only flags with non default values are sent to the backend. "),g(),Wt())}function Zye(n,t){if(1&n&&(Gt(0),f(1,"div",1),T(2),g(),Wt()),2&n){let e=w();v(2),Ve(' Feature Flags are filtered to only show features containing "',e.showFlagsFilter,'" ')}}function Kye(n,t){1&n&&(f(0,"sup",11),T(1,"1"),g())}function Jye(n,t){1&n&&hi(0)}function $ye(n,t){if(1&n){let e=Te();f(0,"mat-select",12),A("selectionChange",function(r){ne(e);let o=w().$implicit;return ie(w().flagChanged.emit({flag:o.flag,status:r.value}))}),f(1,"mat-option",13),T(2),g(),f(3,"mat-option",14),T(4,"Enabled"),g(),f(5,"mat-option",15),T(6,"Disabled"),g()()}if(2&n){let e=w().$implicit,i=w();b("value",e.status),v(2),Ve(" Default ",i.formatFlagValue(e.defaultValue)," ")}}function exe(n,t){if(1&n&&(f(0,"td"),T(1),g()),2&n){let e=w().$implicit,i=w();v(1),Ve("Unsupported By UI ",i.formatFlagValue(e.value),"")}}function txe(n,t){if(1&n&&(Gt(0),f(1,"tr")(2,"td")(3,"div"),T(4),S(5,Kye,2,0,"sup",7),g()(),S(6,Jye,1,0,"ng-container",8),S(7,$ye,7,2,"ng-template",null,9,jt),S(9,exe,2,1,"ng-template",null,10,jt),g(),Wt()),2&n){let e=t.$implicit,i=st(8),r=st(10),o=w();v(4),Ve(" ",e.flag," "),v(1),b("ngIf",e.sendToServerWhenOverridden),v(1),b("ngIf",o.isEditable(e))("ngIfThen",i)("ngIfElse",r)}}function nxe(n,t){1&n&&(f(0,"div",11),T(1," 1. Sent to server when overridden "),g())}var hE,Aq=(()=>{class n{constructor(){this.hasFlagsSentToServer=!1,this.flagChanged=new F,this.allFlagsReset=new F}serializeFlagValue(e){return!0===e?"Enabled":!1===e?"Disabled":null==e?"null":Array.isArray(e)?JSON.stringify(e):e.toString()}isEditable(e){return"boolean"==typeof e.defaultValue}formatFlagValue(e){let i=this.serializeFlagValue(e);return 0===i.length?"":`- ${i}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["feature-flag-dialog-component"]],inputs:{featureFlagStatuses:"featureFlagStatuses",hasFlagsSentToServer:"hasFlagsSentToServer",showFlagsFilter:"showFlagsFilter"},outputs:{flagChanged:"flagChanged",allFlagsReset:"allFlagsReset"},decls:12,vars:4,consts:[[1,"scrolling-page"],[1,"message"],[1,"warning"],[4,"ngIf"],[1,"feature-flag-table"],[4,"ngFor","ngForOf"],["mat-button","",3,"click"],["class","note-1",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["selectBlock",""],["unsupportedBlock",""],[1,"note-1"],[3,"value","selectionChange"],["value","default"],["value","enabled"],["value","disabled"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1)(2,"h2",2),T(3,"WARNING: EXPERIMENTAL FEATURES AHEAD!"),g(),T(4," By enabling these features, you could put the application in an unusable state or expose yourself to untested features or potential bugs. "),g(),S(5,Qye,5,0,"ng-container",3),S(6,Zye,3,1,"ng-container",3),f(7,"table",4),S(8,txe,11,5,"ng-container",5),g(),f(9,"button",6),A("click",function(){return i.allFlagsReset.emit()}),T(10,"Reset All"),g(),S(11,nxe,2,0,"div",7),g()),2&e&&(v(5),b("ngIf",i.hasFlagsSentToServer),v(1),b("ngIf",i.showFlagsFilter),v(2),b("ngForOf",i.featureFlagStatuses),v(3),b("ngIf",i.hasFlagsSentToServer))},dependencies:[nn,Ne,ki,Wu,ja],styles:[".message[_ngcontent-%COMP%]{margin-bottom:16px}.message[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:#f44336}.note-1[_ngcontent-%COMP%]{color:#ff9800}.scrolling-page[_ngcontent-%COMP%]{max-height:90vh}.feature-flag-table[_ngcontent-%COMP%]{width:100%}"]}),n})(),Rq=(()=>{class n{constructor(e){this.store=e,this.showFlagsFilter$=this.store.select(sv).pipe(q(i=>i.showFlags?.toLowerCase())),this.hasFlagsSentToServer$=this.store.select(fh).pipe(q(i=>Object.values(i).some(r=>r.sendToServerWhenOverridden))),this.featureFlags$=this.store.select(sv).pipe(It(this.store.select(C6),this.store.select(fh),this.showFlagsFilter$),q(([i,r,o,a])=>Object.entries(r).filter(([s])=>!a||s.toLowerCase().includes(a)).map(([s,l])=>{let c=function(n,t){return void 0===t[n]?"default":t[n]?"enabled":"disabled"}(s,i);return{flag:s,defaultValue:l,status:c,sendToServerWhenOverridden:o[s].sendToServerWhenOverridden}})))}onFlagChanged({flag:e,status:i}){switch(i){case"default":this.store.dispatch(xu({flags:[e]}));break;case"enabled":this.store.dispatch(yh({flags:{[e]:!0}}));break;case"disabled":this.store.dispatch(yh({flags:{[e]:!1}}));break;default:throw new Error("Flag changed to invalid status")}}onAllFlagsReset(){this.store.dispatch(Qf())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["feature-flag-dialog"]],decls:4,vars:9,consts:[[3,"featureFlagStatuses","hasFlagsSentToServer","showFlagsFilter","flagChanged","allFlagsReset"]],template:function(e,i){1&e&&(f(0,"feature-flag-dialog-component",0),A("flagChanged",function(o){return i.onFlagChanged(o)})("allFlagsReset",function(){return i.onAllFlagsReset()}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("featureFlagStatuses",G(1,3,i.featureFlags$))("hasFlagsSentToServer",G(2,5,i.hasFlagsSentToServer$))("showFlagsFilter",G(3,7,i.showFlagsFilter$))},dependencies:[Aq,ct],encapsulation:2}),n})(),Pq=(()=>{class n{constructor(e,i){this.store=e,this.dialog=i,this.featureFlagDialogType=Rq,this.ngUnsubscribe=new Ee,this.showFeatureFlags$=this.store.select(E6)}ngOnInit(){this.showFeatureFlags$.pipe(it(this.ngUnsubscribe)).subscribe(e=>{if(e)return this.featureFlagsDialog=this.dialog.open(this.featureFlagDialogType),void this.featureFlagsDialog.afterClosed().pipe(it(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(xu({flags:["showFlags"]})),setTimeout(()=>{window.location.reload()},1)})})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(ys))},n.\u0275cmp=P({type:n,selectors:[["feature-flag-modal-trigger"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),sxe=["routeContainer"],kq=(()=>{class n{constructor(e){this.componentFactoryResolver=e}ngOnChanges(e){let i=e.activeNgComponent;if(i&&(this.routeContainer.clear(),i.currentValue)){let r=this.componentFactoryResolver.resolveComponentFactory(i.currentValue);this.routeContainer.createComponent(r)}}}return n.\u0275fac=function(e){return new(e||n)(C(ho))},n.\u0275cmp=P({type:n,selectors:[["router-outlet-component"]],viewQuery:function(e,i){if(1&e&&Ue(sxe,7,ei),2&e){let r;be(r=ve())&&(i.routeContainer=r.first)}},inputs:{activeNgComponent:"activeNgComponent"},features:[qt],decls:2,vars:0,consts:[["routeContainer",""]],template:function(e,i){1&e&&hi(0,null,0)},encapsulation:2,changeDetection:0}),n})(),Oq=(()=>{class n{constructor(e,i){this.store=e,this.registry=i,this.activeNgComponent$=In([this.store.select(Ho),this.store.select(Q8)]).pipe(q(([r,o])=>r&&(null===o||Vo(r,o))?this.registry.getNgComponentByRouteKind(r.routeKind):null))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(Rl))},n.\u0275cmp=P({type:n,selectors:[["router-outlet"]],decls:2,vars:3,consts:[[3,"activeNgComponent"]],template:function(e,i){1&e&&(k(0,"router-outlet-component",0),U(1,"async")),2&e&&b("activeNgComponent",G(1,1,i.activeNgComponent$))},dependencies:[kq,ct],encapsulation:2,changeDetection:0}),n})(),Fq=(()=>{class n{constructor(e){e.select(Pl).subscribe(i=>{document.body.classList.toggle("dark-mode",i)})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["dark-mode-supporter"]],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),Sg=(()=>(function(n){n[n.ACTIVE_PLUGIN=0]="ACTIVE_PLUGIN"}(Sg||(Sg={})),Sg))(),Nq=(()=>{class n{constructor(e){this.deepLinker=e,this.onValueChange=new F,this.ngUnsubscribe=new Ee,this.onHashChange=Ei(window,"popstate",{passive:!0}).pipe(it(this.ngUnsubscribe))}ngOnInit(){this.onHashChange.subscribe(()=>{let e=this.deepLinker.getPluginId();e!==this.activePluginId&&this.onValueChange.emit({prop:Sg.ACTIVE_PLUGIN,value:e})})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnChanges(e){if(e.activePluginId){let i=e.activePluginId;this.deepLinker.setPluginId(null===i.currentValue?"":i.currentValue,{defaultValue:"",useLocationReplace:null===i.previousValue||i.firstChange})}}}return n.\u0275fac=function(e){return new(e||n)(C(gu))},n.\u0275cmp=P({type:n,selectors:[["hash-storage-component"]],inputs:{activePluginId:"activePluginId"},outputs:{onValueChange:"onValueChange"},features:[qt],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Lq=(()=>{class n{constructor(e){this.store=e,this.activePluginId$=this.store.pipe(un(Zo))}onValueChanged(e){e.prop===Sg.ACTIVE_PLUGIN&&this.store.dispatch(hS({plugin:e.value}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["hash-storage"]],decls:2,vars:3,consts:[[3,"activePluginId","onValueChange"]],template:function(e,i){1&e&&(f(0,"hash-storage-component",0),A("onValueChange",function(o){return i.onValueChanged(o)}),U(1,"async"),g()),2&e&&b("activePluginId",G(1,1,i.activePluginId$))},dependencies:[Nq,ct],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),hxe=["*"];function ry(n){return function(){if(void 0===hE&&(hE=null,typeof window<"u")){let n=window;void 0!==n.trustedTypes&&(hE=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return hE}()?.createHTML(n)||n}function Bq(n){return Error(`Unable to find icon with the name "${n}"`)}function Vq(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function Hq(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}var Sd=class{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}},Eg=(()=>{class n{constructor(e,i,r,o){this._httpClient=e,this._sanitizer=i,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,o){return this._addSvgIconConfig(e,i,new Sd(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){let a=this._sanitizer.sanitize(Ur.HTML,r);if(!a)throw Hq(r);let s=ry(a);return this._addSvgIconConfig(e,i,new Sd("",s,o))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Sd(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){let o=this._sanitizer.sanitize(Ur.HTML,i);if(!o)throw Hq(i);let a=ry(o);return this._addSvgIconSetConfig(e,new Sd("",a,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let i=this._sanitizer.sanitize(Ur.RESOURCE_URL,e);if(!i)throw Vq(e);let r=this._cachedIconsByUrl.get(i);return r?$t(mE(r)):this._loadSvgIconFromConfig(new Sd(e,null)).pipe(Dt(o=>this._cachedIconsByUrl.set(i,o)),q(o=>mE(o)))}getNamedSvgIcon(e,i=""){let r=zq(i,e),o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(i,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);let a=this._iconSetConfigs.get(i);return a?this._getSvgFromIconSetConfigs(e,a):_l(Bq(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?$t(mE(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(q(i=>mE(i)))}_getSvgFromIconSetConfigs(e,i){let r=this._extractIconWithNameFromAnySet(e,i);return r?$t(r):Co(i.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(co(s=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(Ur.RESOURCE_URL,a.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(c)),$t(null)})))).pipe(q(()=>{let a=this._extractIconWithNameFromAnySet(e,i);if(!a)throw Bq(e);return a}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){let o=i[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let a=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(a,e,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Dt(i=>e.svgText=i),q(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?$t(null):this._fetchIcon(e).pipe(Dt(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){let o=e.querySelector(`[id="${i}"]`);if(!o)return null;let a=o.cloneNode(!0);if(a.removeAttribute("id"),"svg"===a.nodeName.toLowerCase())return this._setSvgAttributes(a,r);if("symbol"===a.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(a),r);let s=this._svgElementFromString(ry("<svg></svg>"));return s.appendChild(a),this._setSvgAttributes(s,r)}_svgElementFromString(e){let i=this._document.createElement("DIV");i.innerHTML=e;let r=i.querySelector("svg");if(!r)throw Error("<svg> tag not found");return r}_toSvgElement(e){let i=this._svgElementFromString(ry("<svg></svg>")),r=e.attributes;for(let o=0;o<r.length;o++){let{name:a,value:s}=r[o];"id"!==a&&i.setAttribute(a,s)}for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===this._document.ELEMENT_NODE&&i.appendChild(e.childNodes[o].cloneNode(!0));return i}_setSvgAttributes(e,i){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),i&&i.viewBox&&e.setAttribute("viewBox",i.viewBox),e}_fetchIcon(e){let{url:i,options:r}=e,o=r?.withCredentials??!1;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);let a=this._sanitizer.sanitize(Ur.RESOURCE_URL,i);if(!a)throw Vq(i);let s=this._inProgressUrlFetches.get(a);if(s)return s;let l=this._httpClient.get(a,{responseType:"text",withCredentials:o}).pipe(q(c=>ry(c)),function(n){return Yt((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}(()=>this._inProgressUrlFetches.delete(a)),Ta());return this._inProgressUrlFetches.set(a,l),l}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(zq(e,i),r),this}_addSvgIconSetConfig(e,i){let r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){let i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;r<this._resolvers.length;r++){let o=this._resolvers[r](i,e);if(o)return _xe(o)?new Sd(o.url,null,o.options):new Sd(o,null)}}}return n.\u0275fac=function(e){return new(e||n)(O(mh,8),O(nh),O(Nt,8),O(la))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function mE(n){return n.cloneNode(!0)}function zq(n,t){return n+":"+t}function _xe(n){return!(!n.url||!n.options)}new ka,new id,new ka,new ka;var bxe=Ko(class{constructor(n){this._elementRef=n}}),vxe=new te("MAT_ICON_DEFAULT_OPTIONS"),yxe=new te("mat-icon-location",{providedIn:"root",factory:function(){let n=$n(Nt),t=n?n.location:null;return{getPathname:()=>t?t.pathname+t.search:""}}}),Uq=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Cxe=Uq.map(n=>`[${n}]`).join(", "),Mxe=/^url\(['"]?#(.*?)['"]?\)$/,bn=(()=>{class n extends bxe{get inline(){return this._inline}set inline(e){this._inline=vt(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){let i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){let i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(e,i,r,o,a,s){super(e),this._iconRegistry=i,this._location=o,this._errorHandler=a,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=En.EMPTY,s&&(s.color&&(this.color=this.defaultColor=s.color),s.fontSet&&(this.fontSet=s.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let i=this._elementsWithExternalReferences;i&&i.forEach((r,o)=>{r.forEach(a=>{o.setAttribute(a.name,`url('${e}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(Cxe),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<i.length;o++)Uq.forEach(a=>{let s=i[o],l=s.getAttribute(a),c=l?l.match(Mxe):null;if(c){let d=r.get(s);d||(d=[],r.set(s,d)),d.push({name:a,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Lt(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${o.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Eg),Mo("aria-hidden"),C(yxe),C(la),C(vxe,8))},n.\u0275cmp=P({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(Be("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),nt("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Xe],ngContentSelectors:hxe,decls:1,vars:0,template:function(e,i){1&e&&(fn(),Tt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),ai=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,dn]}),n})(),wxe=["*",[["mat-toolbar-row"]]],Sxe=["*","mat-toolbar-row"],Exe=Ko(class{constructor(n){this._elementRef=n}}),Txe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),jq=(()=>{class n extends Exe{constructor(e,i,r){super(e),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(Nt))},n.\u0275cmp=P({type:n,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,Txe,5),2&e){let o;be(o=ve())&&(i._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Xe],ngContentSelectors:Sxe,decls:2,vars:0,template:function(e,i){1&e&&(fn(wxe),Tt(0),Tt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),Gq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,dn]}),n})();function Y2(n){return n.state!==Re.NOT_LOADED&&n.state!==Re.LOADING}var Ixe=gr(i7,ye(x1,n=>Y2(n)?{...n,settings:{...n.settings,reloadEnabled:!n.settings.reloadEnabled}}:n),ye(C1,(n,{periodInMs:t})=>{if(!Y2(n))return n;let e=t>=3e4?t:n.settings.reloadPeriodInMs;return{...n,settings:{...n.settings,reloadPeriodInMs:e}}}),ye(M1,(n,{size:t})=>{if(!Y2(n))return n;let e=t>0?t:n.settings.pageSize;return{...n,settings:{...n.settings,pageSize:e}}}),ye(hs,(n,{partialSettings:t})=>{let e={};return Number.isFinite(t.pageSize)&&t.pageSize>0&&(e.pageSize=Number(t.pageSize)),"boolean"==typeof t.autoReload&&(e.reloadEnabled=t.autoReload),Number.isFinite(t.autoReloadPeriodInMs)&&t.autoReloadPeriodInMs>3e4&&(e.reloadPeriodInMs=Number(t.autoReloadPeriodInMs)),{...n,settings:{...n.settings,...e}}}));function Wq(n,t){return Ixe(n,t)}var Axe=["input"],Rxe=["label"],Pxe=["*"],Z2=new te("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}});var kxe={provide:Xr,useExisting:Wn(()=>xs),multi:!0},Oxe=0,qq={color:"accent",clickAction:"check-indeterminate"},Fxe=Dc(Ko(go(ao(class{constructor(n){this._elementRef=n}})))),Nxe=(()=>{class n extends Fxe{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=vt(e)}constructor(e,i,r,o,a,s,l){super(i),this._changeDetectorRef=r,this._ngZone=o,this._animationMode=s,this._options=l,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new F,this.indeterminateChange=new F,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||qq,this.color=this.defaultColor=this._options.color||qq.color,this.tabIndex=parseInt(a)||0,this.id=this._uniqueId=`${e}${++Oxe}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){let i=vt(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){let i=vt(e);i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let i=e!=this._indeterminate;this._indeterminate=vt(e),i&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==e&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;this.disabled||"noop"===e?!this.disabled&&"noop"===e&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==e&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if("NoopAnimations"===this._animationMode)return"";switch(e){case 0:if(1===i)return this._animationClasses.uncheckedToChecked;if(3==i)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===i?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===i?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===i?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}}return n.\u0275fac=function(e){cs()},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&(Ue(Axe,5),Ue(Rxe,5),Ue(Ki,5)),2&e){let r;be(r=ve())&&(i._inputElement=r.first),be(r=ve())&&(i._labelElement=r.first),be(r=ve())&&(i.ripple=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[Xe]}),n})(),xs=(()=>{class n extends Nxe{constructor(e,i,r,o,a,s){super("mat-mdc-checkbox-",e,i,r,o,a,s),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new class{};return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(ot),Mo("tabindex"),C(pi,8),C(Z2,8))},n.\u0275cmp=P({type:n,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&(wo("id",i.id),Be("tabindex",null)("aria-label",null)("aria-labelledby",null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mdc-checkbox--disabled",i.disabled)("mat-mdc-checkbox-disabled",i.disabled)("mat-mdc-checkbox-checked",i.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[Vt([kxe]),Xe],ngContentSelectors:Pxe,decls:15,vars:19,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[3,"for"],["label",""]],template:function(e,i){if(1&e&&(fn(),f(0,"div",0),A("click",function(o){return i._preventBubblingFromLabel(o)}),f(1,"div",1,2)(3,"div",3),A("click",function(){return i._onTouchTargetClick()}),g(),f(4,"input",4,5),A("blur",function(){return i._onBlur()})("click",function(){return i._onInputClick()})("change",function(o){return i._onInteractionEvent(o)}),g(),k(6,"div",6),f(7,"div",7),qn(),f(8,"svg",8),k(9,"path",9),g(),ua(),k(10,"div",10),g(),k(11,"div",11),g(),f(12,"label",12,13),Tt(14),g()()),2&e){let r=st(2);nt("mdc-form-field--align-end","before"==i.labelPosition),v(4),nt("mdc-checkbox--selected",i.checked),b("checked",i.checked)("indeterminate",i.indeterminate)("disabled",i.disabled)("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex),Be("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby)("name",i.name)("value",i.value),v(7),b("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),v(1),b("for",i.inputId)}},dependencies:[Ki],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple{opacity:.04;transform:scale(1);transition:opacity 80ms 0 cubic-bezier(0, 0, 0.2, 1),transform 80ms 0 cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:.16}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__native-control:focus:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, black)}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),Lxe={provide:Io,useExisting:Wn(()=>Bxe),multi:!0},Bxe=(()=>{class n extends q2{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[Vt([Lxe]),Xe]}),n})(),Xq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),kc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,_a,Xq,dn,Xq]}),n})(),Qq=za({passive:!0}),Zq=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Kr;let i=Ua(e),r=this._monitoredElements.get(i);if(r)return r.subject;let o=new Ee,a="cdk-text-field-autofilled",s=l=>{"cdk-text-field-autofill-start"!==l.animationName||i.classList.contains(a)?"cdk-text-field-autofill-end"===l.animationName&&i.classList.contains(a)&&(i.classList.remove(a),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!1}))):(i.classList.add(a),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",s,Qq),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",s,Qq)}}),o}stopMonitoring(e){let i=Ua(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(ot))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Kq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),Hxe=new te("MAT_INPUT_VALUE_ACCESSOR"),zxe=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Uxe=0,jxe=hg(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new Ee}}),qu=(()=>{class n extends jxe{get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(il.required)??!1}set required(e){this._required=vt(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&s2().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=vt(e)}constructor(e,i,r,o,a,s,l,c,d,u){super(s,o,a,r),this._elementRef=e,this._platform=i,this._autofillMonitor=c,this._formField=u,this._uid="mat-input-"+Uxe++,this.focused=!1,this.stateChanges=new Ee,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(m=>s2().has(m)),this._iOSKeyupListener=m=>{let _=m.target;!_.value&&0===_.selectionStart&&0===_.selectionEnd&&(_.setSelectionRange(1,1),_.setSelectionRange(0,0))};let p=this._elementRef.nativeElement,h=p.nodeName.toLowerCase();this._inputValueAccessor=l||p,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===h,this._isTextarea="textarea"===h,this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){zxe.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Vn),C(qa,10),C(Cg,8),C(Mg,8),C(Eh),C(Hxe,10),C(Zq),C(ot),C(Ph,8))},n.\u0275dir=Me({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(e,i){1&e&&A("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(wo("id",i.id)("disabled",i.disabled)("required",i.required),Be("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),nt("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[Vt([{provide:Yv,useExisting:n}]),Xe,qt]}),n})(),rl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,Qv,Qv,Kq,dn]}),n})();function Gxe(n,t){if(1&n&&(f(0,"mat-error"),T(1),g()),2&n){let e=w();v(1),Ve(" Reload period has to be minimum of ",e.MIN_RELOAD_PERIOD_IN_S," seconds. ")}}function Wxe(n,t){1&n&&(f(0,"mat-error"),T(1," Page size has to be a positive integer. "),g())}var Jq=(()=>{class n{constructor(){this.reloadToggled=new F,this.reloadPeriodInMsChanged=new F,this.pageSizeChanged=new F,this.MIN_RELOAD_PERIOD_IN_S=30,this.reloadPeriodControl=new ny(this.MIN_RELOAD_PERIOD_IN_S,[il.required,il.min(this.MIN_RELOAD_PERIOD_IN_S)]),this.paginationControl=new ny(1,[il.required,il.min(1),n=>{let t=Number(n.value);return Math.round(t)===n.value?null:{integer:{value:n.value}}}]),this.ngUnsubscribe=new Ee}ngOnInit(){this.reloadPeriodControl.valueChanges.pipe(it(this.ngUnsubscribe),Cr(500),Oe(()=>this.reloadPeriodControl.valid)).subscribe(()=>{this.reloadPeriodControl.valid&&this.reloadPeriodInMsChanged.emit(1e3*this.reloadPeriodControl.value)}),this.paginationControl.valueChanges.pipe(it(this.ngUnsubscribe),Cr(500),Oe(()=>this.paginationControl.valid)).subscribe(()=>{this.pageSizeChanged.emit(this.paginationControl.value)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnChanges(e){if(e.reloadPeriodInMs){let i=e.reloadPeriodInMs;i.previousValue!==i.currentValue&&this.reloadPeriodControl.setValue(i.currentValue/1e3)}if(e.reloadEnabled&&(e.reloadEnabled.currentValue?this.reloadPeriodControl.enable():this.reloadPeriodControl.disable()),e.pageSize){let i=e.pageSize;i.previousValue!==i.currentValue&&this.paginationControl.setValue(i.currentValue)}}onReloadToggle(){this.reloadToggled.emit()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["settings-dialog-component"]],inputs:{reloadEnabled:"reloadEnabled",reloadPeriodInMs:"reloadPeriodInMs",pageSize:"pageSize"},outputs:{reloadToggled:"reloadToggled",reloadPeriodInMsChanged:"reloadPeriodInMsChanged",pageSizeChanged:"pageSizeChanged"},features:[qt],decls:18,vars:5,consts:[[1,"reload-toggle"],[3,"checked","change"],["matInput","","type","number",1,"reload-period",3,"formControl"],[4,"ngIf"],["subscriptSizing","dynamic"],["matInput","","type","number",1,"page-size",3,"formControl"]],template:function(e,i){1&e&&(f(0,"h3"),T(1,"Settings"),g(),f(2,"div")(3,"div",0)(4,"mat-checkbox",1),A("change",function(){return i.onReloadToggle()}),T(5,"Reload data"),g()(),f(6,"div")(7,"mat-form-field")(8,"mat-label"),T(9,"Reload Period (seconds)"),g(),k(10,"input",2),g(),S(11,Gxe,2,1,"mat-error",3),g()(),f(12,"div")(13,"mat-form-field",4)(14,"mat-label"),T(15,"Pagination Limit"),g(),k(16,"input",5),g(),S(17,Wxe,2,0,"mat-error",3),g()),2&e&&(v(4),b("checked",i.reloadEnabled),v(6),b("formControl",i.reloadPeriodControl),v(1),b("ngIf",i.reloadPeriodControl.hasError("min")||i.reloadPeriodControl.hasError("required")),v(5),b("formControl",i.paginationControl),v(1),b("ngIf",i.paginationControl.invalid))},dependencies:[Ne,Uu,j2,xg,W2,xs,qu,Pc,nl,k9],styles:["[_nghost-%COMP%] {\n  font-size: 15px;\n}\n\n[_nghost-%COMP%]    > div[_ngcontent-%COMP%] {\n  margin: 16px 0;\n}\n\nh3[_ngcontent-%COMP%] {\n  font-size: 20px;\n  margin: 0;\n}\n\n.reload-toggle[_ngcontent-%COMP%] {\n  margin-bottom: 16px;\n}\n\nmat-form-field[_ngcontent-%COMP%] {\n  width: 100%;\n}"]}),n})(),$q=(()=>{class n{constructor(e){this.store=e,this.reloadEnabled$=this.store.select(Av),this.reloadPeriodInMs$=this.store.select(Rv),this.pageSize$=this.store.select(Mh)}onReloadToggled(){this.store.dispatch(x1())}onReloadPeriodInMsChanged(e){this.store.dispatch(C1({periodInMs:e}))}onPageSizeChanged(e){this.store.dispatch(M1({size:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["settings-dialog"]],decls:4,vars:9,consts:[[3,"reloadEnabled","reloadPeriodInMs","pageSize","reloadToggled","reloadPeriodInMsChanged","pageSizeChanged"]],template:function(e,i){1&e&&(f(0,"settings-dialog-component",0),A("reloadToggled",function(){return i.onReloadToggled()})("reloadPeriodInMsChanged",function(o){return i.onReloadPeriodInMsChanged(o)})("pageSizeChanged",function(o){return i.onPageSizeChanged(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("reloadEnabled",G(1,3,i.reloadEnabled$))("reloadPeriodInMs",G(2,5,i.reloadPeriodInMs$))("pageSize",G(3,7,i.pageSize$))},dependencies:[Jq,ct],encapsulation:2}),n})(),eX=(()=>{class n{constructor(e){this.dialog=e}isButtonDisabled(){return this.settingsLoadState===Re.NOT_LOADED||this.settingsLoadState===Re.LOADING}openDialog(){this.dialog.open($q,{width:"400px"})}}return n.\u0275fac=function(e){return new(e||n)(C(ys))},n.\u0275cmp=P({type:n,selectors:[["settings-button-component"]],inputs:{settingsLoadState:"settingsLoadState"},decls:2,vars:1,consts:[["mat-icon-button","",3,"disabled","click"],["svgIcon","settings_24px"]],template:function(e,i){1&e&&(f(0,"button",0),A("click",function(){return i.openDialog()}),k(1,"mat-icon",1),g()),2&e&&b("disabled",i.isButtonDisabled())},dependencies:[Er,bn],encapsulation:2}),n})(),tX=(()=>{class n{constructor(e){this.store=e,this.settingsLoadState$=this.store.select(i2)}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["settings-button"]],decls:2,vars:3,consts:[[3,"settingsLoadState"]],template:function(e,i){1&e&&(k(0,"settings-button-component",0),U(1,"async")),2&e&&b("settingsLoadState",G(1,1,i.settingsLoadState$))},dependencies:[eX,ct],encapsulation:2}),n})(),Zxe=["mat-menu-item",""];function Kxe(n,t){1&n&&(qn(),f(0,"svg",3),k(1,"polygon",4),g())}var Jxe=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],$xe=["mat-icon, [matMenuItemIcon]","*"];function eCe(n,t){if(1&n){let e=Te();f(0,"div",0),A("keydown",function(r){return ne(e),ie(w()._handleKeydown(r))})("click",function(){return ne(e),ie(w().closed.emit("click"))})("@transformMenu.start",function(r){return ne(e),ie(w()._onAnimationStart(r))})("@transformMenu.done",function(r){return ne(e),ie(w()._onAnimationDone(r))}),f(1,"div",1),Tt(2),g()()}if(2&n){let e=w();b("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Be("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var tCe=["*"],K2=new te("MAT_MENU_PANEL"),nCe=go(ao(class{})),Ed=(()=>{class n extends nCe{constructor(e,i,r,o,a){super(),this._elementRef=e,this._document=i,this._focusMonitor=r,this._parentMenu=o,this._changeDetectorRef=a,this.role="menuitem",this._hovered=new Ee,this._focused=new Ee,this._highlighted=!1,this._triggersSubmenu=!1,o?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r<i.length;r++)i[r].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef?.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef?.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Nt),C(fo),C(K2,8),C(Qt))},n.\u0275cmp=P({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-mdc-focus-indicator","mdc-list-item"],hostVars:8,hostBindings:function(e,i){1&e&&A("click",function(o){return i._checkDisabled(o)})("mouseenter",function(){return i._handleMouseEnter()}),2&e&&(Be("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled)("disabled",i.disabled||null),nt("mat-mdc-menu-item-highlighted",i._highlighted)("mat-mdc-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[Xe],attrs:Zxe,ngContentSelectors:$xe,decls:5,vars:3,consts:[[1,"mdc-list-item__primary-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["class","mat-mdc-menu-submenu-icon","viewBox","0 0 5 10","focusable","false",4,"ngIf"],["viewBox","0 0 5 10","focusable","false",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(e,i){1&e&&(fn(Jxe),Tt(0),f(1,"span",0),Tt(2,1),g(),k(3,"div",1),S(4,Kxe,2,0,"svg",2)),2&e&&(v(3),b("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),v(1),b("ngIf",i._triggersSubmenu))},dependencies:[Ne,Ki],encapsulation:2,changeDetection:0}),n})(),iCe=new te("MatMenuContent"),_E={transformMenu:fr("transformMenu",[Si("void",rn({opacity:0,transform:"scale(0.8)"})),bi("void => enter",Mi("120ms cubic-bezier(0, 0, 0.2, 1)",rn({opacity:1,transform:"scale(1)"}))),bi("* => void",Mi("100ms 25ms linear",rn({opacity:0})))]),fadeInItems:fr("fadeInItems",[Si("showing",rn({opacity:1})),bi("void => *",[rn({opacity:0}),Mi("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},rCe=0,iX=new te("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),oy=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(e){this._overlapTrigger=vt(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=vt(e)}set panelClass(e){let i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(e,i,r,o){this._elementRef=e,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=o,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new Pa,this._classList={},this._panelAnimationState="void",this._animationDone=new Ee,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new F,this.close=this.closed,this.panelId="mat-menu-panel-"+rCe++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new ku(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(kn(this._directDescendantItems),Jn(e=>tn(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){let r=e.toArray(),o=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[o]&&!r[o].disabled?i.setActiveItem(o):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(kn(this._directDescendantItems),Jn(i=>tn(...i.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,r=this._keyManager;switch(i){case 27:Or(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(e)}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(Lt(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){let r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){let i=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${i}`,o=Object.keys(this._classList).find(a=>a.startsWith(this._elevationPrefix));(!o||o===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(e=this.xPosition,i=this.yPosition){let r=this._classList;r["mat-menu-before"]="before"===e,r["mat-menu-after"]="after"===e,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(kn(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ot),C(iX),C(Qt))},n.\u0275dir=Me({type:n,contentQueries:function(e,i,r){if(1&e&&(Bn(r,iCe,5),Bn(r,Ed,5),Bn(r,Ed,4)),2&e){let o;be(o=ve())&&(i.lazyContent=o.first),be(o=ve())&&(i._allItems=o),be(o=ve())&&(i.items=o)}},viewQuery:function(e,i){if(1&e&&Ue(oi,5),2&e){let r;be(r=ve())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),Xu=(()=>{class n extends oy{constructor(e,i,r,o){super(e,i,r,o),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ot),C(iX),C(Qt))},n.\u0275cmp=P({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,i){2&e&&Be("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Vt([{provide:K2,useExisting:n}]),Xe],ngContentSelectors:tCe,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(e,i){1&e&&(fn(),S(0,eCe,3,6,"ng-template"))},dependencies:[wn],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[_E.transformMenu,_E.fadeInItems]},changeDetection:0}),n})(),rX=new te("mat-menu-scroll-strategy"),sCe={provide:rX,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},nX=za({passive:!0}),lCe=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,i,r,o,a,s,l,c,d){this._overlay=e,this._element=i,this._viewContainerRef=r,this._menuItemInstance=s,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=En.EMPTY,this._hoverSubscription=En.EMPTY,this._menuCloseSubscription=En.EMPTY,this._changeDetectorRef=$n(Qt),this._handleTouchStart=u=>{Vv(u)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new F,this.onMenuOpen=this.menuOpened,this.menuClosed=new F,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=a instanceof oy?a:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,nX)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,nX),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=this.menu;if(this._menuOpen||!e)return;let i=this._createOverlay(e),r=i.getConfig(),o=r.positionStrategy;this._setPosition(e,o),r.hasBackdrop=null==e.hasBackdrop?!this.triggersSubmenu():e.hasBackdrop,i.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof oy&&(e._startAnimation(),e._directDescendantItems.changes.pipe(it(e.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;let i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===e||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof oy?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(Oe(r=>"void"===r.toState),Lt(1),it(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let i=0,r=e.parentMenu;for(;r;)i++,r=r.parentMenu;e.setElevation(i)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new el({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(r=>{let o="start"===r.connectionPair.overlayX?"after":"before",a="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(o,a)):e.setPositionClasses(o,a)})}_setPosition(e,i){let[r,o]="before"===e.xPosition?["end","start"]:["start","end"],[a,s]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[a,s],[d,u]=[r,o],p=0;if(this.triggersSubmenu()){if(u=r="before"===e.xPosition?"start":"end",o=d="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){let h=this._parentMaterialMenu.items.first;this._parentInnerPadding=h?h._getHostElement().offsetTop:0}p="bottom"===a?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(l="top"===a?"bottom":"top",c="top"===s?"bottom":"top");i.withPositions([{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:p},{originX:o,originY:l,overlayX:u,overlayY:a,offsetY:p},{originX:r,originY:c,overlayX:d,overlayY:s,offsetY:-p},{originX:o,originY:c,overlayX:u,overlayY:s,offsetY:-p}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return tn(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:$t(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Oe(a=>a!==this._menuItemInstance),Oe(()=>this._menuOpen)):$t(),i)}_handleMousedown(e){Bv(e)||(this._openedBy=0===e.button?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let i=e.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Oe(e=>e===this._menuItemInstance&&!e.disabled),Rs(0,Nm)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof oy&&this.menu._isAnimating?this.menu._animationDone.pipe(Lt(1),Rs(0,Nm),it(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new To(e.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(e){return new(e||n)(C(Oi),C(xe),C(ei),C(rX),C(K2,8),C(Ed,10),C(zi,8),C(fo),C(ot))},n.\u0275dir=Me({type:n,hostVars:3,hostBindings:function(e,i){1&e&&A("click",function(o){return i._handleClick(o)})("mousedown",function(o){return i._handleMousedown(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&Be("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),Yu=(()=>{class n extends lCe{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[Xe]}),n})(),Qu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[sCe],imports:[De,_a,dn,Do,Ic,dn]}),n})();function cCe(n,t){1&n&&k(0,"mat-icon",8)}function dCe(n,t){1&n&&k(0,"mat-icon",9)}function uCe(n,t){1&n&&k(0,"mat-icon",10)}var Ya=(()=>(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.DARK_MODE_ON=1]="DARK_MODE_ON",n[n.DARK_MODE_OFF=2]="DARK_MODE_OFF"}(Ya||(Ya={})),Ya))(),oX=(()=>{class n{constructor(){this.DarkModeOverride=Ya,this.onOverrideChanged=new F}getButtonTitle(){let e;switch(this.darkModeOverride){case Ya.DEFAULT:e="Browser default";break;case Ya.DARK_MODE_ON:e="Dark mode";break;case Ya.DARK_MODE_OFF:e="Light mode"}return`Current mode: [${e}]. Switch between browser default, light, or dark theme.`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["app-header-dark-mode-toggle-component"]],inputs:{darkModeOverride:"darkModeOverride"},outputs:{onOverrideChanged:"onOverrideChanged"},decls:15,vars:6,consts:[["mat-icon-button","","aria-label","Menu for changing light or dark theme",3,"matMenuTriggerFor","ngSwitch","title"],["svgIcon","brightness_6_24px",4,"ngSwitchCase"],["svgIcon","light_mode_24px",4,"ngSwitchCase"],["svgIcon","dark_mode_24px",4,"ngSwitchCase"],["menu","matMenu"],["mat-menu-item","","title","Set the theme to match the default mode in the browser.",3,"click"],["mat-menu-item","","title","Force light TensorBoard theme.",3,"click"],["mat-menu-item","","title","Force dark TensorBoard theme.",3,"click"],["svgIcon","brightness_6_24px"],["svgIcon","light_mode_24px"],["svgIcon","dark_mode_24px"]],template:function(e,i){1&e&&(f(0,"button",0),S(1,cCe,1,0,"mat-icon",1),S(2,dCe,1,0,"mat-icon",2),S(3,uCe,1,0,"mat-icon",3),g(),f(4,"mat-menu",null,4)(6,"button",5),A("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DEFAULT)}),f(7,"label"),T(8,"Browser default"),g()(),f(9,"button",6),A("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_OFF)}),f(10,"label"),T(11,"Light"),g()(),f(12,"button",7),A("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_ON)}),f(13,"label"),T(14,"Dark"),g()()()),2&e&&(b("matMenuTriggerFor",st(5))("ngSwitch",i.darkModeOverride)("title",i.getButtonTitle()),v(1),b("ngSwitchCase",i.DarkModeOverride.DEFAULT),v(1),b("ngSwitchCase",i.DarkModeOverride.DARK_MODE_OFF),v(1),b("ngSwitchCase",i.DarkModeOverride.DARK_MODE_ON))},dependencies:[Er,bn,Xu,Ed,Yu,mr,kr],encapsulation:2}),n})(),aX=(()=>{class n{constructor(e){this.store=e,this.darkModeOverride$=this.store.select(cS).pipe(q(i=>null===i?Ya.DEFAULT:i?Ya.DARK_MODE_ON:Ya.DARK_MODE_OFF))}changeDarkMode(e){let i=null;switch(e){case Ya.DEFAULT:i=null;break;case Ya.DARK_MODE_OFF:i=!1;break;case Ya.DARK_MODE_ON:i=!0}this.store.dispatch(ZS({enableDarkMode:i}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["app-header-dark-mode-toggle"]],decls:2,vars:3,consts:[[3,"darkModeOverride","onOverrideChanged"]],template:function(e,i){1&e&&(f(0,"app-header-dark-mode-toggle-component",0),A("onOverrideChanged",function(o){return i.changeDarkMode(o)}),U(1,"async"),g()),2&e&&b("darkModeOverride",G(1,1,i.darkModeOverride$))},dependencies:[oX,ct],encapsulation:2}),n})();function mCe(n,t){}var fCe=function(n){return{animationDuration:n}},gCe=function(n,t){return{value:n,params:t}};function _Ce(n,t){1&n&&Tt(0)}var cX=["*"],bCe=["tabListContainer"],vCe=["tabList"],yCe=["tabListInner"],xCe=["nextPaginator"],CCe=["previousPaginator"],MCe=["tabBodyWrapper"],wCe=["tabHeader"];function SCe(n,t){}function ECe(n,t){1&n&&S(0,SCe,0,0,"ng-template",14),2&n&&b("cdkPortalOutlet",w().$implicit.templateLabel)}function TCe(n,t){1&n&&T(0),2&n&&kt(w().$implicit.textLabel)}function DCe(n,t){if(1&n){let e=Te();f(0,"div",6,7),A("click",function(){let r=ne(e),o=r.$implicit,a=r.index,s=w(),l=st(1);return ie(s._handleClick(o,l,a))})("cdkFocusChange",function(r){let a=ne(e).index;return ie(w()._tabFocusChanged(r,a))}),k(2,"span",8)(3,"div",9),f(4,"span",10)(5,"span",11),S(6,ECe,1,1,"ng-template",12),S(7,TCe,1,1,"ng-template",null,13,jt),g()()()}if(2&n){let e=t.$implicit,i=t.index,r=st(1),o=st(8),a=w();nt("mdc-tab--active",a.selectedIndex===i),b("id",a._getTabLabelId(i))("ngClass",e.labelClass)("disabled",e.disabled)("fitInkBarToContent",a.fitInkBarToContent),Be("tabIndex",a._getTabIndex(i))("aria-posinset",i+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(i))("aria-selected",a.selectedIndex===i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),v(3),b("matRippleTrigger",r)("matRippleDisabled",e.disabled||a.disableRipple),v(3),b("ngIf",e.templateLabel)("ngIfElse",o)}}function ICe(n,t){if(1&n){let e=Te();f(0,"mat-tab-body",15),A("_onCentered",function(){return ne(e),ie(w()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return ne(e),ie(w()._setTabBodyWrapperHeight(r))}),g()}if(2&n){let e=t.$implicit,i=t.index,r=w();nt("mat-mdc-tab-body-active",r.selectedIndex===i),b("id",r._getTabContentId(i))("ngClass",e.bodyClass)("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),Be("tabindex",null!=r.contentTabIndex&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))}}var ACe={translateTab:fr("translateTab",[Si("center, void, left-origin-center, right-origin-center",rn({transform:"none"})),Si("left",rn({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Si("right",rn({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),bi("* => left, * => right, left => center, right => center",Mi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),bi("void => left-origin-center",[rn({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Mi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),bi("void => right-origin-center",[rn({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Mi("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},RCe=(()=>{class n extends ba{constructor(e,i,r,o){super(e,i,o),this._host=r,this._centeringSub=En.EMPTY,this._leavingSub=En.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(kn(this._host._isCenterPosition(this._host._position))).subscribe(e=>{e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(ho),C(ei),C(Wn(()=>dX)),C(Nt))},n.\u0275dir=Me({type:n,selectors:[["","matTabBodyHost",""]],features:[Xe]}),n})(),PCe=(()=>{class n{set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(e,i,r){this._elementRef=e,this._dir=i,this._dirChangeSubscription=En.EMPTY,this._translateTabComplete=new Ee,this._onCentering=new F,this._beforeCentering=new F,this._afterLeavingCenter=new F,this._onCentered=new F(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(o=>{this._computePositionAnimationState(o),r.markForCheck()})),this._translateTabComplete.pipe(ri((o,a)=>o.fromState===a.fromState&&o.toState===a.toState)).subscribe(o=>{this._isCenterPosition(o.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(o.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){let i=this._isCenterPosition(e.toState);this._beforeCentering.emit(i),i&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(e){return"center"==e||"left-origin-center"==e||"right-origin-center"==e}_computePositionAnimationState(e=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==e?"left":"right":this._positionIndex>0?"ltr"==e?"right":"left":"center"}_computePositionFromOrigin(e){let i=this._getLayoutDirection();return"ltr"==i&&e<=0||"rtl"==i&&e>0?"left-origin-center":"right-origin-center"}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(zi,8),C(Qt))},n.\u0275dir=Me({type:n,inputs:{_content:["content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),n})(),dX=(()=>{class n extends PCe{constructor(e,i,r){super(e,i,r)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(zi,8),C(Qt))},n.\u0275cmp=P({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(1&e&&Ue(ba,5),2&e){let r;be(r=ve())&&(i._portalHost=r.first)}},hostAttrs:[1,"mat-mdc-tab-body"],features:[Xe],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-mdc-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(e,i){1&e&&(f(0,"div",0,1),A("@translateTab.start",function(o){return i._onTranslateTabStarted(o)})("@translateTab.done",function(o){return i._translateTabComplete.next(o)}),S(2,mCe,0,0,"ng-template",2),g()),2&e&&b("@translateTab",So(3,gCe,i._position,Un(1,fCe,i.animationDuration)))},dependencies:[RCe],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[ACe.translateTab]}}),n})(),kCe=new te("MatTabContent"),OCe=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(C(oi))},n.\u0275dir=Me({type:n,selectors:[["","matTabContent",""]],features:[Vt([{provide:kCe,useExisting:n}])]}),n})(),FCe=new te("MatTabLabel"),uX=new te("MAT_TAB"),tN=(()=>{class n extends G7{constructor(e,i,r){super(e,i),this._closestTab=r}}return n.\u0275fac=function(e){return new(e||n)(C(oi),C(ei),C(uX,8))},n.\u0275dir=Me({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[Vt([{provide:FCe,useExisting:n}]),Xe]}),n})(),J2="mdc-tab-indicator--active",sX="mdc-tab-indicator--no-transition";function pX(n){return class extends n{constructor(...t){super(...t),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){let e=vt(t);this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this.elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement)return void e.classList.add(J2);let i=e.getBoundingClientRect(),r=t.width/i.width,o=t.left-i.left;e.classList.add(sX),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${r})`),e.getBoundingClientRect(),e.classList.remove(sX),e.classList.add(J2),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this.elementRef.nativeElement.classList.remove(J2)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this.elementRef.nativeElement.ownerDocument||document;this._inkBarElement=t.createElement("span"),this._inkBarContentElement=t.createElement("span"),this._inkBarElement.className="mdc-tab-indicator",this._inkBarContentElement.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",this._inkBarElement.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this.elementRef.nativeElement.querySelector(".mdc-tab__content"):this.elementRef.nativeElement).appendChild(this._inkBarElement)}}}new te("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});var LCe=ao(class{}),BCe=(()=>{class n extends LCe{constructor(e){super(),this.elementRef=e}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275dir=Me({type:n,features:[Xe]}),n})(),VCe=pX(BCe),hX=(()=>{class n extends VCe{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){2&e&&(Be("aria-disabled",!!i.disabled),nt("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:"disabled",fitInkBarToContent:"fitInkBarToContent"},features:[Xe]}),n})(),HCe=ao(class{}),mX=new te("MAT_TAB_GROUP"),zCe=(()=>{class n extends HCe{get content(){return this._contentPortal}constructor(e,i){super(),this._viewContainerRef=e,this._closestTabGroup=i,this.textLabel="",this._contentPortal=null,this._stateChanges=new Ee,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new To(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(mX,8))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&Ue(oi,7),2&e){let r;be(r=ve())&&(i._implicitContent=r.first)}},inputs:{textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},features:[Xe,qt]}),n})(),ay=(()=>{class n extends zCe{get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-tab"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,OCe,7,oi),Bn(r,tN,5)),2&e){let o;be(o=ve())&&(i._explicitContent=o.first),be(o=ve())&&(i.templateLabel=o.first)}},inputs:{disabled:"disabled"},exportAs:["matTab"],features:[Vt([{provide:uX,useExisting:n}]),Xe],ngContentSelectors:cX,decls:1,vars:0,template:function(e,i){1&e&&(fn(),S(0,_Ce,1,0,"ng-template"))},encapsulation:2}),n})(),lX=za({passive:!0}),fX=(()=>{class n{get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=vt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=mi(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}constructor(e,i,r,o,a,s,l){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=o,this._ngZone=a,this._platform=s,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Ee,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Ee,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new F,this.indexFocused=new F,a.runOutsideAngular(()=>{Ei(e.nativeElement,"mouseleave").pipe(it(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Ei(this._previousPaginator.nativeElement,"touchstart",lX).pipe(it(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Ei(this._nextPaginator.nativeElement,"touchstart",lX).pipe(it(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let e=this._dir?this._dir.change:$t("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new ku(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(Lt(1)).subscribe(r),tn(e,i,this._items.changes,this._itemsResized()).pipe(it(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?Kr:this._items.changes.pipe(kn(this._items),Jn(e=>new Kt(i=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(o=>i.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),os(1),Oe(e=>e.some(i=>i.contentRect.width>0&&i.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!Or(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let i=this._items.get(this.focusIndex);i&&!i.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return!this._items||!!this._items.toArray()[e]}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let i=this._items?this._items.toArray()[e]:null;if(!i)return;let s,l,r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:a}=i.elementRef.nativeElement;"ltr"==this._getLayoutDirection()?(s=o,l=s+a):(l=this._tabListInner.nativeElement.offsetWidth-o,s=l-a);let c=this.scrollDistance,d=this.scrollDistance+r;s<c?this.scrollDistance-=c-s:l>d&&(this.scrollDistance+=Math.min(l-d,s-c))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),rs(650,100).pipe(it(tn(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:r,distance:o}=this._scrollHeader(e);(0===o||o>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(Wa),C(zi,8),C(ot),C(Vn),C(pi,8))},n.\u0275dir=Me({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),GCe=(()=>{class n extends fX{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=vt(e)}constructor(e,i,r,o,a,s,l){super(e,i,r,o,a,s,l),this._disableRipple=!1}_itemSelected(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(Wa),C(zi,8),C(ot),C(Vn),C(pi,8))},n.\u0275dir=Me({type:n,inputs:{disableRipple:"disableRipple"},features:[Xe]}),n})(),WCe=(()=>{class n extends GCe{constructor(e,i,r,o,a,s,l){super(e,i,r,o,a,s,l)}ngAfterContentInit(){this._inkBar=new class{constructor(t){this._items=t}hide(){this._items.forEach(t=>t.deactivateInkBar())}alignToElement(t){let e=this._items.find(r=>r.elementRef.nativeElement===t),i=this._currentItem;if(i?.deactivateInkBar(),e){let r=i?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(r),this._currentItem=e}}}(this._items),super.ngAfterContentInit()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(Wa),C(zi,8),C(ot),C(Vn),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,hX,4),2&e){let o;be(o=ve())&&(i._items=o)}},viewQuery:function(e,i){if(1&e&&(Ue(bCe,7),Ue(vCe,7),Ue(yCe,7),Ue(xCe,5),Ue(CCe,5)),2&e){let r;be(r=ve())&&(i._tabListContainer=r.first),be(r=ve())&&(i._tabList=r.first),be(r=ve())&&(i._tabListInner=r.first),be(r=ve())&&(i._nextPaginator=r.first),be(r=ve())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==i._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Xe],ngContentSelectors:cX,decls:13,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-mdc-tab-labels"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(fn(),f(0,"button",0,1),A("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),k(2,"div",2),g(),f(3,"div",3,4),A("keydown",function(o){return i._handleKeydown(o)}),f(5,"div",5,6),A("cdkObserveContent",function(){return i._onContentChanges()}),f(7,"div",7,8),Tt(9),g()()(),f(10,"button",9,10),A("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),k(12,"div",2),g()),2&e&&(nt("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),b("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),v(3),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode),v(7),nt("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),b("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Ki,O1],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2}),n})(),gX=new te("MAT_TABS_CONFIG"),qCe=0,XCe=Ko(go(class{constructor(n){this._elementRef=n}}),"primary"),YCe=(()=>{class n extends XCe{get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(e){this._dynamicHeight=vt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=mi(e,null)}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e+"")?e+"ms":e}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=mi(e,null)}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=vt(e)}get preserveContent(){return this._preserveContent}set preserveContent(e){this._preserveContent=vt(e)}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,r,o){super(e),this._changeDetectorRef=i,this._animationMode=o,this._tabs=new Pa,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=En.EMPTY,this._tabLabelSubscription=En.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this._disablePagination=!1,this._preserveContent=!1,this.selectedIndexChange=new F,this.focusChange=new F,this.animationDone=new F,this.selectedTabChange=new F(!0),this._groupId=qCe++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,this.contentTabIndex=r?.contentTabIndex??null,this.preserveContent=!!r?.preserveContent}ngAfterContentChecked(){let e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){let i=null==this._selectedIndex;if(!i){this.selectedTabChange.emit(this._createChangeEvent(e));let r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,o)=>r.isActive=o===e),i||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((i,r)=>{i.position=r-e,null!=this._selectedIndex&&0==i.position&&!i.origin&&(i.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){let r,i=this._tabs.toArray();for(let o=0;o<i.length;o++)if(i[o].isActive){this._indexToSelect=this._selectedIndex=o,this._lastFocusedTabIndex=null,r=i[o];break}!r&&i[e]&&Promise.resolve().then(()=>{i[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(kn(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(i=>i._closestTabGroup===this||!i._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){let i=this._tabHeader;i&&(i.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){let i=new eN;return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=tn(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`mat-tab-label-${this._groupId}-${e}`}_getTabContentId(e){return`mat-tab-content-${this._groupId}-${e}`}_setTabBodyWrapperHeight(e){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;let i=this._tabBodyWrapper.nativeElement;i.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(i.style.height=e+"px")}_removeTabBodyWrapperHeight(){let e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,i,r){i.focusIndex=r,e.disabled||(this.selectedIndex=r)}_getTabIndex(e){return e===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(e,i){e&&"mouse"!==e&&"touch"!==e&&(this._tabHeader.focusIndex=i)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(gX,8),C(pi,8))},n.\u0275dir=Me({type:n,inputs:{dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:"contentTabIndex",disablePagination:"disablePagination",preserveContent:"preserveContent",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[Xe]}),n})(),vE=(()=>{class n extends YCe{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=vt(e),this._changeDetectorRef.markForCheck()}get stretchTabs(){return this._stretchTabs}set stretchTabs(e){this._stretchTabs=vt(e)}constructor(e,i,r,o){super(e,i,r,o),this._fitInkBarToContent=!1,this._stretchTabs=!0,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(gX,8),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,ay,5),2&e){let o;be(o=ve())&&(i._allTabs=o)}},viewQuery:function(e,i){if(1&e&&(Ue(MCe,5),Ue(wCe,5)),2&e){let r;be(r=ve())&&(i._tabBodyWrapper=r.first),be(r=ve())&&(i._tabHeader=r.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:6,hostBindings:function(e,i){2&e&&nt("mat-mdc-tab-group-dynamic-height",i.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===i.headerPosition)("mat-mdc-tab-group-stretch-tabs",i.stretchTabs)},inputs:{color:"color",disableRipple:"disableRipple",fitInkBarToContent:"fitInkBarToContent",stretchTabs:["mat-stretch-tabs","stretchTabs"]},exportAs:["matTabGroup"],features:[Vt([{provide:mX,useExisting:n}]),Xe],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mdc-tab mat-mdc-tab mat-mdc-focus-indicator","role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange",4,"ngFor","ngForOf"],[1,"mat-mdc-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange"],["tabNode",""],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"ngIf","ngIfElse"],["tabTextLabel",""],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering"]],template:function(e,i){1&e&&(f(0,"mat-tab-header",0,1),A("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),S(2,DCe,9,17,"div",2),g(),f(3,"div",3,4),S(5,ICe,1,11,"mat-tab-body",5),g()),2&e&&(b("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),v(2),b("ngForOf",i._tabs),v(1),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode),v(2),b("ngForOf",i._tabs))},dependencies:[wn,nn,Ne,ba,Ki,A7,dX,hX,WCe],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-tab.mdc-tab{height:48px;flex-grow:0}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.mat-mdc-tab .mdc-tab__text-label{display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-disabled{opacity:.4}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-mdc-tab-header-with-background-background-color, transparent)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2}),n})(),eN=class{},QCe=0,ZCe=(()=>{class n extends fX{get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=vt(e)}constructor(e,i,r,o,a,s,l){super(e,o,a,i,r,s,l),this._disableRipple=!1,this.color="primary"}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(kn(null),it(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;let e=this._items.toArray();for(let i=0;i<e.length;i++)if(e[i].active)return this.selectedIndex=i,this._changeDetectorRef.markForCheck(),void(this.tabPanel&&(this.tabPanel._activeTabId=e[i].id));this.selectedIndex=-1,this._inkBar.hide()}_getRole(){return this.tabPanel?"tablist":this._elementRef.nativeElement.getAttribute("role")}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(zi,8),C(ot),C(Qt),C(Wa),C(Vn),C(pi,8))},n.\u0275dir=Me({type:n,inputs:{backgroundColor:"backgroundColor",disableRipple:"disableRipple",color:"color",tabPanel:"tabPanel"},features:[Xe]}),n})(),KCe=Dc(go(ao(class{}))),JCe=(()=>{class n extends KCe{get active(){return this._isActive}set active(e){let i=vt(e);i!==this._isActive&&(this._isActive=i,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}constructor(e,i,r,o,a,s){super(),this._tabNavBar=e,this.elementRef=i,this._focusMonitor=a,this._isActive=!1,this.id="mat-tab-link-"+QCe++,this.rippleConfig=r||{},this.tabIndex=parseInt(o)||0,"NoopAnimations"===s&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){this._tabNavBar.tabPanel&&32===e.keyCode&&this.elementRef.nativeElement.click()}_getAriaControls(){return this._tabNavBar.tabPanel?this._tabNavBar.tabPanel?.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.tabIndex}}return n.\u0275fac=function(e){return new(e||n)(C(ZCe),C(xe),C(Th,8),Mo("tabindex"),C(fo),C(pi,8))},n.\u0275dir=Me({type:n,inputs:{active:"active",id:"id"},features:[Xe]}),n})(),yE=(pX(JCe),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,dn,Bl,_a,og,pg,dn]}),n})());function $Ce(n,t){if(1&n){let e=Te();f(0,"span",5),A("click",function(r){ne(e);let o=w().$implicit;return ie(w().onActivePluginSelection(r,o.id))}),T(1),g()}if(2&n){let e=w().$implicit;Be("data-plugin-id",e.id),v(1),Ve(" ",e.tab_name," ")}}function eMe(n,t){1&n&&(f(0,"mat-tab",3),S(1,$Ce,2,2,"ng-template",4),g()),2&n&&b("disabled",!t.$implicit.enabled)}function tMe(n,t){if(1&n&&(f(0,"mat-option",9),T(1),g()),2&n){let e=t.$implicit;b("value",e.id),Be("data-plugin-id",e.id),v(1),Ve(" ",e.tab_name," ")}}function nMe(n,t){if(1&n){let e=Te();f(0,"mat-form-field",6)(1,"mat-label"),T(2,"Inactive"),g(),f(3,"mat-select",7),A("selectionChange",function(r){return ne(e),ie(w().onDisabledPluginSelectionChanged(r))}),S(4,tMe,2,3,"mat-option",8),g()()}if(2&n){let e=w();v(3),b("value",e.selectedPlugin)("hideSingleSelectionIndicator",!0),v(1),b("ngForOf",e.disabledPlugins)}}var bX=(()=>{class n{constructor(){this.onPluginSelectionChanged=new F}getActivePluginIndex(){return this.activePlugins.findIndex(({id:e})=>e===this.selectedPlugin)}onActivePluginSelection(e,i){e.stopPropagation(),this.onPluginSelectionChanged.emit(i)}onDisabledPluginSelectionChanged(e){this.onPluginSelectionChanged.emit(e.value)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["plugin-selector-component"]],inputs:{activePlugins:"activePlugins",disabledPlugins:"disabledPlugins",selectedPlugin:"selectedPlugin"},outputs:{onPluginSelectionChanged:"onPluginSelectionChanged"},decls:3,vars:3,consts:[["mat-stretch-tabs","false","animationDuration","100ms",1,"active-plugin-list",3,"selectedIndex"],[3,"disabled",4,"ngFor","ngForOf"],["floatLabel","never","subscriptSizing","dynamic",4,"ngIf"],[3,"disabled"],["mat-tab-label",""],[1,"plugin-name",3,"click"],["floatLabel","never","subscriptSizing","dynamic"],[3,"value","hideSingleSelectionIndicator","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,i){1&e&&(f(0,"mat-tab-group",0),S(1,eMe,2,1,"mat-tab",1),g(),S(2,nMe,5,3,"mat-form-field",2)),2&e&&(b("selectedIndex",i.getActivePluginIndex()),v(1),b("ngForOf",i.activePlugins),v(1),b("ngIf",i.disabledPlugins.length>0))},dependencies:[tN,ay,vE,Pc,nl,Wu,ja,nn,Ne],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex:1 1 auto;font-size:14px;height:100%;overflow:hidden}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]    {width:144px}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field{background-color:#f57c00;padding:0 4px}body.dark-mode   [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field{background-color:#ef6c00}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     label.mdc-floating-label.mat-mdc-floating-label, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select-value, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select-arrow{color:inherit}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-color:inherit}mat-label[_ngcontent-%COMP%], mat-select[_ngcontent-%COMP%], mat-option[_ngcontent-%COMP%]{font-size:14px;font-weight:500;text-transform:uppercase}.active-plugin-list[_ngcontent-%COMP%]{align-self:stretch;flex:1 1 auto;overflow:hidden}.plugin-name[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:100%;justify-content:center;padding:0 12px;width:100%}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab__text-label{color:inherit;opacity:.7}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:inherit;opacity:1}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination{color:inherit}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination-chevron{border-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination-disabled{visibility:hidden}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-disabled{display:none}[_nghost-%COMP%]     .active-plugin-list mat-mdc-tab-list, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-labels, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header .mat-mdc-tab, [_nghost-%COMP%]     .active-plugin-list .mdc-tab__text-label{height:100%}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab{letter-spacing:.25px;min-width:48px;padding:0;text-transform:uppercase}[_nghost-%COMP%]     .active-plugin-list mat-tab-header .mat-mdc-tab-list{padding:0 36px}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:first-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>:last-child{bottom:0;position:absolute;top:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:first-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container{left:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:last-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container{right:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-header-pagination{background-color:#f57c00}body.dark-mode   [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-header-pagination{background-color:#ef6c00}"]}),n})(),vX=W(Gf,n=>Object.keys(n).map(t=>Object.assign({},{id:t},n[t]))),rMe=W(vX,n=>n.filter(t=>!t.enabled)),yX=(()=>{class n{constructor(e){this.store=e,this.activePlugin$=this.store.pipe(un(Zo)),this.plugins$=this.store.pipe(un(vX)),this.disabledPlugins$=this.store.pipe(un(rMe))}onPluginSelectionChange(e){this.store.dispatch(yc({plugin:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["plugin-selector"]],decls:4,vars:9,consts:[[3,"activePlugins","disabledPlugins","selectedPlugin","onPluginSelectionChanged"]],template:function(e,i){1&e&&(f(0,"plugin-selector-component",0),A("onPluginSelectionChanged",function(o){return i.onPluginSelectionChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("activePlugins",G(1,3,i.plugins$))("disabledPlugins",G(2,5,i.disabledPlugins$))("selectedPlugin",G(3,7,i.activePlugin$))},dependencies:[bX,ct],encapsulation:2}),n})(),aMe=W(Gf,Zo,(n,t)=>!(!t||!n[t])&&n[t].disable_reload),xX=(()=>{class n{constructor(e){this.store=e,this.reloadDisabled$=this.store.select(aMe),this.isReloading$=this.store.select(L6).pipe(Vi(this.reloadDisabled$),q(([i,r])=>!r&&i===Re.LOADING)),this.lastLoadedTimeInMs$=this.store.select(jf)}triggerReload(){this.store.dispatch(Ba())}getReloadTitle(e){return e?`Last Updated: ${e}`:"Loading..."}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["app-header-reload"]],decls:6,vars:13,consts:[["mat-icon-button","",1,"reload-button",3,"title","disabled","click"],["svgIcon","refresh_24px",1,"refresh-icon"]],template:function(e,i){1&e&&(f(0,"button",0),A("click",function(){return i.triggerReload()}),U(1,"async"),U(2,"date"),U(3,"async"),U(4,"async"),k(5,"mat-icon",1),g()),2&e&&(nt("loading",G(1,4,i.isReloading$)),b("title",i.getReloadTitle(Jp(2,6,G(3,9,i.lastLoadedTimeInMs$),"medium")))("disabled",G(4,11,i.reloadDisabled$)))},dependencies:[Er,bn,ct,wf],styles:[".reload-button[_ngcontent-%COMP%], .refresh-icon[_ngcontent-%COMP%] {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n      }\n\n      .reload-button.loading[_ngcontent-%COMP%] {\n        animation: _ngcontent-%COMP%_rotate 2s linear infinite;\n      }\n\n      @keyframes _ngcontent-%COMP%_rotate {\n        0% {\n          transform: rotate(0deg);\n        }\n        50% {\n          transform: rotate(180deg);\n        }\n        100% {\n          transform: rotate(360deg);\n        }\n      }"]}),n})(),CX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["app-header"]],decls:9,vars:0,consts:[[1,"brand"],[1,"plugins"],["mat-icon-button","","href","https://github.com/tensorflow/tensorboard/blob/master/README.md","rel","noopener noreferrer","target","_blank","aria-label","Help",1,"readme"],["svgIcon","help_outline_24px"]],template:function(e,i){1&e&&(f(0,"mat-toolbar")(1,"span",0),T(2,"TensorBoard"),g(),k(3,"plugin-selector",1)(4,"app-header-dark-mode-toggle")(5,"app-header-reload")(6,"settings-button"),f(7,"a",2),k(8,"mat-icon",3),g()())},dependencies:[j7,bn,jq,tX,aX,yX,xX],styles:["mat-toolbar[_ngcontent-%COMP%]{align-items:center;color:#fff;display:flex;height:64px;overflow:hidden;width:100%}.brand[_ngcontent-%COMP%], .readme[_ngcontent-%COMP%], app-header-reload[_ngcontent-%COMP%], settings-button[_ngcontent-%COMP%]{flex:0 0 auto}.brand[_ngcontent-%COMP%]{letter-spacing:-0.025em;margin-left:10px;text-rendering:optimizeLegibility}.plugins[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1 1 auto;font-size:14px;height:100%;overflow:hidden}"]}),n})(),dMe_setDocumentTitle=function(n){document.title=n},MX=(()=>{class n{ngOnChanges(e){e.title&&dMe_setDocumentTitle(e.title.currentValue)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["page-title-component"]],inputs:{title:"title"},features:[qt],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),wX="TensorBoard",SX=(()=>{class n{constructor(e,i){this.store=e,this.customBrandName=i,this.getExperimentId$=this.store.select(or).pipe(q(r=>r?.[0])),this.experimentName$=this.getExperimentId$.pipe(Oe(Boolean),xn(r=>this.store.select(US,{experimentId:r})),q(r=>r?r.name:null)),this.title$=this.store.select(CS).pipe(Vi(this.store.select(Ws),this.experimentName$),q(([r,o,a])=>{let s=this.customBrandName||wX;return r.window_title?r.window_title:o===Cn.EXPERIMENT&&a?`${a} - ${s}`:s}),kn(this.customBrandName||wX),ri())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(I6,8))},n.\u0275cmp=P({type:n,selectors:[["page-title"]],decls:2,vars:3,consts:[[3,"title"]],template:function(e,i){1&e&&(k(0,"page-title-component",0),U(1,"async")),2&e&&b("title",G(1,1,i.title$))},dependencies:[MX,ct],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),EX=(()=>{class n{constructor(e){this.store=e,this.ngUnsubscribe=new Ee,this.paginatedViewStore=document.createElement("tf-paginated-view-store").tf_paginated_view,this.getPageSize$=this.store.pipe(un(Mh))}ngOnInit(){this.getPageSize$.pipe(it(this.ngUnsubscribe),ri()).subscribe(e=>{this.paginatedViewStore.setLimit(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["settings-polymer-interop"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),TX=(()=>{class n{constructor(e){this.vcRef=e}}return n.\u0275fac=function(e){return new(e||n)(C(ei))},n.\u0275cmp=P({type:n,selectors:[["tb-webapp"]],decls:9,vars:0,template:function(e,i){1&e&&(k(0,"app-header"),f(1,"main"),k(2,"router-outlet"),g(),k(3,"alert-snackbar")(4,"hash-storage")(5,"page-title")(6,"settings-polymer-interop")(7,"dark-mode-supporter")(8,"feature-flag-modal-trigger"))},dependencies:[Pq,Oq,p9,Fq,Lq,CX,SX,EX],styles:["html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;height:100%;margin:0;padding:0}[_nghost-%COMP%]{background:#f5f5f5;display:flex;flex-direction:column;height:100%}app-header[_ngcontent-%COMP%]{box-shadow:0 1px 3px 3px rgba(0,0,0,.25);flex:0 0;z-index:1}body.dark-mode[_nghost-%COMP%]   app-header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   app-header[_ngcontent-%COMP%]{box-shadow:0 1px 3px 3px rgba(255,255,255,.1)}main[_ngcontent-%COMP%]{flex-grow:1;overflow:auto}"]}),n})(),DX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,kf,Pf,Rl]}),n})(),IX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),AX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:gu,useClass:n6}]}),n})(),RX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,AX]}),n})(),PX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),kX={id:Qw,name:"",start_time:0},fMe=gr({experimentMap:{[kX.id]:kX}});function OX(n,t){return ch({data:fMe})(n,t)}var FX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[wr.forFeature(zS,OX)]}),n})(),NX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Kn,Xa]}),n})(),LX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,NX]}),n})(),BX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Gu,uE,Kn,kc,Hu,ai,rl]}),n})();function gMe(){return W(Av,n=>({autoReload:n}))}function _Me(){return W(Rv,n=>({autoReloadPeriodInMs:n}))}function bMe(){return W(Mh,n=>({pageSize:n}))}var xE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[wr.forFeature(w1,Wq),Ri.defineGlobalSetting(gMe),Ri.defineGlobalSetting(_Me),Ri.defineGlobalSetting(bMe),BX]}),n})(),VX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Kn,ai,yE,Gq,Xa,Qu,De,Qs,xE]}),n})(),HX=(()=>{class n{constructor(e,i){let r=e.bypassSecurityTrustResourceUrl("./icon_bundle.svg");i.addSvgIconSet(r)}}return n.\u0275fac=function(e){return new(e||n)(O(nh),O(Eg))},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[ai]}),n})(),nN=new te("[plugins] Plugin registry config"),zX=new Map,Oc=(()=>{class n{constructor(e){if(!e)return;let i=new Set(e.map(r=>r.pluginName));console.assert(i.size===e.length,"Cannot register the same plugin multiple times.");for(let r of e){let{pluginName:o,componentClass:a}=r;zX.set(o,a)}}static forPlugin(e,i){return{ngModule:n,providers:[{provide:nN,multi:!0,useValue:{pluginName:e,componentClass:i}}]}}getComponent(e){return zX.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)(O(nN,8))},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),CE=(()=>{class n{constructor(e){this.http=e,this.httpPathPrefix="data/plugin/debugger-v2"}fetchRuns(){return this.http.get(this.httpPathPrefix+"/runs")}fetchExecutionDigests(e,i,r){return this.http.get(this.httpPathPrefix+"/execution/digests",{params:{run:e,begin:String(i),end:String(r)}})}fetchExecutionData(e,i,r){return this.http.get(this.httpPathPrefix+"/execution/data",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphExecutionDigests(e,i,r,o){if(void 0!==o)throw new Error("trace_id is not implemented for fetchGraphExecutionDigests() yet");return this.http.get(this.httpPathPrefix+"/graph_execution/digests",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphExecutionData(e,i,r,o){if(void 0!==o)throw new Error("trace_id is not implemented for fetchGraphExecutionData() yet");return this.http.get(this.httpPathPrefix+"/graph_execution/data",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphOpInfo(e,i,r){return this.http.get(this.httpPathPrefix+"/graphs/op_info",{params:{run:e,graph_id:i,op_name:r}})}fetchSourceFileList(e){return this.http.get(this.httpPathPrefix+"/source_files/list",{params:{run:e}})}fetchSourceFile(e,i){return this.http.get(this.httpPathPrefix+"/source_files/file",{params:{run:e,index:String(i)}})}fetchStackFrames(e,i){return this.http.get(this.httpPathPrefix+"/stack_frames/stack_frames",{params:{run:e,stack_frame_ids:i.join(",")}}).pipe(q(r=>({stack_frames:r.stack_frames.map(o=>function(n){return{host_name:n[0],file_path:n[1],lineno:n[2],function_name:n[3]}}(o))})))}fetchAlerts(e,i,r,o){let a={run:e,begin:String(i),end:String(r)};return void 0!==o&&(a.alert_type=o),this.http.get(this.httpPathPrefix+"/alerts",{params:a})}}return n.\u0275fac=function(e){return new(e||n)(O(Xs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),UX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[CE],imports:[zf]}),n})(),ME=fe("[Debugger] Debugger Loaded"),wE=fe("[Debugger] Debugger Unloaded"),sy=fe("[Debugger] A New Debugger Data Polling Event Begins"),SE=fe("[Debugger] Debugger Runs Requested"),EE=fe("[Debugger] Debugger Runs Loaded",{_as:"props",_p:void 0}),jX=fe("[Debugger] Debugger Runs Request Failed"),ly=fe("[Debugger] Number and Breakdown of Alerts Requested"),TE=fe("[Debugger] Number and Breakdown of Alerts Loaded",{_as:"props",_p:void 0}),DE=fe("[Debugger] Alerts Data of an AlertType Is Loaded",{_as:"props",_p:void 0}),Dg=fe("[Debugger] Alert Type Focus Toggled",{_as:"props",_p:void 0}),IE=fe("[Debugger] Number of Top-Level Executions Requested"),AE=fe("[Debugger] Number of Top-Level Executions Loaded",{_as:"props",_p:void 0}),RE=fe("[Debugger] ExecutionDigests Requested",{_as:"props",_p:void 0}),PE=fe("[Debugger] ExecutionDigests Loaded",{_as:"props",_p:void 0}),Ig=fe("[Debugger] Scroll Leftward on the Execution Timeline"),Ag=fe("[Debugger] Scroll Rightward on the Execution Timeline"),Rg=fe("[Debugger] Scroll the Execution Timeline to Given Index",{_as:"props",_p:void 0}),Pg=fe("[Debugger] Execution Data Objects Being Focused On",{_as:"props",_p:void 0}),kE=fe("[Debugger] Execution Data Objects Loaded",{_as:"props",_p:void 0}),OE=fe("[Debugger] Number of Intra-Graph Executions Requested"),FE=fe("[Debugger] Number of Intra-Graph Executions Loaded",{_as:"props",_p:void 0}),NE=fe("[Debugger] Intra-Graph Execution Data Requested",{_as:"props",_p:void 0}),LE=fe("[Debugger] Intra-Graph Execution Data Loaded",{_as:"props",_p:void 0}),kg=fe("[Debugger] Scroll Intra-Graph Execution List to Given Index",{_as:"props",_p:void 0}),Og=fe("[Debugger] Graph Execution is Focused On",{_as:"props",_p:void 0}),Fg=fe("[Debugger] Graph Op Is Focused On",{_as:"props",_p:void 0}),BE=fe("[Debugger] Graph Op Info Requested",{_as:"props",_p:void 0}),VE=fe("[Debugger] Graph Op Info Loaded",{_as:"props",_p:void 0}),HE=fe("[Debugger] Source File List Requested."),zE=fe("[Debugger] Source File List Loaded",{_as:"props",_p:void 0}),Ng=fe("[Debugger] Source File Line Is Focused on",{_as:"props",_p:void 0}),UE=fe("[Debugger] Source File Requested",{_as:"props",_p:void 0}),jE=fe("[Debugger] Source File Loaded",{_as:"props",_p:void 0}),cy=fe("[Debugger] A Set of Stack Frames Have Been Loaded",{_as:"props",_p:void 0}),dy="debugger",Ao=(()=>(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NO_TENSOR=1]="NO_TENSOR",n[n.CURT_HEALTH=2]="CURT_HEALTH",n[n.CONCISE_HEALTH=3]="CONCISE_HEALTH",n[n.FULL_HEALTH=4]="FULL_HEALTH",n[n.SHAPE=5]="SHAPE",n[n.FULL_NUMERICS=6]="FULL_NUMERICS",n[n.FULL_TENSOR=7]="FULL_TENSOR",n[n.REDUCE_INF_NAN_THREE_SLOTS=8]="REDUCE_INF_NAN_THREE_SLOTS"}(Ao||(Ao={})),Ao))(),Fc=(()=>(function(n){n.FUNCTION_RECOMPILE_ALERT="FunctionRecompilesAlert",n.INF_NAN_ALERT="InfNanAlert",n.TENSOR_SHAPE_ALERT="TensorShapeAlert"}(Fc||(Fc={})),Fc))(),zo=(()=>(function(n){n[n.EXECUTION=0]="EXECUTION",n[n.GRAPH_OP_CREATION=1]="GRAPH_OP_CREATION"}(zo||(zo={})),zo))();function Lg(n){if(null===n.codeLocationFocusType)return null;let t=[];if(n.codeLocationFocusType===zo.EXECUTION){let{focusIndex:i,executionData:r}=n.executions;if(null===i||void 0===r[i])return null;t=r[i].stack_frame_ids}else{if(null===n.graphs.focusedOp)return null;let{graphId:i,opName:r}=n.graphs.focusedOp;if(void 0===n.graphs.ops[i]||!n.graphs.ops[i].has(r))return null;t=n.graphs.ops[i].get(r).stack_frame_ids}let e=[];for(let i of t){if(null==n.stackFrames[i])return null;e.push(n.stackFrames[i])}return e}function uy(n,t){return n.findIndex(e=>e.host_name===t.host_name&&e.file_path===t.file_path)}function rN(n,t,e){if(t>=e)throw new Error(`Expected begin to be less than end, but got begin=${t}, end=${e}`);return n.findIndex(i=>i.begin===t&&i.end===e)}function GE(n){let t=n.sourceCode.focusLineSpec;if(!n.stickToBottommostFrameInFocusedFile)return t;let e=Lg(n);if(null===e)return t;let i=function(n,t){if(null===t)return null;for(let e=n.length-1;e>=0;--e){let i=n[e],{host_name:r,file_path:o}=i;if(r===t.host_name&&o===t.file_path)return i}return null}(e,t);return null===i?t:i}var AMe=gr({runs:{},runsLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},activeRunId:null,lastDataPollOnsetTimeMs:-1,lastNonEmptyPollDataTimeMs:1,alerts:{alertsLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},numAlerts:0,alertsBreakdown:{},alerts:{},executionIndices:{},graphExecutionIndices:{},focusType:null},executions:{numExecutionsLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},executionDigestsLoaded:{loadingRanges:[],numExecutions:0,pageLoadedSizes:{}},displayCount:50,pageSize:100,scrollBeginIndex:0,focusIndex:null,executionDigests:{},executionData:{}},graphExecutions:{numExecutionsLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},executionDigestsLoaded:{loadingRanges:[],numExecutions:0,pageLoadedSizes:{}},displayCount:100,pageSize:200,scrollBeginIndex:0,focusIndex:null,graphExecutionDigests:{},graphExecutionDataLoadingPages:[],graphExecutionDataPageLoadedSizes:{},graphExecutionData:{}},graphs:{ops:{},loadingOps:{},focusedOp:null},stackFrames:{},codeLocationFocusType:null,stickToBottommostFrameInFocusedFile:!1,sourceCode:{sourceFileListLoaded:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},sourceFileList:[],fileContents:[],focusLineSpec:null}},ye(SE,n=>({...n,runsLoaded:{...n.runsLoaded,state:Re.LOADING}})),ye(jX,n=>({...n,runsLoaded:{...n.runsLoaded,state:Re.FAILED}})),ye(EE,(n,{runs:t})=>{let e=Object.keys(t),i=e.length>0&&null===n.activeRunId;return{...n,lastNonEmptyPollDataTimeMs:i?Date.now():n.lastNonEmptyPollDataTimeMs,runs:t,runsLoaded:{state:Re.LOADED,lastLoadedTimeInMs:Date.now()},activeRunId:e.length>0?e[0]:null}}),ye(sy,n=>({...n,lastDataPollOnsetTimeMs:Date.now()})),ye(ly,n=>null===n.activeRunId?n:{...n,alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Re.LOADING}}}),ye(TE,(n,{numAlerts:t,alertsBreakdown:e})=>{if(null===n.activeRunId)return n;let r=t>n.alerts.numAlerts;return{...n,lastNonEmptyPollDataTimeMs:r?Date.now():n.lastNonEmptyPollDataTimeMs,alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Re.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e}}}),ye(DE,(n,{numAlerts:t,alertsBreakdown:e,alertType:i,begin:r,alerts:o})=>{if(null===n.activeRunId)return n;let s={},l=n.alerts.executionIndices[i]?n.alerts.executionIndices[i].slice():[],c=n.alerts.graphExecutionIndices[i]?n.alerts.graphExecutionIndices[i].slice():[];for(let p=0;p<o.length;++p){let h=r+p,m=o[p];if(s[h]=m,m.alert_type===Fc.INF_NAN_ALERT){let _=m;l[h]=_.execution_index,null!==_.graph_execution_trace_index&&(c[h]=_.graph_execution_trace_index)}}void 0!==n.alerts.alerts[i]&&Object.assign(s,n.alerts.alerts[i]);let d=n.executions.scrollBeginIndex,u=n.graphExecutions.focusIndex;if(i===Fc.INF_NAN_ALERT&&0===r){let p=o[0];d=Math.max(0,p.execution_index-Math.floor(n.executions.displayCount/2)),null!==p.graph_execution_trace_index&&(u=p.graph_execution_trace_index)}return{...n,executions:{...n.executions,scrollBeginIndex:d},graphExecutions:{...n.graphExecutions,focusIndex:u},alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Re.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e,alerts:{...n.alerts.alerts,[i]:s},executionIndices:{...n.alerts.executionIndices,[i]:l},graphExecutionIndices:{...n.alerts.graphExecutionIndices,[i]:c}}}}),ye(Dg,(n,{alertType:t})=>{let e={...n,alerts:{...n.alerts,focusType:n.alerts.focusType===t?null:t}},i=e.alerts.focusType;if(null!==i){let r=e.alerts.executionIndices[i]||[];void 0!==r[0]&&(e.executions={...e.executions,scrollBeginIndex:Math.max(0,Number(r[0])-Math.floor(e.executions.displayCount/2))})}return e}),ye(IE,n=>null===n.activeRunId?n:{...n,executions:{...n.executions,numExecutionsLoaded:{...n.executions.numExecutionsLoaded,state:Re.LOADING}}}),ye(AE,(n,{numExecutions:t})=>{if(null===n.activeRunId)return n;let i=t>n.executions.executionDigestsLoaded.numExecutions,r={...n,lastNonEmptyPollDataTimeMs:i?Date.now():n.lastNonEmptyPollDataTimeMs,executions:{...n.executions,numExecutionsLoaded:{...n.executions.numExecutionsLoaded,state:Re.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.executions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.executions.focusIndex&&(r.executions.focusIndex=0),r}),ye(RE,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges];return-1===rN(i,t.begin,t.end)&&i.push({begin:t.begin,end:t.end}),{...n,executions:{...n.executions,executionDigestsLoaded:{...n.executions.executionDigestsLoaded,loadingRanges:i}}}}),ye(PE,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges],r=rN(i,t.begin,t.end);-1!==r&&i.splice(r,1);let o={...n,executions:{...n.executions,executionDigestsLoaded:{...n.executions.executionDigestsLoaded,numExecutions:t.num_digests,loadingRanges:i},executionDigests:{...n.executions.executionDigests}}};for(let a=t.begin;a<t.end;++a)o.executions.executionDigests[a]=t.execution_digests[a-t.begin];return t.end>t.begin&&(o.executions.executionDigestsLoaded.pageLoadedSizes={...o.executions.executionDigestsLoaded.pageLoadedSizes,[t.begin/n.executions.pageSize]:t.end-t.begin}),o}),ye(Ig,n=>{if(null===n.activeRunId)return n;let e=n.executions.scrollBeginIndex;return e>0&&e--,{...n,executions:{...n.executions,scrollBeginIndex:e}}}),ye(Ag,n=>{if(null===n.activeRunId)return n;let e=n.executions.scrollBeginIndex;return e+n.executions.displayCount+1<=n.executions.executionDigestsLoaded.numExecutions&&e++,{...n,executions:{...n.executions,scrollBeginIndex:e}}}),ye(Rg,(n,t)=>{if(t.index<0||!Number.isInteger(t.index))throw new Error(`Attempt to scroll to negative or non-integer execution index (${t.index})`);let{displayCount:e}=n.executions,{numExecutions:i}=n.executions.executionDigestsLoaded;if(t.index>Math.max(0,i-e))throw new Error(`Attempt to scroll to execution index (${t.index}), which exceeds maximum allowed index (numExecutions=${i}; displayCount=${e})`);return{...n,executions:{...n.executions,scrollBeginIndex:t.index}}}),ye(Pg,(n,t)=>{let e={...n,executions:{...n.executions,focusIndex:n.executions.scrollBeginIndex+t.displayIndex},codeLocationFocusType:zo.EXECUTION,sourceCode:{...n.sourceCode}};return e.sourceCode.focusLineSpec=GE(e),e}),ye(kE,(n,t)=>{if(null===n.activeRunId)return n;let i={...n,executions:{...n.executions,executionData:{...n.executions.executionData}}};for(let r=t.begin;r<t.end;++r)i.executions.executionData[r]=t.executions[r-t.begin];return i}),ye(OE,n=>null===n.activeRunId?n:{...n,graphExecutions:{...n.graphExecutions,numExecutionsLoaded:{...n.graphExecutions.numExecutionsLoaded,state:Re.LOADING}}}),ye(FE,(n,{numGraphExecutions:t})=>{if(null===n.activeRunId)return n;let e=t>n.graphExecutions.executionDigestsLoaded.numExecutions,i={...n,lastNonEmptyPollDataTimeMs:e?Date.now():n.lastNonEmptyPollDataTimeMs,graphExecutions:{...n.graphExecutions,numExecutionsLoaded:{...n.graphExecutions.numExecutionsLoaded,state:Re.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.graphExecutions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.graphExecutions.focusIndex&&(i.graphExecutions.focusIndex=0),i}),ye(NE,(n,{pageIndex:t})=>{if(null===n.activeRunId)return n;let e=n.graphExecutions.graphExecutionDataLoadingPages.slice();return-1===e.indexOf(t)&&e.push(t),{...n,graphExecutions:{...n.graphExecutions,graphExecutionDataLoadingPages:e}}}),ye(LE,(n,t)=>{if(null===n.activeRunId)return n;let{pageSize:e}=n.graphExecutions,i=n.graphExecutions.graphExecutionDataLoadingPages.slice(),r={...n.graphExecutions.graphExecutionDataPageLoadedSizes},o={...n.graphExecutions.graphExecutionData};for(let a=t.begin;a<t.end;++a){let s=Math.floor(a/e);-1!==i.indexOf(s)&&i.splice(i.indexOf(s),1),void 0===r[s]&&(r[s]=0),void 0===o[a]&&r[s]++,o[a]=t.graph_executions[a-t.begin]}return{...n,graphExecutions:{...n.graphExecutions,graphExecutionDataLoadingPages:i,graphExecutionDataPageLoadedSizes:r,graphExecutionData:o}}}),ye(kg,(n,t)=>{if(t.index<0||!Number.isInteger(t.index))throw new Error(`Attempt to scroll to negative or non-integer graph-execution index (${t.index})`);return{...n,graphExecutions:{...n.graphExecutions,scrollBeginIndex:t.index}}}),ye(Og,(n,t)=>qX(n,t.graph_id,t.op_name,t.index)),ye(Fg,(n,t)=>qX(n,t.graph_id,t.op_name)),ye(BE,(n,t)=>{let{graph_id:e,op_name:i}=t,r={...n,graphs:{...n.graphs,loadingOps:{...n.graphs.loadingOps}}};return void 0===r.graphs.loadingOps[e]&&(r.graphs.loadingOps[e]=new Map),r.graphs.loadingOps[e].has(i)||r.graphs.loadingOps[e].set(i,Re.LOADING),r}),ye(VE,(n,t)=>{let{graphOpInfoResponse:e}=t,{graph_ids:i}=e,r=i[i.length-1],o={...n,graphs:{...n.graphs,ops:{...n.graphs.ops,[r]:new Map(n.graphs.ops[r])},loadingOps:{...n.graphs.loadingOps,[r]:new Map(n.graphs.loadingOps[r])}}};for(let a of e.inputs)!a.data||o.graphs.ops[r].set(a.op_name,a.data);for(let a=0;a<e.consumers.length;++a)for(let s of e.consumers[a])!s.data||o.graphs.ops[r].set(s.op_name,s.data);return o.graphs.ops[r].set(e.op_name,{...e,inputs:e.inputs.map(a=>({op_name:a.op_name,output_slot:a.output_slot})),consumers:e.consumers.map(a=>a.map(s=>({op_name:s.op_name,input_slot:s.input_slot})))}),o.graphs.loadingOps[r].set(e.op_name,Re.LOADED),o}),ye(HE,n=>({...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Re.LOADING}}})),ye(zE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Re.LOADED,lastLoadedTimeInMs:Date.now()},sourceFileList:t.sourceFiles,fileContents:n.sourceCode.fileContents.slice()}},i=t.sourceFiles.length,{fileContents:r}=e.sourceCode;for(let o=0;o<i;++o)r[o]=n.sourceCode.fileContents[o]??{loadState:Re.NOT_LOADED,lines:null};return e}),ye(Ng,(n,t)=>{let e=Lg(n),i={...n,sourceCode:{...n.sourceCode,focusLineSpec:t.stackFrame}};return null!==e&&(i.stickToBottommostFrameInFocusedFile=function(n,t){let e=-1,i=-1;if(n.forEach(({file_path:r,lineno:o},a)=>{r===t.file_path&&(i=a,o===t.lineno&&(e=a))}),-1===e)throw new Error(`Stack frame ${JSON.stringify(t)} is not found.`);return e===i}(e,t.stackFrame)),i}),ye(UE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=uy(e.sourceCode.sourceFileList,t);if(!(i>=0))throw new Error(`Cannot find the following file in file list: host_name="${t.host_name}", file_path="${t.file_path}"`);return e.sourceCode.fileContents.splice(i,1,{...e.sourceCode.fileContents[i],loadState:Re.LOADING}),e}),ye(jE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=uy(e.sourceCode.sourceFileList,t);if(!(i>=0))throw new Error(`Cannot find the following file in file list: host_name="${t.host_name}", file_path="${t.file_path}"`);return e.sourceCode.fileContents.splice(i,1,{loadState:Re.LOADED,lines:t.lines}),e}),ye(cy,(n,t)=>{if(null===n.activeRunId)return n;let i={...n,stackFrames:{...n.stackFrames,...t.stackFrames},sourceCode:{...n.sourceCode}};return i.sourceCode.focusLineSpec=GE(i),i}));function qX(n,t,e,i){let r={...n,graphs:{...n.graphs,focusedOp:{graphId:t,opName:e}},codeLocationFocusType:zo.GRAPH_OP_CREATION,sourceCode:{...n.sourceCode}};return r.sourceCode.focusLineSpec=GE(r),void 0!==i&&(r.graphExecutions={...n.graphExecutions,focusIndex:i}),r}function XX(n,t){return AMe(n,t)}var Ro=Mr(dy),Nh=W(Ro,n=>n.runs),oN=W(Ro,n=>n.runsLoaded),$o=W(Ro,n=>n.activeRunId),YX=W(Ro,n=>n.lastDataPollOnsetTimeMs-n.lastNonEmptyPollDataTimeMs),Bg=W(Ro,n=>n.alerts),aN=W(Bg,n=>n.alertsLoaded),QX=W(Bg,n=>n.numAlerts),WE=W(Bg,n=>n.focusType),ZX=W(Bg,n=>null===n.focusType?0:n.alertsBreakdown[n.focusType]||0),KX=W(Bg,n=>null===n.focusType||void 0===n.alerts[n.focusType]?null:n.alerts[n.focusType]),JX=W(Bg,n=>n.alertsBreakdown),Lh=W(Ro,n=>n.executions),qE=W(Lh,n=>n.numExecutionsLoaded),py=W(Lh,n=>n.executionDigestsLoaded),Zu=W(Lh,n=>n.executionDigestsLoaded.numExecutions),hy=W(Lh,n=>n.scrollBeginIndex),Vg=W(Lh,n=>n.pageSize),Hg=W(Lh,n=>n.displayCount),$X=W(Lh,n=>{let t=[];for(let e=n.scrollBeginIndex;e<n.scrollBeginIndex+n.displayCount;++e)t.push(e in n.executionDigests?n.executionDigests[e]:null);return t}),Ku=W(Ro,n=>n.graphExecutions),eY=W(Ku,n=>n.numExecutionsLoaded),my=W(Ro,n=>n.graphExecutions.executionDigestsLoaded.numExecutions),tY=W(Ku,n=>n.scrollBeginIndex),nY=W(Ku,n=>n.displayCount),iY=W(Ku,n=>n.pageSize),rY=W(Ku,n=>n.graphExecutionDataLoadingPages),oY=W(Ku,n=>n.graphExecutionDataPageLoadedSizes),sN=W(Ku,n=>n.graphExecutionData),lN=W(Ku,n=>n.focusIndex),cN=W(Ro,n=>n.graphs),dN=W(cN,n=>{let{focusedOp:t,ops:e}=n;return null===t||void 0===e[t.graphId]?null:e[t.graphId].get(t.opName)||null}),uN=W(cN,n=>{let{focusedOp:t,ops:e}=n;if(null===t||void 0===e[t.graphId]||!e[t.graphId].has(t.opName))return null;{let i=e[t.graphId],{inputs:r}=i.get(t.opName);return r.map(o=>{let a={...o};return i.has(o.op_name)&&(a.data=i.get(o.op_name)),a})}}),aY=W(lN,sN,uN,(n,t,e)=>{if(null===n||null===e)return null;let i=e.map(s=>!1),r=[];if(0===e.length)return r;let o=t[n].graph_id,a=Math.max(0,n-200);for(let s=n-1;s>=a;--s)if(void 0!==t[s])for(let l=0;l<e.length&&(i[l]||t[s].graph_id!==o||t[s].op_name!==e[l].op_name||t[s].output_slot!==e[l].output_slot||(r.push(s),i[l]=!0,r.length!==e.length));++l);return r}),sY=W(cN,n=>{let{focusedOp:t,ops:e}=n;if(null===t||void 0===e[t.graphId]||!e[t.graphId].has(t.opName))return null;{let i=e[t.graphId],{consumers:r}=i.get(t.opName);return r.map(o=>o.map(a=>{let s={...a};return i.has(a.op_name)&&(s.data=i.get(a.op_name)),s}))}}),lY=W(Ro,n=>{let t=n.executions.scrollBeginIndex,e=n.executions.scrollBeginIndex+n.executions.displayCount,i=new Array(e-t).fill(null),r=n.alerts.focusType;if(null===r)return i;let o=n.alerts.executionIndices[r];if(void 0===o)return i;for(let a=t;a<e;++a)o.includes(a)&&(i[a-t]=n.alerts.focusType);return i}),XE=W(Ro,n=>n.executions),pN=W(XE,n=>n.focusIndex),cY=W(XE,n=>{if(null===n.focusIndex)return null;let{focusIndex:t,scrollBeginIndex:e,displayCount:i}=n;return t<e||t>=e+i?null:t-e}),hN=W(XE,n=>n.executionData),dY=W(Ro,n=>n.graphs.loadingOps),mN=W(Ro,n=>n.stackFrames),Bh=W(XE,n=>{let{focusIndex:t,executionData:e}=n;return null===t||void 0===e[t]?null:e[t]}),fy=W(Ro,pN,Bh,dN,(n,t,e,i)=>{let{codeLocationFocusType:r}=n;return null===r?null:r===zo.EXECUTION?null===t||null===e?null:{codeLocationType:zo.EXECUTION,opType:e.op_type,executionIndex:t}:null===i?null:{codeLocationType:zo.GRAPH_OP_CREATION,opType:i.op_type,opName:i.op_name}}),uY=W(Ro,Lg),YE=W(Ro,n=>n.sourceCode),pY=W(YE,n=>n.sourceFileListLoaded),fN=(W(YE,n=>n.sourceFileList),W(YE,n=>{let{sourceFileList:t,focusLineSpec:e}=n;return null===e?-1:uy(t,e)})),QE=W(YE,fN,(n,t)=>-1===t?null:n.fileContents[t]||null),ZE=W(Ro,n=>n.sourceCode.focusLineSpec),hY=W(Ro,n=>n.stickToBottommostFrameInFocusedFile),mY=function(n){return[n]};function PMe(n,t){if(1&n){let e=Te();f(0,"div",7),A("click",function(){let o=ne(e).$implicit;return ie(w().onToggleFocusType.emit(o.type))}),f(1,"div",8),T(2),g(),f(3,"div",9),T(4),g(),k(5,"div"),g()}if(2&n){let e=t.$implicit,i=w();b("ngClass",Un(4,mY,e.type===i.focusType?"focus":"")),v(2),kt(e.displayName),v(2),lu(" ",e.displaySymbol,": ",e.count," ")}}var fY=(()=>{class n{constructor(){this.numAlerts=0,this.alertsBreakdown=[],this.focusType=null,this.onToggleFocusType=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["alerts-component"]],inputs:{numAlerts:"numAlerts",alertsBreakdown:"alertsBreakdown",focusType:"focusType"},outputs:{onToggleFocusType:"onToggleFocusType"},decls:10,vars:5,consts:[[1,"alerts-container"],[1,"debugging-title"],[1,"num-alerts-container"],[1,"num-alerts-label"],[1,"num-alerts-value",3,"ngClass"],[1,"alerts-breakdown-container"],["class","alerts-breakdown-type",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"alerts-breakdown-type",3,"ngClass","click"],[1,"alert-type-name"],[1,"alert-type-count"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1),T(2,"Debugging"),g(),f(3,"div",2)(4,"div",3),T(5,"Alerts"),g(),f(6,"div",4),T(7),g()(),f(8,"div",5),S(9,PMe,6,6,"div",6),g()()),2&e&&(v(6),b("ngClass",Un(3,mY,i.numAlerts>0?"non-zero":"")),v(1),Ve(" ",i.numAlerts," "),v(2),b("ngForOf",i.alertsBreakdown))},dependencies:[wn,nn],styles:[".alerts-breakdown-container[_ngcontent-%COMP%] {\n  font-size: 13px;\n  padding: 10px 10px 10px;\n  position: relative;\n}\n\n.alerts-breakdown-type[_ngcontent-%COMP%] {\n  border-radius: 0 10px 10px 0;\n  cursor: pointer;\n  display: flex;\n  padding: 6px 0 6px 50px;\n  vertical-align: middle;\n}\n\n.alerts-breakdown-type.focus[_ngcontent-%COMP%] {\n  background-color: #ffeee0;\n}\n\n.alerts-container[_ngcontent-%COMP%] {\n  font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.alert-type-count[_ngcontent-%COMP%] {\n  \n  background-color: #e52592;\n  border-radius: 3px;\n  color: #fff;\n  display: inline-block;\n  padding: 3px;\n  position: absolute;\n  right: 20px;\n  vertical-align: middle;\n}\n\n.alert-type-name[_ngcontent-%COMP%] {\n  display: inline-block;\n  padding: 3px;\n  vertical-align: middle;\n}\n\n.debugging-title[_ngcontent-%COMP%] {\n  font-size: 18px;\n}\n\n.num-alerts-container[_ngcontent-%COMP%] {\n  font-weight: bold;\n  padding: 10px 10px 10px 30px;\n  position: relative;\n}\n\n.num-alerts-label[_ngcontent-%COMP%] {\n  display: inline-block;\n  font-size: 13px;\n}\n\n.num-alerts-value[_ngcontent-%COMP%] {\n  border-radius: 12px;\n  display: inline-block;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: 24px;\n  position: absolute;\n  right: 20px;\n  text-align: center;\n  vertical-align: middle;\n  width: 24px;\n}\n\n.num-alerts-value.non-zero[_ngcontent-%COMP%] {\n  background-color: #ffb780;\n  font-weight: bold;\n}"]}),n})(),OMe={[Fc.FUNCTION_RECOMPILE_ALERT]:{displayName:"Function recompiles",displaySymbol:"C"},[Fc.INF_NAN_ALERT]:{displayName:"NaN/\u221e",displaySymbol:"\u221e"},[Fc.TENSOR_SHAPE_ALERT]:{displayName:"Tensor shape",displaySymbol:"\u25a0"}},gY=(()=>{class n{constructor(e){this.store=e,this.numAlerts$=this.store.pipe(un(QX)),this.alertsBreakdown$=this.store.pipe(un(W(JX,i=>{let r=Object.keys(i);return r.sort(),r.map(o=>({type:o,...OMe[o],count:i[o]}))}))),this.focusType$=this.store.pipe(un(WE))}onToggleFocusType(e){this.store.dispatch(Dg({alertType:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-alerts"]],decls:4,vars:9,consts:[[3,"numAlerts","alertsBreakdown","focusType","onToggleFocusType"]],template:function(e,i){1&e&&(f(0,"alerts-component",0),A("onToggleFocusType",function(o){return i.onToggleFocusType(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("numAlerts",G(1,3,i.numAlerts$))("alertsBreakdown",G(2,5,i.alertsBreakdown$))("focusType",G(3,7,i.focusType$))},dependencies:[fY,ct],encapsulation:2,changeDetection:0}),n})(),gy={19:"float16",1:"float32",2:"float64",3:"int32",4:"uint8",17:"uint16",22:"uint32",23:"uint64",5:"int16",6:"int8",7:"string",8:"complex64",18:"complex128",9:"int64",10:"bool",11:"qint8",12:"quint8",15:"qint16",16:"quint16",13:"qint32",14:"bfloat16",20:"resource",21:"variant",119:"float16_ref",101:"float32_ref",102:"float64_ref",103:"int32_ref",122:"uint32_ref",104:"uint8_ref",117:"uint16_ref",105:"int16_ref",106:"int8_ref",107:"string_ref",108:"complex64_ref",118:"complex128_ref",109:"int64_ref",123:"uint64_ref",110:"bool_ref",111:"qint8_ref",112:"quint8_ref",115:"qint16_ref",116:"quint16_ref",113:"qint32_ref",114:"bfloat16_ref",120:"resource_ref",121:"variant_ref"};function KE(n){let{tensorDebugMode:t,array:e}=n;switch(t){case Ao.NO_TENSOR:if(null!==e)throw new Error("Unexpectedly received non-null debug-tensor-value array under NO_TENSOR mode");return{};case Ao.CURT_HEALTH:if(null===e||2!==e.length)throw new Error(`Under CURT_HEALTH mode, expected debug-tensor-value array to have length 2, but got ${JSON.stringify(e)}`);return{hasInfOrNaN:Boolean(e[1])};case Ao.CONCISE_HEALTH:{if(null===e||5!==e.length)throw new Error(`Under CONCISE_HEALTH mode, expected debug-tensor-value array to have length 5, but got ${JSON.stringify(e)}`);let i={size:e[1]};return e[2]>0&&(i.numNegativeInfs=e[2]),e[3]>0&&(i.numPositiveInfs=e[3]),e[4]>0&&(i.numNaNs=e[4]),i}case Ao.SHAPE:{if(null===e||10!==e.length)throw new Error(`Under SHAPE mode, expected debug-tensor-value array to have length 10, but got ${JSON.stringify(e)}`);let i=e[2],r=e.slice(4,Math.min(4+i,e.length));return r.length<i&&(r=new Array(i-r.length).concat(r)),{dtype:gy[e[1]],rank:i,size:e[3],shape:r}}case Ao.FULL_HEALTH:{if(null===e||11!==e.length)throw new Error(`Under FULL_HEALTH mode, expected debug-tensor-value array to have length 11, but got ${JSON.stringify(e)}`);let r={dtype:gy[e[2]],rank:e[3],size:e[4]};return e[5]>0&&(r.numNegativeInfs=e[5]),e[6]>0&&(r.numPositiveInfs=e[6]),e[7]>0&&(r.numNaNs=e[7]),e[8]>0&&(r.numNegativeFinites=e[8]),e[9]>0&&(r.numZeros=e[9]),e[10]>0&&(r.numPositiveFinites=e[10]),r}case Ao.FULL_TENSOR:if(null!==e)throw new Error("Unexpectedly received non-null debug-tensor-value array under FULL_TENSOR mode");return{};default:throw new Error(`Unrecognized tensorDebugMode: ${t}`)}}var gN="[_nghost-%COMP%] {\n    background-color: #e3e5e8;\n    border: 1px solid #c0c0c0;\n    border-radius: 4px;\n    font-family: 'Roboto Mono', monospace;\n    height: 14px;\n    line-height: 14px;\n    margin: 0 2px;\n    padding: 1px 3px;\n    width: max-content;\n  }";function NMe(n,t){1&n&&k(0,"div",4)}function LMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",8),T(2,"NaN"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numNaNs,"")}}function BMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",8),T(2,"-\u221e"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numNegativeInfs,"")}}function VMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",8),T(2,"+\u221e"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numPositiveInfs,"")}}function HMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",10),T(2,"-"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numNegativeFinites,"")}}function zMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",10),T(2,"0"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numZeros,"")}}function UMe(n,t){if(1&n&&(f(0,"div",7)(1,"span",10),T(2,"+"),g(),f(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),Ve("\xd7",e.numPositiveFinites,"")}}function jMe(n,t){if(1&n&&(f(0,"div",5),S(1,LMe,5,1,"div",6),S(2,BMe,5,1,"div",6),S(3,VMe,5,1,"div",6),S(4,HMe,5,1,"div",6),S(5,zMe,5,1,"div",6),S(6,UMe,5,1,"div",6),g()),2&n){let e=w();v(1),b("ngIf",void 0!==e.numNaNs&&e.numNaNs>0),v(1),b("ngIf",void 0!==e.numNegativeInfs&&e.numNegativeInfs>0),v(1),b("ngIf",void 0!==e.numPositiveInfs&&e.numPositiveInfs>0),v(1),b("ngIf",void 0!==e.numNegativeFinites&&e.numNegativeFinites>0),v(1),b("ngIf",void 0!==e.numZeros&&e.numZeros>0),v(1),b("ngIf",void 0!==e.numPositiveFinites&&e.numPositiveFinites>0)}}var GMe=function(n){return["container",n]};function WMe(n,t){1&n&&k(0,"debug-tensor-dtype",5),2&n&&b("dtype",w().debugTensorValue.dtype)}function qMe(n,t){1&n&&k(0,"debug-tensor-rank",6),2&n&&b("rank",w().debugTensorValue.rank)}function XMe(n,t){1&n&&k(0,"debug-tensor-shape",7),2&n&&b("shape",w().debugTensorValue.shape)}function YMe(n,t){1&n&&k(0,"debug-tensor-has-inf-or-nan",8),2&n&&b("hasInfOrNaN",w().debugTensorValue.hasInfOrNaN)}function QMe(n,t){if(1&n&&k(0,"debug-tensor-numeric-breakdown",9),2&n){let e=w();Zi("size",e.debugTensorValue.size),b("numNegativeInfs",e.debugTensorValue.numNegativeInfs)("numPositiveInfs",e.debugTensorValue.numPositiveInfs)("numNaNs",e.debugTensorValue.numNaNs)("numNegativeFinites",e.debugTensorValue.numNegativeFinites)("numZeros",e.debugTensorValue.numZeros)("numPositiveFinites",e.debugTensorValue.numPositiveFinites)}}var ZMe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-dtype"]],inputs:{dtype:"dtype"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&Ve(" ",i.dtype," ")},styles:[gN]}),n})(),KMe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-rank"]],inputs:{rank:"rank"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&Ve(" ",i.rank,"D ")},styles:[gN]}),n})(),JMe=(()=>{class n{get shapeString(){return"["+this.shape.map(e=>void 0===e?"?":String(e)).join(",")+"]"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-shape"]],inputs:{shape:"shape"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&Ve(" shape:",i.shapeString," ")},styles:[gN]}),n})(),$Me=(()=>{class n{get breakdownExists(){return void 0!==this.numNaNs||void 0!==this.numNegativeInfs||void 0!==this.numPositiveInfs||void 0!==this.numNegativeFinites||void 0!==this.numZeros||void 0!==this.numPositiveFinites}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-numeric-breakdown"]],inputs:{size:"size",numNaNs:"numNaNs",numNegativeInfs:"numNegativeInfs",numPositiveInfs:"numPositiveInfs",numNegativeFinites:"numNegativeFinites",numZeros:"numZeros",numPositiveFinites:"numPositiveFinites"},decls:7,vars:3,consts:[[1,"size"],[1,"size-value"],["class","break",4,"ngIf"],["class","breakdown",4,"ngIf"],[1,"break"],[1,"breakdown"],["class","category",4,"ngIf"],[1,"category"],[1,"category-tag","infinite"],[1,"category-count"],[1,"category-tag","finite"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"span"),T(2,"size:"),g(),f(3,"span",1),T(4),g()(),S(5,NMe,1,0,"div",2),S(6,jMe,7,6,"div",3)),2&e&&(v(4),kt(i.size),v(1),b("ngIf",i.breakdownExists),v(1),b("ngIf",i.breakdownExists))},dependencies:[Ne],styles:["[_nghost-%COMP%] {\n        background-color: #e3e5e8;\n        border: 1px solid #c0c0c0;\n        border-radius: 4px;\n        font-family: 'Roboto Mono', monospace;\n        font-size: 10px;\n        margin: 0 2px;\n        padding: 1px;\n      }\n      .break[_ngcontent-%COMP%] {\n        flex-basis: 100%;\n        width: 0;\n      }\n      .size[_ngcontent-%COMP%] {\n        display: block;\n        height: 11px;\n        line-height: 11px;\n        margin: 0 3px;\n        vertical-align: middle;\n      }\n      .breakdown[_ngcontent-%COMP%] {\n        border-top: 1px solid rgba(0, 0, 0, 0.12);\n        display: flex;\n        height: 11px;\n        line-height: 11px;\n        padding: 2px;\n        vertical-align: middle;\n      }\n      .category[_ngcontent-%COMP%] {\n        margin-bottom: 2px;\n        margin-left: 4px;\n        margin-top: 2px;\n        heigth: 100%;\n        width: max-content;\n      }\n      .category-tag[_ngcontent-%COMP%] {\n        border-radius: 2px;\n        padding: 0 2px;\n      }\n      .finite[_ngcontent-%COMP%] {\n        background-color: #aaa;\n        color: #fefefe;\n      }\n      .infinite[_ngcontent-%COMP%] {\n        background-color: #e52592;\n        color: #fff;\n      }"]}),n})(),ewe=(()=>{class n{get infoString(){return this.hasInfOrNaN?"Has \u221e/NaN":"No \u221e/NaN"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-has-inf-or-nan"]],inputs:{hasInfOrNaN:"hasInfOrNaN"},decls:2,vars:4,consts:[[3,"ngClass"]],template:function(e,i){1&e&&(f(0,"div",0),T(1),g()),2&e&&(b("ngClass",Un(2,GMe,i.hasInfOrNaN?"has-inf-or-nan":"")),v(1),Ve(" ",i.infoString," "))},dependencies:[wn],styles:[".container[_ngcontent-%COMP%] {\n        background-color: #e3e5e8;\n        border: 1px solid #c0c0c0;\n        border-radius: 4px;\n        color: #666666;\n        font-family: 'Roboto Mono', monospace;\n        height: 14px;\n        line-height: 14px;\n        margin: 0 2px;\n        padding: 1px 3px;\n        width: max-content;\n      }\n      .has-inf-or-nan[_ngcontent-%COMP%] {\n        background-color: #e52592;\n        color: #fff;\n      }"]}),n})(),JE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debug-tensor-value"]],inputs:{debugTensorValue:"debugTensorValue"},decls:5,vars:5,consts:[[3,"dtype",4,"ngIf"],[3,"rank",4,"ngIf"],[3,"shape",4,"ngIf"],[3,"hasInfOrNaN",4,"ngIf"],[3,"size","numNegativeInfs","numPositiveInfs","numNaNs","numNegativeFinites","numZeros","numPositiveFinites",4,"ngIf"],[3,"dtype"],[3,"rank"],[3,"shape"],[3,"hasInfOrNaN"],[3,"size","numNegativeInfs","numPositiveInfs","numNaNs","numNegativeFinites","numZeros","numPositiveFinites"]],template:function(e,i){1&e&&(S(0,WMe,1,1,"debug-tensor-dtype",0),S(1,qMe,1,1,"debug-tensor-rank",1),S(2,XMe,1,1,"debug-tensor-shape",2),S(3,YMe,1,1,"debug-tensor-has-inf-or-nan",3),S(4,QMe,1,7,"debug-tensor-numeric-breakdown",4)),2&e&&(b("ngIf",void 0!==i.debugTensorValue.dtype),v(1),b("ngIf",void 0!==i.debugTensorValue.rank),v(1),b("ngIf",void 0!==i.debugTensorValue.shape),v(1),b("ngIf",void 0!==i.debugTensorValue.hasInfOrNaN),v(1),b("ngIf",void 0!==i.debugTensorValue.size))},dependencies:[Ne,ZMe,ewe,$Me,KMe,JMe],styles:["[_nghost-%COMP%] {\n        align-items: flex-start;\n        display: flex;\n        flex-wrap: nowrap;\n        overflow: hidden;\n        vertical-align: top;\n      }\n      debug-tensor-numeric-breakdown[_ngcontent-%COMP%] {\n        display: inline-block;\n      }"]}),n})();function twe(n,t){1&n&&(f(0,"div",12),T(1,"\u25b6"),g())}var nwe=function(n,t){return{tensorDebugMode:n,array:t}};function iwe(n,t){if(1&n&&k(0,"debug-tensor-value",17),2&n){let e=w(2).$implicit,i=w(2);b("debugTensorValue",i.parseDebugTensorValue(So(1,nwe,i.graphExecutionData[e].tensor_debug_mode,i.graphExecutionData[e].debug_tensor_value)))}}function rwe(n,t){if(1&n){let e=Te();f(0,"div")(1,"div",13)(2,"button",14),A("click",function(){ne(e);let r=w().$implicit,o=w(2);return ie(o.onTensorNameClick.emit({index:r,graph_id:o.graphExecutionData[r].graph_id,op_name:o.graphExecutionData[r].op_name}))}),T(3),g(),f(4,"div",15),T(5),g()(),S(6,iwe,1,4,"debug-tensor-value",16),g()}if(2&n){let e=w().$implicit,i=w(2);v(2),Zi("title",i.getTensorName(e)),v(1),Ve(" ",i.getTensorName(e)," "),v(2),kt(i.graphExecutionData[e].op_type),v(1),b("ngIf",null!==i.graphExecutionData[e].debug_tensor_value)}}function owe(n,t){1&n&&(f(0,"div",18),T(1," Loading... "),g())}var awe=function(n){return{"input-of-focus":n}};function swe(n,t){if(1&n&&(f(0,"div",5)(1,"div",6)(2,"div",7),S(3,twe,2,0,"div",8),T(4),g(),S(5,rwe,7,4,"div",9),S(6,owe,2,0,"ng-template",10,11,jt),g()()),2&n){let e=t.$implicit,i=st(7),r=w(2);v(1),b("ngClass",Un(5,awe,r.isInputOfFocus(e))),v(2),b("ngIf",e===r.focusIndex),v(1),Ve(" ",e," "),v(1),b("ngIf",r.graphExecutionData[e])("ngIfElse",i)}}function lwe(n,t){if(1&n){let e=Te();f(0,"cdk-virtual-scroll-viewport",3),A("scrolledIndexChange",function(r){return ne(e),ie(w().onScrolledIndexChange.emit(r))}),S(1,swe,8,7,"div",4),g()}if(2&n){let e=w();v(1),b("cdkVirtualForOf",e.graphExecutionIndices)}}var bY=(()=>{class n{constructor(){this.onScrolledIndexChange=new F,this.onTensorNameClick=new F,this.parseDebugTensorValue=KE,this.TEST_ONLY={getViewPort:()=>this.viewPort}}ngOnChanges(e){if(this.viewPort&&e.focusIndex&&null!==e.focusIndex.currentValue){let i=this.viewPort.getRenderedRange(),r=e.focusIndex.currentValue,o=Math.round((i.end-i.start)/3),a=Math.max(r-o,0);this.viewPort.scrollToIndex(a,r>=i.start&&r<i.end?"smooth":void 0)}}getTensorName(e){return`${this.graphExecutionData[e].op_name}:${this.graphExecutionData[e].output_slot}`}isInputOfFocus(e){return null!==this.focusInputIndices&&this.focusInputIndices.includes(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["graph-executions-component"]],viewQuery:function(e,i){if(1&e&&Ue(gg,5),2&e){let r;be(r=ve())&&(i.viewPort=r.first)}},inputs:{numGraphExecutions:"numGraphExecutions",graphExecutionData:"graphExecutionData",graphExecutionIndices:"graphExecutionIndices",focusIndex:"focusIndex",focusInputIndices:"focusInputIndices"},outputs:{onScrolledIndexChange:"onScrolledIndexChange",onTensorNameClick:"onTensorNameClick"},features:[qt],decls:4,vars:2,consts:[[1,"graph-executions-container"],[1,"graph-executions-title"],["itemSize","38","class","graph-executions-viewport",3,"scrolledIndexChange",4,"ngIf"],["itemSize","38",1,"graph-executions-viewport",3,"scrolledIndexChange"],["class","tensor-container",4,"cdkVirtualFor","cdkVirtualForOf"],[1,"tensor-container"],[1,"tensor-item",3,"ngClass"],[1,"graph-execution-index"],["class","graph-execution-focus",4,"ngIf"],[4,"ngIf","ngIfElse"],["class","tensor-item"],["dataLoading",""],[1,"graph-execution-focus"],[1,"tensor-name-and-op-type"],[1,"tensor-name",3,"title","click"],[1,"op-type"],[3,"debugTensorValue",4,"ngIf"],[3,"debugTensorValue"],[1,"loading-spinner"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1),T(2),g(),S(3,lwe,2,1,"cdk-virtual-scroll-viewport",2),g()),2&e&&(v(2),Ve(" Graph Executions (",i.numGraphExecutions,") "),v(1),b("ngIf",null!==i.numGraphExecutions&&i.numGraphExecutions>0))},dependencies:[wn,Ne,JE,Q7,Z7,gg],styles:['.graph-executions-container[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;display:flex;flex-direction:column;height:100%;margin-left:8px;padding-left:10px}body.dark-mode[_nghost-%COMP%]   .graph-executions-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .graph-executions-container[_ngcontent-%COMP%]{border-left:1px solid #555}.graph-execution-focus[_ngcontent-%COMP%]{display:inline-block}.graph-execution-index[_ngcontent-%COMP%]{color:#616161;display:inline-block;padding-right:4px;text-align:right;width:40px}body.dark-mode[_nghost-%COMP%]   .graph-execution-index[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .graph-execution-index[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.graph-executions-title[_ngcontent-%COMP%]{box-shadow:0 5px 3px -3px #ccc;padding-bottom:5px}.graph-executions-viewport[_ngcontent-%COMP%]{flex-grow:1;font-size:12px;width:100%;overflow-x:hidden}.input-of-focus[_ngcontent-%COMP%]{background-color:#fff099}body.dark-mode[_nghost-%COMP%]   .input-of-focus[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .input-of-focus[_ngcontent-%COMP%]{background-color:#e65100}.loading-spinner[_ngcontent-%COMP%]{display:inline-block}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content;direction:rtl;display:block}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.tensor-container[_ngcontent-%COMP%]{width:100%}.tensor-item[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;flex-wrap:nowrap;height:38px;line-height:38px;text-align:left;vertical-align:middle;white-space:nowrap;width:100%}body.dark-mode[_nghost-%COMP%]   .tensor-item[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .tensor-item[_ngcontent-%COMP%]{border-bottom:1px solid #555}.tensor-name[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0);border:none;box-sizing:border-box;color:inherit;cursor:pointer;direction:rtl;display:block;height:16px;line-height:16px;margin:2px 0 1px;max-width:calc(100% - 2px);overflow:hidden;padding:0 2px;text-align:right;text-decoration:underline;text-overflow:ellipsis;white-space:nowrap}.tensor-name[_ngcontent-%COMP%]:focus{outline:1px solid #c6cad1}.tensor-name-and-op-type[_ngcontent-%COMP%]{direction:rtl;display:inline-block;overflow:hidden;padding-right:8px;text-align:right;width:240px}debug-tensor-value[_ngcontent-%COMP%]{display:inline-block;margin:2px 0}'],changeDetection:0}),n})(),vY=(()=>{class n{onScrolledIndexChange(e){this.store.dispatch(kg({index:e}))}onTensorNameClick(e){this.store.dispatch(Og(e))}constructor(e){this.store=e,this.numGraphExecutions$=this.store.pipe(un(my)),this.graphExecutionData$=this.store.pipe(un(sN)),this.graphExecutionIndices$=this.store.pipe(un(W(my,i=>0===i?null:Array.from({length:i}).map((r,o)=>o)))),this.focusIndex$=this.store.pipe(un(lN)),this.focusInputIndices$=this.store.pipe(un(aY))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-graph-executions"]],decls:6,vars:15,consts:[[3,"numGraphExecutions","graphExecutionData","graphExecutionIndices","focusIndex","focusInputIndices","onScrolledIndexChange","onTensorNameClick"]],template:function(e,i){1&e&&(f(0,"graph-executions-component",0),A("onScrolledIndexChange",function(o){return i.onScrolledIndexChange(o)})("onTensorNameClick",function(o){return i.onTensorNameClick(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),g()),2&e&&b("numGraphExecutions",G(1,5,i.numGraphExecutions$))("graphExecutionData",G(2,7,i.graphExecutionData$))("graphExecutionIndices",G(3,9,i.graphExecutionIndices$))("focusIndex",G(4,11,i.focusIndex$))("focusInputIndices",G(5,13,i.focusInputIndices$))},dependencies:[bY,ct],encapsulation:2}),n})();function uwe(n,t){1&n&&(f(0,"span"),T(1," Output "),g())}function pwe(n,t){1&n&&(f(0,"span"),T(1," Input "),g())}function hwe(n,t){if(1&n&&(f(0,"div",6)(1,"span",7),S(2,uwe,2,0,"span",8),S(3,pwe,2,0,"span",8),g(),T(4),g()),2&n){let e=w();v(1),b("ngSwitch",e.kind),v(1),b("ngSwitchCase","input"),v(1),b("ngSwitchCase","consumer"),v(1),Ve(" slot: ",e.slot," ")}}function mwe(n,t){if(1&n&&(f(0,"div",9),T(1),g()),2&n){let e=w();v(1),Ve(" ",e.opData.op_type," ")}}function fwe(n,t){1&n&&(f(0,"span",10),T(1," (Op info unavailable.) "),g())}var gwe=function(n){return[n]},yY=(()=>{class n{constructor(){this.onOpNameClick=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["graph-op"]],inputs:{kind:"kind",opName:"opName",slot:"slot",opData:"opData"},outputs:{onOpNameClick:"onOpNameClick"},decls:9,vars:7,consts:[[1,"op-container"],[1,"input-tensor-name"],[1,"op-name",3,"ngClass","click"],["class","slot",4,"ngIf"],["class","op-type",4,"ngIf","ngIfElse"],["opInfoMissing",""],[1,"slot"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"op-type"],[1,"op-info-missing"]],template:function(e,i){if(1&e&&(f(0,"button",0)(1,"div",1)(2,"button",2),A("click",function(){return i.onOpNameClick.emit({op_name:i.opName})}),f(3,"span"),T(4),g()(),S(5,hwe,5,4,"div",3),g(),S(6,mwe,2,1,"div",4),S(7,fwe,2,0,"ng-template",null,5,jt),g()),2&e){let r=st(8);v(2),b("ngClass",Un(5,gwe,"self"===i.kind?"self-op-name":"")),v(2),kt(i.opName),v(1),b("ngIf","self"!==i.kind),v(1),b("ngIf",void 0!==i.opData)("ngIfElse",r)}},dependencies:[wn,Ne,mr,kr],styles:['.op-container[_ngcontent-%COMP%], .op-name[_ngcontent-%COMP%]{color:inherit;background-color:inherit}.op-container[_ngcontent-%COMP%]{border:2px solid #ebebeb;border-radius:4px;box-shadow:1px 3px #eee;cursor:pointer;margin:0 5px 0 0;padding:2px 6px;text-align:right;width:200px}body.dark-mode[_nghost-%COMP%]   .op-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-container[_ngcontent-%COMP%]{border:2px solid #555}body.dark-mode[_nghost-%COMP%]   .op-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-container[_ngcontent-%COMP%]{box-shadow:1px 3px #757575}.op-container[_ngcontent-%COMP%]:focus{outline:0}.op-container[_ngcontent-%COMP%]:hover{border:2px solid #ffd3b2}.op-info-missing[_ngcontent-%COMP%]{color:gray}.op-name[_ngcontent-%COMP%]{border:none;cursor:pointer;display:inline-block;overflow-wrap:anywhere;padding:0;text-align:right;text-decoration:underline;white-space:pre-wrap}.op-name[_ngcontent-%COMP%]:focus{outline:0}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content;display:inline-block;margin-top:3px}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.self-op-name[_ngcontent-%COMP%]{font-weight:bold;text-decoration:none}.slot[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .slot[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slot[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}']}),n})();function bwe(n,t){if(1&n){let e=Te();f(0,"div",13)(1,"div",14),T(2),g(),f(3,"graph-op",15),A("onOpNameClick",function(r){ne(e);let o=w(3);return ie(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()()}if(2&n){let e=t.$implicit,i=t.index;v(2),Ve("Input slot ",i,":"),v(1),b("kind","input")("opName",e.op_name)("slot",e.output_slot)("opData",e.data)}}function vwe(n,t){if(1&n&&(f(0,"div",11)(1,"div"),S(2,bwe,4,5,"div",12),g()()),2&n){let e=w(2);v(2),b("ngForOf",e.inputOps)}}function ywe(n,t){1&n&&(f(0,"div",16),T(1," (This op has no input tensor.) "),g())}function xwe(n,t){if(1&n){let e=Te();f(0,"div",23)(1,"graph-op",15),A("onOpNameClick",function(r){ne(e);let o=w(4);return ie(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()()}if(2&n){let e=t.$implicit;v(1),b("kind","consumer")("opName",e.op_name)("slot",e.input_slot)("opData",e.data)}}function Cwe(n,t){if(1&n&&(f(0,"div",19)(1,"div",20),T(2),f(3,"span"),XM(4,21),g(),T(5,") "),g(),S(6,xwe,2,4,"div",22),g()),2&n){let e=t.$implicit,i=t.index;v(2),lu(" Output slot ",i,": (",e.length," "),v(2),vb(e.length),YM(4),v(2),b("ngForOf",e)}}function Mwe(n,t){if(1&n&&(f(0,"div",17)(1,"div"),S(2,Cwe,7,4,"div",18),g()()),2&n){let e=w(2);v(2),b("ngForOf",e.consumerOps)}}function wwe(n,t){if(1&n&&(f(0,"div",24),T(1),f(2,"span"),XM(3,25),g(),T(4," and no consumer.) "),g()),2&n){let e=w(2);v(1),Ve(" (This op has ",e.opInfo.consumers.length," output "),v(2),vb(e.opInfo.consumers.length),YM(3)}}function Swe(n,t){if(1&n){let e=Te();f(0,"div"),S(1,vwe,3,1,"div",4),S(2,ywe,2,0,"ng-template",null,5,jt),f(4,"div",6)(5,"div",7),T(6,"Op:"),g(),f(7,"graph-op",8),A("onOpNameClick",function(r){ne(e);let o=w();return ie(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()(),S(8,Mwe,3,1,"div",9),S(9,wwe,5,2,"ng-template",null,10,jt),g()}if(2&n){let e=st(3),i=st(10),r=w();v(1),b("ngIf",r.inputOps.length>0)("ngIfElse",e),v(6),b("kind","self")("opName",r.opInfo.op_name)("opData",r.opInfo),v(1),b("ngIf",r.totalNumConsumers>0)("ngIfElse",i)}}function Ewe(n,t){1&n&&(f(0,"span",26),T(1," (Op info unavailable.) "),g())}function Twe(n,t){1&n&&(f(0,"div",27),T(1," No graph op selected. Click a tensor name in the Graph Executions table to view the neighborhood of the tensor's op in its graph. "),g())}var xY=(()=>{class n{constructor(){this.onGraphOpNavigate=new F}get graphId(){return this.opInfo.graph_ids[this.opInfo.graph_ids.length-1]}get totalNumConsumers(){return this.consumerOps.reduce((e,i)=>e+i.length,0)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["graph-component"]],inputs:{opInfo:"opInfo",inputOps:"inputOps",consumerOps:"consumerOps"},outputs:{onGraphOpNavigate:"onGraphOpNavigate"},decls:9,vars:2,consts:function(){let t,e,i,r;return t=$localize`:␟fe55f9b193ea20aae5b5635e68d9386503847746␟4955133740841299851:{VAR_PLURAL, plural, =0 {consumer} =1 {consumer} other {consumers}}`,t=QM(t,{VAR_PLURAL:"\ufffd0\ufffd"}),e=$localize`:␟baa460e2f2b857e26292b246fc18ae0ea9b5e537␟5556340343850165516: ${t}:ICU:`,i=$localize`:␟6aa75f627e0dc16150ef448464e0c857aaa0dc18␟5156712935150586878:{VAR_PLURAL, plural, =0 {tensor} =1 {tensor} other {tensors}}`,i=QM(i,{VAR_PLURAL:"\ufffd0\ufffd"}),r=$localize`:␟893476c2c421cee47663c9732fa41a750d3a73df␟246067053735162634: ${i}:ICU:`,[[1,"graph-structure-container"],[4,"ngIf","ngIfElse"],["opInfoMissing",""],["noOpFocused",""],["class","inputs-container",4,"ngIf","ngIfElse"],["noInputs",""],[1,"self-op-container"],[1,"self-op-header"],[3,"kind","opName","opData","onOpNameClick"],["class","consumers-container",4,"ngIf","ngIfElse"],["noConsumers",""],[1,"inputs-container"],["class","input-op-section",4,"ngFor","ngForOf"],[1,"input-op-section"],[1,"input-slot-header"],[3,"kind","opName","slot","opData","onOpNameClick"],[1,"inputs-container","no-inputs-indicator"],[1,"consumers-container"],["class","slot-consumers-container",4,"ngFor","ngForOf"],[1,"slot-consumers-container"],[1,"slot-consumers-header"],e,["class","consumer-section",4,"ngFor","ngForOf"],[1,"consumer-section"],[1,"op-consumers-container"],r,[1,"op-info-missing"],[1,"no-op-focused"]]},template:function(e,i){if(1&e&&(f(0,"div")(1,"div"),T(2,"Graph Structure"),g(),f(3,"div",0),S(4,Swe,11,7,"div",1),g(),S(5,Ewe,2,0,"ng-template",null,2,jt),S(7,Twe,2,0,"ng-template",null,3,jt),g()),2&e){let r=st(8);v(4),b("ngIf",null!=i.opInfo)("ngIfElse",r)}},dependencies:[nn,Ne,yY],styles:['[_nghost-%COMP%]{overflow-y:auto}.consumers-container[_ngcontent-%COMP%]{padding-bottom:5px;overflow-x:auto;white-space:nowrap}.consumer-section[_ngcontent-%COMP%]{display:block;margin:5px 0}.graph-structure-container[_ngcontent-%COMP%]{font-size:12px;overflow-y:auto;white-space:nowrap}.inputs-container[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);margin-top:5px;overflow-x:auto;padding-bottom:0;white-space:nowrap}.input-op-section[_ngcontent-%COMP%]{border-right:1px solid rgba(0,0,0,.12);display:inline-block;margin-right:5px;padding-bottom:5px}.input-slot-header[_ngcontent-%COMP%]{background-color:#fff099;margin-bottom:5px}body.dark-mode[_nghost-%COMP%]   .input-slot-header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .input-slot-header[_ngcontent-%COMP%]{background-color:#e65100}.input-tensor-name[_ngcontent-%COMP%]{display:block;white-space:nowrap}.no-op-focused[_ngcontent-%COMP%]{color:gray;font-family:"Roboto",Arial,Helvetica,sans-serif;font-size:13px;white-space:normal}.self-op-header[_ngcontent-%COMP%]{font-weight:bold;margin-bottom:5px}.self-op-container[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);padding-bottom:5px}.slot-consumers-container[_ngcontent-%COMP%]{border-right:1px solid rgba(0,0,0,.12);display:inline-block;margin-right:5px;padding-top:5px;vertical-align:top}.slot-consumers-header[_ngcontent-%COMP%]{white-space:nowrap}'],changeDetection:0}),n})(),CY=(()=>{class n{onGraphOpNavigate(e){this.store.dispatch(Fg(e))}constructor(e){this.store=e,this.opInfo$=this.store.pipe(un(dN)),this.inputOps$=this.store.pipe(un(uN)),this.consumerOps$=this.store.pipe(un(sY))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-graph"]],decls:4,vars:9,consts:[[3,"opInfo","inputOps","consumerOps","onGraphOpNavigate"]],template:function(e,i){1&e&&(f(0,"graph-component",0),A("onGraphOpNavigate",function(o){return i.onGraphOpNavigate(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("opInfo",G(1,3,i.opInfo$))("inputOps",G(2,5,i.inputOps$))("consumerOps",G(3,7,i.consumerOps$))},dependencies:[xY,ct],encapsulation:2}),n})(),MY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["inactive-component"]],decls:54,vars:0,consts:[[1,"container"],[1,"title"],[1,"code"],[1,"arg"],[1,"exhibits-container"],[1,"exhibit"],[1,"screenshot"],["src","data:image/png;base64, "],[1,"description"],["src","data:image/png;base64, "],["src","data:image/png;base64, "],[1,"details-container"],[1,"details"],["href","https://www.tensorflow.org/api_docs/python/tf/debugging/experimental/enable_dump_debug_info","target","blank","rel","noreferrer noopener"],["href","https://www.tensorflow.org/api_docs/python/tf/debugging","target","blank","rel","noreferrer noopener"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"div",1),T(2,"Debugger V2 is inactive because no data is available."),g(),f(3,"div"),T(4,"To use the debugger,"),g(),f(5,"div")(6,"ol")(7,"li"),T(8," Add the following line to the beginning of your program: "),f(9,"div",2)(10,"span"),T(11,"tf.debugging.experimental.enable_dump_debug_info("),g(),f(12,"span",3),T(13,"logdir"),g(),T(14,", "),f(15,"span",3),T(16,'tensor_debug_mode="FULL_HEALTH"'),g(),T(17,", "),f(18,"span",3),T(19,"circular_buffer_size=-1"),g(),f(20,"span"),T(21,")"),g()()(),f(22,"li"),T(23,"Re-run the program."),g()()(),f(24,"div",4)(25,"div",5)(26,"div",6),k(27,"img",7),g(),f(28,"div",8),T(29,"Auto-alerts for problems found"),g()(),f(30,"div",5)(31,"div",6),k(32,"img",9),g(),f(33,"div",8),T(34," Integrated debugging to trace problems to their causes "),g()(),f(35,"div",5)(36,"div",6),k(37,"img",10),g(),f(38,"div",8),T(39,"Link log to code"),g()()(),f(40,"div",11)(41,"div",12),T(42," The log directory must contain TensorFlow Debugger (V2) data. tf.debugging.experimental.enable_dump_debug_info() will collect tensor data, graph structures, the associated stack traces, and source code to the specificed directory logdir as the instrumented TensorFlow program executes. "),g(),f(43,"div",12)(44,"div"),T(45," See "),f(46,"a",13),T(47," documentation "),g(),T(48," of the Python API of Debugger V2. "),g(),f(49,"div"),T(50," See "),f(51,"a",14),T(52," here "),g(),T(53," for other TensorFlow debugging APIs. "),g()()()())},styles:[".arg[_ngcontent-%COMP%] {\n  color: lightblue;\n  font-style: italic;\n  margin: 2px;\n}\n\n.code[_ngcontent-%COMP%] {\n  font-family: 'Roboto Mono', monospace;\n  margin: 10px;\n}\n\n.container[_ngcontent-%COMP%] {\n  height: 100%;\n  font-family: Roboto;\n  font-size: 15px;\n  overflow-y: auto;\n  padding: 50px;\n}\n\n.details-container[_ngcontent-%COMP%] {\n  display: inline-flex;\n  vertical-align: middle;\n  width: 100%;\n}\n\n.details[_ngcontent-%COMP%] {\n  display: inline-block;\n  margin: 10px 60px;\n  width: 50%;\n}\n\n.exhibit-container[_ngcontent-%COMP%] {\n  white-space: nowrap;\n  width: 100%;\n}\n\n.exhibit[_ngcontent-%COMP%] {\n  align-content: center;\n  display: inline-block;\n  margin: 10px 60px;\n  vertical-align: top;\n  width: 310px;\n}\n\n.exhibit[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%] {\n  font-weight: bold;\n  text-align: center;\n  width: 310px;\n}\n\n.exhibit[_ngcontent-%COMP%]   .screenshot[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%] {\n  height: 200px;\n  width: 100%;\n}\n\n.title[_ngcontent-%COMP%] {\n  font-size: 135%;\n  font-weight: bold;\n  margin-bottom: 25px;\n}"]}),n})(),wY=(()=>{class n{constructor(e){this.store=e}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-inactive"]],decls:1,vars:0,template:function(e,i){1&e&&k(0,"inactive-component")},dependencies:[MY],encapsulation:2}),n})(),EY={getWindow:function(){return window}};function SY(n){let t=EY.getWindow().require;return new Promise(e=>{t(n,e)})}var bN_loadMonaco=async function(){let n=EY.getWindow();if(void 0===n.monaco){if(!n.require)throw new Error("loadMonaco() failed because function require() is unavailable");n.require.config({paths:{vs:"/tf-imports/vs"}}),await SY(["vs/editor/editor.main"]),await SY(["vs/python/python.contribution"])}};function $E(n){return n?"vs-dark":"vs"}var Vh=(()=>{class n{constructor(e){this.resizeEventDebouncePeriodInMs=100,this.onResize=new F,this.ngUnsubscribe$=new Ee,this.onResize$=new Ee;let i=new ResizeObserver(()=>{this.onResize$.next()});i.observe(e.nativeElement),this.ngUnsubscribe$.subscribe(()=>{i.unobserve(e.nativeElement)})}ngOnInit(){this.onResize$.pipe(os(1),Cr(this.resizeEventDebouncePeriodInMs),it(this.ngUnsubscribe$)).subscribe(()=>{this.onResize.emit()})}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275dir=Me({type:n,selectors:[["","detectResize",""]],inputs:{resizeEventDebouncePeriodInMs:"resizeEventDebouncePeriodInMs"},outputs:{onResize:"onResize"}}),n})(),Fwe=["codeViewerContainer"],AY=(()=>{class n{constructor(){this.lines=null,this.focusedLineno=null,this.monaco=null,this.editor=null,this.decorations=[],this.RESIZE_DEBOUNCE_INTERVAL_MS=50}onResize(){this.editor&&this.editor.layout()}ngOnChanges(e){if(null===this.monaco)return;let i=e.monaco&&null===this.editor;null===this.editor&&(this.editor=this.monaco.editor.create(this.codeViewerContainer.nativeElement,{value:(this.lines??[]).join("\n"),language:"python",readOnly:!0,fontSize:10,minimap:{enabled:!0},theme:$E(this.useDarkMode)})),e.lines&&this.lines&&this.editor.setValue(this.lines.join("\n"));let r=i||e.focusedLineno?this.focusedLineno:null;if(r&&this.lines){this.editor.revealLineInCenter(r,this.monaco.editor.ScrollType.Smooth);let o=this.lines[r-1].length;this.decorations=this.editor.deltaDecorations(this.decorations,[{range:new this.monaco.Range(r,1,r,1),options:{isWholeLine:!0,linesDecorationsClassName:"highlight-gutter"}},{range:new this.monaco.Range(r,1,r,o+1),options:{inlineClassName:"highlight-line"}}])}e.useDarkMode&&this.monaco.editor.setTheme($E(this.useDarkMode))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["source-code-component"]],viewQuery:function(e,i){if(1&e&&Ue(Fwe,7,xe),2&e){let r;be(r=ve())&&(i.codeViewerContainer=r.first)}},inputs:{lines:"lines",focusedLineno:"focusedLineno",monaco:"monaco",useDarkMode:"useDarkMode"},features:[qt],decls:2,vars:1,consts:[["detectResize","",1,"code-viewer-container",3,"resizeEventDebouncePeriodInMs","onResize"],["codeViewerContainer",""]],template:function(e,i){1&e&&(f(0,"div",0,1),A("onResize",function(){return i.onResize()}),g()),2&e&&b("resizeEventDebouncePeriodInMs",i.RESIZE_DEBOUNCE_INTERVAL_MS)},dependencies:[Vh],styles:[".code-viewer-container[_ngcontent-%COMP%] {\n  height: 100%;\n}\n\n[_nghost-%COMP%]     .highlight-gutter {\n  background: rgba(255, 111, 0, 0.7);\n  width: 5px !important;\n}\n\n[_nghost-%COMP%]     .highlight-line {\n  background: rgba(255, 111, 0, 0.3);\n}"],changeDetection:0}),n})(),RY=(()=>{class n{ngOnInit(){this.monaco$=Jr(bN_loadMonaco()).pipe(q(()=>window.monaco))}constructor(){this.lines=null,this.focusedLineno=null,this.useDarkMode=!1,this.monaco$=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["source-code"]],inputs:{lines:"lines",focusedLineno:"focusedLineno",useDarkMode:"useDarkMode"},decls:2,vars:6,consts:[[3,"lines","focusedLineno","monaco","useDarkMode"]],template:function(e,i){1&e&&(k(0,"source-code-component",0),U(1,"async")),2&e&&b("lines",i.lines)("focusedLineno",i.focusedLineno)("monaco",G(1,4,i.monaco$))("useDarkMode",i.useDarkMode)},dependencies:[AY,ct],encapsulation:2}),n})();function Bwe(n,t){if(1&n&&(f(0,"div",6),T(1),g()),2&n){let e=w();v(1),Ve(" ",e.focusedSourceLineSpec.file_path," ")}}function Vwe(n,t){1&n&&(f(0,"div",7),T(1," No file selected. Click a line number in the Stack Trace section to show the source code. "),g())}function Hwe(n,t){if(1&n&&k(0,"source-code",8),2&n){let e=w();b("lines",e.focusedSourceFileContent.lines)("focusedLineno",e.focusedSourceLineSpec.lineno)("useDarkMode",e.useDarkMode)}}var PY=(()=>{class n{constructor(){this.focusedSourceFileContent=null,this.focusedSourceLineSpec=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["source-files-component"]],inputs:{focusedSourceFileContent:"focusedSourceFileContent",focusedSourceLineSpec:"focusedSourceLineSpec",useDarkMode:"useDarkMode"},decls:8,vars:3,consts:[[1,"source-files-container"],[1,"header-section"],[1,"title-tag"],["class","file-label",4,"ngIf","ngIfElse"],["noFileSelected",""],[3,"lines","focusedLineno","useDarkMode",4,"ngIf"],[1,"file-label"],[1,"no-file-selected"],[3,"lines","focusedLineno","useDarkMode"]],template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1)(2,"div",2),T(3,"Source Code"),g(),S(4,Bwe,2,1,"div",3),S(5,Vwe,2,0,"ng-template",null,4,jt),g(),S(7,Hwe,1,3,"source-code",5),g()),2&e){let r=st(6);v(4),b("ngIf",null!==i.focusedSourceLineSpec)("ngIfElse",r),v(3),b("ngIf",null!==i.focusedSourceFileContent&&null!==i.focusedSourceLineSpec&&null!==i.focusedSourceFileContent.lines)}},dependencies:[Ne,RY],styles:['.header-section[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;height:24px;padding-bottom:6px;vertical-align:middle;white-space:nowrap;width:100%}body.dark-mode[_nghost-%COMP%]   .header-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .header-section[_ngcontent-%COMP%]{border-bottom:1px solid #555}.file-label[_ngcontent-%COMP%]{display:inline-block;font-weight:normal;white-space:normal;overflow-wrap:anywhere;overflow-y:auto;padding:0 20px}.no-file-selected[_ngcontent-%COMP%]{display:inline-block;color:#666;padding:0 20px;white-space:normal}.source-files-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-family:"Roboto Mono",monospace;font-size:10px;height:100%}.title-tag[_ngcontent-%COMP%]{display:inline-block;font-weight:bold;height:100%;padding-left:6px;vertical-align:top}source-code[_ngcontent-%COMP%]{flex-grow:1;width:100%}']}),n})(),kY=(()=>{class n{constructor(e){this.store=e,this.focusedSourceFileContent$=this.store.select(QE),this.focusedSourceLineSpec$=this.store.select(ZE),this.useDarkMode$=this.store.select(Pl)}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-source-files"]],decls:4,vars:9,consts:[[3,"focusedSourceFileContent","focusedSourceLineSpec","useDarkMode"]],template:function(e,i){1&e&&(k(0,"source-files-component",0),U(1,"async"),U(2,"async"),U(3,"async")),2&e&&b("focusedSourceFileContent",G(1,3,i.focusedSourceFileContent$))("focusedSourceLineSpec",G(2,5,i.focusedSourceLineSpec$))("useDarkMode",G(3,7,i.useDarkMode$))},dependencies:[PY,ct],encapsulation:2}),n})(),jwe=["stackFrameArray"];function Gwe(n,t){if(1&n&&(f(0,"span",13),T(1),g()),2&n){let e=w(3);v(1),Ve(" #",e.executionIndex,": ")}}function Wwe(n,t){if(1&n&&(f(0,"span",14),T(1),g()),2&n){let e=w(3);v(1),Ve(" ",e.opType," ")}}function qwe(n,t){if(1&n&&(f(0,"div"),T(1," Eager execution "),S(2,Gwe,2,1,"span",11),S(3,Wwe,2,1,"span",12),g()),2&n){let e=w(2);v(2),b("ngIf",null!==e.opType),v(1),b("ngIf",null!==e.opType)}}function Xwe(n,t){if(1&n&&(f(0,"span",16),T(1),g()),2&n){let e=w(3);v(1),Ve(' "',e.opName,'" ')}}function Ywe(n,t){if(1&n&&(f(0,"span",14),T(1),g()),2&n){let e=w(3);v(1),Ve(" ",e.opType," ")}}function Qwe(n,t){if(1&n&&(f(0,"div"),T(1," Creation of graph op "),S(2,Xwe,2,1,"span",15),S(3,Ywe,2,1,"span",12),g()),2&n){let e=w(2);v(2),b("ngIf",null!==e.opName),v(1),b("ngIf",null!==e.opType)}}function Zwe(n,t){if(1&n&&(f(0,"span",17),T(1),g()),2&n){let e=w(2);v(1),Ve(" (Host name: ",e.stackFramesForDisplay[0].host_name,") ")}}function Kwe(n,t){if(1&n&&(f(0,"div",7)(1,"span")(2,"span",8),S(3,qwe,4,2,"div",9),S(4,Qwe,4,2,"div",9),g()(),f(5,"div"),S(6,Zwe,2,1,"span",10),g()()),2&n){let e=w();v(2),b("ngSwitch",e.codeLocationType),v(1),b("ngSwitchCase",e.CodeLocationType.EXECUTION),v(1),b("ngSwitchCase",e.CodeLocationType.GRAPH_OP_CREATION),v(2),b("ngIf",null!==e.stackFramesForDisplay&&e.stackFramesForDisplay.length>0)}}function Jwe(n,t){1&n&&(f(0,"div",18),T(1," Click an eager execution or graph op to show its original stack trace. "),g())}function $we(n,t){1&n&&(f(0,"div",28),T(1," \u2913 "),g())}var eSe=function(n,t){return[n,t]};function tSe(n,t){if(1&n){let e=Te();f(0,"div",22)(1,"div",23),T(2),g(),f(3,"div",24),S(4,$we,2,0,"div",25),f(5,"div",26),A("click",function(){let o=ne(e).$implicit;return ie(w(2).onSourceLineClicked.emit(o))}),T(6),g(),f(7,"div",27),T(8),g()()()}if(2&n){let e=t.$implicit,i=w(2);b("ngClass",So(6,eSe,e.belongsToFocusedFile?"focused-file":"",e.focused?"focused-stack-frame":"")),v(1),Zi("title",e.file_path),v(1),Ve(" ",e.concise_file_path," "),v(2),b("ngIf",i.stickToBottommostFrameInFocusedFile&&e.focused),v(2),Ve(" Line ",e.lineno," "),v(2),Ve(" ",e.function_name," ")}}function nSe(n,t){if(1&n&&(f(0,"div",19,20),S(2,tSe,9,9,"div",21),g()),2&n){let e=w();v(2),b("ngForOf",e.stackFramesForDisplay)}}function iSe(n,t){}var OY=(()=>{class n{constructor(){this.stackFramesForDisplay=null,this.onSourceLineClicked=new F,this.CodeLocationType=zo}ngAfterViewChecked(){if(void 0===this.stackFrameArray)return;let e=this.stackFrameArray.nativeElement,i=e.querySelector(".focused-stack-frame");if(null!==i)return void this.scrollToElement(e,i);let r=e.querySelector(".stack-frame-container:last-child");null!==r&&this.scrollToElement(e,r)}scrollToElement(e,i){e.scrollTop=i.offsetTop}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["stack-trace-component"]],viewQuery:function(e,i){if(1&e&&Ue(jwe,5),2&e){let r;be(r=ve())&&(i.stackFrameArray=r.first)}},inputs:{codeLocationType:"codeLocationType",opType:"opType",opName:"opName",executionIndex:"executionIndex",stickToBottommostFrameInFocusedFile:"stickToBottommostFrameInFocusedFile",stackFramesForDisplay:"stackFramesForDisplay"},outputs:{onSourceLineClicked:"onSourceLineClicked"},decls:10,vars:4,consts:[[1,"stack-trace-container"],[1,"stack-trace-header"],[1,"stack-trace-title"],["class","stack-trace-aux-info",4,"ngIf","ngIfElse"],["noStackTrace",""],["class","stack-frame-array",4,"ngIf","ngIfElse"],["loadingSection",""],[1,"stack-trace-aux-info"],[1,"code-location-origin",3,"ngSwitch"],[4,"ngSwitchCase"],["class","stack-trace-host-name",4,"ngIf"],["class","eager-execution-index",4,"ngIf"],["class","op-type",4,"ngIf"],[1,"eager-execution-index"],[1,"op-type"],["class","op-name",4,"ngIf"],[1,"op-name"],[1,"stack-trace-host-name"],[1,"stack-trace-aux-info","no-stack-trace"],[1,"stack-frame-array"],["stackFrameArray",""],["class","stack-frame-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"stack-frame-container",3,"ngClass"],[1,"stack-frame-file-path",3,"title"],[1,"stack-frame-lineno-function"],["class","stick-to-bottommost-indicator","title","Sticking to the bottommost frame in the current source file when navigating executions and graph ops. To remove this sticking, click any non-bottommost stack frame.",4,"ngIf"],[1,"stack-frame-lineno",3,"click"],[1,"stack-frame-function"],["title","Sticking to the bottommost frame in the current source file when navigating executions and graph ops. To remove this sticking, click any non-bottommost stack frame.",1,"stick-to-bottommost-indicator"]],template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1)(2,"span",2),T(3," Stack Trace "),g(),S(4,Kwe,7,4,"div",3),S(5,Jwe,2,0,"ng-template",null,4,jt),g(),S(7,nSe,3,1,"div",5),S(8,iSe,0,0,"ng-template",null,6,jt),g()),2&e){let r=st(6),o=st(9);v(4),b("ngIf",null!==i.codeLocationType)("ngIfElse",r),v(3),b("ngIf",null!==i.stackFramesForDisplay)("ngIfElse",o)}},dependencies:[wn,nn,Ne,mr,kr],styles:['.focused-file[_ngcontent-%COMP%]{font-weight:bold}.focused-stack-frame[_ngcontent-%COMP%]{background-color:rgba(255,111,0,.3)}.no-stack-trace[_ngcontent-%COMP%]{color:gray}.op-name[_ngcontent-%COMP%]{word-wrap:anywhere}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.stack-frame-array[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;width:calc(100% - 8px)}.stack-frame-container[_ngcontent-%COMP%]{border-bottom:1px solid #a0a0a0}.stack-frame-file-path[_ngcontent-%COMP%]{max-width:180px;width:180px}.stack-frame-lineno-function[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.stack-frame-function[_ngcontent-%COMP%]{display:inline-block;max-width:200px;padding-left:10px;text-align:left;white-space:normal;width:200px;word-wrap:anywhere}.stack-frame-lineno[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;max-width:80px;text-align:left;text-decoration:underline;width:80px}.stack-trace-aux-info[_ngcontent-%COMP%]{margin-top:15px;padding-left:24px}.stack-trace-container[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;box-sizing:border-box;display:flex;flex-flow:column;font-size:10px;font-family:"Roboto Mono",monospace;height:100%;margin-left:8px;max-height:360px;overflow-x:hidden;overflow-y:hidden;padding-left:8px;width:100%}body.dark-mode[_nghost-%COMP%]   .stack-trace-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .stack-trace-container[_ngcontent-%COMP%]{border-left:1px solid #555}.stack-trace-header[_ngcontent-%COMP%]{box-shadow:0 5px 3px -3px #ccc;padding-bottom:3px}.stack-trace-host-name[_ngcontent-%COMP%]{color:gray}.stack-trace-title[_ngcontent-%COMP%]{font-weight:bold}.stick-to-bottommost-indicator[_ngcontent-%COMP%]{display:inline-block;font-weight:bold;font-size:12px;padding-right:3px}']}),n})(),FY=(()=>{class n{constructor(e){this.store=e,this.codeLocationType$=this.store.pipe(un(W(fy,i=>null===i?null:i.codeLocationType))),this.opType$=this.store.pipe(un(W(fy,i=>null===i?null:i.opType))),this.opName$=this.store.pipe(un(W(fy,i=>null===i||i.codeLocationType!==zo.GRAPH_OP_CREATION?null:i.opName))),this.executionIndex$=this.store.pipe(un(W(fy,i=>null===i||i.codeLocationType!==zo.EXECUTION?null:i.executionIndex))),this.stickToBottommostFrameInFocusedFile$=this.store.pipe(un(hY)),this.stackFramesForDisplay$=this.store.pipe(un(W(uY,ZE,(i,r)=>{if(null===i)return null;let o=[];for(let a of i){let{host_name:s,file_path:l,lineno:c,function_name:d}=a,u=l.split("/"),h=null!==r&&s===r.host_name&&l===r.file_path;o.push({host_name:s,file_path:l,concise_file_path:u[u.length-1],lineno:c,function_name:d,belongsToFocusedFile:h,focused:h&&c===r.lineno})}return o})))}onSourceLineClicked(e){let{host_name:i,file_path:r,lineno:o,function_name:a}=e;this.store.dispatch(Ng({stackFrame:{host_name:i,file_path:r,lineno:o,function_name:a}}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-stack-trace"]],decls:7,vars:18,consts:[[3,"codeLocationType","opType","opName","executionIndex","stickToBottommostFrameInFocusedFile","stackFramesForDisplay","onSourceLineClicked"]],template:function(e,i){1&e&&(f(0,"stack-trace-component",0),A("onSourceLineClicked",function(o){return i.onSourceLineClicked(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),g()),2&e&&b("codeLocationType",G(1,6,i.codeLocationType$))("opType",G(2,8,i.opType$))("opName",G(3,10,i.opName$))("executionIndex",G(4,12,i.executionIndex$))("stickToBottommostFrameInFocusedFile",G(5,14,i.stickToBottommostFrameInFocusedFile$))("stackFramesForDisplay",G(6,16,i.stackFramesForDisplay$))},dependencies:[OY,ct],encapsulation:2}),n})(),aSe=function(n,t){return{tensorDebugMode:n,array:t}};function sSe(n,t){if(1&n&&(f(0,"div",12)(1,"div",13),T(2),g(),f(3,"div",14),k(4,"debug-tensor-value",15),g()()),2&n){let e=t.$implicit,i=t.index,r=w(3);v(2),Ve("Output slot ",i,":"),v(2),b("debugTensorValue",r.parseDebugTensorValue(So(2,aSe,r.tensorDebugMode,e)))}}function lSe(n,t){if(1&n&&(f(0,"div",10),S(1,sSe,5,5,"div",11),g()),2&n){let e=w(2);v(1),b("ngForOf",e.debugTensorValues)}}function cSe(n,t){if(1&n&&(f(0,"div")(1,"div")(2,"div",3)(3,"span",4),T(4," Op: "),g(),f(5,"span",5),T(6),g()(),f(7,"div",3)(8,"span",4),T(9," # of input tensors: "),g(),f(10,"span",6),T(11),g()(),f(12,"div",3)(13,"span",4),T(14," # of output tensors: "),g(),f(15,"span",7),T(16),g(),f(17,"span",8),T(18),g()(),S(19,lSe,2,1,"div",9),g()()),2&n){let e=w();v(6),Ve(" ",e.focusedExecutionData.op_type," "),v(5),Ve(" ",null==e.focusedExecutionData.input_tensor_ids?0:e.focusedExecutionData.input_tensor_ids.length," "),v(5),Ve(" ",null==e.focusedExecutionData.output_tensor_ids?0:e.focusedExecutionData.output_tensor_ids.length," "),v(2),Ve(" (debug mode: ",e.TensorDebugMode[e.tensorDebugMode],") "),v(1),b("ngIf",e.hasDebugTensorValues)}}function dSe(n,t){}var NY=(()=>{class n{constructor(){this.tensorDebugMode=Ao.UNSPECIFIED,this.hasDebugTensorValues=!1,this.debugTensorValues=null,this.debugTensorDtypes=null,this.TensorDebugMode=Ao,this.parseDebugTensorValue=KE}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["execution-data-component"]],inputs:{focusedExecutionIndex:"focusedExecutionIndex",focusedExecutionData:"focusedExecutionData",tensorDebugMode:"tensorDebugMode",hasDebugTensorValues:"hasDebugTensorValues",debugTensorValues:"debugTensorValues",debugTensorDtypes:"debugTensorDtypes"},decls:7,vars:3,consts:[[1,"focus-execution-container"],[4,"ngIf","ngIfElse"],["loading_section",""],[1,"execution-data-field"],[1,"execution-data-key"],[1,"execution-data-value","op-type"],[1,"execution-data-value","input-tensors"],[1,"execution-data-value","output-tensors"],[1,"execution-data-value"],["class","output-slots",4,"ngIf"],[1,"output-slots"],["class","output-slot-container",4,"ngFor","ngForOf"],[1,"output-slot-container"],[1,"output-slot-number"],[1,"output-slot-debug-tensor-value"],[3,"debugTensorValue"]],template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div")(2,"span"),T(3),g()(),S(4,cSe,20,5,"div",1),S(5,dSe,0,0,"ng-template",null,2,jt),g()),2&e){let r=st(6);v(3),Ve(" Python Execution #",i.focusedExecutionIndex," "),v(1),b("ngIf",null!==i.focusedExecutionData)("ngIfElse",r)}},dependencies:[nn,Ne,JE],styles:['.debug-tensor-values-table[_ngcontent-%COMP%]{width:100%}.debug-tensor-values-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-top:1px solid #000;text-align:left}.debug-tensor-values-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left}.execution-data-field[_ngcontent-%COMP%]{white-space:nowrap}.execution-data-key[_ngcontent-%COMP%]{display:inline-block;max-width:120px;text-align:right;width:120px}.execution-data-value[_ngcontent-%COMP%]{display:inline-block;margin-left:10px}.focus-execution-container[_ngcontent-%COMP%]{background-color:#ffcc80;border-radius:4px;font-size:12px;height:120px;padding:5px;width:360px}body.dark-mode[_nghost-%COMP%]   .focus-execution-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .focus-execution-container[_ngcontent-%COMP%]{background-color:#e65100}.output-slots[_ngcontent-%COMP%]{height:60px;overflow-x:auto;overflow-y:auto}.output-slot-container[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;margin-top:5px;padding:2px 0;vertical-align:top}body.dark-mode[_nghost-%COMP%]   .output-slot-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .output-slot-container[_ngcontent-%COMP%]{border-top:1px solid #555}.output-slot-number[_ngcontent-%COMP%]{display:block;font-family:"Roboto Mono",monospace}.output-slot-debug-tensor-value[_ngcontent-%COMP%]{display:block;margin:3px 0 3px 30px}.output-tensors[_ngcontent-%COMP%]{margin-top:5px}']}),n})(),LY="Unknown dtype",BY=(()=>{class n{constructor(e){this.store=e,this.focusedExecutionData$=this.store.pipe(un(Bh)),this.tensorDebugMode$=this.store.pipe(un(W(Bh,i=>null===i?Ao.UNSPECIFIED:i.tensor_debug_mode))),this.hasDebugTensorValues$=this.store.pipe(un(W(Bh,i=>{if(null===i||null===i.debug_tensor_values)return!1;for(let r of i.debug_tensor_values)if(null!==r&&r.length>0)return!0;return!1}))),this.debugTensorValues$=this.store.pipe(un(W(Bh,i=>null===i?null:i.debug_tensor_values))),this.debugTensorDtypes$=this.store.pipe(un(W(Bh,i=>{if(null===i||null===i.debug_tensor_values||i.tensor_debug_mode!==Ao.FULL_HEALTH&&i.tensor_debug_mode!==Ao.SHAPE)return null;let r=[];for(let o of i.debug_tensor_values)if(null===o)r.push(LY);else{let a=String(i.tensor_debug_mode===Ao.FULL_HEALTH?o[2]:o[1]);r.push(gy[a]||LY)}return r})))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-execution-data"]],inputs:{focusedExecutionIndex:"focusedExecutionIndex"},decls:6,vars:16,consts:[[3,"focusedExecutionIndex","focusedExecutionData","tensorDebugMode","hasDebugTensorValues","debugTensorValues","debugTensorDtypes"]],template:function(e,i){1&e&&(k(0,"execution-data-component",0),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async")),2&e&&b("focusedExecutionIndex",i.focusedExecutionIndex)("focusedExecutionData",G(1,6,i.focusedExecutionData$))("tensorDebugMode",G(2,8,i.tensorDebugMode$))("hasDebugTensorValues",G(3,10,i.hasDebugTensorValues$))("debugTensorValues",G(4,12,i.debugTensorValues$))("debugTensorDtypes",G(5,14,i.debugTensorDtypes$))},dependencies:[NY,ct],encapsulation:2}),n})(),hSe=["knob"],mSe=["valueIndicatorContainer"];function fSe(n,t){if(1&n&&(f(0,"div",4,5)(2,"div",6)(3,"span",7),T(4),g()()()),2&n){let e=w();v(4),kt(e.valueIndicatorText)}}var gSe=["trackActive"];function _Se(n,t){if(1&n&&k(0,"div"),2&n){let e=t.$implicit,i=t.index,r=w(3);Xo(0===e?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),Bt("transform",r._calcTickMarkTransform(i))}}function bSe(n,t){if(1&n&&(Gt(0),S(1,_Se,1,4,"div",11),Wt()),2&n){let e=w(2);v(1),b("ngForOf",e._tickMarks)}}function vSe(n,t){if(1&n&&(f(0,"div",8,9),S(2,bSe,2,1,"ng-container",10),g()),2&n){let e=w();v(2),b("ngIf",e._cachedWidth)}}function ySe(n,t){if(1&n&&k(0,"mat-slider-visual-thumb",7),2&n){let e=w();b("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText)}}var xSe=["*"],tT=new te("_MatSlider"),VY=new te("_MatSliderThumb"),HY=new te("_MatSliderRangeThumb"),zY=new te("_MatSliderVisualThumb"),CSe=(()=>{class n{constructor(e,i,r,o){this._cdr=e,this._ngZone=i,this._slider=o,this._isHovered=!1,this._isActive=!1,this._isValueIndicatorVisible=!1,this._onPointerMove=a=>{if(this._sliderInput._isFocused)return;let s=this._hostElement.getBoundingClientRect(),l=this._isSliderThumbHovered(a,s);this._isHovered=l,l?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)},this._onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)},this._onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")},this._onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")},this._onDragStart=()=>{this._isActive=!0,this._showActiveRipple()},this._onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef)},this._hostElement=r.nativeElement}ngAfterViewInit(){this._ripple.radius=24,this._sliderInput=this._slider._getInput(this.thumbPosition),this._sliderInputEl=this._sliderInput._hostElement;let e=this._sliderInputEl;this._ngZone.runOutsideAngular(()=>{e.addEventListener("pointermove",this._onPointerMove),e.addEventListener("pointerdown",this._onDragStart),e.addEventListener("pointerup",this._onDragEnd),e.addEventListener("pointerleave",this._onMouseLeave),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur)})}ngOnDestroy(){let e=this._sliderInputEl;e.removeEventListener("pointermove",this._onPointerMove),e.removeEventListener("pointerdown",this._onDragStart),e.removeEventListener("pointerup",this._onDragEnd),e.removeEventListener("pointerleave",this._onMouseLeave),e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur)}_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(e){return 0===e?.state||1===e?.state}_showRipple(e,i){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(1===this.thumbPosition?2:1)._showValueIndicator(),!this._slider._globalRippleOptions?.disabled||i))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:e,centered:!0,persistent:!0})}_hideRipple(e){if(e?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let i=this._getSibling();i._isShowingAnyRipple()||(this._hideValueIndicator(),i._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(1===this.thumbPosition?2:1)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}_isSliderThumbHovered(e,i){let r=i.width/2,l=e.clientY-(i.y+r);return Math.pow(e.clientX-(i.x+r),2)+Math.pow(l,2)<Math.pow(r,2)}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(ot),C(xe),C(tT))},n.\u0275cmp=P({type:n,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(e,i){if(1&e&&(Ue(Ki,5),Ue(hSe,5),Ue(mSe,5)),2&e){let r;be(r=ve())&&(i._ripple=r.first),be(r=ve())&&(i._knob=r.first),be(r=ve())&&(i._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[Vt([{provide:zY,useExisting:n}])],decls:4,vars:2,consts:[["class","mdc-slider__value-indicator-container",4,"ngIf"],[1,"mdc-slider__thumb-knob"],["knob",""],["matRipple","",1,"mat-mdc-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator-container"],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(e,i){1&e&&(S(0,fSe,5,1,"div",0),k(1,"div",1,2)(3,"div",3)),2&e&&(b("ngIf",i.discrete),v(3),b("matRippleDisabled",!0))},dependencies:[Ne,Ki],styles:[".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}"],encapsulation:2,changeDetection:0}),n})(),MSe=Ko(go(class{constructor(n){this._elementRef=n}}),"primary"),Ju=(()=>{class n extends MSe{get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e);let i=this._getInput(2),r=this._getInput(1);i&&(i.disabled=this._disabled),r&&(r.disabled=this._disabled)}get discrete(){return this._discrete}set discrete(e){this._discrete=vt(e),this._updateValueIndicatorUIs()}get showTickMarks(){return this._showTickMarks}set showTickMarks(e){this._showTickMarks=vt(e)}get min(){return this._min}set min(e){let i=mi(e,this._min);this._min!==i&&this._updateMin(i)}_updateMin(e){let i=this._min;this._min=e,this._isRange?this._updateMinRange({old:i,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange()}_updateMinRange(e){let i=this._getInput(2),r=this._getInput(1),o=i.value,a=r.value;r.min=e.new,i.min=Math.max(e.new,r.value),r.max=Math.min(i.max,i.value),r._updateWidthInactive(),i._updateWidthInactive(),e.new<e.old?this._onTranslateXChangeBySideEffect(i,r):this._onTranslateXChangeBySideEffect(r,i),o!==i.value&&this._onValueChange(i),a!==r.value&&this._onValueChange(r)}_updateMinNonRange(e){let i=this._getInput(2);if(i){let r=i.value;i.min=e,i._updateThumbUIByValue(),this._updateTrackUI(i),r!==i.value&&this._onValueChange(i)}}get max(){return this._max}set max(e){let i=mi(e,this._max);this._max!==i&&this._updateMax(i)}_updateMax(e){let i=this._max;this._max=e,this._isRange?this._updateMaxRange({old:i,new:e}):this._updateMaxNonRange(e),this._onMinMaxOrStepChange()}_updateMaxRange(e){let i=this._getInput(2),r=this._getInput(1),o=i.value,a=r.value;i.max=e.new,r.max=Math.min(e.new,i.value),i.min=r.value,i._updateWidthInactive(),r._updateWidthInactive(),e.new>e.old?this._onTranslateXChangeBySideEffect(r,i):this._onTranslateXChangeBySideEffect(i,r),o!==i.value&&this._onValueChange(i),a!==r.value&&this._onValueChange(r)}_updateMaxNonRange(e){let i=this._getInput(2);if(i){let r=i.value;i.max=e,i._updateThumbUIByValue(),this._updateTrackUI(i),r!==i.value&&this._onValueChange(i)}}get step(){return this._step}set step(e){let i=mi(e,this._step);this._step!==i&&this._updateStep(i)}_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let e=this._getInput(2),i=this._getInput(1),r=e.value,o=i.value,a=i.value;e.min=this._min,i.max=this._max,e.step=this._step,i.step=this._step,this._platform.SAFARI&&(e.value=e.value,i.value=i.value),e.min=Math.max(this._min,i.value),i.max=Math.min(this._max,e.value),i._updateWidthInactive(),e._updateWidthInactive(),e.value<a?this._onTranslateXChangeBySideEffect(i,e):this._onTranslateXChangeBySideEffect(e,i),r!==e.value&&this._onValueChange(e),o!==i.value&&this._onValueChange(i)}_updateStepNonRange(){let e=this._getInput(2);if(e){let i=e.value;e.step=this._step,this._platform.SAFARI&&(e.value=e.value),e._updateThumbUIByValue(),i!==e.value&&this._onValueChange(e)}}constructor(e,i,r,o,a,s,l){super(o),this._ngZone=e,this._cdr=i,this._platform=r,this._dir=a,this._globalRippleOptions=s,this._disabled=!1,this._discrete=!1,this._showTickMarks=!1,this._min=0,this._max=100,this._step=0,this.displayWith=c=>`${c}`,this._rippleRadius=24,this.startValueIndicatorText="",this.endValueIndicatorText="",this._isRange=!1,this._isRtl=!1,this._hasViewInitialized=!1,this._tickMarkTrackWidth=0,this._hasAnimation=!1,this._resizeTimer=null,this._knobRadius=8,this._thumbsOverlap=!1,this._noopAnimations="NoopAnimations"===l,this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl="rtl"===this._dir.value}ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let e=this._getInput(2),i=this._getInput(1);this._isRange=!!e&&!!i,this._cdr.detectChanges();let r=this._getThumb(2);this._rippleRadius=r._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._inputOffset=this._knobRadius,this._isRange?this._initUIRange(e,i):this._initUINonRange(e),this._updateTrackUI(e),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(e){e.initProps(),e.initUI(),this._updateValueIndicatorUI(e),this._hasViewInitialized=!0,e._updateThumbUIByValue()}_initUIRange(e,i){e.initProps(),e.initUI(),i.initProps(),i.initUI(),e._updateMinMax(),i._updateMinMax(),e._updateStaticStyles(),i._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),i._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl="rtl"===this._dir.value,this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){let e=this._getInput(2),i=this._getInput(1);e._setIsLeftThumb(),i._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),i.translateX=i._calcTranslateXByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateWidthInactive(),i._updateWidthInactive(),e._updateThumbUIByValue(),i._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(2)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(1)._isActive||this._getThumb(2)._isActive}_getValue(e=2){let i=this._getInput(e);return i?i.value:this.min}_skipUpdate(){return!(!this._getInput(1)?._skipUIUpdate&&!this._getInput(2)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(e){let i=this._trackActive.nativeElement.style,r=e.left!==i.left&&e.right!==i.right;i.left=e.left,i.right=e.right,i.transformOrigin=e.transformOrigin,r?(this._elementRef.nativeElement.classList.add("mat-mdc-slider-disable-track-animation"),this._ngZone.onStable.pipe(Lt(1)).subscribe(()=>{this._elementRef.nativeElement.classList.remove("mat-mdc-slider-disable-track-animation"),i.transform=e.transform})):i.transform=e.transform}_calcTickMarkTransform(e){return`translateX(${e*(this._tickMarkTrackWidth/(this._tickMarks.length-1))}px`}_onTranslateXChange(e){!this._hasViewInitialized||(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e))}_onTranslateXChangeBySideEffect(e,i){!this._hasViewInitialized||(e._updateThumbUIByValue(),i._updateThumbUIByValue())}_onValueChange(e){!this._hasViewInitialized||(this._updateValueIndicatorUI(e),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){!this._hasViewInitialized||(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let e=this._getInput(2),i=this._getInput(1);e._updateThumbUIByValue(),i._updateThumbUIByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateMinMax(),i._updateMinMax(),e._updateWidthInactive(),i._updateWidthInactive()}else{let e=this._getInput(2);e&&e._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_areThumbsOverlapping(){let e=this._getInput(1),i=this._getInput(2);return!(!e||!i)&&i.translateX-e.translateX<20}_updateOverlappingThumbClassNames(e){let i=e.getSibling(),r=this._getThumb(e.thumbPosition);this._getThumb(i.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),r._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(e){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(e))}_updateThumbUI(e){this._skipUpdate()||(this._getThumb(2===e.thumbPosition?2:1)._hostElement.style.transform=`translateX(${e.translateX}px)`)}_updateValueIndicatorUI(e){if(this._skipUpdate())return;let i=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext=i:e._hostElement.setAttribute("aria-valuetext",i),this.discrete){1===e.thumbPosition?this.startValueIndicatorText=i:this.endValueIndicatorText=i;let r=this._getThumb(e.thumbPosition);i.length<3?r._hostElement.classList.add("mdc-slider__thumb--short-value"):r._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let e=this._getInput(2),i=this._getInput(1);e&&this._updateValueIndicatorUI(e),i&&this._updateValueIndicatorUI(i)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let e=this._step&&this._step>0?this._step:1,r=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=this._cachedWidth*r-6}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e))}_updateTrackUIRange(e){let i=e.getSibling();if(!i||!this._cachedWidth)return;let r=Math.abs(i.translateX-e.translateX)/this._cachedWidth;this._setTrackActiveStyles(e._isLeftThumb&&this._cachedWidth?{left:"auto",right:this._cachedWidth-i.translateX+"px",transformOrigin:"right",transform:`scaleX(${r})`}:{left:`${i.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${r})`})}_updateTrackUINonRange(e){this._setTrackActiveStyles(this._isRtl?{left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-e.fillPercentage})`}:{left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${e.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||void 0===this.step||void 0===this.min||void 0===this.max)return;let e=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(e):this._updateTickMarkUINonRange(e),this._isRtl&&this._tickMarks.reverse()}_updateTickMarkUINonRange(e){let i=this._getValue(),r=Math.max(Math.round((i-this.min)/e),0),o=Math.max(Math.round((this.max-i)/e),0);this._isRtl?r++:o++,this._tickMarks=Array(r).fill(0).concat(Array(o).fill(1))}_updateTickMarkUIRange(e){let i=this._getValue(),r=this._getValue(1),o=Math.max(Math.floor((r-this.min)/e),0),a=Math.max(Math.floor((i-r)/e)+1,0),s=Math.max(Math.floor((this.max-i)/e),0);this._tickMarks=Array(o).fill(1).concat(Array(a).fill(0),Array(s).fill(1))}_getInput(e){return 2===e&&this._input?this._input:this._inputs?.length?1===e?this._inputs.first:this._inputs.last:void 0}_getThumb(e){return 2===e?this._thumbs?.last:this._thumbs?.first}_setTransition(e){this._hasAnimation=e&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}}return n.\u0275fac=function(e){return new(e||n)(C(ot),C(Qt),C(Vn),C(xe),C(zi,8),C(Th,8),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-slider"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,VY,5),Bn(r,HY,4)),2&e){let o;be(o=ve())&&(i._input=o.first),be(o=ve())&&(i._inputs=o)}},viewQuery:function(e,i){if(1&e&&(Ue(gSe,5),Ue(zY,5)),2&e){let r;be(r=ve())&&(i._trackActive=r.first),be(r=ve())&&(i._thumbs=r)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:10,hostBindings:function(e,i){2&e&&nt("mdc-slider--range",i._isRange)("mdc-slider--disabled",i.disabled)("mdc-slider--discrete",i.discrete)("mdc-slider--tick-marks",i.showTickMarks)("_mat-animation-noopable",i._noopAnimations)},inputs:{color:"color",disableRipple:"disableRipple",disabled:"disabled",discrete:"discrete",showTickMarks:"showTickMarks",min:"min",max:"max",step:"step",displayWith:"displayWith"},exportAs:["matSlider"],features:[Vt([{provide:tT,useExisting:n}]),Xe],ngContentSelectors:xSe,decls:9,vars:5,consts:[[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],["trackActive",""],["class","mdc-slider__tick-marks",4,"ngIf"],[3,"discrete","thumbPosition","valueIndicatorText",4,"ngIf"],[3,"discrete","thumbPosition","valueIndicatorText"],[1,"mdc-slider__tick-marks"],["tickMarkContainer",""],[4,"ngIf"],[3,"class","transform",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(fn(),Tt(0),f(1,"div",0),k(2,"div",1),f(3,"div",2),k(4,"div",3,4),g(),S(6,vSe,3,1,"div",5),g(),S(7,ySe,1,3,"mat-slider-visual-thumb",6),k(8,"mat-slider-visual-thumb",7)),2&e&&(v(6),b("ngIf",i.showTickMarks),v(1),b("ngIf",i._isRange),v(1),b("discrete",i.discrete)("thumbPosition",2)("valueIndicatorText",i.endValueIndicatorText))},dependencies:[nn,Ne,CSe],styles:['.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{overflow:hidden}.mdc-slider .mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__thumb{display:flex;left:-24px;outline:none;position:absolute;user-select:none;height:48px;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-sizing:border-box;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;margin-left:8px;margin-right:8px;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider .mdc-slider__thumb-knob{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000));border-color:var(--mdc-slider-disabled-handle-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb::before,.mat-mdc-slider .mdc-slider__thumb::after{background-color:var(--mdc-slider-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover::before,.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mat-mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mat-mdc-slider .mdc-slider__track--active_fill{border-color:var(--mdc-slider-active-track-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mdc-theme-on-surface, #000))}.mat-mdc-slider .mdc-slider__track--inactive{background-color:var(--mdc-slider-inactive-track-color, var(--mdc-theme-primary, #6200ee));opacity:.24}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mdc-theme-on-surface, #000));opacity:.24}.mat-mdc-slider .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mdc-theme-on-primary, #fff));opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mdc-theme-primary, #6200ee));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mdc-theme-on-surface, #000));opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.6)}.mat-mdc-slider .mdc-slider__value-indicator{background-color:var(--mdc-slider-label-container-color, #666666);opacity:1}.mat-mdc-slider .mdc-slider__value-indicator::before{border-top-color:var(--mdc-slider-label-container-color, #666666)}.mat-mdc-slider .mdc-slider__value-indicator{color:var(--mdc-slider-label-label-text-color, var(--mdc-theme-on-primary, #fff))}.mat-mdc-slider .mdc-slider__track{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__track--active{height:var(--mdc-slider-active-track-height, 6px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 6px)) / 2)}.mat-mdc-slider .mdc-slider__track--active_fill{border-top-width:var(--mdc-slider-active-track-height, 6px)}.mat-mdc-slider .mdc-slider__track--inactive{height:var(--mdc-slider-inactive-track-height, 4px)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{height:var(--mdc-slider-with-tick-marks-container-size, 2px);width:var(--mdc-slider-with-tick-marks-container-size, 2px)}.mat-mdc-slider.mdc-slider--disabled{opacity:0.38}.mat-mdc-slider .mdc-slider__value-indicator-text{letter-spacing:var(--mdc-slider-label-label-text-tracking, 0.0071428571em);font-size:var(--mdc-slider-label-label-text-size, 0.875rem);font-family:var(--mdc-slider-label-label-text-font, Roboto, sans-serif);font-weight:var(--mdc-slider-label-label-text-weight, 500);line-height:var(--mdc-slider-label-label-text-line-height, 1.375rem)}.mat-mdc-slider .mdc-slider__track--active{border-radius:var(--mdc-slider-active-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__track--inactive{border-radius:var(--mdc-slider-inactive-track-shape, 9999px)}.mat-mdc-slider .mdc-slider__thumb-knob{border-radius:var(--mdc-slider-handle-shape, 50%);width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-style:solid;border-width:calc(var(--mdc-slider-handle-height, 20px) / 2) calc(var(--mdc-slider-handle-width, 20px) / 2)}.mat-mdc-slider .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-mark--inactive{border-radius:var(--mdc-slider-with-tick-marks-container-shape, 50%)}.mat-mdc-slider .mdc-slider__thumb-knob{box-shadow:var(--mdc-slider-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-hover-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:hover .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee));border-color:var(--mdc-slider-focus-handle-color, var(--mdc-theme-primary, #6200ee))}.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--focused .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb:not(:disabled):active .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mat-mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mat-mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:var(--mdc-slider-with-overlap-handle-outline-color, #fff);border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mat-mdc-slider .mdc-slider__input{box-sizing:content-box;pointer-events:auto}.mat-mdc-slider .mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mat-mdc-slider .mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mat-mdc-slider-with-animation.mat-mdc-slider-disable-track-animation .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mat-mdc-slider-with-animation.mat-mdc-slider-disable-track-animation .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider .mdc-slider__track,.mat-mdc-slider .mdc-slider__thumb{pointer-events:none}.mat-mdc-slider .mdc-slider__value-indicator{opacity:var(--mat-mdc-slider-value-indicator-opacity, 1)}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-mdc-slider-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-mdc-slider-hover-ripple-color, transparent)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-mdc-slider-focus-ripple-color, transparent)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),wSe={provide:Xr,useExisting:Wn(()=>$u),multi:!0},SSe={provide:Xr,useExisting:Wn(()=>vN),multi:!0},$u=(()=>{class n{get value(){return mi(this._hostElement.value)}set value(e){let i=mi(e).toString();this._hasSetInitialValue?this._isActive||(this._hostElement.value=i,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges()):this._initialValue=i}get translateX(){return this._slider.min>=this._slider.max?(this._translateX=0,this._translateX):(void 0===this._translateX&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(e){this._translateX=e}get min(){return mi(this._hostElement.min)}set min(e){this._hostElement.min=mi(e).toString(),this._cdr.detectChanges()}get max(){return mi(this._hostElement.max)}set max(e){this._hostElement.max=mi(e).toString(),this._cdr.detectChanges()}get step(){return mi(this._hostElement.step)}set step(e){this._hostElement.step=mi(e).toString(),this._cdr.detectChanges()}get disabled(){return vt(this._hostElement.disabled)}set disabled(e){this._hostElement.disabled=vt(e),this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?0===this._translateX?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_setIsFocused(e){this._isFocused=e}constructor(e,i,r,o){this._ngZone=e,this._elementRef=i,this._cdr=r,this._slider=o,this.valueChange=new F,this.dragStart=new F,this.dragEnd=new F,this.thumbPosition=2,this._knobRadius=8,this._isActive=!1,this._isFocused=!1,this._hasSetInitialValue=!1,this._destroyed=new Ee,this._skipUIUpdate=!1,this._onChangeFn=()=>{},this._onTouchedFn=()=>{},this._hostElement=i.nativeElement,this._ngZone.runOutsideAngular(()=>{this._hostElement.addEventListener("pointerdown",this._onPointerDown.bind(this)),this._hostElement.addEventListener("pointermove",this._onPointerMove.bind(this)),this._hostElement.addEventListener("pointerup",this._onPointerUp.bind(this))})}ngOnDestroy(){this._hostElement.removeEventListener("pointerdown",this._onPointerDown),this._hostElement.removeEventListener("pointermove",this._onPointerMove),this._hostElement.removeEventListener("pointerup",this._onPointerUp),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,void 0===this._initialValue?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(e){this.disabled||0!==e.button||(this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(e,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(e),this.dragStart.emit({source:this,parent:this._slider,value:this.value})))}_handleValueCorrection(e){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(e)},0)}_fixValue(e){let i=e.clientX-this._slider._cachedLeft,r=this._slider._cachedWidth,o=0===this._slider.step?1:this._slider.step,a=Math.floor((this._slider.max-this._slider.min)/o),c=Math.round((this._slider._isRtl?1-i/r:i/r)*a)/a*(this._slider.max-this._slider.min)+this._slider.min,d=Math.round(c/o)*o;if(d===this.value)return this._slider._onValueChange(this),void(this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation}));this.value=d,this.valueChange.emit(this.value),this._onChangeFn(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation})}_onPointerMove(e){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(e)}_onPointerUp(){this._isActive&&(this._isActive=!1,this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive()))}_clamp(e){return Math.max(Math.min(e,this._slider._cachedWidth),0)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*this._slider._cachedWidth:this.percentage*this._slider._cachedWidth}_calcTranslateXByPointerEvent(e){return e.clientX-this._slider._cachedLeft}_updateWidthActive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding}px)`}_updateWidthInactive(){this._hostElement.style.padding="0px",this._hostElement.style.width="calc(100% + 48px)",this._hostElement.style.left="-24px"}_updateThumbUIByValue(e){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(e)}_updateThumbUIByPointerEvent(e,i){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(i)}_updateThumbUI(e){this._slider._setTransition(!!e?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(e){this.value=e}registerOnChange(e){this._onChangeFn=e}registerOnTouched(e){this._onTouchedFn=e}setDisabledState(e){this.disabled=e}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}}return n.\u0275fac=function(e){return new(e||n)(C(ot),C(xe),C(Qt),C(tT))},n.\u0275dir=Me({type:n,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(e,i){1&e&&A("change",function(){return i._onChange()})("input",function(){return i._onInput()})("blur",function(){return i._onBlur()})("focus",function(){return i._onFocus()}),2&e&&Be("aria-valuetext",i._valuetext)},inputs:{value:"value"},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[Vt([wSe,{provide:VY,useExisting:n}])]}),n})(),vN=(()=>{class n extends $u{getSibling(){return this._sibling||(this._sibling=this._slider._getInput(this._isEndThumb?1:2)),this._sibling}getMinPos(){let e=this.getSibling();return!this._isLeftThumb&&e?e.translateX:0}getMaxPos(){let e=this.getSibling();return this._isLeftThumb&&e?e.translateX:this._slider._cachedWidth}_setIsLeftThumb(){this._isLeftThumb=this._isEndThumb&&this._slider._isRtl||!this._isEndThumb&&!this._slider._isRtl}constructor(e,i,r,o){super(e,r,o,i),this._cdr=o,this._isEndThumb=this._hostElement.hasAttribute("matSliderEndThumb"),this._setIsLeftThumb(),this.thumbPosition=this._isEndThumb?2:1}_getDefaultValue(){return this._isEndThumb&&this._slider._isRange?this.max:this.min}_onInput(){super._onInput(),this._updateSibling(),this._isActive||this._updateWidthInactive()}_onNgControlValueChange(){super._onNgControlValueChange(),this.getSibling()?._updateMinMax()}_onPointerDown(e){this.disabled||(this._sibling&&(this._sibling._updateWidthActive(),this._sibling._hostElement.classList.add("mat-mdc-slider-input-no-pointer-events")),super._onPointerDown(e))}_onPointerUp(){super._onPointerUp(),this._sibling&&setTimeout(()=>{this._sibling._updateWidthInactive(),this._sibling._hostElement.classList.remove("mat-mdc-slider-input-no-pointer-events")})}_onPointerMove(e){super._onPointerMove(e),!this._slider.step&&this._isActive&&this._updateSibling()}_fixValue(e){super._fixValue(e),this._sibling?._updateMinMax()}_clamp(e){return Math.max(Math.min(e,this.getMaxPos()),this.getMinPos())}_updateMinMax(){let e=this.getSibling();!e||(this._isEndThumb?(this.min=Math.max(this._slider.min,e.value),this.max=this._slider.max):(this.min=this._slider.min,this.max=Math.min(this._slider.max,e.value)))}_updateWidthActive(){let e=2*this._slider._rippleRadius-2*this._slider._inputPadding;this._hostElement.style.width=`${(this._slider._cachedWidth+this._slider._inputPadding-e)*(this._slider.min<this._slider.max?(this.max-this.min)/(this._slider.max-this._slider.min):1)+e}px`,this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`}_updateWidthInactive(){let e=this.getSibling();if(!e)return;let r=this._isEndThumb?this.value-(this.value-e.value)/2:this.value+(e.value-this.value)/2;this._hostElement.style.width=this._slider._cachedWidth*(this._slider.min<this._slider.max?this._isEndThumb?(this.max-r)/(this._slider.max-this._slider.min):(r-this.min)/(this._slider.max-this._slider.min):1)+24+"px",this._hostElement.style.padding="0px",this._isLeftThumb?(this._hostElement.style.left="-24px",this._hostElement.style.right="auto"):(this._hostElement.style.left="auto",this._hostElement.style.right="-24px")}_updateStaticStyles(){this._hostElement.classList.toggle("mat-slider__right-input",!this._isLeftThumb)}_updateSibling(){let e=this.getSibling();!e||(e._updateMinMax(),this._isActive?e._updateWidthActive():e._updateWidthInactive())}writeValue(e){this.value=e,this._updateWidthInactive(),this._updateSibling()}}return n.\u0275fac=function(e){return new(e||n)(C(ot),C(tT),C(xe),C(Qt))},n.\u0275dir=Me({type:n,selectors:[["input","matSliderStartThumb",""],["input","matSliderEndThumb",""]],exportAs:["matSliderRangeThumb"],features:[Vt([SSe,{provide:HY,useExisting:n}]),Xe]}),n})(),ep=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,De,_a]}),n})();function ESe(n,t){if(1&n){let e=Te();f(0,"mat-slider",11)(1,"input",12),A("valueChange",function(r){return ne(e),ie(w(2).onSliderChange.emit(r))}),g()()}if(2&n){let e=w(2);b("min",0)("max",e.scrollBeginIndexUpperLimit),v(1),b("value",e.scrollBeginIndex)}}function TSe(n,t){if(1&n){let e=Te();f(0,"div",6)(1,"button",7),A("click",function(){return ne(e),ie(w().onNavigateLeft.emit())}),T(2," < "),g(),f(3,"div",8),T(4),g(),f(5,"button",9),A("click",function(){return ne(e),ie(w().onNavigateRight.emit())}),T(6," > "),g(),S(7,ESe,2,3,"mat-slider",10),g()}if(2&n){let e=w();v(4),GM(" ",e.scrollBeginIndex," ~ ",e.scrollBeginIndex+e.displayCount-1," of ",e.numExecutions," "),v(3),b("ngIf",e.scrollBeginIndexUpperLimit>0)}}var DSe=function(n,t,e){return[n,t,e]};function ISe(n,t){if(1&n){let e=Te();f(0,"div",15),A("click",function(){let o=ne(e).index;return ie(w(2).onExecutionDigestClicked.emit(o))}),f(1,"div",16),T(2),g()()}if(2&n){let e=t.$implicit,i=t.index,r=w(2);v(1),Zi("title",e.op_type),b("ngClass",yb(3,DSe,e.is_graph?"func-graph-execution":"",i===r.focusedExecutionDisplayIndex?"focused":"",r.displayFocusedAlertTypes[i]||"")),v(1),Ve(" ",e.short_op_type," ")}}function ASe(n,t){if(1&n&&(f(0,"div",13),S(1,ISe,3,7,"div",14),g()),2&n){let e=w();v(1),b("ngForOf",e.displayExecutionDigests)}}function RSe(n,t){if(1&n&&(Gt(0),k(1,"tf-debugger-v2-execution-data",17),Wt()),2&n){let e=w();v(1),b("focusedExecutionIndex",e.focusedExecutionIndex)}}var UY=(()=>{class n{constructor(){this.activeRunId=null,this.loadingNumExecutions=!1,this.numExecutions=0,this.scrollBeginIndex=0,this.scrollBeginIndexUpperLimit=0,this.pageSize=0,this.displayCount=0,this.displayExecutionDigests=[],this.displayFocusedAlertTypes=[],this.focusedExecutionIndex=null,this.focusedExecutionDisplayIndex=null,this.focusedExecutionData=null,this.onNavigateLeft=new F,this.onNavigateRight=new F,this.onExecutionDigestClicked=new F,this.onSliderChange=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["timeline-component"]],inputs:{activeRunId:"activeRunId",loadingNumExecutions:"loadingNumExecutions",numExecutions:"numExecutions",scrollBeginIndex:"scrollBeginIndex",scrollBeginIndexUpperLimit:"scrollBeginIndexUpperLimit",pageSize:"pageSize",displayCount:"displayCount",displayExecutionDigests:"displayExecutionDigests",displayFocusedAlertTypes:"displayFocusedAlertTypes",focusedExecutionIndex:"focusedExecutionIndex",focusedExecutionDisplayIndex:"focusedExecutionDisplayIndex",focusedExecutionData:"focusedExecutionData"},outputs:{onNavigateLeft:"onNavigateLeft",onNavigateRight:"onNavigateRight",onExecutionDigestClicked:"onExecutionDigestClicked",onSliderChange:"onSliderChange"},decls:9,vars:4,consts:[[1,"timeline-title"],[1,"execution-count"],[1,"top-level-executions"],["class","navigation-section",4,"ngIf"],["class","execution-timeline",4,"ngIf"],[4,"ngIf"],[1,"navigation-section"],["mat-button","",1,"navigation-button-left",3,"click"],[1,"navigation-position-info"],["mat-button","",1,"navigation-button-right",3,"click"],["class","timeline-slider","step","1",3,"min","max",4,"ngIf"],["step","1",1,"timeline-slider",3,"min","max"],["matSliderThumb","",3,"value","valueChange"],[1,"execution-timeline"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"execution-digest",3,"ngClass","title"],[3,"focusedExecutionIndex"]],template:function(e,i){1&e&&(f(0,"div")(1,"div",0),T(2," Python Execution Timeline "),f(3,"span",1),T(4),g()(),f(5,"div",2),S(6,TSe,8,4,"div",3),S(7,ASe,2,1,"div",4),S(8,RSe,2,1,"ng-container",5),g()()),2&e&&(v(4),Ve(" (",i.numExecutions,") "),v(2),b("ngIf",i.numExecutions),v(1),b("ngIf",i.numExecutions),v(1),b("ngIf",null!==i.activeRunId&&null!==i.focusedExecutionIndex))},dependencies:[wn,nn,Ne,BY,ki,Ju,$u],styles:[".execution-digest[_ngcontent-%COMP%] {\n  background-color: #e3e5e8;\n  border: 1px solid #c0c0c0;\n  color: #425066;\n  display: inline-block;\n  font-size: 10px;\n  height: 15px;\n  padding: 1px;\n  text-align: center;\n  vertical-align: middle;\n  width: 12px;\n}\n\n.execution-digest.func-graph-execution[_ngcontent-%COMP%] {\n  background-color: #c7dbf5;\n  color: #4e5664;\n  text-decoration: underline;\n}\n\n.execution-digest.focused[_ngcontent-%COMP%] {\n  background-color: #ffd4b3;\n  border: 1px solid #000;\n  font-weight: bold;\n}\n\n.execution-digest.InfNanAlert[_ngcontent-%COMP%] {\n  background-color: #e52592;\n  color: #fff;\n}\n\n\n.execution-digest[_ngcontent-%COMP%]:hover {\n  border: 1px solid #000;\n  font-weight: bold;\n}\n\n.execution-timeline[_ngcontent-%COMP%] {\n  display: flex;\n  overflow-x: hidden;\n  white-space: nowrap;\n  width: 100%;\n  margin-top: 5px;\n  margin-bottom: 5px;\n}\n\n.timeline-slider[_ngcontent-%COMP%] {\n  display: inline-block;\n  height: 48px;\n  left: 340px; \n  padding: 0;\n  position: absolute;\n  right: 40px;\n  --mdc-slider-handle-width: 80px;\n  --mdc-slider-handle-height: 16px;\n  --mdc-slider-handle-shape: 5px;\n}\n\n  .mat-mdc-focus-indicator {\n  display: none;\n}\n\n.navigation-position-info[_ngcontent-%COMP%] {\n  display: inline-flex;\n  font-size: 14px;\n  line-height: normal;\n  max-width: 200px;\n  padding-left: 10px;\n  padding-right: 10px;\n  text-align: center;\n  vertical-align: middle;\n}\n\n.navigation-section[_ngcontent-%COMP%] {\n  height: 48px;\n  line-height: 48px;\n  position: relative;\n  vertical-align: middle;\n  width: 100%;\n}"],changeDetection:0}),n})(),kSe=["__forward_","__backward_","__inference_"],jY=(()=>{class n{constructor(e){this.store=e,this.activeRunId$=this.store.pipe(un($o)),this.loadingNumExecutions$=this.store.pipe(un(W(qE,i=>i.state==Re.LOADING))),this.scrollBeginIndex$=this.store.pipe(un(hy)),this.scrollBeginIndexUpperLimit$=this.store.pipe(un(W(Zu,Hg,(i,r)=>Math.max(0,i-r)))),this.pageSize$=this.store.pipe(un(Vg)),this.displayCount$=this.store.pipe(un(Hg)),this.displayExecutionDigests$=this.store.pipe(un(W($X,i=>i.map(r=>function(n,t=1){if(!n)return{op_type:"(N/A)",short_op_type:"..",is_graph:!1};let e=kSe.filter(i=>n.op_type.startsWith(i));if(e.length){let i=n.op_type.slice(e[0].length);return{op_type:n.op_type,short_op_type:i.slice(0,t),is_graph:!0}}return{op_type:n.op_type,short_op_type:n.op_type.slice(0,t),is_graph:!1}}(r))))),this.displayFocusedAlertTypes$=this.store.pipe(un(lY)),this.focusedExecutionIndex$=this.store.pipe(un(pN)),this.focusedExecutionDisplayIndex$=this.store.pipe(un(cY)),this.numExecutions$=this.store.pipe(un(Zu))}onNavigateLeft(){this.store.dispatch(Ig())}onNavigateRight(){this.store.dispatch(Ag())}onExecutionDigestClicked(e){this.store.dispatch(Pg({displayIndex:e}))}onSliderChange(e){this.store.dispatch(Rg({index:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2-timeline"]],decls:12,vars:33,consts:[[3,"activeRunId","loadingNumExecutions","numExecutions","scrollBeginIndex","scrollBeginIndexUpperLimit","pageSize","displayCount","displayExecutionDigests","displayFocusedAlertTypes","focusedExecutionIndex","focusedExecutionDisplayIndex","onNavigateLeft","onNavigateRight","onExecutionDigestClicked","onSliderChange"]],template:function(e,i){1&e&&(f(0,"timeline-component",0),A("onNavigateLeft",function(){return i.onNavigateLeft()})("onNavigateRight",function(){return i.onNavigateRight()})("onExecutionDigestClicked",function(o){return i.onExecutionDigestClicked(o)})("onSliderChange",function(o){return i.onSliderChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),U(10,"async"),U(11,"async"),g()),2&e&&b("activeRunId",G(1,11,i.activeRunId$))("loadingNumExecutions",G(2,13,i.loadingNumExecutions$))("numExecutions",G(3,15,i.numExecutions$))("scrollBeginIndex",G(4,17,i.scrollBeginIndex$))("scrollBeginIndexUpperLimit",G(5,19,i.scrollBeginIndexUpperLimit$))("pageSize",G(6,21,i.pageSize$))("displayCount",G(7,23,i.displayCount$))("displayExecutionDigests",G(8,25,i.displayExecutionDigests$))("displayFocusedAlertTypes",G(9,27,i.displayFocusedAlertTypes$))("focusedExecutionIndex",G(10,29,i.focusedExecutionIndex$))("focusedExecutionDisplayIndex",G(11,31,i.focusedExecutionDisplayIndex$))},dependencies:[UY,ct],encapsulation:2,changeDetection:0}),n})();function NSe(n,t){1&n&&k(0,"tf-debugger-v2-inactive")}function LSe(n,t){1&n&&(f(0,"div",3),k(1,"tf-debugger-v2-alerts"),f(2,"div",4),k(3,"tf-debugger-v2-timeline")(4,"tf-debugger-v2-graph"),g(),k(5,"tf-debugger-v2-graph-executions"),g(),f(6,"div",5),k(7,"tf-debugger-v2-source-files")(8,"tf-debugger-v2-stack-trace"),g())}var GY=(()=>{class n{constructor(){this.runs={},this.runIds=[],this.activeRunId=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["debugger-component"]],inputs:{runs:"runs",runIds:"runIds",activeRunId:"activeRunId"},decls:4,vars:2,consts:[[1,"debugger-container"],[4,"ngIf","ngIfElse"],["dataAvailable",""],[1,"top-section"],[1,"top-center-section"],[1,"bottom-section"]],template:function(e,i){if(1&e&&(f(0,"div",0),S(1,NSe,1,0,"tf-debugger-v2-inactive",1),S(2,LSe,9,0,"ng-template",null,2,jt),g()),2&e){let r=st(3);v(1),b("ngIf",0===i.runIds.length)("ngIfElse",r)}},dependencies:[gY,Ne,vY,CY,wY,kY,FY,jY],styles:[".bottom-section[_ngcontent-%COMP%]{box-sizing:border-box;border-top:1px solid #ebebeb;display:flex;flex-grow:1;height:34%;padding-top:6px}body.dark-mode[_nghost-%COMP%]   .bottom-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .bottom-section[_ngcontent-%COMP%]{border-top:1px solid #555}.debugger-container[_ngcontent-%COMP%]{box-sizing:border-box;height:100%;overflow:hidden}.top-section[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-grow:1;height:66%;padding:6px 0}tf-debugger-v2-alerts[_ngcontent-%COMP%]{border-right:1px solid #ebebeb;display:inline-block;margin-right:10px;min-width:160px;width:calc(15% - 11px)}body.dark-mode[_nghost-%COMP%]   tf-debugger-v2-alerts[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tf-debugger-v2-alerts[_ngcontent-%COMP%]{border-right:1px solid #555}tf-debugger-v2-graph-executions[_ngcontent-%COMP%]{display:inline-block;flex-grow:1;min-width:540px;width:540px}tf-debugger-v2-source-files[_ngcontent-%COMP%]{display:inline-block;height:100%;width:70%}tf-debugger-v2-stack-trace[_ngcontent-%COMP%]{display:inline-block;flex-grow:1;height:100%;min-width:540px;width:540px}.top-center-section[_ngcontent-%COMP%]{display:inline-block;overflow:auto;width:55%}tf-debugger-v2-timeline[_ngcontent-%COMP%]{display:block}tf-debugger-v2-graph[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;display:block;margin-top:5px}body.dark-mode[_nghost-%COMP%]   tf-debugger-v2-graph[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tf-debugger-v2-graph[_ngcontent-%COMP%]{border-top:1px solid #555}"],changeDetection:0}),n})(),WY=(()=>{class n{constructor(e){this.store=e,this.runs$=this.store.pipe(un(Nh)),this.runsIds$=this.store.pipe(un(W(Nh,i=>Object.keys(i)))),this.activeRunId$=this.store.pipe(un($o))}ngOnInit(){this.store.dispatch(ME())}ngOnDestroy(){this.store.dispatch(wE())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["tf-debugger-v2"]],decls:4,vars:9,consts:[[3,"runs","runIds","activeRunId"]],template:function(e,i){1&e&&(k(0,"debugger-component",0),U(1,"async"),U(2,"async"),U(3,"async")),2&e&&b("runs",G(1,3,i.runs$))("runIds",G(2,5,i.runsIds$))("activeRunId",G(3,7,i.activeRunId$))},dependencies:[GY,ct],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"]}),n})(),iT="debugger-v2";function yN(n,t,e,i,r){if(e<=0||!Number.isInteger(e))throw new Error(`Invalid pageSize: ${e}`);if(t>i)throw new Error(`end index (${t}) exceeds total number of items (${i})`);if(t-n>e)throw new Error("begin-end span exceeds page size, which is not allowed");let o=[],a=Math.floor(n/e);(!(a in r)||r[a]<e&&a*e+r[a]<i)&&o.push(a);let s=Math.floor((t-1)/e);return s!==a&&(!(s in r)||s*e+r[s]<t&&t<i)&&o.push(s),o}var YY=(()=>{class n{onDebuggerDataPoll(){return this.actions$.pipe(Zn(ME),Jn(e=>function(n,t,e){return n.pipe(function(n){return Yt((t,e)=>{let i,o,r=!1,a=!1,s=!1,l=()=>s&&a&&(e.complete(),!0),d=()=>{s=!1,i=t.subscribe(Ht(e,void 0,()=>{s=!0,!l()&&(o||(o=new Ee,n(o).subscribe(Ht(e,()=>{i?d():r=!0},()=>{a=!0,l()}))),o).next()})),r&&(i.unsubscribe(),i=null,r=!1,d())};d()})}(i=>i.pipe(It(t),Hm(([,r])=>rs(r)))),it(e),q(()=>{}))}($t(e),this.store.select(YX).pipe(q(i=>function(n){return n>6e4?6e4:n>4e3?n:2e3}(i))),this.actions$.pipe(Zn(wE)))),Dt(()=>this.store.dispatch(sy())),q(()=>{}))}onCoreReload(){return tn(this.actions$.pipe(Zn(Ba,ma)),this.actions$.pipe(Zn(yc)).pipe(It(this.store.select(oN)),Oe(([,e])=>e.state===Re.NOT_LOADED||e.state===Re.FAILED&&null===e.lastLoadedTimeInMs))).pipe(It(this.store.select(Zo)),Oe(([,e])=>e===iT),Dt(()=>this.store.dispatch(sy())),q(()=>{}))}loadDebuggerRuns(e){return e.pipe(It(this.store.select(oN)),Oe(([,{state:i}])=>i!==Re.LOADING),Dt(()=>this.store.dispatch(SE())),xn(()=>this.dataSource.fetchRuns().pipe(Dt(i=>{this.store.dispatch(EE({runs:i}))}),q(()=>{}))))}createNumExecutionLoader(e){return e.pipe(It(this.store.select(Nh),this.store.select(qE)),Oe(([,i,r])=>Object.keys(i).length>0&&r.state!==Re.LOADING),Dt(()=>this.store.dispatch(IE())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchExecutionDigests(r,0,0).pipe(Dt(s=>{this.store.dispatch(AE({numExecutions:s.num_digests}))}),q(()=>{}))}))}createNumGraphExecutionLoader(e){return e.pipe(It(this.store.select(Nh),this.store.select(eY)),Oe(([,i,r])=>Object.keys(i).length>0&&r.state!==Re.LOADING),Dt(()=>this.store.dispatch(OE())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchGraphExecutionDigests(r,0,0).pipe(Dt(s=>{this.store.dispatch(FE({numGraphExecutions:s.num_digests}))}),q(()=>{}))}))}createNumAlertsAndBreakdownLoader(e){return e.pipe(It(this.store.select(Nh),this.store.select(aN)),Oe(([,i,r])=>Object.keys(i).length>0&&r.state!==Re.LOADING),Dt(()=>this.store.dispatch(ly())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchAlerts(r,0,0).pipe(Dt(s=>{this.store.dispatch(TE({numAlerts:s.num_alerts,alertsBreakdown:s.alerts_breakdown}))}),q(()=>{}))}))}createInitialExecutionDetector(e){return e.pipe(It(this.store.select(Zu),this.store.select(py)),Oe(([,i,r])=>i>0&&0===Object.keys(r.pageLoadedSizes).length),q(()=>{}))}createInitialExecutionDigest(e){return e.pipe(It(this.store.select(Zu),this.store.select($o),this.store.select(Vg)),Oe(([,,i])=>null!==i),q(([,i,r,o])=>({begin:0,end:Math.min(i,o),runId:r})))}onExecutionScroll(){return this.actions$.pipe(Zn(Ig,Ag,Rg),It(this.store.select($o),this.store.select(hy),this.store.select(Zu),this.store.select(Hg),this.store.select(Vg)),Oe(([e])=>null!==e),q(([,e,i,r,o,a])=>({runId:e,begin:i,end:Math.min(r,i+o),pageSize:a})),It(this.store.select(py)),q(([e,i])=>({props:e,loaded:i,missingPages:yN(e.begin,e.end,e.pageSize,i.numExecutions,i.pageLoadedSizes)})),Oe(({missingPages:e})=>e.length>0),q(({props:e,loaded:i,missingPages:r})=>{let{runId:o,pageSize:a}=e;return{begin:r[0]*a,end:Math.min(i.numExecutions,(r[r.length-1]+1)*a),runId:o}}))}createExecutionDigestLoader(e){return e.pipe(It(this.store.select(py)),Oe(([{begin:i,end:r},o])=>r>i&&!function(n,t,e){if(t>=e)throw new Error(`Expected begin to be less than end, but got begin=${t}, end=${e}`);return-1!==n.findIndex(i=>i.begin>=t&&i.end<=e)}(o.loadingRanges,i,r)),Dt(([{begin:i,end:r}])=>{this.store.dispatch(RE({begin:i,end:r}))}),xn(([{runId:i,begin:r,end:o}])=>this.dataSource.fetchExecutionDigests(i,r,o).pipe(Dt(a=>{this.store.dispatch(PE(a))}),q(()=>{}))))}onExecutionDigestFocused(){return this.actions$.pipe(Zn(Pg),It(this.store.select($o),this.store.select(hN),this.store.select(hy)),q(([e,i,r,o])=>({activeRunId:i,loadedExecutionData:r,focusIndex:o+e.displayIndex})))}createExecutionDataAndStackFramesLoader(e){return e.pipe(Oe(({activeRunId:i,loadedExecutionData:r,focusIndex:o})=>null!==i&&null!==o&&void 0===r[o]),xn(({activeRunId:i,focusIndex:r})=>{let o=r,a=o+1;return this.dataSource.fetchExecutionData(i,o,a).pipe(Dt(s=>{this.store.dispatch(kE(s))}),q(s=>({executionData:s,begin:o,end:a})))}),q(({executionData:i})=>i.executions[0]),It(this.store.select($o),this.store.select(mN)),Oe(([i,r,o])=>{if(null===r)return!1;for(let a of i.stack_frame_ids)if(void 0===o[a])return!0;return!1}),xn(([i,r])=>{let o=i.stack_frame_ids;return this.dataSource.fetchStackFrames(r,o).pipe(Dt(a=>{let s={};for(let l=0;l<o.length;++l)s[o[l]]=a.stack_frames[l];this.store.dispatch(cy({stackFrames:s}))}),q(()=>{}))}))}onGraphExecutionScroll(){return this.actions$.pipe(Zn(kg),Cr(100),It(this.store.select($o),this.store.select(my),this.store.select(tY)),Oe(([,e,i])=>null!==e&&i>0),q(([,e,i,r])=>({runId:e,numGraphExecutions:i,scrollBeginIndex:r})),It(this.store.select(iY),this.store.select(nY),this.store.select(rY),this.store.select(oY)),q(([{runId:e,numGraphExecutions:i,scrollBeginIndex:r},o,a,s,l])=>{let c=yN(r,Math.min(r+a,i),o,i,l);return c=c.filter(d=>-1===s.indexOf(d)),{runId:e,missingPages:c,pageSize:o,numGraphExecutions:i}}))}loadGraphExecutionPages(e){return e.pipe(Oe(({missingPages:i})=>i.length>0),Dt(({missingPages:i})=>{i.forEach(r=>{this.store.dispatch(NE({pageIndex:r}))})}),xn(({runId:i,missingPages:r,pageSize:o,numGraphExecutions:a})=>{let s=r[0]*o,l=Math.min((r[r.length-1]+1)*o,a);return this.dataSource.fetchGraphExecutionData(i,s,l).pipe(Dt(c=>{this.store.dispatch(LE(c))}),q(()=>{}))}))}loadGraphOpInfo(){return this.actions$.pipe(Zn(Fg,Og),It(this.store.select($o),this.store.select(dY)),Oe(([e,i,r])=>{let{graph_id:o,op_name:a}=e;return!(null===i||void 0!==r[o]&&r[o].has(a)&&(r[o].get(a)===Re.LOADING||r[o].get(a)===Re.LOADED))}),Dt(([{graph_id:e,op_name:i}])=>this.store.dispatch(BE({graph_id:e,op_name:i}))),xn(([e,i])=>{let{graph_id:r,op_name:o}=e;return this.dataSource.fetchGraphOpInfo(i,r,o).pipe(Dt(a=>this.store.dispatch(VE({graphOpInfoResponse:a}))),q(a=>({runId:i,stackFrameIds:a.stack_frame_ids})))}))}loadGraphOpStackFrames(e){return e.pipe(It(this.store.select(mN)),q(([{runId:i,stackFrameIds:r},o])=>({runId:i,missingStackFrameIds:r.filter(s=>void 0===o[s])})),Oe(({runId:i,missingStackFrameIds:r})=>null!==i&&r.length>0),xn(({runId:i,missingStackFrameIds:r})=>this.dataSource.fetchStackFrames(i,r).pipe(Dt(o=>{let a={};for(let s=0;s<r.length;++s)a[r[s]]=o.stack_frames[s];this.store.dispatch(cy({stackFrames:a}))}),q(()=>{}))))}onAlertTypeFocused(){return this.actions$.pipe(Zn(Dg),It(this.store.select($o),this.store.select(WE),this.store.select(ZX),this.store.select(KX),this.store.select(aN)),Oe(([,e,i,r,o,a])=>null!==e&&null!==i&&r>0&&(null===o||Object.keys(o).length<r)&&a.state!==Re.LOADING),Dt(()=>this.store.dispatch(ly())),xn(([,e,i])=>this.dataSource.fetchAlerts(e,0,-1,i)),Dt(({num_alerts:e,alerts_breakdown:i,alert_type:r,begin:o,end:a,alerts:s})=>{this.store.dispatch(DE({numAlerts:e,alertsBreakdown:i,alertType:r,begin:o,end:a,alerts:s}))}))}fetchExecutionDigestsForAlertTypeFocus(e){return e.pipe(It(this.store.select(Vg),this.store.select(Hg),this.store.select(Zu),this.store.select(py),this.store.select($o)),q(([i,r,o,a,s,l])=>{let d=i.alerts[0].execution_index,u=yN(Math.max(0,d-Math.floor(o/2)),Math.min(d+Math.floor(o/2),a),r,a,s.pageLoadedSizes);return 0===u.length?{runId:l,begin:0,end:0}:{runId:l,begin:u[0]*r,end:Math.min(s.numExecutions,(u[u.length-1]+1)*r)}}))}loadSourceFileList(e){return e.pipe(It(this.store.select($o),this.store.select(pY)),Oe(([,i,r])=>null!==i&&r.state!==Re.LOADING),Dt(()=>this.store.dispatch(HE())),xn(([,i])=>this.dataSource.fetchSourceFileList(i).pipe(Dt(r=>{let o=[];r.forEach(([a,s])=>{o.push({host_name:a,file_path:s})}),this.store.dispatch(zE({sourceFiles:o}))}),q(()=>{}))))}onSourceFileFocused(){return this.actions$.pipe(Zn(Ng),It(this.store.select($o),this.store.select(fN),this.store.select(QE)),q(([e,i,r,o])=>({runId:i,stackFrame:e.stackFrame,fileIndex:r,fileContent:o})),Oe(({runId:e,fileContent:i})=>null!==e&&null!==i&&i.loadState===Re.NOT_LOADED),Dt(({stackFrame:e})=>this.store.dispatch(UE({host_name:e.host_name,file_path:e.file_path}))),xn(({fileIndex:e,runId:i})=>this.dataSource.fetchSourceFile(i,e).pipe(Dt(r=>{this.store.dispatch(jE(r))}),q(()=>{}))))}constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.loadData$=_r(()=>{let o=this.loadDebuggerRuns(tn(this.onDebuggerDataPoll(),this.onCoreReload())).pipe(Ta()),a=this.loadSourceFileList(o),s=this.createNumExecutionLoader(o),l=this.createNumAlertsAndBreakdownLoader(o),c=this.onAlertTypeFocused(),d=this.fetchExecutionDigestsForAlertTypeFocus(c),u=this.createInitialExecutionDetector(s).pipe(Ta()),p=this.createExecutionDigestLoader(tn(this.onExecutionScroll(),this.createInitialExecutionDigest(u),d)),h=this.createExecutionDataAndStackFramesLoader(tn(this.onExecutionDigestFocused(),u.pipe(It(this.store.select($o),this.store.select(hN)),q(([,x,R])=>({activeRunId:x,loadedExecutionData:R,focusIndex:0})))));return tn(l,p,h,this.createNumGraphExecutionLoader(o),a,this.onSourceFileFocused(),this.loadGraphExecutionPages(this.onGraphExecutionScroll()),this.loadGraphOpStackFrames(this.loadGraphOpInfo())).pipe(q(()=>({})))},{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(CE))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),QY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),ZY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),rT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),KY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,rT,Cd]}),n})(),JY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),tp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),oT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,tp]}),n})(),$Y=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,oT]}),n})(),eQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,oT]}),n})(),tQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,rT]}),n})(),nQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,tQ,Kn,ep]}),n})(),iQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[QY,De,Qs,KY,ZY,JY,$Y,eQ,UX,nQ,wr.forFeature(dy,XX),to.forFeature([YY]),Oc.forPlugin(iT,WY)]}),n})(),aT=fe("[Metrics] Metrics Settings Pane Closed"),sT=fe("[Metrics] Metrics Settings Pane Toggled"),lT=fe("[Metrics] Slide out settings menu toggled"),cT=fe("[Metrics] User requested to open the slide out menu",{_as:"props",_p:void 0}),dT=fe("[Metrics] User changed the tab in the table editor",{_as:"props",_p:void 0}),uT=fe("[Metrics] Slide out settings menu closed"),pT=fe("[Metrics] Metrics Tag Metadata Requested"),hT=fe("[Metrics] Metrics Tag Metadata Loaded",{_as:"props",_p:void 0}),mT=fe("[Metrics] Metrics Tag Metadata Failed"),fT=fe("[Metrics] Metrics Card State Updated",{_as:"props",_p:void 0}),zg=fe("[Metrics] Metrics Card Full Size Toggled",{_as:"props",_p:void 0}),gT=fe("[Metrics] Metrics Settings Change Tooltip",{_as:"props",_p:void 0}),_T=(fe("[Metrics] Metrics Settings Toggle Show Data Download"),fe("[Metrics] Metrics Setting Toggle Ignore Outlier")),bT=fe("[Metrics] Metrics Setting Change X Axis Type",{_as:"props",_p:void 0}),vT=fe("[Metrics] Metrics Setting Change Card Width",{_as:"props",_p:void 0}),yT=fe("[Metrics] Metrics Setting Reset Card Width"),xT=fe("[Metrics] Metrics Setting Change Scalar Smoothing",{_as:"props",_p:void 0}),CT=fe("[Metrics] Metrics Setting Partition Non Monotonic X Toggled"),MT=fe("[Metrics] Metrics Setting Change Image Brightness",{_as:"props",_p:void 0}),wT=fe("[Metrics] Metrics Setting Change Image Contrast",{_as:"props",_p:void 0}),ST=fe("[Metrics] Image Brightness Setting Reset"),ET=fe("[Metrics] Image Contrast Setting Reset"),TT=fe("[Metrics] Metrics Setting Toggle Image Show Actual Size"),DT=fe("[Metrics] Metrics Setting Change Histogram Mode",{_as:"props",_p:void 0}),IT=fe("[Metrics] Multiple Time Series Requested",{_as:"props",_p:void 0}),AT=fe("[Metrics] Fetch Time Series Request Failed",{_as:"props",_p:void 0}),RT=fe("[Metrics] Fetch Time Series Response Loaded",{_as:"props",_p:void 0}),Ug=fe("[Metrics] Card Visibility Changed",{_as:"props",_p:void 0}),PT=fe("[Metrics] Card Step Slider Changed",{_as:"props",_p:void 0}),kT=fe("[Metrics] Tag Filter Changed",{_as:"props",_p:void 0}),OT=fe("[Metrics] Metrics Tag Group Expansion Changed",{_as:"props",_p:void 0}),np=fe("[Metrics] Card Pin State Toggled",{_as:"props",_p:void 0}),FT=fe("[Metrics] Toggle Visible Plugin",{_as:"props",_p:void 0}),NT=fe("[Metrics] Toggle Show All Plugins"),Hh=fe("[Metrics] Time Selection Changed",{_as:"props",_p:void 0}),_y=fe("[Metrics] Card User View Box Changed",{_as:"props",_p:void 0}),LT=fe("[Metrics] Linked Time Enable Toggle",{_as:"props",_p:void 0}),rQ=fe("[Metrics] Sorting Data Table By Header",{_as:"props",_p:void 0}),jg=fe("[Metrics] Data table columns order changed",{_as:"props",_p:void 0}),Gg=fe("[Metrics] Data table column toggled in edit menu or delete button clicked",{_as:"props",_p:void 0}),Td=fe("[Metrics] Time Selector Enable Toggle",{_as:"props",_p:void 0}),BT=fe("[Metrics] Range Selection Toggled",{_as:"props",_p:void 0}),oQ=fe("[Metrics] Hide Empty Cards Changed"),VT=fe("[Metrics] Unresolved Pinned Cards From Local Storage Added",{_as:"props",_p:void 0}),Wg=fe("[Metrics] Clear all pinned cards"),zh=fe("[Metrics] Enable Saving Pins Toggled");function by(n,t){let e={};for(let i of Object.keys(n))e[i]=t(n[i],i);return e}var Qa=(()=>(function(n){n.NONE="no affordance",n.EXTENDED_LINE="extendedLine",n.FOB="fob",n.FOB_REMOVED="fobRemoved",n.FOB_TEXT="fobText",n.HISTOGRAM_CLICK_TO_RANGE="histogramClickToRange",n.FOB_ADDED="fobAdded"}(Qa||(Qa={})),Qa))(),Za=(()=>(function(n){n.NONE="no toggle affordance",n.FOB_DESELECT="fobDeselect",n.CHECK_BOX="checkBox"}(Za||(Za={})),Za))(),va=(()=>(function(n){n[n.HORIZONTAL=0]="HORIZONTAL",n[n.VERTICAL=1]="VERTICAL"}(va||(va={})),va))();function HT(n){let t=new Map,e=n.slice().sort((i,r)=>vy(i.tag,r.tag));for(let i of e){let r=jSe(i.tag);t.has(r)||t.set(r,{groupName:r,items:[]}),t.get(r).items.push(i)}return[...t.values()]}function jSe(n){return n.split("/",1)[0]}function vy(n,t){let e=0,i=0;for(;;){if(e===n.length)return i===t.length?0:-1;if(i===t.length)return 1;if(Uh(n[e])&&Uh(t[i])){let r=e,o=i;e=aQ(n,e+1),i=aQ(t,i+1);let a=Number(n.slice(r,e)),s=Number(t.slice(o,i));if(a<s)return-1;if(a>s)return 1}else{if(xN(n[e])){if(!xN(t[i]))return-1}else{if(xN(t[i]))return 1;if(n[e]<t[i])return-1;if(n[e]>t[i])return 1}e++,i++}}}function aQ(n,t){let e;var o;(o=e||(e={}))[o.NATURAL=0]="NATURAL",o[o.REAL=1]="REAL",o[o.EXPONENT_SIGN=2]="EXPONENT_SIGN",o[o.EXPONENT=3]="EXPONENT";let i=e.NATURAL,r=t;for(;r<n.length;r++)if(i===e.NATURAL){if("."===n[r])i=e.REAL;else if("e"===n[r]||"E"===n[r])i=e.EXPONENT_SIGN;else if(!Uh(n[r]))break}else if(i===e.REAL){if("e"===n[r]||"E"===n[r])i=e.EXPONENT_SIGN;else if(!Uh(n[r]))break}else if(i===e.EXPONENT_SIGN){if(!Uh(n[r])&&"+"!==n[r]&&"-"!==n[r])break;i=e.EXPONENT}else if(i===e.EXPONENT&&!Uh(n[r]))break;return r}function Uh(n){return"0"<=n&&n<="9"}function xN(n){return"/"===n||Uh(n)}function CN(n,t,e){let{plugin:i,tag:r,runId:o,sample:a}=t[n],s=fd(e,i,r,a);if(s){if(null!==o&&s.runToSeries.hasOwnProperty(o)){let c=s.runToSeries[o].length;return c>0?c-1:null}let l=Object.values(s.runToSeries).map(c=>c.length);if(l.length)return Math.max(...l)-1}return null}function WSe(n,t,e,i){let r={...t};for(let o in n){if(!n.hasOwnProperty(o))continue;let a=CN(o,n,e);if(null===a)continue;let s=t.hasOwnProperty(o)?t[o].index:null,l=CN(o,n,i);(null!==s&&s>a||null===s||null!==s&&s===l)&&(r[o]={index:a,isClosest:!1})}return r}function sQ(n){let t=by(n.runToLoadState,e=>e===Re.LOADING?Re.LOADING:Re.NOT_LOADED);return{...n,runToLoadState:t}}function lQ(n,t,e,i){return JSON.stringify([n,t,e||"",i])}var{initialState:dQ,reducers:qSe}=_h({tagMetadataLoadState:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},tagMetadata:{scalars:{tagDescriptions:{},tagToRuns:{}},histograms:{tagDescriptions:{},tagToRuns:{}},images:{tagDescriptions:{},tagRunSampledInfo:{}}},cardList:[],cardToPinnedCopy:new Map,cardToPinnedCopyCache:new Map,pinnedCardToOriginal:new Map,unresolvedImportedPinnedCards:[],cardMetadataMap:{},cardStateMap:{},cardStepIndex:{},tagFilter:"",tagGroupExpanded:new Map,linkedTimeSelection:null,linkedTimeEnabled:!1,stepSelectorEnabled:!0,rangeSelectionEnabled:!1,singleSelectionHeaders:[{type:gt.RUN,name:"run",displayName:"Run",enabled:!0,removable:!1,sortable:!0,movable:!1},{type:gt.SMOOTHED,name:"smoothed",displayName:"Smoothed",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.VALUE,name:"value",displayName:"Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.STEP,name:"step",displayName:"Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.RELATIVE_TIME,name:"relative",displayName:"Relative",enabled:!0,removable:!0,sortable:!0,movable:!0}],rangeSelectionHeaders:[{type:gt.RUN,name:"run",displayName:"Run",enabled:!0,removable:!1,sortable:!0,movable:!0},{type:gt.MIN_VALUE,name:"min",displayName:"Min",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.MAX_VALUE,name:"max",displayName:"Max",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.START_VALUE,name:"start",displayName:"Start Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.END_VALUE,name:"end",displayName:"End Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.VALUE_CHANGE,name:"valueChange",displayName:"Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.PERCENTAGE_CHANGE,name:"percentageChange",displayName:"%",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.START_STEP,name:"startStep",displayName:"Start Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.END_STEP,name:"endStep",displayName:"End Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:gt.STEP_AT_MAX,name:"stepAtMax",displayName:"Step At Max",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:gt.STEP_AT_MIN,name:"stepAtMin",displayName:"Step At Min",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:gt.MEAN,name:"mean",displayName:"Mean",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:gt.RAW_CHANGE,name:"rawChange",displayName:"Raw",enabled:!1,removable:!0,sortable:!0,movable:!0}],filteredPluginTypes:new Set,stepMinMax:{min:1/0,max:-1/0}},{isSettingsPaneOpen:!0,isSlideoutMenuOpen:!1,lastPinnedCardTime:0,tableEditorSelectedTab:Wr.SINGLE,timeSeriesData:{scalars:{},histograms:{},images:{}},settings:$S,settingOverrides:{},visibleCardMap:new Map,previousCardInteractions:{tagFilters:[],pins:[],clicks:[]},newCardInteractions:{tagFilters:[],pins:[],clicks:[]}},(n,t,e)=>Vo(t,e)?n:{...n,tagMetadataLoadState:{state:Re.NOT_LOADED,lastLoadedTimeInMs:null},tagMetadata:{scalars:{tagDescriptions:{},tagToRuns:{}},histograms:{tagDescriptions:{},tagToRuns:{}},images:{tagDescriptions:{},tagRunSampledInfo:{}}},cardList:[],cardMetadataMap:{},visibleCardMap:new Map}),MN=dQ,XSe=gr(dQ,ye(fu,(n,{routeKind:t,partialState:e})=>{if(t!==Cn.EXPERIMENT&&t!==Cn.COMPARE_EXPERIMENT)return n;let i=new Set;for(let d of n.pinnedCardToOriginal.keys()){let{plugin:u,tag:p,runId:h,sample:m}=n.cardMetadataMap[d];i.add(lQ(u,p,h,m))}let r=e,o=[];for(let d of[...n.unresolvedImportedPinnedCards,...r.metrics.pinnedCards]){let u=lQ(d.plugin,d.tag,d.runId,d.sample);i.has(u)||(i.add(u),o.push(d))}let a=GF(o,n.cardList,n.cardMetadataMap,n.cardToPinnedCopy,n.cardToPinnedCopyCache,n.pinnedCardToOriginal,n.cardStepIndex,n.cardStateMap),s=r.metrics.smoothing,l=n.settingOverrides;if(Number.isFinite(s)&&null!==s){let d=Math.max(0,Math.min(.999,Number(s.toPrecision(3))));l={...n.settingOverrides,scalarSmoothing:d}}let c={...n,...a,settingOverrides:l};return null!==r.metrics.tagFilter&&(c.tagFilter=r.metrics.tagFilter),c}),ye(hs,(n,{partialSettings:t})=>{let e={};t.tooltipSort&&Object.values(oo).includes(t.tooltipSort)&&(e.tooltipSort=t.tooltipSort),"number"==typeof t.timeSeriesCardMinWidth&&(e.cardMinWidth=t.timeSeriesCardMinWidth),"boolean"==typeof t.ignoreOutliers&&(e.ignoreOutliers=t.ignoreOutliers),"number"==typeof t.scalarSmoothing&&(e.scalarSmoothing=t.scalarSmoothing),"boolean"==typeof t.savingPinsEnabled&&(e.savingPinsEnabled=t.savingPinsEnabled);let i=t.timeSeriesSettingsPaneOpened??n.isSettingsPaneOpen,r=t.stepSelectorEnabled??n.stepSelectorEnabled,o=t.rangeSelectionEnabled??n.rangeSelectionEnabled,a=t.linkedTimeEnabled??n.linkedTimeEnabled,s=t.singleSelectionHeaders??n.singleSelectionHeaders,l=t.rangeSelectionHeaders??n.rangeSelectionHeaders;return{...n,isSettingsPaneOpen:i,stepSelectorEnabled:r,rangeSelectionEnabled:o,linkedTimeEnabled:a,singleSelectionHeaders:s,rangeSelectionHeaders:l,settings:{...n.settings,...e}}}),ye(ma,Ba,n=>{let t=n.tagMetadataLoadState.state===Re.LOADING?Re.LOADING:Re.NOT_LOADED,e=by(n.timeSeriesData,(i,r)=>by(i,o=>fs(r)?by(o,a=>sQ(a)):sQ(o)));return{...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:t},timeSeriesData:e}}),ye(pT,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Re.LOADING}})),ye(mT,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Re.FAILED}})),ye(hT,(n,{tagMetadata:t})=>{let e={scalars:cQ(t,An.SCALARS),histograms:cQ(t,An.HISTOGRAMS),images:t[An.IMAGES]},i={},r=function(n){let t=[];for(let e of Object.keys(n)){let r,i=e;if(fs(i)){if(!gs(i))throw new Error("Multi-run, sampled plugin support not yet implemented");{let o=n[i].tagRunSampledInfo;for(let a of Object.keys(o))for(let s of Object.keys(o[a])){let{maxSamplesPerStep:l}=o[a][s];for(let c=0;c<l;c++)t.push({plugin:i,tag:a,runId:s,sample:c,numSample:l})}}}else if(gs(i)){r=n[i].tagToRuns;for(let o of Object.keys(r))for(let a of r[o])t.push({plugin:i,tag:o,runId:a})}else{r=n[i].tagToRuns;for(let o of Object.keys(r))t.push({plugin:i,tag:o,runId:null})}}return t}(e),o=[];for(let h of r){let m=jF(h);i[m]=h,o.push(m)}let a=n.tagGroupExpanded;if(0===n.tagGroupExpanded.size){let m=HT(o.map(_=>({...i[_],cardId:_})).filter(Boolean));a=new Map(n.tagGroupExpanded);for(let _ of m.slice(0,2))a.set(_.groupName,!0)}let{nextCardToPinnedCopy:s,nextPinnedCardToOriginal:l,pinnedCardMetadataMap:c}=function(n,t,e){let i=new Map,r=new Map,o={};return n.forEach((a,s)=>{-1!==e.indexOf(s)&&(i.set(s,a),r.set(a,s),o[a]=t[s])}),{nextCardToPinnedCopy:i,nextPinnedCardToOriginal:r,pinnedCardMetadataMap:o}}(n.cardToPinnedCopyCache,i,o),d={...i,...c},u=function(n,t){let e={};return Object.entries(n).forEach(([i,r])=>{t[i]&&(e[i]=r)}),e}(n.cardStepIndex,d),p=GF(n.unresolvedImportedPinnedCards,o,d,s,n.cardToPinnedCopyCache,l,u,n.cardStateMap);return{...n,...p,tagGroupExpanded:a,tagMetadataLoadState:{state:Re.LOADED,lastLoadedTimeInMs:Date.now()},tagMetadata:e,cardList:o}}),ye(fT,(n,{cardId:t,settings:e})=>{let i={...n.cardStateMap};return i[t]={...i[t],...e},{...n,cardStateMap:i}}),ye(zg,(n,{cardId:t})=>{let e={...n.cardStateMap};return e[t]={...e[t],fullWidth:!e[t]?.fullWidth,tableExpanded:!e[t]?.fullWidth},{...n,cardStateMap:e}}),ye(kT,(n,{tagFilter:t})=>({...n,tagFilter:t})),ye(gT,(n,{sort:t})=>({...n,settingOverrides:{...n.settingOverrides,tooltipSort:t}})),ye(_T,n=>{let t=!(n.settingOverrides.ignoreOutliers??n.settings.ignoreOutliers);return{...n,settingOverrides:{...n.settingOverrides,ignoreOutliers:t}}}),ye(bT,(n,{xAxisType:t})=>({...n,settingOverrides:{...n.settingOverrides,xAxisType:t}})),ye(xT,(n,{smoothing:t})=>({...n,settingOverrides:{...n.settingOverrides,scalarSmoothing:t}})),ye(CT,n=>{let t=!(n.settingOverrides.scalarPartitionNonMonotonicX??n.settings.scalarPartitionNonMonotonicX);return{...n,settingOverrides:{...n.settingOverrides,scalarPartitionNonMonotonicX:t}}}),ye(MT,(n,{brightnessInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageBrightnessInMilli:t}})),ye(wT,(n,{contrastInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageContrastInMilli:t}})),ye(ST,n=>{let{imageBrightnessInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),ye(ET,n=>{let{imageContrastInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),ye(TT,n=>{let t=!(n.settingOverrides.imageShowActualSize??n.settings.imageShowActualSize);return{...n,settingOverrides:{...n.settingOverrides,imageShowActualSize:t}}}),ye(DT,(n,{histogramMode:t})=>({...n,settingOverrides:{...n.settingOverrides,histogramMode:t}})),ye(vT,(n,{cardMinWidth:t})=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:t}})),ye(yT,n=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:null}})),ye(oQ,n=>({...n,settingOverrides:{...n.settingOverrides,hideEmptyCards:!n.settingOverrides.hideEmptyCards}})),ye(zh,n=>{let t=!(n.settingOverrides.savingPinsEnabled??n.settings.savingPinsEnabled);return{...n,settingOverrides:{...n.settingOverrides,savingPinsEnabled:t}}}),ye(IT,(n,{requests:t})=>{if(!t.length)return n;let e={...n.timeSeriesData};for(let i of t){let{plugin:r,tag:o,sample:a}=i;e[r]=e1(e,r,o,a);let s=fd(e,r,o,a),l=NF(i)?[i.runId]:Zf(n.tagMetadata,r,o,a);s.runToLoadState=t1(Re.LOADING,l,s.runToLoadState)}return{...n,timeSeriesData:e}}),ye(AT,(n,{request:t})=>{let e={...n.timeSeriesData},{plugin:i,tag:r,sample:o}=t;e[i]=e1(e,i,r,o);let a=fd(e,i,r,o),s=NF(t)?[t.runId]:Zf(n.tagMetadata,i,r,o);return a.runToLoadState=t1(Re.FAILED,s,a.runToLoadState),{...n,timeSeriesData:e}}),ye(RT,(n,{response:t})=>{let e={...n.stepMinMax},i={...n.cardStateMap},r={...n.timeSeriesData},{plugin:o,tag:a,runId:s,sample:l}=t;r[o]=e1(r,o,a,l);let c=fd(r,o,a,l);if(qS(t)){let u=s?[s]:Zf(n.tagMetadata,o,a,l);c.runToLoadState=t1(Re.FAILED,u,c.runToLoadState)}else{let u=t.runToSeries;c.runToSeries={...c.runToSeries},c.runToLoadState={...c.runToLoadState};for(let p in u)if(u.hasOwnProperty(p)){c.runToSeries[p]=u[p],c.runToLoadState[p]=Re.LOADED;for(let h of u[p])e.min=Math.min(e.min,h.step),e.max=Math.max(e.max,h.step)}}if(t.runToSeries&&t.plugin===An.SCALARS){let u=jF({plugin:o,tag:a,runId:null}),p=function(n){let t=1/0,e=-1/0;return Object.values(n).flat().forEach(i=>{t=Math.min(t,i.step),e=Math.max(e,i.step)}),{minStep:t,maxStep:e}}(c.runToSeries);i[u]={...i[u],dataMinMax:p};let h=n.cardToPinnedCopy.get(u);h&&(i[h]={...i[h],dataMinMax:p})}return{...n,timeSeriesData:r,cardStepIndex:WSe(n.cardMetadataMap,n.cardStepIndex,r,n.timeSeriesData),stepMinMax:e,cardStateMap:i}}),ye(PT,(n,{cardId:t,stepIndex:e})=>{let i=CN(t,n.cardMetadataMap,n.timeSeriesData),r=e;return null===i?r=null:e>i&&(r=i),{...n,cardStepIndex:{...n.cardStepIndex,[t]:{index:r,isClosest:!1}}}}),ye(OT,(n,{tagGroup:t})=>{let e=new Map(n.tagGroupExpanded);return e.set(t,!e.get(t)),{...n,tagGroupExpanded:e}}),ye(Ug,(n,{enteredCards:t,exitedCards:e})=>{if(!t.length&&!e.length)return n;let i=new Map(n.visibleCardMap);return t.forEach(({elementId:r,cardId:o})=>{let a=i.get(r)??null;if(null!==a&&a!==o)throw new Error("A DOM element cannot be reused for more than 1 unique card metadata");i.set(r,o)}),e.forEach(({elementId:r})=>{i.delete(r)}),{...n,visibleCardMap:i}}),ye(np,(n,{cardId:t})=>{let e=n.pinnedCardToOriginal.has(t),i=!e&&!n.cardToPinnedCopy.has(t);if(i&&!n1(n))return n;let r=new Map(n.cardToPinnedCopy),o=new Map(n.cardToPinnedCopyCache),a=new Map(n.pinnedCardToOriginal),s={...n.cardMetadataMap},l={...n.cardStepIndex},c={...n.cardStateMap},d=n.lastPinnedCardTime;if(e){let u=n.pinnedCardToOriginal.get(t);r.delete(u),o.delete(u),a.delete(t),delete s[t],delete l[t],delete c[t]}else if(i){let u=WF(t,r,o,a,l,s,c);r=u.cardToPinnedCopy,o=u.cardToPinnedCopyCache,a=u.pinnedCardToOriginal,s=u.cardMetadataMap,l=u.cardStepIndex,c=u.cardStateMap,d=Date.now()}else{let u=n.cardToPinnedCopy.get(t);r.delete(t),o.delete(t),a.delete(u),delete s[u],delete l[u],delete c[t]}return{...n,cardMetadataMap:s,cardStateMap:c,cardStepIndex:l,cardToPinnedCopy:r,cardToPinnedCopyCache:o,pinnedCardToOriginal:a,lastPinnedCardTime:d}}),ye(LT,n=>{let t=!n.linkedTimeEnabled,e={...n.cardStepIndex},i=n.linkedTimeSelection,r=n.stepSelectorEnabled,o=n.rangeSelectionEnabled;if(t){let{max:a}=n.stepMinMax;i=n.linkedTimeSelection??{start:{step:a===-1/0?0:a},end:null},e=qF(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,i),r=t,o=Boolean(i.end)}return{...n,cardStepIndex:e,linkedTimeEnabled:t,linkedTimeSelection:i,stepSelectorEnabled:r,rangeSelectionEnabled:o}}),ye(BT,n=>{let t=!n.rangeSelectionEnabled,e=n.stepSelectorEnabled,i=n.linkedTimeSelection,r=Object.entries(n.cardStateMap).reduce((o,[a,s])=>(o[a]={...s,stepSelectionOverride:Va.NONE,rangeSelectionOverride:Va.NONE},o),{});return t?(e=t,i||(i={start:{step:n.stepMinMax.min},end:{step:n.stepMinMax.max}}),i.end||(i={start:{step:n.stepMinMax.min},end:i.start})):i&&(i={start:i.end??i.start,end:null}),{...n,stepSelectorEnabled:e,rangeSelectionEnabled:t,linkedTimeSelection:i,cardStateMap:r}}),ye(Hh,(n,t)=>{let{cardId:e,timeSelection:i}=t,r=i.start.step,o=i.end?.step,s=n.rangeSelectionEnabled;n.linkedTimeEnabled&&(s=void 0!==o);let l={start:{step:r},end:void 0===o?null:{step:r>o?r:o}},c=qF(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,l),d={...n.cardStateMap};return e&&(d[e]={...d[e],timeSelection:l,stepSelectionOverride:Va.OVERRIDE_AS_ENABLED,rangeSelectionOverride:void 0===l.end?.step?Va.OVERRIDE_AS_DISABLED:Va.OVERRIDE_AS_ENABLED}),{...n,linkedTimeSelection:l,cardStepIndex:c,cardStateMap:d,rangeSelectionEnabled:s}}),ye(_y,(n,{cardId:t,userViewBox:e})=>{let i={...n.cardStateMap};return i[t]={...i[t],userViewBox:e},{...n,cardStateMap:i}}),ye(Td,(n,{affordance:t,cardId:e})=>{let i={...n.cardStateMap};if(e){let{timeSelection:s,...l}=i[e]||{};i[e]={...l,stepSelectionOverride:Va.OVERRIDE_AS_DISABLED}}else Object.keys(i).forEach(s=>{i[s]={...i[s],stepSelectionOverride:Va.NONE}});if(!n.linkedTimeEnabled&&t!==Za.CHECK_BOX)return{...n,cardStateMap:i};let r=!n.stepSelectorEnabled,o=r&&n.linkedTimeEnabled,a=r&&n.rangeSelectionEnabled;return{...n,linkedTimeEnabled:o,stepSelectorEnabled:r,rangeSelectionEnabled:a,cardStateMap:i}}),ye(dT,(n,{tab:t})=>({...n,tableEditorSelectedTab:t})),ye(jg,(n,{source:t,destination:e,side:i,dataTableMode:r})=>{let o=r===Wr.RANGE?[...n.rangeSelectionHeaders]:[...n.singleSelectionHeaders];return o=kl.moveColumn(o,t,e,i),r===Wr.RANGE?{...n,rangeSelectionHeaders:o}:{...n,singleSelectionHeaders:o}}),ye(Gg,(n,{dataTableMode:t,header:e,cardId:i})=>{let{cardStateMap:r,rangeSelectionEnabled:o,linkedTimeEnabled:a}=n,s=i?r1(r,o,a,i):t===Wr.RANGE,c=(s?n.rangeSelectionHeaders:n.singleSelectionHeaders).map(d=>{let u={...d};return d.name===e.name&&(u.enabled=!u.enabled),u});return s?{...n,rangeSelectionHeaders:c}:{...n,singleSelectionHeaders:c}}),ye(FT,(n,{plugin:t})=>{let e=new Set(n.filteredPluginTypes);return e.has(t)?e.delete(t):e.add(t),Object.values(An).every(i=>e.has(i))&&(e=new Set),{...n,filteredPluginTypes:e}}),ye(NT,n=>({...n,filteredPluginTypes:new Set})),ye(sT,n=>({...n,isSettingsPaneOpen:!n.isSettingsPaneOpen})),ye(aT,n=>({...n,isSettingsPaneOpen:!1})),ye(lT,n=>({...n,isSlideoutMenuOpen:!n.isSlideoutMenuOpen})),ye(cT,(n,{mode:t})=>({...n,isSlideoutMenuOpen:!0,isSettingsPaneOpen:!0,tableEditorSelectedTab:t})),ye(uT,n=>({...n,isSlideoutMenuOpen:!1})),ye(VT,(n,{cards:t})=>({...n,unresolvedImportedPinnedCards:[...n.unresolvedImportedPinnedCards,...t]})),ye(Wg,n=>{let t={...n.cardMetadataMap},e={...n.cardStepIndex},i={...n.cardStateMap};for(let r of n.pinnedCardToOriginal.keys())delete t[r],delete e[r],delete i[r];return{...n,cardMetadataMap:t,cardStateMap:i,cardStepIndex:e,cardToPinnedCopy:new Map,cardToPinnedCopyCache:new Map,pinnedCardToOriginal:new Map}}));function uQ(n,t){return bh(XSe,qSe)(n,t)}function cQ(n,t){return{tagDescriptions:n[t].tagDescriptions,tagToRuns:YSe(n[t].runTagInfo)}}function YSe(n){let t={};for(let e in n)for(let i of n[e])t[i]=[...t[i]||[],e];return t}var QSe=W(gd,Ks,(n,t,e)=>t?{...t,loadState:n,id:e}:null),wN=fe("[Metrics Effects] Init"),pQ=(()=>{class n{ngrxOnInitEffects(){return wN()}getVisibleCardFetchInfos(){return this.store.select(IW).pipe(Jn(i=>i.size?Co([...i].map(o=>this.store.select(QSe,o).pipe(Lt(1)))):$t([])),q(i=>i.filter(Boolean)))}fetchTimeSeries(e){return this.metricsDataSource.fetchTimeSeries([e]).pipe(Dt(i=>{let r=i.filter(qS);r.length&&console.error("Time series response contained errors:",r),this.store.dispatch(RT({response:i[0]}))}),co(()=>(this.store.dispatch(AT({request:e})),$t(null))))}fetchTimeSeriesForCards(e,i){return $t(e.map(o=>{let{plugin:a,tag:s,runId:l,sample:c}=o,d=gs(a)?{plugin:a,tag:s,runId:l}:{plugin:a,tag:s,experimentIds:i};return void 0!==c&&(d.sample=c),d})).pipe(Dt(o=>{this.store.dispatch(IT({requests:o}))}),xn(o=>tn(...o.map(s=>this.fetchTimeSeries(s)))))}constructor(e,i,r,o){this.actions$=e,this.store=i,this.metricsDataSource=r,this.savedPinsDataSource=o,this.dashboardShownWithoutData$=e.pipe(Zn(wN,yc,gh,Na),It(this.store.select(Zo),this.store.select(xv)),Oe(([,a,s])=>a===_v&&s.state===Re.NOT_LOADED)),this.reloadRequestedWhileShown$=e.pipe(Zn(ma,Ba),It(this.store.select(Zo)),Oe(([,a])=>a===_v)),this.loadTagMetadata$=tn(this.dashboardShownWithoutData$,this.reloadRequestedWhileShown$).pipe(It(this.store.select(xv),this.store.select(or)),Oe(([,a,s])=>a.state!==Re.LOADING&&null!==s),ic(10),Dt(()=>{this.store.dispatch(pT())}),Jn(([,,a])=>this.metricsDataSource.fetchTagMetadata(a).pipe(Dt(s=>{this.store.dispatch(hT({tagMetadata:s}))}),co(()=>(this.store.dispatch(mT()),$t(null)))))),this.visibleCardsWithoutDataChanged$=this.actions$.pipe(Zn(Ug),It(this.getVisibleCardFetchInfos()),q(([,a])=>a.filter(s=>s.loadState===Re.NOT_LOADED))),this.visibleCardsReloaded$=this.reloadRequestedWhileShown$.pipe(It(this.getVisibleCardFetchInfos()),q(([,a])=>a.filter(s=>s.loadState!==Re.LOADING))),this.loadTimeSeries$=tn(this.visibleCardsWithoutDataChanged$,this.visibleCardsReloaded$).pipe(Oe(a=>a.length>0),It(this.store.select(or).pipe(Oe(a=>null!==a))),xn(([a,s])=>this.fetchTimeSeriesForCards(a,s))),this.addOrRemovePin$=this.actions$.pipe(Zn(np),It(this.getVisibleCardFetchInfos(),this.store.select(pd),this.store.select(ph),this.store.select(bd)),Oe(([,,a,s,l])=>a&&s&&l),Dt(([{cardId:a,canCreateNewPins:s,wasPinned:l},c])=>{let d=c.find(u=>u.id===a);!d||d.plugin!==An.SCALARS||(l?this.savedPinsDataSource.removeScalarPin(d.tag):s&&this.savedPinsDataSource.saveScalarPin(d.tag))})),this.loadSavedPins$=this.actions$.pipe(Zn(wN),It(this.store.select(pd),this.store.select(ph),this.store.select(bd)),Oe(([,a,s,l])=>a&&s&&l),Dt(()=>{let a=this.savedPinsDataSource.getSavedScalarPins();if(!a||0===a.length)return;let s=a.map(l=>({plugin:An.SCALARS,tag:l}));this.store.dispatch(VT({cards:s}))})),this.removeAllPins$=this.actions$.pipe(Zn(Wg),It(this.store.select(pd),this.store.select(ph),this.store.select(bd)),Oe(([,a,s,l])=>a&&s&&l),Dt(()=>{this.savedPinsDataSource.removeAllScalarPins()})),this.addOrRemovePinsOnToggle$=this.actions$.pipe(Zn(zh),It(this.store.select(Kf),this.store.select(pd),this.store.select(ph),this.store.select(bd)),Oe(([,,a,s])=>a&&s),Dt(([,a,,,s])=>{if(s){let l=a.map(c=>c.plugin===An.SCALARS?c.tag:null).filter(c=>null!==c);this.savedPinsDataSource.saveScalarPins(l)}else this.savedPinsDataSource.removeAllScalarPins()})),this.dataEffects$=_r(()=>tn(this.loadTagMetadata$,this.loadTimeSeries$,this.addOrRemovePin$,this.loadSavedPins$,this.removeAllPins$,this.addOrRemovePinsOnToggle$),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(O(Eo),O(Ie),O(wc),O(XS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),SN=new te("Metrics Store Config"),EN=new te("Metrics Initial Settings Config");function hQ(n){return n?{initialState:{...MN,settings:n}}:{initialState:MN}}var Cs=(()=>(function(n){n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n[n.MIDDLE=4]="MIDDLE",n[n.FOURTH=8]="FOURTH",n[n.FIFTH=32]="FIFTH"}(Cs||(Cs={})),Cs))(),mQ=0;function ZSe(n,t){if(1&n){let e=Te();f(0,"button",3),A("click",function(){return ne(e),ie(w().expandSidebar())}),k(1,"mat-icon",4),g()}}var KSe=function(n){return{"full-screen":n}};function JSe(n,t){if(1&n){let e=Te();f(0,"nav",5),U(1,"async"),U(2,"async"),Tt(3,1),f(4,"div",6),U(5,"async"),f(6,"button",7),A("click",function(){return ne(e),ie(w().toggleFullScreen())}),U(7,"async"),k(8,"mat-icon",8),U(9,"async"),g()()()}if(2&n){let e=w();Bt("width",G(1,9,e.width$),"%")("min-width",e.MINIMUM_SIDEBAR_WIDTH_IN_PX,"px")("max-width",G(2,11,e.runsTableFullScreen$)?100:"","%"),v(4),b("ngClass",Un(19,KSe,G(5,13,e.runsTableFullScreen$))),v(2),b("ngClass",G(7,15,e.runsTableFullScreen$)?"collapse":"expand"),v(2),b("svgIcon",G(9,17,e.runsTableFullScreen$)?"arrow_back_24px":"arrow_forward_24px")}}function $Se(n,t){if(1&n){let e=Te();f(0,"div",9),A("mousedown",function(){return ne(e),ie(w().resizeGrabbed())}),g()}}var e1e=[[["","main",""]],[["","sidebar",""]]],t1e=["[main]","[sidebar]"],_Q=(()=>{class n{constructor(e,i){this.store=e,this.runsTableFullScreen$=this.store.select(wS),this.width$=this.store.select(MS).pipe(Vi(this.runsTableFullScreen$),q(([r,o])=>o?100:r)),this.ngUnsubscribe=new Ee,this.resizing=!1,this.MINIMUM_SIDEBAR_WIDTH_IN_PX=75,Ei(i.nativeElement,"mousemove").pipe(it(this.ngUnsubscribe),Oe(()=>this.resizing)).subscribe(r=>{if((r.buttons&Cs.LEFT)!==Cs.LEFT)return void(this.resizing=!1);r.preventDefault();let{width:o}=i.nativeElement.getBoundingClientRect();this.store.dispatch(Uf({widthInPercent:r.clientX<=this.MINIMUM_SIDEBAR_WIDTH_IN_PX?0:r.clientX/o*100}))}),Ei(i.nativeElement,"mouseup",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(()=>{this.resizing=!1})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}resizeGrabbed(){this.resizing=!0}expandSidebar(){this.store.dispatch(Uf({widthInPercent:20}))}toggleFullScreen(){this.store.dispatch(vS())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(xe))},n.\u0275cmp=P({type:n,selectors:[["tb-dashboard-layout"]],ngContentSelectors:t1e,decls:7,vars:9,consts:[["class","expand-collapsed-sidebar",3,"click",4,"ngIf"],["class","sidebar",3,"width","minWidth","maxWidth",4,"ngIf"],["class","resizer",3,"mousedown",4,"ngIf"],[1,"expand-collapsed-sidebar",3,"click"],["svgIcon","expand_more_24px"],[1,"sidebar"],[1,"full-screen-toggle",3,"ngClass"],["mat-button","",1,"full-screen-btn",3,"ngClass","click"],[1,"expand-collapse-icon",3,"svgIcon"],[1,"resizer",3,"mousedown"]],template:function(e,i){1&e&&(fn(e1e),S(0,ZSe,2,0,"button",0),U(1,"async"),S(2,JSe,10,21,"nav",1),U(3,"async"),S(4,$Se,1,0,"div",2),U(5,"async"),Tt(6)),2&e&&(b("ngIf",0===G(1,3,i.width$)),v(2),b("ngIf",G(3,5,i.width$)>0),v(2),b("ngIf",G(5,7,i.width$)>0))},dependencies:[wn,Ne,bn,ki,ct],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;height:100%;width:100%;position:relative}.sidebar[_ngcontent-%COMP%]{max-width:80vw;position:relative}.resizer[_ngcontent-%COMP%], .expand-collapsed-sidebar[_ngcontent-%COMP%]{border-color:#ebebeb;box-sizing:border-box;flex:0 0;justify-self:stretch}body.dark-mode[_nghost-%COMP%]   .resizer[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]{border-color:#555}body.dark-mode[_nghost-%COMP%]   .expand-collapsed-sidebar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .expand-collapsed-sidebar[_ngcontent-%COMP%]{border-color:#555}.expand-collapsed-sidebar[_ngcontent-%COMP%]{width:20px;align-items:center;background:rgba(0,0,0,0);border-style:solid;border-width:0 1px 0 0;color:inherit;contain:content;cursor:pointer;display:flex;justify-self:stretch;padding:0}.expand-collapsed-sidebar[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:center}.resizer[_ngcontent-%COMP%]{align-items:center;border-style:solid;border-width:0 2px;cursor:ew-resize;contain:strict;display:flex;justify-self:stretch}.resizer[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:100%}.resizer[_ngcontent-%COMP%]:hover{border-color:#ccc;outline:3px solid #ccc;z-index:1}body.dark-mode[_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]:hover, body.dark-mode   [_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]:hover{outline-color:#777;border-color:#777}.full-screen-toggle[_ngcontent-%COMP%]{opacity:0;position:absolute;height:100%;left:calc(100% + 2px);top:0;z-index:1;display:flex;align-items:center}.full-screen-toggle[_ngcontent-%COMP%]:hover{opacity:.8}.full-screen-toggle.full-screen[_ngcontent-%COMP%]{left:unset;right:0}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn[_ngcontent-%COMP%]{background-color:gray;padding:0;min-width:20px;width:20px}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn.expand[_ngcontent-%COMP%]{border-radius:0 20px 20px 0}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn.collapse[_ngcontent-%COMP%]{border-radius:20px 0 0 20px}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn[_ngcontent-%COMP%]   .expand-collapse-icon[_ngcontent-%COMP%]{font-size:16px;margin-right:0}"],changeDetection:0}),n})(),TN=new WeakMap,yy=class{constructor(t,e){this.root=t,this.buffer=e,this.destroyedTargets=new WeakSet}initialize(t){if(this.intersectionObserver)return;this.intersectionCallback=t;let e={threshold:0,root:this.root??null};this.buffer&&(e.rootMargin=this.buffer),this.intersectionObserver=new IntersectionObserver(this.onCardIntersection.bind(this),e)}add(t){this.ensureInitialized()&&this.intersectionObserver.observe(t)}willDestroy(t){this.ensureInitialized()&&this.destroyedTargets.add(t)}ensureInitialized(){if(!this.intersectionObserver)throw new Error("CardObserver must be initialized before use");return!0}onCardIntersection(t){t.sort((r,o)=>r.time-o.time);let e=new Set,i=new Set;for(let{isIntersecting:r,target:o}of t)r?(e.add(o),i.delete(o)):(e.delete(o),i.add(o)),this.destroyedTargets.has(o)&&!r&&(this.destroyedTargets.delete(o),this.intersectionObserver.unobserve(o));this.intersectionCallback(e,i)}onCardIntersectionForTest(t){this.onCardIntersection(t)}},bQ=(()=>{class n{constructor(e,i){this.host=e,this.store=i}onCardIntersection(e,i){let r=[...e].map(a=>{let s=TN.get(a);if(!s)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:s.elementId,cardId:s.cardId}}),o=[...i].map(a=>{let s=TN.get(a);if(!s)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:s.elementId,cardId:s.cardId}});this.store.dispatch(Ug({enteredCards:r,exitedCards:o}))}ngOnInit(){let e=this.host.nativeElement;TN.set(e,{elementId:(mQ++,Symbol(mQ)),cardId:this.cardId}),this.cardObserver||(this.cardObserver=new yy),this.cardObserver.initialize(this.onCardIntersection.bind(this)),this.cardObserver.add(e)}ngOnDestroy(){this.cardObserver&&this.cardObserver.willDestroy(this.host.nativeElement)}hostForTest(){return this.host}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Ie))},n.\u0275dir=Me({type:n,selectors:[["","cardLazyLoader",""]],inputs:{cardId:["cardLazyLoader","cardId"],cardObserver:"cardObserver"}}),n})();function r1e(n,t){1&n&&(Gt(0),Tt(1),Wt())}var o1e=["*"],vQ=(()=>{class n{constructor(e,i){this.viewContainerRef=e,this.componentFactoryResolver=i}ngOnInit(){if(this.customizableComponent){let e=this.componentFactoryResolver.resolveComponentFactory(this.customizableComponent.constructor);this.viewContainerRef.createComponent(e)}}}return n.\u0275fac=function(e){return new(e||n)(C(ei),C(ho))},n.\u0275cmp=P({type:n,selectors:[["tb-customization"]],inputs:{customizableComponent:"customizableComponent"},ngContentSelectors:o1e,decls:1,vars:1,consts:[[4,"ngIf"]],template:function(e,i){1&e&&(fn(),S(0,r1e,2,0,"ng-container",0)),2&e&&b("ngIf",!i.customizableComponent)},dependencies:[Ne],encapsulation:2}),n})(),s1e=["button"],l1e=["*"],yQ=new te("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),xQ=new te("MatButtonToggleGroup"),c1e={provide:Xr,useExisting:Wn(()=>DN),multi:!0},CQ=0,zT=class{constructor(t,e){this.source=t,this.value=e}},DN=(()=>{class n{get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}get vertical(){return this._vertical}set vertical(e){this._vertical=vt(e)}get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=vt(e),this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e),this._markButtonsForCheck()}constructor(e,i){this._changeDetector=e,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+CQ++,this.valueChange=new F,this.change=new F,this.appearance=i&&i.appearance?i.appearance:"standard"}ngOnInit(){this._selectionModel=new fg(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked))}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_emitChangeEvent(e){let i=new zT(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,r=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,r)):this._updateModelValue(e,r)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return!(typeof this._rawValue>"u")&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>null!=e.value&&i===e.value):e.value===this._rawValue)}_setSelectionByValue(e){this._rawValue=e,this._buttonToggles&&(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(i=>this._selectValue(i))):(this._clearSelection(),this._selectValue(e)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>e.checked=!1)}_selectValue(e){let i=this._buttonToggles.find(r=>null!=r.value&&r.value===e);i&&(i.checked=!0,this._selectionModel.select(i))}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(yQ,8))},n.\u0275dir=Me({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,u1e,5),2&e){let o;be(o=ve())&&(i._buttonToggles=o)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(e,i){2&e&&(Be("aria-disabled",i.disabled),nt("mat-button-toggle-vertical",i.vertical)("mat-button-toggle-group-appearance-standard","standard"===i.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[Vt([c1e,{provide:xQ,useExisting:n}])]}),n})(),d1e=go(class{}),u1e=(()=>{class n extends d1e{get buttonId(){return`${this.id}-button`}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){let i=vt(e);i!==this._checked&&(this._checked=i,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=vt(e)}constructor(e,i,r,o,a,s){super(),this._changeDetectorRef=i,this._elementRef=r,this._focusMonitor=o,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new F;let l=Number(a);this.tabIndex=l||0===l?l:null,this.buttonToggleGroup=e,this.appearance=s&&s.appearance?s.appearance:"standard"}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||"mat-button-toggle-"+CQ++,e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){let e=!!this._isSingleSelector()||!this._checked;e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new zT(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this._isSingleSelector()?this.buttonToggleGroup.name:this.name||null}_isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}}return n.\u0275fac=function(e){return new(e||n)(C(xQ,8),C(Qt),C(xe),C(fo),Mo("tabindex"),C(yQ,8))},n.\u0275cmp=P({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(e,i){if(1&e&&Ue(s1e,5),2&e){let r;be(r=ve())&&(i._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(e,i){1&e&&A("focus",function(){return i.focus()}),2&e&&(Be("aria-label",null)("aria-labelledby",null)("id",i.id)("name",null),nt("mat-button-toggle-standalone",!i.buttonToggleGroup)("mat-button-toggle-checked",i.checked)("mat-button-toggle-disabled",i.disabled)("mat-button-toggle-appearance-standard","standard"===i.appearance))},inputs:{disableRipple:"disableRipple",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[Xe],ngContentSelectors:l1e,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(e,i){if(1&e&&(fn(),f(0,"button",0,1),A("click",function(){return i._onButtonClick()}),f(2,"span",2),Tt(3),g()(),k(4,"span",3)(5,"span",4)),2&e){let r=st(1);b("id",i.buttonId)("disabled",i.disabled||null),Be("tabindex",i.disabled?-1:i.tabIndex)("aria-pressed",i.checked)("name",i._getButtonName())("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby),v(5),b("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)}},dependencies:[Ki],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}"],encapsulation:2,changeDetection:0}),n})(),UT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,_a,dn]}),n})(),h1e=["determinateSpinner"];function m1e(n,t){if(1&n&&(qn(),f(0,"svg",11),k(1,"circle",12),g()),2&n){let e=w();Be("viewBox",e._viewBox()),v(1),Bt("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Be("r",e._circleRadius())}}var f1e=Ko(class{constructor(n){this._elementRef=n}},"primary"),g1e=new te("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:MQ}}}),MQ=100,Nc=(()=>{class n extends f1e{constructor(e,i,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=MQ,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,mi(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=mi(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=mi(e)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){let e=2*this._circleRadius()+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(pi,8),C(g1e))},n.\u0275cmp=P({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,i){if(1&e&&Ue(h1e,5),2&e){let r;be(r=ve())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(e,i){2&e&&(Be("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Bt("width",i.diameter,"px")("height",i.diameter,"px"),nt("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[Xe],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,i){if(1&e&&(S(0,m1e,2,8,"ng-template",null,0,jt),f(2,"div",1,2),qn(),f(4,"svg",3),k(5,"circle",4),g()(),ua(),f(6,"div",5)(7,"div",6)(8,"div",7),hi(9,8),g(),f(10,"div",9),hi(11,8),g(),f(12,"div",10),hi(13,8),g()()()),2&e){let r=st(1);v(4),Be("viewBox",i._viewBox()),v(1),Bt("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Be("r",i._circleRadius()),v(4),b("ngTemplateOutlet",r),v(2),b("ngTemplateOutlet",r),v(2),b("ngTemplateOutlet",r)}},dependencies:[eo],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),ol=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,dn]}),n})(),wQ=(()=>{class n{constructor(e){this.dialogRef=e}closeWithoutDisabling(){this.dialogRef.close({shouldDisable:!1})}closeAndDisable(){this.dialogRef.close({shouldDisable:!0})}}return n.\u0275fac=function(e){return new(e||n)(C(Vl))},n.\u0275cmp=P({type:n,selectors:[["saving-pins-dialog"]],decls:11,vars:0,consts:[[1,"title"],[1,"bottom-buttons"],["mat-flat-button","",1,"cancel-button",3,"click"],["mat-flat-button","",1,"disable-button",3,"click"]],template:function(e,i){1&e&&(f(0,"h3",0),T(1,"Disable Saving Pins?"),g(),f(2,"p"),T(3," Disabling saving pins will remove locally stored pinned card data and no longer allow pinned cards to be shared across multiple experiments."),k(4,"br"),T(5,"You can re-enable the feature and re-pin cards at any time.\n"),g(),f(6,"div",1)(7,"button",2),A("click",function(){return i.closeWithoutDisabling()}),T(8," Cancel "),g(),f(9,"button",3),A("click",function(){return i.closeAndDisable()}),T(10," Disable "),g()())},dependencies:[ki],styles:[".title[_ngcontent-%COMP%]{font-size:19px;font-weight:500;margin:0}.bottom-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:10px;gap:10px}.bottom-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{text-transform:uppercase}"],changeDetection:0}),n})();function v1e(n,t){if(1&n&&(f(0,"b"),T(1),g()),2&n){let e=w().$implicit;v(1),Ve("",e.displayAlias,":")}}function y1e(n,t){if(1&n&&(f(0,"mat-option",2)(1,"span",3),S(2,v1e,2,1,"b",4),T(3),g()()),2&n){let e=t.$implicit;b("value",e.value)("disabled",e.disabled),v(1),jM("title","",e.displayAlias,": ",e.displayText,""),v(1),b("ngIf",e.displayAlias),v(1),Ve(" ",e.displayText," ")}}var SQ=(()=>{class n{constructor(){this.value="",this.options=[],this.selectionChange=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-dropdown"]],inputs:{value:"value",options:"options"},outputs:{selectionChange:"selectionChange"},decls:2,vars:3,consts:[[3,"value","hideSingleSelectionIndicator","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"option-content",3,"title"],[4,"ngIf"]],template:function(e,i){1&e&&(f(0,"mat-select",0),A("selectionChange",function(o){return i.selectionChange.emit(o.value)}),S(1,y1e,4,6,"mat-option",1),g()),2&e&&(b("value",i.value)("hideSingleSelectionIndicator",!0),v(1),b("ngForOf",i.options))},dependencies:[nn,Ne,Wu,ja],styles:["mat-select[_ngcontent-%COMP%]{border:1px solid #8e98a3;border-radius:3px;box-sizing:border-box;padding:6px;font-size:12px;line-height:normal}mat-select[_ngcontent-%COMP%]     .mat-mdc-select-arrow-wrapper{height:12px}mat-select[_ngcontent-%COMP%]:focus{outline-color:-webkit-focus-ring-color;outline-style:auto}  .mat-mdc-select-panel{max-width:70vw}  mat-option.mat-mdc-option{min-height:32px;font-size:12px}"]}),n})(),EQ=(()=>{class n{constructor(){this.onCheckboxToggled=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["saving-pins-checkbox"]],inputs:{isChecked:"isChecked"},outputs:{onCheckboxToggled:"onCheckboxToggled"},features:[Vt([{provide:Z2,useValue:{clickAction:"noop"}}])],decls:4,vars:1,consts:[[1,"saving-pins-checkbox"],["color","primary",3,"checked","click"],["svgIcon","help_outline_24px","title","When saving pins are enabled, pinned cards will be visible across multiple experiments.",1,"info"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"mat-checkbox",1),A("click",function(){return i.onCheckboxToggled.emit()}),T(2,"Enable saving pins (Scalars only)"),g(),k(3,"mat-icon",2),g()),2&e&&(v(1),b("checked",i.isChecked))},dependencies:[xs,bn],styles:["[_nghost-%COMP%]{color:#616161;font-size:12px}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}mat-checkbox[_ngcontent-%COMP%]{margin-left:-11px}mat-checkbox[_ngcontent-%COMP%]     label{color:#616161;font-size:12px;letter-spacing:normal;padding-left:0px;white-space:nowrap}body.dark-mode[_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label, body.dark-mode   [_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label{color:rgba(255,255,255,.7)}.saving-pins-checkbox[_ngcontent-%COMP%]{align-items:center;display:flex}.saving-pins-checkbox[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{height:15px;margin-left:5px;width:15px;min-width:15px}"],changeDetection:0}),n})(),M1e=function(n){return{"column-edit-menu-toggle":!0,"toggle-opened":n}};function w1e(n,t){if(1&n){let e=Te();f(0,"button",33),A("click",function(){return ne(e),ie(w().onSlideOutToggled.emit())}),k(1,"mat-icon",34),T(2," Edit Table Columns "),g()}if(2&n){let e=w();b("ngClass",Un(1,M1e,e.isSlideOutMenuOpen))}}function S1e(n,t){if(1&n){let e=Te();f(0,"div",35)(1,"saving-pins-checkbox",36),A("onCheckboxToggled",function(){ne(e);let r=w();return ie(r.onEnableSavingPinsToggled.emit(r.isSavingPinsEnabled))}),g()()}if(2&n){let e=w();v(1),b("isChecked",e.isSavingPinsEnabled)}}function E1e(n,t){if(1&n){let e=Te();f(0,"section",37)(1,"h3",1),T(2,"Images"),g(),f(3,"div",38)(4,"div",39),T(5,"Brightness"),g(),f(6,"div",13)(7,"mat-slider",40)(8,"input",15),A("valueChange",function(r){return ne(e),ie(w().imageBrightnessSliderChanged$.emit(r))}),g()(),f(9,"button",41),A("click",function(){return ne(e),ie(w().imageBrightnessReset.emit())}),k(10,"mat-icon",17),g()()(),f(11,"div",42)(12,"div",43),T(13,"Contrast"),g(),f(14,"div",13)(15,"mat-slider",44)(16,"input",15),A("valueChange",function(r){return ne(e),ie(w().imageContrastSliderChanged$.emit(r))}),g()(),f(17,"button",45),A("click",function(){return ne(e),ie(w().imageContrastReset.emit())}),k(18,"mat-icon",17),g()()(),f(19,"div",46)(20,"mat-checkbox",27),A("change",function(r){return ne(e),ie(w().imageShowActualSizeChanged.emit(r.checked))}),T(21,"Show actual image size"),g()()()}if(2&n){let e=w();v(7),b("max",2e3)("min",0)("step",10)("displayWith",e.formatMilliToZeroth),v(1),b("value",e.imageBrightnessInMilli),v(7),b("max",5e3)("min",0)("step",10)("displayWith",e.formatMilliToZeroth),v(1),b("value",e.imageContrastInMilli),v(4),b("checked",e.imageShowActualSize)}}var DQ=(()=>{class n{constructor(e){this.locale=e,this.globalPinsFeatureEnabled=!1,this.linkedTimeToggled=new F,this.stepSelectorToggled=new F,this.rangeSelectionToggled=new F,this.onSlideOutToggled=new F,this.onEnableSavingPinsToggled=new F,this.TooltipSortDropdownOptions=[{value:oo.ALPHABETICAL,displayText:"Alphabetical"},{value:oo.ASCENDING,displayText:"Ascending"},{value:oo.DESCENDING,displayText:"Descending"},{value:oo.NEAREST,displayText:"Nearest Pixel"},{value:oo.NEAREST_Y,displayText:"Nearest Y"}],this.tooltipSortChanged=new F,this.ignoreOutliersChanged=new F,this.XAxisType=Pi,this.XAxisTypeDropdownOptions=[{value:Pi.STEP,displayText:"Step"},{value:Pi.RELATIVE,displayText:"Relative"},{value:Pi.WALL_TIME,displayText:"Wall"}],this.xAxisTypeChanged=new F,this.MAX_CARD_WIDTH_SLIDER_VALUE=735,this.MIN_CARD_WIDTH_SLIDER_VALUE=335,this.cardWidthSliderChanged$=new F,this.cardWidthChanged=this.cardWidthSliderChanged$.pipe(nc(250)),this.cardWidthReset=new F,this.HistogramModeDropdownOptions=[{value:Sr.OFFSET,displayText:"Offset"},{value:Sr.OVERLAY,displayText:"Overlay"}],this.histogramModeChanged=new F,this.MAX_SMOOTHING_VALUE=.999,this.MAX_SMOOTHING_SLIDER_VALUE=.99,this.scalarSmoothingControlChanged$=new F,this.scalarSmoothing=10,this.scalarSmoothingChanged=this.scalarSmoothingControlChanged$.pipe(nc(250)),this.scalarPartitionXToggled=new F,this.imageBrightnessSliderChanged$=new F,this.imageBrightnessInMilliChanged=this.imageBrightnessSliderChanged$.pipe(nc(250)),this.imageBrightnessReset=new F,this.imageContrastSliderChanged$=new F,this.imageContrastInMilliChanged=this.imageContrastSliderChanged$.pipe(nc(250)),this.imageContrastReset=new F,this.imageShowActualSizeChanged=new F}onScalarSmoothingInput(e){let i=e.target;if(!i.value)return;let r=Math.min(Math.max(0,parseFloat(i.value)),.999);r!==parseFloat(i.value)&&(i.value=String(r)),this.scalarSmoothingControlChanged$.emit(r)}formatMilliToZeroth(e){return eO(e/1e3,this.locale||"en-US","1.0-2")}getLinkedTimeSelectionStartStep(){return this.isLinkedTimeEnabled||null===this.linkedTimeSelection||null!==this.linkedTimeSelection.end?"":this.linkedTimeSelection.start.step}isAxisTypeStep(){return this.xAxisType===Pi.STEP}}return n.\u0275fac=function(e){return new(e||n)(C(ad))},n.\u0275cmp=P({type:n,selectors:[["metrics-dashboard-settings-component"]],inputs:{isLinkedTimeEnabled:"isLinkedTimeEnabled",isScalarStepSelectorEnabled:"isScalarStepSelectorEnabled",isScalarStepSelectorRangeEnabled:"isScalarStepSelectorRangeEnabled",isScalarColumnCustomizationEnabled:"isScalarColumnCustomizationEnabled",linkedTimeSelection:"linkedTimeSelection",stepMinMax:"stepMinMax",isSlideOutMenuOpen:"isSlideOutMenuOpen",isSavingPinsEnabled:"isSavingPinsEnabled",globalPinsFeatureEnabled:"globalPinsFeatureEnabled",isImageSupportEnabled:"isImageSupportEnabled",tooltipSort:"tooltipSort",ignoreOutliers:"ignoreOutliers",xAxisType:"xAxisType",cardMinWidth:"cardMinWidth",histogramMode:"histogramMode",scalarSmoothing:"scalarSmoothing",scalarPartitionX:"scalarPartitionX",imageBrightnessInMilli:"imageBrightnessInMilli",imageContrastInMilli:"imageContrastInMilli",imageShowActualSize:"imageShowActualSize"},outputs:{linkedTimeToggled:"linkedTimeToggled",stepSelectorToggled:"stepSelectorToggled",rangeSelectionToggled:"rangeSelectionToggled",onSlideOutToggled:"onSlideOutToggled",onEnableSavingPinsToggled:"onEnableSavingPinsToggled",tooltipSortChanged:"tooltipSortChanged",ignoreOutliersChanged:"ignoreOutliersChanged",xAxisTypeChanged:"xAxisTypeChanged",cardWidthChanged:"cardWidthChanged",cardWidthReset:"cardWidthReset",histogramModeChanged:"histogramModeChanged",scalarSmoothingChanged:"scalarSmoothingChanged",scalarPartitionXToggled:"scalarPartitionXToggled",imageBrightnessInMilliChanged:"imageBrightnessInMilliChanged",imageBrightnessReset:"imageBrightnessReset",imageContrastInMilliChanged:"imageContrastInMilliChanged",imageContrastReset:"imageContrastReset",imageShowActualSizeChanged:"imageShowActualSizeChanged"},decls:57,vars:29,consts:function(){let t,e,i;return t=$localize`:A button to reset the card width setting␟ccdc96b003fbba90db7a6959b5b26e3cc58f7d80␟5223111047968102466:Reset card width`,e=$localize`:A button to reset the image brightness setting␟c482b3a47ea0975fa8be01afb3fbec9b76628bd7␟1189161857240378395:Reset brightness`,i=$localize`:A button to reset the image contrast setting␟ed712a8b927041be15252b29eb521ebb1374bad8␟5370703342923611955:Reset contrast`,[[1,"general"],[1,"section-title"],[1,"control-row","x-axis-type"],["id","x-axis-type-label",1,"control-name"],[3,"value","options","selectionChange"],[1,"control-row","scalars-step-selector",3,"title"],[3,"checked","disabled","change"],[1,"indent"],[1,"indent","range-selection"],[1,"control-row","linked-time","indent"],["mat-button","",3,"ngClass","click",4,"ngIf"],[1,"control-row","card-width"],["id","card-width-label",1,"control-name"],[1,"slider-row"],["aria-labelledby","card-width-label","color","primary",3,"max","min","step"],["matSliderThumb","",3,"value","valueChange"],["mat-icon-button","","aria-label",t,"title","Reset card width",1,"reset-button",3,"click"],["svgIcon","settings_backup_restore_24px"],["class","control-row saving-pins",4,"ngIf"],[1,"scalars"],[1,"control-row","scalars-smoothing"],["id","scalars-smoothing-label",1,"control-name"],["aria-labelledby","scalars-smoothing-label","color","primary","discrete","",3,"max","min","step"],["aria-labelledby","scalars-smoothing-label","type","number","min","0","step","0.001",1,"slider-input",3,"max","value","input"],[1,"control-row","tooltip-sort"],[1,"control-name"],[1,"control-row","scalars-ignore-outliers"],[3,"checked","change"],[1,"control-row","scalars-partition-x"],["svgIcon","help_outline_24px","title","Non-monotonic steps can occur when reusing a logdir with multiple summary writers and overlapping steps. Line charts, without this option enabled, can appear zig zagged. This is common when restarting from a checkpoint.\n\nWhen enabled, a non-monotonic time series composed of N monotonic pieces will be shown as N monotonic lines.",1,"info"],[1,"Histograms"],[1,"control-row","histogram-mode"],["class","image",4,"ngIf"],["mat-button","",3,"ngClass","click"],["svgIcon","edit_24px"],[1,"control-row","saving-pins"],[3,"isChecked","onCheckboxToggled"],[1,"image"],[1,"control-row","image-brightness"],["id","image-brightness-label",1,"control-name"],["aria-labelledby","image-brightness-label","color","primary","discrete","",3,"max","min","step","displayWith"],["mat-icon-button","","aria-label",e,"title","Reset brightness",1,"reset-button",3,"click"],[1,"control-row","image-contrast"],["id","image-constrast-label",1,"control-name"],["aria-labelledby","image-constrast-label","color","primary","discrete","",3,"max","min","step","displayWith"],["mat-icon-button","","aria-label",i,"title","Reset contrast",1,"reset-button",3,"click"],[1,"control-row","image-show-actual-size"]]},template:function(e,i){1&e&&(f(0,"section",0)(1,"h3",1),T(2,"General"),g(),f(3,"div",2)(4,"div",3),T(5,"Horizontal Axis"),g(),f(6,"tb-dropdown",4),A("selectionChange",function(o){return i.xAxisTypeChanged.emit(o)}),g()(),f(7,"div",5)(8,"mat-checkbox",6),A("change",function(){return i.stepSelectorToggled.emit()}),T(9,"Enable step selection and data table "),g(),f(10,"span",7),T(11,"(Scalars only)"),g(),f(12,"div",8)(13,"mat-checkbox",6),A("change",function(){return i.rangeSelectionToggled.emit()}),T(14,"Enable Range Selection "),g()(),f(15,"div",9)(16,"mat-checkbox",6),A("change",function(){return i.linkedTimeToggled.emit()}),T(17),g()(),S(18,w1e,3,3,"button",10),g(),f(19,"div",11)(20,"div",12),T(21,"Card Width"),g(),f(22,"div",13)(23,"mat-slider",14)(24,"input",15),A("valueChange",function(o){return i.cardWidthSliderChanged$.emit(o)}),g()(),f(25,"button",16),A("click",function(){return i.cardWidthReset.emit()}),k(26,"mat-icon",17),g()()(),S(27,S1e,2,1,"div",18),g(),f(28,"section",19)(29,"h3",1),T(30,"Scalars"),g(),f(31,"div",20)(32,"div",21),T(33,"Smoothing"),g(),f(34,"div",13)(35,"mat-slider",22)(36,"input",15),A("valueChange",function(o){return i.scalarSmoothingControlChanged$.emit(o)}),g()(),f(37,"input",23),A("input",function(o){return i.onScalarSmoothingInput(o)}),g()()(),f(38,"div",24)(39,"div",25),T(40,"Tooltip sorting method"),g(),f(41,"tb-dropdown",4),A("selectionChange",function(o){return i.tooltipSortChanged.emit(o)}),g()(),f(42,"div",26)(43,"mat-checkbox",27),A("change",function(o){return i.ignoreOutliersChanged.emit(o.checked)}),T(44,"Ignore outliers in chart scaling"),g()(),f(45,"div",28)(46,"mat-checkbox",27),A("change",function(){return i.scalarPartitionXToggled.emit()}),T(47,"Partition non-monotonic X axis"),g(),k(48,"mat-icon",29),g()(),f(49,"section",30)(50,"h3",1),T(51,"Histograms"),g(),f(52,"div",31)(53,"div",25),T(54,"Mode"),g(),f(55,"tb-dropdown",4),A("selectionChange",function(o){return i.histogramModeChanged.emit(o)}),g()()(),S(56,E1e,22,11,"section",32)),2&e&&(v(6),b("value",i.xAxisType)("options",i.XAxisTypeDropdownOptions),v(1),b("title",i.isAxisTypeStep()?"":"Only available when Horizontal Axis is set to step"),v(1),b("checked",i.isScalarStepSelectorEnabled)("disabled",!i.isAxisTypeStep()),v(5),b("checked",i.isScalarStepSelectorRangeEnabled)("disabled",!i.isAxisTypeStep()),v(3),b("checked",i.isLinkedTimeEnabled)("disabled",!i.isAxisTypeStep()),v(1),Ve("Link by step ",i.getLinkedTimeSelectionStartStep()," "),v(1),b("ngIf",i.isScalarColumnCustomizationEnabled),v(5),b("max",i.MAX_CARD_WIDTH_SLIDER_VALUE)("min",i.MIN_CARD_WIDTH_SLIDER_VALUE)("step",50),v(1),b("value",i.cardMinWidth),v(3),b("ngIf",i.globalPinsFeatureEnabled),v(8),b("max",i.MAX_SMOOTHING_SLIDER_VALUE)("min",0)("step",.01),v(1),b("value",i.scalarSmoothing),v(1),b("max",i.MAX_SMOOTHING_VALUE)("value",i.scalarSmoothing),v(4),b("value",i.tooltipSort)("options",i.TooltipSortDropdownOptions),v(2),b("checked",i.ignoreOutliers),v(3),b("checked",i.scalarPartitionX),v(9),b("value",i.histogramMode)("options",i.HistogramModeDropdownOptions),v(1),b("ngIf",i.isImageSupportEnabled))},dependencies:[wn,Ne,SQ,ki,Er,xs,bn,Ju,$u,EQ],styles:["[_nghost-%COMP%]{color:#616161;font-size:12px}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}section[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;padding:16px}body.dark-mode[_nghost-%COMP%]   section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   section[_ngcontent-%COMP%]{border-bottom:1px solid #555}.section-title[_ngcontent-%COMP%]{color:#212121;text-transform:uppercase;font-weight:500;font-size:13px;line-height:normal;margin:0 0 12px 0}body.dark-mode[_nghost-%COMP%]   .section-title[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .section-title[_ngcontent-%COMP%]{color:#fff}section[_ngcontent-%COMP%]   .control-row[_ngcontent-%COMP%]:not(:has( + .control-row[_ngcontent-%COMP%] > mat-checkbox))[_ngcontent-%COMP%]:not(:last-child){margin-bottom:12px}.control-name[_ngcontent-%COMP%]{margin-bottom:8px}.slider-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:28px}.slider-row[_ngcontent-%COMP%]   .reset-button[_ngcontent-%COMP%]{margin-left:6px}.slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{background-color:inherit;border:1px solid #8e98a3;border-radius:2px;box-sizing:border-box;color:inherit;height:100%;margin-left:12px;padding:0 4px}body.dark-mode[_nghost-%COMP%]   .slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{border-color:#425066}.scalars-smoothing[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{flex:none;width:5em}.scalars-partition-x[_ngcontent-%COMP%]{align-items:center;display:flex}.scalars-partition-x[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{height:15px;margin-left:5px;width:15px;min-width:15px}mat-checkbox[_ngcontent-%COMP%]{margin-left:-11px}mat-checkbox[_ngcontent-%COMP%]     label{color:#616161;font-size:12px;letter-spacing:normal;padding-left:0px;white-space:nowrap}body.dark-mode[_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label, body.dark-mode   [_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label{color:rgba(255,255,255,.7)}mat-slider[_ngcontent-%COMP%]{flex:1;margin-left:0px;margin-right:0px}.column-edit-menu-toggle[_ngcontent-%COMP%]{align-items:center;display:flex;cursor:pointer;font-size:inherit;height:28px;padding-left:5px;padding-right:12px}.column-edit-menu-toggle.mat-button-wrapper[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%]{background-color:#eee}body.dark-mode[_nghost-%COMP%]   .column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%]{background-color:#424242}.column-edit-menu-toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:6px}tb-dropdown[_ngcontent-%COMP%]{display:block}.control-row[_ngcontent-%COMP%]   .indent[_ngcontent-%COMP%]{margin-left:28px}"],changeDetection:0}),n})(),IQ=(()=>{class n{constructor(e,i){this.store=e,this.dialog=i,this.isScalarStepSelectorEnabled$=this.store.select(Cv),this.isScalarStepSelectorRangeEnabled$=this.store.select(Tu),this.isLinkedTimeEnabled$=this.store.select(Eu),this.isScalarColumnCustomizationEnabled$=this.store.select(uS),this.linkedTimeSelection$=this.store.select(JF),this.stepMinMax$=this.store.select(KF),this.isSlideOutMenuOpen$=this.store.select(h1),this.isImageSupportEnabled$=this.store.select(bu).pipe(Oe(Boolean),Lt(1),It(this.store.select(dS)),q(([,r])=>r)),this.tooltipSort$=this.store.select(xh),this.ignoreOutliers$=this.store.select(Ch),this.xAxisType$=this.store.select(Ol),this.cardMinWidth$=this.store.select(Jf),this.histogramMode$=this.store.select(a1),this.scalarSmoothing$=this.store.select(_d),this.scalarPartitionX$=this.store.select(s1),this.imageBrightnessInMilli$=this.store.select(l1),this.imageContrastInMilli$=this.store.select(c1),this.imageShowActualSize$=this.store.select(d1),this.isSavingPinsEnabled$=this.store.select(bd),this.globalPinsFeatureEnabled$=this.store.select(pd)}onTooltipSortChanged(e){this.store.dispatch(gT({sort:e}))}onIgnoreOutliersChanged(){this.store.dispatch(_T())}onXAxisTypeChanged(e){this.store.dispatch(bT({xAxisType:e}))}onCardWidthChanged(e){this.store.dispatch(vT({cardMinWidth:e}))}onCardWidthReset(){this.store.dispatch(yT())}onHistogramModeChanged(e){this.store.dispatch(DT({histogramMode:e}))}onScalarSmoothingChanged(e){this.store.dispatch(xT({smoothing:e}))}onScalarPartitionXToggled(){this.store.dispatch(CT())}onImageBrightnessInMilliChanged(e){this.store.dispatch(MT({brightnessInMilli:e}))}onImageBrightnessReset(){this.store.dispatch(ST())}onImageContrastReset(){this.store.dispatch(ET())}onImageContrastInMilliChanged(e){this.store.dispatch(wT({contrastInMilli:e}))}onImageShowActualSizeChanged(){this.store.dispatch(TT())}onLinkedTimeToggled(){this.store.dispatch(LT({affordance:Za.CHECK_BOX}))}onStepSelectorToggled(){this.store.dispatch(Td({affordance:Za.CHECK_BOX}))}onRangeSelectionToggled(){this.store.dispatch(BT({affordance:Za.CHECK_BOX}))}onSlideOutToggled(){this.store.dispatch(lT())}onEnableSavingPinsToggled(e){e?this.dialog.open(wQ).afterClosed().subscribe(r=>{r?.shouldDisable&&this.store.dispatch(zh())}):this.store.dispatch(zh())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(ys))},n.\u0275cmp=P({type:n,selectors:[["metrics-dashboard-settings"]],decls:21,vars:60,consts:[[3,"isImageSupportEnabled","tooltipSort","ignoreOutliers","xAxisType","cardMinWidth","histogramMode","scalarSmoothing","scalarPartitionX","imageBrightnessInMilli","imageContrastInMilli","imageShowActualSize","isScalarStepSelectorEnabled","isScalarStepSelectorRangeEnabled","isLinkedTimeEnabled","isScalarColumnCustomizationEnabled","linkedTimeSelection","stepMinMax","isSlideOutMenuOpen","isSavingPinsEnabled","globalPinsFeatureEnabled","tooltipSortChanged","ignoreOutliersChanged","xAxisTypeChanged","cardWidthChanged","cardWidthReset","histogramModeChanged","scalarSmoothingChanged","scalarPartitionXToggled","imageBrightnessInMilliChanged","imageBrightnessReset","imageContrastInMilliChanged","imageContrastReset","imageShowActualSizeChanged","linkedTimeToggled","stepSelectorToggled","rangeSelectionToggled","onSlideOutToggled","onEnableSavingPinsToggled"]],template:function(e,i){1&e&&(f(0,"metrics-dashboard-settings-component",0),A("tooltipSortChanged",function(o){return i.onTooltipSortChanged(o)})("ignoreOutliersChanged",function(){return i.onIgnoreOutliersChanged()})("xAxisTypeChanged",function(o){return i.onXAxisTypeChanged(o)})("cardWidthChanged",function(o){return i.onCardWidthChanged(o)})("cardWidthReset",function(){return i.onCardWidthReset()})("histogramModeChanged",function(o){return i.onHistogramModeChanged(o)})("scalarSmoothingChanged",function(o){return i.onScalarSmoothingChanged(o)})("scalarPartitionXToggled",function(){return i.onScalarPartitionXToggled()})("imageBrightnessInMilliChanged",function(o){return i.onImageBrightnessInMilliChanged(o)})("imageBrightnessReset",function(){return i.onImageBrightnessReset()})("imageContrastInMilliChanged",function(o){return i.onImageContrastInMilliChanged(o)})("imageContrastReset",function(){return i.onImageContrastReset()})("imageShowActualSizeChanged",function(){return i.onImageShowActualSizeChanged()})("linkedTimeToggled",function(){return i.onLinkedTimeToggled()})("stepSelectorToggled",function(){return i.onStepSelectorToggled()})("rangeSelectionToggled",function(){return i.onRangeSelectionToggled()})("onSlideOutToggled",function(){return i.onSlideOutToggled()})("onEnableSavingPinsToggled",function(o){return i.onEnableSavingPinsToggled(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),U(10,"async"),U(11,"async"),U(12,"async"),U(13,"async"),U(14,"async"),U(15,"async"),U(16,"async"),U(17,"async"),U(18,"async"),U(19,"async"),U(20,"async"),g()),2&e&&b("isImageSupportEnabled",G(1,20,i.isImageSupportEnabled$))("tooltipSort",G(2,22,i.tooltipSort$))("ignoreOutliers",G(3,24,i.ignoreOutliers$))("xAxisType",G(4,26,i.xAxisType$))("cardMinWidth",G(5,28,i.cardMinWidth$))("histogramMode",G(6,30,i.histogramMode$))("scalarSmoothing",G(7,32,i.scalarSmoothing$))("scalarPartitionX",G(8,34,i.scalarPartitionX$))("imageBrightnessInMilli",G(9,36,i.imageBrightnessInMilli$))("imageContrastInMilli",G(10,38,i.imageContrastInMilli$))("imageShowActualSize",G(11,40,i.imageShowActualSize$))("isScalarStepSelectorEnabled",G(12,42,i.isScalarStepSelectorEnabled$))("isScalarStepSelectorRangeEnabled",G(13,44,i.isScalarStepSelectorRangeEnabled$))("isLinkedTimeEnabled",G(14,46,i.isLinkedTimeEnabled$))("isScalarColumnCustomizationEnabled",G(15,48,i.isScalarColumnCustomizationEnabled$))("linkedTimeSelection",G(16,50,i.linkedTimeSelection$))("stepMinMax",G(17,52,i.stepMinMax$))("isSlideOutMenuOpen",G(18,54,i.isSlideOutMenuOpen$))("isSavingPinsEnabled",G(19,56,i.isSavingPinsEnabled$))("globalPinsFeatureEnabled",G(20,58,i.globalPinsFeatureEnabled$))},dependencies:[DQ,ct],encapsulation:2,changeDetection:0}),n})(),AQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-dashboard-right-pane"]],decls:1,vars:0,template:function(e,i){1&e&&k(0,"metrics-dashboard-settings")},dependencies:[IQ],encapsulation:2,changeDetection:0}),n})(),k1e=["tooltip"],kQ=new te("mat-tooltip-scroll-strategy"),N1e={provide:kQ,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},B1e=new te("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),RQ="tooltip-panel",PQ=za({passive:!0}),G1e=(()=>{class n{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=vt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=mi(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=mi(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(e,i,r,o,a,s,l,c,d,u,p,h){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=o,this._ngZone=a,this._platform=s,this._ariaDescriber=l,this._focusMonitor=c,this._dir=u,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Ee,this._scrollStrategy=d,this._document=h,p&&(p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),u.change.pipe(it(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(it(this._destroyed)).subscribe(e=>{e?"keyboard"===e&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{e.removeEventListener(i,r,PQ)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();let r=this._createOverlay(i);this._detach(),this._portal=this._portal||new Ll(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(it(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof xe)return this._overlayRef;this._detach()}let i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&e||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(it(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${RQ}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(it(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(it(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(it(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&27===o.keyCode&&!Or(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let i=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...o.main}),this._addOffset({...r.fallback,...o.fallback})])}_addOffset(e){return e}_getOrigin(){let r,e=!this._dir||"ltr"==this._dir.value,i=this.position;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={originX:"end",originY:"center"});let{x:o,y:a}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:a}}}_getOverlayPosition(){let r,e=!this._dir||"ltr"==this._dir.value,i=this.position;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:o,y:a}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Lt(1),it(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){let a,{overlayY:i,originX:r,originY:o}=e;if(a="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===o?"above":"below",a!==this._currentPosition){let s=this._overlayRef;if(s){let l=`${this._cssClassPrefix}-${RQ}-`;s.removePanelClass(l+this._currentPosition),s.addPanelClass(l+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==e.x&&void 0!==e.y&&(i=e),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let i=e.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{let r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();let i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,PQ)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let i=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if("off"!==e){let i=this._elementRef.nativeElement,r=i.style;("on"===e||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(e){cs()},n.\u0275dir=Me({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),GT=(()=>{class n extends G1e{constructor(e,i,r,o,a,s,l,c,d,u,p,h){super(e,i,r,o,a,s,l,c,d,u,p,h),this._tooltipComponent=q1e,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(e){let r=!this._dir||"ltr"==this._dir.value;return"top"===e.originY?e.offsetY=-8:"bottom"===e.originY?e.offsetY=8:"start"===e.originX?e.offsetX=r?-8:8:"end"===e.originX&&(e.offsetX=r?8:-8),e}}return n.\u0275fac=function(e){return new(e||n)(C(Oi),C(xe),C(Lu),C(ei),C(ot),C(Vn),C(T7),C(fo),C(kQ),C(zi,8),C(B1e,8),C(Nt))},n.\u0275dir=Me({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[Xe]}),n})(),W1e=(()=>{class n{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ee,this._animationsDisabled="NoopAnimations"===i}show(e){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let i=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(i.classList.remove(e?o:r),i.classList.add(e?r:o),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){let a=getComputedStyle(i);("0s"===a.getPropertyValue("animation-duration")||"none"===a.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(pi,8))},n.\u0275dir=Me({type:n}),n})(),q1e=(()=>{class n extends W1e{constructor(e,i,r){super(e,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>24&&e.width>=200}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(xe),C(pi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&Ue(k1e,7),2&e){let r;be(r=ve())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&A("mouseleave",function(o){return i._handleMouseLeave(o)}),2&e&&Bt("zoom",i.isVisible()?1:null)},features:[Xe],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(e,i){1&e&&(f(0,"div",0,1),A("animationend",function(o){return i._handleAnimationEnd(o)}),f(2,"div",2),T(3),g()()),2&e&&(nt("mdc-tooltip--multiline",i._isMultiline),b("ngClass",i.tooltipClass),v(3),kt(i.message))},dependencies:[wn],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),Xg=(fr("state",[Si("initial, void, hidden",rn({opacity:0,transform:"scale(0.8)"})),Si("visible",rn({transform:"scale(1)"})),bi("* => visible",Mi("150ms cubic-bezier(0, 0, 0.2, 1)")),bi("* => hidden",Mi("75ms cubic-bezier(0.4, 0, 1, 1)"))]),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[N1e],imports:[pg,De,Do,dn,dn,Ic]}),n})());function X1e(n,t){1&n&&k(0,"mat-icon",4)}function Y1e(n,t){1&n&&k(0,"mat-icon",4)}function Q1e(n,t){1&n&&k(0,"mat-icon",4)}function Z1e(n,t){1&n&&k(0,"div",5)}var K1e=function(){return{sensitivity:"accent"}},WT=(()=>{class n{constructor(){this.ColumnHeaderType=gt}getSpecialTypeClasses(e){switch(e){case gt.STEP_AT_MIN:return"step-at-min";case gt.STEP_AT_MAX:return"step-at-max";default:return""}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-header"]],inputs:{header:"header"},decls:7,vars:9,consts:[[1,"header-container",3,"ngSwitch"],["svgIcon","change_history_24px",4,"ngSwitchCase"],["class","extra-right-padding",4,"ngSwitchDefault"],[3,"ngClass","matTooltip","matTooltipDisabled"],["svgIcon","change_history_24px"],[1,"extra-right-padding"]],template:function(e,i){1&e&&(f(0,"div",0),S(1,X1e,1,0,"mat-icon",1),S(2,Y1e,1,0,"mat-icon",1),S(3,Q1e,1,0,"mat-icon",1),S(4,Z1e,1,0,"div",2),f(5,"span",3),T(6),g()()),2&e&&(b("ngSwitch",i.header.type),v(1),b("ngSwitchCase",i.ColumnHeaderType.VALUE_CHANGE),v(1),b("ngSwitchCase",i.ColumnHeaderType.PERCENTAGE_CHANGE),v(1),b("ngSwitchCase",i.ColumnHeaderType.RAW_CHANGE),v(2),b("ngClass",i.getSpecialTypeClasses(i.header.type))("matTooltip",i.header.name)("matTooltipDisabled",0===i.header.name.localeCompare(i.header.displayName,void 0,mc(8,K1e))),v(1),kt(i.header.displayName))},dependencies:[wn,mr,kr,du,bn,GT],styles:[".header-container[_ngcontent-%COMP%]{align-items:center;display:flex}.extra-right-padding[_ngcontent-%COMP%]{padding-right:1px}mat-icon[_ngcontent-%COMP%]{height:12px;width:12px;min-width:12px;line-height:12px}.step-at-min[_ngcontent-%COMP%]{min-width:37px}.step-at-max[_ngcontent-%COMP%]{min-width:40px}"],changeDetection:0}),n})();function J1e(n,t){if(1&n){let e=Te();f(0,"div",8),A("dragstart",function(){let o=ne(e).$implicit;return ie(w(2).dragStart(o))})("dragend",function(){ne(e);let r=w().dataTableMode;return ie(w().dragEnd(r))})("dragenter",function(){let o=ne(e).$implicit,a=w().dataTableMode;return ie(w().dragEnter(o,a))}),f(1,"mat-checkbox",9),A("change",function(){let o=ne(e).$implicit,a=w().dataTableMode;return ie(w().toggleHeader(o,a))}),k(2,"tb-data-table-header",10),g()()}if(2&n){let e=t.$implicit;b("ngClass",w(2).getHighlightClasses(e)),v(1),b("checked",e.enabled),v(1),b("header",e)}}function $1e(n,t){1&n&&S(0,J1e,3,3,"div",7),2&n&&b("ngForOf",t.headers)}var NQ=function(n,t){return{headers:n,dataTableMode:t}},IN=n=>{n.preventDefault()},LQ=(n,t)=>t.findIndex(e=>e.name===n.name),Dd=(()=>(function(n){n[n.TOP=0]="TOP",n[n.BOTTOM=1]="BOTTOM"}(Dd||(Dd={})),Dd))(),BQ=(()=>{class n{constructor(e){this.hostElement=e,this.DataTableMode=Wr,this.highlightEdge=Dd.TOP,this.onScalarTableColumnEdit=new F,this.onScalarTableColumnToggled=new F,this.onScalarTableColumnEditorClosed=new F,this.onTabChange=new F}ngOnDestroy(){this.hostElement.nativeElement.removeEventListener("dragover",IN)}tabChange(e){this.onTabChange.emit(0===e.index?Wr.SINGLE:Wr.RANGE)}dragStart(e){this.draggingHeader=e,this.hostElement.nativeElement.addEventListener("dragover",IN)}dragEnd(e){if(!this.draggingHeader||!this.highlightedHeader)return;this.getHeadersForMode(e);let r={...this.draggingHeader},o={...this.highlightedHeader};r&&o&&r.name!==o.name&&this.onScalarTableColumnEdit.emit({source:r,destination:o,side:this.highlightEdge===Dd.TOP?mo.LEFT:mo.RIGHT,dataTableMode:e}),this.draggingHeader=void 0,this.highlightedHeader=void 0,this.hostElement.nativeElement.removeEventListener("dragover",IN)}dragEnter(e,i){if(!this.draggingHeader)return;let r=this.getHeadersForMode(i);this.highlightEdge=LQ(e,r)<LQ(this.draggingHeader,r)?Dd.TOP:Dd.BOTTOM,this.highlightedHeader=e}toggleHeader(e,i){this.onScalarTableColumnToggled.emit({dataTableMode:i,header:e})}getHighlightClasses(e){return e.name!==this.highlightedHeader?.name?{}:{highlighted:!0,"highlight-top":this.highlightEdge===Dd.TOP,"highlight-bottom":this.highlightEdge===Dd.BOTTOM}}getSelectedTabIndex(){return this.selectedTab===Wr.SINGLE?0:1}getHeadersForMode(e){return e===Wr.SINGLE?this.singleHeaders:this.rangeHeaders}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275cmp=P({type:n,selectors:[["metrics-scalar-column-editor-component"]],inputs:{rangeHeaders:"rangeHeaders",singleHeaders:"singleHeaders",selectedTab:"selectedTab"},outputs:{onScalarTableColumnEdit:"onScalarTableColumnEdit",onScalarTableColumnToggled:"onScalarTableColumnToggled",onScalarTableColumnEditorClosed:"onScalarTableColumnEditorClosed",onTabChange:"onTabChange"},decls:11,vars:13,consts:function(){let t;return t=$localize`:Label on a button to close the column editor.␟cb616ce9b4327b41e6bdb9344669ba7c72e2c70e␟7205635764713034842:Close column editor`,[[1,"editor-controls"],[1,"tab-group",3,"selectedIndex","selectedTabChange"],[3,"label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],["mat-button","","aria-label",t,1,"close-button",3,"click"],["headerList",""],["class","header-list-item","draggable","true",3,"ngClass","dragstart","dragend","dragenter",4,"ngFor","ngForOf"],["draggable","true",1,"header-list-item",3,"ngClass","dragstart","dragend","dragenter"],[3,"checked","change"],[3,"header"]]},template:function(e,i){if(1&e&&(f(0,"div",0)(1,"mat-tab-group",1),A("selectedTabChange",function(o){return i.tabChange(o)}),f(2,"mat-tab",2),hi(3,3),g(),f(4,"mat-tab",2),hi(5,3),g()()(),f(6,"div",4)(7,"button",5),A("click",function(){return i.onScalarTableColumnEditorClosed.emit()}),T(8," Close "),g()(),S(9,$1e,1,1,"ng-template",null,6,jt)),2&e){let r=st(10);v(1),b("selectedIndex",i.getSelectedTabIndex()),v(1),b("label","Single"),v(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",So(7,NQ,i.singleHeaders,i.DataTableMode.SINGLE)),v(1),b("label","Range"),v(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",So(10,NQ,i.rangeHeaders,i.DataTableMode.RANGE))}},dependencies:[wn,nn,eo,WT,xs,ay,vE,ki],styles:["[_nghost-%COMP%]     .mat-tab-label{min-width:0;padding:0 30px}.editor-controls[_ngcontent-%COMP%]{height:calc(100% - 45px)}.tab-group[_ngcontent-%COMP%]{position:relative;z-index:0;height:100%}.header-list-item[_ngcontent-%COMP%]{padding:3px;height:24px}.highlighted[_ngcontent-%COMP%]{background-color:#eee}.highlight-bottom[_ngcontent-%COMP%]{border-bottom:2px solid #ff9800}.highlight-top[_ngcontent-%COMP%]{border-top:2px solid #ff9800}.footer[_ngcontent-%COMP%]{display:flex;position:absolute;left:0;bottom:0;box-sizing:border-box;width:100%;align-items:center;justify-content:flex-end;padding:4px;border-top:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .footer[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .footer[_ngcontent-%COMP%]{border-color:#555}.close-button[_ngcontent-%COMP%]{color:#616161;width:84px}body.dark-mode[_nghost-%COMP%]   .close-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .close-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}  .mat-mdc-tab-body-wrapper{flex:1}"],changeDetection:0}),n})();function VQ(n){return n.filter(t=>"RUN"!==t.type)}var HQ=(()=>{class n{constructor(e){this.store=e,this.singleHeaders$=this.store.select(Mv).pipe(q(VQ)),this.rangeHeaders$=this.store.select(wv).pipe(q(VQ)),this.selectedTab$=this.store.select(LW)}onScalarTableColumnToggled(e){this.store.dispatch(Gg(e))}onScalarTableColumnEdit(e){this.store.dispatch(jg(e))}onScalarTableColumnEditorClosed(){this.store.dispatch(uT())}onTabChange(e){this.store.dispatch(dT({tab:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-scalar-column-editor"]],decls:4,vars:9,consts:[[3,"singleHeaders","rangeHeaders","selectedTab","onScalarTableColumnToggled","onScalarTableColumnEdit","onScalarTableColumnEditorClosed","onTabChange"]],template:function(e,i){1&e&&(f(0,"metrics-scalar-column-editor-component",0),A("onScalarTableColumnToggled",function(o){return i.onScalarTableColumnToggled(o)})("onScalarTableColumnEdit",function(o){return i.onScalarTableColumnEdit(o)})("onScalarTableColumnEditorClosed",function(){return i.onScalarTableColumnEditorClosed()})("onTabChange",function(o){return i.onTabChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("singleHeaders",G(1,3,i.singleHeaders$))("rangeHeaders",G(2,5,i.rangeHeaders$))("selectedTab",G(3,7,i.selectedTab$))},dependencies:[BQ,ct],encapsulation:2,changeDetection:0}),n})(),Yg=(()=>(function(n){n[n.ORIGINAL=0]="ORIGINAL",n[n.DERIVED=1]="DERIVED"}(Yg||(Yg={})),Yg))(),nEe=W(DW,Ru,(n,t)=>new Set(Object.entries(n.scalars.tagToRuns).filter(([,e])=>!t||!t.size||e.some(i=>t?.get(i))).map(([e])=>e))),iEe=W(o1,Ru,NW,nEe,(n,t,e,i)=>{let r=Array.from(t?.values()||[]).some(Boolean);return n.filter(o=>gs(o.plugin)?Boolean(t&&t.get(o.runId)):!e||!r||o.plugin!==An.SCALARS||i.has(o.tag))}),jh=W(iEe,n=>n.sort((t,e)=>vy(t.tag,e.tag))),qT={filterRunItemsByRegex:(n,t,e)=>t?n.filter(i=>S1({runName:i.run.name,experimentAlias:i.experimentAlias},t,e)):n,matchFilter:(n,t)=>void 0===t?n.includeUndefined:n.type===io.DISCRETE?n.filterValues.includes(t):n.type===io.INTERVAL&&"number"==typeof t&&n.filterLowerValue<=t&&t<=n.filterUpperValue,filterRunItemsByHparamAndMetricFilter:(n,t,e)=>n.filter(({hparams:i,metrics:r})=>{let o=[...t.entries()].every(([s,l])=>{let c=i.get(s);return qT.matchFilter(l,c)}),a=[...e.entries()].every(([s,l])=>{let c=r.get(s);return qT.matchFilter(l,c)});return o&&a})},XT=W(RF,IS,AS,(n,t,e)=>new Map([...n,...t,...e])),rEe=W(v1,yu,Ru,Pu,qs,(n,t,e,i,r)=>n.map(o=>{let a=new Map;(o.hparams||[]).forEach(l=>{a.set(l.name,l.value)});let s=new Map;return(o.metrics||[]).forEach(l=>{s.set(l.tag,l.value)}),{run:o,experimentName:t[o.experimentId]||"",experimentAlias:r[o.experimentId],selected:Boolean(e&&e.get(o.id)),runColor:i[o.id],hparams:a,metrics:s}})),AN=W(Au,rEe,IS,AS,Ws,(n,t,e,i,r)=>{let o=qT.filterRunItemsByRegex(t,n,r===Cn.COMPARE_EXPERIMENT);return qT.filterRunItemsByHparamAndMetricFilter(o,e,i)}),zQ=W(AN,n=>new Set(n.map(({run:{id:t}})=>t))),UQ=W(DS,or,(n,t)=>t?n.map(e=>({type:gt.HPARAM,name:e.name,displayName:e.displayName||e.name,enabled:!1,tags:e.differs?["differs"]:[],removable:!0,sortable:!0,movable:!0,filterable:!0})):[]),YT=W(UQ,md,(n,t)=>{let e=new Set(t.map(({name:i})=>i));return n.filter(i=>!e.has(i.name))}),Qg=(_s(n=>W(e2(n),UQ,(t,e)=>[...t,...e])),(()=>{class n{constructor(e,i){this.ref=e,this.cdkScrollable=i,this.onVisibilityChange=new F,this.ngUnsubscribe$=new Ee,this.onEvent$=new Ee}ngOnInit(){let e={root:this.cdkScrollable?this.cdkScrollable.getElementRef().nativeElement:null};this.intersectionObserverMargin&&(e.rootMargin=this.intersectionObserverMargin);let i=new IntersectionObserver(r=>{this.onEvent$.next(r)},e);i.observe(this.ref.nativeElement),this.ngUnsubscribe$.subscribe(()=>{i.unobserve(this.ref.nativeElement)}),this.onEvent$.pipe(it(this.ngUnsubscribe$)).subscribe(r=>{let o=r.slice(-1)[0];this.onVisibilityChange.emit({visible:o.isIntersecting})})}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}waitForEventForTestOnly(){return new Promise(e=>this.onEvent$.pipe(Lt(1)).subscribe(()=>{e()}))}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(xd,8))},n.\u0275dir=Me({type:n,selectors:[["","observeIntersection",""]],inputs:{intersectionObserverMargin:"intersectionObserverMargin"},outputs:{onVisibilityChange:"onVisibilityChange"}}),n})()),jQ="/scalar_summary";function Zg(n,t){let e=n;return t&&n.startsWith(t+"/")&&(e=n.slice(t.length+1)),e.endsWith(jQ)&&(e=e.slice(0,-jQ.length)),e||n}var QT=(()=>{class n{constructor(e,i){this.store=e,this.changeDetectorRef=i,this.hrefAttr=void 0,this.srcAttr=void 0,this.includeFeatureFlags=!0}getUrlWithFeatureFlags(e){return this.store.select(Hf).pipe(q(i=>{if(Object.keys(i).length>0){let r=new URLSearchParams([["tensorBoardFeatureFlags",JSON.stringify(i)]]),o=e.includes("?")?"&":"?";return e+o+String(r)}return e}))}set href(e){e&&AC(this.getUrlWithFeatureFlags(e)).then(i=>{this.hrefAttr=i,this.changeDetectorRef.detectChanges()})}set src(e){e&&AC(this.getUrlWithFeatureFlags(e)).then(i=>{this.srcAttr=i,this.changeDetectorRef.detectChanges()})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(Qt))},n.\u0275dir=Me({type:n,selectors:[["a","includeFeatureFlags",""],["img","includeFeatureFlags",""]],hostVars:2,hostBindings:function(e,i){2&e&&Be("href",i.hrefAttr,Vs)("src",i.srcAttr,Vs)},inputs:{includeFeatureFlags:"includeFeatureFlags",href:"href",src:"src"}}),n})(),oEe=["measurer"],aEe=["input"],WQ=(()=>{class n{constructor(e){this.changeDetector=e,this.placeholder="",this.style="default",this.patternRegex=new RegExp(".*"),this.isValid=!0,this.onValueChange=new F,this.blur=new F,this.focus=new F,this.keydown=new F,this.keyup=new F,this.internalValue="",this.fontChangeListener=this.updateInputWidth.bind(this)}ngOnInit(){document.fonts&&document.fonts.addEventListener("loadingdone",this.fontChangeListener)}ngOnDestroy(){document.fonts&&document.fonts.removeEventListener("loadingdone",this.fontChangeListener)}ngOnChanges(e){e.pattern&&(this.patternRegex=new RegExp(this.pattern??"")),e.value&&(this.internalValue=this.value),this.isValid=this.patternRegex.test(this.internalValue)}ngAfterViewChecked(){this.updateInputWidth()}onInput(e){let i=this.internalValue;this.internalValue=this.inputElRef.nativeElement.value,this.internalValue!==i&&(this.isValid=this.patternRegex.test(this.internalValue),this.changeDetector.markForCheck()),this.onValueChange.emit({value:this.internalValue})}updateInputWidth(){let{width:e}=this.measurerElRef.nativeElement.getBoundingClientRect();this.inputElRef.nativeElement.style.width=`${e}px`}}return n.\u0275fac=function(e){return new(e||n)(C(Qt))},n.\u0275cmp=P({type:n,selectors:[["content-wrapping-input"]],viewQuery:function(e,i){if(1&e&&(Ue(oEe,7,xe),Ue(aEe,7,xe)),2&e){let r;be(r=ve())&&(i.measurerElRef=r.first),be(r=ve())&&(i.inputElRef=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Xo(i.style)},inputs:{value:"value",placeholder:"placeholder",style:"style",pattern:"pattern"},outputs:{onValueChange:"onValueChange",blur:"blur",focus:"focus",keydown:"keydown",keyup:"keyup"},features:[qt],decls:6,vars:7,consts:[["aria-hidden","true",1,"measurer"],["measurer",""],["autocomplete","off","spellcheck","false","type","text",3,"value","placeholder","blur","focus","input","keydown","keyup"],["input",""]],template:function(e,i){1&e&&(f(0,"span")(1,"span",0,1),T(3),g(),f(4,"input",2,3),A("blur",function(o){return i.blur.emit(o)})("focus",function(o){return i.focus.emit(o)})("input",function(o){return i.onInput(o)})("keydown",function(o){return i.keydown.emit(o)})("keyup",function(o){return i.keyup.emit(o)}),g()()),2&e&&(nt("container",!0)("is-valid",i.isValid),v(3),kt(i.internalValue||i.placeholder),v(1),b("value",i.value)("placeholder",i.placeholder))},styles:["[_nghost-%COMP%]{display:inline-flex;width:max-content}[_nghost-%COMP%]:focus-within   .container[_ngcontent-%COMP%]{border-color:#f57c00}.default[_nghost-%COMP%]:hover   .container[_ngcontent-%COMP%]{border-color:#ebebeb}.error[_nghost-%COMP%]   .container[_ngcontent-%COMP%], [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid){border-color:#ef9a9a}.error[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:hover, .error[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:focus-within, [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid):hover, [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid):focus-within{border-color:#ef9a9a}.high-contrast[_nghost-%COMP%]   .container[_ngcontent-%COMP%]{border-color:#bdbdbd}.high-contrast[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:hover{border-color:#757575}.container[_ngcontent-%COMP%]{border-radius:4px;border:2px solid rgba(0,0,0,0);padding:1px 2px;position:relative}.measurer[_ngcontent-%COMP%]{pointer-events:none;position:absolute;visibility:hidden}.measurer[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-family:inherit;font-size:inherit;line-height:1.4;padding:0;white-space:pre}.measurer[_ngcontent-%COMP%]:empty, input[_ngcontent-%COMP%]:empty{width:2ch}input[_ngcontent-%COMP%]{appearance:none;background-color:inherit;border:0;color:inherit;display:inline-block;font-family:inherit;outline:0}input[_ngcontent-%COMP%]:focus{padding-right:1ch}"],changeDetection:0}),n})();function lEe(n,t){if(1&n){let e=Te();f(0,"content-wrapping-input",3),A("onValueChange",function(r){return ne(e),ie(w().aliasChanged.emit(r))}),g()}if(2&n){let e=w();Hs(e.isAliasNameLegal?"high-contrast":"error"),b("value",e.alias.aliasText)}}function cEe(n,t){if(1&n&&(f(0,"span",4),T(1),g()),2&n){let e=w();nt("illegal",!e.isAliasNameLegal),b("title",e.title),v(1),kt(e.alias.aliasText)}}var Kg=(()=>{class n{constructor(){this.isAliasNameLegal=!0,this.aliasChanged=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-experiment-alias"]],inputs:{alias:"alias",aliasEditable:"aliasEditable",title:"title",isAliasNameLegal:"isAliasNameLegal"},outputs:{aliasChanged:"aliasChanged"},decls:5,vars:3,consts:[[1,"alias-number"],["placeholder","Alias for experiment",3,"style","value","onValueChange",4,"ngIf","ngIfElse"],["noEditAliasName",""],["placeholder","Alias for experiment",3,"value","onValueChange"],[3,"title"]],template:function(e,i){if(1&e&&(f(0,"span",0),T(1),g(),S(2,lEe,1,3,"content-wrapping-input",1),S(3,cEe,2,4,"ng-template",null,2,jt)),2&e){let r=st(4);v(1),kt(i.alias.aliasNumber),v(1),b("ngIf",i.aliasEditable)("ngIfElse",r)}},dependencies:[Ne,WQ],styles:[".alias-number[_ngcontent-%COMP%]{background-color:#e0e0e0;border:1px solid #ebebeb;color:#212121;border-radius:2px;margin-right:2px;padding:0 2px}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{background-color:#616161}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%]{display:inline-flex;align-items:baseline}"]}),n})();function dEe(n,t){1&n&&k(0,"tb-experiment-alias",2),2&n&&b("alias",w().experimentAlias)}function uEe(n,t){1&n&&(f(0,"span"),T(1,"/"),g())}var qQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["card-run-name-component"]],inputs:{name:"name",experimentAlias:"experimentAlias"},decls:4,vars:3,consts:[[3,"alias",4,"ngIf"],[4,"ngIf"],[3,"alias"]],template:function(e,i){1&e&&(S(0,dEe,1,1,"tb-experiment-alias",0),S(1,uEe,2,0,"span",1),f(2,"span"),T(3),g()),2&e&&(b("ngIf",null!=i.experimentAlias),v(1),b("ngIf",null!=i.experimentAlias),v(2),kt(i.name))},dependencies:[Ne,Kg],styles:["[_nghost-%COMP%]{color:#616161}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),ZT=(()=>{class n{constructor(e){this.store=e}ngOnInit(){this.name$=In([this.store.select(b1,{runId:this.runId})]).pipe(q(([e])=>function(n,t,e){if(!t)return n;let i=t?.name??"...";return i}(this.runId,e))),this.experimentAlias$=In([this.store.select(_1,{runId:this.runId}),this.store.select(qs)]).pipe(q(([e,i])=>e?i[e]:null))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["card-run-name"]],inputs:{runId:"runId"},decls:4,vars:9,consts:[[3,"name","experimentAlias"]],template:function(e,i){1&e&&(k(0,"card-run-name-component",0),U(1,"async"),U(2,"async"),U(3,"async")),2&e&&(b("name",G(1,3,i.name$))("experimentAlias",G(3,7,i.experimentAlias$)),Be("title",G(2,5,i.name$)))},dependencies:[qQ,ct],encapsulation:2,changeDetection:0}),n})();function hEe(n,t){if(1&n&&(f(0,"span",2),T(1),g()),2&n){let e=w();v(1),kt(e.firstTextPart())}}var Jg=(()=>{class n{parseValue(){let e=this.value.lastIndexOf("/");return-1===e?{first:"",second:this.value}:{first:this.value.slice(0,e),second:this.value.slice(e)}}firstTextPart(){return this.parseValue().first}secondTextPart(){return this.parseValue().second}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-truncated-path"]],inputs:{value:"value"},decls:3,vars:2,consts:[["class","first-text-part",4,"ngIf"],[1,"second-text-part"],[1,"first-text-part"]],template:function(e,i){1&e&&(S(0,hEe,2,1,"span",0),f(1,"span",1),T(2),g()),2&e&&(b("ngIf",i.firstTextPart().length>0),v(2),kt(i.secondTextPart()))},dependencies:[Ne],styles:["[_nghost-%COMP%]{display:inline-flex;white-space:nowrap}.first-text-part[_ngcontent-%COMP%]{flex:1 1 4ch;max-width:max-content}.first-text-part[_ngcontent-%COMP%], .second-text-part[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"]}),n})();function mEe(n,t){1&n&&k(0,"mat-icon",2)}function fEe(n,t){1&n&&k(0,"mat-icon",3)}var $g=(()=>{class n{constructor(){this.isClipped=!1,this.isClosestStepHighlighted=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["vis-linked-time-selection-warning"]],inputs:{isClipped:"isClipped",isClosestStepHighlighted:"isClosestStepHighlighted"},decls:2,vars:2,consts:[["data-value","clipped","svgIcon","info_outline_24px","title","Linked step is not found in this visualization. We highlighted the closest step for you.",4,"ngIf"],["data-value","closestStepHighlighted","svgIcon","info_outline_24px","title","Data is not found on selected step. We highlighted the closest step for you.",4,"ngIf"],["data-value","clipped","svgIcon","info_outline_24px","title","Linked step is not found in this visualization. We highlighted the closest step for you."],["data-value","closestStepHighlighted","svgIcon","info_outline_24px","title","Data is not found on selected step. We highlighted the closest step for you."]],template:function(e,i){1&e&&(S(0,mEe,1,0,"mat-icon",0),S(1,fEe,1,0,"mat-icon",1)),2&e&&(b("ngIf",i.isClipped),v(1),b("ngIf",i.isClosestStepHighlighted))},dependencies:[Ne,bn],styles:["[_nghost-%COMP%]{color:#d32f2f;height:1em;line-height:0;display:inline-flex}body.dark-mode   [_nghost-%COMP%]{color:#d32f2f}[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:100%;width:100%}"],changeDetection:0}),n})();function gEe(n,t){if(1&n&&(f(0,"span",19),T(1),U(2,"number"),g()),2&n){let e=w();v(1),Ve("Step ",G(2,1,e.steps[e.stepIndex]),"")}}function _Ee(n,t){if(1&n&&(f(0,"span",20),T(1),U(2,"number"),U(3,"number"),g()),2&n){let e=w();v(1),lu("Sample ",G(2,2,e.sample+1),"/",G(3,4,e.numSample),"")}}function bEe(n,t){1&n&&k(0,"mat-spinner",21)}function vEe(n,t){if(1&n&&k(0,"div",30),2&n){let e=t.$implicit,i=w(3);Bt("left",i.getLinkedTimeTickLeftStyle(e))("margin-left",i.getLinkedTimeTickMarginLeftStyle(e))}}function yEe(n,t){if(1&n&&(f(0,"div",28),S(1,vEe,1,4,"div",29),g()),2&n){let e=w(2);v(1),b("ngForOf",e.selectedSteps)}}var xEe=function(n){return{filter:n}};function CEe(n,t){if(1&n){let e=Te();Gt(0),f(1,"div",22)(2,"mat-slider",23)(3,"input",24),A("valueChange",function(r){return ne(e),ie(w().onSliderInput(r))}),g()(),S(4,yEe,2,1,"div",25),g(),f(5,"div",26),k(6,"img",27),g(),Wt()}if(2&n){let e=w();v(2),b("disabled",e.steps.length<=1)("min",0)("max",e.steps.length-1)("step",1),v(1),b("value",e.stepIndex),v(1),b("ngIf",e.linkedTimeSelection),v(2),_b("alt","Image at step ",e.steps[e.stepIndex],""),Zi("src",e.imageUrl,Vs),b("ngStyle",Un(9,xEe,e.cssFilter()))}}function MEe(n,t){1&n&&(f(0,"div",32),T(1," Data failed to load. "),g())}function wEe(n,t){if(1&n&&S(0,MEe,2,0,"div",31),2&n){let e=w();b("ngIf",e.loadState===e.DataLoadState.FAILED)}}var SEe=function(n){return{backgroundColor:n}},YQ=(()=>{class n{constructor(){this.DataLoadState=Re,this.sliderStartPosition="",this.sliderTrackWidth="",this.linkedTimeSelection=null,this.isClosestStepHighlighted=!1,this.onActualSizeToggle=new F,this.stepIndexChange=new F,this.onPinClicked=new F}cssFilter(){return`contrast(${this.contrastInMilli/10}%) brightness(${this.brightnessInMilli/1e3})`}onSliderInput(e){this.stepIndexChange.emit(e)}changeDistinct(e){return e.currentValue!==e.previousValue}ngOnChanges(e){(e.selectedSteps&&this.changeDistinct(e.selectedSteps)||e.linkedTimeSelection&&this.changeDistinct(e.linkedTimeSelection))&&this.renderRangeSlider()}renderRangeSlider(){if(!this.linkedTimeSelection||!this.linkedTimeSelection.endStep)return;let e=this.steps.length-1,i=this.linkedTimeSelection.startStep<this.steps[0]?this.steps[0]:this.linkedTimeSelection.startStep,r=this.linkedTimeSelection.endStep>this.steps[e]?this.steps[e]:this.linkedTimeSelection.endStep,{startPosition:o,width:a}=this.getTrackStartPositionAndWidth(i,r,e);this.sliderStartPosition=100*o+"%",this.sliderTrackWidth=100*a+"%"}getTrackStartPositionAndWidth(e,i,r){let o=1/r,a=0,s=0,l=0;for(;l<this.steps.length-1;l++){let c=this.steps[l],d=this.steps[l+1];if(c<=e&&e<=d){a+=(e-c)/(d-c);break}}for(a=(a+l)*o;l<this.steps.length-1;l++){let c=this.steps[l],d=this.steps[l+1];if(e>=c&&i<=d){s=(i-e)/(d-c);break}if(e>=c&&i>=d)s+=(d-e)/(d-c);else{if(!(i>=d)){s+=(i-c)/(d-c);break}s+=1}}return s*=o,(a>1||a<0)&&(a=0),{startPosition:a,width:s}}getLinkedTimeTickLeftStyle(e){if(-1==this.steps.indexOf(e))throw new Error("Invalid stepIndex: stepIndex value is not included in steps");return this.steps.indexOf(e)/(this.steps.length-1)*100+"%"}getLinkedTimeTickMarginLeftStyle(e){if(-1==this.steps.indexOf(e))throw new Error("Invalid stepIndex: stepIndex value is not included in steps");return`-${this.steps.indexOf(e)/(this.steps.length-1)*12}px`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["image-card-component"]],hostVars:2,hostBindings:function(e,i){2&e&&nt("actual-size",i.showActualSize)},inputs:{loadState:"loadState",title:"title",tag:"tag",runId:"runId",sample:"sample",numSample:"numSample",imageUrl:"imageUrl",stepIndex:"stepIndex",steps:"steps",brightnessInMilli:"brightnessInMilli",contrastInMilli:"contrastInMilli",showActualSize:"showActualSize",runColorScale:"runColorScale",allowToggleActualSize:"allowToggleActualSize",isPinned:"isPinned",selectedSteps:"selectedSteps",linkedTimeSelection:"linkedTimeSelection",isClosestStepHighlighted:"isClosestStepHighlighted"},outputs:{onActualSizeToggle:"onActualSizeToggle",stepIndexChange:"stepIndexChange",onPinClicked:"onPinClicked"},features:[qt],decls:21,vars:16,consts:function(){let t,e;return t=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,e=$localize`:A button on an image card that toggles actual image size.␟3ca05ef3a6e3a37065f5e0f69c5d5a2178d90791␟7635101936664789140:Toggle actual image size`,[[1,"heading"],[1,"line"],[1,"tag"],[1,"tag-path",3,"title","value"],[3,"isClipped","isClosestStepHighlighted"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",e,"title","Toggle actual image size",3,"disabled","click"],["svgIcon","image_search_24px"],[1,"run"],[1,"dot",3,"ngStyle"],[1,"run-text",3,"runId"],[1,"metadata"],["class","step",4,"ngIf"],["class","sample",4,"ngIf"],["class","loading","diameter","18",4,"ngIf"],[4,"ngIf","ngIfElse"],["noImageData",""],[1,"step"],[1,"sample"],["diameter","18",1,"loading"],[1,"slider-row"],["color","primary",1,"step-slider",3,"disabled","min","max","step"],["matSliderThumb","",3,"value","valueChange"],["class","linked-time-wrapper",4,"ngIf"],[1,"img-container"],[3,"alt","src","ngStyle","includeFeatureFlags"],[1,"linked-time-wrapper"],["class","linked-time-tick",3,"left","margin-left",4,"ngFor","ngForOf"],[1,"linked-time-tick"],["class","empty-message",4,"ngIf"],[1,"empty-message"]]},template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1)(2,"span",2),k(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),g(),f(5,"span",5)(6,"button",6),A("click",function(){return i.onPinClicked.emit(!i.isPinned)}),k(7,"mat-icon",7),g(),f(8,"button",8),A("click",function(){return i.onActualSizeToggle.emit()}),k(9,"mat-icon",9),g()()(),f(10,"div",1)(11,"span",10),k(12,"span",11)(13,"card-run-name",12),g(),f(14,"div",13),S(15,gEe,3,3,"span",14),S(16,_Ee,4,6,"span",15),S(17,bEe,1,0,"mat-spinner",16),g()()(),S(18,CEe,7,11,"ng-container",17),S(19,wEe,1,1,"ng-template",null,18,jt)),2&e){let r=st(20);v(3),Zi("title",i.tag),Zi("value",i.title),v(1),b("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),v(2),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),b("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(1),b("disabled",!i.allowToggleActualSize),v(4),b("ngStyle",Un(14,SEe,i.runColorScale(i.runId))),v(1),b("runId",i.runId),v(2),b("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length),v(1),b("ngIf",i.numSample>1),v(1),b("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),b("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length)("ngIfElse",r)}},dependencies:[nn,Ne,Mf,QT,Er,bn,Nc,Ju,$u,ZT,Jg,$g,Us],styles:["[_nghost-%COMP%]{box-sizing:border-box;display:flex;flex-basis:318px;flex-direction:column;flex-grow:1;height:100%;overflow:auto;padding:16px;padding-top:4px}.actual-size[_nghost-%COMP%]{height:auto}.heading[_ngcontent-%COMP%]{align-items:center;font-size:14px;margin-bottom:4px;position:relative}.line[_ngcontent-%COMP%]{align-items:center;display:grid;grid-template-columns:1fr max-content}.tag[_ngcontent-%COMP%]{align-items:center;display:flex;gap:5px}.metadata[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;max-width:175px;text-align:end}.tag-path[_ngcontent-%COMP%]{overflow:hidden}.run[_ngcontent-%COMP%]{align-self:baseline;display:flex;overflow:hidden;white-space:nowrap}.run[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex:none;display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:4px}.run[_ngcontent-%COMP%]   .run-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;max-width:120px}.run[_ngcontent-%COMP%], .sample[_ngcontent-%COMP%], .step[_ngcontent-%COMP%]{color:#616161;font-size:13px}body.dark-mode[_nghost-%COMP%]   .run[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .run[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .sample[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sample[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .step[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .step[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;justify-self:flex-end;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.img-container[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;position:relative}.img-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{image-rendering:-moz-crisp-edges;image-rendering:pixelated}.actual-size[_nghost-%COMP%]   .img-container[_ngcontent-%COMP%]{overflow:auto;flex:none}[_nghost-%COMP%]:not(.actual-size)   img[_ngcontent-%COMP%]{position:absolute;max-height:100%;max-width:100%;width:auto;height:100%;object-fit:contain}.slider-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:24px;position:relative}.slider-row[_ngcontent-%COMP%]   mat-slider[_ngcontent-%COMP%]{margin-left:6px}.step-slider[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]     .mat-slider-min-value .mat-slider-thumb{background-color:#f57c00}[_nghost-%COMP%]     .hide-slider.mat-slider-horizontal .mat-slider-track-wrapper{height:0}.empty-message[_ngcontent-%COMP%]{margin-top:1em;font-size:13px}.linked-time-wrapper[_ngcontent-%COMP%]{position:absolute;top:5px;width:100%}.linked-time-tick[_ngcontent-%COMP%]{background-color:#e0e0e0;border-radius:50%;height:12px;position:absolute;width:12px;z-index:-1}body.dark-mode[_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%]{background-color:#212121}"],changeDetection:0}),n})(),QQ=(()=>{class n{constructor(e,i){this.store=e,this.dataSource=i,this.fullWidthChanged=new F,this.pinStateChanged=new F,this.showActualSize=!1,this.actualSizeUiToggled=!1,this.actualSizeUiToggleSubject=new xr(this.actualSizeUiToggled),this.ngUnsubscribe=new Ee,this.brightnessInMilli$=this.store.select(l1),this.contrastInMilli$=this.store.select(c1),this.actualSizeGlobalSetting$=this.store.select(d1)}onStepIndexChanged(e){this.store.dispatch(PT({cardId:this.cardId,stepIndex:e}))}isImageCardMetadata(e){let{plugin:i}=e;return i===An.IMAGES}onActualSizeToggle(){this.actualSizeUiToggled=!this.actualSizeUiToggled,this.actualSizeUiToggleSubject.next(this.actualSizeUiToggled)}ngOnInit(){In([this.actualSizeGlobalSetting$,this.actualSizeUiToggleSubject]).pipe(it(this.ngUnsubscribe),Dt(([l,c])=>{this.showActualSize=l||c,this.fullWidthChanged.emit(this.showActualSize)})).subscribe(()=>{});let i=this.store.select(Ks,this.cardId).pipe(it(this.ngUnsubscribe),Oe(l=>!!l&&this.isImageCardMetadata(l)),q(l=>l),Da(1)),o=In([i,this.store.select(wu,this.cardId)]).pipe(it(this.ngUnsubscribe),q(([l,c])=>{let d=l.runId;return c&&c.hasOwnProperty(d)?c[d]:[]}),ri((l,c)=>l.length===c.length&&0===l.length||l===c),Da(1));this.stepIndex$=this.store.select(ZF,this.cardId).pipe(q(l=>l?l.index:null)),this.isClosestStepHighlighted$=this.store.select(ZF,this.cardId).pipe(q(l=>!!l&&l.isClosest)),this.loadState$=this.store.select(gd,this.cardId),this.tag$=i.pipe(q(l=>l.tag)),this.title$=this.tag$.pipe(q(l=>Zg(l,this.groupName))),this.runId$=i.pipe(q(l=>l.runId)),this.sample$=i.pipe(q(l=>l.sample)),this.numSample$=i.pipe(q(l=>l.numSample)),this.steps$=this.store.select(AW,this.cardId),this.isPinned$=this.store.select(Su,this.cardId),this.linkedTimeSelection$=this.store.select(Du).pipe(Vi(this.steps$),q(([l,c])=>l?Yf(l,Math.min(...c),Math.max(...c)):null)),this.selectedSteps$=this.linkedTimeSelection$.pipe(Vi(this.steps$),q(([l,c])=>l?null===l.endStep?-1!==c.indexOf(l.startStep)?[l.startStep]:[]:c.filter(d=>d>=l.startStep&&d<=l.endStep):[]));let s=In([o,this.stepIndex$]).pipe(q(([l,c])=>null!==c&&l[c]?l[c]:null));this.imageUrl$=s.pipe(q(l=>l?this.dataSource.imageUrl(l.imageId):null))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(wc))},n.\u0275cmp=P({type:n,selectors:[["image-card"]],inputs:{cardId:"cardId",groupName:"groupName",runColorScale:"runColorScale"},outputs:{fullWidthChanged:"fullWidthChanged",pinStateChanged:"pinStateChanged"},decls:17,vars:50,consts:[[3,"loadState","title","tag","runId","sample","numSample","imageUrl","stepIndex","steps","isClosestStepHighlighted","brightnessInMilli","contrastInMilli","runColorScale","showActualSize","allowToggleActualSize","isPinned","linkedTimeSelection","selectedSteps","stepIndexChange","onActualSizeToggle","onPinClicked"]],template:function(e,i){1&e&&(f(0,"image-card-component",0),A("stepIndexChange",function(o){return i.onStepIndexChanged(o)})("onActualSizeToggle",function(){return i.onActualSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),U(10,"async"),U(11,"async"),U(12,"async"),U(13,"async"),U(14,"async"),U(15,"async"),U(16,"async"),g()),2&e&&b("loadState",G(1,18,i.loadState$))("title",G(2,20,i.title$))("tag",G(3,22,i.tag$))("runId",G(4,24,i.runId$))("sample",G(5,26,i.sample$))("numSample",G(6,28,i.numSample$))("imageUrl",G(7,30,i.imageUrl$))("stepIndex",G(8,32,i.stepIndex$))("steps",G(9,34,i.steps$))("isClosestStepHighlighted",G(10,36,i.isClosestStepHighlighted$))("brightnessInMilli",G(11,38,i.brightnessInMilli$))("contrastInMilli",G(12,40,i.contrastInMilli$))("runColorScale",i.runColorScale)("showActualSize",i.showActualSize)("allowToggleActualSize",!1===G(13,42,i.actualSizeGlobalSetting$))("isPinned",G(14,44,i.isPinned$))("linkedTimeSelection",G(15,46,i.linkedTimeSelection$))("selectedSteps",G(16,48,i.selectedSteps$))},dependencies:[YQ,ct],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})(),Yi=(()=>(function(n){n[n.SVG=0]="SVG",n[n.WEBGL=1]="WEBGL"}(Yi||(Yi={})),Yi))(),tr=(()=>(function(n){n[n.LINEAR=0]="LINEAR",n[n.LOG10=1]="LOG10",n[n.TIME=2]="TIME"}(tr||(tr={})),tr))(),Tr=(()=>(function(n){n.NONE="NONE",n.DRAG_ZOOMING="DRAG_ZOOMING",n.SCROLL_ZOOMING="SCROLL_ZOOMING",n.PANNING="PANNING"}(Tr||(Tr={})),Tr))();function IEe(n,t){1&n&&(f(0,"span"),T(1,"scalar"),g())}function AEe(n,t){1&n&&(f(0,"span"),T(1,"histogram"),g())}function REe(n,t){1&n&&(f(0,"span"),T(1,"unknown"),g())}function PEe(n,t){if(1&n&&(Gt(0,13),S(1,IEe,2,0,"span",14),S(2,AEe,2,0,"span",14),S(3,REe,2,0,"span",15),Wt()),2&n){let e=w(2);b("ngSwitch",e.cardMetadata.plugin),v(1),b("ngSwitchCase",e.PluginType.SCALARS),v(1),b("ngSwitchCase",e.PluginType.HISTOGRAMS)}}function kEe(n,t){1&n&&hi(0)}function OEe(n,t){if(1&n&&(f(0,"option",16),T(1),g()),2&n){let e=t.$implicit;b("value",e.id),v(1),kt(e.name)}}function FEe(n,t){if(1&n){let e=Te();Gt(0),f(1,"h2"),S(2,PEe,4,3,"ng-template",null,2,jt),f(4,"span"),T(5,"Download\xa0"),g(),S(6,kEe,1,0,"ng-container",3),f(7,"span"),T(8,"\xa0data for\xa0"),g(),f(9,"code",4),T(10),g()(),f(11,"mat-dialog-content")(12,"mat-form-field",5)(13,"mat-label"),T(14,"Select a run to download a data for a series"),g(),f(15,"select",6),A("change",function(r){return ne(e),ie(w().runSelected.emit(r.target.value))}),f(16,"option",7),T(17,"-"),g(),S(18,OEe,2,2,"option",8),g()(),f(19,"div",9)(20,"span"),T(21,"Download as\u2026"),g(),T(22,"\xa0"),f(23,"a",10),T(24,"JSON"),g(),f(25,"a",10),T(26,"CSV"),g()()(),f(27,"mat-dialog-actions",11)(28,"button",12),T(29,"Close"),g()(),Wt()}if(2&n){let e=st(3),i=w();v(6),b("ngTemplateOutlet",e),v(3),b("title",i.cardMetadata.tag),v(1),kt(i.cardMetadata.tag),v(5),b("value",i.selectedRunId||""),v(1),b("value",""),v(2),b("ngForOf",i.runs),v(5),b("disabled",!i.downloadUrlJson)("download",i.getDownloadName("json"))("href",i.downloadUrlJson,Vs),v(2),b("disabled",!i.downloadUrlCsv)("download",i.getDownloadName("csv"))("href",i.downloadUrlCsv,Vs)}}function NEe(n,t){1&n&&T(0,"Loading...")}var KQ=(()=>{class n{constructor(){this.runSelected=new F,this.PluginType=An}getDownloadName(e){let i=this.runs.find(r=>r.id===this.selectedRunId);return i?`${i.name}.${e}`:""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["data_download_dialog_component"]],inputs:{cardMetadata:"cardMetadata",runs:"runs",selectedRunId:"selectedRunId",downloadUrlCsv:"downloadUrlCsv",downloadUrlJson:"downloadUrlJson"},outputs:{runSelected:"runSelected"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["noCardMetadata",""],["dataName",""],[4,"ngTemplateOutlet"],[1,"tag-name",3,"title"],["appearance","fill",1,"run-selector"],["matNativeControl","","name","run","cdkFocusInitial","","required","",3,"value","change"],["selected","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[1,"download-controls"],["mat-stroked-button","",3,"disabled","download","href","includeFeatureFlags"],["align","end"],["mat-button","","mat-dialog-close",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"NgSwitchDefault"],[3,"value"]],template:function(e,i){if(1&e&&(S(0,FEe,30,12,"ng-container",0),S(1,NEe,1,0,"ng-template",null,1,jt)),2&e){let r=st(2);b("ngIf",i.cardMetadata)("ngIfElse",r)}},dependencies:[nn,Ne,eo,mr,kr,QT,xq,Mq,z7,ki,Z1,K1,J1,qu,Pc,nl],styles:["h2[_ngcontent-%COMP%]{font-size:1.25em;overflow-wrap:break-word}.run-selector[_ngcontent-%COMP%]{font-size:.9em;width:100%}.download-controls[_ngcontent-%COMP%]{font-size:.9em}.download-controls[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{margin:3px 10px 3px 0}"],changeDetection:0}),n})(),JQ=(()=>{class n{constructor(e,i,r){this.selectedRunId$=new xr(null),this.cardMetadata$=e.select(Ks,r.cardId).pipe(Oe(o=>Boolean(o))),this.downloadUrlCsv$=In([e.select(Ks,r.cardId),this.selectedRunId$]).pipe(q(([o,a])=>o&&a?i.downloadUrl(o.plugin,o.tag,a,"csv"):null),kn(null)),this.downloadUrlJson$=In([e.select(Ks,r.cardId),this.selectedRunId$]).pipe(q(([o,a])=>o&&a?i.downloadUrl(o.plugin,o.tag,a,"json"):null),kn(null)),this.runs$=In([e.select(QW),e.select(wu,r.cardId)]).pipe(q(([o,a])=>a?Object.keys(a).map(s=>o.get(s)).filter(Boolean):[]))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(wc),C(Xv))},n.\u0275cmp=P({type:n,selectors:[["data_download_dialog"]],decls:6,vars:15,consts:[[3,"cardMetadata","runs","selectedRunId","downloadUrlCsv","downloadUrlJson","runSelected"]],template:function(e,i){1&e&&(f(0,"data_download_dialog_component",0),A("runSelected",function(o){return i.selectedRunId$.next(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),g()),2&e&&b("cardMetadata",G(1,5,i.cardMetadata$))("runs",G(2,7,i.runs$))("selectedRunId",G(3,9,i.selectedRunId$))("downloadUrlCsv",G(4,11,i.downloadUrlCsv$))("downloadUrlJson",G(5,13,i.downloadUrlJson$))},dependencies:[KQ,ct],encapsulation:2,changeDetection:0}),n})();function al(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function Cy(n){return 1===n.length&&(n=function(n){return function(t,e){return al(n(t),e)}}(n)),{left:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;n(t[o],e)<0?i=o+1:r=o}return i},right:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;n(t[o],e)>0?r=o:i=o+1}return i}}}var Lc=Cy(al).right,FN=Math.sqrt(50),NN=Math.sqrt(10),LN=Math.sqrt(2);function My(n,t,e){var i,o,a,s,r=-1;if(e=+e,(n=+n)==(t=+t)&&e>0)return[n];if((i=t<n)&&(o=n,n=t,t=o),0===(s=e0(n,t,e))||!isFinite(s))return[];if(s>0)for(n=Math.ceil(n/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-n+1));++r<o;)a[r]=(n+r)*s;else for(n=Math.floor(n*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(n-t+1));++r<o;)a[r]=(n-r)/s;return i&&a.reverse(),a}function e0(n,t,e){var i=(t-n)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=FN?10:o>=NN?5:o>=LN?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=FN?10:o>=NN?5:o>=LN?2:1)}function Id(n,t,e){var i=Math.abs(t-n)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=FN?r*=10:o>=NN?r*=5:o>=LN&&(r*=2),t<n?-r:r}var JT=Array.prototype.slice;function rZ(n){return n}var VN=1,eD=2,HN=3,$T=4,oZ=1e-6;function XEe(n){return"translate("+(n+.5)+",0)"}function YEe(n){return"translate(0,"+(n+.5)+")"}function QEe(n){return function(t){return+n(t)}}function ZEe(n){var t=Math.max(0,n.bandwidth()-1)/2;return n.round()&&(t=Math.round(t)),function(e){return+n(e)+t}}function KEe(){return!this.__axis}function aZ(n,t){var e=[],i=null,r=null,o=6,a=6,s=3,l=n===VN||n===$T?-1:1,c=n===$T||n===eD?"x":"y",d=n===VN||n===HN?XEe:YEe;function u(p){var h=i??(t.ticks?t.ticks.apply(t,e):t.domain()),m=r??(t.tickFormat?t.tickFormat.apply(t,e):rZ),_=Math.max(o,0)+s,M=t.range(),y=+M[0]+.5,x=+M[M.length-1]+.5,R=(t.bandwidth?ZEe:QEe)(t.copy()),I=p.selection?p.selection():p,B=I.selectAll(".domain").data([null]),ee=I.selectAll(".tick").data(h,t).order(),Q=ee.exit(),we=ee.enter().append("g").attr("class","tick"),Qe=ee.select("line"),Ae=ee.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ee=ee.merge(we),Qe=Qe.merge(we.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),Ae=Ae.merge(we.append("text").attr("fill","currentColor").attr(c,l*_).attr("dy",n===VN?"0em":n===HN?"0.71em":"0.32em")),p!==I&&(B=B.transition(p),ee=ee.transition(p),Qe=Qe.transition(p),Ae=Ae.transition(p),Q=Q.transition(p).attr("opacity",oZ).attr("transform",function(D){return isFinite(D=R(D))?d(D):this.getAttribute("transform")}),we.attr("opacity",oZ).attr("transform",function(D){var re=this.parentNode.__axis;return d(re&&isFinite(re=re(D))?re:R(D))})),Q.remove(),B.attr("d",n===$T||n==eD?a?"M"+l*a+","+y+"H0.5V"+x+"H"+l*a:"M0.5,"+y+"V"+x:a?"M"+y+","+l*a+"V0.5H"+x+"V"+l*a:"M"+y+",0.5H"+x),ee.attr("opacity",1).attr("transform",function(D){return d(R(D))}),Qe.attr(c+"2",l*o),Ae.attr(c,l*_).text(m),I.filter(KEe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===eD?"start":n===$T?"end":"middle"),I.each(function(){this.__axis=R})}return u.scale=function(p){return arguments.length?(t=p,u):t},u.ticks=function(){return e=JT.call(arguments),u},u.tickArguments=function(p){return arguments.length?(e=null==p?[]:JT.call(p),u):e.slice()},u.tickValues=function(p){return arguments.length?(i=null==p?null:JT.call(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(r=p,u):r},u.tickSize=function(p){return arguments.length?(o=a=+p,u):o},u.tickSizeInner=function(p){return arguments.length?(o=+p,u):o},u.tickSizeOuter=function(p){return arguments.length?(a=+p,u):a},u.tickPadding=function(p){return arguments.length?(s=+p,u):s},u}var JEe={value:function(){}};function lZ(){for(var i,n=0,t=arguments.length,e={};n<t;++n){if(!(i=arguments[n]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new tD(e)}function tD(n){this._=n}function eTe(n,t){for(var r,e=0,i=n.length;e<i;++e)if((r=n[e]).name===t)return r.value}function sZ(n,t,e){for(var i=0,r=n.length;i<r;++i)if(n[i].name===t){n[i]=JEe,n=n.slice(0,i).concat(n.slice(i+1));break}return null!=e&&n.push({name:t,value:e}),n}tD.prototype=lZ.prototype={constructor:tD,on:function(n,t){var r,e=this._,i=function(n,t){return n.trim().split(/^|\s+/).map(function(e){var i="",r=e.indexOf(".");if(r>=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(n+"",e),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(r=(n=i[o]).type)e[r]=sZ(e[r],n.name,t);else if(null==t)for(r in e)e[r]=sZ(e[r],n.name,null);return this}for(;++o<a;)if((r=(n=i[o]).type)&&(r=eTe(e[r],n.name)))return r},copy:function(){var n={},t=this._;for(var e in t)n[e]=t[e].slice();return new tD(n)},call:function(n,t){if((r=arguments.length-2)>0)for(var r,o,e=new Array(r),i=0;i<r;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(i=0,r=(o=this._[n]).length;i<r;++i)o[i].value.apply(t,e)},apply:function(n,t,e){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var i=this._[n],r=0,o=i.length;r<o;++r)i[r].value.apply(t,e)}};var jN=lZ,nD="http://www.w3.org/1999/xhtml",GN={svg:"http://www.w3.org/2000/svg",xhtml:nD,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ad(n){var t=n+="",e=t.indexOf(":");return e>=0&&"xmlns"!==(t=n.slice(0,e))&&(n=n.slice(e+1)),GN.hasOwnProperty(t)?{space:GN[t],local:n}:n}function tTe(n){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===nD&&t.documentElement.namespaceURI===nD?t.createElement(n):t.createElementNS(e,n)}}function nTe(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function iD(n){var t=Ad(n);return(t.local?nTe:tTe)(t)}function iTe(){}function Gh(n){return null==n?iTe:function(){return this.querySelector(n)}}function rTe(){return[]}function Sy(n){return null==n?rTe:function(){return this.querySelectorAll(n)}}function Ey(n){return function(){return this.matches(n)}}function rD(n){return new Array(n.length)}function Ty(n,t){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=t}Ty.prototype={constructor:Ty,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,t){return this._parent.insertBefore(n,t)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};var mZ="$";function oTe(n,t,e,i,r,o){for(var s,a=0,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],i[a]=s):e[a]=new Ty(n,o[a]);for(;a<l;++a)(s=t[a])&&(r[a]=s)}function aTe(n,t,e,i,r,o,a){var s,l,h,c={},d=t.length,u=o.length,p=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(p[s]=h=mZ+a.call(l,l.__data__,s,t),h in c?r[s]=l:c[h]=l);for(s=0;s<u;++s)(l=c[h=mZ+a.call(n,o[s],s,o)])?(i[s]=l,l.__data__=o[s],c[h]=null):e[s]=new Ty(n,o[s]);for(s=0;s<d;++s)(l=t[s])&&c[p[s]]===l&&(r[s]=l)}function sTe(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function lTe(n){return function(){this.removeAttribute(n)}}function cTe(n){return function(){this.removeAttributeNS(n.space,n.local)}}function dTe(n,t){return function(){this.setAttribute(n,t)}}function uTe(n,t){return function(){this.setAttributeNS(n.space,n.local,t)}}function pTe(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}}function hTe(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}}function oD(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function mTe(n){return function(){this.style.removeProperty(n)}}function fTe(n,t,e){return function(){this.style.setProperty(n,t,e)}}function gTe(n,t,e){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(n):this.style.setProperty(n,i,e)}}function ip(n,t){return n.style.getPropertyValue(t)||oD(n).getComputedStyle(n,null).getPropertyValue(t)}function _Te(n){return function(){delete this[n]}}function bTe(n,t){return function(){this[n]=t}}function vTe(n,t){return function(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}}function AZ(n){return n.trim().split(/^|\s+/)}function WN(n){return n.classList||new RZ(n)}function RZ(n){this._node=n,this._names=AZ(n.getAttribute("class")||"")}function PZ(n,t){for(var e=WN(n),i=-1,r=t.length;++i<r;)e.add(t[i])}function kZ(n,t){for(var e=WN(n),i=-1,r=t.length;++i<r;)e.remove(t[i])}function yTe(n){return function(){PZ(this,n)}}function xTe(n){return function(){kZ(this,n)}}function CTe(n,t){return function(){(t.apply(this,arguments)?PZ:kZ)(this,n)}}function MTe(){this.textContent=""}function wTe(n){return function(){this.textContent=n}}function STe(n){return function(){var t=n.apply(this,arguments);this.textContent=t??""}}function ETe(){this.innerHTML=""}function TTe(n){return function(){this.innerHTML=n}}function DTe(n){return function(){var t=n.apply(this,arguments);this.innerHTML=t??""}}function ITe(){this.nextSibling&&this.parentNode.appendChild(this)}function ATe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function RTe(){return null}function PTe(){var n=this.parentNode;n&&n.removeChild(this)}function kTe(){var n=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function OTe(){var n=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}RZ.prototype={add:function(n){this._names.indexOf(n)<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var t=this._names.indexOf(n);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};var WZ={},qN=null;function FTe(n,t,e){return n=qZ(n,t,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&n.call(this,i)}}function qZ(n,t,e){return function(i){var r=qN;qN=i;try{n.call(this,this.__data__,t,e)}finally{qN=r}}}function LTe(n){return function(){var t=this.__on;if(t){for(var o,e=0,i=-1,r=t.length;e<r;++e)o=t[e],n.type&&o.type!==n.type||o.name!==n.name?t[++i]=o:this.removeEventListener(o.type,o.listener,o.capture);++i?t.length=i:delete this.__on}}}function BTe(n,t,e){var i=WZ.hasOwnProperty(n.type)?FTe:qZ;return function(r,o,a){var l,s=this.__on,c=i(t,o,a);if(s)for(var d=0,u=s.length;d<u;++d)if((l=s[d]).type===n.type&&l.name===n.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=e),void(l.value=t);this.addEventListener(n.type,c,e),l={type:n.type,name:n.name,value:t,listener:c,capture:e},s?s.push(l):this.__on=[l]}}function YZ(n,t,e){var i=oD(n),r=i.CustomEvent;"function"==typeof r?r=new r(t,e):(r=i.document.createEvent("Event"),e?(r.initEvent(t,e.bubbles,e.cancelable),r.detail=e.detail):r.initEvent(t,!1,!1)),n.dispatchEvent(r)}function VTe(n,t){return function(){return YZ(this,n,t)}}function HTe(n,t){return function(){return YZ(this,n,t.apply(this,arguments))}}typeof document<"u"&&("onmouseenter"in document.documentElement||(WZ={mouseenter:"mouseover",mouseleave:"mouseout"}));var XN=[null];function Br(n,t){this._groups=n,this._parents=t}function ZZ(){return new Br([[document.documentElement]],XN)}Br.prototype=ZZ.prototype={constructor:Br,select:function(n){"function"!=typeof n&&(n=Gh(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,c,o=t[r],a=o.length,s=i[r]=new Array(a),d=0;d<a;++d)(l=o[d])&&(c=n.call(l,l.__data__,d,o))&&("__data__"in l&&(c.__data__=l.__data__),s[d]=c);return new Br(i,this._parents)},selectAll:function(n){"function"!=typeof n&&(n=Sy(n));for(var t=this._groups,e=t.length,i=[],r=[],o=0;o<e;++o)for(var l,a=t[o],s=a.length,c=0;c<s;++c)(l=a[c])&&(i.push(n.call(l,l.__data__,c,a)),r.push(l));return new Br(i,r)},filter:function(n){"function"!=typeof n&&(n=Ey(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],a=o.length,s=i[r]=[],c=0;c<a;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&s.push(l);return new Br(i,this._parents)},data:function(n,t){if(!n)return h=new Array(this.size()),c=-1,this.each(function(ee){h[++c]=ee}),h;var e=t?aTe:oTe,i=this._parents,r=this._groups;"function"!=typeof n&&(n=function(n){return function(){return n}}(n));for(var o=r.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var d=i[c],u=r[c],p=u.length,h=n.call(d,d&&d.__data__,c,i),m=h.length,_=s[c]=new Array(m),M=a[c]=new Array(m);e(d,u,_,M,l[c]=new Array(p),h,t);for(var I,B,x=0,R=0;x<m;++x)if(I=_[x]){for(x>=R&&(R=x+1);!(B=M[R])&&++R<m;);I._next=B||null}}return(a=new Br(a,i))._enter=s,a._exit=l,a},enter:function(){return new Br(this._enter||this._groups.map(rD),this._parents)},exit:function(){return new Br(this._exit||this._groups.map(rD),this._parents)},join:function(n,t,e){var i=this.enter(),r=this,o=this.exit();return i="function"==typeof n?n(i):i.append(n+""),null!=t&&(r=t(r)),null==e?o.remove():e(o),i&&r?i.merge(r).order():r},merge:function(n){for(var t=this._groups,e=n._groups,i=t.length,o=Math.min(i,e.length),a=new Array(i),s=0;s<o;++s)for(var p,l=t[s],c=e[s],d=l.length,u=a[s]=new Array(d),h=0;h<d;++h)(p=l[h]||c[h])&&(u[h]=p);for(;s<i;++s)a[s]=t[s];return new Br(a,this._parents)},order:function(){for(var n=this._groups,t=-1,e=n.length;++t<e;)for(var a,i=n[t],r=i.length-1,o=i[r];--r>=0;)(a=i[r])&&(o&&4^a.compareDocumentPosition(o)&&o.parentNode.insertBefore(a,o),o=a);return this},sort:function(n){function t(u,p){return u&&p?n(u.__data__,p.__data__):!u-!p}n||(n=sTe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var c,a=e[o],s=a.length,l=r[o]=new Array(s),d=0;d<s;++d)(c=a[d])&&(l[d]=c);l.sort(t)}return new Br(r,this._parents).order()},call:function(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this},nodes:function(){var n=new Array(this.size()),t=-1;return this.each(function(){n[++t]=this}),n},node:function(){for(var n=this._groups,t=0,e=n.length;t<e;++t)for(var i=n[t],r=0,o=i.length;r<o;++r){var a=i[r];if(a)return a}return null},size:function(){var n=0;return this.each(function(){++n}),n},empty:function(){return!this.node()},each:function(n){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s,r=t[e],o=0,a=r.length;o<a;++o)(s=r[o])&&n.call(s,s.__data__,o,r);return this},attr:function(n,t){var e=Ad(n);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==t?e.local?cTe:lTe:"function"==typeof t?e.local?hTe:pTe:e.local?uTe:dTe)(e,t))},style:function(n,t,e){return arguments.length>1?this.each((null==t?mTe:"function"==typeof t?gTe:fTe)(n,t,e??"")):ip(this.node(),n)},property:function(n,t){return arguments.length>1?this.each((null==t?_Te:"function"==typeof t?vTe:bTe)(n,t)):this.node()[n]},classed:function(n,t){var e=AZ(n+"");if(arguments.length<2){for(var i=WN(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof t?CTe:t?yTe:xTe)(e,t))},text:function(n){return arguments.length?this.each(null==n?MTe:("function"==typeof n?STe:wTe)(n)):this.node().textContent},html:function(n){return arguments.length?this.each(null==n?ETe:("function"==typeof n?DTe:TTe)(n)):this.node().innerHTML},raise:function(){return this.each(ITe)},lower:function(){return this.each(ATe)},append:function(n){var t="function"==typeof n?n:iD(n);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(n,t){var e="function"==typeof n?n:iD(n),i=null==t?RTe:"function"==typeof t?t:Gh(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(PTe)},clone:function(n){return this.select(n?OTe:kTe)},datum:function(n){return arguments.length?this.property("__data__",n):this.node().__data__},on:function(n,t,e){var r,a,i=function(n){return n.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(n+""),o=i.length;if(!(arguments.length<2)){for(s=t?BTe:LTe,null==e&&(e=!1),r=0;r<o;++r)this.each(s(i[r],t,e));return this}var s=this.node().__on;if(s)for(var d,l=0,c=s.length;l<c;++l)for(r=0,d=s[l];r<o;++r)if((a=i[r]).type===d.type&&a.name===d.name)return d.value},dispatch:function(n,t){return this.each(("function"==typeof t?HTe:VTe)(n,t))}};var Rd=ZZ;function aD(n){return"string"==typeof n?new Br([[document.querySelector(n)]],[document.documentElement]):new Br([[n]],XN)}function Wh(n,t,e){n.prototype=t.prototype=e,e.constructor=n}function t0(n,t){var e=Object.create(n.prototype);for(var i in t)e[i]=t[i];return e}function rp(){}var lD=1/.7,n0="\\s*([+-]?\\d+)\\s*",Iy="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zTe=/^#([0-9a-f]{3,8})$/,UTe=new RegExp("^rgb\\("+[n0,n0,n0]+"\\)$"),jTe=new RegExp("^rgb\\("+[Vc,Vc,Vc]+"\\)$"),GTe=new RegExp("^rgba\\("+[n0,n0,n0,Iy]+"\\)$"),WTe=new RegExp("^rgba\\("+[Vc,Vc,Vc,Iy]+"\\)$"),qTe=new RegExp("^hsl\\("+[Iy,Vc,Vc]+"\\)$"),XTe=new RegExp("^hsla\\("+[Iy,Vc,Vc,Iy]+"\\)$"),KZ={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 JZ(){return this.rgb().formatHex()}function $Z(){return this.rgb().formatRgb()}function Hl(n){var t,e;return n=(n+"").trim().toLowerCase(),(t=zTe.exec(n))?(e=t[1].length,t=parseInt(t[1],16),6===e?eK(t):3===e?new ea(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===e?sD(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===e?sD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=UTe.exec(n))?new ea(t[1],t[2],t[3],1):(t=jTe.exec(n))?new ea(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=GTe.exec(n))?sD(t[1],t[2],t[3],t[4]):(t=WTe.exec(n))?sD(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qTe.exec(n))?iK(t[1],t[2]/100,t[3]/100,1):(t=XTe.exec(n))?iK(t[1],t[2]/100,t[3]/100,t[4]):KZ.hasOwnProperty(n)?eK(KZ[n]):"transparent"===n?new ea(NaN,NaN,NaN,0):null}function eK(n){return new ea(n>>16&255,n>>8&255,255&n,1)}function sD(n,t,e,i){return i<=0&&(n=t=e=NaN),new ea(n,t,e,i)}function ZN(n){return n instanceof rp||(n=Hl(n)),n?new ea((n=n.rgb()).r,n.g,n.b,n.opacity):new ea}function i0(n,t,e,i){return 1===arguments.length?ZN(n):new ea(n,t,e,i??1)}function ea(n,t,e,i){this.r=+n,this.g=+t,this.b=+e,this.opacity=+i}function tK(){return"#"+YN(this.r)+YN(this.g)+YN(this.b)}function nK(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===n?")":", "+n+")")}function YN(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function iK(n,t,e,i){return i<=0?n=t=e=NaN:e<=0||e>=1?n=t=NaN:t<=0&&(n=NaN),new Bc(n,t,e,i)}function rK(n){if(n instanceof Bc)return new Bc(n.h,n.s,n.l,n.opacity);if(n instanceof rp||(n=Hl(n)),!n)return new Bc;if(n instanceof Bc)return n;var t=(n=n.rgb()).r/255,e=n.g/255,i=n.b/255,r=Math.min(t,e,i),o=Math.max(t,e,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(e-i)/s+6*(e<i):e===o?(i-t)/s+2:(t-e)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new Bc(a,s,l,n.opacity)}function qh(n,t,e,i){return 1===arguments.length?rK(n):new Bc(n,t,e,i??1)}function Bc(n,t,e,i){this.h=+n,this.s=+t,this.l=+e,this.opacity=+i}function QN(n,t,e){return 255*(n<60?t+(e-t)*n/60:n<180?e:n<240?t+(e-t)*(240-n)/60:t)}Wh(rp,Hl,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:JZ,formatHex:JZ,formatHsl:function(){return rK(this).formatHsl()},formatRgb:$Z,toString:$Z}),Wh(ea,i0,t0(rp,{brighter:function(n){return n=null==n?lD:Math.pow(lD,n),new ea(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new ea(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tK,formatHex:tK,formatRgb:nK,toString:nK})),Wh(Bc,qh,t0(rp,{brighter:function(n){return n=null==n?lD:Math.pow(lD,n),new Bc(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Bc(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*t,r=2*e-i;return new ea(QN(n>=240?n-240:n+120,r,i),QN(n,r,i),QN(n<120?n+240:n-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var oK=Math.PI/180,aK=180/Math.PI,sK=.96422,lK=1,cK=.82521,dK=4/29,r0=6/29,uK=3*r0*r0,QTe=r0*r0*r0;function pK(n){if(n instanceof Hc)return new Hc(n.l,n.a,n.b,n.opacity);if(n instanceof Pd)return hK(n);n instanceof ea||(n=ZN(n));var o,a,t=eL(n.r),e=eL(n.g),i=eL(n.b),r=KN((.2225045*t+.7168786*e+.0606169*i)/lK);return t===e&&e===i?o=a=r:(o=KN((.4360747*t+.3850649*e+.1430804*i)/sK),a=KN((.0139322*t+.0971045*e+.7141733*i)/cK)),new Hc(116*r-16,500*(o-r),200*(r-a),n.opacity)}function Hc(n,t,e,i){this.l=+n,this.a=+t,this.b=+e,this.opacity=+i}function KN(n){return n>QTe?Math.pow(n,1/3):n/uK+dK}function JN(n){return n>r0?n*n*n:uK*(n-dK)}function $N(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function eL(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Xh(n,t,e,i){return 1===arguments.length?function(n){if(n instanceof Pd)return new Pd(n.h,n.c,n.l,n.opacity);if(n instanceof Hc||(n=pK(n)),0===n.a&&0===n.b)return new Pd(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var t=Math.atan2(n.b,n.a)*aK;return new Pd(t<0?t+360:t,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}(n):new Pd(n,t,e,i??1)}function Pd(n,t,e,i){this.h=+n,this.c=+t,this.l=+e,this.opacity=+i}function hK(n){if(isNaN(n.h))return new Hc(n.l,0,0,n.opacity);var t=n.h*oK;return new Hc(n.l,Math.cos(t)*n.c,Math.sin(t)*n.c,n.opacity)}function nL(n,t,e,i,r){var o=n*n,a=o*n;return((1-3*n+3*o-a)*t+(4-6*o+3*a)*e+(1+3*n+3*o-3*a)*i+a*r)/6}function o0(n){return function(){return n}}function gK(n,t){return function(e){return n+e*t}}function dD(n,t){var e=t-n;return e?gK(n,e>180||e<-180?e-360*Math.round(e/360):e):o0(isNaN(n)?t:n)}function Ka(n,t){var e=t-n;return e?gK(n,e):o0(isNaN(n)?t:n)}Wh(Hc,function(n,t,e,i){return 1===arguments.length?pK(n):new Hc(n,t,e,i??1)},t0(rp,{brighter:function(n){return new Hc(this.l+18*(n??1),this.a,this.b,this.opacity)},darker:function(n){return new Hc(this.l-18*(n??1),this.a,this.b,this.opacity)},rgb:function(){var n=(this.l+16)/116,t=isNaN(this.a)?n:n+this.a/500,e=isNaN(this.b)?n:n-this.b/200;return new ea($N(3.1338561*(t=sK*JN(t))-1.6168667*(n=lK*JN(n))-.4906146*(e=cK*JN(e))),$N(-.9787684*t+1.9161415*n+.033454*e),$N(.0719453*t-.2289914*n+1.4052427*e),this.opacity)}})),Wh(Pd,Xh,t0(rp,{brighter:function(n){return new Pd(this.h,this.c,this.l+18*(n??1),this.opacity)},darker:function(n){return new Pd(this.h,this.c,this.l-18*(n??1),this.opacity)},rgb:function(){return hK(this).rgb()}}));var Yh=function n(t){var e=function(n){return 1==(n=+n)?Ka:function(t,e){return e-t?function(n,t,e){return n=Math.pow(n,e),t=Math.pow(t,e)-n,e=1/e,function(i){return Math.pow(n+i*t,e)}}(t,e,n):o0(isNaN(t)?e:t)}}(t);function i(r,o){var a=e((r=i0(r)).r,(o=i0(o)).r),s=e(r.g,o.g),l=e(r.b,o.b),c=Ka(r.opacity,o.opacity);return function(d){return r.r=a(d),r.g=s(d),r.b=l(d),r.opacity=c(d),r+""}}return i.gamma=n,i}(1);function bK(n){return function(t){var a,s,e=t.length,i=new Array(e),r=new Array(e),o=new Array(e);for(a=0;a<e;++a)s=i0(t[a]),i[a]=s.r||0,r[a]=s.g||0,o[a]=s.b||0;return i=n(i),r=n(r),o=n(o),s.opacity=1,function(l){return s.r=i(l),s.g=r(l),s.b=o(l),s+""}}}function vK(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,i=t.slice();return function(o){for(r=0;r<e;++r)i[r]=n[r]*(1-o)+t[r]*o;return i}}function xK(n,t){var a,e=t?t.length:0,i=n?Math.min(e,n.length):0,r=new Array(i),o=new Array(e);for(a=0;a<i;++a)r[a]=Qh(n[a],t[a]);for(;a<e;++a)o[a]=t[a];return function(s){for(a=0;a<i;++a)o[a]=r[a](s);return o}}function CK(n,t){var e=new Date;return n=+n,t=+t,function(i){return e.setTime(n*(1-i)+t*i),e}}function Uo(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function MK(n,t){var r,e={},i={};for(r in(null===n||"object"!=typeof n)&&(n={}),(null===t||"object"!=typeof t)&&(t={}),t)r in n?e[r]=Qh(n[r],t[r]):i[r]=t[r];return function(o){for(r in e)i[r]=e[r](o);return i}}bK(function(n){var t=n.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),r=n[i],o=n[i+1];return nL((e-i/t)*t,i>0?n[i-1]:2*r-o,r,o,i<t-1?n[i+2]:2*o-r)}}),bK(function(n){var t=n.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*t);return nL((e-i/t)*t,n[(i+t-1)%t],n[i%t],n[(i+1)%t],n[(i+2)%t])}});var rL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,iL=new RegExp(rL.source,"g");function Ay(n,t){var i,r,o,e=rL.lastIndex=iL.lastIndex=0,a=-1,s=[],l=[];for(n+="",t+="";(i=rL.exec(n))&&(r=iL.exec(t));)(o=r.index)>e&&(o=t.slice(e,o),s[a]?s[a]+=o:s[++a]=o),(i=i[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Uo(i,r)})),e=iL.lastIndex;return e<t.length&&(o=t.slice(e),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(n){return function(t){return n(t)+""}}(l[0].x):function(n){return function(){return n}}(t):(t=l.length,function(c){for(var u,d=0;d<t;++d)s[(u=l[d]).i]=u.x(c);return s.join("")})}function Qh(n,t){var i,e=typeof t;return null==t||"boolean"===e?o0(t):("number"===e?Uo:"string"===e?(i=Hl(t))?(t=i,Yh):Ay:t instanceof Hl?Yh:t instanceof Date?CK:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(t)?vK:Array.isArray(t)?xK:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?MK:Uo)(n,t)}function oL(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}var Ry,sL,SK,pD,wK=180/Math.PI,uD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function aL(n,t,e,i,r,o){var a,s,l;return(a=Math.sqrt(n*n+t*t))&&(n/=a,t/=a),(l=n*e+t*i)&&(e-=n*l,i-=t*l),(s=Math.sqrt(e*e+i*i))&&(e/=s,i/=s,l/=s),n*i<t*e&&(n=-n,t=-t,l=-l,a=-a),{translateX:r,translateY:o,rotate:Math.atan2(t,n)*wK,skewX:Math.atan(l)*wK,scaleX:a,scaleY:s}}function DK(n,t,e,i){function r(c){return c.length?c.pop()+" ":""}return function(c,d){var u=[],p=[];return c=n(c),d=n(d),function(c,d,u,p,h,m){if(c!==u||d!==p){var _=h.push("translate(",null,t,null,e);m.push({i:_-4,x:Uo(c,u)},{i:_-2,x:Uo(d,p)})}else(u||p)&&h.push("translate("+u+t+p+e)}(c.translateX,c.translateY,d.translateX,d.translateY,u,p),function(c,d,u,p){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),p.push({i:u.push(r(u)+"rotate(",null,i)-2,x:Uo(c,d)})):d&&u.push(r(u)+"rotate("+d+i)}(c.rotate,d.rotate,u,p),function(c,d,u,p){c!==d?p.push({i:u.push(r(u)+"skewX(",null,i)-2,x:Uo(c,d)}):d&&u.push(r(u)+"skewX("+d+i)}(c.skewX,d.skewX,u,p),function(c,d,u,p,h,m){if(c!==u||d!==p){var _=h.push(r(h)+"scale(",null,",",null,")");m.push({i:_-4,x:Uo(c,u)},{i:_-2,x:Uo(d,p)})}else(1!==u||1!==p)&&h.push(r(h)+"scale("+u+","+p+")")}(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,p),c=d=null,function(h){for(var M,m=-1,_=p.length;++m<_;)u[(M=p[m]).i]=M.x(h);return u.join("")}}}var lL=DK(function(n){return"none"===n?uD:(Ry||(Ry=document.createElement("DIV"),sL=document.documentElement,SK=document.defaultView),Ry.style.transform=n,n=SK.getComputedStyle(sL.appendChild(Ry),null).getPropertyValue("transform"),sL.removeChild(Ry),aL(+(n=n.slice(7,-1).split(","))[0],+n[1],+n[2],+n[3],+n[4],+n[5]))},"px, ","px)","deg)"),cL=DK(function(n){return null==n?uD:(pD||(pD=document.createElementNS("http://www.w3.org/2000/svg","g")),pD.setAttribute("transform",n),(n=pD.transform.baseVal.consolidate())?aL((n=n.matrix).a,n.b,n.c,n.d,n.e,n.f):uD)},", ",")",")");function IK(n){return function(t,e){var i=n((t=qh(t)).h,(e=qh(e)).h),r=Ka(t.s,e.s),o=Ka(t.l,e.l),a=Ka(t.opacity,e.opacity);return function(s){return t.h=i(s),t.s=r(s),t.l=o(s),t.opacity=a(s),t+""}}}var dL=IK(dD);function AK(n){return function(t,e){var i=n((t=Xh(t)).h,(e=Xh(e)).h),r=Ka(t.c,e.c),o=Ka(t.l,e.l),a=Ka(t.opacity,e.opacity);return function(s){return t.h=i(s),t.c=r(s),t.l=o(s),t.opacity=a(s),t+""}}}IK(Ka);var hD,Oy,uL=AK(dD),a0=(AK(Ka),0),ky=0,Py=0,PK=1e3,mD=0,Zh=0,fD=0,Fy="object"==typeof performance&&performance.now?performance:Date,kK="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function s0(){return Zh||(kK(rDe),Zh=Fy.now()+fD)}function rDe(){Zh=0}function Ny(){this._call=this._time=this._next=null}function gD(n,t,e){var i=new Ny;return i.restart(n,t,e),i}function RK(){Zh=(mD=Fy.now())+fD,a0=ky=0;try{!function(){s0(),++a0;for(var t,n=hD;n;)(t=Zh-n._time)>=0&&n._call.call(null,t),n=n._next;--a0}()}finally{a0=0,function(){for(var n,e,t=hD,i=1/0;t;)t._call?(i>t._time&&(i=t._time),n=t,t=t._next):(e=t._next,t._next=null,t=n?n._next=e:hD=e);Oy=n,pL(i)}(),Zh=0}}function oDe(){var n=Fy.now(),t=n-mD;t>PK&&(fD-=t,mD=n)}function pL(n){a0||(ky&&(ky=clearTimeout(ky)),n-Zh>24?(n<1/0&&(ky=setTimeout(RK,n-Fy.now()-fD)),Py&&(Py=clearInterval(Py))):(Py||(mD=Fy.now(),Py=setInterval(oDe,PK)),a0=1,kK(RK)))}function _D(n,t,e){var i=new Ny;return i.restart(function(r){i.stop(),n(r+t)},t=null==t?0:+t,e),i}Ny.prototype=gD.prototype={constructor:Ny,restart:function(n,t,e){if("function"!=typeof n)throw new TypeError("callback is not a function");e=(null==e?s0():+e)+(null==t?0:+t),!this._next&&Oy!==this&&(Oy?Oy._next=this:hD=this,Oy=this),this._call=n,this._time=e,pL()},stop:function(){this._call&&(this._call=null,this._time=1/0,pL())}};var sDe=jN("start","end","cancel","interrupt"),lDe=[],NK=0,hL=1,vD=2,bD=3,FK=4,yD=5,Ly=6;function op(n,t,e,i,r,o){var a=n.__transition;if(a){if(e in a)return}else n.__transition={};!function(n,t,e){var r,i=n.__transition;function a(c){var d,u,p,h;if(e.state!==hL)return l();for(d in i)if((h=i[d]).name===e.name){if(h.state===bD)return _D(a);h.state===FK?(h.state=Ly,h.timer.stop(),h.on.call("interrupt",n,n.__data__,h.index,h.group),delete i[d]):+d<t&&(h.state=Ly,h.timer.stop(),h.on.call("cancel",n,n.__data__,h.index,h.group),delete i[d])}if(_D(function(){e.state===bD&&(e.state=FK,e.timer.restart(s,e.delay,e.time),s(c))}),e.state=vD,e.on.call("start",n,n.__data__,e.index,e.group),e.state===vD){for(e.state=bD,r=new Array(p=e.tween.length),d=0,u=-1;d<p;++d)(h=e.tween[d].value.call(n,n.__data__,e.index,e.group))&&(r[++u]=h);r.length=u+1}}function s(c){for(var d=c<e.duration?e.ease.call(null,c/e.duration):(e.timer.restart(l),e.state=yD,1),u=-1,p=r.length;++u<p;)r[u].call(n,d);e.state===yD&&(e.on.call("end",n,n.__data__,e.index,e.group),l())}function l(){for(var c in e.state=Ly,e.timer.stop(),delete i[t],i)return;delete n.__transition}i[t]=e,e.timer=gD(function(c){e.state=hL,e.timer.restart(a,e.delay,e.time),e.delay<=c&&a(c-e.delay)},0,e.time)}(n,e,{name:t,index:i,group:r,on:sDe,tween:lDe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:NK})}function By(n,t){var e=_o(n,t);if(e.state>NK)throw new Error("too late; already scheduled");return e}function ya(n,t){var e=_o(n,t);if(e.state>bD)throw new Error("too late; already running");return e}function _o(n,t){var e=n.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function dDe(n,t){var e,i;return function(){var r=ya(this,n),o=r.tween;if(o!==e)for(var a=0,s=(i=e=o).length;a<s;++a)if(i[a].name===t){(i=i.slice()).splice(a,1);break}r.tween=i}}function uDe(n,t,e){var i,r;if("function"!=typeof e)throw new Error;return function(){var o=ya(this,n),a=o.tween;if(a!==i){r=(i=a).slice();for(var s={name:t,value:e},l=0,c=r.length;l<c;++l)if(r[l].name===t){r[l]=s;break}l===c&&r.push(s)}o.tween=r}}function l0(n,t,e){var i=n._id;return n.each(function(){var r=ya(this,i);(r.value||(r.value={}))[t]=e.apply(this,arguments)}),function(r){return _o(r,i).value[t]}}function xD(n,t){var e;return("number"==typeof t?Uo:t instanceof Hl?Yh:(e=Hl(t))?(t=e,Yh):Ay)(n,t)}function pDe(n){return function(){this.removeAttribute(n)}}function hDe(n){return function(){this.removeAttributeNS(n.space,n.local)}}function mDe(n,t,e){var i,o,r=e+"";return function(){var a=this.getAttribute(n);return a===r?null:a===i?o:o=t(i=a,e)}}function fDe(n,t,e){var i,o,r=e+"";return function(){var a=this.getAttributeNS(n.space,n.local);return a===r?null:a===i?o:o=t(i=a,e)}}function gDe(n,t,e){var i,r,o;return function(){var a,l,s=e(this);return null==s?void this.removeAttribute(n):(a=this.getAttribute(n))===(l=s+"")?null:a===i&&l===r?o:(r=l,o=t(i=a,s))}}function _De(n,t,e){var i,r,o;return function(){var a,l,s=e(this);return null==s?void this.removeAttributeNS(n.space,n.local):(a=this.getAttributeNS(n.space,n.local))===(l=s+"")?null:a===i&&l===r?o:(r=l,o=t(i=a,s))}}function yDe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&function(n,t){return function(e){this.setAttributeNS(n.space,n.local,t.call(this,e))}}(n,o)),e}return r._value=t,r}function xDe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&function(n,t){return function(e){this.setAttribute(n,t.call(this,e))}}(n,o)),e}return r._value=t,r}function CDe(n,t){return function(){By(this,n).delay=+t.apply(this,arguments)}}function MDe(n,t){return t=+t,function(){By(this,n).delay=t}}function wDe(n,t){return function(){ya(this,n).duration=+t.apply(this,arguments)}}function SDe(n,t){return t=+t,function(){ya(this,n).duration=t}}var ADe=Rd.prototype.constructor;function KK(n){return function(){this.style.removeProperty(n)}}var zDe=0;function ta(n,t,e,i){this._groups=n,this._parents=t,this._name=e,this._id=i}function CD(){return++zDe}var c0=Rd.prototype;ta.prototype=function(n){return Rd().transition(n)}.prototype={constructor:ta,select:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=Gh(n));for(var i=this._groups,r=i.length,o=new Array(r),a=0;a<r;++a)for(var d,u,s=i[a],l=s.length,c=o[a]=new Array(l),p=0;p<l;++p)(d=s[p])&&(u=n.call(d,d.__data__,p,s))&&("__data__"in d&&(u.__data__=d.__data__),c[p]=u,op(c[p],t,e,p,c,_o(d,e)));return new ta(o,this._parents,t,e)},selectAll:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=Sy(n));for(var i=this._groups,r=i.length,o=[],a=[],s=0;s<r;++s)for(var d,l=i[s],c=l.length,u=0;u<c;++u)if(d=l[u]){for(var h,p=n.call(d,d.__data__,u,l),m=_o(d,e),_=0,M=p.length;_<M;++_)(h=p[_])&&op(h,t,e,_,p,m);o.push(p),a.push(d)}return new ta(o,a,t,e)},filter:function(n){"function"!=typeof n&&(n=Ey(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],a=o.length,s=i[r]=[],c=0;c<a;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&s.push(l);return new ta(i,this._parents,this._name,this._id)},merge:function(n){if(n._id!==this._id)throw new Error;for(var t=this._groups,e=n._groups,i=t.length,o=Math.min(i,e.length),a=new Array(i),s=0;s<o;++s)for(var p,l=t[s],c=e[s],d=l.length,u=a[s]=new Array(d),h=0;h<d;++h)(p=l[h]||c[h])&&(u[h]=p);for(;s<i;++s)a[s]=t[s];return new ta(a,this._parents,this._name,this._id)},selection:function(){return new ADe(this._groups,this._parents)},transition:function(){for(var n=this._name,t=this._id,e=CD(),i=this._groups,r=i.length,o=0;o<r;++o)for(var l,a=i[o],s=a.length,c=0;c<s;++c)if(l=a[c]){var d=_o(l,t);op(l,n,e,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ta(i,this._parents,n,e)},call:c0.call,nodes:c0.nodes,node:c0.node,size:c0.size,empty:c0.empty,each:c0.each,on:function(n,t){var e=this._id;return arguments.length<2?_o(this.node(),e).on.on(n):this.each(function(n,t,e){var i,r,o=function(n){return(n+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(t)?By:ya;return function(){var a=o(this,n),s=a.on;s!==i&&(r=(i=s).copy()).on(t,e),a.on=r}}(e,n,t))},attr:function(n,t){var e=Ad(n),i="transform"===e?cL:xD;return this.attrTween(n,"function"==typeof t?(e.local?_De:gDe)(e,i,l0(this,"attr."+n,t)):null==t?(e.local?hDe:pDe)(e):(e.local?fDe:mDe)(e,i,t))},attrTween:function(n,t){var e="attr."+n;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;var i=Ad(n);return this.tween(e,(i.local?yDe:xDe)(i,t))},style:function(n,t,e){var i="transform"==(n+="")?lL:xD;return null==t?this.styleTween(n,function(n,t){var e,i,r;return function(){var o=ip(this,n),a=(this.style.removeProperty(n),ip(this,n));return o===a?null:o===e&&a===i?r:r=t(e=o,i=a)}}(n,i)).on("end.style."+n,KK(n)):"function"==typeof t?this.styleTween(n,function(n,t,e){var i,r,o;return function(){var a=ip(this,n),s=e(this),l=s+"";return null==s&&(this.style.removeProperty(n),l=s=ip(this,n)),a===l?null:a===i&&l===r?o:(r=l,o=t(i=a,s))}}(n,i,l0(this,"style."+n,t))).each(function(n,t){var e,i,r,s,o="style."+t,a="end."+o;return function(){var l=ya(this,n),c=l.on,d=null==l.value[o]?s||(s=KK(t)):void 0;(c!==e||r!==d)&&(i=(e=c).copy()).on(a,r=d),l.on=i}}(this._id,n)):this.styleTween(n,function(n,t,e){var i,o,r=e+"";return function(){var a=ip(this,n);return a===r?null:a===i?o:o=t(i=a,e)}}(n,i,t),e).on("end.style."+n,null)},styleTween:function(n,t,e){var i="style."+(n+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,function(n,t,e){var i,r;function o(){var a=t.apply(this,arguments);return a!==r&&(i=(r=a)&&function(n,t,e){return function(i){this.style.setProperty(n,t.call(this,i),e)}}(n,a,e)),i}return o._value=t,o}(n,t,e??""))},text:function(n){return this.tween("text","function"==typeof n?function(n){return function(){var t=n(this);this.textContent=t??""}}(l0(this,"text",n)):function(n){return function(){this.textContent=n}}(null==n?"":n+""))},textTween:function(n){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==n)return this.tween(t,null);if("function"!=typeof n)throw new Error;return this.tween(t,function(n){var t,e;function i(){var r=n.apply(this,arguments);return r!==e&&(t=(e=r)&&function(n){return function(t){this.textContent=n.call(this,t)}}(r)),t}return i._value=n,i}(n))},remove:function(){return this.on("end.remove",function(n){return function(){var t=this.parentNode;for(var e in this.__transition)if(+e!==n)return;t&&t.removeChild(this)}}(this._id))},tween:function(n,t){var e=this._id;if(n+="",arguments.length<2){for(var a,i=_o(this.node(),e).tween,r=0,o=i.length;r<o;++r)if((a=i[r]).name===n)return a.value;return null}return this.each((null==t?dDe:uDe)(e,n,t))},delay:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?CDe:MDe)(t,n)):_o(this.node(),t).delay},duration:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?wDe:SDe)(t,n)):_o(this.node(),t).duration},ease:function(n){var t=this._id;return arguments.length?this.each(function(n,t){if("function"!=typeof t)throw new Error;return function(){ya(this,n).ease=t}}(t,n)):_o(this.node(),t).ease},end:function(){var n,t,e=this,i=e._id,r=e.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0==--r&&o()}};e.each(function(){var c=ya(this,i),d=c.on;d!==n&&((t=(n=d).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}};var fL={time:null,delay:0,duration:250,ease:function(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}};function UDe(n,t){for(var e;!(e=n.__transition)||!(e=e[t]);)if(!(n=n.parentNode))return fL.time=s0(),fL;return e}function gL(n){return{type:n}}Rd.prototype.interrupt=function(n){return this.each(function(){!function(n,t){var i,r,a,e=n.__transition,o=!0;if(e){for(a in t=null==t?null:t+"",e)(i=e[a]).name===t?(r=i.state>vD&&i.state<yD,i.state=Ly,i.timer.stop(),i.on.call(r?"interrupt":"cancel",n,n.__data__,i.index,i.group),delete e[a]):o=!1;o&&delete n.__transition}}(this,n)})},Rd.prototype.transition=function(n){var t,e;n instanceof ta?(t=n._id,n=n._name):(t=CD(),(e=fL).time=s0(),n=null==n?null:n+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var l,a=i[o],s=a.length,c=0;c<s;++c)(l=a[c])&&op(l,n,t,c,a,e||UDe(l,t));return new ta(i,this._parents,n,t)},["w","e"].map(gL),["n","s"].map(gL),["n","w","e","s","nw","ne","sw","se"].map(gL),Math;var Ms="$";function wD(){}function sJ(n,t){var e=new wD;if(n instanceof wD)n.each(function(s,l){e.set(l,s)});else if(Array.isArray(n)){var o,i=-1,r=n.length;if(null==t)for(;++i<r;)e.set(i,n[i]);else for(;++i<r;)e.set(t(o=n[i],i,n),o)}else if(n)for(var a in n)e.set(a,n[a]);return e}function SD(){}wD.prototype=sJ.prototype={constructor:wD,has:function(n){return Ms+n in this},get:function(n){return this[Ms+n]},set:function(n,t){return this[Ms+n]=t,this},remove:function(n){var t=Ms+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===Ms&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===Ms&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===Ms&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===Ms&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===Ms&&++n;return n},empty:function(){for(var n in this)if(n[0]===Ms)return!1;return!0},each:function(n){for(var t in this)t[0]===Ms&&n(this[t],t.slice(1),this)}};var Jh=sJ.prototype;function $h(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function zc(n){return(n=$h(Math.abs(n)))?n[1]:NaN}SD.prototype=function(n,t){var e=new SD;if(n instanceof SD)n.each(function(o){e.add(o)});else if(n){var i=-1,r=n.length;if(null==t)for(;++i<r;)e.add(n[i]);else for(;++i<r;)e.add(t(n[i],i,n))}return e}.prototype={constructor:SD,has:Jh.has,add:function(n){return this[Ms+(n+="")]=n,this},remove:Jh.remove,clear:Jh.clear,values:Jh.keys,size:Jh.size,empty:Jh.empty,each:Jh.each},Math,Math.sqrt(5);var _L,KDe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ap(n){if(!(t=KDe.exec(n)))throw new Error("invalid format: "+n);var t;return new ED({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ED(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function bL(n,t){var e=$h(n,t);if(!e)return n+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}ap.prototype=ED.prototype,ED.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var vL={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return bL(100*n,t)},r:bL,s:function(n,t){var e=$h(n,t);if(!e)return n+"";var i=e[0],r=e[1],o=r-(_L=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+$h(n,Math.max(0,t+o-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};function yL(n){return n}var TD,Yr,DD,fJ=Array.prototype.map,gJ=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function sl(){return Math.random()}TD=function(n){var t=void 0===n.grouping||void 0===n.thousands?yL:function(n,t){return function(e,i){for(var r=e.length,o=[],a=0,s=n[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(e.substring(r-=s,r+s)),!((l+=s+1)>i));)s=n[a=(a+1)%n.length];return o.reverse().join(t)}}(fJ.call(n.grouping,Number),n.thousands+""),e=void 0===n.currency?"":n.currency[0]+"",i=void 0===n.currency?"":n.currency[1]+"",r=void 0===n.decimal?".":n.decimal+"",o=void 0===n.numerals?yL:function(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}(fJ.call(n.numerals,String)),a=void 0===n.percent?"%":n.percent+"",s=void 0===n.minus?"-":n.minus+"",l=void 0===n.nan?"NaN":n.nan+"";function c(u){var p=(u=ap(u)).fill,h=u.align,m=u.sign,_=u.symbol,M=u.zero,y=u.width,x=u.comma,R=u.precision,I=u.trim,B=u.type;"n"===B?(x=!0,B="g"):vL[B]||(void 0===R&&(R=12),I=!0,B="g"),(M||"0"===p&&"="===h)&&(M=!0,p="0",h="=");var ee="$"===_?e:"#"===_&&/[boxX]/.test(B)?"0"+B.toLowerCase():"",Q="$"===_?i:/[%p]/.test(B)?a:"",we=vL[B],Qe=/[defgprs%]/.test(B);function Ae(D){var he,_e,$,re=ee,ce=Q;if("c"===B)ce=we(D)+ce,D="";else{var de=(D=+D)<0||1/D<0;if(D=isNaN(D)?l:we(Math.abs(D),R),I&&(D=function(n){e:for(var r,t=n.length,e=1,i=-1;e<t;++e)switch(n[e]){case".":i=r=e;break;case"0":0===i&&(i=e),r=e;break;default:if(!+n[e])break e;i>0&&(i=0)}return i>0?n.slice(0,i)+n.slice(r+1):n}(D)),de&&0==+D&&"+"!==m&&(de=!1),re=(de?"("===m?m:s:"-"===m||"("===m?"":m)+re,ce=("s"===B?gJ[8+_L/3]:"")+ce+(de&&"("===m?")":""),Qe)for(he=-1,_e=D.length;++he<_e;)if(48>($=D.charCodeAt(he))||$>57){ce=(46===$?r+D.slice(he+1):D.slice(he))+ce,D=D.slice(0,he);break}}x&&!M&&(D=t(D,1/0));var pe=re.length+D.length+ce.length,Ge=pe<y?new Array(y-pe+1).join(p):"";switch(x&&M&&(D=t(Ge+D,Ge.length?y-ce.length:1/0),Ge=""),h){case"<":D=re+D+ce+Ge;break;case"=":D=re+Ge+D+ce;break;case"^":D=Ge.slice(0,pe=Ge.length>>1)+re+D+ce+Ge.slice(pe);break;default:D=Ge+re+D+ce}return o(D)}return R=void 0===R?6:/[gprs]/.test(B)?Math.max(1,Math.min(21,R)):Math.max(0,Math.min(20,R)),Ae.toString=function(){return u+""},Ae}return{format:c,formatPrefix:function(u,p){var h=c(((u=ap(u)).type="f",u)),m=3*Math.max(-8,Math.min(8,Math.floor(zc(p)/3))),_=Math.pow(10,-m),M=gJ[8+m/3];return function(y){return h(_*y)+M}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Yr=TD.format,DD=TD.formatPrefix,function n(t){function e(i,r){return i=null==i?0:+i,r=null==r?1:+r,1===arguments.length?(r=i,i=0):r-=i,function(){return t()*r+i}}return e.source=n,e}(sl);var SL=function n(t){function e(i,r){var o,a;return i=null==i?0:+i,r=null==r?1:+r,function(){var s;if(null!=o)s=o,o=null;else do{o=2*t()-1,s=2*t()-1,a=o*o+s*s}while(!a||a>1);return i+r*s*Math.sqrt(-2*Math.log(a)/a)}}return e.source=n,e}(sl),EL=(function n(t){function e(){var i=SL.source(t).apply(this,arguments);return function(){return Math.exp(i())}}return e.source=n,e}(sl),function n(t){function e(i){return function(){for(var r=0,o=0;o<i;++o)r+=t();return r}}return e.source=n,e}(sl));function Ja(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n)}return this}(function n(t){function e(i){var r=EL.source(t)(i);return function(){return r()/i}}return e.source=n,e})(sl),function n(t){function e(i){return function(){return-Math.log(1-t())/i}}return e.source=n,e}(sl);var bJ=Array.prototype,zy=bJ.map,em=bJ.slice;function TL(n){return+n}var yJ=[0,1];function $a(n){return n}function DL(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:function(n){return function(){return n}}(isNaN(t)?NaN:.5)}function xJ(n){var i,t=n[0],e=n[n.length-1];return t>e&&(i=t,t=e,e=i),function(r){return Math.max(t,Math.min(e,r))}}function iIe(n,t,e){var i=n[0],r=n[1],o=t[0],a=t[1];return r<i?(i=DL(r,i),o=e(a,o)):(i=DL(i,r),o=e(o,a)),function(s){return o(i(s))}}function rIe(n,t,e){var i=Math.min(n.length,t.length)-1,r=new Array(i),o=new Array(i),a=-1;for(n[i]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=DL(n[a],n[a+1]),o[a]=e(t[a],t[a+1]);return function(s){var l=Lc(n,s,1,i)-1;return o[l](r[l](s))}}function sp(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Uy(){var i,r,o,s,l,c,n=yJ,t=yJ,e=Qh,a=$a;function d(){return s=Math.min(n.length,t.length)>2?rIe:iIe,l=c=null,u}function u(p){return isNaN(p=+p)?o:(l||(l=s(n.map(i),t,e)))(i(a(p)))}return u.invert=function(p){return a(r((c||(c=s(t,n.map(i),Uo)))(p)))},u.domain=function(p){return arguments.length?(n=zy.call(p,TL),a===$a||(a=xJ(n)),d()):n.slice()},u.range=function(p){return arguments.length?(t=em.call(p),d()):t.slice()},u.rangeRound=function(p){return t=em.call(p),e=oL,d()},u.clamp=function(p){return arguments.length?(a=p?xJ(n):$a,u):a!==$a},u.interpolate=function(p){return arguments.length?(e=p,d()):e},u.unknown=function(p){return arguments.length?(o=p,u):o},function(p,h){return i=p,r=h,d()}}function jy(n,t){return Uy()(n,t)}function zl(){var n=jy($a,$a);return n.copy=function(){return sp(n,zl())},Ja.apply(n,arguments),function(n){var t=n.domain;return n.ticks=function(e){var i=t();return My(i[0],i[i.length-1],e??10)},n.tickFormat=function(e,i){var r=t();return function(n,t,e,i){var o,r=Id(n,t,e);switch((i=ap(i??",f")).type){case"s":var a=Math.max(Math.abs(n),Math.abs(t));return null==i.precision&&!isNaN(o=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zc(t)/3)))-zc(Math.abs(n)))}(r,a))&&(i.precision=o),DD(i,a);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(o=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,zc(t)-zc(n))+1}(r,Math.max(Math.abs(n),Math.abs(t))))&&(i.precision=o-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(o=function(n){return Math.max(0,-zc(Math.abs(n)))}(r))&&(i.precision=o-2*("%"===i.type))}return Yr(i)}(r[0],r[r.length-1],e??10,i)},n.nice=function(e){null==e&&(e=10);var l,i=t(),r=0,o=i.length-1,a=i[r],s=i[o];return s<a&&(l=a,a=s,s=l,l=r,r=o,o=l),(l=e0(a,s,e))>0?l=e0(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,e):l<0&&(l=e0(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,e)),l>0?(i[r]=Math.floor(a/l)*l,i[o]=Math.ceil(s/l)*l,t(i)):l<0&&(i[r]=Math.ceil(a*l)/l,i[o]=Math.floor(s*l)/l,t(i)),n},n}(n)}function ID(n,t){var a,e=0,i=(n=n.slice()).length-1,r=n[e],o=n[i];return o<r&&(a=e,e=i,i=a,a=r,r=o,o=a),n[e]=t.floor(r),n[i]=t.ceil(o),n}function CJ(n){return Math.log(n)}function MJ(n){return Math.exp(n)}function oIe(n){return-Math.log(-n)}function aIe(n){return-Math.exp(-n)}function sIe(n){return isFinite(n)?+("1e"+n):n<0?0:n}function wJ(n){return function(t){return-n(-t)}}function Gy(){var n=function(n){var r,o,t=n(CJ,MJ),e=t.domain,i=10;function a(){return r=function(n){return n===Math.E?Math.log:10===n&&Math.log10||2===n&&Math.log2||(n=Math.log(n),function(t){return Math.log(t)/n})}(i),o=function(n){return 10===n?sIe:n===Math.E?Math.exp:function(t){return Math.pow(n,t)}}(i),e()[0]<0?(r=wJ(r),o=wJ(o),n(oIe,aIe)):n(CJ,MJ),t}return t.base=function(s){return arguments.length?(i=+s,a()):i},t.domain=function(s){return arguments.length?(e(s),a()):e()},t.ticks=function(s){var u,l=e(),c=l[0],d=l[l.length-1];(u=d<c)&&(p=c,c=d,d=p);var m,_,M,p=r(c),h=r(d),y=null==s?10:+s,x=[];if(!(i%1)&&h-p<y){if(p=Math.round(p)-1,h=Math.round(h)+1,c>0){for(;p<h;++p)for(_=1,m=o(p);_<i;++_)if(!((M=m*_)<c)){if(M>d)break;x.push(M)}}else for(;p<h;++p)for(_=i-1,m=o(p);_>=1;--_)if(!((M=m*_)<c)){if(M>d)break;x.push(M)}}else x=My(p,h,Math.min(h-p,y)).map(o);return u?x.reverse():x},t.tickFormat=function(s,l){if(null==l&&(l=10===i?".0e":","),"function"!=typeof l&&(l=Yr(l)),s===1/0)return l;null==s&&(s=10);var c=Math.max(1,i*s/t.ticks().length);return function(d){var u=d/o(Math.round(r(d)));return u*i<i-.5&&(u*=i),u<=c?l(d):""}},t.nice=function(){return e(ID(e(),{floor:function(s){return o(Math.floor(r(s)))},ceil:function(s){return o(Math.ceil(r(s)))}}))},t}(Uy()).domain([1,10]);return n.copy=function(){return sp(n,Gy()).base(n.base())},Ja.apply(n,arguments),n}var RL=new Date,PL=new Date;function nr(n,t,e,i){function r(o){return n(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return n(o=new Date(+o)),o},r.ceil=function(o){return n(o=new Date(o-1)),t(o,1),n(o),o},r.round=function(o){var a=r(o),s=r.ceil(o);return o-a<s-o?a:s},r.offset=function(o,a){return t(o=new Date(+o),null==a?1:Math.floor(a)),o},r.range=function(o,a,s){var c,l=[];if(o=r.ceil(o),s=null==s?1:Math.floor(s),!(o<a&&s>0))return l;do{l.push(c=new Date(+o)),t(o,s),n(o)}while(c<o&&o<a);return l},r.filter=function(o){return nr(function(a){if(a>=a)for(;n(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},e&&(r.count=function(o,a){return RL.setTime(+o),PL.setTime(+a),n(RL),n(PL),Math.floor(e(RL,PL))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(a){return i(a)%o==0}:function(a){return r.count(0,a)%o==0}):r:null}),r}var AD=nr(function(){},function(n,t){n.setTime(+n+t)},function(n,t){return t-n});AD.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?nr(function(t){t.setTime(Math.floor(t/n)*n)},function(t,e){t.setTime(+t+e*n)},function(t,e){return(e-t)/n}):AD:null};var RD=AD,kd=6e4,kD=6048e5,EJ=nr(function(n){n.setTime(n-n.getMilliseconds())},function(n,t){n.setTime(+n+1e3*t)},function(n,t){return(t-n)/1e3},function(n){return n.getUTCSeconds()}),OD=EJ,DJ=nr(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())},function(n,t){n.setTime(+n+t*kd)},function(n,t){return(t-n)/kd},function(n){return n.getMinutes()}),OL=DJ,IJ=nr(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-n.getMinutes()*kd)},function(n,t){n.setTime(+n+36e5*t)},function(n,t){return(t-n)/36e5},function(n){return n.getHours()}),FL=IJ,AJ=nr(function(n){n.setHours(0,0,0,0)},function(n,t){n.setDate(n.getDate()+t)},function(n,t){return(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*kd)/864e5},function(n){return n.getDate()-1}),d0=AJ;function im(n){return nr(function(t){t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*kd)/kD})}var rm=im(0),u0=im(1),lp=(im(2),im(3),im(4)),NJ=(im(5),im(6),nr(function(n){n.setDate(1),n.setHours(0,0,0,0)},function(n,t){n.setMonth(n.getMonth()+t)},function(n,t){return t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())},function(n){return n.getMonth()})),NL=NJ,LL=nr(function(n){n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n,t){return t.getFullYear()-n.getFullYear()},function(n){return n.getFullYear()});LL.every=function(n){return isFinite(n=Math.floor(n))&&n>0?nr(function(t){t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e*n)}):null};var Od=LL,LJ=nr(function(n){n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCDate(n.getUTCDate()+t)},function(n,t){return(t-n)/864e5},function(n){return n.getUTCDate()-1}),FD=LJ;function om(n){return nr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/kD})}var Wy=om(0),p0=om(1),cp=(om(2),om(3),om(4)),BL=(om(5),om(6),nr(function(n){n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCFullYear(n.getUTCFullYear()+t)},function(n,t){return t.getUTCFullYear()-n.getUTCFullYear()},function(n){return n.getUTCFullYear()}));BL.every=function(n){return isFinite(n=Math.floor(n))&&n>0?nr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e*n)}):null};var am=BL;function VL(n){if(0<=n.y&&n.y<100){var t=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return t.setFullYear(n.y),t}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function HL(n){if(0<=n.y&&n.y<100){var t=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function qy(n,t,e){return{y:n,m:t,d:e,H:0,M:0,S:0,L:0}}var h0,m0,jJ={"-":"",_:" ",0:"0"},Po=/^\s*\d+/,IIe=/^%/,AIe=/[\\^$*+?|[\]().{}]/g;function Fi(n,t,e){var i=n<0?"-":"",r=(i?-n:n)+"",o=r.length;return i+(o<e?new Array(e-o+1).join(t)+r:r)}function RIe(n){return n.replace(AIe,"\\$&")}function Xy(n){return new RegExp("^(?:"+n.map(RIe).join("|")+")","i")}function Yy(n){for(var t={},e=-1,i=n.length;++e<i;)t[n[e].toLowerCase()]=e;return t}function PIe(n,t,e){var i=Po.exec(t.slice(e,e+1));return i?(n.w=+i[0],e+i[0].length):-1}function kIe(n,t,e){var i=Po.exec(t.slice(e,e+1));return i?(n.u=+i[0],e+i[0].length):-1}function OIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.U=+i[0],e+i[0].length):-1}function FIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.V=+i[0],e+i[0].length):-1}function NIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.W=+i[0],e+i[0].length):-1}function GJ(n,t,e){var i=Po.exec(t.slice(e,e+4));return i?(n.y=+i[0],e+i[0].length):-1}function WJ(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function LIe(n,t,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(e,e+6));return i?(n.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function BIe(n,t,e){var i=Po.exec(t.slice(e,e+1));return i?(n.q=3*i[0]-3,e+i[0].length):-1}function VIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.m=i[0]-1,e+i[0].length):-1}function qJ(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.d=+i[0],e+i[0].length):-1}function HIe(n,t,e){var i=Po.exec(t.slice(e,e+3));return i?(n.m=0,n.d=+i[0],e+i[0].length):-1}function XJ(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.H=+i[0],e+i[0].length):-1}function zIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.M=+i[0],e+i[0].length):-1}function UIe(n,t,e){var i=Po.exec(t.slice(e,e+2));return i?(n.S=+i[0],e+i[0].length):-1}function jIe(n,t,e){var i=Po.exec(t.slice(e,e+3));return i?(n.L=+i[0],e+i[0].length):-1}function GIe(n,t,e){var i=Po.exec(t.slice(e,e+6));return i?(n.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function WIe(n,t,e){var i=IIe.exec(t.slice(e,e+1));return i?e+i[0].length:-1}function qIe(n,t,e){var i=Po.exec(t.slice(e));return i?(n.Q=+i[0],e+i[0].length):-1}function XIe(n,t,e){var i=Po.exec(t.slice(e));return i?(n.s=+i[0],e+i[0].length):-1}function YJ(n,t){return Fi(n.getDate(),t,2)}function YIe(n,t){return Fi(n.getHours(),t,2)}function QIe(n,t){return Fi(n.getHours()%12||12,t,2)}function ZIe(n,t){return Fi(1+d0.count(Od(n),n),t,3)}function $J(n,t){return Fi(n.getMilliseconds(),t,3)}function KIe(n,t){return $J(n,t)+"000"}function JIe(n,t){return Fi(n.getMonth()+1,t,2)}function $Ie(n,t){return Fi(n.getMinutes(),t,2)}function eAe(n,t){return Fi(n.getSeconds(),t,2)}function tAe(n){var t=n.getDay();return 0===t?7:t}function nAe(n,t){return Fi(rm.count(Od(n)-1,n),t,2)}function e$(n){var t=n.getDay();return t>=4||0===t?lp(n):lp.ceil(n)}function iAe(n,t){return n=e$(n),Fi(lp.count(Od(n),n)+(4===Od(n).getDay()),t,2)}function rAe(n){return n.getDay()}function oAe(n,t){return Fi(u0.count(Od(n)-1,n),t,2)}function aAe(n,t){return Fi(n.getFullYear()%100,t,2)}function sAe(n,t){return Fi((n=e$(n)).getFullYear()%100,t,2)}function lAe(n,t){return Fi(n.getFullYear()%1e4,t,4)}function cAe(n,t){var e=n.getDay();return Fi((n=e>=4||0===e?lp(n):lp.ceil(n)).getFullYear()%1e4,t,4)}function dAe(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fi(t/60|0,"0",2)+Fi(t%60,"0",2)}function QJ(n,t){return Fi(n.getUTCDate(),t,2)}function uAe(n,t){return Fi(n.getUTCHours(),t,2)}function pAe(n,t){return Fi(n.getUTCHours()%12||12,t,2)}function hAe(n,t){return Fi(1+FD.count(am(n),n),t,3)}function t$(n,t){return Fi(n.getUTCMilliseconds(),t,3)}function mAe(n,t){return t$(n,t)+"000"}function fAe(n,t){return Fi(n.getUTCMonth()+1,t,2)}function gAe(n,t){return Fi(n.getUTCMinutes(),t,2)}function _Ae(n,t){return Fi(n.getUTCSeconds(),t,2)}function bAe(n){var t=n.getUTCDay();return 0===t?7:t}function vAe(n,t){return Fi(Wy.count(am(n)-1,n),t,2)}function n$(n){var t=n.getUTCDay();return t>=4||0===t?cp(n):cp.ceil(n)}function yAe(n,t){return n=n$(n),Fi(cp.count(am(n),n)+(4===am(n).getUTCDay()),t,2)}function xAe(n){return n.getUTCDay()}function CAe(n,t){return Fi(p0.count(am(n)-1,n),t,2)}function MAe(n,t){return Fi(n.getUTCFullYear()%100,t,2)}function wAe(n,t){return Fi((n=n$(n)).getUTCFullYear()%100,t,2)}function SAe(n,t){return Fi(n.getUTCFullYear()%1e4,t,4)}function EAe(n,t){var e=n.getUTCDay();return Fi((n=e>=4||0===e?cp(n):cp.ceil(n)).getUTCFullYear()%1e4,t,4)}function TAe(){return"+0000"}function ZJ(){return"%"}function KJ(n){return+n}function JJ(n){return Math.floor(+n/1e3)}h0=function(n){var t=n.dateTime,e=n.date,i=n.time,r=n.periods,o=n.days,a=n.shortDays,s=n.months,l=n.shortMonths,c=Xy(r),d=Yy(r),u=Xy(o),p=Yy(o),h=Xy(a),m=Yy(a),_=Xy(s),M=Yy(s),y=Xy(l),x=Yy(l),R={a:function(Ce){return a[Ce.getDay()]},A:function(Ce){return o[Ce.getDay()]},b:function(Ce){return l[Ce.getMonth()]},B:function(Ce){return s[Ce.getMonth()]},c:null,d:YJ,e:YJ,f:KIe,g:sAe,G:cAe,H:YIe,I:QIe,j:ZIe,L:$J,m:JIe,M:$Ie,p:function(Ce){return r[+(Ce.getHours()>=12)]},q:function(Ce){return 1+~~(Ce.getMonth()/3)},Q:KJ,s:JJ,S:eAe,u:tAe,U:nAe,V:iAe,w:rAe,W:oAe,x:null,X:null,y:aAe,Y:lAe,Z:dAe,"%":ZJ},I={a:function(Ce){return a[Ce.getUTCDay()]},A:function(Ce){return o[Ce.getUTCDay()]},b:function(Ce){return l[Ce.getUTCMonth()]},B:function(Ce){return s[Ce.getUTCMonth()]},c:null,d:QJ,e:QJ,f:mAe,g:wAe,G:EAe,H:uAe,I:pAe,j:hAe,L:t$,m:fAe,M:gAe,p:function(Ce){return r[+(Ce.getUTCHours()>=12)]},q:function(Ce){return 1+~~(Ce.getUTCMonth()/3)},Q:KJ,s:JJ,S:_Ae,u:bAe,U:vAe,V:yAe,w:xAe,W:CAe,x:null,X:null,y:MAe,Y:SAe,Z:TAe,"%":ZJ},B={a:function(Ce,mt,ht){var oe=h.exec(mt.slice(ht));return oe?(Ce.w=m[oe[0].toLowerCase()],ht+oe[0].length):-1},A:function(Ce,mt,ht){var oe=u.exec(mt.slice(ht));return oe?(Ce.w=p[oe[0].toLowerCase()],ht+oe[0].length):-1},b:function(Ce,mt,ht){var oe=y.exec(mt.slice(ht));return oe?(Ce.m=x[oe[0].toLowerCase()],ht+oe[0].length):-1},B:function(Ce,mt,ht){var oe=_.exec(mt.slice(ht));return oe?(Ce.m=M[oe[0].toLowerCase()],ht+oe[0].length):-1},c:function(Ce,mt,ht){return we(Ce,t,mt,ht)},d:qJ,e:qJ,f:GIe,g:WJ,G:GJ,H:XJ,I:XJ,j:HIe,L:jIe,m:VIe,M:zIe,p:function(Ce,mt,ht){var oe=c.exec(mt.slice(ht));return oe?(Ce.p=d[oe[0].toLowerCase()],ht+oe[0].length):-1},q:BIe,Q:qIe,s:XIe,S:UIe,u:kIe,U:OIe,V:FIe,w:PIe,W:NIe,x:function(Ce,mt,ht){return we(Ce,e,mt,ht)},X:function(Ce,mt,ht){return we(Ce,i,mt,ht)},y:WJ,Y:GJ,Z:LIe,"%":WIe};function ee(Ce,mt){return function(ht){var ut,an,yn,oe=[],at=-1,Ye=0,_t=Ce.length;for(ht instanceof Date||(ht=new Date(+ht));++at<_t;)37===Ce.charCodeAt(at)&&(oe.push(Ce.slice(Ye,at)),null!=(an=jJ[ut=Ce.charAt(++at)])?ut=Ce.charAt(++at):an="e"===ut?" ":"0",(yn=mt[ut])&&(ut=yn(ht,an)),oe.push(ut),Ye=at+1);return oe.push(Ce.slice(Ye,at)),oe.join("")}}function Q(Ce,mt){return function(ht){var Ye,_t,oe=qy(1900,void 0,1);if(we(oe,Ce,ht+="",0)!=ht.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(1e3*oe.s+("L"in oe?oe.L:0));if(mt&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+12*oe.p),void 0===oe.m&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(_t=(Ye=HL(qy(oe.y,0,1))).getUTCDay(),Ye=_t>4||0===_t?p0.ceil(Ye):p0(Ye),Ye=FD.offset(Ye,7*(oe.V-1)),oe.y=Ye.getUTCFullYear(),oe.m=Ye.getUTCMonth(),oe.d=Ye.getUTCDate()+(oe.w+6)%7):(_t=(Ye=VL(qy(oe.y,0,1))).getDay(),Ye=_t>4||0===_t?u0.ceil(Ye):u0(Ye),Ye=d0.offset(Ye,7*(oe.V-1)),oe.y=Ye.getFullYear(),oe.m=Ye.getMonth(),oe.d=Ye.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),_t="Z"in oe?HL(qy(oe.y,0,1)).getUTCDay():VL(qy(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+7*oe.W-(_t+5)%7:oe.w+7*oe.U-(_t+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,HL(oe)):VL(oe)}}function we(Ce,mt,ht,oe){for(var ut,an,at=0,Ye=mt.length,_t=ht.length;at<Ye;){if(oe>=_t)return-1;if(37===(ut=mt.charCodeAt(at++))){if(ut=mt.charAt(at++),!(an=B[ut in jJ?mt.charAt(at++):ut])||(oe=an(Ce,ht,oe))<0)return-1}else if(ut!=ht.charCodeAt(oe++))return-1}return oe}return R.x=ee(e,R),R.X=ee(i,R),R.c=ee(t,R),I.x=ee(e,I),I.X=ee(i,I),I.c=ee(t,I),{format:function(Ce){var mt=ee(Ce+="",R);return mt.toString=function(){return Ce},mt},parse:function(Ce){var mt=Q(Ce+="",!1);return mt.toString=function(){return Ce},mt},utcFormat:function(Ce){var mt=ee(Ce+="",I);return mt.toString=function(){return Ce},mt},utcParse:function(Ce){var mt=Q(Ce+="",!0);return mt.toString=function(){return Ce},mt}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),m0=h0.format;var Qy=1e3,Zy=60*Qy,Ky=60*Zy,Jy=24*Ky,DAe=7*Jy,a$=30*Jy,jL=365*Jy;function IAe(n){return new Date(n)}function AAe(n){return n instanceof Date?+n:+new Date(+n)}function GL(n,t,e,i,r,o,a,s,l){var c=jy($a,$a),d=c.invert,u=c.domain,p=l(".%L"),h=l(":%S"),m=l("%I:%M"),_=l("%I %p"),M=l("%a %d"),y=l("%b %d"),x=l("%B"),R=l("%Y"),I=[[a,1,Qy],[a,5,5*Qy],[a,15,15*Qy],[a,30,30*Qy],[o,1,Zy],[o,5,5*Zy],[o,15,15*Zy],[o,30,30*Zy],[r,1,Ky],[r,3,3*Ky],[r,6,6*Ky],[r,12,12*Ky],[i,1,Jy],[i,2,2*Jy],[e,1,DAe],[t,1,a$],[t,3,3*a$],[n,1,jL]];function B(Q){return(a(Q)<Q?p:o(Q)<Q?h:r(Q)<Q?m:i(Q)<Q?_:t(Q)<Q?e(Q)<Q?M:y:n(Q)<Q?x:R)(Q)}function ee(Q,we,Qe,Ae){if(null==Q&&(Q=10),"number"==typeof Q){var D=Math.abs(Qe-we)/Q,re=Cy(function(ce){return ce[2]}).right(I,D);re===I.length?(Ae=Id(we/jL,Qe/jL,Q),Q=n):re?(Ae=(re=I[D/I[re-1][2]<I[re][2]/D?re-1:re])[1],Q=re[0]):(Ae=Math.max(Id(we,Qe,Q),1),Q=s)}return null==Ae?Q:Q.every(Ae)}return c.invert=function(Q){return new Date(d(Q))},c.domain=function(Q){return arguments.length?u(zy.call(Q,AAe)):u().map(IAe)},c.ticks=function(Q,we){var ce,Qe=u(),Ae=Qe[0],D=Qe[Qe.length-1],re=D<Ae;return re&&(ce=Ae,Ae=D,D=ce),ce=(ce=ee(Q,Ae,D,we))?ce.range(Ae,D+1):[],re?ce.reverse():ce},c.tickFormat=function(Q,we){return null==we?B:l(we)},c.nice=function(Q,we){var Qe=u();return(Q=ee(Q,Qe[0],Qe[Qe.length-1],we))?u(ID(Qe,Q)):c},c.copy=function(){return sp(c,GL(n,t,e,i,r,o,a,s,l))},c}function sm(){return Ja.apply(GL(Od,NL,rm,d0,FL,OL,OD,RD,m0).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function WL(){this._=null}function f0(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function $y(n,t){var e=t,i=t.R,r=e.U;r?r.L===e?r.L=i:r.R=i:n._=i,i.U=r,e.U=i,e.R=i.L,e.R&&(e.R.U=e),i.L=e}function ex(n,t){var e=t,i=t.L,r=e.U;r?r.L===e?r.L=i:r.R=i:n._=i,i.U=r,e.U=i,e.L=i.R,e.L&&(e.L.U=e),i.R=e}function l$(n){for(;n.L;)n=n.L;return n}WL.prototype={constructor:WL,insert:function(n,t){var e,i,r;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=l$(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)e===(i=e.U).L?(r=i.R)&&r.C?(e.C=r.C=!1,i.C=!0,n=i):(n===e.R&&($y(this,e),e=(n=e).U),e.C=!1,i.C=!0,ex(this,i)):(r=i.L)&&r.C?(e.C=r.C=!1,i.C=!0,n=i):(n===e.L&&(ex(this,e),e=(n=e).U),e.C=!1,i.C=!0,$y(this,i)),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var e,o,a,t=n.U,i=n.L,r=n.R;if(o=i?r?l$(r):i:r,t?t.L===n?t.L=o:t.R=o:this._=o,i&&r?(a=o.C,o.C=n.C,o.L=i,i.U=o,o!==r?(t=o.U,o.U=n.U,t.L=n=o.R,o.R=r,r.U=o):(o.U=t,t=o,n=o.R)):(a=n.C,n=o),n&&(n.U=t),!a){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===t.L){if((e=t.R).C&&(e.C=!1,t.C=!0,$y(this,t),e=t.R),e.L&&e.L.C||e.R&&e.R.C){(!e.R||!e.R.C)&&(e.L.C=!1,e.C=!0,ex(this,e),e=t.R),e.C=t.C,t.C=e.R.C=!1,$y(this,t),n=this._;break}}else if((e=t.L).C&&(e.C=!1,t.C=!0,ex(this,t),e=t.L),e.L&&e.L.C||e.R&&e.R.C){(!e.L||!e.L.C)&&(e.R.C=!1,e.C=!0,$y(this,e),e=t.L),e.C=t.C,t.C=e.L.C=!1,ex(this,t),n=this._;break}e.C=!0,n=t,t=t.U}while(!n.C);n&&(n.C=!1)}}};var qL=WL;function g0(n,t,e,i){var r=[null,null],o=ko.push(r)-1;return r.left=n,r.right=t,e&&tx(r,n,t,e),i&&tx(r,t,n,i),xa[n.index].halfedges.push(o),xa[t.index].halfedges.push(o),r}function _0(n,t,e){var i=[t,e];return i.left=n,i}function tx(n,t,e,i){n[0]||n[1]?n.left===e?n[1]=i:n[0]=i:(n[0]=i,n.left=t,n.right=e)}function kAe(n,t,e,i,r){var _,o=n[0],a=n[1],s=o[0],l=o[1],u=0,p=1,h=a[0]-s,m=a[1]-l;if(_=t-s,h||!(_>0)){if(_/=h,h<0){if(_<u)return;_<p&&(p=_)}else if(h>0){if(_>p)return;_>u&&(u=_)}if(_=i-s,h||!(_<0)){if(_/=h,h<0){if(_>p)return;_>u&&(u=_)}else if(h>0){if(_<u)return;_<p&&(p=_)}if(_=e-l,m||!(_>0)){if(_/=m,m<0){if(_<u)return;_<p&&(p=_)}else if(m>0){if(_>p)return;_>u&&(u=_)}if(_=r-l,m||!(_<0)){if(_/=m,m<0){if(_>p)return;_>u&&(u=_)}else if(m>0){if(_<u)return;_<p&&(p=_)}return!(u>0)&&!(p<1)||(u>0&&(n[0]=[s+u*h,l+u*m]),p<1&&(n[1]=[s+p*h,l+p*m])),!0}}}}}function OAe(n,t,e,i,r){var o=n[1];if(o)return!0;var _,M,a=n[0],s=n.left,l=n.right,c=s[0],d=s[1],u=l[0],p=l[1],h=(c+u)/2;if(p===d){if(h<t||h>=i)return;if(c>u){if(a){if(a[1]>=r)return}else a=[h,e];o=[h,r]}else{if(a){if(a[1]<e)return}else a=[h,r];o=[h,e]}}else if(M=(d+p)/2-(_=(c-u)/(p-d))*h,_<-1||_>1)if(c>u){if(a){if(a[1]>=r)return}else a=[(e-M)/_,e];o=[(r-M)/_,r]}else{if(a){if(a[1]<e)return}else a=[(r-M)/_,r];o=[(e-M)/_,e]}else if(d<p){if(a){if(a[0]>=i)return}else a=[t,_*t+M];o=[i,_*i+M]}else{if(a){if(a[0]<t)return}else a=[i,_*i+M];o=[t,_*t+M]}return n[0]=a,n[1]=o,!0}function FAe(n,t){var e=n.site,i=t.left,r=t.right;return e===r&&(r=i,i=e),r?Math.atan2(r[1]-i[1],r[0]-i[0]):(e===i?(i=t[1],r=t[0]):(i=t[0],r=t[1]),Math.atan2(i[0]-r[0],r[1]-i[1]))}function XL(n,t){return t[+(t.left!==n.site)]}function NAe(n,t){return t[+(t.left===n.site)]}var ND,h$=[];function LAe(){f0(this),this.x=this.y=this.arc=this.site=this.cy=null}function lm(n){var t=n.P,e=n.N;if(t&&e){var i=t.site,r=n.site,o=e.site;if(i!==o){var a=r[0],s=r[1],l=i[0]-a,c=i[1]-s,d=o[0]-a,u=o[1]-s,p=2*(l*u-c*d);if(!(p>=-m$)){var h=l*l+c*c,m=d*d+u*u,_=(u*h-c*m)/p,M=(l*m-d*h)/p,y=h$.pop()||new LAe;y.arc=n,y.site=r,y.x=_+a,y.y=(y.cy=M+s)+Math.sqrt(_*_+M*M),n.circle=y;for(var x=null,R=b0._;R;)if(y.y<R.y||y.y===R.y&&y.x<=R.x){if(!R.L){x=R.P;break}R=R.L}else{if(!R.R){x=R;break}R=R.R}b0.insert(x,y),x||(ND=y)}}}}function cm(n){var t=n.circle;t&&(t.P||(ND=t.N),b0.remove(t),h$.push(t),f0(t),n.circle=null)}var g$=[];function BAe(){f0(this),this.edge=this.site=this.circle=null}function f$(n){var t=g$.pop()||new BAe;return t.site=n,t}function YL(n){cm(n),dm.remove(n),g$.push(n),f0(n)}function _$(n){var t=n.circle,e=t.x,i=t.cy,r=[e,i],o=n.P,a=n.N,s=[n];YL(n);for(var l=o;l.circle&&Math.abs(e-l.circle.x)<Ji&&Math.abs(i-l.circle.cy)<Ji;)o=l.P,s.unshift(l),YL(l),l=o;s.unshift(l),cm(l);for(var c=a;c.circle&&Math.abs(e-c.circle.x)<Ji&&Math.abs(i-c.circle.cy)<Ji;)a=c.N,s.push(c),YL(c),c=a;s.push(c),cm(c);var u,d=s.length;for(u=1;u<d;++u)tx((c=s[u]).edge,(l=s[u-1]).site,c.site,r);(c=s[d-1]).edge=g0((l=s[0]).site,c.site,null,r),lm(l),lm(c)}function b$(n){for(var i,r,o,a,t=n[0],e=n[1],s=dm._;s;)if((o=v$(s,e)-t)>Ji)s=s.L;else{if(!((a=t-VAe(s,e))>Ji)){o>-Ji?(i=s.P,r=s):a>-Ji?(i=s,r=s.N):i=r=s;break}if(!s.R){i=s;break}s=s.R}!function(n){xa[n.index]={site:n,halfedges:[]}}(n);var l=f$(n);if(dm.insert(i,l),i||r){if(i===r)return cm(i),r=f$(i.site),dm.insert(l,r),l.edge=r.edge=g0(i.site,l.site),lm(i),void lm(r);if(!r)return void(l.edge=g0(i.site,l.site));cm(i),cm(r);var c=i.site,d=c[0],u=c[1],p=n[0]-d,h=n[1]-u,m=r.site,_=m[0]-d,M=m[1]-u,y=2*(p*M-h*_),x=p*p+h*h,R=_*_+M*M,I=[(M*x-h*R)/y+d,(p*R-_*x)/y+u];tx(r.edge,c,m,I),l.edge=g0(c,n,null,I),r.edge=g0(n,m,null,I),lm(i),lm(r)}}function v$(n,t){var e=n.site,i=e[0],r=e[1],o=r-t;if(!o)return i;var a=n.P;if(!a)return-1/0;var s=(e=a.site)[0],l=e[1],c=l-t;if(!c)return s;var d=s-i,u=1/o-1/c,p=d/c;return u?(-p+Math.sqrt(p*p-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+i:(i+s)/2}function VAe(n,t){var e=n.N;if(e)return v$(e,t);var i=n.site;return i[1]===t?i[0]:1/0}var dm,xa,b0,ko,Ji=1e-6,m$=1e-12;function HAe(n,t,e){return(n[0]-e[0])*(t[1]-n[1])-(n[0]-t[0])*(e[1]-n[1])}function zAe(n,t){return t[1]-n[1]||t[0]-n[0]}function LD(n,t){var i,r,o,e=n.sort(zAe).pop();for(ko=[],xa=new Array(n.length),dm=new qL,b0=new qL;;)if(o=ND,e&&(!o||e[1]<o.y||e[1]===o.y&&e[0]<o.x))(e[0]!==i||e[1]!==r)&&(b$(e),i=e[0],r=e[1]),e=n.pop();else{if(!o)break;_$(o.arc)}if(function(){for(var e,i,r,o,n=0,t=xa.length;n<t;++n)if((e=xa[n])&&(o=(i=e.halfedges).length)){var a=new Array(o),s=new Array(o);for(r=0;r<o;++r)a[r]=r,s[r]=FAe(e,ko[i[r]]);for(a.sort(function(l,c){return s[c]-s[l]}),r=0;r<o;++r)s[r]=i[a[r]];for(r=0;r<o;++r)i[r]=s[r]}}(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];(function(n,t,e,i){for(var o,r=ko.length;r--;)OAe(o=ko[r],n,t,e,i)&&kAe(o,n,t,e,i)&&(Math.abs(o[0][0]-o[1][0])>Ji||Math.abs(o[0][1]-o[1][1])>Ji)||delete ko[r]})(a,s,l,c),function(n,t,e,i){var o,a,s,l,c,d,u,p,h,m,_,M,r=xa.length,y=!0;for(o=0;o<r;++o)if(a=xa[o]){for(s=a.site,l=(c=a.halfedges).length;l--;)ko[c[l]]||c.splice(l,1);for(l=0,d=c.length;l<d;)_=(m=NAe(a,ko[c[l]]))[0],M=m[1],p=(u=XL(a,ko[c[++l%d]]))[0],h=u[1],(Math.abs(_-p)>Ji||Math.abs(M-h)>Ji)&&(c.splice(l,0,ko.push(_0(s,m,Math.abs(_-n)<Ji&&i-M>Ji?[n,Math.abs(p-n)<Ji?h:i]:Math.abs(M-i)<Ji&&e-_>Ji?[Math.abs(h-i)<Ji?p:e,i]:Math.abs(_-e)<Ji&&M-t>Ji?[e,Math.abs(p-e)<Ji?h:t]:Math.abs(M-t)<Ji&&_-n>Ji?[Math.abs(h-t)<Ji?p:n,t]:null))-1),++d);d&&(y=!1)}if(y){var x,R,I,B=1/0;for(o=0,y=null;o<r;++o)(a=xa[o])&&(I=(x=(s=a.site)[0]-n)*x+(R=s[1]-t)*R)<B&&(B=I,y=a);if(y){var ee=[n,t],Q=[n,i],we=[e,i],Qe=[e,t];y.halfedges.push(ko.push(_0(s=y.site,ee,Q))-1,ko.push(_0(s,Q,we))-1,ko.push(_0(s,we,Qe))-1,ko.push(_0(s,Qe,ee))-1)}}for(o=0;o<r;++o)(a=xa[o])&&(a.halfedges.length||delete xa[o])}(a,s,l,c)}this.edges=ko,this.cells=xa,dm=b0=ko=xa=null}function um(n,t,e){this.k=n,this.x=t,this.y=e}LD.prototype={constructor:LD,polygons:function(){var n=this.edges;return this.cells.map(function(t){var e=t.halfedges.map(function(i){return XL(t,n[i])});return e.data=t.site.data,e})},triangles:function(){var n=[],t=this.edges;return this.cells.forEach(function(e,i){if(s=(o=e.halfedges).length)for(var o,s,l,r=e.site,a=-1,c=t[o[s-1]],d=c.left===r?c.right:c.left;++a<s;)l=d,d=(c=t[o[a]]).left===r?c.right:c.left,l&&d&&i<l.index&&i<d.index&&HAe(r,l,d)<0&&n.push([r.data,l.data,d.data])}),n},links:function(){return this.edges.filter(function(n){return n.right}).map(function(n){return{source:n.left.data,target:n.right.data}})},find:function(n,t,e){for(var r,s,i=this,o=i._found||0,a=i.cells.length;!(s=i.cells[o]);)if(++o>=a)return null;var l=n-s.site[0],c=t-s.site[1],d=l*l+c*c;do{s=i.cells[r=o],o=null,s.halfedges.forEach(function(u){var p=i.edges[u],h=p.left;if(h!==s.site&&h||(h=p.right)){var m=n-h[0],_=t-h[1],M=m*m+_*_;M<d&&(d=M,o=h.index)}})}while(null!==o);return i._found=r,null==e||d<=e*e?s.site:null}},um.prototype={constructor:um,scale:function(n){return 1===n?this:new um(this.k*n,this.x,this.y)},translate:function(n,t){return 0===n&0===t?this:new um(this.k,this.x+this.k*n,this.y+this.k*t)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new um(1,0,0);var i3=1e4,r3=.001,M$=Yr(".2~e"),UAe=Yr(".4~r"),y$=Yr(",~");function x$(n){if(0===n)return"0";let t=Math.abs(n);return t>=i3||t<r3?M$(n):UAe(n)}var dp={formatTick:x$,formatShort:x$,formatReadable(n){let t=Math.abs(n);return t>=i3||t<r3?M$(n):y$(n)},formatLong:y$},jAe=new Intl.NumberFormat(void 0,{maximumFractionDigits:4});function BD(n){return jAe.format(n)}var y0={formatTick:BD,formatShort:BD,formatReadable:BD,formatLong:BD},GAe=Yr("0.3~s"),WAe=Yr(",.3~f");function VD(n){let t=Math.abs(n);return t>=i3||t<r3?GAe(n):WAe(n)}var o3={formatTick:VD,formatShort:VD,formatReadable:VD,formatLong:VD},$L=1e3,e3=60*$L,t3=60*e3,n3=24*t3,C$=365*n3,v0=Yr(".4~");function HD(n){if(0===n)return"0";let t=Math.sign(n)>0?"":"-",e=Math.abs(n);return t+=e<$L?`${v0(e)} ms`:e<e3?`${v0(e/$L)} sec`:e<t3?`${v0(e/e3)} min`:e<n3?`${v0(e/t3)} hr`:e<C$?`${v0(e/n3)} day`:`${v0(e/C$)} yr`,t}var JL,x0={formatTick:HD,formatShort:HD,formatReadable:HD,formatLong:HD},qAe=sm().tickFormat(),w$={formatTick:n=>qAe(new Date(n)),formatShort:n=>new Date(n).toLocaleString(JL,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),formatReadable:n=>new Date(n).toLocaleString(JL,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}),formatLong:n=>new Date(n).toLocaleString(JL,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})};function Ul(n){switch(n){case tr.LINEAR:return new nx;case tr.LOG10:return new a3;case tr.TIME:return new ix;default:throw new RangeError(`ScaleType ${n} not supported.`)}}var nx=class{constructor(){this.defaultFormatter=dp}transform(t,e,i){let[r,o]=t,a=o-r,[s,l]=e;return 0===a?s:(l-s)/a*(i-r)+s}forward(t,e,i){return this.transform(t,e,i)}reverse(t,e,i){return this.transform(e,t,i)}niceDomain(t){let[e,i]=t;if(i<e)throw new Error("Unexpected input: min is larger than max");if(i===e)return 0===e?[-1,1]:e<0?[2*e,0]:[0,2*e];let r=zl(),o=.05*(i-e+Number.EPSILON),[a,s]=r.domain([e-o,i+o]).nice().domain();return[a,s]}ticks(t,e){return zl().domain(t).ticks(e)}isSafeNumber(t){return Number.isFinite(t)}},a3=class{constructor(){this.defaultFormatter=dp}transform(t){return Math.log10(t>0?t:Number.MIN_VALUE)}untransform(t){return Math.exp(t/Math.LOG10E)}forward(t,e,i){if(i<=0)return e[0];let[r,o]=t,[a,s]=e,l=this.transform(r),d=this.transform(o)-l,u=s-a;return i=this.transform(i),u/(d+Number.EPSILON)*(i-l)+a}reverse(t,e,i){let[r,o]=t,[a,s]=e,l=this.transform(r),d=this.transform(o)-l;return this.untransform(d/(s-a+Number.EPSILON)*(i-a)+l)}niceDomain(t){let[e,i]=t;if(e>i)throw new Error("Unexpected input: min is larger than max");let r=Math.max(e,Number.MIN_VALUE),o=Math.max(i,Number.MIN_VALUE);return i<=0?[Number.MIN_VALUE,1]:[Math.max(Number.MIN_VALUE,.5*r),2*o]}ticks(t,e){let i=t[0]<=0?Number.MIN_VALUE:t[0],r=t[1]<=0?Number.MIN_VALUE:t[1],o=Gy().domain([i,r]).ticks(e);return o.length?o:t}isSafeNumber(t){return Number.isFinite(t)&&t>0}},ix=class{constructor(){this.scale=sm(),this.defaultFormatter=w$}forward(t,e,i){return this.scale.domain(t).range(e)(i)}reverse(t,e,i){return this.scale.domain(t).range(e).invert(i).getTime()}niceDomain(t){let[e,i]=this.scale.domain(t).nice().domain();return[e.getTime(),i.getTime()]}ticks(t,e){return this.scale.domain(t).ticks(e).map(i=>i.getTime())}isSafeNumber(t){return Number.isFinite(t)}},s3=!1;if(self.hasOwnProperty("WebGL2RenderingContext")&&self.hasOwnProperty("document")){let n=document.createElement("canvas");n.addEventListener("webglcontextcreationerror",()=>{s3=!1});let t=n.getContext("webgl2");s3=Boolean(t)}var jl_convertRectToExtent=function(n){return{x:[n.x,n.x+n.width],y:[n.y,n.y+n.height]}},jl_isWebGl2Supported=function(){return s3},jl_isWebGl2OffscreenCanvasSupported=function(){if(!self.hasOwnProperty("OffscreenCanvas"))return!1;let n=new OffscreenCanvas(0,0).getContext("webgl2");return Boolean(n)},jl_arePolylinesEqual=function(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0},C0=class{constructor(){this.xScale=Ul(tr.LINEAR),this.yScale=Ul(tr.LINEAR),this.domContainerRect={x:0,width:1,y:0,height:1},this.lastUpdated=0,this.currentViewBoxRect={x:0,width:1,y:0,height:1}}getUpdateIdentifier(){return this.lastUpdated}updateIdentifier(){this.lastUpdated++}isYAxisPointedDown(){return!0}setXScale(t){this.xScale=t,this.updateIdentifier()}setYScale(t){this.yScale=t,this.updateIdentifier()}getCurrentViewBoxRect(){return this.currentViewBoxRect}setViewBoxRect(t){this.currentViewBoxRect=t,this.updateIdentifier()}setDomContainerRect(t){this.domContainerRect=t,this.updateIdentifier()}transformDataToUiCoord(t,e){let i=t,r=jl_convertRectToExtent(this.currentViewBoxRect);return[this.xScale.forward(r.x,[i.x,i.x+i.width],e[0]),this.yScale.forward(r.y,this.isYAxisPointedDown()?[i.y+i.height,i.y]:[i.y,i.y+i.height],e[1])]}};function zD(n,t,e,i){let{color:r,visible:o,opacity:a}=i,s=n;return s||o?(s=s??t(),s=e(s),s.style.display=o?"":"none",s.style.stroke=r,s.style.opacity=String(a??1),s):null}var sV="137",$Ae=0,S$=1,eRe=2,ste=1,tRe=2,mx=3,yx=0,bo=1,Z0=2,vp=0,gx=1,E$=2,T$=3,D$=4,nRe=5,U0=100,iRe=101,rRe=102,I$=103,A$=104,oRe=200,aRe=201,sRe=202,lRe=203,cte=204,dte=205,cRe=206,dRe=207,uRe=208,pRe=209,hRe=210,mRe=0,fRe=1,gRe=2,X3=3,_Re=4,bRe=5,vRe=6,yRe=7,KI=0,xRe=1,CRe=2,yp=0,MRe=1,wRe=2,SRe=3,ERe=4,TRe=5,Wx=301,qx=302,Y3=303,Q3=304,JI=306,lV=307,Z3=1e3,Es=1001,K3=1002,vo=1003,R$=1004,P$=1005,ia=1006,DRe=1007,$I=1008,xp=1009,IRe=1010,ARe=1011,xx=1012,RRe=1013,xI=1014,gm=1015,q0=1016,PRe=1017,kRe=1018,X0=1020,ORe=1021,Ca=1023,FRe=1024,NRe=1025,bm=1026,K0=1027,LRe=1028,BRe=1029,VRe=1030,HRe=1031,zRe=1033,l3=33776,c3=33777,d3=33778,u3=33779,k$=35840,O$=35841,F$=35842,N$=35843,URe=36196,L$=37492,B$=37496,V$=37808,H$=37809,z$=37810,U$=37811,j$=37812,G$=37813,W$=37814,q$=37815,X$=37816,Y$=37817,Q$=37818,Z$=37819,K$=37820,J$=37821,$$=36492,j0=2400,G0=2401,wp=3e3,Dr=3001,YRe=3201,c_=0,QRe=1,Cx=35044,SI=35048,eee="300 es",J3=1035,zd=class{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});let i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;let i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;let r=this._listeners[t];if(void 0!==r){let o=r.indexOf(e);-1!==o&&r.splice(o,1)}}dispatchEvent(t){if(void 0===this._listeners)return;let i=this._listeners[t.type];if(void 0!==i){t.target=this;let r=i.slice(0);for(let o=0,a=r.length;o<a;o++)r[o].call(this,t);t.target=null}}},jo=[];for(let n=0;n<256;n++)jo[n]=(n<16?"0":"")+n.toString(16);var m3=Math.PI/180,$3=180/Math.PI;function Yl(){let n=4294967295*Math.random()|0,t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(jo[255&n]+jo[n>>8&255]+jo[n>>16&255]+jo[n>>24&255]+"-"+jo[255&t]+jo[t>>8&255]+"-"+jo[t>>16&15|64]+jo[t>>24&255]+"-"+jo[63&e|128]+jo[e>>8&255]+"-"+jo[e>>16&255]+jo[e>>24&255]+jo[255&i]+jo[i>>8&255]+jo[i>>16&255]+jo[i>>24&255]).toUpperCase()}function es(n,t,e){return Math.max(t,Math.min(e,n))}function f3(n,t,e){return(1-e)*n+e*t}function tee(n){return 0==(n&n-1)&&0!==n}function JRe(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var $e=class{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,i=this.y,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6],this.y=r[1]*e+r[4]*i+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let i=Math.cos(e),r=Math.sin(e),o=this.x-t.x,a=this.y-t.y;return this.x=o*i-a*r+t.x,this.y=o*r+a*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};$e.prototype.isVector2=!0;var yo=class{constructor(){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.")}set(t,e,i,r,o,a,s,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=s,d[3]=e,d[4]=o,d[5]=l,d[6]=i,d[7]=a,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,r=e.elements,o=this.elements,a=i[0],s=i[3],l=i[6],c=i[1],d=i[4],u=i[7],p=i[2],h=i[5],m=i[8],_=r[0],M=r[3],y=r[6],x=r[1],R=r[4],I=r[7],B=r[2],ee=r[5],Q=r[8];return o[0]=a*_+s*x+l*B,o[3]=a*M+s*R+l*ee,o[6]=a*y+s*I+l*Q,o[1]=c*_+d*x+u*B,o[4]=c*M+d*R+u*ee,o[7]=c*y+d*I+u*Q,o[2]=p*_+h*x+m*B,o[5]=p*M+h*R+m*ee,o[8]=p*y+h*I+m*Q,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8];return e*a*d-e*s*c-i*o*d+i*s*l+r*o*c-r*a*l}invert(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],u=d*a-s*c,p=s*l-d*o,h=c*o-a*l,m=e*u+i*p+r*h;if(0===m)return this.set(0,0,0,0,0,0,0,0,0);let _=1/m;return t[0]=u*_,t[1]=(r*c-d*i)*_,t[2]=(s*i-r*a)*_,t[3]=p*_,t[4]=(d*e-r*l)*_,t[5]=(r*o-s*e)*_,t[6]=h*_,t[7]=(i*l-c*e)*_,t[8]=(a*e-i*o)*_,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,r,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*a+c*s)+a+t,-r*c,r*l,-r*(-c*a+l*s)+s+e,0,0,1),this}scale(t,e){let i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),r=this.elements,o=r[0],a=r[3],s=r[6],l=r[1],c=r[4],d=r[7];return r[0]=e*o+i*l,r[3]=e*a+i*c,r[6]=e*s+i*d,r[1]=-i*o+e*l,r[4]=-i*a+e*c,r[7]=-i*s+e*d,this}translate(t,e){let i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this}equals(t){let e=this.elements,i=t.elements;for(let r=0;r<9;r++)if(e[r]!==i[r])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return(new this.constructor).fromArray(this.elements)}};function hte(n){for(let t=n.length-1;t>=0;--t)if(n[t]>65535)return!0;return!1}function Mx(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}yo.prototype.isMatrix3=!0;var nee={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},Gl={h:0,s:0,l:0},UD={h:0,s:0,l:0};function g3(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+6*(t-n)*e:e<.5?t:e<2/3?n+6*(t-n)*(2/3-e):n}function Y0(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function _3(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}var sn=(()=>{class n{constructor(e,i,r){return void 0===i&&void 0===r?this.set(e):this.setRGB(e,i,r)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(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(e,i,r){return this.r=e,this.g=i,this.b=r,this}setHSL(e,i,r){if(e=function(n,t){return(n%1+1)%1}(e),i=es(i,0,1),r=es(r,0,1),0===i)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+i):r+i-r*i,a=2*r-o;this.r=g3(a,o,e+1/3),this.g=g3(a,o,e),this.b=g3(a,o,e-1/3)}return this}setStyle(e){function i(o){void 0!==o&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let o,s=r[2];switch(r[1]){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,i(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,i(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return i(o[4]),this.setHSL(l,c,d)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],a=o.length;if(3===a)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(6===a)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let i=nee[e.toLowerCase()];return void 0!==i?this.setHex(i):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Y0(e.r),this.g=Y0(e.g),this.b=Y0(e.b),this}copyLinearToSRGB(e){return this.r=_3(e.r),this.g=_3(e.g),this.b=_3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let l,c,i=this.r,r=this.g,o=this.b,a=Math.max(i,r,o),s=Math.min(i,r,o),d=(s+a)/2;if(s===a)l=0,c=0;else{let u=a-s;switch(c=d<=.5?u/(a+s):u/(2-a-s),a){case i:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-i)/u+2;break;case o:l=(i-r)/u+4}l/=6}return e.h=l,e.s=c,e.l=d,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,i,r){return this.getHSL(Gl),Gl.h+=e,Gl.s+=i,Gl.l+=r,this.setHSL(Gl.h,Gl.s,Gl.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,i){return this.r=e.r+i.r,this.g=e.g+i.g,this.b=e.b+i.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,i){return this.r+=(e.r-this.r)*i,this.g+=(e.g-this.g)*i,this.b+=(e.b-this.b)*i,this}lerpColors(e,i,r){return this.r=e.r+(i.r-e.r)*r,this.g=e.g+(i.g-e.g)*r,this.b=e.b+(i.b-e.b)*r,this}lerpHSL(e,i){this.getHSL(Gl),e.getHSL(UD);let r=f3(Gl.h,UD.h,i),o=f3(Gl.s,UD.s,i),a=f3(Gl.l,UD.l,i);return this.setHSL(r,o,a),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,i=0){return this.r=e[i],this.g=e[i+1],this.b=e[i+2],this}toArray(e=[],i=0){return e[i]=this.r,e[i+1]=this.g,e[i+2]=this.b,e}fromBufferAttribute(e,i){return this.r=e.getX(i),this.g=e.getY(i),this.b=e.getZ(i),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}return n.NAMES=nee,n})();sn.prototype.isColor=!0,sn.prototype.r=1,sn.prototype.g=1,sn.prototype.b=1;var M0,Ud=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===M0&&(M0=Mx("canvas")),M0.width=t.width,M0.height=t.height;let i=M0.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=M0}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Mx("canvas");e.width=t.width,e.height=t.height;let i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);let r=i.getImageData(0,0,t.width,t.height),o=r.data;for(let a=0;a<o.length;a++)o[a]=255*Y0(o[a]/255);return i.putImageData(r,0,0),e}if(t.data){let e=t.data.slice(0);for(let i=0;i<e.length;i++)e[i]=e instanceof Uint8Array||e instanceof Uint8ClampedArray?Math.floor(255*Y0(e[i]/255)):Y0(e[i]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},$Re=0,lo=class extends zd{constructor(t=lo.DEFAULT_IMAGE,e=lo.DEFAULT_MAPPING,i=Es,r=Es,o=ia,a=$I,s=Ca,l=xp,c=1,d=wp){super(),Object.defineProperty(this,"id",{value:$Re++}),this.uuid=Yl(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=i,this.wrapT=r,this.magFilter=o,this.minFilter=a,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=l,this.offset=new $e(0,0),this.repeat=new $e(1,1),this.center=new $e(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yo,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){let e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];let i={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){let r=this.image;if(void 0===r.uuid&&(r.uuid=Yl()),!e&&void 0===t.images[r.uuid]){let o;if(Array.isArray(r)){o=[];for(let a=0,s=r.length;a<s;a++)o.push(b3(r[a].isDataTexture?r[a].image:r[a]))}else o=b3(r);t.images[r.uuid]={uuid:r.uuid,url:o}}i.image=r.uuid}return"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Z3:t.x=t.x-Math.floor(t.x);break;case Es:t.x=t.x<0?0:1;break;case K3:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Z3:t.y=t.y-Math.floor(t.y);break;case Es:t.y=t.y<0?0:1;break;case K3:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}};function b3(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?Ud.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}lo.DEFAULT_IMAGE=void 0,lo.DEFAULT_MAPPING=300,lo.prototype.isTexture=!0;var Qi=class{constructor(t=0,e=0,i=0,r=1){this.x=t,this.y=e,this.z=i,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,r){return this.x=t,this.y=e,this.z=i,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,i=this.y,r=this.z,o=this.w,a=t.elements;return this.x=a[0]*e+a[4]*i+a[8]*r+a[12]*o,this.y=a[1]*e+a[5]*i+a[9]*r+a[13]*o,this.z=a[2]*e+a[6]*i+a[10]*r+a[14]*o,this.w=a[3]*e+a[7]*i+a[11]*r+a[15]*o,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,r,o,l=t.elements,c=l[0],d=l[4],u=l[8],p=l[1],h=l[5],m=l[9],_=l[2],M=l[6],y=l[10];if(Math.abs(d-p)<.01&&Math.abs(u-_)<.01&&Math.abs(m-M)<.01){if(Math.abs(d+p)<.1&&Math.abs(u+_)<.1&&Math.abs(m+M)<.1&&Math.abs(c+h+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let R=(c+1)/2,I=(h+1)/2,B=(y+1)/2,ee=(d+p)/4,Q=(u+_)/4,we=(m+M)/4;return R>I&&R>B?R<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(R),r=ee/i,o=Q/i):I>B?I<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(I),i=ee/r,o=we/r):B<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(B),i=Q/o,r=we/o),this.set(i,r,o,e),this}let x=Math.sqrt((M-m)*(M-m)+(u-_)*(u-_)+(p-d)*(p-d));return Math.abs(x)<.001&&(x=1),this.x=(M-m)/x,this.y=(u-_)/x,this.z=(p-d)/x,this.w=Math.acos((c+h+y-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,i){return void 0!==i&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Qi.prototype.isVector4=!0;var ts=class extends zd{constructor(t,e,i={}){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new Qi(0,0,t,e),this.scissorTest=!1,this.viewport=new Qi(0,0,t,e),this.texture=new lo(void 0,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:e,depth:1},this.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,this.texture.internalFormat=void 0!==i.internalFormat?i.internalFormat:null,this.texture.minFilter=void 0!==i.minFilter?i.minFilter:ia,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0!==i.stencilBuffer&&i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,i=1){(this.width!==t||this.height!==e||this.depth!==i)&&(this.width=t,this.height=e,this.depth=i,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image=Object.assign({},t.texture.image),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};ts.prototype.isWebGLRenderTarget=!0,class extends ts{constructor(t,e,i){super(t,e);let r=this.texture;this.texture=[];for(let o=0;o<i;o++)this.texture[o]=r.clone()}setSize(t,e,i=1){if(this.width!==t||this.height!==e||this.depth!==i){this.width=t,this.height=e,this.depth=i;for(let r=0,o=this.texture.length;r<o;r++)this.texture[r].image.width=t,this.texture[r].image.height=e,this.texture[r].image.depth=i;this.dispose()}return this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let e=0,i=t.texture.length;e<i;e++)this.texture[e]=t.texture[e].clone();return this}}.prototype.isWebGLMultipleRenderTargets=!0;var wx=class extends ts{constructor(t,e,i={}){super(t,e,i),this.samples=4,this.ignoreDepthForMultisampleCopy=void 0===i.ignoreDepth||i.ignoreDepth,this.useRenderToTexture=void 0!==i.useRenderToTexture&&i.useRenderToTexture,this.useRenderbuffer=!1===this.useRenderToTexture}copy(t){return super.copy.call(this,t),this.samples=t.samples,this.useRenderToTexture=t.useRenderToTexture,this.useRenderbuffer=t.useRenderbuffer,this}};wx.prototype.isWebGLMultisampleRenderTarget=!0;var oa=class{constructor(t=0,e=0,i=0,r=1){this._x=t,this._y=e,this._z=i,this._w=r}static slerp(t,e,i,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(t,e,r)}static slerpFlat(t,e,i,r,o,a,s){let l=i[r+0],c=i[r+1],d=i[r+2],u=i[r+3],p=o[a+0],h=o[a+1],m=o[a+2],_=o[a+3];if(0===s)return t[e+0]=l,t[e+1]=c,t[e+2]=d,void(t[e+3]=u);if(1===s)return t[e+0]=p,t[e+1]=h,t[e+2]=m,void(t[e+3]=_);if(u!==_||l!==p||c!==h||d!==m){let M=1-s,y=l*p+c*h+d*m+u*_,x=y>=0?1:-1,R=1-y*y;if(R>Number.EPSILON){let B=Math.sqrt(R),ee=Math.atan2(B,y*x);M=Math.sin(M*ee)/B,s=Math.sin(s*ee)/B}let I=s*x;if(l=l*M+p*I,c=c*M+h*I,d=d*M+m*I,u=u*M+_*I,M===1-s){let B=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=B,c*=B,d*=B,u*=B}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=u}static multiplyQuaternionsFlat(t,e,i,r,o,a){let s=i[r],l=i[r+1],c=i[r+2],d=i[r+3],u=o[a],p=o[a+1],h=o[a+2],m=o[a+3];return t[e]=s*m+d*u+l*h-c*p,t[e+1]=l*m+d*p+c*u-s*h,t[e+2]=c*m+d*h+s*p-l*u,t[e+3]=d*m-s*u-l*p-c*h,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,r){return this._x=t,this._y=e,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=t._x,r=t._y,o=t._z,a=t._order,s=Math.cos,l=Math.sin,c=s(i/2),d=s(r/2),u=s(o/2),p=l(i/2),h=l(r/2),m=l(o/2);switch(a){case"XYZ":this._x=p*d*u+c*h*m,this._y=c*h*u-p*d*m,this._z=c*d*m+p*h*u,this._w=c*d*u-p*h*m;break;case"YXZ":this._x=p*d*u+c*h*m,this._y=c*h*u-p*d*m,this._z=c*d*m-p*h*u,this._w=c*d*u+p*h*m;break;case"ZXY":this._x=p*d*u-c*h*m,this._y=c*h*u+p*d*m,this._z=c*d*m+p*h*u,this._w=c*d*u-p*h*m;break;case"ZYX":this._x=p*d*u-c*h*m,this._y=c*h*u+p*d*m,this._z=c*d*m-p*h*u,this._w=c*d*u+p*h*m;break;case"YZX":this._x=p*d*u+c*h*m,this._y=c*h*u+p*d*m,this._z=c*d*m-p*h*u,this._w=c*d*u-p*h*m;break;case"XZY":this._x=p*d*u-c*h*m,this._y=c*h*u-p*d*m,this._z=c*d*m+p*h*u,this._w=c*d*u+p*h*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let i=e/2,r=Math.sin(i);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,i=e[0],r=e[4],o=e[8],a=e[1],s=e[5],l=e[9],c=e[2],d=e[6],u=e[10],p=i+s+u;if(p>0){let h=.5/Math.sqrt(p+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(a-r)*h}else if(i>s&&i>u){let h=2*Math.sqrt(1+i-s-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+a)/h,this._z=(o+c)/h}else if(s>u){let h=2*Math.sqrt(1+s-i-u);this._w=(o-c)/h,this._x=(r+a)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-i-s);this._w=(a-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(es(this.dot(t),-1,1)))}rotateTowards(t,e){let i=this.angleTo(t);if(0===i)return this;let r=Math.min(1,e/i);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let i=t._x,r=t._y,o=t._z,a=t._w,s=e._x,l=e._y,c=e._z,d=e._w;return this._x=i*d+a*s+r*c-o*l,this._y=r*d+a*l+o*s-i*c,this._z=o*d+a*c+i*l-r*s,this._w=a*d-i*s-r*l-o*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);let i=this._x,r=this._y,o=this._z,a=this._w,s=a*t._w+i*t._x+r*t._y+o*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=a,this._x=i,this._y=r,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let h=1-e;return this._w=h*a+e*this._w,this._x=h*i+e*this._x,this._y=h*r+e*this._y,this._z=h*o+e*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),d=Math.atan2(c,s),u=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/c;return this._w=a*u+this._w*p,this._x=i*u+this._x*p,this._y=r*u+this._y*p,this._z=o*u+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){let t=Math.random(),e=Math.sqrt(1-t),i=Math.sqrt(t),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(e*Math.cos(r),i*Math.sin(o),i*Math.cos(o),e*Math.sin(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};oa.prototype.isQuaternion=!0;var K=class{constructor(t=0,e=0,i=0){this.x=t,this.y=e,this.z=i}set(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(iee.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(iee.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[3]*i+o[6]*r,this.y=o[1]*e+o[4]*i+o[7]*r,this.z=o[2]*e+o[5]*i+o[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,i=this.y,r=this.z,o=t.elements,a=1/(o[3]*e+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*e+o[4]*i+o[8]*r+o[12])*a,this.y=(o[1]*e+o[5]*i+o[9]*r+o[13])*a,this.z=(o[2]*e+o[6]*i+o[10]*r+o[14])*a,this}applyQuaternion(t){let e=this.x,i=this.y,r=this.z,o=t.x,a=t.y,s=t.z,l=t.w,c=l*e+a*r-s*i,d=l*i+s*e-o*r,u=l*r+o*i-a*e,p=-o*e-a*i-s*r;return this.x=c*l+p*-o+d*-s-u*-a,this.y=d*l+p*-a+u*-o-c*-s,this.z=u*l+p*-s+c*-a-d*-o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[4]*i+o[8]*r,this.y=o[1]*e+o[5]*i+o[9]*r,this.z=o[2]*e+o[6]*i+o[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){let i=t.x,r=t.y,o=t.z,a=e.x,s=e.y,l=e.z;return this.x=r*l-o*s,this.y=o*a-i*l,this.z=i*s-r*a,this}projectOnVector(t){let e=t.lengthSq();if(0===e)return this.set(0,0,0);let i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return v3.copy(this).projectOnVector(t),this.sub(v3)}reflect(t){return this.sub(v3.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;let i=this.dot(t)/e;return Math.acos(es(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y,r=this.z-t.z;return e*e+i*i+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){let r=Math.sin(e)*t;return this.x=r*Math.sin(i),this.y=Math.cos(e)*t,this.z=r*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,i){return void 0!==i&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,i=Math.sqrt(1-t**2);return this.x=i*Math.cos(e),this.y=i*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};K.prototype.isVector3=!0;var v3=new K,iee=new oa,Ts=class{constructor(t=new K(1/0,1/0,1/0),e=new K(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,i=1/0,r=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.length;l<c;l+=3){let d=t[l],u=t[l+1],p=t[l+2];d<e&&(e=d),u<i&&(i=u),p<r&&(r=p),d>o&&(o=d),u>a&&(a=u),p>s&&(s=p)}return this.min.set(e,i,r),this.max.set(o,a,s),this}setFromBufferAttribute(t){let e=1/0,i=1/0,r=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.count;l<c;l++){let d=t.getX(l),u=t.getY(l),p=t.getZ(l);d<e&&(e=d),u<i&&(i=u),p<r&&(r=p),d>o&&(o=d),u>a&&(a=u),p>s&&(s=p)}return this.min.set(e,i,r),this.max.set(o,a,s),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let i=pm.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let i=t.geometry;if(void 0!==i)if(e&&null!=i.attributes&&void 0!==i.attributes.position){let o=i.attributes.position;for(let a=0,s=o.count;a<s;a++)pm.fromBufferAttribute(o,a).applyMatrix4(t.matrixWorld),this.expandByPoint(pm)}else null===i.boundingBox&&i.computeBoundingBox(),y3.copy(i.boundingBox),y3.applyMatrix4(t.matrixWorld),this.union(y3);let r=t.children;for(let o=0,a=r.length;o<a;o++)this.expandByObject(r[o],e);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,pm),pm.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ox),jD.subVectors(this.max,ox),w0.subVectors(t.a,ox),S0.subVectors(t.b,ox),E0.subVectors(t.c,ox),up.subVectors(S0,w0),pp.subVectors(E0,S0),hm.subVectors(w0,E0);let e=[0,-up.z,up.y,0,-pp.z,pp.y,0,-hm.z,hm.y,up.z,0,-up.x,pp.z,0,-pp.x,hm.z,0,-hm.x,-up.y,up.x,0,-pp.y,pp.x,0,-hm.y,hm.x,0];return!(!x3(e,w0,S0,E0,jD)||(e=[1,0,0,0,1,0,0,0,1],!x3(e,w0,S0,E0,jD)))&&(GD.crossVectors(up,pp),e=[GD.x,GD.y,GD.z],x3(e,w0,S0,E0,jD))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return pm.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(pm).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Fd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Fd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Fd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Fd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Fd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Fd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Fd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Fd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Fd)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};Ts.prototype.isBox3=!0;var Fd=[new K,new K,new K,new K,new K,new K,new K,new K],pm=new K,y3=new Ts,w0=new K,S0=new K,E0=new K,up=new K,pp=new K,hm=new K,ox=new K,jD=new K,GD=new K,mm=new K;function x3(n,t,e,i,r){for(let o=0,a=n.length-3;o<=a;o+=3){mm.fromArray(n,o);let s=r.x*Math.abs(mm.x)+r.y*Math.abs(mm.y)+r.z*Math.abs(mm.z),l=t.dot(mm),c=e.dot(mm),d=i.dot(mm);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>s)return!1}return!0}var ePe=new Ts,ree=new K,WD=new K,C3=new K,Sp=class{constructor(t=new K,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let i=this.center;void 0!==e?i.copy(e):ePe.setFromPoints(t).getCenter(i);let r=0;for(let o=0,a=t.length;o<a;o++)r=Math.max(r,i.distanceToSquared(t[o]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){C3.subVectors(t,this.center);let e=C3.lengthSq();if(e>this.radius*this.radius){let i=Math.sqrt(e),r=.5*(i-this.radius);this.center.add(C3.multiplyScalar(r/i)),this.radius+=r}return this}union(t){return!0===this.center.equals(t.center)?WD.set(0,0,1).multiplyScalar(t.radius):WD.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(ree.copy(t.center).add(WD)),this.expandByPoint(ree.copy(t.center).sub(WD)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}},Nd=new K,M3=new K,qD=new K,hp=new K,w3=new K,XD=new K,S3=new K,Ep=class{constructor(t=new K,e=new K(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Nd)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Nd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Nd.copy(this.direction).multiplyScalar(e).add(this.origin),Nd.distanceToSquared(t))}distanceSqToSegment(t,e,i,r){M3.copy(t).add(e).multiplyScalar(.5),qD.copy(e).sub(t).normalize(),hp.copy(this.origin).sub(M3);let u,p,h,m,o=.5*t.distanceTo(e),a=-this.direction.dot(qD),s=hp.dot(this.direction),l=-hp.dot(qD),c=hp.lengthSq(),d=Math.abs(1-a*a);if(d>0)if(u=a*l-s,p=a*s-l,m=o*d,u>=0)if(p>=-m)if(p<=m){let _=1/d;u*=_,p*=_,h=u*(u+a*p+2*s)+p*(a*u+p+2*l)+c}else p=o,u=Math.max(0,-(a*p+s)),h=-u*u+p*(p+2*l)+c;else p=-o,u=Math.max(0,-(a*p+s)),h=-u*u+p*(p+2*l)+c;else p<=-m?(u=Math.max(0,-(-a*o+s)),p=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+p*(p+2*l)+c):p<=m?(u=0,p=Math.min(Math.max(-o,-l),o),h=p*(p+2*l)+c):(u=Math.max(0,-(a*o+s)),p=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+p*(p+2*l)+c);else p=a>0?-o:o,u=Math.max(0,-(a*p+s)),h=-u*u+p*(p+2*l)+c;return i&&i.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(qD).multiplyScalar(p).add(M3),h}intersectSphere(t,e){Nd.subVectors(t.center,this.origin);let i=Nd.dot(this.direction),r=Nd.dot(Nd)-i*i,o=t.radius*t.radius;if(r>o)return null;let a=Math.sqrt(o-r),s=i-a,l=i+a;return s<0&&l<0?null:this.at(s<0?l:s,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;let i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){let i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,r,o,a,s,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,p=this.origin;return c>=0?(i=(t.min.x-p.x)*c,r=(t.max.x-p.x)*c):(i=(t.max.x-p.x)*c,r=(t.min.x-p.x)*c),d>=0?(o=(t.min.y-p.y)*d,a=(t.max.y-p.y)*d):(o=(t.max.y-p.y)*d,a=(t.min.y-p.y)*d),i>a||o>r||((o>i||i!=i)&&(i=o),(a<r||r!=r)&&(r=a),u>=0?(s=(t.min.z-p.z)*u,l=(t.max.z-p.z)*u):(s=(t.max.z-p.z)*u,l=(t.min.z-p.z)*u),i>l||s>r)||((s>i||i!=i)&&(i=s),(l<r||r!=r)&&(r=l),r<0)?null:this.at(i>=0?i:r,e)}intersectsBox(t){return null!==this.intersectBox(t,Nd)}intersectTriangle(t,e,i,r,o){w3.subVectors(e,t),XD.subVectors(i,t),S3.crossVectors(w3,XD);let s,a=this.direction.dot(S3);if(a>0){if(r)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}hp.subVectors(this.origin,t);let l=s*this.direction.dot(XD.crossVectors(hp,XD));if(l<0)return null;let c=s*this.direction.dot(w3.cross(hp));if(c<0||l+c>a)return null;let d=-s*hp.dot(S3);return d<0?null:this.at(d/a,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}},vn=class{constructor(){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.")}set(t,e,i,r,o,a,s,l,c,d,u,p,h,m,_,M){let y=this.elements;return y[0]=t,y[4]=e,y[8]=i,y[12]=r,y[1]=o,y[5]=a,y[9]=s,y[13]=l,y[2]=c,y[6]=d,y[10]=u,y[14]=p,y[3]=h,y[7]=m,y[11]=_,y[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new vn).fromArray(this.elements)}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){let e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,i=t.elements,r=1/T0.setFromMatrixColumn(t,0).length(),o=1/T0.setFromMatrixColumn(t,1).length(),a=1/T0.setFromMatrixColumn(t,2).length();return e[0]=i[0]*r,e[1]=i[1]*r,e[2]=i[2]*r,e[3]=0,e[4]=i[4]*o,e[5]=i[5]*o,e[6]=i[6]*o,e[7]=0,e[8]=i[8]*a,e[9]=i[9]*a,e[10]=i[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let e=this.elements,i=t.x,r=t.y,o=t.z,a=Math.cos(i),s=Math.sin(i),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if("XYZ"===t.order){let p=a*d,h=a*u,m=s*d,_=s*u;e[0]=l*d,e[4]=-l*u,e[8]=c,e[1]=h+m*c,e[5]=p-_*c,e[9]=-s*l,e[2]=_-p*c,e[6]=m+h*c,e[10]=a*l}else if("YXZ"===t.order){let p=l*d,h=l*u,m=c*d,_=c*u;e[0]=p+_*s,e[4]=m*s-h,e[8]=a*c,e[1]=a*u,e[5]=a*d,e[9]=-s,e[2]=h*s-m,e[6]=_+p*s,e[10]=a*l}else if("ZXY"===t.order){let p=l*d,h=l*u,m=c*d,_=c*u;e[0]=p-_*s,e[4]=-a*u,e[8]=m+h*s,e[1]=h+m*s,e[5]=a*d,e[9]=_-p*s,e[2]=-a*c,e[6]=s,e[10]=a*l}else if("ZYX"===t.order){let p=a*d,h=a*u,m=s*d,_=s*u;e[0]=l*d,e[4]=m*c-h,e[8]=p*c+_,e[1]=l*u,e[5]=_*c+p,e[9]=h*c-m,e[2]=-c,e[6]=s*l,e[10]=a*l}else if("YZX"===t.order){let p=a*l,h=a*c,m=s*l,_=s*c;e[0]=l*d,e[4]=_-p*u,e[8]=m*u+h,e[1]=u,e[5]=a*d,e[9]=-s*d,e[2]=-c*d,e[6]=h*u+m,e[10]=p-_*u}else if("XZY"===t.order){let p=a*l,h=a*c,m=s*l,_=s*c;e[0]=l*d,e[4]=-u,e[8]=c*d,e[1]=p*u+_,e[5]=a*d,e[9]=h*u-m,e[2]=m*u-h,e[6]=s*d,e[10]=_*u+p}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(tPe,t,nPe)}lookAt(t,e,i){let r=this.elements;return ws.subVectors(t,e),0===ws.lengthSq()&&(ws.z=1),ws.normalize(),mp.crossVectors(i,ws),0===mp.lengthSq()&&(1===Math.abs(i.z)?ws.x+=1e-4:ws.z+=1e-4,ws.normalize(),mp.crossVectors(i,ws)),mp.normalize(),YD.crossVectors(ws,mp),r[0]=mp.x,r[4]=YD.x,r[8]=ws.x,r[1]=mp.y,r[5]=YD.y,r[9]=ws.y,r[2]=mp.z,r[6]=YD.z,r[10]=ws.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,r=e.elements,o=this.elements,a=i[0],s=i[4],l=i[8],c=i[12],d=i[1],u=i[5],p=i[9],h=i[13],m=i[2],_=i[6],M=i[10],y=i[14],x=i[3],R=i[7],I=i[11],B=i[15],ee=r[0],Q=r[4],we=r[8],Qe=r[12],Ae=r[1],D=r[5],re=r[9],ce=r[13],he=r[2],_e=r[6],$=r[10],de=r[14],pe=r[3],Ge=r[7],Se=r[11],Fe=r[15];return o[0]=a*ee+s*Ae+l*he+c*pe,o[4]=a*Q+s*D+l*_e+c*Ge,o[8]=a*we+s*re+l*$+c*Se,o[12]=a*Qe+s*ce+l*de+c*Fe,o[1]=d*ee+u*Ae+p*he+h*pe,o[5]=d*Q+u*D+p*_e+h*Ge,o[9]=d*we+u*re+p*$+h*Se,o[13]=d*Qe+u*ce+p*de+h*Fe,o[2]=m*ee+_*Ae+M*he+y*pe,o[6]=m*Q+_*D+M*_e+y*Ge,o[10]=m*we+_*re+M*$+y*Se,o[14]=m*Qe+_*ce+M*de+y*Fe,o[3]=x*ee+R*Ae+I*he+B*pe,o[7]=x*Q+R*D+I*_e+B*Ge,o[11]=x*we+R*re+I*$+B*Se,o[15]=x*Qe+R*ce+I*de+B*Fe,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],i=t[4],r=t[8],o=t[12],a=t[1],s=t[5],l=t[9],c=t[13],d=t[2],u=t[6],p=t[10],h=t[14];return t[3]*(+o*l*u-r*c*u-o*s*p+i*c*p+r*s*h-i*l*h)+t[7]*(+e*l*h-e*c*p+o*a*p-r*a*h+r*c*d-o*l*d)+t[11]*(+e*c*u-e*s*h-o*a*u+i*a*h+o*s*d-i*c*d)+t[15]*(-r*s*d-e*l*u+e*s*p+r*a*u-i*a*p+i*l*d)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){let r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=i),this}invert(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],u=t[9],p=t[10],h=t[11],m=t[12],_=t[13],M=t[14],y=t[15],x=u*M*c-_*p*c+_*l*h-s*M*h-u*l*y+s*p*y,R=m*p*c-d*M*c-m*l*h+a*M*h+d*l*y-a*p*y,I=d*_*c-m*u*c+m*s*h-a*_*h-d*s*y+a*u*y,B=m*u*l-d*_*l-m*s*p+a*_*p+d*s*M-a*u*M,ee=e*x+i*R+r*I+o*B;if(0===ee)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let Q=1/ee;return t[0]=x*Q,t[1]=(_*p*o-u*M*o-_*r*h+i*M*h+u*r*y-i*p*y)*Q,t[2]=(s*M*o-_*l*o+_*r*c-i*M*c-s*r*y+i*l*y)*Q,t[3]=(u*l*o-s*p*o-u*r*c+i*p*c+s*r*h-i*l*h)*Q,t[4]=R*Q,t[5]=(d*M*o-m*p*o+m*r*h-e*M*h-d*r*y+e*p*y)*Q,t[6]=(m*l*o-a*M*o-m*r*c+e*M*c+a*r*y-e*l*y)*Q,t[7]=(a*p*o-d*l*o+d*r*c-e*p*c-a*r*h+e*l*h)*Q,t[8]=I*Q,t[9]=(m*u*o-d*_*o-m*i*h+e*_*h+d*i*y-e*u*y)*Q,t[10]=(a*_*o-m*s*o+m*i*c-e*_*c-a*i*y+e*s*y)*Q,t[11]=(d*s*o-a*u*o-d*i*c+e*u*c+a*i*h-e*s*h)*Q,t[12]=B*Q,t[13]=(d*_*r-m*u*r+m*i*p-e*_*p-d*i*M+e*u*M)*Q,t[14]=(m*s*r-a*_*r-m*i*l+e*_*l+a*i*M-e*s*M)*Q,t[15]=(a*u*r-d*s*r+d*i*l-e*u*l-a*i*p+e*s*p)*Q,this}scale(t){let e=this.elements,i=t.x,r=t.y,o=t.z;return e[0]*=i,e[4]*=r,e[8]*=o,e[1]*=i,e[5]*=r,e[9]*=o,e[2]*=i,e[6]*=r,e[10]*=o,e[3]*=i,e[7]*=r,e[11]*=o,this}getMaxScaleOnAxis(){let t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}makeTranslation(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let i=Math.cos(e),r=Math.sin(e),o=1-i,a=t.x,s=t.y,l=t.z,c=o*a,d=o*s;return this.set(c*a+i,c*s-r*l,c*l+r*s,0,c*s+r*l,d*s+i,d*l-r*a,0,c*l-r*s,d*l+r*a,o*l*l+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,r,o,a){return this.set(1,i,o,0,t,1,a,0,e,r,1,0,0,0,0,1),this}compose(t,e,i){let r=this.elements,o=e._x,a=e._y,s=e._z,l=e._w,c=o+o,d=a+a,u=s+s,p=o*c,h=o*d,m=o*u,_=a*d,M=a*u,y=s*u,x=l*c,R=l*d,I=l*u,B=i.x,ee=i.y,Q=i.z;return r[0]=(1-(_+y))*B,r[1]=(h+I)*B,r[2]=(m-R)*B,r[3]=0,r[4]=(h-I)*ee,r[5]=(1-(p+y))*ee,r[6]=(M+x)*ee,r[7]=0,r[8]=(m+R)*Q,r[9]=(M-x)*Q,r[10]=(1-(p+_))*Q,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,i){let r=this.elements,o=T0.set(r[0],r[1],r[2]).length(),a=T0.set(r[4],r[5],r[6]).length(),s=T0.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),t.x=r[12],t.y=r[13],t.z=r[14],Wl.copy(this);let c=1/o,d=1/a,u=1/s;return Wl.elements[0]*=c,Wl.elements[1]*=c,Wl.elements[2]*=c,Wl.elements[4]*=d,Wl.elements[5]*=d,Wl.elements[6]*=d,Wl.elements[8]*=u,Wl.elements[9]*=u,Wl.elements[10]*=u,e.setFromRotationMatrix(Wl),i.x=o,i.y=a,i.z=s,this}makePerspective(t,e,i,r,o,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let s=this.elements,c=2*o/(i-r),d=(e+t)/(e-t),u=(i+r)/(i-r),p=-(a+o)/(a-o),h=-2*a*o/(a-o);return s[0]=2*o/(e-t),s[4]=0,s[8]=d,s[12]=0,s[1]=0,s[5]=c,s[9]=u,s[13]=0,s[2]=0,s[6]=0,s[10]=p,s[14]=h,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,e,i,r,o,a){let s=this.elements,l=1/(e-t),c=1/(i-r),d=1/(a-o),u=(e+t)*l,p=(i+r)*c,h=(a+o)*d;return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-u,s[1]=0,s[5]=2*c,s[9]=0,s[13]=-p,s[2]=0,s[6]=0,s[10]=-2*d,s[14]=-h,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(t){let e=this.elements,i=t.elements;for(let r=0;r<16;r++)if(e[r]!==i[r])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}};vn.prototype.isMatrix4=!0;var T0=new K,Wl=new vn,tPe=new K(0,0,0),nPe=new K(1,1,1),mp=new K,YD=new K,ws=new K,oee=new vn,aee=new oa,Tp=class{constructor(t=0,e=0,i=0,r=Tp.DefaultOrder){this._x=t,this._y=e,this._z=i,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,r=this._order){return this._x=t,this._y=e,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){let r=t.elements,o=r[0],a=r[4],s=r[8],l=r[1],c=r[5],d=r[9],u=r[2],p=r[6],h=r[10];switch(e){case"XYZ":this._y=Math.asin(es(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-es(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(es(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-es(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(p,h),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(es(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-es(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-d,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return oee.makeRotationFromQuaternion(t),this.setFromRotationMatrix(oee,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return aee.setFromEuler(this),this.setFromQuaternion(aee,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new K(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};Tp.prototype.isEuler=!0,Tp.DefaultOrder="XYZ",Tp.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var EI=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}isEnabled(t){return 0!=(this.mask&(1<<t|0))}},iPe=0,see=new K,D0=new oa,Ld=new vn,QD=new K,ax=new K,rPe=new K,oPe=new oa,lee=new K(1,0,0),cee=new K(0,1,0),dee=new K(0,0,1),aPe={type:"added"},uee={type:"removed"},Ui=class extends zd{constructor(){super(),Object.defineProperty(this,"id",{value:iPe++}),this.uuid=Yl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Ui.DefaultUp.clone();let t=new K,e=new Tp,i=new oa,r=new K(1,1,1);e._onChange(function(){i.setFromEuler(e,!1)}),i._onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new vn},normalMatrix:{value:new yo}}),this.matrix=new vn,this.matrixWorld=new vn,this.matrixAutoUpdate=Ui.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new EI,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return D0.setFromAxisAngle(t,e),this.quaternion.multiply(D0),this}rotateOnWorldAxis(t,e){return D0.setFromAxisAngle(t,e),this.quaternion.premultiply(D0),this}rotateX(t){return this.rotateOnAxis(lee,t)}rotateY(t){return this.rotateOnAxis(cee,t)}rotateZ(t){return this.rotateOnAxis(dee,t)}translateOnAxis(t,e){return see.copy(t).applyQuaternion(this.quaternion),this.position.add(see.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(lee,t)}translateY(t){return this.translateOnAxis(cee,t)}translateZ(t){return this.translateOnAxis(dee,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(Ld.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?QD.copy(t):QD.set(t,e,i);let r=this.parent;this.updateWorldMatrix(!0,!1),ax.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ld.lookAt(ax,QD,this.up):Ld.lookAt(QD,ax,this.up),this.quaternion.setFromRotationMatrix(Ld),r&&(Ld.extractRotation(r.matrixWorld),D0.setFromRotationMatrix(Ld),this.quaternion.premultiply(D0.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(aPe)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}let e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(uee)),this}removeFromParent(){let t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){let e=this.children[t];e.parent=null,e.dispatchEvent(uee)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Ld.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Ld.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ld),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,r=this.children.length;i<r;i++){let a=this.children[i].getObjectByProperty(t,e);if(void 0!==a)return a}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ax,t,rPe),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ax,oPe,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].traverseVisible(t)}traverseAncestors(t){let e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(!0===t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){let r=this.children;for(let o=0,a=r.length;o<a;o++)r[o].updateWorldMatrix(!1,!0)}}toJSON(t){let e=void 0===t||"string"==typeof t,i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});let r={};function o(s,l){return void 0===s[l.uuid]&&(s[l.uuid]=l.toJSON(t)),l.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=o(t.geometries,this.geometry);let s=this.geometry.parameters;if(void 0!==s&&void 0!==s.shapes){let l=s.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++)o(t.shapes,l[c]);else o(t.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(o(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){let s=[];for(let l=0,c=this.material.length;l<c;l++)s.push(o(t.materials,this.material[l]));r.material=s}else r.material=o(t.materials,this.material);if(this.children.length>0){r.children=[];for(let s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let s=0;s<this.animations.length;s++)r.animations.push(o(t.animations,this.animations[s]))}if(e){let s=a(t.geometries),l=a(t.materials),c=a(t.textures),d=a(t.images),u=a(t.shapes),p=a(t.skeletons),h=a(t.animations);s.length>0&&(i.geometries=s),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),d.length>0&&(i.images=d),u.length>0&&(i.shapes=u),p.length>0&&(i.skeletons=p),h.length>0&&(i.animations=h)}return i.object=r,i;function a(s){let l=[];for(let c in s){let d=s[c];delete d.metadata,l.push(d)}return l}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let i=0;i<t.children.length;i++)this.add(t.children[i].clone());return this}};Ui.DefaultUp=new K(0,1,0),Ui.DefaultMatrixAutoUpdate=!0,Ui.prototype.isObject3D=!0;var ql=new K,Bd=new K,E3=new K,Vd=new K,I0=new K,A0=new K,pee=new K,T3=new K,D3=new K,I3=new K,Vr=class{constructor(t=new K,e=new K,i=new K){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,r){r.subVectors(i,e),ql.subVectors(t,e),r.cross(ql);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,e,i,r,o){ql.subVectors(r,e),Bd.subVectors(i,e),E3.subVectors(t,e);let a=ql.dot(ql),s=ql.dot(Bd),l=ql.dot(E3),c=Bd.dot(Bd),d=Bd.dot(E3),u=a*c-s*s;if(0===u)return o.set(-2,-1,-1);let p=1/u,h=(c*l-s*d)*p,m=(a*d-s*l)*p;return o.set(1-h-m,m,h)}static containsPoint(t,e,i,r){return this.getBarycoord(t,e,i,r,Vd),Vd.x>=0&&Vd.y>=0&&Vd.x+Vd.y<=1}static getUV(t,e,i,r,o,a,s,l){return this.getBarycoord(t,e,i,r,Vd),l.set(0,0),l.addScaledVector(o,Vd.x),l.addScaledVector(a,Vd.y),l.addScaledVector(s,Vd.z),l}static isFrontFacing(t,e,i,r){return ql.subVectors(i,e),Bd.subVectors(t,e),ql.cross(Bd).dot(r)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,r){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,i,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,r),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ql.subVectors(this.c,this.b),Bd.subVectors(this.a,this.b),.5*ql.cross(Bd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Vr.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Vr.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,i,r,o){return Vr.getUV(t,this.a,this.b,this.c,e,i,r,o)}containsPoint(t){return Vr.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Vr.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let a,s,i=this.a,r=this.b,o=this.c;I0.subVectors(r,i),A0.subVectors(o,i),T3.subVectors(t,i);let l=I0.dot(T3),c=A0.dot(T3);if(l<=0&&c<=0)return e.copy(i);D3.subVectors(t,r);let d=I0.dot(D3),u=A0.dot(D3);if(d>=0&&u<=d)return e.copy(r);let p=l*u-d*c;if(p<=0&&l>=0&&d<=0)return a=l/(l-d),e.copy(i).addScaledVector(I0,a);I3.subVectors(t,o);let h=I0.dot(I3),m=A0.dot(I3);if(m>=0&&h<=m)return e.copy(o);let _=h*c-l*m;if(_<=0&&c>=0&&m<=0)return s=c/(c-m),e.copy(i).addScaledVector(A0,s);let M=d*m-h*u;if(M<=0&&u-d>=0&&h-m>=0)return pee.subVectors(o,r),s=(u-d)/(u-d+(h-m)),e.copy(r).addScaledVector(pee,s);let y=1/(M+_+p);return a=_*y,s=p*y,e.copy(i).addScaledVector(I0,a).addScaledVector(A0,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},sPe=0,Fo=class extends zd{constructor(){super(),Object.defineProperty(this,"id",{value:sPe++}),this.uuid=Yl(),this.name="",this.type="Material",this.fog=!0,this.blending=gx,this.side=yx,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=cte,this.blendDst=dte,this.blendEquation=U0,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=X3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.alphaWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(let e in t){let i=t[e];if(void 0===i){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;continue}let r=this[e];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[e]=i:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){let e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==gx&&(i.blending=this.blending),this.side!==yx&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e){let o=r(t.textures),a=r(t.images);o.length>0&&(i.textures=o),a.length>0&&(i.images=a)}return i}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,i=null;if(null!==e){let r=e.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.alphaWrite=t.alphaWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}};Fo.prototype.isMaterial=!0;var vm=class extends Fo{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new sn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=KI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};vm.prototype.isMeshBasicMaterial=!0;var sr=new K,ZD=new $e,Ar=class{constructor(t,e,i){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===i,this.usage=Cx,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[t+r]=e.array[i+r];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),a=new sn),e[i++]=a.r,e[i++]=a.g,e[i++]=a.b}return this}copyVector2sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new $e),e[i++]=a.x,e[i++]=a.y}return this}copyVector3sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),a=new K),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z}return this}copyVector4sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),a=new Qi),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z,e[i++]=a.w}return this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,i=this.count;e<i;e++)ZD.fromBufferAttribute(this,e),ZD.applyMatrix3(t),this.setXY(e,ZD.x,ZD.y);else if(3===this.itemSize)for(let e=0,i=this.count;e<i;e++)sr.fromBufferAttribute(this,e),sr.applyMatrix3(t),this.setXYZ(e,sr.x,sr.y,sr.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)sr.x=this.getX(e),sr.y=this.getY(e),sr.z=this.getZ(e),sr.applyMatrix4(t),this.setXYZ(e,sr.x,sr.y,sr.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)sr.x=this.getX(e),sr.y=this.getY(e),sr.z=this.getZ(e),sr.applyNormalMatrix(t),this.setXYZ(e,sr.x,sr.y,sr.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)sr.x=this.getX(e),sr.y=this.getY(e),sr.z=this.getZ(e),sr.transformDirection(t),this.setXYZ(e,sr.x,sr.y,sr.z);return this}set(t,e=0){return this.array.set(t,e),this}getX(t){return this.array[t*this.itemSize]}setX(t,e){return this.array[t*this.itemSize]=e,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,e){return this.array[t*this.itemSize+1]=e,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,e){return this.array[t*this.itemSize+2]=e,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,e){return this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this}setXYZ(t,e,i,r){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this.array[t+2]=r,this}setXYZW(t,e,i,r,o){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this.array[t+2]=r,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==Cx&&(t.usage=this.usage),(0!==this.updateRange.offset||-1!==this.updateRange.count)&&(t.updateRange=this.updateRange),t}};Ar.prototype.isBufferAttribute=!0;var TI=class extends Ar{constructor(t,e,i){super(new Uint16Array(t),e,i)}},DI=class extends Ar{constructor(t,e,i){super(new Uint32Array(t),e,i)}};(class extends Ar{constructor(t,e,i){super(new Uint16Array(t),e,i)}}).prototype.isFloat16BufferAttribute=!0;var Nr=class extends Ar{constructor(t,e,i){super(new Float32Array(t),e,i)}},lPe=0,ll=new vn,A3=new Ui,R0=new K,Ss=new Ts,sx=new Ts,Oo=new K,Gi=class extends zd{constructor(){super(),Object.defineProperty(this,"id",{value:lPe++}),this.uuid=Yl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return this.index=Array.isArray(t)?new(hte(t)?DI:TI)(t,1):t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);let i=this.attributes.normal;if(void 0!==i){let o=(new yo).getNormalMatrix(t);i.applyNormalMatrix(o),i.needsUpdate=!0}let r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(t),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return ll.makeRotationFromQuaternion(t),this.applyMatrix4(ll),this}rotateX(t){return ll.makeRotationX(t),this.applyMatrix4(ll),this}rotateY(t){return ll.makeRotationY(t),this.applyMatrix4(ll),this}rotateZ(t){return ll.makeRotationZ(t),this.applyMatrix4(ll),this}translate(t,e,i){return ll.makeTranslation(t,e,i),this.applyMatrix4(ll),this}scale(t,e,i){return ll.makeScale(t,e,i),this.applyMatrix4(ll),this}lookAt(t){return A3.lookAt(t),A3.updateMatrix(),this.applyMatrix4(A3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(R0).negate(),this.translate(R0.x,R0.y,R0.z),this}setFromPoints(t){let e=[];for(let i=0,r=t.length;i<r;i++){let o=t[i];e.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new Nr(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Ts);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new K(-1/0,-1/0,-1/0),new K(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,r=e.length;i<r;i++)Ss.setFromBufferAttribute(e[i]),this.morphTargetsRelative?(Oo.addVectors(this.boundingBox.min,Ss.min),this.boundingBox.expandByPoint(Oo),Oo.addVectors(this.boundingBox.max,Ss.max),this.boundingBox.expandByPoint(Oo)):(this.boundingBox.expandByPoint(Ss.min),this.boundingBox.expandByPoint(Ss.max))}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Sp);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new K,1/0);if(t){let i=this.boundingSphere.center;if(Ss.setFromBufferAttribute(t),e)for(let o=0,a=e.length;o<a;o++)sx.setFromBufferAttribute(e[o]),this.morphTargetsRelative?(Oo.addVectors(Ss.min,sx.min),Ss.expandByPoint(Oo),Oo.addVectors(Ss.max,sx.max),Ss.expandByPoint(Oo)):(Ss.expandByPoint(sx.min),Ss.expandByPoint(sx.max));Ss.getCenter(i);let r=0;for(let o=0,a=t.count;o<a;o++)Oo.fromBufferAttribute(t,o),r=Math.max(r,i.distanceToSquared(Oo));if(e)for(let o=0,a=e.length;o<a;o++){let s=e[o],l=this.morphTargetsRelative;for(let c=0,d=s.count;c<d;c++)Oo.fromBufferAttribute(s,c),l&&(R0.fromBufferAttribute(t,c),Oo.add(R0)),r=Math.max(r,i.distanceToSquared(Oo))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");let i=t.array,r=e.position.array,o=e.normal.array,a=e.uv.array,s=r.length/3;void 0===e.tangent&&this.setAttribute("tangent",new Ar(new Float32Array(4*s),4));let l=e.tangent.array,c=[],d=[];for(let Ae=0;Ae<s;Ae++)c[Ae]=new K,d[Ae]=new K;let u=new K,p=new K,h=new K,m=new $e,_=new $e,M=new $e,y=new K,x=new K;function R(Ae,D,re){u.fromArray(r,3*Ae),p.fromArray(r,3*D),h.fromArray(r,3*re),m.fromArray(a,2*Ae),_.fromArray(a,2*D),M.fromArray(a,2*re),p.sub(u),h.sub(u),_.sub(m),M.sub(m);let ce=1/(_.x*M.y-M.x*_.y);!isFinite(ce)||(y.copy(p).multiplyScalar(M.y).addScaledVector(h,-_.y).multiplyScalar(ce),x.copy(h).multiplyScalar(_.x).addScaledVector(p,-M.x).multiplyScalar(ce),c[Ae].add(y),c[D].add(y),c[re].add(y),d[Ae].add(x),d[D].add(x),d[re].add(x))}let I=this.groups;0===I.length&&(I=[{start:0,count:i.length}]);for(let Ae=0,D=I.length;Ae<D;++Ae){let re=I[Ae],ce=re.start;for(let _e=ce,$=ce+re.count;_e<$;_e+=3)R(i[_e+0],i[_e+1],i[_e+2])}let B=new K,ee=new K,Q=new K,we=new K;function Qe(Ae){Q.fromArray(o,3*Ae),we.copy(Q);let D=c[Ae];B.copy(D),B.sub(Q.multiplyScalar(Q.dot(D))).normalize(),ee.crossVectors(we,D);let ce=ee.dot(d[Ae])<0?-1:1;l[4*Ae]=B.x,l[4*Ae+1]=B.y,l[4*Ae+2]=B.z,l[4*Ae+3]=ce}for(let Ae=0,D=I.length;Ae<D;++Ae){let re=I[Ae],ce=re.start;for(let _e=ce,$=ce+re.count;_e<$;_e+=3)Qe(i[_e+0]),Qe(i[_e+1]),Qe(i[_e+2])}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(void 0!==e){let i=this.getAttribute("normal");if(void 0===i)i=new Ar(new Float32Array(3*e.count),3),this.setAttribute("normal",i);else for(let p=0,h=i.count;p<h;p++)i.setXYZ(p,0,0,0);let r=new K,o=new K,a=new K,s=new K,l=new K,c=new K,d=new K,u=new K;if(t)for(let p=0,h=t.count;p<h;p+=3){let m=t.getX(p+0),_=t.getX(p+1),M=t.getX(p+2);r.fromBufferAttribute(e,m),o.fromBufferAttribute(e,_),a.fromBufferAttribute(e,M),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),s.fromBufferAttribute(i,m),l.fromBufferAttribute(i,_),c.fromBufferAttribute(i,M),s.add(d),l.add(d),c.add(d),i.setXYZ(m,s.x,s.y,s.z),i.setXYZ(_,l.x,l.y,l.z),i.setXYZ(M,c.x,c.y,c.z)}else for(let p=0,h=e.count;p<h;p+=3)r.fromBufferAttribute(e,p+0),o.fromBufferAttribute(e,p+1),a.fromBufferAttribute(e,p+2),d.subVectors(a,o),u.subVectors(r,o),d.cross(u),i.setXYZ(p+0,d.x,d.y,d.z),i.setXYZ(p+1,d.x,d.y,d.z),i.setXYZ(p+2,d.x,d.y,d.z);this.normalizeNormals(),i.needsUpdate=!0}}merge(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));let i=this.attributes;for(let r in i){if(void 0===t.attributes[r])continue;let a=i[r].array,s=t.attributes[r],l=s.array,c=s.itemSize*e,d=Math.min(l.length,a.length-c);for(let u=0,p=c;u<d;u++,p++)a[p]=l[u]}return this}normalizeNormals(){let t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)Oo.fromBufferAttribute(t,e),Oo.normalize(),t.setXYZ(e,Oo.x,Oo.y,Oo.z)}toNonIndexed(){function t(s,l){let c=s.array,d=s.itemSize,u=s.normalized,p=new c.constructor(l.length*d),h=0,m=0;for(let _=0,M=l.length;_<M;_++){h=s.isInterleavedBufferAttribute?l[_]*s.data.stride+s.offset:l[_]*d;for(let y=0;y<d;y++)p[m++]=c[h++]}return new Ar(p,d,u)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new Gi,i=this.index.array,r=this.attributes;for(let s in r){let c=t(r[s],i);e.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let d=0,u=c.length;d<u;d++){let h=t(c[d],i);l.push(h)}e.morphAttributes[s]=l}e.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){let l=this.parameters;for(let c in l)void 0!==l[c]&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let i=this.attributes;for(let l in i)t.data.attributes[l]=i[l].toJSON(t.data);let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,p=c.length;u<p;u++)d.push(c[u].toJSON(t.data));d.length>0&&(r[l]=d,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let i=t.index;null!==i&&this.setIndex(i.clone(e));let r=t.attributes;for(let c in r)this.setAttribute(c,r[c].clone(e));let o=t.morphAttributes;for(let c in o){let d=[],u=o[c];for(let p=0,h=u.length;p<h;p++)d.push(u[p].clone(e));this.morphAttributes[c]=d}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let c=0,d=a.length;c<d;c++){let u=a[c];this.addGroup(u.start,u.count,u.materialIndex)}let s=t.boundingBox;null!==s&&(this.boundingBox=s.clone());let l=t.boundingSphere;return null!==l&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,void 0!==t.parameters&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}};Gi.prototype.isBufferGeometry=!0;var hee=new vn,P0=new Ep,R3=new Sp,fp=new K,gp=new K,_p=new K,P3=new K,k3=new K,O3=new K,KD=new K,JD=new K,$D=new K,eI=new $e,tI=new $e,nI=new $e,F3=new K,iI=new K,so=class extends Ui{constructor(t=new Gi,e=new vm){super(),this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){let a,i=this.geometry,r=this.material,o=this.matrixWorld;if(void 0!==r&&(null===i.boundingSphere&&i.computeBoundingSphere(),R3.copy(i.boundingSphere),R3.applyMatrix4(o),!1!==t.ray.intersectsSphere(R3))&&(hee.copy(o).invert(),P0.copy(t.ray).applyMatrix4(hee),null===i.boundingBox||!1!==P0.intersectsBox(i.boundingBox)))if(i.isBufferGeometry){let s=i.index,l=i.attributes.position,c=i.morphAttributes.position,d=i.morphTargetsRelative,u=i.attributes.uv,p=i.attributes.uv2,h=i.groups,m=i.drawRange;if(null!==s)if(Array.isArray(r))for(let _=0,M=h.length;_<M;_++){let y=h[_],x=r[y.materialIndex];for(let B=Math.max(y.start,m.start),ee=Math.min(s.count,Math.min(y.start+y.count,m.start+m.count));B<ee;B+=3){let Q=s.getX(B),we=s.getX(B+1),Qe=s.getX(B+2);a=rI(this,x,t,P0,l,c,d,u,p,Q,we,Qe),a&&(a.faceIndex=Math.floor(B/3),a.face.materialIndex=y.materialIndex,e.push(a))}}else for(let y=Math.max(0,m.start),x=Math.min(s.count,m.start+m.count);y<x;y+=3){let R=s.getX(y),I=s.getX(y+1),B=s.getX(y+2);a=rI(this,r,t,P0,l,c,d,u,p,R,I,B),a&&(a.faceIndex=Math.floor(y/3),e.push(a))}else if(void 0!==l)if(Array.isArray(r))for(let _=0,M=h.length;_<M;_++){let y=h[_],x=r[y.materialIndex];for(let B=Math.max(y.start,m.start),ee=Math.min(l.count,Math.min(y.start+y.count,m.start+m.count));B<ee;B+=3)a=rI(this,x,t,P0,l,c,d,u,p,B,B+1,B+2),a&&(a.faceIndex=Math.floor(B/3),a.face.materialIndex=y.materialIndex,e.push(a))}else for(let y=Math.max(0,m.start),x=Math.min(l.count,m.start+m.count);y<x;y+=3)a=rI(this,r,t,P0,l,c,d,u,p,y,y+1,y+2),a&&(a.faceIndex=Math.floor(y/3),e.push(a))}else i.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}};function rI(n,t,e,i,r,o,a,s,l,c,d,u){fp.fromBufferAttribute(r,c),gp.fromBufferAttribute(r,d),_p.fromBufferAttribute(r,u);let p=n.morphTargetInfluences;if(o&&p){KD.set(0,0,0),JD.set(0,0,0),$D.set(0,0,0);for(let m=0,_=o.length;m<_;m++){let M=p[m],y=o[m];0!==M&&(P3.fromBufferAttribute(y,c),k3.fromBufferAttribute(y,d),O3.fromBufferAttribute(y,u),a?(KD.addScaledVector(P3,M),JD.addScaledVector(k3,M),$D.addScaledVector(O3,M)):(KD.addScaledVector(P3.sub(fp),M),JD.addScaledVector(k3.sub(gp),M),$D.addScaledVector(O3.sub(_p),M)))}fp.add(KD),gp.add(JD),_p.add($D)}n.isSkinnedMesh&&(n.boneTransform(c,fp),n.boneTransform(d,gp),n.boneTransform(u,_p));let h=function(n,t,e,i,r,o,a,s){let l;if(l=t.side===bo?i.intersectTriangle(a,o,r,!0,s):i.intersectTriangle(r,o,a,t.side!==Z0,s),null===l)return null;iI.copy(s),iI.applyMatrix4(n.matrixWorld);let c=e.ray.origin.distanceTo(iI);return c<e.near||c>e.far?null:{distance:c,point:iI.clone(),object:n}}(n,t,e,i,fp,gp,_p,F3);if(h){s&&(eI.fromBufferAttribute(s,c),tI.fromBufferAttribute(s,d),nI.fromBufferAttribute(s,u),h.uv=Vr.getUV(F3,fp,gp,_p,eI,tI,nI,new $e)),l&&(eI.fromBufferAttribute(l,c),tI.fromBufferAttribute(l,d),nI.fromBufferAttribute(l,u),h.uv2=Vr.getUV(F3,fp,gp,_p,eI,tI,nI,new $e));let m={a:c,b:d,c:u,normal:new K,materialIndex:0};Vr.getNormal(fp,gp,_p,m.normal),h.face=m}return h}so.prototype.isMesh=!0;var ym=class extends Gi{constructor(t=1,e=1,i=1,r=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:r,heightSegments:o,depthSegments:a};let s=this;r=Math.floor(r),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],d=[],u=[],p=0,h=0;function m(_,M,y,x,R,I,B,ee,Q,we,Qe){let Ae=I/Q,D=B/we,re=I/2,ce=B/2,he=ee/2,_e=Q+1,$=we+1,de=0,pe=0,Ge=new K;for(let Se=0;Se<$;Se++){let Fe=Se*D-ce;for(let lt=0;lt<_e;lt++)Ge[_]=(lt*Ae-re)*x,Ge[M]=Fe*R,Ge[y]=he,c.push(Ge.x,Ge.y,Ge.z),Ge[_]=0,Ge[M]=0,Ge[y]=ee>0?1:-1,d.push(Ge.x,Ge.y,Ge.z),u.push(lt/Q),u.push(1-Se/we),de+=1}for(let Se=0;Se<we;Se++)for(let Fe=0;Fe<Q;Fe++){let Mt=p+Fe+_e*(Se+1),pt=p+(Fe+1)+_e*(Se+1),ke=p+(Fe+1)+_e*Se;l.push(p+Fe+_e*Se,Mt,ke),l.push(Mt,pt,ke),pe+=6}s.addGroup(h,pe,Qe),h+=pe,p+=de}m("z","y","x",-1,-1,i,e,t,a,o,0),m("z","y","x",1,-1,i,e,-t,a,o,1),m("x","z","y",1,1,t,i,e,r,a,2),m("x","z","y",1,-1,t,i,-e,r,a,3),m("x","y","z",1,-1,t,e,i,r,o,4),m("x","y","z",-1,-1,t,e,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new Nr(c,3)),this.setAttribute("normal",new Nr(d,3)),this.setAttribute("uv",new Nr(u,2))}static fromJSON(t){return new ym(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function J0(n){let t={};for(let e in n){t[e]={};for(let i in n[e]){let r=n[e][i];t[e][i]=r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.clone():Array.isArray(r)?r.slice():r}}return t}function na(n){let t={};for(let e=0;e<n.length;e++){let i=J0(n[e]);for(let r in i)t[r]=i[r]}return t}var dPe={clone:J0,merge:na},jd=class extends Fo{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=J0(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){let e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(let r in this.uniforms){let a=this.uniforms[r].value;e.uniforms[r]=a&&a.isTexture?{type:"t",value:a.toJSON(t).uuid}:a&&a.isColor?{type:"c",value:a.getHex()}:a&&a.isVector2?{type:"v2",value:a.toArray()}:a&&a.isVector3?{type:"v3",value:a.toArray()}:a&&a.isVector4?{type:"v4",value:a.toArray()}:a&&a.isMatrix3?{type:"m3",value:a.toArray()}:a&&a.isMatrix4?{type:"m4",value:a.toArray()}:{value:a}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let i={};for(let r in this.extensions)!0===this.extensions[r]&&(i[r]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}};jd.prototype.isShaderMaterial=!0;var Sx=class extends Ui{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new vn,this.projectionMatrix=new vn,this.projectionMatrixInverse=new vn}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}};Sx.prototype.isCamera=!0;var ra=class extends Sx{constructor(t=50,e=1,i=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=2*$3*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(.5*m3*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*$3*Math.atan(Math.tan(.5*m3*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,i,r,o,a){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=r,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(.5*m3*this.fov)/this.zoom,i=2*e,r=this.aspect*i,o=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){let l=a.fullWidth,c=a.fullHeight;o+=a.offsetX*r/l,e-=a.offsetY*i/c,r*=a.width/l,i*=a.height/c}let s=this.filmOffset;0!==s&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,e,e-i,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}};ra.prototype.isPerspectiveCamera=!0;var Ex=class extends Ui{constructor(t,e,i){if(super(),this.type="CubeCamera",!0!==i.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=i;let r=new ra(90,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new K(1,0,0)),this.add(r);let o=new ra(90,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new K(-1,0,0)),this.add(o);let a=new ra(90,1,t,e);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(new K(0,1,0)),this.add(a);let s=new ra(90,1,t,e);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new K(0,-1,0)),this.add(s);let l=new ra(90,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new K(0,0,1)),this.add(l);let c=new ra(90,1,t,e);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new K(0,0,-1)),this.add(c)}update(t,e){null===this.parent&&this.updateMatrixWorld();let i=this.renderTarget,[r,o,a,s,l,c]=this.children,d=t.xr.enabled,u=t.getRenderTarget();t.xr.enabled=!1;let p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0),t.render(e,r),t.setRenderTarget(i,1),t.render(e,o),t.setRenderTarget(i,2),t.render(e,a),t.setRenderTarget(i,3),t.render(e,s),t.setRenderTarget(i,4),t.render(e,l),i.texture.generateMipmaps=p,t.setRenderTarget(i,5),t.render(e,c),t.setRenderTarget(u),t.xr.enabled=d,i.texture.needsPMREMUpdate=!0}},$0=class extends lo{constructor(t,e,i,r,o,a,s,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Wx,i,r,o,a,s,l,c,d),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};$0.prototype.isCubeTexture=!0;var II=class extends ts{constructor(t,e,i){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=i),super(t,t,e),this.texture=new $0(void 0,(e=e||{}).mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:ia}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=Ca,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let i_uniforms={tEquirect:{value:null}},i_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new ym(5,5,5),o=new jd({name:"CubemapFromEquirect",uniforms:J0(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:bo,blending:vp});o.uniforms.tEquirect.value=e;let a=new so(r,o),s=e.minFilter;return e.minFilter===$I&&(e.minFilter=ia),new Ex(1,10,this).update(t,a),e.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(t,e,i,r){let o=t.getRenderTarget();for(let a=0;a<6;a++)t.setRenderTarget(this,a),t.clear(e,i,r);t.setRenderTarget(o)}};II.prototype.isWebGLCubeRenderTarget=!0;var N3=new K,hPe=new K,mPe=new yo,Xl=class{constructor(t=new K(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,r){return this.normal.set(t,e,i),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){let r=N3.subVectors(i,e).cross(hPe.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let i=t.delta(N3),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;let o=-(t.start.dot(this.normal)+this.constant)/r;return o<0||o>1?null:e.copy(i).multiplyScalar(o).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let i=e||mPe.getNormalMatrix(t),r=this.coplanarPoint(N3).applyMatrix4(t),o=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}};Xl.prototype.isPlane=!0;var F0=new Sp,oI=new K,e_=class{constructor(t=new Xl,e=new Xl,i=new Xl,r=new Xl,o=new Xl,a=new Xl){this.planes=[t,e,i,r,o,a]}set(t,e,i,r,o,a){let s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(r),s[4].copy(o),s[5].copy(a),this}copy(t){let e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t){let e=this.planes,i=t.elements,r=i[0],o=i[1],a=i[2],s=i[3],l=i[4],c=i[5],d=i[6],u=i[7],p=i[8],h=i[9],m=i[10],_=i[11],M=i[12],y=i[13],x=i[14],R=i[15];return e[0].setComponents(s-r,u-l,_-p,R-M).normalize(),e[1].setComponents(s+r,u+l,_+p,R+M).normalize(),e[2].setComponents(s+o,u+c,_+h,R+y).normalize(),e[3].setComponents(s-o,u-c,_-h,R-y).normalize(),e[4].setComponents(s-a,u-d,_-m,R-x).normalize(),e[5].setComponents(s+a,u+d,_+m,R+x).normalize(),this}intersectsObject(t){let e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),F0.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(F0)}intersectsSprite(t){return F0.center.set(0,0,0),F0.radius=.7071067811865476,F0.applyMatrix4(t.matrixWorld),this.intersectsSphere(F0)}intersectsSphere(t){let e=this.planes,i=t.center,r=-t.radius;for(let o=0;o<6;o++)if(e[o].distanceToPoint(i)<r)return!1;return!0}intersectsBox(t){let e=this.planes;for(let i=0;i<6;i++){let r=e[i];if(oI.x=r.normal.x>0?t.max.x:t.min.x,oI.y=r.normal.y>0?t.max.y:t.min.y,oI.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(oI)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}};function mte(){let n=null,t=!1,e=null,i=null;function r(o,a){e(o,a),i=n.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==e&&(i=n.requestAnimationFrame(r),t=!0)},stop:function(){n.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(o){e=o},setContext:function(o){n=o}}}function fPe(n,t){let e=t.isWebGL2,i=new WeakMap;return{get:function(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)},remove:function(c){c.isInterleavedBufferAttribute&&(c=c.data);let d=i.get(c);d&&(n.deleteBuffer(d.buffer),i.delete(c))},update:function(c,d){if(c.isGLBufferAttribute){let p=i.get(c);return void((!p||p.version<c.version)&&i.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version}))}c.isInterleavedBufferAttribute&&(c=c.data);let u=i.get(c);void 0===u?i.set(c,function(c,d){let u=c.array,p=c.usage,h=n.createBuffer();n.bindBuffer(d,h),n.bufferData(d,u,p),c.onUploadCallback();let m=5126;return u instanceof Float32Array?m=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?c.isFloat16BufferAttribute?e?m=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):m=5123:u instanceof Int16Array?m=5122:u instanceof Uint32Array?m=5125:u instanceof Int32Array?m=5124:u instanceof Int8Array?m=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(m=5121),{buffer:h,type:m,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}(c,d)):u.version<c.version&&(function(c,d,u){let p=d.array,h=d.updateRange;n.bindBuffer(u,c),-1===h.count?n.bufferSubData(u,0,p):(e?n.bufferSubData(u,h.offset*p.BYTES_PER_ELEMENT,p,h.offset,h.count):n.bufferSubData(u,h.offset*p.BYTES_PER_ELEMENT,p.subarray(h.offset,h.offset+h.count)),h.count=-1)}(u.buffer,c,d),u.version=c.version)}}}var Tx=class extends Gi{constructor(t=1,e=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:r};let o=t/2,a=e/2,s=Math.floor(i),l=Math.floor(r),c=s+1,d=l+1,u=t/s,p=e/l,h=[],m=[],_=[],M=[];for(let y=0;y<d;y++){let x=y*p-a;for(let R=0;R<c;R++)m.push(R*u-o,-x,0),_.push(0,0,1),M.push(R/s),M.push(1-y/l)}for(let y=0;y<l;y++)for(let x=0;x<s;x++){let I=x+c*(y+1),B=x+1+c*(y+1),ee=x+1+c*y;h.push(x+c*y,I,ee),h.push(I,B,ee)}this.setIndex(h),this.setAttribute("position",new Nr(m,3)),this.setAttribute("normal",new Nr(_,3)),this.setAttribute("uv",new Nr(M,2))}static fromJSON(t){return new Tx(t.width,t.height,t.widthSegments,t.heightSegments)}},vi={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 USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\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( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\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:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\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_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",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, float faceDirection ) {\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 ) * faceDirection;\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_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 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}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\treturn texture2D( envMap, uv ).rgb;\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\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:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\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 = ( isOrthographic ) ? vec3( 0, 0, 1 ) : 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;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.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}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * 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( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, 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 *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = 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 * faceDirection;\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 * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float 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 = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, 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_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\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 dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\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_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\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#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\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}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\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\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\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 <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\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 <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\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 <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_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_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\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#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\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 = isPerspectiveMatrix( projectionMatrix );\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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Rt={common:{diffuse:{value:new sn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new yo},uv2Transform:{value:new yo},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},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 $e(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:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new sn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yo}},sprite:{diffuse:{value:new sn(16777215)},opacity:{value:1},center:{value:new $e(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yo}}},jc={basic:{uniforms:na([Rt.common,Rt.specularmap,Rt.envmap,Rt.aomap,Rt.lightmap,Rt.fog]),vertexShader:vi.meshbasic_vert,fragmentShader:vi.meshbasic_frag},lambert:{uniforms:na([Rt.common,Rt.specularmap,Rt.envmap,Rt.aomap,Rt.lightmap,Rt.emissivemap,Rt.fog,Rt.lights,{emissive:{value:new sn(0)}}]),vertexShader:vi.meshlambert_vert,fragmentShader:vi.meshlambert_frag},phong:{uniforms:na([Rt.common,Rt.specularmap,Rt.envmap,Rt.aomap,Rt.lightmap,Rt.emissivemap,Rt.bumpmap,Rt.normalmap,Rt.displacementmap,Rt.fog,Rt.lights,{emissive:{value:new sn(0)},specular:{value:new sn(1118481)},shininess:{value:30}}]),vertexShader:vi.meshphong_vert,fragmentShader:vi.meshphong_frag},standard:{uniforms:na([Rt.common,Rt.envmap,Rt.aomap,Rt.lightmap,Rt.emissivemap,Rt.bumpmap,Rt.normalmap,Rt.displacementmap,Rt.roughnessmap,Rt.metalnessmap,Rt.fog,Rt.lights,{emissive:{value:new sn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vi.meshphysical_vert,fragmentShader:vi.meshphysical_frag},toon:{uniforms:na([Rt.common,Rt.aomap,Rt.lightmap,Rt.emissivemap,Rt.bumpmap,Rt.normalmap,Rt.displacementmap,Rt.gradientmap,Rt.fog,Rt.lights,{emissive:{value:new sn(0)}}]),vertexShader:vi.meshtoon_vert,fragmentShader:vi.meshtoon_frag},matcap:{uniforms:na([Rt.common,Rt.bumpmap,Rt.normalmap,Rt.displacementmap,Rt.fog,{matcap:{value:null}}]),vertexShader:vi.meshmatcap_vert,fragmentShader:vi.meshmatcap_frag},points:{uniforms:na([Rt.points,Rt.fog]),vertexShader:vi.points_vert,fragmentShader:vi.points_frag},dashed:{uniforms:na([Rt.common,Rt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vi.linedashed_vert,fragmentShader:vi.linedashed_frag},depth:{uniforms:na([Rt.common,Rt.displacementmap]),vertexShader:vi.depth_vert,fragmentShader:vi.depth_frag},normal:{uniforms:na([Rt.common,Rt.bumpmap,Rt.normalmap,Rt.displacementmap,{opacity:{value:1}}]),vertexShader:vi.meshnormal_vert,fragmentShader:vi.meshnormal_frag},sprite:{uniforms:na([Rt.sprite,Rt.fog]),vertexShader:vi.sprite_vert,fragmentShader:vi.sprite_frag},background:{uniforms:{uvTransform:{value:new yo},t2D:{value:null}},vertexShader:vi.background_vert,fragmentShader:vi.background_frag},cube:{uniforms:na([Rt.envmap,{opacity:{value:1}}]),vertexShader:vi.cube_vert,fragmentShader:vi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vi.equirect_vert,fragmentShader:vi.equirect_frag},distanceRGBA:{uniforms:na([Rt.common,Rt.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vi.distanceRGBA_vert,fragmentShader:vi.distanceRGBA_frag},shadow:{uniforms:na([Rt.lights,Rt.fog,{color:{value:new sn(0)},opacity:{value:1}}]),vertexShader:vi.shadow_vert,fragmentShader:vi.shadow_frag}};function UOe(n,t,e,i,r,o){let l,c,a=new sn(0),s=!0===r?0:1,d=null,u=0,p=null;function m(_,M){e.buffers.color.setClear(_.r,_.g,_.b,M,o)}return{getClearColor:function(){return a},setClearColor:function(_,M=1){a.set(_),s=M,m(a,s)},getClearAlpha:function(){return s},setClearAlpha:function(_){s=_,m(a,s)},render:function(_,M){let y=!1,x=!0===M.isScene?M.background:null;x&&x.isTexture&&(x=t.get(x));let R=n.xr,I=R.getSession&&R.getSession();I&&"additive"===I.environmentBlendMode&&(x=null),null===x?m(a,s):x&&x.isColor&&(m(x,1),y=!0),(n.autoClear||y)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),x&&(x.isCubeTexture||x.mapping===JI)?(void 0===c&&(c=new so(new ym(1,1,1),new jd({name:"BackgroundCubeMaterial",uniforms:J0(jc.cube.uniforms),vertexShader:jc.cube.vertexShader,fragmentShader:jc.cube.fragmentShader,side:bo,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(B,ee,Q){this.matrixWorld.copyPosition(Q.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=x,c.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,(d!==x||u!==x.version||p!==n.toneMapping)&&(c.material.needsUpdate=!0,d=x,u=x.version,p=n.toneMapping),_.unshift(c,c.geometry,c.material,0,0,null)):x&&x.isTexture&&(void 0===l&&(l=new so(new Tx(2,2),new jd({name:"BackgroundMaterial",uniforms:J0(jc.background.uniforms),vertexShader:jc.background.vertexShader,fragmentShader:jc.background.fragmentShader,side:yx,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=x,!0===x.matrixAutoUpdate&&x.updateMatrix(),l.material.uniforms.uvTransform.value.copy(x.matrix),(d!==x||u!==x.version||p!==n.toneMapping)&&(l.material.needsUpdate=!0,d=x,u=x.version,p=n.toneMapping),_.unshift(l,l.geometry,l.material,0,0,null))}}}function jOe(n,t,e,i){let r=n.getParameter(34921),o=i.isWebGL2?null:t.get("OES_vertex_array_object"),a=i.isWebGL2||null!==o,s={},l=_(null),c=l;function p(ce){return i.isWebGL2?n.bindVertexArray(ce):o.bindVertexArrayOES(ce)}function h(ce){return i.isWebGL2?n.deleteVertexArray(ce):o.deleteVertexArrayOES(ce)}function _(ce){let he=[],_e=[],$=[];for(let de=0;de<r;de++)he[de]=0,_e[de]=0,$[de]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:he,enabledAttributes:_e,attributeDivisors:$,object:ce,attributes:{},index:null}}function x(){let ce=c.newAttributes;for(let he=0,_e=ce.length;he<_e;he++)ce[he]=0}function R(ce){I(ce,0)}function I(ce,he){let $=c.enabledAttributes,de=c.attributeDivisors;c.newAttributes[ce]=1,0===$[ce]&&(n.enableVertexAttribArray(ce),$[ce]=1),de[ce]!==he&&((i.isWebGL2?n:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](ce,he),de[ce]=he)}function B(){let ce=c.newAttributes,he=c.enabledAttributes;for(let _e=0,$=he.length;_e<$;_e++)he[_e]!==ce[_e]&&(n.disableVertexAttribArray(_e),he[_e]=0)}function ee(ce,he,_e,$,de,pe){!0!==i.isWebGL2||5124!==_e&&5125!==_e?n.vertexAttribPointer(ce,he,_e,$,de,pe):n.vertexAttribIPointer(ce,he,_e,de,pe)}function D(){re(),c!==l&&(c=l,p(c.object))}function re(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(ce,he,_e,$,de){let pe=!1;if(a){let Ge=function(ce,he,_e){let $=!0===_e.wireframe,de=s[ce.id];void 0===de&&(de={},s[ce.id]=de);let pe=de[he.id];void 0===pe&&(pe={},de[he.id]=pe);let Ge=pe[$];return void 0===Ge&&(Ge=_(i.isWebGL2?n.createVertexArray():o.createVertexArrayOES()),pe[$]=Ge),Ge}($,_e,he);c!==Ge&&(c=Ge,p(c.object)),pe=function(ce,he){let _e=c.attributes,$=ce.attributes,de=0;for(let pe in $){let Ge=_e[pe],Se=$[pe];if(void 0===Ge||Ge.attribute!==Se||Ge.data!==Se.data)return!0;de++}return c.attributesNum!==de||c.index!==he}($,de),pe&&function(ce,he){let _e={},$=ce.attributes,de=0;for(let pe in $){let Ge=$[pe],Se={};Se.attribute=Ge,Ge.data&&(Se.data=Ge.data),_e[pe]=Se,de++}c.attributes=_e,c.attributesNum=de,c.index=he}($,de)}else{let Ge=!0===he.wireframe;(c.geometry!==$.id||c.program!==_e.id||c.wireframe!==Ge)&&(c.geometry=$.id,c.program=_e.id,c.wireframe=Ge,pe=!0)}!0===ce.isInstancedMesh&&(pe=!0),null!==de&&e.update(de,34963),pe&&(function(ce,he,_e,$){if(!1===i.isWebGL2&&(ce.isInstancedMesh||$.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;x();let de=$.attributes,pe=_e.getAttributes(),Ge=he.defaultAttributeValues;for(let Se in pe){let Fe=pe[Se];if(Fe.location>=0){let lt=de[Se];if(void 0===lt&&("instanceMatrix"===Se&&ce.instanceMatrix&&(lt=ce.instanceMatrix),"instanceColor"===Se&&ce.instanceColor&&(lt=ce.instanceColor)),void 0!==lt){let Mt=lt.normalized,pt=lt.itemSize,ke=e.get(lt);if(void 0===ke)continue;let Tn=ke.buffer,wt=ke.type,on=ke.bytesPerElement;if(lt.isInterleavedBufferAttribute){let Ce=lt.data,mt=Ce.stride,ht=lt.offset;if(Ce&&Ce.isInstancedInterleavedBuffer){for(let oe=0;oe<Fe.locationSize;oe++)I(Fe.location+oe,Ce.meshPerAttribute);!0!==ce.isInstancedMesh&&void 0===$._maxInstanceCount&&($._maxInstanceCount=Ce.meshPerAttribute*Ce.count)}else for(let oe=0;oe<Fe.locationSize;oe++)R(Fe.location+oe);n.bindBuffer(34962,Tn);for(let oe=0;oe<Fe.locationSize;oe++)ee(Fe.location+oe,pt/Fe.locationSize,wt,Mt,mt*on,(ht+pt/Fe.locationSize*oe)*on)}else{if(lt.isInstancedBufferAttribute){for(let Ce=0;Ce<Fe.locationSize;Ce++)I(Fe.location+Ce,lt.meshPerAttribute);!0!==ce.isInstancedMesh&&void 0===$._maxInstanceCount&&($._maxInstanceCount=lt.meshPerAttribute*lt.count)}else for(let Ce=0;Ce<Fe.locationSize;Ce++)R(Fe.location+Ce);n.bindBuffer(34962,Tn);for(let Ce=0;Ce<Fe.locationSize;Ce++)ee(Fe.location+Ce,pt/Fe.locationSize,wt,Mt,pt*on,pt/Fe.locationSize*Ce*on)}}else if(void 0!==Ge){let Mt=Ge[Se];if(void 0!==Mt)switch(Mt.length){case 2:n.vertexAttrib2fv(Fe.location,Mt);break;case 3:n.vertexAttrib3fv(Fe.location,Mt);break;case 4:n.vertexAttrib4fv(Fe.location,Mt);break;default:n.vertexAttrib1fv(Fe.location,Mt)}}}}B()}(ce,he,_e,$),null!==de&&n.bindBuffer(34963,e.get(de).buffer))},reset:D,resetDefaultState:re,dispose:function(){D();for(let ce in s){let he=s[ce];for(let _e in he){let $=he[_e];for(let de in $)h($[de].object),delete $[de];delete he[_e]}delete s[ce]}},releaseStatesOfGeometry:function(ce){if(void 0===s[ce.id])return;let he=s[ce.id];for(let _e in he){let $=he[_e];for(let de in $)h($[de].object),delete $[de];delete he[_e]}delete s[ce.id]},releaseStatesOfProgram:function(ce){for(let he in s){let _e=s[he];if(void 0===_e[ce.id])continue;let $=_e[ce.id];for(let de in $)h($[de].object),delete $[de];delete _e[ce.id]}},initAttributes:x,enableAttribute:R,disableUnusedAttributes:B}}function GOe(n,t,e,i){let o,r=i.isWebGL2;this.setMode=function(c){o=c},this.render=function(c,d){n.drawArrays(o,c,d),e.update(d,o,1)},this.renderInstances=function(c,d,u){if(0===u)return;let p,h;if(r)p=n,h="drawArraysInstanced";else if(p=t.get("ANGLE_instanced_arrays"),h="drawArraysInstancedANGLE",null===p)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");p[h](o,c,d,u),e.update(d,o,u)}}function WOe(n,t,e){let i;function o(Q){if("highp"===Q){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";Q="mediump"}return"mediump"===Q&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext<"u"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&n instanceof WebGL2ComputeRenderingContext,s=void 0!==e.precision?e.precision:"highp",l=o(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);let c=a||t.has("WEBGL_draw_buffers"),d=!0===e.logarithmicDepthBuffer,u=n.getParameter(34930),p=n.getParameter(35660),h=n.getParameter(3379),m=n.getParameter(34076),_=n.getParameter(34921),M=n.getParameter(36347),y=n.getParameter(36348),x=n.getParameter(36349),R=p>0,I=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let Q=t.get("EXT_texture_filter_anisotropic");i=n.getParameter(Q.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:o,precision:s,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:p,maxTextureSize:h,maxCubemapSize:m,maxAttributes:_,maxVertexUniforms:M,maxVaryings:y,maxFragmentUniforms:x,vertexTextures:R,floatFragmentTextures:I,floatVertexTextures:R&&I,maxSamples:a?n.getParameter(36183):0}}function qOe(n){let t=this,e=null,i=0,r=!1,o=!1,a=new Xl,s=new yo,l={value:null,needsUpdate:!1};function c(){l.value!==e&&(l.value=e,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function d(u,p,h,m){let _=null!==u?u.length:0,M=null;if(0!==_){if(M=l.value,!0!==m||null===M){let y=h+4*_,x=p.matrixWorldInverse;s.getNormalMatrix(x),(null===M||M.length<y)&&(M=new Float32Array(y));for(let R=0,I=h;R!==_;++R,I+=4)a.copy(u[R]).applyMatrix4(x,s),a.normal.toArray(M,I),M[I+3]=a.constant}l.value=M,l.needsUpdate=!0}return t.numPlanes=_,t.numIntersection=0,M}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,p,h){let m=0!==u.length||p||0!==i||r;return r=p,e=d(u,h,0),i=u.length,m},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,c()},this.setState=function(u,p,h){let m=u.clippingPlanes,_=u.clipIntersection,M=u.clipShadows,y=n.get(u);if(!r||null===m||0===m.length||o&&!M)o?d(null):c();else{let x=o?0:i,R=4*x,I=y.clippingState||null;l.value=I,I=d(m,p,R,h);for(let B=0;B!==R;++B)I[B]=e[B];y.clippingState=I,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=x}}}function XOe(n){let t=new WeakMap;function e(a,s){return s===Y3?a.mapping=Wx:s===Q3&&(a.mapping=qx),a}function r(a){let s=a.target;s.removeEventListener("dispose",r);let l=t.get(s);void 0!==l&&(t.delete(s),l.dispose())}return{get:function(a){if(a&&a.isTexture&&!1===a.isRenderTargetTexture){let s=a.mapping;if(s===Y3||s===Q3){if(t.has(a))return e(t.get(a).texture,a.mapping);{let l=a.image;if(l&&l.height>0){let c=new II(l.height/2);return c.fromEquirectangularTexture(n,a),t.set(a,c),a.addEventListener("dispose",r),e(c.texture,a.mapping)}return null}}}return a},dispose:function(){t=new WeakMap}}}jc.physical={uniforms:na([jc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new $e(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new sn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new $e},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new sn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new sn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:vi.meshphysical_vert,fragmentShader:vi.meshphysical_frag};var xm=class extends Sx{constructor(t=-1,e=1,i=1,r=-1,o=.1,a=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=r,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,i,r,o,a){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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=r,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=i-t,a=i+t,s=r+e,l=r-e;if(null!==this.view&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,a=o+c*this.view.width,s-=d*this.view.offsetY,l=s-d*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}};xm.prototype.isOrthographicCamera=!0;var t_=class extends jd{constructor(t){super(t),this.type="RawShaderMaterial"}};t_.prototype.isRawShaderMaterial=!0;var Q0=4,Cp=8,Uc=Math.pow(2,Cp),fte=[.125,.215,.35,.446,.526,.582],gte=Cp-Q0+1+fte.length,L3=new xm,{_lodPlanes:lx,_sizeLods:mee,_sigmas:aI}=YOe(),fee=new sn,B3=null,fm=(1+Math.sqrt(5))/2,L0=1/fm,gee=[new K(1,1,1),new K(-1,1,1),new K(1,1,-1),new K(-1,1,-1),new K(0,fm,L0),new K(0,fm,-L0),new K(L0,0,fm),new K(-L0,0,fm),new K(fm,L0,0),new K(-fm,L0,0)],AI=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=function(n){let t=new Float32Array(20),e=new K(0,1,0);return new t_({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:e}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:vp,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,i=.1,r=100){B3=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(t,i,r,o),e>0&&this._blur(o,0,0,e),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=vee(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=bee(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let t=0;t<lx.length;t++)lx[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(B3),t.scissorTest=!1,sI(t,0,0,t.width,t.height)}_fromTexture(t,e){B3=this._renderer.getRenderTarget();let i=e||this._allocateTargets(t);return this._textureToCubeUV(t,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(t){let e={magFilter:ia,minFilter:ia,generateMipmaps:!1,type:q0,format:Ca,encoding:wp,depthBuffer:!1},i=_ee(e);return i.depthBuffer=!t,null===this._pingPongRenderTarget&&(this._pingPongRenderTarget=_ee(e)),i}_compileMaterial(t){let e=new so(lx[0],t);this._renderer.compile(e,L3)}_sceneToCubeUV(t,e,i,r){let s=new ra(90,1,e,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,u=d.autoClear,p=d.toneMapping;d.getClearColor(fee),d.toneMapping=yp,d.autoClear=!1;let h=new vm({name:"PMREM.Background",side:bo,depthWrite:!1,depthTest:!1}),m=new so(new ym,h),_=!1,M=t.background;M?M.isColor&&(h.color.copy(M),t.background=null,_=!0):(h.color.copy(fee),_=!0);for(let y=0;y<6;y++){let x=y%3;0===x?(s.up.set(0,l[y],0),s.lookAt(c[y],0,0)):1===x?(s.up.set(0,0,l[y]),s.lookAt(0,c[y],0)):(s.up.set(0,l[y],0),s.lookAt(0,0,c[y])),sI(r,x*Uc,y>2?Uc:0,Uc,Uc),d.setRenderTarget(r),_&&d.render(m,s),d.render(t,s)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.autoClear=u,t.background=M}_textureToCubeUV(t,e){let i=this._renderer,r=t.mapping===Wx||t.mapping===qx;r?(null===this._cubemapShader&&(this._cubemapShader=vee()),this._cubemapShader.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectShader&&(this._equirectShader=bee());let o=r?this._cubemapShader:this._equirectShader,a=new so(lx[0],o),s=o.uniforms;s.envMap.value=t,r||s.texelSize.value.set(1/t.image.width,1/t.image.height),sI(e,0,0,3*Uc,2*Uc),i.setRenderTarget(e),i.render(a,L3)}_applyPMREM(t){let e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let r=1;r<gte;r++){let o=Math.sqrt(aI[r]*aI[r]-aI[r-1]*aI[r-1]);this._blur(t,r-1,r,o,gee[(r-1)%gee.length])}e.autoClear=i}_blur(t,e,i,r,o){let a=this._pingPongRenderTarget;this._halfBlur(t,a,e,i,r,"latitudinal",o),this._halfBlur(a,t,i,i,r,"longitudinal",o)}_halfBlur(t,e,i,r,o,a,s){let l=this._renderer,c=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");let u=new so(lx[r],c),p=c.uniforms,h=mee[i]-1,m=isFinite(o)?Math.PI/(2*h):2*Math.PI/39,_=o/m,M=isFinite(o)?1+Math.floor(3*_):20;M>20&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${M} samples when the maximum is set to 20`);let y=[],x=0;for(let ee=0;ee<20;++ee){let Q=ee/_,we=Math.exp(-Q*Q/2);y.push(we),0===ee?x+=we:ee<M&&(x+=2*we)}for(let ee=0;ee<y.length;ee++)y[ee]=y[ee]/x;p.envMap.value=t.texture,p.samples.value=M,p.weights.value=y,p.latitudinal.value="latitudinal"===a,s&&(p.poleAxis.value=s),p.dTheta.value=m,p.mipInt.value=Cp-i;let R=mee[r];sI(e,3*Math.max(0,Uc-2*R),(0===r?0:2*Uc)+2*R*(r>Cp-Q0?r-Cp+Q0:0),3*R,2*R),l.setRenderTarget(e),l.render(u,L3)}};function YOe(){let n=[],t=[],e=[],i=Cp;for(let r=0;r<gte;r++){let o=Math.pow(2,i);t.push(o);let a=1/o;r>Cp-Q0?a=fte[r-Cp+Q0-1]:0===r&&(a=0),e.push(a);let s=1/(o-1),l=-s/2,c=1+s/2,d=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,p=6,h=3,m=2,_=1,M=new Float32Array(h*p*u),y=new Float32Array(m*p*u),x=new Float32Array(_*p*u);for(let I=0;I<u;I++){let B=I%3*2/3-1,ee=I>2?0:-1;M.set([B,ee,0,B+2/3,ee,0,B+2/3,ee+1,0,B,ee,0,B+2/3,ee+1,0,B,ee+1,0],h*p*I),y.set(d,m*p*I),x.set([I,I,I,I,I,I],_*p*I)}let R=new Gi;R.setAttribute("position",new Ar(M,h)),R.setAttribute("uv",new Ar(y,m)),R.setAttribute("faceIndex",new Ar(x,_)),n.push(R),i>Q0&&i--}return{_lodPlanes:n,_sizeLods:t,_sigmas:e}}function _ee(n){let t=new ts(3*Uc,3*Uc,n);return t.texture.mapping=JI,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function sI(n,t,e,i,r){n.viewport.set(t,e,i,r),n.scissor.set(t,e,i,r)}function bee(){let n=new $e(1,1);return new t_({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = texture2D ( envMap, uv ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t}\n\t\t",blending:vp,depthTest:!1,depthWrite:!1})}function vee(){return new t_({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:vp,depthTest:!1,depthWrite:!1})}function ZOe(n){let t=new WeakMap,e=null;function o(s){let l=s.target;l.removeEventListener("dispose",o);let c=t.get(l);void 0!==c&&(t.delete(l),c.dispose())}return{get:function(s){if(s&&s.isTexture){let l=s.mapping,c=l===Y3||l===Q3,d=l===Wx||l===qx;if(c||d){if(s.isRenderTargetTexture&&!0===s.needsPMREMUpdate){s.needsPMREMUpdate=!1;let u=t.get(s);return null===e&&(e=new AI(n)),u=c?e.fromEquirectangular(s,u):e.fromCubemap(s,u),t.set(s,u),u.texture}if(t.has(s))return t.get(s).texture;{let u=s.image;if(c&&u&&u.height>0||d&&u&&function(s){let l=0;for(let d=0;d<6;d++)void 0!==s[d]&&l++;return 6===l}(u)){null===e&&(e=new AI(n));let p=c?e.fromEquirectangular(s):e.fromCubemap(s);return t.set(s,p),s.addEventListener("dispose",o),p.texture}return null}}}return s},dispose:function(){t=new WeakMap,null!==e&&(e.dispose(),e=null)}}}function KOe(n){let t={};function e(i){if(void 0!==t[i])return t[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return t[i]=r,r}return{has:function(i){return null!==e(i)},init:function(i){i.isWebGL2?e("EXT_color_buffer_float"):(e("WEBGL_depth_texture"),e("OES_texture_float"),e("OES_texture_half_float"),e("OES_texture_half_float_linear"),e("OES_standard_derivatives"),e("OES_element_index_uint"),e("OES_vertex_array_object"),e("ANGLE_instanced_arrays")),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture")},get:function(i){let r=e(i);return null===r&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function JOe(n,t,e,i){let r={},o=new WeakMap;function a(u){let p=u.target;null!==p.index&&t.remove(p.index);for(let m in p.attributes)t.remove(p.attributes[m]);p.removeEventListener("dispose",a),delete r[p.id];let h=o.get(p);h&&(t.remove(h),o.delete(p)),i.releaseStatesOfGeometry(p),!0===p.isInstancedBufferGeometry&&delete p._maxInstanceCount,e.memory.geometries--}function c(u){let p=[],h=u.index,m=u.attributes.position,_=0;if(null!==h){let x=h.array;_=h.version;for(let R=0,I=x.length;R<I;R+=3){let B=x[R+0],ee=x[R+1],Q=x[R+2];p.push(B,ee,ee,Q,Q,B)}}else{_=m.version;for(let R=0,I=m.array.length/3-1;R<I;R+=3){let B=R+0,ee=R+1,Q=R+2;p.push(B,ee,ee,Q,Q,B)}}let M=new(hte(p)?DI:TI)(p,1);M.version=_;let y=o.get(u);y&&t.remove(y),o.set(u,M)}return{get:function(u,p){return!0===r[p.id]||(p.addEventListener("dispose",a),r[p.id]=!0,e.memory.geometries++),p},update:function(u){let p=u.attributes;for(let m in p)t.update(p[m],34962);let h=u.morphAttributes;for(let m in h){let _=h[m];for(let M=0,y=_.length;M<y;M++)t.update(_[M],34962)}},getWireframeAttribute:function(u){let p=o.get(u);if(p){let h=u.index;null!==h&&p.version<h.version&&c(u)}else c(u);return o.get(u)}}}function $Oe(n,t,e,i){let o,s,l,r=i.isWebGL2;this.setMode=function(p){o=p},this.setIndex=function(p){s=p.type,l=p.bytesPerElement},this.render=function(p,h){n.drawElements(o,h,s,p*l),e.update(h,o,1)},this.renderInstances=function(p,h,m){if(0===m)return;let _,M;if(r)_=n,M="drawElementsInstanced";else if(_=t.get("ANGLE_instanced_arrays"),M="drawElementsInstancedANGLE",null===_)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");_[M](o,h,s,p*l,m),e.update(h,o,m)}}function eFe(n){let e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(o,a,s){switch(e.calls++,a){case 4:e.triangles+=s*(o/3);break;case 1:e.lines+=s*(o/2);break;case 3:e.lines+=s*(o-1);break;case 2:e.lines+=s*o;break;case 0:e.points+=s*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a)}}}}var Dx=class extends lo{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=vo,this.minFilter=vo,this.wrapR=Es,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};function tFe(n,t){return n[0]-t[0]}function nFe(n,t){return Math.abs(t[1])-Math.abs(n[1])}function yee(n,t){let e=1,i=t.isInterleavedBufferAttribute?t.data.array:t.array;i instanceof Int8Array?e=127:i instanceof Int16Array?e=32767:i instanceof Int32Array?e=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",i),n.divideScalar(e)}function iFe(n,t,e){let i={},r=new Float32Array(8),o=new WeakMap,a=new K,s=[];for(let c=0;c<8;c++)s[c]=[c,0];return{update:function(c,d,u,p){let h=c.morphTargetInfluences;if(!0===t.isWebGL2){let m=d.morphAttributes.position.length,_=o.get(d);if(void 0===_||_.count!==m){let re=function(){Ae.dispose(),o.delete(d),d.removeEventListener("dispose",re)};void 0!==_&&_.texture.dispose();let x=void 0!==d.morphAttributes.normal,R=d.morphAttributes.position,I=d.morphAttributes.normal||[],ee=!0===x?2:1,Q=d.attributes.position.count*ee,we=1;Q>t.maxTextureSize&&(we=Math.ceil(Q/t.maxTextureSize),Q=t.maxTextureSize);let Qe=new Float32Array(Q*we*4*m),Ae=new Dx(Qe,Q,we,m);Ae.format=Ca,Ae.type=gm,Ae.needsUpdate=!0;let D=4*ee;for(let ce=0;ce<m;ce++){let he=R[ce],_e=I[ce],$=Q*we*4*ce;for(let de=0;de<he.count;de++){a.fromBufferAttribute(he,de),!0===he.normalized&&yee(a,he);let pe=de*D;Qe[$+pe+0]=a.x,Qe[$+pe+1]=a.y,Qe[$+pe+2]=a.z,Qe[$+pe+3]=0,!0===x&&(a.fromBufferAttribute(_e,de),!0===_e.normalized&&yee(a,_e),Qe[$+pe+4]=a.x,Qe[$+pe+5]=a.y,Qe[$+pe+6]=a.z,Qe[$+pe+7]=0)}}_={count:m,texture:Ae,size:new $e(Q,we)},o.set(d,_),d.addEventListener("dispose",re)}let M=0;for(let x=0;x<h.length;x++)M+=h[x];let y=d.morphTargetsRelative?1:1-M;p.getUniforms().setValue(n,"morphTargetBaseInfluence",y),p.getUniforms().setValue(n,"morphTargetInfluences",h),p.getUniforms().setValue(n,"morphTargetsTexture",_.texture,e),p.getUniforms().setValue(n,"morphTargetsTextureSize",_.size)}else{let m=void 0===h?0:h.length,_=i[d.id];if(void 0===_||_.length!==m){_=[];for(let I=0;I<m;I++)_[I]=[I,0];i[d.id]=_}for(let I=0;I<m;I++){let B=_[I];B[0]=I,B[1]=h[I]}_.sort(nFe);for(let I=0;I<8;I++)I<m&&_[I][1]?(s[I][0]=_[I][0],s[I][1]=_[I][1]):(s[I][0]=Number.MAX_SAFE_INTEGER,s[I][1]=0);s.sort(tFe);let M=d.morphAttributes.position,y=d.morphAttributes.normal,x=0;for(let I=0;I<8;I++){let B=s[I],ee=B[0],Q=B[1];ee!==Number.MAX_SAFE_INTEGER&&Q?(M&&d.getAttribute("morphTarget"+I)!==M[ee]&&d.setAttribute("morphTarget"+I,M[ee]),y&&d.getAttribute("morphNormal"+I)!==y[ee]&&d.setAttribute("morphNormal"+I,y[ee]),r[I]=Q,x+=Q):(M&&!0===d.hasAttribute("morphTarget"+I)&&d.deleteAttribute("morphTarget"+I),y&&!0===d.hasAttribute("morphNormal"+I)&&d.deleteAttribute("morphNormal"+I),r[I]=0)}let R=d.morphTargetsRelative?1:1-x;p.getUniforms().setValue(n,"morphTargetBaseInfluence",R),p.getUniforms().setValue(n,"morphTargetInfluences",r)}}}}function rFe(n,t,e,i){let r=new WeakMap;function s(l){let c=l.target;c.removeEventListener("dispose",s),e.remove(c.instanceMatrix),null!==c.instanceColor&&e.remove(c.instanceColor)}return{update:function(l){let c=i.render.frame,u=t.get(l,l.geometry);return r.get(u)!==c&&(t.update(u),r.set(u,c)),l.isInstancedMesh&&(!1===l.hasEventListener("dispose",s)&&l.addEventListener("dispose",s),e.update(l.instanceMatrix,34962),null!==l.instanceColor&&e.update(l.instanceColor,34962)),u},dispose:function(){r=new WeakMap}}}Dx.prototype.isDataTexture2DArray=!0;var RI=class extends lo{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=vo,this.minFilter=vo,this.wrapR=Es,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};RI.prototype.isDataTexture3D=!0;var _te=new lo,bte=new Dx,vte=new RI,yte=new $0,xee=[],Cee=[],Mee=new Float32Array(16),wee=new Float32Array(9),See=new Float32Array(4);function d_(n,t,e){let i=n[0];if(i<=0||i>0)return n;let r=t*e,o=xee[r];if(void 0===o&&(o=new Float32Array(r),xee[r]=o),0!==t){i.toArray(o,0);for(let a=1,s=0;a!==t;++a)s+=e,n[a].toArray(o,s)}return o}function Ma(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(n[e]!==t[e])return!1;return!0}function aa(n,t){for(let e=0,i=t.length;e<i;e++)n[e]=t[e]}function eA(n,t){let e=Cee[t];void 0===e&&(e=new Int32Array(t),Cee[t]=e);for(let i=0;i!==t;++i)e[i]=n.allocateTextureUnit();return e}function oFe(n,t){let e=this.cache;e[0]!==t&&(n.uniform1f(this.addr,t),e[0]=t)}function aFe(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y)&&(n.uniform2f(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Ma(e,t))return;n.uniform2fv(this.addr,t),aa(e,t)}}function sFe(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(n.uniform3f(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else if(void 0!==t.r)(e[0]!==t.r||e[1]!==t.g||e[2]!==t.b)&&(n.uniform3f(this.addr,t.r,t.g,t.b),e[0]=t.r,e[1]=t.g,e[2]=t.b);else{if(Ma(e,t))return;n.uniform3fv(this.addr,t),aa(e,t)}}function lFe(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(n.uniform4f(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Ma(e,t))return;n.uniform4fv(this.addr,t),aa(e,t)}}function cFe(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(Ma(e,t))return;n.uniformMatrix2fv(this.addr,!1,t),aa(e,t)}else{if(Ma(e,i))return;See.set(i),n.uniformMatrix2fv(this.addr,!1,See),aa(e,i)}}function dFe(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(Ma(e,t))return;n.uniformMatrix3fv(this.addr,!1,t),aa(e,t)}else{if(Ma(e,i))return;wee.set(i),n.uniformMatrix3fv(this.addr,!1,wee),aa(e,i)}}function uFe(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(Ma(e,t))return;n.uniformMatrix4fv(this.addr,!1,t),aa(e,t)}else{if(Ma(e,i))return;Mee.set(i),n.uniformMatrix4fv(this.addr,!1,Mee),aa(e,i)}}function pFe(n,t){let e=this.cache;e[0]!==t&&(n.uniform1i(this.addr,t),e[0]=t)}function hFe(n,t){let e=this.cache;Ma(e,t)||(n.uniform2iv(this.addr,t),aa(e,t))}function mFe(n,t){let e=this.cache;Ma(e,t)||(n.uniform3iv(this.addr,t),aa(e,t))}function fFe(n,t){let e=this.cache;Ma(e,t)||(n.uniform4iv(this.addr,t),aa(e,t))}function gFe(n,t){let e=this.cache;e[0]!==t&&(n.uniform1ui(this.addr,t),e[0]=t)}function _Fe(n,t){let e=this.cache;Ma(e,t)||(n.uniform2uiv(this.addr,t),aa(e,t))}function bFe(n,t){let e=this.cache;Ma(e,t)||(n.uniform3uiv(this.addr,t),aa(e,t))}function vFe(n,t){let e=this.cache;Ma(e,t)||(n.uniform4uiv(this.addr,t),aa(e,t))}function yFe(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTexture2D(t||_te,r)}function xFe(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture3D(t||vte,r)}function CFe(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTextureCube(t||yte,r)}function MFe(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture2DArray(t||bte,r)}function SFe(n,t){n.uniform1fv(this.addr,t)}function EFe(n,t){let e=d_(t,this.size,2);n.uniform2fv(this.addr,e)}function TFe(n,t){let e=d_(t,this.size,3);n.uniform3fv(this.addr,e)}function DFe(n,t){let e=d_(t,this.size,4);n.uniform4fv(this.addr,e)}function IFe(n,t){let e=d_(t,this.size,4);n.uniformMatrix2fv(this.addr,!1,e)}function AFe(n,t){let e=d_(t,this.size,9);n.uniformMatrix3fv(this.addr,!1,e)}function RFe(n,t){let e=d_(t,this.size,16);n.uniformMatrix4fv(this.addr,!1,e)}function PFe(n,t){n.uniform1iv(this.addr,t)}function kFe(n,t){n.uniform2iv(this.addr,t)}function OFe(n,t){n.uniform3iv(this.addr,t)}function FFe(n,t){n.uniform4iv(this.addr,t)}function NFe(n,t){n.uniform1uiv(this.addr,t)}function LFe(n,t){n.uniform2uiv(this.addr,t)}function BFe(n,t){n.uniform3uiv(this.addr,t)}function VFe(n,t){n.uniform4uiv(this.addr,t)}function HFe(n,t,e){let i=t.length,r=eA(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTexture2D(t[o]||_te,r[o])}function zFe(n,t,e){let i=t.length,r=eA(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture3D(t[o]||vte,r[o])}function UFe(n,t,e){let i=t.length,r=eA(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTextureCube(t[o]||yte,r[o])}function jFe(n,t,e){let i=t.length,r=eA(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture2DArray(t[o]||bte,r[o])}function WFe(n,t,e){this.id=n,this.addr=e,this.cache=[],this.setValue=function(n){switch(n){case 5126:return oFe;case 35664:return aFe;case 35665:return sFe;case 35666:return lFe;case 35674:return cFe;case 35675:return dFe;case 35676:return uFe;case 5124:case 35670:return pFe;case 35667:case 35671:return hFe;case 35668:case 35672:return mFe;case 35669:case 35673:return fFe;case 5125:return gFe;case 36294:return _Fe;case 36295:return bFe;case 36296:return vFe;case 35678:case 36198:case 36298:case 36306:case 35682:return yFe;case 35679:case 36299:case 36307:return xFe;case 35680:case 36300:case 36308:case 36293:return CFe;case 36289:case 36303:case 36311:case 36292:return MFe}}(t.type)}function xte(n,t,e){this.id=n,this.addr=e,this.cache=[],this.size=t.size,this.setValue=function(n){switch(n){case 5126:return SFe;case 35664:return EFe;case 35665:return TFe;case 35666:return DFe;case 35674:return IFe;case 35675:return AFe;case 35676:return RFe;case 5124:case 35670:return PFe;case 35667:case 35671:return kFe;case 35668:case 35672:return OFe;case 35669:case 35673:return FFe;case 5125:return NFe;case 36294:return LFe;case 36295:return BFe;case 36296:return VFe;case 35678:case 36198:case 36298:case 36306:case 35682:return HFe;case 35679:case 36299:case 36307:return zFe;case 35680:case 36300:case 36308:case 36293:return UFe;case 36289:case 36303:case 36311:case 36292:return jFe}}(t.type)}function Cte(n){this.id=n,this.seq=[],this.map={}}xte.prototype.updateCache=function(n){let t=this.cache;n instanceof Float32Array&&t.length!==n.length&&(this.cache=new Float32Array(n.length)),aa(t,n)},Cte.prototype.setValue=function(n,t,e){let i=this.seq;for(let r=0,o=i.length;r!==o;++r){let a=i[r];a.setValue(n,t[a.id],e)}};var V3=/(\w+)(\])?(\[|\.)?/g;function Eee(n,t){n.seq.push(t),n.map[t.id]=t}function qFe(n,t,e){let i=n.name,r=i.length;for(V3.lastIndex=0;;){let o=V3.exec(i),s=o[1],c=o[3];if("]"===o[2]&&(s|=0),void 0===c||"["===c&&V3.lastIndex+2===r){Eee(e,void 0===c?new WFe(s,n,t):new xte(s,n,t));break}{let u=e.map[s];void 0===u&&(u=new Cte(s),Eee(e,u)),e=u}}}function Mp(n,t){this.seq=[],this.map={};let e=n.getProgramParameter(t,35718);for(let i=0;i<e;++i){let r=n.getActiveUniform(t,i);qFe(r,n.getUniformLocation(t,r.name),this)}}function Tee(n,t,e){let i=n.createShader(t);return n.shaderSource(i,e),n.compileShader(i),i}Mp.prototype.setValue=function(n,t,e,i){let r=this.map[t];void 0!==r&&r.setValue(n,e,i)},Mp.prototype.setOptional=function(n,t,e){let i=t[e];void 0!==i&&this.setValue(n,e,i)},Mp.upload=function(n,t,e,i){for(let r=0,o=t.length;r!==o;++r){let a=t[r],s=e[a.id];!1!==s.needsUpdate&&a.setValue(n,s.value,i)}},Mp.seqWithValue=function(n,t){let e=[];for(let i=0,r=n.length;i!==r;++i){let o=n[i];o.id in t&&e.push(o)}return e};var XFe=0;function Dee(n,t,e){let i=n.getShaderParameter(t,35713),r=n.getShaderInfoLog(t).trim();return i&&""===r?"":e.toUpperCase()+"\n\n"+r+"\n\n"+function(n){let t=n.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(n.getShaderSource(t))}function ZFe(n,t){let e=function(n){switch(n){case wp:return["Linear","( value )"];case Dr:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}(t);return"vec4 "+n+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function KFe(n,t){let e;switch(t){case MRe:e="Linear";break;case wRe:e="Reinhard";break;case SRe:e="OptimizedCineon";break;case ERe:e="ACESFilmic";break;case TRe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+n+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function fx(n){return""!==n}function Iee(n,t){return n.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Aee(n,t){return n.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var t2e=/^[ \t]*#include +<([\w\d./]+)>/gm;function nB(n){return n.replace(t2e,n2e)}function n2e(n,t){let e=vi[t];if(void 0===e)throw new Error("Can not resolve #include <"+t+">");return nB(e)}var i2e=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,r2e=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ree(n){return n.replace(r2e,Mte).replace(i2e,o2e)}function o2e(n,t,e,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Mte(0,t,e,i)}function Mte(n,t,e,i){let r="";for(let o=parseInt(t);o<parseInt(e);o++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return r}function Pee(n){let t="precision "+n.precision+" float;\nprecision "+n.precision+" int;";return"highp"===n.precision?t+="\n#define HIGH_PRECISION":"mediump"===n.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===n.precision&&(t+="\n#define LOW_PRECISION"),t}function d2e(n,t,e,i){let _,M,r=n.getContext(),o=e.defines,a=e.vertexShader,s=e.fragmentShader,l=function(n){let t="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===ste?t="SHADOWMAP_TYPE_PCF":n.shadowMapType===tRe?t="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===mx&&(t="SHADOWMAP_TYPE_VSM"),t}(e),c=function(n){let t="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Wx:case qx:t="ENVMAP_TYPE_CUBE";break;case JI:case lV:t="ENVMAP_TYPE_CUBE_UV"}return t}(e),d=function(n){let t="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case qx:case lV:t="ENVMAP_MODE_REFRACTION"}return t}(e),u=function(n){let t="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case KI:t="ENVMAP_BLENDING_MULTIPLY";break;case xRe:t="ENVMAP_BLENDING_MIX";break;case CRe:t="ENVMAP_BLENDING_ADD"}return t}(e),p=e.isWebGL2?"":function(n){return[n.extensionDerivatives||n.envMapCubeUV||n.bumpMap||n.tangentSpaceNormalMap||n.clearcoatNormalMap||n.flatShading||"physical"===n.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(fx).join("\n")}(e),h=function(n){let t=[];for(let e in n){let i=n[e];!1!==i&&t.push("#define "+e+" "+i)}return t.join("\n")}(o),m=r.createProgram(),y=e.glslVersion?"#version "+e.glslVersion+"\n":"";e.isRawShaderMaterial?(_=[h].filter(fx).join("\n"),_.length>0&&(_+="\n"),M=[p,h].filter(fx).join("\n"),M.length>0&&(M+="\n")):(_=[Pee(e),"#define SHADER_NAME "+e.shaderName,h,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+e.maxBones,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+d:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.useVertexTexture?"#define BONE_TEXTURE":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&!1===e.flatShading?"#define USE_MORPHNORMALS":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\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(fx).join("\n"),M=[p,Pee(e),"#define SHADER_NAME "+e.shaderName,h,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+c:"",e.envMap?"#define "+d:"",e.envMap?"#define "+u:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==yp?"#define TONE_MAPPING":"",e.toneMapping!==yp?vi.tonemapping_pars_fragment:"",e.toneMapping!==yp?KFe("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.alphaWrite?"":"#define OPAQUE",vi.encodings_pars_fragment,ZFe("linearToOutputTexel",e.outputEncoding),e.depthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(fx).join("\n")),a=nB(a),a=Iee(a,e),a=Aee(a,e),s=nB(s),s=Iee(s,e),s=Aee(s,e),a=Ree(a),s=Ree(s),e.isWebGL2&&!0!==e.isRawShaderMaterial&&(y="#version 300 es\n",_=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+_,M=["#define varying in",e.glslVersion===eee?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===eee?"":"#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"+M);let ee,Q,R=y+M+s,I=Tee(r,35633,y+_+a),B=Tee(r,35632,R);if(r.attachShader(m,I),r.attachShader(m,B),void 0!==e.index0AttributeName?r.bindAttribLocation(m,0,e.index0AttributeName):!0===e.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),n.debug.checkShaderErrors){let we=r.getProgramInfoLog(m).trim(),Qe=r.getShaderInfoLog(I).trim(),Ae=r.getShaderInfoLog(B).trim(),D=!0,re=!0;if(!1===r.getProgramParameter(m,35714)){D=!1;let ce=Dee(r,I,"vertex"),he=Dee(r,B,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+"\n\nProgram Info Log: "+we+"\n"+ce+"\n"+he)}else""!==we?console.warn("THREE.WebGLProgram: Program Info Log:",we):(""===Qe||""===Ae)&&(re=!1);re&&(this.diagnostics={runnable:D,programLog:we,vertexShader:{log:Qe,prefix:_},fragmentShader:{log:Ae,prefix:M}})}return r.deleteShader(I),r.deleteShader(B),this.getUniforms=function(){return void 0===ee&&(ee=new Mp(r,m)),ee},this.getAttributes=function(){return void 0===Q&&(Q=function(n,t){let e={},i=n.getProgramParameter(t,35721);for(let r=0;r<i;r++){let o=n.getActiveAttrib(t,r),a=o.name,s=1;35674===o.type&&(s=2),35675===o.type&&(s=3),35676===o.type&&(s=4),e[a]={type:o.type,location:n.getAttribLocation(t,a),locationSize:s}}return e}(r,m)),Q},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=e.shaderName,this.id=XFe++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=I,this.fragmentShader=B,this}var u2e=0,iB=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let i=t.fragmentShader,r=this._getShaderStage(t.vertexShader),o=this._getShaderStage(i),a=this._getShaderCacheForMaterial(t);return!1===a.has(r)&&(a.add(r),r.usedTimes++),!1===a.has(o)&&(a.add(o),o.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let i of e)i.usedTimes--,0===i.usedTimes&&this.shaderCache.delete(i);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache;return!1===e.has(t)&&e.set(t,new Set),e.get(t)}_getShaderStage(t){let e=this.shaderCache;if(!1===e.has(t)){let i=new rB;e.set(t,i)}return e.get(t)}},rB=class{constructor(){this.id=u2e++,this.usedTimes=0}};function p2e(n,t,e,i,r,o,a){let s=new EI,l=new iB,c=[],d=r.isWebGL2,u=r.logarithmicDepthBuffer,p=r.floatVertexTextures,h=r.maxVertexUniforms,m=r.vertexTextures,_=r.precision,M={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(D,re,ce,he,_e){let Fe,lt,Mt,pt,$=he.fog,pe=(D.isMeshStandardMaterial?e:t).get(D.envMap||(D.isMeshStandardMaterial?he.environment:null)),Ge=M[D.type],Se=_e.isSkinnedMesh?function(D){let ce=D.skeleton.bones;if(p)return 1024;{let _e=Math.floor((h-20)/4),$=Math.min(_e,ce.length);return $<ce.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+ce.length+" bones. This GPU supports "+$+"."),0):$}}(_e):0;if(null!==D.precision&&(_=r.getMaxPrecision(D.precision),_!==D.precision&&console.warn("THREE.WebGLProgram.getParameters:",D.precision,"not supported, using",_,"instead.")),Ge){let Ce=jc[Ge];Fe=Ce.vertexShader,lt=Ce.fragmentShader}else Fe=D.vertexShader,lt=D.fragmentShader,l.update(D),Mt=l.getVertexShaderID(D),pt=l.getFragmentShaderID(D);let ke=n.getRenderTarget(),wt=D.clearcoat>0;return{isWebGL2:d,shaderID:Ge,shaderName:D.type,vertexShader:Fe,fragmentShader:lt,defines:D.defines,customVertexShaderID:Mt,customFragmentShaderID:pt,isRawShaderMaterial:!0===D.isRawShaderMaterial,glslVersion:D.glslVersion,precision:_,instancing:!0===_e.isInstancedMesh,instancingColor:!0===_e.isInstancedMesh&&null!==_e.instanceColor,supportsVertexTextures:m,outputEncoding:null===ke?n.outputEncoding:!0===ke.isXRRenderTarget?ke.texture.encoding:wp,map:!!D.map,matcap:!!D.matcap,envMap:!!pe,envMapMode:pe&&pe.mapping,envMapCubeUV:!!pe&&(pe.mapping===JI||pe.mapping===lV),lightMap:!!D.lightMap,aoMap:!!D.aoMap,emissiveMap:!!D.emissiveMap,bumpMap:!!D.bumpMap,normalMap:!!D.normalMap,objectSpaceNormalMap:D.normalMapType===QRe,tangentSpaceNormalMap:D.normalMapType===c_,decodeVideoTexture:!!D.map&&!0===D.map.isVideoTexture&&D.map.encoding===Dr,clearcoat:wt,clearcoatMap:wt&&!!D.clearcoatMap,clearcoatRoughnessMap:wt&&!!D.clearcoatRoughnessMap,clearcoatNormalMap:wt&&!!D.clearcoatNormalMap,displacementMap:!!D.displacementMap,roughnessMap:!!D.roughnessMap,metalnessMap:!!D.metalnessMap,specularMap:!!D.specularMap,specularIntensityMap:!!D.specularIntensityMap,specularColorMap:!!D.specularColorMap,alphaMap:!!D.alphaMap,alphaTest:D.alphaTest>0,alphaWrite:D.alphaWrite||D.transparent,gradientMap:!!D.gradientMap,sheen:D.sheen>0,sheenColorMap:!!D.sheenColorMap,sheenRoughnessMap:!!D.sheenRoughnessMap,transmission:D.transmission>0,transmissionMap:!!D.transmissionMap,thicknessMap:!!D.thicknessMap,combine:D.combine,vertexTangents:!!D.normalMap&&!!_e.geometry&&!!_e.geometry.attributes.tangent,vertexColors:D.vertexColors,vertexAlphas:!0===D.vertexColors&&!!_e.geometry&&!!_e.geometry.attributes.color&&4===_e.geometry.attributes.color.itemSize,vertexUvs:!!(D.map||D.bumpMap||D.normalMap||D.specularMap||D.alphaMap||D.emissiveMap||D.roughnessMap||D.metalnessMap||D.clearcoatMap||D.clearcoatRoughnessMap||D.clearcoatNormalMap||D.displacementMap||D.transmissionMap||D.thicknessMap||D.specularIntensityMap||D.specularColorMap||D.sheenColorMap||D.sheenRoughnessMap),uvsVertexOnly:!(D.map||D.bumpMap||D.normalMap||D.specularMap||D.alphaMap||D.emissiveMap||D.roughnessMap||D.metalnessMap||D.clearcoatNormalMap||D.transmission>0||D.transmissionMap||D.thicknessMap||D.specularIntensityMap||D.specularColorMap||D.sheen>0||D.sheenColorMap||D.sheenRoughnessMap||!D.displacementMap),fog:!!$,useFog:D.fog,fogExp2:$&&$.isFogExp2,flatShading:!!D.flatShading,sizeAttenuation:D.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===_e.isSkinnedMesh&&Se>0,maxBones:Se,useVertexTexture:p,morphTargets:!!_e.geometry&&!!_e.geometry.morphAttributes.position,morphNormals:!!_e.geometry&&!!_e.geometry.morphAttributes.normal,morphTargetsCount:_e.geometry&&_e.geometry.morphAttributes.position?_e.geometry.morphAttributes.position.length:0,numDirLights:re.directional.length,numPointLights:re.point.length,numSpotLights:re.spot.length,numRectAreaLights:re.rectArea.length,numHemiLights:re.hemi.length,numDirLightShadows:re.directionalShadowMap.length,numPointLightShadows:re.pointShadowMap.length,numSpotLightShadows:re.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:D.dithering,shadowMapEnabled:n.shadowMap.enabled&&ce.length>0,shadowMapType:n.shadowMap.type,toneMapping:D.toneMapped?n.toneMapping:yp,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:D.premultipliedAlpha,doubleSided:D.side===Z0,flipSided:D.side===bo,depthPacking:void 0!==D.depthPacking&&D.depthPacking,index0AttributeName:D.index0AttributeName,extensionDerivatives:D.extensions&&D.extensions.derivatives,extensionFragDepth:D.extensions&&D.extensions.fragDepth,extensionDrawBuffers:D.extensions&&D.extensions.drawBuffers,extensionShaderTextureLOD:D.extensions&&D.extensions.shaderTextureLOD,rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),customProgramCacheKey:D.customProgramCacheKey()}},getProgramCacheKey:function(D){let re=[];if(D.shaderID?re.push(D.shaderID):(re.push(D.customVertexShaderID),re.push(D.customFragmentShaderID)),void 0!==D.defines)for(let ce in D.defines)re.push(ce),re.push(D.defines[ce]);return!1===D.isRawShaderMaterial&&(function(D,re){D.push(re.precision),D.push(re.outputEncoding),D.push(re.envMapMode),D.push(re.combine),D.push(re.vertexUvs),D.push(re.fogExp2),D.push(re.sizeAttenuation),D.push(re.maxBones),D.push(re.morphTargetsCount),D.push(re.numDirLights),D.push(re.numPointLights),D.push(re.numSpotLights),D.push(re.numHemiLights),D.push(re.numRectAreaLights),D.push(re.numDirLightShadows),D.push(re.numPointLightShadows),D.push(re.numSpotLightShadows),D.push(re.shadowMapType),D.push(re.toneMapping),D.push(re.numClippingPlanes),D.push(re.numClipIntersection),D.push(re.alphaWrite)}(re,D),function(D,re){s.disableAll(),re.isWebGL2&&s.enable(0),re.supportsVertexTextures&&s.enable(1),re.instancing&&s.enable(2),re.instancingColor&&s.enable(3),re.map&&s.enable(4),re.matcap&&s.enable(5),re.envMap&&s.enable(6),re.envMapCubeUV&&s.enable(7),re.lightMap&&s.enable(8),re.aoMap&&s.enable(9),re.emissiveMap&&s.enable(10),re.bumpMap&&s.enable(11),re.normalMap&&s.enable(12),re.objectSpaceNormalMap&&s.enable(13),re.tangentSpaceNormalMap&&s.enable(14),re.clearcoat&&s.enable(15),re.clearcoatMap&&s.enable(16),re.clearcoatRoughnessMap&&s.enable(17),re.clearcoatNormalMap&&s.enable(18),re.displacementMap&&s.enable(19),re.specularMap&&s.enable(20),re.roughnessMap&&s.enable(21),re.metalnessMap&&s.enable(22),re.gradientMap&&s.enable(23),re.alphaMap&&s.enable(24),re.alphaTest&&s.enable(25),re.vertexColors&&s.enable(26),re.vertexAlphas&&s.enable(27),re.vertexUvs&&s.enable(28),re.vertexTangents&&s.enable(29),re.uvsVertexOnly&&s.enable(30),re.fog&&s.enable(31),D.push(s.mask),s.disableAll(),re.useFog&&s.enable(0),re.flatShading&&s.enable(1),re.logarithmicDepthBuffer&&s.enable(2),re.skinning&&s.enable(3),re.useVertexTexture&&s.enable(4),re.morphTargets&&s.enable(5),re.morphNormals&&s.enable(6),re.premultipliedAlpha&&s.enable(7),re.shadowMapEnabled&&s.enable(8),re.physicallyCorrectLights&&s.enable(9),re.doubleSided&&s.enable(10),re.flipSided&&s.enable(11),re.depthPacking&&s.enable(12),re.dithering&&s.enable(13),re.specularIntensityMap&&s.enable(14),re.specularColorMap&&s.enable(15),re.transmission&&s.enable(16),re.transmissionMap&&s.enable(17),re.thicknessMap&&s.enable(18),re.sheen&&s.enable(19),re.sheenColorMap&&s.enable(20),re.sheenRoughnessMap&&s.enable(21),re.decodeVideoTexture&&s.enable(22),D.push(s.mask)}(re,D),re.push(n.outputEncoding)),re.push(D.customProgramCacheKey),re.join()},getUniforms:function(D){let ce,re=M[D.type];return ce=re?dPe.clone(jc[re].uniforms):D.uniforms,ce},acquireProgram:function(D,re){let ce;for(let he=0,_e=c.length;he<_e;he++){let $=c[he];if($.cacheKey===re){ce=$,++ce.usedTimes;break}}return void 0===ce&&(ce=new d2e(n,re,D,o),c.push(ce)),ce},releaseProgram:function(D){if(0==--D.usedTimes){let re=c.indexOf(D);c[re]=c[c.length-1],c.pop(),D.destroy()}},releaseShaderCache:function(D){l.remove(D)},programs:c,dispose:function(){l.dispose()}}}function h2e(){let n=new WeakMap;return{get:function(o){let a=n.get(o);return void 0===a&&(a={},n.set(o,a)),a},remove:function(o){n.delete(o)},update:function(o,a,s){n.get(o)[a]=s},dispose:function(){n=new WeakMap}}}function m2e(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.material.id!==t.material.id?n.material.id-t.material.id:n.z!==t.z?n.z-t.z:n.id-t.id}function kee(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.z!==t.z?t.z-n.z:n.id-t.id}function Oee(){let n=[],t=0,e=[],i=[],r=[];function a(u,p,h,m,_,M){let y=n[t];return void 0===y?(y={id:u.id,object:u,geometry:p,material:h,groupOrder:m,renderOrder:u.renderOrder,z:_,group:M},n[t]=y):(y.id=u.id,y.object=u,y.geometry=p,y.material=h,y.groupOrder=m,y.renderOrder=u.renderOrder,y.z=_,y.group=M),t++,y}return{opaque:e,transmissive:i,transparent:r,init:function(){t=0,e.length=0,i.length=0,r.length=0},push:function(u,p,h,m,_,M){let y=a(u,p,h,m,_,M);h.transmission>0?i.push(y):!0===h.transparent?r.push(y):e.push(y)},unshift:function(u,p,h,m,_,M){let y=a(u,p,h,m,_,M);h.transmission>0?i.unshift(y):!0===h.transparent?r.unshift(y):e.unshift(y)},finish:function(){for(let u=t,p=n.length;u<p;u++){let h=n[u];if(null===h.id)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}},sort:function(u,p){e.length>1&&e.sort(u||m2e),i.length>1&&i.sort(p||kee),r.length>1&&r.sort(p||kee)}}}function f2e(){let n=new WeakMap;return{get:function(i,r){let o;return!1===n.has(i)?(o=new Oee,n.set(i,[o])):r>=n.get(i).length?(o=new Oee,n.get(i).push(o)):o=n.get(i)[r],o},dispose:function(){n=new WeakMap}}}function g2e(){let n={};return{get:function(t){if(void 0!==n[t.id])return n[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new K,color:new sn};break;case"SpotLight":e={position:new K,direction:new K,color:new sn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new K,color:new sn,distance:0,decay:0};break;case"HemisphereLight":e={direction:new K,skyColor:new sn,groundColor:new sn};break;case"RectAreaLight":e={color:new sn,position:new K,halfWidth:new K,halfHeight:new K}}return n[t.id]=e,e}}}var b2e=0;function v2e(n,t){return(t.castShadow?1:0)-(n.castShadow?1:0)}function y2e(n,t){let e=new g2e,i=function(){let n={};return{get:function(t){if(void 0!==n[t.id])return n[t.id];let e;switch(t.type){case"DirectionalLight":case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $e};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $e,shadowCameraNear:1,shadowCameraFar:1e3}}return n[t.id]=e,e}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new K);let o=new K,a=new vn,s=new vn;return{setup:function(d,u){let p=0,h=0,m=0;for(let Qe=0;Qe<9;Qe++)r.probe[Qe].set(0,0,0);let _=0,M=0,y=0,x=0,R=0,I=0,B=0,ee=0;d.sort(v2e);let Q=!0!==u?Math.PI:1;for(let Qe=0,Ae=d.length;Qe<Ae;Qe++){let D=d[Qe],re=D.color,ce=D.intensity,he=D.distance,_e=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)p+=re.r*ce*Q,h+=re.g*ce*Q,m+=re.b*ce*Q;else if(D.isLightProbe)for(let $=0;$<9;$++)r.probe[$].addScaledVector(D.sh.coefficients[$],ce);else if(D.isDirectionalLight){let $=e.get(D);if($.color.copy(D.color).multiplyScalar(D.intensity*Q),D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,r.directionalShadow[_]=pe,r.directionalShadowMap[_]=_e,r.directionalShadowMatrix[_]=D.shadow.matrix,I++}r.directional[_]=$,_++}else if(D.isSpotLight){let $=e.get(D);if($.position.setFromMatrixPosition(D.matrixWorld),$.color.copy(re).multiplyScalar(ce*Q),$.distance=he,$.coneCos=Math.cos(D.angle),$.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),$.decay=D.decay,D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,r.spotShadow[y]=pe,r.spotShadowMap[y]=_e,r.spotShadowMatrix[y]=D.shadow.matrix,ee++}r.spot[y]=$,y++}else if(D.isRectAreaLight){let $=e.get(D);$.color.copy(re).multiplyScalar(ce),$.halfWidth.set(.5*D.width,0,0),$.halfHeight.set(0,.5*D.height,0),r.rectArea[x]=$,x++}else if(D.isPointLight){let $=e.get(D);if($.color.copy(D.color).multiplyScalar(D.intensity*Q),$.distance=D.distance,$.decay=D.decay,D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,pe.shadowCameraNear=de.camera.near,pe.shadowCameraFar=de.camera.far,r.pointShadow[M]=pe,r.pointShadowMap[M]=_e,r.pointShadowMatrix[M]=D.shadow.matrix,B++}r.point[M]=$,M++}else if(D.isHemisphereLight){let $=e.get(D);$.skyColor.copy(D.color).multiplyScalar(ce*Q),$.groundColor.copy(D.groundColor).multiplyScalar(ce*Q),r.hemi[R]=$,R++}}x>0&&(t.isWebGL2||!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=Rt.LTC_FLOAT_1,r.rectAreaLTC2=Rt.LTC_FLOAT_2):!0===n.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Rt.LTC_HALF_1,r.rectAreaLTC2=Rt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=h,r.ambient[2]=m;let we=r.hash;(we.directionalLength!==_||we.pointLength!==M||we.spotLength!==y||we.rectAreaLength!==x||we.hemiLength!==R||we.numDirectionalShadows!==I||we.numPointShadows!==B||we.numSpotShadows!==ee)&&(r.directional.length=_,r.spot.length=y,r.rectArea.length=x,r.point.length=M,r.hemi.length=R,r.directionalShadow.length=I,r.directionalShadowMap.length=I,r.pointShadow.length=B,r.pointShadowMap.length=B,r.spotShadow.length=ee,r.spotShadowMap.length=ee,r.directionalShadowMatrix.length=I,r.pointShadowMatrix.length=B,r.spotShadowMatrix.length=ee,we.directionalLength=_,we.pointLength=M,we.spotLength=y,we.rectAreaLength=x,we.hemiLength=R,we.numDirectionalShadows=I,we.numPointShadows=B,we.numSpotShadows=ee,r.version=b2e++)},setupView:function(d,u){let p=0,h=0,m=0,_=0,M=0,y=u.matrixWorldInverse;for(let x=0,R=d.length;x<R;x++){let I=d[x];if(I.isDirectionalLight){let B=r.directional[p];B.direction.setFromMatrixPosition(I.matrixWorld),o.setFromMatrixPosition(I.target.matrixWorld),B.direction.sub(o),B.direction.transformDirection(y),p++}else if(I.isSpotLight){let B=r.spot[m];B.position.setFromMatrixPosition(I.matrixWorld),B.position.applyMatrix4(y),B.direction.setFromMatrixPosition(I.matrixWorld),o.setFromMatrixPosition(I.target.matrixWorld),B.direction.sub(o),B.direction.transformDirection(y),m++}else if(I.isRectAreaLight){let B=r.rectArea[_];B.position.setFromMatrixPosition(I.matrixWorld),B.position.applyMatrix4(y),s.identity(),a.copy(I.matrixWorld),a.premultiply(y),s.extractRotation(a),B.halfWidth.set(.5*I.width,0,0),B.halfHeight.set(0,.5*I.height,0),B.halfWidth.applyMatrix4(s),B.halfHeight.applyMatrix4(s),_++}else if(I.isPointLight){let B=r.point[h];B.position.setFromMatrixPosition(I.matrixWorld),B.position.applyMatrix4(y),h++}else if(I.isHemisphereLight){let B=r.hemi[M];B.direction.setFromMatrixPosition(I.matrixWorld),B.direction.transformDirection(y),B.direction.normalize(),M++}}},state:r}}function Fee(n,t){let e=new y2e(n,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:e},setupLights:function(u){e.setup(i,u)},setupLightsView:function(u){e.setupView(i,u)},pushLight:function(u){i.push(u)},pushShadow:function(u){r.push(u)}}}function x2e(n,t){let e=new WeakMap;return{get:function(o,a=0){let s;return!1===e.has(o)?(s=new Fee(n,t),e.set(o,[s])):a>=e.get(o).length?(s=new Fee(n,t),e.get(o).push(s)):s=e.get(o)[a],s},dispose:function(){e=new WeakMap}}}var PI=class extends Fo{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}};PI.prototype.isMeshDepthMaterial=!0;var kI=class extends Fo{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new K,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}};kI.prototype.isMeshDistanceMaterial=!0;var C2e="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",M2e="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function wte(n,t,e){let i=new e_,r=new $e,o=new $e,a=new Qi,s=new PI({depthPacking:YRe}),l=new kI,c={},d=e.maxTextureSize,u={0:bo,1:yx,2:Z0},p=new jd({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new $e},radius:{value:4}},vertexShader:C2e,fragmentShader:M2e}),h=p.clone();h.defines.HORIZONTAL_PASS=1;let m=new Gi;m.setAttribute("position",new Ar(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let _=new so(m,p),M=this;function y(I,B){let ee=t.update(_);p.defines.VSM_SAMPLES!==I.blurSamples&&(p.defines.VSM_SAMPLES=I.blurSamples,h.defines.VSM_SAMPLES=I.blurSamples,p.needsUpdate=!0,h.needsUpdate=!0),p.uniforms.shadow_pass.value=I.map.texture,p.uniforms.resolution.value=I.mapSize,p.uniforms.radius.value=I.radius,n.setRenderTarget(I.mapPass),n.clear(),n.renderBufferDirect(B,null,ee,p,_,null),h.uniforms.shadow_pass.value=I.mapPass.texture,h.uniforms.resolution.value=I.mapSize,h.uniforms.radius.value=I.radius,n.setRenderTarget(I.map),n.clear(),n.renderBufferDirect(B,null,ee,h,_,null)}function x(I,B,ee,Q,we,Qe,Ae){let D=null,re=!0===Q.isPointLight?I.customDistanceMaterial:I.customDepthMaterial;if(D=void 0!==re?re:!0===Q.isPointLight?l:s,n.localClippingEnabled&&!0===ee.clipShadows&&0!==ee.clippingPlanes.length||ee.displacementMap&&0!==ee.displacementScale||ee.alphaMap&&ee.alphaTest>0){let ce=D.uuid,he=ee.uuid,_e=c[ce];void 0===_e&&(_e={},c[ce]=_e);let $=_e[he];void 0===$&&($=D.clone(),_e[he]=$),D=$}return D.visible=ee.visible,D.wireframe=ee.wireframe,D.side=Ae===mx?null!==ee.shadowSide?ee.shadowSide:ee.side:null!==ee.shadowSide?ee.shadowSide:u[ee.side],D.alphaMap=ee.alphaMap,D.alphaTest=ee.alphaTest,D.clipShadows=ee.clipShadows,D.clippingPlanes=ee.clippingPlanes,D.clipIntersection=ee.clipIntersection,D.displacementMap=ee.displacementMap,D.displacementScale=ee.displacementScale,D.displacementBias=ee.displacementBias,D.wireframeLinewidth=ee.wireframeLinewidth,D.linewidth=ee.linewidth,!0===Q.isPointLight&&!0===D.isMeshDistanceMaterial&&(D.referencePosition.setFromMatrixPosition(Q.matrixWorld),D.nearDistance=we,D.farDistance=Qe),D}function R(I,B,ee,Q,we){if(!1===I.visible)return;if(I.layers.test(B.layers)&&(I.isMesh||I.isLine||I.isPoints)&&(I.castShadow||I.receiveShadow&&we===mx)&&(!I.frustumCulled||i.intersectsObject(I))){I.modelViewMatrix.multiplyMatrices(ee.matrixWorldInverse,I.matrixWorld);let D=t.update(I),re=I.material;if(Array.isArray(re)){let ce=D.groups;for(let he=0,_e=ce.length;he<_e;he++){let $=ce[he],de=re[$.materialIndex];if(de&&de.visible){let pe=x(I,0,de,Q,ee.near,ee.far,we);n.renderBufferDirect(ee,null,D,pe,I,$)}}}else if(re.visible){let ce=x(I,0,re,Q,ee.near,ee.far,we);n.renderBufferDirect(ee,null,D,ce,I,null)}}let Ae=I.children;for(let D=0,re=Ae.length;D<re;D++)R(Ae[D],B,ee,Q,we)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ste,this.render=function(I,B,ee){if(!1===M.enabled||!1===M.autoUpdate&&!1===M.needsUpdate||0===I.length)return;let Q=n.getRenderTarget(),we=n.getActiveCubeFace(),Qe=n.getActiveMipmapLevel(),Ae=n.state;Ae.setBlending(vp),Ae.buffers.color.setClear(1,1,1,1),Ae.buffers.depth.setTest(!0),Ae.setScissorTest(!1);for(let D=0,re=I.length;D<re;D++){let ce=I[D],he=ce.shadow;if(void 0===he){console.warn("THREE.WebGLShadowMap:",ce,"has no shadow.");continue}if(!1===he.autoUpdate&&!1===he.needsUpdate)continue;r.copy(he.mapSize);let _e=he.getFrameExtents();if(r.multiply(_e),o.copy(he.mapSize),(r.x>d||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/_e.x),r.x=o.x*_e.x,he.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/_e.y),r.y=o.y*_e.y,he.mapSize.y=o.y)),null===he.map&&!he.isPointLightShadow&&this.type===mx){let de={minFilter:ia,magFilter:ia,format:Ca};he.map=new ts(r.x,r.y,de),he.map.texture.name=ce.name+".shadowMap",he.mapPass=new ts(r.x,r.y,de),he.camera.updateProjectionMatrix()}null===he.map&&(he.map=new ts(r.x,r.y,{minFilter:vo,magFilter:vo,format:Ca}),he.map.texture.name=ce.name+".shadowMap",he.camera.updateProjectionMatrix()),n.setRenderTarget(he.map),n.clear();let $=he.getViewportCount();for(let de=0;de<$;de++){let pe=he.getViewport(de);a.set(o.x*pe.x,o.y*pe.y,o.x*pe.z,o.y*pe.w),Ae.viewport(a),he.updateMatrices(ce,de),i=he.getFrustum(),R(B,ee,he.camera,ce,this.type)}!he.isPointLightShadow&&this.type===mx&&y(he,ee),he.needsUpdate=!1}M.needsUpdate=!1,n.setRenderTarget(Q,we,Qe)}}function w2e(n,t,e){let i=e.isWebGL2,s=new function(){let se=!1,Jt=new Qi,Ut=null,Sn=new Qi(0,0,0,0);return{setMask:function(We){Ut!==We&&!se&&(n.colorMask(We,We,We,We),Ut=We)},setLocked:function(We){se=We},setClear:function(We,gn,fi,lr,Wo){!0===Wo&&(We*=lr,gn*=lr,fi*=lr),Jt.set(We,gn,fi,lr),!1===Sn.equals(Jt)&&(n.clearColor(We,gn,fi,lr),Sn.copy(Jt))},reset:function(){se=!1,Ut=null,Sn.set(-1,0,0,0)}}},l=new function(){let se=!1,Jt=null,Ut=null,Sn=null;return{setTest:function(We){We?ke(2929):Tn(2929)},setMask:function(We){Jt!==We&&!se&&(n.depthMask(We),Jt=We)},setFunc:function(We){if(Ut!==We){if(We)switch(We){case mRe:n.depthFunc(512);break;case fRe:n.depthFunc(519);break;case gRe:n.depthFunc(513);break;case X3:n.depthFunc(515);break;case _Re:n.depthFunc(514);break;case bRe:n.depthFunc(518);break;case vRe:n.depthFunc(516);break;case yRe:n.depthFunc(517);break;default:n.depthFunc(515)}else n.depthFunc(515);Ut=We}},setLocked:function(We){se=We},setClear:function(We){Sn!==We&&(n.clearDepth(We),Sn=We)},reset:function(){se=!1,Jt=null,Ut=null,Sn=null}}},c=new function(){let se=!1,Jt=null,Ut=null,Sn=null,We=null,gn=null,fi=null,lr=null,Wo=null;return{setTest:function(vr){se||(vr?ke(2960):Tn(2960))},setMask:function(vr){Jt!==vr&&!se&&(n.stencilMask(vr),Jt=vr)},setFunc:function(vr,Is,wa){(Ut!==vr||Sn!==Is||We!==wa)&&(n.stencilFunc(vr,Is,wa),Ut=vr,Sn=Is,We=wa)},setOp:function(vr,Is,wa){(gn!==vr||fi!==Is||lr!==wa)&&(n.stencilOp(vr,Is,wa),gn=vr,fi=Is,lr=wa)},setLocked:function(vr){se=vr},setClear:function(vr){Wo!==vr&&(n.clearStencil(vr),Wo=vr)},reset:function(){se=!1,Jt=null,Ut=null,Sn=null,We=null,gn=null,fi=null,lr=null,Wo=null}}},d={},u={},p=new WeakMap,h=[],m=null,_=!1,M=null,y=null,x=null,R=null,I=null,B=null,ee=null,Q=!1,we=null,Qe=null,Ae=null,D=null,re=null,ce=n.getParameter(35661),he=!1,_e=0,$=n.getParameter(7938);-1!==$.indexOf("WebGL")?(_e=parseFloat(/^WebGL (\d)/.exec($)[1]),he=_e>=1):-1!==$.indexOf("OpenGL ES")&&(_e=parseFloat(/^OpenGL ES (\d)/.exec($)[1]),he=_e>=2);let de=null,pe={},Ge=n.getParameter(3088),Se=n.getParameter(2978),Fe=(new Qi).fromArray(Ge),lt=(new Qi).fromArray(Se);function Mt(se,Jt,Ut){let Sn=new Uint8Array(4),We=n.createTexture();n.bindTexture(se,We),n.texParameteri(se,10241,9728),n.texParameteri(se,10240,9728);for(let gn=0;gn<Ut;gn++)n.texImage2D(Jt+gn,0,6408,1,1,0,6408,5121,Sn);return We}let pt={};function ke(se){!0!==d[se]&&(n.enable(se),d[se]=!0)}function Tn(se){!1!==d[se]&&(n.disable(se),d[se]=!1)}pt[3553]=Mt(3553,3553,1),pt[34067]=Mt(34067,34069,6),s.setClear(0,0,0,1),l.setClear(1),c.setClear(0),ke(2929),l.setFunc(X3),Ye(!1),_t(S$),ke(2884),oe(vp);let mt={[U0]:32774,[iRe]:32778,[rRe]:32779};if(i)mt[I$]=32775,mt[A$]=32776;else{let se=t.get("EXT_blend_minmax");null!==se&&(mt[I$]=se.MIN_EXT,mt[A$]=se.MAX_EXT)}let ht={[oRe]:0,[aRe]:1,[sRe]:768,[cte]:770,[hRe]:776,[uRe]:774,[cRe]:772,[lRe]:769,[dte]:771,[pRe]:775,[dRe]:773};function oe(se,Jt,Ut,Sn,We,gn,fi,lr){if(se!==vp){if(!1===_&&(ke(3042),_=!0),se===nRe)We=We||Jt,gn=gn||Ut,fi=fi||Sn,(Jt!==y||We!==I)&&(n.blendEquationSeparate(mt[Jt],mt[We]),y=Jt,I=We),(Ut!==x||Sn!==R||gn!==B||fi!==ee)&&(n.blendFuncSeparate(ht[Ut],ht[Sn],ht[gn],ht[fi]),x=Ut,R=Sn,B=gn,ee=fi),M=se,Q=null;else if(se!==M||lr!==Q){if((y!==U0||I!==U0)&&(n.blendEquation(32774),y=U0,I=U0),lr)switch(se){case gx:n.blendFuncSeparate(1,771,1,771);break;case E$:n.blendFunc(1,1);break;case T$:n.blendFuncSeparate(0,769,0,1);break;case D$:n.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",se)}else switch(se){case gx:n.blendFuncSeparate(770,771,1,771);break;case E$:n.blendFunc(770,1);break;case T$:n.blendFuncSeparate(0,769,0,1);break;case D$:n.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",se)}x=null,R=null,B=null,ee=null,M=se,Q=lr}}else!0===_&&(Tn(3042),_=!1)}function Ye(se){we!==se&&(n.frontFace(se?2304:2305),we=se)}function _t(se){se!==$Ae?(ke(2884),se!==Qe&&n.cullFace(se===S$?1029:se===eRe?1028:1032)):Tn(2884),Qe=se}function an(se,Jt,Ut){se?(ke(32823),(D!==Jt||re!==Ut)&&(n.polygonOffset(Jt,Ut),D=Jt,re=Ut)):Tn(32823)}function si(se){void 0===se&&(se=33984+ce-1),de!==se&&(n.activeTexture(se),de=se)}return{buffers:{color:s,depth:l,stencil:c},enable:ke,disable:Tn,bindFramebuffer:function(se,Jt){return u[se]!==Jt&&(n.bindFramebuffer(se,Jt),u[se]=Jt,i&&(36009===se&&(u[36160]=Jt),36160===se&&(u[36009]=Jt)),!0)},drawBuffers:function(se,Jt){let Ut=h,Sn=!1;if(se)if(Ut=p.get(Jt),void 0===Ut&&(Ut=[],p.set(Jt,Ut)),se.isWebGLMultipleRenderTargets){let We=se.texture;if(Ut.length!==We.length||36064!==Ut[0]){for(let gn=0,fi=We.length;gn<fi;gn++)Ut[gn]=36064+gn;Ut.length=We.length,Sn=!0}}else 36064!==Ut[0]&&(Ut[0]=36064,Sn=!0);else 1029!==Ut[0]&&(Ut[0]=1029,Sn=!0);Sn&&(e.isWebGL2?n.drawBuffers(Ut):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(Ut))},useProgram:function(se){return m!==se&&(n.useProgram(se),m=se,!0)},setBlending:oe,setMaterial:function(se,Jt){se.side===Z0?Tn(2884):ke(2884);let Ut=se.side===bo;Jt&&(Ut=!Ut),Ye(Ut),se.blending===gx&&!1===se.transparent?oe(vp):oe(se.blending,se.blendEquation,se.blendSrc,se.blendDst,se.blendEquationAlpha,se.blendSrcAlpha,se.blendDstAlpha,se.premultipliedAlpha),l.setFunc(se.depthFunc),l.setTest(se.depthTest),l.setMask(se.depthWrite),s.setMask(se.colorWrite);let Sn=se.stencilWrite;c.setTest(Sn),Sn&&(c.setMask(se.stencilWriteMask),c.setFunc(se.stencilFunc,se.stencilRef,se.stencilFuncMask),c.setOp(se.stencilFail,se.stencilZFail,se.stencilZPass)),an(se.polygonOffset,se.polygonOffsetFactor,se.polygonOffsetUnits),!0===se.alphaToCoverage?ke(32926):Tn(32926)},setFlipSided:Ye,setCullFace:_t,setLineWidth:function(se){se!==Ae&&(he&&n.lineWidth(se),Ae=se)},setPolygonOffset:an,setScissorTest:function(se){se?ke(3089):Tn(3089)},activeTexture:si,bindTexture:function(se,Jt){null===de&&si();let Ut=pe[de];void 0===Ut&&(Ut={type:void 0,texture:void 0},pe[de]=Ut),(Ut.type!==se||Ut.texture!==Jt)&&(n.bindTexture(se,Jt||pt[se]),Ut.type=se,Ut.texture=Jt)},unbindTexture:function(){let se=pe[de];void 0!==se&&void 0!==se.type&&(n.bindTexture(se.type,null),se.type=void 0,se.texture=void 0)},compressedTexImage2D:function(){try{n.compressedTexImage2D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texImage2D:function(){try{n.texImage2D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texImage3D:function(){try{n.texImage3D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texStorage2D:function(){try{n.texStorage2D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texStorage3D:function(){try{n.texStorage3D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texSubImage2D:function(){try{n.texSubImage2D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},texSubImage3D:function(){try{n.texSubImage3D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},compressedTexSubImage2D:function(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(se){console.error("THREE.WebGLState:",se)}},scissor:function(se){!1===Fe.equals(se)&&(n.scissor(se.x,se.y,se.z,se.w),Fe.copy(se))},viewport:function(se){!1===lt.equals(se)&&(n.viewport(se.x,se.y,se.z,se.w),lt.copy(se))},reset:function(){n.disable(3042),n.disable(2884),n.disable(2929),n.disable(32823),n.disable(3089),n.disable(2960),n.disable(32926),n.blendEquation(32774),n.blendFunc(1,0),n.blendFuncSeparate(1,0,1,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(513),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(519,0,4294967295),n.stencilOp(7680,7680,7680),n.clearStencil(0),n.cullFace(1029),n.frontFace(2305),n.polygonOffset(0,0),n.activeTexture(33984),n.bindFramebuffer(36160,null),!0===i&&(n.bindFramebuffer(36009,null),n.bindFramebuffer(36008,null)),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),d={},de=null,pe={},u={},p=new WeakMap,h=[],m=null,_=!1,M=null,y=null,x=null,R=null,I=null,B=null,ee=null,Q=!1,we=null,Qe=null,Ae=null,D=null,re=null,Fe.set(0,0,n.canvas.width,n.canvas.height),lt.set(0,0,n.canvas.width,n.canvas.height),s.reset(),l.reset(),c.reset()}}}function S2e(n,t,e,i,r,o,a){let _,s=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,d=r.maxTextureSize,u=r.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,m=new WeakMap,M=!1;try{M=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function y(Y,L){return M?new OffscreenCanvas(Y,L):Mx("canvas")}function x(Y,L,He,yt){let en=1;if((Y.width>yt||Y.height>yt)&&(en=yt/Math.max(Y.width,Y.height)),en<1||!0===L){if(typeof HTMLImageElement<"u"&&Y instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Y instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Y instanceof ImageBitmap){let Le=L?JRe:Math.floor,hn=Le(en*Y.width),ln=Le(en*Y.height);void 0===_&&(_=y(hn,ln));let Ft=He?y(hn,ln):_;return Ft.width=hn,Ft.height=ln,Ft.getContext("2d").drawImage(Y,0,0,hn,ln),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Y.width+"x"+Y.height+") to ("+hn+"x"+ln+")."),Ft}return"data"in Y&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Y.width+"x"+Y.height+")."),Y}return Y}function R(Y){return tee(Y.width)&&tee(Y.height)}function B(Y,L){return Y.generateMipmaps&&L&&Y.minFilter!==vo&&Y.minFilter!==ia}function ee(Y){n.generateMipmap(Y)}function Q(Y,L,He,yt,en=!1){if(!1===s)return L;if(null!==Y){if(void 0!==n[Y])return n[Y];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Y+"'")}let Le=L;return 6403===L&&(5126===He&&(Le=33326),5131===He&&(Le=33325),5121===He&&(Le=33321)),33319===L&&(5126===He&&(Le=33328),5131===He&&(Le=33327),5121===He&&(Le=33323)),6408===L&&(5126===He&&(Le=34836),5131===He&&(Le=34842),5121===He&&(Le=yt===Dr&&!1===en?35907:32856),32819===He&&(Le=32854),32820===He&&(Le=32855)),(33325===Le||33326===Le||33327===Le||33328===Le||34842===Le||34836===Le)&&t.get("EXT_color_buffer_float"),Le}function we(Y,L,He){return!0===B(Y,He)||Y.isFramebufferTexture&&Y.minFilter!==vo&&Y.minFilter!==ia?Math.log2(Math.max(L.width,L.height))+1:void 0!==Y.mipmaps&&Y.mipmaps.length>0?Y.mipmaps.length:Y.isCompressedTexture&&Array.isArray(Y.image)?L.mipmaps.length:1}function Qe(Y){return Y===vo||Y===R$||Y===P$?9728:9729}function Ae(Y){let L=Y.target;L.removeEventListener("dispose",Ae),function(Y){let L=i.get(Y);void 0!==L.__webglInit&&(n.deleteTexture(L.__webglTexture),i.remove(Y))}(L),L.isVideoTexture&&m.delete(L),a.memory.textures--}function D(Y){let L=Y.target;L.removeEventListener("dispose",D),function(Y){let L=Y.texture,He=i.get(Y),yt=i.get(L);if(Y){if(void 0!==yt.__webglTexture&&(n.deleteTexture(yt.__webglTexture),a.memory.textures--),Y.depthTexture&&Y.depthTexture.dispose(),Y.isWebGLCubeRenderTarget)for(let en=0;en<6;en++)n.deleteFramebuffer(He.__webglFramebuffer[en]),He.__webglDepthbuffer&&n.deleteRenderbuffer(He.__webglDepthbuffer[en]);else n.deleteFramebuffer(He.__webglFramebuffer),He.__webglDepthbuffer&&n.deleteRenderbuffer(He.__webglDepthbuffer),He.__webglMultisampledFramebuffer&&n.deleteFramebuffer(He.__webglMultisampledFramebuffer),He.__webglColorRenderbuffer&&n.deleteRenderbuffer(He.__webglColorRenderbuffer),He.__webglDepthRenderbuffer&&n.deleteRenderbuffer(He.__webglDepthRenderbuffer);if(Y.isWebGLMultipleRenderTargets)for(let en=0,Le=L.length;en<Le;en++){let hn=i.get(L[en]);hn.__webglTexture&&(n.deleteTexture(hn.__webglTexture),a.memory.textures--),i.remove(L[en])}i.remove(L),i.remove(Y)}}(L)}let he=0;function de(Y,L){let He=i.get(Y);if(Y.isVideoTexture&&function(Y){let L=a.render.frame;m.get(Y)!==L&&(m.set(Y,L),Y.update())}(Y),Y.version>0&&He.__version!==Y.version){let yt=Y.image;if(void 0===yt)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==yt.complete)return void ke(He,Y,L);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.activeTexture(33984+L),e.bindTexture(3553,He.__webglTexture)}function Se(Y,L){let He=i.get(Y);Y.version>0&&He.__version!==Y.version?function(Y,L,He){if(6!==L.image.length)return;pt(Y,L),e.activeTexture(33984+He),e.bindTexture(34067,Y.__webglTexture),n.pixelStorei(37440,L.flipY),n.pixelStorei(37441,L.premultiplyAlpha),n.pixelStorei(3317,L.unpackAlignment),n.pixelStorei(37443,0);let yt=L&&(L.isCompressedTexture||L.image[0].isCompressedTexture),en=L.image[0]&&L.image[0].isDataTexture,Le=[];for(let We=0;We<6;We++)Le[We]=yt||en?en?L.image[We].image:L.image[We]:x(L.image[We],!1,!0,c),Le[We]=an(L,Le[We]);let Sn,hn=Le[0],ln=R(hn)||s,Ft=o.convert(L.format,L.encoding),Ot=o.convert(L.type),Nn=Q(L.internalFormat,Ft,Ot,L.encoding),se=s&&!0!==L.isVideoTexture,Jt=void 0===Y.__version,Ut=we(L,hn,ln);if(Mt(34067,L,ln),yt){se&&Jt&&e.texStorage2D(34067,Ut,Nn,hn.width,hn.height);for(let We=0;We<6;We++){Sn=Le[We].mipmaps;for(let gn=0;gn<Sn.length;gn++){let fi=Sn[gn];L.format!==Ca?null!==Ft?se?e.compressedTexSubImage2D(34069+We,gn,0,0,fi.width,fi.height,Ft,fi.data):e.compressedTexImage2D(34069+We,gn,Nn,fi.width,fi.height,0,fi.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):se?e.texSubImage2D(34069+We,gn,0,0,fi.width,fi.height,Ft,Ot,fi.data):e.texImage2D(34069+We,gn,Nn,fi.width,fi.height,0,Ft,Ot,fi.data)}}}else{Sn=L.mipmaps,se&&Jt&&(Sn.length>0&&Ut++,e.texStorage2D(34067,Ut,Nn,Le[0].width,Le[0].height));for(let We=0;We<6;We++)if(en){se?e.texSubImage2D(34069+We,0,0,0,Le[We].width,Le[We].height,Ft,Ot,Le[We].data):e.texImage2D(34069+We,0,Nn,Le[We].width,Le[We].height,0,Ft,Ot,Le[We].data);for(let gn=0;gn<Sn.length;gn++){let lr=Sn[gn].image[We].image;se?e.texSubImage2D(34069+We,gn+1,0,0,lr.width,lr.height,Ft,Ot,lr.data):e.texImage2D(34069+We,gn+1,Nn,lr.width,lr.height,0,Ft,Ot,lr.data)}}else{se?e.texSubImage2D(34069+We,0,0,0,Ft,Ot,Le[We]):e.texImage2D(34069+We,0,Nn,Ft,Ot,Le[We]);for(let gn=0;gn<Sn.length;gn++){let fi=Sn[gn];se?e.texSubImage2D(34069+We,gn+1,0,0,Ft,Ot,fi.image[We]):e.texImage2D(34069+We,gn+1,Nn,Ft,Ot,fi.image[We])}}}B(L,ln)&&ee(34067),Y.__version=L.version,L.onUpdate&&L.onUpdate(L)}(He,Y,L):(e.activeTexture(33984+L),e.bindTexture(34067,He.__webglTexture))}let Fe={[Z3]:10497,[Es]:33071,[K3]:33648},lt={[vo]:9728,[R$]:9984,[P$]:9986,[ia]:9729,[DRe]:9985,[$I]:9987};function Mt(Y,L,He){if(He?(n.texParameteri(Y,10242,Fe[L.wrapS]),n.texParameteri(Y,10243,Fe[L.wrapT]),(32879===Y||35866===Y)&&n.texParameteri(Y,32882,Fe[L.wrapR]),n.texParameteri(Y,10240,lt[L.magFilter]),n.texParameteri(Y,10241,lt[L.minFilter])):(n.texParameteri(Y,10242,33071),n.texParameteri(Y,10243,33071),(32879===Y||35866===Y)&&n.texParameteri(Y,32882,33071),(L.wrapS!==Es||L.wrapT!==Es)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(Y,10240,Qe(L.magFilter)),n.texParameteri(Y,10241,Qe(L.minFilter)),L.minFilter!==vo&&L.minFilter!==ia&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){let yt=t.get("EXT_texture_filter_anisotropic");if(L.type===gm&&!1===t.has("OES_texture_float_linear")||!1===s&&L.type===q0&&!1===t.has("OES_texture_half_float_linear"))return;(L.anisotropy>1||i.get(L).__currentAnisotropy)&&(n.texParameterf(Y,yt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(L.anisotropy,r.getMaxAnisotropy())),i.get(L).__currentAnisotropy=L.anisotropy)}}function pt(Y,L){void 0===Y.__webglInit&&(Y.__webglInit=!0,L.addEventListener("dispose",Ae),Y.__webglTexture=n.createTexture(),a.memory.textures++)}function ke(Y,L,He){let yt=3553;L.isDataTexture2DArray&&(yt=35866),L.isDataTexture3D&&(yt=32879),pt(Y,L),e.activeTexture(33984+He),e.bindTexture(yt,Y.__webglTexture),n.pixelStorei(37440,L.flipY),n.pixelStorei(37441,L.premultiplyAlpha),n.pixelStorei(3317,L.unpackAlignment),n.pixelStorei(37443,0);let en=function(Y){return!s&&(Y.wrapS!==Es||Y.wrapT!==Es||Y.minFilter!==vo&&Y.minFilter!==ia)}(L)&&!1===R(L.image),Le=x(L.image,en,!1,d);Le=an(L,Le);let hn=R(Le)||s,ln=o.convert(L.format,L.encoding),Ft=o.convert(L.type),Ot=Q(L.internalFormat,ln,Ft,L.encoding,L.isVideoTexture);Mt(yt,L,hn);let Nn,se=L.mipmaps,Jt=s&&!0!==L.isVideoTexture,Ut=void 0===Y.__version,Sn=we(L,Le,hn);if(L.isDepthTexture)Ot=6402,s?Ot=L.type===gm?36012:L.type===xI?33190:L.type===X0?35056:33189:L.type===gm&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),L.format===bm&&6402===Ot&&L.type!==xx&&L.type!==xI&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),L.type=xx,Ft=o.convert(L.type)),L.format===K0&&6402===Ot&&(Ot=34041,L.type!==X0&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),L.type=X0,Ft=o.convert(L.type))),Jt&&Ut?e.texStorage2D(3553,1,Ot,Le.width,Le.height):e.texImage2D(3553,0,Ot,Le.width,Le.height,0,ln,Ft,null);else if(L.isDataTexture)if(se.length>0&&hn){Jt&&Ut&&e.texStorage2D(3553,Sn,Ot,se[0].width,se[0].height);for(let We=0,gn=se.length;We<gn;We++)Nn=se[We],Jt?e.texSubImage2D(3553,0,0,0,Nn.width,Nn.height,ln,Ft,Nn.data):e.texImage2D(3553,We,Ot,Nn.width,Nn.height,0,ln,Ft,Nn.data);L.generateMipmaps=!1}else Jt?(Ut&&e.texStorage2D(3553,Sn,Ot,Le.width,Le.height),e.texSubImage2D(3553,0,0,0,Le.width,Le.height,ln,Ft,Le.data)):e.texImage2D(3553,0,Ot,Le.width,Le.height,0,ln,Ft,Le.data);else if(L.isCompressedTexture){Jt&&Ut&&e.texStorage2D(3553,Sn,Ot,se[0].width,se[0].height);for(let We=0,gn=se.length;We<gn;We++)Nn=se[We],L.format!==Ca?null!==ln?Jt?e.compressedTexSubImage2D(3553,We,0,0,Nn.width,Nn.height,ln,Nn.data):e.compressedTexImage2D(3553,We,Ot,Nn.width,Nn.height,0,Nn.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Jt?e.texSubImage2D(3553,We,0,0,Nn.width,Nn.height,ln,Ft,Nn.data):e.texImage2D(3553,We,Ot,Nn.width,Nn.height,0,ln,Ft,Nn.data)}else if(L.isDataTexture2DArray)Jt?(Ut&&e.texStorage3D(35866,Sn,Ot,Le.width,Le.height,Le.depth),e.texSubImage3D(35866,0,0,0,0,Le.width,Le.height,Le.depth,ln,Ft,Le.data)):e.texImage3D(35866,0,Ot,Le.width,Le.height,Le.depth,0,ln,Ft,Le.data);else if(L.isDataTexture3D)Jt?(Ut&&e.texStorage3D(32879,Sn,Ot,Le.width,Le.height,Le.depth),e.texSubImage3D(32879,0,0,0,0,Le.width,Le.height,Le.depth,ln,Ft,Le.data)):e.texImage3D(32879,0,Ot,Le.width,Le.height,Le.depth,0,ln,Ft,Le.data);else if(L.isFramebufferTexture)Jt&&Ut?e.texStorage2D(3553,Sn,Ot,Le.width,Le.height):e.texImage2D(3553,0,Ot,Le.width,Le.height,0,ln,Ft,null);else if(se.length>0&&hn){Jt&&Ut&&e.texStorage2D(3553,Sn,Ot,se[0].width,se[0].height);for(let We=0,gn=se.length;We<gn;We++)Nn=se[We],Jt?e.texSubImage2D(3553,We,0,0,ln,Ft,Nn):e.texImage2D(3553,We,Ot,ln,Ft,Nn);L.generateMipmaps=!1}else Jt?(Ut&&e.texStorage2D(3553,Sn,Ot,Le.width,Le.height),e.texSubImage2D(3553,0,0,0,ln,Ft,Le)):e.texImage2D(3553,0,Ot,ln,Ft,Le);B(L,hn)&&ee(yt),Y.__version=L.version,L.onUpdate&&L.onUpdate(L)}function wt(Y,L,He,yt,en){let Le=o.convert(He.format,He.encoding),hn=o.convert(He.type),ln=Q(He.internalFormat,Le,hn,He.encoding);i.get(L).__hasExternalTextures||(32879===en||35866===en?e.texImage3D(en,0,ln,L.width,L.height,L.depth,0,Le,hn,null):e.texImage2D(en,0,ln,L.width,L.height,0,Le,hn,null)),e.bindFramebuffer(36160,Y),L.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,yt,en,i.get(He).__webglTexture,0,_t(L)):n.framebufferTexture2D(36160,yt,en,i.get(He).__webglTexture,0),e.bindFramebuffer(36160,null)}function on(Y,L,He){if(n.bindRenderbuffer(36161,Y),L.depthBuffer&&!L.stencilBuffer){let yt=33189;if(He||L.useRenderToTexture){let en=L.depthTexture;en&&en.isDepthTexture&&(en.type===gm?yt=36012:en.type===xI&&(yt=33190));let Le=_t(L);L.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,Le,yt,L.width,L.height):n.renderbufferStorageMultisample(36161,Le,yt,L.width,L.height)}else n.renderbufferStorage(36161,yt,L.width,L.height);n.framebufferRenderbuffer(36160,36096,36161,Y)}else if(L.depthBuffer&&L.stencilBuffer){let yt=_t(L);He&&L.useRenderbuffer?n.renderbufferStorageMultisample(36161,yt,35056,L.width,L.height):L.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,yt,35056,L.width,L.height):n.renderbufferStorage(36161,34041,L.width,L.height),n.framebufferRenderbuffer(36160,33306,36161,Y)}else{let yt=!0===L.isWebGLMultipleRenderTargets?L.texture[0]:L.texture,en=o.convert(yt.format,yt.encoding),Le=o.convert(yt.type),hn=Q(yt.internalFormat,en,Le,yt.encoding),ln=_t(L);He&&L.useRenderbuffer?n.renderbufferStorageMultisample(36161,ln,hn,L.width,L.height):L.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,ln,hn,L.width,L.height):n.renderbufferStorage(36161,hn,L.width,L.height)}n.bindRenderbuffer(36161,null)}function mt(Y){let L=i.get(Y),He=!0===Y.isWebGLCubeRenderTarget;if(Y.depthTexture&&!L.__autoAllocateDepthBuffer){if(He)throw new Error("target.depthTexture not supported in Cube render targets");!function(Y,L){if(L&&L.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,Y),!L.depthTexture||!L.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(L.depthTexture).__webglTexture||L.depthTexture.image.width!==L.width||L.depthTexture.image.height!==L.height)&&(L.depthTexture.image.width=L.width,L.depthTexture.image.height=L.height,L.depthTexture.needsUpdate=!0),de(L.depthTexture,0);let yt=i.get(L.depthTexture).__webglTexture,en=_t(L);if(L.depthTexture.format===bm)L.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,36096,3553,yt,0,en):n.framebufferTexture2D(36160,36096,3553,yt,0);else{if(L.depthTexture.format!==K0)throw new Error("Unknown depthTexture format");L.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,33306,3553,yt,0,en):n.framebufferTexture2D(36160,33306,3553,yt,0)}}(L.__webglFramebuffer,Y)}else if(He){L.__webglDepthbuffer=[];for(let yt=0;yt<6;yt++)e.bindFramebuffer(36160,L.__webglFramebuffer[yt]),L.__webglDepthbuffer[yt]=n.createRenderbuffer(),on(L.__webglDepthbuffer[yt],Y,!1)}else e.bindFramebuffer(36160,L.__webglFramebuffer),L.__webglDepthbuffer=n.createRenderbuffer(),on(L.__webglDepthbuffer,Y,!1);e.bindFramebuffer(36160,null)}function _t(Y){return s&&(Y.useRenderbuffer||Y.useRenderToTexture)?Math.min(u,Y.samples):0}function an(Y,L){let He=Y.encoding,yt=Y.format,en=Y.type;return!0===Y.isCompressedTexture||!0===Y.isVideoTexture||Y.format===J3||He!==wp&&(He===Dr?!1===s?!0===t.has("EXT_sRGB")&&yt===Ca?(Y.format=J3,Y.minFilter=ia,Y.generateMipmaps=!1):L=Ud.sRGBToLinear(L):(yt!==Ca||en!==xp)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",He)),L}let yn=!1,si=!1;this.allocateTextureUnit=function(){let Y=he;return Y>=l&&console.warn("THREE.WebGLTextures: Trying to use "+Y+" texture units while this GPU supports only "+l),he+=1,Y},this.resetTextureUnits=function(){he=0},this.setTexture2D=de,this.setTexture2DArray=function(Y,L){let He=i.get(Y);Y.version>0&&He.__version!==Y.version?ke(He,Y,L):(e.activeTexture(33984+L),e.bindTexture(35866,He.__webglTexture))},this.setTexture3D=function(Y,L){let He=i.get(Y);Y.version>0&&He.__version!==Y.version?ke(He,Y,L):(e.activeTexture(33984+L),e.bindTexture(32879,He.__webglTexture))},this.setTextureCube=Se,this.rebindTextures=function(Y,L,He){let yt=i.get(Y);void 0!==L&&wt(yt.__webglFramebuffer,Y,Y.texture,36064,3553),void 0!==He&&mt(Y)},this.setupRenderTarget=function(Y){let L=Y.texture,He=i.get(Y),yt=i.get(L);Y.addEventListener("dispose",D),!0!==Y.isWebGLMultipleRenderTargets&&(void 0===yt.__webglTexture&&(yt.__webglTexture=n.createTexture()),yt.__version=L.version,a.memory.textures++);let en=!0===Y.isWebGLCubeRenderTarget,Le=!0===Y.isWebGLMultipleRenderTargets,hn=L.isDataTexture3D||L.isDataTexture2DArray,ln=R(Y)||s;if(en){He.__webglFramebuffer=[];for(let Ft=0;Ft<6;Ft++)He.__webglFramebuffer[Ft]=n.createFramebuffer()}else if(He.__webglFramebuffer=n.createFramebuffer(),Le)if(r.drawBuffers){let Ft=Y.texture;for(let Ot=0,Nn=Ft.length;Ot<Nn;Ot++){let se=i.get(Ft[Ot]);void 0===se.__webglTexture&&(se.__webglTexture=n.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(Y.useRenderbuffer)if(s){He.__webglMultisampledFramebuffer=n.createFramebuffer(),He.__webglColorRenderbuffer=n.createRenderbuffer(),n.bindRenderbuffer(36161,He.__webglColorRenderbuffer);let Ft=o.convert(L.format,L.encoding),Ot=o.convert(L.type),Nn=Q(L.internalFormat,Ft,Ot,L.encoding),se=_t(Y);n.renderbufferStorageMultisample(36161,se,Nn,Y.width,Y.height),e.bindFramebuffer(36160,He.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(36160,36064,36161,He.__webglColorRenderbuffer),n.bindRenderbuffer(36161,null),Y.depthBuffer&&(He.__webglDepthRenderbuffer=n.createRenderbuffer(),on(He.__webglDepthRenderbuffer,Y,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(en){e.bindTexture(34067,yt.__webglTexture),Mt(34067,L,ln);for(let Ft=0;Ft<6;Ft++)wt(He.__webglFramebuffer[Ft],Y,L,36064,34069+Ft);B(L,ln)&&ee(34067),e.unbindTexture()}else if(Le){let Ft=Y.texture;for(let Ot=0,Nn=Ft.length;Ot<Nn;Ot++){let se=Ft[Ot],Jt=i.get(se);e.bindTexture(3553,Jt.__webglTexture),Mt(3553,se,ln),wt(He.__webglFramebuffer,Y,se,36064+Ot,3553),B(se,ln)&&ee(3553)}e.unbindTexture()}else{let Ft=3553;hn&&(s?Ft=L.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),e.bindTexture(Ft,yt.__webglTexture),Mt(Ft,L,ln),wt(He.__webglFramebuffer,Y,L,36064,Ft),B(L,ln)&&ee(Ft),e.unbindTexture()}Y.depthBuffer&&mt(Y)},this.updateRenderTargetMipmap=function(Y){let L=R(Y)||s,He=!0===Y.isWebGLMultipleRenderTargets?Y.texture:[Y.texture];for(let yt=0,en=He.length;yt<en;yt++){let Le=He[yt];if(B(Le,L)){let hn=Y.isWebGLCubeRenderTarget?34067:3553,ln=i.get(Le).__webglTexture;e.bindTexture(hn,ln),ee(hn),e.unbindTexture()}}},this.updateMultisampleRenderTarget=function(Y){if(Y.useRenderbuffer)if(s){let L=Y.width,He=Y.height,yt=16384,en=[36064],Le=Y.stencilBuffer?33306:36096;Y.depthBuffer&&en.push(Le),Y.ignoreDepthForMultisampleCopy||(Y.depthBuffer&&(yt|=256),Y.stencilBuffer&&(yt|=1024));let hn=i.get(Y);e.bindFramebuffer(36008,hn.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,hn.__webglFramebuffer),Y.ignoreDepthForMultisampleCopy&&(n.invalidateFramebuffer(36008,[Le]),n.invalidateFramebuffer(36009,[Le])),n.blitFramebuffer(0,0,L,He,0,0,L,He,yt,9728),n.invalidateFramebuffer(36008,en),e.bindFramebuffer(36008,null),e.bindFramebuffer(36009,hn.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.setupDepthRenderbuffer=mt,this.setupFrameBufferTexture=wt,this.safeSetTexture2D=function(Y,L){Y&&Y.isWebGLRenderTarget&&(!1===yn&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),yn=!0),Y=Y.texture),de(Y,L)},this.safeSetTextureCube=function(Y,L){Y&&Y.isWebGLCubeRenderTarget&&(!1===si&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),si=!0),Y=Y.texture),Se(Y,L)}}function E2e(n,t,e){let i=e.isWebGL2;return{convert:function(o,a=null){let s;if(o===xp)return 5121;if(o===PRe)return 32819;if(o===kRe)return 32820;if(o===IRe)return 5120;if(o===ARe)return 5122;if(o===xx)return 5123;if(o===RRe)return 5124;if(o===xI)return 5125;if(o===gm)return 5126;if(o===q0)return i?5131:(s=t.get("OES_texture_half_float"),null!==s?s.HALF_FLOAT_OES:null);if(o===ORe)return 6406;if(o===Ca)return 6408;if(o===FRe)return 6409;if(o===NRe)return 6410;if(o===bm)return 6402;if(o===K0)return 34041;if(o===LRe)return 6403;if(o===J3)return s=t.get("EXT_sRGB"),null!==s?s.SRGB_ALPHA_EXT:null;if(o===BRe)return 36244;if(o===VRe)return 33319;if(o===HRe)return 33320;if(o===zRe)return 36249;if(o===l3||o===c3||o===d3||o===u3)if(a===Dr){if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===s)return null;if(o===l3)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===c3)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===d3)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===u3)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=t.get("WEBGL_compressed_texture_s3tc"),null===s)return null;if(o===l3)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===c3)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===d3)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===u3)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(o===k$||o===O$||o===F$||o===N$){if(s=t.get("WEBGL_compressed_texture_pvrtc"),null===s)return null;if(o===k$)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===O$)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===F$)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===N$)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(o===URe)return s=t.get("WEBGL_compressed_texture_etc1"),null!==s?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===L$||o===B$){if(s=t.get("WEBGL_compressed_texture_etc"),null===s)return null;if(o===L$)return a===Dr?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===B$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(o===V$||o===H$||o===z$||o===U$||o===j$||o===G$||o===W$||o===q$||o===X$||o===Y$||o===Q$||o===Z$||o===K$||o===J$){if(s=t.get("WEBGL_compressed_texture_astc"),null===s)return null;if(o===V$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===H$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===z$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===U$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===j$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===G$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===W$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===q$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===X$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===Y$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===Q$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===Z$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===K$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===J$)return a===Dr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(o===$$){if(s=t.get("EXT_texture_compression_bptc"),null===s)return null;if(o===$$)return a===Dr?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}return o===X0?i?34042:(s=t.get("WEBGL_depth_texture"),null!==s?s.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}var OI=class extends ra{constructor(t=[]){super(),this.cameras=t}};OI.prototype.isArrayCamera=!0;var _m=class extends Ui{constructor(){super(),this.type="Group"}};_m.prototype.isGroup=!0;var T2e={type:"move"},_x=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new _m,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new _m,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new _m,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,i){let r=null,o=null,a=null,s=this._targetRay,l=this._grip,c=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState)if(null!==s&&(r=e.getPose(t.targetRaySpace,i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(T2e))),c&&t.hand){a=!0;for(let _ of t.hand.values()){let M=e.getJointPose(_,i);if(void 0===c.joints[_.jointName]){let x=new _m;x.matrixAutoUpdate=!1,x.visible=!1,c.joints[_.jointName]=x,c.add(x)}let y=c.joints[_.jointName];null!==M&&(y.matrix.fromArray(M.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.jointRadius=M.radius),y.visible=null!==M}let p=c.joints["index-finger-tip"].position.distanceTo(c.joints["thumb-tip"].position),h=.02,m=.005;c.inputState.pinching&&p>h+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&p<=h-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==l&&t.gripSpace&&(o=e.getPose(t.gripSpace,i),null!==o&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return null!==s&&(s.visible=null!==r),null!==l&&(l.visible=null!==o),null!==c&&(c.visible=null!==a),this}},Ix=class extends lo{constructor(t,e,i,r,o,a,s,l,c,d){if((d=void 0!==d?d:bm)!==bm&&d!==K0)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&d===bm&&(i=xx),void 0===i&&d===K0&&(i=X0),super(null,r,o,a,s,l,d,i,c),this.image={width:t,height:e},this.magFilter=void 0!==s?s:vo,this.minFilter=void 0!==l?l:vo,this.flipY=!1,this.generateMipmaps=!1}};Ix.prototype.isDepthTexture=!0;var oB=class extends zd{constructor(t,e){super();let i=this,r=null,o=1,a=null,s="local-floor",l=t.extensions.has("WEBGL_multisampled_render_to_texture"),c=null,d=null,u=null,p=null,h=!1,m=null,_=e.getContextAttributes(),M=null,y=null,x=[],R=new Map,I=new ra;I.layers.enable(1),I.viewport=new Qi;let B=new ra;B.layers.enable(2),B.viewport=new Qi;let ee=[I,B],Q=new OI;Q.layers.enable(1),Q.layers.enable(2);let we=null,Qe=null;function Ae(Se){let Fe=R.get(Se.inputSource);Fe&&Fe.dispatchEvent({type:Se.type,data:Se.inputSource})}function D(){R.forEach(function(Se,Fe){Se.disconnect(Fe)}),R.clear(),we=null,Qe=null,t.setRenderTarget(M),p=null,u=null,d=null,r=null,y=null,Ge.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}function re(Se){let Fe=r.inputSources;for(let lt=0;lt<x.length;lt++)R.set(Fe[lt],x[lt]);for(let lt=0;lt<Se.removed.length;lt++){let Mt=Se.removed[lt],pt=R.get(Mt);pt&&(pt.dispatchEvent({type:"disconnected",data:Mt}),R.delete(Mt))}for(let lt=0;lt<Se.added.length;lt++){let Mt=Se.added[lt],pt=R.get(Mt);pt&&pt.dispatchEvent({type:"connected",data:Mt})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Se){let Fe=x[Se];return void 0===Fe&&(Fe=new _x,x[Se]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(Se){let Fe=x[Se];return void 0===Fe&&(Fe=new _x,x[Se]=Fe),Fe.getGripSpace()},this.getHand=function(Se){let Fe=x[Se];return void 0===Fe&&(Fe=new _x,x[Se]=Fe),Fe.getHandSpace()},this.setFramebufferScaleFactor=function(Se){o=Se,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Se){s=Se,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return null!==u?u:p},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return r},this.setSession=async function(Se){if(r=Se,null!==r){if(M=t.getRenderTarget(),r.addEventListener("select",Ae),r.addEventListener("selectstart",Ae),r.addEventListener("selectend",Ae),r.addEventListener("squeeze",Ae),r.addEventListener("squeezestart",Ae),r.addEventListener("squeezeend",Ae),r.addEventListener("end",D),r.addEventListener("inputsourceschange",re),!0!==_.xrCompatible&&await e.makeXRCompatible(),void 0===r.renderState.layers||!1===t.capabilities.isWebGL2)p=new XRWebGLLayer(r,e,{antialias:void 0!==r.renderState.layers||_.antialias,alpha:_.alpha,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:o}),r.updateRenderState({baseLayer:p}),y=new ts(p.framebufferWidth,p.framebufferHeight,{format:Ca,type:xp,encoding:t.outputEncoding});else{h=_.antialias;let Fe=null,lt=null,Mt=null;_.depth&&(Mt=_.stencil?35056:33190,Fe=_.stencil?K0:bm,lt=_.stencil?X0:xx);let pt={colorFormat:t.outputEncoding===Dr?35907:32856,depthFormat:Mt,scaleFactor:o};d=new XRWebGLBinding(r,e),u=d.createProjectionLayer(pt),r.updateRenderState({layers:[u]}),y=h?new wx(u.textureWidth,u.textureHeight,{format:Ca,type:xp,depthTexture:new Ix(u.textureWidth,u.textureHeight,lt,void 0,void 0,void 0,void 0,void 0,void 0,Fe),stencilBuffer:_.stencil,ignoreDepth:u.ignoreDepthValues,useRenderToTexture:l,encoding:t.outputEncoding}):new ts(u.textureWidth,u.textureHeight,{format:Ca,type:xp,depthTexture:new Ix(u.textureWidth,u.textureHeight,lt,void 0,void 0,void 0,void 0,void 0,void 0,Fe),stencilBuffer:_.stencil,ignoreDepth:u.ignoreDepthValues,encoding:t.outputEncoding})}y.isXRRenderTarget=!0,this.setFoveation(1),a=await r.requestReferenceSpace(s),Ge.setContext(r),Ge.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};let ce=new K,he=new K;function $(Se,Fe){null===Fe?Se.matrixWorld.copy(Se.matrix):Se.matrixWorld.multiplyMatrices(Fe.matrixWorld,Se.matrix),Se.matrixWorldInverse.copy(Se.matrixWorld).invert()}this.updateCamera=function(Se){if(null===r)return;Q.near=B.near=I.near=Se.near,Q.far=B.far=I.far=Se.far,(we!==Q.near||Qe!==Q.far)&&(r.updateRenderState({depthNear:Q.near,depthFar:Q.far}),we=Q.near,Qe=Q.far);let Fe=Se.parent,lt=Q.cameras;$(Q,Fe);for(let pt=0;pt<lt.length;pt++)$(lt[pt],Fe);Q.matrixWorld.decompose(Q.position,Q.quaternion,Q.scale),Se.position.copy(Q.position),Se.quaternion.copy(Q.quaternion),Se.scale.copy(Q.scale),Se.matrix.copy(Q.matrix),Se.matrixWorld.copy(Q.matrixWorld);let Mt=Se.children;for(let pt=0,ke=Mt.length;pt<ke;pt++)Mt[pt].updateMatrixWorld(!0);2===lt.length?function(Se,Fe,lt){ce.setFromMatrixPosition(Fe.matrixWorld),he.setFromMatrixPosition(lt.matrixWorld);let Mt=ce.distanceTo(he),pt=Fe.projectionMatrix.elements,ke=lt.projectionMatrix.elements,Tn=pt[14]/(pt[10]-1),wt=pt[14]/(pt[10]+1),on=(pt[9]+1)/pt[5],Ce=(pt[9]-1)/pt[5],mt=(pt[8]-1)/pt[0],ht=(ke[8]+1)/ke[0],oe=Tn*mt,at=Tn*ht,Ye=Mt/(-mt+ht),_t=Ye*-mt;Fe.matrixWorld.decompose(Se.position,Se.quaternion,Se.scale),Se.translateX(_t),Se.translateZ(Ye),Se.matrixWorld.compose(Se.position,Se.quaternion,Se.scale),Se.matrixWorldInverse.copy(Se.matrixWorld).invert();let ut=Tn+Ye,an=wt+Ye;Se.projectionMatrix.makePerspective(oe-_t,at+(Mt-_t),on*wt/an*ut,Ce*wt/an*ut,ut,an)}(Q,I,B):Q.projectionMatrix.copy(I.projectionMatrix)},this.getCamera=function(){return Q},this.getFoveation=function(){return null!==u?u.fixedFoveation:null!==p?p.fixedFoveation:void 0},this.setFoveation=function(Se){null!==u&&(u.fixedFoveation=Se),null!==p&&void 0!==p.fixedFoveation&&(p.fixedFoveation=Se)};let de=null,Ge=new mte;Ge.setAnimationLoop(function(Se,Fe){if(c=Fe.getViewerPose(a),m=Fe,null!==c){let Mt=c.views;null!==p&&(t.setRenderTargetFramebuffer(y,p.framebuffer),t.setRenderTarget(y));let pt=!1;Mt.length!==Q.cameras.length&&(Q.cameras.length=0,pt=!0);for(let ke=0;ke<Mt.length;ke++){let Tn=Mt[ke],wt=null;if(null!==p)wt=p.getViewport(Tn);else{let Ce=d.getViewSubImage(u,Tn);wt=Ce.viewport,0===ke&&(t.setRenderTargetTextures(y,Ce.colorTexture,u.ignoreDepthValues?void 0:Ce.depthStencilTexture),t.setRenderTarget(y))}let on=ee[ke];on.matrix.fromArray(Tn.transform.matrix),on.projectionMatrix.fromArray(Tn.projectionMatrix),on.viewport.set(wt.x,wt.y,wt.width,wt.height),0===ke&&Q.matrix.copy(on.matrix),!0===pt&&Q.cameras.push(on)}}let lt=r.inputSources;for(let Mt=0;Mt<x.length;Mt++)x[Mt].update(lt[Mt],Fe,a);de&&de(Se,Fe),m=null}),this.setAnimationLoop=function(Se){de=Se},this.dispose=function(){}}};function D2e(n){function i(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let I,B,R=n.get(x).envMap;R&&(y.envMap.value=R,y.flipEnvMap.value=R.isCubeTexture&&!1===R.isRenderTargetTexture?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap&&(y.lightMap.value=x.lightMap,y.lightMapIntensity.value=x.lightMapIntensity),x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity),x.map?I=x.map:x.specularMap?I=x.specularMap:x.displacementMap?I=x.displacementMap:x.normalMap?I=x.normalMap:x.bumpMap?I=x.bumpMap:x.roughnessMap?I=x.roughnessMap:x.metalnessMap?I=x.metalnessMap:x.alphaMap?I=x.alphaMap:x.emissiveMap?I=x.emissiveMap:x.clearcoatMap?I=x.clearcoatMap:x.clearcoatNormalMap?I=x.clearcoatNormalMap:x.clearcoatRoughnessMap?I=x.clearcoatRoughnessMap:x.specularIntensityMap?I=x.specularIntensityMap:x.specularColorMap?I=x.specularColorMap:x.transmissionMap?I=x.transmissionMap:x.thicknessMap?I=x.thicknessMap:x.sheenColorMap?I=x.sheenColorMap:x.sheenRoughnessMap&&(I=x.sheenRoughnessMap),void 0!==I&&(I.isWebGLRenderTarget&&(I=I.texture),!0===I.matrixAutoUpdate&&I.updateMatrix(),y.uvTransform.value.copy(I.matrix)),x.aoMap?B=x.aoMap:x.lightMap&&(B=x.lightMap),void 0!==B&&(B.isWebGLRenderTarget&&(B=B.texture),!0===B.matrixAutoUpdate&&B.updateMatrix(),y.uv2Transform.value.copy(B.matrix))}function u(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===bo&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===bo&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),n.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}return{refreshFogUniforms:function(y,x){y.fogColor.value.copy(x.color),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)},refreshMaterialUniforms:function(y,x,R,I,B){x.isMeshBasicMaterial?i(y,x):x.isMeshLambertMaterial?(i(y,x),function(y,x){x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap)}(y,x)):x.isMeshToonMaterial?(i(y,x),function(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===bo&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===bo&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshPhongMaterial?(i(y,x),function(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===bo&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===bo&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshStandardMaterial?(i(y,x),x.isMeshPhysicalMaterial?function(y,x,R){u(y,x),y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===bo&&y.clearcoatNormalScale.value.negate())),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=R.texture,y.transmissionSamplerSize.value.set(R.width,R.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}(y,x,B):u(y,x)):x.isMeshMatcapMaterial?(i(y,x),function(y,x){x.matcap&&(y.matcap.value=x.matcap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===bo&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===bo&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshDepthMaterial?(i(y,x),function(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshDistanceMaterial?(i(y,x),function(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}(y,x)):x.isMeshNormalMaterial?(i(y,x),function(y,x){x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===bo&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===bo&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isLineBasicMaterial?(function(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}(y,x),x.isLineDashedMaterial&&function(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}(y,x)):x.isPointsMaterial?function(y,x,R,I){let B;y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*R,y.scale.value=.5*I,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest),x.map?B=x.map:x.alphaMap&&(B=x.alphaMap),void 0!==B&&(!0===B.matrixAutoUpdate&&B.updateMatrix(),y.uvTransform.value.copy(B.matrix))}(y,x,R,I):x.isSpriteMaterial?function(y,x){let R;y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest),x.map?R=x.map:x.alphaMap&&(R=x.alphaMap),void 0!==R&&(!0===R.matrixAutoUpdate&&R.updateMatrix(),y.uvTransform.value.copy(R.matrix))}(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}}}function Wi(n={}){let t=void 0!==n.canvas?n.canvas:function(){let n=Mx("canvas");return n.style.display="block",n}(),e=void 0!==n.context?n.context:null,i=void 0!==n.alpha&&n.alpha,r=void 0===n.depth||n.depth,o=void 0===n.stencil||n.stencil,a=void 0!==n.antialias&&n.antialias,s=void 0===n.premultipliedAlpha||n.premultipliedAlpha,l=void 0!==n.preserveDrawingBuffer&&n.preserveDrawingBuffer,c=void 0!==n.powerPreference?n.powerPreference:"default",d=void 0!==n.failIfMajorPerformanceCaveat&&n.failIfMajorPerformanceCaveat,u=null,p=null,h=[],m=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=wp,this.physicallyCorrectLights=!1,this.toneMapping=yp,this.toneMappingExposure=1;let _=this,M=!1,y=0,x=0,R=null,I=-1,B=null,ee=new Qi,Q=new Qi,we=null,Qe=t.width,Ae=t.height,D=1,re=null,ce=null,he=new Qi(0,0,Qe,Ae),_e=new Qi(0,0,Qe,Ae),$=!1,de=new e_,pe=!1,Ge=!1,Se=null,Fe=new vn,lt=new K,Mt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function pt(){return null===R?D:1}let wt,on,Ce,mt,ht,oe,at,Ye,_t,ut,an,yn,si,Ni,Li,Y,L,He,yt,en,Le,hn,ln,ke=e;function Tn(E,V){for(let X=0;X<E.length;X++){let ae=t.getContext(E[X],V);if(null!==ae)return ae}return null}try{let E={alpha:!0,depth:r,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${sV}`),t.addEventListener("webglcontextlost",Nn,!1),t.addEventListener("webglcontextrestored",se,!1),null===ke){let V=["webgl2","webgl","experimental-webgl"];if(!0===_.isWebGL1Renderer&&V.shift(),ke=Tn(V,E),null===ke)throw Tn(V)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ke.getShaderPrecisionFormat&&(ke.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}function Ft(){wt=new KOe(ke),on=new WOe(ke,wt,n),wt.init(on),hn=new E2e(ke,wt,on),Ce=new w2e(ke,wt,on),mt=new eFe(ke),ht=new h2e,oe=new S2e(ke,wt,Ce,ht,on,hn,mt),at=new XOe(_),Ye=new ZOe(_),_t=new fPe(ke,on),ln=new jOe(ke,wt,_t,on),ut=new JOe(ke,_t,mt,ln),an=new rFe(ke,ut,_t,mt),yt=new iFe(ke,on,oe),Y=new qOe(ht),yn=new p2e(_,at,Ye,wt,on,ln,Y),si=new D2e(ht),Ni=new f2e,Li=new x2e(wt,on),He=new UOe(_,at,Ce,an,i,s),L=new wte(_,an,on),en=new GOe(ke,wt,mt,on),Le=new $Oe(ke,wt,mt,on),mt.programs=yn.programs,_.capabilities=on,_.extensions=wt,_.properties=ht,_.renderLists=Ni,_.shadowMap=L,_.state=Ce,_.info=mt}Ft();let Ot=new oB(_,ke);function Nn(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function se(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;let E=mt.autoReset,V=L.enabled,X=L.autoUpdate,Z=L.needsUpdate,ae=L.type;Ft(),mt.autoReset=E,L.enabled=V,L.autoUpdate=X,L.needsUpdate=Z,L.type=ae}function Jt(E){let V=E.target;V.removeEventListener("dispose",Jt),function(E){(function(E){let V=ht.get(E).programs;void 0!==V&&(V.forEach(function(X){yn.releaseProgram(X)}),E.isShaderMaterial&&yn.releaseShaderCache(E))})(E),ht.remove(E)}(V)}this.xr=Ot,this.getContext=function(){return ke},this.getContextAttributes=function(){return ke.getContextAttributes()},this.forceContextLoss=function(){let E=wt.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=wt.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return D},this.setPixelRatio=function(E){void 0!==E&&(D=E,this.setSize(Qe,Ae,!1))},this.getSize=function(E){return E.set(Qe,Ae)},this.setSize=function(E,V,X){Ot.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Qe=E,Ae=V,t.width=Math.floor(E*D),t.height=Math.floor(V*D),!1!==X&&(t.style.width=E+"px",t.style.height=V+"px"),this.setViewport(0,0,E,V))},this.getDrawingBufferSize=function(E){return E.set(Qe*D,Ae*D).floor()},this.setDrawingBufferSize=function(E,V,X){Qe=E,Ae=V,D=X,t.width=Math.floor(E*X),t.height=Math.floor(V*X),this.setViewport(0,0,E,V)},this.getCurrentViewport=function(E){return E.copy(ee)},this.getViewport=function(E){return E.copy(he)},this.setViewport=function(E,V,X,Z){E.isVector4?he.set(E.x,E.y,E.z,E.w):he.set(E,V,X,Z),Ce.viewport(ee.copy(he).multiplyScalar(D).floor())},this.getScissor=function(E){return E.copy(_e)},this.setScissor=function(E,V,X,Z){E.isVector4?_e.set(E.x,E.y,E.z,E.w):_e.set(E,V,X,Z),Ce.scissor(Q.copy(_e).multiplyScalar(D).floor())},this.getScissorTest=function(){return $},this.setScissorTest=function(E){Ce.setScissorTest($=E)},this.setOpaqueSort=function(E){re=E},this.setTransparentSort=function(E){ce=E},this.getClearColor=function(E){return E.copy(He.getClearColor())},this.setClearColor=function(){He.setClearColor.apply(He,arguments)},this.getClearAlpha=function(){return He.getClearAlpha()},this.setClearAlpha=function(){He.setClearAlpha.apply(He,arguments)},this.clear=function(E,V,X){let Z=0;(void 0===E||E)&&(Z|=16384),(void 0===V||V)&&(Z|=256),(void 0===X||X)&&(Z|=1024),ke.clear(Z)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Nn,!1),t.removeEventListener("webglcontextrestored",se,!1),Ni.dispose(),Li.dispose(),ht.dispose(),at.dispose(),Ye.dispose(),an.dispose(),ln.dispose(),yn.dispose(),Ot.dispose(),Ot.removeEventListener("sessionstart",fi),Ot.removeEventListener("sessionend",lr),Se&&(Se.dispose(),Se=null),Wo.stop()},this.renderBufferDirect=function(E,V,X,Z,ae,ze){null===V&&(V=Mt);let et=ae.isMesh&&ae.matrixWorld.determinant()<0,qe=function(E,V,X,Z,ae){!0!==V.isScene&&(V=Mt),oe.resetTextureUnits();let ze=V.fog,qe=null===R?_.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:wp,rt=(Z.isMeshStandardMaterial?Ye:at).get(Z.envMap||(Z.isMeshStandardMaterial?V.environment:null)),dt=!0===Z.vertexColors&&!!X.attributes.color&&4===X.attributes.color.itemSize,St=!!Z.normalMap&&!!X.attributes.tangent,At=!!X.morphAttributes.position,cn=!!X.morphAttributes.normal,qi=X.morphAttributes.position?X.morphAttributes.position.length:0,yi=Z.toneMapped?_.toneMapping:yp,pn=ht.get(Z),Rn=p.state.lights;!0!==pe||!0!==Ge&&E===B||Y.setState(Z,E,E===B&&Z.id===I);let Et=!1;Z.version===pn.__version?(pn.needsLights&&pn.lightsStateVersion!==Rn.state.version||pn.outputEncoding!==qe||ae.isInstancedMesh&&!1===pn.instancing||!ae.isInstancedMesh&&!0===pn.instancing||ae.isSkinnedMesh&&!1===pn.skinning||!ae.isSkinnedMesh&&!0===pn.skinning||pn.envMap!==rt||Z.fog&&pn.fog!==ze||void 0!==pn.numClippingPlanes&&(pn.numClippingPlanes!==Y.numPlanes||pn.numIntersection!==Y.numIntersection)||pn.vertexAlphas!==dt||pn.vertexTangents!==St||pn.morphTargets!==At||pn.morphNormals!==cn||pn.toneMapping!==yi||!0===on.isWebGL2&&pn.morphTargetsCount!==qi)&&(Et=!0):(Et=!0,pn.__version=Z.version);let gi=pn.currentProgram;!0===Et&&(gi=S_(Z,V,ae));let ti=!1,Hn=!1,Qn=!1,zt=gi.getUniforms(),Bi=pn.uniforms;if(Ce.useProgram(gi.program)&&(ti=!0,Hn=!0,Qn=!0),Z.id!==I&&(I=Z.id,Hn=!0),ti||B!==E){if(zt.setValue(ke,"projectionMatrix",E.projectionMatrix),on.logarithmicDepthBuffer&&zt.setValue(ke,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),B!==E&&(B=E,Hn=!0,Qn=!0),Z.isShaderMaterial||Z.isMeshPhongMaterial||Z.isMeshToonMaterial||Z.isMeshStandardMaterial||Z.envMap){let _n=zt.map.cameraPosition;void 0!==_n&&_n.setValue(ke,lt.setFromMatrixPosition(E.matrixWorld))}(Z.isMeshPhongMaterial||Z.isMeshToonMaterial||Z.isMeshLambertMaterial||Z.isMeshBasicMaterial||Z.isMeshStandardMaterial||Z.isShaderMaterial)&&zt.setValue(ke,"isOrthographic",!0===E.isOrthographicCamera),(Z.isMeshPhongMaterial||Z.isMeshToonMaterial||Z.isMeshLambertMaterial||Z.isMeshBasicMaterial||Z.isMeshStandardMaterial||Z.isShaderMaterial||Z.isShadowMaterial||ae.isSkinnedMesh)&&zt.setValue(ke,"viewMatrix",E.matrixWorldInverse)}if(ae.isSkinnedMesh){zt.setOptional(ke,ae,"bindMatrix"),zt.setOptional(ke,ae,"bindMatrixInverse");let _n=ae.skeleton;_n&&(on.floatVertexTextures?(null===_n.boneTexture&&_n.computeBoneTexture(),zt.setValue(ke,"boneTexture",_n.boneTexture,oe),zt.setValue(ke,"boneTextureSize",_n.boneTextureSize)):zt.setOptional(ke,_n,"boneMatrices"))}return!!X&&(void 0!==X.morphAttributes.position||void 0!==X.morphAttributes.normal)&&yt.update(ae,X,Z,gi),(Hn||pn.receiveShadow!==ae.receiveShadow)&&(pn.receiveShadow=ae.receiveShadow,zt.setValue(ke,"receiveShadow",ae.receiveShadow)),Hn&&(zt.setValue(ke,"toneMappingExposure",_.toneMappingExposure),pn.needsLights&&function(E,V){E.ambientLightColor.needsUpdate=V,E.lightProbe.needsUpdate=V,E.directionalLights.needsUpdate=V,E.directionalLightShadows.needsUpdate=V,E.pointLights.needsUpdate=V,E.pointLightShadows.needsUpdate=V,E.spotLights.needsUpdate=V,E.spotLightShadows.needsUpdate=V,E.rectAreaLights.needsUpdate=V,E.hemisphereLights.needsUpdate=V}(Bi,Qn),ze&&Z.fog&&si.refreshFogUniforms(Bi,ze),si.refreshMaterialUniforms(Bi,Z,D,Ae,Se),Mp.upload(ke,pn.uniformsList,Bi,oe)),Z.isShaderMaterial&&!0===Z.uniformsNeedUpdate&&(Mp.upload(ke,pn.uniformsList,Bi,oe),Z.uniformsNeedUpdate=!1),Z.isSpriteMaterial&&zt.setValue(ke,"center",ae.center),zt.setValue(ke,"modelViewMatrix",ae.modelViewMatrix),zt.setValue(ke,"normalMatrix",ae.normalMatrix),zt.setValue(ke,"modelMatrix",ae.matrixWorld),gi}(E,V,X,Z,ae);Ce.setMaterial(Z,et);let rt=X.index,dt=X.attributes.position;if(null===rt){if(void 0===dt||0===dt.count)return}else if(0===rt.count)return;let St=1;!0===Z.wireframe&&(rt=ut.getWireframeAttribute(X),St=2),ln.setup(ae,Z,qe,X,rt);let At,cn=en;null!==rt&&(At=_t.get(rt),cn=Le,cn.setIndex(At));let qi=null!==rt?rt.count:dt.count,yi=X.drawRange.start*St,pn=X.drawRange.count*St,Rn=null!==ze?ze.start*St:0,Et=null!==ze?ze.count*St:1/0,gi=Math.max(yi,Rn),ti=Math.min(qi,yi+pn,Rn+Et)-1,Hn=Math.max(0,ti-gi+1);if(0!==Hn){if(ae.isMesh)!0===Z.wireframe?(Ce.setLineWidth(Z.wireframeLinewidth*pt()),cn.setMode(1)):cn.setMode(4);else if(ae.isLine){let Qn=Z.linewidth;void 0===Qn&&(Qn=1),Ce.setLineWidth(Qn*pt()),cn.setMode(ae.isLineSegments?1:ae.isLineLoop?2:3)}else ae.isPoints?cn.setMode(0):ae.isSprite&&cn.setMode(4);if(ae.isInstancedMesh)cn.renderInstances(gi,Hn,ae.count);else if(X.isInstancedBufferGeometry){let Qn=Math.min(X.instanceCount,X._maxInstanceCount);cn.renderInstances(gi,Hn,Qn)}else cn.render(gi,Hn)}},this.compile=function(E,V){p=Li.get(E),p.init(),m.push(p),E.traverseVisible(function(X){X.isLight&&X.layers.test(V.layers)&&(p.pushLight(X),X.castShadow&&p.pushShadow(X))}),p.setupLights(_.physicallyCorrectLights),E.traverse(function(X){let Z=X.material;if(Z)if(Array.isArray(Z))for(let ae=0;ae<Z.length;ae++)S_(Z[ae],E,X);else S_(Z,E,X)}),m.pop(),p=null};let We=null;function fi(){Wo.stop()}function lr(){Wo.start()}let Wo=new mte;function vr(E,V,X,Z){if(!1===E.visible)return;if(E.layers.test(V.layers))if(E.isGroup)X=E.renderOrder;else if(E.isLOD)!0===E.autoUpdate&&E.update(V);else if(E.isLight)p.pushLight(E),E.castShadow&&p.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||de.intersectsSprite(E)){Z&&lt.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Fe);let et=an.update(E),qe=E.material;qe.visible&&u.push(E,et,qe,X,lt.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(E.isSkinnedMesh&&E.skeleton.frame!==mt.render.frame&&(E.skeleton.update(),E.skeleton.frame=mt.render.frame),!E.frustumCulled||de.intersectsObject(E))){Z&&lt.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Fe);let et=an.update(E),qe=E.material;if(Array.isArray(qe)){let rt=et.groups;for(let dt=0,St=rt.length;dt<St;dt++){let At=rt[dt],cn=qe[At.materialIndex];cn&&cn.visible&&u.push(E,et,cn,X,lt.z,At)}}else qe.visible&&u.push(E,et,qe,X,lt.z,null)}let ze=E.children;for(let et=0,qe=ze.length;et<qe;et++)vr(ze[et],V,X,Z)}function Is(E,V,X,Z){let ae=E.opaque,ze=E.transmissive,et=E.transparent;p.setupLightsView(X),ze.length>0&&function(E,V,X){null===Se&&(Se=new(!0===a&&!0===on.isWebGL2?wx:ts)(1024,1024,{generateMipmaps:!0,type:null!==hn.convert(q0)?q0:xp,minFilter:$I,magFilter:vo,wrapS:Es,wrapT:Es,useRenderToTexture:wt.has("WEBGL_multisampled_render_to_texture")}));let Z=_.getRenderTarget();_.setRenderTarget(Se),_.clear();let ae=_.toneMapping;_.toneMapping=yp,pl(E,V,X),_.toneMapping=ae,oe.updateMultisampleRenderTarget(Se),oe.updateRenderTargetMipmap(Se),_.setRenderTarget(Z)}(ae,V,X),Z&&Ce.viewport(ee.copy(Z)),ae.length>0&&pl(ae,V,X),ze.length>0&&pl(ze,V,X),et.length>0&&pl(et,V,X)}function pl(E,V,X){let Z=!0===V.isScene?V.overrideMaterial:null;for(let ae=0,ze=E.length;ae<ze;ae++){let et=E[ae],qe=et.object,rt=et.geometry,dt=null===Z?et.material:Z,St=et.group;qe.layers.test(X.layers)&&kA(qe,V,X,rt,dt,St)}}function kA(E,V,X,Z,ae,ze){E.onBeforeRender(_,V,X,Z,ae,ze),E.modelViewMatrix.multiplyMatrices(X.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),ae.onBeforeRender(_,V,X,Z,E,ze),!0===ae.transparent&&ae.side===Z0?(ae.side=bo,ae.needsUpdate=!0,_.renderBufferDirect(X,V,Z,ae,E,ze),ae.side=yx,ae.needsUpdate=!0,_.renderBufferDirect(X,V,Z,ae,E,ze),ae.side=Z0):_.renderBufferDirect(X,V,Z,ae,E,ze),E.onAfterRender(_,V,X,Z,ae,ze)}function S_(E,V,X){!0!==V.isScene&&(V=Mt);let Z=ht.get(E),ae=p.state.lights,et=ae.state.version,qe=yn.getParameters(E,ae.state,p.state.shadowsArray,V,X),rt=yn.getProgramCacheKey(qe),dt=Z.programs;Z.environment=E.isMeshStandardMaterial?V.environment:null,Z.fog=V.fog,Z.envMap=(E.isMeshStandardMaterial?Ye:at).get(E.envMap||Z.environment),void 0===dt&&(E.addEventListener("dispose",Jt),dt=new Map,Z.programs=dt);let St=dt.get(rt);if(void 0!==St){if(Z.currentProgram===St&&Z.lightsStateVersion===et)return tC(E,qe),St}else qe.uniforms=yn.getUniforms(E),E.onBuild(X,qe,_),E.onBeforeCompile(qe,_),St=yn.acquireProgram(qe,rt),dt.set(rt,St),Z.uniforms=qe.uniforms;let At=Z.uniforms;(!E.isShaderMaterial&&!E.isRawShaderMaterial||!0===E.clipping)&&(At.clippingPlanes=Y.uniform),tC(E,qe),Z.needsLights=function(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&!0===E.lights}(E),Z.lightsStateVersion=et,Z.needsLights&&(At.ambientLightColor.value=ae.state.ambient,At.lightProbe.value=ae.state.probe,At.directionalLights.value=ae.state.directional,At.directionalLightShadows.value=ae.state.directionalShadow,At.spotLights.value=ae.state.spot,At.spotLightShadows.value=ae.state.spotShadow,At.rectAreaLights.value=ae.state.rectArea,At.ltc_1.value=ae.state.rectAreaLTC1,At.ltc_2.value=ae.state.rectAreaLTC2,At.pointLights.value=ae.state.point,At.pointLightShadows.value=ae.state.pointShadow,At.hemisphereLights.value=ae.state.hemi,At.directionalShadowMap.value=ae.state.directionalShadowMap,At.directionalShadowMatrix.value=ae.state.directionalShadowMatrix,At.spotShadowMap.value=ae.state.spotShadowMap,At.spotShadowMatrix.value=ae.state.spotShadowMatrix,At.pointShadowMap.value=ae.state.pointShadowMap,At.pointShadowMatrix.value=ae.state.pointShadowMatrix);let cn=St.getUniforms(),qi=Mp.seqWithValue(cn.seq,At);return Z.currentProgram=St,Z.uniformsList=qi,St}function tC(E,V){let X=ht.get(E);X.outputEncoding=V.outputEncoding,X.instancing=V.instancing,X.skinning=V.skinning,X.morphTargets=V.morphTargets,X.morphNormals=V.morphNormals,X.morphTargetsCount=V.morphTargetsCount,X.numClippingPlanes=V.numClippingPlanes,X.numIntersection=V.numClipIntersection,X.vertexAlphas=V.vertexAlphas,X.vertexTangents=V.vertexTangents,X.toneMapping=V.toneMapping}Wo.setAnimationLoop(function(E){We&&We(E)}),typeof window<"u"&&Wo.setContext(window),this.setAnimationLoop=function(E){We=E,Ot.setAnimationLoop(E),null===E?Wo.stop():Wo.start()},Ot.addEventListener("sessionstart",fi),Ot.addEventListener("sessionend",lr),this.render=function(E,V){if(void 0===V||!0===V.isCamera){if(!0!==M){if(!0===E.autoUpdate&&E.updateMatrixWorld(),null===V.parent&&V.updateMatrixWorld(),!0===Ot.enabled&&!0===Ot.isPresenting&&(!0===Ot.cameraAutoUpdate&&Ot.updateCamera(V),V=Ot.getCamera()),!0===E.isScene&&E.onBeforeRender(_,E,V,R),p=Li.get(E,m.length),p.init(),m.push(p),Fe.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),de.setFromProjectionMatrix(Fe),Ge=this.localClippingEnabled,pe=Y.init(this.clippingPlanes,Ge,V),u=Ni.get(E,h.length),u.init(),h.push(u),vr(E,V,0,_.sortObjects),u.finish(),!0===_.sortObjects&&u.sort(re,ce),!0===pe&&Y.beginShadows(),L.render(p.state.shadowsArray,E,V),!0===pe&&Y.endShadows(),!0===this.info.autoReset&&this.info.reset(),He.render(u,E),p.setupLights(_.physicallyCorrectLights),V.isArrayCamera){let Z=V.cameras;for(let ae=0,ze=Z.length;ae<ze;ae++){let et=Z[ae];Is(u,E,et,et.viewport)}}else Is(u,E,V);null!==R&&(oe.updateMultisampleRenderTarget(R),oe.updateRenderTargetMipmap(R)),!0===E.isScene&&E.onAfterRender(_,E,V),Ce.buffers.depth.setTest(!0),Ce.buffers.depth.setMask(!0),Ce.buffers.color.setMask(!0),Ce.setPolygonOffset(!1),ln.resetDefaultState(),I=-1,B=null,m.pop(),p=m.length>0?m[m.length-1]:null,h.pop(),u=h.length>0?h[h.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(E,V,X){ht.get(E.texture).__webglTexture=V,ht.get(E.depthTexture).__webglTexture=X;let Z=ht.get(E);Z.__hasExternalTextures=!0,Z.__hasExternalTextures&&(Z.__autoAllocateDepthBuffer=void 0===X,Z.__autoAllocateDepthBuffer||E.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),E.useRenderToTexture=!1,E.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(E,V){let X=ht.get(E);X.__webglFramebuffer=V,X.__useDefaultFramebuffer=void 0===V},this.setRenderTarget=function(E,V=0,X=0){R=E,y=V,x=X;let Z=!0;if(E){let rt=ht.get(E);void 0!==rt.__useDefaultFramebuffer?(Ce.bindFramebuffer(36160,null),Z=!1):void 0===rt.__webglFramebuffer?oe.setupRenderTarget(E):rt.__hasExternalTextures&&oe.rebindTextures(E,ht.get(E.texture).__webglTexture,ht.get(E.depthTexture).__webglTexture)}let ae=null,ze=!1,et=!1;if(E){let rt=E.texture;(rt.isDataTexture3D||rt.isDataTexture2DArray)&&(et=!0);let dt=ht.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(ae=dt[V],ze=!0):ae=E.useRenderbuffer?ht.get(E).__webglMultisampledFramebuffer:dt,ee.copy(E.viewport),Q.copy(E.scissor),we=E.scissorTest}else ee.copy(he).multiplyScalar(D).floor(),Q.copy(_e).multiplyScalar(D).floor(),we=$;if(Ce.bindFramebuffer(36160,ae)&&on.drawBuffers&&Z&&Ce.drawBuffers(E,ae),Ce.viewport(ee),Ce.scissor(Q),Ce.setScissorTest(we),ze){let rt=ht.get(E.texture);ke.framebufferTexture2D(36160,36064,34069+V,rt.__webglTexture,X)}else if(et){let rt=ht.get(E.texture);ke.framebufferTextureLayer(36160,36064,rt.__webglTexture,X||0,V||0)}I=-1},this.readRenderTargetPixels=function(E,V,X,Z,ae,ze,et){if(!E||!E.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let qe=ht.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&void 0!==et&&(qe=qe[et]),qe){Ce.bindFramebuffer(36160,qe);try{let rt=E.texture,dt=rt.format,St=rt.type;if(dt!==Ca&&hn.convert(dt)!==ke.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");let At=St===q0&&(wt.has("EXT_color_buffer_half_float")||on.isWebGL2&&wt.has("EXT_color_buffer_float"));if(!(St===xp||hn.convert(St)===ke.getParameter(35738)||St===gm&&(on.isWebGL2||wt.has("OES_texture_float")||wt.has("WEBGL_color_buffer_float"))||At))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ke.checkFramebufferStatus(36160)?V>=0&&V<=E.width-Z&&X>=0&&X<=E.height-ae&&ke.readPixels(V,X,Z,ae,hn.convert(dt),hn.convert(St),ze):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let rt=null!==R?ht.get(R).__webglFramebuffer:null;Ce.bindFramebuffer(36160,rt)}}},this.copyFramebufferToTexture=function(E,V,X=0){if(!0!==V.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");let Z=Math.pow(2,-X),ae=Math.floor(V.image.width*Z),ze=Math.floor(V.image.height*Z);oe.setTexture2D(V,0),ke.copyTexSubImage2D(3553,X,0,0,E.x,E.y,ae,ze),Ce.unbindTexture()},this.copyTextureToTexture=function(E,V,X,Z=0){let ae=V.image.width,ze=V.image.height,et=hn.convert(X.format),qe=hn.convert(X.type);oe.setTexture2D(X,0),ke.pixelStorei(37440,X.flipY),ke.pixelStorei(37441,X.premultiplyAlpha),ke.pixelStorei(3317,X.unpackAlignment),V.isDataTexture?ke.texSubImage2D(3553,Z,E.x,E.y,ae,ze,et,qe,V.image.data):V.isCompressedTexture?ke.compressedTexSubImage2D(3553,Z,E.x,E.y,V.mipmaps[0].width,V.mipmaps[0].height,et,V.mipmaps[0].data):ke.texSubImage2D(3553,Z,E.x,E.y,et,qe,V.image),0===Z&&X.generateMipmaps&&ke.generateMipmap(3553),Ce.unbindTexture()},this.copyTextureToTexture3D=function(E,V,X,Z,ae=0){if(_.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");let St,ze=E.max.x-E.min.x+1,et=E.max.y-E.min.y+1,qe=E.max.z-E.min.z+1,rt=hn.convert(Z.format),dt=hn.convert(Z.type);if(Z.isDataTexture3D)oe.setTexture3D(Z,0),St=32879;else{if(!Z.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");oe.setTexture2DArray(Z,0),St=35866}ke.pixelStorei(37440,Z.flipY),ke.pixelStorei(37441,Z.premultiplyAlpha),ke.pixelStorei(3317,Z.unpackAlignment);let At=ke.getParameter(3314),cn=ke.getParameter(32878),qi=ke.getParameter(3316),yi=ke.getParameter(3315),pn=ke.getParameter(32877),Rn=X.isCompressedTexture?X.mipmaps[0]:X.image;ke.pixelStorei(3314,Rn.width),ke.pixelStorei(32878,Rn.height),ke.pixelStorei(3316,E.min.x),ke.pixelStorei(3315,E.min.y),ke.pixelStorei(32877,E.min.z),X.isDataTexture||X.isDataTexture3D?ke.texSubImage3D(St,ae,V.x,V.y,V.z,ze,et,qe,rt,dt,Rn.data):X.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ke.compressedTexSubImage3D(St,ae,V.x,V.y,V.z,ze,et,qe,rt,Rn.data)):ke.texSubImage3D(St,ae,V.x,V.y,V.z,ze,et,qe,rt,dt,Rn),ke.pixelStorei(3314,At),ke.pixelStorei(32878,cn),ke.pixelStorei(3316,qi),ke.pixelStorei(3315,yi),ke.pixelStorei(32877,pn),0===ae&&Z.generateMipmaps&&ke.generateMipmap(St),Ce.unbindTexture()},this.initTexture=function(E){oe.setTexture2D(E,0),Ce.unbindTexture()},this.resetState=function(){y=0,x=0,R=null,Ce.reset(),ln.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Wi.prototype.isWebGLRenderer=!0,class extends Wi{}.prototype.isWebGL1Renderer=!0;var Ax=class{constructor(t,e=25e-5){this.name="",this.color=new sn(t),this.density=e}clone(){return new Ax(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Ax.prototype.isFogExp2=!0;var Rx=class{constructor(t,e=1,i=1e3){this.name="",this.color=new sn(t),this.near=e,this.far=i}clone(){return new Rx(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};Rx.prototype.isFog=!0;var n_=class extends Ui{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}};n_.prototype.isScene=!0;var Cm=class{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Cx,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Yl()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let r=0,o=this.stride;r<o;r++)this.array[t+r]=e.array[i+r];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Yl()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Yl()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};Cm.prototype.isInterleavedBuffer=!0;var Qr=new K,Mm=class{constructor(t,e,i,r=!1){this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)Qr.x=this.getX(e),Qr.y=this.getY(e),Qr.z=this.getZ(e),Qr.applyMatrix4(t),this.setXYZ(e,Qr.x,Qr.y,Qr.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Qr.x=this.getX(e),Qr.y=this.getY(e),Qr.z=this.getZ(e),Qr.applyNormalMatrix(t),this.setXYZ(e,Qr.x,Qr.y,Qr.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Qr.x=this.getX(e),Qr.y=this.getY(e),Qr.z=this.getZ(e),Qr.transformDirection(t),this.setXYZ(e,Qr.x,Qr.y,Qr.z);return this}setX(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){return this.data.array[t*this.data.stride+this.offset]}getY(t){return this.data.array[t*this.data.stride+this.offset+1]}getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}getW(t){return this.data.array[t*this.data.stride+this.offset+3]}setXY(t,e,i){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,r){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=r,this}setXYZW(t,e,i,r,o){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=r,this.data.array[t+3]=o,this}clone(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");let e=[];for(let i=0;i<this.count;i++){let r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[r+o])}return new Ar(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new Mm(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");let e=[];for(let i=0;i<this.count;i++){let r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[r+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}};Mm.prototype.isInterleavedBufferAttribute=!0;var FI=class extends Fo{constructor(t){super(),this.type="SpriteMaterial",this.color=new sn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}};FI.prototype.isSpriteMaterial=!0;var B0,cx=new K,V0=new K,H0=new K,z0=new $e,dx=new $e,Ste=new vn,lI=new K,ux=new K,cI=new K,Nee=new $e,H3=new $e,Lee=new $e;function dI(n,t,e,i,r,o){z0.subVectors(n,e).addScalar(.5).multiply(i),void 0!==r?(dx.x=o*z0.x-r*z0.y,dx.y=r*z0.x+o*z0.y):dx.copy(z0),n.copy(t),n.x+=dx.x,n.y+=dx.y,n.applyMatrix4(Ste)}(class extends Ui{constructor(t){if(super(),this.type="Sprite",void 0===B0){B0=new Gi;let e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new Cm(e,5);B0.setIndex([0,1,2,0,2,3]),B0.setAttribute("position",new Mm(i,3,0,!1)),B0.setAttribute("uv",new Mm(i,2,3,!1))}this.geometry=B0,this.material=void 0!==t?t:new FI,this.center=new $e(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),V0.setFromMatrixScale(this.matrixWorld),Ste.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),H0.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&V0.multiplyScalar(-H0.z);let r,o,i=this.material.rotation;0!==i&&(o=Math.cos(i),r=Math.sin(i));let a=this.center;dI(lI.set(-.5,-.5,0),H0,a,V0,r,o),dI(ux.set(.5,-.5,0),H0,a,V0,r,o),dI(cI.set(.5,.5,0),H0,a,V0,r,o),Nee.set(0,0),H3.set(1,0),Lee.set(1,1);let s=t.ray.intersectTriangle(lI,ux,cI,!1,cx);if(null===s&&(dI(ux.set(-.5,.5,0),H0,a,V0,r,o),H3.set(0,1),s=t.ray.intersectTriangle(lI,cI,ux,!1,cx),null===s))return;let l=t.ray.origin.distanceTo(cx);l<t.near||l>t.far||e.push({distance:l,point:cx.clone(),uv:Vr.getUV(cx,lI,ux,cI,Nee,H3,Lee,new $e),face:null,object:this})}copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}).prototype.isSprite=!0;var Bee=new K,Vee=new Qi,Hee=new Qi,A2e=new K,zee=new vn,NI=class extends so{constructor(t,e){super(t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new vn,this.bindMatrixInverse=new vn}copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let t=new Qi,e=this.geometry.attributes.skinWeight;for(let i=0,r=e.count;i<r;i++){t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.w=e.getW(i);let o=1/t.manhattanLength();o!==1/0?t.multiplyScalar(o):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,e){let i=this.skeleton,r=this.geometry;Vee.fromBufferAttribute(r.attributes.skinIndex,t),Hee.fromBufferAttribute(r.attributes.skinWeight,t),Bee.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let o=0;o<4;o++){let a=Hee.getComponent(o);if(0!==a){let s=Vee.getComponent(o);zee.multiplyMatrices(i.bones[s].matrixWorld,i.boneInverses[s]),e.addScaledVector(A2e.copy(Bee).applyMatrix4(zee),a)}}return e.applyMatrix4(this.bindMatrixInverse)}};NI.prototype.isSkinnedMesh=!0,class extends Ui{constructor(){super(),this.type="Bone"}}.prototype.isBone=!0,class extends lo{constructor(t=null,e=1,i=1,r,o,a,s,l,c=vo,d=vo,u,p){super(null,a,s,l,c,d,r,o,u,p),this.image={data:t,width:e,height:i},this.magFilter=c,this.minFilter=d,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}.prototype.isDataTexture=!0;var Px=class extends Ar{constructor(t,e,i,r=1){"number"==typeof i&&(r=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(t,e,i),this.meshPerAttribute=r}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){let t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}};Px.prototype.isInstancedBufferAttribute=!0;var Uee=new vn,jee=new vn,uI=[],px=new so;(class extends so{constructor(t,e,i){super(t,e),this.instanceMatrix=new Px(new Float32Array(16*i),16),this.instanceColor=null,this.count=i,this.frustumCulled=!1}copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}raycast(t,e){let i=this.matrixWorld,r=this.count;if(px.geometry=this.geometry,px.material=this.material,void 0!==px.material)for(let o=0;o<r;o++){this.getMatrixAt(o,Uee),jee.multiplyMatrices(i,Uee),px.matrixWorld=jee,px.raycast(t,uI);for(let a=0,s=uI.length;a<s;a++){let l=uI[a];l.instanceId=o,l.object=this,e.push(l)}uI.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new Px(new Float32Array(3*this.instanceMatrix.count),3)),e.toArray(this.instanceColor.array,3*t)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}).prototype.isInstancedMesh=!0;var Gd=class extends Fo{constructor(t){super(),this.type="LineBasicMaterial",this.color=new sn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this}};Gd.prototype.isLineBasicMaterial=!0;var Gee=new K,Wee=new K,qee=new vn,z3=new Ep,pI=new Sp,kx=class extends Ui{constructor(t=new Gi,e=new Gd){super(),this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(null===t.index){let e=t.attributes.position,i=[0];for(let r=1,o=e.count;r<o;r++)Gee.fromBufferAttribute(e,r-1),Wee.fromBufferAttribute(e,r),i[r]=i[r-1],i[r]+=Gee.distanceTo(Wee);t.setAttribute("lineDistance",new Nr(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(t,e){let i=this.geometry,r=this.matrixWorld,o=t.params.Line.threshold,a=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),pI.copy(i.boundingSphere),pI.applyMatrix4(r),pI.radius+=o,!1===t.ray.intersectsSphere(pI))return;qee.copy(r).invert(),z3.copy(t.ray).applyMatrix4(qee);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,c=new K,d=new K,u=new K,p=new K,h=this.isLineSegments?2:1;if(i.isBufferGeometry){let m=i.index,M=i.attributes.position;if(null!==m)for(let R=Math.max(0,a.start),I=Math.min(m.count,a.start+a.count)-1;R<I;R+=h){let B=m.getX(R),ee=m.getX(R+1);if(c.fromBufferAttribute(M,B),d.fromBufferAttribute(M,ee),z3.distanceSqToSegment(c,d,p,u)>l)continue;p.applyMatrix4(this.matrixWorld);let we=t.ray.origin.distanceTo(p);we<t.near||we>t.far||e.push({distance:we,point:u.clone().applyMatrix4(this.matrixWorld),index:R,face:null,faceIndex:null,object:this})}else for(let R=Math.max(0,a.start),I=Math.min(M.count,a.start+a.count)-1;R<I;R+=h){if(c.fromBufferAttribute(M,R),d.fromBufferAttribute(M,R+1),z3.distanceSqToSegment(c,d,p,u)>l)continue;p.applyMatrix4(this.matrixWorld);let ee=t.ray.origin.distanceTo(p);ee<t.near||ee>t.far||e.push({distance:ee,point:u.clone().applyMatrix4(this.matrixWorld),index:R,face:null,faceIndex:null,object:this})}}else i.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};kx.prototype.isLine=!0;var Xee=new K,Yee=new K,Ox=class extends kx{constructor(t,e){super(t,e),this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(null===t.index){let e=t.attributes.position,i=[];for(let r=0,o=e.count;r<o;r+=2)Xee.fromBufferAttribute(e,r),Yee.fromBufferAttribute(e,r+1),i[r]=0===r?0:i[r-1],i[r+1]=i[r]+Xee.distanceTo(Yee);t.setAttribute("lineDistance",new Nr(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}};Ox.prototype.isLineSegments=!0,class extends kx{constructor(t,e){super(t,e),this.type="LineLoop"}}.prototype.isLineLoop=!0;var LI=class extends Fo{constructor(t){super(),this.type="PointsMaterial",this.color=new sn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this}};LI.prototype.isPointsMaterial=!0;var Qee=new vn,pB=new Ep,hI=new Sp,mI=new K;function Zee(n,t,e,i,r,o,a){let s=pB.distanceSqToPoint(n);if(s<e){let l=new K;pB.closestPointToPoint(n,l),l.applyMatrix4(i);let c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}(class extends Ui{constructor(t=new Gi,e=new LI){super(),this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}raycast(t,e){let i=this.geometry,r=this.matrixWorld,o=t.params.Points.threshold,a=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),hI.copy(i.boundingSphere),hI.applyMatrix4(r),hI.radius+=o,!1===t.ray.intersectsSphere(hI))return;Qee.copy(r).invert(),pB.copy(t.ray).applyMatrix4(Qee);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s;if(i.isBufferGeometry){let c=i.index,u=i.attributes.position;if(null!==c)for(let m=Math.max(0,a.start),_=Math.min(c.count,a.start+a.count);m<_;m++){let M=c.getX(m);mI.fromBufferAttribute(u,M),Zee(mI,M,l,r,t,e,this)}else for(let m=Math.max(0,a.start),_=Math.min(u.count,a.start+a.count);m<_;m++)mI.fromBufferAttribute(u,m),Zee(mI,m,l,r,t,e,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}).prototype.isPoints=!0,class extends lo{constructor(t,e,i,r,o,a,s,l,c){super(t,e,i,r,o,a,s,l,c),this.minFilter=void 0!==a?a:ia,this.magFilter=void 0!==o?o:ia,this.generateMipmaps=!1;let d=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function u(){d.needsUpdate=!0,t.requestVideoFrameCallback(u)})}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;"requestVideoFrameCallback"in t==0&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}.prototype.isVideoTexture=!0,class extends lo{constructor(t,e,i){super({width:t,height:e}),this.format=i,this.magFilter=vo,this.minFilter=vo,this.generateMipmaps=!1,this.needsUpdate=!0}}.prototype.isFramebufferTexture=!0,class extends lo{constructor(t,e,i,r,o,a,s,l,c,d,u,p){super(null,a,s,l,c,d,r,o,u,p),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}.prototype.isCompressedTexture=!0,class extends lo{constructor(t,e,i,r,o,a,s,l,c){super(t,e,i,r,o,a,s,l,c),this.needsUpdate=!0}}.prototype.isCanvasTexture=!0;var i_=class extends Gi{constructor(t=1,e=8,i=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:r},e=Math.max(3,e);let o=[],a=[],s=[],l=[],c=new K,d=new $e;a.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let u=0,p=3;u<=e;u++,p+=3){let h=i+u/e*r;c.x=t*Math.cos(h),c.y=t*Math.sin(h),a.push(c.x,c.y,c.z),s.push(0,0,1),d.x=(a[p]/t+1)/2,d.y=(a[p+1]/t+1)/2,l.push(d.x,d.y)}for(let u=1;u<=e;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new Nr(a,3)),this.setAttribute("normal",new Nr(s,3)),this.setAttribute("uv",new Nr(l,2))}static fromJSON(t){return new i_(t.radius,t.segments,t.thetaStart,t.thetaLength)}},ns=(new K,new K,new K,new Vr,class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){let i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let i,e=[],r=this.getPoint(0),o=0;e.push(0);for(let a=1;a<=t;a++)i=this.getPoint(a/t),o+=i.distanceTo(r),e.push(o),r=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){let a,i=this.getLengths(),r=0,o=i.length;a=e||t*i[o-1];let c,s=0,l=o-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),c=i[r]-a,c<0)s=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===a)return r/(o-1);let d=i[r];return(r+(a-d)/(i[r+1]-d))/(o-1)}getTangent(t,e){let r=t-1e-4,o=t+1e-4;r<0&&(r=0),o>1&&(o=1);let a=this.getPoint(r),s=this.getPoint(o),l=e||(a.isVector2?new $e:new K);return l.copy(s).sub(a).normalize(),l}getTangentAt(t,e){let i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e){let i=new K,r=[],o=[],a=[],s=new K,l=new vn;for(let h=0;h<=t;h++)r[h]=this.getTangentAt(h/t,new K);o[0]=new K,a[0]=new K;let c=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,i.set(1,0,0)),u<=c&&(c=u,i.set(0,1,0)),p<=c&&i.set(0,0,1),s.crossVectors(r[0],i).normalize(),o[0].crossVectors(r[0],s),a[0].crossVectors(r[0],o[0]);for(let h=1;h<=t;h++){if(o[h]=o[h-1].clone(),a[h]=a[h-1].clone(),s.crossVectors(r[h-1],r[h]),s.length()>Number.EPSILON){s.normalize();let m=Math.acos(es(r[h-1].dot(r[h]),-1,1));o[h].applyMatrix4(l.makeRotationAxis(s,m))}a[h].crossVectors(r[h],o[h])}if(!0===e){let h=Math.acos(es(o[0].dot(o[t]),-1,1));h/=t,r[0].dot(s.crossVectors(o[0],o[t]))>0&&(h=-h);for(let m=1;m<=t;m++)o[m].applyMatrix4(l.makeRotationAxis(r[m],h*m)),a[m].crossVectors(r[m],o[m])}return{tangents:r,normals:o,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),r_=class extends ns{constructor(t=0,e=0,i=1,r=1,o=0,a=2*Math.PI,s=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(t,e){let i=e||new $e,r=2*Math.PI,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=r;for(;o>r;)o-=r;o<Number.EPSILON&&(o=a?0:r),!0===this.aClockwise&&!a&&(o===r?o=-r:o-=r);let s=this.aStartAngle+t*o,l=this.aX+this.xRadius*Math.cos(s),c=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){let d=Math.cos(this.aRotation),u=Math.sin(this.aRotation),p=l-this.aX,h=c-this.aY;l=p*d-h*u+this.aX,c=p*u+h*d+this.aY}return i.set(l,c)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){let t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}};r_.prototype.isEllipseCurve=!0;var BI=class extends r_{constructor(t,e,i,r,o,a){super(t,e,i,i,r,o,a),this.type="ArcCurve"}};function uV(){let n=0,t=0,e=0,i=0;function r(o,a,s,l){n=o,t=s,e=-3*o+3*a-2*s-l,i=2*o-2*a+s+l}return{initCatmullRom:function(o,a,s,l,c){r(a,s,c*(s-o),c*(l-a))},initNonuniformCatmullRom:function(o,a,s,l,c,d,u){let p=(a-o)/c-(s-o)/(c+d)+(s-a)/d,h=(s-a)/d-(l-a)/(d+u)+(l-s)/u;p*=d,h*=d,r(a,s,p,h)},calc:function(o){let a=o*o;return n+t*o+e*a+i*(a*o)}}}BI.prototype.isArcCurve=!0;var fI=new K,U3=new uV,j3=new uV,G3=new uV,VI=class extends ns{constructor(t=[],e=!1,i="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=i,this.tension=r}getPoint(t,e=new K){let c,d,i=e,r=this.points,o=r.length,a=(o-(this.closed?0:1))*t,s=Math.floor(a),l=a-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/o)+1)*o:0===l&&s===o-1&&(s=o-2,l=1),this.closed||s>0?c=r[(s-1)%o]:(fI.subVectors(r[0],r[1]).add(r[0]),c=fI);let u=r[s%o],p=r[(s+1)%o];if(this.closed||s+2<o?d=r[(s+2)%o]:(fI.subVectors(r[o-1],r[o-2]).add(r[o-1]),d=fI),"centripetal"===this.curveType||"chordal"===this.curveType){let h="chordal"===this.curveType?.5:.25,m=Math.pow(c.distanceToSquared(u),h),_=Math.pow(u.distanceToSquared(p),h),M=Math.pow(p.distanceToSquared(d),h);_<1e-4&&(_=1),m<1e-4&&(m=_),M<1e-4&&(M=_),U3.initNonuniformCatmullRom(c.x,u.x,p.x,d.x,m,_,M),j3.initNonuniformCatmullRom(c.y,u.y,p.y,d.y,m,_,M),G3.initNonuniformCatmullRom(c.z,u.z,p.z,d.z,m,_,M)}else"catmullrom"===this.curveType&&(U3.initCatmullRom(c.x,u.x,p.x,d.x,this.tension),j3.initCatmullRom(c.y,u.y,p.y,d.y,this.tension),G3.initCatmullRom(c.z,u.z,p.z,d.z,this.tension));return i.set(U3.calc(l),j3.calc(l),G3.calc(l)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){let t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){let r=t.points[e];this.points.push((new K).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}};function Kee(n,t,e,i,r){let o=.5*(i-t),a=.5*(r-e),s=n*n;return(2*e-2*i+o+a)*(n*s)+(-3*e+3*i-2*o-a)*s+o*n+e}function bx(n,t,e,i){return function(n,t){let e=1-n;return e*e*t}(n,t)+function(n,t){return 2*(1-n)*n*t}(n,e)+function(n,t){return n*n*t}(n,i)}function vx(n,t,e,i,r){return function(n,t){let e=1-n;return e*e*e*t}(n,t)+function(n,t){let e=1-n;return 3*e*e*n*t}(n,e)+function(n,t){return 3*(1-n)*n*n*t}(n,i)+function(n,t){return n*n*n*t}(n,r)}VI.prototype.isCatmullRomCurve3=!0;var Fx=class extends ns{constructor(t=new $e,e=new $e,i=new $e,r=new $e){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new $e){let i=e,r=this.v0,o=this.v1,a=this.v2,s=this.v3;return i.set(vx(t,r.x,o.x,a.x,s.x),vx(t,r.y,o.y,a.y,s.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};Fx.prototype.isCubicBezierCurve=!0;var HI=class extends ns{constructor(t=new K,e=new K,i=new K,r=new K){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new K){let i=e,r=this.v0,o=this.v1,a=this.v2,s=this.v3;return i.set(vx(t,r.x,o.x,a.x,s.x),vx(t,r.y,o.y,a.y,s.y),vx(t,r.z,o.z,a.z,s.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};HI.prototype.isCubicBezierCurve3=!0;var o_=class extends ns{constructor(t=new $e,e=new $e){super(),this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new $e){let i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e){let i=e||new $e;return i.copy(this.v2).sub(this.v1).normalize(),i}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};o_.prototype.isLineCurve=!0;var Nx=class extends ns{constructor(t=new $e,e=new $e,i=new $e){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new $e){let i=e,r=this.v0,o=this.v1,a=this.v2;return i.set(bx(t,r.x,o.x,a.x),bx(t,r.y,o.y,a.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};Nx.prototype.isQuadraticBezierCurve=!0;var zI=class extends ns{constructor(t=new K,e=new K,i=new K){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new K){let i=e,r=this.v0,o=this.v1,a=this.v2;return i.set(bx(t,r.x,o.x,a.x),bx(t,r.y,o.y,a.y),bx(t,r.z,o.z,a.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};zI.prototype.isQuadraticBezierCurve3=!0;var Lx=class extends ns{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,e=new $e){let i=e,r=this.points,o=(r.length-1)*t,a=Math.floor(o),s=o-a,l=r[0===a?a:a-1],c=r[a],d=r[a>r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return i.set(Kee(s,l.x,c.x,d.x,u.x),Kee(s,l.y,c.y,d.y,u.y)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this}toJSON(){let t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){let r=t.points[e];this.points.push((new $e).fromArray(r))}return this}};Lx.prototype.isSplineCurve=!0;var Ete=Object.freeze({__proto__:null,ArcCurve:BI,CatmullRomCurve3:VI,CubicBezierCurve:Fx,CubicBezierCurve3:HI,EllipseCurve:r_,LineCurve:o_,LineCurve3:class extends ns{constructor(t=new K,e=new K){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=e}getPoint(t,e=new K){let i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}},QuadraticBezierCurve:Nx,QuadraticBezierCurve3:zI,SplineCurve:Lx}),vB=class extends ns{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){let t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new o_(e,t))}getPoint(t,e){let i=t*this.getLength(),r=this.getCurveLengths(),o=0;for(;o<r.length;){if(r[o]>=i){let a=r[o]-i,s=this.curves[o],l=s.getLength();return s.getPointAt(0===l?0:1-a/l,e)}o++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],e=0;for(let i=0,r=this.curves.length;i<r;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){let e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){let i,e=[];for(let r=0,o=this.curves;r<o.length;r++){let a=o[r],l=a.getPoints(a&&a.isEllipseCurve?2*t:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?t*a.points.length:t);for(let c=0;c<l.length;c++){let d=l[c];i&&i.equals(d)||(e.push(d),i=d)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this}toJSON(){let t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){let r=t.curves[e];this.curves.push((new Ete[r.type]).fromJSON(r))}return this}},Bx=class extends vB{constructor(t){super(),this.type="Path",this.currentPoint=new $e,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){let i=new o_(this.currentPoint.clone(),new $e(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,i,r){let o=new Nx(this.currentPoint.clone(),new $e(t,e),new $e(i,r));return this.curves.push(o),this.currentPoint.set(i,r),this}bezierCurveTo(t,e,i,r,o,a){let s=new Fx(this.currentPoint.clone(),new $e(t,e),new $e(i,r),new $e(o,a));return this.curves.push(s),this.currentPoint.set(o,a),this}splineThru(t){let e=[this.currentPoint.clone()].concat(t),i=new Lx(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,i,r,o,a){return this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,a),this}absarc(t,e,i,r,o,a){return this.absellipse(t,e,i,i,r,o,a),this}ellipse(t,e,i,r,o,a,s,l){return this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,a,s,l),this}absellipse(t,e,i,r,o,a,s,l){let c=new r_(t,e,i,r,o,a,s,l);if(this.curves.length>0){let u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);let d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}},Wd=class extends Bx{constructor(t){super(t),this.uuid=Yl(),this.type="Shape",this.holes=[]}getPointsHoles(t){let e=[];for(let i=0,r=this.holes.length;i<r;i++)e[i]=this.holes[i].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this}toJSON(){let t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){let r=t.holes[e];this.holes.push((new Bx).fromJSON(r))}return this}};function Tte(n,t,e,i,r){let o,a;if(r===function(n,t,e,i){let r=0;for(let o=t,a=e-i;o<e;o+=i)r+=(n[a]-n[o])*(n[o+1]+n[a+1]),a=o;return r}(n,t,e,i)>0)for(o=t;o<e;o+=i)a=Jee(o,n[o],n[o+1],a);else for(o=e-i;o>=t;o-=i)a=Jee(o,n[o],n[o+1],a);return a&&tA(a,a.next)&&(zx(a),a=a.next),a}function Dp(n,t){if(!n)return n;t||(t=n);let i,e=n;do{if(i=!1,e.steiner||!tA(e,e.next)&&0!==Fr(e.prev,e,e.next))e=e.next;else{if(zx(e),e=t=e.prev,e===e.next)break;i=!0}}while(i||e!==t);return t}function Vx(n,t,e,i,r,o,a){if(!n)return;!a&&o&&function(n,t,e,i){let r=n;do{null===r.z&&(r.z=yB(r.x,r.y,t,e,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,function(n){let t,e,i,r,o,a,s,l,c=1;do{for(e=n,n=null,o=null,a=0;e;){for(a++,i=e,s=0,t=0;t<c&&(s++,i=i.nextZ,i);t++);for(l=c;s>0||l>0&&i;)0!==s&&(0===l||!i||e.z<=i.z)?(r=e,e=e.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:n=r,r.prevZ=o,o=r;e=i}o.nextZ=null,c*=2}while(a>1)}(r)}(n,i,r,o);let l,c,s=n;for(;n.prev!==n.next;)if(l=n.prev,c=n.next,o?H2e(n,i,r,o):V2e(n))t.push(l.i/e),t.push(n.i/e),t.push(c.i/e),zx(n),n=c.next,s=c.next;else if((n=c)===s){a?1===a?Vx(n=z2e(Dp(n),t,e),t,e,i,r,o,2):2===a&&U2e(n,t,e,i,r,o):Vx(Dp(n),t,e,i,r,o,1);break}}function V2e(n){let t=n.prev,e=n,i=n.next;if(Fr(t,e,i)>=0)return!1;let r=n.next.next;for(;r!==n.prev;){if(W0(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y)&&Fr(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function H2e(n,t,e,i){let r=n.prev,o=n,a=n.next;if(Fr(r,o,a)>=0)return!1;let c=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,d=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,u=yB(r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,t,e,i),p=yB(c,d,t,e,i),h=n.prevZ,m=n.nextZ;for(;h&&h.z>=u&&m&&m.z<=p;){if(h!==n.prev&&h!==n.next&&W0(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Fr(h.prev,h,h.next)>=0||(h=h.prevZ,m!==n.prev&&m!==n.next&&W0(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&Fr(m.prev,m,m.next)>=0))return!1;m=m.nextZ}for(;h&&h.z>=u;){if(h!==n.prev&&h!==n.next&&W0(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Fr(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=p;){if(m!==n.prev&&m!==n.next&&W0(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&Fr(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function z2e(n,t,e){let i=n;do{let r=i.prev,o=i.next.next;!tA(r,o)&&Dte(r,i,i.next,o)&&Hx(r,o)&&Hx(o,r)&&(t.push(r.i/e),t.push(i.i/e),t.push(o.i/e),zx(i),zx(i.next),i=n=o),i=i.next}while(i!==n);return Dp(i)}function U2e(n,t,e,i,r,o){let a=n;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&K2e(a,s)){let l=Ite(a,s);return a=Dp(a,a.next),l=Dp(l,l.next),Vx(a,t,e,i,r,o),void Vx(l,t,e,i,r,o)}s=s.next}a=a.next}while(a!==n)}function G2e(n,t){return n.x-t.x}function W2e(n,t){if(t=function(n,t){let a,e=t,i=n.x,r=n.y,o=-1/0;do{if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let p=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(p<=i&&p>o){if(o=p,p===i){if(r===e.y)return e;if(r===e.next.y)return e.next}a=e.x<e.next.x?e:e.next}}e=e.next}while(e!==t);if(!a)return null;if(i===o)return a;let u,s=a,l=a.x,c=a.y,d=1/0;e=a;do{i>=e.x&&e.x>=l&&i!==e.x&&W0(r<c?i:o,r,l,c,r<c?o:i,r,e.x,e.y)&&(u=Math.abs(r-e.y)/(i-e.x),Hx(e,n)&&(u<d||u===d&&(e.x>a.x||e.x===a.x&&X2e(a,e)))&&(a=e,d=u)),e=e.next}while(e!==s);return a}(n,t),t){let e=Ite(t,n);Dp(t,t.next),Dp(e,e.next)}}function X2e(n,t){return Fr(n.prev,n,t.prev)<0&&Fr(t.next,n,n.next)<0}function yB(n,t,e,i,r){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-e)*r)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Z2e(n){let t=n,e=n;do{(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next}while(t!==n);return e}function W0(n,t,e,i,r,o,a,s){return(r-a)*(t-s)-(n-a)*(o-s)>=0&&(n-a)*(i-s)-(e-a)*(t-s)>=0&&(e-a)*(o-s)-(r-a)*(i-s)>=0}function K2e(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!function(n,t){let e=n;do{if(e.i!==n.i&&e.next.i!==n.i&&e.i!==t.i&&e.next.i!==t.i&&Dte(e,e.next,n,t))return!0;e=e.next}while(e!==n);return!1}(n,t)&&(Hx(n,t)&&Hx(t,n)&&function(n,t){let e=n,i=!1,r=(n.x+t.x)/2,o=(n.y+t.y)/2;do{e.y>o!=e.next.y>o&&e.next.y!==e.y&&r<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next}while(e!==n);return i}(n,t)&&(Fr(n.prev,n,t.prev)||Fr(n,t.prev,t))||tA(n,t)&&Fr(n.prev,n,n.next)>0&&Fr(t.prev,t,t.next)>0)}function Fr(n,t,e){return(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y)}function tA(n,t){return n.x===t.x&&n.y===t.y}function Dte(n,t,e,i){let r=_I(Fr(n,t,e)),o=_I(Fr(n,t,i)),a=_I(Fr(e,i,n)),s=_I(Fr(e,i,t));return!!(r!==o&&a!==s||0===r&&gI(n,e,t)||0===o&&gI(n,i,t)||0===a&&gI(e,n,i)||0===s&&gI(e,t,i))}function gI(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.y<=Math.max(n.y,e.y)&&t.y>=Math.min(n.y,e.y)}function _I(n){return n>0?1:n<0?-1:0}function Hx(n,t){return Fr(n.prev,n,n.next)<0?Fr(n,t,n.next)>=0&&Fr(n,n.prev,t)>=0:Fr(n,t,n.prev)<0||Fr(n,n.next,t)<0}function Ite(n,t){let e=new xB(n.i,n.x,n.y),i=new xB(t.i,t.x,t.y),r=n.next,o=t.prev;return n.next=t,t.prev=n,e.next=r,r.prev=e,i.next=e,e.prev=i,o.next=i,i.prev=o,i}function Jee(n,t,e,i){let r=new xB(n,t,e);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function zx(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function xB(n,t,e){this.i=n,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Gc=class{static area(t){let e=t.length,i=0;for(let r=e-1,o=0;o<e;r=o++)i+=t[r].x*t[o].y-t[o].x*t[r].y;return.5*i}static isClockWise(t){return Gc.area(t)<0}static triangulateShape(t,e){let i=[],r=[],o=[];$ee(t),ete(i,t);let a=t.length;e.forEach($ee);for(let l=0;l<e.length;l++)r.push(a),a+=e[l].length,ete(i,e[l]);let s=function(n,t,e=2){let s,l,c,d,u,p,h,i=t&&t.length,r=i?t[0]*e:n.length,o=Tte(n,0,r,e,!0),a=[];if(!o||o.next===o.prev)return a;if(i&&(o=function(n,t,e,i){let o,a,s,l,c,r=[];for(o=0,a=t.length;o<a;o++)s=t[o]*i,l=o<a-1?t[o+1]*i:n.length,c=Tte(n,s,l,i,!1),c===c.next&&(c.steiner=!0),r.push(Z2e(c));for(r.sort(G2e),o=0;o<r.length;o++)W2e(r[o],e),e=Dp(e,e.next);return e}(n,t,o,e)),n.length>80*e){s=c=n[0],l=d=n[1];for(let m=e;m<r;m+=e)u=n[m],p=n[m+1],u<s&&(s=u),p<l&&(l=p),u>c&&(c=u),p>d&&(d=p);h=Math.max(c-s,d-l),h=0!==h?1/h:0}return Vx(o,a,e,s,l,h),a}(i,r);for(let l=0;l<s.length;l+=3)o.push(s.slice(l,l+3));return o}};function $ee(n){let t=n.length;t>2&&n[t-1].equals(n[0])&&n.pop()}function ete(n,t){for(let e=0;e<t.length;e++)n.push(t[e].x),n.push(t[e].y)}var Ip=class extends Gi{constructor(t=new Wd([new $e(.5,.5),new $e(-.5,.5),new $e(-.5,-.5),new $e(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];let i=this,r=[],o=[];for(let s=0,l=t.length;s<l;s++)a(t[s]);function a(s){let l=[],c=void 0!==e.curveSegments?e.curveSegments:12,d=void 0!==e.steps?e.steps:1,u=void 0!==e.depth?e.depth:1,p=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:.2,m=void 0!==e.bevelSize?e.bevelSize:h-.1,_=void 0!==e.bevelOffset?e.bevelOffset:0,M=void 0!==e.bevelSegments?e.bevelSegments:3,y=e.extrudePath,x=void 0!==e.UVGenerator?e.UVGenerator:tNe;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),u=e.amount);let R,B,ee,Q,we,I=!1;y&&(R=y.getSpacedPoints(d),I=!0,p=!1,B=y.computeFrenetFrames(d,!1),ee=new K,Q=new K,we=new K),p||(M=0,h=0,m=0,_=0);let Qe=s.extractPoints(c),Ae=Qe.shape,D=Qe.holes;if(!Gc.isClockWise(Ae)){Ae=Ae.reverse();for(let oe=0,at=D.length;oe<at;oe++){let Ye=D[oe];Gc.isClockWise(Ye)&&(D[oe]=Ye.reverse())}}let ce=Gc.triangulateShape(Ae,D),he=Ae;for(let oe=0,at=D.length;oe<at;oe++)Ae=Ae.concat(D[oe]);function _e(oe,at,Ye){return at||console.error("THREE.ExtrudeGeometry: vec does not exist"),at.clone().multiplyScalar(Ye).add(oe)}let $=Ae.length,de=ce.length;function pe(oe,at,Ye){let _t,ut,an,yn=oe.x-at.x,si=oe.y-at.y,Ni=Ye.x-oe.x,Li=Ye.y-oe.y,Y=yn*yn+si*si;if(Math.abs(yn*Li-si*Ni)>Number.EPSILON){let He=Math.sqrt(Y),yt=Math.sqrt(Ni*Ni+Li*Li),en=at.x-si/He,Le=at.y+yn/He,Ft=((Ye.x-Li/yt-en)*Li-(Ye.y+Ni/yt-Le)*Ni)/(yn*Li-si*Ni);_t=en+yn*Ft-oe.x,ut=Le+si*Ft-oe.y;let Ot=_t*_t+ut*ut;if(Ot<=2)return new $e(_t,ut);an=Math.sqrt(Ot/2)}else{let He=!1;yn>Number.EPSILON?Ni>Number.EPSILON&&(He=!0):yn<-Number.EPSILON?Ni<-Number.EPSILON&&(He=!0):Math.sign(si)===Math.sign(Li)&&(He=!0),He?(_t=-si,ut=yn,an=Math.sqrt(Y)):(_t=yn,ut=si,an=Math.sqrt(Y/2))}return new $e(_t/an,ut/an)}let Ge=[];for(let oe=0,at=he.length,Ye=at-1,_t=oe+1;oe<at;oe++,Ye++,_t++)Ye===at&&(Ye=0),_t===at&&(_t=0),Ge[oe]=pe(he[oe],he[Ye],he[_t]);let Fe,Se=[],lt=Ge.concat();for(let oe=0,at=D.length;oe<at;oe++){let Ye=D[oe];Fe=[];for(let _t=0,ut=Ye.length,an=ut-1,yn=_t+1;_t<ut;_t++,an++,yn++)an===ut&&(an=0),yn===ut&&(yn=0),Fe[_t]=pe(Ye[_t],Ye[an],Ye[yn]);Se.push(Fe),lt=lt.concat(Fe)}for(let oe=0;oe<M;oe++){let at=oe/M,Ye=h*Math.cos(at*Math.PI/2),_t=m*Math.sin(at*Math.PI/2)+_;for(let ut=0,an=he.length;ut<an;ut++){let yn=_e(he[ut],Ge[ut],_t);wt(yn.x,yn.y,-Ye)}for(let ut=0,an=D.length;ut<an;ut++){let yn=D[ut];Fe=Se[ut];for(let si=0,Ni=yn.length;si<Ni;si++){let Li=_e(yn[si],Fe[si],_t);wt(Li.x,Li.y,-Ye)}}}let Mt=m+_;for(let oe=0;oe<$;oe++){let at=p?_e(Ae[oe],lt[oe],Mt):Ae[oe];I?(Q.copy(B.normals[0]).multiplyScalar(at.x),ee.copy(B.binormals[0]).multiplyScalar(at.y),we.copy(R[0]).add(Q).add(ee),wt(we.x,we.y,we.z)):wt(at.x,at.y,0)}for(let oe=1;oe<=d;oe++)for(let at=0;at<$;at++){let Ye=p?_e(Ae[at],lt[at],Mt):Ae[at];I?(Q.copy(B.normals[oe]).multiplyScalar(Ye.x),ee.copy(B.binormals[oe]).multiplyScalar(Ye.y),we.copy(R[oe]).add(Q).add(ee),wt(we.x,we.y,we.z)):wt(Ye.x,Ye.y,u/d*oe)}for(let oe=M-1;oe>=0;oe--){let at=oe/M,Ye=h*Math.cos(at*Math.PI/2),_t=m*Math.sin(at*Math.PI/2)+_;for(let ut=0,an=he.length;ut<an;ut++){let yn=_e(he[ut],Ge[ut],_t);wt(yn.x,yn.y,u+Ye)}for(let ut=0,an=D.length;ut<an;ut++){let yn=D[ut];Fe=Se[ut];for(let si=0,Ni=yn.length;si<Ni;si++){let Li=_e(yn[si],Fe[si],_t);I?wt(Li.x,Li.y+R[d-1].y,R[d-1].x+Ye):wt(Li.x,Li.y,u+Ye)}}}function Tn(oe,at){let Ye=oe.length;for(;--Ye>=0;){let _t=Ye,ut=Ye-1;ut<0&&(ut=oe.length-1);for(let an=0,yn=d+2*M;an<yn;an++){let si=$*an,Ni=$*(an+1);Ce(at+_t+si,at+ut+si,at+ut+Ni,at+_t+Ni)}}}function wt(oe,at,Ye){l.push(oe),l.push(at),l.push(Ye)}function on(oe,at,Ye){mt(oe),mt(at),mt(Ye);let _t=r.length/3,ut=x.generateTopUV(i,r,_t-3,_t-2,_t-1);ht(ut[0]),ht(ut[1]),ht(ut[2])}function Ce(oe,at,Ye,_t){mt(oe),mt(at),mt(_t),mt(at),mt(Ye),mt(_t);let ut=r.length/3,an=x.generateSideWallUV(i,r,ut-6,ut-3,ut-2,ut-1);ht(an[0]),ht(an[1]),ht(an[3]),ht(an[1]),ht(an[2]),ht(an[3])}function mt(oe){r.push(l[3*oe+0]),r.push(l[3*oe+1]),r.push(l[3*oe+2])}function ht(oe){o.push(oe.x),o.push(oe.y)}(function(){let oe=r.length/3;if(p){let at=0,Ye=$*at;for(let _t=0;_t<de;_t++){let ut=ce[_t];on(ut[2]+Ye,ut[1]+Ye,ut[0]+Ye)}at=d+2*M,Ye=$*at;for(let _t=0;_t<de;_t++){let ut=ce[_t];on(ut[0]+Ye,ut[1]+Ye,ut[2]+Ye)}}else{for(let at=0;at<de;at++){let Ye=ce[at];on(Ye[2],Ye[1],Ye[0])}for(let at=0;at<de;at++){let Ye=ce[at];on(Ye[0]+$*d,Ye[1]+$*d,Ye[2]+$*d)}}i.addGroup(oe,r.length/3-oe,0)})(),function(){let oe=r.length/3,at=0;Tn(he,at),at+=he.length;for(let Ye=0,_t=D.length;Ye<_t;Ye++){let ut=D[Ye];Tn(ut,at),at+=ut.length}i.addGroup(oe,r.length/3-oe,1)}()}this.setAttribute("position",new Nr(r,3)),this.setAttribute("uv",new Nr(o,2)),this.computeVertexNormals()}toJSON(){let t=super.toJSON();return function(n,t,e){if(e.shapes=[],Array.isArray(n))for(let i=0,r=n.length;i<r;i++)e.shapes.push(n[i].uuid);else e.shapes.push(n.uuid);return void 0!==t.extrudePath&&(e.options.extrudePath=t.extrudePath.toJSON()),e}(this.parameters.shapes,this.parameters.options,t)}static fromJSON(t,e){let i=[];for(let o=0,a=t.shapes.length;o<a;o++)i.push(e[t.shapes[o]]);let r=t.options.extrudePath;return void 0!==r&&(t.options.extrudePath=(new Ete[r.type]).fromJSON(r)),new Ip(i,t.options)}},tNe={generateTopUV:function(n,t,e,i,r){let s=t[3*i],l=t[3*i+1],c=t[3*r],d=t[3*r+1];return[new $e(t[3*e],t[3*e+1]),new $e(s,l),new $e(c,d)]},generateSideWallUV:function(n,t,e,i,r,o){let a=t[3*e],s=t[3*e+1],l=t[3*e+2],c=t[3*i],d=t[3*i+1],u=t[3*i+2],p=t[3*r],h=t[3*r+1],m=t[3*r+2],_=t[3*o],M=t[3*o+1],y=t[3*o+2];return Math.abs(s-d)<Math.abs(a-c)?[new $e(a,1-l),new $e(c,1-u),new $e(p,1-m),new $e(_,1-y)]:[new $e(s,1-l),new $e(d,1-u),new $e(h,1-m),new $e(M,1-y)]}},wm=class extends Gi{constructor(t=new Wd([new $e(0,.5),new $e(-.5,-.5),new $e(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};let i=[],r=[],o=[],a=[],s=0,l=0;if(!1===Array.isArray(t))c(t);else for(let d=0;d<t.length;d++)c(t[d]),this.addGroup(s,l,d),s+=l,l=0;function c(d){let u=r.length/3,p=d.extractPoints(e),h=p.shape,m=p.holes;!1===Gc.isClockWise(h)&&(h=h.reverse());for(let M=0,y=m.length;M<y;M++){let x=m[M];!0===Gc.isClockWise(x)&&(m[M]=x.reverse())}let _=Gc.triangulateShape(h,m);for(let M=0,y=m.length;M<y;M++)h=h.concat(m[M]);for(let M=0,y=h.length;M<y;M++){let x=h[M];r.push(x.x,x.y,0),o.push(0,0,1),a.push(x.x,x.y)}for(let M=0,y=_.length;M<y;M++){let x=_[M];i.push(x[0]+u,x[1]+u,x[2]+u),l+=3}}this.setIndex(i),this.setAttribute("position",new Nr(r,3)),this.setAttribute("normal",new Nr(o,3)),this.setAttribute("uv",new Nr(a,2))}toJSON(){let t=super.toJSON();return function(n,t){if(t.shapes=[],Array.isArray(n))for(let e=0,i=n.length;e<i;e++)t.shapes.push(n[e].uuid);else t.shapes.push(n.uuid);return t}(this.parameters.shapes,t)}static fromJSON(t,e){let i=[];for(let r=0,o=t.shapes.length;r<o;r++)i.push(e[t.shapes[r]]);return new wm(i,t.curveSegments)}};(class extends Fo{constructor(t){super(),this.type="ShadowMaterial",this.color=new sn(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}}).prototype.isShadowMaterial=!0;var UI=class extends Fo{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new sn(16777215),this.roughness=1,this.metalness=0,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=c_,this.normalScale=new $e(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.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}};UI.prototype.isMeshStandardMaterial=!0,class extends UI{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new $e(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return es(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new sn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new sn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new sn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}.prototype.isMeshPhysicalMaterial=!0,class extends Fo{constructor(t){super(),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=c_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=KI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}}.prototype.isMeshPhongMaterial=!0,class extends Fo{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new sn(16777215),this.map=null,this.gradientMap=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=c_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}.prototype.isMeshToonMaterial=!0,class extends Fo{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=c_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}.prototype.isMeshNormalMaterial=!0,class extends Fo{constructor(t){super(),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=KI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}.prototype.isMeshLambertMaterial=!0,class extends Fo{constructor(t){super(),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=c_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this}}.prototype.isMeshMatcapMaterial=!0,class extends Gd{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}.prototype.isLineDashedMaterial=!0;var Ir={arraySlice:function(n,t,e){return Ir.isTypedArray(n)?new n.constructor(n.subarray(t,void 0!==e?e:n.length)):n.slice(t,e)},convertArray:function(n,t,e){return!n||!e&&n.constructor===t?n:"number"==typeof t.BYTES_PER_ELEMENT?new t(n):Array.prototype.slice.call(n)},isTypedArray:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)},getKeyframeOrder:function(n){let e=n.length,i=new Array(e);for(let r=0;r!==e;++r)i[r]=r;return i.sort(function(r,o){return n[r]-n[o]}),i},sortedArray:function(n,t,e){let i=n.length,r=new n.constructor(i);for(let o=0,a=0;a!==i;++o){let s=e[o]*t;for(let l=0;l!==t;++l)r[a++]=n[s+l]}return r},flattenJSON:function(n,t,e,i){let r=1,o=n[0];for(;void 0!==o&&void 0===o[i];)o=n[r++];if(void 0===o)return;let a=o[i];if(void 0!==a)if(Array.isArray(a))do{a=o[i],void 0!==a&&(t.push(o.time),e.push.apply(e,a)),o=n[r++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[i],void 0!==a&&(t.push(o.time),a.toArray(e,e.length)),o=n[r++]}while(void 0!==o);else do{a=o[i],void 0!==a&&(t.push(o.time),e.push(a)),o=n[r++]}while(void 0!==o)},subclip:function(n,t,e,i,r=30){let o=n.clone();o.name=t;let a=[];for(let l=0;l<o.tracks.length;++l){let c=o.tracks[l],d=c.getValueSize(),u=[],p=[];for(let h=0;h<c.times.length;++h){let m=c.times[h]*r;if(!(m<e||m>=i)){u.push(c.times[h]);for(let _=0;_<d;++_)p.push(c.values[h*d+_])}}0!==u.length&&(c.times=Ir.convertArray(u,c.times.constructor),c.values=Ir.convertArray(p,c.values.constructor),a.push(c))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(n,t=0,e=n,i=30){i<=0&&(i=30);let r=e.tracks.length,o=t/i;for(let a=0;a<r;++a){let s=e.tracks[a],l=s.ValueTypeName;if("bool"===l||"string"===l)continue;let c=n.tracks.find(function(y){return y.name===s.name&&y.ValueTypeName===l});if(void 0===c)continue;let d=0,u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(d=u/3);let p=0,h=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=h/3);let _,m=s.times.length-1;if(o<=s.times[0])_=Ir.arraySlice(s.values,d,u-d);else if(o>=s.times[m]){let y=m*u+d;_=Ir.arraySlice(s.values,y,y+u-d)}else{let y=s.createInterpolant(),x=d,R=u-d;y.evaluate(o),_=Ir.arraySlice(y.resultBuffer,x,R)}"quaternion"===l&&(new oa).fromArray(_).normalize().conjugate().toArray(_);let M=c.times.length;for(let y=0;y<M;++y){let x=y*h+p;if("quaternion"===l)oa.multiplyQuaternionsFlat(c.values,x,_,0,c.values,x);else{let R=h-2*p;for(let I=0;I<R;++I)c.values[x+I]-=_[I]}}}return n.blendMode=2501,n}},Wc=class{constructor(t,e,i,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,i=this._cachedIndex,r=e[i],o=e[i-1];e:{t:{let a;n:{i:if(!(t<r)){for(let s=i+2;;){if(void 0===r){if(t<o)break i;return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,t,o)}if(i===s)break;if(o=r,r=e[++i],t<r)break t}a=e.length;break n}if(t>=o)break e;{let s=e[1];t<s&&(i=2,o=s);for(let l=i-2;;){if(void 0===o)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(i===l)break;if(r=o,o=e[--i-1],t>=o)break t}a=i,i=0}}for(;i<a;){let s=i+a>>>1;t<e[s]?a=s:i=s+1}if(r=e[i],o=e[i-1],void 0===o)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,r)}return this.interpolate_(i,o,t,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,i=this.sampleValues,r=this.valueSize,o=t*r;for(let a=0;a!==r;++a)e[a]=i[o+a];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};Wc.prototype.beforeStart_=Wc.prototype.copySampleValue_,Wc.prototype.afterEnd_=Wc.prototype.copySampleValue_;var AB=class extends Wc{constructor(t,e,i,r){super(t,e,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:j0,endingEnd:j0}}intervalChanged_(t,e,i){let r=this.parameterPositions,o=t-2,a=t+1,s=r[o],l=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case G0:o=t,s=2*e-i;break;case 2402:o=r.length-2,s=e+r[o]-r[o+1];break;default:o=t,s=i}if(void 0===l)switch(this.getSettings_().endingEnd){case G0:a=t,l=2*i-e;break;case 2402:a=1,l=i+r[1]-r[0];break;default:a=t-1,l=e}let c=.5*(i-e),d=this.valueSize;this._weightPrev=c/(e-s),this._weightNext=c/(l-i),this._offsetPrev=o*d,this._offsetNext=a*d}interpolate_(t,e,i,r){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,d=this._offsetPrev,u=this._offsetNext,p=this._weightPrev,h=this._weightNext,m=(i-e)/(r-e),_=m*m,M=_*m,y=-p*M+2*p*_-p*m,x=(1+p)*M+(-1.5-2*p)*_+(-.5+p)*m+1,R=(-1-h)*M+(1.5+h)*_+.5*m,I=h*M-h*_;for(let B=0;B!==s;++B)o[B]=y*a[d+B]+x*a[c+B]+R*a[l+B]+I*a[u+B];return o}},jI=class extends Wc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,d=(i-e)/(r-e),u=1-d;for(let p=0;p!==s;++p)o[p]=a[c+p]*u+a[l+p]*d;return o}},RB=class extends Wc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t){return this.copySampleValue_(t-1)}},cl=class{constructor(t,e,i,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ir.convertArray(e,this.TimeBufferType),this.values=Ir.convertArray(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(t){let i,e=t.constructor;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:Ir.convertArray(t.times,Array),values:Ir.convertArray(t.values,Array)};let r=t.getInterpolation();r!==t.DefaultInterpolation&&(i.interpolation=r)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new RB(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new jI(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new AB(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){let i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){let e=this.times;for(let i=0,r=e.length;i!==r;++i)e[i]+=t}return this}scale(t){if(1!==t){let e=this.times;for(let i=0,r=e.length;i!==r;++i)e[i]*=t}return this}trim(t,e){let i=this.times,r=i.length,o=0,a=r-1;for(;o!==r&&i[o]<t;)++o;for(;-1!==a&&i[a]>e;)--a;if(++a,0!==o||a!==r){o>=a&&(a=Math.max(a,1),o=a-1);let s=this.getValueSize();this.times=Ir.arraySlice(i,o,a),this.values=Ir.arraySlice(this.values,o*s,a*s)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let i=this.times,r=this.values,o=i.length;0===o&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let s=0;s!==o;s++){let l=i[s];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(null!==a&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),t=!1;break}a=l}if(void 0!==r&&Ir.isTypedArray(r))for(let s=0,l=r.length;s!==l;++s){let c=r[s];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,c),t=!1;break}}return t}optimize(){let t=Ir.arraySlice(this.times),e=Ir.arraySlice(this.values),i=this.getValueSize(),r=2302===this.getInterpolation(),o=t.length-1,a=1;for(let s=1;s<o;++s){let l=!1,c=t[s];if(c!==t[s+1]&&(1!==s||c!==t[0]))if(r)l=!0;else{let u=s*i,p=u-i,h=u+i;for(let m=0;m!==i;++m){let _=e[u+m];if(_!==e[p+m]||_!==e[h+m]){l=!0;break}}}if(l){if(s!==a){t[a]=t[s];let u=s*i,p=a*i;for(let h=0;h!==i;++h)e[p+h]=e[u+h]}++a}}if(o>0){t[a]=t[o];for(let s=o*i,l=a*i,c=0;c!==i;++c)e[l+c]=e[s+c];++a}return a!==t.length?(this.times=Ir.arraySlice(t,0,a),this.values=Ir.arraySlice(e,0,a*i)):(this.times=t,this.values=e),this}clone(){let t=Ir.arraySlice(this.times,0),e=Ir.arraySlice(this.values,0),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}};cl.prototype.TimeBufferType=Float32Array,cl.prototype.ValueBufferType=Float32Array,cl.prototype.DefaultInterpolation=2301;var Ap=class extends cl{};Ap.prototype.ValueTypeName="bool",Ap.prototype.ValueBufferType=Array,Ap.prototype.DefaultInterpolation=2300,Ap.prototype.InterpolantFactoryMethodLinear=void 0,Ap.prototype.InterpolantFactoryMethodSmooth=void 0;var GI=class extends cl{};GI.prototype.ValueTypeName="color";var a_=class extends cl{};a_.prototype.ValueTypeName="number";var PB=class extends Wc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(i-e)/(r-e),c=t*s;for(let d=c+s;c!==d;c+=4)oa.slerpFlat(o,0,a,c-s,a,c,l);return o}},Sm=class extends cl{InterpolantFactoryMethodLinear(t){return new PB(this.times,this.values,this.getValueSize(),t)}};Sm.prototype.ValueTypeName="quaternion",Sm.prototype.DefaultInterpolation=2301,Sm.prototype.InterpolantFactoryMethodSmooth=void 0;var Rp=class extends cl{};Rp.prototype.ValueTypeName="string",Rp.prototype.ValueBufferType=Array,Rp.prototype.DefaultInterpolation=2300,Rp.prototype.InterpolantFactoryMethodLinear=void 0,Rp.prototype.InterpolantFactoryMethodSmooth=void 0;var s_=class extends cl{};s_.prototype.ValueTypeName="vector";var WI=class{constructor(t,e=-1,i,r=2500){this.name=t,this.tracks=i,this.duration=e,this.blendMode=r,this.uuid=Yl(),this.duration<0&&this.resetDuration()}static parse(t){let e=[],i=t.tracks,r=1/(t.fps||1);for(let a=0,s=i.length;a!==s;++a)e.push(oNe(i[a]).scale(r));let o=new this(t.name,t.duration,e,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){let e=[],i=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,a=i.length;o!==a;++o)e.push(cl.toJSON(i[o]));return r}static CreateFromMorphTargetSequence(t,e,i,r){let o=e.length,a=[];for(let s=0;s<o;s++){let l=[],c=[];l.push((s+o-1)%o,s,(s+1)%o),c.push(0,1,0);let d=Ir.getKeyframeOrder(l);l=Ir.sortedArray(l,1,d),c=Ir.sortedArray(c,1,d),!r&&0===l[0]&&(l.push(o),c.push(c[0])),a.push(new a_(".morphTargetInfluences["+e[s].name+"]",l,c).scale(1/i))}return new this(t,-1,a)}static findByName(t,e){let i=t;Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations);for(let r=0;r<i.length;r++)if(i[r].name===e)return i[r];return null}static CreateClipsFromMorphTargetSequences(t,e,i){let r={},o=/^([\w-]*?)([\d]+)$/;for(let s=0,l=t.length;s<l;s++){let c=t[s],d=c.name.match(o);if(d&&d.length>1){let u=d[1],p=r[u];p||(r[u]=p=[]),p.push(c)}}let a=[];for(let s in r)a.push(this.CreateFromMorphTargetSequence(s,r[s],e,i));return a}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(u,p,h,m,_){if(0!==h.length){let M=[],y=[];Ir.flattenJSON(h,M,y,m),0!==M.length&&_.push(new u(p,M,y))}},r=[],o=t.name||"default",a=t.fps||30,s=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let u=0;u<c.length;u++){let p=c[u].keys;if(p&&0!==p.length)if(p[0].morphTargets){let m,h={};for(m=0;m<p.length;m++)if(p[m].morphTargets)for(let _=0;_<p[m].morphTargets.length;_++)h[p[m].morphTargets[_]]=-1;for(let _ in h){let M=[],y=[];for(let x=0;x!==p[m].morphTargets.length;++x){let R=p[m];M.push(R.time),y.push(R.morphTarget===_?1:0)}r.push(new a_(".morphTargetInfluence["+_+"]",M,y))}l=h.length*(a||1)}else{let h=".bones["+e[u].name+"]";i(s_,h+".position",p,"pos",r),i(Sm,h+".quaternion",p,"rot",r),i(s_,h+".scale",p,"scl",r)}}return 0===r.length?null:new this(o,l,r,s)}resetDuration(){let e=0;for(let i=0,r=this.tracks.length;i!==r;++i){let o=this.tracks[i];e=Math.max(e,o.times[o.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){let t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}};function oNe(n){if(void 0===n.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return a_;case"vector":case"vector2":case"vector3":case"vector4":return s_;case"color":return GI;case"quaternion":return Sm;case"bool":case"boolean":return Ap;case"string":return Rp}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}(n.type);if(void 0===n.times){let e=[],i=[];Ir.flattenJSON(n.keys,e,i,"value"),n.times=e,n.values=i}return void 0!==t.parse?t.parse(n):new t(n.name,n.times,n.values,n.interpolation)}var l_={enabled:!1,files:{},add:function(n,t){!1!==this.enabled&&(this.files[n]=t)},get:function(n){if(!1!==this.enabled)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}},aNe=new class{constructor(t,e,i){let l,r=this,o=!1,a=0,s=0,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(d){s++,!1===o&&void 0!==r.onStart&&r.onStart(d,a,s),o=!0},this.itemEnd=function(d){a++,void 0!==r.onProgress&&r.onProgress(d,a,s),a===s&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(d){void 0!==r.onError&&r.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,u){return c.push(d,u),this},this.removeHandler=function(d){let u=c.indexOf(d);return-1!==u&&c.splice(u,2),this},this.getHandler=function(d){for(let u=0,p=c.length;u<p;u+=2){let h=c[u],m=c[u+1];if(h.global&&(h.lastIndex=0),h.test(d))return m}return null}}},qc=class{constructor(t){this.manager=void 0!==t?t:aNe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let i=this;return new Promise(function(r,o){i.load(t,r,e,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}},Hd={},OB=class extends qc{constructor(t){super(t)}load(t,e,i,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=l_.get(t);if(void 0!==o)return this.manager.itemStart(t),setTimeout(()=>{e&&e(o),this.manager.itemEnd(t)},0),o;if(void 0!==Hd[t])return void Hd[t].push({onLoad:e,onProgress:i,onError:r});Hd[t]=[],Hd[t].push({onLoad:e,onProgress:i,onError:r});let a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===c.body.getReader)return c;let d=Hd[t],u=c.body.getReader(),p=c.headers.get("Content-Length"),h=p?parseInt(p):0,m=0!==h,_=0,M=new ReadableStream({start(y){!function x(){u.read().then(({done:R,value:I})=>{if(R)y.close();else{_+=I.byteLength;let B=new ProgressEvent("progress",{lengthComputable:m,loaded:_,total:h});for(let ee=0,Q=d.length;ee<Q;ee++){let we=d[ee];we.onProgress&&we.onProgress(B)}y.enqueue(I),x()}})}()}});return new Response(M)}throw Error(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,s));case"json":return c.json();default:if(void 0===s)return c.text();{let u=/charset="?([^;"\s]*)"?/i.exec(s),p=u&&u[1]?u[1].toLowerCase():void 0,h=new TextDecoder(p);return c.arrayBuffer().then(m=>h.decode(m))}}}).then(c=>{l_.add(t,c);let d=Hd[t];delete Hd[t];for(let u=0,p=d.length;u<p;u++){let h=d[u];h.onLoad&&h.onLoad(c)}}).catch(c=>{let d=Hd[t];if(void 0===d)throw this.manager.itemError(t),c;delete Hd[t];for(let u=0,p=d.length;u<p;u++){let h=d[u];h.onError&&h.onError(c)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}},qI=class extends qc{constructor(t){super(t)}load(t,e,i,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=l_.get(t);if(void 0!==a)return o.manager.itemStart(t),setTimeout(function(){e&&e(a),o.manager.itemEnd(t)},0),a;let s=Mx("img");function l(){d(),l_.add(t,this),e&&e(this),o.manager.itemEnd(t)}function c(u){d(),r&&r(u),o.manager.itemError(t),o.manager.itemEnd(t)}function d(){s.removeEventListener("load",l,!1),s.removeEventListener("error",c,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),o.manager.itemStart(t),s.src=t,s}},FB=class extends qc{constructor(t){super(t)}load(t,e,i,r){let o=new $0,a=new qI(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;function l(c){a.load(t[c],function(d){o.images[c]=d,s++,6===s&&(o.needsUpdate=!0,e&&e(o))},void 0,r)}for(let c=0;c<t.length;++c)l(c);return o}},NB=class extends qc{constructor(t){super(t)}load(t,e,i,r){let o=new lo,a=new qI(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(s){o.image=s,o.needsUpdate=!0,void 0!==e&&e(o)},i,r),o}},dl=class extends Ui{constructor(t,e=1){super(),this.type="Light",this.color=new sn(t),this.intensity=e}dispose(){}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}};dl.prototype.isLight=!0,class extends dl{constructor(t,e,i){super(t,i),this.type="HemisphereLight",this.position.copy(Ui.DefaultUp),this.updateMatrix(),this.groundColor=new sn(e)}copy(t){return dl.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}.prototype.isHemisphereLight=!0;var tte=new vn,nte=new K,ite=new K,Ux=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new $e(512,512),this.map=null,this.mapPass=null,this.matrix=new vn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new e_,this._frameExtents=new $e(1,1),this._viewportCount=1,this._viewports=[new Qi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,i=this.matrix;nte.setFromMatrixPosition(t.matrixWorld),e.position.copy(nte),ite.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(ite),e.updateMatrixWorld(),tte.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(tte),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(e.projectionMatrix),i.multiply(e.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){let t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}},XI=class extends Ux{constructor(){super(new ra(50,1,.5,500)),this.focus=1}updateMatrices(t){let e=this.camera,i=2*$3*t.angle*this.focus,r=this.mapSize.width/this.mapSize.height,o=t.distance||e.far;(i!==e.fov||r!==e.aspect||o!==e.far)&&(e.fov=i,e.aspect=r,e.far=o,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}};XI.prototype.isSpotLightShadow=!0,class extends dl{constructor(t,e,i=0,r=Math.PI/3,o=0,a=1){super(t,e),this.type="SpotLight",this.position.copy(Ui.DefaultUp),this.updateMatrix(),this.target=new Ui,this.distance=i,this.angle=r,this.penumbra=o,this.decay=a,this.shadow=new XI}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}.prototype.isSpotLight=!0;var rte=new vn,hx=new K,W3=new K,YI=class extends Ux{constructor(){super(new ra(90,1,.5,500)),this._frameExtents=new $e(4,2),this._viewportCount=6,this._viewports=[new Qi(2,1,1,1),new Qi(0,1,1,1),new Qi(3,1,1,1),new Qi(1,1,1,1),new Qi(3,0,1,1),new Qi(1,0,1,1)],this._cubeDirections=[new K(1,0,0),new K(-1,0,0),new K(0,0,1),new K(0,0,-1),new K(0,1,0),new K(0,-1,0)],this._cubeUps=[new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,0,1),new K(0,0,-1)]}updateMatrices(t,e=0){let i=this.camera,r=this.matrix,o=t.distance||i.far;o!==i.far&&(i.far=o,i.updateProjectionMatrix()),hx.setFromMatrixPosition(t.matrixWorld),i.position.copy(hx),W3.copy(i.position),W3.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(W3),i.updateMatrixWorld(),r.makeTranslation(-hx.x,-hx.y,-hx.z),rte.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rte)}};YI.prototype.isPointLightShadow=!0,class extends dl{constructor(t,e,i=0,r=1){super(t,e),this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new YI}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}.prototype.isPointLight=!0;var QI=class extends Ux{constructor(){super(new xm(-5,5,5,-5,.5,500))}};QI.prototype.isDirectionalLightShadow=!0,class extends dl{constructor(t,e){super(t,e),this.type="DirectionalLight",this.position.copy(Ui.DefaultUp),this.updateMatrix(),this.target=new Ui,this.shadow=new QI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}.prototype.isDirectionalLight=!0,class extends dl{constructor(t,e){super(t,e),this.type="AmbientLight"}}.prototype.isAmbientLight=!0,class extends dl{constructor(t,e,i=10,r=10){super(t,e),this.type="RectAreaLight",this.width=i,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){let e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}.prototype.isRectAreaLight=!0;var ZI=class{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new K)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){let i=t.x,r=t.y,o=t.z,a=this.coefficients;return e.copy(a[0]).multiplyScalar(.282095),e.addScaledVector(a[1],.488603*r),e.addScaledVector(a[2],.488603*o),e.addScaledVector(a[3],.488603*i),e.addScaledVector(a[4],i*r*1.092548),e.addScaledVector(a[5],r*o*1.092548),e.addScaledVector(a[6],.315392*(3*o*o-1)),e.addScaledVector(a[7],i*o*1.092548),e.addScaledVector(a[8],.546274*(i*i-r*r)),e}getIrradianceAt(t,e){let i=t.x,r=t.y,o=t.z,a=this.coefficients;return e.copy(a[0]).multiplyScalar(.886227),e.addScaledVector(a[1],1.023328*r),e.addScaledVector(a[2],1.023328*o),e.addScaledVector(a[3],1.023328*i),e.addScaledVector(a[4],.858086*i*r),e.addScaledVector(a[5],.858086*r*o),e.addScaledVector(a[6],.743125*o*o-.247708),e.addScaledVector(a[7],.858086*i*o),e.addScaledVector(a[8],.429043*(i*i-r*r)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){let i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(t,e+3*r);return this}toArray(t=[],e=0){let i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(t,e+3*r);return t}static getBasisAt(t,e){let i=t.x,r=t.y,o=t.z;e[0]=.282095,e[1]=.488603*r,e[2]=.488603*o,e[3]=.488603*i,e[4]=1.092548*i*r,e[5]=1.092548*r*o,e[6]=.315392*(3*o*o-1),e[7]=1.092548*i*o,e[8]=.546274*(i*i-r*r)}};ZI.prototype.isSphericalHarmonics3=!0;var jx=class extends dl{constructor(t=new ZI,e=1){super(void 0,e),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){let e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}};jx.prototype.isLightProbe=!0;var jB=class{static decodeText(t){if(typeof TextDecoder<"u")return(new TextDecoder).decode(t);let e="";for(let i=0,r=t.length;i<r;i++)e+=String.fromCharCode(t[i]);try{return decodeURIComponent(escape(e))}catch{return e}}static extractUrlBase(t){let e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}};(class extends Gi{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){let t=super.toJSON(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}).prototype.isInstancedBufferGeometry=!0,class extends qc{constructor(t){super(t),typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,i,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=l_.get(t);if(void 0!==a)return o.manager.itemStart(t),setTimeout(function(){e&&e(a),o.manager.itemEnd(t)},0),a;let s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,fetch(t,s).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){l_.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){r&&r(l),o.manager.itemError(t),o.manager.itemEnd(t)}),o.manager.itemStart(t)}}.prototype.isImageBitmapLoader=!0;var bI,qB=class extends qc{constructor(t){super(t)}load(t,e,i,r){let o=this,a=new OB(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(s){try{let l=s.slice(0);(void 0===bI&&(bI=new(window.AudioContext||window.webkitAudioContext)),bI).decodeAudioData(l,function(d){e(d)})}catch(l){r?r(l):console.error(l),o.manager.itemError(t)}},i,r)}};(class extends jx{constructor(t,e,i=1){super(void 0,i);let r=(new sn).set(t),o=(new sn).set(e),a=new K(r.r,r.g,r.b),s=new K(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(s).multiplyScalar(l),this.sh.coefficients[1].copy(a).sub(s).multiplyScalar(c)}}).prototype.isHemisphereLightProbe=!0,class extends jx{constructor(t,e=1){super(void 0,e);let i=(new sn).set(t);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}.prototype.isAmbientLightProbe=!0;var KB=class{constructor(t,e,i){let r,o,a;switch(this.binding=t,this.valueSize=i,e){case"quaternion":r=this._slerp,o=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":r=this._select,o=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*i);break;default:r=this._lerp,o=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=o,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){let i=this.buffer,r=this.valueSize,o=t*r+r,a=this.cumulativeWeight;if(0===a){for(let s=0;s!==r;++s)i[o+s]=i[s];a=e}else a+=e,this._mixBufferRegion(i,o,0,e/a,r);this.cumulativeWeight=a}accumulateAdditive(t){let e=this.buffer,i=this.valueSize,r=i*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,r,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){let e=this.valueSize,i=this.buffer,r=t*e+e,o=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1&&this._mixBufferRegion(i,r,e*this._origIndex,1-o,e),a>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*e,1,e);for(let l=e,c=e+e;l!==c;++l)if(i[l]!==i[l+e]){s.setValue(i,r);break}}saveOriginalState(){let e=this.buffer,i=this.valueSize,r=i*this._origIndex;this.binding.getValue(e,r);for(let o=i,a=r;o!==a;++o)e[o]=e[r+o%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){this.binding.setValue(this.buffer,3*this.valueSize)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i<e;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[e+i]=this.buffer[t+i]}_select(t,e,i,r,o){if(r>=.5)for(let a=0;a!==o;++a)t[e+a]=t[i+a]}_slerp(t,e,i,r){oa.slerpFlat(t,e,t,e,t,i,r)}_slerpAdditive(t,e,i,r,o){let a=this._workIndex*o;oa.multiplyQuaternionsFlat(t,a,t,e,t,i),oa.slerpFlat(t,e,t,e,t,a,r)}_lerp(t,e,i,r,o){let a=1-r;for(let s=0;s!==o;++s){let l=e+s;t[l]=t[l]*a+t[i+s]*r}}_lerpAdditive(t,e,i,r,o){for(let a=0;a!==o;++a){let s=e+a;t[s]=t[s]+t[i+a]*r}}},pV="\\[\\]\\.:\\/",lNe=new RegExp("["+pV+"]","g"),hV="[^"+pV+"]",cNe="[^"+pV.replace("\\.","")+"]",dNe=/((?:WC+[\/:])*)/.source.replace("WC",hV),uNe=/(WCOD+)?/.source.replace("WCOD",cNe),pNe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",hV),hNe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",hV),mNe=new RegExp("^"+dNe+uNe+pNe+hNe+"$"),fNe=["material","materials","bones"],JB=class{constructor(t,e,i){let r=i||br.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}getValue(t,e){this.bind();let r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(t,e)}setValue(t,e){let i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=i.length;r!==o;++r)i[r].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}},br=(()=>{class n{constructor(e,i,r){this.path=i,this.parsedPath=r||n.parseTrackName(i),this.node=n.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,i,r){return e&&e.isAnimationObjectGroup?new n.Composite(e,i,r):new n(e,i,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(lNe,"")}static parseTrackName(e){let i=mNe.exec(e);if(!i)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let r={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==o&&-1!==o){let a=r.nodeName.substring(o+1);-1!==fNe.indexOf(a)&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=a)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,i){if(!i||""===i||"."===i||-1===i||i===e.name||i===e.uuid)return e;if(e.skeleton){let r=e.skeleton.getBoneByName(i);if(void 0!==r)return r}if(e.children){let r=function(a){for(let s=0;s<a.length;s++){let l=a[s];if(l.name===i||l.uuid===i)return l;let c=r(l.children);if(c)return c}return null},o=r(e.children);if(o)return o}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,i){e[i]=this.targetObject[this.propertyName]}_getValue_array(e,i){let r=this.resolvedProperty;for(let o=0,a=r.length;o!==a;++o)e[i++]=r[o]}_getValue_arrayElement(e,i){e[i]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,i){this.resolvedProperty.toArray(e,i)}_setValue_direct(e,i){this.targetObject[this.propertyName]=e[i]}_setValue_direct_setNeedsUpdate(e,i){this.targetObject[this.propertyName]=e[i],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,i){this.targetObject[this.propertyName]=e[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,i){let r=this.resolvedProperty;for(let o=0,a=r.length;o!==a;++o)r[o]=e[i++]}_setValue_array_setNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,a=r.length;o!==a;++o)r[o]=e[i++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,a=r.length;o!==a;++o)r[o]=e[i++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,i){this.resolvedProperty[this.propertyIndex]=e[i]}_setValue_arrayElement_setNeedsUpdate(e,i){this.resolvedProperty[this.propertyIndex]=e[i],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,i){this.resolvedProperty[this.propertyIndex]=e[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,i){this.resolvedProperty.fromArray(e,i)}_setValue_fromArray_setNeedsUpdate(e,i){this.resolvedProperty.fromArray(e,i),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,i){this.resolvedProperty.fromArray(e,i),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,i){this.bind(),this.getValue(e,i)}_setValue_unbound(e,i){this.bind(),this.setValue(e,i)}bind(){let e=this.node,i=this.parsedPath,r=i.objectName,o=i.propertyName,a=i.propertyIndex;if(e||(e=n.findNode(this.rootNode,i.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(r){let d=i.objectIndex;switch(r){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===d){d=u;break}break;default:if(void 0===e[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[r]}if(void 0!==d){if(void 0===e[d])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[d]}}let s=e[o];if(void 0===s)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+i.nodeName+"."+o+" but it wasn't found.",e);let l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(void 0!==a){if("morphTargetInfluences"===o){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[a]&&(a=e.morphTargetDictionary[a])}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=a}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=o;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return n.Composite=JB,n})();br.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},br.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},br.prototype.GetterByBindingType=[br.prototype._getValue_direct,br.prototype._getValue_array,br.prototype._getValue_arrayElement,br.prototype._getValue_toArray],br.prototype.SetterByBindingTypeAndVersioning=[[br.prototype._setValue_direct,br.prototype._setValue_direct_setNeedsUpdate,br.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[br.prototype._setValue_array,br.prototype._setValue_array_setNeedsUpdate,br.prototype._setValue_array_setMatrixWorldNeedsUpdate],[br.prototype._setValue_arrayElement,br.prototype._setValue_arrayElement_setNeedsUpdate,br.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[br.prototype._setValue_fromArray,br.prototype._setValue_fromArray_setNeedsUpdate,br.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],class extends zd{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){let i=t._localRoot||this._root,r=t._clip.tracks,o=r.length,a=t._propertyBindings,s=t._interpolants,l=i.uuid,c=this._bindingsByRootAndName,d=c[l];void 0===d&&(d={},c[l]=d);for(let u=0;u!==o;++u){let p=r[u],h=p.name,m=d[h];if(void 0!==m)++m.referenceCount,a[u]=m;else{if(m=a[u],void 0!==m){null===m._cacheIndex&&(++m.referenceCount,this._addInactiveBinding(m,l,h));continue}m=new KB(br.create(i,h,e&&e._propertyBindings[u].binding.parsedPath),p.ValueTypeName,p.getValueSize()),++m.referenceCount,this._addInactiveBinding(m,l,h),a[u]=m}s[u].resultBuffer=m.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){let i=(t._localRoot||this._root).uuid,r=t._clip.uuid,o=this._actionsByClip[r];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,r,i)}let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==o.useCount++&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==--o.useCount&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){let e=t._cacheIndex;return null!==e&&e<this._nActiveActions}_addInactiveAction(t,e,i){let r=this._actions,o=this._actionsByClip,a=o[e];if(void 0===a)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=a;else{let s=a.knownActions;t._byClipCacheIndex=s.length,s.push(t)}t._cacheIndex=r.length,r.push(t),a.actionByRoot[i]=t}_removeInactiveAction(t){let e=this._actions,i=e[e.length-1],r=t._cacheIndex;i._cacheIndex=r,e[r]=i,e.pop(),t._cacheIndex=null;let o=t._clip.uuid,a=this._actionsByClip,s=a[o],l=s.knownActions,c=l[l.length-1],d=t._byClipCacheIndex;c._byClipCacheIndex=d,l[d]=c,l.pop(),t._byClipCacheIndex=null,delete s.actionByRoot[(t._localRoot||this._root).uuid],0===l.length&&delete a[o],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==--o.referenceCount&&this._removeInactiveBinding(o)}}_lendAction(t){let e=this._actions,i=t._cacheIndex,r=this._nActiveActions++,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_takeBackAction(t){let e=this._actions,i=t._cacheIndex,r=--this._nActiveActions,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_addInactiveBinding(t,e,i){let r=this._bindingsByRootAndName,o=this._bindings,a=r[e];void 0===a&&(a={},r[e]=a),a[i]=t,t._cacheIndex=o.length,o.push(t)}_removeInactiveBinding(t){let e=this._bindings,i=t.binding,r=i.rootNode.uuid,o=i.path,a=this._bindingsByRootAndName,s=a[r],l=e[e.length-1],c=t._cacheIndex;l._cacheIndex=c,e[c]=l,e.pop(),delete s[o],0===Object.keys(s).length&&delete a[r]}_lendBinding(t){let e=this._bindings,i=t._cacheIndex,r=this._nActiveBindings++,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_takeBackBinding(t){let e=this._bindings,i=t._cacheIndex,r=--this._nActiveBindings,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_lendControlInterpolant(){let t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return void 0===i&&(i=new jI(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i}_takeBackControlInterpolant(t){let e=this._controlInterpolants,i=t.__cacheIndex,r=--this._nActiveControlInterpolants,o=e[r];t.__cacheIndex=r,e[r]=t,o.__cacheIndex=i,e[i]=o}clipAction(t,e,i){let r=e||this._root,o=r.uuid,a="string"==typeof t?WI.findByName(r,t):t,s=null!==a?a.uuid:t,l=this._actionsByClip[s],c=null;if(void 0===i&&(i=null!==a?a.blendMode:2500),void 0!==l){let u=l.actionByRoot[o];if(void 0!==u&&u.blendMode===i)return u;c=l.knownActions[0],null===a&&(a=c._clip)}if(null===a)return null;let d=new class{constructor(t,e,i=null,r=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=i,this.blendMode=r;let o=e.tracks,a=o.length,s=new Array(a),l={endingStart:j0,endingEnd:j0};for(let c=0;c!==a;++c){let d=o[c].createInterpolant(null);s[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){let r=this._clip.duration,o=t._clip.duration,s=r/o;t.warp(1,o/r,e),this.warp(s,1,e)}return this}crossFadeTo(t,e,i){return t.crossFadeFrom(this,e,i)}stopFading(){let t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,i){let r=this._mixer,o=r.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);let l=s.parameterPositions,c=s.sampleValues;return l[0]=o,l[1]=o+i,c[0]=t/a,c[1]=e/a,this}stopWarping(){let t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,i,r){if(!this.enabled)return void this._updateWeight(t);let o=this._startTime;if(null!==o){let l=(t-o)*i;if(l<0||0===i)return;this._startTime=null,e=i*l}e*=this._updateTimeScale(t);let a=this._updateTime(e),s=this._updateWeight(t);if(s>0){let l=this._interpolants,c=this._propertyBindings;if(2501===this.blendMode)for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulateAdditive(s);else for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulate(r,s)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;let i=this._weightInterpolant;if(null!==i){let r=i.evaluate(t)[0];e*=r,t>i.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;let i=this._timeScaleInterpolant;null!==i&&(e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){let e=this._clip.duration,i=this.loop,r=this.time+t,o=this._loopCount,a=2202===i;if(0===t)return-1===o?r:a&&1==(1&o)?e-r:r;if(2200===i){-1===o&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=e)r=e;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===o&&(t>=0?(o=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=e||r<0){let s=Math.floor(r/e);r-=e*s,o+=Math.abs(s);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=t>0?e:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===l){let c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=r;if(a&&1==(1&o))return e-r}return r}_setEndings(t,e,i){let r=this._interpolantSettings;i?(r.endingStart=G0,r.endingEnd=G0):(r.endingStart=t?this.zeroSlopeAtStart?G0:j0:2402,r.endingEnd=e?this.zeroSlopeAtEnd?G0:j0:2402)}_scheduleFading(t,e,i){let r=this._mixer,o=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,l=a.sampleValues;return s[0]=o,l[0]=e,s[1]=o+t,l[1]=i,this}}(this,a,e,i);return this._bindAction(d,c),this._addInactiveAction(d,s,o),d}existingAction(t,e){let i=e||this._root,r=i.uuid,o="string"==typeof t?WI.findByName(i,t):t,s=this._actionsByClip[o?o.uuid:t];return void 0!==s&&s.actionByRoot[r]||null}stopAllAction(){let t=this._actions;for(let i=this._nActiveActions-1;i>=0;--i)t[i].stop();return this}update(t){let e=this._actions,i=this._nActiveActions,r=this.time+=t*=this.timeScale,o=Math.sign(t),a=this._accuIndex^=1;for(let c=0;c!==i;++c)e[c]._update(r,t,o,a);let s=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)s[c].apply(a);return this}setTime(t){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){let e=this._actions,i=t.uuid,r=this._actionsByClip,o=r[i];if(void 0!==o){let a=o.knownActions;for(let s=0,l=a.length;s!==l;++s){let c=a[s];this._deactivateAction(c);let d=c._cacheIndex,u=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,u._cacheIndex=d,e[d]=u,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(t){let e=t.uuid,i=this._actionsByClip;for(let a in i){let l=i[a].actionByRoot[e];void 0!==l&&(this._deactivateAction(l),this._removeInactiveAction(l))}let o=this._bindingsByRootAndName[e];if(void 0!==o)for(let a in o){let s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}}uncacheAction(t,e){let i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var Gx=class{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new Gx(void 0===this.value.clone?this.value:this.value.clone())}};(class extends Cm{constructor(t,e,i=1){super(t,e),this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){let e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){let e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}).prototype.isInstancedInterleavedBuffer=!0;var ote=new $e,Em=class{constructor(t=new $e(1/0,1/0),e=new $e(-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let i=ote.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return ote.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};Em.prototype.isBox2=!0;var bp=new K,yI=new vn,q3=new vn;function Ate(n){let t=[];n&&n.isBone&&t.push(n);for(let e=0;e<n.children.length;e++)t.push.apply(t,Ate(n.children[e]));return t}var gNe=new Float32Array(1);function mV(n,t,e){if(1===e)return new sn(t);let i=qh(t);if(!i)throw new Error(`d3 failed to recognize the color: ${t}`);return new sn(dL(i,n)(1-e))}new Int32Array(gNe.buffer),ns.create=function(n,t){return console.log("THREE.Curve.create() has been deprecated"),n.prototype=Object.create(ns.prototype),n.prototype.constructor=n,n.prototype.getPoint=t,n},Bx.prototype.fromPoints=function(n){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(n)},class extends Ox{constructor(t=10,e=10,i=4473924,r=8947848){i=new sn(i),r=new sn(r);let o=e/2,a=t/e,s=t/2,l=[],c=[];for(let p=0,h=0,m=-s;p<=e;p++,m+=a){l.push(-s,0,m,s,0,m),l.push(m,0,-s,m,0,s);let _=p===o?i:r;_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3}let d=new Gi;d.setAttribute("position",new Nr(l,3)),d.setAttribute("color",new Nr(c,3)),super(d,new Gd({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends Ox{constructor(t){let e=Ate(t),i=new Gi,r=[],o=[],a=new sn(0,0,1),s=new sn(0,1,0);for(let c=0;c<e.length;c++){let d=e[c];d.parent&&d.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),o.push(a.r,a.g,a.b),o.push(s.r,s.g,s.b))}i.setAttribute("position",new Nr(r,3)),i.setAttribute("color",new Nr(o,3)),super(i,new Gd({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){let e=this.bones,i=this.geometry,r=i.getAttribute("position");q3.copy(this.root.matrixWorld).invert();for(let o=0,a=0;o<e.length;o++){let s=e[o];s.parent&&s.parent.isBone&&(yI.multiplyMatrices(q3,s.matrixWorld),bp.setFromMatrixPosition(yI),r.setXYZ(a,bp.x,bp.y,bp.z),yI.multiplyMatrices(q3,s.parent.matrixWorld),bp.setFromMatrixPosition(yI),r.setXYZ(a+1,bp.x,bp.y,bp.z),a+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},qc.prototype.extractUrlBase=function(n){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),jB.extractUrlBase(n)},qc.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Em.prototype.center=function(n){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(n)},Em.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Em.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Em.prototype.size=function(n){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(n)},Ts.prototype.center=function(n){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(n)},Ts.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Ts.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Ts.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},Ts.prototype.size=function(n){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(n)},Sp.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},e_.prototype.setFromMatrix=function(n){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(n)},yo.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},yo.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},yo.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},yo.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},yo.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},yo.prototype.getInverse=function(n){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},vn.prototype.extractPosition=function(n){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(n)},vn.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},vn.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new K).setFromMatrixColumn(this,3)},vn.prototype.setRotationFromQuaternion=function(n){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(n)},vn.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},vn.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},vn.prototype.multiplyVector4=function(n){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},vn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},vn.prototype.rotateAxis=function(n){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),n.transformDirection(this)},vn.prototype.crossVector=function(n){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},vn.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},vn.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},vn.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},vn.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},vn.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},vn.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},vn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},vn.prototype.makeFrustum=function(n,t,e,i,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(n,t,i,e,r,o)},vn.prototype.getInverse=function(n){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},Xl.prototype.isIntersectionLine=function(n){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(n)},oa.prototype.multiplyVector3=function(n){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),n.applyQuaternion(this)},oa.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Ep.prototype.isIntersectionBox=function(n){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Ep.prototype.isIntersectionPlane=function(n){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(n)},Ep.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},Vr.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Vr.prototype.barycoordFromPoint=function(n,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(n,t)},Vr.prototype.midpoint=function(n){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(n)},Vr.prototypenormal=function(n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(n)},Vr.prototype.plane=function(n){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(n)},Vr.barycoordFromPoint=function(n,t,e,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Vr.getBarycoord(n,t,e,i,r)},Vr.normal=function(n,t,e,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Vr.getNormal(n,t,e,i)},Wd.prototype.extractAllPoints=function(n){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(n)},Wd.prototype.extrude=function(n){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ip(this,n)},Wd.prototype.makeGeometry=function(n){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new wm(this,n)},$e.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},$e.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},$e.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},K.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},K.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},K.prototype.getPositionFromMatrix=function(n){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(n)},K.prototype.getScaleFromMatrix=function(n){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(n)},K.prototype.getColumnFromMatrix=function(n,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,n)},K.prototype.applyProjection=function(n){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(n)},K.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},K.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},K.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Qi.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},Qi.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Ui.prototype.getChildByName=function(n){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(n)},Ui.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Ui.prototype.translate=function(n,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,n)},Ui.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Ui.prototype.applyMatrix=function(n){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(Ui.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(n){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=n}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),so.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(so.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),NI.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},ra.prototype.setLens=function(n,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(n)},Object.defineProperties(dl.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(n){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=n}},shadowCameraLeft:{set:function(n){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=n}},shadowCameraRight:{set:function(n){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=n}},shadowCameraTop:{set:function(n){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=n}},shadowCameraBottom:{set:function(n){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=n}},shadowCameraNear:{set:function(n){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=n}},shadowCameraFar:{set:function(n){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=n}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(n){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=n}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(n){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=n}},shadowMapHeight:{set:function(n){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=n}}}),Object.defineProperties(Ar.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===SI},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(SI)}}}),Ar.prototype.setDynamic=function(n){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?SI:Cx),this},Ar.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Ar.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Gi.prototype.addIndex=function(n){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(n)},Gi.prototype.addAttribute=function(n,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===n?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(n,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(n,new Ar(arguments[1],arguments[2])))},Gi.prototype.addDrawCall=function(n,t,e){void 0!==e&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(n,t)},Gi.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Gi.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Gi.prototype.removeAttribute=function(n){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(n)},Gi.prototype.applyMatrix=function(n){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(Gi.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Cm.prototype.setDynamic=function(n){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?SI:Cx),this},Cm.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Ip.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Ip.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Ip.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},n_.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Gx.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Fo.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new sn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(n){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(n){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=n}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(jd.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(n){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=n}}}),Wi.prototype.clearTarget=function(n,t,e,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(n),this.clear(t,e,i)},Wi.prototype.animate=function(n){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(n)},Wi.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Wi.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Wi.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Wi.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Wi.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Wi.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Wi.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Wi.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Wi.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Wi.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Wi.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Wi.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Wi.prototype.enableScissorTest=function(n){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(n)},Wi.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Wi.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Wi.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Wi.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Wi.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Wi.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Wi.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Wi.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Wi.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Wi.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Wi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(n){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=n}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(n){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=n}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(n){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===n?Dr:wp}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(wte.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(ts.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(n){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=n}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(n){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=n}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(n){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=n}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(n){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=n}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(n){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=n}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(n){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=n}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(n){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=n}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(n){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=n}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(n){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=n}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(n){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=n}}}),class extends Ui{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;let e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}.prototype.load=function(n){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return(new qB).load(n,function(i){t.setBuffer(i)}),this},Ex.prototype.updateCubeMap=function(n,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(n,t)},Ex.prototype.clear=function(n,t,e,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(n,t,e,i)},Ud.crossOrigin=void 0,Ud.loadTexture=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new NB;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},Ud.loadTextureCube=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new FB;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},Ud.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Ud.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:sV}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=sV);var Ql=(()=>(function(n){n[n.CIRCLE=0]="CIRCLE",n[n.LINE=1]="LINE",n[n.TRIANGLE=2]="TRIANGLE",n[n.TRAPEZOID=3]="TRAPEZOID"}(Ql||(Ql={})),Ql))();function Pte(n,t){let e=t.length/2,i=n.attributes.position;(!i||i.count!==3*e)&&(i=new Ar(new Float32Array(3*e),3),n.setAttribute("position",i));let r=i.array;for(let o=0;o<e;o++)r[3*o]=t[2*o],r[3*o+1]=t[2*o+1];i.needsUpdate=!0,n.setDrawRange(0,3*e),n.computeBoundingSphere()}function kte(n,t,e){let i=Math.max(t.length/2-1,0),r=2*i*3,o=3*r,a=n.attributes.position;(!a||a.count!==r)&&(a=new Ar(new Float32Array(o),3),n.setAttribute("position",a));let s=a.array;for(let l=0;l<i;l++){let[c,d,u,p]=[t[2*l],t[2*l+1],t[2*l+2],t[2*l+3]],h=new $e(c,d),m=new $e(u,p),_=new $e(u-c,p-d),M=new $e(-_.y,_.x).setLength(e/2),y=h.clone().add(M),x=h.clone().sub(M),R=m.clone().add(M),I=m.clone().sub(M),B=[y.x,y.y,0,x.x,x.y,0,R.x,R.y,0,R.x,R.y,0,x.x,x.y,0,I.x,I.y,0];s.set(B,l*B.length)}a.needsUpdate=!0,n.setDrawRange(0,o),n.computeBoundingSphere()}function nA(n,t,e,i){let{visible:r,color:o,opacity:a}=i;if(Array.isArray(t.material))throw new Error("Invariant error: only expect one material on an object");let s=t.material;if(s.visible!==r&&(s.visible=r,s.needsUpdate=!0),!r)return!1;let l=mV(n,o,a??1),c=e(t.geometry);return t.geometry!==c&&(t.geometry=c),s.color.equals(l)||(s.color.set(l),s.needsUpdate=!0),!0}var rA=class{constructor(t){this.rawSeriesData=[],this.series=[],this.paintDirty=!0,this.renderCache=new class{constructor(){this.prevFrameCache=new Map,this.currFrameCache=new Map}getFromPreviousFrame(t){return this.prevFrameCache.get(t)??null}setToCurrentFrame(t,e){this.currFrameCache.set(t,e)}finalizeFrameAndGetRemoved(){let t=[];for(let[e,i]of this.prevFrameCache.entries())this.currFrameCache.has(e)||t.push(i);return this.prevFrameCache=this.currFrameCache,this.currFrameCache=new Map,t}},this.coordinateIdentifier=null,this.layout={x:0,width:1,y:0,height:1},this.getMetadataMapImpl=t.getMetadataMap,this.coordinator=t.coordinator,this.renderer=t.renderer,this.paintBrush=new class{constructor(t,e){this.renderCache=t,this.renderer=e}setLine(t,e,i){let r=this.renderer.createOrUpdateLineObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setTriangle(t,e,i){let r=this.renderer.createOrUpdateTriangleObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setCircle(t,e,i){let r=this.renderer.createOrUpdateCircleObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setTrapezoid(t,e,i,r){let o=this.renderer.createOrUpdateTrapezoidObject(this.renderCache.getFromPreviousFrame(t),e,i,r);o&&this.renderCache.setToCurrentFrame(t,o)}}(this.renderCache,this.renderer)}setLayoutRect(t){(this.layout.x!==t.x||this.layout.width!==t.width||this.layout.y!==t.y||this.layout.height!==t.height)&&(this.paintDirty=!0),this.layout=t}getLayoutRect(){return this.layout}getMetadataMap(){return this.getMetadataMapImpl()}markAsPaintDirty(){this.paintDirty=!0}render(){if(this.transformCoordinatesIfStale(),this.paintDirty){this.redraw();for(let t of this.renderCache.finalizeFrameAndGetRemoved())this.renderer.destroyObject(t);this.paintDirty=!1}}isCoordinateUpdated(){return this.coordinator.getUpdateIdentifier()!==this.coordinateIdentifier}clearCoordinateIdentifier(){this.coordinateIdentifier=null}setData(t){this.clearCoordinateIdentifier(),this.rawSeriesData=t}transformCoordinatesIfStale(){if(!this.isCoordinateUpdated())return;let t=this.getLayoutRect();this.series=new Array(this.rawSeriesData.length);for(let e=0;e<this.rawSeriesData.length;e++){let i=this.rawSeriesData[e];this.series[e]={id:i.id,polyline:new Float32Array(2*i.points.length)};for(let r=0;r<i.points.length;r++){let[o,a]=this.coordinator.transformDataToUiCoord(t,[i.points[r].x,i.points[r].y]);this.series[e].polyline[2*r]=o,this.series[e].polyline[2*r+1]=a}}this.coordinateIdentifier=this.coordinator.getUpdateIdentifier(),this.markAsPaintDirty()}},u_=(()=>(function(n){n[n.NUMBER=0]="NUMBER",n[n.NAN=1]="NAN"}(u_||(u_={})),u_))(),oA=class extends rA{recordPartition(t,e,i){return t?{type:u_.NUMBER,polyline:e}:{type:u_.NAN,polyline:e.map((r,o)=>isNaN(r)?o%2==0?i.x:i.y:r)}}partitionPolyline(t){let e=[],i=0,r=!1,o=this.coordinator.transformDataToUiCoord(this.getLayoutRect(),[0,0]),a={x:o[0],y:o[1]},s=null;for(let l=0;l<t.length;l+=2){let c=t[l],d=t[l+1],u=isNaN(c)||isNaN(d);u!==r&&i!==l&&(e.push(this.recordPartition(!r,t.slice(i,l),null===s?{x:c,y:d}:s)),i=l),u||(s={x:c,y:d}),r=u}return i!==t.length-1&&e.push(this.recordPartition(!r,t.slice(i,t.length),s??a)),e}redraw(){for(let t of this.series){let i=this.getMetadataMap()[t.id];if(!i)continue;if(t.polyline.length%2!=0)throw new Error(`Cannot have odd length-ed polyline: ${t.polyline.length}`);let r=this.partitionPolyline(t.polyline);for(let[o,{type:a,polyline:s}]of r.entries())if(a===u_.NUMBER)2===s.length?this.paintBrush.setCircle(JSON.stringify(["circle",t.id,o]),{x:s[0],y:s[1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,radius:4}):this.paintBrush.setLine(JSON.stringify(["line",t.id,o]),s,{color:i.color,visible:i.visible,opacity:i.opacity??1,width:2});else if(!i.aux)for(let l=0;l<s.length;l+=2)this.paintBrush.setTriangle(JSON.stringify(["NaN",t.id,s[l],s[l+1]]),{x:s[l],y:s[l+1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,size:12})}}},aA=class extends C0{constructor(){super(...arguments),this.camera=new xm(0,1e3,1e3,0,0,100)}isYAxisPointedDown(){return!1}setDomContainerRect(t){super.setDomContainerRect(t),this.camera.left=t.x,this.camera.right=t.x+t.width,this.camera.top=t.y+t.height,this.camera.bottom=t.y,this.camera.updateProjectionMatrix()}getCamera(){return this.camera}},sA=class{constructor(t){switch(this.metadataMap={},this.shouldRepaint=!1,this.callbacks=t.callbacks,t.type){case Yi.SVG:this.coordinator=new C0,this.renderer=new class{constructor(t){this.svg=t}flush(){}onResize(t){}destroyObject(t){this.svg.removeChild(t.dom)}setUseDarkMode(t){}createPathDString(t){if(!t.length)return"";let e=new Array(t.length/2);e[0]=`M${t[0]},${t[1]}`;for(let i=1;i<t.length/2;i++)e[i]=`L${t[2*i]},${t[2*i+1]}`;return e.join("")}createOrUpdateLineObject(t,e,i){let r=zD(t?.dom,()=>{let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.style.fill="none";let a=this.createPathDString(e);return o.setAttribute("d",a),this.svg.appendChild(o),o},o=>{if(!t?.data||!jl_arePolylinesEqual(e,t?.data)){let a=this.createPathDString(e);o.setAttribute("d",a)}return o},i);return null===r?null:(r.style.strokeWidth=String(i.width),{dom:r,data:e})}createOrUpdateTriangleObject(t,e,i){let{size:r,color:o}=i,a=r*Math.sqrt(3)/2,s=new Float32Array([e.x-r/2,e.y+a/3,e.x+r/2,e.y+a/3,e.x,e.y-2*a/3]),l=zD(t?.dom,()=>{let c=document.createElementNS("http://www.w3.org/2000/svg","path");c.classList.add("triangle"),c.style.fill="none";let d=this.createPathDString(s);return c.setAttribute("d",d+"Z"),this.svg.appendChild(c),c},c=>{let d=this.createPathDString(s);return c.setAttribute("d",d+"Z"),c},i);return null===l?null:(l.style.fill=o,{dom:l,data:s})}createOrUpdateCircleObject(t,e,i){let{color:r,radius:o}=i,a=zD(t?.dom,()=>{let s=document.createElementNS("http://www.w3.org/2000/svg","circle");return s.style.fill=r,s.setAttribute("cx",String(e.x)),s.setAttribute("cy",String(e.y)),s.setAttribute("r",String(o)),this.svg.appendChild(s),s},s=>(s.style.fill=r,s.setAttribute("cx",String(e.x)),s.setAttribute("cy",String(e.y)),s.setAttribute("r",String(o)),s),i);return null===a?null:{dom:a,data:e}}createOrUpdateTrapezoidObject(t,e,i,r){if(e.y!==i.y)throw new RangeError("Input error: start.y != end.y.");let{altitude:o,color:a}=r,s=2/Math.sqrt(3)*o,l=new Float32Array([e.x-s/2,e.y+o/2,e.x,e.y-o/2,i.x,i.y-o/2,i.x+s/2,i.y+o/2]),c=zD(t?.dom,()=>{let d=document.createElementNS("http://www.w3.org/2000/svg","path");d.classList.add("trapezoid"),d.style.fill="none";let u=this.createPathDString(l);return d.setAttribute("d",u+"Z"),this.svg.appendChild(d),d},d=>{let u=this.createPathDString(l);return d.setAttribute("d",u+"Z"),d},r);return null===c?null:(c.style.fill=a,{dom:c,data:l})}dispose(){}}(t.container);break;case Yi.WEBGL:{let e=new aA;this.coordinator=e,this.renderer=new class{constructor(t,e,i,r){this.coordinator=e,this.scene=new n_,this.backgroundColor="#fff",jl_isWebGl2OffscreenCanvasSupported()&&t instanceof OffscreenCanvas&&(t.style=t.style||{}),r&&t.addEventListener("webglcontextlost",r),this.renderer=new Wi({canvas:t,antialias:!0,alpha:!0}),this.renderer.setPixelRatio(i)}onResize(t){this.renderer.setSize(t.width,t.height)}destroyObject(t){let e=t.obj3d;if(this.scene.remove(e),e instanceof so){e.geometry.dispose();let i=Array.isArray(e.material)?e.material:[e.material];for(let r of i)r.dispose()}}setUseDarkMode(t){this.backgroundColor=t?"#303030":"#fff"}createOrUpdateLineObject(t,e,i){if(!t&&!i.visible)return null;let{visible:r,width:o}=i;if(!t){let d=mV(this.backgroundColor,i.color,i.opacity??1),u=new Gi,p=new Gd({color:d}),h=new so(u,p);return p.visible=r,kte(u,e,o),this.scene.add(h),{type:Ql.LINE,data:e,obj3d:h,width:o}}let{data:a,obj3d:s,width:l}=t;return nA(this.backgroundColor,s,d=>((o!==l||!a||!jl_arePolylinesEqual(a,e))&&kte(d,e,o),d),i)?{type:Ql.LINE,data:e,obj3d:s,width:o}:t}createMesh(t,e){if(!e.visible)return null;let{visible:i,color:r,opacity:o}=e,a=mV(this.backgroundColor,r,o??1),s=new vm({color:a,visible:i});return new so(t,s)}createOrUpdateTriangleObject(t,e,i){let{size:r}=i,o=r*Math.sqrt(3)/2,a=new Float32Array([e.x-r/2,e.y-o/3,e.x+r/2,e.y-o/3,e.x,e.y+2*o/3]);if(!t){let l=new Gi;Pte(l,a);let c=this.createMesh(l,i);return null===c?null:(this.scene.add(c),{type:Ql.TRIANGLE,data:e,obj3d:c})}return nA(this.backgroundColor,t.obj3d,l=>(Pte(l,a),l),i)?{type:Ql.TRIANGLE,data:e,obj3d:t.obj3d}:t}createOrUpdateCircleObject(t,e,i){let{radius:r}=i,o=new i_(i.radius);if(!t){let s=this.createMesh(o,i);return null===s?null:(s.position.set(e.x,e.y,0),this.scene.add(s),{type:Ql.CIRCLE,data:{loc:e,radius:r},obj3d:s})}return nA(this.backgroundColor,t.obj3d,()=>o,i)?(t.obj3d.position.set(e.x,e.y,0),{type:Ql.CIRCLE,data:{loc:e,radius:r},obj3d:t.obj3d}):t}createOrUpdateTrapezoidObject(t,e,i,r){if(e.y!==i.y)throw new RangeError("Input error: start.y != end.y.");let{altitude:o}=r,a=2/Math.sqrt(3)*o,s=new Wd([new $e(e.x-a/2,e.y-o/2),new $e(e.x,e.y+o/2),new $e(i.x,i.y+o/2),new $e(i.x+a/2,i.y-o/2)]);s.autoClose=!0;let l=new wm(s);if(!t){let d=this.createMesh(l,r);return null===d?null:(this.scene.add(d),{type:Ql.TRAPEZOID,data:[e,i],obj3d:d})}return nA(this.backgroundColor,t.obj3d,()=>l,r)?{type:Ql.TRAPEZOID,data:[e,i],obj3d:t.obj3d}:t}flush(){this.renderer.render(this.scene,this.coordinator.getCamera())}dispose(){this.renderer.dispose()}}(t.container,e,t.devicePixelRatio,t.callbacks.onContextLost);break}}this.renderer.setUseDarkMode(t.useDarkMode),this.seriesLineView=new oA({renderer:this.renderer,coordinator:this.coordinator,getMetadataMap:()=>this.metadataMap}),this.resize(t.domDimension)}dispose(){}setXScaleType(t){this.coordinator.setXScale(Ul(t)),this.scheduleRepaint()}setYScaleType(t){this.coordinator.setYScale(Ul(t)),this.scheduleRepaint()}resize(t){this.coordinator.setDomContainerRect({x:0,y:0,...t}),this.renderer.onResize({x:0,y:0,...t}),this.seriesLineView.setLayoutRect({...t,x:0,y:0}),this.scheduleRepaint()}setMetadata(t){let e=!1;Object.entries(t).forEach(([i,r])=>{let o=this.metadataMap[i];(!o||r.color!==o.color||r.visible!==o.visible||r.opacity!==o.opacity)&&(e=!0),this.metadataMap[i]=r}),e&&this.seriesLineView.markAsPaintDirty(),this.scheduleRepaint()}setViewBox(t){this.coordinator.setViewBoxRect({x:t.x[0],width:t.x[1]-t.x[0],y:t.y[0],height:t.y[1]-t.y[0]}),this.scheduleRepaint()}setData(t){this.seriesLineView.setData(t),this.scheduleRepaint()}setUseDarkMode(t){this.renderer.setUseDarkMode(t),this.seriesLineView.markAsPaintDirty(),this.scheduleRepaint()}scheduleRepaint(){this.shouldRepaint||(this.shouldRepaint=!0,(n=>{self.requestAnimationFrame(n)})(()=>{this.repaint(),this.shouldRepaint=!1}))}repaint(){this.seriesLineView.render(),this.renderer.flush(),this.callbacks.onDrawEnd()}},Ds=(()=>(function(n){n[n.SERIES_DATA_UPDATED=0]="SERIES_DATA_UPDATED",n[n.SERIES_METADATA_CHANGED=1]="SERIES_METADATA_CHANGED",n[n.SCALE_UPDATED=2]="SCALE_UPDATED",n[n.VIEW_BOX_UPDATED=3]="VIEW_BOX_UPDATED",n[n.INIT=4]="INIT",n[n.DOM_RESIZED=5]="DOM_RESIZED",n[n.DARK_MODE_UPDATED=6]="DARK_MODE_UPDATED",n[n.DISPOSED=7]="DISPOSED"}(Ds||(Ds={})),Ds))(),p_=(()=>(function(n){n[n.ON_REDRAW_END=0]="ON_REDRAW_END",n[n.ON_CONTEXT_LOST=1]="ON_CONTEXT_LOST"}(p_||(p_={})),p_))();function Fte(n){if(n.includes("/"))throw new RangeError("Worker factory only allows file name and no resource path.");return new Worker(n)}var Tm=class{constructor(t){if(this.callbacks=t.callbacks,t.type!==Yi.WEBGL)throw new RangeError(`Cannot use non WEBGL renderer for the offscreen line chart. Received ${Yi[t.type]} `);let e=new MessageChannel;e.port1.onmessage=o=>{this.onMessageFromWorker(o.data)},this.txMessagePort=e.port1;let i=t.container.transferControlToOffscreen();this.workerInstance=Tm.workerPool.getNext();let r={type:Ds.INIT,canvas:i,devicePixelRatio:window.devicePixelRatio,dim:t.domDimension,rendererType:t.type,useDarkMode:t.useDarkMode};this.workerInstance.postMessage(r,[i,e.port2])}dispose(){this.sendMessage({type:Ds.DISPOSED}),this.workerInstance.free(),this.txMessagePort.close()}setXScaleType(t){this.sendMessage({type:Ds.SCALE_UPDATED,axis:"x",scaleType:t})}setYScaleType(t){this.sendMessage({type:Ds.SCALE_UPDATED,axis:"y",scaleType:t})}resize(t){this.sendMessage({type:Ds.DOM_RESIZED,dim:t})}setMetadata(t){this.sendMessage({type:Ds.SERIES_METADATA_CHANGED,metadata:t})}setViewBox(t){this.sendMessage({type:Ds.VIEW_BOX_UPDATED,extent:t})}setData(t){let e=function(n){let t=n.reduce((o,a)=>o+a.points.length,0),e=0,i=new Float64Array(2*t),r=[];for(let o of n){r.push({id:o.id,length:o.points.length});for(let a=0;a<o.points.length;a++)i[e++]=o.points[a].x,i[e++]=o.points[a].y}return{idsAndLengths:r,flattenedSeries:i.buffer}}(t);this.sendMessage({type:Ds.SERIES_DATA_UPDATED,compactDataSeries:e},[e.flattenedSeries])}setUseDarkMode(t){this.sendMessage({type:Ds.DARK_MODE_UPDATED,useDarkMode:t})}sendMessage(t,e){e?this.txMessagePort.postMessage(t,e):this.txMessagePort.postMessage(t)}onMessageFromWorker(t){switch(t.type){case p_.ON_REDRAW_END:this.callbacks.onDrawEnd();break;case p_.ON_CONTEXT_LOST:this.callbacks.onContextLost()}}};function Xc(n,t){return"x"===t?[0,n.width]:[n.height,0]}function Yx(n,t){let e=Math.floor(n/50);return Math.min(e,t)}function cA(n,t,e,i){return{major:[],minor:n.ticks(i,e).map(o=>({value:o,tickFormattedString:t.formatTick(o)}))}}Tm.workerPool=new class{constructor(t,e=10,i=Fte){this.workerResourcePath=t,this.maxPoolSize=e,this.workerFactory=i,this.workers=[]}getNext(){let t;if(this.workers.every(({activeCount:i})=>i>0)&&this.workers.length<this.maxPoolSize){let i=this.workerFactory(this.workerResourcePath);t={activeCount:0,postMessage:(r,o)=>{i.postMessage(r,o)},free:()=>{t.activeCount=Math.max(t.activeCount-1,0)}},this.workers.push(t)}else{let i=this.workers.map(({activeCount:o})=>o),r=i.indexOf(Math.min(...i));t=this.workers[r]}return t.activeCount++,t}}("chart_worker.js?_file_hash=2c1e71c5");var gV=document.createElement("canvas").getContext("2d");function Vte(n){for(let t of n)if(String(t).includes("e"))return!0;return!1}var Qx={getStandardTicks:cA,getTicksForTemporalScale:function(n,t,e,i){let[r,o]=i,a=n.ticks(i,2);if(o-r>=864e5||a.length>2)return cA(n,t,e,i);let s=n.ticks(i,e);return{major:a.map(l=>({start:l,tickFormattedString:t.formatShort(l)})),minor:s.map(l=>({value:l,tickFormattedString:t.formatTick(l)}))}},getTicksForLinearScale:function(n,t,e,i){let[r,o]=i,a=Math.abs(o-r);if(a>.001)return cA(n,t,e,i);let s=n.ticks([r,o],e),l=n.ticks([r,o],2);if(Vte(s)||Vte(l))return cA(n,t,e,i);let c=[],d=function(n){let t=n.toExponential().split("e-",2);return 2===t.length?Number(t[1])-1:0}(a);a<1&&l.every(h=>{let m=Math.abs(h);return m>=0&&m<1})&&(d+=1);let u=new Map;for(let h of l){let[m,_=""]=String(h).split(".",2),M=Number(m+"."+_.slice(0,d));u.set(M,{start:M,tickFormattedString:0===M?"\u2014":t.formatReadable(M)})}let p=10*Math.pow(10,-d);for(let h of s)for(let m of[...u.keys()].reverse()){let _=h-m;if(_>=0&&_<p){if(0===m)c.push({value:h,tickFormattedString:t.formatTick(h)});else{let M=String(h).slice(String(m).length);c.push({value:h,tickFormattedString:`\u2026${M||"0"}`})}break}}return{major:Array.from(u.values()),minor:c}},filterTicksByVisibility:function(n,t,e,i,r=5){if(!n.length||!gV)return n;let o="x"===e?1:-1,a=null;return n.filter(s=>{let l=t(s);gV.font=i;let c=gV.measureText(s.tickFormattedString),d="x"===e?c.width:c.actualBoundingBoxAscent-c.actualBoundingBoxDescent;return null===a?!(l+o*d<0||(a=l+o*d,0)):!(o*(a+o*r-l)>0||(a=l+o*d,0))})}};function MNe(n,t){if(1&n&&(qn(),f(0,"g",17)(1,"text"),T(2),g(),f(3,"title"),T(4),g()()),2&n){let e=t.$implicit,i=w();v(1),Bt("font",i.axisFont),Be("x",i.textXPosition(e.value))("y",i.textYPosition(e.value)),v(1),Ve(" ",e.tickFormattedString," "),v(2),kt(i.getFormatter().formatLong(e.value))}}function wNe(n,t){if(1&n&&(f(0,"span",20)(1,"span"),T(2),g()()),2&n){let e=t.$implicit,i=t.index,r=t.last,o=w(2);Bt("left",o.getMajorXPosition(e),"px")("width",o.getMajorWidthString(e,r,o.majorTicks[i+1]))("bottom",o.getMajorYPosition(e),"px")("height",o.getMajorHeightString(e,r,o.majorTicks[i+1]))("font",o.axisFont),nt("major-label",!0)("last",r),b("title",o.getFormatter().formatLong(e.start)),v(2),kt(e.tickFormattedString)}}function SNe(n,t){if(1&n&&(f(0,"div",18),S(1,wNe,3,16,"span",19),g()),2&n){let e=w();v(1),b("ngForOf",e.majorTicks)("ngForTrackBy",e.trackByMajorTick)}}var Hte=(()=>{class n{constructor(){this.onViewExtentChange=new F,this.editMenuOpened=!1,this.majorTicks=[],this.minorTicks=[]}ngOnChanges(){let e=null,r=Yx("x"===this.axis?this.domDim.width:this.domDim.height,this.gridCount);e=this.scale instanceof nx?Qx.getTicksForLinearScale(this.scale,this.getFormatter(),r,this.axisExtent):this.scale instanceof ix?Qx.getTicksForTemporalScale(this.scale,this.getFormatter(),r,this.axisExtent):Qx.getStandardTicks(this.scale,this.getFormatter(),r,this.axisExtent),this.majorTicks=e.major,this.minorTicks=Qx.filterTicksByVisibility(e.minor,o=>this.getDomPos(o.value),this.axis,"11px Roboto, sans-serif")}getFormatter(){return this.customFormatter??this.scale.defaultFormatter}trackByMinorTick(e){return e.value}trackByMajorTick(e){return e.start}getDomPos(e){return this.scale.forward(this.axisExtent,Xc(this.domDim,this.axis),e)}textXPosition(e){return"x"===this.axis?String(this.getDomPos(e)):"100%"}textYPosition(e){return"x"===this.axis?"":String(this.getDomPos(e))}getMajorXPosition(e){return"y"===this.axis?0:Math.min(this.domDim.width,Math.max(0,this.getDomPos(e.start)))}getMajorWidthString(e,i,r){return"y"===this.axis?"":(i||!r?this.domDim.width:this.getMajorXPosition(r))-this.getMajorXPosition(e)+"px"}getMajorYPosition(e){return"x"===this.axis?0:this.domDim.height-Math.min(this.domDim.height,Math.max(0,this.getDomPos(e.start)))}getMajorHeightString(e,i,r){return"x"===this.axis?"":(i||!r?this.domDim.height:this.getMajorYPosition(r))-this.getMajorYPosition(e)+"px"}keydownPreventClose(e){"Escape"!==e.key&&e.stopPropagation()}extentChanged(e,i){let r=Number(e),o=Number(i);if(o<r){let a=r;r=o,o=a}!Number.isFinite(r)||!Number.isFinite(o)||this.onViewExtentChange.emit([r,o])}onAxisUpdateMenuOpen(e,i,r){e.value=String(r[0]),i.value=String(r[1]),e.focus()}setEditMenuOpened(e){this.editMenuOpened=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["line-chart-axis"]],inputs:{axisExtent:"axisExtent",axis:"axis",scale:"scale",gridCount:"gridCount",domDim:"domDim",customFormatter:"customFormatter"},outputs:{onViewExtentChange:"onViewExtentChange"},features:[qt],decls:26,vars:11,consts:[[1,"line"],[1,"minor"],[1,"ticks"],["class","minor-tick-label",4,"ngFor","ngForOf","ngForTrackBy"],["mat-icon-button","","title","Click to manually set min & max values",1,"extent-edit-button",3,"matMenuTriggerFor","menuOpened","menuClosed"],["matMenuTrigger","matMenuTrigger"],["svgIcon","edit_24px"],["class","major ticks",4,"ngIf"],["xPosition","before",3,"yPosition"],["manualControl","matMenu"],[1,"extent-edit-input",3,"click","keydown"],["type","number",3,"value"],["minInput",""],["maxInput",""],[1,"extent-edit-control",3,"keydown"],["mat-raised-button","","color","primary",1,"extent-edit-change",3,"click"],["mat-stroked-button","",1,"extent-edit-cancel",3,"click"],[1,"minor-tick-label"],[1,"major","ticks"],[3,"major-label","last","left","width","bottom","height","font","title",4,"ngFor","ngForOf","ngForTrackBy"],[3,"title"]],template:function(e,i){if(1&e){let r=Te();f(0,"div"),k(1,"div",0),f(2,"div",1),qn(),f(3,"svg",2),S(4,MNe,5,6,"g",3),g(),ua(),f(5,"button",4,5),A("menuOpened",function(){ne(r);let a=st(15),s=st(20);return i.onAxisUpdateMenuOpen(a,s,i.axisExtent),ie(i.setEditMenuOpened(!0))})("menuClosed",function(){return i.setEditMenuOpened(!1)}),k(7,"mat-icon",6),g()(),S(8,SNe,2,2,"div",7),g(),f(9,"mat-menu",8,9)(11,"div",10),A("click",function(a){return a.stopPropagation()})("keydown",function(a){return i.keydownPreventClose(a)}),f(12,"label"),T(13,"min"),g(),k(14,"input",11,12),g(),f(16,"div",10),A("click",function(a){return a.stopPropagation()})("keydown",function(a){return i.keydownPreventClose(a)}),f(17,"label"),T(18,"max"),g(),k(19,"input",11,13),g(),f(21,"div",14),A("keydown",function(a){return i.keydownPreventClose(a)}),f(22,"button",15),A("click",function(){ne(r);let a=st(15),s=st(20),l=st(6);return i.extentChanged(a.value,s.value),ie(l.closeMenu())}),T(23," Change "),g(),f(24,"button",16),A("click",function(){return ne(r),ie(st(6).closeMenu())}),T(25," Cancel "),g()()()}if(2&e){let r=st(10);Xo(i.axis+"-axis axis"),v(4),b("ngForOf",i.minorTicks)("ngForTrackBy",i.trackByMinorTick),v(1),nt("extent-edit-menu-opened",i.editMenuOpened),b("matMenuTriggerFor",r),v(3),b("ngIf",i.majorTicks.length),v(1),b("yPosition","y"===i.axis?"above":"below"),v(5),b("value",i.axisExtent[0]),v(5),b("value",i.axisExtent[1])}},dependencies:[nn,Ne,ki,Er,bn,Xu,Yu],styles:["[_nghost-%COMP%]{contain:strict;display:flex;overflow:hidden}.major-label[_ngcontent-%COMP%], text[_ngcontent-%COMP%]{fill:currentColor;font-size:11px;user-select:none}.axis[_ngcontent-%COMP%]{display:flex;height:100%;width:100%}.axis[_ngcontent-%COMP%]   .extent-edit-button[_ngcontent-%COMP%]{--tb-icon-width: 16px;--tb-icon-height: 16px;height:24px;position:absolute;right:5px;top:5px;visibility:hidden;width:24px;padding:0}.major[_ngcontent-%COMP%], .minor[_ngcontent-%COMP%]{flex:1 0;overflow:hidden}.line[_ngcontent-%COMP%]{background-color:#aaa;flex:0 0 1px;justify-content:stretch}.ticks[_ngcontent-%COMP%]{height:100%;position:relative;width:100%}.x-axis[_ngcontent-%COMP%]{flex-direction:column}.x-axis[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-bottom:3px}.x-axis[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{dominant-baseline:text-before-edge;text-anchor:middle}.x-axis[_ngcontent-%COMP%]   .ticks[_ngcontent-%COMP%]{-webkit-mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.y-axis[_ngcontent-%COMP%]{flex-direction:row-reverse}.y-axis[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-left:5px}.y-axis[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{dominant-baseline:central;text-anchor:end}.y-axis[_ngcontent-%COMP%]   .ticks[_ngcontent-%COMP%]{-webkit-mask-image:linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.extent-edit-input[_ngcontent-%COMP%]{align-items:center;column-gap:5px;display:grid;font-size:12px;grid-template-columns:30px minmax(auto, 100px);height:30px;margin:10px 20px}.extent-edit-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background-color:inherit;border-radius:4px;border-style:solid;color:inherit}.extent-edit-control[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-end;margin:10px 20px}.extent-edit-control[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:12px;height:30px;line-height:1.4;margin-left:5px;padding:0 10px}.axis[_ngcontent-%COMP%]:hover   .extent-edit-button[_ngcontent-%COMP%], .axis[_ngcontent-%COMP%]:focus-within   .extent-edit-button[_ngcontent-%COMP%], .extent-edit-menu-opened[_ngcontent-%COMP%]{visibility:visible}.major[_ngcontent-%COMP%]{position:relative;overflow:hidden;contain:strict}.major[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;overflow:hidden;position:absolute;white-space:nowrap}.major[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{max-width:100%}.x-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{border-left:1px solid #9e9e9e;padding:0 5px}.x-axis[_ngcontent-%COMP%]   .major-label.last[_ngcontent-%COMP%]{border-right:1px solid #9e9e9e}.y-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{border-bottom:1px solid #9e9e9e;height:100%;padding:5px 0;width:100%}.y-axis[_ngcontent-%COMP%]   .major-label.last[_ngcontent-%COMP%]{border-top:1px solid #9e9e9e}.y-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:center}"],changeDetection:0}),n})();function Zx(n,t){let e=Math.min(Lc(n.map(({x:o})=>o),t),n.length-1),i=Math.max(0,e-1);return Math.abs(n[i].x-t)-Math.abs(n[e].x-t)<=0?i:e}function zte(n,t,e,i,r,o){let a;switch(n.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:a=1;break;case WheelEvent.DOM_DELTA_LINE:a=8;break;case WheelEvent.DOM_DELTA_PAGE:a=20;break;default:a=1,console.warn(`Unknown WheelEvent deltaMode: ${n.deltaMode}.`)}let s=n.deltaY*a,l=s<0?Math.max(s*i,-.95):s*i,{width:c,height:d}=e,u=[r.reverse(t.x,[0,c],-n.offsetX*l),r.reverse(t.x,[0,c],c+(c-n.offsetX)*l)],p=[o.reverse(t.y,[d,0],-n.offsetY*l),o.reverse(t.y,[d,0],d+(d-n.offsetY)*l)];return{x:u[1]<u[0]?[u[1],u[0]]:u,y:p[1]<p[0]?[p[1],p[0]]:p}}var DNe=["dots"];function INe(n,t){if(1&n&&(qn(),k(0,"circle",11)),2&n){let e=w().$implicit,i=w(2);Be("cx",i.getDomX(e.dataPoint.x))("cy",i.getDomY(e.dataPoint.y))("fill",e.metadata.color)}}function ANe(n,t){if(1&n&&(qn(),Gt(0),S(1,INe,1,3,"circle",10),Wt()),2&n){let e=t.$implicit,i=w(2);v(1),b("ngIf",i.shouldRenderTooltipPoint(e.dataPoint))}}function RNe(n,t){if(1&n&&(qn(),Gt(0),S(1,ANe,2,1,"ng-container",9),Wt()),2&n){let e=w();v(1),b("ngForOf",e.cursoredData)("ngForTrackBy",e.trackBySeriesName)}}function PNe(n,t){if(1&n&&(qn(),k(0,"rect",12)),2&n){let e=w();Be("x",e.zoomBoxInUiCoordinate.x)("width",e.zoomBoxInUiCoordinate.width)("y",e.zoomBoxInUiCoordinate.y)("height",e.zoomBoxInUiCoordinate.height)}}var kNe=function(n,t,e){return{data:n,cursorLocationInDataCoord:t,cursorLocation:e}};function ONe(n,t){if(1&n&&(f(0,"div",14),hi(1,15),g()),2&n){let e=w(2),i=st(11);v(1),b("ngTemplateOutlet",e.tooltipTemplate?e.tooltipTemplate:i)("ngTemplateOutletContext",yb(2,kNe,e.cursoredData,e.cursorLocationInDataCoord,e.cursorLocation))}}function FNe(n,t){if(1&n){let e=Te();S(0,ONe,2,6,"ng-template",13),A("detach",function(){return ne(e),ie(w().onTooltipDisplayDetached())})}if(2&n){let e=w();b("cdkConnectedOverlayOrigin",e.tooltipOriginEl)("cdkConnectedOverlayOpen",e.tooltipDisplayAttached&&e.state.getValue()===e.InteractionState.NONE)("cdkConnectedOverlayPositions",e.tooltipPositions)("cdkConnectedOverlayScrollStrategy",e.scrollStrategy)("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayGrowAfterOpen",!0)}}function NNe(n,t){if(1&n&&(Gt(0),f(1,"tr",17)(2,"td",18),k(3,"span"),g(),f(4,"td",19),T(5),g(),f(6,"td"),T(7),g(),f(8,"td"),T(9),g()(),Wt()),2&n){let e=t.$implicit;v(3),Bt("background-color",e.metadata.color),v(2),kt(e.metadata.displayName),v(2),kt(e.dataPoint.y),v(2),kt(e.dataPoint.x)}}function LNe(n,t){if(1&n&&(f(0,"table")(1,"thead")(2,"tr"),k(3,"th",16),f(4,"th"),T(5,"Name"),g(),f(6,"th"),T(7,"Y"),g(),f(8,"th"),T(9,"X"),g()()(),f(10,"tbody"),S(11,NNe,10,5,"ng-container",9),g()()),2&n){let e=t.data,i=w();v(11),b("ngForOf",e)("ngForTrackBy",i.trackBySeriesName)}}function VNe(n){return n.scrollStrategies.reposition()}var Ute=(()=>{class n{constructor(e,i){this.changeDetector=e,this.scrollStrategy=i,this.onViewExtentChange=new F,this.onViewExtentReset=new F,this.onInteractionStateChange=new F,this.InteractionState=Tr,this.state=new xr(Tr.NONE),this.specialKeyPressed=!1,this.zoomBoxInUiCoordinate={x:0,width:0,height:0,y:0},this.tooltipPositions=[{offsetY:5,originX:"start",overlayX:"start",originY:"bottom",overlayY:"top"},{offsetY:5,originX:"end",overlayX:"end",originY:"bottom",overlayY:"top"},{offsetY:-15,originX:"start",overlayX:"start",originY:"top",overlayY:"bottom"},{offsetY:-15,originX:"end",overlayX:"end",originY:"top",overlayY:"bottom"},{offsetX:5,originX:"end",overlayX:"start",originY:"top",overlayY:"top"},{offsetX:-5,originX:"start",overlayX:"end",originY:"top",overlayY:"top"}],this.cursorLocationInDataCoord=null,this.cursorLocation=null,this.cursoredData=[],this.tooltipDisplayAttached=!1,this.showZoomInstruction=!1,this.dragStartCoord=null,this.isCursorInside=!1,this.ngUnsubscribe=new Ee,this.subscriptions=[]}ngAfterViewInit(){this.subscriptions.push(this.state.subscribe(e=>{this.onInteractionStateChange.emit(e)})),this.ngUnsubscribe.pipe(q(()=>{this.subscriptions.forEach(e=>e.unsubscribe())})),Ei(this.dotsContainer.nativeElement,"dblclick",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(()=>{this.onViewExtentReset.emit(),this.state.next(Tr.NONE),this.changeDetector.markForCheck()}),Ei(window,"keydown",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),Ei(window,"keyup",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),Ei(this.dotsContainer.nativeElement,"mousedown",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{let i=this.state.getValue(),r=this.shouldPan(e)?Tr.PANNING:Tr.DRAG_ZOOMING;i===Tr.NONE&&r===Tr.DRAG_ZOOMING&&(this.dragStartCoord={x:e.offsetX,y:e.offsetY},this.zoomBoxInUiCoordinate={x:e.offsetX,width:0,y:e.offsetY,height:0}),i!==r&&(this.state.next(r),this.changeDetector.markForCheck())}),Ei(this.dotsContainer.nativeElement,"mouseup",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{let i=(e.buttons&Cs.LEFT)===Cs.LEFT;this.dragStartCoord=null;let r=this.zoomBoxInUiCoordinate;if(!i&&this.state.getValue()===Tr.DRAG_ZOOMING&&r.width>0&&r.height>0){let o=this.getDataX(r.x),a=this.getDataX(r.x+r.width),s=this.getDataY(r.y+r.height),l=this.getDataY(r.y);this.onViewExtentChange.emit({dataExtent:{x:[o,a],y:[s,l]}})}this.state.getValue()!==Tr.NONE&&(this.state.next(Tr.NONE),this.changeDetector.markForCheck())}),Ei(this.dotsContainer.nativeElement,"mouseenter",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{this.isCursorInside=!0,this.updateTooltip(e),this.changeDetector.markForCheck()}),Ei(this.dotsContainer.nativeElement,"mouseleave",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{this.dragStartCoord=null,this.isCursorInside=!1,this.updateTooltip(e),this.state.next(Tr.NONE),this.changeDetector.markForCheck()}),Ei(this.dotsContainer.nativeElement,"mousemove",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>{switch(this.state.getValue()){case Tr.SCROLL_ZOOMING:this.state.next(Tr.NONE),this.updateTooltip(e),this.changeDetector.markForCheck();break;case Tr.NONE:this.updateTooltip(e),this.changeDetector.markForCheck();break;case Tr.PANNING:{let i=-e.movementX,r=-e.movementY,{width:o,height:a}=this.domDim,s=this.getDataX(i),l=this.getDataX(o+i),c=this.getDataY(a+r),d=this.getDataY(r);this.onViewExtentChange.emit({dataExtent:{x:[s,l],y:[c,d]}});break}case Tr.DRAG_ZOOMING:{if(!this.dragStartCoord)break;let i=[this.dragStartCoord.x,e.offsetX],r=[this.dragStartCoord.y,e.offsetY];this.zoomBoxInUiCoordinate={x:Math.min(...i),width:Math.max(...i)-Math.min(...i),y:Math.min(...r),height:Math.max(...r)-Math.min(...r)}}this.changeDetector.markForCheck()}}),Ei(this.dotsContainer.nativeElement,"wheel",{passive:!1}).pipe(it(this.ngUnsubscribe),Jn(e=>{let i=!e.ctrlKey&&!e.shiftKey&&e.altKey;return this.showZoomInstruction=!i,this.changeDetector.markForCheck(),i?(e.preventDefault(),$t(e)):rs(3e3).pipe(Dt(()=>{this.showZoomInstruction=!1,this.changeDetector.markForCheck()}),q(()=>null))}),Oe(e=>Boolean(e))).subscribe(e=>{this.onViewExtentChange.emit({dataExtent:zte(e,this.viewExtent,this.domDim,.01,this.xScale,this.yScale)}),this.state.getValue()!==Tr.SCROLL_ZOOMING&&(this.state.next(Tr.SCROLL_ZOOMING),this.changeDetector.markForCheck())})}ngOnChanges(){this.updateCursoredDataAndTooltipVisibility()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}shouldPan(e){let i=e.shiftKey||e.altKey;if(e instanceof KeyboardEvent)return i;let r=(e.buttons&Cs.LEFT)===Cs.LEFT,o=(e.buttons&Cs.MIDDLE)===Cs.MIDDLE;return!(!r&&!o)&&(o&&!r||i)}trackBySeriesName(e,i){return i.id}getDomX(e){return this.xScale.forward(this.viewExtent.x,Xc(this.domDim,"x"),e)}getDataX(e){return this.xScale.reverse(this.viewExtent.x,Xc(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Xc(this.domDim,"y"),e)}getDataY(e){return this.yScale.reverse(this.viewExtent.y,Xc(this.domDim,"y"),e)}shouldRenderTooltipPoint(e){return null!==e&&!isNaN(e.x)&&!isNaN(e.y)}updateTooltip(e){this.cursorLocationInDataCoord={x:this.getDataX(e.offsetX),y:this.getDataY(e.offsetY)},this.cursorLocation={x:e.offsetX,y:e.offsetY},this.updateCursoredDataAndTooltipVisibility()}onTooltipDisplayDetached(){this.tooltipDisplayAttached=!1}updateCursoredDataAndTooltipVisibility(){let e=this.cursorLocationInDataCoord;if(null===e)return this.cursoredData=[],void(this.tooltipDisplayAttached=!1);this.cursoredData=this.isCursorInside?this.seriesData.map(i=>({seriesDatum:i,metadata:this.seriesMetadataMap[i.id]})).filter(({metadata:i})=>i&&i.visible&&!Boolean(i.aux)).map(({seriesDatum:i,metadata:r})=>{let o=Zx(i.points,e.x),a=i.points[o];return{id:i.id,closestPointIndex:o,dataPoint:a,domPoint:{x:this.getDomX(a.x),y:this.getDomY(a.y)},metadata:r}}).filter(i=>i):[],this.tooltipDisplayAttached=Boolean(this.cursoredData.length)}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(Ih))},n.\u0275cmp=P({type:n,selectors:[["line-chart-interactive-view"]],viewQuery:function(e,i){if(1&e&&(Ue(DNe,7,xe),Ue(Vu,5)),2&e){let r;be(r=ve())&&(i.dotsContainer=r.first),be(r=ve())&&(i.overlay=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&nt("show-zoom-instruction",i.showZoomInstruction)},inputs:{seriesData:"seriesData",seriesMetadataMap:"seriesMetadataMap",viewExtent:"viewExtent",xScale:"xScale",yScale:"yScale",domDim:"domDim",tooltipOriginEl:"tooltipOriginEl",tooltipTemplate:"tooltipTemplate",disableTooltip:"disableTooltip"},outputs:{onViewExtentChange:"onViewExtentChange",onViewExtentReset:"onViewExtentReset",onInteractionStateChange:"onInteractionStateChange"},features:[Vt([{provide:Ih,useFactory:VNe,deps:[Oi]}]),qt],decls:12,vars:9,consts:[[1,"dots"],["dots",""],[4,"ngIf"],["class","zoom-box",4,"ngIf"],[1,"zoom-instruction"],[1,"instruction-content"],["cdkOverlayOrigin","",1,"tooltip-origin"],["tooltipOrigin","cdkOverlayOrigin"],["defaultTooltip",""],[4,"ngFor","ngForOf","ngForTrackBy"],["r","4",4,"ngIf"],["r","4"],[1,"zoom-box"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayLockPosition","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayGrowAfterOpen","detach"],[1,"tooltip-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"circle-header"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[1,"name"]],template:function(e,i){1&e&&(qn(),f(0,"svg",0,1),S(2,RNe,2,2,"ng-container",2),S(3,PNe,1,4,"rect",3),g(),ua(),f(4,"div",4)(5,"span",5),T(6,"Alt + Scroll to Zoom"),g()(),k(7,"div",6,7),S(9,FNe,1,7,null,2),S(10,LNe,12,2,"ng-template",null,8,jt)),2&e&&(nt("pannable",i.specialKeyPressed)("draggable",i.state.getValue()===i.InteractionState.NONE||i.state.getValue()===i.InteractionState.DRAG_ZOOMING)("panning",i.state.getValue()===i.InteractionState.PANNING),v(2),b("ngIf",i.state.getValue()===i.InteractionState.NONE),v(1),b("ngIf",i.state.getValue()===i.InteractionState.DRAG_ZOOMING),v(6),b("ngIf",!i.disableTooltip))},dependencies:[nn,Ne,eo,Vu,Md],styles:["[_nghost-%COMP%]{display:flex;position:relative;user-select:none}.dots[_ngcontent-%COMP%]{height:100%;width:100%}.dots.draggable[_ngcontent-%COMP%]{cursor:crosshair}.dots.pannable[_ngcontent-%COMP%]{cursor:grab}.dots.panning[_ngcontent-%COMP%]{cursor:grabbing}.tooltip-row-circle[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:12px;width:12px}.tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.6);display:inline-block;height:10px;width:10px}.tooltip-origin[_ngcontent-%COMP%]{bottom:0;left:0;position:absolute;right:0}.tooltip-container[_ngcontent-%COMP%]{background:rgba(0,0,0,.85);border-radius:4px;color:#fff;contain:paint style layout;font-size:.9em;overflow:auto;padding:5px;pointer-events:none;width:100%}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:2px 5px;text-align:left}th[_ngcontent-%COMP%]{font-weight:500;padding-bottom:5px}.zoom-box[_ngcontent-%COMP%]{fill-opacity:.03;fill:#000;stroke:#ccc}.zoom-instruction[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:10px;transition:opacity .5s;z-index:1}.instruction-content[_ngcontent-%COMP%]{background:rgba(0,0,0,.6);border-radius:5px;color:#fff;padding:5px 10px;user-select:none}.show-zoom-instruction[_nghost-%COMP%]   .zoom-instruction[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0}),n})();function zNe(n,t){if(1&n&&(qn(),k(0,"line",2)),2&n){let e=t.$implicit,i=w();nt("zero",0===e),Be("x1",i.getDomX(e))("x2",i.getDomX(e))("y2",i.domDim.height)}}function UNe(n,t){if(1&n&&(qn(),k(0,"line",3)),2&n){let e=t.$implicit,i=w();nt("zero",0===e),Be("y1",i.getDomY(e))("x2",i.domDim.width)("y2",i.getDomY(e))}}var jte=(()=>{class n{getDomX(e){return this.xScale.forward(this.viewExtent.x,Xc(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Xc(this.domDim,"y"),e)}getXTicks(){return this.xScale.ticks(this.viewExtent.x,Yx(this.domDim.width,this.xGridCount))}getYTicks(){return this.yScale.ticks(this.viewExtent.y,Yx(this.domDim.height,this.yGridCount))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["line-chart-grid-view"]],inputs:{viewExtent:"viewExtent",xScale:"xScale",xGridCount:"xGridCount",yScale:"yScale",yGridCount:"yGridCount",domDim:"domDim"},decls:3,vars:2,consts:[["y1","0",3,"zero",4,"ngFor","ngForOf"],["x1","0",3,"zero",4,"ngFor","ngForOf"],["y1","0"],["x1","0"]],template:function(e,i){1&e&&(qn(),f(0,"svg"),S(1,zNe,1,5,"line",0),S(2,UNe,1,5,"line",1),g()),2&e&&(v(1),b("ngForOf",i.getXTicks()),v(1),b("ngForOf",i.getYTicks()))},dependencies:[nn],styles:["[_nghost-%COMP%] {\n        display: flex;\n        overflow: hidden;\n      }\n\n      svg[_ngcontent-%COMP%] {\n        height: 100%;\n        width: 100%;\n      }\n\n      line[_ngcontent-%COMP%] {\n        stroke: #ccc;\n        stroke-width: 1px;\n      }\n\n      .zero[_ngcontent-%COMP%] {\n        stroke: #aaa;\n        stroke-width: 1.5px;\n      }"],changeDetection:0}),n})(),GNe=["seriesView"],WNe=["xAxis"],qNe=["yAxis"],XNe=["chartEl"];function YNe(n,t){if(1&n&&k(0,"line-chart-grid-view",16),2&n){let e=w();b("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("xGridCount",e.X_GRID_COUNT)("yGridCount",e.Y_GRID_COUNT)("domDim",e.domDimensions.main)}}function QNe(n,t){1&n&&(qn(),k(0,"svg",null,17))}function ZNe(n,t){1&n&&k(0,"canvas",null,17)}function KNe(n,t){if(1&n&&(Gt(0),S(1,QNe,2,0,"svg",5),S(2,ZNe,2,0,"canvas",5),Wt()),2&n){let e=w();v(1),b("ngIf",e.getRendererType()===e.RendererType.SVG),v(1),b("ngIf",e.getRendererType()===e.RendererType.WEBGL)}}function JNe(n,t){if(1&n){let e=Te();f(0,"line-chart-interactive-view",18),A("onViewExtentChange",function(r){return ne(e),ie(w().onViewBoxChanged(r))})("onViewExtentReset",function(){return ne(e),ie(w().viewBoxReset())})("onInteractionStateChange",function(r){return ne(e),ie(w().onInteractionStateChange(r))}),g()}if(2&n){let e=w(),i=st(1);b("seriesData",e.seriesData)("seriesMetadataMap",e.seriesMetadataMap)("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("tooltipOriginEl",i)("domDim",e.domDimensions.main)("tooltipTemplate",e.tooltipTemplate)("disableTooltip",e.disableTooltip)}}var $Ne=function(n,t,e,i){return{xScale:n,yScale:t,domDimension:e,viewExtent:i}};function eLe(n,t){if(1&n&&(f(0,"div",19),hi(1,20),g()),2&n){let e=w();v(1),b("ngTemplateOutlet",e.customVisTemplate)("ngTemplateOutletContext",Rk(2,$Ne,e.xScale,e.yScale,e.domDimensions.main,e.viewBox))}}function tLe(n,t){if(1&n){let e=Te();f(0,"line-chart-axis",21),A("onViewExtentChange",function(r){return ne(e),ie(w().onViewBoxChangedFromAxis(r,"y"))}),g()}if(2&n){let e=w();b("axisExtent",e.viewBox.y)("customFormatter",e.customYFormatter)("domDim",e.domDimensions.yAxis)("gridCount",e.Y_GRID_COUNT)("scale",e.yScale)}}function nLe(n,t){if(1&n){let e=Te();f(0,"line-chart-axis",22),A("onViewExtentChange",function(r){return ne(e),ie(w().onViewBoxChangedFromAxis(r,"x"))}),g()}if(2&n){let e=w();b("axisExtent",e.viewBox.x)("customFormatter",e.customXFormatter)("domDim",e.domDimensions.xAxis)("gridCount",e.X_GRID_COUNT)("scale",e.xScale)}}function iLe(n,t){1&n&&(f(0,"div",23),k(1,"span",24),g())}var rLe=function(n,t,e,i,r){return{xScale:n,yScale:t,domDimension:e,viewExtent:i,interactionState:r}};function oLe(n,t){if(1&n&&(f(0,"div",25,26),hi(2,20),g()),2&n){let e=w();v(2),b("ngTemplateOutlet",e.customChartOverlayTemplate)("ngTemplateOutletContext",Pk(2,rLe,e.xScale,e.yScale,e.domDimensions.main,e.viewBox,e.interactionState))}}var aLe=function(n,t){return{container:!0,"dark-mode":n,"line-only-mode":t,"line-chart":!0}},_V={x:[0,1],y:[0,1]},h_=(()=>{class n{constructor(e){this.changeDetector=e,this.RendererType=Yi,this.useDarkMode=!1,this.preferredRendererType=Yi.WEBGL,this.xScaleType=tr.LINEAR,this.yScaleType=tr.LINEAR,this.userViewBox=null,this.lineOnly=!1,this.disableTooltip=!1,this.viewBoxChanged=new F,this.onViewBoxOverridden=new Lp(1),this.ignoreYOutliers=!1,this.Y_GRID_COUNT=6,this.X_GRID_COUNT=10,this.xScale=Ul(this.xScaleType),this.yScale=Ul(this.xScaleType),this.viewBox=_V,this.domDimensions={main:{width:0,height:0},xAxis:{width:0,height:0},yAxis:{width:0,height:0}},this.showChartRendererElement=!0,this.interactionState=Tr.NONE,this.lineChart=null,this.isDataUpdated=!1,this.isMetadataUpdated=!1,this.isFixedViewBoxUpdated=!1,this.isViewBoxOverridden=!1,this.useDarkModeUpdated=!1,this.userViewBoxUpdated=!1,this.isViewBoxChanged=!0,this.scaleUpdated=!0,this.isRenderingContextLost=!1}ngOnInit(){this.onViewBoxOverridden.next(this.isViewBoxOverridden)}ngOnChanges(e){e.xScaleType&&(this.xScale=Ul(this.xScaleType),this.scaleUpdated=!0),e.yScaleType&&(this.yScale=Ul(this.yScaleType),this.scaleUpdated=!0),e.seriesData&&(this.isDataUpdated=!0),e.fixedViewBox&&(this.isFixedViewBoxUpdated=!0),e.seriesMetadataMap&&(this.isMetadataUpdated=!0),e.useDarkMode&&(this.useDarkModeUpdated=!0),e.userViewBox&&(this.userViewBoxUpdated=!0),this.userViewBoxUpdated?this.setIsViewBoxOverridden(!!this.userViewBox):this.scaleUpdated&&this.setIsViewBoxOverridden(!1),this.isViewBoxChanged=this.isViewBoxChanged||this.userViewBoxUpdated||this.scaleUpdated||!this.isViewBoxOverridden&&this.shouldUpdateDefaultViewBox(e),this.updateLineChart()}ngAfterViewInit(){this.initializeChart(),this.updateLineChart(),this.changeDetector.detectChanges()}recoverRendererIfNeeded(){!this.isRenderingContextLost||this.disableUpdate||(this.showChartRendererElement=!1,this.changeDetector.detectChanges(),this.showChartRendererElement=!0,this.changeDetector.detectChanges(),this.initializeChart(),this.scaleUpdated=!0,this.isMetadataUpdated=!0,this.isDataUpdated=!0,this.useDarkModeUpdated=!0,this.isFixedViewBoxUpdated=!0,this.isViewBoxChanged=!0,this.isRenderingContextLost=!1)}onViewResize(){!this.lineChart||(this.readAndUpdateDomDimensions(),this.lineChart.resize(this.domDimensions.main),this.changeDetector.detectChanges())}shouldUpdateDefaultViewBox(e){if(e.xScaleType||e.yScaleType||e.ignoreYOutliers||e.seriesData)return!0;let r=e.seriesMetadataMap;if(r){let o=r.previousValue;if(Object.keys(this.seriesMetadataMap).length!==Object.keys(o??{}).length)return!0;for(let[a,s]of Object.entries(this.seriesMetadataMap)){let l=o&&o[a];if(!l||s.visible!==l.visible)return!0}}return!1}onContextLost(){this.isRenderingContextLost=!0,this.lineChart&&(this.lineChart.dispose(),this.lineChart=null)}triggerContextLostForTest(){this.onContextLost()}getLineChartForTest(){return this.lineChart}initializeChart(){this.lineChart&&this.lineChart.dispose();let e=this.getRendererType(),i={onDrawEnd:()=>{},onContextLost:this.onContextLost.bind(this)},r=null;switch(this.readAndUpdateDomDimensions(),e){case Yi.SVG:r={type:Yi.SVG,container:this.chartEl.nativeElement,callbacks:i,domDimension:this.domDimensions.main,useDarkMode:this.useDarkMode};break;case Yi.WEBGL:r={type:Yi.WEBGL,container:this.chartEl.nativeElement,devicePixelRatio:window.devicePixelRatio,callbacks:i,domDimension:this.domDimensions.main,useDarkMode:this.useDarkMode};break;default:throw new Error(`<line-chart> does not yet support rendererType: ${e}`)}let a=e!==Yi.SVG&&jl_isWebGl2OffscreenCanvasSupported()?Tm:sA;this.lineChart=new a(r)}ngOnDestroy(){this.lineChart&&this.lineChart.dispose()}getRendererType(){return function(n){switch(n){case Yi.SVG:return Yi.SVG;case Yi.WEBGL:return jl_isWebGl2Supported()?Yi.WEBGL:Yi.SVG;default:throw new Error(`Unknown rendererType: ${n}`)}}(this.preferredRendererType)}readAndUpdateDomDimensions(){this.domDimensions={main:{width:this.seriesView.nativeElement.clientWidth,height:this.seriesView.nativeElement.clientHeight},xAxis:{width:this.xAxis.nativeElement.clientWidth,height:this.xAxis.nativeElement.clientHeight},yAxis:{width:this.yAxis.nativeElement.clientWidth,height:this.yAxis.nativeElement.clientHeight}}}updateLineChart(){if(this.recoverRendererIfNeeded(),this.lineChart&&!this.disableUpdate){if(this.scaleUpdated&&(this.scaleUpdated=!1,this.lineChart.setXScaleType(this.xScaleType),this.lineChart.setYScaleType(this.yScaleType)),this.isMetadataUpdated&&(this.isMetadataUpdated=!1,this.lineChart.setMetadata(this.seriesMetadataMap)),this.isDataUpdated&&(this.isDataUpdated=!1,this.lineChart.setData(this.seriesData)),this.useDarkModeUpdated&&(this.useDarkModeUpdated=!1,this.lineChart.setUseDarkMode(this.useDarkMode)),this.userViewBoxUpdated&&(this.userViewBoxUpdated=!1),this.isViewBoxOverridden&&this.userViewBox)this.viewBox=this.userViewBox;else if(!this.isViewBoxOverridden&&this.fixedViewBox)this.viewBox=this.fixedViewBox;else if(!this.isViewBoxOverridden&&this.isViewBoxChanged){let i=function(n,t,e,i,r){let o=null,a=null,s=[];for(let{id:u,points:p}of n){let h=t[u];if(h&&!h.aux&&h.visible)for(let m=0;m<p.length;m++){let{x:_,y:M}=p[m];i(_)&&(o=null===o||_<o?_:o,a=null===a||_>a?_:a),r(M)&&s.push(M)}}s.sort(al);let c=s[0],d=s[s.length-1];return e&&s.length>2&&(c=s[Math.ceil(.05*(s.length-1))],d=s[Math.floor(.95*(s.length-1))]),{x:null!==o&&null!==a?[o,a]:void 0,y:void 0!==c&&void 0!==d?[c,d]:void 0}}(this.seriesData,this.seriesMetadataMap,this.ignoreYOutliers,this.xScale.isSafeNumber,this.yScale.isSafeNumber);this.viewBox={x:this.xScale.niceDomain(i.x??_V.x),y:this.yScale.niceDomain(i.y??_V.y)}}(this.isFixedViewBoxUpdated||this.isViewBoxChanged)&&(this.isFixedViewBoxUpdated=!1,this.isViewBoxChanged=!1,this.lineChart.setViewBox(this.viewBox),this.changeDetector.detectChanges())}}onViewBoxChanged({dataExtent:e}){this.viewBoxChanged.emit(e)}viewBoxReset(){this.viewBoxChanged.emit(null)}setIsViewBoxOverridden(e){let i=this.isViewBoxOverridden;this.isViewBoxOverridden=e,i!==e&&this.onViewBoxOverridden.next(e)}onInteractionStateChange(e){this.interactionState=e}getIsViewBoxOverridden(){return this.onViewBoxOverridden}onViewBoxChangedFromAxis(e,i){let r={...this.viewBox,[i]:e};this.onViewBoxChanged({dataExtent:r})}}return n.\u0275fac=function(e){return new(e||n)(C(Qt))},n.\u0275cmp=P({type:n,selectors:[["line-chart"]],viewQuery:function(e,i){if(1&e&&(Ue(GNe,7,xe),Ue(WNe,7,xe),Ue(qNe,7,xe),Ue(XNe,5,xe)),2&e){let r;be(r=ve())&&(i.seriesView=r.first),be(r=ve())&&(i.xAxis=r.first),be(r=ve())&&(i.yAxis=r.first),be(r=ve())&&(i.chartEl=r.first)}},inputs:{customVisTemplate:"customVisTemplate",customChartOverlayTemplate:"customChartOverlayTemplate",useDarkMode:"useDarkMode",preferredRendererType:"preferredRendererType",seriesData:"seriesData",fixedViewBox:"fixedViewBox",seriesMetadataMap:"seriesMetadataMap",xScaleType:"xScaleType",yScaleType:"yScaleType",customXFormatter:"customXFormatter",customYFormatter:"customYFormatter",tooltipTemplate:"tooltipTemplate",userViewBox:"userViewBox",lineOnly:"lineOnly",disableTooltip:"disableTooltip",disableUpdate:"disableUpdate",ignoreYOutliers:"ignoreYOutliers"},outputs:{viewBoxChanged:"viewBoxChanged"},features:[qt],decls:16,vars:13,consts:[["detectResize","","cdkOverlayOrigin","",3,"ngClass","resizeEventDebouncePeriodInMs","onResize"],["overlayTarget","cdkOverlayOrigin"],[1,"series-view"],["seriesView",""],[3,"viewExtent","xScale","yScale","xGridCount","yGridCount","domDim",4,"ngIf"],[4,"ngIf"],[3,"seriesData","seriesMetadataMap","viewExtent","xScale","yScale","tooltipOriginEl","domDim","tooltipTemplate","disableTooltip","onViewExtentChange","onViewExtentReset","onInteractionStateChange",4,"ngIf"],["class","custom-vis",4,"ngIf"],[1,"y-axis"],["yAxis",""],["axis","y",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange",4,"ngIf"],[1,"x-axis"],["xAxis",""],["axis","x",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange",4,"ngIf"],["class","dot",4,"ngIf"],["class","custom-vis custom-chart-overlay-vis",4,"ngIf"],[3,"viewExtent","xScale","yScale","xGridCount","yGridCount","domDim"],["chartEl",""],[3,"seriesData","seriesMetadataMap","viewExtent","xScale","yScale","tooltipOriginEl","domDim","tooltipTemplate","disableTooltip","onViewExtentChange","onViewExtentReset","onInteractionStateChange"],[1,"custom-vis"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["axis","y",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange"],["axis","x",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange"],[1,"dot"],[1,"rect"],[1,"custom-vis","custom-chart-overlay-vis"],["customChartOverlay",""]],template:function(e,i){1&e&&(f(0,"div",0,1),A("onResize",function(){return i.onViewResize()}),f(2,"div",2,3),S(4,YNe,1,6,"line-chart-grid-view",4),S(5,KNe,3,2,"ng-container",5),S(6,JNe,1,9,"line-chart-interactive-view",6),S(7,eLe,2,7,"div",7),g(),f(8,"div",8,9),S(10,tLe,1,5,"line-chart-axis",10),g(),f(11,"div",11,12),S(13,nLe,1,5,"line-chart-axis",13),g(),S(14,iLe,2,0,"div",14),S(15,oLe,3,8,"div",15),g()),2&e&&(b("ngClass",So(10,aLe,i.useDarkMode,i.lineOnly))("resizeEventDebouncePeriodInMs",0),v(4),b("ngIf",!i.lineOnly),v(1),b("ngIf",i.showChartRendererElement),v(1),b("ngIf",!i.lineOnly),v(1),b("ngIf",i.customVisTemplate),v(3),b("ngIf",!i.lineOnly),v(3),b("ngIf",!i.lineOnly),v(1),b("ngIf",!i.lineOnly),v(1),b("ngIf",i.customChartOverlayTemplate))},dependencies:[wn,Ne,eo,Md,Hte,Ute,jte,Vh],styles:['[_nghost-%COMP%]{contain:strict;display:flex;flex-direction:column}[_nghost-%COMP%]     .line-chart:has(.horizontal-prospective-area:hover) .x-axis .extent-edit-button{visibility:visible}[_nghost-%COMP%]   .custom-vis[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%]{background:inherit;display:grid;flex-grow:1;height:100%;overflow:hidden;width:100%;grid-template-areas:"yaxis series" "dot xaxis" ". customChartOverlay";grid-template-columns:50px 1fr;grid-auto-rows:1fr 30px 0px}.container.dark-mode[_ngcontent-%COMP%]{color:#fff}.container.line-only-mode[_ngcontent-%COMP%]{grid-template-columns:0 1fr;grid-auto-rows:1fr 0}.series-view[_ngcontent-%COMP%]{grid-area:series;position:relative;overflow:hidden}.series-view[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   line-chart-grid-view[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   line-chart-interactive-view[_ngcontent-%COMP%]{height:100%;left:0;position:absolute;top:0;width:100%}.x-axis[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%], .y-axis[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%]{height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%;-webkit-mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.x-axis[_ngcontent-%COMP%]   line-chart-axis[_ngcontent-%COMP%], .y-axis[_ngcontent-%COMP%]   line-chart-axis[_ngcontent-%COMP%]{height:100%}.x-axis[_ngcontent-%COMP%]{grid-area:xaxis;position:relative}.y-axis[_ngcontent-%COMP%]{grid-area:yaxis}.dot[_ngcontent-%COMP%]{align-items:flex-start;display:flex;grid-area:dot;justify-content:flex-end}.dot[_ngcontent-%COMP%]   .rect[_ngcontent-%COMP%]{height:1px;width:1px;background-color:#aaa}.custom-chart-overlay-vis[_ngcontent-%COMP%]{grid-area:customChartOverlay;grid-row-end:2;grid-row-start:1}'],changeDetection:0}),n})();function sLe(n,t){1&n&&hi(0)}var Wte=function(n){return{$implicit:n}};function lLe(n,t){if(1&n&&(f(0,"div",4),S(1,sLe,1,0,"ng-container",5),T(2),g()),2&n){let e=w(),i=st(6);v(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",Un(3,Wte,e.datum)),v(1),Ve(" ",e.getFormattedDataForColumn()," ")}}function cLe(n,t){1&n&&hi(0)}function dLe(n,t){if(1&n&&(f(0,"div",4),S(1,cLe,1,0,"ng-container",5),T(2),g()),2&n){let e=w(),i=st(6);v(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",Un(3,Wte,e.datum)),v(1),Ve(" ",e.getFormattedDataForColumn()," ")}}function uLe(n,t){if(1&n&&(f(0,"div",6),T(1),g()),2&n){let e=w();v(1),Ve(" ",e.getFormattedDataForColumn()," ")}}function pLe(n,t){1&n&&k(0,"mat-icon",9)}function hLe(n,t){1&n&&k(0,"mat-icon",10)}function mLe(n,t){if(1&n&&(S(0,pLe,1,0,"mat-icon",7),S(1,hLe,1,0,"mat-icon",8)),2&n){let e=t.$implicit;b("ngIf",e>=0),v(1),b("ngIf",e<0)}}var fLe=["*"],m_=(()=>{class n{constructor(){this.contextMenuOpened=new F,this.ColumnHeaderType=gt}getFormattedDataForColumn(){if(void 0===this.datum)return"";switch(this.header.type){case gt.RUN:return this.datum;case gt.VALUE:case gt.STEP:case gt.SMOOTHED:case gt.START_STEP:case gt.END_STEP:case gt.START_VALUE:case gt.END_VALUE:case gt.MIN_VALUE:case gt.MAX_VALUE:case gt.STEP_AT_MAX:case gt.STEP_AT_MIN:case gt.MEAN:case gt.HPARAM:return"number"==typeof this.datum?y0.formatShort(this.datum):this.datum;case gt.TIME:return new Date(this.datum).toISOString();case gt.RELATIVE_TIME:return x0.formatReadable(this.datum);case gt.VALUE_CHANGE:return y0.formatShort(Math.abs(this.datum));case gt.PERCENTAGE_CHANGE:return Math.round(100*this.datum).toString()+"%";case gt.RAW_CHANGE:return dp.formatShort(Math.abs(this.datum));default:return""}}onContextMenuOpened(e){this.contextMenuOpened.emit(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-content-cell"]],hostBindings:function(e,i){1&e&&A("contextmenu",function(o){return i.onContextMenuOpened(o)})},inputs:{header:"header",datum:"datum"},outputs:{contextMenuOpened:"contextMenuOpened"},ngContentSelectors:fLe,decls:7,vars:3,consts:[[3,"ngSwitch"],["class","cell",4,"ngSwitchCase"],["class","cell extra-right-padding",4,"ngSwitchDefault"],["arrow",""],[1,"cell"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cell","extra-right-padding"],["svgIcon","arrow_upward_24px",4,"ngIf"],["svgIcon","arrow_downward_24px",4,"ngIf"],["svgIcon","arrow_upward_24px"],["svgIcon","arrow_downward_24px"]],template:function(e,i){1&e&&(fn(),Gt(0,0),S(1,lLe,3,5,"div",1),S(2,dLe,3,5,"div",1),S(3,uLe,2,1,"div",2),Tt(4),Wt(),S(5,mLe,2,2,"ng-template",null,3,jt)),2&e&&(b("ngSwitch",i.header.type),v(1),b("ngSwitchCase",i.ColumnHeaderType.VALUE_CHANGE),v(1),b("ngSwitchCase",i.ColumnHeaderType.PERCENTAGE_CHANGE))},dependencies:[Ne,eo,mr,kr,du,bn],styles:["[_nghost-%COMP%]{display:table-cell}.cell[_ngcontent-%COMP%]{align-items:center;display:flex}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:12px;width:12px}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]     path{fill:unset}.extra-right-padding[_ngcontent-%COMP%]{padding-right:1px}"],changeDetection:0}),n})(),gLe=["*"],dA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-content-row"]],ngContentSelectors:gLe,decls:1,vars:0,template:function(e,i){1&e&&(fn(),Tt(0))},styles:["[_nghost-%COMP%] {\n        display: table-row;\n      }"],changeDetection:0}),n})();function _Le(n,t){if(1&n&&k(0,"mat-icon",7),2&n){let e=w(2);b("ngClass",e.header.name===e.sortingInfo.name?"show":"show-on-hover")}}function bLe(n,t){if(1&n&&k(0,"mat-icon",8),2&n){let e=w(2);b("ngClass",e.header.name===e.sortingInfo.name?"show":"show-on-hover")}}function vLe(n,t){if(1&n){let e=Te();f(0,"button",4),A("click",function(r){ne(e);let o=w();return r.stopPropagation(),ie(o.headerClickedHandler())}),S(1,_Le,1,1,"mat-icon",5),S(2,bLe,1,1,"mat-icon",6),g()}if(2&n){let e=w();v(1),b("ngIf",e.sortingInfo.order===e.SortingOrder.ASCENDING||e.header.name!==e.sortingInfo.name),v(1),b("ngIf",e.sortingInfo.order===e.SortingOrder.DESCENDING&&e.header.name===e.sortingInfo.name)}}function yLe(n,t){if(1&n){let e=Te();f(0,"button",9),A("click",function(r){return ne(e),ie(w().onContextMenuOpened(r))}),k(1,"mat-icon",10),g()}}var xLe=["*"],f_=(()=>{class n{constructor(){this.disableContextMenu=!1,this.dragStart=new F,this.dragEnd=new F,this.dragEnter=new F,this.headerClicked=new F,this.contextMenuOpened=new F,this.highlightStyle$=new xr({}),this.SortingOrder=Lr}onContextMenuOpened(e){this.disableContextMenu||this.contextMenuOpened.emit(e)}headerClickedHandler(){this.header.sortable&&this.headerClicked.emit(this.header.name)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-header-cell"]],hostBindings:function(e,i){1&e&&A("contextmenu",function(o){return i.onContextMenuOpened(o)})},inputs:{header:"header",sortingInfo:"sortingInfo",disableContextMenu:"disableContextMenu"},outputs:{dragStart:"dragStart",dragEnd:"dragEnd",dragEnter:"dragEnter",headerClicked:"headerClicked",contextMenuOpened:"contextMenuOpened"},ngContentSelectors:xLe,decls:6,vars:7,consts:[[1,"cell",3,"draggable","ngClass","dragstart","dragend","dragenter","click"],[3,"header"],["mat-icon-button","","class","sorting-icon-container",3,"click",4,"ngIf"],["mat-icon-button","","class","context-menu-container show-on-hover",3,"click",4,"ngIf"],["mat-icon-button","",1,"sorting-icon-container",3,"click"],["svgIcon","arrow_upward_24px",3,"ngClass",4,"ngIf"],["svgIcon","arrow_downward_24px",3,"ngClass",4,"ngIf"],["svgIcon","arrow_upward_24px",3,"ngClass"],["svgIcon","arrow_downward_24px",3,"ngClass"],["mat-icon-button","",1,"context-menu-container","show-on-hover",3,"click"],["svgIcon","more_vert_24px"]],template:function(e,i){1&e&&(fn(),f(0,"div",0),A("dragstart",function(){return i.dragStart.emit(i.header)})("dragend",function(){return i.dragEnd.emit()})("dragenter",function(){return i.dragEnter.emit(i.header)})("click",function(){return i.headerClickedHandler()}),U(1,"async"),Tt(2),k(3,"tb-data-table-header",1),S(4,vLe,3,2,"button",2),S(5,yLe,2,0,"button",3),g()),2&e&&(b("draggable",i.header.movable)("ngClass",G(1,5,i.highlightStyle$)),v(3),b("header",i.header),v(1),b("ngIf",i.header.sortable),v(1),b("ngIf",(i.header.removable||i.header.sortable)&&!i.disableContextMenu))},dependencies:[wn,Ne,bn,Er,WT,ct],styles:["[_nghost-%COMP%]{display:table-cell;vertical-align:bottom}[_nghost-%COMP%]:hover   .show-on-hover[_ngcontent-%COMP%]{opacity:.3}[_nghost-%COMP%]   .show-on-hover[_ngcontent-%COMP%]:hover{opacity:1}[_nghost-%COMP%]   .show-on-hover[_ngcontent-%COMP%]:focus{opacity:1}.cell[_ngcontent-%COMP%]{align-items:center;display:flex}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:12px;width:12px;line-height:1}.cell[_ngcontent-%COMP%]   button[mat-icon-button].mat-mdc-icon-button.sorting-icon-container[_ngcontent-%COMP%], .cell[_ngcontent-%COMP%]   button[mat-icon-button].mat-mdc-icon-button.context-menu-container[_ngcontent-%COMP%]{width:16px;height:16px;--tb-icon-width: 12px;--tb-icon-height: 12px;border-radius:5px;font-size:12px;padding:4px}.cell[_ngcontent-%COMP%]   .sorting-icon-container[_ngcontent-%COMP%]     path{fill:unset}.show[_ngcontent-%COMP%]{opacity:1}.show-on-hover[_ngcontent-%COMP%]{opacity:0}.highlight[_ngcontent-%COMP%]{background-color:#eee}.highlight-border-right[_ngcontent-%COMP%]{border-right:2px solid #ff9800}.highlight-border-left[_ngcontent-%COMP%]{border-left:2px solid #ff9800}"],changeDetection:0}),n})(),uA=(()=>{class n{constructor(e){this.overlay=e,this.customModalRefs=[]}createNextToElement(e,i,r,o={originX:"end",originY:"top",overlayX:"start",overlayY:"top"}){let a=this.overlay.position().flexibleConnectedTo(i);o&&(a=a.withPositions([o]));let s=this.overlay.create({positionStrategy:a,hasBackdrop:!1});s.attach(new To(e,r));let l=new class{constructor(t){this.subscriptions=[],this.onClose=new Ee,this.overlayRef=t}}(s);this.customModalRefs.push(l);let c=s.outsidePointerEvents().subscribe(u=>{"auxclick"!==u.type&&this.customModalRefs.every(p=>!function(n,t){let e=t.getBoundingClientRect();return e.x<=n.clientX&&n.clientX<=e.x+e.width&&e.y<=n.clientY&&n.clientY<=e.y+e.height}(u,p.overlayRef.overlayElement))&&this.closeAll()});l.subscriptions.push(c);let d=s.keydownEvents().subscribe(u=>{"Escape"===u.key&&this.closeAll()});return l.subscriptions.push(d),l}close(e){let i=this.customModalRefs.findIndex(r=>r===e);-1!==i?(e.subscriptions.forEach(r=>{r.unsubscribe()}),e.subscriptions=[],e.overlayRef?.dispose(),this.customModalRefs.splice(i,1),e.onClose.next(),e.onClose.complete()):console.warn("Could not find customModalRef",e)}closeAll(){for(;this.customModalRefs.length;)this.close(this.customModalRefs[0])}}return n.\u0275fac=function(e){return new(e||n)(O(Oi))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),CLe=["search"],MLe=["columnList"];function wLe(n,t){if(1&n){let e=Te();f(0,"div",10)(1,"label"),T(2," Warning: There were too many columns to load all of them efficiently. "),g(),f(3,"button",11),A("click",function(){return ne(e),ie(w().loadAllColumnsClicked())}),T(4," Load all anyway "),g()()}}function SLe(n,t){if(1&n&&(f(0,"span",14),T(1),g()),2&n){let e=t.$implicit;v(1),Ve(" ",e," ")}}var ELe=function(n){return{selected:n}},TLe=function(){return{sensitivity:"accent"}};function DLe(n,t){if(1&n){let e=Te();f(0,"button",12),A("click",function(){let o=ne(e).$implicit;return ie(w().selectColumn(o))}),U(1,"async"),T(2),S(3,SLe,2,1,"span",13),g()}if(2&n){let e=t.$implicit,i=t.index,r=w();b("ngClass",Un(7,ELe,i===G(1,5,r.selectedIndex$)))("matTooltip",e.name)("matTooltipDisabled",0===e.name.localeCompare(e.displayName,void 0,mc(9,TLe))),v(2),Ve(" ",e.displayName," "),v(1),b("ngForOf",e.tags)}}var Zte=(()=>{class n{constructor(){this.selectableColumns=[],this.columnSelected=new F,this.loadAllColumns=new F,this.searchInput="",this.selectedIndex$=new xr(0),this.isActive=!1}ngOnInit(){this.selectedIndex$.subscribe(()=>{if(!this.columnList)return;let e=this.columnList.nativeElement.querySelector("button.selected");if(!e)return;let i=this.columnList.nativeElement.getBoundingClientRect().height,r=e.getBoundingClientRect().height,o=this.columnList.nativeElement.scrollTop;this.selectedIndex$.getValue()*r<o&&(this.columnList.nativeElement.scrollTop=this.selectedIndex$.getValue()*r),(this.selectedIndex$.getValue()+1)*r>o+i&&(this.columnList.nativeElement.scrollTop=(this.selectedIndex$.getValue()+1)*r-i)})}ngAfterViewInit(){this.searchInput="",this.selectedIndex$.next(0),this.activate(),setTimeout(()=>{this.searchField?.nativeElement.focus()})}getFilteredColumns(){return this.selectableColumns.filter(e=>e.name.toLowerCase().match(this.searchInput.toLowerCase())||e.displayName.toLowerCase().match(this.searchInput.toLowerCase()))}searchInputChanged(){this.selectedIndex$.next(Math.min(this.selectedIndex$.getValue(),this.selectableColumns.length-1))}selectColumn(e){this.selectedIndex$.next(0),this.columnSelected.emit(e)}loadAllColumnsClicked(){this.loadAllColumns.emit()}activate(){this.isActive=!0}deactivate(){this.isActive=!1}onUpArrow(){!this.isActive||this.selectedIndex$.next(Math.max(this.selectedIndex$.getValue()-1,0))}onDownArrow(){!this.isActive||this.selectedIndex$.next(Math.min(this.selectedIndex$.getValue()+1,this.getFilteredColumns().length-1))}onEnterPressed(){!this.isActive||this.selectColumn(this.getFilteredColumns()[this.selectedIndex$.getValue()])}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-column-selector-component"]],viewQuery:function(e,i){if(1&e&&(Ue(CLe,5),Ue(MLe,5)),2&e){let r;be(r=ve())&&(i.searchField=r.first),be(r=ve())&&(i.columnList=r.first)}},hostBindings:function(e,i){1&e&&A("keydown.arrowup",function(o){return i.onUpArrow(o)},0,su)("keydown.arrowdown",function(o){return i.onDownArrow(o)},!1,su)("keydown.enter",function(o){return i.onEnterPressed(o)},!1,su)},inputs:{selectableColumns:"selectableColumns",numColumnsLoaded:"numColumnsLoaded",hasMoreColumnsToLoad:"hasMoreColumnsToLoad"},outputs:{columnSelected:"columnSelected",loadAllColumns:"loadAllColumns"},decls:14,vars:4,consts:[[1,"contents"],["subscriptSizing","dynamic",1,"search-area"],["matPrefix","","svgIcon","search_24px",1,"search-icon"],["matInput","",3,"ngModel","ngModelChange"],["search",""],[1,"column-load-info"],["class","load-more-columns",4,"ngIf"],[1,"column-list"],["columnList",""],["mat-button","","class","column-button",3,"ngClass","matTooltip","matTooltipDisabled","click",4,"ngFor","ngForOf"],[1,"load-more-columns"],["mat-stroked-button","",3,"click"],["mat-button","",1,"column-button",3,"ngClass","matTooltip","matTooltipDisabled","click"],["class","tag",4,"ngFor","ngForOf"],[1,"tag"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"mat-form-field",1),k(2,"mat-icon",2),f(3,"mat-label"),T(4,"Search"),g(),f(5,"input",3,4),A("ngModelChange",function(o){return i.searchInput=o})("ngModelChange",function(){return i.searchInputChanged()}),g()(),f(7,"div",5)(8,"label"),T(9),g(),S(10,wLe,5,0,"div",6),g(),f(11,"div",7,8),S(13,DLe,4,10,"button",9),g()()),2&e&&(v(5),b("ngModel",i.searchInput),v(4),Ve("",i.numColumnsLoaded," columns loaded."),v(1),b("ngIf",i.hasMoreColumnsToLoad),v(3),b("ngForOf",i.getFilteredColumns()))},dependencies:[wn,nn,Ne,bn,qu,Pc,nl,F9,ki,Uu,xg,iy,GT,ct],styles:[".contents[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:8px;border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .contents[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .contents[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.contents[_ngcontent-%COMP%]   .search-area[_ngcontent-%COMP%]{margin-bottom:12px}.contents[_ngcontent-%COMP%]   .column-load-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-size:13px;font-style:italic;margin-bottom:12px}.contents[_ngcontent-%COMP%]   .load-more-columns[_ngcontent-%COMP%]{color:#e53935;display:flex;flex-direction:column;margin-top:6px}.contents[_ngcontent-%COMP%]   .load-more-columns[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:inherit;font-size:inherit;height:24px;margin-top:8px}.contents[_ngcontent-%COMP%]   .column-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto}.contents[_ngcontent-%COMP%]   .column-button[_ngcontent-%COMP%]{flex-shrink:0;height:48px;justify-content:left;width:100%}.contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%]{background-color:#eee}body.dark-mode[_nghost-%COMP%]   .contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%]{background-color:#bdbdbd}.contents[_ngcontent-%COMP%]   .tag[_ngcontent-%COMP%]{background-color:#ff9800;border-radius:8px;font-size:12px;font-style:italic;font-weight:normal;padding:4px}"],changeDetection:0}),n})(),ALe=["panel"];function RLe(n,t){if(1&n&&(f(0,"div",0,1),Tt(2),g()),2&n){let e=t.id,i=w();b("id",i.id)("ngClass",i._classList)("@panelAnimation",i.isOpen?"visible":"hidden"),Be("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var PLe=["*"],kLe=fr("panelAnimation",[Si("void, hidden",rn({opacity:0,transform:"scaleY(0.8)"})),bi(":enter, hidden => visible",[Lb([Mi("0.03s linear",rn({opacity:1})),Mi("0.12s cubic-bezier(0, 0, 0.2, 1)",rn({transform:"scaleY(1)"}))])]),bi(":leave, visible => hidden",[Mi("0.075s linear",rn({opacity:0}))])]),OLe=0,FLe=go(class{}),Kte=new te("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1}}}),LLe=(()=>{class n extends FLe{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._setThemeClasses(this._classList)}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=vt(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=vt(e)}set classList(e){this._classList=e&&e.length?function(n,t=/\s+/){let e=[];if(null!=n){let i=Array.isArray(n)?n:`${n}`.split(t);for(let r of i){let o=`${r}`.trim();o&&e.push(o)}}return e}(e).reduce((i,r)=>(i[r]=!0,i),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}constructor(e,i,r,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._defaults=r,this._activeOptionChanges=En.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this._autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this._autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.optionSelected=new F,this.opened=new F,this.closed=new F,this.optionActivated=new F,this._classList={},this.id="mat-autocomplete-"+OLe++,this.inertGroups=o?.SAFARI||!1}ngAfterContentInit(){this._keyManager=new lg(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new class{constructor(t,e){this.source=t,this.option=e}}(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}_setThemeClasses(e){e["mat-primary"]="primary"===this._color,e["mat-warn"]="warn"===this._color,e["mat-accent"]="accent"===this._color}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(xe),C(Kte),C(Vn))},n.\u0275dir=Me({type:n,viewQuery:function(e,i){if(1&e&&(Ue(oi,7),Ue(ALe,5)),2&e){let r;be(r=ve())&&(i.template=r.first),be(r=ve())&&(i.panel=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",autoSelectActiveOption:"autoSelectActiveOption",panelWidth:"panelWidth",classList:["class","classList"]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Xe]}),n})(),Jte=(()=>{class n extends LLe{constructor(){super(...arguments),this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=vt(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,jv,5),Bn(r,ja,5)),2&e){let o;be(o=ve())&&(i.optionGroups=o),be(o=ve())&&(i.options=o)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{disableRipple:"disableRipple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matAutocomplete"],features:[Vt([{provide:Uv,useExisting:n}]),Xe],ngContentSelectors:PLe,decls:1,vars:0,consts:[["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"],["panel",""]],template:function(e,i){1&e&&(fn(),S(0,RLe,3,5,"ng-template"))},dependencies:[wn],styles:[".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mdc-menu-surface.mat-mdc-autocomplete-panel{width:100%;max-height:256px;position:static;visibility:hidden;transform-origin:center top;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-autocomplete-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) .mdc-menu-surface.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above .mdc-menu-surface.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[kLe]},changeDetection:0}),n})(),BLe={provide:Xr,useExisting:Wn(()=>Kx),multi:!0},$te=new te("mat-autocomplete-scroll-strategy"),HLe={provide:$te,deps:[Oi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},zLe=(()=>{class n{get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=vt(e)}constructor(e,i,r,o,a,s,l,c,d,u,p){this._element=e,this._overlay=i,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=a,this._dir=l,this._formField=c,this._document=d,this._viewportRuler=u,this._defaults=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=En.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Ee,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=is(()=>{let h=this.autocomplete?this.autocomplete.options:null;return h?h.changes.pipe(kn(h),Jn(()=>tn(...h.map(m=>m.onSelectionChange)))):this._zone.onStable.pipe(Lt(1),Jn(()=>this.optionSelections))}),this._scrollStrategy=s}ngAfterViewInit(){let e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return tn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Oe(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Oe(()=>this._overlayAttached)):$t()).pipe(q(e=>e instanceof zv?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return tn(Ei(this._document,"click"),Ei(this._document,"auxclick"),Ei(this._document,"touchend")).pipe(Oe(e=>{let i=bs(e),r=this._formField?this._formField._elementRef.nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&i!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(i))&&(!o||!o.contains(i))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(i)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e.keyCode,r=Or(e);if(27===i&&!r&&e.preventDefault(),this.activeOption&&13===i&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,a=38===i||40===i;9===i||a&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):a&&this._canOpen()&&this.openPanel(),(a||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._element.nativeElement.value),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,r=i.value;"number"===i.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r&&(this._previousValue=r,this._pendingAutoselectedOption=null,this._onChange(r),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this.openPanel()}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return tn(this._zone.onStable.pipe(Lt(1)),this.autocomplete.options.changes.pipe(Dt(()=>this._positionStrategy.reapplyLastPosition()),Rs(0))).pipe(Jn(()=>(this._zone.run(()=>{let r=this.panelOpen;this._resetActiveItem(),this.autocomplete._setVisibility(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this.autocomplete.opened.emit():this.autocomplete.closed.emit())}),this.panelClosingActions)),Lt(1)).subscribe(r=>this._setValueAndClose(r))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_assignOptionValue(e){let i=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e;this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=e?e.source:this._pendingAutoselectedOption;i&&(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),this.autocomplete._emitSelectEvent(i),this._element.nativeElement.focus()),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(i=>{i!==e&&i.selected&&i.deselect()})}_attachOverlay(){let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new To(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,this._handleOverlayEvents(e),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());let i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new el({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let a,i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];a="above"===this.position?o:"below"===this.position?i:[...i,...o],e.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){let i=this.autocomplete,r=z1(e,i.options,i.optionGroups);if(0===e&&1===r)i._setScrollTop(0);else if(i.panel){let o=i.options.toArray()[e];if(o){let a=o._getHostElement(),s=U1(a.offsetTop,a.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(s)}}}_handleOverlayEvents(e){e.keydownEvents().subscribe(i=>{(27===i.keyCode&&!Or(i)||38===i.keyCode&&Or(i,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),i.stopPropagation(),i.preventDefault())}),e.outsidePointerEvents().subscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Oi),C(ei),C(ot),C(Qt),C($te),C(zi,8),C(Ph,9),C(Nt,8),C(Wa),C(Kte,8))},n.\u0275dir=Me({type:n,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[qt]}),n})(),Kx=(()=>{class n extends zLe{constructor(){super(...arguments),this._aboveClass="mat-mdc-autocomplete-panel-above"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(e,i){1&e&&A("focusin",function(){return i._handleFocus()})("blur",function(){return i._onTouched()})("input",function(o){return i._handleInput(o)})("keydown",function(o){return i._handleKeydown(o)})("click",function(){return i._handleClick()}),2&e&&Be("autocomplete",i.autocompleteAttribute)("role",i.autocompleteDisabled?null:"combobox")("aria-autocomplete",i.autocompleteDisabled?null:"list")("aria-activedescendant",i.panelOpen&&i.activeOption?i.activeOption.id:null)("aria-expanded",i.autocompleteDisabled?null:i.panelOpen.toString())("aria-owns",i.autocompleteDisabled||!i.panelOpen||null==i.autocomplete?null:i.autocomplete.id)("aria-haspopup",i.autocompleteDisabled?null:"listbox")},exportAs:["matAutocompleteTrigger"],features:[Vt([BLe]),Xe]}),n})(),pA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[HLe],imports:[Do,mg,dn,De,Ic,mg,dn]}),n})(),g_=(()=>{class n{constructor(){this.value="",this.placeholder=""}onInputKeyUp(e){"Enter"===e.key&&this.autocompleteTrigger.closePanel()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-filter-input"]],viewQuery:function(e,i){if(1&e&&Ue(Kx,5),2&e){let r;be(r=ve())&&(i.autocompleteTrigger=r.first)}},inputs:{value:"value",matAutocomplete:"matAutocomplete",placeholder:"placeholder"},decls:2,vars:4,consts:[["svgIcon","search_24px"],["type","text","autocomplete","off",3,"placeholder","matAutocomplete","matAutocompleteDisabled","value","keyup"]],template:function(e,i){1&e&&(k(0,"mat-icon",0),f(1,"input",1),A("keyup",function(o){return i.onInputKeyUp(o)}),g()),2&e&&(v(1),b("placeholder",i.placeholder)("matAutocomplete",i.matAutocomplete)("matAutocompleteDisabled",!i.matAutocomplete)("value",i.value))},dependencies:[Kx,bn],styles:["[_nghost-%COMP%]{display:flex;font-size:13px;min-width:210px}mat-icon[_ngcontent-%COMP%]{color:#616161;flex:none;margin-right:5px}body.dark-mode[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}input[_ngcontent-%COMP%]{background-color:inherit;caret-color:currentColor;color:currentColor;font:inherit;border:none;outline:none;padding:0;flex-grow:1}"]}),n})(),ULe=["container"],Jx=(()=>(function(n){n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT"}(Jx||(Jx={})),Jx))(),tne=(()=>{class n{constructor(){this.tickCount=20,this.enabled=!0,this.rangeValuesChanged=new F,this.singleValueChanged=new F,this.Position=Jx}thumbDrag(){this.rangeValuesChanged.emit({lowerValue:this.lowerValue,upperValue:this.upperValue,source:"SLIDER"})}calculateStepSize(){return null===this.tickCount||this.tickCount<=0?1:(this.max-this.min)/this.tickCount}getClippedValue(e){return Math.min(Math.max(e,this.min),this.max)}maybeNotifyNextRangeValues(e,i){let[r,o]=e.sort((a,s)=>a-s);(this.lowerValue!==r||this.upperValue!==o)&&this.rangeValuesChanged.emit({lowerValue:r,upperValue:o,source:i})}handleInputChange(e,i){let o=this.getClippedValue(Number(e.target.value));isNaN(o)||this.maybeNotifyNextRangeValues(i===Jx.LEFT?[o,this.upperValue]:[this.lowerValue,o],"TEXT")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-range-input"]],viewQuery:function(e,i){if(1&e&&Ue(ULe,5,xe),2&e){let r;be(r=ve())&&(i.container=r.first)}},inputs:{min:"min",max:"max",lowerValue:"lowerValue",upperValue:"upperValue",tickCount:"tickCount",enabled:"enabled"},outputs:{rangeValuesChanged:"rangeValuesChanged",singleValueChanged:"singleValueChanged"},decls:5,vars:9,consts:[["type","number",1,"lower-input",3,"disabled","value","change"],["type","number",1,"upper-input",3,"disabled","value","change"],[1,"slider",3,"min","max","step"],["matSliderStartThumb","",3,"ngModel","valueChange","ngModelChange"],["matSliderEndThumb","",3,"ngModel","valueChange","ngModelChange"]],template:function(e,i){1&e&&(f(0,"input",0),A("change",function(o){return i.handleInputChange(o,i.Position.LEFT)}),g(),f(1,"input",1),A("change",function(o){return i.handleInputChange(o,i.Position.RIGHT)}),g(),f(2,"mat-slider",2)(3,"input",3),A("valueChange",function(){return i.thumbDrag()})("ngModelChange",function(o){return i.lowerValue=o}),g(),f(4,"input",4),A("valueChange",function(){return i.thumbDrag()})("ngModelChange",function(o){return i.upperValue=o}),g()()),2&e&&(b("disabled",!i.enabled)("value",i.lowerValue),v(1),b("disabled",!i.enabled)("value",i.upperValue),v(1),b("min",i.min)("max",i.max)("step",i.calculateStepSize()),v(1),b("ngModel",i.lowerValue),v(1),b("ngModel",i.upperValue))},dependencies:[Ju,vN,Uu,xg,iy],styles:['[_nghost-%COMP%]{box-sizing:border-box;display:inline-grid;grid-gap:10px;grid-template-areas:"lower-input upper-input" "slider slider";grid-template-columns:1fr 1fr;font-size:0;min-width:100px}input[_ngcontent-%COMP%]{background-color:inherit;border-style:solid;box-sizing:border-box;color:inherit;overflow:hidden;width:100%}.lower-input[_ngcontent-%COMP%]{grid-area:lower-input}.upper-input[_ngcontent-%COMP%]{grid-area:upper-input;justify-self:flex-end}.slider[_ngcontent-%COMP%]{grid-area:slider}'],changeDetection:0}),n})();function GLe(n,t){if(1&n){let e=Te();f(0,"tb-filter-input",9),A("keyup",function(r){return ne(e),ie(w(2).discreteValueKeyUp(r))}),g()}2&n&&b("value",w(2).discreteValueFilter)}function WLe(n,t){1&n&&(f(0,"div",10),T(1," No Matching Values "),g())}function qLe(n,t){if(1&n){let e=Te();f(0,"div",13),A("click",function(r){return r.stopPropagation()}),f(1,"mat-checkbox",3),A("change",function(){let o=ne(e).$implicit;return ie(w(3).discreteFilterChanged.emit(o))}),f(2,"span"),T(3),g()()()}if(2&n){let e=t.$implicit,i=w(3);v(1),b("checked",i.filter.filterValues.includes(e)),v(2),kt(e)}}function XLe(n,t){if(1&n&&(f(0,"div",11),S(1,qLe,4,2,"div",12),g()),2&n){let e=w(2);v(1),b("ngForOf",e.getPossibleValues())}}function YLe(n,t){if(1&n&&(f(0,"div",4)(1,"div",5),S(2,GLe,1,1,"tb-filter-input",6),g(),S(3,WLe,2,0,"div",7),S(4,XLe,2,1,"div",8),g()),2&n){let e=w();v(2),b("ngIf",e.filter.possibleValues),v(1),b("ngIf",!e.getPossibleValues().length),v(1),b("ngIf",e.getPossibleValues().length)}}function QLe(n,t){if(1&n){let e=Te();f(0,"div",14),A("click",function(r){return r.stopPropagation()}),f(1,"tb-range-input",15),A("rangeValuesChanged",function(r){return ne(e),ie(w().intervalFilterChanged.emit(r))}),g()()}if(2&n){let e=w();v(1),b("min",e.filter.minValue)("max",e.filter.maxValue)("lowerValue",e.filter.filterLowerValue)("upperValue",e.filter.filterUpperValue)}}var hA=(()=>{class n{constructor(){this.DomainType=io,this.discreteValueFilter="",this.discreteFilterChanged=new F,this.intervalFilterChanged=new F,this.includeUndefinedToggled=new F}getPossibleValues(){let e=this.filter.possibleValues??[];return this.discreteValueFilter?e.filter(i=>i.toString().match(this.discreteValueFilter)):e}discreteValueKeyUp(e){this.discreteValueFilter=e.target.value}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-filter"]],inputs:{filter:"filter"},outputs:{discreteFilterChanged:"discreteFilterChanged",intervalFilterChanged:"intervalFilterChanged",includeUndefinedToggled:"includeUndefinedToggled"},decls:5,vars:3,consts:[[1,"filter-dialog"],["class","filter-container",4,"ngIf"],["class","filter-container","disableRipple","",3,"click",4,"ngIf"],[3,"checked","change"],[1,"filter-container"],[1,"input-container"],["placeholder","Filter Discrete Values (regex)",3,"value","keyup",4,"ngIf"],["class","no-matches",4,"ngIf"],["class","discrete-filters-container",4,"ngIf"],["placeholder","Filter Discrete Values (regex)",3,"value","keyup"],[1,"no-matches"],[1,"discrete-filters-container"],["class","discrete-value",3,"click",4,"ngFor","ngForIndex","ngForOf"],[1,"discrete-value",3,"click"],["disableRipple","",1,"filter-container",3,"click"],[1,"range-input",3,"min","max","lowerValue","upperValue","rangeValuesChanged"]],template:function(e,i){1&e&&(f(0,"div",0),S(1,YLe,5,3,"div",1),S(2,QLe,2,4,"div",2),f(3,"mat-checkbox",3),A("change",function(){return i.includeUndefinedToggled.emit()}),T(4,"Include Undefined"),g()()),2&e&&(v(1),b("ngIf",i.filter.type===i.DomainType.DISCRETE),v(1),b("ngIf",i.filter.type===i.DomainType.INTERVAL),v(1),b("checked",i.filter.includeUndefined))},dependencies:[nn,Ne,xs,g_,tne],styles:[".filter-dialog[_ngcontent-%COMP%]{padding:16px 8px;border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .filter-dialog[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-dialog[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.input-container[_ngcontent-%COMP%]{margin-bottom:8px}.discrete-filters-container[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto}.no-matches[_ngcontent-%COMP%]{padding:8px 12px}.filter-container[_ngcontent-%COMP%]{padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .filter-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-container[_ngcontent-%COMP%]{border-bottom-color:#555}.range-input[_ngcontent-%COMP%]{padding:4px 8px;width:200px}.discrete-value[_ngcontent-%COMP%]{overflow:hidden}.discrete-value[_ngcontent-%COMP%]     mat-checkbox, .discrete-value[_ngcontent-%COMP%]     .mdc-form-field, .discrete-value[_ngcontent-%COMP%]     label{width:100%}"]}),n})();function ZLe(n,t){1&n&&(f(0,"div",5),T(1," No Actions Available "),g())}function KLe(n,t){if(1&n){let e=Te();f(0,"button",6),A("click",function(){return ne(e),ie(w().contextMenuRemoveColumn())}),k(1,"mat-icon",7),T(2,"Remove "),g()}}function JLe(n,t){if(1&n){let e=Te();f(0,"button",8),A("click",function(){ne(e);let r=w();return ie(r.sortByHeader.emit(null==r.contextMenuHeader?null:r.contextMenuHeader.name))}),k(1,"mat-icon",9),T(2,"Sort Descending "),g()}}function $Le(n,t){if(1&n){let e=Te();f(0,"button",8),A("click",function(){ne(e);let r=w();return ie(r.sortByHeader.emit(null==r.contextMenuHeader?null:r.contextMenuHeader.name))}),k(1,"mat-icon",10),T(2,"Sort Ascending "),g()}}function e3e(n,t){if(1&n){let e=Te();f(0,"button",6),A("click",function(r){return ne(e),ie(w().openFilterMenu.emit(r))}),k(1,"mat-icon",11),T(2," Filter "),g()}}function t3e(n,t){if(1&n){let e=Te();f(0,"button",6),A("click",function(r){ne(e);let o=w();return ie(o.openColumnSelector.emit({event:r,insertTo:o.Side.LEFT,isSubMenu:!0}))}),k(1,"mat-icon",12),T(2,"Insert Column Left "),g()}}function n3e(n,t){if(1&n){let e=Te();f(0,"button",6),A("click",function(r){ne(e);let o=w();return ie(o.openColumnSelector.emit({event:r,insertTo:o.Side.RIGHT,isSubMenu:!0}))}),k(1,"mat-icon",12),T(2,"Insert Column Right "),g()}}var ine=(()=>{class n{constructor(){this.contextMenuHeader=void 0,this.removeColumn=new F,this.sortByHeader=new F,this.openFilterMenu=new F,this.openColumnSelector=new F,this.Side=mo,this.SortingOrder=Lr}isContextMenuEmpty(){return!(this.contextMenuHeader?.removable||this.contextMenuHeader?.sortable||this.canContextMenuInsert()||this.contextMenuHeader?.filterable)}canContextMenuInsert(){return this.selectableColumns?.length&&this.contextMenuHeader?.movable&&"HPARAM"===this.contextMenuHeader?.type}contextMenuRemoveColumn(){void 0!==this.contextMenuHeader&&this.removeColumn.emit(this.contextMenuHeader)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tb-data-table-context-menu"]],inputs:{contextMenuHeader:"contextMenuHeader",selectableColumns:"selectableColumns",sortingInfo:"sortingInfo"},outputs:{removeColumn:"removeColumn",sortByHeader:"sortByHeader",openFilterMenu:"openFilterMenu",openColumnSelector:"openColumnSelector"},decls:8,vars:7,consts:[[1,"context-menu"],["class","no-actions-message",4,"ngIf"],["class","context-menu-button","mat-button","",3,"click",4,"ngIf"],["class","context-menu-button sort-button","mat-button","",3,"click",4,"ngIf"],["mat-button","","class","context-menu-button",3,"click",4,"ngIf"],[1,"no-actions-message"],["mat-button","",1,"context-menu-button",3,"click"],["svgIcon","close_24px"],["mat-button","",1,"context-menu-button","sort-button",3,"click"],["svgIcon","arrow_downward_24px"],["svgIcon","arrow_upward_24px"],["svgIcon","filter_alt_24px"],["svgIcon","add_24px"]],template:function(e,i){1&e&&(f(0,"div",0),S(1,ZLe,2,0,"div",1),S(2,KLe,3,0,"button",2),S(3,JLe,3,0,"button",3),S(4,$Le,3,0,"button",3),S(5,e3e,3,0,"button",2),S(6,t3e,3,0,"button",4),S(7,n3e,3,0,"button",4),g()),2&e&&(v(1),b("ngIf",i.isContextMenuEmpty()),v(1),b("ngIf",null==i.contextMenuHeader?null:i.contextMenuHeader.removable),v(1),b("ngIf",(null==i.contextMenuHeader?null:i.contextMenuHeader.sortable)&&i.sortingInfo.order===i.SortingOrder.ASCENDING&&i.sortingInfo.name===(null==i.contextMenuHeader?null:i.contextMenuHeader.name)),v(1),b("ngIf",(null==i.contextMenuHeader?null:i.contextMenuHeader.sortable)&&(i.sortingInfo.order!==i.SortingOrder.ASCENDING||i.sortingInfo.name!==(null==i.contextMenuHeader?null:i.contextMenuHeader.name))),v(1),b("ngIf",null==i.contextMenuHeader?null:i.contextMenuHeader.filterable),v(1),b("ngIf",i.canContextMenuInsert()),v(1),b("ngIf",i.canContextMenuInsert()))},dependencies:[Ne,bn,ki],styles:[".context-menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .context-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .context-menu[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.context-menu[_ngcontent-%COMP%]   .context-menu-button[_ngcontent-%COMP%]{justify-content:left;width:100%;text-wrap:nowrap}.context-menu[_ngcontent-%COMP%]   .no-actions-message[_ngcontent-%COMP%]{padding:8px;text-wrap:nowrap}.context-menu[_ngcontent-%COMP%]   .sort-button[_ngcontent-%COMP%]     path{fill:unset}"],changeDetection:0}),n})(),r3e=["contextMenuTemplate"],o3e=["filterModalTemplate"],a3e=["columnSelectorModalTemplate"];function s3e(n,t){if(1&n){let e=Te();f(0,"tb-data-table-context-menu",9),A("removeColumn",function(r){return ne(e),ie(w().onRemoveColumn(r))})("sortByHeader",function(r){return ne(e),ie(w().sortByHeader(r))})("openFilterMenu",function(r){return ne(e),ie(w().openFilterMenu(r))})("openColumnSelector",function(r){return ne(e),ie(w().openColumnSelector(r))}),g()}if(2&n){let e=w();b("contextMenuHeader",e.contextMenuHeader)("selectableColumns",e.selectableColumns)("sortingInfo",e.sortingInfo)}}function l3e(n,t){if(1&n){let e=Te();f(0,"tb-data-table-column-selector-component",10),A("columnSelected",function(r){return ne(e),ie(w().onColumnAdded(r))})("loadAllColumns",function(){return ne(e),ie(w().loadAllColumns.emit())}),g()}if(2&n){let e=w();b("selectableColumns",e.selectableColumns)("numColumnsLoaded",e.numColumnsLoaded)("hasMoreColumnsToLoad",e.hasMoreColumnsToLoad)}}function c3e(n,t){if(1&n){let e=Te();f(0,"tb-data-table-filter",11),A("intervalFilterChanged",function(r){return ne(e),ie(w().intervalFilterChanged(r))})("discreteFilterChanged",function(r){return ne(e),ie(w().discreteFilterChanged(r))})("includeUndefinedToggled",function(){return ne(e),ie(w().includeUndefinedToggled())}),g()}2&n&&b("filter",w().getCurrentColumnFilter())}function d3e(n,t){if(1&n){let e=Te();f(0,"div",12)(1,"div",13)(2,"button",14),A("click",function(r){return ne(e),ie(w().openColumnSelector({event:r}))}),k(3,"mat-icon",15),g()()()}if(2&n){let e=w();v(1),nt("small-add-button",e.addColumnSize===e.AddColumnSize.SMALL)}}function u3e(n,t){1&n&&(f(0,"div",16),k(1,"mat-spinner",17),g())}var p3e=[[["","header",""]],[["","content",""]]],h3e=["[header]","[content]"],xV=function(n){n.preventDefault()},mA=(()=>{class n{constructor(e,i){this.customModal=e,this.viewContainerRef=i,this.loading=!1,this.shouldAddBorders=!1,this.addColumnSize=vu.DEFAULT,this.headerCellSubscriptions=[],this.contentCellSubscriptions=[],this.contextMenuHeader=void 0,this.insertColumnTo=void 0,this.filterColumn=void 0,this.sortDataBy=new F,this.orderColumns=new F,this.removeColumn=new F,this.addColumn=new F,this.addFilter=new F,this.loadAllColumns=new F,this.highlightSide=mo.RIGHT,this.SortingOrder=Lr,this.Side=mo,this.AddColumnSize=vu}ngOnDestroy(){document.removeEventListener("dragover",xV),this.headerCellSubscriptions.forEach(e=>{e.unsubscribe()})}ngAfterContentInit(){this.syncHeaders(),this.headerCells.changes.subscribe(this.syncHeaders.bind(this)),this.syncContent(),this.contentCells.changes.subscribe(this.syncContent.bind(this))}syncHeaders(){this.headerCellSubscriptions.forEach(e=>{e.unsubscribe()}),this.headerCellSubscriptions=[],this.headerCells.forEach(e=>{this.headerCellSubscriptions.push(e.dragStart.subscribe(this.dragStart.bind(this)),e.dragEnter.subscribe(this.dragEnter.bind(this)),e.dragEnd.subscribe(this.dragEnd.bind(this)),e.headerClicked.subscribe(this.sortByHeader.bind(this)),e.contextMenuOpened.subscribe(this.openContextMenu.bind(this,e.header)))})}syncContent(){this.contentCellSubscriptions.forEach(e=>{e.unsubscribe()}),this.contentCellSubscriptions=this.contentCells.map(e=>[e.contextMenuOpened.subscribe(this.openContextMenu.bind(this,e.header))]).flat()}sortByHeader(e){this.sortDataBy.emit(this.sortingInfo.name!==e||this.sortingInfo.order!==Lr.ASCENDING?{name:e,order:Lr.ASCENDING}:{name:e,order:Lr.DESCENDING})}dragStart(e){this.draggingHeaderName=e.name,document.addEventListener("dragover",xV)}dragEnd(){if(!this.draggingHeaderName||!this.highlightedColumnName)return;let e=this.getHeaderByName(this.draggingHeaderName),i=this.getHeaderByName(this.highlightedColumnName);e&&i&&e!==i&&this.orderColumns.emit({source:e,destination:i,side:this.highlightSide}),this.draggingHeaderName=void 0,this.highlightedColumnName=void 0,document.removeEventListener("dragover",xV),this.headerCells.forEach(r=>{r.highlightStyle$.next({})})}dragEnter(e){if(!this.draggingHeaderName||-1===this.getIndexOfHeaderWithName(e.name))return;let i=this.getHeaderByName(this.draggingHeaderName);i&&kl.columnToGroup(e)!==kl.columnToGroup(i)||(this.highlightSide=this.getIndexOfHeaderWithName(e.name)<this.getIndexOfHeaderWithName(this.draggingHeaderName)?mo.LEFT:mo.RIGHT,this.highlightedColumnName=e.name,this.headerCells.forEach(r=>{r.highlightStyle$.next(this.getHeaderHighlightStyle(r.header.name))}))}moveHeader(e,i){let r=[...this.headers];return r.splice(e,1),r.splice(i,0,this.headers[e]),r}getHeaderHighlightStyle(e){return e!==this.highlightedColumnName?{}:{highlight:!0,"highlight-border-right":this.highlightSide===mo.RIGHT,"highlight-border-left":this.highlightSide===mo.LEFT}}getHeaderByName(e){return this.headers.find(i=>i.name===e)}getIndexOfHeaderWithName(e){return this.headers.findIndex(i=>e===i.name)}openContextMenu(e,i){i.stopPropagation(),i.preventDefault(),this.contextMenuHeader=e;let o=i.target.querySelector("button.context-menu-container")??i.target;this.customModal.createNextToElement(this.contextMenuTemplate,o,this.viewContainerRef)}openColumnSelector({event:e,insertTo:i}){e.stopPropagation(),this.closeSubmenus(),this.insertColumnTo=i,this.columnSelectorModalRef=this.customModal.createNextToElement(this.columnSelectorModalTemplate,e.target.closest("button"),this.viewContainerRef),this.columnSelectorModalRef?.onClose.pipe(zm()).subscribe(()=>{this.columnSelectorModalRef=void 0})}canContextMenuRemoveColumn(){return this.contextMenuHeader?.removable}onRemoveColumn(e){this.removeColumn.emit(e),this.customModal.closeAll()}onColumnAdded(e){this.addColumn.emit({column:e,nextTo:this.contextMenuHeader,side:this.insertColumnTo})}closeSubmenus(){this.filterModalRef&&this.customModal.close(this.filterModalRef),this.columnSelectorModalRef&&this.customModal.close(this.columnSelectorModalRef)}openFilterMenu(e){e.stopPropagation(),this.closeSubmenus(),this.filterColumn=this.contextMenuHeader,this.filterModalRef=this.customModal.createNextToElement(this.filterModalTemplate,e.target.closest("button"),this.viewContainerRef),this.filterModalRef?.onClose.pipe(zm()).subscribe(()=>{this.filterModalRef=void 0})}getCurrentColumnFilter(){if(this.filterColumn)return this.columnFilters.get(this.filterColumn.name)}intervalFilterChanged(e){if(!this.filterColumn)return;let i=this.getCurrentColumnFilter();!i||this.addFilter.emit({name:this.filterColumn.name,value:{...i,filterLowerValue:e.lowerValue,filterUpperValue:e.upperValue}})}discreteFilterChanged(e){if(!this.filterColumn)return;let i=this.getCurrentColumnFilter();if(!i)return;let r=new Set([...i.filterValues]);r.has(e)?r.delete(e):r.add(e),this.addFilter.emit({name:this.filterColumn.name,value:{...i,filterValues:Array.from(r)}})}includeUndefinedToggled(){if(!this.filterColumn)return;let e=this.getCurrentColumnFilter();!e||this.addFilter.emit({name:this.filterColumn.name,value:{...e,includeUndefined:!e.includeUndefined}})}}return n.\u0275fac=function(e){return new(e||n)(C(uA),C(ei))},n.\u0275cmp=P({type:n,selectors:[["tb-data-table"]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,f_,4),Bn(r,m_,5)),2&e){let o;be(o=ve())&&(i.headerCells=o),be(o=ve())&&(i.contentCells=o)}},viewQuery:function(e,i){if(1&e&&(Ue(r3e,5,oi),Ue(o3e,5,oi),Ue(a3e,5,oi)),2&e){let r;be(r=ve())&&(i.contextMenuTemplate=r.first),be(r=ve())&&(i.filterModalTemplate=r.first),be(r=ve())&&(i.columnSelectorModalTemplate=r.first)}},inputs:{headers:"headers",sortingInfo:"sortingInfo",selectableColumns:"selectableColumns",numColumnsLoaded:"numColumnsLoaded",hasMoreColumnsToLoad:"hasMoreColumnsToLoad",columnFilters:"columnFilters",loading:"loading",shouldAddBorders:"shouldAddBorders",addColumnSize:"addColumnSize"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns",removeColumn:"removeColumn",addColumn:"addColumn",addFilter:"addFilter",loadAllColumns:"loadAllColumns"},ngContentSelectors:h3e,decls:14,vars:4,consts:[["contextMenuTemplate",""],["columnSelectorModalTemplate",""],["filterModalTemplate",""],[1,"data-table-wrapper"],[1,"left-section"],[1,"data-table"],[1,"header"],["class","right-section",4,"ngIf"],["class","loading",4,"ngIf"],[3,"contextMenuHeader","selectableColumns","sortingInfo","removeColumn","sortByHeader","openFilterMenu","openColumnSelector"],[3,"selectableColumns","numColumnsLoaded","hasMoreColumnsToLoad","columnSelected","loadAllColumns"],[3,"filter","intervalFilterChanged","discreteFilterChanged","includeUndefinedToggled"],[1,"right-section"],[1,"add-button-column"],["mat-icon-button","","title","Add Column",1,"add-button",3,"click"],["svgIcon","add_24px"],[1,"loading"],["mode","indeterminate","diameter","28"]],template:function(e,i){1&e&&(fn(p3e),S(0,s3e,1,3,"ng-template",null,0,jt),S(2,l3e,1,3,"ng-template",null,1,jt),S(4,c3e,1,1,"ng-template",null,2,jt),f(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),Tt(10),g(),Tt(11,1),g()(),S(12,d3e,4,2,"div",7),g(),S(13,u3e,2,0,"div",8)),2&e&&(v(6),nt("should-add-borders",i.shouldAddBorders),v(6),b("ngIf",i.selectableColumns&&i.selectableColumns.length),v(1),b("ngIf",i.loading))},dependencies:[Ne,bn,Er,Nc,Zte,hA,ine],styles:[".data-table-wrapper[_ngcontent-%COMP%]{display:flex}.data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .left-section[_ngcontent-%COMP%], .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .right-section[_ngcontent-%COMP%]{border-top:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .left-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .left-section[_ngcontent-%COMP%]{border-top:1px solid #555}body.dark-mode[_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .right-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .right-section[_ngcontent-%COMP%]{border-top:1px solid #555}.data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .add-button-column[_ngcontent-%COMP%]{border-left:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .add-button-column[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table-wrapper.should-add-borders[_ngcontent-%COMP%]   .add-button-column[_ngcontent-%COMP%]{border-left:1px solid #555}.data-table[_ngcontent-%COMP%]{font-size:13px;display:table;width:100%}.data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{background-color:#fff;display:table-row;font-weight:bold;position:sticky;text-align:left;top:0;vertical-align:bottom;z-index:1}.data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]:hover{cursor:pointer}body.dark-mode[_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{background-color:#303030}.loading[_ngcontent-%COMP%]{align-items:center;border:0;border-bottom:1px solid #ebebeb;display:flex;height:48px;padding:0 24px;justify-content:center}body.dark-mode[_nghost-%COMP%]   .loading[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .loading[_ngcontent-%COMP%]{border-bottom:1px solid #555}.left-section[_ngcontent-%COMP%]{flex-grow:1}.right-section[_ngcontent-%COMP%]{background-color:#fff;position:sticky;right:-1px;z-index:1}body.dark-mode[_nghost-%COMP%]   .right-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .right-section[_ngcontent-%COMP%]{background-color:#303030}.right-section[_ngcontent-%COMP%]   .add-button-column[_ngcontent-%COMP%]{width:40px;height:100%}.right-section[_ngcontent-%COMP%]   .add-button-column[_ngcontent-%COMP%]   .add-button[_ngcontent-%COMP%]{position:sticky;top:0}.right-section[_ngcontent-%COMP%]   .add-button-column.small-add-button[_ngcontent-%COMP%]{display:flex;justify-content:center;width:24px}.right-section[_ngcontent-%COMP%]   .add-button-column.small-add-button[_ngcontent-%COMP%]   .add-button[_ngcontent-%COMP%]{--tb-icon-button-width: 20px;--tb-icon-button-height: 20px}"],changeDetection:0}),n})();function m3e(n,t){if(1&n&&k(0,"tb-data-table-header-cell",5),2&n){let e=w().$implicit,i=w();b("header",e)("sortingInfo",i.sortingInfo)("disableContextMenu",!i.columnContextMenusEnabled)}}function f3e(n,t){if(1&n&&(Gt(0),S(1,m3e,1,3,"tb-data-table-header-cell",4),Wt()),2&n){let e=t.$implicit,i=w();v(1),b("ngIf",e.enabled&&(e.type!==i.ColumnHeaderType.SMOOTHED||i.smoothingEnabled))}}function g3e(n,t){if(1&n&&(f(0,"div",9),k(1,"span"),g()),2&n){let e=w(3).$implicit;v(1),Bt("background-color",e.color)}}function _3e(n,t){if(1&n&&(f(0,"tb-data-table-content-cell",7),S(1,g3e,2,2,"div",8),g()),2&n){let e=w().$implicit,i=w().$implicit,r=w();b("header",e)("datum",i[e.name]),v(1),b("ngIf",e.type===r.ColumnHeaderType.COLOR)}}function b3e(n,t){if(1&n&&(Gt(0),S(1,_3e,2,3,"tb-data-table-content-cell",6),Wt()),2&n){let e=t.$implicit,i=w(2);v(1),b("ngIf",e.enabled&&(e.type!==i.ColumnHeaderType.SMOOTHED||i.smoothingEnabled))}}function v3e(n,t){if(1&n&&(Gt(0),f(1,"tb-data-table-content-row"),S(2,b3e,2,1,"ng-container",2),g(),Wt()),2&n){let e=w();v(2),b("ngForOf",e.extendHeaders(e.columnHeaders))}}var ane=(()=>{class n{constructor(){this.sortDataBy=new F,this.editColumnHeaders=new F,this.addColumn=new F,this.removeColumn=new F,this.addFilter=new F,this.loadAllColumns=new F,this.ColumnHeaderType=gt,this.AddColumnSize=vu,this.extendHeaders=_s(this.internalExtendHeaders)}internalExtendHeaders(e){return[].concat([{name:"color",displayName:"",type:gt.COLOR,enabled:!0}],e)}getMinPointInRange(e,i,r){let o=e[i].y,a=e[i];for(let s=i;s<=r;s++)o>e[s].y&&(o=e[s].y,a=e[s]);return a}getMaxPointInRange(e,i,r){let o=e[i].y,a=e[i];for(let s=i;s<=r;s++)o<e[s].y&&(o=e[s].y,a=e[s]);return a}getMean(e,i,r){let o=0;for(let a=i;a<=r;a++)o+=e[a].value;return o/(r-i+1)}getTimeSelectionTableData(){if(!this.stepOrLinkedTimeSelection)return[];let e=this.stepOrLinkedTimeSelection.start.step,i=this.stepOrLinkedTimeSelection.end?.step,r=this.dataSeries.filter(a=>GS(a,this.chartMetadataMap)).map(a=>{let s=this.chartMetadataMap[a.id],l=Zx(a.points,e),c=a.points[l],d=null,u=null;null!=i&&(u=Zx(a.points,i),d=a.points[u]);let p={id:a.id,color:s.color};for(let h of this.columnHeaders)switch(h.type){case gt.RUN:let m="";s.alias&&(m=`${s.alias.aliasNumber} ${s.alias.aliasText}/`),p[h.name]=`${m}${s.displayName}`;continue;case gt.STEP:p[h.name]=c.step;continue;case gt.VALUE:p[h.name]=c.value;continue;case gt.RELATIVE_TIME:p[h.name]=c.relativeTimeInMs;continue;case gt.SMOOTHED:p[h.name]=c.y;continue;case gt.VALUE_CHANGE:if(!d)continue;p[h.name]=d.y-c.y;continue;case gt.START_STEP:p[h.name]=c.step;continue;case gt.END_STEP:if(!d)continue;p[h.name]=d.step;continue;case gt.START_VALUE:p[h.name]=c.y;continue;case gt.END_VALUE:if(!d)continue;p[h.name]=d.y;continue;case gt.MIN_VALUE:if(!u)continue;p[h.name]=this.getMinPointInRange(a.points,l,u).y;continue;case gt.MAX_VALUE:if(!u)continue;p[h.name]=this.getMaxPointInRange(a.points,l,u).y;continue;case gt.PERCENTAGE_CHANGE:if(!d)continue;p[h.name]=(d.y-c.y)/c.y;continue;case gt.STEP_AT_MAX:if(!u)continue;p[h.name]=this.getMaxPointInRange(a.points,l,u).step;continue;case gt.STEP_AT_MIN:if(!u)continue;p[h.name]=this.getMinPointInRange(a.points,l,u).step;continue;case gt.MEAN:if(!u)continue;p[h.name]=this.getMean(a.points,l,u);continue;case gt.RAW_CHANGE:if(!d)continue;p[h.name]=d.value-c.value;continue;case gt.HPARAM:p[h.name]=this.runToHparamMap?.[s.originalSeriesId||s.id]?.get(h.name)??"";continue;default:continue}return p}),o=this.columnHeaders.find(a=>a.name===this.sortingInfo.name);return void 0!==o&&r.sort((a,s)=>{if(!o)return 0;let l=this.getSortableValue(a,o),c=this.getSortableValue(s,o);return l<c?this.sortingInfo.order===Lr.ASCENDING?-1:1:l>c?this.sortingInfo.order===Lr.ASCENDING?1:-1:0}),r}getSortableValue(e,i){return function(n){return"object"==typeof n||Number.isNaN(n)||"NaN"===n||null==n?-1/0:n}(i.type===gt.RUN?this.chartMetadataMap[e.id].displayName:e[i.name])}getDataTableMode(){return this.stepOrLinkedTimeSelection.end?Wr.RANGE:Wr.SINGLE}onOrderColumns({source:e,destination:i,side:r}){this.editColumnHeaders.emit({source:e,destination:i,side:r,dataTableMode:this.getDataTableMode()})}onRemoveColumn(e){this.removeColumn.emit({header:e,dataTableMode:this.getDataTableMode()})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["scalar-card-data-table"]],inputs:{chartMetadataMap:"chartMetadataMap",dataSeries:"dataSeries",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",columnHeaders:"columnHeaders",sortingInfo:"sortingInfo",columnCustomizationEnabled:"columnCustomizationEnabled",columnContextMenusEnabled:"columnContextMenusEnabled",smoothingEnabled:"smoothingEnabled",columnFilters:"columnFilters",selectableColumns:"selectableColumns",numColumnsLoaded:"numColumnsLoaded",numColumnsToLoad:"numColumnsToLoad",runToHparamMap:"runToHparamMap"},outputs:{sortDataBy:"sortDataBy",editColumnHeaders:"editColumnHeaders",addColumn:"addColumn",removeColumn:"removeColumn",addFilter:"addFilter",loadAllColumns:"loadAllColumns"},decls:5,vars:9,consts:[[3,"headers","sortingInfo","columnFilters","selectableColumns","numColumnsLoaded","hasMoreColumnsToLoad","addColumnSize","sortDataBy","orderColumns","addColumn","removeColumn","addFilter","loadAllColumns"],["header",""],[4,"ngFor","ngForOf"],["content",""],[3,"header","sortingInfo","disableContextMenu",4,"ngIf"],[3,"header","sortingInfo","disableContextMenu"],[3,"header","datum",4,"ngIf"],[3,"header","datum"],["class","row-circle",4,"ngIf"],[1,"row-circle"]],template:function(e,i){1&e&&(f(0,"tb-data-table",0),A("sortDataBy",function(o){return i.sortDataBy.emit(o)})("orderColumns",function(o){return i.onOrderColumns(o)})("addColumn",function(o){return i.addColumn.emit(o)})("removeColumn",function(o){return i.onRemoveColumn(o)})("addFilter",function(o){return i.addFilter.emit(o)})("loadAllColumns",function(){return i.loadAllColumns.emit()}),Gt(1,1),S(2,f3e,2,1,"ng-container",2),Wt(),Gt(3,3),S(4,v3e,3,1,"ng-container",2),Wt(),g()),2&e&&(b("headers",i.columnHeaders)("sortingInfo",i.sortingInfo)("columnFilters",i.columnFilters)("selectableColumns",i.selectableColumns)("numColumnsLoaded",i.numColumnsLoaded)("hasMoreColumnsToLoad",i.numColumnsLoaded===i.numColumnsToLoad)("addColumnSize",i.AddColumnSize.SMALL),v(2),b("ngForOf",i.extendHeaders(i.columnHeaders)),v(2),b("ngForOf",i.getTimeSelectionTableData()))},dependencies:[nn,Ne,m_,dA,mA,f_],styles:["tb-data-table-content-cell[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{padding:4px}.row-circle[_ngcontent-%COMP%]{height:12px;width:12px}.row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.4);display:inline-block;height:10px;width:10px;vertical-align:middle}"],changeDetection:0}),n})();var x3e=["stepSpan"];function C3e(n,t){if(1&n){let e=Te();f(0,"button",4),A("click",function(){return ne(e),ie(w().fobRemoved.emit())}),k(1,"mat-icon",5),g()}}function M3e(n,t){if(1&n){let e=Te();f(0,"button",4),A("click",function(){return ne(e),ie(w().fobRemoved.emit())}),k(1,"mat-icon",6),g()}}var w3e=function(n,t){return{fob:!0,unremovable:n,prospective:t}},sne=(()=>{class n{constructor(){this.allowRemoval=!0,this.isProspective=!1,this.stepChanged=new F,this.fobRemoved=new F}ngOnChanges(e){e.step&&document.activeElement===this.stepSpan.nativeElement&&this.stepSpan.nativeElement.blur()}validateStep(e){let i=String.fromCharCode(e.which);(" "===e.key||isNaN(Number(i)))&&e.preventDefault()}stepTyped(e){e.preventDefault();let i=e.target.innerText;this.stepChanged.emit(""!==i?Number(i):null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["card-fob"]],viewQuery:function(e,i){if(1&e&&Ue(x3e,7,xe),2&e){let r;be(r=ve())&&(i.stepSpan=r.first)}},inputs:{step:"step",allowRemoval:"allowRemoval",isProspective:"isProspective"},outputs:{stepChanged:"stepChanged",fobRemoved:"fobRemoved"},features:[qt],decls:5,vars:7,consts:[[3,"ngClass"],["contenteditable","","role","textbox","aria-label","Edit step",3,"innerHTML","blur","keypress","keydown.enter","keydown.shift.enter"],["stepSpan",""],["aria-label","Deselect fob",3,"click",4,"ngIf"],["aria-label","Deselect fob",3,"click"],["svgIcon","close_24px"],["svgIcon","keep_24px"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"span",1,2),A("blur",function(o){return i.stepTyped(o)})("keypress",function(o){return i.validateStep(o)})("keydown.enter",function(o){return i.stepTyped(o)})("keydown.shift.enter",function(o){return o.preventDefault()}),g(),S(3,C3e,2,0,"button",3),S(4,M3e,2,0,"button",3),g()),2&e&&(b("ngClass",So(4,w3e,!i.allowRemoval,i.isProspective)),v(1),b("innerHTML",i.step,mk),v(2),b("ngIf",i.allowRemoval),v(1),b("ngIf",i.isProspective))},dependencies:[wn,Ne,bn],styles:["[_nghost-%COMP%]{display:inline-block}.fob[_ngcontent-%COMP%]{display:inline-flex;background-color:#e0e0e0;border-radius:25px;padding:2px 2px 2px 4px;font-size:11px;text-align:center;width:min-content}.fob[_ngcontent-%COMP%] > .prospective[_ngcontent-%COMP%]{padding-top:1px}.fob[_ngcontent-%COMP%]:hover{cursor:grab}.fob[_ngcontent-%COMP%]:hover.prospective{cursor:pointer}.fob[_ngcontent-%COMP%]:active{cursor:grabbing}.fob.unremovable[_ngcontent-%COMP%]{padding:2px 4px}.fob.prospective[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;border:1px dashed #9e9e9e;font-weight:bold;height:17px}span[_ngcontent-%COMP%]{color:inherit;display:inline-block}body.dark-mode[_nghost-%COMP%]   span[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   span[_ngcontent-%COMP%]{color:#616161}button[_ngcontent-%COMP%]{margin-left:2px;padding:0;border:0;border-radius:50%;font-size:11px;width:11px;height:11px;background-color:inherit;color:inherit}button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:100%;height:110%}body.dark-mode[_nghost-%COMP%]   button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   button[_ngcontent-%COMP%]{color:#616161}button[_ngcontent-%COMP%]:hover{background-color:#9e9e9e;color:#eee;cursor:pointer}body.dark-mode[_nghost-%COMP%]   button[_ngcontent-%COMP%]:hover, body.dark-mode   [_nghost-%COMP%]   button[_ngcontent-%COMP%]:hover{background-color:#616161;color:#e0e0e0}"],changeDetection:0}),n})(),E3e=["startFobWrapper"],T3e=["endFobWrapper"],D3e=["prospectiveFobWrapper"];function I3e(n,t){1&n&&k(0,"div",6)}function A3e(n,t){if(1&n&&(f(0,"div",2,3),S(2,I3e,1,0,"div",4),k(3,"card-fob",5),g()),2&n){let e=w();Bt("transform",e.getCssTranslatePxForProspectiveFob()),v(2),b("ngIf",e.showExtendedLine),v(1),b("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("allowRemoval",!1)("isProspective",!0)("step",e.prospectiveStep)}}function R3e(n,t){if(1&n){let e=Te();f(0,"div",10),A("mousedown",function(r){ne(e);let o=w(2);return ie(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),g()}}function P3e(n,t){if(1&n){let e=Te();f(0,"div",2,7),S(2,R3e,1,0,"div",8),f(3,"card-fob",9),A("mousedown",function(r){ne(e);let o=w();return ie(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){ne(e);let o=w();return ie(o.stepTyped(o.Fob.START,r))})("fobRemoved",function(){ne(e);let r=w();return ie(r.onFobRemoved(r.Fob.START))}),g()()}if(2&n){let e=w();Bt("transform",e.getCssTranslatePxForStartFob()),v(2),b("ngIf",e.showExtendedLine),v(1),b("allowRemoval",!!e.allowFobRemoval||e.timeSelection.end)("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.start.step)}}function k3e(n,t){if(1&n){let e=Te();f(0,"div",10),A("mousedown",function(r){ne(e);let o=w(2);return ie(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),g()}}function O3e(n,t){if(1&n){let e=Te();f(0,"div",2,11),S(2,k3e,1,0,"div",8),f(3,"card-fob",12),A("mousedown",function(r){ne(e);let o=w();return ie(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){ne(e);let o=w();return ie(o.stepTyped(o.Fob.END,r))})("fobRemoved",function(){ne(e);let r=w();return ie(r.onFobRemoved(r.Fob.END))}),g()()}if(2&n){let e=w();Bt("transform",e.getCssTranslatePxForEndFob()),v(2),b("ngIf",e.showExtendedLine),v(1),b("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.end.step)}}var Rr=(()=>(function(n){n[n.NONE=0]="NONE",n[n.START=1]="START",n[n.END=2]="END"}(Rr||(Rr={})),Rr))(),F3e={start:Rr.START,end:Rr.END},fA=(()=>{class n{constructor(e){this.root=e,this.showExtendedLine=!1,this.prospectiveStep=null,this.prospectiveStepAxisPosition=null,this.allowFobRemoval=!0,this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.onProspectiveStepChanged=new F,this.hasFobMoved=!1,this.currentDraggingFob=Rr.NONE,this.affordance=Qa.NONE,this.mouseListener=this.mouseMove.bind(this),this.stopListener=this.stopDrag.bind(this),this.Fob=Rr,this.TimeSelectionAffordance=Qa}getCssTranslatePxForStartFob(){return this.axisDirection===va.VERTICAL?`translate(0px, ${this.startStepAxisPosition}px)`:`translate(${this.startStepAxisPosition}px, 0px)`}getCssTranslatePxForEndFob(){return null===this.endStepAxisPosition?"":this.axisDirection===va.VERTICAL?`translate(0px, ${this.endStepAxisPosition}px)`:`translate(${this.endStepAxisPosition}px, 0px)`}getCssTranslatePxForProspectiveFob(){return null===this.prospectiveStep?"":this.axisDirection===va.VERTICAL?`translate(0px, ${this.prospectiveStepAxisPosition}px)`:`translate(${this.prospectiveStepAxisPosition}px, 0px)`}stopEventPropagation(e){e.stopPropagation(),e.preventDefault()}startDrag(e,i,r){i!==Qa.FOB&&this.stopEventPropagation(r),document.addEventListener("mousemove",this.mouseListener),document.addEventListener("mouseup",this.stopListener),this.currentDraggingFob=e,this.affordance=i}stopDrag(){document.removeEventListener("mousemove",this.mouseListener),document.removeEventListener("mouseup",this.stopListener),this.currentDraggingFob=Rr.NONE,this.hasFobMoved&&this.timeSelection&&this.onTimeSelectionChanged.emit({timeSelection:this.timeSelection,affordance:this.affordance}),this.affordance=Qa.NONE,this.hasFobMoved=!1}isVertical(){return this.axisDirection===va.VERTICAL}shouldSwapFobs(e){return!(!this.timeSelection||!this.timeSelection.end)&&(this.currentDraggingFob===Rr.END?e<this.timeSelection.start.step:this.currentDraggingFob===Rr.START&&e>this.timeSelection.end.step)}getNewTimeSelection(e,i){let r={...i};if(!this.timeSelection)return r;if(!this.timeSelection.end)return r.start={step:e},r;if(this.shouldSwapFobs(e)){let[o,a]=this.currentDraggingFob===Rr.END?["end","start"]:["start","end"];return this.currentDraggingFob=F3e[a],r[o]=this.timeSelection[a],r[a]={step:e},r}return this.currentDraggingFob===Rr.END?(r.end={step:e},r):(r.start={step:e},r)}getNewStepFromMouseEvent(e){let i=null,r=this.getMousePositionFromEvent(e),o=this.axisDirection===va.VERTICAL?e.movementY:e.movementX;return this.isMovingHigher(r,o)?i=this.cardFobHelper.getStepHigherThanAxisPosition(r):this.isMovingLower(r,o)&&(i=this.cardFobHelper.getStepLowerThanAxisPosition(r)),null===i?null:i}mouseMove(e){if(this.currentDraggingFob===Rr.NONE)return;let i=this.getNewStepFromMouseEvent(e);if(null===i||!this.timeSelection)return;let r=this.getNewTimeSelection(i,this.timeSelection);this.onTimeSelectionChanged.emit({timeSelection:r}),this.hasFobMoved=!0}mouseOverProspectiveFobArea(e){if(null!=this.timeSelection?.end)return;let i=this.getNewStepFromMouseEvent(e);null!==i&&this.onProspectiveStepChanged.emit(i)}isMovingLower(e,i){if(this.currentDraggingFob===Rr.NONE&&null===this.prospectiveStep)return!0;let r=this.getCurrentFobStep();return void 0!==r&&e<this.getDraggingFobCenter()&&i<0&&r>this.lowestStep}isMovingHigher(e,i){if(this.currentDraggingFob===Rr.NONE&&null===this.prospectiveStep)return!0;let r=this.getCurrentFobStep();return void 0!==r&&e>this.getDraggingFobCenter()&&i>0&&r<this.highestStep}getDraggingFobCenter(){let e=this.getCurrentFob()?.nativeElement;if(!e)return 0;let i=e.getBoundingClientRect().top,r=e.getBoundingClientRect().left;return this.axisDirection===va.VERTICAL?i-this.root.nativeElement.getBoundingClientRect().top:r-this.root.nativeElement.getBoundingClientRect().left}getCurrentFob(){switch(this.currentDraggingFob){case Rr.START:return this.startFobWrapper;case Rr.END:return this.endFobWrapper;case Rr.NONE:return this.prospectiveFobWrapper}}getCurrentFobStep(){switch(this.currentDraggingFob){case Rr.START:return this.timeSelection?.start.step;case Rr.END:return this.timeSelection?.end?.step;case Rr.NONE:return this.prospectiveStep??void 0}}getMousePositionFromEvent(e){return this.axisDirection===va.VERTICAL?e.clientY-this.root.nativeElement.getBoundingClientRect().top:e.clientX-this.root.nativeElement.getBoundingClientRect().left}stepTyped(e,i){if(null===i)return void(null!==this.timeSelection.end&&this.onFobRemoved(e));let r={...this.timeSelection};e===Rr.START?r.start={step:i}:e===Rr.END&&(r.end={step:i}),null!==r.end&&r.start.step>r.end.step&&(r={start:r.end,end:r.start}),this.onTimeSelectionChanged.emit({timeSelection:r,affordance:Qa.FOB_TEXT})}prospectiveFobClicked(e){e.stopPropagation();let i=this.getProspectiveTimeSelection();!i||(this.onTimeSelectionChanged.emit({affordance:Qa.FOB_ADDED,timeSelection:i}),this.onProspectiveStepChanged.emit(null))}getProspectiveTimeSelection(){if(this.prospectiveStep)return this.timeSelection?{start:{step:Math.min(this.timeSelection.start.step,this.prospectiveStep)},end:{step:Math.max(this.timeSelection.start.step,this.prospectiveStep)}}:{start:{step:this.prospectiveStep},end:null}}onFobRemoved(e){e!==Rr.END?null===this.timeSelection.end?this.onTimeSelectionToggled.emit():this.onTimeSelectionChanged.emit({affordance:Qa.FOB_REMOVED,timeSelection:{start:this.timeSelection.end,end:null}}):this.onTimeSelectionChanged.emit({affordance:Qa.FOB_REMOVED,timeSelection:{...this.timeSelection,end:null}})}onProspectiveAreaMouseLeave(){this.onProspectiveStepChanged.emit(null)}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275cmp=P({type:n,selectors:[["card-fob-controller"]],viewQuery:function(e,i){if(1&e&&(Ue(E3e,5),Ue(T3e,5),Ue(D3e,5)),2&e){let r;be(r=ve())&&(i.startFobWrapper=r.first),be(r=ve())&&(i.endFobWrapper=r.first),be(r=ve())&&(i.prospectiveFobWrapper=r.first)}},inputs:{axisDirection:"axisDirection",timeSelection:"timeSelection",cardFobHelper:"cardFobHelper",startStepAxisPosition:"startStepAxisPosition",endStepAxisPosition:"endStepAxisPosition",highestStep:"highestStep",lowestStep:"lowestStep",showExtendedLine:"showExtendedLine",prospectiveStep:"prospectiveStep",prospectiveStepAxisPosition:"prospectiveStepAxisPosition",allowFobRemoval:"allowFobRemoval"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled",onProspectiveStepChanged:"onProspectiveStepChanged"},decls:6,vars:4,consts:[["class","time-fob-wrapper",3,"transform",4,"ngIf"],[1,"prospective-fob-area",3,"ngClass","mousemove","click","mouseleave"],[1,"time-fob-wrapper"],["prospectiveFobWrapper",""],["class","extended-line",4,"ngIf"],[3,"ngClass","allowRemoval","isProspective","step"],[1,"extended-line"],["startFobWrapper",""],["class","extended-line",3,"mousedown",4,"ngIf"],[1,"startFob",3,"allowRemoval","ngClass","step","mousedown","stepChanged","fobRemoved"],[1,"extended-line",3,"mousedown"],["endFobWrapper",""],[1,"endFob",3,"ngClass","step","mousedown","stepChanged","fobRemoved"]],template:function(e,i){1&e&&(f(0,"div"),Gt(1),S(2,A3e,4,7,"div",0),f(3,"div",1),A("mousemove",function(o){return i.mouseOverProspectiveFobArea(o)})("click",function(o){return i.prospectiveFobClicked(o)})("mouseleave",function(){return i.onProspectiveAreaMouseLeave()}),g(),Wt(),S(4,P3e,4,6,"div",0),S(5,O3e,4,5,"div",0),g()),2&e&&(v(2),b("ngIf",null!==i.prospectiveStep),v(1),b("ngClass",i.isVertical()?"vertical-prospective-area":"horizontal-prospective-area"),v(1),b("ngIf",i.timeSelection),v(1),b("ngIf",i.timeSelection&&i.timeSelection.end))},dependencies:[wn,Ne,sne],styles:["[_nghost-%COMP%]{pointer-events:all}.time-fob-wrapper[_ngcontent-%COMP%]{display:inline-block;position:absolute;top:0;width:0}.vertical-fob[_ngcontent-%COMP%]{transform:translateY(-50%)}.horizontal-fob[_ngcontent-%COMP%]{transform:translateX(-50%)}.extended-line[_ngcontent-%COMP%]{border-style:dashed;border-width:0 1px;height:calc(100% - 30px)}.extended-line[_ngcontent-%COMP%]:hover{background:linear-gradient(to right, transparent 18px, #ccc 19px, #ccc 21px, transparent 22px);border:0;cursor:ew-resize;margin-left:-20px;padding:0 20px}.horizontal-prospective-area[_ngcontent-%COMP%]{bottom:0;cursor:pointer;position:absolute;height:30px;width:calc(100% - 74px)}.prospective-area[_ngcontent-%COMP%]{display:block}"],changeDetection:0}),n})(),CV=(()=>{class n{constructor(){this.disableInteraction=!1,this.allowFobRemoval=!0,this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.axisDirection=va.HORIZONTAL,this.cardFobHelper={getStepHigherThanAxisPosition:this.getStepHigherThanAxisPosition.bind(this),getStepLowerThanAxisPosition:this.getStepLowerThanAxisPosition.bind(this)},this.prospectiveStep=null}getAxisPositionFromStartStep(){return this.timeSelection?this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.timeSelection.start.step):""}getAxisPositionFromEndStep(){return this.timeSelection?.end?this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.timeSelection?.end.step??this.minMaxStep.maxStep):null}getAxisPositionFromProspectiveStep(){return null===this.prospectiveStep?null:this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.prospectiveStep)}onProspectiveStepChanged(e){this.prospectiveStep=e}getHighestStep(){return this.minMaxStep.maxStep}getLowestStep(){return this.minMaxStep.minStep}getStepHigherThanAxisPosition(e){return this.getStepAtMousePostion(e)}getStepLowerThanAxisPosition(e){return this.getStepAtMousePostion(e)}getStepAtMousePostion(e){let i=Math.round(this.scale.reverse(this.minMaxHorizontalViewExtend,[0,this.axisSize],e));return i>this.getHighestStep()?this.getHighestStep():i<this.getLowestStep()?this.getLowestStep():i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["scalar-card-fob-controller"]],inputs:{timeSelection:"timeSelection",scale:"scale",minMaxHorizontalViewExtend:"minMaxHorizontalViewExtend",minMaxStep:"minMaxStep",axisSize:"axisSize",disableInteraction:"disableInteraction",allowFobRemoval:"allowFobRemoval"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled"},decls:1,vars:13,consts:[[3,"axisDirection","timeSelection","startStepAxisPosition","endStepAxisPosition","prospectiveStepAxisPosition","highestStep","lowestStep","prospectiveStep","cardFobHelper","showExtendedLine","allowFobRemoval","onProspectiveStepChanged","onTimeSelectionChanged","onTimeSelectionToggled"]],template:function(e,i){1&e&&(f(0,"card-fob-controller",0),A("onProspectiveStepChanged",function(o){return i.onProspectiveStepChanged(o)})("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(o){return i.onTimeSelectionToggled.emit(o)}),g()),2&e&&(Bt("pointer-events",i.disableInteraction?"none":"all"),b("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("prospectiveStepAxisPosition",i.getAxisPositionFromProspectiveStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("prospectiveStep",i.prospectiveStep)("cardFobHelper",i.cardFobHelper)("showExtendedLine",!0)("allowFobRemoval",i.allowFobRemoval))},dependencies:[fA],styles:["scalar-card-fob-controller .time-fob-wrapper{height:100%}"],changeDetection:0}),n})(),N3e=["dataTableContainer"];function L3e(n,t){if(1&n){let e=Te();f(0,"button",27),A("click",function(){return ne(e),ie(w().openTableEditMenu())}),k(1,"mat-icon",28),f(2,"span"),T(3,"Edit Table Columns"),g()()}}function B3e(n,t){1&n&&k(0,"mat-spinner",29)}function V3e(n,t){1&n&&(f(0,"th"),T(1,"Smoothed"),g())}function H3e(n,t){if(1&n&&(Gt(0),k(1,"tb-experiment-alias",35),T(2,"/"),Wt()),2&n){let e=w().$implicit;v(1),b("alias",e.metadata.alias)}}function z3e(n,t){if(1&n&&(f(0,"td"),T(1),g()),2&n){let e=w().$implicit,i=w(2);v(1),Ve(" ",i.valueFormatter.formatShort(e.dataPoint.y)," ")}}function U3e(n,t){if(1&n&&(Gt(0),f(1,"tr",33)(2,"td",34),k(3,"span"),g(),f(4,"td",2),S(5,H3e,3,1,"ng-container",24),T(6),g(),S(7,z3e,2,1,"td",24),f(8,"td"),T(9),g(),f(10,"td"),T(11),g(),f(12,"td"),T(13),U(14,"date"),g(),f(15,"td"),T(16),g()(),Wt()),2&n){let e=t.$implicit,i=w(2);v(1),nt("closest",e.metadata.closest),v(2),Bt("background-color",e.metadata.color),v(2),b("ngIf",e.metadata.alias),v(1),Ve("",e.metadata.displayName," "),v(1),b("ngIf",i.smoothingEnabled),v(2),kt(i.valueFormatter.formatShort(e.dataPoint.value)),v(2),kt(i.stepFormatter.formatShort(e.dataPoint.step)),v(2),kt(Jp(14,11,e.dataPoint.wallTime,"short")),v(3),Ve(" ",i.relativeXFormatter.formatReadable(e.dataPoint.relativeTimeInMs)," ")}}function j3e(n,t){if(1&n&&(f(0,"table",30)(1,"thead")(2,"tr"),k(3,"th",31),f(4,"th"),T(5,"Run"),g(),S(6,V3e,2,0,"th",24),f(7,"th"),T(8,"Value"),g(),f(9,"th"),T(10,"Step"),g(),f(11,"th"),T(12,"Time"),g(),f(13,"th"),T(14,"Relative"),g()()(),f(15,"tbody"),S(16,U3e,17,14,"ng-container",32),g()()),2&n){let e=t.data,i=t.cursorLocationInDataCoord,r=t.cursorLocation,o=w();v(6),b("ngIf",o.smoothingEnabled),v(10),b("ngForOf",o.getCursorAwareTooltipData(e,i,r))("ngForTrackBy",o.trackByTooltipDatum)}}function G3e(n,t){if(1&n){let e=Te();f(0,"button",41),A("click",function(){return ne(e),ie(w(2).toggleTableExpanded())}),k(1,"mat-icon",9),g()}if(2&n){let e=w(2);b("title",e.shouldExpandTable()?"Expand Table":"Collapse Table"),v(1),b("svgIcon",e.shouldExpandTable()?"expand_more_24px":"expand_less_24px")}}var W3e=function(n){return{"data-table-container":!0,expanded:n}};function q3e(n,t){if(1&n){let e=Te();Gt(0),f(1,"div",36,37)(3,"scalar-card-data-table",38),A("sortDataBy",function(r){return ne(e),ie(w().sortDataBy(r))})("editColumnHeaders",function(r){return ne(e),ie(w().editColumnHeaders.emit(r))})("addColumn",function(r){return ne(e),ie(w().addColumn.emit(r))})("removeColumn",function(r){return ne(e),ie(w().removeColumn.emit(r))})("hideColumn",function(r){return ne(e),ie(w().hideColumn.emit(r))})("addFilter",function(r){return ne(e),ie(w().addFilter.emit(r))})("loadAllColumns",function(){return ne(e),ie(w().loadAllColumns.emit())}),g()(),f(4,"div",39),S(5,G3e,2,2,"button",40),g(),Wt()}if(2&n){let e=w();v(1),b("ngClass",Un(15,W3e,e.cardState.tableExpanded)),v(2),b("chartMetadataMap",e.chartMetadataMap)("dataSeries",e.dataSeries)("stepOrLinkedTimeSelection",e.stepOrLinkedTimeSelection)("columnHeaders",e.columnHeaders)("sortingInfo",e.sortingInfo)("columnCustomizationEnabled",e.columnCustomizationEnabled)("columnContextMenusEnabled",e.columnContextMenusEnabled)("smoothingEnabled",e.smoothingEnabled)("columnFilters",e.columnFilters)("runToHparamMap",e.runToHparamMap)("selectableColumns",e.selectableColumns)("numColumnsLoaded",e.numColumnsLoaded)("numColumnsToLoad",e.numColumnsToLoad),v(2),b("ngIf",e.canExpandTable())}}var X3e=function(n){return[0,n]},Y3e=function(){return{"out-of-selected-time":!0,end:!0,range:!0}};function Q3e(n,t){if(1&n&&k(0,"div",36),2&n){let e=w(2),i=e.viewExtent,r=e.domDimension,o=e.xScale,a=w();Bt("left",o.forward(i.x,Un(3,X3e,r.width),null==a.stepOrLinkedTimeSelection.end?null:a.stepOrLinkedTimeSelection.end.step)+"px"),b("ngClass",mc(5,Y3e))}}var Z3e=function(n){return[n,0]},K3e=function(n){return{"out-of-selected-time":!0,start:!0,range:n}};function J3e(n,t){if(1&n&&(Gt(0),k(1,"div",36),S(2,Q3e,1,6,"div",42),Wt()),2&n){let e=w(),i=e.viewExtent,r=e.domDimension,o=e.xScale,a=w();v(1),Bt("right",o.forward(i.x,Un(4,Z3e,r.width),a.stepOrLinkedTimeSelection.start.step)+"px"),b("ngClass",Un(6,K3e,!(null==a.stepOrLinkedTimeSelection.end||!a.stepOrLinkedTimeSelection.end.step))),v(1),b("ngIf",null==a.stepOrLinkedTimeSelection.end?null:a.stepOrLinkedTimeSelection.end.step)}}function $3e(n,t){1&n&&S(0,J3e,3,8,"ng-container",24),2&n&&b("ngIf",w().stepOrLinkedTimeSelection)}function eBe(n,t){if(1&n){let e=Te();Gt(0),f(1,"scalar-card-fob-controller",43),A("onTimeSelectionChanged",function(r){return ne(e),ie(w(2).onTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return ne(e),ie(w(2).onFobRemoved())}),g(),Wt()}if(2&n){let e=w(),i=e.interactionState,r=e.xScale,o=e.viewExtent,a=e.domDimension,s=w();v(1),b("disableInteraction","NONE"!==i)("timeSelection",s.stepOrLinkedTimeSelection)("scale",r)("minMaxHorizontalViewExtend",o.x)("minMaxStep",s.minMaxStep)("axisSize",a.width)}}function tBe(n,t){1&n&&S(0,eBe,2,6,"ng-container",24),2&n&&b("ngIf",w().showFobController())}var dne=(()=>{class n{constructor(e,i){this.ref=e,this.dialog=i,this.DataLoadState=Re,this.RendererType=Yi,this.ScaleType=tr,this.onFullSizeToggle=new F,this.onPinClicked=new F,this.onTimeSelectionChanged=new F,this.onStepSelectorToggled=new F,this.onDataTableSorting=new F,this.editColumnHeaders=new F,this.openTableEditMenuToMode=new F,this.addColumn=new F,this.removeColumn=new F,this.addFilter=new F,this.loadAllColumns=new F,this.onLineChartZoom=new F,this.onCardStateChanged=new F,this.sortingInfo={name:"run",order:Lr.ASCENDING},this.yScaleType=tr.LINEAR,this.isViewBoxOverridden=!1,this.relativeXFormatter=x0,this.valueFormatter=dp,this.stepFormatter=y0}toggleYScaleType(){this.yScaleType=this.yScaleType===tr.LINEAR?tr.LOG10:tr.LINEAR}sortDataBy(e){this.sortingInfo=e,this.onDataTableSorting.emit(e)}resetDomain(){this.lineChart&&this.lineChart.viewBoxReset()}trackByTooltipDatum(e,i){return i.id}getCustomXFormatter(){switch(this.xAxisType){case Pi.RELATIVE:return x0;case Pi.STEP:return o3;default:return}}getCursorAwareTooltipData(e,i,r){let o=e.map(l=>({...l,metadata:{...l.metadata,closest:!1,distToCursorPixels:Math.hypot(l.domPoint.x-r.x,l.domPoint.y-r.y),distToCursorX:l.dataPoint.x-i.x,distToCursorY:l.dataPoint.y-i.y}})),a=1/0,s=0;for(let l=0;l<o.length;l++)a>o[l].metadata.distToCursorPixels&&(a=o[l].metadata.distToCursorPixels,s=l);switch(o.length&&(o[s].metadata.closest=!0),this.tooltipSort){case oo.ASCENDING:return o.sort((l,c)=>l.dataPoint.y-c.dataPoint.y);case oo.DESCENDING:return o.sort((l,c)=>c.dataPoint.y-l.dataPoint.y);case oo.NEAREST:return o.sort((l,c)=>l.metadata.distToCursorPixels-c.metadata.distToCursorPixels);case oo.NEAREST_Y:return o.sort((l,c)=>l.metadata.distToCursorY-c.metadata.distToCursorY);case oo.DEFAULT:case oo.ALPHABETICAL:return o.sort((l,c)=>l.metadata.displayName<c.metadata.displayName?-1:l.metadata.displayName>c.metadata.displayName?1:0)}}openDataDownloadDialog(){this.dialog.open(this.DataDownloadComponent,{data:{cardId:this.cardId}})}onFobRemoved(){this.onStepSelectorToggled.emit(Za.FOB_DESELECT)}showDataTable(){return this.xAxisType===Pi.STEP&&this.stepOrLinkedTimeSelection}showFobController(){return this.xAxisType===Pi.STEP&&this.minMaxStep}canExpandTable(){return this.dataSeries.filter(i=>GS(i,this.chartMetadataMap)).length>3}shouldExpandTable(){return Boolean(this.dataTableContainer?.nativeElement.style.height||!this.cardState?.tableExpanded)}toggleTableExpanded(){this.onCardStateChanged.emit({...this.cardState,tableExpanded:this.shouldExpandTable()}),this.dataTableContainer&&(this.dataTableContainer.nativeElement.style.height="")}openTableEditMenu(){this.openTableEditMenuToMode.emit(this.rangeEnabled?Wr.RANGE:Wr.SINGLE)}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(ys))},n.\u0275cmp=P({type:n,selectors:[["scalar-card-component"]],viewQuery:function(e,i){if(1&e&&(Ue(h_,5),Ue(N3e,5)),2&e){let r;be(r=ve())&&(i.lineChart=r.first),be(r=ve())&&(i.dataTableContainer=r.first)}},inputs:{cardId:"cardId",chartMetadataMap:"chartMetadataMap",cardState:"cardState",DataDownloadComponent:"DataDownloadComponent",dataSeries:"dataSeries",ignoreOutliers:"ignoreOutliers",isCardVisible:"isCardVisible",isPinned:"isPinned",loadState:"loadState",showFullWidth:"showFullWidth",smoothingEnabled:"smoothingEnabled",tag:"tag",title:"title",tooltipSort:"tooltipSort",xAxisType:"xAxisType",xScaleType:"xScaleType",useDarkMode:"useDarkMode",forceSvg:"forceSvg",columnCustomizationEnabled:"columnCustomizationEnabled",columnContextMenusEnabled:"columnContextMenusEnabled",linkedTimeSelection:"linkedTimeSelection",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",minMaxStep:"minMaxStep",userViewBox:"userViewBox",columnHeaders:"columnHeaders",rangeEnabled:"rangeEnabled",columnFilters:"columnFilters",selectableColumns:"selectableColumns",numColumnsLoaded:"numColumnsLoaded",numColumnsToLoad:"numColumnsToLoad",runToHparamMap:"runToHparamMap"},outputs:{onFullSizeToggle:"onFullSizeToggle",onPinClicked:"onPinClicked",onTimeSelectionChanged:"onTimeSelectionChanged",onStepSelectorToggled:"onStepSelectorToggled",onDataTableSorting:"onDataTableSorting",editColumnHeaders:"editColumnHeaders",openTableEditMenuToMode:"openTableEditMenuToMode",addColumn:"addColumn",removeColumn:"removeColumn",addFilter:"addFilter",loadAllColumns:"loadAllColumns",onLineChartZoom:"onLineChartZoom",onCardStateChanged:"onCardStateChanged"},decls:38,vars:29,consts:function(){let t,e,i,r,o,a;return t=$localize`:A button that resets line chart domain to the data␟e68a552941ab427a99e7437e08443f30ac71ccd6␟3830646521058268558:Fit line chart domains to data`,e=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,i=$localize`:A button on line chart that toggles full size mode.␟fc8f767d0b9f930187a1bae34477ad28736ece33␟915721563638926597:Toggle full size mode`,r=$localize`:An overflow menu button that opens more line chart options␟b260fab946a3077ce20fd28e336979f586720e8d␟878053740210336435:More line chart options`,o=$localize`:A button that toggles log scale on y-axis on a line chart␟fe91f96ab9b3baca5a48913f2b0fae84483d93e3␟3374645620638883926:Toggle Y-axis log scale on line chart`,a=$localize`:Expand Table␟9e59ff50bfcb479272e2b103e1e9b11518e2e4ce␟6374880341393020610:Expand Table`,[[1,"always-visible"],[1,"heading"],[1,"name"],[1,"tag",3,"title","value"],[3,"isClipped"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"disabled","title","click"],["svgIcon","settings_overscan_24px"],["mat-icon-button","","aria-label",e,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",i,"title","Toggle full size mode",3,"click"],["mat-icon-button","","aria-label",r,"title","More line chart options",3,"matMenuTriggerFor"],["svgIcon","more_vert_24px"],["menu","matMenu"],["mat-menu-item","","aria-label",o,3,"click"],["svgIcon","line_weight_24px"],["mat-menu-item","","aria-label","Open dialog to download data",3,"click"],["svgIcon","get_app_24px"],["mat-menu-item","","aria-label","Open menu to edit data table columns",3,"click",4,"ngIf"],[1,"chart-container"],["chartContainer",""],["diameter","18",4,"ngIf"],[3,"disableUpdate","preferredRendererType","seriesData","seriesMetadataMap","xScaleType","yScaleType","customXFormatter","ignoreYOutliers","tooltipTemplate","useDarkMode","userViewBox","customVisTemplate","customChartOverlayTemplate","onViewBoxOverridden","viewBoxChanged"],["tooltip",""],[4,"ngIf"],["lineChartCustomVis",""],["lineChartCustomXAxisVis",""],["mat-menu-item","","aria-label","Open menu to edit data table columns",3,"click"],["svgIcon","edit_24px"],["diameter","18"],[1,"tooltip"],[1,"circle-header"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[3,"alias"],[3,"ngClass"],["dataTableContainer",""],[3,"chartMetadataMap","dataSeries","stepOrLinkedTimeSelection","columnHeaders","sortingInfo","columnCustomizationEnabled","columnContextMenusEnabled","smoothingEnabled","columnFilters","runToHparamMap","selectableColumns","numColumnsLoaded","numColumnsToLoad","sortDataBy","editColumnHeaders","addColumn","removeColumn","hideColumn","addFilter","loadAllColumns"],[1,"bottom-area"],["mat-icon-button","","class","expand-button","aria-label",a,3,"title","click",4,"ngIf"],["mat-icon-button","","aria-label",a,1,"expand-button",3,"title","click"],[3,"ngClass","left",4,"ngIf"],[3,"disableInteraction","timeSelection","scale","minMaxHorizontalViewExtend","minMaxStep","axisSize","onTimeSelectionChanged","onTimeSelectionToggled"]]},template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1)(2,"span",2),k(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),g(),f(5,"span",5)(6,"button",6),A("click",function(){return i.resetDomain()}),U(7,"async"),U(8,"async"),k(9,"mat-icon",7),g(),f(10,"button",8),A("click",function(){return i.onPinClicked.emit(!i.isPinned)}),k(11,"mat-icon",9),g(),f(12,"button",10),A("click",function(){return i.onFullSizeToggle.emit()}),k(13,"mat-icon",9),g(),f(14,"button",11),k(15,"mat-icon",12),g(),f(16,"mat-menu",null,13)(18,"button",14),A("click",function(){return i.toggleYScaleType()}),k(19,"mat-icon",15),f(20,"span"),T(21,"Toggle Y-axis log scale"),g()(),f(22,"button",16),A("click",function(){return i.openDataDownloadDialog()}),k(23,"mat-icon",17),f(24,"span"),T(25,"Download data"),g()(),S(26,L3e,4,0,"button",18),g()()(),f(27,"div",19,20),S(29,B3e,1,0,"mat-spinner",21),f(30,"line-chart",22),A("onViewBoxOverridden",function(o){return i.isViewBoxOverridden=o})("viewBoxChanged",function(o){return i.onLineChartZoom.emit(o)}),g(),S(31,j3e,17,3,"ng-template",null,23,jt),g()(),S(33,q3e,6,17,"ng-container",24),S(34,$3e,1,1,"ng-template",null,25,jt),S(36,tBe,1,1,"ng-template",null,26,jt)),2&e){let r=st(17),o=st(32),a=st(35),s=st(37);v(3),Zi("title",i.tag),Zi("value",i.title),v(1),b("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped),v(2),b("disabled",!i.lineChart||!G(7,25,i.lineChart.getIsViewBoxOverridden()))("title",i.lineChart&&G(8,27,i.lineChart.getIsViewBoxOverridden())?"Line chart is already fitted to data. When data updates, the line chart will auto fit to its domain.":"Fit line chart domains to data"),v(4),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),b("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(2),b("svgIcon",i.showFullWidth?"fullscreen_exit_24px":"fullscreen_24px"),v(1),b("matMenuTriggerFor",r),v(12),b("ngIf",i.columnCustomizationEnabled),v(3),b("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),b("disableUpdate",!i.isCardVisible)("preferredRendererType",i.forceSvg?i.RendererType.SVG:i.RendererType.WEBGL)("seriesData",i.dataSeries)("seriesMetadataMap",i.chartMetadataMap)("xScaleType",i.xScaleType)("yScaleType",i.yScaleType)("customXFormatter",i.getCustomXFormatter())("ignoreYOutliers",i.ignoreOutliers)("tooltipTemplate",o)("useDarkMode",i.useDarkMode)("userViewBox",i.userViewBox)("customVisTemplate",a)("customChartOverlayTemplate",s),v(3),b("ngIf",i.showDataTable())}},dependencies:[wn,nn,Ne,Kg,h_,Er,bn,Xu,Ed,Yu,Nc,ane,CV,Jg,$g,ct,wf],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:16px;padding-top:4px}[_nghost-%COMP%]:has(.expand-button){padding:4px 16px 0}.always-visible[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-basis:298px}.always-visible[_ngcontent-%COMP%]:not(:has(.expand-button)){flex-grow:1}.heading[_ngcontent-%COMP%]{align-items:center;display:flex;font-size:14px;justify-content:space-between;margin-bottom:4px;position:relative}.heading[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{align-items:center;display:grid;gap:5px;grid-template-columns:auto auto}.heading[_ngcontent-%COMP%]   vis-selected-time-clipped[_ngcontent-%COMP%]{font-size:1.2em;line-height:0}.tag[_ngcontent-%COMP%]{overflow:hidden}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.chart-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;overflow:hidden;resize:vertical}.chart-container[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{position:absolute;right:11px;top:11px}.chart-container[_ngcontent-%COMP%]   line-chart[_ngcontent-%COMP%]{flex-grow:1}.tooltip[_ngcontent-%COMP%]{border-spacing:4px;font-size:13px}.tooltip[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left}.tooltip[_ngcontent-%COMP%]   .tooltip-row[_ngcontent-%COMP%]{white-space:nowrap}.tooltip[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:12px;width:12px}.tooltip[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.4);display:inline-block;height:10px;width:10px}.tooltip[_ngcontent-%COMP%]   .closest[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-color:#fff;box-shadow:inset 0 0 0 1px #fff}.out-of-selected-time[_ngcontent-%COMP%]{height:100%;position:absolute}.out-of-selected-time.start[_ngcontent-%COMP%]{border-right-width:2px;margin-left:-1px}.out-of-selected-time.start.range[_ngcontent-%COMP%]{left:0}.out-of-selected-time.end[_ngcontent-%COMP%]{border-left-width:2px;margin-right:-1px;right:0}.out-of-selected-time.range[_ngcontent-%COMP%]{background-color:rgba(255,255,255,.5)}body.dark-mode[_nghost-%COMP%]   .out-of-selected-time.range[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .out-of-selected-time.range[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4)}.data-table-container[_ngcontent-%COMP%]{height:100px;min-height:100px;max-height:50em;overflow:auto;resize:vertical}.data-table-container.expanded[_ngcontent-%COMP%]{height:auto}.bottom-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7);background-color:#303030}"],changeDetection:0}),n})();function iBe(n,t){return n.length===t.length&&n.every((e,i)=>{let r=t[i],o=e.points,a=r.points;return e.runId===r.runId&&o.length===a.length&&o.every((s,l)=>{let c=a[l];return s.x===c.x&&s.y===c.y})})}var une=(()=>{class n{constructor(e){this.store=e,this.DataDownloadComponent=JQ,this.pinStateChanged=new F,this.isVisible=!1,this.ngUnsubscribe=new Ee,this.columnFilters$=this.store.select(XT),this.numColumnsLoaded$=this.store.select(Mc.getNumDashboardHparamsLoaded),this.numColumnsToLoad$=this.store.select(Mc.getNumDashboardHparamsToLoad),this.useDarkMode$=this.store.select(Pl),this.ignoreOutliers$=this.store.select(Ch),this.tooltipSort$=this.store.select(xh),this.xAxisType$=this.store.select(Ol),this.forceSvg$=this.store.select(yF),this.columnCustomizationEnabled$=this.store.select(uS),this.columnContextMenusEnabled$=this.store.select(T6),this.xScaleType$=this.store.select(Ol).pipe(q(i=>{switch(i){case Pi.STEP:case Pi.RELATIVE:return tr.LINEAR;case Pi.WALL_TIME:return tr.TIME;default:throw new Error(`Invalid xAxisType for line chart. ${i}`)}})),this.scalarSmoothing$=this.store.select(_d),this.smoothingEnabled$=this.store.select(_d).pipe(q(i=>i>0)),this.showFullWidth$=this.store.select(Js).pipe(q(i=>i[this.cardId]?.fullWidth))}onVisibilityChange({visible:e}){this.isVisible=e}isScalarCardMetadata(e){let{plugin:i}=e;return i===An.SCALARS}onFullSizeToggle(){this.store.dispatch(zg({cardId:this.cardId}))}ngOnInit(){let i=this.store.select(Ks,this.cardId).pipe(Oe(l=>!!l&&this.isScalarCardMetadata(l)),q(l=>l));function a(l){return JSON.stringify(["smoothed",l])}let s=this.store.select(wu,this.cardId).pipe(it(this.ngUnsubscribe),Oe(l=>Boolean(l)),q(l=>l),Da(1)).pipe(Vi(this.store.select(Ol)),q(([l,c])=>Object.keys(l).map(p=>({runId:p,points:this.stepSeriesToLineSeries(l[p],c)}))),ri(iBe)).pipe(Vi(this.store.select(s1)),it(this.ngUnsubscribe),q(([l,c])=>c?function(n){let t=[];for(let e of n){let i=[],r=Number.isFinite(e.points[0]?.x)?e.points[0].x:-1/0,o=[];for(let a of e.points)Number.isFinite(a.x)?(a.x<r&&(i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o}),o=[]),o.push(a),r=a.x):o.push(a);i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o});for(let a=0;a<i.length;a++)t.push({...i[a],partitionIndex:a,partitionSize:i.length})}return t}(l):l.map(d=>({...d,seriesId:d.runId,partitionIndex:0,partitionSize:1}))),q(l=>l.map(c=>{let d=c.points[0]?.wallTime;return{...c,points:c.points.map(u=>({...u,relativeTimeInMs:u.wallTime-d}))}})),Vi(this.store.select(Ol)),q(([l,c])=>l.map(d=>({...d,points:d.points.map(u=>{let p;switch(c){case Pi.RELATIVE:p=u.relativeTimeInMs;break;case Pi.WALL_TIME:p=u.wallTime;break;default:p=u.step}return{...u,x:p}})}))),Da(1));this.userViewBox$=this.store.select($F,this.cardId),this.minMaxSteps$=In([this.store.select(BW,this.cardId),this.store.select(VW,this.cardId)]).pipe(q(([l,c])=>{if(l&&c)return{minStep:Math.max(l?.minStep,c?.minStep),maxStep:Math.min(l?.maxStep,c?.maxStep)}})),this.dataSeries$=s.pipe(Vi(this.store.select(_d)),Jn(([l,c])=>{let d=l.map(({seriesId:u,points:p})=>({id:u,points:p}));return c<=0?$t(d):Jr(async function(n,t){Number.isFinite(t)||(t=0),t=Math.max(0,Math.min(t,1));let e=[];for(let i of n){let r=i.points[0]?.y;if(i.points.every(c=>c.y==r)){e.push(i);continue}let a=i.points.length>0?0:NaN,s=0,l=i.points.map(c=>{let d=c.y;if(Number.isFinite(d)){a=a*t+(1-t)*d,s++;let u=1===t?1:1-Math.pow(t,s);return{x:c.x,y:a/u}}return{x:c.x,y:d}});e.push({id:i.id,points:l})}return e}(d,c)).pipe(q(u=>{let p=d.map((h,m)=>({id:a(h.id),points:u[m].points.map(({y:_},M)=>({...h.points[M],y:_}))}));return[...d,...p]}))}),kn([])),this.linkedTimeSelection$=In([this.minMaxSteps$,this.store.select(Eu),this.store.select(Du),this.store.select(Ol)]).pipe(q(([l,c,d,u])=>l&&c&&u===Pi.STEP&&d?Yf(d,l.minStep,l.maxStep):null)),this.stepOrLinkedTimeSelection$=this.store.select(HW,this.cardId),this.columnHeaders$=this.store.select(zW(this.cardId)),this.chartMetadataMap$=s.pipe(Jn(l=>In(l.map(c=>this.getRunDisplayNameAndAlias(c.runId).pipe(q(d=>({...c,...d})))))),Vi(this.store.select(Ru),this.store.select(zQ),this.store.select(Pu),this.store.select(_d)),Cr(0),q(([l,c,d,u,p])=>{let h={},m=p>0;for(let _ of l){let{seriesId:M,runId:y,displayName:x,alias:R,partitionIndex:I,partitionSize:B}=_;h[M]={type:Yg.ORIGINAL,id:M,alias:R,displayName:B>1?`${x}: ${I}`:x,visible:Boolean(c&&c.get(y)&&d.has(y)),color:u[y]??"#fff",aux:!1,opacity:1}}if(!m)return h;for(let[_,M]of Object.entries(h)){let y=a(_);h[y]={...M,id:y,type:Yg.DERIVED,aux:!1,originalSeriesId:_},M.aux=!0,M.opacity=.25}return h}),kn({})),this.loadState$=this.store.select(gd,this.cardId),this.tag$=i.pipe(q(l=>l.tag)),this.cardState$=this.store.select(Js).pipe(q(l=>l[this.cardId]||{})),this.title$=this.tag$.pipe(q(l=>Zg(l,this.groupName))),this.isPinned$=this.store.select(Su,this.cardId),this.rangeEnabled$=this.store.select(m1(this.cardId)),this.runToHparamMap$=this.store.select(XW),this.selectableColumns$=this.store.select(YT)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}getRunDisplayNameAndAlias(e){return In([this.store.select(_1,{runId:e}),this.store.select(qs),this.store.select(b1,{runId:e})]).pipe(q(([i,r,o])=>{let a=null!==i?r[i]??null:null;return{displayName:o||a?o?.name??"...":e,alias:a}}))}stepSeriesToLineSeries(e,i){let r=i===Pi.STEP;return e.map(o=>{let a=1e3*o.wallTime;return{...o,x:r?o.step:a,y:o.value,wallTime:a,relativeTimeInMs:0}})}onDataTableSorting(e){this.store.dispatch(rQ(e))}onCardStateChanged(e){this.store.dispatch(fT({cardId:this.cardId,settings:e}))}onTimeSelectionChanged(e){this.store.dispatch(Hh({...e,cardId:this.cardId}))}onStepSelectorToggled(e){this.store.dispatch(Td({affordance:e,cardId:this.cardId}))}onLineChartZoom(e){this.store.dispatch(_y({userViewBox:e,cardId:this.cardId}))}editColumnHeaders({source:e,destination:i,side:r,dataTableMode:o}){this.store.dispatch("HPARAM"===e.type?ro.dashboardHparamColumnOrderChanged({source:e,destination:i,side:r}):jg({source:e,destination:i,side:r,dataTableMode:o}))}openTableEditMenuToMode(e){this.store.dispatch(cT({mode:e}))}onAddColumn(e){this.store.dispatch(ro.dashboardHparamColumnAdded(e))}onRemoveColumn({header:e,dataTableMode:i}){this.store.dispatch("HPARAM"===e.type?ro.dashboardHparamColumnRemoved({column:e}):Gg({header:e,cardId:this.cardId,dataTableMode:i}))}addHparamFilter(e){this.store.dispatch(ro.dashboardHparamFilterAdded({name:e.name,filter:e.value}))}loadAllColumns(){this.store.dispatch(ro.loadAllDashboardHparams())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["scalar-card"]],inputs:{DataDownloadComponent:"DataDownloadComponent",cardId:"cardId",groupName:"groupName"},outputs:{pinStateChanged:"pinStateChanged"},decls:29,vars:87,consts:[["observeIntersection","",3,"cardId","chartMetadataMap","DataDownloadComponent","dataSeries","ignoreOutliers","isCardVisible","isPinned","loadState","showFullWidth","smoothingEnabled","tag","title","cardState","tooltipSort","xAxisType","xScaleType","useDarkMode","linkedTimeSelection","stepOrLinkedTimeSelection","forceSvg","columnCustomizationEnabled","columnContextMenusEnabled","minMaxStep","userViewBox","columnHeaders","rangeEnabled","columnFilters","runToHparamMap","selectableColumns","numColumnsLoaded","numColumnsToLoad","onFullSizeToggle","onPinClicked","onVisibilityChange","onTimeSelectionChanged","onStepSelectorToggled","onDataTableSorting","onLineChartZoom","editColumnHeaders","onCardStateChanged","openTableEditMenuToMode","addColumn","removeColumn","addFilter","loadAllColumns"]],template:function(e,i){1&e&&(f(0,"scalar-card-component",0),A("onFullSizeToggle",function(){return i.onFullSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)})("onVisibilityChange",function(o){return i.onVisibilityChange(o)})("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged(o)})("onStepSelectorToggled",function(o){return i.onStepSelectorToggled(o)})("onDataTableSorting",function(o){return i.onDataTableSorting(o)})("onLineChartZoom",function(o){return i.onLineChartZoom(o)})("editColumnHeaders",function(o){return i.editColumnHeaders(o)})("onCardStateChanged",function(o){return i.onCardStateChanged(o)})("openTableEditMenuToMode",function(o){return i.openTableEditMenuToMode(o)})("addColumn",function(o){return i.onAddColumn(o)})("removeColumn",function(o){return i.onRemoveColumn(o)})("addFilter",function(o){return i.addHparamFilter(o)})("loadAllColumns",function(){return i.loadAllColumns()}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),U(10,"async"),U(11,"async"),U(12,"async"),U(13,"async"),U(14,"async"),U(15,"async"),U(16,"async"),U(17,"async"),U(18,"async"),U(19,"async"),U(20,"async"),U(21,"async"),U(22,"async"),U(23,"async"),U(24,"async"),U(25,"async"),U(26,"async"),U(27,"async"),U(28,"async"),g()),2&e&&b("cardId",i.cardId)("chartMetadataMap",G(1,31,i.chartMetadataMap$))("DataDownloadComponent",i.DataDownloadComponent)("dataSeries",G(2,33,i.dataSeries$))("ignoreOutliers",G(3,35,i.ignoreOutliers$))("isCardVisible",i.isVisible)("isPinned",G(4,37,i.isPinned$))("loadState",G(5,39,i.loadState$))("showFullWidth",G(6,41,i.showFullWidth$))("smoothingEnabled",G(7,43,i.smoothingEnabled$))("tag",G(8,45,i.tag$))("title",G(9,47,i.title$))("cardState",G(10,49,i.cardState$))("tooltipSort",G(11,51,i.tooltipSort$))("xAxisType",G(12,53,i.xAxisType$))("xScaleType",G(13,55,i.xScaleType$))("useDarkMode",G(14,57,i.useDarkMode$))("linkedTimeSelection",G(15,59,i.linkedTimeSelection$))("stepOrLinkedTimeSelection",G(16,61,i.stepOrLinkedTimeSelection$))("forceSvg",G(17,63,i.forceSvg$))("columnCustomizationEnabled",G(18,65,i.columnCustomizationEnabled$))("columnContextMenusEnabled",G(19,67,i.columnContextMenusEnabled$))("minMaxStep",G(20,69,i.minMaxSteps$))("userViewBox",G(21,71,i.userViewBox$))("columnHeaders",G(22,73,i.columnHeaders$))("rangeEnabled",G(23,75,i.rangeEnabled$))("columnFilters",G(24,77,i.columnFilters$))("runToHparamMap",G(25,79,i.runToHparamMap$))("selectableColumns",G(26,81,i.selectableColumns$))("numColumnsLoaded",G(27,83,i.numColumnsLoaded$))("numColumnsToLoad",G(28,85,i.numColumnsToLoad$))},dependencies:[Qg,dne,ct],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"],changeDetection:0}),n})();function aBe(n,t,e){let i=[],{left:r,right:o}=t,a=(o-r)/e,s=0,l=0;for(let c=0;c<e;c++){let d=r+c*a,u=d+a,p=c===e-1,h=l;for(l=0;s<n.length;){let m=n[s],_=sBe(m,d,u,!p);if(h+=_.curr,l+=_.next,m.x+m.dx>u)break;s++}i.push({x:d,dx:a,y:h})}return i}function sBe(n,t,e,i){let r=n.x,o=n.x+n.dx;if(r>e||o<t)return{curr:0,next:0};if(0===n.dx)return i&&o>=e?{curr:0,next:n.y}:{curr:n.y,next:0};let a=Math.min(o,e)-Math.max(r,t);return{curr:n.y*a/n.dx,next:0}}var lBe=1e4,cBe=.001,dBe=Yr(".2~s"),uBe=Yr(".4~r"),pBe=Yr(".2~e");function hne(n){if(0===n)return"0";let t=Math.abs(n);return t>=lBe?dBe(n):t<cBe?pBe(n):uBe(n)}var hBe=["main"],mBe=["xAxis"],fBe=["yAxis"],gBe=["content"],_Be=["histograms"];function bBe(n,t){if(1&n&&(qn(),f(0,"g")(1,"text"),T(2),g()()),2&n){let e=w();Bt("transform",e.getCssTranslatePx(e.tooltipData.xAxis.position,9)),v(2),kt(e.tooltipData.xAxis.label)}}function vBe(n,t){if(1&n&&(qn(),f(0,"g")(1,"text"),T(2),g()()),2&n){let e=w();Bt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),v(1),Be("y",e.tooltipData.yAxis.position),v(1),Ve(" ",e.tooltipData.yAxis.label," ")}}function yBe(n,t){if(1&n){let e=Te();qn(),ua(),Gt(0),f(1,"histogram-card-fob-controller",16),A("onTimeSelectionChanged",function(r){return ne(e),ie(w().onLinkedTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return ne(e),ie(w().onLinkedTimeToggled.emit())}),g(),Wt()}if(2&n){let e=w();v(1),b("timeSelection",e.timeSelection)("steps",e.getSteps())("temporalScale",e.scales.temporalScale)}}function xBe(n,t){if(1&n&&(qn(),f(0,"g"),k(1,"line",17),g()),2&n){let e=t.$implicit;Bt("transform",w().getCssTranslatePx(0,e))}}function CBe(n,t){1&n&&(qn(),k(0,"line",21))}function MBe(n,t){if(1&n&&(qn(),k(0,"circle",22)),2&n){let e=w().$implicit,i=w();Bt("transform",i.getCssTranslatePx(i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).x,i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).y))}}function wBe(n,t){if(1&n){let e=Te();qn(),f(0,"g",18),A("mouseenter",function(r){let a=ne(e).$implicit;return ie(w().updateColorOnHover(r,a,!0))})("mouseleave",function(r){let a=ne(e).$implicit;return ie(w().updateColorOnHover(r,a,!1))})("click",function(){let o=ne(e).$implicit;return ie(w().onLinkedTimeRangeChanged(o))}),S(1,CBe,1,0,"line",19),k(2,"path"),S(3,MBe,1,2,"circle",20),g()}if(2&n){let e=t.$implicit,i=w();Bt("transform",i.getGroupTransform(e))("color",i.getHistogramFill(e)),nt("histogram",!0)("no-color",!i.isDatumInTimeSelectionRange(e)),v(1),b("ngIf",i.mode===i.HistogramMode.OFFSET),v(1),Be("d",i.getHistogramPath(e)),v(1),b("ngIf",i.tooltipData)}}function SBe(n,t){if(1&n&&(qn(),k(0,"circle",22)),2&n){let e=w(2);Be("cx",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).x)("cy",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).y)}}function EBe(n,t){if(1&n&&(qn(),f(0,"g",4)(1,"g"),k(2,"path"),S(3,SBe,1,2,"circle",23),g(),f(4,"g",24)(5,"text",25),T(6),g()()()),2&n){let e=w();v(1),Bt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),v(1),Be("d",e.getHistogramPath(e.tooltipData.closestDatum)),v(1),b("ngIf",e.tooltipData.closestBin),v(1),Bt("transform",e.getCssTranslatePx(e.tooltipData.value.position.x,e.tooltipData.value.position.y)),v(2),kt(e.tooltipData.value.label)}}var gA=(()=>{class n{constructor(e){this.changeDetector=e,this.mode=Sr.OFFSET,this.timeProperty=no.STEP,this.timeSelection=null,this.onLinkedTimeSelectionChanged=new F,this.onLinkedTimeToggled=new F,this.HistogramMode=Sr,this.TimeProperty=no,this.tooltipData=null,this.ngUnsubscribe=new Ee,this.layout={histogramHeight:0,contentClientRect:{height:0,width:0}},this.scales=null,this.formatters={binNumber:hne,count:Yr(".3n"),wallTime:m0("%m/%d %X"),step:Yr(".0f"),relative:i=>Yr(".1r")(i/36e5)+"h"},this.domVisible=!1}ngOnChanges(){this.updateChartIfVisible()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngAfterViewInit(){Ei(this.main.nativeElement,"mousemove",{passive:!0}).pipe(it(this.ngUnsubscribe)).subscribe(e=>this.onMouseMove(e))}getCssTranslatePx(e,i){return`translate(${e}px, ${i}px)`}getClosestBinFromBinCoordinate(e,i){if(!e.bins.length)return{x:0,dx:0,y:0};let r=e.bins[0],o=e.bins.slice(-1)[0];return i<r.x?r:i>=o.x+o.dx?o:e.bins.find(s=>s.x<=i&&i<s.x+s.dx)}getUiCoordFromBinForContent(e){return this.scales?{x:this.scales.binScale($x(e)),y:this.scales.countScale(e.y)}:{x:0,y:0}}getHistogramPath(e){if(!this.scales||!e.bins.length)return"";let i=this.scales.binScale,r=this.scales.countScale,o=e.bins[0],a=e.bins.slice(-1)[0],s=[`M${i($x(o))},${r(0)}`];for(let l of e.bins)s.push(`L${i($x(l))},${r(l.y)}`);return s.push(`L${i($x(a))},${r(0)}`),s.join("")}trackByWallTime(e){return e.wallTime}getGroupTransform(e){return this.scales&&this.mode!==Sr.OVERLAY?this.getCssTranslatePx(0,this.scales.temporalScale(this.getTimeValue(e))):""}getSteps(){return this.data.map(e=>e.step)}isTimeSelectionEnabled(e){return Boolean(this.mode===Sr.OFFSET&&this.timeProperty===no.STEP&&this.scales&&e)}isDatumInTimeSelectionRange(e){return!this.isTimeSelectionEnabled(this.timeSelection)||(null===this.timeSelection.end?this.timeSelection.start.step===e.step:this.timeSelection.start.step<=e.step&&this.timeSelection.end.step>=e.step)}getHistogramFill(e){return this.scales?this.scales.d3ColorScale(this.getTimeValue(e)):""}updateColorOnHover(e,i,r){!this.isTimeSelectionEnabled(this.timeSelection)||this.isDatumInTimeSelectionRange(i)||(r?e.target.classList.remove("no-color"):e.target.classList.add("no-color"))}getGridTickYLocs(){if(!this.scales||this.mode===Sr.OFFSET)return[];let e=this.scales.countScale;return e.ticks().map(i=>e(i))}onResize(){this.updateClientRects(),this.updateChartIfVisible()}onVisibilityChange({visible:e}){this.domVisible=e,e&&(this.updateClientRects(),this.updateChartIfVisible())}onLinkedTimeRangeChanged(e){if(!this.isTimeSelectionEnabled(this.timeSelection))return;let i=this.timeSelection.start.step,r=this.timeSelection.end?.step,o=e.step<i?e.step:i,a=r;a=void 0===a?e.step>i?e.step:i:e.step>a?e.step:a,(o!==i||a!==r)&&o!==a&&this.onLinkedTimeSelectionChanged.emit({timeSelection:{start:{step:o},end:{step:a}},affordance:Qa.HISTOGRAM_CLICK_TO_RANGE})}getTimeValue(e){switch(this.timeProperty){case no.WALL_TIME:return e.wallTime;case no.STEP:return e.step;case no.RELATIVE:return e.wallTime-this.data[0].wallTime}}updateClientRects(){this.content&&(this.layout.contentClientRect=this.content.nativeElement.getBoundingClientRect(),this.layout.histogramHeight=this.layout.contentClientRect.height/2.5)}updateChartIfVisible(){!this.domVisible||(this.scales=this.computeScales(this.data),this.renderXAxis(),this.renderYAxis(),this.changeDetector.detectChanges())}computeScales(e){let{width:i,height:r}=this.layout.contentClientRect,{min:o,max:a}=mne(e,y=>function(n,t){return n.reduce((e,i)=>Math.min(e,i.x),1/0)}(y.bins),y=>MV(y.bins,({x:x,dx:R})=>x+R)),s=MV(e,y=>MV(y.bins,({y:x})=>x)),l=zl().domain([o,a]).nice(),c=this.mode!==Sr.OVERLAY&&this.timeProperty==no.WALL_TIME?sm():zl(),d=e.map(y=>this.getTimeValue(y)),{min:u,max:p}=mne(d,y=>y),h=[u,p];c.domain(h);let m=zl();m.domain([0,s]);let _=Xh(this.color||"#000"),M=zl();return M.domain(h),l.range([0,i]),M.range([_.brighter(),_.darker()]),M.interpolate(uL),this.mode===Sr.OVERLAY?(c.range([r,r]),m.range([r,0])):(c.range([r-(this.mode===Sr.OFFSET?r-this.layout.histogramHeight:0),r]),m.range([0,-this.layout.histogramHeight])),{binScale:l,d3ColorScale:M,countScale:m,temporalScale:c}}renderXAxis(){if(!this.scales)return;let{width:e}=this.layout.contentClientRect,i=function(n){return aZ(HN,n)}(this.scales.binScale).ticks(Math.max(2,e/20));i.tickFormat(this.formatters.binNumber),i(aD(this.xAxis.nativeElement))}getYAxisFormatter(){if(this.mode===Sr.OVERLAY)return this.formatters.count;switch(this.timeProperty){case no.WALL_TIME:return this.formatters.wallTime;case no.STEP:return this.formatters.step;case no.RELATIVE:return this.formatters.relative;default:throw RangeError(`Y axis formatter for ${this.timeProperty} must be implemented`)}}getMaxTicks(e){let{height:i}=this.layout.contentClientRect,r=i/15;if(this.timeProperty===no.STEP){let[o,a]=e.domain(),s=Math.max(a-o+1,1);return Math.min(s,r)}return r}renderYAxis(){if(!this.scales)return;let e=this.mode===Sr.OVERLAY?this.scales.countScale:this.scales.temporalScale,i=this.getMaxTicks(e),r=function(n){return aZ(eD,n)}(e).ticks(Math.max(2,i));r.tickFormat(this.getYAxisFormatter()),r(aD(this.yAxis.nativeElement))}findClosestDatumIndex(e){let i=e.target,r=i;for(;i&&i!==this.histograms.nativeElement;)r=i,i=i.parentElement;return i?Array.from(i.children).indexOf(r):-1}onMouseMoveForTestOnly(e){return this.onMouseMove(e)}onMouseMove(e){if(!this.scales)return;let i=e.offsetX,r=e.offsetY,o=this.findClosestDatumIndex(e);if(o<0)return;let a=this.scales.binScale.invert(i),s=this.data[o],l=this.getClosestBinFromBinCoordinate(s,a);this.tooltipData={value:{position:{x:i,y:r},label:this.mode===Sr.OFFSET?this.formatters.count(l.y):`Step: ${this.formatters.step(s.step)}`},xAxis:{position:this.getUiCoordFromBinForContent(l).x,label:this.formatters.binNumber($x(l))},yAxis:{position:this.scales.countScale(this.mode===Sr.OFFSET?0:l.y),label:this.mode===Sr.OFFSET?this.getYAxisFormatter()(this.getTimeValue(s)):this.formatters.binNumber(l.y)},xPositionInBinCoord:a,closestDatum:s,closestBin:l},this.changeDetector.detectChanges()}}return n.\u0275fac=function(e){return new(e||n)(C(Qt))},n.\u0275cmp=P({type:n,selectors:[["tb-histogram"]],viewQuery:function(e,i){if(1&e&&(Ue(hBe,5),Ue(mBe,5),Ue(fBe,5),Ue(gBe,5),Ue(_Be,5)),2&e){let r;be(r=ve())&&(i.main=r.first),be(r=ve())&&(i.xAxis=r.first),be(r=ve())&&(i.yAxis=r.first),be(r=ve())&&(i.content=r.first),be(r=ve())&&(i.histograms=r.first)}},inputs:{mode:"mode",timeProperty:"timeProperty",color:"color",data:"data",timeSelection:"timeSelection"},outputs:{onLinkedTimeSelectionChanged:"onLinkedTimeSelectionChanged",onLinkedTimeToggled:"onLinkedTimeToggled"},features:[qt],decls:22,vars:15,consts:[["detectResize","","observeIntersection","",3,"onResize","onVisibilityChange"],["main",""],[1,"axis","x-axis"],["xAxis",""],[1,"tooltip"],[3,"transform",4,"ngIf"],[1,"axis","y-axis"],["yAxis",""],[4,"ngIf"],[1,"content"],["content",""],[1,"grid"],[3,"transform",4,"ngFor","ngForOf"],["histograms",""],[3,"transform","histogram","no-color","color","mouseenter","mouseleave","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","tooltip",4,"ngIf"],[1,"histogram-card-fob",3,"timeSelection","steps","temporalScale","onTimeSelectionChanged","onTimeSelectionToggled"],["x2","100%",1,"tick"],[3,"mouseenter","mouseleave","click"],["class","baseline","x2","100%",4,"ngIf"],["r","2",3,"transform",4,"ngIf"],["x2","100%",1,"baseline"],["r","2"],["r","2",4,"ngIf"],[1,"value-label"],["x","3","y","-3"]],template:function(e,i){1&e&&(f(0,"div",0,1),A("onResize",function(){return i.onResize()})("onVisibilityChange",function(o){return i.onVisibilityChange(o)}),qn(),f(2,"svg",2),k(3,"g",null,3),f(5,"g",4),S(6,bBe,3,3,"g",5),g()(),ua(),f(7,"div",6),qn(),f(8,"svg"),k(9,"g",null,7),f(11,"g",4),S(12,vBe,3,4,"g",5),g()(),S(13,yBe,2,3,"ng-container",8),g(),f(14,"svg",9,10)(16,"g",11),S(17,xBe,2,2,"g",12),g(),f(18,"g",null,13),S(20,wBe,4,11,"g",14),g(),S(21,EBe,7,7,"g",15),g()()),2&e&&(Xo("main "+i.mode+" "+i.timeProperty),v(6),b("ngIf",i.tooltipData),v(5),Bt("transform",i.getCssTranslatePx(9,0)),v(1),b("ngIf",i.tooltipData),v(1),b("ngIf",i.isTimeSelectionEnabled(i.timeSelection)),v(4),b("ngForOf",i.getGridTickYLocs()),v(1),nt("histograms",!0)("linked-time-single-step",i.timeSelection&&!i.timeSelection.end),v(2),b("ngForOf",i.data)("ngForTrackBy",i.trackByWallTime),v(1),b("ngIf",i.tooltipData))},styles:['[_nghost-%COMP%], .main[_ngcontent-%COMP%]{display:inline-block;height:100%;width:100%}[_nghost-%COMP%]{box-sizing:border-box;padding:10px}.main[_ngcontent-%COMP%]{display:grid;grid-template-areas:"content y-axis" "x-axis .";grid-template-columns:1fr 50px;grid-template-rows:1fr 30px}.main.wall_time[_ngcontent-%COMP%]{grid-template-columns:1fr 75px}.tooltip[_ngcontent-%COMP%], .baseline[_ngcontent-%COMP%]{color:#000}body.dark-mode[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]{color:#fff}body.dark-mode[_nghost-%COMP%]   .baseline[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .baseline[_ngcontent-%COMP%]{color:#fff}.linked-time-fob[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{font-weight:bold;font-size:10px}.linked-time-fob[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .linked-time-fob[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{fill:currentColor}.linked-time-fob[_ngcontent-%COMP%]   .value-label[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   .value-label[_ngcontent-%COMP%]{dominant-baseline:ideographic;text-anchor:start}.axis[_ngcontent-%COMP%]    {color:#616161;position:relative;overflow:hidden}body.dark-mode[_nghost-%COMP%]   .axis[_ngcontent-%COMP%]    , body.dark-mode   [_nghost-%COMP%]   .axis[_ngcontent-%COMP%]    {color:rgba(255,255,255,.7)}.axis[_ngcontent-%COMP%]     .domain, .axis[_ngcontent-%COMP%]     .tick text{display:none}.axis[_ngcontent-%COMP%]     .tick:nth-child(2n+1) text{display:initial}svg[_ngcontent-%COMP%]{height:100%;width:100%;pointer-events:visiblePainted}svg[_ngcontent-%COMP%]   line[_ngcontent-%COMP%], svg[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], svg[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{pointer-events:none}svg[_ngcontent-%COMP%]   g[_ngcontent-%COMP%]{will-change:transform}.x-axis[_ngcontent-%COMP%]{grid-area:x-axis}.x-axis[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{dominant-baseline:hanging;text-anchor:middle}.y-axis[_ngcontent-%COMP%]{grid-area:y-axis;overflow:clip visible}.y-axis[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{dominant-baseline:middle;text-anchor:start}.histogram-card-fob[_ngcontent-%COMP%]{left:9px;position:absolute}.content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%], .axis[_ngcontent-%COMP%]     .tick line{stroke:#ddd}body.dark-mode[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%]{stroke:#555}body.dark-mode[_nghost-%COMP%]   .axis[_ngcontent-%COMP%]     .tick line, body.dark-mode   [_nghost-%COMP%]   .axis[_ngcontent-%COMP%]     .tick line{stroke:#555}.content[_ngcontent-%COMP%]{grid-area:content;overflow:visible;z-index:1}.content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%]{stroke-width:1px;stroke-dasharray:2}.content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{fill:currentColor;stroke-opacity:.6;stroke-width:1px}.content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{filter:drop-shadow(0 0 1px rgba(0, 0, 0, 0.6));stroke:#fff;will-change:transform}.content[_ngcontent-%COMP%]   .baseline[_ngcontent-%COMP%]{stroke-opacity:.1;stroke-width:1px;stroke:currentColor;width:100%}.content[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke-opacity:1;stroke:currentColor;fill:rgba(0,0,0,0)}.content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]{color:rgba(221,221,221,.4) !important}.content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke-opacity:.2}body.dark-mode[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]{color:rgba(51,51,51,.4) !important}.offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#fff}body.dark-mode[_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#555}.offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%]{stroke:#000}body.dark-mode[_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%]{stroke:#fff}.overlay[_ngcontent-%COMP%]   .x-axis[_ngcontent-%COMP%]     .tick line{display:none}.overlay[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{fill-opacity:0;stroke:currentColor}.tooltip[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{display:none}.main[_ngcontent-%COMP%]:hover   .content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .main[_ngcontent-%COMP%]:hover   .tooltip[_ngcontent-%COMP%]{display:block}'],changeDetection:0}),n})();function MV(n,t){return n.reduce((e,i)=>Math.max(e,t(i)),-1/0)}function mne(n,t,e){e||(e=t);let i=1/0,r=-1/0;for(let o of n)i=Math.min(i,t(o)),r=Math.max(r,e(o));return{min:i,max:r}}function $x(n){return n.x+.5*n.dx}function IBe(n,t){1&n&&(f(0,"span",14),k(1,"mat-spinner",15),g())}function ABe(n,t){if(1&n){let e=Te();f(0,"tb-histogram",16),A("onLinkedTimeSelectionChanged",function(r){return ne(e),ie(w().onLinkedTimeSelectionChanged.emit(r))})("onLinkedTimeToggled",function(){return ne(e),ie(w().onLinkedTimeToggled.emit())}),g()}if(2&n){let e=w();b("data",e.data)("mode",e.mode)("timeProperty",e.timeProperty(e.xAxisType))("color",e.runColorScale(e.runId))("timeSelection",e.convertToTimeSelection(e.linkedTimeSelection))}}function RBe(n,t){1&n&&(f(0,"div",18),T(1," Data failed to load. "),g())}function PBe(n,t){if(1&n&&S(0,RBe,2,0,"div",17),2&n){let e=w();b("ngIf",e.loadState===e.DataLoadState.FAILED)}}var kBe=function(n){return{backgroundColor:n}},fne=(()=>{class n{constructor(){this.DataLoadState=Re,this.onFullSizeToggle=new F,this.onPinClicked=new F,this.onLinkedTimeSelectionChanged=new F,this.onLinkedTimeToggled=new F}timeProperty(e){switch(e){case Pi.STEP:return no.STEP;case Pi.WALL_TIME:return no.WALL_TIME;case Pi.RELATIVE:return no.RELATIVE;default:throw new Error("Invalid xAxisType for histogram time property.")}}convertToTimeSelection(e){return null===e?null:{start:{step:e.startStep},end:e.endStep?{step:e.endStep}:null}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["histogram-card-component"]],inputs:{loadState:"loadState",title:"title",tag:"tag",runId:"runId",data:"data",mode:"mode",xAxisType:"xAxisType",runColorScale:"runColorScale",showFullWidth:"showFullWidth",isPinned:"isPinned",linkedTimeSelection:"linkedTimeSelection",isClosestStepHighlighted:"isClosestStepHighlighted"},outputs:{onFullSizeToggle:"onFullSizeToggle",onPinClicked:"onPinClicked",onLinkedTimeSelectionChanged:"onLinkedTimeSelectionChanged",onLinkedTimeToggled:"onLinkedTimeToggled"},decls:16,vars:14,consts:function(){let t,e;return t=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,e=$localize`:A button on a histogram card that toggles full size mode.␟fc8f767d0b9f930187a1bae34477ad28736ece33␟915721563638926597:Toggle full size mode`,[[1,"heading"],[1,"tag"],[3,"title","value"],[3,"isClipped","isClosestStepHighlighted"],[1,"run"],[1,"dot",3,"ngStyle"],[1,"run-text",3,"runId"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",e,"title","Toggle full size mode",3,"click"],["class","spinner",4,"ngIf"],[3,"data","mode","timeProperty","color","timeSelection","onLinkedTimeSelectionChanged","onLinkedTimeToggled",4,"ngIf","ngIfElse"],["noData",""],[1,"spinner"],["diameter","18"],[3,"data","mode","timeProperty","color","timeSelection","onLinkedTimeSelectionChanged","onLinkedTimeToggled"],["class","empty-message",4,"ngIf"],[1,"empty-message"]]},template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1),k(2,"tb-truncated-path",2)(3,"vis-linked-time-selection-warning",3),g(),f(4,"div",4),k(5,"span",5)(6,"card-run-name",6),g(),f(7,"span",7)(8,"button",8),A("click",function(){return i.onPinClicked.emit(!i.isPinned)}),k(9,"mat-icon",9),g(),f(10,"button",10),A("click",function(){return i.onFullSizeToggle.emit()}),k(11,"mat-icon",9),g()(),S(12,IBe,2,0,"span",11),g(),S(13,ABe,1,5,"tb-histogram",12),S(14,PBe,1,1,"ng-template",null,13,jt)),2&e){let r=st(15);v(2),b("title",i.tag)("value",i.title),v(1),b("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),v(2),b("ngStyle",Un(12,kBe,i.runColorScale(i.runId))),v(1),b("runId",i.runId),v(2),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),b("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(2),b("svgIcon",i.showFullWidth?"fullscreen_exit_24px":"fullscreen_24px"),v(1),b("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),b("ngIf",i.data&&i.data.length)("ngIfElse",r)}},dependencies:[Ne,Mf,gA,Er,bn,Nc,ZT,Jg,$g],styles:['[_nghost-%COMP%]{box-sizing:border-box;display:flex;flex-basis:318px;flex-direction:column;flex-grow:1;height:100%;overflow:auto;padding:16px;padding-top:4px}.heading[_ngcontent-%COMP%]{align-items:center;display:grid;grid-template-areas:"tag controls" "run spinner";grid-template-columns:1fr auto;font-size:14px;margin-bottom:4px}.tag[_ngcontent-%COMP%]{align-items:center;display:flex;gap:5px;grid-area:tag;overflow:hidden}.tag[_ngcontent-%COMP%]   vis-selected-time-clipped[_ngcontent-%COMP%]{line-height:0}.run[_ngcontent-%COMP%]{grid-area:run;display:flex;white-space:nowrap;font-size:13px}.run[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex:none;display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:4px}.run[_ngcontent-%COMP%]   .run-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;max-width:120px}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;grid-area:controls;justify-self:flex-end;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.spinner[_ngcontent-%COMP%]{display:flex;grid-area:spinner;height:100%;justify-content:center;position:relative}mat-spinner[_ngcontent-%COMP%]{top:0;right:0;position:absolute}tb-histogram[_ngcontent-%COMP%]{flex-grow:1}.empty-message[_ngcontent-%COMP%]{margin-top:1em;font-size:13px}'],changeDetection:0}),n})(),gne=(()=>{class n{constructor(e){this.store=e,this.pinStateChanged=new F,this.mode$=this.store.select(a1),this.xAxisType$=this.store.select(Ol),this.showFullWidth$=this.store.select(Js).pipe(q(i=>i[this.cardId]?.fullWidth))}isHistogramCardMetadata(e){let{plugin:i}=e;return i===An.HISTOGRAMS}onFullSizeToggle(){this.store.dispatch(zg({cardId:this.cardId}))}ngOnInit(){let i=this.store.select(Ks,this.cardId).pipe(Oe(o=>!!o&&this.isHistogramCardMetadata(o)),q(o=>o)),r=In([i,this.store.select(wu,this.cardId)]);this.data$=r.pipe(q(([o,a])=>{let s=o.runId;return a&&a.hasOwnProperty(s)?function(n,t=30){if(!n.length||t<1)return[];let e=function(n){let t=null,e=null;for(let{bins:i}of n){if(!i.length)continue;let r=i[i.length-1],o=i[0].x,a=r.x+r.dx;(null===t||o<t)&&(t=o),(null===e||a>e)&&(e=a)}return null===t||null===e?null:{left:t,right:e}}(n);return e&&e.left===e.right&&(e.right=1.1*e.right+1,e.left=e.left/1.1-1),n.map(i=>({step:i.step,wallTime:i.wallTime,bins:e?aBe(i.bins,e,t):[]}))}(a[s].map(d=>{let{wallTime:u,step:p}=d;return{wallTime:u,step:p,bins:d.bins.map(m=>({x:m.min,dx:m.max-m.min,y:m.count}))}})):[]})),this.steps$=this.data$.pipe(q(o=>o.map(a=>a.step))),this.linkedTimeSelection$=In([this.store.select(Du),this.steps$,this.store.select(Tu)]).pipe(q(([o,a,s])=>{if(!o)return null;let l=1/0,c=-1/0;for(let p of a)l=Math.min(p,l),c=Math.max(p,c);return function(n,t){if(null!==n.endStep)return n;let e=function(n,t){let e=1/0,i=null;for(let r of t){let o=Math.abs(n-r);o<e&&(e=o,i=r)}return i}(n.startStep,t);return null!==e?{...n,startStep:e}:n}(Yf(OF(o,s),l,c),a)})),this.isClosestStepHighlighted$=In([this.store.select(Du),this.linkedTimeSelection$]).pipe(q(([o,a])=>o&&a&&!a.clipped&&null===o.end&&o.start.step!==a.startStep)),this.loadState$=this.store.select(gd,this.cardId),this.tag$=i.pipe(q(o=>o.tag)),this.title$=this.tag$.pipe(q(o=>Zg(o,this.groupName))),this.runId$=i.pipe(q(o=>o.runId)),this.isPinned$=this.store.select(Su,this.cardId)}onLinkedTimeSelectionChanged(e){this.store.dispatch(Hh(e))}onLinkedTimeToggled(){this.store.dispatch(Td({affordance:Za.FOB_DESELECT}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["histogram-card"]],inputs:{cardId:"cardId",groupName:"groupName",runColorScale:"runColorScale"},outputs:{pinStateChanged:"pinStateChanged"},decls:12,vars:34,consts:[[3,"loadState","title","tag","runId","data","mode","xAxisType","runColorScale","showFullWidth","isPinned","isClosestStepHighlighted","linkedTimeSelection","onFullSizeToggle","onPinClicked","onLinkedTimeSelectionChanged","onLinkedTimeToggled"]],template:function(e,i){1&e&&(f(0,"histogram-card-component",0),A("onFullSizeToggle",function(){return i.onFullSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)})("onLinkedTimeSelectionChanged",function(o){return i.onLinkedTimeSelectionChanged(o)})("onLinkedTimeToggled",function(){return i.onLinkedTimeToggled()}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),U(10,"async"),U(11,"async"),g()),2&e&&b("loadState",G(1,12,i.loadState$))("title",G(2,14,i.title$))("tag",G(3,16,i.tag$))("runId",G(4,18,i.runId$))("data",G(5,20,i.data$))("mode",G(6,22,i.mode$))("xAxisType",G(7,24,i.xAxisType$))("runColorScale",i.runColorScale)("showFullWidth",G(8,26,i.showFullWidth$))("isPinned",G(9,28,i.isPinned$))("isClosestStepHighlighted",G(10,30,i.isClosestStepHighlighted$))("linkedTimeSelection",G(11,32,i.linkedTimeSelection$))},dependencies:[fne,ct],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})();function NBe(n,t){if(1&n){let e=Te();f(0,"image-card",6),A("fullWidthChanged",function(r){return ne(e),ie(w(2).onFullWidthChanged(r))})("pinStateChanged",function(){return ne(e),ie(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);b("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function LBe(n,t){if(1&n){let e=Te();f(0,"scalar-card",7),A("pinStateChanged",function(){return ne(e),ie(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);b("cardId",e.cardId)("groupName",e.groupName)}}function BBe(n,t){if(1&n){let e=Te();f(0,"histogram-card",8),A("pinStateChanged",function(){return ne(e),ie(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);b("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function VBe(n,t){if(1&n&&(f(0,"div"),T(1),g()),2&n){let e=w(2);v(1),Ve("Placeholder error for: ",e.cardId,"")}}function HBe(n,t){if(1&n&&(Gt(0,1),S(1,NBe,1,3,"image-card",2),S(2,LBe,1,2,"scalar-card",3),S(3,BBe,1,3,"histogram-card",4),S(4,VBe,2,1,"div",5),Wt()),2&n){let e=w();b("ngSwitch",e.pluginType),v(1),b("ngSwitchCase",e.PluginType.IMAGES),v(1),b("ngSwitchCase",e.PluginType.SCALARS),v(1),b("ngSwitchCase",e.PluginType.HISTOGRAMS)}}var _ne=(()=>{class n{constructor(){this.PluginType=An,this.fullWidthChanged=new F,this.fullHeightChanged=new F,this.pinStateChanged=new F}onFullWidthChanged(e){this.fullWidthChanged.emit(e)}onFullHeightChanged(e){this.fullHeightChanged.emit(e)}onPinStateChanged(){this.pinStateChanged.emit()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["card-view-component"]],inputs:{isEverVisible:"isEverVisible",cardId:"cardId",groupName:"groupName",pluginType:"pluginType",runColorScale:"runColorScale"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged",pinStateChanged:"pinStateChanged"},decls:1,vars:1,consts:[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],[3,"cardId","groupName","runColorScale","fullWidthChanged","pinStateChanged",4,"ngSwitchCase"],[3,"cardId","groupName","pinStateChanged",4,"ngSwitchCase"],[3,"cardId","groupName","runColorScale","pinStateChanged",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"cardId","groupName","runColorScale","fullWidthChanged","pinStateChanged"],[3,"cardId","groupName","pinStateChanged"],[3,"cardId","groupName","runColorScale","pinStateChanged"]],template:function(e,i){1&e&&S(0,HBe,5,4,"ng-container",0),2&e&&b("ngIf",i.isEverVisible)},dependencies:[Ne,mr,kr,du,QQ,une,gne],encapsulation:2,changeDetection:0}),n})(),bne=(()=>{class n{constructor(e){this.store=e,this.isEverVisible=!1,this.fullWidthChanged=new F,this.fullHeightChanged=new F,this.runColorScale$=this.store.select(Pu).pipe(ic(350,void 0,{leading:!0,trailing:!0}),q(i=>r=>i.hasOwnProperty(r)?i[r]:"#fff"))}onVisibilityChange({visible:e}){this.isEverVisible=this.isEverVisible||e}onFullWidthChanged(e){this.fullWidthChanged.emit(e)}onFullHeightChanged(e){this.fullHeightChanged.emit(e)}onPinStateChanged(){this.store.select(Su,this.cardId).pipe(Lt(1),It(this.store.select(kW))).subscribe(([e,i])=>{this.store.dispatch(np({cardId:this.cardId,canCreateNewPins:i,wasPinned:e}))})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["card-view"]],inputs:{cardId:"cardId",groupName:"groupName",pluginType:"pluginType"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged"},decls:2,vars:7,consts:[["observeIntersection","","intersectionObserverMargin","200px 200px 200px 200px",3,"isEverVisible","cardId","groupName","pluginType","runColorScale","fullWidthChanged","fullHeightChanged","pinStateChanged","onVisibilityChange"]],template:function(e,i){1&e&&(f(0,"card-view-component",0),A("fullWidthChanged",function(o){return i.onFullWidthChanged(o)})("fullHeightChanged",function(o){return i.onFullHeightChanged(o)})("pinStateChanged",function(){return i.onPinStateChanged()})("onVisibilityChange",function(o){return i.onVisibilityChange(o)}),U(1,"async"),g()),2&e&&b("isEverVisible",i.isEverVisible)("cardId",i.cardId)("groupName",i.groupName)("pluginType",i.pluginType)("runColorScale",G(1,5,i.runColorScale$))},dependencies:[Qg,_ne,ct],styles:["[_nghost-%COMP%]{background-color:#fff}body.dark-mode   [_nghost-%COMP%]{background-color:#303030}"],changeDetection:0}),n})();function GBe(n,t){1&n&&hi(0)}var WBe=function(n,t){return{"full-width":n,"full-height":t}};function qBe(n,t){if(1&n){let e=Te();f(0,"div",5)(1,"card-view",6),A("fullWidthChanged",function(r){let a=ne(e).$implicit;return ie(w(2).onFullWidthChanged(a.cardId,r))})("fullHeightChanged",function(r){let a=ne(e).$implicit;return ie(w(2).onFullHeightChanged(a.cardId,r))}),g()()}if(2&n){let e=t.$implicit,i=w(2);b("ngClass",So(6,WBe,i.cardsAtFullWidth.has(e.cardId)||(null==i.cardStateMap[e.cardId]?null:i.cardStateMap[e.cardId].fullWidth),i.cardsAtFullHeight.has(e.cardId)||(null==i.cardStateMap[e.cardId]?null:i.cardStateMap[e.cardId].tableExpanded))),v(1),b("cardId",e.cardId)("groupName",i.groupName)("pluginType",e.plugin)("cardObserver",i.cardObserver)("cardLazyLoader",e.cardId)}}function XBe(n,t){1&n&&hi(0)}var YBe=function(){return{isBottomControl:!1}},QBe=function(){return{isBottomControl:!0}};function ZBe(n,t){if(1&n&&(f(0,"div"),S(1,GBe,1,0,"ng-container",2),f(2,"div",3),S(3,qBe,2,9,"div",4),g(),S(4,XBe,1,0,"ng-container",2),g()),2&n){let e=w(),i=st(2);v(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",mc(8,YBe)),v(1),Bt("grid-template-columns",e.gridTemplateColumn),v(1),b("ngForOf",e.cardIdsWithMetadata)("ngForTrackBy",e.trackByCards),v(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",mc(9,QBe))}}function KBe(n,t){if(1&n){let e=Te();f(0,"button",12),A("click",function(r){ne(e);let o=w(3);return ie(o.handlePageChange(o.pageIndex-1,r.target))}),T(1," Previous "),g()}2&n&&b("disabled",0===w(3).pageIndex)}function JBe(n,t){if(1&n){let e=Te();f(0,"span",15)(1,"input",16),A("input",function(r){return ne(e),ie(w(4).onPaginationInputChange(r))})("change",function(r){return ne(e),ie(w(4).onPaginationInputChange(r))}),g(),T(2),g()}if(2&n){let e=w(4);v(1),b("value",e.pageIndex+1)("max",e.numPages),v(1),Ve(" of ",e.numPages,"")}}function $Be(n,t){if(1&n){let e=Te();f(0,"span"),S(1,JBe,3,3,"span",13),f(2,"button",14),A("click",function(r){ne(e);let o=w(3);return ie(o.handlePageChange(o.pageIndex+1,r.target))}),T(3," Next "),g()()}if(2&n){let e=w(2).isBottomControl,i=w();v(1),b("ngIf",i.showPaginationInput(e)),v(1),b("disabled",i.pageIndex+1>=i.numPages)}}function eVe(n,t){if(1&n&&(f(0,"div",8)(1,"span",9),S(2,KBe,2,1,"button",10),g(),f(3,"span",11),S(4,$Be,4,2,"span",0),g()()),2&n){let e=w(2);v(2),b("ngIf",e.showPaginationControls),v(2),b("ngIf",e.showPaginationControls)}}function tVe(n,t){1&n&&S(0,eVe,5,2,"div",7),2&n&&b("ngIf",w().showPaginationControls)}var vne=(()=>{class n{constructor(e){this.cdkScrollable=e,this.PluginType=An,this.gridTemplateColumn="",this.cardsAtFullWidth=new Set,this.cardsAtFullHeight=new Set,this.pageIndexChanged=new F}ngOnInit(){this.isCardWidthValid(this.cardMinWidth)&&(this.gridTemplateColumn=`repeat(auto-fill, minmax(${this.cardMinWidth}px, 1fr))`)}ngOnChanges(e){if(e.cardMinWidth){let i=e.cardMinWidth.currentValue;this.isCardWidthValid(i)?(this.cardMinWidth=i,this.gridTemplateColumn=`repeat(auto-fill, minmax(${this.cardMinWidth}px, 1fr))`):this.gridTemplateColumn=""}}isCardWidthValid(e){return e&&e>=335&&e<=735}showPaginationInput(e){return e}handlePageChange(e,i){let r=i.getBoundingClientRect().top;setTimeout(()=>{this.scrollToKeepTargetPosition(i,r)},0),this.pageIndexChanged.emit(e)}scrollToKeepTargetPosition(e,i){let r=this.cdkScrollable?.getElementRef().nativeElement;r&&r.scrollTo(0,e.getBoundingClientRect().top-i+r.scrollTop)}trackByCards(e,i){return i.cardId}onPaginationInputChange(e){let i=e.target;if("input"===e.type&&""===i.value)return;let r=Number(i.value)-1,o=Math.min(Math.max(0,r),this.numPages-1);i.value!==String(o+1)&&(i.value=String(o+1)),this.handlePageChange(o,i)}onFullWidthChanged(e,i){i?this.cardsAtFullWidth.add(e):this.cardsAtFullWidth.delete(e)}onFullHeightChanged(e,i){i?this.cardsAtFullHeight.add(e):this.cardsAtFullHeight.delete(e)}}return n.\u0275fac=function(e){return new(e||n)(C(xd,8))},n.\u0275cmp=P({type:n,selectors:[["metrics-card-grid-component"]],inputs:{isGroupExpanded:"isGroupExpanded",pageIndex:"pageIndex",numPages:"numPages",cardIdsWithMetadata:"cardIdsWithMetadata",cardMinWidth:"cardMinWidth",cardObserver:"cardObserver",showPaginationControls:"showPaginationControls",cardStateMap:"cardStateMap"},outputs:{pageIndexChanged:"pageIndexChanged"},features:[qt],decls:3,vars:1,consts:function(){let t,e;return t=$localize`:A button that sets a group to the previous page.␟575e782fd27f2ee70a034a775efe9ad162472250␟3629960544875360046:Previous page`,e=$localize`:A button that sets a group to the next page.␟ce3cefb1cd0099aa5003dda16ec9eb21fd8ba789␟3337301694210287595:Next page`,[[4,"ngIf"],["groupControls",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"card-grid"],["class","card-space",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"card-space",3,"ngClass"],[3,"cardId","groupName","pluginType","cardObserver","cardLazyLoader","fullWidthChanged","fullHeightChanged"],["class","group-controls",4,"ngIf"],[1,"group-controls"],[1,"prev-container"],["class","prev pagination-button","mat-button","","aria-label",t,3,"disabled","click",4,"ngIf"],[1,"input-and-next-container"],["mat-button","","aria-label",t,1,"prev","pagination-button",3,"disabled","click"],["class","pagination-input",4,"ngIf"],["mat-button","","aria-label",e,1,"next","pagination-button",3,"disabled","click"],[1,"pagination-input"],["type","number","min","1",3,"value","max","input","change"]]},template:function(e,i){1&e&&(S(0,ZBe,5,10,"div",0),S(1,tVe,1,1,"ng-template",null,1,jt)),2&e&&b("ngIf",i.isGroupExpanded)},dependencies:[bQ,bne,wn,nn,Ne,eo,ki],styles:["[_nghost-%COMP%]{contain:content}.card-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill, minmax(335px, 1fr));gap:16px;padding:16px}.card-space.full-width[_ngcontent-%COMP%]{grid-column-start:1;grid-column-end:-1}.card-space.full-height[_ngcontent-%COMP%]{min-height:480px}.card-space.full-height[_ngcontent-%COMP%]   card-view[_ngcontent-%COMP%]{height:100%}card-view[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:4px;box-sizing:border-box;contain:layout paint;display:block;min-height:320px}body.dark-mode[_nghost-%COMP%]   card-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   card-view[_ngcontent-%COMP%]{border:1px solid #555}.group-controls[_ngcontent-%COMP%]{color:#616161;display:grid;align-items:center;grid-template-columns:1fr 1fr;gap:16px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .group-controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.group-controls[_ngcontent-%COMP%]:first-of-type{padding-top:16px}.group-controls[_ngcontent-%COMP%]:last-of-type{padding-bottom:16px}.prev-container[_ngcontent-%COMP%]{justify-self:flex-start}.input-and-next-container[_ngcontent-%COMP%]{justify-self:flex-end}.pagination-input[_ngcontent-%COMP%]{margin-right:16px}.pagination-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:rgba(0,0,0,0);border:1px solid currentColor;color:inherit;font:inherit}.pagination-button[_ngcontent-%COMP%]{background-color:#fff}body.dark-mode[_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0)}"],changeDetection:0}),n})(),__=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.groupName$=new xr(null),this.pageIndex$=new xr(0),this.items$=new xr([]),this.ngUnsubscribe=new Ee,this.cardStateMap$=this.store.select(Js),this.numPages$=In([this.items$,this.store.select(Ha.getPageSize)]).pipe(q(([i,r])=>Math.ceil(i.length/r))),this.isGroupExpanded$=this.groupName$.pipe(Jn(i=>null!==i?this.store.select(u1,i):$t(!0))),this.showPaginationControls$=this.numPages$.pipe(q(i=>i>1)),this.normalizedPageIndex$=In([this.pageIndex$,this.numPages$]).pipe(it(this.ngUnsubscribe),Dt(([i,r])=>{0!==r&&(i>=r?this.pageIndex$.next(r-1):i<0&&this.pageIndex$.next(0))}),q(([i,r])=>Math.min(Math.max(i,0),r-1)),Da(1)),this.pagedItems$=In([this.items$,this.store.select(Ha.getPageSize),this.normalizedPageIndex$,this.isGroupExpanded$]).pipe(q(([i,r,o,a])=>i.slice(r*o,r*o+(a?r:0)))),this.cardMinWidth$=this.store.select(Jf)}ngOnChanges(e){e.cardIdsWithMetadata&&this.items$.next(this.cardIdsWithMetadata),e.groupName&&this.groupName$.next(this.groupName)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}onPageIndexChanged(e){this.pageIndex$.next(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-card-grid"]],inputs:{groupName:"groupName",cardIdsWithMetadata:"cardIdsWithMetadata",cardObserver:"cardObserver"},features:[qt],decls:8,vars:22,consts:[[3,"isGroupExpanded","pageIndex","numPages","showPaginationControls","cardIdsWithMetadata","cardMinWidth","cardObserver","cardStateMap","pageIndexChanged"]],template:function(e,i){1&e&&(f(0,"metrics-card-grid-component",0),A("pageIndexChanged",function(o){return i.onPageIndexChanged(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),g()),2&e&&b("isGroupExpanded",G(1,8,i.isGroupExpanded$))("pageIndex",G(2,10,i.normalizedPageIndex$))("numPages",G(3,12,i.numPages$))("showPaginationControls",G(4,14,i.showPaginationControls$))("cardIdsWithMetadata",G(5,16,i.pagedItems$))("cardMinWidth",G(6,18,i.cardMinWidth$))("cardObserver",i.cardObserver)("cardStateMap",G(7,20,i.cardStateMap$))},dependencies:[vne,ct],encapsulation:2,changeDetection:0}),n})();function oVe(n,t){if(1&n&&(f(0,"span",7),T(1),U(2,"number"),g()),2&n){let e=w();v(1),Ve("",G(2,1,e.numberOfCards)," cards")}}function aVe(n,t){1&n&&k(0,"mat-icon",8)}function sVe(n,t){1&n&&k(0,"mat-icon",9)}var yne=(()=>{class n{constructor(){this.groupExpansionToggled=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-card-group-toolbar-component"]],inputs:{groupName:"groupName",numberOfCards:"numberOfCards",isGroupExpanded:"isGroupExpanded"},outputs:{groupExpansionToggled:"groupExpansionToggled"},decls:9,vars:5,consts:function(){let t;return t=$localize`:A button that allows user to expand a tag group.␟ffaa11471b878a6dffe2e68c6f37064a9e074853␟5386054325274779258:Expand group`,[["aria-label",t,1,"group-toolbar",3,"click"],[1,"group-title-wrapper"],["aria-role","heading","aria-level","3",1,"group-title",3,"title"],["class","group-card-count",4,"ngIf"],[1,"expand-group-icon"],["svgIcon","expand_less_24px",4,"ngIf","ngIfElse"],["expandMore",""],[1,"group-card-count"],["svgIcon","expand_less_24px"],["svgIcon","expand_more_24px"]]},template:function(e,i){if(1&e&&(f(0,"button",0),A("click",function(){return i.groupExpansionToggled.emit()}),f(1,"span",1)(2,"span",2),T(3),g(),S(4,oVe,3,3,"span",3),g(),f(5,"span",4),S(6,aVe,1,0,"mat-icon",5),S(7,sVe,1,0,"ng-template",null,6,jt),g()()),2&e){let r=st(8);v(2),Zi("title",i.groupName),v(1),kt(i.groupName),v(1),b("ngIf",i.numberOfCards>1),v(2),b("ngIf",i.isGroupExpanded)("ngIfElse",r)}},dependencies:[Ne,bn,Us],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebebeb;color:#212121;top:-1px;display:flex;width:100%;font:inherit}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-top:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{color:#fff}.card-group:first-of-type   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-top:0}[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]:hover{cursor:pointer}.expand-group-icon[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.expand-group-icon[_ngcontent-%COMP%]:disabled{color:#757575}body.dark-mode[_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]:disabled, body.dark-mode   [_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]:disabled{color:#616161}.group-title-wrapper[_ngcontent-%COMP%]{flex-grow:1;text-align:left}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161;margin-left:6px}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),xne=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.isGroupExpanded$=$t(!1)}ngOnInit(){this.isGroupExpanded$=null!==this.groupName?this.store.select(u1,this.groupName):$t(!1)}onGroupExpansionToggled(){if(null===this.groupName)throw new RangeError("Invariant error: expansion cannot be toggled when groupName is null");this.store.dispatch(OT({tagGroup:this.groupName}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-card-group-toolbar"]],inputs:{groupName:"groupName",numberOfCards:"numberOfCards"},decls:2,vars:5,consts:[[3,"numberOfCards","isGroupExpanded","groupName","groupExpansionToggled"]],template:function(e,i){1&e&&(f(0,"metrics-card-group-toolbar-component",0),A("groupExpansionToggled",function(){return i.onGroupExpansionToggled()}),U(1,"async"),g()),2&e&&b("numberOfCards",i.numberOfCards)("isGroupExpanded",G(1,3,i.isGroupExpanded$))("groupName",i.groupName)},dependencies:[yne,ct],encapsulation:2,changeDetection:0}),n})();function dVe(n,t){if(1&n&&(f(0,"div",1),k(1,"metrics-card-group-toolbar",2)(2,"metrics-card-grid",3),g()),2&n){let e=t.$implicit,i=w();v(1),b("numberOfCards",e.items.length)("groupName",e.groupName),v(1),b("cardIdsWithMetadata",e.items)("cardObserver",i.cardObserver)("groupName",e.groupName)}}var Cne=(()=>{class n{constructor(){this.PluginType=An}trackByGroup(e,i){return i.groupName}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-card-groups-component"]],inputs:{cardGroups:"cardGroups",cardObserver:"cardObserver"},decls:1,vars:2,consts:[["class","card-group",4,"ngFor","ngForOf","ngForTrackBy"],[1,"card-group"],[3,"numberOfCards","groupName"],[3,"cardIdsWithMetadata","cardObserver","groupName"]],template:function(e,i){1&e&&S(0,dVe,3,5,"div",0),2&e&&b("ngForOf",i.cardGroups)("ngForTrackBy",i.trackByGroup)},dependencies:[nn,__,xne],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}"],changeDetection:0}),n})(),Mne=(()=>{class n{constructor(e){this.store=e,this.cardGroups$=this.store.select(jh).pipe(Vi(this.store.select(Sc)),q(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),q(i=>HT(i)))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-card-groups"]],inputs:{cardObserver:"cardObserver"},decls:2,vars:4,consts:[[3,"cardGroups","cardObserver"]],template:function(e,i){1&e&&(k(0,"metrics-card-groups-component",0),U(1,"async")),2&e&&b("cardGroups",G(1,2,i.cardGroups$))("cardObserver",i.cardObserver)},dependencies:[Cne,ct],encapsulation:2,changeDetection:0}),n})();function hVe(n,t){if(1&n&&(f(0,"span"),T(1),g()),2&n){let e=w();v(1),Ve(" and ",e.getPluginTypeFilterString(e.pluginTypes)," visualization filter")}}var wne=(()=>{class n{constructor(){this.PluginType=An,this.listFormatter=new Intl.ListFormat(void 0,{style:"long",type:"disjunction"})}getPluginTypeFilterString(e){let i=[...e].map(r=>{switch(r){case An.SCALARS:return"scalar";case An.IMAGES:return"image";case An.HISTOGRAMS:return"histogram";default:throw new RangeError(`Please implement human readable name for plugin type: ${r}`)}});return this.listFormatter.format(i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-empty-tag-match-component"]],inputs:{pluginTypes:"pluginTypes",tagFilterRegex:"tagFilterRegex",tagCounts:"tagCounts"},decls:6,vars:5,consts:[[4,"ngIf"]],template:function(e,i){1&e&&(T(0,"No matches for tag filter "),f(1,"code"),T(2),g(),S(3,hVe,2,1,"span",0),T(4),U(5,"number")),2&e&&(v(2),Ve("/",i.tagFilterRegex,"/"),v(1),b("ngIf",i.pluginTypes.size),v(1),Ve(" out of ",G(5,3,i.tagCounts)," tags."))},dependencies:[Ne,Us],encapsulation:2,changeDetection:0}),n})(),Sne=(()=>{class n{constructor(e){this.store=e,this.pluginTypes$=this.store.select(Sc),this.tagFilterRegex$=this.store.select(Fl),this.tagCounts$=this.store.select(jh).pipe(q(i=>new Set(i.map(({tag:r})=>r)).size))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-empty-tag-match"]],decls:4,vars:9,consts:[[3,"pluginTypes","tagFilterRegex","tagCounts"]],template:function(e,i){1&e&&(k(0,"metrics-empty-tag-match-component",0),U(1,"async"),U(2,"async"),U(3,"async")),2&e&&b("pluginTypes",G(1,3,i.pluginTypes$))("tagFilterRegex",G(2,5,i.tagFilterRegex$))("tagCounts",G(3,7,i.tagCounts$))},dependencies:[wne,ct],encapsulation:2,changeDetection:0}),n})();function gVe(n,t){if(1&n&&(f(0,"span",6),T(1),U(2,"number"),g()),2&n){let e=w();v(1),Ve("",G(2,1,e.cardIdsWithMetadata.length)," cards")}}function _Ve(n,t){1&n&&k(0,"metrics-empty-tag-match",7)}var Ene=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-filtered-view-component"]],inputs:{isEmptyMatch:"isEmptyMatch",cardObserver:"cardObserver",cardIdsWithMetadata:"cardIdsWithMetadata"},decls:7,vars:4,consts:[[1,"group-toolbar"],[1,"group-text"],["aria-role","heading","aria-level","3",1,"group-title"],["class","group-card-count",4,"ngIf"],["class","warn",4,"ngIf"],[3,"cardIdsWithMetadata","cardObserver"],[1,"group-card-count"],[1,"warn"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"span",1)(2,"span",2),T(3,"Tags matching filter"),g(),S(4,gVe,3,3,"span",3),g()(),S(5,_Ve,1,0,"metrics-empty-tag-match",4),k(6,"metrics-card-grid",5)),2&e&&(v(4),b("ngIf",i.cardIdsWithMetadata.length>1),v(1),b("ngIf",i.isEmptyMatch),v(1),b("cardIdsWithMetadata",i.cardIdsWithMetadata)("cardObserver",i.cardObserver))},dependencies:[Ne,__,Sne,Us],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}.group-text[_ngcontent-%COMP%]{display:flex;align-items:baseline}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161;margin-left:6px}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}metrics-empty-tag-match[_ngcontent-%COMP%]{color:#616161;font-size:13px;font-style:italic;padding:16px;text-align:center;display:block}body.dark-mode[_nghost-%COMP%]   metrics-empty-tag-match[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   metrics-empty-tag-match[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),Tne=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(jh).pipe(Vi(this.store.select(Sc)),q(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),Vi(this.store.select(Fl)),Cr(200),q(([i,r])=>{try{return{cardList:i,regex:new RegExp(r,"i")}}catch{return{cardList:i,regex:null}}}),Oe(({regex:i})=>null!==i),q(({cardList:i,regex:r})=>i.filter(({tag:o})=>r.test(o))),ri((i,r)=>i.length===r.length&&i.every((o,a)=>o.cardId===r[a].cardId)),Ta(),kn([])),this.isEmptyMatch$=this.cardIdsWithMetadata$.pipe(Vi(this.store.select(jh)),q(([i,r])=>Boolean(r.length)&&0===i.length))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-filtered-view"]],inputs:{cardObserver:"cardObserver"},decls:3,vars:7,consts:[[3,"isEmptyMatch","cardIdsWithMetadata","cardObserver"]],template:function(e,i){1&e&&(k(0,"metrics-filtered-view-component",0),U(1,"async"),U(2,"async")),2&e&&b("isEmptyMatch",G(1,3,i.isEmptyMatch$))("cardIdsWithMetadata",G(2,5,i.cardIdsWithMetadata$))("cardObserver",i.cardObserver)},dependencies:[Ene,ct],encapsulation:2,changeDetection:0}),n})();function xVe(n,t){1&n&&k(0,"mat-icon",7)}function CVe(n,t){if(1&n&&(f(0,"mat-option",8),T(1),g()),2&n){let e=t.$implicit;b("value",e),Be("title",e),v(1),kt(e)}}function MVe(n,t){if(1&n&&(f(0,"div",9)(1,"em"),T(2),U(3,"number"),g()()),2&n){let e=w();v(2),Ve("and ",G(3,1,e.completions.length-25)," more tags matched")}}var Dne=(()=>{class n{constructor(){this.onRegexFilterValueChange=new F}onCompletionAccepted(e){this.onRegexFilterValueChange.emit(function(n){return n.replace(Ebe,"\\$&")}(e))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-tag-filter-component"]],hostVars:2,hostBindings:function(e,i){2&e&&nt("valid",i.isRegexFilterValid)},inputs:{regexFilterValue:"regexFilterValue",isRegexFilterValid:"isRegexFilterValid",completions:"completions"},outputs:{onRegexFilterValueChange:"onRegexFilterValueChange"},decls:7,vars:5,consts:[[1,"tag-filter"],["placeholder","Filter tags (regex)",3,"value","matAutocomplete","input"],["svgIcon","error_24px","class","error-icon","title","Invalid regex filter. The result may be stale.",4,"ngIf"],[1,"tag-options",3,"optionSelected"],["filterMatches","matAutocomplete"],["class","option",3,"value",4,"ngFor","ngForOf"],["class","and-more",4,"ngIf"],["svgIcon","error_24px","title","Invalid regex filter. The result may be stale.",1,"error-icon"],[1,"option",3,"value"],[1,"and-more"]],template:function(e,i){if(1&e&&(f(0,"div",0)(1,"tb-filter-input",1),A("input",function(o){return i.onRegexFilterValueChange.emit(o.target.value)}),g(),S(2,xVe,1,0,"mat-icon",2),g(),f(3,"mat-autocomplete",3,4),A("optionSelected",function(o){return i.onCompletionAccepted(o.option.value)}),S(5,CVe,2,3,"mat-option",5),S(6,MVe,4,3,"div",6),g()),2&e){let r=st(4);v(1),b("value",i.regexFilterValue)("matAutocomplete",r),v(1),b("ngIf",!i.isRegexFilterValid),v(3),b("ngForOf",null==i.completions?null:i.completions.slice(0,25)),v(1),b("ngIf",(null==i.completions?null:i.completions.length)>25)}},dependencies:[nn,Ne,g_,Jte,ja,bn,Us],styles:[".tag-filter[_ngcontent-%COMP%]{display:flex;position:relative}tb-filter-input[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%]{color:#212121}body.dark-mode   [_nghost-%COMP%]{color:#fff}[_nghost-%COMP%]:not(.valid){color:#c62828}[_nghost-%COMP%]:not(.valid)   .error-icon[_ngcontent-%COMP%]{color:#c62828;position:absolute;right:0}  .tag-options .option,   .tag-options .and-more{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;font-size:14px;line-height:1.4;padding:8px 16px}  .tag-options .and-more{color:#616161}body.dark-mode[_nghost-%COMP%]     .tag-options .and-more, body.dark-mode   [_nghost-%COMP%]     .tag-options .and-more{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),Ine=(()=>{class n{constructor(e){this.store=e,this.tagFilter$=this.store.select(Fl),this.isTagFilterRegexValid$=this.tagFilter$.pipe(q(i=>{try{return new RegExp(i),!0}catch{return!1}})),this.completions$=this.store.select(o1).pipe(Vi(this.store.select(Sc)),q(([i,r])=>i.filter(({plugin:o})=>!r.size||r.has(o)).map(({tag:o})=>o)),q(i=>[...new Set(i)]),q(i=>i.sort(vy)),Vi(this.store.select(Fl)),q(([i,r])=>{try{return[i,new RegExp(r,"i")]}catch{return[i,null]}}),Oe(([,i])=>null!==i),q(([i,r])=>i.filter(o=>r.test(o))))}onTagFilterChange(e){this.store.dispatch(kT({tagFilter:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-tag-filter"]],decls:4,vars:9,consts:[[3,"regexFilterValue","isRegexFilterValid","completions","onRegexFilterValueChange"]],template:function(e,i){1&e&&(f(0,"metrics-tag-filter-component",0),A("onRegexFilterValueChange",function(o){return i.onTagFilterChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("regexFilterValue",G(1,3,i.tagFilter$))("isRegexFilterValid",G(2,5,i.isTagFilterRegexValid$))("completions",G(3,7,i.completions$))},dependencies:[Dne,ct],encapsulation:2,changeDetection:0}),n})();function EVe(n,t){if(1&n&&(f(0,"span",10),T(1),g()),2&n){let e=w();v(1),Ve("",e.cardIdsWithMetadata.length," cards")}}function TVe(n,t){1&n&&(f(0,"span",12),T(1,"New card pinned"),g()),2&n&&Be("data-id",t.$implicit)}var DVe=function(n){return[n]};function IVe(n,t){if(1&n&&(f(0,"span"),S(1,TVe,2,1,"span",11),g()),2&n){let e=w();v(1),b("ngForOf",Un(1,DVe,e.lastPinnedCardTime))}}function AVe(n,t){if(1&n){let e=Te();f(0,"div",13)(1,"button",14),A("click",function(){return ne(e),ie(w().onClearAllPinsClicked.emit())}),T(2," Clear all pins "),g()()}}function RVe(n,t){if(1&n&&k(0,"metrics-card-grid",15),2&n){let e=w();b("cardIdsWithMetadata",e.cardIdsWithMetadata)("cardObserver",e.cardObserver)}}function PVe(n,t){1&n&&(f(0,"div",16),T(1,"Pin cards for a quick view and comparison"),g())}var Ane=(()=>{class n{constructor(){this.globalPinsEnabled=!1,this.onClearAllPinsClicked=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["metrics-pinned-view-component"]],inputs:{cardObserver:"cardObserver",cardIdsWithMetadata:"cardIdsWithMetadata",lastPinnedCardTime:"lastPinnedCardTime",globalPinsEnabled:"globalPinsEnabled"},outputs:{onClearAllPinsClicked:"onClearAllPinsClicked"},decls:12,vars:5,consts:[[1,"group-toolbar"],[1,"left-items"],["svgIcon","keep_24px"],[1,"group-text"],["aria-role","heading","aria-level","3",1,"group-title"],["class","group-card-count",4,"ngIf"],[4,"ngIf"],["class","right-items",4,"ngIf"],[3,"cardIdsWithMetadata","cardObserver",4,"ngIf","ngIfElse"],["emptyPinnedView",""],[1,"group-card-count"],["class","new-card-pinned",4,"ngFor","ngForOf"],[1,"new-card-pinned"],[1,"right-items"],["mat-stroked-button","","aria-label","Clear all pinned cards",3,"click"],[3,"cardIdsWithMetadata","cardObserver"],[1,"empty-message"]],template:function(e,i){if(1&e&&(f(0,"div",0)(1,"div",1),k(2,"mat-icon",2),f(3,"span",3)(4,"span",4),T(5,"Pinned"),g(),S(6,EVe,2,1,"span",5),S(7,IVe,2,3,"span",6),g()(),S(8,AVe,3,0,"div",7),g(),S(9,RVe,1,2,"metrics-card-grid",8),S(10,PVe,2,0,"ng-template",null,9,jt)),2&e){let r=st(11);v(6),b("ngIf",i.cardIdsWithMetadata.length>1),v(1),b("ngIf",i.lastPinnedCardTime),v(1),b("ngIf",i.cardIdsWithMetadata.length>0&&i.globalPinsEnabled),v(1),b("ngIf",i.cardIdsWithMetadata.length)("ngIfElse",r)}},dependencies:[nn,Ne,ki,bn,__],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}mat-icon[_ngcontent-%COMP%]{color:#616161;flex:none;margin-right:5px}body.dark-mode[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.group-toolbar[_ngcontent-%COMP%]{justify-content:space-between}.left-items[_ngcontent-%COMP%]{display:flex;align-items:center}.right-items[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:12px;font-weight:normal;height:25px;line-height:25px}.group-text[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.empty-message[_ngcontent-%COMP%]{color:#616161;font-size:13px;font-style:italic;padding:16px;text-align:center}body.dark-mode[_nghost-%COMP%]   .empty-message[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .empty-message[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.new-card-pinned[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pinned-view-fade-out 3s linear;background:#f44336;border-radius:5px;color:#fff;display:inline-block;font-size:13px;opacity:0;padding:3px 5px}@keyframes _ngcontent-%COMP%_pinned-view-fade-out{from{opacity:1}66%{opacity:.99}to{opacity:0}}"],changeDetection:0}),n})(),Rne=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(Kf).pipe(kn([])),this.lastPinnedCardTime$=this.store.select(OW).pipe(os(1)),this.globalPinsEnabled$=this.store.select(pd)}onClearAllPinsClicked(){this.store.dispatch(Wg())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-pinned-view"]],inputs:{cardObserver:"cardObserver"},decls:4,vars:10,consts:[[3,"cardIdsWithMetadata","lastPinnedCardTime","cardObserver","globalPinsEnabled","onClearAllPinsClicked"]],template:function(e,i){1&e&&(f(0,"metrics-pinned-view-component",0),A("onClearAllPinsClicked",function(){return i.onClearAllPinsClicked()}),U(1,"async"),U(2,"async"),U(3,"async"),g()),2&e&&b("cardIdsWithMetadata",G(1,4,i.cardIdsWithMetadata$))("lastPinnedCardTime",G(2,6,i.lastPinnedCardTime$))("cardObserver",i.cardObserver)("globalPinsEnabled",G(3,8,i.globalPinsEnabled$))},dependencies:[Ane,ct],encapsulation:2,changeDetection:0}),n})();function FVe(n,t){1&n&&k(0,"metrics-filtered-view",13),2&n&&b("cardObserver",w().cardObserver)}function NVe(n,t){1&n&&(f(0,"div",17),k(1,"mat-spinner",18),g())}var LVe=function(n){return{"slide-out-menu-expanded":n}};function BVe(n,t){if(1&n&&(f(0,"div",19),k(1,"metrics-scalar-column-editor"),g()),2&n){let e=w();b("ngClass",Un(1,LVe,e.slideOutMenuOpen))}}function VVe(n,t){if(1&n){let e=Te();f(0,"div",20)(1,"div",21)(2,"h2",22),T(3,"Settings"),g(),f(4,"button",23),A("click",function(){return ne(e),ie(w().onCloseSidepaneButtonClicked.emit())}),k(5,"mat-icon",24),g()(),k(6,"metrics-dashboard-right-pane"),g()}}var HVe=function(n){return{checked:n,"settings-button":!0}},zVe=new te("Customizable Share Button"),Pne=(()=>{class n{constructor(e,i){this.host=e,this.customShareButton=i,this.onSettingsButtonClicked=new F,this.onCloseSidepaneButtonClicked=new F,this.onPluginTypeToggled=new F,this.onPluginTypeAllToggled=new F,this.PluginType=An,this.cardObserver=new yy(this.host.nativeElement,"600px 0px 600px 0px")}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(zVe,8))},n.\u0275cmp=P({type:n,selectors:[["metrics-main-view-component"]],inputs:{showFilteredView:"showFilteredView",isSidepaneOpen:"isSidepaneOpen",filteredPluginTypes:"filteredPluginTypes",initialTagsLoading:"initialTagsLoading",slideOutMenuOpen:"slideOutMenuOpen"},outputs:{onSettingsButtonClicked:"onSettingsButtonClicked",onCloseSidepaneButtonClicked:"onCloseSidepaneButtonClicked",onPluginTypeToggled:"onPluginTypeToggled",onPluginTypeAllToggled:"onPluginTypeAllToggled"},decls:24,vars:23,consts:function(){let t,e;return t=$localize`:Label on a toolbar button to toggle the settings side pane.␟d3516db6bbe6860a55beab66e4969dac625b8d72␟7659285445580838925:Toggle settings side pane`,e=$localize`:Label on a button to close the settings side pane.␟04521dc0b6a65cf5c382944c9a8b4b844a3e9598␟8156766997747165871:Close side pane`,[[1,"toolbar"],["multiple","","appearance","standard",1,"filter-view"],["mat-button","","role","checkbox","data-value","all",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","scalars",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","image",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","histogram",1,"filter-view-button",3,"click"],[3,"customizableComponent"],[1,"right-items"],["mat-stroked-button","","aria-label",t,3,"ngClass","click"],["svgIcon","settings_24px"],[1,"split-content"],["cdkScrollable",""],[3,"cardObserver",4,"ngIf"],[3,"cardObserver"],["class","loading-container",4,"ngIf"],["class","slide-out-menu",3,"ngClass",4,"ngIf"],["class","sidebar",4,"ngIf"],[1,"loading-container"],["diameter","36"],[1,"slide-out-menu",3,"ngClass"],[1,"sidebar"],[1,"header"],[1,"title"],["mat-icon-button","","aria-label",e,3,"click"],["svgIcon","close_24px"]]},template:function(e,i){1&e&&(f(0,"div",0),k(1,"metrics-tag-filter"),f(2,"mat-button-toggle-group",1)(3,"button",2),A("click",function(){return i.onPluginTypeAllToggled.emit()}),T(4," All "),g(),f(5,"button",3),A("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.SCALARS)}),T(6," Scalars "),g(),f(7,"button",4),A("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.IMAGES)}),T(8," Image "),g(),f(9,"button",5),A("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.HISTOGRAMS)}),T(10," Histogram "),g()(),k(11,"tb-customization",6),f(12,"div",7)(13,"button",8),A("click",function(){return i.onSettingsButtonClicked.emit()}),k(14,"mat-icon",9),T(15," Settings "),g()()(),f(16,"div",10)(17,"div",11),S(18,FVe,1,1,"metrics-filtered-view",12),k(19,"metrics-pinned-view",13),S(20,NVe,2,0,"div",14),k(21,"metrics-card-groups",13),g(),S(22,BVe,2,3,"div",15),S(23,VVe,7,0,"div",16),g()),2&e&&(v(3),Be("aria-checked",0===i.filteredPluginTypes.size),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.SCALARS)),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.IMAGES)),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.HISTOGRAMS)),v(2),b("customizableComponent",i.customShareButton),v(2),b("ngClass",Un(21,HVe,i.isSidepaneOpen)),Be("aria-pressed",i.isSidepaneOpen),v(4),nt("main",!0)("filter-view",i.showFilteredView),v(1),b("ngIf",i.showFilteredView),v(1),Bt("display",i.showFilteredView?"none":""),b("cardObserver",i.cardObserver),v(1),b("ngIf",i.initialTagsLoading),v(1),Bt("display",i.showFilteredView?"none":""),b("cardObserver",i.cardObserver),v(1),b("ngIf",i.isSidepaneOpen),v(1),b("ngIf",i.isSidepaneOpen))},dependencies:[wn,Ne,vQ,xd,ki,Er,DN,bn,Nc,AQ,HQ,Mne,Tne,Ine,Rne],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;flex:none;display:flex;align-items:center;justify-content:space-between;height:48px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}.toolbar[_ngcontent-%COMP%]   metrics-tag-filter[_ngcontent-%COMP%]{flex:1 1 100px}.toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;margin-left:16px;padding-left:16px}body.dark-mode[_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%]{border-left:1px solid #555}mat-button-toggle-group.filter-view[_ngcontent-%COMP%]{border:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   mat-button-toggle-group.filter-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-button-toggle-group.filter-view[_ngcontent-%COMP%]{border:1px solid #555}.filter-view[_ngcontent-%COMP%]{border-radius:4px;flex:none;margin-right:5px}.filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:0;font-size:12px;font-weight:normal;height:25px;line-height:25px;min-width:unset;padding:0 12px}.filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid #555}.filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%]{background-color:#e0e0e0}body.dark-mode[_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%]{background-color:#212121}.split-content[_ngcontent-%COMP%]{display:flex;overflow-y:auto;flex:1}.main[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%]{contain:strict;background-color:#fff;overflow-x:hidden;overflow-y:auto;will-change:transform,scroll-position}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]{background-color:#303030}.main[_ngcontent-%COMP%]{background-color:#f5f6f7;flex:1 1;display:flex;flex-direction:column}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]{background-color:#3a3a3a}.main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%], .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%]{border-bottom:1px solid #555}.main.filter-view[_ngcontent-%COMP%]{overflow:hidden}.main.filter-view[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%]{contain:content;overflow:auto;will-change:transform,scroll-position}.loading-container[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;margin:20px 0}.sidebar[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;flex:0 0 250px}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]{border-left:1px solid #555}.sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{border-bottom:1px solid #555}.sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:18px;font-weight:400;line-height:normal;margin:0}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]{color:#616161;display:inline-flex}body.dark-mode   [_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}[_nghost-%COMP%]   .settings-button.checked[_ngcontent-%COMP%]{background-color:#e0e0e0;border-color:#e0e0e0}body.dark-mode   [_nghost-%COMP%]   .settings-button.checked[_ngcontent-%COMP%]{background-color:#212121}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]     .mat-button-wrapper{display:inline-flex;align-items:center}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:4px}.slide-out-menu[_ngcontent-%COMP%]{background-color:#fff;height:calc(100% - 49px);position:absolute;right:50px;top:49px;transition:all .75s ease;visibility:hidden;width:200px;border-left:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%]{border-left:1px solid #555}body.dark-mode[_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%]{background-color:#303030}.slide-out-menu-expanded[_ngcontent-%COMP%]{right:250px;visibility:visible}"],changeDetection:0}),n})(),kne=(()=>{class n{constructor(e){this.store=e,this.isSidepaneOpen$=this.store.select(p1),this.initialTagsLoading$=this.store.select(xv).pipe(O_(i=>null===i.lastLoadedTimeInMs,!0),q(i=>i.state===Re.LOADING&&null===i.lastLoadedTimeInMs)),this.showFilteredView$=this.store.select(Fl).pipe(q(i=>i.length>0)),this.filteredPluginTypes$=this.store.select(Sc),this.isSlideoutMenuOpen$=this.store.select(h1)}onSettingsButtonClicked(){this.store.dispatch(sT())}onCloseSidepaneButtonClicked(){this.store.dispatch(aT())}onPluginVisibilityToggled(e){this.store.dispatch(FT({plugin:e}))}onShowAllPlugins(){this.store.dispatch(NT())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-main-view"]],decls:6,vars:15,consts:[[3,"showFilteredView","isSidepaneOpen","initialTagsLoading","filteredPluginTypes","slideOutMenuOpen","onSettingsButtonClicked","onCloseSidepaneButtonClicked","onPluginTypeToggled","onPluginTypeAllToggled"]],template:function(e,i){1&e&&(f(0,"metrics-main-view-component",0),A("onSettingsButtonClicked",function(){return i.onSettingsButtonClicked()})("onCloseSidepaneButtonClicked",function(){return i.onCloseSidepaneButtonClicked()})("onPluginTypeToggled",function(o){return i.onPluginVisibilityToggled(o)})("onPluginTypeAllToggled",function(){return i.onShowAllPlugins()}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),g()),2&e&&b("showFilteredView",G(1,5,i.showFilteredView$))("isSidepaneOpen",G(2,7,i.isSidepaneOpen$))("initialTagsLoading",G(3,9,i.initialTagsLoading$))("filteredPluginTypes",G(4,11,i.filteredPluginTypes$))("slideOutMenuOpen",G(5,13,i.isSlideoutMenuOpen$))},dependencies:[Pne,ct],encapsulation:2,changeDetection:0}),n})(),Zl=(()=>(function(n){n.CHECKBOX="checkbox",n.RUN_NAME="run_name",n.EXPERIMENT_NAME="experiment_name",n.RUN_COLOR="run_color"}(Zl||(Zl={})),Zl))(),Pp=(()=>(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"}(Pp||(Pp={})),Pp))(),One=new Set(["string","number"]),GVe={insertUndefined:Pp.AFTER};function Fne(n){if("number"==typeof n)return isNaN(n)?void 0:n;if(!isNaN(parseInt(n)))return parseInt(n);for(let t=0;t<n.length;t++)if(isNaN(parseInt(n[t])))return 0===t?void 0:parseInt(n.slice(0,t))}var WVe=["dialogPopup"],qVe=["hueSlider"],XVe=["alphaSlider"];function YVe(n,t){if(1&n&&k(0,"div"),2&n){let e=w();bb("arrow arrow-",e.cpUsePosition,""),Bt("top",e.arrowTop,"px")}}function QVe(n,t){if(1&n){let e=Te();f(0,"div",28),A("newValue",function(r){return ne(e),ie(w().onColorChange(r))})("dragStart",function(){return ne(e),ie(w().onDragStart("saturation-lightness"))})("dragEnd",function(){return ne(e),ie(w().onDragEnd("saturation-lightness"))}),k(1,"div",14),g()}if(2&n){let e=w();Bt("background-color",e.hueSliderColor),b("rgX",1)("rgY",1),v(1),Bt("top",null==e.slider?null:e.slider.v,"px")("left",null==e.slider?null:e.slider.s,"px")}}function ZVe(n,t){1&n&&(qn(),f(0,"svg",29),k(1,"path",30)(2,"path",31),g())}function KVe(n,t){if(1&n){let e=Te();f(0,"button",32),A("click",function(r){ne(e);let o=w();return ie(o.onAddPresetColor(r,o.selectedColor))}),T(1),g()}if(2&n){let e=w();Xo(e.cpAddColorButtonClass),b("disabled",e.cpPresetColors&&e.cpPresetColors.length>=e.cpMaxPresetColorsLength),v(1),Ve(" ",e.cpAddColorButtonText," ")}}function JVe(n,t){1&n&&k(0,"div",33)}function $Ve(n,t){if(1&n){let e=Te();f(0,"input",39),A("keyup.enter",function(r){return ne(e),ie(w(2).onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);b("rg",1)("value",null==e.cmykText?null:e.cmykText.a)}}function e4e(n,t){1&n&&(f(0,"div"),T(1,"A"),g())}function t4e(n,t){if(1&n){let e=Te();f(0,"div",34)(1,"div",35)(2,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onCyanInput(r))}),g(),f(3,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onMagentaInput(r))}),g(),f(4,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onYellowInput(r))}),g(),f(5,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onBlackInput(r))}),g(),S(6,$Ve,1,2,"input",37),g(),f(7,"div",35)(8,"div"),T(9,"C"),g(),f(10,"div"),T(11,"M"),g(),f(12,"div"),T(13,"Y"),g(),f(14,"div"),T(15,"K"),g(),S(16,e4e,2,0,"div",38),g()()}if(2&n){let e=w();Bt("display",3!==e.format?"none":"block"),v(2),b("rg",100)("value",null==e.cmykText?null:e.cmykText.c),v(1),b("rg",100)("value",null==e.cmykText?null:e.cmykText.m),v(1),b("rg",100)("value",null==e.cmykText?null:e.cmykText.y),v(1),b("rg",100)("value",null==e.cmykText?null:e.cmykText.k),v(1),b("ngIf","disabled"!==e.cpAlphaChannel),v(10),b("ngIf","disabled"!==e.cpAlphaChannel)}}function n4e(n,t){if(1&n){let e=Te();f(0,"input",39),A("keyup.enter",function(r){return ne(e),ie(w(2).onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);b("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function i4e(n,t){1&n&&(f(0,"div"),T(1,"A"),g())}function r4e(n,t){if(1&n){let e=Te();f(0,"div",40)(1,"div",35)(2,"input",41),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onHueInput(r))}),g(),f(3,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onSaturationInput(r))}),g(),f(4,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onLightnessInput(r))}),g(),S(5,n4e,1,2,"input",37),g(),f(6,"div",35)(7,"div"),T(8,"H"),g(),f(9,"div"),T(10,"S"),g(),f(11,"div"),T(12,"L"),g(),S(13,i4e,2,0,"div",38),g()()}if(2&n){let e=w();Bt("display",2!==e.format?"none":"block"),v(2),b("rg",360)("value",null==e.hslaText?null:e.hslaText.h),v(1),b("rg",100)("value",null==e.hslaText?null:e.hslaText.s),v(1),b("rg",100)("value",null==e.hslaText?null:e.hslaText.l),v(1),b("ngIf","disabled"!==e.cpAlphaChannel),v(8),b("ngIf","disabled"!==e.cpAlphaChannel)}}function o4e(n,t){if(1&n){let e=Te();f(0,"input",39),A("keyup.enter",function(r){return ne(e),ie(w(2).onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);b("rg",1)("value",null==e.rgbaText?null:e.rgbaText.a)}}function a4e(n,t){1&n&&(f(0,"div"),T(1,"A"),g())}function s4e(n,t){if(1&n){let e=Te();f(0,"div",42)(1,"div",35)(2,"input",43),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onRedInput(r))}),g(),f(3,"input",43),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onGreenInput(r))}),g(),f(4,"input",43),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onBlueInput(r))}),g(),S(5,o4e,1,2,"input",37),g(),f(6,"div",35)(7,"div"),T(8,"R"),g(),f(9,"div"),T(10,"G"),g(),f(11,"div"),T(12,"B"),g(),S(13,a4e,2,0,"div",38),g()()}if(2&n){let e=w();Bt("display",1!==e.format?"none":"block"),v(2),b("rg",255)("value",null==e.rgbaText?null:e.rgbaText.r),v(1),b("rg",255)("value",null==e.rgbaText?null:e.rgbaText.g),v(1),b("rg",255)("value",null==e.rgbaText?null:e.rgbaText.b),v(1),b("ngIf","disabled"!==e.cpAlphaChannel),v(8),b("ngIf","disabled"!==e.cpAlphaChannel)}}function l4e(n,t){if(1&n){let e=Te();f(0,"input",39),A("keyup.enter",function(r){return ne(e),ie(w(2).onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);b("rg",1)("value",e.hexAlpha)}}function c4e(n,t){1&n&&(f(0,"div"),T(1,"A"),g())}function d4e(n,t){if(1&n){let e=Te();f(0,"div",44)(1,"div",35)(2,"input",45),A("blur",function(){return ne(e),ie(w().onHexInput(null))})("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onHexInput(r))}),g(),S(3,l4e,1,2,"input",37),g(),f(4,"div",35)(5,"div"),T(6,"Hex"),g(),S(7,c4e,2,0,"div",38),g()()}if(2&n){let e=w();Bt("display",0!==e.format?"none":"block"),nt("hex-alpha","forced"===e.cpAlphaChannel),v(2),b("value",e.hexText),v(1),b("ngIf","forced"===e.cpAlphaChannel),v(4),b("ngIf","forced"===e.cpAlphaChannel)}}function u4e(n,t){if(1&n){let e=Te();f(0,"input",39),A("keyup.enter",function(r){return ne(e),ie(w(2).onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);b("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function p4e(n,t){if(1&n){let e=Te();f(0,"div",46)(1,"div",35)(2,"input",36),A("keyup.enter",function(r){return ne(e),ie(w().onAcceptColor(r))})("newValue",function(r){return ne(e),ie(w().onValueInput(r))}),g(),S(3,u4e,1,2,"input",37),g(),f(4,"div",35)(5,"div"),T(6,"V"),g(),f(7,"div"),T(8,"A"),g()()()}if(2&n){let e=w();v(2),b("rg",100)("value",null==e.hslaText?null:e.hslaText.l),v(1),b("ngIf","disabled"!==e.cpAlphaChannel)}}function h4e(n,t){if(1&n){let e=Te();f(0,"div",47)(1,"span",48),A("click",function(){return ne(e),ie(w().onFormatToggle(-1))}),g(),f(2,"span",48),A("click",function(){return ne(e),ie(w().onFormatToggle(1))}),g()()}}function m4e(n,t){if(1&n){let e=Te();f(0,"span",55),A("click",function(r){ne(e);let o=w().$implicit;return ie(w(3).onRemovePresetColor(r,o))}),g()}2&n&&Xo(w(4).cpRemoveColorButtonClass)}function f4e(n,t){if(1&n){let e=Te();f(0,"div",53),A("click",function(){let o=ne(e).$implicit;return ie(w(3).setColorFromString(o))}),S(1,m4e,1,3,"span",54),g()}if(2&n){let e=t.$implicit,i=w(3);Bt("background-color",e),v(1),b("ngIf",i.cpAddColorButton)}}function g4e(n,t){if(1&n&&(f(0,"div"),S(1,f4e,2,3,"div",52),g()),2&n){let e=w(2);Xo(e.cpPresetColorsClass),v(1),b("ngForOf",e.cpPresetColors)}}function _4e(n,t){if(1&n&&(f(0,"div"),T(1),g()),2&n){let e=w(2);Xo(e.cpPresetEmptyMessageClass),v(1),kt(e.cpPresetEmptyMessage)}}function b4e(n,t){if(1&n&&(f(0,"div",49),k(1,"hr"),f(2,"div",50),T(3),g(),S(4,g4e,2,4,"div",51),S(5,_4e,2,4,"div",51),g()),2&n){let e=w();v(3),kt(e.cpPresetLabel),v(1),b("ngIf",null==e.cpPresetColors?null:e.cpPresetColors.length),v(1),b("ngIf",!(null!=e.cpPresetColors&&e.cpPresetColors.length)&&e.cpAddColorButton)}}function v4e(n,t){if(1&n){let e=Te();f(0,"button",58),A("click",function(r){return ne(e),ie(w(2).onCancelColor(r))}),T(1),g()}if(2&n){let e=w(2);Xo(e.cpCancelButtonClass),v(1),kt(e.cpCancelButtonText)}}function y4e(n,t){if(1&n){let e=Te();f(0,"button",58),A("click",function(r){return ne(e),ie(w(2).onAcceptColor(r))}),T(1),g()}if(2&n){let e=w(2);Xo(e.cpOKButtonClass),v(1),kt(e.cpOKButtonText)}}function x4e(n,t){if(1&n&&(f(0,"div",56),S(1,v4e,2,4,"button",57),S(2,y4e,2,4,"button",57),g()),2&n){let e=w();v(1),b("ngIf",e.cpCancelButton),v(1),b("ngIf",e.cpOKButton)}}function C4e(n,t){1&n&&hi(0)}function M4e(n,t){if(1&n&&(f(0,"div",59),S(1,C4e,1,0,"ng-container",60),g()),2&n){let e=w();v(1),b("ngTemplateOutlet",e.cpExtraTemplate)}}var Go=(()=>(function(n){n[n.HEX=0]="HEX",n[n.RGBA=1]="RGBA",n[n.HSLA=2]="HSLA",n[n.CMYK=3]="CMYK"}(Go||(Go={})),Go))(),Kl=class{constructor(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}},b_=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},qd=class{constructor(t,e,i,r){this.h=t,this.s=e,this.l=i,this.a=r}},Dm=class{constructor(t,e,i,r,o=1){this.c=t,this.m=e,this.y=i,this.k=r,this.a=o}},E4e=(()=>{class n{constructor(){this.newValue=new F}inputChange(e){let i=e.target.value;if(void 0===this.rg)this.newValue.emit(i);else{let r=parseFloat(i);this.newValue.emit({v:r,rg:this.rg})}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=Me({type:n,selectors:[["","text",""]],hostBindings:function(e,i){1&e&&A("input",function(o){return i.inputChange(o)})},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),n})(),T4e=(()=>{class n{constructor(e){this.elRef=e,this.dragEnd=new F,this.dragStart=new F,this.newValue=new F,this.listenerMove=i=>this.move(i),this.listenerStop=()=>this.stop()}mouseDown(e){this.start(e)}touchStart(e){this.start(e)}move(e){e.preventDefault(),this.setCursor(e)}start(e){this.setCursor(e),e.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(e){let i=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageX?e.pageX:e.touches[0].pageX)-i.left-window.pageXOffset}getY(e){let i=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageY?e.pageY:e.touches[0].pageY)-i.top-window.pageYOffset}setCursor(e){let i=this.elRef.nativeElement.offsetWidth,r=this.elRef.nativeElement.offsetHeight,o=Math.max(0,Math.min(this.getX(e),i)),a=Math.max(0,Math.min(this.getY(e),r));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:o/i,v:1-a/r,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:a/r,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:o/i,rgX:this.rgX})}}return n.\u0275fac=function(e){return new(e||n)(C(xe))},n.\u0275dir=Me({type:n,selectors:[["","slider",""]],hostBindings:function(e,i){1&e&&A("mousedown",function(o){return i.mouseDown(o)})("touchstart",function(o){return i.touchStart(o)})},inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}}),n})(),_A=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},bA=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},SV=(()=>{class n{constructor(){this.active=null}setActive(e){this.active&&this.active!==e&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=e}hsva2hsla(e){let i=e.h,r=e.s,o=e.v,a=e.a;if(0===o)return new qd(i,0,0,a);if(0===r&&1===o)return new qd(i,1,1,a);{let s=o*(2-r)/2;return new qd(i,o*r/(1-Math.abs(2*s-1)),s,a)}}hsla2hsva(e){let i=Math.min(e.h,1),r=Math.min(e.s,1),o=Math.min(e.l,1),a=Math.min(e.a,1);if(0===o)return new b_(i,0,0,a);{let s=o+r*(1-Math.abs(2*o-1))/2;return new b_(i,2*(s-o)/s,s,a)}}hsvaToRgba(e){let i,r,o,a=e.h,s=e.s,l=e.v,c=e.a,d=Math.floor(6*a),u=6*a-d,p=l*(1-s),h=l*(1-u*s),m=l*(1-(1-u)*s);switch(d%6){case 0:i=l,r=m,o=p;break;case 1:i=h,r=l,o=p;break;case 2:i=p,r=l,o=m;break;case 3:i=p,r=h,o=l;break;case 4:i=m,r=p,o=l;break;case 5:i=l,r=p,o=h;break;default:i=0,r=0,o=0}return new Kl(i,r,o,c)}cmykToRgb(e){return new Kl((1-e.c)*(1-e.k),(1-e.m)*(1-e.k),(1-e.y)*(1-e.k),e.a)}rgbaToCmyk(e){let i=1-Math.max(e.r,e.g,e.b);return 1===i?new Dm(0,0,0,1,e.a):new Dm((1-e.r-i)/(1-i),(1-e.g-i)/(1-i),(1-e.b-i)/(1-i),i,e.a)}rgbaToHsva(e){let i,r,o=Math.min(e.r,1),a=Math.min(e.g,1),s=Math.min(e.b,1),l=Math.min(e.a,1),c=Math.max(o,a,s),d=Math.min(o,a,s),u=c,p=c-d;if(r=0===c?0:p/c,c===d)i=0;else{switch(c){case o:i=(a-s)/p+(a<s?6:0);break;case a:i=(s-o)/p+2;break;case s:i=(o-a)/p+4;break;default:i=0}i/=6}return new b_(i,r,u,l)}rgbaToHex(e,i){let r="#"+(16777216|e.r<<16|e.g<<8|e.b).toString(16).substr(1);return i&&(r+=(256|Math.round(255*e.a)).toString(16).substr(1)),r}normalizeCMYK(e){return new Dm(e.c/100,e.m/100,e.y/100,e.k/100,e.a)}denormalizeCMYK(e){return new Dm(Math.floor(100*e.c),Math.floor(100*e.m),Math.floor(100*e.y),Math.floor(100*e.k),e.a)}denormalizeRGBA(e){return new Kl(Math.round(255*e.r),Math.round(255*e.g),Math.round(255*e.b),e.a)}stringToHsva(e="",i=!1){let r=null;e=(e||"").toLowerCase();let o=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return new Kl(parseInt(a[2],10)/255,parseInt(a[3],10)/255,parseInt(a[4],10)/255,isNaN(parseFloat(a[5]))?1:parseFloat(a[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return new qd(parseInt(a[2],10)/360,parseInt(a[3],10)/100,parseInt(a[4],10)/100,isNaN(parseFloat(a[5]))?1:parseFloat(a[5]))}}];o.push(i?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(a){return new Kl(parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255,parseInt(a[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(a){return new Kl(parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255,1)}}),o.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(a){return new Kl(parseInt(a[1]+a[1],16)/255,parseInt(a[2]+a[2],16)/255,parseInt(a[3]+a[3],16)/255,1)}});for(let a in o)if(o.hasOwnProperty(a)){let s=o[a],l=s.re.exec(e),c=l&&s.parse(l);if(c)return c instanceof Kl?r=this.rgbaToHsva(c):c instanceof qd&&(r=this.hsla2hsva(c)),r}return r}outputFormat(e,i,r){switch("auto"===i&&(i=e.a<1?"rgba":"hex"),i){case"hsla":let o=this.hsva2hsla(e),a=new qd(Math.round(360*o.h),Math.round(100*o.s),Math.round(100*o.l),Math.round(100*o.a)/100);return e.a<1||"always"===r?"hsla("+a.h+","+a.s+"%,"+a.l+"%,"+a.a+")":"hsl("+a.h+","+a.s+"%,"+a.l+"%)";case"rgba":let s=this.denormalizeRGBA(this.hsvaToRgba(e));return e.a<1||"always"===r?"rgba("+s.r+","+s.g+","+s.b+","+Math.round(100*s.a)/100+")":"rgb("+s.r+","+s.g+","+s.b+")";default:let l="always"===r||"forced"===r;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(e)),l)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Lne=typeof window<"u"&&"ontouchstart"in window,D4e=(()=>{class n{constructor(e,i,r,o,a,s){this.ngZone=e,this.elRef=i,this.cdRef=r,this.document=o,this.platformId=a,this.service=s,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[Go.HEX,Go.RGBA,Go.HSLA,Go.CMYK],this.useRootViewContainer=!1,this.eyeDropperSupported=_w(this.platformId)&&"EyeDropper"in this.document.defaultView}handleEsc(e){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(e)}handleEnter(e){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(e)}ngOnInit(){this.slider=new _A(0,0,0,0),this.sliderDimMax=new bA(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?Go.CMYK:"rgba"===this.cpOutputFormat?Go.RGBA:"hsla"===this.cpOutputFormat?Go.HSLA:Go.HEX,this.listenerMouseDown=r=>{this.onMouseDown(r)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){230===this.cpWidth&&"inline"!==this.cpDialogDisplay||(this.sliderDimMax=new bA(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())}openDialog(e,i=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(e),this.setColorFromString(e,i),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(e,i,r,o,a,s,l,c,d,u,p,h,m,_,M,y,x,R,I,B,ee,Q,we,Qe,Ae,D,re,ce,he,_e,$,de,pe,Ge,Se,Fe,lt,Mt){this.setInitialColor(r),this.setColorMode(c),this.isIE10=10===function(){let n="";typeof navigator<"u"&&(n=navigator.userAgent.toLowerCase());let t=n.indexOf("msie ");return t>0&&parseInt(n.substring(t+5,n.indexOf(".",t)),10)}(),this.directiveInstance=e,this.directiveElementRef=i,this.cpDisableInput=h,this.cpCmykEnabled=d,this.cpAlphaChannel=u,this.cpOutputFormat=p,this.cpDialogDisplay=s,this.cpIgnoredElements=m,this.cpSaveClickOutside=_,this.cpCloseClickOutside=M,this.useRootViewContainer=y,this.width=this.cpWidth=parseInt(o,10),this.height=this.cpHeight=parseInt(a,10),this.cpPosition=x,this.cpPositionOffset=parseInt(R,10),this.cpOKButton=D,this.cpOKButtonText=ce,this.cpOKButtonClass=re,this.cpCancelButton=he,this.cpCancelButtonText=$,this.cpCancelButtonClass=_e,this.cpEyeDropper=Fe,this.fallbackColor=l||"#fff",this.setPresetConfig(B,ee),this.cpPresetColorsClass=Q,this.cpMaxPresetColorsLength=we,this.cpPresetEmptyMessage=Qe,this.cpPresetEmptyMessageClass=Ae,this.cpAddColorButton=de,this.cpAddColorButtonText=Ge,this.cpAddColorButtonClass=pe,this.cpRemoveColorButtonClass=Se,this.cpTriggerElement=lt,this.cpExtraTemplate=Mt,I||(this.dialogArrowOffset=0),"inline"===s&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===p&&"always"!==u&&"forced"!==u&&(this.cpAlphaChannel="disabled")}setColorMode(e){switch(e.toString().toUpperCase()){case"1":case"C":case"COLOR":default:this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3}}setInitialColor(e){this.initialColor=e}setPresetConfig(e,i){this.cpPresetLabel=e,this.cpPresetColors=i}setColorFromString(e,i=!0,r=!0){let o;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(o=this.service.stringToHsva(e,!0),!o&&!this.hsva&&(o=this.service.stringToHsva(e,!1))):o=this.service.stringToHsva(e,!1),!o&&!this.hsva&&(o=this.service.stringToHsva(this.fallbackColor,!1)),o&&(this.hsva=o,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(i,r))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(e){this.directiveInstance.sliderDragEnd({slider:e,color:this.outputColor})}onDragStart(e){this.directiveInstance.sliderDragStart({slider:e,color:this.outputColor})}onMouseDown(e){this.show&&!this.isIE10&&"popup"===this.cpDialogDisplay&&e.target!==this.directiveElementRef.nativeElement&&!this.isDescendant(this.elRef.nativeElement,e.target)&&!this.isDescendant(this.directiveElementRef.nativeElement,e.target)&&0===this.cpIgnoredElements.filter(i=>i===e.target).length&&this.ngZone.run(()=>{this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker()})}onAcceptColor(e){e.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(e){this.hsva=null,e.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onEyeDropper(){this.eyeDropperSupported&&(new window.EyeDropper).open().then(i=>{this.setColorFromString(i.sRGBHex,!0)})}onFormatToggle(e){let i=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),r=((this.dialogInputFields.indexOf(this.format)+e)%i+i)%i;this.format=this.dialogInputFields[r]}onColorChange(e){this.hsva.s=e.s/e.rgX,this.hsva.v=e.v/e.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(e){this.hsva.h=e.v/e.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(e){this.hsva.v=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(e){this.hsva.a=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(e){if(null===e)this.updateColorPicker();else{e&&"#"!==e[0]&&(e="#"+e);let i=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(i=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);let r=i.test(e);r&&(e.length<5&&(e="#"+e.substring(1).split("").map(o=>o+o).join("")),"forced"===this.cpAlphaChannel&&(e+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(e,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:r,value:e,color:this.outputColor})}}onRedInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.r=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:r,value:i.r,color:this.outputColor})}onBlueInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.b=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:r,value:i.b,color:this.outputColor})}onGreenInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.g=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:r,value:i.g,color:this.outputColor})}onHueInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.h=e.v/e.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:i,value:this.hsva.h,color:this.outputColor})}onValueInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.v=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:i,value:this.hsva.v,color:this.outputColor})}onAlphaInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.a=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:i,value:this.hsva.a,color:this.outputColor})}onLightnessInput(e){let i=this.service.hsva2hsla(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.l=e.v/e.rg,this.hsva=this.service.hsla2hsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:r,value:i.l,color:this.outputColor})}onSaturationInput(e){let i=this.service.hsva2hsla(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.s=e.v/e.rg,this.hsva=this.service.hsla2hsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:r,value:i.s,color:this.outputColor})}onCyanInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.c=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.m=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.y=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.k=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(e,i){e.stopPropagation(),this.cpPresetColors.filter(r=>r===i).length||(this.cpPresetColors=this.cpPresetColors.concat(i),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(e,i){e.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(r=>r!==i),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout(()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||this.ngZone.runOutsideAngular(()=>{Lne?document.addEventListener("touchstart",this.listenerMouseDown):document.addEventListener("mousedown",this.listenerMouseDown)}),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(Lne?document.removeEventListener("touchstart",this.listenerMouseDown):document.removeEventListener("mousedown",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(e=!0,i=!0,r=!1){if(this.sliderDimMax){2===this.cpColorMode&&(this.hsva.s=0);let o,a,s,l=this.outputColor;if(a=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(r?(s=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(s)):(s=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(s))),s=this.service.denormalizeRGBA(s),this.sliderH=this.hsva.h):s=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),o=this.service.denormalizeRGBA(this.service.hsvaToRgba(new b_(this.sliderH||this.hsva.h,1,1,1))),i&&(this.hslaText=new qd(Math.round(360*a.h),Math.round(100*a.s),Math.round(100*a.l),Math.round(100*a.a)/100),this.rgbaText=new Kl(s.r,s.g,s.b,Math.round(100*s.a)/100),this.cpCmykEnabled&&(this.cmykText=new Dm(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(s,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==Go.RGBA&&this.format!==Go.CMYK&&this.format!==Go.HSLA&&this.hsva.a<1&&(this.format=this.hsva.a<1?Go.RGBA:Go.HEX),this.hueSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.alphaSliderColor="rgb("+s.r+","+s.g+","+s.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==Go.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){let c=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${c})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new _A((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),e&&l!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let r,e="static",i="",o=null,a=null,s=this.directiveElementRef.nativeElement.parentNode,l=this.dialogElement.nativeElement.offsetHeight;for(;null!==s&&"HTML"!==s.tagName;){if(r=window.getComputedStyle(s),e=r.getPropertyValue("position"),i=r.getPropertyValue("transform"),"static"!==e&&null===o&&(o=s),i&&"none"!==i&&null===a&&(a=s),"fixed"===e){o=a;break}s=s.parentNode}let c=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==e);if(this.useRootViewContainer||"fixed"===e&&(!o||o instanceof HTMLUnknownElement))this.top=c.top,this.left=c.left;else{null===o&&(o=s);let u=this.createDialogBox(o,"fixed"!==e);this.top=c.top-u.top,this.left=c.left-u.left}"fixed"===e&&(this.position="fixed");let d=this.cpPosition;"auto"===this.cpPosition&&(d=function(n,t){let e="right",i="bottom",{height:r,width:o}=n,{top:a,left:s}=t,l=a+t.height,c=s+t.width,d=a-r<0,u=l+r>(window.innerHeight||document.documentElement.clientHeight),p=s-o<0,h=c+o>(window.innerWidth||document.documentElement.clientWidth);return u&&(i="top"),d&&(i="bottom"),p&&(e="right"),h&&(e="left"),d&&u&&p&&h?["left","right","top","bottom"].reduce((M,y)=>n[M]>n[y]?M:y):p&&h?d?"bottom":u||a>l?"top":"bottom":d&&u?p?"right":h||s>c?"left":"right":`${i}-${e}`}(this.dialogElement.nativeElement.getBoundingClientRect(),this.cpTriggerElement.nativeElement.getBoundingClientRect())),"top"===d?(this.arrowTop=l-1,this.top-=l+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"bottom"===d?(this.top+=c.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"top-left"===d||"left-top"===d?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===d||"right-top"===d?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left+=c.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===d||"bottom-left"===d||"left-bottom"===d?(this.top+=c.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):(this.top+=c.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=c.width+this.dialogArrowSize-2),this.cpUsePosition=d}}isDescendant(e,i){let r=i.parentNode;for(;null!==r;){if(r===e)return!0;r=r.parentNode}return!1}createDialogBox(e,i){let{top:r,left:o}=e.getBoundingClientRect();return{top:r+(i?window.pageYOffset:0),left:o+(i?window.pageXOffset:0),width:e.offsetWidth,height:e.offsetHeight}}}return n.\u0275fac=function(e){return new(e||n)(C(ot),C(xe),C(Qt),C(Nt),C(fc),C(SV))},n.\u0275cmp=P({type:n,selectors:[["color-picker"]],viewQuery:function(e,i){if(1&e&&(Ue(WVe,7),Ue(qVe,7),Ue(XVe,7)),2&e){let r;be(r=ve())&&(i.dialogElement=r.first),be(r=ve())&&(i.hueSlider=r.first),be(r=ve())&&(i.alphaSlider=r.first)}},hostBindings:function(e,i){1&e&&A("keyup.esc",function(o){return i.handleEsc(o)},0,su)("keyup.enter",function(o){return i.handleEnter(o)},!1,su)},decls:30,vars:51,consts:[[1,"color-picker",3,"click"],["dialogPopup",""],[3,"class","top",4,"ngIf"],["class","saturation-lightness",3,"slider","rgX","rgY","background-color","newValue","dragStart","dragEnd",4,"ngIf"],[1,"hue-alpha","box"],[1,"left"],[1,"selected-color-background"],[1,"selected-color",3,"click"],["class","eyedropper-icon","xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000000",4,"ngIf"],["type","button",3,"class","disabled","click",4,"ngIf"],[1,"right"],["style","height: 16px;",4,"ngIf"],[1,"hue",3,"slider","rgX","newValue","dragStart","dragEnd"],["hueSlider",""],[1,"cursor"],[1,"value",3,"slider","rgX","newValue","dragStart","dragEnd"],["valueSlider",""],[1,"alpha",3,"slider","rgX","newValue","dragStart","dragEnd"],["alphaSlider",""],["class","cmyk-text",3,"display",4,"ngIf"],["class","hsla-text",3,"display",4,"ngIf"],["class","rgba-text",3,"display",4,"ngIf"],["class","hex-text",3,"hex-alpha","display",4,"ngIf"],["class","value-text",4,"ngIf"],["class","type-policy",4,"ngIf"],["class","preset-area",4,"ngIf"],["class","button-area",4,"ngIf"],["class","extra-template",4,"ngIf"],[1,"saturation-lightness",3,"slider","rgX","rgY","newValue","dragStart","dragEnd"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000000",1,"eyedropper-icon"],["d","M0 0h24v24H0V0z","fill","none"],["d","M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"],["type","button",3,"disabled","click"],[2,"height","16px"],[1,"cmyk-text"],[1,"box"],["type","number","pattern","[0-9]*","min","0","max","100",3,"text","rg","value","keyup.enter","newValue"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue",4,"ngIf"],[4,"ngIf"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue"],[1,"hsla-text"],["type","number","pattern","[0-9]*","min","0","max","360",3,"text","rg","value","keyup.enter","newValue"],[1,"rgba-text"],["type","number","pattern","[0-9]*","min","0","max","255",3,"text","rg","value","keyup.enter","newValue"],[1,"hex-text"],[3,"text","value","blur","keyup.enter","newValue"],[1,"value-text"],[1,"type-policy"],[1,"type-policy-arrow",3,"click"],[1,"preset-area"],[1,"preset-label"],[3,"class",4,"ngIf"],["class","preset-color",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"preset-color",3,"click"],[3,"class","click",4,"ngIf"],[3,"click"],[1,"button-area"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"],[1,"extra-template"],[4,"ngTemplateOutlet"]],template:function(e,i){1&e&&(f(0,"div",0,1),A("click",function(o){return o.stopPropagation()}),S(2,YVe,1,5,"div",2),S(3,QVe,2,8,"div",3),f(4,"div",4)(5,"div",5),k(6,"div",6),f(7,"div",7),A("click",function(){return i.eyeDropperSupported&&i.cpEyeDropper&&i.onEyeDropper()}),S(8,ZVe,3,0,"svg",8),g(),S(9,KVe,2,5,"button",9),g(),f(10,"div",10),S(11,JVe,1,0,"div",11),f(12,"div",12,13),A("newValue",function(o){return i.onHueChange(o)})("dragStart",function(){return i.onDragStart("hue")})("dragEnd",function(){return i.onDragEnd("hue")}),k(14,"div",14),g(),f(15,"div",15,16),A("newValue",function(o){return i.onValueChange(o)})("dragStart",function(){return i.onDragStart("value")})("dragEnd",function(){return i.onDragEnd("value")}),k(17,"div",14),g(),f(18,"div",17,18),A("newValue",function(o){return i.onAlphaChange(o)})("dragStart",function(){return i.onDragStart("alpha")})("dragEnd",function(){return i.onDragEnd("alpha")}),k(20,"div",14),g()()(),S(21,t4e,17,12,"div",19),S(22,r4e,14,10,"div",20),S(23,s4e,14,10,"div",21),S(24,d4e,8,7,"div",22),S(25,p4e,9,3,"div",23),S(26,h4e,3,0,"div",24),S(27,b4e,6,3,"div",25),S(28,x4e,3,2,"div",26),S(29,M4e,2,1,"div",27),g()),2&e&&(Bt("display",i.show?"block":"none")("visibility",i.hidden?"hidden":"visible")("top",i.top,"px")("left",i.left,"px")("position",i.position)("height",i.cpHeight,"px")("width",i.cpWidth,"px"),nt("open",i.show),v(2),b("ngIf","popup"===i.cpDialogDisplay),v(1),b("ngIf",1===(i.cpColorMode||1)),v(4),Bt("background-color",i.selectedColor)("cursor",i.eyeDropperSupported&&i.cpEyeDropper?"pointer":null),v(1),b("ngIf",i.eyeDropperSupported&&i.cpEyeDropper),v(1),b("ngIf",i.cpAddColorButton),v(2),b("ngIf","disabled"===i.cpAlphaChannel),v(1),Bt("display",1===(i.cpColorMode||1)?"block":"none"),b("rgX",1),v(2),Bt("left",null==i.slider?null:i.slider.h,"px"),v(1),Bt("display",2===(i.cpColorMode||1)?"block":"none"),b("rgX",1),v(2),Bt("right",null==i.slider?null:i.slider.v,"px"),v(1),Bt("display","disabled"===i.cpAlphaChannel?"none":"block")("background-color",i.alphaSliderColor),b("rgX",1),v(2),Bt("left",null==i.slider?null:i.slider.a,"px"),v(1),b("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),b("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),b("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),b("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),b("ngIf",!i.cpDisableInput&&2===(i.cpColorMode||1)),v(1),b("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),b("ngIf",(null==i.cpPresetColors?null:i.cpPresetColors.length)||i.cpAddColorButton),v(1),b("ngIf",i.cpOKButton||i.cpCancelButton),v(1),b("ngIf",i.cpExtraTemplate))},dependencies:[nn,Ne,eo,E4e,T4e],styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64, )}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n'],encapsulation:2}),n})(),Bne=(()=>{class n{constructor(e,i,r,o,a,s){this.injector=e,this.cfr=i,this.appRef=r,this.vcRef=o,this.elRef=a,this._service=s,this.dialogCreated=!1,this.ignoreChanges=!1,this.viewAttachedToAppRef=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpCmykEnabled=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpCloseClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="auto",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpEyeDropper=!1,this.cpPresetLabel="Preset colors",this.cpPresetColorsClass="cp-preset-colors-class",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new F(!0),this.cpToggleChange=new F(!0),this.cpSliderChange=new F(!0),this.cpSliderDragEnd=new F(!0),this.cpSliderDragStart=new F(!0),this.colorPickerOpen=new F(!0),this.colorPickerClose=new F(!0),this.colorPickerCancel=new F(!0),this.colorPickerSelect=new F(!0),this.colorPickerChange=new F(!1),this.cpCmykColorChange=new F(!0),this.cpPresetColorsChange=new F(!0)}handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(e){this.inputChange(e)}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(e){e.cpToggle&&!this.cpDisabled&&(e.cpToggle.currentValue?this.openDialog():e.cpToggle.currentValue||this.closeDialog()),e.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(e.colorPicker.currentValue),this.dialog.setColorFromString(e.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(e.cpPresetLabel||e.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let e=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){let o=this.injector.get(this.appRef.componentTypes[0],wi.NULL);o!==wi.NULL?e=o.vcRef||o.viewContainerRef||this.vcRef:this.viewAttachedToAppRef=!0}let i=this.cfr.resolveComponentFactory(D4e);if(this.viewAttachedToAppRef)this.cmpRef=i.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{let r=wi.create({providers:[],parent:e.injector});this.cmpRef=e.createComponent(i,0,r,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.cpEyeDropper,this.elRef,this.cpExtraTemplate),this.dialog=this.cmpRef.instance,this.vcRef!==e&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(e){this.cpCmykColorChange.emit(e)}stateChanged(e){this.cpToggleChange.emit(e),e?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(e,i=!0){this.ignoreChanges=i,this.colorPickerChange.emit(e)}colorSelected(e){this.colorPickerSelect.emit(e)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){let e=this.elRef.nativeElement,i=this.cpIgnoredElements.filter(r=>r===e);!this.cpDisabled&&!i.length&&(typeof document<"u"&&e===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(e){this.dialog?this.dialog.setColorFromString(e.target.value,!0):(this.colorPicker=e.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(e){this.cpInputChange.emit(e)}sliderChanged(e){this.cpSliderChange.emit(e)}sliderDragEnd(e){this.cpSliderDragEnd.emit(e)}sliderDragStart(e){this.cpSliderDragStart.emit(e)}presetColorsChanged(e){this.cpPresetColorsChange.emit(e)}}return n.\u0275fac=function(e){return new(e||n)(C(wi),C(ho),C(gc),C(ei),C(xe),C(SV))},n.\u0275dir=Me({type:n,selectors:[["","colorPicker",""]],hostBindings:function(e,i){1&e&&A("click",function(){return i.handleClick()})("focus",function(){return i.handleFocus()})("input",function(o){return i.handleInput(o)})},inputs:{colorPicker:"colorPicker",cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpEyeDropper:"cpEyeDropper",cpPresetLabel:"cpPresetLabel",cpPresetColors:"cpPresetColors",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",cpExtraTemplate:"cpExtraTemplate"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},exportAs:["ngxColorPicker"],features:[qt]}),n})(),Vne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[SV],imports:[De]}),n})();function R4e(n,t){1&n&&(f(0,"span",8),Tt(1,1),g())}function P4e(n,t){1&n&&(f(0,"span",9),Tt(1,2),g())}var Une=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],jne=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function k4e(n,t){1&n&&(f(0,"span",9),Tt(1,1),f(2,"span",10),qn(),f(3,"svg",11),k(4,"path",12),g()()())}function O4e(n,t){1&n&&(f(0,"span",13),Tt(1,2),g())}var Gne=["*"],RV=new te("mat-chips-default-options"),Hne=new te("MatChipAvatar"),zne=new te("MatChipTrailingIcon"),EV=new te("MatChipRemove"),PV=new te("MatChip"),L4e=Dc(class{},-1),vA=(()=>{class n extends L4e{get disabled(){return this._disabled||this._parentChip.disabled}set disabled(e){this._disabled=vt(e)}_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled||!this.isInteractive?null:this.tabIndex.toString()}constructor(e,i){super(),this._elementRef=e,this._parentChip=i,this.isInteractive=!0,this._isPrimary=!0,this._disabled=!1,this._allowFocusWhenDisabled=!1,"BUTTON"===e.nativeElement.nodeName&&e.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}_handleClick(e){!this.disabled&&this.isInteractive&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!this.disabled&&this.isInteractive&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(PV))},n.\u0275dir=Me({type:n,selectors:[["","matChipAction",""]],hostAttrs:[1,"mdc-evolution-chip__action","mat-mdc-chip-action"],hostVars:9,hostBindings:function(e,i){1&e&&A("click",function(o){return i._handleClick(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(Be("tabindex",i._getTabindex())("disabled",i._getDisabledAttribute())("aria-disabled",i.disabled),nt("mdc-evolution-chip__action--primary",i._isPrimary)("mdc-evolution-chip__action--presentational",!i.isInteractive)("mdc-evolution-chip__action--trailing",!i._isPrimary))},inputs:{disabled:"disabled",tabIndex:"tabIndex",isInteractive:"isInteractive",_allowFocusWhenDisabled:"_allowFocusWhenDisabled"},features:[Xe]}),n})(),Wne=(()=>{class n extends vA{constructor(){super(...arguments),this._isPrimary=!1}_handleClick(e){this.disabled||(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!this.disabled&&(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=Me({type:n,selectors:[["","matChipRemove",""]],hostAttrs:["role","button",1,"mat-mdc-chip-remove","mat-mdc-chip-trailing-icon","mat-mdc-focus-indicator","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],hostVars:1,hostBindings:function(e,i){2&e&&Be("aria-hidden",null)},features:[Vt([{provide:EV,useExisting:n}]),Xe]}),n})(),B4e=0,V4e=Dc(Ko(go(ao(class{constructor(n){this._elementRef=n}})),"primary"),-1),eC=(()=>{class n extends V4e{_hasFocus(){return this._hasFocusInternal}get value(){return void 0!==this._value?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}get removable(){return this._removable}set removable(e){this._removable=vt(e)}get highlighted(){return this._highlighted}set highlighted(e){this._highlighted=vt(e)}constructor(e,i,r,o,a,s,l,c){super(i),this._changeDetectorRef=e,this._ngZone=r,this._focusMonitor=o,this._globalRippleOptions=l,this._isRippleCentered=!1,this._onFocus=new Ee,this._onBlur=new Ee,this.role=null,this._hasFocusInternal=!1,this.id="mat-mdc-chip-"+B4e++,this.ariaLabel=null,this.ariaDescription=null,this._ariaDescriptionId=`${this.id}-aria-description`,this._removable=!0,this._highlighted=!1,this.removed=new F,this.destroyed=new F,this.basicChipAttrName="mat-basic-chip",this._document=a,this._animationsDisabled="NoopAnimations"===s,null!=c&&(this.tabIndex=parseInt(c)??this.defaultTabIndex),this._monitorFocus()}ngOnInit(){let e=this._elementRef.nativeElement;this._isBasicChip=e.hasAttribute(this.basicChipAttrName)||e.tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=tn(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._actionChanges?.unsubscribe(),this.destroyed.emit({chip:this}),this.destroyed.complete()}remove(){this.removable&&this.removed.emit({chip:this})}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!(!this.trailingIcon&&!this.removeIcon)}_handleKeydown(e){(8===e.keyCode||46===e.keyCode)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(i=>{let r=i._elementRef.nativeElement;return r===e||r.contains(e)})}_getActions(){let e=[];return this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),this.trailingIcon&&e.push(this.trailingIcon),e}_handlePrimaryActionInteraction(){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=null!==e;i!==this._hasFocusInternal&&(this._hasFocusInternal=i,i?this._onFocus.next({chip:this}):this._ngZone.onStable.pipe(Lt(1)).subscribe(()=>this._ngZone.run(()=>this._onBlur.next({chip:this}))))})}}return n.\u0275fac=function(e){return new(e||n)(C(Qt),C(xe),C(ot),C(fo),C(Nt),C(pi,8),C(Th,8),Mo("tabindex"))},n.\u0275cmp=P({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,r){if(1&e&&(Bn(r,Hne,5),Bn(r,zne,5),Bn(r,EV,5),Bn(r,Hne,5),Bn(r,zne,5),Bn(r,EV,5)),2&e){let o;be(o=ve())&&(i.leadingIcon=o.first),be(o=ve())&&(i.trailingIcon=o.first),be(o=ve())&&(i.removeIcon=o.first),be(o=ve())&&(i._allLeadingIcons=o),be(o=ve())&&(i._allTrailingIcons=o),be(o=ve())&&(i._allRemoveIcons=o)}},viewQuery:function(e,i){if(1&e&&(Ue(Ki,5),Ue(vA,5)),2&e){let r;be(r=ve())&&(i.ripple=r.first),be(r=ve())&&(i.primaryAction=r.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:30,hostBindings:function(e,i){1&e&&A("keydown",function(o){return i._handleKeydown(o)}),2&e&&(wo("id",i.id),Be("role",i.role)("tabindex",i.role?i.tabIndex:null)("aria-label",i.ariaLabel),nt("mdc-evolution-chip",!i._isBasicChip)("mdc-evolution-chip--disabled",i.disabled)("mdc-evolution-chip--with-trailing-action",i._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",i.leadingIcon)("mdc-evolution-chip--with-primary-icon",i.leadingIcon)("mdc-evolution-chip--with-avatar",i.leadingIcon)("mat-mdc-chip-with-avatar",i.leadingIcon)("mat-mdc-chip-highlighted",i.highlighted)("mat-mdc-chip-disabled",i.disabled)("mat-mdc-basic-chip",i._isBasicChip)("mat-mdc-standard-chip",!i._isBasicChip)("mat-mdc-chip-with-trailing-icon",i._hasTrailingIcon())("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",id:"id",ariaLabel:["aria-label","ariaLabel"],ariaDescription:["aria-description","ariaDescription"],value:"value",removable:"removable",highlighted:"highlighted"},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[Vt([{provide:PV,useExisting:n}]),Xe],ngContentSelectors:jne,decls:9,vars:6,consts:[["matRipple","",1,"mat-mdc-chip-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","",3,"isInteractive"],["class","mdc-evolution-chip__graphic mat-mdc-chip-graphic",4,"ngIf"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],["class","mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing",4,"ngIf"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(e,i){1&e&&(fn(Une),k(0,"span",0)(1,"span",1),f(2,"span",2)(3,"span",3),S(4,R4e,2,0,"span",4),f(5,"span",5),Tt(6),k(7,"span",6),g()()(),S(8,P4e,2,0,"span",7)),2&e&&(b("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i._isRippleCentered)("matRippleTrigger",i._elementRef.nativeElement),v(3),b("isInteractive",!1),v(1),b("ngIf",i.leadingIcon),v(4),b("ngIf",i._hasTrailingIcon()))},dependencies:[Ne,Ki,vA],styles:['.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{overflow-x:hidden}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mdc-evolution-chip__action--primary:before{box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1}.mdc-evolution-chip--touch{margin-top:8px;margin-bottom:8px}.mdc-evolution-chip__action-touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-evolution-chip__text-label{white-space:nowrap;user-select:none;text-overflow:ellipsis;overflow:hidden}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mdc-evolution-chip__checkmark-background{opacity:0}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__graphic{transition:width 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark{transition:opacity 50ms 0ms linear,transform 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-50%, -50%)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@keyframes mdc-evolution-chip-enter{from{transform:scale(0.8);opacity:.4}to{transform:scale(1);opacity:1}}.mdc-evolution-chip--enter{animation:mdc-evolution-chip-enter 100ms 0ms cubic-bezier(0, 0, 0.2, 1)}@keyframes mdc-evolution-chip-exit{from{opacity:1}to{opacity:0}}.mdc-evolution-chip--exit{animation:mdc-evolution-chip-exit 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-evolution-chip--hidden{opacity:0;pointer-events:none;transition:width 150ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mat-mdc-standard-chip .mdc-evolution-chip__checkmark{height:20px;width:20px}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, currentColor)}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width:24px}.mdc-evolution-chip--with-avatar .mdc-evolution-chip__graphic{height:24px;width:24px;font-size:24px}.mdc-evolution-chip--with-avatar .mdc-evolution-chip__icon--primary{height:24px;width:24px;font-size:24px}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip .mdc-evolution-chip__ripple{border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 14px 14px 14px 14px)}.mat-mdc-standard-chip.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width:var(--mdc-chip-with-avatar-avatar-size, 28px)}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{height:var(--mdc-chip-with-avatar-avatar-size, 28px);width:var(--mdc-chip-with-avatar-avatar-size, 28px);font-size:var(--mdc-chip-with-avatar-avatar-size, 28px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-outline-width, 1px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-outline-width, 1px)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--selected) .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-unselected-outline-width, 1px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color, transparent)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, currentColor)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{height:var(--mdc-chip-with-icon-icon-size, 18px);width:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, currentColor)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, currentColor)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, currentColor)}.cdk-high-contrast-active .mat-mdc-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-mdc-standard-chip .mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:.4}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary{width:100%}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{opacity:.04}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{opacity:.12}.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-chip-remove{opacity:.54}.mat-mdc-chip-remove:focus{opacity:1}.mat-mdc-chip-remove::before{margin:calc(var(--mat-mdc-focus-indicator-border-width, 3px) * -1);left:8px;right:8px}.mat-mdc-chip-remove .mat-icon{width:inherit;height:inherit;font-size:inherit;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}.cdk-high-contrast-active .mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}.mat-mdc-chip-action:focus .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),H4e=(()=>{class n extends eC{constructor(){super(...arguments),this._defaultOptions=$n(RV,{optional:!0}),this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListHideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._selectable=!0,this._selected=!1,this.basicChipAttrName="mat-basic-chip-option",this.selectionChange=new F}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=vt(e),this._changeDetectorRef.markForCheck()}get selected(){return this._selected}set selected(e){this._setSelectedState(vt(e),!1,!0)}get ariaSelected(){return this.selectable?this.selected.toString():null}ngOnInit(){super.ngOnInit(),this.role="presentation"}select(){this._setSelectedState(!0,!1,!0)}deselect(){this._setSelectedState(!1,!1,!0)}selectViaInteraction(){this._setSelectedState(!0,!0,!0)}toggleSelected(e=!1){return this._setSelectedState(!this.selected,e,!0),this.selected}_handlePrimaryActionInteraction(){this.selectable&&!this.disabled&&this.toggleSelected(!0)}_hasLeadingGraphic(){return!!this.leadingIcon||!this._chipListHideSingleSelectionIndicator||this._chipListMultiple}_setSelectedState(e,i,r){e!==this.selected&&(this._selected=e,r&&this.selectionChange.emit({source:this,isUserInput:i,selected:this.selected}),this._changeDetectorRef.markForCheck())}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-basic-chip-option"],["","mat-basic-chip-option",""],["mat-chip-option"],["","mat-chip-option",""]],hostAttrs:[1,"mat-mdc-chip","mat-mdc-chip-option"],hostVars:37,hostBindings:function(e,i){2&e&&(wo("id",i.id),Be("tabindex",null)("aria-label",null)("aria-description",null)("role",i.role),nt("mdc-evolution-chip",!i._isBasicChip)("mdc-evolution-chip--filter",!i._isBasicChip)("mdc-evolution-chip--selectable",!i._isBasicChip)("mat-mdc-chip-selected",i.selected)("mat-mdc-chip-multiple",i._chipListMultiple)("mat-mdc-chip-disabled",i.disabled)("mat-mdc-chip-with-avatar",i.leadingIcon)("mdc-evolution-chip--disabled",i.disabled)("mdc-evolution-chip--selected",i.selected)("mdc-evolution-chip--selecting",!i._animationsDisabled)("mdc-evolution-chip--with-trailing-action",i._hasTrailingIcon())("mdc-evolution-chip--with-primary-icon",i.leadingIcon)("mdc-evolution-chip--with-primary-graphic",i._hasLeadingGraphic())("mdc-evolution-chip--with-avatar",i.leadingIcon)("mat-mdc-chip-highlighted",i.highlighted)("mat-mdc-chip-with-trailing-icon",i._hasTrailingIcon()))},inputs:{color:"color",disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",selectable:"selectable",selected:"selected"},outputs:{selectionChange:"selectionChange"},features:[Vt([{provide:eC,useExisting:n},{provide:PV,useExisting:n}]),Xe],ngContentSelectors:jne,decls:11,vars:12,consts:[["matRipple","",1,"mat-mdc-chip-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","","role","option",3,"tabIndex","_allowFocusWhenDisabled"],["class","mdc-evolution-chip__graphic mat-mdc-chip-graphic",4,"ngIf"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],["class","mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing",4,"ngIf"],[1,"cdk-visually-hidden",3,"id"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__checkmark"],["viewBox","-2 -3 30 30","focusable","false",1,"mdc-evolution-chip__checkmark-svg"],["fill","none","stroke","currentColor","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-evolution-chip__checkmark-path"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(e,i){1&e&&(fn(Une),k(0,"span",0)(1,"span",1),f(2,"span",2)(3,"button",3),S(4,k4e,5,0,"span",4),f(5,"span",5),Tt(6),k(7,"span",6),g()()(),S(8,O4e,2,0,"span",7),f(9,"span",8),T(10),g()),2&e&&(b("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i._isRippleCentered)("matRippleTrigger",i._elementRef.nativeElement),v(3),b("tabIndex",i.tabIndex)("_allowFocusWhenDisabled",!0),Be("aria-selected",i.ariaSelected)("aria-label",i.ariaLabel)("aria-describedby",i._ariaDescriptionId),v(1),b("ngIf",i._hasLeadingGraphic()),v(4),b("ngIf",i._hasTrailingIcon()),v(1),b("id",i._ariaDescriptionId),v(1),kt(i.ariaDescription))},dependencies:[Ne,Ki,vA],styles:['.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{overflow-x:hidden}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mdc-evolution-chip__action--primary:before{box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1}.mdc-evolution-chip--touch{margin-top:8px;margin-bottom:8px}.mdc-evolution-chip__action-touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-evolution-chip__text-label{white-space:nowrap;user-select:none;text-overflow:ellipsis;overflow:hidden}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mdc-evolution-chip__checkmark-background{opacity:0}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__graphic{transition:width 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark{transition:opacity 50ms 0ms linear,transform 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-50%, -50%)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@keyframes mdc-evolution-chip-enter{from{transform:scale(0.8);opacity:.4}to{transform:scale(1);opacity:1}}.mdc-evolution-chip--enter{animation:mdc-evolution-chip-enter 100ms 0ms cubic-bezier(0, 0, 0.2, 1)}@keyframes mdc-evolution-chip-exit{from{opacity:1}to{opacity:0}}.mdc-evolution-chip--exit{animation:mdc-evolution-chip-exit 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-evolution-chip--hidden{opacity:0;pointer-events:none;transition:width 150ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mat-mdc-standard-chip .mdc-evolution-chip__checkmark{height:20px;width:20px}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, currentColor)}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width:24px}.mdc-evolution-chip--with-avatar .mdc-evolution-chip__graphic{height:24px;width:24px;font-size:24px}.mdc-evolution-chip--with-avatar .mdc-evolution-chip__icon--primary{height:24px;width:24px;font-size:24px}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip .mdc-evolution-chip__ripple{border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-radius:var(--mdc-chip-container-shape-radius, 16px 16px 16px 16px)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 14px 14px 14px 14px)}.mat-mdc-standard-chip.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width:var(--mdc-chip-with-avatar-avatar-size, 28px)}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{height:var(--mdc-chip-with-avatar-avatar-size, 28px);width:var(--mdc-chip-with-avatar-avatar-size, 28px);font-size:var(--mdc-chip-with-avatar-avatar-size, 28px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-outline-width, 1px)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-outline-width, 1px)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--selected) .mdc-evolution-chip__action--primary:before{border-width:var(--mdc-chip-flat-unselected-outline-width, 1px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color, transparent)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, currentColor)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{height:var(--mdc-chip-with-icon-icon-size, 18px);width:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, currentColor)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, currentColor)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, currentColor)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, currentColor)}.cdk-high-contrast-active .mat-mdc-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-mdc-standard-chip .mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:.4}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary{width:100%}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{opacity:.04}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{opacity:.12}.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-chip-remove{opacity:.54}.mat-mdc-chip-remove:focus{opacity:1}.mat-mdc-chip-remove::before{margin:calc(var(--mat-mdc-focus-indicator-border-width, 3px) * -1);left:8px;right:8px}.mat-mdc-chip-remove .mat-icon{width:inherit;height:inherit;font-size:inherit;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}.cdk-high-contrast-active .mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}.mat-mdc-chip-action:focus .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),z4e=Dc(class{constructor(t){}}),yA=(()=>{class n extends z4e{get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get disabled(){return this._disabled}set disabled(e){this._disabled=vt(e),this._syncChipsState()}get empty(){return 0===this._chips.length}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}set role(e){this._explicitRole=e}get focused(){return this._hasFocusedChip()}constructor(e,i,r){super(e),this._elementRef=e,this._changeDetectorRef=i,this._dir=r,this._lastDestroyedFocusedChipIndex=null,this._destroyed=new Ee,this._defaultRole="presentation",this._disabled=!1,this._explicitRole=null,this._chipActions=new Pa}ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips&&this._chips.forEach(e=>{e.disabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){if(-1!==this.tabIndex){let e=this.tabIndex;this.tabIndex=-1,setTimeout(()=>this.tabIndex=e)}}_getChipStream(e){return this._chips.changes.pipe(kn(null),Jn(()=>tn(...this._chips.map(e))))}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-mdc-chip"))return!0;i=i.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(kn(this._chips)).subscribe(e=>{let i=[];e.forEach(r=>r._getActions().forEach(o=>i.push(o))),this._chipActions.reset(i),this._chipActions.notifyOnChanges()}),this._keyManager=new ku(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(it(this._destroyed)).subscribe(({chip:e})=>{let i=e._getSourceAction(document.activeElement);i&&this._keyManager.updateActiveItem(i)}),this._dir?.change.pipe(it(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return!e.isInteractive||e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(kn(null),it(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(it(this._destroyed)).subscribe(e=>{let r=this._chips.toArray().indexOf(e.chip);this._isValidIndex(r)&&e.chip._hasFocus()&&(this._lastDestroyedFocusedChipIndex=r)})}_redirectDestroyedChipFocus(){if(null!=this._lastDestroyedFocusedChipIndex){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),i=this._chips.toArray()[e];i.disabled?1===this._chips.length?this.focus():this._keyManager.setPreviousItemActive():i.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}}return n.\u0275fac=function(e){return new(e||n)(C(xe),C(Qt),C(zi,8))},n.\u0275cmp=P({type:n,selectors:[["mat-chip-set"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,eC,5),2&e){let o;be(o=ve())&&(i._chips=o)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(e,i){1&e&&A("keydown",function(o){return i._handleKeydown(o)}),2&e&&Be("role",i.role)},inputs:{disabled:"disabled",role:"role"},features:[Xe],ngContentSelectors:Gne,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(e,i){1&e&&(fn(),f(0,"div",0),Tt(1),g())},styles:[".mdc-evolution-chip-set{display:flex}.mdc-evolution-chip-set:focus{outline:none}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mdc-evolution-chip-set--overflow .mdc-evolution-chip-set__chips{flex-flow:nowrap}.mdc-evolution-chip-set .mdc-evolution-chip-set__chips{margin-left:-8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip-set__chips,.mdc-evolution-chip-set .mdc-evolution-chip-set__chips[dir=rtl]{margin-left:0;margin-right:-8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-left:8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip,.mdc-evolution-chip-set .mdc-evolution-chip[dir=rtl]{margin-left:0;margin-right:8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-top:4px;margin-bottom:4px}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0}),n})(),U4e={provide:Xr,useExisting:Wn(()=>j4e),multi:!0},j4e=(()=>{class n extends yA{constructor(){super(...arguments),this._onTouched=()=>{},this._onChange=()=>{},this._defaultRole="listbox",this._defaultOptions=$n(RV,{optional:!0}),this._multiple=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.compareWith=(e,i)=>e===i,this._required=!1,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this.change=new F}get multiple(){return this._multiple}set multiple(e){this._multiple=vt(e),this._syncListboxProperties()}get selected(){let e=this._chips.toArray().filter(i=>i.selected);return this.multiple?e:e[0]}get selectable(){return this._selectable}set selectable(e){this._selectable=vt(e),this._syncListboxProperties()}get required(){return this._required}set required(e){this._required=vt(e)}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=vt(e),this._syncListboxProperties()}get chipSelectionChanges(){return this._getChipStream(e=>e.selectionChange)}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}ngAfterContentInit(){void 0!==this._pendingInitialValue&&Promise.resolve().then(()=>{this._setSelectionByValue(this._pendingInitialValue,!1),this._pendingInitialValue=void 0}),this._chips.changes.pipe(kn(null),it(this._destroyed)).subscribe(()=>{this._syncListboxProperties()}),this.chipBlurChanges.pipe(it(this._destroyed)).subscribe(()=>this._blur()),this.chipSelectionChanges.pipe(it(this._destroyed)).subscribe(e=>{this.multiple||this._chips.forEach(i=>{i!==e.source&&i._setSelectedState(!1,!1,!1)}),e.isUserInput&&this._propagateChanges()})}focus(){if(this.disabled)return;let e=this._getFirstSelectedChip();e&&!e.disabled?e.focus():this._chips.length>0?this._keyManager.setFirstItemActive():this._elementRef.nativeElement.focus()}writeValue(e){this._chips?this._setSelectionByValue(e,!1):null!=e&&(this._pendingInitialValue=e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_setSelectionByValue(e,i=!0){this._clearSelection(),Array.isArray(e)?e.forEach(r=>this._selectValue(r,i)):this._selectValue(e,i)}_blur(){this.disabled||setTimeout(()=>{this.focused||this._markAsTouched()})}_keydown(e){9===e.keyCode&&super._allowFocusEscape()}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck()}_propagateChanges(){let e=null;e=Array.isArray(this.selected)?this.selected.map(i=>i.value):this.selected?this.selected.value:void 0,this._value=e,this.change.emit(new class{constructor(t,e){this.source=t,this.value=e}}(this,e)),this._onChange(e),this._changeDetectorRef.markForCheck()}_clearSelection(e){this._chips.forEach(i=>{i!==e&&i.deselect()})}_selectValue(e,i){let r=this._chips.find(o=>null!=o.value&&this.compareWith(o.value,e));return r&&(i?r.selectViaInteraction():r.select()),r}_syncListboxProperties(){this._chips&&Promise.resolve().then(()=>{this._chips.forEach(e=>{e._chipListMultiple=this.multiple,e.chipListSelectable=this._selectable,e._chipListHideSingleSelectionIndicator=this.hideSingleSelectionIndicator,e._changeDetectorRef.markForCheck()})})}_getFirstSelectedChip(){return Array.isArray(this.selected)?this.selected.length?this.selected[0]:void 0:this.selected}_skipPredicate(e){return!e.isInteractive}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=P({type:n,selectors:[["mat-chip-listbox"]],contentQueries:function(e,i,r){if(1&e&&Bn(r,H4e,5),2&e){let o;be(o=ve())&&(i._chips=o)}},hostAttrs:[1,"mdc-evolution-chip-set","mat-mdc-chip-listbox"],hostVars:11,hostBindings:function(e,i){1&e&&A("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(o){return i._keydown(o)}),2&e&&(wo("tabIndex",i.empty?-1:i.tabIndex),Be("role",i.role)("aria-describedby",i._ariaDescribedby||null)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-multiselectable",i.multiple)("aria-orientation",i.ariaOrientation),nt("mat-mdc-chip-list-disabled",i.disabled)("mat-mdc-chip-list-required",i.required))},inputs:{tabIndex:"tabIndex",multiple:"multiple",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",compareWith:"compareWith",required:"required",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",value:"value"},outputs:{change:"change"},features:[Vt([U4e]),Xe],ngContentSelectors:Gne,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(e,i){1&e&&(fn(),f(0,"div",0),Tt(1),g())},styles:[".mdc-evolution-chip-set{display:flex}.mdc-evolution-chip-set:focus{outline:none}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mdc-evolution-chip-set--overflow .mdc-evolution-chip-set__chips{flex-flow:nowrap}.mdc-evolution-chip-set .mdc-evolution-chip-set__chips{margin-left:-8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip-set__chips,.mdc-evolution-chip-set .mdc-evolution-chip-set__chips[dir=rtl]{margin-left:0;margin-right:-8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-left:8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip,.mdc-evolution-chip-set .mdc-evolution-chip[dir=rtl]{margin-left:0;margin-right:8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-top:4px;margin-bottom:4px}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0}),n})(),qne=(hg(class extends yA{constructor(t,e,i,r,o,a,s){super(t,e,i),this._defaultErrorStateMatcher=r,this._parentForm=o,this._parentFormGroup=a,this.ngControl=s,this.stateChanges=new Ee}}),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[Eh,{provide:RV,useValue:{separatorKeyCodes:[13]}}],imports:[dn,De,_a,dn]}),n})()),W4e=["filterModalTemplate"];function q4e(n,t){if(1&n){let e=Te();f(0,"mat-chip",5),A("removed",function(){let o=ne(e).$implicit;return ie(w(2).removeHparamFilter.emit(o))})("click",function(r){let a=ne(e).$implicit;return ie(w(2).openFilterMenu(r,a))}),T(1),f(2,"button",6),k(3,"mat-icon",7),g()()}if(2&n){let e=t.$implicit;v(1),Ve(" ",e," ")}}function X4e(n,t){if(1&n&&(f(0,"div",2),k(1,"mat-icon",3),f(2,"mat-chip-set"),S(3,q4e,4,1,"mat-chip",4),g()()),2&n){let e=w();v(3),b("ngForOf",e.filters.keys())}}function Y4e(n,t){if(1&n){let e=Te();f(0,"tb-data-table-filter",8),A("intervalFilterChanged",function(r){return ne(e),ie(w().emitIntervalFilterChanged(r))})("discreteFilterChanged",function(r){return ne(e),ie(w().emitDiscreteFilterChanged(r))})("includeUndefinedToggled",function(){return ne(e),ie(w().emitIncludeUndefinedToggled())}),g()}2&n&&b("filter",w().selectedFilter)}var Xne=(()=>{class n{get selectedFilterName(){return this.internalSelectedFilterName}set selectedFilterName(e){this.internalSelectedFilterName=e}get selectedFilter(){return this.filters.get(this.selectedFilterName)}constructor(e,i){this.customModal=e,this.viewContainerRef=i,this.removeHparamFilter=new F,this.addFilter=new F,this.internalSelectedFilterName=""}openFilterMenu(e,i){this.selectedFilterName=i,this.customModal.createNextToElement(this.filterModalTemplate,e.target.closest("mat-chip"),this.viewContainerRef)}emitIntervalFilterChanged(e){!this.selectedFilter||this.addFilter.emit({name:this.selectedFilterName,value:{...this.selectedFilter,filterLowerValue:e.lowerValue,filterUpperValue:e.upperValue}})}emitDiscreteFilterChanged(e){if(!this.selectedFilter)return;let i=new Set([...this.selectedFilter.filterValues]);i.has(e)?i.delete(e):i.add(e),this.addFilter.emit({name:this.selectedFilterName,value:{...this.selectedFilter,filterValues:Array.from(i)}})}emitIncludeUndefinedToggled(){!this.selectedFilter||this.addFilter.emit({name:this.selectedFilterName,value:{...this.selectedFilter,includeUndefined:!this.selectedFilter.includeUndefined}})}}return n.\u0275fac=function(e){return new(e||n)(C(uA),C(ei))},n.\u0275cmp=P({type:n,selectors:[["filterbar-component"]],viewQuery:function(e,i){if(1&e&&Ue(W4e,5,oi),2&e){let r;be(r=ve())&&(i.filterModalTemplate=r.first)}},inputs:{filters:"filters"},outputs:{removeHparamFilter:"removeHparamFilter",addFilter:"addFilter"},decls:3,vars:1,consts:[["class","filterbar",4,"ngIf"],["filterModalTemplate",""],[1,"filterbar"],["svgIcon","filter_list_24px",1,"filterbar-icon"],["class","filterbar-chip",3,"removed","click",4,"ngFor","ngForOf"],[1,"filterbar-chip",3,"removed","click"],["matChipRemove",""],["svgIcon","close_24px"],[3,"filter","intervalFilterChanged","discreteFilterChanged","includeUndefinedToggled"]],template:function(e,i){1&e&&(S(0,X4e,4,1,"div",0),S(1,Y4e,1,1,"ng-template",null,1,jt)),2&e&&b("ngIf",i.filters.size)},dependencies:[nn,Ne,hA,bn,eC,Wne,yA],styles:[".filterbar[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 14px 0px 14px}.filterbar[_ngcontent-%COMP%]   .filterbar-icon[_ngcontent-%COMP%]{margin-right:10px}.filterbar[_ngcontent-%COMP%]   .filterbar-chip[_ngcontent-%COMP%]{height:24px}"],changeDetection:0}),n})(),Yne=(()=>{class n{constructor(e){this.store=e,this.ngUnsubscribe=new Ee,this.filters$=this.store.select(Mc.getDashboardHparamFilterMap)}addHparamFilter(e){this.store.dispatch(ro.dashboardHparamFilterAdded({name:e.name,filter:e.value}))}removeHparamFilter(e){this.store.dispatch(ro.dashboardHparamFilterRemoved({name:e}))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["filterbar"]],decls:2,vars:3,consts:[[3,"filters","removeHparamFilter","addFilter"]],template:function(e,i){1&e&&(f(0,"filterbar-component",0),A("removeHparamFilter",function(o){return i.removeHparamFilter(o)})("addFilter",function(o){return i.addHparamFilter(o)}),U(1,"async"),g()),2&e&&b("filters",G(1,1,i.filters$))},dependencies:[Xne,ct],changeDetection:0}),n})(),K4e=["regexStringInput"];function J4e(n,t){1&n&&(f(0,"mat-option",3),T(1,"Experiment Name"),g()),2&n&&Zi("value",w().REGEX_BY_EXP_STR)}function $4e(n,t){if(1&n&&(Gt(0),f(1,"li",25),T(2),g(),Wt()),2&n){let e=t.$implicit;v(1),b("title",e.name),v(1),kt(e.name)}}function eHe(n,t){if(1&n&&(f(0,"li",26)(1,"em"),T(2),U(3,"number"),g()()),2&n){let e=w().$implicit;v(2),Ve("and ",G(3,1,e.runs.length-5)," more")}}function tHe(n,t){1&n&&(f(0,"li",27)(1,"em"),T(2,"No runs are in the group"),g()())}var nHe=function(n){return{borderColor:n}},iHe=function(n){return{backgroundColor:n}};function rHe(n,t){if(1&n&&(f(0,"ul",19)(1,"li")(2,"label"),k(3,"span",20),f(4,"code",21),T(5),g()(),f(6,"ul"),S(7,$4e,3,2,"ng-container",22),U(8,"slice"),S(9,eHe,4,3,"li",23),S(10,tHe,3,0,"li",24),g()()()),2&n){let e=t.$implicit;b("ngStyle",Un(11,nHe,e.color)),v(3),b("ngStyle",Un(13,iHe,e.color)),v(1),b("title",e.groupId),v(1),kt(e.groupId),v(2),b("ngForOf",kk(8,7,e.runs,0,5)),v(2),b("ngIf",e.runs.length>5),v(1),b("ngIf",0===e.runs.length)}}function oHe(n,t){if(1&n&&(f(0,"div",17),S(1,rHe,11,15,"ul",18),g()),2&n){let e=w(2);v(1),b("ngForOf",e.colorRunPairList)}}function aHe(n,t){if(1&n&&(f(0,"div",28),T(1," There are no runs matching the regex, "),f(2,"code"),T(3),g(),T(4,". Please check if your regex string is correct. "),g()),2&n){let e=w(2);v(3),Ve("/",e.regexString,"/")}}function sHe(n,t){if(1&n&&(f(0,"div",13)(1,"h4"),T(2,"Color group preview"),g(),f(3,"div",14),S(4,oHe,2,1,"div",15),S(5,aHe,5,1,"ng-template",null,16,jt),g()()),2&n){let e=st(6),i=w();v(4),b("ngIf",i.colorRunPairList.length)("ngIfElse",e)}}var Qne=(()=>{class n{constructor(e,i){this.dialogRef=e,this.hostElRef=i,this.onSave=new F,this.regexInputOnChange=new F,this.regexTypeOnChange=new F,this.REGEX_BY_RUN_STR="regex_by_run",this.REGEX_BY_EXP_STR="regex_by_exp",this.timeOutId=0,this.regexTypeFn=_s(this.internalRegexTypeFn.bind(this))}internalRegexTypeFn(e){return e===Yn.REGEX_BY_EXP?this.REGEX_BY_EXP_STR:this.REGEX_BY_RUN_STR}resetFocus(){this.hostElRef.nativeElement.contains(document.activeElement)||this.regexStringInput.nativeElement.focus()}onEnter(){this.onSaveClick(),this.dialogRef.close()}onSaveClick(){this.onSave.emit()}fillExample(e){this.regexString=e,this.regexInputChange(e)}regexInputChange(e){this.regexInputOnChange.emit(e)}handleFocusOut(){clearTimeout(this.timeOutId),this.timeOutId=setTimeout(this.resetFocus.bind(this),0)}regexTypeChange(e){this.regexTypeOnChange.emit(e.value===this.REGEX_BY_RUN_STR?Yn.REGEX:Yn.REGEX_BY_EXP)}}return n.\u0275fac=function(e){return new(e||n)(C(Vl),C(xe))},n.\u0275cmp=P({type:n,selectors:[["regex-edit-dialog-component"]],viewQuery:function(e,i){if(1&e&&Ue(K4e,7),2&e){let r;be(r=ve())&&(i.regexStringInput=r.first)}},inputs:{regexString:"regexString",colorRunPairList:"colorRunPairList",selectedGroupBy:"selectedGroupBy",enableColorByExperiment:"enableColorByExperiment"},outputs:{onSave:"onSave",regexInputOnChange:"regexInputOnChange",regexTypeOnChange:"regexTypeOnChange"},decls:37,vars:5,consts:function(){let t;return t=$localize`:Color Runs by Regex Query␟15ed9f6fd2d4906a4803fc1255de3c5db2c56530␟9088985113960312808:Color Runs by Regex Query`,[[1,"regex-edit-dialog",3,"focusout"],["mat-dialog-title",""],[3,"value","selectionChange"],[3,"value"],[3,"value",4,"ngIf"],["matInput","","aria-label",t,"cdkFocusInitial","",3,"value","keydown.enter","input"],["regexStringInput",""],[1,"example-details"],[3,"click"],["class","group-container",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],["mat-raised-button","","color","primary","mat-dialog-close","",1,"save-button",3,"click"],[1,"group-container"],[1,"grouping-preview"],["class","match-container",4,"ngIf","ngIfElse"],["empty",""],[1,"match-container"],["class","group",3,"ngStyle",4,"ngFor","ngForOf"],[1,"group",3,"ngStyle"],[1,"color-swatch",3,"ngStyle"],[1,"group-id",3,"title"],[4,"ngFor","ngForOf"],["class","more",4,"ngIf"],["class","no-match",4,"ngIf"],[3,"title"],[1,"more"],[1,"no-match"],[1,"warning"]]},template:function(e,i){1&e&&(f(0,"div",0),A("focusout",function(){return i.handleFocusOut()}),f(1,"h1",1),T(2,"Color runs by regex"),g(),f(3,"mat-dialog-content")(4,"p"),T(5,"Enter a regex with capturing groups to match against run names:"),g(),f(6,"mat-form-field")(7,"mat-label"),T(8,"Regex type"),g(),f(9,"mat-select",2),A("selectionChange",function(o){return i.regexTypeChange(o)}),f(10,"mat-option",3),T(11,"Run Name"),g(),S(12,J4e,2,1,"mat-option",4),g()(),f(13,"mat-form-field")(14,"input",5,6),A("keydown.enter",function(){return i.onEnter()})("input",function(o){return i.regexInputChange(o.target.value)}),g()()(),f(16,"div",7)(17,"p"),T(18,' Each matching run will be assigned a color based on the "key" formed by its matches to the capturing groups. '),k(19,"br"),f(20,"button",8),A("click",function(){return i.fillExample("(train|eval)")}),T(21," Try "),f(22,"code"),T(23,"(train|eval)"),g()(),T(24," to assign all runs containing "),f(25,"code"),T(26,"train"),g(),T(27," to one color and all runs containing "),f(28,"code"),T(29,"eval"),g(),T(30," to another color. "),g()(),S(31,sHe,7,2,"div",9),f(32,"div",10)(33,"button",11),T(34,"Cancel"),g(),f(35,"button",12),A("click",function(){return i.onSaveClick()}),T(36," Save "),g()()()),2&e&&(v(9),b("value",i.regexTypeFn(i.selectedGroupBy)),v(1),Zi("value",i.REGEX_BY_RUN_STR),v(2),b("ngIf",i.enableColorByExperiment),v(2),Zi("value",i.regexString),v(17),b("ngIf",i.regexString))},dependencies:[nn,Ne,Mf,ki,Z1,C9,K1,J1,qu,Pc,nl,Wu,ja,Kj,Us],styles:[".example-details[_ngcontent-%COMP%]{padding:16px}.example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0);padding:0;border:none;cursor:pointer;text-decoration:underline;color:#1976d2}body.dark-mode[_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:#42a5f5}.example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited{color:#7b1fa2}body.dark-mode[_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited, body.dark-mode   [_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited{color:#ba68c8}.group-container[_ngcontent-%COMP%]{margin:16px}.group-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:16px}.group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:#616161;font-size:.9em}body.dark-mode[_nghost-%COMP%]   .group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.grouping-preview[_ngcontent-%COMP%]{border:1px solid #ebebeb;max-height:50vh;overflow-y:auto;padding:16px}body.dark-mode[_nghost-%COMP%]   .grouping-preview[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .grouping-preview[_ngcontent-%COMP%]{border:1px solid #555}.match-container[_ngcontent-%COMP%]{align-items:flex-start;display:grid;flex-wrap:wrap;gap:10px;grid-template-columns:repeat(2, minmax(50%, 1fr))}.color-swatch[_ngcontent-%COMP%]{border-radius:50%;box-shadow:0 0 2px #000;display:inline-block;height:15px;width:15px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0}mat-form-field[_ngcontent-%COMP%]{width:100%}.group[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:3px;margin:0;padding:16px}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]{border:1px solid #555}.group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;align-items:center;display:grid;gap:10px;grid-template-columns:max-content auto;padding:16px 0}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{border-bottom:1px solid #555}.group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   .group-id[_ngcontent-%COMP%]{font-size:.95em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{font-size:.9em}.group[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%], .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%]{color:#616161;margin-top:16px}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),Zne=(()=>{class n{constructor(e,i,r){this.store=e,this.dialogRef=i,this.tentativeRegexString$=new Ee,this.tentativeRegexType$=new Ee,this.groupByRegexString$=is(()=>tn(this.store.select(y1).pipe(Lt(1)),this.tentativeRegexString$)).pipe(kn(""),Da(1)),this.colorRunPairList$=is(()=>this.groupByRegexString$.pipe(Cr(500),Oe(o=>{try{let a=new RegExp(o);return Boolean(a)}catch{return!1}}),Vi(this.groupByRegexType$,this.allRuns$,this.runIdToEid$,this.expNameByExpId$,this.store.select(Ha.getColorPalette),this.store.select(Pl)),q(([o,a,s,l,c,d,u])=>{let h=Ev({key:a,regexString:o},s,l,c),m=new Map,_=[];for(let[M,y]of Object.entries(h.matches)){let x=m.get(M);if(!x){let R=d.colors[m.size%d.colors.length];x=u?R.darkHex:R.lightHex,m.set(M,x)}_.push({groupId:M,color:x,runs:y})}return _}))).pipe(kn([])),this.expNameByExpId$=this.store.select(yu),this.enableColorByExperiment$=this.store.select(D6),this.groupByRegexType$=tn(this.store.select(Dv).pipe(Lt(1),q(o=>o.key)),this.tentativeRegexType$).pipe(kn(Yn.REGEX),Oe(o=>o===Yn.REGEX||o===Yn.REGEX_BY_EXP),Da(1)),this.experimentIds=r.experimentIds,this.runIdToEid$=In(this.experimentIds.map(o=>this.store.select(YW,{experimentId:o}).pipe(q(a=>({experimentId:o,runIds:a}))))).pipe(q(o=>{let a={};for(let{runIds:s,experimentId:l}of o)for(let c of s)a[c]=l;return a})),this.allRuns$=In(this.experimentIds.map(o=>this.store.select(Iu,{experimentId:o}))).pipe(q(o=>o.flat()))}onRegexInputOnChange(e){this.tentativeRegexString$.next(e)}onRegexTypeOnChange(e){this.tentativeRegexType$.next(e)}onSave(){In([this.groupByRegexString$,this.groupByRegexType$,this.expNameByExpId$]).subscribe(([e,i,r])=>{e&&this.store.dispatch(Xf({experimentIds:this.experimentIds,groupBy:{key:i,regexString:e},expNameByExpId:r}))})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(Vl),C(Xv))},n.\u0275cmp=P({type:n,selectors:[["regex-edit-dialog"]],decls:5,vars:12,consts:[[3,"regexString","colorRunPairList","selectedGroupBy","enableColorByExperiment","onSave","regexInputOnChange","regexTypeOnChange"]],template:function(e,i){1&e&&(f(0,"regex-edit-dialog-component",0),A("onSave",function(){return i.onSave()})("regexInputOnChange",function(o){return i.onRegexInputOnChange(o)})("regexTypeOnChange",function(o){return i.onRegexTypeOnChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),g()),2&e&&b("regexString",G(1,4,i.groupByRegexString$))("colorRunPairList",G(2,6,i.colorRunPairList$))("selectedGroupBy",G(3,8,i.groupByRegexType$))("enableColorByExperiment",G(4,10,i.enableColorByExperiment$))},dependencies:[Qne,ct],styles:["[_nghost-%COMP%], regex-edit-dialog-component[_ngcontent-%COMP%] {\n        display: block;\n        height: 100%;\n        width: 100%;\n      }"]}),n})();function dHe(n,t){1&n&&k(0,"mat-icon",14)}function uHe(n,t){if(1&n){let e=Te();f(0,"button",13),A("click",function(){ne(e);let r=w();return ie(r.onGroupByChange.emit({key:r.GroupByKey.EXPERIMENT}))}),S(1,dHe,1,0,"mat-icon",7),f(2,"span"),T(3,"Experiment"),g()()}if(2&n){let e=w();Be("aria-checked",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT),v(1),b("ngIf",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT)}}function pHe(n,t){1&n&&k(0,"mat-icon",14)}function hHe(n,t){1&n&&k(0,"mat-icon",14)}function mHe(n,t){1&n&&(f(0,"span")(1,"strong"),T(2," By Run Name"),g()())}function fHe(n,t){1&n&&(f(0,"span")(1,"strong"),T(2," By Experiment Name"),g()())}function gHe(n,t){if(1&n&&(f(0,"span"),T(1),g()),2&n){let e=w();v(1),kt(e.regexString)}}function _He(n,t){1&n&&(f(0,"span",15),T(1,"(none set)"),g())}var Kne=(()=>{class n{constructor(e){this.dialog=e,this.GroupByKey=Yn,this.onGroupByChange=new F}onRegexStringEdit(){this.dialog.open(Zne,{maxHeight:"95vh",maxWidth:"80vw",data:{experimentIds:this.experimentIds}})}onGroupByRegexClick(){this.regexString?this.onGroupByChange.emit({key:this.lastRegexGroupByKey,regexString:this.regexString}):this.onRegexStringEdit()}}return n.\u0275fac=function(e){return new(e||n)(C(ys))},n.\u0275cmp=P({type:n,selectors:[["runs-group-menu-button-component"]],inputs:{showExperimentsGroupBy:"showExperimentsGroupBy",experimentIds:"experimentIds",regexString:"regexString",selectedGroupBy:"selectedGroupBy",lastRegexGroupByKey:"lastRegexGroupByKey"},outputs:{onGroupByChange:"onGroupByChange"},decls:21,vars:10,consts:[["mat-icon-button","","title","Color runs by...",3,"matMenuTriggerFor"],["svgIcon","palette_24px"],[1,"run-table-color-group-by"],["groupByMenu","matMenu"],[1,"label"],["mat-menu-item","","role","menuitemradio","data-value","experiment",3,"click",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","run",3,"click"],["svgIcon","done_24px",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","regex",3,"click"],[4,"ngIf"],["mat-menu-item","","role","menuitem","data-value","regex-edit",1,"display-regex-string",3,"click"],["svgIcon","edit_24px"],["class","none-set-string",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","experiment",3,"click"],["svgIcon","done_24px"],[1,"none-set-string"]],template:function(e,i){1&e&&(f(0,"button",0),k(1,"mat-icon",1),g(),f(2,"mat-menu",2,3)(4,"div",4),T(5,"Color runs by"),g(),S(6,uHe,4,2,"button",5),f(7,"button",6),A("click",function(){return i.onGroupByChange.emit({key:i.GroupByKey.RUN})}),S(8,pHe,1,0,"mat-icon",7),f(9,"span"),T(10,"Run"),g()(),f(11,"button",8),A("click",function(){return i.onGroupByRegexClick()}),S(12,hHe,1,0,"mat-icon",7),f(13,"span"),T(14,"Regex"),g(),S(15,mHe,3,0,"span",9),S(16,fHe,3,0,"span",9),g(),f(17,"button",10),A("click",function(){return i.onRegexStringEdit()}),k(18,"mat-icon",11),S(19,gHe,2,1,"span",9),S(20,_He,2,0,"span",12),g()()),2&e&&(b("matMenuTriggerFor",st(3)),v(6),b("ngIf",i.showExperimentsGroupBy),v(1),Be("aria-checked",i.selectedGroupBy.key===i.GroupByKey.RUN),v(1),b("ngIf",i.selectedGroupBy.key===i.GroupByKey.RUN),v(3),Be("aria-checked",i.selectedGroupBy.key===i.GroupByKey.REGEX||i.selectedGroupBy.key===i.GroupByKey.REGEX_BY_EXP),v(1),b("ngIf",i.selectedGroupBy.key===i.GroupByKey.REGEX||i.selectedGroupBy.key===i.GroupByKey.REGEX_BY_EXP),v(3),b("ngIf",i.selectedGroupBy.key===i.GroupByKey.REGEX),v(1),b("ngIf",i.selectedGroupBy.key===i.GroupByKey.REGEX_BY_EXP),v(3),b("ngIf",i.regexString),v(1),b("ngIf",!i.regexString))},dependencies:[Ne,Er,bn,Xu,Ed,Yu],styles:[".run-table-color-group-by{font-size:16px}  .run-table-color-group-by .label{color:#616161;font-size:.9em;margin:10px 0;padding:0 16px;pointer-events:none}  .run-table-color-group-by mat-icon{--mat-menu-item-icon-size: 20px}  .run-table-color-group-by .display-regex-string{padding-left:40px}  .run-table-color-group-by .display-regex-string .none-set-string{color:#616161}body.dark-mode[_nghost-%COMP%]     .run-table-color-group-by .display-regex-string .none-set-string, body.dark-mode   [_nghost-%COMP%]     .run-table-color-group-by .display-regex-string .none-set-string{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),Jne=(()=>{class n{constructor(e){this.store=e,this.showExperimentsGroupBy$=this.store.select(J8).pipe(q(i=>i.has(Cn.COMPARE_EXPERIMENT))),this.selectedGroupBy$=this.store.select(Dv),this.lastRegexGroupByKey$=this.store.select(Dv).pipe(q(i=>i.key),Oe(i=>i===Yn.REGEX||i===Yn.REGEX_BY_EXP),kn(Yn.REGEX)),this.groupByRegexString$=this.store.select(y1),this.expNameByExpId$=this.store.select(yu)}onGroupByChange(e){this.expNameByExpId$.pipe(Lt(1)).subscribe(i=>{this.store.dispatch(Xf({experimentIds:this.experimentIds,groupBy:e,expNameByExpId:i}))})}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["runs-group-menu-button"]],inputs:{experimentIds:"experimentIds"},decls:5,vars:13,consts:[[3,"regexString","selectedGroupBy","lastRegexGroupByKey","showExperimentsGroupBy","experimentIds","onGroupByChange"]],template:function(e,i){1&e&&(f(0,"runs-group-menu-button-component",0),A("onGroupByChange",function(o){return i.onGroupByChange(o)}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),g()),2&e&&b("regexString",G(1,5,i.groupByRegexString$))("selectedGroupBy",G(2,7,i.selectedGroupBy$))("lastRegexGroupByKey",G(3,9,i.lastRegexGroupByKey$))("showExperimentsGroupBy",G(4,11,i.showExperimentsGroupBy$))("experimentIds",i.experimentIds)},dependencies:[Kne,ct],encapsulation:2,changeDetection:0}),n})();function yHe(n,t){if(1&n){let e=Te();f(0,"div")(1,"mat-checkbox",12),A("click",function(r){return ne(e),ie(w(2).handleSelectAll(r))}),g()()}if(2&n){let e=w(2);v(1),b("checked",e.allRowsSelected())("indeterminate",!e.allRowsSelected()&&e.someRowsSelected())}}function xHe(n,t){if(1&n&&(f(0,"span",13),k(1,"runs-group-menu-button",14),g()),2&n){let e=w(2);v(1),b("experimentIds",e.experimentIds)}}var $ne=function(n){return[n]};function CHe(n,t){if(1&n&&(Gt(0),f(1,"tb-data-table-header-cell",8),Gt(2,9),S(3,yHe,2,2,"div",10),S(4,xHe,2,1,"span",11),Wt(),g(),Wt()),2&n){let e=t.$implicit,i=w();v(1),b("header",e)("sortingInfo",i.sortingInfo)("ngClass",Un(6,$ne,"table-column-"+e.name)),v(1),b("ngSwitch",e.name),v(1),b("ngSwitchCase","selected"),v(1),b("ngSwitchCase","color")}}function MHe(n,t){if(1&n){let e=Te();f(0,"span",17)(1,"button",18),A("colorPickerChange",function(r){ne(e);let o=w(2).$implicit;return ie(w().onRunColorChange.emit({runId:o.id,newColor:r}))}),g()()}if(2&n){let e=w(2).$implicit;v(1),Bt("background",e.color),b("colorPicker",e.color)("cpDialogDisplay","popup")("cpPositionOffset",-20)("cpUseRootViewContainer",!0)("cpOutputFormat","hex")}}function wHe(n,t){if(1&n){let e=Te();f(0,"div")(1,"mat-checkbox",19),A("click",function(r){ne(e);let o=w(2).$implicit;return ie(w().selectionClick(r,o.id))}),g()()}if(2&n){let e=w(2).$implicit;v(1),b("checked",e.selected)}}function SHe(n,t){if(1&n&&(f(0,"span"),k(1,"tb-experiment-alias",20),g()),2&n){let e=w(2).$implicit;v(1),b("alias",e.experimentAlias)("title",e.experimentName)}}function EHe(n,t){if(1&n&&(Gt(0),f(1,"tb-data-table-content-cell",15),Gt(2,9),S(3,MHe,2,7,"span",16),S(4,wHe,2,1,"div",10),S(5,SHe,2,2,"span",10),Wt(),g(),Wt()),2&n){let e=t.$implicit,i=w().$implicit;v(1),b("header",e)("datum",i[e.name])("ngClass",Un(7,$ne,"table-column-"+e.name)),v(1),b("ngSwitch",e.name),v(1),b("ngSwitchCase","color"),v(1),b("ngSwitchCase","selected"),v(1),b("ngSwitchCase","experimentAlias")}}function THe(n,t){if(1&n&&(Gt(0),f(1,"tb-data-table-content-row"),S(2,EHe,6,9,"ng-container",5),g(),Wt()),2&n){let e=t.$implicit,i=w();v(1),Be("data-id",e.id),v(1),b("ngForOf",i.extendHeaders(i.headers))}}var eie=(()=>{class n{constructor(){this.ColumnHeaderType=gt,this.sortDataBy=new F,this.orderColumns=new F,this.onSelectionToggle=new F,this.onAllSelectionToggle=new F,this.onRegexFilterChange=new F,this.onRunColorChange=new F,this.addColumn=new F,this.removeColumn=new F,this.onSelectionDblClick=new F,this.addFilter=new F,this.loadAllColumns=new F,this.extendHeaders=_s(this.internalExtendHeaders)}internalExtendHeaders(e){return[].concat([{name:"selected",displayName:"",type:gt.CUSTOM,enabled:!0}],e,[{name:"color",displayName:"",type:gt.COLOR,enabled:!0}])}selectionClick(e,i){e.preventDefault(),1===e.detail&&this.onSelectionToggle.emit(i),2===e.detail&&this.onSelectionDblClick.emit(i)}allRowsSelected(){return this.data?.every(e=>e.selected)}someRowsSelected(){return this.data?.some(e=>e.selected)}handleSelectAll(e){e.preventDefault(),this.onAllSelectionToggle.emit(this.data?.map(i=>i.id))}onFilterKeyUp(e){this.onRegexFilterChange.emit(e.target.value)}trackByRuns(e,i){let r={...i};return delete r.color,JSON.stringify(r)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["runs-data-table"]],inputs:{headers:"headers",data:"data",sortingInfo:"sortingInfo",experimentIds:"experimentIds",regexFilter:"regexFilter",selectableColumns:"selectableColumns",numColumnsLoaded:"numColumnsLoaded",numColumnsToLoad:"numColumnsToLoad",loading:"loading",columnFilters:"columnFilters"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns",onSelectionToggle:"onSelectionToggle",onAllSelectionToggle:"onAllSelectionToggle",onRegexFilterChange:"onRegexFilterChange",onRunColorChange:"onRunColorChange",addColumn:"addColumn",removeColumn:"removeColumn",onSelectionDblClick:"onSelectionDblClick",addFilter:"addFilter",loadAllColumns:"loadAllColumns"},decls:9,vars:12,consts:[[1,"filter-row"],["placeholder","Filter runs (regex)",1,"run-filter",3,"value","keyup"],[1,"table-container"],[3,"headers","sortingInfo","selectableColumns","numColumnsLoaded","hasMoreColumnsToLoad","columnFilters","loading","shouldAddBorders","sortDataBy","orderColumns","addColumn","removeColumn","addFilter","loadAllColumns"],["header",""],[4,"ngFor","ngForOf"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"header","sortingInfo","ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","group-menu-container",4,"ngSwitchCase"],[3,"checked","indeterminate","click"],[1,"group-menu-container"],[3,"experimentIds"],[3,"header","datum","ngClass"],["class","color-container",4,"ngSwitchCase"],[1,"color-container"],[1,"run-color-swatch",3,"colorPicker","cpDialogDisplay","cpPositionOffset","cpUseRootViewContainer","cpOutputFormat","colorPickerChange"],[3,"checked","click"],[3,"alias","title"]],template:function(e,i){1&e&&(f(0,"div",0)(1,"tb-filter-input",1),A("keyup",function(o){return i.onFilterKeyUp(o)}),g()(),k(2,"filterbar"),f(3,"div",2)(4,"tb-data-table",3),A("sortDataBy",function(o){return i.sortDataBy.emit(o)})("orderColumns",function(o){return i.orderColumns.emit(o)})("addColumn",function(o){return i.addColumn.emit(o)})("removeColumn",function(o){return i.removeColumn.emit(o)})("addFilter",function(o){return i.addFilter.emit(o)})("loadAllColumns",function(){return i.loadAllColumns.emit()}),Gt(5,4),S(6,CHe,5,8,"ng-container",5),Wt(),Gt(7,6),S(8,THe,3,2,"ng-container",7),Wt(),g()()),2&e&&(v(1),Zi("value",i.regexFilter),v(3),b("headers",i.headers)("sortingInfo",i.sortingInfo)("selectableColumns",i.selectableColumns)("numColumnsLoaded",i.numColumnsLoaded)("hasMoreColumnsToLoad",i.numColumnsLoaded===i.numColumnsToLoad)("columnFilters",i.columnFilters)("loading",i.loading)("shouldAddBorders",!0),v(2),b("ngForOf",i.extendHeaders(i.headers)),v(2),b("ngForOf",i.data)("ngForTrackBy",i.trackByRuns))},dependencies:[Bne,wn,nn,mr,kr,m_,dA,mA,f_,Kg,g_,xs,Yne,Jne],styles:["[_nghost-%COMP%]{min-width:100%}.color-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}.run-color-swatch[_ngcontent-%COMP%]{border-radius:100%;border:1px solid #ebebeb;height:20px;width:20px;outline:none}.group-menu-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}tb-data-table-content-row[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{height:48px}tb-data-table-content-cell[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{padding:0 4px;vertical-align:middle;border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid #555}.table-column-selected[_ngcontent-%COMP%], .table-column-color[_ngcontent-%COMP%]{width:40px}.filter-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:48px;width:100%}.filter-row[_ngcontent-%COMP%]   tb-filter-input[_ngcontent-%COMP%]{padding-left:16px;flex-grow:1}"],changeDetection:0}),n})(),IHe=W(Tv,n=>n.state===Re.LOADING),tie=(()=>{class n{constructor(e){this.store=e,this.sortedRunsTableData$=$t([]),this.loading$=null,this.sortingInfo$=this.store.select($W),this.columns=[Zl.RUN_NAME],this.regexFilter$=this.store.select(Au),this.runsColumns$=this.store.select(e7),this.selectableColumns$=this.store.select(YT),this.numColumnsLoaded$=this.store.select(Mc.getNumDashboardHparamsLoaded),this.numColumnsToLoad$=this.store.select(Mc.getNumDashboardHparamsToLoad),this.columnFilters$=this.store.select(XT),this.allRunsTableData$=this.store.select(AN).pipe(q(i=>i.map(r=>({...Object.fromEntries(r.hparams.entries()),id:r.run.id,run:r.run.name,experimentName:r.experimentName,experimentAlias:r.experimentAlias,selected:r.selected,color:r.runColor})))),this.ngUnsubscribe=new Ee}ngOnInit(){let e=this.experimentIds.map(o=>this.getRunTableItemsForExperiment(o));this.sortedRunsTableData$=In([this.allRunsTableData$,this.sortingInfo$]).pipe(q(([o,a])=>function(n,t){let e=[...n];return e.sort((r,o)=>{let a=r[t.name],s=o[t.name];if("experimentAlias"===t.name&&(a=a.aliasNumber,s=s.aliasNumber),a===s)return 0;if(void 0===a||void 0===s)return i(a,s);if(One.has(typeof a)&&One.has(typeof s)){let l=Fne(a),c=Fne(s);if((void 0===l||void 0===c)&&l!==c)return i(l,c,{insertUndefined:Pp.BEFORE});if(void 0!==l&&void 0!==c)return l===c?i(a.toString().slice(l.toString().length)||void 0,s.toString().slice(c.toString().length)||void 0,{insertUndefined:Pp.BEFORE}):i(l,c)}return i(a,s)}),e;function i(r,o,{insertUndefined:a}=GVe){return r===o?0:void 0===r?a===Pp.AFTER?1:-1:void 0===o?a===Pp.AFTER?-1:1:r<o==(t.order===Lr.ASCENDING)?-1:1}}(o,a)));let i=In(e).pipe(q(o=>[].concat(...o))),r=this.experimentIds.map(o=>this.store.select(IHe,{experimentId:o}));this.loading$=In(r).pipe(q(o=>o.some(a=>a))),this.columns.includes(Zl.CHECKBOX)&&this.store.select(Ho).pipe(it(this.ngUnsubscribe),ri((a,s)=>Vo(a,s)),Jn(()=>i.pipe(Oe(a=>a.length>500),Lt(1)))).subscribe(()=>{this.store.dispatch(tg({localizedMessage:"The number of runs exceeds 500. New runs are unselected for performance reasons."}))})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}sortDataBy(e){this.store.dispatch(VS({sortingInfo:e}))}getRunTableItemsForExperiment(e){return In([this.store.select(Iu,{experimentId:e}),this.store.select(US,{experimentId:e}),this.store.select(Ru),this.store.select(Pu),this.store.select(qs)]).pipe(q(([i,r,o,a,s])=>i.map(l=>{let c=new Map;(l.hparams||[]).forEach(u=>{c.set(u.name,u.value)});let d=new Map;return(l.metrics||[]).forEach(u=>{d.set(u.tag,u.value)}),{run:l,experimentName:r?.name||"",experimentAlias:s[e],selected:Boolean(o&&o.get(l.id)),runColor:a[l.id],hparams:c,metrics:d}})))}onRunSelectionToggle(e){this.store.dispatch(kS({runId:e}))}onRunSelectionDblClick(e){this.store.dispatch(OS({runId:e}))}onAllSelectionToggle(e){this.store.dispatch(FS({runIds:e}))}onRegexFilterChange(e){this.store.dispatch(NS({regexString:e}))}onRunColorChange({runId:e,newColor:i}){this.store.dispatch(LS({runId:e,newColor:i}))}addColumn({column:e,nextTo:i,side:r}){this.store.dispatch(ro.dashboardHparamColumnAdded({column:e,nextTo:i,side:r}))}removeColumn(e){this.store.dispatch(ro.dashboardHparamColumnRemoved({column:e}))}orderColumns(e){this.store.dispatch(ro.dashboardHparamColumnOrderChanged(e))}addHparamFilter(e){this.store.dispatch(ro.dashboardHparamFilterAdded({name:e.name,filter:e.value}))}loadAllColumns(){this.store.dispatch(ro.loadAllDashboardHparams())}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["runs-table"]],inputs:{columns:"columns",experimentIds:"experimentIds"},decls:10,vars:28,consts:[[3,"headers","data","selectableColumns","numColumnsLoaded","numColumnsToLoad","columnFilters","sortingInfo","experimentIds","regexFilter","loading","sortDataBy","orderColumns","onSelectionToggle","onAllSelectionToggle","onRunColorChange","onRegexFilterChange","onSelectionDblClick","addColumn","removeColumn","addFilter","loadAllColumns"]],template:function(e,i){1&e&&(f(0,"runs-data-table",0),A("sortDataBy",function(o){return i.sortDataBy(o)})("orderColumns",function(o){return i.orderColumns(o)})("onSelectionToggle",function(o){return i.onRunSelectionToggle(o)})("onAllSelectionToggle",function(o){return i.onAllSelectionToggle(o)})("onRunColorChange",function(o){return i.onRunColorChange(o)})("onRegexFilterChange",function(o){return i.onRegexFilterChange(o)})("onSelectionDblClick",function(o){return i.onRunSelectionDblClick(o)})("addColumn",function(o){return i.addColumn(o)})("removeColumn",function(o){return i.removeColumn(o)})("addFilter",function(o){return i.addHparamFilter(o)})("loadAllColumns",function(){return i.loadAllColumns()}),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async"),U(9,"async"),g()),2&e&&b("headers",G(1,10,i.runsColumns$))("data",G(2,12,i.sortedRunsTableData$))("selectableColumns",G(3,14,i.selectableColumns$))("numColumnsLoaded",G(4,16,i.numColumnsLoaded$))("numColumnsToLoad",G(5,18,i.numColumnsToLoad$))("columnFilters",G(6,20,i.columnFilters$))("sortingInfo",G(7,22,i.sortingInfo$))("experimentIds",i.experimentIds)("regexFilter",G(8,24,i.regexFilter$))("loading",G(9,26,i.loading$))},dependencies:[eie,ct],styles:["[_nghost-%COMP%] {\n        display: flex;\n        position: relative;\n      }\n\n      tb-data-table[_ngcontent-%COMP%] {\n        overflow-y: scroll;\n        width: 100%;\n      }"],changeDetection:0}),n})(),nie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["runs-selector-component"]],inputs:{experimentIds:"experimentIds",columns:"columns"},decls:1,vars:2,consts:[[3,"columns","experimentIds"]],template:function(e,i){1&e&&k(0,"runs-table",0),2&e&&b("columns",i.columns)("experimentIds",i.experimentIds)},dependencies:[tie],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n        width: 100%;\n        overflow: auto;\n      }\n\n      runs-table[_ngcontent-%COMP%] {\n        height: 100%;\n      }"],changeDetection:0}),n})(),iie=(()=>{class n{constructor(e){this.store=e,this.experimentIds$=this.store.select(or).pipe(q(i=>i??[])),this.columns$=this.store.select(or).pipe(q(i=>[Zl.CHECKBOX,Zl.RUN_NAME,i&&i.length>1?Zl.EXPERIMENT_NAME:null,Zl.RUN_COLOR].filter(r=>null!==r)))}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["runs-selector"]],decls:3,vars:6,consts:[[3,"experimentIds","columns"]],template:function(e,i){1&e&&(k(0,"runs-selector-component",0),U(1,"async"),U(2,"async")),2&e&&b("experimentIds",G(1,2,i.experimentIds$))("columns",G(2,4,i.columns$))},dependencies:[nie,ct],encapsulation:2,changeDetection:0}),n})();function kHe(n,t){1&n&&k(0,"metrics-main-view",2)}var rie=(()=>{class n{constructor(e){this.store=e,this.runsTableFullScreen$=this.store.select(wS)}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["metrics-dashboard"]],decls:4,vars:3,consts:[["sidebar",""],["main","",4,"ngIf"],["main",""]],template:function(e,i){1&e&&(f(0,"tb-dashboard-layout"),k(1,"runs-selector",0),S(2,kHe,1,0,"metrics-main-view",1),U(3,"async"),g()),2&e&&(v(2),b("ngIf",!G(3,1,i.runsTableFullScreen$)))},dependencies:[Ne,_Q,kne,iie,ct],styles:["[_nghost-%COMP%]{contain:strict;display:flex;flex-direction:column;height:100%;justify-content:stretch;overflow:hidden}.notice[_ngcontent-%COMP%]{background-color:rgba(255,245,157,.85);border-bottom:1px solid #ffeb3b;color:#212121;display:block;flex:0 0}tb-dashboard-layout[_ngcontent-%COMP%]{flex:1 1;overflow:hidden}nav[_ngcontent-%COMP%]{background-color:#fff;border-right:1px solid #ebebeb;flex:none;width:340px}body.dark-mode[_nghost-%COMP%]   nav[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   nav[_ngcontent-%COMP%]{background-color:#303030;border-right-color:#555}metrics-main-view[_ngcontent-%COMP%]{flex:1 1}"],changeDetection:0}),n})(),kV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai,Kn]}),n})(),xA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),OV=(()=>{class n{constructor(){this.changes=new Ee,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,r)=>{if(0==r||0==i)return`0 of ${r}`;let o=e*i;return`${o+1} \u2013 ${o<(r=Math.max(r,0))?Math.min(o+i,r):o+i} of ${r}`}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),FHe={provide:OV,deps:[[new ka,new id,OV]],useFactory:function(n){return n||new OV}},oie=(new te("MAT_PAGINATOR_DEFAULT_OPTIONS"),ao(H1(class{})),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[FHe],imports:[De,Kn,Xa,Xg]}),n})()),kp=(new te("MAT_SORT_DEFAULT_OPTIONS"),H1(ao(class{})),L7.ENTERING+" "+N7.STANDARD_CURVE),FV=(fr("indicator",[Si("active-asc, asc",rn({transform:"translateY(0px)"})),Si("active-desc, desc",rn({transform:"translateY(10px)"})),bi("active-asc <=> active-desc",Mi(kp))]),fr("leftPointer",[Si("active-asc, asc",rn({transform:"rotate(-45deg)"})),Si("active-desc, desc",rn({transform:"rotate(45deg)"})),bi("active-asc <=> active-desc",Mi(kp))]),fr("rightPointer",[Si("active-asc, asc",rn({transform:"rotate(45deg)"})),Si("active-desc, desc",rn({transform:"rotate(-45deg)"})),bi("active-asc <=> active-desc",Mi(kp))]),fr("arrowOpacity",[Si("desc-to-active, asc-to-active, active",rn({opacity:1})),Si("desc-to-hint, asc-to-hint, hint",rn({opacity:.54})),Si("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",rn({opacity:0})),bi("* => asc, * => desc, * => active, * => hint, * => void",Mi("0ms")),bi("* <=> *",Mi(kp))]),fr("arrowPosition",[bi("* => desc-to-hint, * => desc-to-active",Mi(kp,Bb([rn({transform:"translateY(-25%)"}),rn({transform:"translateY(0)"})]))),bi("* => hint-to-desc, * => active-to-desc",Mi(kp,Bb([rn({transform:"translateY(0)"}),rn({transform:"translateY(25%)"})]))),bi("* => asc-to-hint, * => asc-to-active",Mi(kp,Bb([rn({transform:"translateY(25%)"}),rn({transform:"translateY(0)"})]))),bi("* => hint-to-asc, * => active-to-asc",Mi(kp,Bb([rn({transform:"translateY(0)"}),rn({transform:"translateY(-25%)"})]))),Si("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",rn({transform:"translateY(0)"})),Si("hint-to-desc, active-to-desc, desc",rn({transform:"translateY(-25%)"})),Si("hint-to-asc, active-to-asc, asc",rn({transform:"translateY(25%)"}))]),fr("allowChildren",[bi("* <=> *",[rh("@*",ih(),{optional:!0})])]),(()=>{class n{constructor(){this.changes=new Ee}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})()),LHe={provide:FV,deps:[[new ka,new id,FV]],useFactory:function(n){return n||new FV}},aie=(ao(class{}),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[LHe],imports:[De,dn]}),n})());function VV(n){return class extends n{get sticky(){return this._sticky}set sticky(t){let e=this._sticky;this._sticky=vt(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){let t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}}}var HV=new te("CDK_TABLE"),sie=(new te("text-column-options"),VV(class{}),new te("_COALESCED_STYLE_SCHEDULER"),(()=>{class n{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){let i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof lie?e.headerCell.template:this instanceof cie?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(C(oi),C(Tl))},n.\u0275dir=Me({type:n,features:[qt]}),n})()),VHe=VV(class extends sie{}),lie=(()=>{class n extends VHe{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(C(oi),C(Tl),C(HV,8))},n.\u0275dir=Me({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[Xe,qt]}),n})(),HHe=VV(class extends sie{}),cie=(()=>{class n extends HHe{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(C(oi),C(Tl),C(HV,8))},n.\u0275dir=Me({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[Xe,qt]}),n})(),die=(new te("CDK_SPL"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Cd]}),n})()),uie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[dn,die,dn]}),n})(),CA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai,Xg]}),n})(),pie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai,rl,Kn,Gu,Xg]}),n})(),v_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ep,Gu]}),n})(),y_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,pA,ai]}),n})(),MA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,kc,y_,v_]}),n})(),hie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai,Kn]}),n})(),wA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai,Kn,ol,CA,pie,MA,hie]}),n})(),mie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),x_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,mie]}),n})(),fie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Vne,De,wA,x_,y_,Kn,kc,Hu,rl,MA,ai,Qu,qne,oie,ol,aie,uie,v_,Q1,Xa,uE]}),n})(),gie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,fie]}),n})(),C_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),SA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai]}),n})(),_ie=(()=>{class n{constructor(){this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.axisDirection=va.VERTICAL,this.cardFobHelper={getStepHigherThanAxisPosition:this.getStepHigherThanAxisPosition.bind(this),getStepLowerThanAxisPosition:this.getStepLowerThanAxisPosition.bind(this)}}getAxisPositionFromStartStep(){return this.temporalScale(this.timeSelection.start.step)}getAxisPositionFromEndStep(){return null===this.timeSelection.end?null:this.temporalScale(this.timeSelection.end.step)}getHighestStep(){return this.steps[this.steps.length-1]}getLowestStep(){return this.steps[0]}getStepHigherThanAxisPosition(e){let i=0;for(;e>this.temporalScale(this.steps[i])&&i<this.steps.length-1;)i++;return this.steps[i]}getStepLowerThanAxisPosition(e){let i=this.steps.length-1;for(;e<this.temporalScale(this.steps[i])&&i>0;)i--;return this.steps[i]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["histogram-card-fob-controller"]],inputs:{steps:"steps",timeSelection:"timeSelection",temporalScale:"temporalScale"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled"},decls:1,vars:7,consts:[[3,"axisDirection","timeSelection","startStepAxisPosition","endStepAxisPosition","highestStep","lowestStep","cardFobHelper","onTimeSelectionChanged","onTimeSelectionToggled"]],template:function(e,i){1&e&&(f(0,"card-fob-controller",0),A("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(){return i.onTimeSelectionToggled.emit()}),g()),2&e&&b("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("cardFobHelper",i.cardFobHelper)},dependencies:[fA],encapsulation:2,changeDetection:0}),n})(),bie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[SA,De,tp,C_]}),n})();sb(gA,[nn,Ne,Vh,Qg,_ie],[]);var M_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De]}),n})(),EA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,x_]}),n})(),w_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,ai]}),n})(),vie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,bie,Kn,ai,ol,EA,M_,w_]}),n})(),TA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),yie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,TA,Kn,ai,ol,ep,EA,M_,w_]}),n})(),xie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Do,Kn,ai,rl,Qu]}),n})(),DA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Do,xie,tp]}),n})(),Cie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,TA,Gu,Kn,Hu,rl,Xa,KS]}),n})(),Mie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,wA]}),n})(),wie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[SA,De,DA]}),n})(),Sie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Cie,x_,C_,DA,Kn,ai,Qu,ol,tp,Mie,wie,M_,w_]}),n})(),Eie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,yie,Sie,vie,C_]}),n})(),Tie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Xa]}),n})(),Die=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Kn,Hu]}),n})(),IA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,Tie,Kn,UT,kc,Die,ai,Xa,ep,Mu,v_]}),n})(),Iie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,CA,kc,yE,ai,Kn]}),n})(),Aie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Eie,De,xA,y_,pA,Kn,UT,ai,rl,ol,IA,Iie,Cd]}),n})(),Rie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,xA,kV,Aie,ai,IA,gie]}),n})(),GHe="Max pin limit exceeded. Remove existing pins before adding more. See https://github.com/tensorflow/tensorboard/issues/4242";function WHe(){return[{actionCreator:np,alertFromAction:n=>{let{wasPinned:t,canCreateNewPins:e}=n;return t||e?null:{localizedMessage:GHe}}}]}function qHe(){return W(_d,n=>({scalarSmoothing:n}))}function XHe(){return W(Ch,n=>({ignoreOutliers:n}))}function YHe(){return W(xh,n=>({tooltipSort:String(n)}))}function QHe(){return W(p1,n=>({timeSeriesSettingsPaneOpened:n}))}function ZHe(){return W(Jf,n=>({timeSeriesCardMinWidth:n}))}function KHe(){return W(Cv,n=>({stepSelectorEnabled:n}))}function JHe(){return W(Tu,n=>({rangeSelectionEnabled:n}))}function $He(){return W(Eu,n=>({linkedTimeEnabled:n}))}function e5e(){return W(bd,n=>({savingPinsEnabled:n}))}function t5e(){return W(Mv,n=>({singleSelectionHeaders:n}))}function n5e(){return W(wv,n=>({rangeSelectionHeaders:n}))}var Pie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:SN,useFactory:hQ,deps:[EN]},{provide:EN,useValue:$S}],imports:[De,Nf,Qs,Oc.forPlugin(_v,rie),KS,Rie,wr.forFeature(JS,uQ,SN),CW,Mu,iv,to.forFeature([pQ]),Cc.registerAlertActions(WHe),Ri.defineGlobalSetting(qHe),Ri.defineGlobalSetting(XHe),Ri.defineGlobalSetting(YHe),Ri.defineGlobalSetting(QHe),Ri.defineGlobalSetting(ZHe),Ri.defineGlobalSetting(KHe),Ri.defineGlobalSetting(JHe),Ri.defineGlobalSetting($He),Ri.defineGlobalSetting(t5e),Ri.defineGlobalSetting(n5e),Ri.defineGlobalSetting(e5e)]}),n})(),kie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[iQ,Pie]}),n})(),Xd=(()=>(function(n){n.CUSTOM_ELEMENT="CUSTOM_ELEMENT",n.IFRAME="IFRAME",n.NG_COMPONENT="NG_COMPONENT",n.NONE="NONE"}(Xd||(Xd={})),Xd))(),i5e=["pluginContainer"],r5e=["ngPluginContainer"];function o5e(n,t){1&n&&hi(0)}function a5e(n,t){if(1&n&&(Gt(0),S(1,o5e,1,0,"ng-container",9),Wt()),2&n){let e=w(2),i=st(6);v(1),b("ngTemplateOutlet",e.environmentFailureNotFoundTemplate?e.environmentFailureNotFoundTemplate:i)}}function s5e(n,t){1&n&&hi(0)}function l5e(n,t){if(1&n&&(Gt(0),S(1,s5e,1,0,"ng-container",9),Wt()),2&n){let e=w(2),i=st(6);v(1),b("ngTemplateOutlet",e.environmentFailurePermissionDeniedTemplate?e.environmentFailurePermissionDeniedTemplate:i)}}function c5e(n,t){1&n&&hi(0)}function d5e(n,t){if(1&n&&(Gt(0),S(1,c5e,1,0,"ng-container",9),Wt()),2&n){let e=w(2),i=st(6);v(1),b("ngTemplateOutlet",e.environmentFailureUnknownTemplate?e.environmentFailureUnknownTemplate:i)}}function u5e(n,t){if(1&n&&(Gt(0),f(1,"h3",10),T(2," There\u2019s no dashboard by the name of \u201c"),f(3,"code"),T(4),g(),T(5,"\u201d. "),g(),f(6,"p"),T(7,"You can select a dashboard from the list above."),g(),f(8,"p"),hi(9,11),g(),Wt()),2&n){let e=w(2),i=st(8);v(4),kt(e.activePluginId),v(5),b("ngTemplateOutlet",i)}}function p5e(n,t){if(1&n&&(Gt(0),f(1,"h3",12),T(2," No dashboards are active for the current data set. "),g(),f(3,"p"),T(4,"Probable causes:"),g(),f(5,"ul")(6,"li"),T(7,"You haven\u2019t written any data to your event files."),g(),f(8,"li"),T(9,"TensorBoard can\u2019t find your event files."),g()(),T(10," If you\u2019re new to using TensorBoard, and want to find out how to add data and set up your event files, check out the "),f(11,"a",13),T(12,"README"),g(),T(13," and perhaps the "),f(14,"a",14),T(15,"TensorBoard tutorial"),g(),T(16,". "),f(17,"p"),T(18," If you think TensorBoard is configured properly, please see "),f(19,"a",15),T(20,"the section of the README devoted to missing data problems"),g(),T(21," and consider filing an issue on GitHub. "),g(),f(22,"p"),hi(23,11),g(),Wt()),2&n){w(2);let e=st(8);v(23),b("ngTemplateOutlet",e)}}function h5e(n,t){if(1&n&&(f(0,"div",6)(1,"div",7),S(2,a5e,2,1,"ng-container",8),S(3,l5e,2,1,"ng-container",8),S(4,d5e,2,1,"ng-container",8),S(5,u5e,10,2,"ng-container",8),S(6,p5e,24,1,"ng-container",8),g()()),2&n){let e=w();b("ngSwitch",e.pluginLoadState),v(2),b("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_NOT_FOUND),v(1),b("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_PERMISSION_DENIED),v(1),b("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_UNKNOWN),v(1),b("ngSwitchCase",e.PluginLoadState.UNKNOWN_PLUGIN_ID),v(1),b("ngSwitchCase",e.PluginLoadState.NO_ENABLED_PLUGINS)}}function m5e(n,t){if(1&n&&(f(0,"h3",16),T(1,"Data could not be loaded."),g(),f(2,"p"),T(3,"The TensorBoard server may be down or inaccessible."),g(),f(4,"p"),hi(5,11),g()),2&n){w();let e=st(8);v(5),b("ngTemplateOutlet",e)}}function f5e(n,t){if(1&n&&(f(0,"p",19)(1,"i"),T(2,"Log directory: "),f(3,"span"),T(4),g()()()),2&n){let e=w(2);v(4),kt(e.dataLocation)}}function g5e(n,t){if(1&n&&(f(0,"span",17),T(1),U(2,"date"),g(),S(3,f5e,5,1,"p",18)),2&n){let e=w();v(1),Ve("Last reload: ",Jp(2,2,e.lastUpdated,"medium"),""),v(2),b("ngIf",e.dataLocation)}}var _5e=function(n){return{plugins:!0,"is-first-party-plugin":n}},ul=(()=>(function(n){n[n.ENVIRONMENT_FAILURE_NOT_FOUND=0]="ENVIRONMENT_FAILURE_NOT_FOUND",n[n.ENVIRONMENT_FAILURE_PERMISSION_DENIED=1]="ENVIRONMENT_FAILURE_PERMISSION_DENIED",n[n.ENVIRONMENT_FAILURE_UNKNOWN=2]="ENVIRONMENT_FAILURE_UNKNOWN",n[n.NO_ENABLED_PLUGINS=3]="NO_ENABLED_PLUGINS",n[n.UNKNOWN_PLUGIN_ID=4]="UNKNOWN_PLUGIN_ID",n[n.LOADED=5]="LOADED",n[n.LOADING=6]="LOADING"}(ul||(ul={})),ul))(),Oie=(()=>{class n{constructor(e,i,r){this.componentFactoryResolver=e,this.pluginRegistry=i,this.pluginApiHost=r,this.PluginLoadState=ul,this.LoadingMechanismType=Xd,this.pluginInstances=new Map}ngOnChanges(e){if(!this.isFeatureFlagsLoaded||!this.activeKnownPlugin||this.settingsLoadState===Re.NOT_LOADED||this.settingsLoadState===Re.LOADING)return;let i=Boolean(this.activeKnownPlugin&&!this.pluginInstances.has(this.activeKnownPlugin.id));if(e.activeKnownPlugin||e.isFeatureFlagsLoaded||e.settingsLoadState){let r=e.activeKnownPlugin?.previousValue;if(r&&r.id!==this.activeKnownPlugin.id&&this.hidePlugin(r),i){let o=this.createPlugin(this.activeKnownPlugin);o&&this.pluginInstances.set(this.activeKnownPlugin.id,o)}else this.showPlugin(this.activeKnownPlugin)}(i||e.lastUpdated)&&this.reload(this.activeKnownPlugin,i)}hidePlugin(e){if(!this.pluginInstances.has(e.id))return;let i=this.pluginInstances.get(e.id);Object.assign(i.style,{maxHeight:0,overflow:"hidden",visibility:"hidden",position:"absolute"})}showPlugin(e){if(!this.pluginInstances.has(e.id))return;let i=this.pluginInstances.get(e.id);Object.assign(i.style,{maxHeight:null,overflow:null,visibility:null,position:null})}createPlugin(e){let i=null;switch(e.loading_mechanism.type){case Xd.CUSTOM_ELEMENT:i=document.createElement(e.loading_mechanism.element_name),i.reloadOnReady=!1,i.featureFlags=this.featureFlags,this.pluginsContainer.nativeElement.appendChild(i);break;case Xd.IFRAME:if(!this.pluginApiHost)throw Error(`IFRAME-based plugins not supported: ${e.id}`);i=document.createElement("iframe"),i.setAttribute("src",`data/plugin_entry.html?name=${e.id}`),this.pluginApiHost.registerPluginIframe(i,e.id),this.pluginsContainer.nativeElement.appendChild(i);break;case Xd.NG_COMPONENT:let r=this.pluginRegistry.getComponent(e.id);if(r){let o=this.componentFactoryResolver.resolveComponentFactory(r);i=this.ngPluginContainer.createComponent(o).location.nativeElement}else console.error(`No registered Angular component for plugin: ${e.id}`);break;case Xd.NONE:break;default:console.error("Unexpected plugin")}return i}reload(e,i){if(!i&&e.disable_reload)return;let r=this.pluginInstances.get(e.id);r&&r.reload&&r.reload()}}return n.\u0275fac=function(e){return new(e||n)(C(ho),C(Oc),C(R1,8))},n.\u0275cmp=P({type:n,selectors:[["plugins-component"]],viewQuery:function(e,i){if(1&e&&(Ue(i5e,7,xe),Ue(r5e,7,ei)),2&e){let r;be(r=ve())&&(i.pluginsContainer=r.first),be(r=ve())&&(i.ngPluginContainer=r.first)}},inputs:{activePluginId:"activePluginId",activeKnownPlugin:"activeKnownPlugin",pluginLoadState:"pluginLoadState",dataLocation:"dataLocation",isFeatureFlagsLoaded:"isFeatureFlagsLoaded",settingsLoadState:"settingsLoadState",featureFlags:"featureFlags",lastUpdated:"lastUpdated",environmentFailureNotFoundTemplate:"environmentFailureNotFoundTemplate",environmentFailurePermissionDeniedTemplate:"environmentFailurePermissionDeniedTemplate",environmentFailureUnknownTemplate:"environmentFailureUnknownTemplate"},features:[qt],decls:9,vars:4,consts:[[3,"ngClass"],["pluginContainer",""],["ngPluginContainer",""],["class","warning",3,"ngSwitch",4,"ngIf"],["environmentFailureDefaultTemplate",""],["dateAndDataLocation",""],[1,"warning",3,"ngSwitch"],[1,"warning-message"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],[1,"unknown-plugin"],[3,"ngTemplateOutlet"],[1,"no-active-plugin"],["href","https://github.com/tensorflow/tensorboard/blob/master/README.md"],["href","https://www.tensorflow.org/get_started/summaries_and_tensorboard"],["href","https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"],[1,"environment-not-loaded"],[1,"last-reload-time"],["class","data-location",4,"ngIf"],[1,"data-location"]],template:function(e,i){1&e&&(f(0,"div",0,1),hi(2,null,2),g(),S(4,h5e,7,6,"div",3),S(5,m5e,6,1,"ng-template",null,4,jt),S(7,g5e,4,5,"ng-template",null,5,jt)),2&e&&(b("ngClass",Un(2,_5e,(null==i.activeKnownPlugin?null:i.activeKnownPlugin.loading_mechanism.type)!==i.LoadingMechanismType.IFRAME)),v(4),b("ngIf",i.pluginLoadState!==i.PluginLoadState.LOADED&&i.pluginLoadState!==i.PluginLoadState.LOADING))},dependencies:[wn,Ne,eo,mr,kr,wf],styles:["[_nghost-%COMP%]{background-color:#fff;color:#212121;display:block;position:relative}body.dark-mode   [_nghost-%COMP%]   .plugins.is-first-party-plugin[_ngcontent-%COMP%]{background-color:#303030;color:#fff}.plugins[_ngcontent-%COMP%]{height:100%;position:relative}.warning[_ngcontent-%COMP%]{background:#fff;bottom:0;left:0;position:absolute;right:0;top:0}body.dark-mode[_nghost-%COMP%]   .warning[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .warning[_ngcontent-%COMP%]{background:#303030}.warning-message[_ngcontent-%COMP%]{color:#212121;margin:80px auto 0;max-width:540px}body.dark-mode[_nghost-%COMP%]   .warning-message[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .warning-message[_ngcontent-%COMP%]{color:#fff}.last-reload-time[_ngcontent-%COMP%]{font-style:italic}.plugins[_ngcontent-%COMP%]     iframe{border:0;display:block;height:100%;width:100%}"],changeDetection:0}),n})(),b5e=W(Gf,Zo,(n,t)=>t&&n[t]?Object.assign({id:t},n[t]):null),AA=(()=>{class n{constructor(e){this.store=e,this.activeKnownPlugin$=this.store.select(b5e),this.activePluginId$=this.store.select(Zo),this.pluginLoadState$=In(this.activeKnownPlugin$,this.activePluginId$,this.store.select(xS)).pipe(q(([i,r,o])=>null!==o.failureCode?o.failureCode===Ys.NOT_FOUND?ul.ENVIRONMENT_FAILURE_NOT_FOUND:o.failureCode===Ys.PERMISSION_DENIED?ul.ENVIRONMENT_FAILURE_PERMISSION_DENIED:ul.ENVIRONMENT_FAILURE_UNKNOWN:null!==i?ul.LOADED:null===o.lastLoadedTimeInMs&&o.state===Re.LOADING?ul.LOADING:r?ul.UNKNOWN_PLUGIN_ID:ul.NO_ENABLED_PLUGINS)),this.lastLoadedTimeInMs$=this.store.select(jf),this.dataLocation$=this.store.select(CS).pipe(q(i=>i.data_location)),this.isFeatureFlagsLoaded$=this.store.select(bu),this.featureFlags$=this.store.select(Qo),this.settingsLoadState$=this.store.select(Ha.getSettingsLoadState)}}return n.\u0275fac=function(e){return new(e||n)(C(Ie))},n.\u0275cmp=P({type:n,selectors:[["plugins"]],inputs:{environmentFailureNotFoundTemplate:"environmentFailureNotFoundTemplate",environmentFailurePermissionDeniedTemplate:"environmentFailurePermissionDeniedTemplate",environmentFailureUnknownTemplate:"environmentFailureUnknownTemplate"},decls:9,vars:27,consts:[[3,"activeKnownPlugin","activePluginId","dataLocation","lastUpdated","pluginLoadState","isFeatureFlagsLoaded","settingsLoadState","featureFlags","environmentFailureNotFoundTemplate","environmentFailurePermissionDeniedTemplate","environmentFailureUnknownTemplate"]],template:function(e,i){1&e&&(k(0,"plugins-component",0),U(1,"async"),U(2,"async"),U(3,"async"),U(4,"async"),U(5,"async"),U(6,"async"),U(7,"async"),U(8,"async")),2&e&&b("activeKnownPlugin",G(1,11,i.activeKnownPlugin$))("activePluginId",G(2,13,i.activePluginId$))("dataLocation",G(3,15,i.dataLocation$))("lastUpdated",G(4,17,i.lastLoadedTimeInMs$))("pluginLoadState",G(5,19,i.pluginLoadState$))("isFeatureFlagsLoaded",G(6,21,i.isFeatureFlagsLoaded$))("settingsLoadState",G(7,23,i.settingsLoadState$))("featureFlags",G(8,25,i.featureFlags$))("environmentFailureNotFoundTemplate",i.environmentFailureNotFoundTemplate)("environmentFailurePermissionDeniedTemplate",i.environmentFailurePermissionDeniedTemplate)("environmentFailureUnknownTemplate",i.environmentFailureUnknownTemplate)},styles:["plugins-component[_ngcontent-%COMP%] { height: 100%; }"],changeDetection:0}),n})(),RA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[Qs,De,Oc]}),n})();sb(AA,[Oie],[ct]);var Fie=(()=>{class n{constructor(e,i){this.store=e,this.document=i,this.onVisibilityChange=this.onVisibilityChangeImpl.bind(this),this.reloadTimerId=null,this.missedAutoReload=!1,this.ngUnsubscribe=new Ee,this.reloadEnabled$=this.store.pipe(un(Ha.getReloadEnabled)),this.reloadPeriodInMs$=this.store.pipe(un(Ha.getReloadPeriodInMs))}ngOnInit(){this.document.addEventListener("visibilitychange",this.onVisibilityChange),In(this.reloadEnabled$.pipe(ri()),this.reloadPeriodInMs$.pipe(ri())).pipe(it(this.ngUnsubscribe)).subscribe(([e,i])=>{this.cancelLoad(),e&&this.load(i)})}onVisibilityChangeImpl(){"visible"===this.document.visibilityState&&this.missedAutoReload&&(this.missedAutoReload=!1,this.store.dispatch(ma()))}load(e){this.reloadTimerId=setTimeout(()=>{"visible"===this.document.visibilityState?this.store.dispatch(ma()):this.missedAutoReload=!0,this.load(e)},e)}cancelLoad(){null!==this.reloadTimerId&&clearTimeout(this.reloadTimerId),this.reloadTimerId=null}ngOnDestroy(){this.cancelLoad(),this.document.removeEventListener("visibilitychange",this.onVisibilityChange),this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ie),C(Nt))},n.\u0275cmp=P({type:n,selectors:[["reloader"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Nie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=P({type:n,selectors:[["tensorboard-wrapper-component"]],decls:2,vars:0,consts:[[1,"plugins"]],template:function(e,i){1&e&&k(0,"plugins",0)(1,"reloader")},dependencies:[AA,Fie],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }\n\n      .plugins[_ngcontent-%COMP%] {\n        flex: 1 1;\n        overflow: auto;\n        position: relative;\n      }"],changeDetection:0}),n})(),Lie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),zV="smoothing",UV="runColorGroup",jV="tagFilter",GV="runFilter",WV="regex:",qV="regex_by_exp:",PA=class extends Lie{getMetricsPinnedCards(t){return In([t.select(Kf),t.select(PW)]).pipe(q(([e,i])=>{if(!e.length&&!i.length)return[];let o=[...e.map(({plugin:a,tag:s,sample:l,runId:c})=>{let d={plugin:a,tag:s};return gs(a)&&(d.runId=c),fs(a)&&(d.sample=l),d}),...i];return[{key:"pinnedCards",value:JSON.stringify(o)}]}))}serializeStateToQueryParams(t){return In([this.getMetricsPinnedCards(t),t.select(Fl).pipe(q(e=>e?[{key:jV,value:e}]:[])),In([t.select(sv),t.select(fh)]).pipe(q(([e,i])=>function(n,t){return Object.entries(n).map(([e,i])=>{if(void 0===i)return{};let r=t[e];return r&&r.queryParamOverride?{key:r.queryParamOverride,value:i?.toString()}:{}}).filter(({key:e,value:i})=>e&&void 0!==i)}(e,i))),t.select(FW).pipe(q(e=>Number.isFinite(e.scalarSmoothing)?[{key:zV,value:String(e.scalarSmoothing)}]:[])),t.select(t2).pipe(q(e=>{if(!e)return[];let i;switch(e.key){case Yn.EXPERIMENT:i="experiment";break;case Yn.RUN:i="run";break;case Yn.REGEX:i=`${WV}${e.regexString}`;break;case Yn.REGEX_BY_EXP:i=`${qV}${e.regexString}`;break;default:throw new RangeError("Serialization not implemented")}return[{key:UV,value:i}]})),t.select(Au).pipe(q(e=>e?[{key:GV,value:e}]:[]))]).pipe(Vi(t.select(B6)),q(([e,i])=>{let r=new Set(e.flat().map(a=>a.key)),o=Object.entries(i).filter(([a])=>!r.has(a)).map(([a,s])=>({key:a,value:s}));return[...e,...o].flat()}))}deserializeQueryParams(t){let e=null,i=null,r=null,o=null,a=null,s={};for(let{key:l,value:c}of t)switch(l){case"pinnedCards":e=x5e(c);break;case zV:i=Number(c);break;case UV:switch(c){case"experiment":o={key:Yn.EXPERIMENT};break;case"run":o={key:Yn.RUN}}if(c.startsWith(WV)){let d=c.slice(WV.length);o={key:Yn.REGEX,regexString:d}}if(c.startsWith(qV)){let d=c.slice(qV.length);o={key:Yn.REGEX_BY_EXP,regexString:d}}break;case jV:r=c;break;case GV:a=c;break;default:s[l]=c}return{unknownQueryParams:s,metrics:{pinnedCards:e||[],smoothing:i,tagFilter:r},runs:{groupBy:o,regexFilter:a}}}};function x5e(n){let t;try{t=JSON.parse(n)}catch{return null}if(!Array.isArray(t))return null;let e=[];for(let i of t){let o="string"==typeof i.runId,a="number"==typeof i.sample;if(!("string"==typeof i.plugin&&"string"==typeof i.tag&&(o||typeof i.runId>"u")&&(a||typeof i.sample>"u")&&aW(i.plugin)&&i.tag))continue;if(gs(i.plugin)){if(!i.runId)continue}else if(i.runId)continue;if(a&&(!fs(i.plugin)||!Number.isInteger(i.sample)||i.sample<0))continue;let d={plugin:i.plugin,tag:i.tag};o&&(d.runId=i.runId),a&&(d.sample=i.sample),e.push(d)}return e}function Vie(){return[{routeKind:Cn.EXPERIMENT,path:"/",ngComponent:Nie,defaultRoute:!0,deepLinkProvider:new PA}]}function Hie(){return n=>(t,e)=>n(t,e)}PA=V4([Oz()],PA);var zie=new te("Root reducers token",{factory:()=>({})}),Uie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({providers:[{provide:Df,useFactory:Hie,multi:!0}],imports:[wr.forRoot(zie,{runtimeChecks:{strictStateImmutability:!0,strictActionImmutability:!0,strictActionSerializability:!1,strictStateSerializability:!1}}),to.forRoot([])]}),n})(),jie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({}),n})(),Gie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n}),n.\u0275inj=H({imports:[De,RA,jie]}),n})(),XV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=z({type:n,bootstrap:[TX]}),n.\u0275inj=H({imports:[Mu,LX,ww,ZG,Nf,DX,Rl.registerRoutes(Vie),Q1,Y1,IX,Gie,Qs,FX,RX,VX,RS,HX,PX,iv,R1,RA,E1,xE,Uie,kie]}),n})();"loading"!==document.readyState?lO().bootstrapModule(XV):window.addEventListener("DOMContentLoaded",()=>{lO().bootstrapModule(XV)})})();
/** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors.
 * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
 */
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true */
/*global window, navigator, document, importScripts, setTimeout, opera */

var requirejs, require, define;
(function (global, setTimeout) {
    var req, s, head, baseElement, dataMain, src,
        interactiveScript, currentlyAddingScript, mainScript, subPath,
        version = '2.3.7',
        commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
        cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
        jsSuffixRegExp = /\.js$/,
        currDirRegExp = /^\.\//,
        op = Object.prototype,
        ostring = op.toString,
        hasOwn = op.hasOwnProperty,
        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
        //PS3 indicates loaded and complete, but need to wait for complete
        //specifically. Sequence is 'loading', 'loaded', execution,
        // then 'complete'. The UA check is unfortunate, but not sure how
        //to feature test w/o causing perf issues.
        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
                      /^complete$/ : /^(complete|loaded)$/,
        defContextName = '_',
        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
        contexts = {},
        cfg = {},
        globalDefQueue = [],
        useInteractive = false,
        disallowedProps = ['__proto__', 'constructor'];

    //Could match something like ')//comment', do not lose the prefix to comment.
    function commentReplace(match, singlePrefix) {
        return singlePrefix || '';
    }

    function isFunction(it) {
        return ostring.call(it) === '[object Function]';
    }

    function isArray(it) {
        return ostring.call(it) === '[object Array]';
    }

    /**
     * Helper function for iterating over an array. If the func returns
     * a true value, it will break out of the loop.
     */
    function each(ary, func) {
        if (ary) {
            var i;
            for (i = 0; i < ary.length; i += 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    /**
     * Helper function for iterating over an array backwards. If the func
     * returns a true value, it will break out of the loop.
     */
    function eachReverse(ary, func) {
        if (ary) {
            var i;
            for (i = ary.length - 1; i > -1; i -= 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    function hasProp(obj, prop) {
        return hasOwn.call(obj, prop);
    }

    function getOwn(obj, prop) {
        return hasProp(obj, prop) && obj[prop];
    }

    /**
     * Cycles over properties in an object and calls a function for each
     * property value. If the function returns a truthy value, then the
     * iteration is stopped.
     */
    function eachProp(obj, func) {
        var prop;
        for (prop in obj) {
            if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
                if (func(obj[prop], prop)) {
                    break;
                }
            }
        }
    }

    /**
     * Simple function to mix in properties from source into target,
     * but only if target does not already have a property of the same name.
     */
    function mixin(target, source, force, deepStringMixin) {
        if (source) {
            eachProp(source, function (value, prop) {
                if (force || !hasProp(target, prop)) {
                    if (deepStringMixin && typeof value === 'object' && value &&
                        !isArray(value) && !isFunction(value) &&
                        !(value instanceof RegExp)) {

                        if (!target[prop]) {
                            target[prop] = {};
                        }
                        mixin(target[prop], value, force, deepStringMixin);
                    } else {
                        target[prop] = value;
                    }
                }
            });
        }
        return target;
    }

    //Similar to Function.prototype.bind, but the 'this' object is specified
    //first, since it is easier to read/figure out what 'this' will be.
    function bind(obj, fn) {
        return function () {
            return fn.apply(obj, arguments);
        };
    }

    function scripts() {
        return document.getElementsByTagName('script');
    }

    function defaultOnError(err) {
        throw err;
    }

    //Allow getting a global that is expressed in
    //dot notation, like 'a.b.c'.
    function getGlobal(value) {
        if (!value) {
            return value;
        }
        var g = global;
        each(value.split('.'), function (part) {
            g = g[part];
        });
        return g;
    }

    /**
     * Constructs an error with a pointer to an URL with more information.
     * @param {String} id the error ID that maps to an ID on a web page.
     * @param {String} message human readable error.
     * @param {Error} [err] the original error, if there is one.
     *
     * @returns {Error}
     */
    function makeError(id, msg, err, requireModules) {
        var e = new Error(msg + '\nhttps://requirejs.org/docs/errors.html#' + id);
        e.requireType = id;
        e.requireModules = requireModules;
        if (err) {
            e.originalError = err;
        }
        return e;
    }

    if (typeof define !== 'undefined') {
        //If a define is already in play via another AMD loader,
        //do not overwrite.
        return;
    }

    if (typeof requirejs !== 'undefined') {
        if (isFunction(requirejs)) {
            //Do not overwrite an existing requirejs instance.
            return;
        }
        cfg = requirejs;
        requirejs = undefined;
    }

    //Allow for a require config object
    if (typeof require !== 'undefined' && !isFunction(require)) {
        //assume it is a config object.
        cfg = require;
        require = undefined;
    }

    function newContext(contextName) {
        var inCheckLoaded, Module, context, handlers,
            checkLoadedTimeoutId,
            config = {
                //Defaults. Do not set a default for map
                //config to speed up normalize(), which
                //will run faster if there is no default.
                waitSeconds: 7,
                baseUrl: './',
                paths: {},
                bundles: {},
                pkgs: {},
                shim: {},
                config: {}
            },
            registry = {},
            //registry of just enabled modules, to speed
            //cycle breaking code when lots of modules
            //are registered, but not activated.
            enabledRegistry = {},
            undefEvents = {},
            defQueue = [],
            defined = {},
            urlFetched = {},
            bundlesMap = {},
            requireCounter = 1,
            unnormalizedCounter = 1;

        /**
         * Trims the . and .. from an array of path segments.
         * It will keep a leading path segment if a .. will become
         * the first path segment, to help with module name lookups,
         * which act like paths, but can be remapped. But the end result,
         * all paths that use this function should look normalized.
         * NOTE: this method MODIFIES the input array.
         * @param {Array} ary the array of path segments.
         */
        function trimDots(ary) {
            var i, part;
            for (i = 0; i < ary.length; i++) {
                part = ary[i];
                if (part === '.') {
                    ary.splice(i, 1);
                    i -= 1;
                } else if (part === '..') {
                    // If at the start, or previous value is still ..,
                    // keep them so that when converted to a path it may
                    // still work when converted to a path, even though
                    // as an ID it is less than ideal. In larger point
                    // releases, may be better to just kick out an error.
                    if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {
                        continue;
                    } else if (i > 0) {
                        ary.splice(i - 1, 2);
                        i -= 2;
                    }
                }
            }
        }

        /**
         * Given a relative module name, like ./something, normalize it to
         * a real name that can be mapped to a path.
         * @param {String} name the relative name
         * @param {String} baseName a real name that the name arg is relative
         * to.
         * @param {Boolean} applyMap apply the map config to the value. Should
         * only be done if this normalization is for a dependency ID.
         * @returns {String} normalized name
         */
        function normalize(name, baseName, applyMap) {
            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                baseParts = (baseName && baseName.split('/')),
                map = config.map,
                starMap = map && map['*'];

            //Adjust any relative paths.
            if (name) {
                name = name.split('/');
                lastIndex = name.length - 1;

                // If wanting node ID compatibility, strip .js from end
                // of IDs. Have to do this here, and not in nameToUrl
                // because node allows either .js or non .js to map
                // to same file.
                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
                }

                // Starts with a '.' so need the baseName
                if (name[0].charAt(0) === '.' && baseParts) {
                    //Convert baseName to array, and lop off the last part,
                    //so that . matches that 'directory' and not name of the baseName's
                    //module. For instance, baseName of 'one/two/three', maps to
                    //'one/two/three.js', but we want the directory, 'one/two' for
                    //this normalization.
                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
                    name = normalizedBaseParts.concat(name);
                }

                trimDots(name);
                name = name.join('/');
            }

            //Apply map config if available.
            if (applyMap && map && (baseParts || starMap)) {
                nameParts = name.split('/');

                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
                    nameSegment = nameParts.slice(0, i).join('/');

                    if (baseParts) {
                        //Find the longest baseName segment match in the config.
                        //So, do joins on the biggest to smallest lengths of baseParts.
                        for (j = baseParts.length; j > 0; j -= 1) {
                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));

                            //baseName segment has config, find if it has one for
                            //this name.
                            if (mapValue) {
                                mapValue = getOwn(mapValue, nameSegment);
                                if (mapValue) {
                                    //Match, update name to the new value.
                                    foundMap = mapValue;
                                    foundI = i;
                                    break outerLoop;
                                }
                            }
                        }
                    }

                    //Check for a star map match, but just hold on to it,
                    //if there is a shorter segment match later in a matching
                    //config, then favor over this star map.
                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
                        foundStarMap = getOwn(starMap, nameSegment);
                        starI = i;
                    }
                }

                if (!foundMap && foundStarMap) {
                    foundMap = foundStarMap;
                    foundI = starI;
                }

                if (foundMap) {
                    nameParts.splice(0, foundI, foundMap);
                    name = nameParts.join('/');
                }
            }

            // If the name points to a package's name, use
            // the package main instead.
            pkgMain = getOwn(config.pkgs, name);

            return pkgMain ? pkgMain : name;
        }

        function removeScript(name) {
            if (isBrowser) {
                each(scripts(), function (scriptNode) {
                    if (scriptNode.getAttribute('data-requiremodule') === name &&
                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
                        scriptNode.parentNode.removeChild(scriptNode);
                        return true;
                    }
                });
            }
        }

        function hasPathFallback(id) {
            var pathConfig = getOwn(config.paths, id);
            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
                //Pop off the first array value, since it failed, and
                //retry
                pathConfig.shift();
                context.require.undef(id);

                //Custom require that does not do map translation, since
                //ID is "absolute", already mapped/resolved.
                context.makeRequire(null, {
                    skipMap: true
                })([id]);

                return true;
            }
        }

        //Turns a plugin!resource to [plugin, resource]
        //with the plugin being undefined if the name
        //did not have a plugin prefix.
        function splitPrefix(name) {
            var prefix,
                index = name ? name.indexOf('!') : -1;
            if (index > -1) {
                prefix = name.substring(0, index);
                name = name.substring(index + 1, name.length);
            }
            return [prefix, name];
        }

        /**
         * Creates a module mapping that includes plugin prefix, module
         * name, and path. If parentModuleMap is provided it will
         * also normalize the name via require.normalize()
         *
         * @param {String} name the module name
         * @param {String} [parentModuleMap] parent module map
         * for the module name, used to resolve relative names.
         * @param {Boolean} isNormalized: is the ID already normalized.
         * This is true if this call is done for a define() module ID.
         * @param {Boolean} applyMap: apply the map config to the ID.
         * Should only be true if this map is for a dependency.
         *
         * @returns {Object}
         */
        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
            var url, pluginModule, suffix, nameParts,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                originalName = name,
                isDefine = true,
                normalizedName = '';

            //If no name, then it means it is a require call, generate an
            //internal name.
            if (!name) {
                isDefine = false;
                name = '_@r' + (requireCounter += 1);
            }

            nameParts = splitPrefix(name);
            prefix = nameParts[0];
            name = nameParts[1];

            if (prefix) {
                prefix = normalize(prefix, parentName, applyMap);
                pluginModule = getOwn(defined, prefix);
            }

            //Account for relative paths if there is a base name.
            if (name) {
                if (prefix) {
                    if (isNormalized) {
                        normalizedName = name;
                    } else if (pluginModule && pluginModule.normalize) {
                        //Plugin is loaded, use its normalize method.
                        normalizedName = pluginModule.normalize(name, function (name) {
                            return normalize(name, parentName, applyMap);
                        });
                    } else {
                        // If nested plugin references, then do not try to
                        // normalize, as it will not normalize correctly. This
                        // places a restriction on resourceIds, and the longer
                        // term solution is not to normalize until plugins are
                        // loaded and all normalizations to allow for async
                        // loading of a loader plugin. But for now, fixes the
                        // common uses. Details in #1131
                        normalizedName = name.indexOf('!') === -1 ?
                                         normalize(name, parentName, applyMap) :
                                         name;
                    }
                } else {
                    //A regular module.
                    normalizedName = normalize(name, parentName, applyMap);

                    //Normalized name may be a plugin ID due to map config
                    //application in normalize. The map config values must
                    //already be normalized, so do not need to redo that part.
                    nameParts = splitPrefix(normalizedName);
                    prefix = nameParts[0];
                    normalizedName = nameParts[1];
                    isNormalized = true;

                    url = context.nameToUrl(normalizedName);
                }
            }

            //If the id is a plugin id that cannot be determined if it needs
            //normalization, stamp it with a unique ID so two matching relative
            //ids that may conflict can be separate.
            suffix = prefix && !pluginModule && !isNormalized ?
                     '_unnormalized' + (unnormalizedCounter += 1) :
                     '';

            return {
                prefix: prefix,
                name: normalizedName,
                parentMap: parentModuleMap,
                unnormalized: !!suffix,
                url: url,
                originalName: originalName,
                isDefine: isDefine,
                id: (prefix ?
                        prefix + '!' + normalizedName :
                        normalizedName) + suffix
            };
        }

        function getModule(depMap) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (!mod) {
                mod = registry[id] = new context.Module(depMap);
            }

            return mod;
        }

        function on(depMap, name, fn) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (hasProp(defined, id) &&
                    (!mod || mod.defineEmitComplete)) {
                if (name === 'defined') {
                    fn(defined[id]);
                }
            } else {
                mod = getModule(depMap);
                if (mod.error && name === 'error') {
                    fn(mod.error);
                } else {
                    mod.on(name, fn);
                }
            }
        }

        function onError(err, errback) {
            var ids = err.requireModules,
                notified = false;

            if (errback) {
                errback(err);
            } else {
                each(ids, function (id) {
                    var mod = getOwn(registry, id);
                    if (mod) {
                        //Set error on module, so it skips timeout checks.
                        mod.error = err;
                        if (mod.events.error) {
                            notified = true;
                            mod.emit('error', err);
                        }
                    }
                });

                if (!notified) {
                    req.onError(err);
                }
            }
        }

        /**
         * Internal method to transfer globalQueue items to this context's
         * defQueue.
         */
        function takeGlobalQueue() {
            //Push all the globalDefQueue items into the context's defQueue
            if (globalDefQueue.length) {
                each(globalDefQueue, function(queueItem) {
                    var id = queueItem[0];
                    if (typeof id === 'string') {
                        context.defQueueMap[id] = true;
                    }
                    defQueue.push(queueItem);
                });
                globalDefQueue = [];
            }
        }

        handlers = {
            'require': function (mod) {
                if (mod.require) {
                    return mod.require;
                } else {
                    return (mod.require = context.makeRequire(mod.map));
                }
            },
            'exports': function (mod) {
                mod.usingExports = true;
                if (mod.map.isDefine) {
                    if (mod.exports) {
                        return (defined[mod.map.id] = mod.exports);
                    } else {
                        return (mod.exports = defined[mod.map.id] = {});
                    }
                }
            },
            'module': function (mod) {
                if (mod.module) {
                    return mod.module;
                } else {
                    return (mod.module = {
                        id: mod.map.id,
                        uri: mod.map.url,
                        config: function () {
                            return getOwn(config.config, mod.map.id) || {};
                        },
                        exports: mod.exports || (mod.exports = {})
                    });
                }
            }
        };

        function cleanRegistry(id) {
            //Clean up machinery used for waiting modules.
            delete registry[id];
            delete enabledRegistry[id];
        }

        function breakCycle(mod, traced, processed) {
            var id = mod.map.id;

            if (mod.error) {
                mod.emit('error', mod.error);
            } else {
                traced[id] = true;
                each(mod.depMaps, function (depMap, i) {
                    var depId = depMap.id,
                        dep = getOwn(registry, depId);

                    //Only force things that have not completed
                    //being defined, so still in the registry,
                    //and only if it has not been matched up
                    //in the module already.
                    if (dep && !mod.depMatched[i] && !processed[depId]) {
                        if (getOwn(traced, depId)) {
                            mod.defineDep(i, defined[depId]);
                            mod.check(); //pass false?
                        } else {
                            breakCycle(dep, traced, processed);
                        }
                    }
                });
                processed[id] = true;
            }
        }

        function checkLoaded() {
            var err, usingPathFallback,
                waitInterval = config.waitSeconds * 1000,
                //It is possible to disable the wait interval by using waitSeconds of 0.
                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                noLoads = [],
                reqCalls = [],
                stillLoading = false,
                needCycleCheck = true;

            //Do not bother if this call was a result of a cycle break.
            if (inCheckLoaded) {
                return;
            }

            inCheckLoaded = true;

            //Figure out the state of all the modules.
            eachProp(enabledRegistry, function (mod) {
                var map = mod.map,
                    modId = map.id;

                //Skip things that are not enabled or in error state.
                if (!mod.enabled) {
                    return;
                }

                if (!map.isDefine) {
                    reqCalls.push(mod);
                }

                if (!mod.error) {
                    //If the module should be executed, and it has not
                    //been inited and time is up, remember it.
                    if (!mod.inited && expired) {
                        if (hasPathFallback(modId)) {
                            usingPathFallback = true;
                            stillLoading = true;
                        } else {
                            noLoads.push(modId);
                            removeScript(modId);
                        }
                    } else if (!mod.inited && mod.fetched && map.isDefine) {
                        stillLoading = true;
                        if (!map.prefix) {
                            //No reason to keep looking for unfinished
                            //loading. If the only stillLoading is a
                            //plugin resource though, keep going,
                            //because it may be that a plugin resource
                            //is waiting on a non-plugin cycle.
                            return (needCycleCheck = false);
                        }
                    }
                }
            });

            if (expired && noLoads.length) {
                //If wait time expired, throw error of unloaded modules.
                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
                err.contextName = context.contextName;
                return onError(err);
            }

            //Not expired, check for a cycle.
            if (needCycleCheck) {
                each(reqCalls, function (mod) {
                    breakCycle(mod, {}, {});
                });
            }

            //If still waiting on loads, and the waiting load is something
            //other than a plugin resource, or there are still outstanding
            //scripts, then just try back later.
            if ((!expired || usingPathFallback) && stillLoading) {
                //Something is still waiting to load. Wait for it, but only
                //if a timeout is not already in effect.
                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
                    checkLoadedTimeoutId = setTimeout(function () {
                        checkLoadedTimeoutId = 0;
                        checkLoaded();
                    }, 50);
                }
            }

            inCheckLoaded = false;
        }

        Module = function (map) {
            this.events = getOwn(undefEvents, map.id) || {};
            this.map = map;
            this.shim = getOwn(config.shim, map.id);
            this.depExports = [];
            this.depMaps = [];
            this.depMatched = [];
            this.pluginMaps = {};
            this.depCount = 0;

            /* this.exports this.factory
               this.depMaps = [],
               this.enabled, this.fetched
            */
        };

        Module.prototype = {
            init: function (depMaps, factory, errback, options) {
                options = options || {};

                //Do not do more inits if already done. Can happen if there
                //are multiple define calls for the same module. That is not
                //a normal, common case, but it is also not unexpected.
                if (this.inited) {
                    return;
                }

                this.factory = factory;

                if (errback) {
                    //Register for errors on this module.
                    this.on('error', errback);
                } else if (this.events.error) {
                    //If no errback already, but there are error listeners
                    //on this module, set up an errback to pass to the deps.
                    errback = bind(this, function (err) {
                        this.emit('error', err);
                    });
                }

                //Do a copy of the dependency array, so that
                //source inputs are not modified. For example
                //"shim" deps are passed in here directly, and
                //doing a direct modification of the depMaps array
                //would affect that config.
                this.depMaps = depMaps && depMaps.slice(0);

                this.errback = errback;

                //Indicate this module has be initialized
                this.inited = true;

                this.ignore = options.ignore;

                //Could have option to init this module in enabled mode,
                //or could have been previously marked as enabled. However,
                //the dependencies are not known until init is called. So
                //if enabled previously, now trigger dependencies as enabled.
                if (options.enabled || this.enabled) {
                    //Enable this module and dependencies.
                    //Will call this.check()
                    this.enable();
                } else {
                    this.check();
                }
            },

            defineDep: function (i, depExports) {
                //Because of cycles, defined callback for a given
                //export can be called more than once.
                if (!this.depMatched[i]) {
                    this.depMatched[i] = true;
                    this.depCount -= 1;
                    this.depExports[i] = depExports;
                }
            },

            fetch: function () {
                if (this.fetched) {
                    return;
                }
                this.fetched = true;

                context.startTime = (new Date()).getTime();

                var map = this.map;

                //If the manager is for a plugin managed resource,
                //ask the plugin to load it now.
                if (this.shim) {
                    context.makeRequire(this.map, {
                        enableBuildCallback: true
                    })(this.shim.deps || [], bind(this, function () {
                        return map.prefix ? this.callPlugin() : this.load();
                    }));
                } else {
                    //Regular dependency.
                    return map.prefix ? this.callPlugin() : this.load();
                }
            },

            load: function () {
                var url = this.map.url;

                //Regular dependency.
                if (!urlFetched[url]) {
                    urlFetched[url] = true;
                    context.load(this.map.id, url);
                }
            },

            /**
             * Checks if the module is ready to define itself, and if so,
             * define it.
             */
            check: function () {
                if (!this.enabled || this.enabling) {
                    return;
                }

                var err, cjsModule,
                    id = this.map.id,
                    depExports = this.depExports,
                    exports = this.exports,
                    factory = this.factory;

                if (!this.inited) {
                    // Only fetch if not already in the defQueue.
                    if (!hasProp(context.defQueueMap, id)) {
                        this.fetch();
                    }
                } else if (this.error) {
                    this.emit('error', this.error);
                } else if (!this.defining) {
                    //The factory could trigger another require call
                    //that would result in checking this module to
                    //define itself again. If already in the process
                    //of doing that, skip this work.
                    this.defining = true;

                    if (this.depCount < 1 && !this.defined) {
                        if (isFunction(factory)) {
                            //If there is an error listener, favor passing
                            //to that instead of throwing an error. However,
                            //only do it for define()'d  modules. require
                            //errbacks should not be called for failures in
                            //their callbacks (#699). However if a global
                            //onError is set, use that.
                            if ((this.events.error && this.map.isDefine) ||
                                req.onError !== defaultOnError) {
                                try {
                                    exports = context.execCb(id, factory, depExports, exports);
                                } catch (e) {
                                    err = e;
                                }
                            } else {
                                exports = context.execCb(id, factory, depExports, exports);
                            }

                            // Favor return value over exports. If node/cjs in play,
                            // then will not have a return value anyway. Favor
                            // module.exports assignment over exports object.
                            if (this.map.isDefine && exports === undefined) {
                                cjsModule = this.module;
                                if (cjsModule) {
                                    exports = cjsModule.exports;
                                } else if (this.usingExports) {
                                    //exports already set the defined value.
                                    exports = this.exports;
                                }
                            }

                            if (err) {
                                err.requireMap = this.map;
                                err.requireModules = this.map.isDefine ? [this.map.id] : null;
                                err.requireType = this.map.isDefine ? 'define' : 'require';
                                return onError((this.error = err));
                            }

                        } else {
                            //Just a literal value
                            exports = factory;
                        }

                        this.exports = exports;

                        if (this.map.isDefine && !this.ignore) {
                            defined[id] = exports;

                            if (req.onResourceLoad) {
                                var resLoadMaps = [];
                                each(this.depMaps, function (depMap) {
                                    resLoadMaps.push(depMap.normalizedMap || depMap);
                                });
                                req.onResourceLoad(context, this.map, resLoadMaps);
                            }
                        }

                        //Clean up
                        cleanRegistry(id);

                        this.defined = true;
                    }

                    //Finished the define stage. Allow calling check again
                    //to allow define notifications below in the case of a
                    //cycle.
                    this.defining = false;

                    if (this.defined && !this.defineEmitted) {
                        this.defineEmitted = true;
                        this.emit('defined', this.exports);
                        this.defineEmitComplete = true;
                    }

                }
            },

            callPlugin: function () {
                var map = this.map,
                    id = map.id,
                    //Map already normalized the prefix.
                    pluginMap = makeModuleMap(map.prefix);

                //Mark this as a dependency for this plugin, so it
                //can be traced for cycles.
                this.depMaps.push(pluginMap);

                on(pluginMap, 'defined', bind(this, function (plugin) {
                    var load, normalizedMap, normalizedMod,
                        bundleId = getOwn(bundlesMap, this.map.id),
                        name = this.map.name,
                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
                        localRequire = context.makeRequire(map.parentMap, {
                            enableBuildCallback: true
                        });

                    //If current map is not normalized, wait for that
                    //normalized name to load instead of continuing.
                    if (this.map.unnormalized) {
                        //Normalize the ID if the plugin allows it.
                        if (plugin.normalize) {
                            name = plugin.normalize(name, function (name) {
                                return normalize(name, parentName, true);
                            }) || '';
                        }

                        //prefix and name should already be normalized, no need
                        //for applying map config again either.
                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
                                                      this.map.parentMap,
                                                      true);
                        on(normalizedMap,
                            'defined', bind(this, function (value) {
                                this.map.normalizedMap = normalizedMap;
                                this.init([], function () { return value; }, null, {
                                    enabled: true,
                                    ignore: true
                                });
                            }));

                        normalizedMod = getOwn(registry, normalizedMap.id);
                        if (normalizedMod) {
                            //Mark this as a dependency for this plugin, so it
                            //can be traced for cycles.
                            this.depMaps.push(normalizedMap);

                            if (this.events.error) {
                                normalizedMod.on('error', bind(this, function (err) {
                                    this.emit('error', err);
                                }));
                            }
                            normalizedMod.enable();
                        }

                        return;
                    }

                    //If a paths config, then just load that file instead to
                    //resolve the plugin, as it is built into that paths layer.
                    if (bundleId) {
                        this.map.url = context.nameToUrl(bundleId);
                        this.load();
                        return;
                    }

                    load = bind(this, function (value) {
                        this.init([], function () { return value; }, null, {
                            enabled: true
                        });
                    });

                    load.error = bind(this, function (err) {
                        this.inited = true;
                        this.error = err;
                        err.requireModules = [id];

                        //Remove temp unnormalized modules for this module,
                        //since they will never be resolved otherwise now.
                        eachProp(registry, function (mod) {
                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
                                cleanRegistry(mod.map.id);
                            }
                        });

                        onError(err);
                    });

                    //Allow plugins to load other code without having to know the
                    //context or how to 'complete' the load.
                    load.fromText = bind(this, function (text, textAlt) {
                        /*jslint evil: true */
                        var moduleName = map.name,
                            moduleMap = makeModuleMap(moduleName),
                            hasInteractive = useInteractive;

                        //As of 2.1.0, support just passing the text, to reinforce
                        //fromText only being called once per resource. Still
                        //support old style of passing moduleName but discard
                        //that moduleName in favor of the internal ref.
                        if (textAlt) {
                            text = textAlt;
                        }

                        //Turn off interactive script matching for IE for any define
                        //calls in the text, then turn it back on at the end.
                        if (hasInteractive) {
                            useInteractive = false;
                        }

                        //Prime the system by creating a module instance for
                        //it.
                        getModule(moduleMap);

                        //Transfer any config to this other module.
                        if (hasProp(config.config, id)) {
                            config.config[moduleName] = config.config[id];
                        }

                        try {
                            req.exec(text);
                        } catch (e) {
                            return onError(makeError('fromtexteval',
                                             'fromText eval for ' + id +
                                            ' failed: ' + e,
                                             e,
                                             [id]));
                        }

                        if (hasInteractive) {
                            useInteractive = true;
                        }

                        //Mark this as a dependency for the plugin
                        //resource
                        this.depMaps.push(moduleMap);

                        //Support anonymous modules.
                        context.completeLoad(moduleName);

                        //Bind the value of that module to the value for this
                        //resource ID.
                        localRequire([moduleName], load);
                    });

                    //Use parentName here since the plugin's name is not reliable,
                    //could be some weird string with no path that actually wants to
                    //reference the parentName's path.
                    plugin.load(map.name, localRequire, load, config);
                }));

                context.enable(pluginMap, this);
                this.pluginMaps[pluginMap.id] = pluginMap;
            },

            enable: function () {
                enabledRegistry[this.map.id] = this;
                this.enabled = true;

                //Set flag mentioning that the module is enabling,
                //so that immediate calls to the defined callbacks
                //for dependencies do not trigger inadvertent load
                //with the depCount still being zero.
                this.enabling = true;

                //Enable each dependency
                each(this.depMaps, bind(this, function (depMap, i) {
                    var id, mod, handler;

                    if (typeof depMap === 'string') {
                        //Dependency needs to be converted to a depMap
                        //and wired up to this module.
                        depMap = makeModuleMap(depMap,
                                               (this.map.isDefine ? this.map : this.map.parentMap),
                                               false,
                                               !this.skipMap);
                        this.depMaps[i] = depMap;

                        handler = getOwn(handlers, depMap.id);

                        if (handler) {
                            this.depExports[i] = handler(this);
                            return;
                        }

                        this.depCount += 1;

                        on(depMap, 'defined', bind(this, function (depExports) {
                            if (this.undefed) {
                                return;
                            }
                            this.defineDep(i, depExports);
                            this.check();
                        }));

                        if (this.errback) {
                            on(depMap, 'error', bind(this, this.errback));
                        } else if (this.events.error) {
                            // No direct errback on this module, but something
                            // else is listening for errors, so be sure to
                            // propagate the error correctly.
                            on(depMap, 'error', bind(this, function(err) {
                                this.emit('error', err);
                            }));
                        }
                    }

                    id = depMap.id;
                    mod = registry[id];

                    //Skip special modules like 'require', 'exports', 'module'
                    //Also, don't call enable if it is already enabled,
                    //important in circular dependency cases.
                    if (!hasProp(handlers, id) && mod && !mod.enabled) {
                        context.enable(depMap, this);
                    }
                }));

                //Enable each plugin that is used in
                //a dependency
                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
                    var mod = getOwn(registry, pluginMap.id);
                    if (mod && !mod.enabled) {
                        context.enable(pluginMap, this);
                    }
                }));

                this.enabling = false;

                this.check();
            },

            on: function (name, cb) {
                var cbs = this.events[name];
                if (!cbs) {
                    cbs = this.events[name] = [];
                }
                cbs.push(cb);
            },

            emit: function (name, evt) {
                each(this.events[name], function (cb) {
                    cb(evt);
                });
                if (name === 'error') {
                    //Now that the error handler was triggered, remove
                    //the listeners, since this broken Module instance
                    //can stay around for a while in the registry.
                    delete this.events[name];
                }
            }
        };

        function callGetModule(args) {
            //Skip modules already defined.
            if (!hasProp(defined, args[0])) {
                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
            }
        }

        function removeListener(node, func, name, ieName) {
            //Favor detachEvent because of IE9
            //issue, see attachEvent/addEventListener comment elsewhere
            //in this file.
            if (node.detachEvent && !isOpera) {
                //Probably IE. If not it will throw an error, which will be
                //useful to know.
                if (ieName) {
                    node.detachEvent(ieName, func);
                }
            } else {
                node.removeEventListener(name, func, false);
            }
        }

        /**
         * Given an event from a script node, get the requirejs info from it,
         * and then removes the event listeners on the node.
         * @param {Event} evt
         * @returns {Object}
         */
        function getScriptData(evt) {
            //Using currentTarget instead of target for Firefox 2.0's sake. Not
            //all old browsers will be supported, but this one was easy enough
            //to support and still makes sense.
            var node = evt.currentTarget || evt.srcElement;

            //Remove the listeners once here.
            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
            removeListener(node, context.onScriptError, 'error');

            return {
                node: node,
                id: node && node.getAttribute('data-requiremodule')
            };
        }

        function intakeDefines() {
            var args;

            //Any defined modules in the global queue, intake them now.
            takeGlobalQueue();

            //Make sure any remaining defQueue items get properly processed.
            while (defQueue.length) {
                args = defQueue.shift();
                if (args[0] === null) {
                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +
                        args[args.length - 1]));
                } else {
                    //args are id, deps, factory. Should be normalized by the
                    //define() function.
                    callGetModule(args);
                }
            }
            context.defQueueMap = {};
        }

        context = {
            config: config,
            contextName: contextName,
            registry: registry,
            defined: defined,
            urlFetched: urlFetched,
            defQueue: defQueue,
            defQueueMap: {},
            Module: Module,
            makeModuleMap: makeModuleMap,
            nextTick: req.nextTick,
            onError: onError,

            /**
             * Set a configuration for the context.
             * @param {Object} cfg config object to integrate.
             */
            configure: function (cfg) {
                //Make sure the baseUrl ends in a slash.
                if (cfg.baseUrl) {
                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                        cfg.baseUrl += '/';
                    }
                }

                // Convert old style urlArgs string to a function.
                if (typeof cfg.urlArgs === 'string') {
                    var urlArgs = cfg.urlArgs;
                    cfg.urlArgs = function(id, url) {
                        return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs;
                    };
                }

                //Save off the paths since they require special processing,
                //they are additive.
                var shim = config.shim,
                    objs = {
                        paths: true,
                        bundles: true,
                        config: true,
                        map: true
                    };

                eachProp(cfg, function (value, prop) {
                    if (objs[prop]) {
                        if (!config[prop]) {
                            config[prop] = {};
                        }
                        mixin(config[prop], value, true, true);
                    } else {
                        config[prop] = value;
                    }
                });

                //Reverse map the bundles
                if (cfg.bundles) {
                    eachProp(cfg.bundles, function (value, prop) {
                        each(value, function (v) {
                            if (v !== prop) {
                                bundlesMap[v] = prop;
                            }
                        });
                    });
                }

                //Merge shim
                if (cfg.shim) {
                    eachProp(cfg.shim, function (value, id) {
                        //Normalize the structure
                        if (isArray(value)) {
                            value = {
                                deps: value
                            };
                        }
                        if ((value.exports || value.init) && !value.exportsFn) {
                            value.exportsFn = context.makeShimExports(value);
                        }
                        shim[id] = value;
                    });
                    config.shim = shim;
                }

                //Adjust packages if necessary.
                if (cfg.packages) {
                    each(cfg.packages, function (pkgObj) {
                        var location, name;

                        pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;

                        name = pkgObj.name;
                        location = pkgObj.location;
                        if (location) {
                            config.paths[name] = pkgObj.location;
                        }

                        //Save pointer to main module ID for pkg name.
                        //Remove leading dot in main, so main paths are normalized,
                        //and remove any trailing .js, since different package
                        //envs have different conventions: some use a module name,
                        //some use a file name.
                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
                                     .replace(currDirRegExp, '')
                                     .replace(jsSuffixRegExp, '');
                    });
                }

                //If there are any "waiting to execute" modules in the registry,
                //update the maps for them, since their info, like URLs to load,
                //may have changed.
                eachProp(registry, function (mod, id) {
                    //If module already has init called, since it is too
                    //late to modify them, and ignore unnormalized ones
                    //since they are transient.
                    if (!mod.inited && !mod.map.unnormalized) {
                        mod.map = makeModuleMap(id, null, true);
                    }
                });

                //If a deps array or a config callback is specified, then call
                //require with those args. This is useful when require is defined as a
                //config object before require.js is loaded.
                if (cfg.deps || cfg.callback) {
                    context.require(cfg.deps || [], cfg.callback);
                }
            },

            makeShimExports: function (value) {
                function fn() {
                    var ret;
                    if (value.init) {
                        ret = value.init.apply(global, arguments);
                    }
                    return ret || (value.exports && getGlobal(value.exports));
                }
                return fn;
            },

            makeRequire: function (relMap, options) {
                options = options || {};

                function localRequire(deps, callback, errback) {
                    var id, map, requireMod;

                    if (options.enableBuildCallback && callback && isFunction(callback)) {
                        callback.__requireJsBuild = true;
                    }

                    if (typeof deps === 'string') {
                        if (isFunction(callback)) {
                            //Invalid call
                            return onError(makeError('requireargs', 'Invalid require call'), errback);
                        }

                        //If require|exports|module are requested, get the
                        //value for them from the special handlers. Caveat:
                        //this only works while module is being defined.
                        if (relMap && hasProp(handlers, deps)) {
                            return handlers[deps](registry[relMap.id]);
                        }

                        //Synchronous access to one module. If require.get is
                        //available (as in the Node adapter), prefer that.
                        if (req.get) {
                            return req.get(context, deps, relMap, localRequire);
                        }

                        //Normalize module name, if it contains . or ..
                        map = makeModuleMap(deps, relMap, false, true);
                        id = map.id;

                        if (!hasProp(defined, id)) {
                            return onError(makeError('notloaded', 'Module name "' +
                                        id +
                                        '" has not been loaded yet for context: ' +
                                        contextName +
                                        (relMap ? '' : '. Use require([])')));
                        }
                        return defined[id];
                    }

                    //Grab defines waiting in the global queue.
                    intakeDefines();

                    //Mark all the dependencies as needing to be loaded.
                    context.nextTick(function () {
                        //Some defines could have been added since the
                        //require call, collect them.
                        intakeDefines();

                        requireMod = getModule(makeModuleMap(null, relMap));

                        //Store if map config should be applied to this require
                        //call for dependencies.
                        requireMod.skipMap = options.skipMap;

                        requireMod.init(deps, callback, errback, {
                            enabled: true
                        });

                        checkLoaded();
                    });

                    return localRequire;
                }

                mixin(localRequire, {
                    isBrowser: isBrowser,

                    /**
                     * Converts a module name + .extension into an URL path.
                     * *Requires* the use of a module name. It does not support using
                     * plain URLs like nameToUrl.
                     */
                    toUrl: function (moduleNamePlusExt) {
                        var ext,
                            index = moduleNamePlusExt.lastIndexOf('.'),
                            segment = moduleNamePlusExt.split('/')[0],
                            isRelative = segment === '.' || segment === '..';

                        //Have a file extension alias, and it is not the
                        //dots from a relative path.
                        if (index !== -1 && (!isRelative || index > 1)) {
                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
                        }

                        return context.nameToUrl(normalize(moduleNamePlusExt,
                                                relMap && relMap.id, true), ext,  true);
                    },

                    defined: function (id) {
                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
                    },

                    specified: function (id) {
                        id = makeModuleMap(id, relMap, false, true).id;
                        return hasProp(defined, id) || hasProp(registry, id);
                    }
                });

                //Only allow undef on top level require calls
                if (!relMap) {
                    localRequire.undef = function (id) {
                        //Bind any waiting define() calls to this context,
                        //fix for #408
                        takeGlobalQueue();

                        var map = makeModuleMap(id, relMap, true),
                            mod = getOwn(registry, id);

                        mod.undefed = true;
                        removeScript(id);

                        delete defined[id];
                        delete urlFetched[map.url];
                        delete undefEvents[id];

                        //Clean queued defines too. Go backwards
                        //in array so that the splices do not
                        //mess up the iteration.
                        eachReverse(defQueue, function(args, i) {
                            if (args[0] === id) {
                                defQueue.splice(i, 1);
                            }
                        });
                        delete context.defQueueMap[id];

                        if (mod) {
                            //Hold on to listeners in case the
                            //module will be attempted to be reloaded
                            //using a different config.
                            if (mod.events.defined) {
                                undefEvents[id] = mod.events;
                            }

                            cleanRegistry(id);
                        }
                    };
                }

                return localRequire;
            },

            /**
             * Called to enable a module if it is still in the registry
             * awaiting enablement. A second arg, parent, the parent module,
             * is passed in for context, when this method is overridden by
             * the optimizer. Not shown here to keep code compact.
             */
            enable: function (depMap) {
                var mod = getOwn(registry, depMap.id);
                if (mod) {
                    getModule(depMap).enable();
                }
            },

            /**
             * Internal method used by environment adapters to complete a load event.
             * A load event could be a script load or just a load pass from a synchronous
             * load call.
             * @param {String} moduleName the name of the module to potentially complete.
             */
            completeLoad: function (moduleName) {
                var found, args, mod,
                    shim = getOwn(config.shim, moduleName) || {},
                    shExports = shim.exports;

                takeGlobalQueue();

                while (defQueue.length) {
                    args = defQueue.shift();
                    if (args[0] === null) {
                        args[0] = moduleName;
                        //If already found an anonymous module and bound it
                        //to this name, then this is some other anon module
                        //waiting for its completeLoad to fire.
                        if (found) {
                            break;
                        }
                        found = true;
                    } else if (args[0] === moduleName) {
                        //Found matching define call for this script!
                        found = true;
                    }

                    callGetModule(args);
                }
                context.defQueueMap = {};

                //Do this after the cycle of callGetModule in case the result
                //of those calls/init calls changes the registry.
                mod = getOwn(registry, moduleName);

                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
                        if (hasPathFallback(moduleName)) {
                            return;
                        } else {
                            return onError(makeError('nodefine',
                                             'No define call for ' + moduleName,
                                             null,
                                             [moduleName]));
                        }
                    } else {
                        //A script that does not call define(), so just simulate
                        //the call for it.
                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
                    }
                }

                checkLoaded();
            },

            /**
             * Converts a module name to a file path. Supports cases where
             * moduleName may actually be just an URL.
             * Note that it **does not** call normalize on the moduleName,
             * it is assumed to have already been normalized. This is an
             * internal API, not a public one. Use toUrl for the public API.
             */
            nameToUrl: function (moduleName, ext, skipExt) {
                var paths, syms, i, parentModule, url,
                    parentPath, bundleId,
                    pkgMain = getOwn(config.pkgs, moduleName);

                if (pkgMain) {
                    moduleName = pkgMain;
                }

                bundleId = getOwn(bundlesMap, moduleName);

                if (bundleId) {
                    return context.nameToUrl(bundleId, ext, skipExt);
                }

                //If a colon is in the URL, it indicates a protocol is used and it is just
                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
                //or ends with .js, then assume the user meant to use an url and not a module id.
                //The slash is important for protocol-less URLs as well as full paths.
                if (req.jsExtRegExp.test(moduleName)) {
                    //Just a plain path, not module name lookup, so just return it.
                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
                    //an extension, this method probably needs to be reworked.
                    url = moduleName + (ext || '');
                } else {
                    //A module that needs to be converted to a path.
                    paths = config.paths;

                    syms = moduleName.split('/');
                    //For each module name segment, see if there is a path
                    //registered for it. Start with most specific name
                    //and work up from it.
                    for (i = syms.length; i > 0; i -= 1) {
                        parentModule = syms.slice(0, i).join('/');

                        parentPath = getOwn(paths, parentModule);
                        if (parentPath) {
                            //If an array, it means there are a few choices,
                            //Choose the one that is desired
                            if (isArray(parentPath)) {
                                parentPath = parentPath[0];
                            }
                            syms.splice(0, i, parentPath);
                            break;
                        }
                    }

                    //Join the path parts together, then figure out if baseUrl is needed.
                    url = syms.join('/');
                    url += (ext || (/^data\:|^blob\:|\?/.test(url) || skipExt ? '' : '.js'));
                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
                }

                return config.urlArgs && !/^blob\:/.test(url) ?
                       url + config.urlArgs(moduleName, url) : url;
            },

            //Delegates to req.load. Broken out as a separate function to
            //allow overriding in the optimizer.
            load: function (id, url) {
                req.load(context, id, url);
            },

            /**
             * Executes a module callback function. Broken out as a separate function
             * solely to allow the build system to sequence the files in the built
             * layer in the right sequence.
             *
             * @private
             */
            execCb: function (name, callback, args, exports) {
                return callback.apply(exports, args);
            },

            /**
             * callback for script loads, used to check status of loading.
             *
             * @param {Event} evt the event from the browser for the script
             * that was loaded.
             */
            onScriptLoad: function (evt) {
                //Using currentTarget instead of target for Firefox 2.0's sake. Not
                //all old browsers will be supported, but this one was easy enough
                //to support and still makes sense.
                if (evt.type === 'load' ||
                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
                    //Reset interactive script so a script node is not held onto for
                    //to long.
                    interactiveScript = null;

                    //Pull out the name of the module and the context.
                    var data = getScriptData(evt);
                    context.completeLoad(data.id);
                }
            },

            /**
             * Callback for script errors.
             */
            onScriptError: function (evt) {
                var data = getScriptData(evt);
                if (!hasPathFallback(data.id)) {
                    var parents = [];
                    eachProp(registry, function(value, key) {
                        if (key.indexOf('_@r') !== 0) {
                            each(value.depMaps, function(depMap) {
                                if (depMap.id === data.id) {
                                    parents.push(key);
                                    return true;
                                }
                            });
                        }
                    });
                    return onError(makeError('scripterror', 'Script error for "' + data.id +
                                             (parents.length ?
                                             '", needed by: ' + parents.join(', ') :
                                             '"'), evt, [data.id]));
                }
            }
        };

        context.require = context.makeRequire();
        return context;
    }

    /**
     * Main entry point.
     *
     * If the only argument to require is a string, then the module that
     * is represented by that string is fetched for the appropriate context.
     *
     * If the first argument is an array, then it will be treated as an array
     * of dependency string names to fetch. An optional function callback can
     * be specified to execute when all of those dependencies are available.
     *
     * Make a local req variable to help Caja compliance (it assumes things
     * on a require that are not standardized), and to give a short
     * name for minification/local scope use.
     */
    req = requirejs = function (deps, callback, errback, optional) {

        //Find the right context, use default
        var context, config,
            contextName = defContextName;

        // Determine if have config object in the call.
        if (!isArray(deps) && typeof deps !== 'string') {
            // deps is a config object
            config = deps;
            if (isArray(callback)) {
                // Adjust args if there are dependencies
                deps = callback;
                callback = errback;
                errback = optional;
            } else {
                deps = [];
            }
        }

        if (config && config.context) {
            contextName = config.context;
        }

        context = getOwn(contexts, contextName);
        if (!context) {
            context = contexts[contextName] = req.s.newContext(contextName);
        }

        if (config) {
            context.configure(config);
        }

        return context.require(deps, callback, errback);
    };

    /**
     * Support require.config() to make it easier to cooperate with other
     * AMD loaders on globally agreed names.
     */
    req.config = function (config) {
        return req(config);
    };

    /**
     * Execute something after the current tick
     * of the event loop. Override for other envs
     * that have a better solution than setTimeout.
     * @param  {Function} fn function to execute later.
     */
    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
        setTimeout(fn, 4);
    } : function (fn) { fn(); };

    /**
     * Export require as a global, but only if it does not already exist.
     */
    if (!require) {
        require = req;
    }

    req.version = version;

    //Used to filter out dependencies that are already paths.
    req.jsExtRegExp = /^\/|:|\?|\.js$/;
    req.isBrowser = isBrowser;
    s = req.s = {
        contexts: contexts,
        newContext: newContext
    };

    //Create default context.
    req({});

    //Exports some context-sensitive methods on global require.
    each([
        'toUrl',
        'undef',
        'defined',
        'specified'
    ], function (prop) {
        //Reference from contexts instead of early binding to default context,
        //so that during builds, the latest instance of the default context
        //with its config gets used.
        req[prop] = function () {
            var ctx = contexts[defContextName];
            return ctx.require[prop].apply(ctx, arguments);
        };
    });

    if (isBrowser) {
        head = s.head = document.getElementsByTagName('head')[0];
        //If BASE tag is in play, using appendChild is a problem for IE6.
        //When that browser dies, this can be removed. Details in this jQuery bug:
        //http://dev.jquery.com/ticket/2709
        baseElement = document.getElementsByTagName('base')[0];
        if (baseElement) {
            head = s.head = baseElement.parentNode;
        }
    }

    /**
     * Any errors that require explicitly generates will be passed to this
     * function. Intercept/override it if you want custom error handling.
     * @param {Error} err the error object.
     */
    req.onError = defaultOnError;

    /**
     * Creates the node for the load command. Only used in browser envs.
     */
    req.createNode = function (config, moduleName, url) {
        var node = config.xhtml ?
                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
                document.createElement('script');
        node.type = config.scriptType || 'text/javascript';
        node.charset = 'utf-8';
        node.async = true;
        return node;
    };

    /**
     * Does the request to load a module for the browser case.
     * Make this a separate function to allow other environments
     * to override it.
     *
     * @param {Object} context the require context to find state.
     * @param {String} moduleName the name of the module.
     * @param {Object} url the URL to the module.
     */
    req.load = function (context, moduleName, url) {
        var config = (context && context.config) || {},
            node;
        if (isBrowser) {
            //In the browser so use a script tag
            node = req.createNode(config, moduleName, url);

            node.setAttribute('data-requirecontext', context.contextName);
            node.setAttribute('data-requiremodule', moduleName);

            //Set up load listener. Test attachEvent first because IE9 has
            //a subtle issue in its addEventListener and script onload firings
            //that do not match the behavior of all other browsers with
            //addEventListener support, which fire the onload event for a
            //script right after the script execution. See:
            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
            //script execution mode.
            if (node.attachEvent &&
                    //Check if node.attachEvent is artificially added by custom script or
                    //natively supported by browser
                    //read https://github.com/requirejs/requirejs/issues/187
                    //if we can NOT find [native code] then it must NOT natively supported.
                    //in IE8, node.attachEvent does not have toString()
                    //Note the test for "[native code" with no closing brace, see:
                    //https://github.com/requirejs/requirejs/issues/273
                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
                    !isOpera) {
                //Probably IE. IE (at least 6-8) do not fire
                //script onload right after executing the script, so
                //we cannot tie the anonymous define call to a name.
                //However, IE reports the script as being in 'interactive'
                //readyState at the time of the define call.
                useInteractive = true;

                node.attachEvent('onreadystatechange', context.onScriptLoad);
                //It would be great to add an error handler here to catch
                //404s in IE9+. However, onreadystatechange will fire before
                //the error handler, so that does not help. If addEventListener
                //is used, then IE will fire error before load, but we cannot
                //use that pathway given the connect.microsoft.com issue
                //mentioned above about not doing the 'script execute,
                //then fire the script load event listener before execute
                //next script' that other browsers do.
                //Best hope: IE10 fixes the issues,
                //and then destroys all installs of IE 6-9.
                //node.attachEvent('onerror', context.onScriptError);
            } else {
                node.addEventListener('load', context.onScriptLoad, false);
                node.addEventListener('error', context.onScriptError, false);
            }
            node.src = url;

            //Calling onNodeCreated after all properties on the node have been
            //set, but before it is placed in the DOM.
            if (config.onNodeCreated) {
                config.onNodeCreated(node, config, moduleName, url);
            }

            //For some cache cases in IE 6-8, the script executes before the end
            //of the appendChild execution, so to tie an anonymous define
            //call to the module name (which is stored on the node), hold on
            //to a reference to this node, but clear after the DOM insertion.
            currentlyAddingScript = node;
            if (baseElement) {
                head.insertBefore(node, baseElement);
            } else {
                head.appendChild(node);
            }
            currentlyAddingScript = null;

            return node;
        } else if (isWebWorker) {
            try {
                //In a web worker, use importScripts. This is not a very
                //efficient use of importScripts, importScripts will block until
                //its script is downloaded and evaluated. However, if web workers
                //are in play, the expectation is that a build has been done so
                //that only one script needs to be loaded anyway. This may need
                //to be reevaluated if other use cases become common.

                // Post a task to the event loop to work around a bug in WebKit
                // where the worker gets garbage-collected after calling
                // importScripts(): https://webkit.org/b/153317
                setTimeout(function() {}, 0);
                importScripts(url);

                //Account for anonymous modules
                context.completeLoad(moduleName);
            } catch (e) {
                context.onError(makeError('importscripts',
                                'importScripts failed for ' +
                                    moduleName + ' at ' + url,
                                e,
                                [moduleName]));
            }
        }
    };

    function getInteractiveScript() {
        if (interactiveScript && interactiveScript.readyState === 'interactive') {
            return interactiveScript;
        }

        eachReverse(scripts(), function (script) {
            if (script.readyState === 'interactive') {
                return (interactiveScript = script);
            }
        });
        return interactiveScript;
    }

    //Look for a data-main script attribute, which could also adjust the baseUrl.
    if (isBrowser && !cfg.skipDataMain) {
        //Figure out baseUrl. Get it from the script tag with require.js in it.
        eachReverse(scripts(), function (script) {
            //Set the 'head' where we can append children by
            //using the script's parent.
            if (!head) {
                head = script.parentNode;
            }

            //Look for a data-main attribute to set main script for the page
            //to load. If it is there, the path to data main becomes the
            //baseUrl, if it is not already set.
            dataMain = script.getAttribute('data-main');
            if (dataMain) {
                //Preserve dataMain in case it is a path (i.e. contains '?')
                mainScript = dataMain;

                //Set final baseUrl if there is not already an explicit one,
                //but only do so if the data-main value is not a loader plugin
                //module ID.
                if (!cfg.baseUrl && mainScript.indexOf('!') === -1) {
                    //Pull off the directory of data-main for use as the
                    //baseUrl.
                    src = mainScript.split('/');
                    mainScript = src.pop();
                    subPath = src.length ? src.join('/')  + '/' : './';

                    cfg.baseUrl = subPath;
                }

                //Strip off any trailing .js since mainScript is now
                //like a module name.
                mainScript = mainScript.replace(jsSuffixRegExp, '');

                //If mainScript is still a path, fall back to dataMain
                if (req.jsExtRegExp.test(mainScript)) {
                    mainScript = dataMain;
                }

                //Put the data-main script in the files to load.
                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];

                return true;
            }
        });
    }

    /**
     * The function that handles definitions of modules. Differs from
     * require() in that a string for the module should be the first argument,
     * and the function to execute after dependencies are loaded should
     * return a value to define the module corresponding to the first argument's
     * name.
     */
    define = function (name, deps, callback) {
        var node, context;

        //Allow for anonymous modules
        if (typeof name !== 'string') {
            //Adjust args appropriately
            callback = deps;
            deps = name;
            name = null;
        }

        //This module may not have dependencies
        if (!isArray(deps)) {
            callback = deps;
            deps = null;
        }

        //If no name, and callback is a function, then figure out if it a
        //CommonJS thing with dependencies.
        if (!deps && isFunction(callback)) {
            deps = [];
            //Remove comments from the callback string,
            //look for require calls, and pull them into the dependencies,
            //but only if there are function args.
            if (callback.length) {
                callback
                    .toString()
                    .replace(commentRegExp, commentReplace)
                    .replace(cjsRequireRegExp, function (match, dep) {
                        deps.push(dep);
                    });

                //May be a CommonJS thing even without require calls, but still
                //could use exports, and module. Avoid doing exports and module
                //work though if it just needs require.
                //REQUIRES the function to expect the CommonJS variables in the
                //order listed below.
                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
            }
        }

        //If in IE 6-8 and hit an anonymous define() call, do the interactive
        //work.
        if (useInteractive) {
            node = currentlyAddingScript || getInteractiveScript();
            if (node) {
                if (!name) {
                    name = node.getAttribute('data-requiremodule');
                }
                context = contexts[node.getAttribute('data-requirecontext')];
            }
        }

        //Always save off evaluating the def call until the script onload handler.
        //This allows multiple modules to be in a file without prematurely
        //tracing dependencies, and allows for anonymous module support,
        //where the module name is not known until the script onload event
        //occurs. If no context, use the global queue, and get it processed
        //in the onscript load callback.
        if (context) {
            context.defQueue.push([name, deps, callback]);
            context.defQueueMap[name] = true;
        } else {
            globalDefQueue.push([name, deps, callback]);
        }
    };

    define.amd = {
        jQuery: true
    };

    /**
     * Executes the text. Normally just uses eval, but can be modified
     * to use a better, environment-specific call. Only used for transpiling
     * loader plugins, not for plain JS modules.
     * @param {String} text the text to execute/evaluate.
     */
    req.exec = function (text) {
        /*jslint evil: true */
        return eval(text);
    };

    //Set up with config info.
    req(cfg);
}(this, (typeof setTimeout === 'undefined' ? undefined : setTimeout)));

