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 d1e=Object.create;var BM=Object.defineProperty,m1e=Object.defineProperties,g1e=Object.getOwnPropertyDescriptor,_1e=Object.getOwnPropertyDescriptors,y1e=Object.getOwnPropertyNames,hdt=Object.getOwnPropertySymbols,v1e=Object.getPrototypeOf,pdt=Object.prototype.hasOwnProperty,x1e=Object.prototype.propertyIsEnumerable;var EI=Math.pow,fdt=(e,t,r)=>t in e?BM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kl=(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))x1e.call(t,r)&&fdt(e,r,t[r]);return e},Mx=(e,t)=>m1e(e,_1e(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),Ks=(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 y1e(t))!pdt.call(e,i)&&i!==r&&BM(e,i,{get:()=>t[i],enumerable:!(n=g1e(t,i))||n.enumerable});return e};var Ee=(e,t,r)=>(r=e!=null?d1e(v1e(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 Odt=H((l_r,AI)=>{var mdt,gdt,_dt,ydt,vdt,xdt,bdt,wdt,Sdt,TI,uG,Mdt,Edt,Tdt,Tx,Cdt,Adt,Pdt,Idt,Ldt,kdt,Rdt,Ndt,Ddt,CI;(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 AI=="object"&&typeof AI.exports=="object"?e(r(t,r(AI.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){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},bdt=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())})},wdt=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}}},Sdt=function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&CI(i,n,o)},CI=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]},TI=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.")},uG=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},Mdt=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(uG(arguments[i]));return n},Edt=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},Tdt=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)},Cdt=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])}},Adt=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:s==="return"}:l?l(c):c}:l}},Pdt=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 TI=="function"?TI(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)}},Idt=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};Ldt=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)&&CI(i,n,o);return r(i,n),i},kdt=function(n){return n&&n.__esModule?n:{default:n}},Rdt=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)},Ndt=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},Ddt=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("__metadata",xdt),e("__awaiter",bdt),e("__generator",wdt),e("__exportStar",Sdt),e("__createBinding",CI),e("__values",TI),e("__read",uG),e("__spread",Mdt),e("__spreadArrays",Edt),e("__spreadArray",Tdt),e("__await",Tx),e("__asyncGenerator",Cdt),e("__asyncDelegator",Adt),e("__asyncValues",Pdt),e("__makeTemplateObject",Idt),e("__importStar",Ldt),e("__importDefault",kdt),e("__classPrivateFieldGet",Rdt),e("__classPrivateFieldSet",Ndt),e("__classPrivateFieldIn",Ddt)})});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),Pa=/<%-([\s\S]+?)%>/g,ho=/<%([\s\S]+?)%>/g,Ia=/<%=([\s\S]+?)%>/g,lx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cm=/^\w*$/,J0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/[\\^$.*+?()[\]{}|]/g,cx=RegExp(cn.source),rp=/^\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,np=/^(?:0|[1-9]\d*)$/,um=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=/($^)/,Fl=/['\n\r\u2028\u2029\\]/g,$n="\\ud800-\\udfff",Bl="\\u0300-\\u036f",ux="\\ufe20-\\ufe2f",Hl="\\u20d0-\\u20ff",Vl=Bl+ux+Hl,Yi="\\u2700-\\u27bf",hm="a-z\\xdf-\\xf6\\xf8-\\xff",qs="\\xac\\xb1\\xd7\\xf7",hpe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fpe="\\u2000-\\u206f",ppe=" \\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=qs+hpe+fpe+ppe,tq="['\u2019]",dpe="["+$n+"]",Yht="["+Wht+"]",B6="["+Vl+"]",jht="\\d+",mpe="["+Yi+"]",Xht="["+hm+"]",$ht="[^"+$n+Wht+jht+Yi+hm+qht+"]",eq="\\ud83c[\\udffb-\\udfff]",gpe="(?:"+B6+"|"+eq+")",Kht="[^"+$n+"]",rq="(?:\\ud83c[\\udde6-\\uddff]){2}",nq="[\\ud800-\\udbff][\\udc00-\\udfff]",hx="["+qht+"]",Zht="\\u200d",Jht="(?:"+Xht+"|"+$ht+")",_pe="(?:"+hx+"|"+$ht+")",Qht="(?:"+tq+"(?:d|ll|m|re|s|t|ve))?",tft="(?:"+tq+"(?:D|LL|M|RE|S|T|VE))?",eft=gpe+"?",rft="["+Ght+"]?",ype="(?:"+Zht+"(?:"+[Kht,rq,nq].join("|")+")"+rft+eft+")*",vpe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xpe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nft=rft+eft+ype,bpe="(?:"+[mpe,rq,nq].join("|")+")"+nft,wpe="(?:"+[Kht+B6+"?",B6,rq,nq,dpe].join("|")+")",Spe=RegExp(tq,"g"),Mpe=RegExp(B6,"g"),iq=RegExp(eq+"(?="+eq+")|"+wpe+nft,"g"),Epe=RegExp([hx+"?"+Xht+"+"+Qht+"(?="+[Yht,hx,"$"].join("|")+")",_pe+"+"+tft+"(?="+[Yht,hx+Jht,"$"].join("|")+")",hx+"?"+Jht+"+"+Qht,hx+"+"+tft,xpe,vpe,jht,bpe].join("|"),"g"),Tpe=RegExp("["+Zht+$n+Vl+Ght+"]"),Cpe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ape=["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"],Ppe=-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 Ipe={\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"},Lpe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kpe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Rpe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Npe=parseFloat,Dpe=parseInt,ift=typeof global=="object"&&global&&global.Object===Object&&global,Ope=typeof self=="object"&&self&&self.Object===Object&&self,fo=ift||Ope||Function("return this")(),oq=typeof Rx=="object"&&Rx&&!Rx.nodeType&&Rx,Q0=oq&&typeof $M=="object"&&$M&&!$M.nodeType&&$M,oft=Q0&&Q0.exports===oq,aq=oft&&ift.process,Ul=function(){try{var ut=Q0&&Q0.require&&Q0.require("util").types;return ut||aq&&aq.binding&&aq.binding("util")}catch(At){}}(),aft=Ul&&Ul.isArrayBuffer,sft=Ul&&Ul.isDate,lft=Ul&&Ul.isMap,cft=Ul&&Ul.isRegExp,uft=Ul&&Ul.isSet,hft=Ul&&Ul.isTypedArray;function Gs(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 zpe(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 ql(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge&&At(ut[vt],vt,ut)!==!1;);return ut}function Fpe(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 fm(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 H6(ut,At){var vt=ut==null?0:ut.length;return!!vt&&fx(ut,At,0)>-1}function sq(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 pm(ut,At){for(var vt=-1,ge=At.length,We=ut.length;++vt<ge;)ut[We+vt]=At[vt];return ut}function lq(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 Bpe(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 cq(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 Hpe=uq("length");function Vpe(ut){return ut.split("")}function Upe(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 V6(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 fx(ut,At,vt){return At===At?tde(ut,At,vt):V6(ut,dft,vt)}function qpe(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?fq(ut,At)/vt:Z}function uq(ut){return function(At){return At==null?e:At[ut]}}function hq(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 Gpe(ut,At){var vt=ut.length;for(ut.sort(At);vt--;)ut[vt]=ut[vt].value;return ut}function fq(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 pq(ut,At){for(var vt=-1,ge=Array(ut);++vt<ut;)ge[vt]=At(vt);return ge}function Wpe(ut,At){return Kn(At,function(vt){return[vt,ut[vt]]})}function _ft(ut){return ut&&ut.slice(0,bft(ut)+1).replace(rp,"")}function Ws(ut){return function(At){return ut(At)}}function dq(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&&fx(At,ut[vt],0)>-1;);return vt}function vft(ut,At){for(var vt=ut.length;vt--&&fx(At,ut[vt],0)>-1;);return vt}function Ype(ut,At){for(var vt=ut.length,ge=0;vt--;)ut[vt]===At&&++ge;return ge}var jpe=hq(Ipe),Xpe=hq(Lpe);function $pe(ut){return"\\"+Rpe[ut]}function Kpe(ut,At){return ut==null?e:ut[At]}function px(ut){return Tpe.test(ut)}function Zpe(ut){return Cpe.test(ut)}function Jpe(ut){for(var At,vt=[];!(At=ut.next()).done;)vt.push(At.value);return vt}function mq(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 dm(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 U6(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=ge}),vt}function Qpe(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=[ge,ge]}),vt}function tde(ut,At,vt){for(var ge=vt-1,We=ut.length;++ge<We;)if(ut[ge]===At)return ge;return-1}function ede(ut,At,vt){for(var ge=vt+1;ge--;)if(ut[ge]===At)return ge;return ge}function dx(ut){return px(ut)?nde(ut):Hpe(ut)}function tu(ut){return px(ut)?ide(ut):Vpe(ut)}function bft(ut){for(var At=ut.length;At--&&K.test(ut.charAt(At)););return At}var rde=hq(kpe);function nde(ut){for(var At=iq.lastIndex=0;iq.test(ut);)++At;return At}function ide(ut){return ut.match(iq)||[]}function ode(ut){return ut.match(Epe)||[]}var ade=function ut(At){At=At==null?fo:mm.defaults(fo.Object(),At,mm.pick(fo,Ape));var vt=At.Array,ge=At.Date,We=At.Error,$r=At.Function,ji=At.Math,vn=At.Object,gq=At.RegExp,sde=At.String,Gl=At.TypeError,q6=vt.prototype,lde=$r.prototype,mx=vn.prototype,G6=At["__core-js_shared__"],W6=lde.toString,un=mx.hasOwnProperty,cde=0,wft=function(){var m=/[^.]+$/.exec(G6&&G6.keys&&G6.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),Y6=mx.toString,ude=W6.call(vn),hde=fo._,fde=gq("^"+W6.call(un).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j6=oft?At.Buffer:e,gm=At.Symbol,X6=At.Uint8Array,Sft=j6?j6.allocUnsafe:e,$6=xft(vn.getPrototypeOf,vn),Mft=vn.create,Eft=mx.propertyIsEnumerable,K6=q6.splice,Tft=gm?gm.isConcatSpreadable:e,EM=gm?gm.iterator:e,t_=gm?gm.toStringTag:e,Z6=function(){try{var m=o_(vn,"defineProperty");return m({},"",{}),m}catch(v){}}(),pde=At.clearTimeout!==fo.clearTimeout&&At.clearTimeout,dde=ge&&ge.now!==fo.Date.now&&ge.now,mde=At.setTimeout!==fo.setTimeout&&At.setTimeout,J6=ji.ceil,Q6=ji.floor,_q=vn.getOwnPropertySymbols,gde=j6?j6.isBuffer:e,Cft=At.isFinite,_de=q6.join,yde=xft(vn.keys,vn),Xi=ji.max,ra=ji.min,vde=ge.now,xde=At.parseInt,Aft=ji.random,bde=q6.reverse,yq=o_(At,"DataView"),TM=o_(At,"Map"),vq=o_(At,"Promise"),gx=o_(At,"Set"),CM=o_(At,"WeakMap"),AM=o_(vn,"create"),tI=CM&&new CM,_x={},wde=a_(yq),Sde=a_(TM),Mde=a_(vq),Ede=a_(gx),Tde=a_(CM),eI=gm?gm.prototype:e,PM=eI?eI.valueOf:e,Pft=eI?eI.toString:e;function G(m){if(li(m)&&!$e(m)&&!(m instanceof gr)){if(m instanceof Wl)return m;if(un.call(m,"__wrapped__"))return Ipt(m)}return new Wl(m)}var yx=function(){function m(){}return function(v){if(!ri(v))return{};if(Mft)return Mft(v);m.prototype=v;var T=new m;return m.prototype=e,T}}();function rI(){}function Wl(m,v){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}G.templateSettings={escape:Pa,evaluate:ho,interpolate:Ia,variable:"",imports:{_:G}},G.prototype=rI.prototype,G.prototype.constructor=G,Wl.prototype=yx(rI.prototype),Wl.prototype.constructor=Wl;function gr(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=rt,this.__views__=[]}function Cde(){var m=new gr(this.__wrapped__);return m.__actions__=ps(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=ps(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=ps(this.__views__),m}function Ade(){if(this.__filtered__){var m=new gr(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function Pde(){var m=this.__wrapped__.value(),v=this.__dir__,T=$e(m),N=v<0,V=T?m.length:0,Y=Vme(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,Xs=pr.type,Ra=yr(De);if(Xs==R)De=Ra;else if(!Ra){if(Xs==L)continue t;break t}}Ne[oe++]=De}return Ne}gr.prototype=yx(rI.prototype),gr.prototype.constructor=gr;function e_(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 Ide(){this.__data__=AM?AM(null):{},this.size=0}function Lde(m){var v=this.has(m)&&delete this.__data__[m];return this.size-=v?1:0,v}function kde(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 Rde(m){var v=this.__data__;return AM?v[m]!==e:un.call(v,m)}function Nde(m,v){var T=this.__data__;return this.size+=this.has(m)?0:1,T[m]=AM&&v===e?a:v,this}e_.prototype.clear=Ide,e_.prototype.delete=Lde,e_.prototype.get=kde,e_.prototype.has=Rde,e_.prototype.set=Nde;function ip(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__=[],this.size=0}function Ode(m){var v=this.__data__,T=nI(v,m);if(T<0)return!1;var N=v.length-1;return T==N?v.pop():K6.call(v,T,1),--this.size,!0}function zde(m){var v=this.__data__,T=nI(v,m);return T<0?e:v[T][1]}function Fde(m){return nI(this.__data__,m)>-1}function Bde(m,v){var T=this.__data__,N=nI(T,m);return N<0?(++this.size,T.push([m,v])):T[N][1]=v,this}ip.prototype.clear=Dde,ip.prototype.delete=Ode,ip.prototype.get=zde,ip.prototype.has=Fde,ip.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.size=0,this.__data__={hash:new e_,map:new(TM||ip),string:new e_}}function Vde(m){var v=mI(this,m).delete(m);return this.size-=v?1:0,v}function Ude(m){return mI(this,m).get(m)}function qde(m){return mI(this,m).has(m)}function Gde(m,v){var T=mI(this,m),N=T.size;return T.set(m,v),this.size+=T.size==N?0:1,this}op.prototype.clear=Hde,op.prototype.delete=Vde,op.prototype.get=Ude,op.prototype.has=qde,op.prototype.set=Gde;function r_(m){var v=-1,T=m==null?0:m.length;for(this.__data__=new op;++v<T;)this.add(m[v])}function Wde(m){return this.__data__.set(m,a),this}function Yde(m){return this.__data__.has(m)}r_.prototype.add=r_.prototype.push=Wde,r_.prototype.has=Yde;function eu(m){var v=this.__data__=new ip(m);this.size=v.size}function jde(){this.__data__=new ip,this.size=0}function Xde(m){var v=this.__data__,T=v.delete(m);return this.size=v.size,T}function $de(m){return this.__data__.get(m)}function Kde(m){return this.__data__.has(m)}function Zde(m,v){var T=this.__data__;if(T instanceof ip){var N=T.__data__;if(!TM||N.length<r-1)return N.push([m,v]),this.size=++T.size,this;T=this.__data__=new op(N)}return T.set(m,v),this.size=T.size,this}eu.prototype.clear=jde,eu.prototype.delete=Xde,eu.prototype.get=$de,eu.prototype.has=Kde,eu.prototype.set=Zde;function Ift(m,v){var T=$e(m),N=!T&&s_(m),V=!T&&!N&&bm(m),Y=!T&&!N&&!V&&wx(m),J=T||N||V||Y,it=J?pq(m.length,sde):[],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")||cp(Dt,ft)))&&it.push(Dt);return it}function Lft(m){var v=m.length;return v?m[Iq(0,v-1)]:e}function Jde(m,v){return gI(ps(m),n_(v,0,m.length))}function Qde(m){return gI(ps(m))}function xq(m,v,T){(T!==e&&!ru(m[v],T)||T===e&&!(v in m))&&ap(m,v,T)}function IM(m,v,T){var N=m[v];(!(un.call(m,v)&&ru(N,T))||T===e&&!(v in m))&&ap(m,v,T)}function nI(m,v){for(var T=m.length;T--;)if(ru(m[T][0],v))return T;return-1}function tme(m,v,T,N){return _m(m,function(V,Y,J){v(N,V,T(V),J)}),N}function kft(m,v){return m&&gh(v,po(v),m)}function eme(m,v){return m&&gh(v,ms(v),m)}function ap(m,v,T){v=="__proto__"&&Z6?Z6(m,v,{configurable:!0,enumerable:!0,value:T,writable:!0}):m[v]=T}function bq(m,v){for(var T=-1,N=v.length,V=vt(N),Y=m==null;++T<N;)V[T]=Y?e:eG(m,v[T]);return V}function n_(m,v,T){return m===m&&(T!==e&&(m=m<=T?m:T),v!==e&&(m=m>=v?m:v)),m}function Yl(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(!ri(m))return m;var Ot=$e(m);if(Ot){if(J=qme(m),!it)return ps(m,J)}else{var Vt=na(m),oe=Vt==et||Vt==dt;if(bm(m))return rpt(m,it);if(Vt==wt||Vt==bt||oe&&!V){if(J=ft||oe?{}:bpt(m),!it)return ft?kme(m,eme(J,m)):Lme(m,kft(J,m))}else{if(!Tn[Vt])return V?m:{};J=Gme(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(Yl(De,v,T,De,m,Y))}):Xpt(m)&&m.forEach(function(De,pr){J.set(pr,Yl(De,v,T,pr,m,Y))});var Ne=Dt?ft?Vq:Hq:ft?ms:po,er=Ot?e:Ne(m);return ql(er||m,function(De,pr){er&&(pr=De,De=m[pr]),IM(J,pr,Yl(De,v,T,pr,m,Y))}),J}function rme(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 Gl(i);return zM(function(){m.apply(e,T)},v)}function LM(m,v,T,N){var V=-1,Y=H6,J=!0,it=m.length,ft=[],Dt=v.length;if(!it)return ft;T&&(v=Kn(v,Ws(T))),N?(Y=sq,J=!1):v.length>=r&&(Y=MM,J=!1,v=new r_(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 _m=spt(mh),Dft=spt(Sq,!0);function nme(m,v){var T=!0;return _m(m,function(N,V,Y){return T=!!v(N,V,Y),T}),T}function iI(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&&!js(J):T(J,it)))var it=J,ft=Y}return ft}function ime(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 _m(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=Yme),V||(V=[]);++Y<J;){var it=m[Y];v>0&&T(it)?v>1?Ro(it,v-1,T,N,V):pm(V,it):N||(V[V.length]=it)}return V}var wq=lpt(),zft=lpt(!0);function mh(m,v){return m&&wq(m,v,po)}function Sq(m,v){return m&&zft(m,v,po)}function oI(m,v){return fm(v,function(T){return up(m[T])})}function i_(m,v){v=vm(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:pm(N,T(m))}function La(m){return m==null?m===e?tt:ht:t_&&t_ in vn(m)?Hme(m):Qme(m)}function Mq(m,v){return m>v}function ome(m,v){return m!=null&&un.call(m,v)}function ame(m,v){return m!=null&&v in vn(m)}function sme(m,v,T){return m>=ra(v,T)&&m<Xi(v,T)}function Eq(m,v,T){for(var N=T?sq:H6,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,Ws(v))),ft=ra(Ot.length,ft),it[J]=!T&&(v||V>=120&&Ot.length>=120)?new r_(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 lme(m,v,T,N){return mh(m,function(V,Y,J){v(N,T(V),Y,J)}),N}function kM(m,v,T){v=vm(v,m),m=Ept(m,v);var N=m==null?m:m[_h(Xl(v))];return N==null?e:Gs(N,m,T)}function Bft(m){return li(m)&&La(m)==bt}function cme(m){return li(m)&&La(m)==$t}function ume(m){return li(m)&&La(m)==_t}function RM(m,v,T,N,V){return m===v?!0:m==null||v==null||!li(m)&&!li(v)?m!==m&&v!==v:hme(m,v,T,N,RM,V)}function hme(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&&bm(m)){if(!bm(v))return!1;J=!0,Ot=!1}if(oe&&!Ot)return Y||(Y=new eu),J||wx(m)?ypt(m,v,T,N,V,Y):Fme(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),Bme(m,v,T,N,V,Y)):!1}function fme(m){return li(m)&&na(m)==q}function Tq(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(!ri(m)||Xme(m))return!1;var v=up(m)?fde:Pr;return v.test(a_(m))}function pme(m){return li(m)&&La(m)==ee}function dme(m){return li(m)&&na(m)==Le}function mme(m){return li(m)&&wI(m.length)&&!!Rn[La(m)]}function Vft(m){return typeof m=="function"?m:m==null?gs:typeof m=="object"?$e(m)?Gft(m[0],m[1]):qft(m):cdt(m)}function Cq(m){if(!OM(m))return yde(m);var v=[];for(var T in vn(m))un.call(m,T)&&T!="constructor"&&v.push(T);return v}function gme(m){if(!ri(m))return Jme(m);var v=OM(m),T=[];for(var N in m)N=="constructor"&&(v||!un.call(m,N))||T.push(N);return T}function Aq(m,v){return m<v}function Uft(m,v){var T=-1,N=ds(m)?vt(m.length):[];return _m(m,function(V,Y,J){N[++T]=v(V,Y,J)}),N}function qft(m){var v=qq(m);return v.length==1&&v[0][2]?Spt(v[0][0],v[0][1]):function(T){return T===m||Tq(T,m,v)}}function Gft(m,v){return Wq(m)&&wpt(v)?Spt(_h(m),v):function(T){var N=eG(T,m);return N===e&&N===v?rG(T,m):RM(v,N,f|p)}}function aI(m,v,T,N,V){m!==v&&wq(v,function(Y,J){if(V||(V=new eu),ri(Y))_me(m,v,J,T,aI,N,V);else{var it=N?N(jq(m,J),Y,J+"",m,v,V):e;it===e&&(it=Y),xq(m,J,it)}},ms)}function _me(m,v,T,N,V,Y,J){var it=jq(m,T),ft=jq(v,T),Dt=J.get(ft);if(Dt){xq(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&&bm(ft),Ne=!oe&&!Te&&wx(ft);Ot=ft,oe||Te||Ne?$e(it)?Ot=it:bi(it)?Ot=ps(it):Te?(Vt=!1,Ot=rpt(ft,!0)):Ne?(Vt=!1,Ot=npt(ft,!0)):Ot=[]:FM(ft)||s_(ft)?(Ot=it,s_(it)?Ot=Qpt(it):(!ri(it)||up(it))&&(Ot=bpt(ft))):Vt=!1}Vt&&(J.set(ft,Ot),V(Ot,ft,N,Y,J),J.delete(ft)),xq(m,T,Ot)}function Wft(m,v){var T=m.length;if(!!T)return v+=v<0?T:0,cp(v,T)?m[v]:e}function Yft(m,v,T){v.length?v=Kn(v,function(Y){return $e(Y)?function(J){return i_(J,Y.length===1?Y[0]:Y)}:Y}):v=[gs];var N=-1;v=Kn(v,Ws(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 Gpe(V,function(Y,J){return Ime(Y,J,T)})}function yme(m,v){return jft(m,v,function(T,N){return rG(m,N)})}function jft(m,v,T){for(var N=-1,V=v.length,Y={};++N<V;){var J=v[N],it=i_(m,J);T(it,J)&&NM(Y,vm(J,m),it)}return Y}function vme(m){return function(v){return i_(v,m)}}function Pq(m,v,T,N){var V=N?qpe:fx,Y=-1,J=v.length,it=m;for(m===v&&(v=ps(v)),T&&(it=Kn(m,Ws(T)));++Y<J;)for(var ft=0,Dt=v[Y],Ot=T?T(Dt):Dt;(ft=V(it,Ot,ft,N))>-1;)it!==m&&K6.call(it,ft,1),K6.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;cp(V)?K6.call(m,V,1):Rq(m,V)}}return m}function Iq(m,v){return m+Q6(Aft()*(v-m+1))}function xme(m,v,T,N){for(var V=-1,Y=Xi(J6((v-m)/(T||1)),0),J=vt(Y);Y--;)J[N?Y:++V]=m,m+=T;return J}function Lq(m,v){var T="";if(!m||v<1||v>U)return T;do v%2&&(T+=m),v=Q6(v/2),v&&(m+=m);while(v);return T}function nr(m,v){return Xq(Mpt(m,v,gs),m+"")}function bme(m){return Lft(Sx(m))}function wme(m,v){var T=Sx(m);return gI(T,n_(v,0,T.length))}function NM(m,v,T,N){if(!ri(m))return m;v=vm(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=ri(Ot)?Ot:cp(v[V+1])?[]:{})}IM(it,ft,Dt),it=it[ft]}return m}var $ft=tI?function(m,v){return tI.set(m,v),m}:gs,Sme=Z6?function(m,v){return Z6(m,"toString",{configurable:!0,enumerable:!1,value:iG(v),writable:!0})}:gs;function Mme(m){return gI(Sx(m))}function jl(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 Eme(m,v){var T;return _m(m,function(N,V,Y){return T=v(N,V,Y),!T}),!!T}function sI(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&&!js(J)&&(T?J<=v:J<v)?N=Y+1:V=Y}return V}return kq(m,v,gs,T)}function kq(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=js(v),Dt=v===e;V<Y;){var Ot=Q6((V+Y)/2),Vt=T(m[Ot]),oe=Vt!==e,Te=Vt===null,Ne=Vt===Vt,er=js(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:js(m)?Z:+m}function Ys(m){if(typeof m=="string")return m;if($e(m))return Kn(m,Ys)+"";if(js(m))return Pft?Pft.call(m):"";var v=m+"";return v=="0"&&1/m==-z?"-0":v}function ym(m,v,T){var N=-1,V=H6,Y=m.length,J=!0,it=[],ft=it;if(T)J=!1,V=sq;else if(Y>=r){var Dt=v?null:Ome(m);if(Dt)return U6(Dt);J=!1,V=MM,ft=new r_}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 Rq(m,v){return v=vm(v,m),m=Ept(m,v),m==null||delete m[_h(Xl(v))]}function Jft(m,v,T,N){return NM(m,v,T(i_(m,v)),N)}function lI(m,v,T,N){for(var V=m.length,Y=N?V:-1;(N?Y--:++Y<V)&&v(m[Y],Y,m););return T?jl(m,N?0:Y,N?Y+1:V):jl(m,N?Y+1:0,N?V:Y)}function Qft(m,v){var T=m;return T instanceof gr&&(T=T.value()),lq(v,function(N,V){return V.func.apply(V.thisArg,pm([N],V.args))},T)}function Nq(m,v,T){var N=m.length;if(N<2)return N?ym(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 ym(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 Dq(m){return bi(m)?m:[]}function Oq(m){return typeof m=="function"?m:gs}function vm(m,v){return $e(m)?m:Wq(m,v)?[m]:Ppt(on(m))}var Tme=nr;function xm(m,v,T){var N=m.length;return T=T===e?N:T,!v&&T>=N?m:jl(m,v,T)}var ept=pde||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 zq(m){var v=new m.constructor(m.byteLength);return new X6(v).set(new X6(m)),v}function Cme(m,v){var T=v?zq(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.byteLength)}function Ame(m){var v=new m.constructor(m.source,Ke.exec(m));return v.lastIndex=m.lastIndex,v}function Pme(m){return PM?vn(PM.call(m)):{}}function npt(m,v){var T=v?zq(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=js(m),J=v!==e,it=v===null,ft=v===v,Dt=js(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 Ime(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 ps(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?ap(T,it,ft):IM(T,it,ft)}return T}function Lme(m,v){return gh(m,Gq(m),v)}function kme(m,v){return gh(m,vpt(m),v)}function cI(m,v){return function(T,N){var V=$e(T)?zpe:tme,Y=v?v():{};return V(T,m,ke(N,2),Y)}}function vx(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&&ka(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(!ds(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 Rme(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=px(v)?tu(v):e,N=T?T[0]:v.charAt(0),V=T?xm(T,1).join(""):v.slice(1);return N[m]()+V}}function xx(m){return function(v){return lq(sdt(adt(v).replace(Spe,"")),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=yx(m.prototype),N=m.apply(T,v);return ri(N)?N:T}}function Nme(m,v,T){var N=DM(m);function V(){for(var Y=arguments.length,J=vt(Y),it=Y,ft=bx(V);it--;)J[it]=arguments[it];var Dt=Y<3&&J[0]!==ft&&J[Y-1]!==ft?[]:dm(J,ft);if(Y-=Dt.length,Y<T)return dpt(m,v,uI,V.placeholder,e,J,Dt,e,e,T-Y);var Ot=this&&this!==fo&&this instanceof V?N:m;return Gs(Ot,this,J)}return V}function upt(m){return function(v,T,N){var V=vn(v);if(!ds(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 lp(function(v){var T=v.length,N=T,V=Wl.prototype.thru;for(m&&v.reverse();N--;){var Y=v[N];if(typeof Y!="function")throw new Gl(i);if(V&&!J&&dI(Y)=="wrapper")var J=new Wl([],!0)}for(N=J?N:T;++N<T;){Y=v[N];var it=dI(Y),ft=it=="wrapper"?Uq(Y):e;ft&&Yq(ft[0])&&ft[1]==(C|y|b|P)&&!ft[4].length&&ft[9]==1?J=J[dI(ft[0])].apply(J,ft[3]):J=Y.length==1&&Yq(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 uI(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),Xs=pr;Xs--;)yr[Xs]=arguments[Xs];if(Te)var Ra=bx(De),$s=Ype(yr,Ra);if(N&&(yr=opt(yr,N,V,Te)),Y&&(yr=apt(yr,Y,J,Te)),pr-=$s,Te&&pr<Dt){var wi=dm(yr,Ra);return dpt(m,v,uI,De.placeholder,T,yr,wi,it,ft,Dt-pr)}var nu=Vt?T:this,fp=oe?nu[m]:m;return pr=yr.length,it?yr=tge(yr,it):Ne&&pr>1&&yr.reverse(),Ot&&ft<pr&&(yr.length=ft),this&&this!==fo&&this instanceof De&&(fp=er||DM(fp)),fp.apply(nu,yr)}return De}function fpt(m,v){return function(T,N){return lme(T,m,v(N),{})}}function hI(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=Ys(T),N=Ys(N)):(T=Zft(T),N=Zft(N)),V=m(T,N)}return V}}function Fq(m){return lp(function(v){return v=Kn(v,Ws(ke())),nr(function(T){var N=this;return m(v,function(V){return Gs(V,N,T)})})})}function fI(m,v){v=v===e?" ":Ys(v);var T=v.length;if(T<2)return T?Lq(v,m):v;var N=Lq(v,J6(m/dx(v)));return px(v)?xm(tu(N),0,m).join(""):N.slice(0,m)}function Dme(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 Gs(oe,V?T:this,Vt)}return J}function ppt(m){return function(v,T,N){return N&&typeof N!="number"&&ka(v,T,N)&&(T=N=e),v=hp(v),T===e?(T=v,v=0):T=hp(T),N=N===e?v<T?1:-1:hp(N),xme(v,T,N,m)}}function pI(m){return function(v,T){return typeof v=="string"&&typeof T=="string"||(v=$l(v),T=$l(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 Yq(m)&&Tpt(De,er),De.placeholder=N,Cpt(De,m,v)}function Bq(m){var v=ji[m];return function(T,N){if(T=$l(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 Ome=gx&&1/U6(new gx([,-0]))[1]==z?function(m){return new gx(m)}:sG;function mpt(m){return function(v){var T=na(v);return T==q?mq(v):T==Le?Qpe(v):Wpe(v,m(v))}}function sp(m,v,T,N,V,Y,J,it){var ft=v&g;if(!ft&&typeof m!="function")throw new Gl(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:Uq(m),Te=[m,v,T,N,V,Ot,Vt,Y,J,it];if(oe&&Zme(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=Rme(m,v,T);else v==y||v==x?Ne=Nme(m,v,it):(v==b||v==(d|b))&&!V.length?Ne=Dme(m,v,T,N):Ne=uI.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,mx[T])&&!un.call(N,T)?v:m}function _pt(m,v,T,N,V,Y){return ri(m)&&ri(v)&&(Y.set(v,m),aI(m,v,e,_pt,Y),Y.delete(v)),m}function zme(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 r_: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(!cq(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 Fme(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 X6(m),new X6(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=mq;case Le:var ft=N&f;if(it||(it=U6),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 Bme(m,v,T,N,V,Y){var J=T&f,it=Hq(m),ft=it.length,Dt=Hq(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 Xs=J?N(yr,pr,oe,v,m,Y):N(pr,yr,oe,m,v,Y);if(!(Xs===e?pr===yr||V(pr,yr,T,N,Y):Xs)){er=!1;break}De||(De=oe=="constructor")}if(er&&!De){var Ra=m.constructor,$s=v.constructor;Ra!=$s&&"constructor"in m&&"constructor"in v&&!(typeof Ra=="function"&&Ra instanceof Ra&&typeof $s=="function"&&$s instanceof $s)&&(er=!1)}return Y.delete(m),Y.delete(v),er}function lp(m){return Xq(Mpt(m,e,Rpt),m+"")}function Hq(m){return Fft(m,po,Gq)}function Vq(m){return Fft(m,ms,vpt)}var Uq=tI?function(m){return tI.get(m)}:sG;function dI(m){for(var v=m.name+"",T=_x[v],N=un.call(_x,v)?T.length:0;N--;){var V=T[N],Y=V.func;if(Y==null||Y==m)return V.name}return v}function bx(m){var v=un.call(G,"placeholder")?G:m;return v.placeholder}function ke(){var m=G.iteratee||oG;return m=m===oG?Vft:m,arguments.length?m(arguments[0],arguments[1]):m}function mI(m,v){var T=m.__data__;return jme(v)?T[typeof v=="string"?"string":"hash"]:T.map}function qq(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 o_(m,v){var T=Kpe(m,v);return Hft(T)?T:e}function Hme(m){var v=un.call(m,t_),T=m[t_];try{m[t_]=e;var N=!0}catch(Y){}var V=Y6.call(m);return N&&(v?m[t_]=T:delete m[t_]),V}var Gq=_q?function(m){return m==null?[]:(m=vn(m),fm(_q(m),function(v){return Eft.call(m,v)}))}:lG,vpt=_q?function(m){for(var v=[];m;)pm(v,Gq(m)),m=$6(m);return v}:lG,na=La;(yq&&na(new yq(new ArrayBuffer(1)))!=he||TM&&na(new TM)!=q||vq&&na(vq.resolve())!=kt||gx&&na(new gx)!=Le||CM&&na(new CM)!=$)&&(na=function(m){var v=La(m),T=v==wt?m.constructor:e,N=T?a_(T):"";if(N)switch(N){case wde:return he;case Sde:return q;case Mde:return kt;case Ede:return Le;case Tde:return $}return v});function Vme(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 Ume(m){var v=m.match(Et);return v?v[1].split(xt):[]}function xpt(m,v,T){v=vm(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&&wI(V)&&cp(J,V)&&($e(m)||s_(m)))}function qme(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)?yx($6(m)):{}}function Gme(m,v,T){var N=m.constructor;switch(v){case $t:return zq(m);case Kt:case _t:return new N(+m);case he:return Cme(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 Ame(m);case Le:return new N;case fr:return Pme(m)}}function Wme(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 Yme(m){return $e(m)||s_(m)||!!(Tft&&m&&m[Tft])}function cp(m,v){var T=typeof m;return v=v==null?U:v,!!v&&(T=="number"||T!="symbol"&&np.test(m))&&m>-1&&m%1==0&&m<v}function ka(m,v,T){if(!ri(T))return!1;var N=typeof v;return(N=="number"?ds(T)&&cp(v,T.length):N=="string"&&v in T)?ru(T[v],m):!1}function Wq(m,v){if($e(m))return!1;var T=typeof m;return T=="number"||T=="symbol"||T=="boolean"||m==null||js(m)?!0:cm.test(m)||!lx.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 Yq(m){var v=dI(m),T=G[v];if(typeof T!="function"||!(v in gr.prototype))return!1;if(m===T)return!0;var N=Uq(T);return!!N&&m===N[0]}function Xme(m){return!!wft&&wft in m}var $me=G6?up:cG;function OM(m){var v=m&&m.constructor,T=typeof v=="function"&&v.prototype||mx;return m===T}function wpt(m){return m===m&&!ri(m)}function Spt(m,v){return function(T){return T==null?!1:T[m]===v&&(v!==e||m in vn(T))}}function Kme(m){var v=xI(m,function(N){return T.size===s&&T.clear(),N}),T=v.cache;return v}function Zme(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?dm(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?dm(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 Jme(m){var v=[];if(m!=null)for(var T in vn(m))v.push(T);return v}function Qme(m){return Y6.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),Gs(m,this,it)}}function Ept(m,v){return v.length<2?m:i_(m,jl(v,0,-1))}function tge(m,v){for(var T=m.length,N=ra(v.length,T),V=ps(m);N--;){var Y=v[N];m[N]=cp(Y,T)?V[Y]:e}return m}function jq(m,v){if(!(v==="constructor"&&typeof m[v]=="function")&&v!="__proto__")return m[v]}var Tpt=Apt($ft),zM=mde||function(m,v){return fo.setTimeout(m,v)},Xq=Apt(Sme);function Cpt(m,v,T){var N=v+"";return Xq(m,Wme(N,ege(Ume(N),T)))}function Apt(m){var v=0,T=0;return function(){var N=vde(),V=I-(N-T);if(T=N,V>0){if(++v>=B)return arguments[0]}else v=0;return m.apply(e,arguments)}}function gI(m,v){var T=-1,N=m.length,V=N-1;for(v=v===e?N:v;++T<v;){var Y=Iq(T,V),J=m[Y];m[Y]=m[T],m[T]=J}return m.length=v,m}var Ppt=Kme(function(m){var v=[];return m.charCodeAt(0)===46&&v.push(""),m.replace(J0,function(T,N,V,Y){v.push(V?Y.replace(Ue,"$1"):N||T)}),v});function _h(m){if(typeof m=="string"||js(m))return m;var v=m+"";return v=="0"&&1/m==-z?"-0":v}function a_(m){if(m!=null){try{return W6.call(m)}catch(v){}try{return m+""}catch(v){}}return""}function ege(m,v){return ql(St,function(T){var N="_."+T[0];v&T[1]&&!H6(m,N)&&m.push(N)}),m.sort()}function Ipt(m){if(m instanceof gr)return m.clone();var v=new Wl(m.__wrapped__,m.__chain__);return v.__actions__=ps(m.__actions__),v.__index__=m.__index__,v.__values__=m.__values__,v}function rge(m,v,T){(T?ka(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(J6(N/v));V<N;)J[Y++]=jl(m,V,V+=v);return J}function nge(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 ige(){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 pm($e(T)?ps(T):[T],Ro(v,1))}var oge=nr(function(m,v){return bi(m)?LM(m,Ro(v,1,bi,!0)):[]}),age=nr(function(m,v){var T=Xl(v);return bi(T)&&(T=e),bi(m)?LM(m,Ro(v,1,bi,!0),ke(T,2)):[]}),sge=nr(function(m,v){var T=Xl(v);return bi(T)&&(T=e),bi(m)?LM(m,Ro(v,1,bi,!0),e,T):[]});function lge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),jl(m,v<0?0:v,N)):[]}function cge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,jl(m,0,v<0?0:v)):[]}function uge(m,v){return m&&m.length?lI(m,ke(v,3),!0,!0):[]}function hge(m,v){return m&&m.length?lI(m,ke(v,3),!0):[]}function fge(m,v,T,N){var V=m==null?0:m.length;return V?(T&&typeof T!="number"&&ka(m,v,T)&&(T=0,N=V),ime(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)),V6(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)),V6(m,ke(v,3),V,!0)}function Rpt(m){var v=m==null?0:m.length;return v?Ro(m,1):[]}function pge(m){var v=m==null?0:m.length;return v?Ro(m,z):[]}function dge(m,v){var T=m==null?0:m.length;return T?(v=v===e?1:Qe(v),Ro(m,v)):[]}function mge(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 gge(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)),fx(m,v,V)}function _ge(m){var v=m==null?0:m.length;return v?jl(m,0,-1):[]}var yge=nr(function(m){var v=Kn(m,Dq);return v.length&&v[0]===m[0]?Eq(v):[]}),vge=nr(function(m){var v=Xl(m),T=Kn(m,Dq);return v===Xl(T)?v=e:T.pop(),T.length&&T[0]===m[0]?Eq(T,ke(v,2)):[]}),xge=nr(function(m){var v=Xl(m),T=Kn(m,Dq);return v=typeof v=="function"?v:e,v&&T.pop(),T.length&&T[0]===m[0]?Eq(T,e,v):[]});function bge(m,v){return m==null?"":_de.call(m,v)}function Xl(m){var v=m==null?0:m.length;return v?m[v-1]:e}function wge(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?ede(m,v,V):V6(m,dft,V,!0)}function Sge(m,v){return m&&m.length?Wft(m,Qe(v)):e}var Mge=nr(Dpt);function Dpt(m,v){return m&&m.length&&v&&v.length?Pq(m,v):m}function Ege(m,v,T){return m&&m.length&&v&&v.length?Pq(m,v,ke(T,2)):m}function Tge(m,v,T){return m&&m.length&&v&&v.length?Pq(m,v,e,T):m}var Cge=lp(function(m,v){var T=m==null?0:m.length,N=bq(m,v);return Xft(m,Kn(v,function(V){return cp(V,T)?+V:V}).sort(ipt)),N});function Age(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 $q(m){return m==null?m:bde.call(m)}function Pge(m,v,T){var N=m==null?0:m.length;return N?(T&&typeof T!="number"&&ka(m,v,T)?(v=0,T=N):(v=v==null?0:Qe(v),T=T===e?N:Qe(T)),jl(m,v,T)):[]}function Ige(m,v){return sI(m,v)}function Lge(m,v,T){return kq(m,v,ke(T,2))}function kge(m,v){var T=m==null?0:m.length;if(T){var N=sI(m,v);if(N<T&&ru(m[N],v))return N}return-1}function Rge(m,v){return sI(m,v,!0)}function Nge(m,v,T){return kq(m,v,ke(T,2),!0)}function Dge(m,v){var T=m==null?0:m.length;if(T){var N=sI(m,v,!0)-1;if(ru(m[N],v))return N}return-1}function Oge(m){return m&&m.length?Kft(m):[]}function zge(m,v){return m&&m.length?Kft(m,ke(v,2)):[]}function Fge(m){var v=m==null?0:m.length;return v?jl(m,1,v):[]}function Bge(m,v,T){return m&&m.length?(v=T||v===e?1:Qe(v),jl(m,0,v<0?0:v)):[]}function Hge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,jl(m,v<0?0:v,N)):[]}function Vge(m,v){return m&&m.length?lI(m,ke(v,3),!1,!0):[]}function Uge(m,v){return m&&m.length?lI(m,ke(v,3)):[]}var qge=nr(function(m){return ym(Ro(m,1,bi,!0))}),Gge=nr(function(m){var v=Xl(m);return bi(v)&&(v=e),ym(Ro(m,1,bi,!0),ke(v,2))}),Wge=nr(function(m){var v=Xl(m);return v=typeof v=="function"?v:e,ym(Ro(m,1,bi,!0),e,v)});function Yge(m){return m&&m.length?ym(m):[]}function jge(m,v){return m&&m.length?ym(m,ke(v,2)):[]}function Xge(m,v){return v=typeof v=="function"?v:e,m&&m.length?ym(m,e,v):[]}function Kq(m){if(!(m&&m.length))return[];var v=0;return m=fm(m,function(T){if(bi(T))return v=Xi(T.length,v),!0}),pq(v,function(T){return Kn(m,uq(T))})}function Opt(m,v){if(!(m&&m.length))return[];var T=Kq(m);return v==null?T:Kn(T,function(N){return Gs(v,e,N)})}var $ge=nr(function(m,v){return bi(m)?LM(m,v):[]}),Kge=nr(function(m){return Nq(fm(m,bi))}),Zge=nr(function(m){var v=Xl(m);return bi(v)&&(v=e),Nq(fm(m,bi),ke(v,2))}),Jge=nr(function(m){var v=Xl(m);return v=typeof v=="function"?v:e,Nq(fm(m,bi),e,v)}),Qge=nr(Kq);function t0e(m,v){return tpt(m||[],v||[],IM)}function e0e(m,v){return tpt(m||[],v||[],NM)}var r0e=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 n0e(m,v){return v(m),m}function _I(m,v){return v(m)}var i0e=lp(function(m){var v=m.length,T=v?m[0]:0,N=this.__wrapped__,V=function(Y){return bq(Y,m)};return v>1||this.__actions__.length||!(N instanceof gr)||!cp(T)?this.thru(V):(N=N.slice(T,+T+(v?1:0)),N.__actions__.push({func:_I,args:[V],thisArg:e}),new Wl(N,this.__chain__).thru(function(Y){return v&&!Y.length&&Y.push(e),Y}))});function o0e(){return zpt(this)}function a0e(){return new Wl(this.value(),this.__chain__)}function s0e(){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 l0e(){return this}function c0e(m){for(var v,T=this;T instanceof rI;){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 u0e(){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:_I,args:[$q],thisArg:e}),new Wl(v,this.__chain__)}return this.thru($q)}function h0e(){return Qft(this.__wrapped__,this.__actions__)}var f0e=cI(function(m,v,T){un.call(m,T)?++m[T]:ap(m,T,1)});function p0e(m,v,T){var N=$e(m)?fft:nme;return T&&ka(m,v,T)&&(v=e),N(m,ke(v,3))}function d0e(m,v){var T=$e(m)?fm:Oft;return T(m,ke(v,3))}var m0e=upt(Lpt),g0e=upt(kpt);function _0e(m,v){return Ro(yI(m,v),1)}function y0e(m,v){return Ro(yI(m,v),z)}function v0e(m,v,T){return T=T===e?1:Qe(T),Ro(yI(m,v),T)}function Fpt(m,v){var T=$e(m)?ql:_m;return T(m,ke(v,3))}function Bpt(m,v){var T=$e(m)?Fpe:Dft;return T(m,ke(v,3))}var x0e=cI(function(m,v,T){un.call(m,T)?m[T].push(v):ap(m,T,[v])});function b0e(m,v,T,N){m=ds(m)?m:Sx(m),T=T&&!N?Qe(T):0;var V=m.length;return T<0&&(T=Xi(V+T,0)),SI(m)?T<=V&&m.indexOf(v,T)>-1:!!V&&fx(m,v,T)>-1}var w0e=nr(function(m,v,T){var N=-1,V=typeof v=="function",Y=ds(m)?vt(m.length):[];return _m(m,function(J){Y[++N]=V?Gs(v,J,T):kM(J,v,T)}),Y}),S0e=cI(function(m,v,T){ap(m,T,v)});function yI(m,v){var T=$e(m)?Kn:Uft;return T(m,ke(v,3))}function M0e(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 E0e=cI(function(m,v,T){m[T?0:1].push(v)},function(){return[[],[]]});function T0e(m,v,T){var N=$e(m)?lq:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,_m)}function C0e(m,v,T){var N=$e(m)?Bpe:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,Dft)}function A0e(m,v){var T=$e(m)?fm:Oft;return T(m,bI(ke(v,3)))}function P0e(m){var v=$e(m)?Lft:bme;return v(m)}function I0e(m,v,T){(T?ka(m,v,T):v===e)?v=1:v=Qe(v);var N=$e(m)?Jde:wme;return N(m,v)}function L0e(m){var v=$e(m)?Qde:Mme;return v(m)}function k0e(m){if(m==null)return 0;if(ds(m))return SI(m)?dx(m):m.length;var v=na(m);return v==q||v==Le?m.size:Cq(m).length}function R0e(m,v,T){var N=$e(m)?cq:Eme;return T&&ka(m,v,T)&&(v=e),N(m,ke(v,3))}var N0e=nr(function(m,v){if(m==null)return[];var T=v.length;return T>1&&ka(m,v[0],v[1])?v=[]:T>2&&ka(v[0],v[1],v[2])&&(v=[v[0]]),Yft(m,Ro(v,1),[])}),vI=dde||function(){return fo.Date.now()};function D0e(m,v){if(typeof v!="function")throw new Gl(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,sp(m,C,e,e,e,e,v)}function Vpt(m,v){var T;if(typeof v!="function")throw new Gl(i);return m=Qe(m),function(){return--m>0&&(T=v.apply(this,arguments)),m<=1&&(v=e),T}}var Zq=nr(function(m,v,T){var N=d;if(T.length){var V=dm(T,bx(Zq));N|=b}return sp(m,N,v,T,V)}),Upt=nr(function(m,v,T){var N=d|g;if(T.length){var V=dm(T,bx(Upt));N|=b}return sp(v,N,m,T,V)});function qpt(m,v,T){v=T?e:v;var N=sp(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=sp(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 Gl(i);v=$l(v)||0,ri(T)&&(Ot=!!T.leading,Vt="maxWait"in T,Y=Vt?Xi($l(T.maxWait)||0,v):Y,oe="trailing"in T?!!T.trailing:oe);function Te(wi){var nu=N,fp=V;return N=V=e,Dt=wi,J=m.apply(fp,nu),J}function Ne(wi){return Dt=wi,it=zM(pr,v),Ot?Te(wi):J}function er(wi){var nu=wi-ft,fp=wi-Dt,udt=v-nu;return Vt?ra(udt,Y-fp):udt}function De(wi){var nu=wi-ft,fp=wi-Dt;return ft===e||nu>=v||nu<0||Vt&&fp>=Y}function pr(){var wi=vI();if(De(wi))return yr(wi);it=zM(pr,er(wi))}function yr(wi){return it=e,oe&&N?Te(wi):(N=V=e,J)}function Xs(){it!==e&&ept(it),Dt=0,N=ft=V=it=e}function Ra(){return it===e?J:yr(vI())}function $s(){var wi=vI(),nu=De(wi);if(N=arguments,V=this,ft=wi,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 $s.cancel=Xs,$s.flush=Ra,$s}var O0e=nr(function(m,v){return Nft(m,1,v)}),z0e=nr(function(m,v,T){return Nft(m,$l(v)||0,T)});function F0e(m){return sp(m,k)}function xI(m,v){if(typeof m!="function"||v!=null&&typeof v!="function")throw new Gl(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(xI.Cache||op),T}xI.Cache=op;function bI(m){if(typeof m!="function")throw new Gl(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 B0e(m){return Vpt(2,m)}var H0e=Tme(function(m,v){v=v.length==1&&$e(v[0])?Kn(v[0],Ws(ke())):Kn(Ro(v,1),Ws(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 Gs(m,this,N)})}),Jq=nr(function(m,v){var T=dm(v,bx(Jq));return sp(m,b,e,v,T)}),Ypt=nr(function(m,v){var T=dm(v,bx(Ypt));return sp(m,S,e,v,T)}),V0e=lp(function(m,v){return sp(m,P,e,e,e,v)});function U0e(m,v){if(typeof m!="function")throw new Gl(i);return v=v===e?v:Qe(v),nr(m,v)}function q0e(m,v){if(typeof m!="function")throw new Gl(i);return v=v==null?0:Xi(Qe(v),0),nr(function(T){var N=T[v],V=xm(T,0,v);return N&&pm(V,N),Gs(m,this,V)})}function G0e(m,v,T){var N=!0,V=!0;if(typeof m!="function")throw new Gl(i);return ri(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 W0e(m){return Hpt(m,1)}function Y0e(m,v){return Jq(Oq(v),m)}function j0e(){if(!arguments.length)return[];var m=arguments[0];return $e(m)?m:[m]}function X0e(m){return Yl(m,h)}function $0e(m,v){return v=typeof v=="function"?v:e,Yl(m,h,v)}function K0e(m){return Yl(m,c|h)}function Z0e(m,v){return v=typeof v=="function"?v:e,Yl(m,c|h,v)}function J0e(m,v){return v==null||Rft(m,v,po(v))}function ru(m,v){return m===v||m!==m&&v!==v}var Q0e=pI(Mq),t_e=pI(function(m,v){return m>=v}),s_=Bft(function(){return arguments}())?Bft:function(m){return li(m)&&un.call(m,"callee")&&!Eft.call(m,"callee")},$e=vt.isArray,e_e=aft?Ws(aft):cme;function ds(m){return m!=null&&wI(m.length)&&!up(m)}function bi(m){return li(m)&&ds(m)}function r_e(m){return m===!0||m===!1||li(m)&&La(m)==Kt}var bm=gde||cG,n_e=sft?Ws(sft):ume;function i_e(m){return li(m)&&m.nodeType===1&&!FM(m)}function o_e(m){if(m==null)return!0;if(ds(m)&&($e(m)||typeof m=="string"||typeof m.splice=="function"||bm(m)||wx(m)||s_(m)))return!m.length;var v=na(m);if(v==q||v==Le)return!m.size;if(OM(m))return!Cq(m).length;for(var T in m)if(un.call(m,T))return!1;return!0}function a_e(m,v){return RM(m,v)}function s_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 Qq(m){if(!li(m))return!1;var v=La(m);return v==X||v==ct||typeof m.message=="string"&&typeof m.name=="string"&&!FM(m)}function l_e(m){return typeof m=="number"&&Cft(m)}function up(m){if(!ri(m))return!1;var v=La(m);return v==et||v==dt||v==lt||v==ie}function jpt(m){return typeof m=="number"&&m==Qe(m)}function wI(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=U}function ri(m){var v=typeof m;return m!=null&&(v=="object"||v=="function")}function li(m){return m!=null&&typeof m=="object"}var Xpt=lft?Ws(lft):fme;function c_e(m,v){return m===v||Tq(m,v,qq(v))}function u_e(m,v,T){return T=typeof T=="function"?T:e,Tq(m,v,qq(v),T)}function h_e(m){return $pt(m)&&m!=+m}function f_e(m){if($me(m))throw new We(n);return Hft(m)}function p_e(m){return m===null}function d_e(m){return m==null}function $pt(m){return typeof m=="number"||li(m)&&La(m)==pt}function FM(m){if(!li(m)||La(m)!=wt)return!1;var v=$6(m);if(v===null)return!0;var T=un.call(v,"constructor")&&v.constructor;return typeof T=="function"&&T instanceof T&&W6.call(T)==ude}var tG=cft?Ws(cft):pme;function m_e(m){return jpt(m)&&m>=-U&&m<=U}var Kpt=uft?Ws(uft):dme;function SI(m){return typeof m=="string"||!$e(m)&&li(m)&&La(m)==ar}function js(m){return typeof m=="symbol"||li(m)&&La(m)==fr}var wx=hft?Ws(hft):mme;function g_e(m){return m===e}function __e(m){return li(m)&&na(m)==$}function y_e(m){return li(m)&&La(m)==It}var v_e=pI(Aq),x_e=pI(function(m,v){return m<=v});function Zpt(m){if(!m)return[];if(ds(m))return SI(m)?tu(m):ps(m);if(EM&&m[EM])return Jpe(m[EM]());var v=na(m),T=v==q?mq:v==Le?U6:Sx;return T(m)}function hp(m){if(!m)return m===0?m:0;if(m=$l(m),m===z||m===-z){var v=m<0?-1:1;return v*W}return m===m?m:0}function Qe(m){var v=hp(m),T=v%1;return v===v?T?v-T:v:0}function Jpt(m){return m?n_(Qe(m),0,rt):0}function $l(m){if(typeof m=="number")return m;if(js(m))return Z;if(ri(m)){var v=typeof m.valueOf=="function"?m.valueOf():m;m=ri(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)?Dpe(m.slice(2),T?2:8):Xr.test(m)?Z:+m}function Qpt(m){return gh(m,ms(m))}function b_e(m){return m?n_(Qe(m),-U,U):m===0?m:0}function on(m){return m==null?"":Ys(m)}var w_e=vx(function(m,v){if(OM(v)||ds(v)){gh(v,po(v),m);return}for(var T in v)un.call(v,T)&&IM(m,T,v[T])}),tdt=vx(function(m,v){gh(v,ms(v),m)}),MI=vx(function(m,v,T,N){gh(v,ms(v),m,N)}),S_e=vx(function(m,v,T,N){gh(v,po(v),m,N)}),M_e=lp(bq);function E_e(m,v){var T=yx(m);return v==null?T:kft(T,v)}var T_e=nr(function(m,v){m=vn(m);var T=-1,N=v.length,V=N>2?v[2]:e;for(V&&ka(v[0],v[1],V)&&(N=1);++T<N;)for(var Y=v[T],J=ms(Y),it=-1,ft=J.length;++it<ft;){var Dt=J[it],Ot=m[Dt];(Ot===e||ru(Ot,mx[Dt])&&!un.call(m,Dt))&&(m[Dt]=Y[Dt])}return m}),C_e=nr(function(m){return m.push(e,_pt),Gs(edt,e,m)});function A_e(m,v){return pft(m,ke(v,3),mh)}function P_e(m,v){return pft(m,ke(v,3),Sq)}function I_e(m,v){return m==null?m:wq(m,ke(v,3),ms)}function L_e(m,v){return m==null?m:zft(m,ke(v,3),ms)}function k_e(m,v){return m&&mh(m,ke(v,3))}function R_e(m,v){return m&&Sq(m,ke(v,3))}function N_e(m){return m==null?[]:oI(m,po(m))}function D_e(m){return m==null?[]:oI(m,ms(m))}function eG(m,v,T){var N=m==null?e:i_(m,v);return N===e?T:N}function O_e(m,v){return m!=null&&xpt(m,v,ome)}function rG(m,v){return m!=null&&xpt(m,v,ame)}var z_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=Y6.call(v)),m[v]=T},iG(gs)),F_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=Y6.call(v)),un.call(m,v)?m[v].push(T):m[v]=[T]},ke),B_e=nr(kM);function po(m){return ds(m)?Ift(m):Cq(m)}function ms(m){return ds(m)?Ift(m,!0):gme(m)}function H_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){ap(T,v(N,V,Y),N)}),T}function V_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){ap(T,V,v(N,V,Y))}),T}var U_e=vx(function(m,v,T){aI(m,v,T)}),edt=vx(function(m,v,T,N){aI(m,v,T,N)}),q_e=lp(function(m,v){var T={};if(m==null)return T;var N=!1;v=Kn(v,function(Y){return Y=vm(Y,m),N||(N=Y.length>1),Y}),gh(m,Vq(m),T),N&&(T=Yl(T,c|u|h,zme));for(var V=v.length;V--;)Rq(T,v[V]);return T});function G_e(m,v){return rdt(m,bI(ke(v)))}var W_e=lp(function(m,v){return m==null?{}:yme(m,v)});function rdt(m,v){if(m==null)return{};var T=Kn(Vq(m),function(N){return[N]});return v=ke(v),jft(m,T,function(N,V){return v(N,V[0])})}function Y_e(m,v,T){v=vm(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=up(Y)?Y.call(m):Y}return m}function j_e(m,v,T){return m==null?m:NM(m,v,T)}function X_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(ms);function $_e(m,v,T){var N=$e(m),V=N||bm(m)||wx(m);if(v=ke(v,4),T==null){var Y=m&&m.constructor;V?T=N?new Y:[]:ri(m)?T=up(Y)?yx($6(m)):{}:T={}}return(V?ql:mh)(m,function(J,it,ft){return v(T,J,it,ft)}),T}function K_e(m,v){return m==null?!0:Rq(m,v)}function Z_e(m,v,T){return m==null?m:Jft(m,v,Oq(T))}function J_e(m,v,T,N){return N=typeof N=="function"?N:e,m==null?m:Jft(m,v,Oq(T),N)}function Sx(m){return m==null?[]:dq(m,po(m))}function Q_e(m){return m==null?[]:dq(m,ms(m))}function tye(m,v,T){return T===e&&(T=v,v=e),T!==e&&(T=$l(T),T=T===T?T:0),v!==e&&(v=$l(v),v=v===v?v:0),n_($l(m),v,T)}function eye(m,v,T){return v=hp(v),T===e?(T=v,v=0):T=hp(T),m=$l(m),sme(m,v,T)}function rye(m,v,T){if(T&&typeof T!="boolean"&&ka(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=hp(m),v===e?(v=m,m=0):v=hp(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+Npe("1e-"+((V+"").length-1))),v)}return Iq(m,v)}var nye=xx(function(m,v,T){return v=v.toLowerCase(),m+(T?odt(v):v)});function odt(m){return nG(on(m).toLowerCase())}function adt(m){return m=on(m),m&&m.replace(um,jpe).replace(Mpe,"")}function iye(m,v,T){m=on(m),v=Ys(v);var N=m.length;T=T===e?N:n_(Qe(T),0,N);var V=T;return T-=v.length,T>=0&&m.slice(T,V)==v}function oye(m){return m=on(m),m&&Ar.test(m)?m.replace(yn,Xpe):m}function aye(m){return m=on(m),m&&cx.test(m)?m.replace(cn,"\\$&"):m}var sye=xx(function(m,v,T){return m+(T?"-":"")+v.toLowerCase()}),lye=xx(function(m,v,T){return m+(T?" ":"")+v.toLowerCase()}),cye=cpt("toLowerCase");function uye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;if(!v||N>=v)return m;var V=(v-N)/2;return fI(Q6(V),T)+m+fI(J6(V),T)}function hye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;return v&&N<v?m+fI(v-N,T):m}function fye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;return v&&N<v?fI(v-N,T)+m:m}function pye(m,v,T){return T||v==null?v=0:v&&(v=+v),xde(on(m).replace(rp,""),v||0)}function dye(m,v,T){return(T?ka(m,v,T):v===e)?v=1:v=Qe(v),Lq(on(m),v)}function mye(){var m=arguments,v=on(m[0]);return m.length<3?v:v.replace(m[1],m[2])}var gye=xx(function(m,v,T){return m+(T?"_":"")+v.toLowerCase()});function _ye(m,v,T){return T&&typeof T!="number"&&ka(m,v,T)&&(v=T=e),T=T===e?rt:T>>>0,T?(m=on(m),m&&(typeof v=="string"||v!=null&&!tG(v))&&(v=Ys(v),!v&&px(m))?xm(tu(m),0,T):m.split(v,T)):[]}var yye=xx(function(m,v,T){return m+(T?" ":"")+nG(v)});function vye(m,v,T){return m=on(m),T=T==null?0:n_(Qe(T),0,m.length),v=Ys(v),m.slice(T,T+v.length)==v}function xye(m,v,T){var N=G.templateSettings;T&&ka(m,v,T)&&(v=e),m=on(m),v=MI({},v,N,gpt);var V=MI({},v.imports,N.imports,gpt),Y=po(V),J=dq(V,Y),it,ft,Dt=0,Ot=v.interpolate||mr,Vt="__p += '",oe=gq((v.escape||mr).source+"|"+Ot.source+"|"+(Ot===Ia?tr:mr).source+"|"+(v.evaluate||mr).source+"|$","g"),Te="//# sourceURL="+(un.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ppe+"]")+`
`;m.replace(oe,function(De,pr,yr,Xs,Ra,$s){return yr||(yr=Xs),Vt+=m.slice(Dt,$s).replace(Fl,$pe),pr&&(it=!0,Vt+=`' +
__e(`+pr+`) +
'`),Ra&&(ft=!0,Vt+=`';
`+Ra+`;
__p += '`),yr&&(Vt+=`' +
((__t = (`+yr+`)) == null ? '' : __t) +
'`),Dt=$s+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,Qq(er))throw er;return er}function bye(m){return on(m).toLowerCase()}function wye(m){return on(m).toUpperCase()}function Sye(m,v,T){if(m=on(m),m&&(T||v===e))return _ft(m);if(!m||!(v=Ys(v)))return m;var N=tu(m),V=tu(v),Y=yft(N,V),J=vft(N,V)+1;return xm(N,Y,J).join("")}function Mye(m,v,T){if(m=on(m),m&&(T||v===e))return m.slice(0,bft(m)+1);if(!m||!(v=Ys(v)))return m;var N=tu(m),V=vft(N,tu(v))+1;return xm(N,0,V).join("")}function Eye(m,v,T){if(m=on(m),m&&(T||v===e))return m.replace(rp,"");if(!m||!(v=Ys(v)))return m;var N=tu(m),V=yft(N,tu(v));return xm(N,V).join("")}function Tye(m,v){var T=O,N=D;if(ri(v)){var V="separator"in v?v.separator:V;T="length"in v?Qe(v.length):T,N="omission"in v?Ys(v.omission):N}m=on(m);var Y=m.length;if(px(m)){var J=tu(m);Y=J.length}if(T>=Y)return m;var it=T-dx(N);if(it<1)return N;var ft=J?xm(J,0,it).join(""):m.slice(0,it);if(V===e)return ft+N;if(J&&(it+=ft.length-it),tG(V)){if(m.slice(it).search(V)){var Dt,Ot=ft;for(V.global||(V=gq(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(Ys(V),it)!=it){var oe=ft.lastIndexOf(V);oe>-1&&(ft=ft.slice(0,oe))}return ft+N}function Cye(m){return m=on(m),m&&Wi.test(m)?m.replace(ze,rde):m}var Aye=xx(function(m,v,T){return m+(T?" ":"")+v.toUpperCase()}),nG=cpt("toUpperCase");function sdt(m,v,T){return m=on(m),v=T?e:v,v===e?Zpe(m)?ode(m):Upe(m):m.match(v)||[]}var ldt=nr(function(m,v){try{return Gs(m,e,v)}catch(T){return Qq(T)?T:new We(T)}}),Pye=lp(function(m,v){return ql(v,function(T){T=_h(T),ap(m,T,Zq(m[T],m))}),m});function Iye(m){var v=m==null?0:m.length,T=ke();return m=v?Kn(m,function(N){if(typeof N[1]!="function")throw new Gl(i);return[T(N[0]),N[1]]}):[],nr(function(N){for(var V=-1;++V<v;){var Y=m[V];if(Gs(Y[0],this,N))return Gs(Y[1],this,N)}})}function Lye(m){return rme(Yl(m,c))}function iG(m){return function(){return m}}function kye(m,v){return m==null||m!==m?v:m}var Rye=hpt(),Nye=hpt(!0);function gs(m){return m}function oG(m){return Vft(typeof m=="function"?m:Yl(m,c))}function Dye(m){return qft(Yl(m,c))}function Oye(m,v){return Gft(m,Yl(v,c))}var zye=nr(function(m,v){return function(T){return kM(T,m,v)}}),Fye=nr(function(m,v){return function(T){return kM(m,T,v)}});function aG(m,v,T){var N=po(v),V=oI(v,N);T==null&&!(ri(v)&&(V.length||!N.length))&&(T=v,v=m,m=this,V=oI(v,po(v)));var Y=!(ri(T)&&"chain"in T)||!!T.chain,J=up(m);return ql(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__=ps(this.__actions__);return Vt.push({func:ft,args:arguments,thisArg:m}),Ot.__chain__=Dt,Ot}return ft.apply(m,pm([this.value()],arguments))})}),m}function Bye(){return fo._===this&&(fo._=hde),this}function sG(){}function Hye(m){return m=Qe(m),nr(function(v){return Wft(v,m)})}var Vye=Fq(Kn),Uye=Fq(fft),qye=Fq(cq);function cdt(m){return Wq(m)?uq(_h(m)):vme(m)}function Gye(m){return function(v){return m==null?e:i_(m,v)}}var Wye=ppt(),Yye=ppt(!0);function lG(){return[]}function cG(){return!1}function jye(){return{}}function Xye(){return""}function $ye(){return!0}function Kye(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=pq(N,v);++T<m;)v(T);return V}function Zye(m){return $e(m)?Kn(m,_h):js(m)?[m]:ps(Ppt(on(m)))}function Jye(m){var v=++cde;return on(m)+v}var Qye=hI(function(m,v){return m+v},0),t1e=Bq("ceil"),e1e=hI(function(m,v){return m/v},1),r1e=Bq("floor");function n1e(m){return m&&m.length?iI(m,gs,Mq):e}function i1e(m,v){return m&&m.length?iI(m,ke(v,2),Mq):e}function o1e(m){return mft(m,gs)}function a1e(m,v){return mft(m,ke(v,2))}function s1e(m){return m&&m.length?iI(m,gs,Aq):e}function l1e(m,v){return m&&m.length?iI(m,ke(v,2),Aq):e}var c1e=hI(function(m,v){return m*v},1),u1e=Bq("round"),h1e=hI(function(m,v){return m-v},0);function f1e(m){return m&&m.length?fq(m,gs):0}function p1e(m,v){return m&&m.length?fq(m,ke(v,2)):0}return G.after=D0e,G.ary=Hpt,G.assign=w_e,G.assignIn=tdt,G.assignInWith=MI,G.assignWith=S_e,G.at=M_e,G.before=Vpt,G.bind=Zq,G.bindAll=Pye,G.bindKey=Upt,G.castArray=j0e,G.chain=zpt,G.chunk=rge,G.compact=nge,G.concat=ige,G.cond=Iye,G.conforms=Lye,G.constant=iG,G.countBy=f0e,G.create=E_e,G.curry=qpt,G.curryRight=Gpt,G.debounce=Wpt,G.defaults=T_e,G.defaultsDeep=C_e,G.defer=O0e,G.delay=z0e,G.difference=oge,G.differenceBy=age,G.differenceWith=sge,G.drop=lge,G.dropRight=cge,G.dropRightWhile=uge,G.dropWhile=hge,G.fill=fge,G.filter=d0e,G.flatMap=_0e,G.flatMapDeep=y0e,G.flatMapDepth=v0e,G.flatten=Rpt,G.flattenDeep=pge,G.flattenDepth=dge,G.flip=F0e,G.flow=Rye,G.flowRight=Nye,G.fromPairs=mge,G.functions=N_e,G.functionsIn=D_e,G.groupBy=x0e,G.initial=_ge,G.intersection=yge,G.intersectionBy=vge,G.intersectionWith=xge,G.invert=z_e,G.invertBy=F_e,G.invokeMap=w0e,G.iteratee=oG,G.keyBy=S0e,G.keys=po,G.keysIn=ms,G.map=yI,G.mapKeys=H_e,G.mapValues=V_e,G.matches=Dye,G.matchesProperty=Oye,G.memoize=xI,G.merge=U_e,G.mergeWith=edt,G.method=zye,G.methodOf=Fye,G.mixin=aG,G.negate=bI,G.nthArg=Hye,G.omit=q_e,G.omitBy=G_e,G.once=B0e,G.orderBy=M0e,G.over=Vye,G.overArgs=H0e,G.overEvery=Uye,G.overSome=qye,G.partial=Jq,G.partialRight=Ypt,G.partition=E0e,G.pick=W_e,G.pickBy=rdt,G.property=cdt,G.propertyOf=Gye,G.pull=Mge,G.pullAll=Dpt,G.pullAllBy=Ege,G.pullAllWith=Tge,G.pullAt=Cge,G.range=Wye,G.rangeRight=Yye,G.rearg=V0e,G.reject=A0e,G.remove=Age,G.rest=U0e,G.reverse=$q,G.sampleSize=I0e,G.set=j_e,G.setWith=X_e,G.shuffle=L0e,G.slice=Pge,G.sortBy=N0e,G.sortedUniq=Oge,G.sortedUniqBy=zge,G.split=_ye,G.spread=q0e,G.tail=Fge,G.take=Bge,G.takeRight=Hge,G.takeRightWhile=Vge,G.takeWhile=Uge,G.tap=n0e,G.throttle=G0e,G.thru=_I,G.toArray=Zpt,G.toPairs=ndt,G.toPairsIn=idt,G.toPath=Zye,G.toPlainObject=Qpt,G.transform=$_e,G.unary=W0e,G.union=qge,G.unionBy=Gge,G.unionWith=Wge,G.uniq=Yge,G.uniqBy=jge,G.uniqWith=Xge,G.unset=K_e,G.unzip=Kq,G.unzipWith=Opt,G.update=Z_e,G.updateWith=J_e,G.values=Sx,G.valuesIn=Q_e,G.without=$ge,G.words=sdt,G.wrap=Y0e,G.xor=Kge,G.xorBy=Zge,G.xorWith=Jge,G.zip=Qge,G.zipObject=t0e,G.zipObjectDeep=e0e,G.zipWith=r0e,G.entries=ndt,G.entriesIn=idt,G.extend=tdt,G.extendWith=MI,aG(G,G),G.add=Qye,G.attempt=ldt,G.camelCase=nye,G.capitalize=odt,G.ceil=t1e,G.clamp=tye,G.clone=X0e,G.cloneDeep=K0e,G.cloneDeepWith=Z0e,G.cloneWith=$0e,G.conformsTo=J0e,G.deburr=adt,G.defaultTo=kye,G.divide=e1e,G.endsWith=iye,G.eq=ru,G.escape=oye,G.escapeRegExp=aye,G.every=p0e,G.find=m0e,G.findIndex=Lpt,G.findKey=A_e,G.findLast=g0e,G.findLastIndex=kpt,G.findLastKey=P_e,G.floor=r1e,G.forEach=Fpt,G.forEachRight=Bpt,G.forIn=I_e,G.forInRight=L_e,G.forOwn=k_e,G.forOwnRight=R_e,G.get=eG,G.gt=Q0e,G.gte=t_e,G.has=O_e,G.hasIn=rG,G.head=Npt,G.identity=gs,G.includes=b0e,G.indexOf=gge,G.inRange=eye,G.invoke=B_e,G.isArguments=s_,G.isArray=$e,G.isArrayBuffer=e_e,G.isArrayLike=ds,G.isArrayLikeObject=bi,G.isBoolean=r_e,G.isBuffer=bm,G.isDate=n_e,G.isElement=i_e,G.isEmpty=o_e,G.isEqual=a_e,G.isEqualWith=s_e,G.isError=Qq,G.isFinite=l_e,G.isFunction=up,G.isInteger=jpt,G.isLength=wI,G.isMap=Xpt,G.isMatch=c_e,G.isMatchWith=u_e,G.isNaN=h_e,G.isNative=f_e,G.isNil=d_e,G.isNull=p_e,G.isNumber=$pt,G.isObject=ri,G.isObjectLike=li,G.isPlainObject=FM,G.isRegExp=tG,G.isSafeInteger=m_e,G.isSet=Kpt,G.isString=SI,G.isSymbol=js,G.isTypedArray=wx,G.isUndefined=g_e,G.isWeakMap=__e,G.isWeakSet=y_e,G.join=bge,G.kebabCase=sye,G.last=Xl,G.lastIndexOf=wge,G.lowerCase=lye,G.lowerFirst=cye,G.lt=v_e,G.lte=x_e,G.max=n1e,G.maxBy=i1e,G.mean=o1e,G.meanBy=a1e,G.min=s1e,G.minBy=l1e,G.stubArray=lG,G.stubFalse=cG,G.stubObject=jye,G.stubString=Xye,G.stubTrue=$ye,G.multiply=c1e,G.nth=Sge,G.noConflict=Bye,G.noop=sG,G.now=vI,G.pad=uye,G.padEnd=hye,G.padStart=fye,G.parseInt=pye,G.random=rye,G.reduce=T0e,G.reduceRight=C0e,G.repeat=dye,G.replace=mye,G.result=Y_e,G.round=u1e,G.runInContext=ut,G.sample=P0e,G.size=k0e,G.snakeCase=gye,G.some=R0e,G.sortedIndex=Ige,G.sortedIndexBy=Lge,G.sortedIndexOf=kge,G.sortedLastIndex=Rge,G.sortedLastIndexBy=Nge,G.sortedLastIndexOf=Dge,G.startCase=yye,G.startsWith=vye,G.subtract=h1e,G.sum=f1e,G.sumBy=p1e,G.template=xye,G.times=Kye,G.toFinite=hp,G.toInteger=Qe,G.toLength=Jpt,G.toLower=bye,G.toNumber=$l,G.toSafeInteger=b_e,G.toString=on,G.toUpper=wye,G.trim=Sye,G.trimEnd=Mye,G.trimStart=Eye,G.truncate=Tye,G.unescape=Cye,G.uniqueId=Jye,G.upperCase=Aye,G.upperFirst=nG,G.each=Fpt,G.eachRight=Bpt,G.first=Npt,aG(G,function(){var m={};return mh(G,function(v,T){un.call(G.prototype,T)||(m[T]=v)}),m}(),{chain:!1}),G.VERSION=t,ql(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){G[m].placeholder=G}),ql(["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()}}),ql(["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}}),ql(["head","last"],function(m,v){var T="take"+(v?"Right":"");gr.prototype[m]=function(){return this[T](1).value()[0]}}),ql(["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(gs)},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(bI(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,pm([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:_I,args:[Vt],thisArg:e}),new Wl(De,oe)}return Ne&&er?m.apply(this,it):(De=this.thru(Vt),Ne?N?De.value()[0]:De.value():De)})}),ql(["pop","push","shift","sort","splice","unshift"],function(m){var v=q6[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(_x,N)||(_x[N]=[]),_x[N].push({name:v,func:T})}}),_x[uI(e,g).name]=[{name:"wrapper",func:e}],gr.prototype.clone=Cde,gr.prototype.reverse=Ade,gr.prototype.value=Pde,G.prototype.at=i0e,G.prototype.chain=o0e,G.prototype.commit=a0e,G.prototype.next=s0e,G.prototype.plant=c0e,G.prototype.reverse=u0e,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=h0e,G.prototype.first=G.prototype.head,EM&&(G.prototype[EM]=l0e),G},mm=ade();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fo._=mm,define(function(){return mm})):Q0?((Q0.exports=mm)._=mm,oq._=mm):fo._=mm}).call(Rx)});function f_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 Z9(r)}function Z9(e){this._=e}function h2e(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 f2e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function h_t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=u2e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var u2e,vs,p_t=M(()=>{u2e={value:function(){}};Z9.prototype=f_t.prototype={constructor:Z9,on:function(e,t){var r=this._,n=h2e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=f2e(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]=h_t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=h_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 Z9(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)}};vs=f_t});var km=M(()=>{p_t()});function yY(e){return+e}var w1t=M(()=>{});function vY(e){return e*e}function xY(e){return e*(2-e)}function PL(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var S1t=M(()=>{});function bY(e){return e*e*e}function wY(e){return--e*e*e+1}function xs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var M1t=M(()=>{});var SY,MY,EY,IL,E1t=M(()=>{SY=3,MY=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(SY),EY=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(SY),IL=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}(SY)});function TY(e){return+e==1?1:1-Math.cos(e*C1t)}function CY(e){return Math.sin(e*C1t)}function LL(e){return(1-Math.cos(T1t*e))/2}var T1t,C1t,A1t=M(()=>{T1t=Math.PI,C1t=T1t/2});function Dh(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var AY=M(()=>{});function PY(e){return Dh(1-+e)}function IY(e){return 1-Dh(e)}function kL(e){return((e*=2)<=1?Dh(1-e):2-Dh(e-1))/2}var P1t=M(()=>{AY()});function LY(e){return 1-Math.sqrt(1-e*e)}function kY(e){return Math.sqrt(1- --e*e)}function RL(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var I1t=M(()=>{});function NY(e){return 1-P_(1-e)}function P_(e){return(e=+e)<RY?NL*e*e:e<oSe?NL*(e-=iSe)*e+aSe:e<lSe?NL*(e-=sSe)*e+cSe:NL*(e-=uSe)*e+hSe}function DY(e){return((e*=2)<=1?1-P_(1-e):P_(e-1)+1)/2}var RY,iSe,oSe,aSe,sSe,lSe,cSe,uSe,hSe,NL,L1t=M(()=>{RY=.36363636363636365,iSe=6/11,oSe=8/11,aSe=3/4,sSe=9/11,lSe=10/11,cSe=15/16,uSe=21/22,hSe=63/64,NL=1/RY/RY});var OY,zY,FY,DL,k1t=M(()=>{OY=1.70158,zY=function e(t){t=+t;function r(n){return(n=+n)*n*(t*(n-1)+n)}return r.overshoot=e,r}(OY),FY=function e(t){t=+t;function r(n){return--n*n*((n+1)*t+n)+1}return r.overshoot=e,r}(OY),DL=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}(OY)});var Sb,BY,HY,VY,OL,UY,R1t=M(()=>{AY();Sb=2*Math.PI,BY=1,HY=.3,VY=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return t*Dh(- --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}(BY,HY),OL=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return 1-t*Dh(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}(BY,HY),UY=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*Dh(-o)*Math.sin((n-o)/r):2-t*Dh(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}(BY,HY)});var N1t={};Ks(N1t,{easeBack:()=>DL,easeBackIn:()=>zY,easeBackInOut:()=>DL,easeBackOut:()=>FY,easeBounce:()=>P_,easeBounceIn:()=>NY,easeBounceInOut:()=>DY,easeBounceOut:()=>P_,easeCircle:()=>RL,easeCircleIn:()=>LY,easeCircleInOut:()=>RL,easeCircleOut:()=>kY,easeCubic:()=>xs,easeCubicIn:()=>bY,easeCubicInOut:()=>xs,easeCubicOut:()=>wY,easeElastic:()=>OL,easeElasticIn:()=>VY,easeElasticInOut:()=>UY,easeElasticOut:()=>OL,easeExp:()=>kL,easeExpIn:()=>PY,easeExpInOut:()=>kL,easeExpOut:()=>IY,easeLinear:()=>yY,easePoly:()=>IL,easePolyIn:()=>MY,easePolyInOut:()=>IL,easePolyOut:()=>EY,easeQuad:()=>PL,easeQuadIn:()=>vY,easeQuadInOut:()=>PL,easeQuadOut:()=>xY,easeSin:()=>LL,easeSinIn:()=>TY,easeSinInOut:()=>LL,easeSinOut:()=>CY});var I_=M(()=>{w1t();S1t();M1t();E1t();A1t();P1t();I1t();L1t();k1t();R1t()});function WL(){}function X1t(e,t){var r=new WL;if(e instanceof WL)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 el,Ji,YL=M(()=>{el="$";WL.prototype=X1t.prototype={constructor:WL,has:function(e){return el+e in this},get:function(e){return this[el+e]},set:function(e,t){return this[el+e]=t,this},remove:function(e){var t=el+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===el&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===el&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===el&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===el&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===el&&++e;return e},empty:function(){for(var e in this)if(e[0]===el)return!1;return!0},each:function(e){for(var t in this)t[0]===el&&e(this[t],t.slice(1),this)}};Ji=X1t});function Z1t(){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,PSe,ISe)},map:function(s){return o(s,0,$1t,K1t)},entries:function(s){return a(o(s,0,$1t,K1t),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 PSe(){return{}}function ISe(e,t,r){e[t]=r}function $1t(){return Ji()}function K1t(e,t,r){e.set(t,r)}var J1t=M(()=>{YL()});function jL(){}function Q1t(e,t){var r=new jL;if(e instanceof jL)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 k_,tvt,evt=M(()=>{YL();k_=Ji.prototype;jL.prototype=Q1t.prototype={constructor:jL,has:k_.has,add:function(e){return e+="",this[el+e]=e,this},remove:k_.remove,clear:k_.clear,values:k_.keys,size:k_.size,empty:k_.empty,each:k_.each};tvt=Q1t});function XL(e){var t=[];for(var r in e)t.push(r);return t}var rvt=M(()=>{});function nvt(e){var t=[];for(var r in e)t.push(e[r]);return t}var ivt=M(()=>{});function ovt(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var avt=M(()=>{});var Tb=M(()=>{J1t();evt();YL();rvt();ivt();avt()});function dvt(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function BSe(e,t){var r=dvt(e);return function(n,i){return t(r(n),i,e)}}function pvt(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 ws(e,t){var r=e+"",n=r.length;return n<t?new Array(t-n+1).join(0)+r:r}function HSe(e){return e<0?"-"+ws(-e,6):e>9999?"+"+ws(e,6):ws(e,4)}function VSe(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":HSe(e.getUTCFullYear(),4)+"-"+ws(e.getUTCMonth()+1,2)+"-"+ws(e.getUTCDate(),2)+(i?"T"+ws(t,2)+":"+ws(r,2)+":"+ws(n,2)+"."+ws(i,3)+"Z":n?"T"+ws(t,2)+":"+ws(r,2)+":"+ws(n,2)+"Z":r||t?"T"+ws(t,2)+":"+ws(r,2)+"Z":"")}function Wm(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?BSe(_,f):dvt(_)});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)===VE&&--d,h.charCodeAt(d-1)===ij&&--d;function S(){if(x)return rj;if(b)return b=!1,fvt;var P,k=g,O;if(h.charCodeAt(k)===nj){for(;g++<d&&h.charCodeAt(g)!==nj||h.charCodeAt(++g)===nj;);return(P=g)>=d?x=!0:(O=h.charCodeAt(g++))===VE?b=!0:O===ij&&(b=!0,h.charCodeAt(g)===VE&&++g),h.slice(k+1,P-1).replace(/""/g,'"')}for(;g<d;){if((O=h.charCodeAt(P=g++))===VE)b=!0;else if(O===ij)b=!0,h.charCodeAt(g)===VE&&++g;else if(O!==r)continue;return h.slice(k,P)}return x=!0,h.slice(k,d)}for(;(y=S())!==rj;){for(var C=[];y!==fvt&&y!==rj;)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=pvt(h)),[f.map(u).join(e)].concat(o(h,f)).join(`
`)}function s(h,f){return f==null&&(f=pvt(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?VSe(h):t.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:n,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}var fvt,rj,nj,VE,ij,QL=M(()=>{fvt={},rj={},nj=34,VE=10,ij=13});var R_,Cb,mvt,gvt,_vt,yvt,vvt,xvt,bvt=M(()=>{QL();R_=Wm(","),Cb=R_.parse,mvt=R_.parseRows,gvt=R_.format,_vt=R_.formatBody,yvt=R_.formatRows,vvt=R_.formatRow,xvt=R_.formatValue});var N_,Ab,wvt,Svt,Mvt,Evt,Tvt,Cvt,Avt=M(()=>{QL();N_=Wm("	"),Ab=N_.parse,wvt=N_.parseRows,Svt=N_.format,Mvt=N_.formatBody,Evt=N_.formatRows,Tvt=N_.formatRow,Cvt=N_.formatValue});function oj(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})?)?$/))USe&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var USe,Pvt=M(()=>{USe=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()});var UE=M(()=>{QL();bvt();Avt();Pvt()});var pe={};Ks(pe,{__assign:()=>p5e,__asyncDelegator:()=>S5e,__asyncGenerator:()=>w5e,__asyncValues:()=>M5e,__await:()=>V5,__awaiter:()=>y5e,__decorate:()=>m5e,__exportStar:()=>x5e,__extends:()=>f5e,__generator:()=>v5e,__makeTemplateObject:()=>E5e,__metadata:()=>_5e,__param:()=>g5e,__read:()=>J3t,__rest:()=>d5e,__spread:()=>b5e,__values:()=>v$});function f5e(e,t){h5e(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function d5e(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 m5e(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 g5e(e,t){return function(r,n){t(r,n,e)}}function _5e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function y5e(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 v5e(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 x5e(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function v$(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 J3t(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 b5e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(J3t(arguments[t]));return e}function V5(e){return this instanceof V5?(this.v=e,this):new V5(e)}function w5e(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 V5?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 S5e(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:V5(e[i](a)),done:i==="return"}:o?o(a):a})}}function M5e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):typeof v$=="function"?v$(e):e[Symbol.iterator]()}function E5e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var h5e,p5e,de=M(()=>{h5e=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])};p5e=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 Q3t,tMt=M(()=>{Q3t="4.13.0"});function _c(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var py=M(()=>{});function oR(e){return e.length===1&&(e=T5e(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 T5e(e){return function(t,r){return _c(e(t),r)}}var x$=M(()=>{py()});var eMt,b$,rMt,aR,w$=M(()=>{py();x$();eMt=oR(_c),b$=eMt.right,rMt=eMt.left,aR=b$});function nMt(e,t){t==null&&(t=S$);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 S$(e,t){return[e,t]}var M$=M(()=>{});function iMt(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=S$),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 oMt=M(()=>{M$()});function aMt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var sMt=M(()=>{});function al(e){return e===null?NaN:+e}var l2=M(()=>{});function sR(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=al(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=al(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}var E$=M(()=>{l2()});function lR(e,t){var r=sR(e,t);return r&&Math.sqrt(r)}var T$=M(()=>{E$()});function cR(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 C$=M(()=>{});var lMt,cMt,uMt,A$=M(()=>{lMt=Array.prototype,cMt=lMt.slice,uMt=lMt.map});function U5(e){return function(){return e}}var hMt=M(()=>{});function fMt(e){return e}var pMt=M(()=>{});function uR(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 P$=M(()=>{});function dMt(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=R$(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 R$(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>=I$?10:o>=L$?5:o>=k$?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=I$?10:o>=L$?5:o>=k$?2:1)}function hR(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>=I$?i*=10:o>=L$?i*=5:o>=k$&&(i*=2),t<e?-i:i}var I$,L$,k$,N$=M(()=>{I$=Math.sqrt(50),L$=Math.sqrt(10),k$=Math.sqrt(2)});function fR(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}var D$=M(()=>{});function mMt(){var e=fMt,t=cR,r=fR;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=hR(u,h,f),f=uR(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[aR(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:U5(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:U5([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?U5(cMt.call(i)):U5(i),n):r},n}var gMt=M(()=>{A$();w$();hMt();C$();pMt();P$();N$();D$()});function dy(e,t,r){if(r==null&&(r=al),!!(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 pR=M(()=>{l2()});function _Mt(e,t,r){return e=uMt.call(e,al).sort(_c),Math.ceil((r-t)/(2*(dy(e,.75)-dy(e,.25))*Math.pow(e.length,-1/3)))}var yMt=M(()=>{A$();py();l2();pR()});function vMt(e,t,r){return Math.ceil((r-t)/(3.5*lR(e)*Math.pow(e.length,-1/3)))}var xMt=M(()=>{T$()});function bMt(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 wMt=M(()=>{});function SMt(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=al(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=al(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}var MMt=M(()=>{l2()});function EMt(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=al(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=al(t(e[n],n,e)))||o.push(i);return dy(o.sort(_c),.5)}var TMt=M(()=>{py();l2();pR()});function CMt(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 AMt=M(()=>{});function dR(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 O$=M(()=>{});function PMt(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}var IMt=M(()=>{});function LMt(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 kMt=M(()=>{py()});function RMt(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 NMt=M(()=>{});function DMt(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 OMt=M(()=>{});function mR(e){if(!(o=e.length))return[];for(var t=-1,r=dR(e,C5e),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 C5e(e){return e.length}var z$=M(()=>{O$()});function zMt(){return mR(arguments)}var FMt=M(()=>{z$()});var BMt=M(()=>{w$();py();x$();oMt();sMt();T$();C$();gMt();yMt();xMt();D$();wMt();MMt();TMt();AMt();O$();M$();IMt();pR();P$();kMt();NMt();OMt();N$();z$();E$();FMt()});var gR,HMt=M(()=>{gR=Array.prototype.slice});function VMt(e){return e}var UMt=M(()=>{});function A5e(e){return"translate("+(e+.5)+",0)"}function P5e(e){return"translate(0,"+(e+.5)+")"}function I5e(e){return function(t){return+e(t)}}function L5e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function k5e(){return!this.__axis}function vR(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===_R||e===q5?-1:1,c=e===q5||e===yR?"x":"y",u=e===_R||e===F$?A5e:P5e;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):VMt:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?L5e:I5e)(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===_R?"0em":e===F$?"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",qMt).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",qMt).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===q5||e==yR?"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(k5e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===yR?"start":e===q5?"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=gR.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:gR.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:gR.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 GMt(e){return vR(_R,e)}function WMt(e){return vR(yR,e)}function YMt(e){return vR(F$,e)}function jMt(e){return vR(q5,e)}var _R,yR,F$,q5,qMt,XMt=M(()=>{HMt();UMt();_R=1,yR=2,F$=3,q5=4,qMt=1e-6});var $Mt=M(()=>{XMt()});function ZMt(){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 xR(r)}function xR(e){this._=e}function N5e(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 D5e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function KMt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=R5e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var R5e,G5,JMt=M(()=>{R5e={value:function(){}};xR.prototype=ZMt.prototype={constructor:xR,on:function(e,t){var r=this._,n=N5e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=D5e(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]=KMt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=KMt(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 xR(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)}};G5=ZMt});var B$=M(()=>{JMt()});var bR,H$,V$=M(()=>{bR="http://www.w3.org/1999/xhtml",H$={svg:"http://www.w3.org/2000/svg",xhtml:bR,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Vp(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),H$.hasOwnProperty(t)?{space:H$[t],local:e}:e}var wR=M(()=>{V$()});function O5e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===bR&&t.documentElement.namespaceURI===bR?t.createElement(e):t.createElementNS(r,e)}}function z5e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function SR(e){var t=Vp(e);return(t.local?z5e:O5e)(t)}var U$=M(()=>{wR();V$()});function F5e(){}function my(e){return e==null?F5e:function(){return this.querySelector(e)}}var MR=M(()=>{});function QMt(e){typeof e!="function"&&(e=my(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 tEt=M(()=>{wu();MR()});function B5e(){return[]}function W5(e){return e==null?B5e:function(){return this.querySelectorAll(e)}}var q$=M(()=>{});function eEt(e){typeof e!="function"&&(e=W5(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 rEt=M(()=>{wu();q$()});function Y5(e){return function(){return this.matches(e)}}var G$=M(()=>{});function nEt(e){typeof e!="function"&&(e=Y5(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 iEt=M(()=>{wu();G$()});function ER(e){return new Array(e.length)}var W$=M(()=>{});function oEt(){return new pi(this._enter||this._groups.map(ER),this._parents)}function j5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Y$=M(()=>{W$();wu();j5.prototype={constructor:j5,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 aEt(e){return function(){return e}}var sEt=M(()=>{});function H5e(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 j5(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function V5e(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=lEt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=lEt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new j5(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function cEt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?V5e:H5e,n=this._parents,i=this._groups;typeof e!="function"&&(e=aEt(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 lEt,uEt=M(()=>{wu();Y$();sEt();lEt="$"});function hEt(){return new pi(this._exit||this._groups.map(ER),this._parents)}var fEt=M(()=>{W$();wu()});function pEt(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 dEt=M(()=>{});function mEt(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 gEt=M(()=>{wu()});function _Et(){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 yEt=M(()=>{});function vEt(e){e||(e=U5e);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 U5e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var xEt=M(()=>{wu()});function bEt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var wEt=M(()=>{});function SEt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var MEt=M(()=>{});function EEt(){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 TEt=M(()=>{});function CEt(){var e=0;return this.each(function(){++e}),e}var AEt=M(()=>{});function PEt(){return!this.node()}var IEt=M(()=>{});function LEt(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 kEt=M(()=>{});function q5e(e){return function(){this.removeAttribute(e)}}function G5e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function W5e(e,t){return function(){this.setAttribute(e,t)}}function Y5e(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 X5e(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 REt(e,t){var r=Vp(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?G5e:q5e:typeof t=="function"?r.local?X5e:j5e:r.local?Y5e:W5e)(r,t))}var NEt=M(()=>{wR()});function TR(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var j$=M(()=>{});function $5e(e){return function(){this.style.removeProperty(e)}}function K5e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Z5e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function DEt(e,t,r){return arguments.length>1?this.each((t==null?$5e:typeof t=="function"?Z5e:K5e)(e,t,r==null?"":r)):ag(this.node(),e)}function ag(e,t){return e.style.getPropertyValue(t)||TR(e).getComputedStyle(e,null).getPropertyValue(t)}var X$=M(()=>{j$()});function J5e(e){return function(){delete this[e]}}function Q5e(e,t){return function(){this[e]=t}}function tTe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function OEt(e,t){return arguments.length>1?this.each((t==null?J5e:typeof t=="function"?tTe:Q5e)(e,t)):this.node()[e]}var zEt=M(()=>{});function FEt(e){return e.trim().split(/^|\s+/)}function $$(e){return e.classList||new BEt(e)}function BEt(e){this._node=e,this._names=FEt(e.getAttribute("class")||"")}function HEt(e,t){for(var r=$$(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function VEt(e,t){for(var r=$$(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function eTe(e){return function(){HEt(this,e)}}function rTe(e){return function(){VEt(this,e)}}function nTe(e,t){return function(){(t.apply(this,arguments)?HEt:VEt)(this,e)}}function UEt(e,t){var r=FEt(e+"");if(arguments.length<2){for(var n=$$(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?nTe:t?eTe:rTe)(r,t))}var qEt=M(()=>{BEt.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 iTe(){this.textContent=""}function oTe(e){return function(){this.textContent=e}}function aTe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function GEt(e){return arguments.length?this.each(e==null?iTe:(typeof e=="function"?aTe:oTe)(e)):this.node().textContent}var WEt=M(()=>{});function sTe(){this.innerHTML=""}function lTe(e){return function(){this.innerHTML=e}}function cTe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function YEt(e){return arguments.length?this.each(e==null?sTe:(typeof e=="function"?cTe:lTe)(e)):this.node().innerHTML}var jEt=M(()=>{});function uTe(){this.nextSibling&&this.parentNode.appendChild(this)}function XEt(){return this.each(uTe)}var $Et=M(()=>{});function hTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function KEt(){return this.each(hTe)}var ZEt=M(()=>{});function JEt(e){var t=typeof e=="function"?e:SR(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var QEt=M(()=>{U$()});function fTe(){return null}function t5t(e,t){var r=typeof e=="function"?e:SR(e),n=t==null?fTe:typeof t=="function"?t:my(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var e5t=M(()=>{U$();MR()});function pTe(){var e=this.parentNode;e&&e.removeChild(this)}function r5t(){return this.each(pTe)}var n5t=M(()=>{});function dTe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mTe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function i5t(e){return this.select(e?mTe:dTe)}var o5t=M(()=>{});function a5t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var s5t=M(()=>{});function gTe(e,t,r){return e=u5t(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function u5t(e,t,r){return function(n){var i=wr;wr=n;try{e.call(this,this.__data__,t,r)}finally{wr=i}}}function _Te(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 yTe(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 vTe(e,t,r){var n=c5t.hasOwnProperty(e.type)?gTe:u5t;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 h5t(e,t,r){var n=_Te(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?vTe:yTe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function K$(e,t,r,n){var i=wr;e.sourceEvent=wr,wr=e;try{return t.apply(r,n)}finally{wr=i}}var c5t,wr,l5t,CR=M(()=>{c5t={},wr=null;typeof document!="undefined"&&(l5t=document.documentElement,"onmouseenter"in l5t||(c5t={mouseenter:"mouseover",mouseleave:"mouseout"}))});function f5t(e,t,r){var n=TR(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 xTe(e,t){return function(){return f5t(this,e,t)}}function bTe(e,t){return function(){return f5t(this,e,t.apply(this,arguments))}}function p5t(e,t){return this.each((typeof t=="function"?bTe:xTe)(e,t))}var d5t=M(()=>{j$()});function pi(e,t){this._groups=e,this._parents=t}function m5t(){return new pi([[document.documentElement]],Z$)}var Z$,Up,wu=M(()=>{tEt();rEt();iEt();uEt();Y$();fEt();dEt();gEt();yEt();xEt();wEt();MEt();TEt();AEt();IEt();kEt();NEt();X$();zEt();qEt();WEt();jEt();$Et();ZEt();QEt();e5t();n5t();o5t();s5t();CR();d5t();Z$=[null];pi.prototype=m5t.prototype={constructor:pi,select:QMt,selectAll:eEt,filter:nEt,data:cEt,enter:oEt,exit:hEt,join:pEt,merge:mEt,order:_Et,sort:vEt,call:bEt,nodes:SEt,node:EEt,size:CEt,empty:PEt,each:LEt,attr:REt,style:DEt,property:OEt,classed:UEt,text:GEt,html:YEt,raise:XEt,lower:KEt,append:JEt,insert:t5t,remove:r5t,clone:i5t,datum:a5t,on:h5t,dispatch:p5t};Up=m5t});function qp(e){return typeof e=="string"?new pi([[document.querySelector(e)]],[document.documentElement]):new pi([[e]],Z$)}var g5t=M(()=>{wu()});function _5t(){for(var e=wr,t;t=e.sourceEvent;)e=t;return e}var y5t=M(()=>{CR()});function v5t(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 x5t=M(()=>{});function AR(e){var t=_5t();return t.changedTouches&&(t=t.changedTouches[0]),v5t(e,t)}var b5t=M(()=>{y5t();x5t()});var Es=M(()=>{G$();b5t();wR();g5t();wu();MR();q$();X$();CR()});function PR(){wr.preventDefault(),wr.stopImmediatePropagation()}var w5t=M(()=>{Es()});function J$(e){var t=e.document.documentElement,r=qp(e).on("dragstart.drag",PR,!0);"onselectstart"in t?r.on("selectstart.drag",PR,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Q$(e,t){var r=e.document.documentElement,n=qp(e).on("dragstart.drag",null);t&&(n.on("click.drag",PR,!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 S5t=M(()=>{Es();w5t()});var M5t=M(()=>{S5t()});function IR(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function tK(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var E5t=M(()=>{});function K5(){}function C5t(){return this.rgb().formatHex()}function PTe(){return R5t(this).formatHsl()}function A5t(){return this.rgb().formatRgb()}function Su(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wTe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?P5t(t):r===3?new sl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?LR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?LR(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=STe.exec(e))?new sl(t[1],t[2],t[3],1):(t=MTe.exec(e))?new sl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ETe.exec(e))?LR(t[1],t[2],t[3],t[4]):(t=TTe.exec(e))?LR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CTe.exec(e))?k5t(t[1],t[2]/100,t[3]/100,1):(t=ATe.exec(e))?k5t(t[1],t[2]/100,t[3]/100,t[4]):T5t.hasOwnProperty(e)?P5t(T5t[e]):e==="transparent"?new sl(NaN,NaN,NaN,0):null}function P5t(e){return new sl(e>>16&255,e>>8&255,e&255,1)}function LR(e,t,r,n){return n<=0&&(e=t=r=NaN),new sl(e,t,r,n)}function ITe(e){return e instanceof K5||(e=Su(e)),e?(e=e.rgb(),new sl(e.r,e.g,e.b,e.opacity)):new sl}function u2(e,t,r,n){return arguments.length===1?ITe(e):new sl(e,t,r,n==null?1:n)}function sl(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function I5t(){return"#"+eK(this.r)+eK(this.g)+eK(this.b)}function L5t(){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 eK(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function k5t(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 R5t(e){if(e instanceof Kh)return new Kh(e.h,e.s,e.l,e.opacity);if(e instanceof K5||(e=Su(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 N5t(e,t,r,n){return arguments.length===1?R5t(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}function rK(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 X5,kR,c2,$5,Zh,wTe,STe,MTe,ETe,TTe,CTe,ATe,T5t,D5t=M(()=>{E5t();X5=.7,kR=1/X5,c2="\\s*([+-]?\\d+)\\s*",$5="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wTe=/^#([0-9a-f]{3,8})$/,STe=new RegExp("^rgb\\("+[c2,c2,c2]+"\\)$"),MTe=new RegExp("^rgb\\("+[Zh,Zh,Zh]+"\\)$"),ETe=new RegExp("^rgba\\("+[c2,c2,c2,$5]+"\\)$"),TTe=new RegExp("^rgba\\("+[Zh,Zh,Zh,$5]+"\\)$"),CTe=new RegExp("^hsl\\("+[$5,Zh,Zh]+"\\)$"),ATe=new RegExp("^hsla\\("+[$5,Zh,Zh,$5]+"\\)$"),T5t={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};IR(K5,Su,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:C5t,formatHex:C5t,formatHsl:PTe,formatRgb:A5t,toString:A5t});IR(sl,u2,tK(K5,{brighter:function(e){return e=e==null?kR:Math.pow(kR,e),new sl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?X5:Math.pow(X5,e),new sl(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:I5t,formatHex:I5t,formatRgb:L5t,toString:L5t}));IR(Kh,N5t,tK(K5,{brighter:function(e){return e=e==null?kR:Math.pow(kR,e),new Kh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?X5:Math.pow(X5,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 sl(rK(e>=240?e-240:e+120,i,n),rK(e,i,n),rK(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 RR=M(()=>{D5t()});function nK(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 O5t(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 nK((r-n/t)*t,a,i,o,s)}}var iK=M(()=>{});function z5t(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 nK((r-n/t)*t,i,o,a,s)}}var F5t=M(()=>{iK()});function Z5(e){return function(){return e}}var oK=M(()=>{});function LTe(e,t){return function(r){return e+r*t}}function kTe(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 B5t(e){return(e=+e)==1?NR:function(t,r){return r-t?kTe(t,r,e):Z5(isNaN(t)?r:t)}}function NR(e,t){var r=t-e;return r?LTe(e,r):Z5(isNaN(e)?t:e)}var H5t=M(()=>{oK()});function V5t(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 gy,RTe,NTe,aK=M(()=>{RR();iK();F5t();H5t();gy=function e(t){var r=B5t(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=NR(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);RTe=V5t(O5t),NTe=V5t(z5t)});function U5t(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 q5t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var G5t=M(()=>{});function W5t(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]=_y(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 Y5t=M(()=>{DR()});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 X5t=M(()=>{});function Ua(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var J5=M(()=>{});function $5t(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]=_y(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var K5t=M(()=>{DR()});function DTe(e){return function(){return e}}function OTe(e){return function(t){return e(t)+""}}function Q5(e,t){var r=lK.lastIndex=sK.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=lK.exec(e))&&(i=sK.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:Ua(n,i)})),r=sK.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?OTe(l[0].x):DTe(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 lK,sK,cK=M(()=>{J5();lK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sK=new RegExp(lK.source,"g")});function _y(e,t){var r=typeof t,n;return t==null||r==="boolean"?Z5(t):(r==="number"?Ua:r==="string"?(n=Su(t))?(t=n,gy):Q5:t instanceof Su?gy:t instanceof Date?j5t:q5t(t)?U5t:Array.isArray(t)?W5t:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$5t:Ua)(e,t)}var DR=M(()=>{RR();aK();Y5t();X5t();J5();K5t();cK();oK();G5t()});function uK(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)*Z5t,skewX:Math.atan(l)*Z5t,scaleX:a,scaleY:s}}var Z5t,OR,J5t=M(()=>{Z5t=180/Math.PI,OR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function tTt(e){return e==="none"?OR:(tT||(tT=document.createElement("DIV"),hK=document.documentElement,Q5t=document.defaultView),tT.style.transform=e,e=Q5t.getComputedStyle(hK.appendChild(tT),null).getPropertyValue("transform"),hK.removeChild(tT),e=e.slice(7,-1).split(","),uK(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function eTt(e){return e==null?OR:(zR||(zR=document.createElementNS("http://www.w3.org/2000/svg","g")),zR.setAttribute("transform",e),(e=zR.transform.baseVal.consolidate())?(e=e.matrix,uK(e.a,e.b,e.c,e.d,e.e,e.f)):OR)}var tT,hK,Q5t,zR,rTt=M(()=>{J5t()});function nTt(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:Ua(c,h)},{i:g-2,x:Ua(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:Ua(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:Ua(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:Ua(c,h)},{i:g-2,x:Ua(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 fK,pK,iTt=M(()=>{J5();rTt();fK=nTt(tTt,"px, ","px)","deg)"),pK=nTt(eTt,", ",")",")")});var eT=M(()=>{DR();J5();cK();iTt();aK()});function f2(){return yy||(sTt(zTe),yy=oT.now()+HR)}function zTe(){yy=0}function aT(){this._call=this._time=this._next=null}function VR(e,t,r){var n=new aT;return n.restart(e,t,r),n}function lTt(){f2(),++h2;for(var e=FR,t;e;)(t=yy-e._time)>=0&&e._call.call(null,t),e=e._next;--h2}function oTt(){yy=(BR=oT.now())+HR,h2=nT=0;try{lTt()}finally{h2=0,BTe(),yy=0}}function FTe(){var e=oT.now(),t=e-BR;t>aTt&&(HR-=t,BR=e)}function BTe(){for(var e,t=FR,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:FR=r);iT=e,dK(n)}function dK(e){if(!h2){nT&&(nT=clearTimeout(nT));var t=e-yy;t>24?(e<1/0&&(nT=setTimeout(oTt,e-oT.now()-HR)),rT&&(rT=clearInterval(rT))):(rT||(BR=oT.now(),rT=setInterval(FTe,aTt)),h2=1,sTt(oTt))}}var h2,nT,rT,aTt,FR,iT,BR,yy,HR,oT,sTt,mK=M(()=>{h2=0,nT=0,rT=0,aTt=1e3,BR=0,yy=0,HR=0,oT=typeof performance=="object"&&performance.now?performance:Date,sTt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};aT.prototype=VR.prototype={constructor:aT,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&&iT!==this&&(iT?iT._next=this:FR=this,iT=this),this._call=e,this._time=r,dK()},stop:function(){this._call&&(this._call=null,this._time=1/0,dK())}}});function UR(e,t,r){var n=new aT;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var cTt=M(()=>{mK()});var gK=M(()=>{mK();cTt()});function sg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;UTe(e,r,{name:t,index:n,group:i,on:HTe,tween:VTe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:hTt})}function lT(e,t){var r=Qi(e,t);if(r.state>hTt)throw new Error("too late; already scheduled");return r}function qa(e,t){var r=Qi(e,t);if(r.state>qR)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 UTe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=VR(o,0,r.time);function o(c){r.state=_K,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!==_K)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===qR)return UR(a);p.state===uTt?(p.state=sT,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=sT,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(UR(function(){r.state===qR&&(r.state=uTt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=GR,r.on.call("start",e,e.__data__,r.index,r.group),r.state===GR){for(r.state=qR,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=WR,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===WR&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=sT,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var HTe,VTe,hTt,_K,GR,qR,uTt,WR,sT,Ts=M(()=>{B$();gK();HTe=G5("start","end","cancel","interrupt"),VTe=[],hTt=0,_K=1,GR=2,qR=3,uTt=4,WR=5,sT=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>GR&&n.state<WR,n.state=sT,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var yK=M(()=>{Ts()});function fTt(e){return this.each(function(){p2(this,e)})}var pTt=M(()=>{yK()});function qTe(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 GTe(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 dTt(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?qTe:GTe)(r,e,t))}function d2(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 Qi(i,n).value[t]}}var cT=M(()=>{Ts()});function YR(e,t){var r;return(typeof t=="number"?Ua:t instanceof Su?gy:(r=Su(t))?(t=r,gy):Q5)(e,t)}var vK=M(()=>{RR();eT()});function WTe(e){return function(){this.removeAttribute(e)}}function YTe(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 XTe(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 $Te(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 KTe(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 mTt(e,t){var r=Vp(e),n=r==="transform"?pK:YR;return this.attrTween(e,typeof t=="function"?(r.local?KTe:$Te)(r,n,d2(this,"attr."+e,t)):t==null?(r.local?YTe:WTe)(r):(r.local?XTe:jTe)(r,n,t))}var gTt=M(()=>{eT();Es();cT();vK()});function ZTe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function JTe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function QTe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&JTe(e,o)),r}return i._value=t,i}function tCe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&ZTe(e,o)),r}return i._value=t,i}function _Tt(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=Vp(e);return this.tween(r,(n.local?QTe:tCe)(n,t))}var yTt=M(()=>{Es()});function eCe(e,t){return function(){lT(this,e).delay=+t.apply(this,arguments)}}function rCe(e,t){return t=+t,function(){lT(this,e).delay=t}}function vTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eCe:rCe)(t,e)):Qi(this.node(),t).delay}var xTt=M(()=>{Ts()});function nCe(e,t){return function(){qa(this,e).duration=+t.apply(this,arguments)}}function iCe(e,t){return t=+t,function(){qa(this,e).duration=t}}function bTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nCe:iCe)(t,e)):Qi(this.node(),t).duration}var wTt=M(()=>{Ts()});function oCe(e,t){if(typeof t!="function")throw new Error;return function(){qa(this,e).ease=t}}function STt(e){var t=this._id;return arguments.length?this.each(oCe(t,e)):Qi(this.node(),t).ease}var MTt=M(()=>{Ts()});function ETt(e){typeof e!="function"&&(e=Y5(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 ua(n,this._parents,this._name,this._id)}var TTt=M(()=>{Es();Gp()});function CTt(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 ua(a,this._parents,this._name,this._id)}var ATt=M(()=>{Gp()});function aCe(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 sCe(e,t,r){var n,i,o=aCe(t)?lT:qa;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function PTt(e,t){var r=this._id;return arguments.length<2?Qi(this.node(),r).on.on(e):this.each(sCe(r,e,t))}var ITt=M(()=>{Ts()});function lCe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function LTt(){return this.on("end.remove",lCe(this._id))}var kTt=M(()=>{});function RTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=my(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,sg(c[f],t,r,f,c,Qi(u,r)));return new ua(o,this._parents,t,r)}var NTt=M(()=>{Es();Gp();Ts()});function DTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=W5(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])&&sg(p,t,r,g,f,d);o.push(f),a.push(u)}return new ua(o,a,t,r)}var OTt=M(()=>{Es();Gp();Ts()});function zTt(){return new cCe(this._groups,this._parents)}var cCe,FTt=M(()=>{Es();cCe=Up.prototype.constructor});function uCe(e,t){var r,n,i;return function(){var o=ag(this,e),a=(this.style.removeProperty(e),ag(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function BTt(e){return function(){this.style.removeProperty(e)}}function hCe(e,t,r){var n,i=r+"",o;return function(){var a=ag(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function fCe(e,t,r){var n,i,o;return function(){var a=ag(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),ag(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function pCe(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=BTt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function HTt(e,t,r){var n=(e+="")=="transform"?fK:YR;return t==null?this.styleTween(e,uCe(e,n)).on("end.style."+e,BTt(e)):typeof t=="function"?this.styleTween(e,fCe(e,n,d2(this,"style."+e,t))).each(pCe(this._id,e)):this.styleTween(e,hCe(e,n,t),r).on("end.style."+e,null)}var VTt=M(()=>{eT();Es();Ts();cT();vK()});function dCe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function mCe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&dCe(e,a,r)),n}return o._value=t,o}function UTt(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,mCe(e,t,r==null?"":r))}var qTt=M(()=>{});function gCe(e){return function(){this.textContent=e}}function _Ce(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function GTt(e){return this.tween("text",typeof e=="function"?_Ce(d2(this,"text",e)):gCe(e==null?"":e+""))}var WTt=M(()=>{cT()});function yCe(e){return function(t){this.textContent=e.call(this,t)}}function vCe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&yCe(i)),t}return n._value=e,n}function YTt(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,vCe(e))}var jTt=M(()=>{});function XTt(){for(var e=this._name,t=this._id,r=jR(),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);sg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ua(n,this._parents,e,r)}var $Tt=M(()=>{Gp();Ts()});function KTt(){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 ZTt=M(()=>{Ts()});function ua(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function xK(e){return Up().transition(e)}function jR(){return++xCe}var xCe,m2,Gp=M(()=>{Es();gTt();yTt();xTt();wTt();MTt();TTt();ATt();ITt();kTt();NTt();OTt();FTt();VTt();qTt();WTt();jTt();$Tt();cT();ZTt();xCe=0;m2=Up.prototype;ua.prototype=xK.prototype={constructor:ua,select:RTt,selectAll:DTt,filter:ETt,merge:CTt,selection:zTt,transition:XTt,call:m2.call,nodes:m2.nodes,node:m2.node,size:m2.size,empty:m2.empty,each:m2.each,on:PTt,attr:mTt,attrTween:_Tt,style:HTt,styleTween:UTt,text:GTt,textTween:YTt,remove:LTt,tween:dTt,delay:vTt,duration:bTt,ease:STt,end:KTt}});function bCe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return bK.time=f2(),bK;return r}function JTt(e){var t,r;e instanceof ua?(t=e._id,e=e._name):(t=jR(),(r=bK).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])&&sg(l,e,t,c,a,r||bCe(l,t));return new ua(n,this._parents,e,t)}var bK,QTt=M(()=>{Gp();Ts();I_();gK();bK={time:null,delay:0,duration:250,ease:xs}});var tCt=M(()=>{Es();pTt();QTt();Up.prototype.interrupt=fTt;Up.prototype.transition=JTt});var eCt=M(()=>{Gp();Ts()});var rCt=M(()=>{tCt();Gp();eCt();yK()});function wK(e){return function(){return e}}var nCt=M(()=>{});function iCt(e,t,r){this.target=e,this.type=t,this.selection=r}var oCt=M(()=>{});function SK(){wr.stopImmediatePropagation()}function uT(){wr.preventDefault(),wr.stopImmediatePropagation()}var aCt=M(()=>{Es()});function hT(e){return{type:e}}function ECe(){return!wr.button}function TCe(){var e=this.ownerSVGElement||this;return[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function EK(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function TK(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function uCt(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function hCt(){return CK(XR)}function fCt(){return CK($R)}function pCt(){return CK(wCe)}function CK(e){var t=TCe,r=ECe,n=G5(a,"start","brush","end"),i=6,o;function a(f){var p=f.property("__brush",h).selectAll(".overlay").data([hT("overlay")]);p.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Wp.overlay).merge(p).each(function(){var g=EK(this).extent;qp(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([hT("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Wp.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 Wp[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=_y(y,x);function S(C){g.selection=C===1&&TK(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||TK(y)?null:y,s.call(d),x.start().brush().end()})};function s(){var f=qp(this),p=EK(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){K$(new iCt(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 uT()}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"?sCt:wr.altKey?_2:g2,g=e===$R?null:SCe[p],_=e===XR?null:MCe[p],y=EK(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=AR(f),bt=St,Mt=l(f,arguments).beforestart();p==="overlay"?y.selection=b=[[C=e===$R?S:St[0],O=e===XR?k:St[1]],[I=e===$R?B:C,F=e===XR?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=qp(f).attr("pointer-events","none"),Kt=lt.selectAll(".overlay").attr("cursor",Wp[p]);if(wr.touches)lt.on("touchmove.brush",ct,!0).on("touchend.brush touchcancel.brush",et,!0);else{var _t=qp(wr.view).on("keydown.brush",dt,!0).on("keyup.brush",q,!0).on("mousemove.brush",ct,!0).on("mouseup.brush",et,!0);J$(wr.view)}SK(),p2(f),s.call(f),Mt.start();function ct(){var pt=AR(f);rt&&!ot&&!st&&(Math.abs(pt[0]-bt[0])>Math.abs(pt[1]-bt[1])?st=!0:ot=!0),bt=pt,Z=!0,uT(),X()}function X(){var pt;switch(U=bt[0]-St[0],W=bt[1]-St[1],d){case MK:case sCt:{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 lCt&&Kt.attr("cursor",Wp[p=lCt[p]])),z<D&&(_*=-1,pt=O,O=F,F=pt,pt=D,D=z,z=pt,p in cCt&&Kt.attr("cursor",Wp[p=cCt[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(SK(),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 Q$(wr.view,Z),_t.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);lt.attr("pointer-events","all"),Kt.attr("cursor",Wp.overlay),y.selection&&(b=y.selection),TK(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=MK,Kt.attr("cursor",Wp.selection),X());break}default:return}uT()}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===MK&&(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",Wp[p]),X());break}default:return}uT()}}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:wK([[+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:wK(!!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 sCt,MK,g2,_2,XR,$R,wCe,Wp,lCt,cCt,SCe,MCe,dCt=M(()=>{B$();M5t();eT();Es();rCt();nCt();oCt();aCt();sCt={name:"drag"},MK={name:"space"},g2={name:"handle"},_2={name:"center"},XR={name:"x",handles:["e","w"].map(hT),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]]}},$R={name:"y",handles:["n","s"].map(hT),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]]}},wCe={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(hT),input:function(e){return e},output:function(e){return e}},Wp={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"},lCt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},cCt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},SCe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},MCe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1}});var mCt=M(()=>{dCt()});function lg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var vy=M(()=>{});function AK(e){return e.length===1&&(e=CCe(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 CCe(e){return function(t,r){return lg(e(t),r)}}var PK=M(()=>{vy()});var gCt,ACe,PCe,IK=M(()=>{vy();PK();gCt=AK(lg),ACe=gCt.right,PCe=gCt.left});var LK=M(()=>{});var _Ct=M(()=>{LK()});var yCt=M(()=>{});var y2=M(()=>{});var kK=M(()=>{y2()});var RK=M(()=>{kK()});var NK=M(()=>{});var vCt,LCe,kCe,DK=M(()=>{vCt=Array.prototype,LCe=vCt.slice,kCe=vCt.map});var xCt=M(()=>{});var bCt=M(()=>{});function fT(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 OK=M(()=>{});var fln,pln,dln,zK=M(()=>{fln=Math.sqrt(50),pln=Math.sqrt(10),dln=Math.sqrt(2)});var FK=M(()=>{});var wCt=M(()=>{DK();IK();xCt();NK();bCt();OK();zK();FK()});var ZR=M(()=>{y2()});var MCt=M(()=>{DK();vy();y2();ZR()});var ECt=M(()=>{RK()});var TCt=M(()=>{});var CCt=M(()=>{y2()});var ACt=M(()=>{vy();y2();ZR()});var PCt=M(()=>{});var BK=M(()=>{});var ICt=M(()=>{});var LCt=M(()=>{vy()});var kCt=M(()=>{});var RCt=M(()=>{});var HK=M(()=>{BK()});var NCt=M(()=>{HK()});var DCt=M(()=>{IK();vy();PK();_Ct();yCt();RK();NK();wCt();MCt();ECt();FK();TCt();CCt();ACt();PCt();BK();LK();ICt();ZR();OK();LCt();kCt();RCt();zK();HK();kK();NCt()});var VK,UK,OCt,pT,qK,GK,WK=M(()=>{VK=Math.cos,UK=Math.sin,OCt=Math.PI,pT=OCt/2,qK=OCt*2,GK=Math.max});function HCe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function zCt(){var e=0,t=null,r=null,n=null;function i(o){var a=o.length,s=[],l=fT(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(fT(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=GK(0,qK-e*a)/p,_=p?e:qK/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=GK(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=HCe(o))._=o,i):n&&n._},i}var FCt=M(()=>{DCt();WK()});var BCt,HCt=M(()=>{BCt=Array.prototype.slice});function JR(e){return function(){return e}}var VCt=M(()=>{});function XK(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function UCt(){return new XK}var YK,jK,xy,VCe,$K,qCt=M(()=>{YK=Math.PI,jK=2*YK,xy=1e-6,VCe=jK-xy;XK.prototype=UCt.prototype={constructor:XK,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>xy)if(!(Math.abs(u*s-l*c)>xy)||!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((YK-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>xy&&(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)>xy||Math.abs(this._y1-c)>xy)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%jK+jK),h>VCe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>xy&&(this._+="A"+r+","+r+",0,"+ +(h>=YK)+","+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._}};$K=UCt});var GCt=M(()=>{qCt()});function UCe(e){return e.source}function qCe(e){return e.target}function GCe(e){return e.radius}function WCe(e){return e.startAngle}function YCe(e){return e.endAngle}function WCt(){var e=UCe,t=qCe,r=GCe,n=WCe,i=YCe,o=null;function a(){var s,l=BCt.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)-pT,p=i.apply(this,l)-pT,d=h*VK(f),g=h*UK(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-pT,x=i.apply(this,l)-pT;if(o||(o=s=$K()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*VK(y),_*UK(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:JR(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:JR(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:JR(+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 YCt=M(()=>{HCt();VCt();WK();GCt()});var jCt=M(()=>{FCt();YCt()});function QR(){}function XCt(e,t){var r=new QR;if(e instanceof QR)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 ll,by,tN=M(()=>{ll="$";QR.prototype=XCt.prototype={constructor:QR,has:function(e){return ll+e in this},get:function(e){return this[ll+e]},set:function(e,t){return this[ll+e]=t,this},remove:function(e){var t=ll+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===ll&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===ll&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===ll&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===ll&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===ll&&++e;return e},empty:function(){for(var e in this)if(e[0]===ll)return!1;return!0},each:function(e){for(var t in this)t[0]===ll&&e(this[t],t.slice(1),this)}};by=XCt});function ZCt(){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,_=by(),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,XCe)},map:function(s){return o(s,0,$Ct,KCt)},entries:function(s){return a(o(s,0,$Ct,KCt),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 XCe(e,t,r){e[t]=r}function $Ct(){return by()}function KCt(e,t,r){e.set(t,r)}var JCt=M(()=>{tN()});function eN(){}function QCt(e,t){var r=new eN;if(e instanceof eN)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 wy,tAt,eAt=M(()=>{tN();wy=by.prototype;eN.prototype=QCt.prototype={constructor:eN,has:wy.has,add:function(e){return e+="",this[ll+e]=e,this},remove:wy.remove,clear:wy.clear,values:wy.keys,size:wy.size,empty:wy.empty,each:wy.each};tAt=QCt});function rAt(e){var t=[];for(var r in e)t.push(r);return t}var nAt=M(()=>{});function iAt(e){var t=[];for(var r in e)t.push(e[r]);return t}var oAt=M(()=>{});function aAt(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var sAt=M(()=>{});var lAt=M(()=>{JCt();eAt();tN();nAt();oAt();sAt()});function Yp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var rN=M(()=>{});function tf(){}function x2(e){var t;return e=(e+"").trim().toLowerCase(),(t=$Ce.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=KCe.exec(e))?uAt(parseInt(t[1],16)):(t=ZCe.exec(e))?new to(t[1],t[2],t[3],1):(t=JCe.exec(e))?new to(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QCe.exec(e))?hAt(t[1],t[2],t[3],t[4]):(t=tAe.exec(e))?hAt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eAe.exec(e))?fAt(t[1],t[2]/100,t[3]/100,1):(t=rAe.exec(e))?fAt(t[1],t[2]/100,t[3]/100,t[4]):cAt.hasOwnProperty(e)?uAt(cAt[e]):e==="transparent"?new to(NaN,NaN,NaN,0):null}function uAt(e){return new to(e>>16&255,e>>8&255,e&255,1)}function hAt(e,t,r,n){return n<=0&&(e=t=r=NaN),new to(e,t,r,n)}function mT(e){return e instanceof tf||(e=x2(e)),e?(e=e.rgb(),new to(e.r,e.g,e.b,e.opacity)):new to}function ZK(e,t,r,n){return arguments.length===1?mT(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 fAt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Jh(e,t,r,n)}function nAe(e){if(e instanceof Jh)return new Jh(e.h,e.s,e.l,e.opacity);if(e instanceof tf||(e=x2(e)),!e)return new Jh;if(e instanceof Jh)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 Jh(a,s,l,e.opacity)}function JK(e,t,r,n){return arguments.length===1?nAe(e):new Jh(e,t,r,n==null?1:n)}function Jh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function KK(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 ug,Sy,v2,dT,Qh,$Ce,KCe,ZCe,JCe,QCe,tAe,eAe,rAe,cAt,nN=M(()=>{rN();ug=.7,Sy=1/ug,v2="\\s*([+-]?\\d+)\\s*",dT="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$Ce=/^#([0-9a-f]{3})$/,KCe=/^#([0-9a-f]{6})$/,ZCe=new RegExp("^rgb\\("+[v2,v2,v2]+"\\)$"),JCe=new RegExp("^rgb\\("+[Qh,Qh,Qh]+"\\)$"),QCe=new RegExp("^rgba\\("+[v2,v2,v2,dT]+"\\)$"),tAe=new RegExp("^rgba\\("+[Qh,Qh,Qh,dT]+"\\)$"),eAe=new RegExp("^hsl\\("+[dT,Qh,Qh]+"\\)$"),rAe=new RegExp("^hsla\\("+[dT,Qh,Qh,dT]+"\\)$"),cAt={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};Yp(tf,x2,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});Yp(to,ZK,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new to(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,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+")")}}));Yp(Jh,JK,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new Jh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,e),new Jh(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(KK(e>=240?e-240:e+120,i,n),KK(e,i,n),KK(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 iN,oN,QK=M(()=>{iN=Math.PI/180,oN=180/Math.PI});function iZ(e){if(e instanceof jp)return new jp(e.l,e.a,e.b,e.opacity);if(e instanceof hg){var t=e.h*iN;return new jp(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof to||(e=mT(e));var r=nZ(e.r),n=nZ(e.g),i=nZ(e.b),o=tZ((.4124564*r+.3575761*n+.1804375*i)/pAt),a=tZ((.2126729*r+.7151522*n+.072175*i)/dAt),s=tZ((.0193339*r+.119192*n+.9503041*i)/mAt);return new jp(116*a-16,500*(o-a),200*(a-s),e.opacity)}function sN(e,t,r,n){return arguments.length===1?iZ(e):new jp(e,t,r,n==null?1:n)}function jp(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function tZ(e){return e>iAe?Math.pow(e,1/3):e/_At+gAt}function eZ(e){return e>b2?e*e*e:_At*(e-gAt)}function rZ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function nZ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function oAe(e){if(e instanceof hg)return new hg(e.h,e.c,e.l,e.opacity);e instanceof jp||(e=iZ(e));var t=Math.atan2(e.b,e.a)*oN;return new hg(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function oZ(e,t,r,n){return arguments.length===1?oAe(e):new hg(e,t,r,n==null?1:n)}function hg(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}var aN,pAt,dAt,mAt,gAt,b2,_At,iAe,yAt=M(()=>{rN();nN();QK();aN=18,pAt=.95047,dAt=1,mAt=1.08883,gAt=4/29,b2=6/29,_At=3*b2*b2,iAe=b2*b2*b2;Yp(jp,sN,cg(tf,{brighter:function(e){return new jp(this.l+aN*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new jp(this.l-aN*(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=dAt*eZ(e),t=pAt*eZ(t),r=mAt*eZ(r),new to(rZ(3.2404542*t-1.5371385*e-.4985314*r),rZ(-.969266*t+1.8760108*e+.041556*r),rZ(.0556434*t-.2040259*e+1.0572252*r),this.opacity)}}));Yp(hg,oZ,cg(tf,{brighter:function(e){return new hg(this.h,this.c,this.l+aN*(e==null?1:e),this.opacity)},darker:function(e){return new hg(this.h,this.c,this.l-aN*(e==null?1:e),this.opacity)},rgb:function(){return iZ(this).rgb()}}))});function aAe(e){if(e instanceof My)return new My(e.h,e.s,e.l,e.opacity);e instanceof to||(e=mT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(bAt*n+vAt*t-xAt*r)/(bAt+vAt-xAt),o=n-i,a=(gT*(r-i)-sZ*o)/lN,s=Math.sqrt(a*a+o*o)/(gT*i*(1-i)),l=s?Math.atan2(a,o)*oN-120:NaN;return new My(l<0?l+360:l,s,i,e.opacity)}function cN(e,t,r,n){return arguments.length===1?aAe(e):new My(e,t,r,n==null?1:n)}function My(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var wAt,aZ,sZ,lN,gT,vAt,xAt,bAt,SAt=M(()=>{rN();nN();QK();wAt=-.14861,aZ=1.78277,sZ=-.29227,lN=-.90649,gT=1.97294,vAt=gT*lN,xAt=gT*aZ,bAt=aZ*sZ-lN*wAt;Yp(My,cN,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new My(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,e),new My(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*iN,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*(wAt*n+aZ*i)),255*(t+r*(sZ*n+lN*i)),255*(t+r*(gT*n)),this.opacity)}}))});var MAt=M(()=>{nN();yAt();SAt()});function TAt(){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 uN(r)}function uN(e){this._=e}function lAe(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 cAe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function EAt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=sAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var sAe,CAt,AAt=M(()=>{sAe={value:function(){}};uN.prototype=TAt.prototype={constructor:uN,on:function(e,t){var r=this._,n=lAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=cAe(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]=EAt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=EAt(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 uN(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)}};CAt=TAt});var PAt=M(()=>{AAt()});function LAt(){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 hN(r)}function hN(e){this._=e}function hAe(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 fAe(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]=uAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var uAe,lZ,kAt=M(()=>{uAe={value:function(){}};hN.prototype=LAt.prototype={constructor:hN,on:function(e,t){var r=this._,n=hAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=fAe(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)}};lZ=LAt});var RAt=M(()=>{kAt()});var fN,cZ,uZ=M(()=>{fN="http://www.w3.org/1999/xhtml",cZ={svg:"http://www.w3.org/2000/svg",xhtml:fN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function pN(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),cZ.hasOwnProperty(t)?{space:cZ[t],local:e}:e}var hZ=M(()=>{uZ()});function pAe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===fN&&t.documentElement.namespaceURI===fN?t.createElement(e):t.createElementNS(r,e)}}function dAe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function dN(e){var t=pN(e);return(t.local?dAe:pAe)(t)}var fZ=M(()=>{hZ();uZ()});function mAe(){}function mN(e){return e==null?mAe:function(){return this.querySelector(e)}}var pZ=M(()=>{});function NAt(e){typeof e!="function"&&(e=mN(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 di(n,this._parents)}var DAt=M(()=>{ef();pZ()});function gAe(){return[]}function OAt(e){return e==null?gAe:function(){return this.querySelectorAll(e)}}var zAt=M(()=>{});function FAt(e){typeof e!="function"&&(e=OAt(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 di(n,i)}var BAt=M(()=>{ef();zAt()});function HAt(e){return function(){return this.matches(e)}}var VAt=M(()=>{});function UAt(e){typeof e!="function"&&(e=HAt(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 di(n,this._parents)}var qAt=M(()=>{ef();VAt()});function gN(e){return new Array(e.length)}var dZ=M(()=>{});function GAt(){return new di(this._enter||this._groups.map(gN),this._parents)}function _T(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var mZ=M(()=>{dZ();ef();_T.prototype={constructor:_T,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 WAt(e){return function(){return e}}var YAt=M(()=>{});function _Ae(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 _T(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function yAe(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 _T(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function XAt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?yAe:_Ae,n=this._parents,i=this._groups;typeof e!="function"&&(e=WAt(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 di(a,n),a._enter=s,a._exit=l,a}var jAt,$At=M(()=>{ef();mZ();YAt();jAt="$"});function KAt(){return new di(this._exit||this._groups.map(gN),this._parents)}var ZAt=M(()=>{dZ();ef()});function JAt(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 QAt=M(()=>{});function t4t(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 di(a,this._parents)}var e4t=M(()=>{ef()});function r4t(){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 n4t=M(()=>{});function i4t(e){e||(e=vAe);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 di(i,this._parents).order()}function vAe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var o4t=M(()=>{ef()});function a4t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var s4t=M(()=>{});function l4t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var c4t=M(()=>{});function u4t(){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 h4t=M(()=>{});function f4t(){var e=0;return this.each(function(){++e}),e}var p4t=M(()=>{});function d4t(){return!this.node()}var m4t=M(()=>{});function g4t(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 _4t=M(()=>{});function xAe(e){return function(){this.removeAttribute(e)}}function bAe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wAe(e,t){return function(){this.setAttribute(e,t)}}function SAe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function MAe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function EAe(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 y4t(e,t){var r=pN(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?bAe:xAe:typeof t=="function"?r.local?EAe:MAe:r.local?SAe:wAe)(r,t))}var v4t=M(()=>{hZ()});function _N(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var gZ=M(()=>{});function TAe(e){return function(){this.style.removeProperty(e)}}function CAe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function AAe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function x4t(e,t,r){return arguments.length>1?this.each((t==null?TAe:typeof t=="function"?AAe:CAe)(e,t,r==null?"":r)):PAe(this.node(),e)}function PAe(e,t){return e.style.getPropertyValue(t)||_N(e).getComputedStyle(e,null).getPropertyValue(t)}var b4t=M(()=>{gZ()});function IAe(e){return function(){delete this[e]}}function LAe(e,t){return function(){this[e]=t}}function kAe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function w4t(e,t){return arguments.length>1?this.each((t==null?IAe:typeof t=="function"?kAe:LAe)(e,t)):this.node()[e]}var S4t=M(()=>{});function M4t(e){return e.trim().split(/^|\s+/)}function _Z(e){return e.classList||new E4t(e)}function E4t(e){this._node=e,this._names=M4t(e.getAttribute("class")||"")}function T4t(e,t){for(var r=_Z(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function C4t(e,t){for(var r=_Z(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function RAe(e){return function(){T4t(this,e)}}function NAe(e){return function(){C4t(this,e)}}function DAe(e,t){return function(){(t.apply(this,arguments)?T4t:C4t)(this,e)}}function A4t(e,t){var r=M4t(e+"");if(arguments.length<2){for(var n=_Z(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?DAe:t?RAe:NAe)(r,t))}var P4t=M(()=>{E4t.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 OAe(){this.textContent=""}function zAe(e){return function(){this.textContent=e}}function FAe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function I4t(e){return arguments.length?this.each(e==null?OAe:(typeof e=="function"?FAe:zAe)(e)):this.node().textContent}var L4t=M(()=>{});function BAe(){this.innerHTML=""}function HAe(e){return function(){this.innerHTML=e}}function VAe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function k4t(e){return arguments.length?this.each(e==null?BAe:(typeof e=="function"?VAe:HAe)(e)):this.node().innerHTML}var R4t=M(()=>{});function UAe(){this.nextSibling&&this.parentNode.appendChild(this)}function N4t(){return this.each(UAe)}var D4t=M(()=>{});function qAe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function O4t(){return this.each(qAe)}var z4t=M(()=>{});function F4t(e){var t=typeof e=="function"?e:dN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var B4t=M(()=>{fZ()});function GAe(){return null}function H4t(e,t){var r=typeof e=="function"?e:dN(e),n=t==null?GAe:typeof t=="function"?t:mN(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var V4t=M(()=>{fZ();pZ()});function WAe(){var e=this.parentNode;e&&e.removeChild(this)}function U4t(){return this.each(WAe)}var q4t=M(()=>{});function YAe(){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 G4t(e){return this.select(e?jAe:YAe)}var W4t=M(()=>{});function Y4t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var j4t=M(()=>{});function XAe(e,t,r){return e=K4t(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function K4t(e,t,r){return function(n){var i=sn;sn=n;try{e.call(this,this.__data__,t,r)}finally{sn=i}}}function $Ae(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 KAe(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 ZAe(e,t,r){var n=$4t.hasOwnProperty(e.type)?XAe:K4t;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 Z4t(e,t,r){var n=$Ae(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?ZAe:KAe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function yN(e,t,r,n){var i=sn;e.sourceEvent=sn,sn=e;try{return t.apply(r,n)}finally{sn=i}}var $4t,sn,X4t,vN=M(()=>{$4t={},sn=null;typeof document!="undefined"&&(X4t=document.documentElement,"onmouseenter"in X4t||($4t={mouseenter:"mouseover",mouseleave:"mouseout"}))});function J4t(e,t,r){var n=_N(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 JAe(e,t){return function(){return J4t(this,e,t)}}function QAe(e,t){return function(){return J4t(this,e,t.apply(this,arguments))}}function Q4t(e,t){return this.each((typeof t=="function"?QAe:JAe)(e,t))}var tPt=M(()=>{gZ()});function di(e,t){this._groups=e,this._parents=t}function t4e(){return new di([[document.documentElement]],yZ)}var yZ,ef=M(()=>{DAt();BAt();qAt();$At();mZ();ZAt();QAt();e4t();n4t();o4t();s4t();c4t();h4t();p4t();m4t();_4t();v4t();b4t();S4t();P4t();L4t();R4t();D4t();z4t();B4t();V4t();q4t();W4t();j4t();vN();tPt();yZ=[null];di.prototype=t4e.prototype={constructor:di,select:NAt,selectAll:FAt,filter:UAt,data:XAt,enter:GAt,exit:KAt,join:JAt,merge:t4t,order:r4t,sort:i4t,call:a4t,nodes:l4t,node:u4t,size:f4t,empty:d4t,each:g4t,attr:y4t,style:x4t,property:w4t,classed:A4t,text:I4t,html:k4t,raise:N4t,lower:O4t,append:F4t,insert:H4t,remove:U4t,clone:G4t,datum:Y4t,on:Z4t,dispatch:Q4t}});function Ey(e){return typeof e=="string"?new di([[document.querySelector(e)]],[document.documentElement]):new di([[e]],yZ)}var ePt=M(()=>{ef()});function xN(){for(var e=sn,t;t=e.sourceEvent;)e=t;return e}var vZ=M(()=>{vN()});function bN(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 xZ=M(()=>{});function bZ(e){var t=xN();return t.changedTouches&&(t=t.changedTouches[0]),bN(e,t)}var rPt=M(()=>{vZ();xZ()});function wZ(e,t,r){arguments.length<3&&(r=t,t=xN().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return bN(e,o);return null}var nPt=M(()=>{vZ();xZ()});var wN=M(()=>{rPt();ePt();nPt();vN()});function SN(){sn.stopImmediatePropagation()}function fg(){sn.preventDefault(),sn.stopImmediatePropagation()}var SZ=M(()=>{wN()});function MN(e){var t=e.document.documentElement,r=Ey(e).on("dragstart.drag",fg,!0);"onselectstart"in t?r.on("selectstart.drag",fg,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function EN(e,t){var r=e.document.documentElement,n=Ey(e).on("dragstart.drag",null);t&&(n.on("click.drag",fg,!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 MZ=M(()=>{wN();SZ()});function yT(e){return function(){return e}}var iPt=M(()=>{});function vT(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 oPt=M(()=>{vT.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e}});function e4e(){return!sn.button}function r4e(){return this.parentNode}function n4e(e){return e==null?{x:sn.x,y:sn.y}:e}function i4e(){return"ontouchstart"in this}function aPt(){var e=e4e,t=r4e,r=n4e,n=i4e,i={},o=lZ("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),bZ,this,arguments);!S||(Ey(sn.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),MN(sn.view),SN(),c=!1,s=sn.clientX,l=sn.clientY,S("start"))}}function d(){if(fg(),!c){var S=sn.clientX-s,C=sn.clientY-l;c=S*S+C*C>h}i.mouse("drag")}function g(){Ey(sn.view).on("mousemove.drag mouseup.drag",null),EN(sn.view,c),fg(),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,wZ,this,arguments))&&(SN(),O("start"))}}function y(){var S=sn.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(fg(),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])&&(SN(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!yN(new vT(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}yN(new vT(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:yT(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:yT(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:yT(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:yT(!!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 sPt=M(()=>{RAt();wN();MZ();SZ();iPt();oPt()});var lPt=M(()=>{sPt();MZ()});function uPt(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+"]"}).join(",")+"}")}function o4e(e,t){var r=uPt(e);return function(n,i){return t(r(n),i,e)}}function a4e(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?o4e(d,u):uPt(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)===xT&&--f,c.charCodeAt(f-1)===CZ&&--f;function x(){if(_)return EZ;if(y)return y=!1,cPt;var S,C=p,P;if(c.charCodeAt(C)===TZ){for(;p++<f&&c.charCodeAt(p)!==TZ||c.charCodeAt(++p)===TZ;);return(S=p)>=f?_=!0:(P=c.charCodeAt(p++))===xT?y=!0:P===CZ&&(y=!0,c.charCodeAt(p)===xT&&++p),c.slice(C+1,S-1).replace(/""/g,'"')}for(;p<f;){if((P=c.charCodeAt(S=p++))===xT)y=!0;else if(P===CZ)y=!0,c.charCodeAt(p)===xT&&++p;else if(P!==r)continue;return c.slice(C,S)}return _=!0,c.slice(C,f)}for(;(g=x())!==EZ;){for(var b=[];g!==cPt&&g!==EZ;)b.push(g),g=x();u&&(b=u(b,d++))==null||h.push(b)}return h}function o(c,u){return u==null&&(u=a4e(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 cPt,EZ,TZ,xT,CZ,TN=M(()=>{cPt={},EZ={},TZ=34,xT=10,CZ=13});var CN,hPt,fPt,pPt,dPt,mPt=M(()=>{TN();CN=w2(","),hPt=CN.parse,fPt=CN.parseRows,pPt=CN.format,dPt=CN.formatRows});var AN,gPt,_Pt,yPt,vPt,xPt=M(()=>{TN();AN=w2("	"),gPt=AN.parse,_Pt=AN.parseRows,yPt=AN.format,vPt=AN.formatRows});var bPt=M(()=>{TN();mPt();xPt()});function wPt(e){return+e}var SPt=M(()=>{});function MPt(e){return e*e}function EPt(e){return e*(2-e)}function AZ(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var TPt=M(()=>{});function CPt(e){return e*e*e}function APt(e){return--e*e*e+1}function PZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var PPt=M(()=>{});var IZ,IPt,LPt,LZ,kPt=M(()=>{IZ=3,IPt=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(IZ),LPt=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(IZ),LZ=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}(IZ)});function DPt(e){return 1-Math.cos(e*NPt)}function OPt(e){return Math.sin(e*NPt)}function kZ(e){return(1-Math.cos(RPt*e))/2}var RPt,NPt,zPt=M(()=>{RPt=Math.PI,NPt=RPt/2});function FPt(e){return Math.pow(2,10*e-10)}function BPt(e){return 1-Math.pow(2,-10*e)}function RZ(e){return((e*=2)<=1?Math.pow(2,10*e-10):2-Math.pow(2,10-10*e))/2}var HPt=M(()=>{});function VPt(e){return 1-Math.sqrt(1-e*e)}function UPt(e){return Math.sqrt(1- --e*e)}function NZ(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var qPt=M(()=>{});function GPt(e){return 1-S2(1-e)}function S2(e){return(e=+e)<DZ?PN*e*e:e<l4e?PN*(e-=s4e)*e+c4e:e<h4e?PN*(e-=u4e)*e+f4e:PN*(e-=p4e)*e+d4e}function WPt(e){return((e*=2)<=1?1-S2(1-e):S2(e-1)+1)/2}var DZ,s4e,l4e,c4e,u4e,h4e,f4e,p4e,d4e,PN,YPt=M(()=>{DZ=.36363636363636365,s4e=6/11,l4e=8/11,c4e=3/4,u4e=9/11,h4e=10/11,f4e=15/16,p4e=21/22,d4e=63/64,PN=1/DZ/DZ});var OZ,jPt,XPt,zZ,$Pt=M(()=>{OZ=1.70158,jPt=function e(t){t=+t;function r(n){return n*n*((t+1)*n-t)}return r.overshoot=e,r}(OZ),XPt=function e(t){t=+t;function r(n){return--n*n*((t+1)*n+t)+1}return r.overshoot=e,r}(OZ),zZ=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}(OZ)});var M2,FZ,BZ,KPt,HZ,ZPt,JPt=M(()=>{M2=2*Math.PI,FZ=1,BZ=.3,KPt=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}(FZ,BZ),HZ=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}(FZ,BZ),ZPt=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}(FZ,BZ)});var QPt=M(()=>{SPt();TPt();PPt();kPt();zPt();HPt();qPt();YPt();$Pt();JPt()});function t6t(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 e6t=M(()=>{});function Fn(e){return function(){return e}}var Ty=M(()=>{});function Mu(){return(Math.random()-.5)*1e-6}var IN=M(()=>{});function r6t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return n6t(this.cover(t,r),t,r,e)}function n6t(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 i6t(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)n6t(this,a[r],s[r],e[r]);return this}var o6t=M(()=>{});function a6t(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 s6t=M(()=>{});function l6t(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var c6t=M(()=>{});function u6t(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 h6t=M(()=>{});function So(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var LN=M(()=>{});function f6t(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 p6t=M(()=>{LN()});function d6t(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 m6t(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var g6t=M(()=>{});function _6t(){return this._root}var y6t=M(()=>{});function v6t(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var x6t=M(()=>{});function b6t(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 w6t=M(()=>{LN()});function S6t(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 M6t=M(()=>{LN()});function E6t(e){return e[0]}function T6t(e){return arguments.length?(this._x=e,this):this._x}var C6t=M(()=>{});function A6t(e){return e[1]}function P6t(e){return arguments.length?(this._y=e,this):this._y}var I6t=M(()=>{});function Cy(e,t,r){var n=new VZ(t==null?E6t:t,r==null?A6t:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function VZ(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 L6t(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Ga,k6t=M(()=>{o6t();s6t();c6t();h6t();p6t();g6t();y6t();x6t();w6t();M6t();C6t();I6t();Ga=Cy.prototype=VZ.prototype;Ga.copy=function(){var e=new VZ(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=L6t(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]=L6t(n));return e};Ga.add=r6t;Ga.addAll=i6t;Ga.cover=a6t;Ga.data=l6t;Ga.extent=u6t;Ga.find=f6t;Ga.remove=d6t;Ga.removeAll=m6t;Ga.root=_6t;Ga.size=v6t;Ga.visit=b6t;Ga.visitAfter=S6t;Ga.x=T6t;Ga.y=P6t});var UZ=M(()=>{k6t()});function m4e(e){return e.x+e.vx}function g4e(e){return e.y+e.vy}function R6t(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=Cy(t,m4e,g4e).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 N6t=M(()=>{Ty();IN();UZ()});function kN(){}function D6t(e,t){var r=new kN;if(e instanceof kN)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,pg,RN=M(()=>{cl="$";kN.prototype=D6t.prototype={constructor:kN,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)}};pg=D6t});var O6t=M(()=>{RN()});function NN(){}function _4e(e,t){var r=new NN;if(e instanceof NN)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 Ay,z6t=M(()=>{RN();Ay=pg.prototype;NN.prototype=_4e.prototype={constructor:NN,has:Ay.has,add:function(e){return e+="",this[cl+e]=e,this},remove:Ay.remove,clear:Ay.clear,values:Ay.keys,size:Ay.size,empty:Ay.empty,each:Ay.each}});var F6t=M(()=>{});var B6t=M(()=>{});var H6t=M(()=>{});var qZ=M(()=>{O6t();z6t();RN();F6t();B6t();H6t()});function y4e(e){return e.index}function V6t(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function U6t(e){var t=y4e,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=pg(a,t),b;for(g=0,s=new Array(_);g<y;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=V6t(x,b.source)),typeof b.target!="object"&&(b.target=V6t(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 q6t=M(()=>{Ty();IN();qZ()});function W6t(){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 DN(r)}function DN(e){this._=e}function x4e(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 b4e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function G6t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=v4e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var v4e,GZ,Y6t=M(()=>{v4e={value:function(){}};DN.prototype=W6t.prototype={constructor:DN,on:function(e,t){var r=this._,n=x4e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=b4e(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]=G6t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=G6t(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 DN(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)}};GZ=W6t});var j6t=M(()=>{Y6t()});function jZ(){return Py||(K6t(w4e),Py=MT.now()+FN)}function w4e(){Py=0}function WZ(){this._call=this._time=this._next=null}function BN(e,t,r){var n=new WZ;return n.restart(e,t,r),n}function Z6t(){jZ(),++E2;for(var e=ON,t;e;)(t=Py-e._time)>=0&&e._call.call(null,t),e=e._next;--E2}function X6t(){Py=(zN=MT.now())+FN,E2=wT=0;try{Z6t()}finally{E2=0,M4e(),Py=0}}function S4e(){var e=MT.now(),t=e-zN;t>$6t&&(FN-=t,zN=e)}function M4e(){for(var e,t=ON,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:ON=r);ST=e,YZ(n)}function YZ(e){if(!E2){wT&&(wT=clearTimeout(wT));var t=e-Py;t>24?(e<1/0&&(wT=setTimeout(X6t,e-MT.now()-FN)),bT&&(bT=clearInterval(bT))):(bT||(zN=MT.now(),bT=setInterval(S4e,$6t)),E2=1,K6t(X6t))}}var E2,wT,bT,$6t,ON,ST,zN,Py,FN,MT,K6t,J6t=M(()=>{E2=0,wT=0,bT=0,$6t=1e3,zN=0,Py=0,FN=0,MT=typeof performance=="object"&&performance.now?performance:Date,K6t=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};WZ.prototype=BN.prototype={constructor:WZ,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?jZ():+r)+(t==null?0:+t),!this._next&&ST!==this&&(ST?ST._next=this:ON=this,ST=this),this._call=e,this._time=r,YZ()},stop:function(){this._call&&(this._call=null,this._time=1/0,YZ())}}});var Q6t=M(()=>{J6t()});function tIt(e){return e.x}function eIt(e){return e.y}function rIt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=pg(),l=BN(u),c=GZ("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=E4e*Math.sqrt(d),x=d*T4e;_.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 E4e,T4e,XZ=M(()=>{j6t();qZ();Q6t();E4e=10,T4e=Math.PI*(3-Math.sqrt(5))});function nIt(){var e,t,r,n=Fn(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=Cy(e,tIt,eIt).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 iIt=M(()=>{Ty();IN();UZ();XZ()});function oIt(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 aIt=M(()=>{Ty()});function sIt(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 lIt=M(()=>{Ty()});function cIt(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 uIt=M(()=>{Ty()});var hIt=M(()=>{e6t();N6t();q6t();iIt();aIt();XZ();lIt();uIt()});function Iy(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 HN=M(()=>{});function rf(e){return e=Iy(Math.abs(e)),e?e[1]:NaN}var ET=M(()=>{HN()});function fIt(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 pIt=M(()=>{});function dIt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var mIt=M(()=>{});function gIt(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 _It=M(()=>{});function yIt(e,t){var r=Iy(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-($Z=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")+Iy(e,Math.max(0,t+o-1))[0]}var $Z,KZ=M(()=>{HN()});function ZZ(e,t){var r=Iy(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 vIt=M(()=>{HN()});var VN,JZ=M(()=>{_It();KZ();vIt();VN={"":gIt,"%":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 ZZ(e*100,t)},r:ZZ,s:yIt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function Ly(e){return new QZ(e)}function QZ(e){if(!(t=C4e.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"):VN[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 C4e,tJ=M(()=>{JZ();C4e=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Ly.prototype=QZ.prototype;QZ.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 eJ(e){return e}var xIt=M(()=>{});function UN(e){var t=e.grouping&&e.thousands?fIt(e.grouping,e.thousands):eJ,r=e.currency,n=e.decimal,i=e.numerals?dIt(e.numerals):eJ,o=e.percent||"%";function a(l){l=Ly(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=VN[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"?bIt[8+$Z/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=Ly(l),l.type="f",l)),h=Math.max(-8,Math.min(8,Math.floor(rf(c)/3)))*3,f=Math.pow(10,-h),p=bIt[8+h/3];return function(d){return u(f*d)+p}}return{format:a,formatPrefix:s}}var bIt,rJ=M(()=>{ET();pIt();mIt();tJ();JZ();KZ();xIt();bIt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function GN(e){return qN=UN(e),nJ=qN.format,iJ=qN.formatPrefix,qN}var qN,nJ,iJ,wIt=M(()=>{rJ();GN({decimal:".",thousands:",",grouping:[3],currency:["$",""]})});function SIt(e){return Math.max(0,-rf(Math.abs(e)))}var MIt=M(()=>{ET()});function EIt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rf(t)/3)))*3-rf(Math.abs(e)))}var TIt=M(()=>{ET()});function CIt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rf(t)-rf(e))+1}var AIt=M(()=>{ET()});var PIt=M(()=>{wIt();rJ();tJ();MIt();TIt();AIt()});function Cs(){return new YN}function YN(){this.reset()}function IIt(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var WN,ky=M(()=>{YN.prototype={constructor:YN,reset:function(){this.s=this.t=0},add:function(e){IIt(WN,e,this.t),IIt(this,WN.s,this.s),this.s?this.t+=WN.t:this.s=WN.t},valueOf:function(){return this.s}};WN=new YN});function $N(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 aJ(e){return(e=Jt(e/2))*e}var ce,oJ,rr,Bn,T2,Bi,Ur,we,Ye,yc,Sn,ae,TT,jN,Ry,XN,Jt,dg,Rr,C2,lr=M(()=>{ce=1e-6,oJ=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,TT=Math.ceil,jN=Math.exp,Ry=Math.log,XN=Math.pow,Jt=Math.sin,dg=Math.sign||function(e){return e>0?1:e<0?-1:0},Rr=Math.sqrt,C2=Math.tan});function qr(){}var Xp=M(()=>{});function KN(e,t){e&&kIt.hasOwnProperty(e.type)&&kIt[e.type](e,t)}function sJ(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 RIt(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)sJ(e[r],t,1);t.polygonEnd()}function Mo(e,t){e&&LIt.hasOwnProperty(e.type)?LIt[e.type](e,t):KN(e,t)}var LIt,kIt,mg=M(()=>{LIt={Feature:function(e,t){KN(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)KN(r[n].geometry,t)}},kIt={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){sJ(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)sJ(r[n],t,0)},Polygon:function(e,t){RIt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)RIt(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)KN(r[n],t)}}});function A4e(){Eu.point=I4e}function P4e(){OIt(NIt,DIt)}function I4e(e,t){Eu.point=OIt,NIt=e,DIt=t,e*=we,t*=we,lJ=e,cJ=ae(t=t/2+T2),uJ=Jt(t)}function OIt(e,t){e*=we,t*=we,t=t/2+T2;var r=e-lJ,n=r>=0?1:-1,i=n*r,o=ae(t),a=Jt(t),s=uJ*a,l=cJ*o+s*ae(i),c=s*n*Jt(i);CT.add(Sn(c,l)),lJ=e,cJ=o,uJ=a}function zIt(e){return ZN.reset(),Mo(e,Eu),ZN*2}var CT,ZN,NIt,DIt,lJ,cJ,uJ,Eu,hJ=M(()=>{ky();lr();Xp();mg();CT=Cs(),ZN=Cs(),Eu={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){CT.reset(),Eu.lineStart=A4e,Eu.lineEnd=P4e},polygonEnd:function(){var e=+CT;ZN.add(e<0?Bi+e:e),this.lineStart=this.lineEnd=this.point=qr},sphere:function(){ZN.add(Bi)}}});function Ny(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 AT(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function $p(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 JN(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function PT(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Dy(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 fJ(e,t){gg.push(Zp=[mi=e,Ei=e]),t<hl&&(hl=t),t>xc&&(xc=t)}function qIt(e,t){var r=vc([e*we,t*we]);if(P2){var n=$p(P2,r),i=[n[1],-n[0],0],o=$p(i,n);Dy(o),o=Ny(o);var a=e-Oy,s=a>0?1:-1,l=o[0]*Ur*s,c,u=Ye(a)>180;u^(s*Oy<l&&l<s*e)?(c=o[1]*Ur,c>xc&&(xc=c)):(l=(l+360)%360-180,u^(s*Oy<l&&l<s*e)?(c=-o[1]*Ur,c<hl&&(hl=c)):(t<hl&&(hl=t),t>xc&&(xc=t))),u?e<Oy?ul(mi,e)>ul(mi,Ei)&&(Ei=e):ul(e,Ei)>ul(mi,Ei)&&(mi=e):Ei>=mi?(e<mi&&(mi=e),e>Ei&&(Ei=e)):e>Oy?ul(mi,e)>ul(mi,Ei)&&(Ei=e):ul(e,Ei)>ul(mi,Ei)&&(mi=e)}else gg.push(Zp=[mi=e,Ei=e]);t<hl&&(hl=t),t>xc&&(xc=t),P2=r,Oy=e}function FIt(){Kp.point=qIt}function BIt(){Zp[0]=mi,Zp[1]=Ei,Kp.point=fJ,P2=null}function GIt(e,t){if(P2){var r=e-Oy;IT.add(Ye(r)>180?r+(r>0?360:-360):r)}else VIt=e,UIt=t;Eu.point(e,t),qIt(e,t)}function L4e(){Eu.lineStart()}function k4e(){GIt(VIt,UIt),Eu.lineEnd(),Ye(IT)>ce&&(mi=-(Ei=180)),Zp[0]=mi,Zp[1]=Ei,P2=null}function ul(e,t){return(t-=e)<0?t+360:t}function R4e(e,t){return e[0]-t[0]}function HIt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function WIt(e){var t,r,n,i,o,a,s;if(xc=Ei=-(mi=hl=1/0),gg=[],Mo(e,Kp),r=gg.length){for(gg.sort(R4e),t=1,n=gg[0],o=[n];t<r;++t)i=gg[t],HIt(n,i[0])||HIt(n,i[1])?(ul(n[0],i[1])>ul(n[0],n[1])&&(n[1]=i[1]),ul(i[0],n[1])>ul(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=ul(n[1],i[0]))>a&&(a=s,mi=i[0],Ei=n[1])}return gg=Zp=null,mi===1/0||hl===1/0?[[NaN,NaN],[NaN,NaN]]:[[mi,hl],[Ei,xc]]}var mi,hl,Ei,xc,Oy,VIt,UIt,P2,IT,gg,Zp,Kp,YIt=M(()=>{ky();hJ();A2();lr();mg();IT=Cs(),Kp={point:fJ,lineStart:FIt,lineEnd:BIt,polygonStart:function(){Kp.point=GIt,Kp.lineStart=L4e,Kp.lineEnd=k4e,IT.reset(),Eu.polygonStart()},polygonEnd:function(){Eu.polygonEnd(),Kp.point=fJ,Kp.lineStart=FIt,Kp.lineEnd=BIt,CT<0?(mi=-(Ei=180),hl=-(xc=90)):IT>ce?xc=90:IT<-ce&&(hl=-90),Zp[0]=mi,Zp[1]=Ei}}});function gJ(e,t){e*=we,t*=we;var r=ae(t);kT(r*ae(e),r*Jt(e),Jt(t))}function kT(e,t,r){++LT,tD+=(e-tD)/LT,eD+=(t-eD)/LT,rD+=(r-rD)/LT}function jIt(){Tu.point=N4e}function N4e(e,t){e*=we,t*=we;var r=ae(t);Wa=r*ae(e),Ya=r*Jt(e),ja=Jt(t),Tu.point=D4e,kT(Wa,Ya,ja)}function D4e(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=Ya*o-ja*i)*a+(a=ja*n-Wa*o)*a+(a=Wa*i-Ya*n)*a),Wa*n+Ya*i+ja*o);QN+=a,nD+=a*(Wa+(Wa=n)),iD+=a*(Ya+(Ya=i)),oD+=a*(ja+(ja=o)),kT(Wa,Ya,ja)}function XIt(){Tu.point=gJ}function O4e(){Tu.point=F4e}function z4e(){ZIt($It,KIt),Tu.point=gJ}function F4e(e,t){$It=e,KIt=t,e*=we,t*=we,Tu.point=ZIt;var r=ae(t);Wa=r*ae(e),Ya=r*Jt(e),ja=Jt(t),kT(Wa,Ya,ja)}function ZIt(e,t){e*=we,t*=we;var r=ae(t),n=r*ae(e),i=r*Jt(e),o=Jt(t),a=Ya*o-ja*i,s=ja*n-Wa*o,l=Wa*i-Ya*n,c=Rr(a*a+s*s+l*l),u=Jn(c),h=c&&-u/c;pJ+=h*a,dJ+=h*s,mJ+=h*l,QN+=u,nD+=u*(Wa+(Wa=n)),iD+=u*(Ya+(Ya=i)),oD+=u*(ja+(ja=o)),kT(Wa,Ya,ja)}function JIt(e){LT=QN=tD=eD=rD=nD=iD=oD=pJ=dJ=mJ=0,Mo(e,Tu);var t=pJ,r=dJ,n=mJ,i=t*t+r*r+n*n;return i<oJ&&(t=nD,r=iD,n=oD,QN<ce&&(t=tD,r=eD,n=rD),i=t*t+r*r+n*n,i<oJ)?[NaN,NaN]:[Sn(r,t)*Ur,Jn(n/Rr(i))*Ur]}var LT,QN,tD,eD,rD,nD,iD,oD,pJ,dJ,mJ,$It,KIt,Wa,Ya,ja,Tu,QIt=M(()=>{lr();Xp();mg();Tu={sphere:qr,point:gJ,lineStart:jIt,lineEnd:XIt,polygonStart:function(){Tu.lineStart=O4e,Tu.lineEnd=z4e},polygonEnd:function(){Tu.lineStart=jIt,Tu.lineEnd=XIt}}});function zy(e){return function(){return e}}var t9t=M(()=>{});function aD(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 _J=M(()=>{});function yJ(e,t){return[e>rr?e-Bi:e<-rr?e+Bi:e,t]}function RT(e,t,r){return(e%=Bi)?t||r?aD(r9t(e),n9t(t,r)):r9t(e):t||r?n9t(t,r):yJ}function e9t(e){return function(t,r){return t+=e,[t>rr?t-Bi:t<-rr?t+Bi:t,r]}}function r9t(e){var t=e9t(e);return t.invert=e9t(-e),t}function n9t(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 sD(e){e=RT(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 NT=M(()=>{_J();lr();yJ.invert=yJ});function vJ(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=i9t(a,i),o=i9t(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=Ny([a,-s*ae(u),-s*Jt(u)]),e.point(c[0],c[1])}}function i9t(e,t){t=vc(t),t[0]-=e,Dy(t);var r=$N(-t[1]);return((-t[2]<0?-r:r)+Bi-ce)%Bi}function o9t(){var e=zy([0,0]),t=zy(90),r=zy(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=RT(-l[0]*we,-l[1]*we,0).invert,vJ(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:zy([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:zy(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:zy(+l),s):r},s}var xJ=M(()=>{A2();t9t();lr();NT()});function lD(){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 bJ=M(()=>{Xp()});function I2(e,t){return Ye(e[0]-t[0])<ce&&Ye(e[1]-t[1])<ce}var wJ=M(()=>{lr()});function cD(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 uD(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 cD(_,d,null,!0)),a.push(x.o=new cD(_,null,x,!1)),o.push(x=new cD(y,d,null,!1)),a.push(x.o=new cD(y,null,x,!0))}}),!!o.length){for(a.sort(t),a9t(o),a9t(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 a9t(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 SJ=M(()=>{wJ()});function hD(e,t){var r=t[0],n=t[1],i=[Jt(r),-ae(r),0],o=0,a=0;MJ.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(MJ.add(Sn(B*k*Jt(O),g*C+B*ae(O))),o+=D?P+k*Bi:P,D^f>=r^x>=r){var I=$p(vc(h),vc(y));Dy(I);var L=$p(i,I);Dy(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&&MJ<-ce)^a&1}var MJ,EJ=M(()=>{ky();A2();lr();MJ=Cs()});function _g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Fy=M(()=>{});function TJ(e){return e.length===1&&(e=B4e(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 B4e(e){return function(t,r){return _g(e(t),r)}}var CJ=M(()=>{Fy()});var s9t,H4e,V4e,AJ=M(()=>{Fy();CJ();s9t=TJ(_g),H4e=s9t.right,V4e=s9t.left});var PJ=M(()=>{});var l9t=M(()=>{PJ()});var c9t=M(()=>{});var L2=M(()=>{});var IJ=M(()=>{L2()});var LJ=M(()=>{IJ()});var kJ=M(()=>{});var u9t,q4e,G4e,RJ=M(()=>{u9t=Array.prototype,q4e=u9t.slice,G4e=u9t.map});var h9t=M(()=>{});var f9t=M(()=>{});function Jp(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 NJ=M(()=>{});var b0n,w0n,S0n,DJ=M(()=>{b0n=Math.sqrt(50),w0n=Math.sqrt(10),S0n=Math.sqrt(2)});var OJ=M(()=>{});var p9t=M(()=>{RJ();AJ();h9t();kJ();f9t();NJ();DJ();OJ()});var pD=M(()=>{L2()});var m9t=M(()=>{RJ();Fy();L2();pD()});var g9t=M(()=>{LJ()});var _9t=M(()=>{});var y9t=M(()=>{L2()});var v9t=M(()=>{Fy();L2();pD()});function DT(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 x9t=M(()=>{});var zJ=M(()=>{});var b9t=M(()=>{});var w9t=M(()=>{Fy()});var S9t=M(()=>{});var M9t=M(()=>{});var FJ=M(()=>{zJ()});var E9t=M(()=>{FJ()});var dD=M(()=>{AJ();Fy();CJ();l9t();c9t();LJ();kJ();p9t();m9t();g9t();OJ();_9t();y9t();v9t();x9t();zJ();PJ();b9t();pD();NJ();w9t();S9t();M9t();DJ();FJ();IJ();E9t()});function mD(e,t,r,n){return function(i){var o=t(i),a=lD(),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=DT(u);var S=hD(c,n);u.length?(l||(i.polygonStart(),l=!0),uD(u,Q4e,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(J4e))}}return f}}function J4e(e){return e.length>1}function Q4e(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 BJ=M(()=>{bJ();SJ();lr();EJ();dD()});function tPe(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=ePe(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 ePe(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 rPe(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 OT,HJ=M(()=>{BJ();lr();OT=mD(function(){return!0},tPe,rPe,[-rr,-Bn])});function gD(e){var t=ae(e),r=6*we,n=t>0,i=Ye(t)>ce;function o(u,h,f,p){vJ(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],_=$p(p,d),y=AT(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=$p(g,_),k=PT(g,S),O=PT(_,C);JN(k,O);var D=P,B=AT(k,D),I=AT(D,D),L=B*B-I*(AT(k,k)-1);if(!(L<0)){var R=Rr(L),F=PT(D,(-B-R)/I);if(JN(F,k),F=Ny(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=PT(D,(-B+R)/I);return JN(bt,k),[F,Ny(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 mD(a,s,o,n?[0,-e]:[-rr,e-rr])}var VJ=M(()=>{A2();xJ();lr();wJ();BJ()});function T9t(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 C9t=M(()=>{});function Qp(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=lD(),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=DT(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&uD(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(_D,Math.min(zT,x)),b=Math.max(_D,Math.min(zT,b))],rt=[z=Math.max(_D,Math.min(zT,z)),U=Math.max(_D,Math.min(zT,U))];T9t(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 zT,_D,FT=M(()=>{lr();bJ();C9t();SJ();dD();zT=1e9,_D=-zT});function A9t(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Qp(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 P9t=M(()=>{FT()});function nPe(){k2.point=oPe,k2.lineEnd=iPe}function iPe(){k2.point=k2.lineEnd=qr}function oPe(e,t){e*=we,t*=we,qJ=e,yD=Jt(t),vD=ae(t),k2.point=aPe}function aPe(e,t){e*=we,t*=we;var r=Jt(t),n=ae(t),i=Ye(e-qJ),o=ae(i),a=Jt(i),s=n*a,l=vD*r-yD*n*o,c=yD*r+vD*n*o;UJ.add(Sn(Rr(s*s+l*l),c)),qJ=e,yD=r,vD=n}function xD(e){return UJ.reset(),Mo(e,k2),+UJ}var UJ,qJ,yD,vD,k2,GJ=M(()=>{ky();lr();Xp();mg();UJ=Cs(),k2={sphere:qr,point:qr,lineStart:nPe,lineEnd:qr,polygonStart:qr,polygonEnd:qr}});function By(e,t){return WJ[0]=e,WJ[1]=t,xD(sPe)}var WJ,sPe,YJ=M(()=>{GJ();WJ=[null,null],sPe={type:"LineString",coordinates:WJ}});function bD(e,t){return e&&L9t.hasOwnProperty(e.type)?L9t[e.type](e,t):!1}function k9t(e,t){return By(e,t)===0}function R9t(e,t){var r=By(e[0],e[1]),n=By(e[0],t),i=By(t,e[1]);return n+i<=r+ce}function N9t(e,t){return!!hD(e.map(lPe),D9t(t))}function lPe(e){return e=e.map(D9t),e.pop(),e}function D9t(e){return[e[0]*we,e[1]*we]}function O9t(e,t){return(e&&I9t.hasOwnProperty(e.type)?I9t[e.type]:bD)(e,t)}var I9t,L9t,z9t=M(()=>{EJ();YJ();lr();I9t={Feature:function(e,t){return bD(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(bD(r[n].geometry,t))return!0;return!1}},L9t={Sphere:function(){return!0},Point:function(e,t){return k9t(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(k9t(r[n],t))return!0;return!1},LineString:function(e,t){return R9t(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(R9t(r[n],t))return!0;return!1},Polygon:function(e,t){return N9t(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(N9t(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(bD(r[n],t))return!0;return!1}}});function F9t(e,t,r){var n=Jp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function B9t(e,t,r){var n=Jp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function wD(){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 Jp(TT(n/u)*u,r,u).map(d).concat(Jp(TT(s/h)*h,a,h).map(g)).concat(Jp(TT(t/l)*l,e,l).filter(function(b){return Ye(b%u)>ce}).map(f)).concat(Jp(TT(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=F9t(o,i,90),p=B9t(t,e,_),d=F9t(s,a,90),g=B9t(n,r,_),y):_},y.extentMajor([[-180,-90+ce],[180,90-ce]]).extentMinor([[-180,-80-ce],[180,80+ce]])}function H9t(){return wD()()}var V9t=M(()=>{dD();lr()});function U9t(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(aJ(o-n)+a*l*aJ(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 q9t=M(()=>{lr()});function nf(e){return e}var SD=M(()=>{});function cPe(){yg.point=uPe}function uPe(e,t){yg.point=Y9t,G9t=$J=e,W9t=KJ=t}function Y9t(e,t){XJ.add(KJ*e-$J*t),$J=e,KJ=t}function hPe(){Y9t(G9t,W9t)}var jJ,XJ,G9t,W9t,$J,KJ,yg,ZJ,j9t=M(()=>{ky();lr();Xp();jJ=Cs(),XJ=Cs(),yg={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){yg.lineStart=cPe,yg.lineEnd=hPe},polygonEnd:function(){yg.lineStart=yg.lineEnd=yg.point=qr,jJ.add(Ye(XJ)),XJ.reset()},result:function(){var e=jJ/2;return jJ.reset(),e}};ZJ=yg});function pPe(e,t){e<R2&&(R2=e),e>BT&&(BT=e),t<MD&&(MD=t),t>ED&&(ED=t)}var R2,MD,BT,ED,fPe,N2,JJ=M(()=>{Xp();R2=1/0,MD=R2,BT=-R2,ED=BT,fPe={point:pPe,lineStart:qr,lineEnd:qr,polygonStart:qr,polygonEnd:qr,result:function(){var e=[[R2,MD],[BT,ED]];return BT=ED=-(MD=R2=1/0),e}};N2=fPe});function Hy(e,t){QJ+=e,tQ+=t,++HT}function X9t(){Cu.point=dPe}function dPe(e,t){Cu.point=mPe,Hy(of=e,af=t)}function mPe(e,t){var r=e-of,n=t-af,i=Rr(r*r+n*n);TD+=i*(of+e)/2,CD+=i*(af+t)/2,D2+=i,Hy(of=e,af=t)}function $9t(){Cu.point=Hy}function gPe(){Cu.point=yPe}function _Pe(){J9t(K9t,Z9t)}function yPe(e,t){Cu.point=J9t,Hy(K9t=of=e,Z9t=af=t)}function J9t(e,t){var r=e-of,n=t-af,i=Rr(r*r+n*n);TD+=i*(of+e)/2,CD+=i*(af+t)/2,D2+=i,i=af*e-of*t,eQ+=i*(of+e),rQ+=i*(af+t),VT+=i*3,Hy(of=e,af=t)}var QJ,tQ,HT,TD,CD,D2,eQ,rQ,VT,K9t,Z9t,of,af,Cu,nQ,Q9t=M(()=>{lr();QJ=0,tQ=0,HT=0,TD=0,CD=0,D2=0,eQ=0,rQ=0,VT=0,Cu={point:Hy,lineStart:X9t,lineEnd:$9t,polygonStart:function(){Cu.lineStart=gPe,Cu.lineEnd=_Pe},polygonEnd:function(){Cu.point=Hy,Cu.lineStart=X9t,Cu.lineEnd=$9t},result:function(){var e=VT?[eQ/VT,rQ/VT]:D2?[TD/D2,CD/D2]:HT?[QJ/HT,tQ/HT]:[NaN,NaN];return QJ=tQ=HT=TD=CD=D2=eQ=rQ=VT=0,e}};nQ=Cu});function AD(e){this._context=e}var tLt=M(()=>{lr();Xp();AD.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 vPe(e,t){PD.point=nLt,eLt=UT=e,rLt=qT=t}function nLt(e,t){UT-=e,qT-=t,oQ.add(Rr(UT*UT+qT*qT)),UT=e,qT=t}var oQ,iQ,eLt,rLt,UT,qT,PD,aQ,iLt=M(()=>{ky();lr();Xp();oQ=Cs(),PD={point:qr,lineStart:function(){PD.point=vPe},lineEnd:function(){iQ&&nLt(eLt,rLt),PD.point=qr},polygonStart:function(){iQ=!0},polygonEnd:function(){iQ=null},result:function(){var e=+oQ;return oQ.reset(),e}};aQ=PD});function ID(){this._string=[]}function oLt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var aLt=M(()=>{ID.prototype={_radius:4.5,_circle:oLt(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=oLt(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 sLt(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(ZJ)),ZJ.result()},o.measure=function(a){return Mo(a,n(aQ)),aQ.result()},o.bounds=function(a){return Mo(a,n(N2)),N2.result()},o.centroid=function(a){return Mo(a,n(nQ)),nQ.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,nf):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new ID):new AD(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 lLt=M(()=>{SD();mg();j9t();JJ();Q9t();tLt();iLt();aLt()});function cLt(e){return{stream:vg(e)}}function vg(e){return function(t){var r=new sQ;for(var n in e)r[n]=e[n];return r.stream=t,r}}function sQ(){}var GT=M(()=>{sQ.prototype={constructor:sQ,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 lQ(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 Vy(e,t,r){return lQ(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 Vy(e,[[0,0],t],r)}function z2(e,t,r){return lQ(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 lQ(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 LD=M(()=>{mg();JJ()});function cQ(e,t){return+t?wPe(e,t):bPe(e)}function bPe(e){return vg({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function wPe(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<xPe)&&(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],uLt,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,uLt,n),_.lineEnd=S,S()}return _}}var uLt,xPe,hLt=M(()=>{A2();lr();GT();uLt=16,xPe=ae(30*we)});function MPe(e){return vg({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function eo(e){return WT(function(){return e})()}function WT(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=OT,_=null,y,x,b,S=nf,C=.5,P=cQ(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=SPe(MPe(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?gD(d=F*we):(d=null,OT),R()):d*Ur},D.clipExtent=function(F){return arguments.length?(S=F==null?(_=y=x=b=null,nf):Qp(_=+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=cQ(I,C=F*F),R()):Rr(C)},D.fitExtent=function(F,z){return Vy(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=aD(f=RT(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 SPe,Au=M(()=>{HJ();VJ();FT();_J();SD();lr();NT();GT();LD();hLt();SPe=vg({point:function(e,t){this.stream.point(e*we,t*we)}})});function B2(e){var t=0,r=rr/3,n=WT(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 kD=M(()=>{lr();Au()});function fLt(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 pLt=M(()=>{lr()});function uQ(e,t){var r=Jt(e),n=(r+Jt(t))/2;if(Ye(n)<ce)return fLt(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*dg(c),Jn((i-(s*s+c*c)*n*n)/(2*n))]},a}function Uy(){return B2(uQ).scale(155.424).center([0,33.6442])}var RD=M(()=>{lr();kD();pLt()});function ND(){return Uy().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var hQ=M(()=>{RD()});function EPe(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 dLt(){var e,t,r=ND(),n,i=Uy().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Uy().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=EPe([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 Vy(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 mLt=M(()=>{lr();hQ();RD();LD()});function DD(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 sf(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 gLt(){return eo(OD).scale(124.75).clipAngle(180-.001)}var OD,_Lt=M(()=>{lr();H2();Au();OD=DD(function(e){return Rr(2/(1+e))});OD.invert=sf(function(e){return 2*Jn(e/2)})});function yLt(){return eo(zD).scale(79.4188).clipAngle(180-.001)}var zD,vLt=M(()=>{lr();H2();Au();zD=DD(function(e){return(e=$N(e))&&e/Jt(e)});zD.invert=sf(function(e){return e})});function qy(e,t){return[e,Ry(C2((Bn+t)/2))]}function xLt(){return fQ(qy).scale(961/Bi)}function fQ(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(sD(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===qy?[[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 FD=M(()=>{lr();NT();Au();qy.invert=function(e,t){return[e,2*yc(jN(t))-Bn]}});function BD(e){return C2((Bn+e)/2)}function pQ(e,t){var r=ae(e),n=e===t?Jt(e):Ry(r/ae(t))/Ry(BD(t)/BD(e)),i=r*XN(BD(e),n)/n;if(!n)return qy;function o(a,s){i>0?s<-Bn+ce&&(s=-Bn+ce):s>Bn-ce&&(s=Bn-ce);var l=i/XN(BD(s),n);return[l*Jt(n*a),i-l*ae(n*a)]}return o.invert=function(a,s){var l=i-s,c=dg(n)*Rr(a*a+l*l);return[Sn(a,Ye(l))/n*dg(l),2*yc(XN(i/c,1/n))-Bn]},o}function bLt(){return B2(pQ).scale(109.5).parallels([30,30])}var wLt=M(()=>{lr();kD();FD()});function Gy(e,t){return[e,t]}function SLt(){return eo(Gy).scale(152.63)}var dQ=M(()=>{Au();Gy.invert=Gy});function mQ(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 Gy;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*dg(l),i-dg(n)*Rr(a*a+l*l)]},o}function MLt(){return B2(mQ).scale(131.154).center([0,13.9389])}var ELt=M(()=>{lr();kD();dQ()});function HD(e,t){var r=ae(t),n=ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function TLt(){return eo(HD).scale(144.049).clipAngle(60)}var CLt=M(()=>{lr();H2();Au();HD.invert=sf(yc)});function VD(e,t,r,n){return e===1&&t===1&&r===0&&n===0?nf:vg({point:function(i,o){this.stream.point(i*e+r,o*t+n)}})}function ALt(){var e=1,t=0,r=0,n=1,i=1,o=nf,a=null,s,l,c,u=nf,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,nf):Qp(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=VD((e=+g)*n,e*i,t,r),d()):e},translate:function(g){return arguments.length?(o=VD(e*n,e*i,t=+g[0],r=+g[1]),d()):[t,r]},reflectX:function(g){return arguments.length?(o=VD(e*(n=g?-1:1),e*i,t,r),d()):n<0},reflectY:function(g){return arguments.length?(o=VD(e*n,e*(i=g?-1:1),t,r),d()):i<0},fitExtent:function(g,_){return Vy(p,g,_)},fitSize:function(g,_){return O2(p,g,_)},fitWidth:function(g,_){return z2(p,g,_)},fitHeight:function(g,_){return F2(p,g,_)}}}var PLt=M(()=>{FT();SD();GT();LD()});function UD(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 ILt(){return eo(UD).scale(175.295)}var LLt=M(()=>{Au();lr();UD.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 qD(e,t){return[ae(t)*Jt(e),Jt(t)]}function kLt(){return eo(qD).scale(249.5).clipAngle(90+ce)}var RLt=M(()=>{lr();H2();Au();qD.invert=sf(Jn)});function GD(e,t){var r=ae(t),n=1+ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function NLt(){return eo(GD).scale(250).clipAngle(142)}var DLt=M(()=>{lr();H2();Au();GD.invert=sf(function(e){return 2*yc(e)})});function WD(e,t){return[Ry(C2((Bn+t)/2)),-e]}function OLt(){var e=fQ(WD),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 zLt=M(()=>{lr();FD();WD.invert=function(e,t){return[-t,2*yc(jN(e))-Bn]}});var FLt=M(()=>{hJ();YIt();QIt();xJ();HJ();VJ();P9t();FT();z9t();YJ();V9t();q9t();GJ();lLt();hQ();mLt();_Lt();vLt();wLt();RD();ELt();dQ();CLt();PLt();Au();FD();LLt();RLt();DLt();zLt();NT();mg();GT()});function TPe(e,t){return e.parent===t.parent?1:2}function CPe(e){return e.reduce(APe,0)/e.length}function APe(e,t){return e+t.x}function PPe(e){return 1+e.reduce(IPe,0)}function IPe(e,t){return Math.max(e,t.y)}function LPe(e){for(var t;t=e.children;)e=t[0];return e}function kPe(e){for(var t;t=e.children;)e=t[t.length-1];return e}function BLt(){var e=TPe,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=CPe(p),f.y=PPe(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=LPe(o),c=kPe(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 HLt=M(()=>{});function RPe(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 VLt(){return this.eachAfter(RPe)}var ULt=M(()=>{});function qLt(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 GLt=M(()=>{});function WLt(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 YLt=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 XLt=M(()=>{});function $Lt(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 KLt=M(()=>{});function ZLt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var JLt=M(()=>{});function QLt(e){for(var t=this,r=NPe(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 NPe(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 tkt=M(()=>{});function ekt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var rkt=M(()=>{});function nkt(){var e=[];return this.each(function(t){e.push(t)}),e}var ikt=M(()=>{});function okt(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var akt=M(()=>{});function skt(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var lkt=M(()=>{});function YT(e,t){var r=new xg(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=OPe);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 xg(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(gQ)}function DPe(){return YT(this).eachBefore(zPe)}function OPe(e){return e.children}function zPe(e){e.data=e.data.data}function gQ(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function xg(e){this.data=e,this.depth=this.height=0,this.parent=null}var YD=M(()=>{ULt();GLt();YLt();XLt();KLt();JLt();tkt();rkt();ikt();akt();lkt();xg.prototype=YT.prototype={constructor:xg,count:VLt,each:qLt,eachAfter:jLt,eachBefore:WLt,sum:$Lt,sort:ZLt,path:QLt,ancestors:ekt,descendants:nkt,leaves:okt,links:skt,copy:DPe}});function ukt(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 ckt,hkt=M(()=>{ckt=Array.prototype.slice});function XD(e){for(var t=0,r=(e=ukt(ckt.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&fkt(o,i)?++t:(o=BPe(n=FPe(n,i)),t=0);return o}function FPe(e,t){var r,n;if(_Q(t,e))return[t];for(r=0;r<e.length;++r)if(jD(t,e[r])&&_Q(jT(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(jD(jT(e[r],e[n]),t)&&jD(jT(e[r],t),e[n])&&jD(jT(e[n],t),e[r])&&_Q(pkt(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function jD(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 fkt(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 _Q(e,t){for(var r=0;r<t.length;++r)if(!fkt(e,t[r]))return!1;return!0}function BPe(e){switch(e.length){case 1:return HPe(e[0]);case 2:return jT(e[0],e[1]);case 3:return pkt(e[0],e[1],e[2])}}function HPe(e){return{x:e.x,y:e.y,r:e.r}}function jT(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 pkt(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 yQ=M(()=>{hkt()});function dkt(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 mkt(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 gkt(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 $D(e){this._=e,this.next=null,this.previous=null}function vQ(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;dkt(r,t,n=e[2]),t=new $D(t),r=new $D(r),n=new $D(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){dkt(t._,r._,n=e[s]),n=new $D(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(mkt(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(mkt(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=gkt(t);(n=n.next)!==r;)(a=gkt(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=XD(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function _kt(e){return vQ(e),e}var xQ=M(()=>{yQ()});function ykt(e){return e==null?null:V2(e)}function V2(e){if(typeof e!="function")throw new Error;return e}var KD=M(()=>{});function td(){return 0}function bg(e){return function(){return e}}var bQ=M(()=>{});function VPe(e){return Math.sqrt(e.value)}function bkt(){var e=null,t=1,r=1,n=td;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(vkt(e)).eachAfter(wQ(n,.5)).eachBefore(xkt(1)):o.eachBefore(vkt(VPe)).eachAfter(wQ(td,1)).eachAfter(wQ(n,o.r/Math.min(t,r))).eachBefore(xkt(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=ykt(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:bg(+o),i):n},i}function vkt(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function wQ(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=vQ(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function xkt(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 wkt=M(()=>{xQ();KD();bQ()});function ZD(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 SQ=M(()=>{});function lf(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 Skt(){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(ZD),a}function o(a,s){return function(l){l.children&&lf(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 Mkt=M(()=>{SQ();U2()});function qPe(e){return e.id}function GPe(e){return e.parentId}function Ckt(){var e=qPe,t=GPe;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 xg(i),(h=e(i,o,n))!=null&&(h+="")&&(f=Ekt+(c.id=h),p[f]=f in p?Tkt: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[Ekt+h],!l)throw new Error("missing: "+h);if(l===Tkt)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=UPe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(gQ),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 Ekt,UPe,Tkt,Akt=M(()=>{KD();YD();Ekt="$",UPe={depth:-1},Tkt={}});function WPe(e,t){return e.parent===t.parent?1:2}function MQ(e){var t=e.children;return t?t[0]:e.t}function EQ(e){var t=e.children;return t?t[t.length-1]:e.t}function YPe(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 XPe(e,t,r){return e.a.parent===t.parent?e.a:r}function JD(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 $Pe(e){for(var t=new JD(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 JD(o[a],a)),i.parent=r;return(t.parent=new JD(null,0)).children=[t],t}function Pkt(){var e=WPe,t=1,r=1,n=null;function i(c){var u=$Pe(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=EQ(d),f=MQ(f),d&&f;)g=MQ(g),p=EQ(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(YPe(XPe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!EQ(p)&&(p.t=d,p.m+=x-y),f&&!MQ(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 Ikt=M(()=>{YD();JD.prototype=Object.create(xg.prototype)});function wg(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 XT=M(()=>{});function CQ(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?lf(l,r,n,i,g?n+=d*_/g:o):wg(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var TQ,QD,tO=M(()=>{U2();XT();TQ=(1+Math.sqrt(5))/2;QD=function e(t){function r(n,i,o,a,s){CQ(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(TQ)});function Lkt(){var e=QD,t=!1,r=1,n=1,i=[0],o=td,a=td,s=td,l=td,c=td;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(ZD),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:bg(+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:bg(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:bg(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:bg(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:bg(+f),u):c},u}var kkt=M(()=>{SQ();tO();KD();bQ()});function Rkt(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 Nkt=M(()=>{});function Dkt(e,t,r,n,i){(e.depth&1?wg:lf)(e,t,r,n,i)}var Okt=M(()=>{U2();XT()});var zkt,Fkt=M(()=>{U2();XT();tO();zkt=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?lf(c,i,o,a,o+=(s-o)*c.value/g):wg(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=CQ(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(TQ)});var Bkt=M(()=>{HLt();YD();wkt();xQ();yQ();Mkt();Akt();Ikt();kkt();Nkt();U2();XT();Okt();tO();Fkt()});function ed(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Sg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var eO=M(()=>{});function hf(){}function Vkt(){return this.rgb().formatHex()}function n6e(){return jkt(this).formatHsl()}function Ukt(){return this.rgb().formatRgb()}function Eg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=KPe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?qkt(t):r===3?new ro(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=ZPe.exec(e))?new ro(t[1],t[2],t[3],1):(t=JPe.exec(e))?new ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QPe.exec(e))?rO(t[1],t[2],t[3],t[4]):(t=t6e.exec(e))?rO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=e6e.exec(e))?Ykt(t[1],t[2]/100,t[3]/100,1):(t=r6e.exec(e))?Ykt(t[1],t[2]/100,t[3]/100,t[4]):Hkt.hasOwnProperty(e)?qkt(Hkt[e]):e==="transparent"?new ro(NaN,NaN,NaN,0):null}function qkt(e){return new ro(e>>16&255,e>>8&255,e&255,1)}function rO(e,t,r,n){return n<=0&&(e=t=r=NaN),new ro(e,t,r,n)}function KT(e){return e instanceof hf||(e=Eg(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?KT(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 Gkt(){return"#"+AQ(this.r)+AQ(this.g)+AQ(this.b)}function Wkt(){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 AQ(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Ykt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new cf(e,t,r,n)}function jkt(e){if(e instanceof cf)return new cf(e.h,e.s,e.l,e.opacity);if(e instanceof hf||(e=Eg(e)),!e)return new cf;if(e instanceof cf)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 cf(a,s,l,e.opacity)}function ZT(e,t,r,n){return arguments.length===1?jkt(e):new cf(e,t,r,n==null?1:n)}function cf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function PQ(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 Mg,Wy,q2,$T,uf,KPe,ZPe,JPe,QPe,t6e,e6e,r6e,Hkt,nO=M(()=>{eO();Mg=.7,Wy=1/Mg,q2="\\s*([+-]?\\d+)\\s*",$T="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",uf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KPe=/^#([0-9a-f]{3,8})$/,ZPe=new RegExp("^rgb\\("+[q2,q2,q2]+"\\)$"),JPe=new RegExp("^rgb\\("+[uf,uf,uf]+"\\)$"),QPe=new RegExp("^rgba\\("+[q2,q2,q2,$T]+"\\)$"),t6e=new RegExp("^rgba\\("+[uf,uf,uf,$T]+"\\)$"),e6e=new RegExp("^hsl\\("+[$T,uf,uf]+"\\)$"),r6e=new RegExp("^hsla\\("+[$T,uf,uf,$T]+"\\)$"),Hkt={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};ed(hf,Eg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Vkt,formatHex:Vkt,formatHsl:n6e,formatRgb:Ukt,toString:Ukt});ed(ro,G2,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new ro(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,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:Gkt,formatHex:Gkt,formatRgb:Wkt,toString:Wkt}));ed(cf,ZT,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new cf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,e),new cf(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(PQ(e>=240?e-240:e+120,i,n),PQ(e,i,n),PQ(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 iO,oO,IQ=M(()=>{iO=Math.PI/180,oO=180/Math.PI});function Qkt(e){if(e instanceof ff)return new ff(e.l,e.a,e.b,e.opacity);if(e instanceof rd)return t8t(e);e instanceof ro||(e=KT(e));var t=NQ(e.r),r=NQ(e.g),n=NQ(e.b),i=LQ((.2225045*t+.7168786*r+.0606169*n)/$kt),o,a;return t===r&&r===n?o=a=i:(o=LQ((.4360747*t+.3850649*r+.1430804*n)/Xkt),a=LQ((.0139322*t+.0971045*r+.7141733*n)/Kkt)),new ff(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Y2(e,t,r,n){return arguments.length===1?Qkt(e):new ff(e,t,r,n==null?1:n)}function ff(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function LQ(e){return e>i6e?Math.pow(e,1/3):e/Jkt+Zkt}function kQ(e){return e>W2?e*e*e:Jkt*(e-Zkt)}function RQ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function NQ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o6e(e){if(e instanceof rd)return new rd(e.h,e.c,e.l,e.opacity);if(e instanceof ff||(e=Qkt(e)),e.a===0&&e.b===0)return new rd(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*oO;return new rd(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function JT(e,t,r,n){return arguments.length===1?o6e(e):new rd(e,t,r,n==null?1:n)}function rd(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function t8t(e){if(isNaN(e.h))return new ff(e.l,0,0,e.opacity);var t=e.h*iO;return new ff(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var aO,Xkt,$kt,Kkt,Zkt,W2,Jkt,i6e,e8t=M(()=>{eO();nO();IQ();aO=18,Xkt=.96422,$kt=1,Kkt=.82521,Zkt=4/29,W2=6/29,Jkt=3*W2*W2,i6e=W2*W2*W2;ed(ff,Y2,Sg(hf,{brighter:function(e){return new ff(this.l+aO*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ff(this.l-aO*(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=Xkt*kQ(t),e=$kt*kQ(e),r=Kkt*kQ(r),new ro(RQ(3.1338561*t-1.6168667*e-.4906146*r),RQ(-.9787684*t+1.9161415*e+.033454*r),RQ(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));ed(rd,JT,Sg(hf,{brighter:function(e){return new rd(this.h,this.c,this.l+aO*(e==null?1:e),this.opacity)},darker:function(e){return new rd(this.h,this.c,this.l-aO*(e==null?1:e),this.opacity)},rgb:function(){return t8t(this).rgb()}}))});function a6e(e){if(e instanceof Yy)return new Yy(e.h,e.s,e.l,e.opacity);e instanceof ro||(e=KT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(i8t*n+r8t*t-n8t*r)/(i8t+r8t-n8t),o=n-i,a=(QT*(r-i)-OQ*o)/sO,s=Math.sqrt(a*a+o*o)/(QT*i*(1-i)),l=s?Math.atan2(a,o)*oO-120:NaN;return new Yy(l<0?l+360:l,s,i,e.opacity)}function j2(e,t,r,n){return arguments.length===1?a6e(e):new Yy(e,t,r,n==null?1:n)}function Yy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var o8t,DQ,OQ,sO,QT,r8t,n8t,i8t,a8t=M(()=>{eO();nO();IQ();o8t=-.14861,DQ=1.78277,OQ=-.29227,sO=-.90649,QT=1.97294,r8t=QT*sO,n8t=QT*DQ,i8t=DQ*OQ-sO*o8t;ed(Yy,j2,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new Yy(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,e),new Yy(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*iO,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*(o8t*n+DQ*i)),255*(t+r*(OQ*n+sO*i)),255*(t+r*(QT*n)),this.opacity)}}))});var jy=M(()=>{nO();e8t();a8t()});function zQ(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 lO(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 zQ((r-n/t)*t,a,i,o,s)}}var cO=M(()=>{});function uO(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 zQ((r-n/t)*t,i,o,a,s)}}var FQ=M(()=>{cO()});function X2(e){return function(){return e}}var BQ=M(()=>{});function s8t(e,t){return function(r){return e+r*t}}function s6e(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?s8t(e,r>180||r<-180?r-360*Math.round(r/360):r):X2(isNaN(e)?t:e)}function l8t(e){return(e=+e)==1?Qn:function(t,r){return r-t?s6e(t,r,e):X2(isNaN(t)?r:t)}}function Qn(e,t){var r=t-e;return r?s8t(e,r):X2(isNaN(e)?t:e)}var K2=M(()=>{BQ()});function c8t(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 tC,u8t,h8t,HQ=M(()=>{jy();cO();FQ();K2();tC=function e(t){var r=l8t(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);u8t=c8t(lO),h8t=c8t(uO)});function hO(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 VQ=M(()=>{fO()});function pO(e,t){var r=new Date;return e=+e,t-=e,function(n){return r.setTime(e+t*n),r}}var UQ=M(()=>{});function As(e,t){return e=+e,t-=e,function(r){return e+t*r}}var eC=M(()=>{});function dO(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 qQ=M(()=>{fO()});function l6e(e){return function(){return e}}function c6e(e){return function(t){return e(t)+""}}function mO(e,t){var r=WQ.lastIndex=GQ.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=WQ.exec(e))&&(i=GQ.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:As(n,i)})),r=GQ.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?c6e(l[0].x):l6e(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 WQ,GQ,YQ=M(()=>{eC();WQ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,GQ=new RegExp(WQ.source,"g")});function Z2(e,t){var r=typeof t,n;return t==null||r==="boolean"?X2(t):(r==="number"?As:r==="string"?(n=Eg(t))?(t=n,tC):mO:t instanceof Eg?tC:t instanceof Date?pO:Array.isArray(t)?hO:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dO:As)(e,t)}var fO=M(()=>{jy();HQ();VQ();UQ();eC();qQ();YQ();BQ()});function f8t(e,t){return e=+e,t-=e,function(r){return Math.round(e+t*r)}}var p8t=M(()=>{});function jQ(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)*d8t,skewX:Math.atan(l)*d8t,scaleX:a,scaleY:s}}var d8t,gO,m8t=M(()=>{d8t=180/Math.PI,gO={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function _8t(e){return e==="none"?gO:(rC||(rC=document.createElement("DIV"),XQ=document.documentElement,g8t=document.defaultView),rC.style.transform=e,e=g8t.getComputedStyle(XQ.appendChild(rC),null).getPropertyValue("transform"),XQ.removeChild(rC),e=e.slice(7,-1).split(","),jQ(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function y8t(e){return e==null?gO:(_O||(_O=document.createElementNS("http://www.w3.org/2000/svg","g")),_O.setAttribute("transform",e),(e=_O.transform.baseVal.consolidate())?(e=e.matrix,jQ(e.a,e.b,e.c,e.d,e.e,e.f)):gO)}var rC,XQ,g8t,_O,v8t=M(()=>{m8t()});function x8t(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:As(c,h)},{i:g-2,x:As(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:As(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:As(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:As(c,h)},{i:g-2,x:As(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 b8t,w8t,S8t=M(()=>{eC();v8t();b8t=x8t(_8t,"px, ","px)","deg)"),w8t=x8t(y8t,", ",")",")")});function E8t(e){return((e=Math.exp(e))+1/e)/2}function h6e(e){return((e=Math.exp(e))-1/e)/2}function f6e(e){return((e=Math.exp(2*e))-1)/(e+1)}function T8t(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<u6e)f=Math.log(s/i)/nC,h=function(x){return[r+x*l,n+x*c,i*Math.exp(nC*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+M8t*u)/(2*i*$Q*p),g=(s*s-i*i-M8t*u)/(2*s*$Q*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/nC,h=function(x){var b=x*f,S=E8t(_),C=i/($Q*p)*(S*f6e(nC*b+_)-h6e(_));return[r+C*l,n+C*c,i*S/E8t(nC*b+_)]}}return h.duration=f*1e3,h}var nC,$Q,M8t,u6e,C8t=M(()=>{nC=Math.SQRT2,$Q=2,M8t=4,u6e=1e-12});function A8t(e){return function(t,r){var n=e((t=ZT(t)).h,(r=ZT(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 P8t,I8t,L8t=M(()=>{jy();K2();P8t=A8t($2),I8t=A8t(Qn)});function KQ(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 k8t=M(()=>{jy();K2()});function R8t(e){return function(t,r){var n=e((t=JT(t)).h,(r=JT(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 N8t,D8t,O8t=M(()=>{jy();K2();N8t=R8t($2),D8t=R8t(Qn)});function z8t(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 F8t,B8t,H8t=M(()=>{jy();K2();F8t=z8t($2),B8t=z8t(Qn)});function V8t(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var U8t=M(()=>{});var q8t=M(()=>{fO();VQ();cO();FQ();UQ();eC();qQ();p8t();YQ();S8t();C8t();HQ();L8t();k8t();O8t();H8t();U8t()});function QQ(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function G8t(){return new QQ}var ZQ,JQ,Xy,p6e,W8t,Y8t=M(()=>{ZQ=Math.PI,JQ=2*ZQ,Xy=1e-6,p6e=JQ-Xy;QQ.prototype=G8t.prototype={constructor:QQ,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>Xy)if(!(Math.abs(u*s-l*c)>Xy)||!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((ZQ-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>Xy&&(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)>Xy||Math.abs(this._y1-c)>Xy)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%JQ+JQ),h>p6e?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Xy&&(this._+="A"+r+","+r+",0,"+ +(h>=ZQ)+","+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._}};W8t=G8t});var j8t=M(()=>{Y8t()});function X8t(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 $8t=M(()=>{});function K8t(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 Z8t=M(()=>{});function J8t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}var Q8t=M(()=>{});function d6e(e,t){return e[0]-t[0]||e[1]-t[1]}function tRt(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&J8t(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function eRt(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(d6e),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=tRt(n),a=tRt(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 rRt=M(()=>{Q8t()});function nRt(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 iRt=M(()=>{});function oRt(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 aRt=M(()=>{});var sRt=M(()=>{$8t();Z8t();rRt();iRt();aRt()});function lRt(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return cRt(this.cover(t,r),t,r,e)}function cRt(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 uRt(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)cRt(this,a[r],s[r],e[r]);return this}var hRt=M(()=>{});function fRt(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 pRt=M(()=>{});function dRt(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var mRt=M(()=>{});function gRt(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 _Rt=M(()=>{});function Eo(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var yO=M(()=>{});function yRt(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 vRt=M(()=>{yO()});function xRt(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 bRt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var wRt=M(()=>{});function SRt(){return this._root}var MRt=M(()=>{});function ERt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var TRt=M(()=>{});function CRt(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 ARt=M(()=>{yO()});function PRt(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 IRt=M(()=>{yO()});function LRt(e){return e[0]}function kRt(e){return arguments.length?(this._x=e,this):this._x}var RRt=M(()=>{});function NRt(e){return e[1]}function DRt(e){return arguments.length?(this._y=e,this):this._y}var ORt=M(()=>{});function vO(e,t,r){var n=new ttt(t==null?LRt:t,r==null?NRt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function ttt(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 zRt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Xa,FRt=M(()=>{hRt();pRt();mRt();_Rt();vRt();wRt();MRt();TRt();ARt();IRt();RRt();ORt();Xa=vO.prototype=ttt.prototype;Xa.copy=function(){var e=new ttt(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=zRt(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]=zRt(n));return e};Xa.add=lRt;Xa.addAll=uRt;Xa.cover=fRt;Xa.data=dRt;Xa.extent=gRt;Xa.find=yRt;Xa.remove=xRt;Xa.removeAll=bRt;Xa.root=SRt;Xa.size=ERt;Xa.visit=CRt;Xa.visitAfter=PRt;Xa.x=kRt;Xa.y=DRt});var BRt=M(()=>{FRt()});var HRt,VRt=M(()=>{HRt=[].slice});function ett(e){this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function URt(e){if(!e._start)try{g6e(e)}catch(t){if(e._tasks[e._ended+e._active-1])rtt(e,t);else if(!e._data)throw t}}function g6e(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]=_6e(e,t),--e._waiting,++e._active,r=i.apply(null,r),e._tasks[t]&&(e._tasks[t]=r||m6e)}}function _6e(e,t){return function(r,n){!e._tasks[t]||(--e._active,++e._ended,e._tasks[t]=null,e._error==null&&(r!=null?rtt(e,r):(e._data[t]=n,e._waiting?URt(e):xO(e))))}}function rtt(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,xO(e)}function xO(e){if(!e._active&&e._call){var t=e._data;e._data=void 0,e._call(e._error,t)}}function bO(e){if(e==null)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new ett(e)}var m6e,qRt=M(()=>{VRt();m6e={};ett.prototype=bO.prototype={constructor:ett,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=HRt.call(arguments,1);return t.push(e),++this._waiting,this._tasks.push(t),URt(this),this},abort:function(){return this._error==null&&rtt(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))},xO(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,xO(this),this}}});var GRt=M(()=>{qRt()});function bc(){return Math.random()}var $y=M(()=>{});var WRt,YRt=M(()=>{$y();WRt=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 wO,ntt=M(()=>{$y();wO=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,XRt=M(()=>{$y();ntt();jRt=function e(t){function r(){var n=wO.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(bc)});var SO,itt=M(()=>{$y();SO=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 $Rt,KRt=M(()=>{$y();itt();$Rt=function e(t){function r(n){var i=SO.source(t)(n);return function(){return i()/n}}return r.source=e,r}(bc)});var ZRt,JRt=M(()=>{$y();ZRt=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(bc)});var QRt=M(()=>{YRt();ntt();XRt();KRt();itt();JRt()});function J2(e,t){var r,n=vs("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&&v6e(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=y6e(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 y6e(e){return function(t,r){e(t==null?r:null)}}function v6e(e){var t=e.responseType;return t&&t!=="text"?e.response:e.responseText}var MO=M(()=>{Tb();km()});function Tg(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 iC=M(()=>{MO()});var tNt,eNt=M(()=>{iC();tNt=Tg("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)})});var rNt,nNt=M(()=>{iC();rNt=Tg("application/json",function(e){return JSON.parse(e.responseText)})});var iNt,oNt=M(()=>{iC();iNt=Tg("text/plain",function(e){return e.responseText})});var aNt,sNt=M(()=>{iC();aNt=Tg("application/xml",function(e){var t=e.responseXML;if(!t)throw new Error("parse error");return t})});function EO(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(x6e(t,n=a)):n},o.row(n),i?o.get(i):o}}function x6e(e,t){return function(r){return e(r.responseText,t)}}var ott=M(()=>{MO()});var lNt,cNt=M(()=>{UE();ott();lNt=EO("text/csv",Cb)});var uNt,hNt=M(()=>{UE();ott();uNt=EO("text/tab-separated-values",Ab)});var fNt=M(()=>{MO();eNt();nNt();oNt();sNt();cNt();hNt()});function pf(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Ky=M(()=>{});function oC(e){return e.length===1&&(e=b6e(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 b6e(e){return function(t,r){return pf(e(t),r)}}var att=M(()=>{Ky()});var pNt,dNt,w6e,df,stt=M(()=>{Ky();att();pNt=oC(pf),dNt=pNt.right,w6e=pNt.left,df=dNt});var ltt=M(()=>{});var mNt=M(()=>{ltt()});var gNt=M(()=>{});function Q2(e){return e===null?NaN:+e}var tw=M(()=>{});var ctt=M(()=>{tw()});var utt=M(()=>{ctt()});var htt=M(()=>{});var _Nt,M6e,E6e,ftt=M(()=>{_Nt=Array.prototype,M6e=_Nt.slice,E6e=_Nt.map});var yNt=M(()=>{});var vNt=M(()=>{});function TO(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 ptt=M(()=>{});function aC(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>=dtt?10:o>=mtt?5:o>=gtt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=dtt?10:o>=mtt?5:o>=gtt?2:1)}function Zy(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>=dtt?i*=10:o>=mtt?i*=5:o>=gtt&&(i*=2),t<e?-i:i}var dtt,mtt,gtt,_tt=M(()=>{dtt=Math.sqrt(50),mtt=Math.sqrt(10),gtt=Math.sqrt(2)});var ytt=M(()=>{});var xNt=M(()=>{ftt();stt();yNt();htt();vNt();ptt();_tt();ytt()});function sC(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 CO=M(()=>{tw()});var bNt=M(()=>{ftt();Ky();tw();CO()});var wNt=M(()=>{utt()});var SNt=M(()=>{});var MNt=M(()=>{tw()});var ENt=M(()=>{Ky();tw();CO()});var TNt=M(()=>{});var vtt=M(()=>{});var CNt=M(()=>{});var ANt=M(()=>{Ky()});var PNt=M(()=>{});var INt=M(()=>{});var xtt=M(()=>{vtt()});var LNt=M(()=>{xtt()});var mf=M(()=>{stt();Ky();att();mNt();gNt();utt();htt();xNt();bNt();wNt();ytt();SNt();MNt();ENt();TNt();vtt();ltt();CNt();CO();ptt();ANt();PNt();INt();_tt();xtt();ctt();LNt()});function AO(){}function kNt(e,t){var r=new AO;if(e instanceof AO)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 fl,Jy,PO=M(()=>{fl="$";AO.prototype=kNt.prototype={constructor:AO,has:function(e){return fl+e in this},get:function(e){return this[fl+e]},set:function(e,t){return this[fl+e]=t,this},remove:function(e){var t=fl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===fl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===fl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===fl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===fl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===fl&&++e;return e},empty:function(){for(var e in this)if(e[0]===fl)return!1;return!0},each:function(e){for(var t in this)t[0]===fl&&e(this[t],t.slice(1),this)}};Jy=kNt});var RNt=M(()=>{PO()});function IO(){}function L6e(e,t){var r=new IO;if(e instanceof IO)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 Qy,NNt=M(()=>{PO();Qy=Jy.prototype;IO.prototype=L6e.prototype={constructor:IO,has:Qy.has,add:function(e){return e+="",this[fl+e]=e,this},remove:Qy.remove,clear:Qy.clear,values:Qy.keys,size:Qy.size,empty:Qy.empty,each:Qy.each}});var DNt=M(()=>{});var ONt=M(()=>{});var zNt=M(()=>{});var FNt=M(()=>{RNt();NNt();PO();DNt();ONt();zNt()});var BNt,rw,pl,Cg=M(()=>{BNt=Array.prototype,rw=BNt.map,pl=BNt.slice});function nw(e){var t=Jy(),r=[],n=LO;e=e==null?[]:pl.call(e);function i(o){var a=o+"",s=t.get(a);if(!s){if(n!==LO)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=Jy();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=pl.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 LO,btt=M(()=>{FNt();Cg();LO={name:"implicit"}});function lC(){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=TO(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 lC().domain(t()).range(n).round(a).paddingInner(s).paddingOuter(l).align(c)},u()}function HNt(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return HNt(t())},e}function VNt(){return HNt(lC().paddingInner(1))}var UNt=M(()=>{mf();btt()});function iw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var wtt=M(()=>{});function e1(){}function GNt(){return this.rgb().formatHex()}function B6e(){return KNt(this).formatHsl()}function WNt(){return this.rgb().formatRgb()}function Pg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=k6e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?YNt(t):r===3?new ha(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?kO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?kO(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 ha(t[1],t[2],t[3],1):(t=N6e.exec(e))?new ha(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=D6e.exec(e))?kO(t[1],t[2],t[3],t[4]):(t=O6e.exec(e))?kO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=z6e.exec(e))?$Nt(t[1],t[2]/100,t[3]/100,1):(t=F6e.exec(e))?$Nt(t[1],t[2]/100,t[3]/100,t[4]):qNt.hasOwnProperty(e)?YNt(qNt[e]):e==="transparent"?new ha(NaN,NaN,NaN,0):null}function YNt(e){return new ha(e>>16&255,e>>8&255,e&255,1)}function kO(e,t,r,n){return n<=0&&(e=t=r=NaN),new ha(e,t,r,n)}function Ett(e){return e instanceof e1||(e=Pg(e)),e?(e=e.rgb(),new ha(e.r,e.g,e.b,e.opacity)):new ha}function aw(e,t,r,n){return arguments.length===1?Ett(e):new ha(e,t,r,n==null?1:n)}function ha(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function jNt(){return"#"+Stt(this.r)+Stt(this.g)+Stt(this.b)}function XNt(){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 Stt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function $Nt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gf(e,t,r,n)}function KNt(e){if(e instanceof gf)return new gf(e.h,e.s,e.l,e.opacity);if(e instanceof e1||(e=Pg(e)),!e)return new gf;if(e instanceof gf)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 gf(a,s,l,e.opacity)}function ZNt(e,t,r,n){return arguments.length===1?KNt(e):new gf(e,t,r,n==null?1:n)}function gf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Mtt(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 Ag,t1,ow,uC,_f,k6e,R6e,N6e,D6e,O6e,z6e,F6e,qNt,Ttt=M(()=>{wtt();Ag=.7,t1=1/Ag,ow="\\s*([+-]?\\d+)\\s*",uC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_f="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k6e=/^#([0-9a-f]{3,8})$/,R6e=new RegExp("^rgb\\("+[ow,ow,ow]+"\\)$"),N6e=new RegExp("^rgb\\("+[_f,_f,_f]+"\\)$"),D6e=new RegExp("^rgba\\("+[ow,ow,ow,uC]+"\\)$"),O6e=new RegExp("^rgba\\("+[_f,_f,_f,uC]+"\\)$"),z6e=new RegExp("^hsl\\("+[uC,_f,_f]+"\\)$"),F6e=new RegExp("^hsla\\("+[uC,_f,_f,uC]+"\\)$"),qNt={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(e1,Pg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:GNt,formatHex:GNt,formatHsl:B6e,formatRgb:WNt,toString:WNt});iw(ha,aw,cC(e1,{brighter:function(e){return e=e==null?t1:Math.pow(t1,e),new ha(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new ha(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:XNt,toString:XNt}));iw(gf,ZNt,cC(e1,{brighter:function(e){return e=e==null?t1:Math.pow(t1,e),new gf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new gf(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 ha(Mtt(e>=240?e-240:e+120,i,n),Mtt(e,i,n),Mtt(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 JNt,QNt,tDt=M(()=>{JNt=Math.PI/180,QNt=180/Math.PI});function H6e(e){if(e instanceof r1)return new r1(e.h,e.s,e.l,e.opacity);e instanceof ha||(e=Ett(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(nDt*n+eDt*t-rDt*r)/(nDt+eDt-rDt),o=n-i,a=(hC*(r-i)-Att*o)/RO,s=Math.sqrt(a*a+o*o)/(hC*i*(1-i)),l=s?Math.atan2(a,o)*QNt-120:NaN;return new r1(l<0?l+360:l,s,i,e.opacity)}function $a(e,t,r,n){return arguments.length===1?H6e(e):new r1(e,t,r,n==null?1:n)}function r1(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var iDt,Ctt,Att,RO,hC,eDt,rDt,nDt,oDt=M(()=>{wtt();Ttt();tDt();iDt=-.14861,Ctt=1.78277,Att=-.29227,RO=-.90649,hC=1.97294,eDt=hC*RO,rDt=hC*Ctt,nDt=Ctt*Att-RO*iDt;iw(r1,$a,cC(e1,{brighter:function(e){return e=e==null?t1:Math.pow(t1,e),new r1(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new r1(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*JNt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new ha(255*(t+r*(iDt*n+Ctt*i)),255*(t+r*(Att*n+RO*i)),255*(t+r*(hC*n)),this.opacity)}}))});var sw=M(()=>{Ttt();oDt()});function Ptt(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 aDt(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 Ptt((r-n/t)*t,a,i,o,s)}}var Itt=M(()=>{});function sDt(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 Ptt((r-n/t)*t,i,o,a,s)}}var lDt=M(()=>{Itt()});function lw(e){return function(){return e}}var Ltt=M(()=>{});function cDt(e,t){return function(r){return e+r*t}}function V6e(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 uDt(e,t){var r=t-e;return r?cDt(e,r>180||r<-180?r-360*Math.round(r/360):r):lw(isNaN(e)?t:e)}function hDt(e){return(e=+e)==1?nd:function(t,r){return r-t?V6e(t,r,e):lw(isNaN(t)?r:t)}}function nd(e,t){var r=t-e;return r?cDt(e,r):lw(isNaN(e)?t:e)}var ktt=M(()=>{Ltt()});function fDt(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 Rtt,a5n,s5n,pDt=M(()=>{sw();Itt();lDt();ktt();Rtt=function e(t){var r=hDt(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=nd(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);a5n=fDt(aDt),s5n=fDt(sDt)});function dDt(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 mDt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var gDt=M(()=>{});function _Dt(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]=n1(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 yDt=M(()=>{NO()});function vDt(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var xDt=M(()=>{});function yf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var DO=M(()=>{});function bDt(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]=n1(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var wDt=M(()=>{NO()});function U6e(e){return function(){return e}}function q6e(e){return function(t){return e(t)+""}}function SDt(e,t){var r=Dtt.lastIndex=Ntt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Dtt.exec(e))&&(i=Ntt.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:yf(n,i)})),r=Ntt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?q6e(l[0].x):U6e(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 Dtt,Ntt,MDt=M(()=>{DO();Dtt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ntt=new RegExp(Dtt.source,"g")});function n1(e,t){var r=typeof t,n;return t==null||r==="boolean"?lw(t):(r==="number"?yf:r==="string"?(n=Pg(t))?(t=n,Rtt):SDt:t instanceof Pg?Rtt:t instanceof Date?vDt:mDt(t)?dDt:Array.isArray(t)?_Dt:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?bDt:yf)(e,t)}var NO=M(()=>{sw();pDt();yDt();xDt();DO();wDt();MDt();Ltt();gDt()});function Ott(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var EDt=M(()=>{});function TDt(e){return function t(r){r=+r;function n(i,o){var a=e((i=$a(i)).h,(o=$a(o)).h),s=nd(i.s,o.s),l=nd(i.l,o.l),c=nd(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 G6e,cw,CDt=M(()=>{sw();ktt();G6e=TDt(uDt),cw=TDt(nd)});var uw=M(()=>{NO();DO();EDt();CDt()});function hw(e){return function(){return e}}var OO=M(()=>{});function zO(e){return+e}var ztt=M(()=>{});function fC(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:hw(t)}function W6e(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 Y6e(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 X6e(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=df(e,l,1,i)-1;return a[c](o[c](l))}}function Ig(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp())}function id(e,t){var r=ADt,n=ADt,i=n1,o=!1,a,s,l;function c(){return a=Math.min(r.length,n.length)>2?X6e:j6e,s=l=null,u}function u(h){return(s||(s=a(r,n,o?W6e(e):e,i)))(+h)}return u.invert=function(h){return(l||(l=a(n,r,fC,o?Y6e(t):t)))(+h)},u.domain=function(h){return arguments.length?(r=rw.call(h,zO),c()):r.slice()},u.range=function(h){return arguments.length?(n=pl.call(h),c()):n.slice()},u.rangeRound=function(h){return n=pl.call(h),i=Ott,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 ADt,pC=M(()=>{mf();uw();Cg();OO();ztt();ADt=[0,1]});function PDt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function i1(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 dC=M(()=>{});function vf(e){return e=i1(Math.abs(e)),e?e[1]:NaN}var mC=M(()=>{dC()});function IDt(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 LDt=M(()=>{});function kDt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var RDt=M(()=>{});function Lg(e){if(!(t=$6e.exec(e)))throw new Error("invalid format: "+e);var t;return new FO({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 FO(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 $6e,Ftt=M(()=>{$6e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;Lg.prototype=FO.prototype;FO.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 NDt(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 DDt=M(()=>{});function ODt(e,t){var r=i1(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Btt=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")+i1(e,Math.max(0,t+o-1))[0]}var Btt,Htt=M(()=>{dC()});function Vtt(e,t){var r=i1(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 zDt=M(()=>{dC()});var Utt,FDt=M(()=>{dC();Htt();zDt();Utt={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:PDt,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 Vtt(e*100,t)},r:Vtt,s:ODt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function qtt(e){return e}var BDt=M(()=>{});function UDt(e){var t=e.grouping===void 0||e.thousands===void 0?qtt:IDt(HDt.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?qtt:kDt(HDt.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=Lg(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"):Utt[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=Utt[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=NDt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?VDt[8+Btt/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=Lg(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(vf(f)/3)))*3,g=Math.pow(10,-d),_=VDt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var HDt,VDt,qDt=M(()=>{mC();LDt();RDt();Ftt();DDt();FDt();Htt();BDt();HDt=Array.prototype.map,VDt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function Gtt(e){return BO=UDt(e),fw=BO.format,HO=BO.formatPrefix,BO}var BO,fw,HO,GDt=M(()=>{qDt();Gtt({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})});function Wtt(e){return Math.max(0,-vf(Math.abs(e)))}var WDt=M(()=>{mC()});function Ytt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vf(t)/3)))*3-vf(Math.abs(e)))}var YDt=M(()=>{mC()});function jtt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vf(t)-vf(e))+1}var jDt=M(()=>{mC()});var Xtt=M(()=>{GDt();Ftt();WDt();YDt();jDt()});function XDt(e,t,r){var n=e[0],i=e[e.length-1],o=Zy(n,i,t==null?10:t),a;switch(r=Lg(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(n),Math.abs(i));return r.precision==null&&!isNaN(a=Ytt(o,s))&&(r.precision=a),HO(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=jtt(o,Math.max(Math.abs(n),Math.abs(i))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Wtt(o))&&(r.precision=a-(r.type==="%")*2);break}}return fw(r)}var $Dt=M(()=>{mf();Xtt()});function od(e){var t=e.domain;return e.ticks=function(r){var n=t();return aC(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){return XDt(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 VO(){var e=id(fC,yf);return e.copy=function(){return Ig(e,VO())},od(e)}var pw=M(()=>{mf();uw();pC();$Dt()});function UO(){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,zO),t):e.slice()},t.copy=function(){return UO().domain(e)},od(t)}var KDt=M(()=>{Cg();pw();ztt()});function qO(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 $tt=M(()=>{});function K6e(e,t){return(t=Math.log(t/e))?function(r){return Math.log(r/e)/t}:hw(t)}function Z6e(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 J6e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ZDt(e){return e===10?J6e:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function JDt(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 QDt(e){return function(t){return-e(-t)}}function GO(){var e=id(K6e,Z6e).domain([1,10]),t=e.domain,r=10,n=JDt(10),i=ZDt(10);function o(){return n=JDt(r),i=ZDt(r),t()[0]<0&&(n=QDt(n),i=QDt(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=aC(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(qO(t(),{floor:function(a){return i(Math.floor(n(a)))},ceil:function(a){return i(Math.ceil(n(a)))}}))},e.copy=function(){return Ig(e,GO().base(r))},e}var tOt=M(()=>{mf();Xtt();OO();$tt();pC()});function dw(e,t){return e<0?-Math.pow(-e,t):Math.pow(e,t)}function gC(){var e=1,t=id(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 Ig(t,gC().exponent(e))},od(t)}function eOt(){return gC().exponent(.5)}var rOt=M(()=>{OO();pw();pC()});function WO(){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]=sC(e,o/a);return i}function i(o){if(!isNaN(o=+o))return t[df(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(pf),n()},i.range=function(o){return arguments.length?(t=pl.call(o),n()):t.slice()},i.quantiles=function(){return r.slice()},i.copy=function(){return WO().domain(e).range(t)},i}var nOt=M(()=>{mf();Cg()});function YO(){var e=0,t=1,r=1,n=[.5],i=[0,1];function o(s){if(s<=s)return i[df(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=pl.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 YO().domain([e,t]).range(i)},od(o)}var iOt=M(()=>{mf();Cg();pw()});function jO(){var e=[.5],t=[0,1],r=1;function n(i){if(i<=i)return t[df(e,i,0,r)]}return n.domain=function(i){return arguments.length?(e=pl.call(i),r=Math.min(e.length,t.length-1),n):e.slice()},n.range=function(i){return arguments.length?(t=pl.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 jO().domain(e).range(t)},n}var oOt=M(()=>{mf();Cg()});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 Ktt.setTime(+o),Ztt.setTime(+a),e(Ktt),e(Ztt),Math.floor(r(Ktt,Ztt))},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 Ktt,Ztt,Ka=M(()=>{Ktt=new Date,Ztt=new Date});var XO,mw,aOt,sOt=M(()=>{Ka();XO=Nr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});XO.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}):XO};mw=XO,aOt=XO.range});var o1,wc,gw,$O,KO,xf=M(()=>{o1=1e3,wc=6e4,gw=36e5,$O=864e5,KO=6048e5});var lOt,_w,cOt,uOt=M(()=>{Ka();xf();lOt=Nr(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*o1)},function(e,t){return(t-e)/o1},function(e){return e.getUTCSeconds()}),_w=lOt,cOt=lOt.range});var hOt,Jtt,Q6e,fOt=M(()=>{Ka();xf();hOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o1)},function(e,t){e.setTime(+e+t*wc)},function(e,t){return(t-e)/wc},function(e){return e.getMinutes()}),Jtt=hOt,Q6e=hOt.range});var pOt,Qtt,tIe,dOt=M(()=>{Ka();xf();pOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o1-e.getMinutes()*wc)},function(e,t){e.setTime(+e+t*gw)},function(e,t){return(t-e)/gw},function(e){return e.getHours()}),Qtt=pOt,tIe=pOt.range});var mOt,yw,eIe,gOt=M(()=>{Ka();xf();mOt=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)/$O},function(e){return e.getDate()-1}),yw=mOt,eIe=mOt.range});function a1(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)/KO})}var s1,vw,_Ot,yOt,kg,vOt,xOt,bOt,rIe,nIe,iIe,oIe,aIe,sIe,wOt=M(()=>{Ka();xf();s1=a1(0),vw=a1(1),_Ot=a1(2),yOt=a1(3),kg=a1(4),vOt=a1(5),xOt=a1(6),bOt=s1.range,rIe=vw.range,nIe=_Ot.range,iIe=yOt.range,oIe=kg.range,aIe=vOt.range,sIe=xOt.range});var SOt,tet,lIe,MOt=M(()=>{Ka();SOt=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()}),tet=SOt,lIe=SOt.range});var eet,ad,cIe,EOt=M(()=>{Ka();eet=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()});eet.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)})};ad=eet,cIe=eet.range});var TOt,ret,uIe,COt=M(()=>{Ka();xf();TOt=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()}),ret=TOt,uIe=TOt.range});var AOt,net,hIe,POt=M(()=>{Ka();xf();AOt=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()}),net=AOt,hIe=AOt.range});var IOt,xw,fIe,LOt=M(()=>{Ka();xf();IOt=Nr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/$O},function(e){return e.getUTCDate()-1}),xw=IOt,fIe=IOt.range});function l1(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)/KO})}var c1,bw,kOt,ROt,Rg,NOt,DOt,OOt,pIe,dIe,mIe,gIe,_Ie,yIe,zOt=M(()=>{Ka();xf();c1=l1(0),bw=l1(1),kOt=l1(2),ROt=l1(3),Rg=l1(4),NOt=l1(5),DOt=l1(6),OOt=c1.range,pIe=bw.range,dIe=kOt.range,mIe=ROt.range,gIe=Rg.range,_Ie=NOt.range,yIe=DOt.range});var FOt,iet,vIe,BOt=M(()=>{Ka();FOt=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()}),iet=FOt,vIe=FOt.range});var oet,sd,xIe,HOt=M(()=>{Ka();oet=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()});oet.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)})};sd=oet,xIe=oet.range});var ZO=M(()=>{sOt();uOt();fOt();dOt();gOt();wOt();MOt();EOt();COt();POt();LOt();zOt();BOt();HOt()});function aet(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 set(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 _C(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function cet(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=yC(i),u=vC(i),h=yC(o),f=vC(o),p=yC(a),d=vC(a),g=yC(s),_=vC(s),y=yC(l),x=vC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:YOt,e:YOt,f:qIe,g:QIe,G:e9e,H:HIe,I:VIe,j:UIe,L:ZOt,m:GIe,M:WIe,p:st,q:St,Q:$Ot,s:KOt,S:YIe,u:jIe,U:XIe,V:$Ie,w:KIe,W:ZIe,x:null,X:null,y:JIe,Y:t9e,Z:r9e,"%":XOt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:jOt,e:jOt,f:a9e,g:g9e,G:y9e,H:n9e,I:i9e,j:o9e,L:QOt,m:s9e,M:l9e,p:_t,q:ct,Q:$Ot,s:KOt,S:c9e,u:u9e,U:h9e,V:f9e,w:p9e,W:d9e,x:null,X:null,y:m9e,Y:_9e,Z:v9e,"%":XOt},C={a:B,A:I,b:L,B:R,c:F,d:GOt,e:GOt,f:OIe,g:qOt,G:UOt,H:WOt,I:WOt,j:kIe,L:DIe,m:LIe,M:RIe,p:D,q:IIe,Q:FIe,s:BIe,S:NIe,u:EIe,U:TIe,V:CIe,w:MIe,W:AIe,x:z,X:U,y:qOt,Y:UOt,Z:PIe,"%":zIe};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=VOt[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=_C(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=set(_C(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=aet(_C(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?set(_C(q.y,0,1)).getUTCDay():aet(_C(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,set(q)):aet(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 VOt?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 SIe(e){return e.replace(wIe,"\\$&")}function yC(e){return new RegExp("^(?:"+e.map(SIe).join("|")+")","i")}function vC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function MIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function EIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function TIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function CIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function AIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function UOt(e,t,r){var n=To.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function qOt(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 PIe(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 IIe(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 LIe(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 GOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function kIe(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 WOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function RIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function NIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function DIe(e,t,r){var n=To.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function OIe(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 zIe(e,t,r){var n=bIe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function FIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function BIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function YOt(e,t){return Gr(e.getDate(),t,2)}function HIe(e,t){return Gr(e.getHours(),t,2)}function VIe(e,t){return Gr(e.getHours()%12||12,t,2)}function UIe(e,t){return Gr(1+yw.count(ad(e),e),t,3)}function ZOt(e,t){return Gr(e.getMilliseconds(),t,3)}function qIe(e,t){return ZOt(e,t)+"000"}function GIe(e,t){return Gr(e.getMonth()+1,t,2)}function WIe(e,t){return Gr(e.getMinutes(),t,2)}function YIe(e,t){return Gr(e.getSeconds(),t,2)}function jIe(e){var t=e.getDay();return t===0?7:t}function XIe(e,t){return Gr(s1.count(ad(e)-1,e),t,2)}function JOt(e){var t=e.getDay();return t>=4||t===0?kg(e):kg.ceil(e)}function $Ie(e,t){return e=JOt(e),Gr(kg.count(ad(e),e)+(ad(e).getDay()===4),t,2)}function KIe(e){return e.getDay()}function ZIe(e,t){return Gr(vw.count(ad(e)-1,e),t,2)}function JIe(e,t){return Gr(e.getFullYear()%100,t,2)}function QIe(e,t){return e=JOt(e),Gr(e.getFullYear()%100,t,2)}function t9e(e,t){return Gr(e.getFullYear()%1e4,t,4)}function e9e(e,t){var r=e.getDay();return e=r>=4||r===0?kg(e):kg.ceil(e),Gr(e.getFullYear()%1e4,t,4)}function r9e(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 n9e(e,t){return Gr(e.getUTCHours(),t,2)}function i9e(e,t){return Gr(e.getUTCHours()%12||12,t,2)}function o9e(e,t){return Gr(1+xw.count(sd(e),e),t,3)}function QOt(e,t){return Gr(e.getUTCMilliseconds(),t,3)}function a9e(e,t){return QOt(e,t)+"000"}function s9e(e,t){return Gr(e.getUTCMonth()+1,t,2)}function l9e(e,t){return Gr(e.getUTCMinutes(),t,2)}function c9e(e,t){return Gr(e.getUTCSeconds(),t,2)}function u9e(e){var t=e.getUTCDay();return t===0?7:t}function h9e(e,t){return Gr(c1.count(sd(e)-1,e),t,2)}function t7t(e){var t=e.getUTCDay();return t>=4||t===0?Rg(e):Rg.ceil(e)}function f9e(e,t){return e=t7t(e),Gr(Rg.count(sd(e),e)+(sd(e).getUTCDay()===4),t,2)}function p9e(e){return e.getUTCDay()}function d9e(e,t){return Gr(bw.count(sd(e)-1,e),t,2)}function m9e(e,t){return Gr(e.getUTCFullYear()%100,t,2)}function g9e(e,t){return e=t7t(e),Gr(e.getUTCFullYear()%100,t,2)}function _9e(e,t){return Gr(e.getUTCFullYear()%1e4,t,4)}function y9e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Rg(e):Rg.ceil(e),Gr(e.getUTCFullYear()%1e4,t,4)}function v9e(){return"+0000"}function XOt(){return"%"}function $Ot(e){return+e}function KOt(e){return Math.floor(+e/1e3)}var VOt,To,bIe,wIe,e7t=M(()=>{ZO();VOt={"-":"",_:" ",0:"0"},To=/^\s*\d+/,bIe=/^%/,wIe=/[\\^$*+?|[\]().{}]/g});function uet(e){return ww=cet(e),JO=ww.format,r7t=ww.parse,QO=ww.utcFormat,n7t=ww.utcParse,ww}var ww,JO,r7t,QO,n7t,i7t=M(()=>{e7t();uet({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 het=M(()=>{i7t()});function b9e(e){return new Date(e)}function w9e(e){return e instanceof Date?+e:+new Date(+e)}function t7(e,t,r,n,i,o,a,s,l){var c=id(fC,yf),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,xC],[a,5,5*xC],[a,15,15*xC],[a,30,30*xC],[o,1,bC],[o,5,5*bC],[o,15,15*bC],[o,30,30*bC],[i,1,wC],[i,3,3*wC],[i,6,6*wC],[i,12,12*wC],[n,1,SC],[n,2,2*SC],[r,1,x9e],[t,1,o7t],[t,3,3*o7t],[e,1,fet]];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=oC(function(R){return R[2]}).right(S,I);L===S.length?(B=Zy(O/fet,D/fet,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(Zy(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,w9e)):h().map(b9e)},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(qO(D,k)):c},c.copy=function(){return Ig(c,t7(e,t,r,n,i,o,a,s,l))},c}function a7t(){return t7(ad,tet,s1,yw,Qtt,Jtt,_w,mw,JO).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}var xC,bC,wC,SC,x9e,o7t,fet,pet=M(()=>{mf();uw();ZO();het();Cg();pC();$tt();xC=1e3,bC=xC*60,wC=bC*60,SC=wC*24,x9e=SC*7,o7t=SC*30,fet=SC*365});function s7t(){return t7(sd,iet,c1,xw,net,ret,_w,mw,QO).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}var l7t=M(()=>{pet();het();ZO()});function dl(e){return e.match(/.{6}/g).map(function(t){return"#"+t})}var Sw=M(()=>{});var c7t,u7t=M(()=>{Sw();c7t=dl("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")});var h7t,f7t=M(()=>{Sw();h7t=dl("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")});var p7t,d7t=M(()=>{Sw();p7t=dl("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")});var m7t,g7t=M(()=>{Sw();m7t=dl("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")});var _7t,y7t=M(()=>{sw();uw();_7t=cw($a(300,.5,0),$a(-240,.5,1))});function b7t(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return e7.h=360*e-100,e7.s=1.5-1.5*t,e7.l=.8-.9*t,e7+""}var v7t,x7t,e7,w7t=M(()=>{sw();uw();v7t=cw($a(-100,.75,.35),$a(80,1.5,.8)),x7t=cw($a(260,.75,.35),$a(80,1.5,.8)),e7=$a()});function r7(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var S7t,M7t,E7t,T7t,C7t=M(()=>{Sw();S7t=r7(dl("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),M7t=r7(dl("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),E7t=r7(dl("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),T7t=r7(dl("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))});function n7(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 n7(e).domain([t,r]).clamp(n)},od(i)}var A7t=M(()=>{pw()});var P7t=M(()=>{UNt();KDt();pw();tOt();btt();rOt();nOt();iOt();oOt();pet();l7t();u7t();f7t();d7t();g7t();y7t();w7t();C7t();A7t()});var i7,MC,o7=M(()=>{i7="http://www.w3.org/1999/xhtml",MC={svg:"http://www.w3.org/2000/svg",xhtml:i7,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)),MC.hasOwnProperty(t)?{space:MC[t],local:e}:e}var a7=M(()=>{o7()});function S9e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===i7&&t.documentElement.namespaceURI===i7?t.createElement(e):t.createElementNS(r,e)}}function M9e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ng(e){var t=Mw(e);return(t.local?M9e:S9e)(t)}var EC=M(()=>{a7();o7()});function E9e(){}function Ew(e){return e==null?E9e:function(){return this.querySelector(e)}}var s7=M(()=>{});function I7t(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 L7t=M(()=>{Sc();s7()});function T9e(){return[]}function l7(e){return e==null?T9e:function(){return this.querySelectorAll(e)}}var det=M(()=>{});function k7t(e){typeof e!="function"&&(e=l7(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 R7t=M(()=>{Sc();det()});var D7t,Tw,N7t,c7,met=M(()=>{D7t=function(e){return function(){return this.matches(e)}};typeof document!="undefined"&&(Tw=document.documentElement,Tw.matches||(N7t=Tw.webkitMatchesSelector||Tw.msMatchesSelector||Tw.mozMatchesSelector||Tw.oMatchesSelector,D7t=function(e){return function(){return N7t.call(this,e)}}));c7=D7t});function O7t(e){typeof e!="function"&&(e=c7(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 z7t=M(()=>{Sc();met()});function u7(e){return new Array(e.length)}var get=M(()=>{});function F7t(){return new Hn(this._enter||this._groups.map(u7),this._parents)}function TC(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var _et=M(()=>{get();Sc();TC.prototype={constructor:TC,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 B7t(e){return function(){return e}}var H7t=M(()=>{});function C9e(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 TC(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function A9e(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=V7t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=V7t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new TC(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function U7t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?A9e:C9e,n=this._parents,i=this._groups;typeof e!="function"&&(e=B7t(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 V7t,q7t=M(()=>{Sc();_et();H7t();V7t="$"});function G7t(){return new Hn(this._exit||this._groups.map(u7),this._parents)}var W7t=M(()=>{get();Sc()});function Y7t(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 X7t(){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 $7t=M(()=>{});function K7t(e){e||(e=P9e);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 P9e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Z7t=M(()=>{Sc()});function J7t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Q7t=M(()=>{});function tzt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var ezt=M(()=>{});function rzt(){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 nzt=M(()=>{});function izt(){var e=0;return this.each(function(){++e}),e}var ozt=M(()=>{});function azt(){return!this.node()}var szt=M(()=>{});function lzt(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 czt=M(()=>{});function I9e(e){return function(){this.removeAttribute(e)}}function L9e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function k9e(e,t){return function(){this.setAttribute(e,t)}}function R9e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function N9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function D9e(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 uzt(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?L9e:I9e:typeof t=="function"?r.local?D9e:N9e:r.local?R9e:k9e)(r,t))}var hzt=M(()=>{a7()});function Cw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var h7=M(()=>{});function O9e(e){return function(){this.style.removeProperty(e)}}function z9e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function F9e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function fzt(e,t,r){return arguments.length>1?this.each((t==null?O9e:typeof t=="function"?F9e:z9e)(e,t,r==null?"":r)):yet(this.node(),e)}function yet(e,t){return e.style.getPropertyValue(t)||Cw(e).getComputedStyle(e,null).getPropertyValue(t)}var vet=M(()=>{h7()});function B9e(e){return function(){delete this[e]}}function H9e(e,t){return function(){this[e]=t}}function V9e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function pzt(e,t){return arguments.length>1?this.each((t==null?B9e:typeof t=="function"?V9e:H9e)(e,t)):this.node()[e]}var dzt=M(()=>{});function mzt(e){return e.trim().split(/^|\s+/)}function xet(e){return e.classList||new gzt(e)}function gzt(e){this._node=e,this._names=mzt(e.getAttribute("class")||"")}function _zt(e,t){for(var r=xet(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function yzt(e,t){for(var r=xet(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function U9e(e){return function(){_zt(this,e)}}function q9e(e){return function(){yzt(this,e)}}function G9e(e,t){return function(){(t.apply(this,arguments)?_zt:yzt)(this,e)}}function vzt(e,t){var r=mzt(e+"");if(arguments.length<2){for(var n=xet(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?G9e:t?U9e:q9e)(r,t))}var xzt=M(()=>{gzt.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 W9e(){this.textContent=""}function Y9e(e){return function(){this.textContent=e}}function j9e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function bzt(e){return arguments.length?this.each(e==null?W9e:(typeof e=="function"?j9e:Y9e)(e)):this.node().textContent}var wzt=M(()=>{});function X9e(){this.innerHTML=""}function $9e(e){return function(){this.innerHTML=e}}function K9e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Szt(e){return arguments.length?this.each(e==null?X9e:(typeof e=="function"?K9e:$9e)(e)):this.node().innerHTML}var Mzt=M(()=>{});function Z9e(){this.nextSibling&&this.parentNode.appendChild(this)}function Ezt(){return this.each(Z9e)}var Tzt=M(()=>{});function J9e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Czt(){return this.each(J9e)}var Azt=M(()=>{});function Pzt(e){var t=typeof e=="function"?e:Ng(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var Izt=M(()=>{EC()});function Q9e(){return null}function Lzt(e,t){var r=typeof e=="function"?e:Ng(e),n=t==null?Q9e:typeof t=="function"?t:Ew(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var kzt=M(()=>{EC();s7()});function tLe(){var e=this.parentNode;e&&e.removeChild(this)}function Rzt(){return this.each(tLe)}var Nzt=M(()=>{});function eLe(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function rLe(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function Dzt(e){return this.select(e?rLe:eLe)}var Ozt=M(()=>{});function zzt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var Fzt=M(()=>{});function nLe(e,t,r){return e=Vzt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function Vzt(e,t,r){return function(n){var i=Pu;Pu=n;try{e.call(this,this.__data__,t,r)}finally{Pu=i}}}function iLe(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 oLe(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 aLe(e,t,r){var n=Hzt.hasOwnProperty(e.type)?nLe:Vzt;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 Uzt(e,t,r){var n=iLe(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?aLe:oLe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function qzt(e,t,r,n){var i=Pu;e.sourceEvent=Pu,Pu=e;try{return t.apply(r,n)}finally{Pu=i}}var Hzt,Pu,Bzt,f7=M(()=>{Hzt={},Pu=null;typeof document!="undefined"&&(Bzt=document.documentElement,"onmouseenter"in Bzt||(Hzt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function Gzt(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 sLe(e,t){return function(){return Gzt(this,e,t)}}function lLe(e,t){return function(){return Gzt(this,e,t.apply(this,arguments))}}function Wzt(e,t){return this.each((typeof t=="function"?lLe:sLe)(e,t))}var Yzt=M(()=>{h7()});function Hn(e,t){this._groups=e,this._parents=t}function jzt(){return new Hn([[document.documentElement]],CC)}var CC,Xzt,Sc=M(()=>{L7t();R7t();z7t();q7t();_et();W7t();j7t();$7t();Z7t();Q7t();ezt();nzt();ozt();szt();czt();hzt();vet();dzt();xzt();wzt();Mzt();Tzt();Azt();Izt();kzt();Nzt();Ozt();Fzt();f7();Yzt();CC=[null];Hn.prototype=jzt.prototype={constructor:Hn,select:I7t,selectAll:k7t,filter:O7t,data:U7t,enter:F7t,exit:G7t,merge:Y7t,order:X7t,sort:K7t,call:J7t,nodes:tzt,node:rzt,size:izt,empty:azt,each:lzt,attr:uzt,style:fzt,property:pzt,classed:vzt,text:bzt,html:Szt,raise:Ezt,lower:Czt,append:Pzt,insert:Lzt,remove:Rzt,clone:Dzt,datum:zzt,on:Uzt,dispatch:Wzt};Xzt=jzt});function p7(e){return typeof e=="string"?new Hn([[document.querySelector(e)]],[document.documentElement]):new Hn([[e]],CC)}var bet=M(()=>{Sc()});function $zt(e){return p7(Ng(e).call(document.documentElement))}var Kzt=M(()=>{EC();bet()});function d7(){return new wet}function wet(){this._="@"+(++cLe).toString(36)}var cLe,Zzt=M(()=>{cLe=0;wet.prototype=d7.prototype={constructor:wet,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 m7=M(()=>{f7()});function Dg(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 AC=M(()=>{});function Jzt(e){var t=Aw();return t.changedTouches&&(t=t.changedTouches[0]),Dg(e,t)}var Qzt=M(()=>{m7();AC()});function tFt(e){return typeof e=="string"?new Hn([document.querySelectorAll(e)],[document.documentElement]):new Hn([e==null?[]:e],CC)}var eFt=M(()=>{Sc()});function rFt(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 Dg(e,o);return null}var nFt=M(()=>{m7();AC()});function iFt(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]=Dg(e,t[r]);return i}var oFt=M(()=>{m7();AC()});var aFt=M(()=>{Kzt();EC();Zzt();met();Qzt();a7();o7();AC();bet();eFt();Sc();s7();det();vet();nFt();oFt();h7();f7()});function Tet(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function sFt(){return new Tet}var Met,Eet,u1,uLe,Iu,lFt=M(()=>{Met=Math.PI,Eet=2*Met,u1=1e-6,uLe=Eet-u1;Tet.prototype=sFt.prototype={constructor:Tet,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>u1)if(!(Math.abs(u*s-l*c)>u1)||!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((Met-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>u1&&(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)>u1||Math.abs(this._y1-c)>u1)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%Eet+Eet),h>uLe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>u1&&(this._+="A"+r+","+r+",0,"+ +(h>=Met)+","+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=sFt});var Pw=M(()=>{lFt()});function Ge(e){return function(){return e}}var Og=M(()=>{});function uFt(e){return e>1?0:e<-1?ku:Math.acos(e)}function Aet(e){return e>=1?PC:e<=-1?-PC:Math.asin(e)}var Cet,Ho,zg,cFt,g7,Lu,h1,Co,ku,PC,Mc,Iw=M(()=>{Cet=Math.abs,Ho=Math.atan2,zg=Math.cos,cFt=Math.max,g7=Math.min,Lu=Math.sin,h1=Math.sqrt,Co=1e-12,ku=Math.PI,PC=ku/2,Mc=2*ku});function hLe(e){return e.innerRadius}function fLe(e){return e.outerRadius}function pLe(e){return e.startAngle}function dLe(e){return e.endAngle}function mLe(e){return e&&e.padAngle}function gLe(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 _7(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/h1(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)*h1(cFt(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 hFt(){var e=hLe,t=fLe,r=Ge(0),n=null,i=pLe,o=dLe,a=mLe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-PC,d=o.apply(this,arguments)-PC,g=Cet(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*zg(p),f*Lu(p)),s.arc(0,0,f,p,d,!_),h>Co&&(s.moveTo(h*zg(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):h1(h*h+f*f)),D=g7(Cet(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>Co){var F=Aet(O/h*Lu(k)),z=Aet(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*zg(y),W=f*Lu(y),Z=h*zg(S),rt=h*Lu(S);if(D>Co){var ot=f*zg(x),st=f*Lu(x),St=h*zg(b),bt=h*Lu(b);if(g<ku){var Mt=C>Co?gLe(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(uFt((lt*_t+Kt*ct)/(h1(lt*lt+Kt*Kt)*h1(_t*_t+ct*ct)))/2),et=h1(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=g7(D,(h-et)/(X-1)),I=g7(D,(f-et)/(X+1))}}P>Co?I>Co?(L=_7(St,bt,U,W,f,I,_),R=_7(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=_7(Z,rt,ot,st,h,-B,_),R=_7(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[zg(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 fFt=M(()=>{Pw();Og();Iw()});function pFt(e){this._context=e}function Fg(e){return new pFt(e)}var IC=M(()=>{pFt.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 y7=M(()=>{});function Rw(){var e=Lw,t=kw,r=Ge(!0),n=null,i=Fg,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 v7=M(()=>{Pw();Og();IC();y7()});function x7(){var e=Lw,t=null,r=Ge(0),n=kw,i=Ge(!0),o=null,a=Fg,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 Pet=M(()=>{Pw();Og();IC();v7();y7()});function dFt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var mFt=M(()=>{});function gFt(e){return e}var _Ft=M(()=>{});function yFt(){var e=gFt,t=dFt,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 vFt=M(()=>{Og();mFt();_Ft();Iw()});function xFt(e){this._curve=e}function Nw(e){function t(r){return new xFt(e(r))}return t._curve=e,t}var b7,Iet=M(()=>{IC();b7=Nw(Fg);xFt.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 Let(){return Dw(Rw().curve(b7))}var ket=M(()=>{Iet();v7()});function Ret(){var e=x7().curve(b7),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 bFt=M(()=>{Iet();Pet();ket()});function f1(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Net=M(()=>{});var LC,Det=M(()=>{LC=Array.prototype.slice});function _Le(e){return e.source}function yLe(e){return e.target}function Oet(e){var t=_Le,r=yLe,n=Lw,i=kw,o=null;function a(){var s,l=LC.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 vLe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function xLe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function bLe(e,t,r,n,i){var o=f1(t,r),a=f1(t,r=(r+i)/2),s=f1(n,r),l=f1(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function wFt(){return Oet(vLe)}function SFt(){return Oet(xLe)}function MFt(){var e=Oet(bLe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var EFt=M(()=>{Pw();Det();Og();y7();Net()});var kC,zet=M(()=>{Iw();kC={draw:function(e,t){var r=Math.sqrt(t/ku);e.moveTo(r,0),e.arc(0,0,r,0,Mc)}}});var w7,Fet=M(()=>{w7={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 TFt,wLe,S7,Bet=M(()=>{TFt=Math.sqrt(.3333333333333333),wLe=TFt*2,S7={draw:function(e,t){var r=Math.sqrt(t/wLe),n=r*TFt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}}});var SLe,CFt,MLe,ELe,M7,Het=M(()=>{Iw();SLe=.8908130915292852,CFt=Math.sin(ku/10)/Math.sin(7*ku/10),MLe=Math.sin(Mc/10)*CFt,ELe=-Math.cos(Mc/10)*CFt,M7={draw:function(e,t){var r=Math.sqrt(t*SLe),n=MLe*r,i=ELe*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 E7,Vet=M(()=>{E7={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}}});var Uet,T7,qet=M(()=>{Uet=Math.sqrt(3),T7={draw:function(e,t){var r=-Math.sqrt(t/(Uet*3));e.moveTo(0,r*2),e.lineTo(-Uet*r,-r),e.lineTo(Uet*r,-r),e.closePath()}}});var Ec,Tc,Get,TLe,C7,Wet=M(()=>{Ec=-.5,Tc=Math.sqrt(3)/2,Get=1/Math.sqrt(12),TLe=(Get/2+1)*3,C7={draw:function(e,t){var r=Math.sqrt(t/TLe),n=r/2,i=r*Get,o=n,a=r*Get+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 PFt(){var e=Ge(kC),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 AFt,IFt=M(()=>{Pw();zet();Fet();Bet();Het();Vet();qet();Wet();Og();AFt=[kC,w7,S7,E7,M7,T7,C7]});function Cc(){}var RC=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 NC(e){this._context=e}function LFt(e){return new NC(e)}var DC=M(()=>{NC.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 kFt(e){this._context=e}function RFt(e){return new kFt(e)}var NFt=M(()=>{RC();DC();kFt.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 DFt(e){this._context=e}function OFt(e){return new DFt(e)}var zFt=M(()=>{DC();DFt.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 FFt(e,t){this._basis=new NC(e),this._beta=t}var BFt,HFt=M(()=>{DC();FFt.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)}};BFt=function e(t){function r(n){return t===1?new NC(n):new FFt(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 A7(e,t){this._context=e,this._k=(1-t)/6}var VFt,OC=M(()=>{A7.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}};VFt=function e(t){function r(n){return new A7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function P7(e,t){this._context=e,this._k=(1-t)/6}var UFt,Yet=M(()=>{RC();OC();P7.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}};UFt=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 qFt,jet=M(()=>{OC();I7.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}};qFt=function e(t){function r(n){return new I7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function zC(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 GFt(e,t){this._context=e,this._alpha=t}var WFt,L7=M(()=>{Iw();OC();GFt.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:zC(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}};WFt=function e(t){function r(n){return t?new GFt(n,t):new A7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function YFt(e,t){this._context=e,this._alpha=t}var jFt,XFt=M(()=>{Yet();RC();L7();YFt.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:zC(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 YFt(n,t):new P7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function $Ft(e,t){this._context=e,this._alpha=t}var KFt,ZFt=M(()=>{jet();L7();$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(){(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:zC(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 I7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function JFt(e){this._context=e}function QFt(e){return new JFt(e)}var tBt=M(()=>{RC();JFt.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 eBt(e){return e<0?-1:1}function rBt(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(eBt(o)+eBt(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function nBt(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Xet(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 k7(e){this._context=e}function iBt(e){this._context=new oBt(e)}function oBt(e){this._context=e}function aBt(e){return new k7(e)}function sBt(e){return new iBt(e)}var lBt=M(()=>{k7.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:Xet(this,this._t0,nBt(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,Xet(this,nBt(this,r=rBt(this,e,t)),r);break;default:Xet(this,this._t0,r=rBt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};(iBt.prototype=Object.create(k7.prototype)).point=function(e,t){k7.prototype.point.call(this,t,e)};oBt.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 uBt(e){this._context=e}function cBt(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 hBt(e){return new uBt(e)}var fBt=M(()=>{uBt.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=cBt(e),i=cBt(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 R7(e,t){this._context=e,this._t=t}function pBt(e){return new R7(e,.5)}function dBt(e){return new R7(e,0)}function mBt(e){return new R7(e,1)}var gBt=M(()=>{R7.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 CLe(e,t){return e[t]}function _Bt(){var e=Ge([]),t=Nu,r=Ru,n=CLe;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(LC.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(LC.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?Ru:o,i):r},i}var yBt=M(()=>{Det();Og();Fw();Bw()});function vBt(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 xBt=M(()=>{Fw()});function bBt(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 wBt=M(()=>{});function SBt(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 MBt=M(()=>{Fw()});function EBt(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 TBt=M(()=>{Fw()});function N7(e){var t=e.map($et);return Nu(e).sort(function(r,n){return t[r]-t[n]})}function $et(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}var D7=M(()=>{Bw()});function CBt(e){return N7(e).reverse()}var ABt=M(()=>{D7()});function PBt(e){var t=e.length,r,n,i=e.map($et),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 IBt=M(()=>{Bw();D7()});function LBt(e){return Nu(e).reverse()}var kBt=M(()=>{Bw()});var RBt=M(()=>{fFt();Pet();v7();vFt();bFt();ket();Net();EFt();IFt();zet();Fet();Bet();Vet();Het();qet();Wet();NFt();zFt();DC();HFt();Yet();jet();OC();XFt();ZFt();L7();tBt();IC();lBt();fBt();gBt();yBt();xBt();wBt();Fw();MBt();TBt();D7();ABt();IBt();Bw();kBt()});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 Ket.setTime(+o),Zet.setTime(+a),e(Ket),e(Zet),Math.floor(r(Ket,Zet))},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 Ket,Zet,fa=M(()=>{Ket=new Date,Zet=new Date});var O7,Jet,Qet,NBt=M(()=>{fa();O7=Sr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});O7.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}):O7};Jet=O7,Qet=O7.range});var FC,Ps,bf,z7,F7,wf=M(()=>{FC=1e3,Ps=6e4,bf=36e5,z7=864e5,F7=6048e5});var DBt,trt,ert,OBt=M(()=>{fa();wf();DBt=Sr(function(e){e.setTime(Math.floor(e/FC)*FC)},function(e,t){e.setTime(+e+t*FC)},function(e,t){return(t-e)/FC},function(e){return e.getUTCSeconds()}),trt=DBt,ert=DBt.range});var zBt,FBt,BBt,HBt=M(()=>{fa();wf();zBt=Sr(function(e){e.setTime(Math.floor(e/Ps)*Ps)},function(e,t){e.setTime(+e+t*Ps)},function(e,t){return(t-e)/Ps},function(e){return e.getMinutes()}),FBt=zBt,BBt=zBt.range});var VBt,UBt,qBt,GBt=M(()=>{fa();wf();VBt=Sr(function(e){var t=e.getTimezoneOffset()*Ps%bf;t<0&&(t+=bf),e.setTime(Math.floor((+e-t)/bf)*bf+t)},function(e,t){e.setTime(+e+t*bf)},function(e,t){return(t-e)/bf},function(e){return e.getHours()}),UBt=VBt,qBt=VBt.range});var WBt,YBt,jBt,XBt=M(()=>{fa();wf();WBt=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())*Ps)/z7},function(e){return e.getDate()-1}),YBt=WBt,jBt=WBt.range});function p1(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())*Ps)/F7})}var B7,rrt,nrt,irt,ort,art,srt,lrt,$Bt,KBt,ZBt,JBt,QBt,tHt,eHt=M(()=>{fa();wf();B7=p1(0),rrt=p1(1),nrt=p1(2),irt=p1(3),ort=p1(4),art=p1(5),srt=p1(6),lrt=B7.range,$Bt=rrt.range,KBt=nrt.range,ZBt=irt.range,JBt=ort.range,QBt=art.range,tHt=srt.range});var rHt,nHt,iHt,oHt=M(()=>{fa();rHt=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()}),nHt=rHt,iHt=rHt.range});var crt,aHt,sHt,lHt=M(()=>{fa();crt=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()});crt.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)})};aHt=crt,sHt=crt.range});var cHt,uHt,hHt,fHt=M(()=>{fa();wf();cHt=Sr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Ps)},function(e,t){return(t-e)/Ps},function(e){return e.getUTCMinutes()}),uHt=cHt,hHt=cHt.range});var pHt,dHt,mHt,gHt=M(()=>{fa();wf();pHt=Sr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*bf)},function(e,t){return(t-e)/bf},function(e){return e.getUTCHours()}),dHt=pHt,mHt=pHt.range});var _Ht,yHt,vHt,xHt=M(()=>{fa();wf();_Ht=Sr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/z7},function(e){return e.getUTCDate()-1}),yHt=_Ht,vHt=_Ht.range});function d1(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)/F7})}var H7,urt,hrt,frt,prt,drt,mrt,grt,bHt,wHt,SHt,MHt,EHt,THt,CHt=M(()=>{fa();wf();H7=d1(0),urt=d1(1),hrt=d1(2),frt=d1(3),prt=d1(4),drt=d1(5),mrt=d1(6),grt=H7.range,bHt=urt.range,wHt=hrt.range,SHt=frt.range,MHt=prt.range,EHt=drt.range,THt=mrt.range});var AHt,PHt,IHt,LHt=M(()=>{fa();AHt=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()}),PHt=AHt,IHt=AHt.range});var _rt,kHt,RHt,NHt=M(()=>{fa();_rt=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()});_rt.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)})};kHt=_rt,RHt=_rt.range});var DHt=M(()=>{fa();NBt();OBt();HBt();GBt();XBt();eHt();oHt();lHt();fHt();gHt();xHt();CHt();LHt();NHt()});function pa(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 pa(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 yrt.setTime(+o),vrt.setTime(+a),e(yrt),e(vrt),Math.floor(r(yrt,vrt))},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 yrt,vrt,m1=M(()=>{yrt=new Date,vrt=new Date});var V7,U7,q7,BC=M(()=>{V7=6e4,U7=864e5,q7=6048e5});var OHt,G7,ALe,zHt=M(()=>{m1();BC();OHt=pa(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())*V7)/U7},function(e){return e.getDate()-1}),G7=OHt,ALe=OHt.range});function g1(e){return pa(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())*V7)/q7})}var HC,Hw,FHt,BHt,Vw,HHt,VHt,UHt,PLe,ILe,LLe,kLe,RLe,NLe,qHt=M(()=>{m1();BC();HC=g1(0),Hw=g1(1),FHt=g1(2),BHt=g1(3),Vw=g1(4),HHt=g1(5),VHt=g1(6),UHt=HC.range,PLe=Hw.range,ILe=FHt.range,LLe=BHt.range,kLe=Vw.range,RLe=HHt.range,NLe=VHt.range});var xrt,_1,DLe,GHt=M(()=>{m1();xrt=pa(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()});xrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:pa(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)})};_1=xrt,DLe=xrt.range});var WHt,W7,OLe,YHt=M(()=>{m1();BC();WHt=pa(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/U7},function(e){return e.getUTCDate()-1}),W7=WHt,OLe=WHt.range});function y1(e){return pa(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)/q7})}var VC,Uw,jHt,XHt,qw,$Ht,KHt,ZHt,zLe,FLe,BLe,HLe,VLe,ULe,JHt=M(()=>{m1();BC();VC=y1(0),Uw=y1(1),jHt=y1(2),XHt=y1(3),qw=y1(4),$Ht=y1(5),KHt=y1(6),ZHt=VC.range,zLe=Uw.range,FLe=jHt.range,BLe=XHt.range,HLe=qw.range,VLe=$Ht.range,ULe=KHt.range});var brt,v1,qLe,QHt=M(()=>{m1();brt=pa(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()});brt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:pa(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)})};v1=brt,qLe=brt.range});var tVt=M(()=>{zHt();qHt();GHt();YHt();JHt();QHt()});function GLe(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 Y7(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 UC(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function WC(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=qC(i),u=GC(i),h=qC(o),f=GC(o),p=qC(a),d=GC(a),g=qC(s),_=GC(s),y=qC(l),x=GC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:iVt,e:iVt,f:dke,H:hke,I:fke,j:pke,L:cVt,m:mke,M:gke,p:st,Q:sVt,s:lVt,S:_ke,u:yke,U:vke,V:xke,w:bke,W:wke,x:null,X:null,y:Ske,Y:Mke,Z:Eke,"%":aVt},S={a:St,A:bt,b:Mt,B:lt,c:null,d:oVt,e:oVt,f:Pke,H:Tke,I:Cke,j:Ake,L:uVt,m:Ike,M:Lke,p:Kt,Q:sVt,s:lVt,S:kke,u:Rke,U:Nke,V:Dke,w:Oke,W:zke,x:null,X:null,y:Fke,Y:Bke,Z:Hke,"%":aVt},C={a:B,A:I,b:L,B:R,c:F,d:rVt,e:rVt,f:ske,H:nVt,I:nVt,j:nke,L:ake,m:rke,M:ike,p:D,Q:cke,s:uke,S:oke,u:$Le,U:KLe,V:ZLe,w:XLe,W:JLe,x:z,X:U,y:tke,Y:QLe,Z:eke,"%":lke};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=eVt[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=UC(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=Y7(UC(et.y)),pt=q.getUTCDay(),q=pt>4||pt===0?Uw.ceil(q):Uw(q),q=W7.offset(q,(et.V-1)*7),et.y=q.getUTCFullYear(),et.m=q.getUTCMonth(),et.d=q.getUTCDate()+(et.w+6)%7):(q=ct(UC(et.y)),pt=q.getDay(),q=pt>4||pt===0?Hw.ceil(q):Hw(q),q=G7.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?Y7(UC(et.y)).getUTCDay():ct(UC(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,Y7(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 eVt?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+="",GLe);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,Y7);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(YLe,"\\$&")}function qC(e){return new RegExp("^(?:"+e.map(jLe).join("|")+")","i")}function GC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function XLe(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function $Le(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function KLe(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function ZLe(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function JLe(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function QLe(e,t,r){var n=Vo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function tke(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 eke(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 rke(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 rVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function nke(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 nVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function ike(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function oke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ake(e,t,r){var n=Vo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ske(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 lke(e,t,r){var n=WLe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function cke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function uke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0]*1e3,r+n[0].length):-1}function iVt(e,t){return gn(e.getDate(),t,2)}function hke(e,t){return gn(e.getHours(),t,2)}function fke(e,t){return gn(e.getHours()%12||12,t,2)}function pke(e,t){return gn(1+G7.count(_1(e),e),t,3)}function cVt(e,t){return gn(e.getMilliseconds(),t,3)}function dke(e,t){return cVt(e,t)+"000"}function mke(e,t){return gn(e.getMonth()+1,t,2)}function gke(e,t){return gn(e.getMinutes(),t,2)}function _ke(e,t){return gn(e.getSeconds(),t,2)}function yke(e){var t=e.getDay();return t===0?7:t}function vke(e,t){return gn(HC.count(_1(e),e),t,2)}function xke(e,t){var r=e.getDay();return e=r>=4||r===0?Vw(e):Vw.ceil(e),gn(Vw.count(_1(e),e)+(_1(e).getDay()===4),t,2)}function bke(e){return e.getDay()}function wke(e,t){return gn(Hw.count(_1(e),e),t,2)}function Ske(e,t){return gn(e.getFullYear()%100,t,2)}function Mke(e,t){return gn(e.getFullYear()%1e4,t,4)}function Eke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gn(t/60|0,"0",2)+gn(t%60,"0",2)}function oVt(e,t){return gn(e.getUTCDate(),t,2)}function Tke(e,t){return gn(e.getUTCHours(),t,2)}function Cke(e,t){return gn(e.getUTCHours()%12||12,t,2)}function Ake(e,t){return gn(1+W7.count(v1(e),e),t,3)}function uVt(e,t){return gn(e.getUTCMilliseconds(),t,3)}function Pke(e,t){return uVt(e,t)+"000"}function Ike(e,t){return gn(e.getUTCMonth()+1,t,2)}function Lke(e,t){return gn(e.getUTCMinutes(),t,2)}function kke(e,t){return gn(e.getUTCSeconds(),t,2)}function Rke(e){var t=e.getUTCDay();return t===0?7:t}function Nke(e,t){return gn(VC.count(v1(e),e),t,2)}function Dke(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qw(e):qw.ceil(e),gn(qw.count(v1(e),e)+(v1(e).getUTCDay()===4),t,2)}function Oke(e){return e.getUTCDay()}function zke(e,t){return gn(Uw.count(v1(e),e),t,2)}function Fke(e,t){return gn(e.getUTCFullYear()%100,t,2)}function Bke(e,t){return gn(e.getUTCFullYear()%1e4,t,4)}function Hke(){return"+0000"}function aVt(){return"%"}function sVt(e){return+e}function lVt(e){return Math.floor(+e/1e3)}var eVt,Vo,WLe,YLe,wrt=M(()=>{tVt();eVt={"-":"",_:" ",0:"0"},Vo=/^\s*\d+/,WLe=/^%/,YLe=/[\\^$*+?|[\]().{}]/g});function j7(e){return Gw=WC(e),Srt=Gw.format,Mrt=Gw.parse,YC=Gw.utcFormat,jC=Gw.utcParse,Gw}var Gw,Srt,Mrt,YC,jC,X7=M(()=>{wrt();j7({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 Vke(e){return e.toISOString()}var Ert,Uke,hVt,Trt=M(()=>{X7();Ert="%Y-%m-%dT%H:%M:%S.%LZ";Uke=Date.prototype.toISOString?Vke:YC(Ert),hVt=Uke});function qke(e){var t=new Date(e);return isNaN(t)?null:t}var Gke,fVt,pVt=M(()=>{Trt();X7();Gke=+new Date("2000-01-01T00:00:00.000Z")?qke:jC(Ert),fVt=Gke});var dVt=M(()=>{X7();wrt();Trt();pVt()});function Yw(){return x1||(_Vt(Wke),x1=ZC.now()+Z7)}function Wke(){x1=0}function b1(){this._call=this._time=this._next=null}function Art(e,t,r){var n=new b1;return n.restart(e,t,r),n}function Prt(){Yw(),++Ww;for(var e=$7,t;e;)(t=x1-e._time)>=0&&e._call.call(null,t),e=e._next;--Ww}function mVt(){x1=(K7=ZC.now())+Z7,Ww=$C=0;try{Prt()}finally{Ww=0,jke(),x1=0}}function Yke(){var e=ZC.now(),t=e-K7;t>gVt&&(Z7-=t,K7=e)}function jke(){for(var e,t=$7,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:$7=r);KC=e,Crt(n)}function Crt(e){if(!Ww){$C&&($C=clearTimeout($C));var t=e-x1;t>24?(e<1/0&&($C=setTimeout(mVt,e-ZC.now()-Z7)),XC&&(XC=clearInterval(XC))):(XC||(K7=ZC.now(),XC=setInterval(Yke,gVt)),Ww=1,_Vt(mVt))}}var Ww,$C,XC,gVt,$7,KC,K7,x1,Z7,ZC,_Vt,J7=M(()=>{Ww=0,$C=0,XC=0,gVt=1e3,K7=0,x1=0,Z7=0,ZC=typeof performance=="object"&&performance.now?performance:Date,_Vt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};b1.prototype=Art.prototype={constructor:b1,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&&KC!==this&&(KC?KC._next=this:$7=this,KC=this),this._call=e,this._time=r,Crt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Crt())}}});function yVt(e,t,r){var n=new b1;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var vVt=M(()=>{J7()});function xVt(e,t,r){var n=new b1,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 bVt=M(()=>{J7()});var wVt=M(()=>{J7();vVt();bVt()});var Q7,Irt,Lrt=M(()=>{Q7="http://www.w3.org/1999/xhtml",Irt={svg:"http://www.w3.org/2000/svg",xhtml:Q7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function ld(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Irt.hasOwnProperty(t)?{space:Irt[t],local:e}:e}var tz=M(()=>{Lrt()});function Xke(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Q7&&t.documentElement.namespaceURI===Q7?t.createElement(e):t.createElementNS(r,e)}}function $ke(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ez(e){var t=ld(e);return(t.local?$ke:Xke)(t)}var krt=M(()=>{tz();Lrt()});function Kke(){}function w1(e){return e==null?Kke:function(){return this.querySelector(e)}}var rz=M(()=>{});function SVt(e){typeof e!="function"&&(e=w1(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 MVt=M(()=>{Sf();rz()});function Zke(){return[]}function JC(e){return e==null?Zke:function(){return this.querySelectorAll(e)}}var Rrt=M(()=>{});function EVt(e){typeof e!="function"&&(e=JC(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 TVt=M(()=>{Sf();Rrt()});function QC(e){return function(){return this.matches(e)}}var Nrt=M(()=>{});function CVt(e){typeof e!="function"&&(e=QC(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 AVt=M(()=>{Sf();Nrt()});function nz(e){return new Array(e.length)}var Drt=M(()=>{});function PVt(){return new no(this._enter||this._groups.map(nz),this._parents)}function tA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Ort=M(()=>{Drt();Sf();tA.prototype={constructor:tA,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 IVt(e){return function(){return e}}var LVt=M(()=>{});function Jke(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 tA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function Qke(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=kVt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=kVt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new tA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function RVt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?Qke:Jke,n=this._parents,i=this._groups;typeof e!="function"&&(e=IVt(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 kVt,NVt=M(()=>{Sf();Ort();LVt();kVt="$"});function DVt(){return new no(this._exit||this._groups.map(nz),this._parents)}var OVt=M(()=>{Drt();Sf()});function zVt(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 FVt=M(()=>{});function BVt(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 HVt=M(()=>{Sf()});function VVt(){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 UVt=M(()=>{});function qVt(e){e||(e=t8e);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 t8e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var GVt=M(()=>{Sf()});function WVt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var YVt=M(()=>{});function jVt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var XVt=M(()=>{});function $Vt(){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 KVt=M(()=>{});function ZVt(){var e=0;return this.each(function(){++e}),e}var JVt=M(()=>{});function QVt(){return!this.node()}var tUt=M(()=>{});function eUt(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 rUt=M(()=>{});function e8e(e){return function(){this.removeAttribute(e)}}function r8e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function n8e(e,t){return function(){this.setAttribute(e,t)}}function i8e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function o8e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function a8e(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 nUt(e,t){var r=ld(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?r8e:e8e:typeof t=="function"?r.local?a8e:o8e:r.local?i8e:n8e)(r,t))}var iUt=M(()=>{tz()});function iz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var zrt=M(()=>{});function s8e(e){return function(){this.style.removeProperty(e)}}function l8e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function c8e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function oUt(e,t,r){return arguments.length>1?this.each((t==null?s8e:typeof t=="function"?c8e:l8e)(e,t,r==null?"":r)):Bg(this.node(),e)}function Bg(e,t){return e.style.getPropertyValue(t)||iz(e).getComputedStyle(e,null).getPropertyValue(t)}var Frt=M(()=>{zrt()});function u8e(e){return function(){delete this[e]}}function h8e(e,t){return function(){this[e]=t}}function f8e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function aUt(e,t){return arguments.length>1?this.each((t==null?u8e:typeof t=="function"?f8e:h8e)(e,t)):this.node()[e]}var sUt=M(()=>{});function lUt(e){return e.trim().split(/^|\s+/)}function Brt(e){return e.classList||new cUt(e)}function cUt(e){this._node=e,this._names=lUt(e.getAttribute("class")||"")}function uUt(e,t){for(var r=Brt(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function hUt(e,t){for(var r=Brt(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function p8e(e){return function(){uUt(this,e)}}function d8e(e){return function(){hUt(this,e)}}function m8e(e,t){return function(){(t.apply(this,arguments)?uUt:hUt)(this,e)}}function fUt(e,t){var r=lUt(e+"");if(arguments.length<2){for(var n=Brt(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?m8e:t?p8e:d8e)(r,t))}var pUt=M(()=>{cUt.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 g8e(){this.textContent=""}function _8e(e){return function(){this.textContent=e}}function y8e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function dUt(e){return arguments.length?this.each(e==null?g8e:(typeof e=="function"?y8e:_8e)(e)):this.node().textContent}var mUt=M(()=>{});function v8e(){this.innerHTML=""}function x8e(e){return function(){this.innerHTML=e}}function b8e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function gUt(e){return arguments.length?this.each(e==null?v8e:(typeof e=="function"?b8e:x8e)(e)):this.node().innerHTML}var _Ut=M(()=>{});function w8e(){this.nextSibling&&this.parentNode.appendChild(this)}function yUt(){return this.each(w8e)}var vUt=M(()=>{});function S8e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xUt(){return this.each(S8e)}var bUt=M(()=>{});function wUt(e){var t=typeof e=="function"?e:ez(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var SUt=M(()=>{krt()});function M8e(){return null}function MUt(e,t){var r=typeof e=="function"?e:ez(e),n=t==null?M8e:typeof t=="function"?t:w1(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var EUt=M(()=>{krt();rz()});function E8e(){var e=this.parentNode;e&&e.removeChild(this)}function TUt(){return this.each(E8e)}var CUt=M(()=>{});function T8e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C8e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function AUt(e){return this.select(e?C8e:T8e)}var PUt=M(()=>{});function IUt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var LUt=M(()=>{});function A8e(e,t,r){return e=NUt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function NUt(e,t,r){return function(n){var i=Hrt;Hrt=n;try{e.call(this,this.__data__,t,r)}finally{Hrt=i}}}function P8e(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 I8e(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 L8e(e,t,r){var n=RUt.hasOwnProperty(e.type)?A8e:NUt;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 DUt(e,t,r){var n=P8e(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?L8e:I8e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}var RUt,Hrt,kUt,OUt=M(()=>{RUt={},Hrt=null;typeof document!="undefined"&&(kUt=document.documentElement,"onmouseenter"in kUt||(RUt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function zUt(e,t,r){var n=iz(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 k8e(e,t){return function(){return zUt(this,e,t)}}function R8e(e,t){return function(){return zUt(this,e,t.apply(this,arguments))}}function FUt(e,t){return this.each((typeof t=="function"?R8e:k8e)(e,t))}var BUt=M(()=>{zrt()});function no(e,t){this._groups=e,this._parents=t}function HUt(){return new no([[document.documentElement]],N8e)}var N8e,cd,Sf=M(()=>{MVt();TVt();AVt();NVt();Ort();OVt();FVt();HVt();UVt();GVt();YVt();XVt();KVt();JVt();tUt();rUt();iUt();Frt();sUt();pUt();mUt();_Ut();vUt();bUt();SUt();EUt();CUt();PUt();LUt();OUt();BUt();N8e=[null];no.prototype=HUt.prototype={constructor:no,select:SVt,selectAll:EVt,filter:CVt,data:RVt,enter:PVt,exit:DVt,join:zVt,merge:BVt,order:VVt,sort:qVt,call:WVt,nodes:jVt,node:$Vt,size:ZVt,empty:QVt,each:eUt,attr:nUt,style:oUt,property:aUt,classed:fUt,text:dUt,html:gUt,raise:yUt,lower:xUt,append:wUt,insert:MUt,remove:TUt,clone:AUt,datum:IUt,on:DUt,dispatch:FUt};cd=HUt});var Mf=M(()=>{Nrt();tz();Sf();rz();Rrt();Frt()});function UUt(){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 oz(r)}function oz(e){this._=e}function O8e(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 z8e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function VUt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=D8e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var D8e,Vrt,qUt=M(()=>{D8e={value:function(){}};oz.prototype=UUt.prototype={constructor:oz,on:function(e,t){var r=this._,n=O8e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=z8e(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]=VUt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=VUt(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 oz(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)}};Vrt=UUt});var GUt=M(()=>{qUt()});function Xw(){return S1||(jUt(F8e),S1=iA.now()+lz)}function F8e(){S1=0}function oA(){this._call=this._time=this._next=null}function cz(e,t,r){var n=new oA;return n.restart(e,t,r),n}function XUt(){Xw(),++jw;for(var e=az,t;e;)(t=S1-e._time)>=0&&e._call.call(null,t),e=e._next;--jw}function WUt(){S1=(sz=iA.now())+lz,jw=rA=0;try{XUt()}finally{jw=0,H8e(),S1=0}}function B8e(){var e=iA.now(),t=e-sz;t>YUt&&(lz-=t,sz=e)}function H8e(){for(var e,t=az,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:az=r);nA=e,Urt(n)}function Urt(e){if(!jw){rA&&(rA=clearTimeout(rA));var t=e-S1;t>24?(e<1/0&&(rA=setTimeout(WUt,e-iA.now()-lz)),eA&&(eA=clearInterval(eA))):(eA||(sz=iA.now(),eA=setInterval(B8e,YUt)),jw=1,jUt(WUt))}}var jw,rA,eA,YUt,az,nA,sz,S1,lz,iA,jUt,qrt=M(()=>{jw=0,rA=0,eA=0,YUt=1e3,sz=0,S1=0,lz=0,iA=typeof performance=="object"&&performance.now?performance:Date,jUt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};oA.prototype=cz.prototype={constructor:oA,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&&nA!==this&&(nA?nA._next=this:az=this,nA=this),this._call=e,this._time=r,Urt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Urt())}}});function uz(e,t,r){var n=new oA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var $Ut=M(()=>{qrt()});var Grt=M(()=>{qrt();$Ut()});function Hg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;q8e(e,r,{name:t,index:n,group:i,on:V8e,tween:U8e,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ZUt})}function lA(e,t){var r=io(e,t);if(r.state>ZUt)throw new Error("too late; already scheduled");return r}function Du(e,t){var r=io(e,t);if(r.state>sA)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 q8e(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=cz(o,0,r.time);function o(c){r.state=hz,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!==hz)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===Wrt)return uz(a);p.state===KUt?(p.state=aA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=aA,p.timer.stop(),delete n[u])}if(uz(function(){r.state===Wrt&&(r.state=KUt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=sA,r.on.call("start",e,e.__data__,r.index,r.group),r.state===sA){for(r.state=Wrt,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=fz,1),h=-1,f=i.length;++h<f;)i[h].call(null,u);r.state===fz&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=aA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var V8e,U8e,ZUt,hz,sA,Wrt,KUt,fz,aA,Ac=M(()=>{GUt();Grt();V8e=Vrt("start","end","interrupt"),U8e=[],ZUt=0,hz=1,sA=2,Wrt=3,KUt=4,fz=5,aA=6});function pz(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>sA&&n.state<fz,n.state=aA,n.timer.stop(),i&&n.on.call("interrupt",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Yrt=M(()=>{Ac()});function JUt(e){return this.each(function(){pz(this,e)})}var QUt=M(()=>{Yrt()});function dz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function jrt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var tqt=M(()=>{});function hA(){}function rqt(){return this.rgb().formatHex()}function Z8e(){return lqt(this).formatHsl()}function nqt(){return this.rgb().formatRgb()}function Vg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=G8e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?iqt(t):r===3?new ml(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mz(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=W8e.exec(e))?new ml(t[1],t[2],t[3],1):(t=Y8e.exec(e))?new ml(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=j8e.exec(e))?mz(t[1],t[2],t[3],t[4]):(t=X8e.exec(e))?mz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$8e.exec(e))?sqt(t[1],t[2]/100,t[3]/100,1):(t=K8e.exec(e))?sqt(t[1],t[2]/100,t[3]/100,t[4]):eqt.hasOwnProperty(e)?iqt(eqt[e]):e==="transparent"?new ml(NaN,NaN,NaN,0):null}function iqt(e){return new ml(e>>16&255,e>>8&255,e&255,1)}function mz(e,t,r,n){return n<=0&&(e=t=r=NaN),new ml(e,t,r,n)}function J8e(e){return e instanceof hA||(e=Vg(e)),e?(e=e.rgb(),new ml(e.r,e.g,e.b,e.opacity)):new ml}function Kw(e,t,r,n){return arguments.length===1?J8e(e):new ml(e,t,r,n==null?1:n)}function ml(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function oqt(){return"#"+Xrt(this.r)+Xrt(this.g)+Xrt(this.b)}function aqt(){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 Xrt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function sqt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ef(e,t,r,n)}function lqt(e){if(e instanceof Ef)return new Ef(e.h,e.s,e.l,e.opacity);if(e instanceof hA||(e=Vg(e)),!e)return new Ef;if(e instanceof Ef)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 Ef(a,s,l,e.opacity)}function cqt(e,t,r,n){return arguments.length===1?lqt(e):new Ef(e,t,r,n==null?1:n)}function Ef(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function $rt(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 cA,gz,$w,uA,Tf,G8e,W8e,Y8e,j8e,X8e,$8e,K8e,eqt,uqt=M(()=>{tqt();cA=.7,gz=1/cA,$w="\\s*([+-]?\\d+)\\s*",uA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",G8e=/^#([0-9a-f]{3,8})$/,W8e=new RegExp("^rgb\\("+[$w,$w,$w]+"\\)$"),Y8e=new RegExp("^rgb\\("+[Tf,Tf,Tf]+"\\)$"),j8e=new RegExp("^rgba\\("+[$w,$w,$w,uA]+"\\)$"),X8e=new RegExp("^rgba\\("+[Tf,Tf,Tf,uA]+"\\)$"),$8e=new RegExp("^hsl\\("+[uA,Tf,Tf]+"\\)$"),K8e=new RegExp("^hsla\\("+[uA,Tf,Tf,uA]+"\\)$"),eqt={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};dz(hA,Vg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:rqt,formatHex:rqt,formatHsl:Z8e,formatRgb:nqt,toString:nqt});dz(ml,Kw,jrt(hA,{brighter:function(e){return e=e==null?gz:Math.pow(gz,e),new ml(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?cA:Math.pow(cA,e),new ml(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:oqt,formatHex:oqt,formatRgb:aqt,toString:aqt}));dz(Ef,cqt,jrt(hA,{brighter:function(e){return e=e==null?gz:Math.pow(gz,e),new Ef(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?cA:Math.pow(cA,e),new Ef(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 ml($rt(e>=240?e-240:e+120,i,n),$rt(e,i,n),$rt(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 Krt=M(()=>{uqt()});function Zrt(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 hqt(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 Zrt((r-n/t)*t,a,i,o,s)}}var Jrt=M(()=>{});function fqt(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 Zrt((r-n/t)*t,i,o,a,s)}}var pqt=M(()=>{Jrt()});function Qrt(e){return function(){return e}}var dqt=M(()=>{});function Q8e(e,t){return function(r){return e+r*t}}function tRe(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 mqt(e){return(e=+e)==1?_z:function(t,r){return r-t?tRe(t,r,e):Qrt(isNaN(t)?r:t)}}function _z(e,t){var r=t-e;return r?Q8e(e,r):Qrt(isNaN(e)?t:e)}var gqt=M(()=>{dqt()});function _qt(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 yz,eRe,rRe,yqt=M(()=>{Krt();Jrt();pqt();gqt();yz=function e(t){var r=mqt(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=_z(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);eRe=_qt(hqt),rRe=_qt(fqt)});function Pc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var vz=M(()=>{});function nRe(e){return function(){return e}}function iRe(e){return function(t){return e(t)+""}}function rnt(e,t){var r=ent.lastIndex=tnt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=ent.exec(e))&&(i=tnt.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=tnt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?iRe(l[0].x):nRe(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 ent,tnt,vqt=M(()=>{vz();ent=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tnt=new RegExp(ent.source,"g")});function nnt(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)*xqt,skewX:Math.atan(l)*xqt,scaleX:a,scaleY:s}}var xqt,xz,bqt=M(()=>{xqt=180/Math.PI,xz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Sqt(e){return e==="none"?xz:(fA||(fA=document.createElement("DIV"),int=document.documentElement,wqt=document.defaultView),fA.style.transform=e,e=wqt.getComputedStyle(int.appendChild(fA),null).getPropertyValue("transform"),int.removeChild(fA),e=e.slice(7,-1).split(","),nnt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Mqt(e){return e==null?xz:(bz||(bz=document.createElementNS("http://www.w3.org/2000/svg","g")),bz.setAttribute("transform",e),(e=bz.transform.baseVal.consolidate())?(e=e.matrix,nnt(e.a,e.b,e.c,e.d,e.e,e.f)):xz)}var fA,int,wqt,bz,Eqt=M(()=>{bqt()});function Tqt(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 ont,ant,Cqt=M(()=>{vz();Eqt();ont=Tqt(Sqt,"px, ","px)","deg)"),ant=Tqt(Mqt,", ",")",")")});var wz=M(()=>{vz();vqt();Cqt();yqt()});function oRe(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 aRe(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 Aqt(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?oRe:aRe)(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 pA=M(()=>{Ac()});function Sz(e,t){var r;return(typeof t=="number"?Pc:t instanceof Vg?yz:(r=Vg(t))?(t=r,yz):rnt)(e,t)}var snt=M(()=>{Krt();wz()});function sRe(e){return function(){this.removeAttribute(e)}}function lRe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function cRe(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 uRe(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 hRe(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 fRe(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 Pqt(e,t){var r=ld(e),n=r==="transform"?ant:Sz;return this.attrTween(e,typeof t=="function"?(r.local?fRe:hRe)(r,n,Zw(this,"attr."+e,t)):t==null?(r.local?lRe:sRe)(r):(r.local?uRe:cRe)(r,n,t+""))}var Iqt=M(()=>{wz();Mf();pA();snt()});function pRe(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 dRe(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 Lqt(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=ld(e);return this.tween(r,(n.local?pRe:dRe)(n,t))}var kqt=M(()=>{Mf()});function mRe(e,t){return function(){lA(this,e).delay=+t.apply(this,arguments)}}function gRe(e,t){return t=+t,function(){lA(this,e).delay=t}}function Rqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mRe:gRe)(t,e)):io(this.node(),t).delay}var Nqt=M(()=>{Ac()});function _Re(e,t){return function(){Du(this,e).duration=+t.apply(this,arguments)}}function yRe(e,t){return t=+t,function(){Du(this,e).duration=t}}function Dqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_Re:yRe)(t,e)):io(this.node(),t).duration}var Oqt=M(()=>{Ac()});function vRe(e,t){if(typeof t!="function")throw new Error;return function(){Du(this,e).ease=t}}function zqt(e){var t=this._id;return arguments.length?this.each(vRe(t,e)):io(this.node(),t).ease}var Fqt=M(()=>{Ac()});function Bqt(e){typeof e!="function"&&(e=QC(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 Hqt=M(()=>{Mf();ud()});function Vqt(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 Uqt=M(()=>{ud()});function xRe(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 bRe(e,t,r){var n,i,o=xRe(t)?lA:Du;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function qqt(e,t){var r=this._id;return arguments.length<2?io(this.node(),r).on.on(e):this.each(bRe(r,e,t))}var Gqt=M(()=>{Ac()});function wRe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Wqt(){return this.on("end.remove",wRe(this._id))}var Yqt=M(()=>{});function jqt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=w1(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,Hg(c[f],t,r,f,c,io(u,r)));return new Uo(o,this._parents,t,r)}var Xqt=M(()=>{Mf();ud();Ac()});function $qt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=JC(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])&&Hg(p,t,r,g,f,d);o.push(f),a.push(u)}return new Uo(o,a,t,r)}var Kqt=M(()=>{Mf();ud();Ac()});function Zqt(){return new SRe(this._groups,this._parents)}var SRe,Jqt=M(()=>{Mf();SRe=cd.prototype.constructor});function MRe(e,t){var r,n,i;return function(){var o=Bg(this,e),a=(this.style.removeProperty(e),Bg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function ERe(e){return function(){this.style.removeProperty(e)}}function TRe(e,t,r){var n,i;return function(){var o=Bg(this,e);return o===r?null:o===n?i:i=t(n=o,r)}}function CRe(e,t,r){var n,i,o;return function(){var a=Bg(this,e),s=r(this);return s==null&&(s=(this.style.removeProperty(e),Bg(this,e))),a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function Qqt(e,t,r){var n=(e+="")=="transform"?ont:Sz;return t==null?this.styleTween(e,MRe(e,n)).on("end.style."+e,ERe(e)):this.styleTween(e,typeof t=="function"?CRe(e,n,Zw(this,"style."+e,t)):TRe(e,n,t+""),r)}var tGt=M(()=>{wz();Mf();pA();snt()});function ARe(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 eGt(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,ARe(e,t,r==null?"":r))}var rGt=M(()=>{});function PRe(e){return function(){this.textContent=e}}function IRe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function nGt(e){return this.tween("text",typeof e=="function"?IRe(Zw(this,"text",e)):PRe(e==null?"":e+""))}var iGt=M(()=>{pA()});function oGt(){for(var e=this._name,t=this._id,r=Mz(),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);Hg(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 aGt=M(()=>{ud();Ac()});function Uo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Ez(e){return cd().transition(e)}function Mz(){return++LRe}var LRe,Jw,ud=M(()=>{Mf();Iqt();kqt();Nqt();Oqt();Fqt();Hqt();Uqt();Gqt();Yqt();Xqt();Kqt();Jqt();tGt();rGt();iGt();aGt();pA();LRe=0;Jw=cd.prototype;Uo.prototype=Ez.prototype={constructor:Uo,select:jqt,selectAll:$qt,filter:Bqt,merge:Vqt,selection:Zqt,transition:oGt,call:Jw.call,nodes:Jw.nodes,node:Jw.node,size:Jw.size,empty:Jw.empty,each:Jw.each,on:qqt,attr:Pqt,attrTween:Lqt,style:Qqt,styleTween:eGt,text:nGt,remove:Wqt,tween:Aqt,delay:Rqt,duration:Dqt,ease:zqt}});function kRe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return lnt.time=Xw(),lnt;return r}function sGt(e){var t,r;e instanceof Uo?(t=e._id,e=e._name):(t=Mz(),(r=lnt).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])&&Hg(l,e,t,c,a,r||kRe(l,t));return new Uo(n,this._parents,e,t)}var lnt,lGt=M(()=>{ud();Ac();I_();Grt();lnt={time:null,delay:0,duration:250,ease:xs}});var cGt=M(()=>{Mf();QUt();lGt();cd.prototype.interrupt=JUt;cd.prototype.transition=sGt});function uGt(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>hz&&n.name===t)return new Uo([[e]],RRe,t,+i)}return null}var RRe,hGt=M(()=>{ud();Ac();RRe=[null]});var fGt=M(()=>{cGt();ud();hGt();Yrt()});function cnt(e){return function(){return e}}var pGt=M(()=>{});function dGt(e){return e[0]}function mGt(e){return e[1]}var gGt=M(()=>{});function unt(){this._=null}function Qw(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function dA(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 mA(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 _Gt(e){for(;e.L;)e=e.L;return e}var hnt,Tz=M(()=>{unt.prototype={constructor:unt,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=_Gt(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&&(dA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,mA(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(mA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,dA(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=_Gt(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,dA(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,mA(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,dA(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,mA(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,dA(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,mA(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};hnt=unt});function tS(e,t,r,n){var i=[null,null],o=Ao.push(i)-1;return i.left=e,i.right=t,r&&gA(i,e,t,r),n&&gA(i,t,e,n),Za[e.index].halfedges.push(o),Za[t.index].halfedges.push(o),i}function eS(e,t,r){var n=[t,r];return n.left=e,n}function gA(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 NRe(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 DRe(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 yGt(e,t,r,n){for(var i=Ao.length,o;i--;)(!DRe(o=Ao[i],e,t,r,n)||!NRe(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 Cz=M(()=>{rS()});function vGt(e){return Za[e.index]={site:e,halfedges:[]}}function ORe(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 fnt(e,t){return t[+(t.left!==e.site)]}function zRe(e,t){return t[+(t.left===e.site)]}function xGt(){for(var e=0,t=Za.length,r,n,i,o;e<t;++e)if((r=Za[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]=ORe(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 bGt(e,t,r,n){var i=Za.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Za[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=zRe(a,Ao[c[l]]),g=d[0],_=d[1],h=fnt(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=Za[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=Za[o])&&(a.halfedges.length||delete Za[o])}var pnt=M(()=>{Cz();rS()});function FRe(){Qw(this),this.x=this.y=this.arc=this.site=this.cy=null}function M1(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>=-SGt)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=wGt.pop()||new FRe;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||(Az=y)}}}}function E1(e){var t=e.circle;t&&(t.P||(Az=t.N),nS.remove(t),wGt.push(t),Qw(t),e.circle=null)}var wGt,Az,dnt=M(()=>{Tz();rS();wGt=[]});function BRe(){Qw(this),this.edge=this.site=this.circle=null}function MGt(e){var t=EGt.pop()||new BRe;return t.site=e,t}function mnt(e){E1(e),T1.remove(e),EGt.push(e),Qw(e)}function TGt(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];mnt(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),mnt(l),l=o;s.unshift(l),E1(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),mnt(c),c=a;s.push(c),E1(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],gA(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=tS(l.site,c.site,null,i),M1(l),M1(c)}function CGt(e){for(var t=e[0],r=e[1],n,i,o,a,s=T1._;s;)if(o=AGt(s,r)-t,o>Wr)s=s.L;else if(a=t-HRe(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}vGt(e);var l=MGt(e);if(T1.insert(n,l),!(!n&&!i)){if(n===i){E1(n),i=MGt(n.site),T1.insert(l,i),l.edge=i.edge=tS(n.site,l.site),M1(n),M1(i);return}if(!i){l.edge=tS(n.site,l.site);return}E1(n),E1(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];gA(i.edge,c,d,S),l.edge=tS(c,e,null,S),i.edge=tS(e,d,null,S),M1(n),M1(i)}}function AGt(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 HRe(e,t){var r=e.N;if(r)return AGt(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var EGt,PGt=M(()=>{Tz();pnt();dnt();Cz();rS();EGt=[]});function VRe(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function URe(e,t){return t[1]-e[1]||t[0]-e[0]}function _A(e,t){var r=e.sort(URe).pop(),n,i,o;for(Ao=[],Za=new Array(e.length),T1=new hnt,nS=new hnt;;)if(o=Az,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(CGt(r),n=r[0],i=r[1]),r=e.pop();else if(o)TGt(o.arc);else break;if(xGt(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];yGt(a,s,l,c),bGt(a,s,l,c)}this.edges=Ao,this.cells=Za,T1=nS=Ao=Za=null}var Wr,SGt,T1,Za,nS,Ao,rS=M(()=>{PGt();pnt();dnt();Cz();Tz();Wr=1e-6,SGt=1e-12;_A.prototype={constructor:_A,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return fnt(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&&VRe(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 IGt(){var e=dGt,t=mGt,r=null;function n(i){return new _A(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:cnt(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:cnt(+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 LGt=M(()=>{pGt();gGt();rS()});var kGt=M(()=>{LGt()});function NGt(){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 Pz(r)}function Pz(e){this._=e}function GRe(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 WRe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function RGt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=qRe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var qRe,yA,DGt=M(()=>{qRe={value:function(){}};Pz.prototype=NGt.prototype={constructor:Pz,on:function(e,t){var r=this._,n=GRe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=WRe(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]=RGt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=RGt(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 Pz(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)}};yA=NGt});var gnt=M(()=>{DGt()});var Iz,_nt,ynt=M(()=>{Iz="http://www.w3.org/1999/xhtml",_nt={svg:"http://www.w3.org/2000/svg",xhtml:Iz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function hd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),_nt.hasOwnProperty(t)?{space:_nt[t],local:e}:e}var Lz=M(()=>{ynt()});function YRe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Iz&&t.documentElement.namespaceURI===Iz?t.createElement(e):t.createElementNS(r,e)}}function jRe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function kz(e){var t=hd(e);return(t.local?jRe:YRe)(t)}var vnt=M(()=>{Lz();ynt()});function XRe(){}function C1(e){return e==null?XRe:function(){return this.querySelector(e)}}var Rz=M(()=>{});function OGt(e){typeof e!="function"&&(e=C1(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 gi(n,this._parents)}var zGt=M(()=>{Ou();Rz()});function $Re(){return[]}function vA(e){return e==null?$Re:function(){return this.querySelectorAll(e)}}var xnt=M(()=>{});function FGt(e){typeof e!="function"&&(e=vA(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 gi(n,i)}var BGt=M(()=>{Ou();xnt()});function xA(e){return function(){return this.matches(e)}}var bnt=M(()=>{});function HGt(e){typeof e!="function"&&(e=xA(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 gi(n,this._parents)}var VGt=M(()=>{Ou();bnt()});function Nz(e){return new Array(e.length)}var wnt=M(()=>{});function UGt(){return new gi(this._enter||this._groups.map(Nz),this._parents)}function bA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Snt=M(()=>{wnt();Ou();bA.prototype={constructor:bA,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 qGt(e){return function(){return e}}var GGt=M(()=>{});function KRe(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 bA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function ZRe(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=WGt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=WGt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new bA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function YGt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?ZRe:KRe,n=this._parents,i=this._groups;typeof e!="function"&&(e=qGt(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 gi(a,n),a._enter=s,a._exit=l,a}var WGt,jGt=M(()=>{Ou();Snt();GGt();WGt="$"});function XGt(){return new gi(this._exit||this._groups.map(Nz),this._parents)}var $Gt=M(()=>{wnt();Ou()});function KGt(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 ZGt=M(()=>{});function JGt(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 gi(a,this._parents)}var QGt=M(()=>{Ou()});function tWt(){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 eWt=M(()=>{});function rWt(e){e||(e=JRe);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 gi(i,this._parents).order()}function JRe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var nWt=M(()=>{Ou()});function iWt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var oWt=M(()=>{});function aWt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var sWt=M(()=>{});function lWt(){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 cWt=M(()=>{});function uWt(){var e=0;return this.each(function(){++e}),e}var hWt=M(()=>{});function fWt(){return!this.node()}var pWt=M(()=>{});function dWt(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 mWt=M(()=>{});function QRe(e){return function(){this.removeAttribute(e)}}function tNe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eNe(e,t){return function(){this.setAttribute(e,t)}}function rNe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function nNe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function iNe(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 gWt(e,t){var r=hd(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?tNe:QRe:typeof t=="function"?r.local?iNe:nNe:r.local?rNe:eNe)(r,t))}var _Wt=M(()=>{Lz()});function Dz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Mnt=M(()=>{});function oNe(e){return function(){this.style.removeProperty(e)}}function aNe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function sNe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function yWt(e,t,r){return arguments.length>1?this.each((t==null?oNe:typeof t=="function"?sNe:aNe)(e,t,r==null?"":r)):Ug(this.node(),e)}function Ug(e,t){return e.style.getPropertyValue(t)||Dz(e).getComputedStyle(e,null).getPropertyValue(t)}var Ent=M(()=>{Mnt()});function lNe(e){return function(){delete this[e]}}function cNe(e,t){return function(){this[e]=t}}function uNe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function vWt(e,t){return arguments.length>1?this.each((t==null?lNe:typeof t=="function"?uNe:cNe)(e,t)):this.node()[e]}var xWt=M(()=>{});function bWt(e){return e.trim().split(/^|\s+/)}function Tnt(e){return e.classList||new wWt(e)}function wWt(e){this._node=e,this._names=bWt(e.getAttribute("class")||"")}function SWt(e,t){for(var r=Tnt(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function MWt(e,t){for(var r=Tnt(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function hNe(e){return function(){SWt(this,e)}}function fNe(e){return function(){MWt(this,e)}}function pNe(e,t){return function(){(t.apply(this,arguments)?SWt:MWt)(this,e)}}function EWt(e,t){var r=bWt(e+"");if(arguments.length<2){for(var n=Tnt(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?pNe:t?hNe:fNe)(r,t))}var TWt=M(()=>{wWt.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 dNe(){this.textContent=""}function mNe(e){return function(){this.textContent=e}}function gNe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function CWt(e){return arguments.length?this.each(e==null?dNe:(typeof e=="function"?gNe:mNe)(e)):this.node().textContent}var AWt=M(()=>{});function _Ne(){this.innerHTML=""}function yNe(e){return function(){this.innerHTML=e}}function vNe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function PWt(e){return arguments.length?this.each(e==null?_Ne:(typeof e=="function"?vNe:yNe)(e)):this.node().innerHTML}var IWt=M(()=>{});function xNe(){this.nextSibling&&this.parentNode.appendChild(this)}function LWt(){return this.each(xNe)}var kWt=M(()=>{});function bNe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function RWt(){return this.each(bNe)}var NWt=M(()=>{});function DWt(e){var t=typeof e=="function"?e:kz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var OWt=M(()=>{vnt()});function wNe(){return null}function zWt(e,t){var r=typeof e=="function"?e:kz(e),n=t==null?wNe:typeof t=="function"?t:C1(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var FWt=M(()=>{vnt();Rz()});function SNe(){var e=this.parentNode;e&&e.removeChild(this)}function BWt(){return this.each(SNe)}var HWt=M(()=>{});function MNe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ENe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function VWt(e){return this.select(e?ENe:MNe)}var UWt=M(()=>{});function qWt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var GWt=M(()=>{});function TNe(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 CNe(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 ANe(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 PNe(e,t,r){var n=YWt.hasOwnProperty(e.type)?TNe: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 XWt(e,t,r){var n=CNe(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?PNe:ANe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Cnt(e,t,r,n){var i=Yr;e.sourceEvent=Yr,Yr=e;try{return t.apply(r,n)}finally{Yr=i}}var YWt,Yr,WWt,Oz=M(()=>{YWt={},Yr=null;typeof document!="undefined"&&(WWt=document.documentElement,"onmouseenter"in WWt||(YWt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function $Wt(e,t,r){var n=Dz(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 INe(e,t){return function(){return $Wt(this,e,t)}}function LNe(e,t){return function(){return $Wt(this,e,t.apply(this,arguments))}}function KWt(e,t){return this.each((typeof t=="function"?LNe:INe)(e,t))}var ZWt=M(()=>{Mnt()});function gi(e,t){this._groups=e,this._parents=t}function JWt(){return new gi([[document.documentElement]],Ant)}var Ant,fd,Ou=M(()=>{zGt();BGt();VGt();jGt();Snt();$Gt();ZGt();QGt();eWt();nWt();oWt();sWt();cWt();hWt();pWt();mWt();_Wt();Ent();xWt();TWt();AWt();IWt();kWt();NWt();OWt();FWt();HWt();UWt();GWt();Oz();ZWt();Ant=[null];gi.prototype=JWt.prototype={constructor:gi,select:OGt,selectAll:FGt,filter:HGt,data:YGt,enter:UGt,exit:XGt,join:KGt,merge:JGt,order:tWt,sort:rWt,call:iWt,nodes:aWt,node:lWt,size:uWt,empty:fWt,each:dWt,attr:gWt,style:yWt,property:vWt,classed:EWt,text:CWt,html:PWt,raise:LWt,lower:RWt,append:DWt,insert:zWt,remove:BWt,clone:VWt,datum:qWt,on:XWt,dispatch:KWt};fd=JWt});function pd(e){return typeof e=="string"?new gi([[document.querySelector(e)]],[document.documentElement]):new gi([[e]],Ant)}var QWt=M(()=>{Ou()});function zz(){for(var e=Yr,t;t=e.sourceEvent;)e=t;return e}var Pnt=M(()=>{Oz()});function Fz(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 Int=M(()=>{});function iS(e){var t=zz();return t.changedTouches&&(t=t.changedTouches[0]),Fz(e,t)}var tYt=M(()=>{Pnt();Int()});function Bz(e,t,r){arguments.length<3&&(r=t,t=zz().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Fz(e,o);return null}var eYt=M(()=>{Pnt();Int()});var Is=M(()=>{bnt();tYt();Lz();QWt();Ou();Rz();xnt();Ent();eYt();Oz()});function Hz(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var rYt=M(()=>{Is()});function Lnt(e){var t=e.document.documentElement,r=pd(e).on("dragstart.drag",Hz,!0);"onselectstart"in t?r.on("selectstart.drag",Hz,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function knt(e,t){var r=e.document.documentElement,n=pd(e).on("dragstart.drag",null);t&&(n.on("click.drag",Hz,!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 nYt=M(()=>{Is();rYt()});var iYt=M(()=>{nYt()});function Vz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Rnt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var oYt=M(()=>{});function MA(){}function sYt(){return this.rgb().formatHex()}function BNe(){return pYt(this).formatHsl()}function lYt(){return this.rgb().formatRgb()}function qg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kNe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?cYt(t):r===3?new gl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Uz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Uz(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=RNe.exec(e))?new gl(t[1],t[2],t[3],1):(t=NNe.exec(e))?new gl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=DNe.exec(e))?Uz(t[1],t[2],t[3],t[4]):(t=ONe.exec(e))?Uz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zNe.exec(e))?fYt(t[1],t[2]/100,t[3]/100,1):(t=FNe.exec(e))?fYt(t[1],t[2]/100,t[3]/100,t[4]):aYt.hasOwnProperty(e)?cYt(aYt[e]):e==="transparent"?new gl(NaN,NaN,NaN,0):null}function cYt(e){return new gl(e>>16&255,e>>8&255,e&255,1)}function Uz(e,t,r,n){return n<=0&&(e=t=r=NaN),new gl(e,t,r,n)}function HNe(e){return e instanceof MA||(e=qg(e)),e?(e=e.rgb(),new gl(e.r,e.g,e.b,e.opacity)):new gl}function aS(e,t,r,n){return arguments.length===1?HNe(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 uYt(){return"#"+Nnt(this.r)+Nnt(this.g)+Nnt(this.b)}function hYt(){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 Nnt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function fYt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Cf(e,t,r,n)}function pYt(e){if(e instanceof Cf)return new Cf(e.h,e.s,e.l,e.opacity);if(e instanceof MA||(e=qg(e)),!e)return new Cf;if(e instanceof Cf)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 Cf(a,s,l,e.opacity)}function dYt(e,t,r,n){return arguments.length===1?pYt(e):new Cf(e,t,r,n==null?1:n)}function Cf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Dnt(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 wA,qz,oS,SA,Af,kNe,RNe,NNe,DNe,ONe,zNe,FNe,aYt,mYt=M(()=>{oYt();wA=.7,qz=1/wA,oS="\\s*([+-]?\\d+)\\s*",SA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Af="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kNe=/^#([0-9a-f]{3,8})$/,RNe=new RegExp("^rgb\\("+[oS,oS,oS]+"\\)$"),NNe=new RegExp("^rgb\\("+[Af,Af,Af]+"\\)$"),DNe=new RegExp("^rgba\\("+[oS,oS,oS,SA]+"\\)$"),ONe=new RegExp("^rgba\\("+[Af,Af,Af,SA]+"\\)$"),zNe=new RegExp("^hsl\\("+[SA,Af,Af]+"\\)$"),FNe=new RegExp("^hsla\\("+[SA,Af,Af,SA]+"\\)$"),aYt={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};Vz(MA,qg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:sYt,formatHex:sYt,formatHsl:BNe,formatRgb:lYt,toString:lYt});Vz(gl,aS,Rnt(MA,{brighter:function(e){return e=e==null?qz:Math.pow(qz,e),new gl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?wA:Math.pow(wA,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:uYt,formatHex:uYt,formatRgb:hYt,toString:hYt}));Vz(Cf,dYt,Rnt(MA,{brighter:function(e){return e=e==null?qz:Math.pow(qz,e),new Cf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?wA:Math.pow(wA,e),new Cf(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(Dnt(e>=240?e-240:e+120,i,n),Dnt(e,i,n),Dnt(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 Ont=M(()=>{mYt()});function znt(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 gYt(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 znt((r-n/t)*t,a,i,o,s)}}var Fnt=M(()=>{});function _Yt(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 znt((r-n/t)*t,i,o,a,s)}}var yYt=M(()=>{Fnt()});function Bnt(e){return function(){return e}}var vYt=M(()=>{});function VNe(e,t){return function(r){return e+r*t}}function UNe(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 xYt(e){return(e=+e)==1?Gz:function(t,r){return r-t?UNe(t,r,e):Bnt(isNaN(t)?r:t)}}function Gz(e,t){var r=t-e;return r?VNe(e,r):Bnt(isNaN(e)?t:e)}var bYt=M(()=>{vYt()});function wYt(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 Wz,qNe,GNe,SYt=M(()=>{Ont();Fnt();yYt();bYt();Wz=function e(t){var r=xYt(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=Gz(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);qNe=wYt(gYt),GNe=wYt(_Yt)});function Ic(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Yz=M(()=>{});function WNe(e){return function(){return e}}function YNe(e){return function(t){return e(t)+""}}function Unt(e,t){var r=Vnt.lastIndex=Hnt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Vnt.exec(e))&&(i=Hnt.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=Hnt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?YNe(l[0].x):WNe(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 Vnt,Hnt,MYt=M(()=>{Yz();Vnt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hnt=new RegExp(Vnt.source,"g")});function qnt(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)*EYt,skewX:Math.atan(l)*EYt,scaleX:a,scaleY:s}}var EYt,jz,TYt=M(()=>{EYt=180/Math.PI,jz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function AYt(e){return e==="none"?jz:(EA||(EA=document.createElement("DIV"),Gnt=document.documentElement,CYt=document.defaultView),EA.style.transform=e,e=CYt.getComputedStyle(Gnt.appendChild(EA),null).getPropertyValue("transform"),Gnt.removeChild(EA),e=e.slice(7,-1).split(","),qnt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function PYt(e){return e==null?jz:(Xz||(Xz=document.createElementNS("http://www.w3.org/2000/svg","g")),Xz.setAttribute("transform",e),(e=Xz.transform.baseVal.consolidate())?(e=e.matrix,qnt(e.a,e.b,e.c,e.d,e.e,e.f)):jz)}var EA,Gnt,CYt,Xz,IYt=M(()=>{TYt()});function LYt(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 Wnt,Ynt,kYt=M(()=>{Yz();IYt();Wnt=LYt(AYt,"px, ","px)","deg)"),Ynt=LYt(PYt,", ",")",")")});function NYt(e){return((e=Math.exp(e))+1/e)/2}function XNe(e){return((e=Math.exp(e))-1/e)/2}function $Ne(e){return((e=Math.exp(2*e))-1)/(e+1)}function Xnt(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)/TA,h=function(x){return[r+x*l,n+x*c,i*Math.exp(TA*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+RYt*u)/(2*i*jnt*p),g=(s*s-i*i-RYt*u)/(2*s*jnt*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/TA,h=function(x){var b=x*f,S=NYt(_),C=i/(jnt*p)*(S*$Ne(TA*b+_)-XNe(_));return[r+C*l,n+C*c,i*S/NYt(TA*b+_)]}}return h.duration=f*1e3,h}var TA,jnt,RYt,jNe,DYt=M(()=>{TA=Math.SQRT2,jnt=2,RYt=4,jNe=1e-12});var CA=M(()=>{Yz();MYt();kYt();DYt();SYt()});function lS(){return A1||(FYt(KNe),A1=LA.now()+Zz)}function KNe(){A1=0}function kA(){this._call=this._time=this._next=null}function Jz(e,t,r){var n=new kA;return n.restart(e,t,r),n}function BYt(){lS(),++sS;for(var e=$z,t;e;)(t=A1-e._time)>=0&&e._call.call(null,t),e=e._next;--sS}function OYt(){A1=(Kz=LA.now())+Zz,sS=PA=0;try{BYt()}finally{sS=0,JNe(),A1=0}}function ZNe(){var e=LA.now(),t=e-Kz;t>zYt&&(Zz-=t,Kz=e)}function JNe(){for(var e,t=$z,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:$z=r);IA=e,$nt(n)}function $nt(e){if(!sS){PA&&(PA=clearTimeout(PA));var t=e-A1;t>24?(e<1/0&&(PA=setTimeout(OYt,e-LA.now()-Zz)),AA&&(AA=clearInterval(AA))):(AA||(Kz=LA.now(),AA=setInterval(ZNe,zYt)),sS=1,FYt(OYt))}}var sS,PA,AA,zYt,$z,IA,Kz,A1,Zz,LA,FYt,Knt=M(()=>{sS=0,PA=0,AA=0,zYt=1e3,Kz=0,A1=0,Zz=0,LA=typeof performance=="object"&&performance.now?performance:Date,FYt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};kA.prototype=Jz.prototype={constructor:kA,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&&IA!==this&&(IA?IA._next=this:$z=this,IA=this),this._call=e,this._time=r,$nt()},stop:function(){this._call&&(this._call=null,this._time=1/0,$nt())}}});function Qz(e,t,r){var n=new kA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var HYt=M(()=>{Knt()});var Znt=M(()=>{Knt();HYt()});function Gg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;eDe(e,r,{name:t,index:n,group:i,on:QNe,tween:tDe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:UYt})}function NA(e,t){var r=oo(e,t);if(r.state>UYt)throw new Error("too late; already scheduled");return r}function Ja(e,t){var r=oo(e,t);if(r.state>tF)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 eDe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Jz(o,0,r.time);function o(c){r.state=Jnt,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!==Jnt)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===tF)return Qz(a);p.state===VYt?(p.state=RA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=RA,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(Qz(function(){r.state===tF&&(r.state=VYt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=eF,r.on.call("start",e,e.__data__,r.index,r.group),r.state===eF){for(r.state=tF,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=rF,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===rF&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=RA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var QNe,tDe,UYt,Jnt,eF,tF,VYt,rF,RA,Ls=M(()=>{gnt();Znt();QNe=yA("start","end","cancel","interrupt"),tDe=[],UYt=0,Jnt=1,eF=2,tF=3,VYt=4,rF=5,RA=6});function P1(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>eF&&n.state<rF,n.state=RA,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Qnt=M(()=>{Ls()});function qYt(e){return this.each(function(){P1(this,e)})}var GYt=M(()=>{Qnt()});function rDe(e,t){var r,n;return function(){var i=Ja(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 nDe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Ja(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 WYt(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?rDe:nDe)(r,e,t))}function cS(e,t,r){var n=e._id;return e.each(function(){var i=Ja(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return oo(i,n).value[t]}}var DA=M(()=>{Ls()});function nF(e,t){var r;return(typeof t=="number"?Ic:t instanceof qg?Wz:(r=qg(t))?(t=r,Wz):Unt)(e,t)}var tit=M(()=>{Ont();CA()});function iDe(e){return function(){this.removeAttribute(e)}}function oDe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aDe(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 sDe(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 lDe(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 cDe(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 YYt(e,t){var r=hd(e),n=r==="transform"?Ynt:nF;return this.attrTween(e,typeof t=="function"?(r.local?cDe:lDe)(r,n,cS(this,"attr."+e,t)):t==null?(r.local?oDe:iDe)(r):(r.local?sDe:aDe)(r,n,t))}var jYt=M(()=>{CA();Is();DA();tit()});function uDe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function hDe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function fDe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&hDe(e,o)),r}return i._value=t,i}function pDe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&uDe(e,o)),r}return i._value=t,i}function XYt(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=hd(e);return this.tween(r,(n.local?fDe:pDe)(n,t))}var $Yt=M(()=>{Is()});function dDe(e,t){return function(){NA(this,e).delay=+t.apply(this,arguments)}}function mDe(e,t){return t=+t,function(){NA(this,e).delay=t}}function KYt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dDe:mDe)(t,e)):oo(this.node(),t).delay}var ZYt=M(()=>{Ls()});function gDe(e,t){return function(){Ja(this,e).duration=+t.apply(this,arguments)}}function _De(e,t){return t=+t,function(){Ja(this,e).duration=t}}function JYt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gDe:_De)(t,e)):oo(this.node(),t).duration}var QYt=M(()=>{Ls()});function yDe(e,t){if(typeof t!="function")throw new Error;return function(){Ja(this,e).ease=t}}function tjt(e){var t=this._id;return arguments.length?this.each(yDe(t,e)):oo(this.node(),t).ease}var ejt=M(()=>{Ls()});function rjt(e){typeof e!="function"&&(e=xA(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 da(n,this._parents,this._name,this._id)}var njt=M(()=>{Is();dd()});function ijt(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 da(a,this._parents,this._name,this._id)}var ojt=M(()=>{dd()});function vDe(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 xDe(e,t,r){var n,i,o=vDe(t)?NA:Ja;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function ajt(e,t){var r=this._id;return arguments.length<2?oo(this.node(),r).on.on(e):this.each(xDe(r,e,t))}var sjt=M(()=>{Ls()});function bDe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function ljt(){return this.on("end.remove",bDe(this._id))}var cjt=M(()=>{});function ujt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=C1(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,Gg(c[f],t,r,f,c,oo(u,r)));return new da(o,this._parents,t,r)}var hjt=M(()=>{Is();dd();Ls()});function fjt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=vA(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])&&Gg(p,t,r,g,f,d);o.push(f),a.push(u)}return new da(o,a,t,r)}var pjt=M(()=>{Is();dd();Ls()});function djt(){return new wDe(this._groups,this._parents)}var wDe,mjt=M(()=>{Is();wDe=fd.prototype.constructor});function SDe(e,t){var r,n,i;return function(){var o=Ug(this,e),a=(this.style.removeProperty(e),Ug(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function gjt(e){return function(){this.style.removeProperty(e)}}function MDe(e,t,r){var n,i=r+"",o;return function(){var a=Ug(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function EDe(e,t,r){var n,i,o;return function(){var a=Ug(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Ug(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function TDe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Ja(this,e),c=l.on,u=l.value[o]==null?s||(s=gjt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function _jt(e,t,r){var n=(e+="")=="transform"?Wnt:nF;return t==null?this.styleTween(e,SDe(e,n)).on("end.style."+e,gjt(e)):typeof t=="function"?this.styleTween(e,EDe(e,n,cS(this,"style."+e,t))).each(TDe(this._id,e)):this.styleTween(e,MDe(e,n,t),r).on("end.style."+e,null)}var yjt=M(()=>{CA();Is();Ls();DA();tit()});function CDe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function ADe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&CDe(e,a,r)),n}return o._value=t,o}function vjt(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,ADe(e,t,r==null?"":r))}var xjt=M(()=>{});function PDe(e){return function(){this.textContent=e}}function IDe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function bjt(e){return this.tween("text",typeof e=="function"?IDe(cS(this,"text",e)):PDe(e==null?"":e+""))}var wjt=M(()=>{DA()});function LDe(e){return function(t){this.textContent=e.call(this,t)}}function kDe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&LDe(i)),t}return n._value=e,n}function Sjt(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,kDe(e))}var Mjt=M(()=>{});function Ejt(){for(var e=this._name,t=this._id,r=iF(),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);Gg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new da(n,this._parents,e,r)}var Tjt=M(()=>{dd();Ls()});function Cjt(){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=Ja(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 Ajt=M(()=>{Ls()});function da(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function eit(e){return fd().transition(e)}function iF(){return++RDe}var RDe,uS,dd=M(()=>{Is();jYt();$Yt();ZYt();QYt();ejt();njt();ojt();sjt();cjt();hjt();pjt();mjt();yjt();xjt();wjt();Mjt();Tjt();DA();Ajt();RDe=0;uS=fd.prototype;da.prototype=eit.prototype={constructor:da,select:ujt,selectAll:fjt,filter:rjt,merge:ijt,selection:djt,transition:Ejt,call:uS.call,nodes:uS.nodes,node:uS.node,size:uS.size,empty:uS.empty,each:uS.each,on:ajt,attr:YYt,attrTween:XYt,style:_jt,styleTween:vjt,text:bjt,textTween:Sjt,remove:ljt,tween:WYt,delay:KYt,duration:JYt,ease:tjt,end:Cjt}});function NDe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return rit.time=lS(),rit;return r}function Pjt(e){var t,r;e instanceof da?(t=e._id,e=e._name):(t=iF(),(r=rit).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])&&Gg(l,e,t,c,a,r||NDe(l,t));return new da(n,this._parents,e,t)}var rit,Ijt=M(()=>{dd();Ls();I_();Znt();rit={time:null,delay:0,duration:250,ease:xs}});var Ljt=M(()=>{Is();GYt();Ijt();fd.prototype.interrupt=qYt;fd.prototype.transition=Pjt});var kjt=M(()=>{dd();Ls()});var Rjt=M(()=>{Ljt();dd();kjt();Qnt()});function OA(e){return function(){return e}}var Njt=M(()=>{});function nit(e,t,r){this.target=e,this.type=t,this.transform=r}var Djt=M(()=>{});function Pf(e,t,r){this.k=e,this.x=t,this.y=r}function oF(e){return e.__zoom||hS}var hS,iit=M(()=>{Pf.prototype={constructor:Pf,scale:function(e){return e===1?this:new Pf(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Pf(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 Pf(1,0,0);oF.prototype=Pf.prototype});function aF(){Yr.stopImmediatePropagation()}function fS(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var Ojt=M(()=>{Is()});function DDe(){return!Yr.button}function ODe(){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 zjt(){return this.__zoom||hS}function zDe(){return-Yr.deltaY*(Yr.deltaMode?120:1)/500}function FDe(){return"ontouchstart"in this}function BDe(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 Fjt(){var e=DDe,t=ODe,r=BDe,n=zDe,i=FDe,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Xnt,c=[],u=yA("start","zoom","end"),h,f,p=500,d=150,g=0;function _(R){R.property("__zoom",zjt).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",zjt),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 Pf(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 Pf(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 Pf(_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){Cnt(new nit(_,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)],P1(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=pd(Yr.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",rt,!0),z=iS(this),U=Yr.clientX,W=Yr.clientY;Lnt(Yr.view),aF(),R.mouse=[z,this.__zoom.invert(z)],P1(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),knt(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?pd(this).transition().duration(s).call(S,W,F):pd(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(aF(),W=0;W<U;++W)Z=F[W],rt=Bz(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=pd(this).on("dblclick.zoom"),rt&&rt.apply(this,arguments);return}z&&(h=setTimeout(function(){h=null},p),P1(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=Bz(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(aF(),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:OA(+R),_):n},_.filter=function(R){return arguments.length?(e=typeof R=="function"?R:OA(!!R),_):e},_.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:OA(!!R),_):i},_.extent=function(R){return arguments.length?(t=typeof R=="function"?R:OA([[+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 Bjt=M(()=>{gnt();iYt();CA();Is();Rjt();Njt();Djt();iit();Ojt()});var Hjt=M(()=>{Bjt();iit()});var Mr={};Ks(Mr,{active:()=>uGt,arc:()=>hFt,area:()=>x7,areaRadial:()=>Ret,ascending:()=>_c,axisBottom:()=>YMt,axisLeft:()=>jMt,axisRight:()=>WMt,axisTop:()=>GMt,bisect:()=>aR,bisectLeft:()=>rMt,bisectRight:()=>b$,bisector:()=>oR,brush:()=>pCt,brushSelection:()=>uCt,brushX:()=>hCt,brushY:()=>fCt,chord:()=>zCt,clientPoint:()=>Dg,cluster:()=>BLt,color:()=>x2,create:()=>$zt,creator:()=>Ng,cross:()=>iMt,csv:()=>lNt,csvFormat:()=>pPt,csvFormatRows:()=>dPt,csvParse:()=>hPt,csvParseRows:()=>fPt,cubehelix:()=>cN,curveBasis:()=>LFt,curveBasisClosed:()=>RFt,curveBasisOpen:()=>OFt,curveBundle:()=>BFt,curveCardinal:()=>VFt,curveCardinalClosed:()=>UFt,curveCardinalOpen:()=>qFt,curveCatmullRom:()=>WFt,curveCatmullRomClosed:()=>jFt,curveCatmullRomOpen:()=>KFt,curveLinear:()=>Fg,curveLinearClosed:()=>QFt,curveMonotoneX:()=>aBt,curveMonotoneY:()=>sBt,curveNatural:()=>hBt,curveStep:()=>pBt,curveStepAfter:()=>mBt,curveStepBefore:()=>dBt,customEvent:()=>qzt,descending:()=>aMt,deviation:()=>lR,dispatch:()=>CAt,drag:()=>aPt,dragDisable:()=>MN,dragEnable:()=>EN,dsvFormat:()=>w2,easeBack:()=>zZ,easeBackIn:()=>jPt,easeBackInOut:()=>zZ,easeBackOut:()=>XPt,easeBounce:()=>S2,easeBounceIn:()=>GPt,easeBounceInOut:()=>WPt,easeBounceOut:()=>S2,easeCircle:()=>NZ,easeCircleIn:()=>VPt,easeCircleInOut:()=>NZ,easeCircleOut:()=>UPt,easeCubic:()=>PZ,easeCubicIn:()=>CPt,easeCubicInOut:()=>PZ,easeCubicOut:()=>APt,easeElastic:()=>HZ,easeElasticIn:()=>KPt,easeElasticInOut:()=>ZPt,easeElasticOut:()=>HZ,easeExp:()=>RZ,easeExpIn:()=>FPt,easeExpInOut:()=>RZ,easeExpOut:()=>BPt,easeLinear:()=>wPt,easePoly:()=>LZ,easePolyIn:()=>IPt,easePolyInOut:()=>LZ,easePolyOut:()=>LPt,easeQuad:()=>AZ,easeQuadIn:()=>MPt,easeQuadInOut:()=>AZ,easeQuadOut:()=>EPt,easeSin:()=>kZ,easeSinIn:()=>DPt,easeSinInOut:()=>kZ,easeSinOut:()=>OPt,entries:()=>aAt,event:()=>Pu,extent:()=>cR,forceCenter:()=>t6t,forceCollide:()=>R6t,forceLink:()=>U6t,forceManyBody:()=>nIt,forceRadial:()=>oIt,forceSimulation:()=>rIt,forceX:()=>sIt,forceY:()=>cIt,format:()=>nJ,formatDefaultLocale:()=>GN,formatLocale:()=>UN,formatPrefix:()=>iJ,formatSpecifier:()=>Ly,geoAlbers:()=>ND,geoAlbersUsa:()=>dLt,geoArea:()=>zIt,geoAzimuthalEqualArea:()=>gLt,geoAzimuthalEqualAreaRaw:()=>OD,geoAzimuthalEquidistant:()=>yLt,geoAzimuthalEquidistantRaw:()=>zD,geoBounds:()=>WIt,geoCentroid:()=>JIt,geoCircle:()=>o9t,geoClipAntimeridian:()=>OT,geoClipCircle:()=>gD,geoClipExtent:()=>A9t,geoClipRectangle:()=>Qp,geoConicConformal:()=>bLt,geoConicConformalRaw:()=>pQ,geoConicEqualArea:()=>Uy,geoConicEqualAreaRaw:()=>uQ,geoConicEquidistant:()=>MLt,geoConicEquidistantRaw:()=>mQ,geoContains:()=>O9t,geoDistance:()=>By,geoEquirectangular:()=>SLt,geoEquirectangularRaw:()=>Gy,geoGnomonic:()=>TLt,geoGnomonicRaw:()=>HD,geoGraticule:()=>wD,geoGraticule10:()=>H9t,geoIdentity:()=>ALt,geoInterpolate:()=>U9t,geoLength:()=>xD,geoMercator:()=>xLt,geoMercatorRaw:()=>qy,geoNaturalEarth1:()=>ILt,geoNaturalEarth1Raw:()=>UD,geoOrthographic:()=>kLt,geoOrthographicRaw:()=>qD,geoPath:()=>sLt,geoProjection:()=>eo,geoProjectionMutator:()=>WT,geoRotation:()=>sD,geoStereographic:()=>NLt,geoStereographicRaw:()=>GD,geoStream:()=>Mo,geoTransform:()=>cLt,geoTransverseMercator:()=>OLt,geoTransverseMercatorRaw:()=>WD,hcl:()=>oZ,hierarchy:()=>YT,histogram:()=>mMt,hsl:()=>JK,html:()=>tNt,interpolate:()=>Z2,interpolateArray:()=>hO,interpolateBasis:()=>lO,interpolateBasisClosed:()=>uO,interpolateCool:()=>x7t,interpolateCubehelix:()=>F8t,interpolateCubehelixDefault:()=>_7t,interpolateCubehelixLong:()=>B8t,interpolateDate:()=>pO,interpolateHcl:()=>N8t,interpolateHclLong:()=>D8t,interpolateHsl:()=>P8t,interpolateHslLong:()=>I8t,interpolateInferno:()=>E7t,interpolateLab:()=>KQ,interpolateMagma:()=>M7t,interpolateNumber:()=>As,interpolateObject:()=>dO,interpolatePlasma:()=>T7t,interpolateRainbow:()=>b7t,interpolateRgb:()=>tC,interpolateRgbBasis:()=>u8t,interpolateRgbBasisClosed:()=>h8t,interpolateRound:()=>f8t,interpolateString:()=>mO,interpolateTransformCss:()=>b8t,interpolateTransformSvg:()=>w8t,interpolateViridis:()=>S7t,interpolateWarm:()=>v7t,interpolateZoom:()=>T8t,interrupt:()=>pz,interval:()=>xVt,isoFormat:()=>hVt,isoParse:()=>fVt,json:()=>rNt,keys:()=>rAt,lab:()=>sN,line:()=>Rw,lineRadial:()=>Let,linkHorizontal:()=>wFt,linkRadial:()=>MFt,linkVertical:()=>SFt,local:()=>d7,map:()=>by,matcher:()=>c7,max:()=>bMt,mean:()=>SMt,median:()=>EMt,merge:()=>CMt,min:()=>dR,mouse:()=>Jzt,namespace:()=>Mw,namespaces:()=>MC,nest:()=>ZCt,now:()=>Yw,pack:()=>bkt,packEnclose:()=>XD,packSiblings:()=>_kt,pairs:()=>nMt,partition:()=>Skt,path:()=>W8t,permute:()=>PMt,pie:()=>yFt,pointRadial:()=>f1,polygonArea:()=>X8t,polygonCentroid:()=>K8t,polygonContains:()=>nRt,polygonHull:()=>eRt,polygonLength:()=>oRt,precisionFixed:()=>SIt,precisionPrefix:()=>EIt,precisionRound:()=>CIt,quadtree:()=>vO,quantile:()=>dy,quantize:()=>V8t,queue:()=>bO,radialArea:()=>Ret,radialLine:()=>Let,randomBates:()=>$Rt,randomExponential:()=>ZRt,randomIrwinHall:()=>SO,randomLogNormal:()=>jRt,randomNormal:()=>wO,randomUniform:()=>WRt,range:()=>uR,request:()=>J2,rgb:()=>ZK,ribbon:()=>WCt,scaleBand:()=>lC,scaleIdentity:()=>UO,scaleImplicit:()=>LO,scaleLinear:()=>VO,scaleLog:()=>GO,scaleOrdinal:()=>nw,scalePoint:()=>VNt,scalePow:()=>gC,scaleQuantile:()=>WO,scaleQuantize:()=>YO,scaleSequential:()=>n7,scaleSqrt:()=>eOt,scaleThreshold:()=>jO,scaleTime:()=>a7t,scaleUtc:()=>s7t,scan:()=>LMt,schemeCategory10:()=>c7t,schemeCategory20:()=>m7t,schemeCategory20b:()=>h7t,schemeCategory20c:()=>p7t,select:()=>p7,selectAll:()=>tFt,selection:()=>Xzt,selector:()=>Ew,selectorAll:()=>l7,set:()=>tAt,shuffle:()=>RMt,stack:()=>_Bt,stackOffsetDiverging:()=>bBt,stackOffsetExpand:()=>vBt,stackOffsetNone:()=>Ru,stackOffsetSilhouette:()=>SBt,stackOffsetWiggle:()=>EBt,stackOrderAscending:()=>N7,stackOrderDescending:()=>CBt,stackOrderInsideOut:()=>PBt,stackOrderNone:()=>Nu,stackOrderReverse:()=>LBt,stratify:()=>Ckt,style:()=>yet,sum:()=>DMt,symbol:()=>PFt,symbolCircle:()=>kC,symbolCross:()=>w7,symbolDiamond:()=>S7,symbolSquare:()=>E7,symbolStar:()=>M7,symbolTriangle:()=>T7,symbolWye:()=>C7,symbols:()=>AFt,text:()=>iNt,thresholdFreedmanDiaconis:()=>_Mt,thresholdScott:()=>vMt,thresholdSturges:()=>fR,tickIncrement:()=>R$,tickStep:()=>hR,ticks:()=>dMt,timeDay:()=>YBt,timeDays:()=>jBt,timeFormat:()=>Srt,timeFormatDefaultLocale:()=>j7,timeFormatLocale:()=>WC,timeFriday:()=>art,timeFridays:()=>QBt,timeHour:()=>UBt,timeHours:()=>qBt,timeInterval:()=>Sr,timeMillisecond:()=>Jet,timeMilliseconds:()=>Qet,timeMinute:()=>FBt,timeMinutes:()=>BBt,timeMonday:()=>rrt,timeMondays:()=>$Bt,timeMonth:()=>nHt,timeMonths:()=>iHt,timeParse:()=>Mrt,timeSaturday:()=>srt,timeSaturdays:()=>tHt,timeSecond:()=>trt,timeSeconds:()=>ert,timeSunday:()=>B7,timeSundays:()=>lrt,timeThursday:()=>ort,timeThursdays:()=>JBt,timeTuesday:()=>nrt,timeTuesdays:()=>KBt,timeWednesday:()=>irt,timeWednesdays:()=>ZBt,timeWeek:()=>B7,timeWeeks:()=>lrt,timeYear:()=>aHt,timeYears:()=>sHt,timeout:()=>yVt,timer:()=>Art,timerFlush:()=>Prt,touch:()=>rFt,touches:()=>iFt,transition:()=>Ez,transpose:()=>mR,tree:()=>Pkt,treemap:()=>Lkt,treemapBinary:()=>Rkt,treemapDice:()=>lf,treemapResquarify:()=>zkt,treemapSlice:()=>wg,treemapSliceDice:()=>Dkt,treemapSquarify:()=>QD,tsv:()=>uNt,tsvFormat:()=>yPt,tsvFormatRows:()=>vPt,tsvParse:()=>gPt,tsvParseRows:()=>_Pt,utcDay:()=>yHt,utcDays:()=>vHt,utcFormat:()=>YC,utcFriday:()=>drt,utcFridays:()=>EHt,utcHour:()=>dHt,utcHours:()=>mHt,utcMillisecond:()=>Jet,utcMilliseconds:()=>Qet,utcMinute:()=>uHt,utcMinutes:()=>hHt,utcMonday:()=>urt,utcMondays:()=>bHt,utcMonth:()=>PHt,utcMonths:()=>IHt,utcParse:()=>jC,utcSaturday:()=>mrt,utcSaturdays:()=>THt,utcSecond:()=>trt,utcSeconds:()=>ert,utcSunday:()=>H7,utcSundays:()=>grt,utcThursday:()=>prt,utcThursdays:()=>MHt,utcTuesday:()=>hrt,utcTuesdays:()=>wHt,utcWednesday:()=>frt,utcWednesdays:()=>SHt,utcWeek:()=>H7,utcWeeks:()=>grt,utcYear:()=>kHt,utcYears:()=>RHt,values:()=>iAt,variance:()=>sR,version:()=>Q3t,voronoi:()=>IGt,window:()=>Cw,xml:()=>aNt,zip:()=>zMt,zoom:()=>Fjt,zoomIdentity:()=>hS,zoomTransform:()=>oF});var Er=M(()=>{tMt();BMt();$Mt();mCt();jCt();lAt();MAt();PAt();lPt();bPt();QPt();hIt();PIt();FLt();Bkt();q8t();j8t();sRt();BRt();GRt();QRt();fNt();P7t();aFt();RBt();DHt();dVt();wVt();fGt();kGt();Hjt()});var Gjt=H(qjt=>{"use strict";Object.defineProperty(qjt,"__esModule",{value:!0});var Vjt=(Er(),Ut(Mr)),Wg=Vjt,Ujt=Vjt;function HDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.select(this);for(var i in r)n.attr(i,r[i])})}function VDe(e,t){for(var r in t)e.attr(r,t[r]);return e}function UDe(e){return(typeof e=="function"?HDe:VDe)(this,e)}function qDe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Wg.select(this);for(var o in n)i.style(o,n[o],r)})}function GDe(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function WDe(e,t){return(typeof e=="function"?qDe:GDe)(this,e,t==null?"":t)}function YDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.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 XDe(e){return(typeof e=="function"?YDe:jDe)(this,e)}function $De(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.select(this).transition(e);for(var i in r)n.attr(i,r[i])})}function KDe(e,t){for(var r in t)e.attr(r,t[r]);return e}function ZDe(e){return(typeof e=="function"?$De:KDe)(this,e)}function JDe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Wg.select(this).transition(e);for(var o in n)i.style(o,n[o],r)})}function QDe(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function tOe(e,t){return(typeof e=="function"?JDe:QDe)(this,e,t==null?"":t)}Wg.selection.prototype.attrs=UDe;Wg.selection.prototype.styles=WDe;Wg.selection.prototype.properties=XDe;Ujt.transition.prototype.attrs=ZDe;Ujt.transition.prototype.styles=tOe});var Yg=H(oit=>{"use strict";Object.defineProperty(oit,"__esModule",{value:!0});var Wjt=(Er(),Ut(Mr));function eOe(e){if(e.attrs==null)if(e.nodes==null){var t=[];return e.each(function(){t.push(this)}),Wjt.selectAll(t)}else return Wjt.selectAll(e.nodes());else return e}oit.coerceExternalD3=eOe});var If=H(ait=>{"use strict";Object.defineProperty(ait,"__esModule",{value:!0});function rOe(e){return e.reduce(function(t,r){return t[r]=r,t},{})}ait.makeEnum=rOe});var jjt=H(sF=>{"use strict";Object.defineProperty(sF,"__esModule",{value:!0});var dr=(I_(),Ut(N1t)),nOe=Yg(),iOe=If(),Yjt={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};sF.EaseName=iOe.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 oOe=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=nOe.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=Yjt[t];return r==null?Yjt.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}();sF.Easing=oOe});var Xjt=H(sit=>{"use strict";Object.defineProperty(sit,"__esModule",{value:!0});var aOe=Yg(),sOe=function(){function e(){}return e.prototype.totalTime=function(t){return 0},e.prototype.animate=function(t,r){return t=aOe.coerceExternalD3(t),t.attrs(r)},e}();sit.Null=sOe});var Lf=H(lF=>{"use strict";Object.defineProperty(lF,"__esModule",{value:!0});var $jt=(de(),Ut(pe));$jt.__exportStar(jjt(),lF);$jt.__exportStar(Xjt(),lF)});var Kjt=H(lit=>{"use strict";Object.defineProperty(lit,"__esModule",{value:!0});var lOe=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}();lit.Cache=lOe});var Zjt=H(cit=>{"use strict";Object.defineProperty(cit,"__esModule",{value:!0});var cOe=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}();cit.Methods=cOe});var Jjt=H(uit=>{"use strict";Object.defineProperty(uit,"__esModule",{value:!0});var uOe=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}();uit.StringMethods=uOe});var Qjt=H(hit=>{"use strict";Object.defineProperty(hit,"__esModule",{value:!0});var hOe=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}();hit.Tokenizer=hOe});var pS=H(cF=>{"use strict";function uF(e){for(var t in e)cF.hasOwnProperty(t)||(cF[t]=e[t])}Object.defineProperty(cF,"__esModule",{value:!0});uF(Kjt());uF(Zjt());uF(Jjt());uF(Qjt())});var eXt=H(fit=>{"use strict";Object.defineProperty(fit,"__esModule",{value:!0});var tXt=pS(),fOe={textRotation:0,textShear:0,xAlign:"left",yAlign:"top"},hF=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=tXt.Methods.defaults({},fOe,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=tXt.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}();hF.XOffsetFactor={center:.5,left:0,right:1};hF.YOffsetFactor={bottom:1,center:.5,top:0};hF.SupportedRotation=[-90,0,180,90];fit.Writer=hF});var zA=H(fF=>{"use strict";function pOe(e){for(var t in e)fF.hasOwnProperty(t)||(fF[t]=e[t])}Object.defineProperty(fF,"__esModule",{value:!0});pOe(eXt())});var pit=H(pF=>{"use strict";Object.defineProperty(pF,"__esModule",{value:!0});var FA=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}();pF.HtmlUtils=FA;var dOe=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=FA.append(i.element,"span","text-tmp",i.className);a.textContent=o;var s=FA.getDimensions(a);return i.element.removeChild(a),s}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=FA.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=FA.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}();pF.HtmlContext=dOe});var iXt=H(dF=>{"use strict";Object.defineProperty(dF,"__esModule",{value:!0});var mOe=zA(),rXt=pit(),jg=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 rXt.HtmlUtils.addClasses.apply(rXt.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}();jg.SVG_NS="http://www.w3.org/2000/svg";dF.SvgUtils=jg;var nXt=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=jg.getDimensions(l);return a.removeChild(s),u}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=jg.append(s,"g","text-container",i.className);i.addTitleElement&&(jg.append(l,"title").textContent=o,l.setAttribute("title",o));var c=jg.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*mOe.Writer.XOffsetFactor[i];var s=jg.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=jg.create("text",this.className);return{containerElement:i,parentElement:t,textElement:i}},e}();nXt.AnchorMap={center:"middle",left:"start",right:"end"};dF.SvgContext=nXt});var oXt=H(dit=>{"use strict";Object.defineProperty(dit,"__esModule",{value:!0});var gOe=zA(),_Oe="#444",yOe=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=_Oe)}return e.prototype.createCanvasPen=function(t){var r=this;return{destroy:function(){t.restore()},write:function(n,i,o,a,s){a+=i*gOe.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}();dit.CanvasContext=yOe});var git=H(mF=>{"use strict";function mit(e){for(var t in e)mF.hasOwnProperty(t)||(mF[t]=e[t])}Object.defineProperty(mF,"__esModule",{value:!0});mit(iXt());mit(oXt());mit(pit())});var gF=H(_it=>{"use strict";Object.defineProperty(_it,"__esModule",{value:!0});var aXt=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}();aXt.HEIGHT_TEXT="bdpql";_it.AbstractMeasurer=aXt});var yit=H(BA=>{"use strict";var vOe=BA&&BA.__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(BA,"__esModule",{value:!0});var _F=gF(),xOe=function(e){vOe(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 _F.AbstractMeasurer.HEIGHT_TEXT+r+_F.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=_F.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}(_F.AbstractMeasurer);BA.Measurer=xOe});var vit=H(HA=>{"use strict";var bOe=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 wOe=yit(),SOe=function(e){bOe(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}(wOe.Measurer);HA.CharacterMeasurer=SOe});var xit=H(VA=>{"use strict";var MOe=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 EOe=pS(),TOe=vit(),COe=function(e){MOe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.cache=new EOe.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}(TOe.CharacterMeasurer);VA.CacheCharacterMeasurer=COe});var sXt=H(UA=>{"use strict";var AOe=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 POe=pS(),IOe=gF(),LOe=xit(),kOe=function(e){AOe(t,e);function t(r){var n=e.call(this,r)||this;return n.dimCache=new POe.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=IOe.AbstractMeasurer.HEIGHT_TEXT),this.dimCache.get(r)},t.prototype.reset=function(){this.dimCache.clear(),e.prototype.reset.call(this)},t}(LOe.CacheCharacterMeasurer);UA.CacheMeasurer=kOe});var bit=H(yF=>{"use strict";function qA(e){for(var t in e)yF.hasOwnProperty(t)||(yF[t]=e[t])}Object.defineProperty(yF,"__esModule",{value:!0});qA(gF());qA(xit());qA(sXt());qA(vit());qA(yit())});var Sit=H(wit=>{"use strict";Object.defineProperty(wit,"__esModule",{value:!0});var GA=pS(),ROe=function(){function e(){this.maxLines(1/0),this.textTrimming("ellipsis"),this.allowBreakingWords(!1),this._tokenizer=new GA.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=GA.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=GA.StringMethods.trimEnd(i.substr(0,i.length-1)),o=n.measure(i).width;return{remainingToken:GA.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+=GA.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}();wit.Wrapper=ROe});var cXt=H(WA=>{"use strict";var NOe=WA&&WA.__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(WA,"__esModule",{value:!0});var DOe=Sit(),lXt=function(e){NOe(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}(DOe.Wrapper);lXt.NO_WRAP_ITERATIONS=5;WA.SingleLineWrapper=lXt});var Mit=H(vF=>{"use strict";function uXt(e){for(var t in e)vF.hasOwnProperty(t)||(vF[t]=e[t])}Object.defineProperty(vF,"__esModule",{value:!0});uXt(cXt());uXt(Sit())});var hXt=H(Tit=>{"use strict";Object.defineProperty(Tit,"__esModule",{value:!0});var Eit=git(),OOe=bit(),zOe=Mit(),FOe=zA(),BOe=function(){function e(t){this.context=t,this.measurer=new OOe.CacheMeasurer(this.context),this.wrapper=new zOe.Wrapper,this.writer=new FOe.Writer(this.measurer,this.context,this.wrapper)}return e.svg=function(t,r,n){return new e(new Eit.SvgContext(t,r,n))},e.canvas=function(t,r,n){return new e(new Eit.CanvasContext(t,r,n))},e.html=function(t,r,n){return new e(new Eit.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}();Tit.Typesetter=BOe});var _l=H(xF=>{"use strict";function dS(e){for(var t in e)xF.hasOwnProperty(t)||(xF[t]=e[t])}Object.defineProperty(xF,"__esModule",{value:!0});dS(git());dS(bit());dS(hXt());dS(pS());dS(Mit());dS(zA())});var fXt=H(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});var HOe=(Er(),Ut(Mr)),VOe=window.Array;function UOe(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=UOe;function qOe(e){var t=HOe.set(),r=[];return e.forEach(function(n){t.has(String(n))||(t.add(String(n)),r.push(n))}),r}mS.uniq=qOe;function GOe(e){return VOe.prototype.concat.apply([],e)}mS.flatten=GOe;function WOe(e,t){for(var r=[],n=0;n<t;n++)r[n]=typeof e=="function"?e(n):e;return r}mS.createFilledArray=WOe});var mXt=H(YA=>{"use strict";Object.defineProperty(YA,"__esModule",{value:!0});var dXt=(Er(),Ut(Mr)),YOe=window.Math;function jOe(e,t){var r=pXt(e)+.05,n=pXt(t)+.05;return r>n?r/n:n/r}YA.contrast=jOe;function XOe(e,t){var r=dXt.color(e).brighter(t);return r.rgb().toString()}YA.lightenColor=XOe;function $Oe(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}YA.colorTest=$Oe;function pXt(e){var t=dXt.rgb(e),r=function(a){return a=a/255,a<=.03928?a/12.92:YOe.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 Ait=H(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Cit=(Er(),Ut(Mr)),ma=window.Math;function KOe(e,t){for(var r=t;r!=null&&r!==e;)r=r.parentNode;return r===e}ao.contains=KOe;function _Xt(e){var t;try{t=e.node().getBBox()}catch(r){t={x:0,y:0,width:0,height:0}}return t}ao.elementBBox=_Xt;function ZOe(e){if(e instanceof SVGElement)return _Xt(Cit.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=ZOe;ao.SCREEN_REFRESH_RATE_MILLISECONDS=1e3/60;function JOe(e){window.requestAnimationFrame!=null?window.requestAnimationFrame(e):setTimeout(e,ao.SCREEN_REFRESH_RATE_MILLISECONDS)}ao.requestAnimationFramePolyfill=JOe;function QOe(e){var t=e instanceof Cit.selection?e.node():e,r=window.getComputedStyle(t);return kf(r,"width")+kf(r,"padding-left")+kf(r,"padding-right")+kf(r,"border-left-width")+kf(r,"border-right-width")}ao.elementWidth=QOe;function t7e(e){var t=e instanceof Cit.selection?e.node():e,r=window.getComputedStyle(t);return kf(r,"height")+kf(r,"padding-top")+kf(r,"padding-bottom")+kf(r,"border-top-width")+kf(r,"border-bottom-width")}ao.elementHeight=t7e;var Lc="\\s",jA="(?:[-+]?[0-9]*\\.?[0-9]+)",yXt="(?:(?:"+Lc+"+,?"+Lc+"*)|(?:,"+Lc+"*))",e7e=new RegExp("translate"+Lc+"*\\("+Lc+"*("+jA+")(?:"+yXt+"("+jA+"))?"+Lc+"*\\)"),r7e=new RegExp("rotate"+Lc+"*\\("+Lc+"*("+jA+")"+Lc+"*\\)"),n7e=new RegExp("scale"+Lc+"*\\("+Lc+"*("+jA+")(?:"+yXt+"("+jA+"))?"+Lc+"*\\)");function i7e(e){var t=e7e.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=i7e;function o7e(e){var t=r7e.exec(e.attr("transform"));if(t!=null){var r=t[1];return+r}else return 0}ao.getRotate=o7e;function a7e(e){var t=n7e.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=a7e;function s7e(e,t){return!(ma.floor(e.right)<=ma.ceil(t.left)||ma.ceil(e.left)>=ma.floor(t.right)||ma.floor(e.bottom)<=ma.ceil(t.top)||ma.ceil(e.top)>=ma.floor(t.bottom))}ao.clientRectsOverlap=s7e;function l7e(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=l7e;function c7e(e,t){return ma.floor(t.left)<=ma.ceil(e.left)&&ma.floor(t.top)<=ma.ceil(e.top)&&ma.floor(e.right)<=ma.ceil(t.right)&&ma.floor(e.bottom)<=ma.ceil(t.bottom)}ao.clientRectInside=c7e;function u7e(e,t,r,n){n===void 0&&(n=.5);var i=gXt(e),o=gXt(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=u7e;function gXt(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 kf(e,t){var r=e.getPropertyValue(t),n=parseFloat(r);return n||0}function h7e(e){for(var t=[];e&&e instanceof HTMLElement;)t.push(e),e=e.parentElement;return t}ao.getHtmlElementAncestors=h7e;function f7e(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 m7e(r)}ao.getElementTransform=f7e;var p7e=/^matrix\(([^)]+)\)$/,d7e=/[, ]+/;function m7e(e){if(e==null||e==="none")return null;var t=e.match(p7e);if(t==null||t.length<2)return null;var r=t[1].split(d7e).map(function(n){return parseFloat(n)});return r.length!=6?null:r}});var Pit=H(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var wF=(Er(),Ut(Mr)),vXt=Ait(),md=window.Math,g7e=[1,0,0,1,0,0];function _7e(e,t,r){return md.min(t,r)<=e&&e<=md.max(t,r)}so.inRange=_7e;function y7e(e,t,r){return md.min(md.max(t,e),r)}so.clamp=y7e;function v7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?wF.max(e):wF.max(e,n);return o!==void 0?o:i}so.max=v7e;function x7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?wF.min(e):wF.min(e,n);return o!==void 0?o:i}so.min=x7e;function b7e(e){return e!==e}so.isNaN=b7e;function w7e(e){return typeof e=="number"&&e-e<1}so.isValidNumber=w7e;function S7e(e,t,r){if(r===void 0&&(r=1),r===0)throw new Error("step cannot be 0");for(var n=md.max(md.ceil((t-e)/r),0),i=[],o=0;o<n;++o)i[o]=e+r*o;return i}so.range=S7e;function M7e(e,t){return md.pow(t.y-e.y,2)+md.pow(t.x-e.x,2)}so.distanceSquared=M7e;function E7e(e){return e/360*md.PI*2}so.degreesToRadians=E7e;function T7e(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=T7e;function C7e(e,t,r,n,i,o,a,s){return e<=i+a&&i<=e+r&&t<=o+s&&o<=t+n}so.boundsIntersects=C7e;function A7e(e){for(var t=vXt.getHtmlElementAncestors(e),r=g7e,n=null,i=0,o=t;i<o.length;i++){var a=o[i],s=vXt.getElementTransform(a);if(s!=null){var l=a.clientWidth/2,c=a.clientHeight/2;r=bF(r,[l,c]),r=xXt(r,bXt(s)),r=bF(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=bF(r,[u,h])}return r}so.getCumulativeTransform=A7e;function xXt(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=xXt;function P7e(e,t){return[t[0],t[1],t[2],t[3],t[4]+e[0],t[5]+e[1]]}so.premultiplyTranslate=P7e;function bF(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=bF;function bXt(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=bXt;function I7e(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=I7e});var wXt=H(SF=>{"use strict";Object.defineProperty(SF,"__esModule",{value:!0});var L7e=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}();SF.SplitStrategyTrivial=L7e;var k7e=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}();SF.SplitStrategyLinear=k7e});var Lit=H(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var R7e=wXt(),N7e=5,D7e=new R7e.SplitStrategyLinear,Rf;(function(e){e[e.PASS=0]="PASS",e[e.FAIL=1]="FAIL",e[e.PASS_AND_OVERWRITE=2]="PASS_AND_OVERWRITE"})(Rf=gd.QueryPredicateResult||(gd.QueryPredicateResult={}));function MF(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,Rf.PASS_AND_OVERWRITE):s===n?Rf.PASS:Rf.FAIL:s>o?Rf.FAIL:(i=Math.min(s,i),o=Math.max(l,o),Rf.PASS)}}gd.createMinimizingNodePredicate=MF;function Iit(e,t){return function(r,n){return t(n.bounds,e)-t(r.bounds,e)}}gd.createNodeSort=Iit;var O7e=function(){function e(t,r){t===void 0&&(t=N7e),r===void 0&&(r=D7e),this.maxNodeChildren=t,this.splitStrategy=r,this.root=new EF(!0),this.size=0}return e.prototype.getRoot=function(){return this.root},e.prototype.clear=function(){this.root=new EF(!0),this.size=0},e.prototype.insert=function(t,r){for(var n=this.root;!n.leaf;)n=n.subtree(t);var i=EF.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=MF(t,Qa.distanceSquaredToNearEdge,Qa.distanceSquaredToFarEdge),n=this.queryNodes(r);return n.map(function(i){return i.value})},e.prototype.locateNearestX=function(t){var r=MF(t,Qa.absoluteDistanceToNearEdgeX,Qa.absoluteDistanceToFarEdgeX),n=this.queryNodes(r);return n.sort(Iit(t,Qa.absoluteDistanceToNearEdgeY)),n.map(function(i){return i.value})},e.prototype.locateNearestY=function(t){var r=MF(t,Qa.absoluteDistanceToNearEdgeY,Qa.absoluteDistanceToFarEdgeY),n=this.queryNodes(r);return n.sort(Iit(t,Qa.absoluteDistanceToNearEdgeX)),n.map(function(i){return i.value})},e.prototype.intersect=function(t){return this.query(function(r){return Qa.isBoundsOverlapBounds(r,t)})},e.prototype.intersectX=function(t){return this.query(function(r){return Qa.isBoundsOverlapX(r,t)})},e.prototype.intersectY=function(t){return this.query(function(r){return Qa.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)===Rf.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===Rf.PASS_AND_OVERWRITE&&(r=[]),(s===Rf.PASS||s===Rf.PASS_AND_OVERWRITE)&&(i.leaf?r.push(a):n.push(a))}return r},e}();gd.RTree=O7e;var EF=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=Qa.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=Qa.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(Qa.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}();gd.RTreeNode=EF;var Qa=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}();gd.RTreeBounds=Qa});var EXt=H(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var SXt=(Er(),Ut(Mr)),z7e=Oe(),Xg=Fe(),F7e=If();_d.IStackingOrder=F7e.makeEnum(["topdown","bottomup"]);var MXt=window.Math;function B7e(e,t,r,n){n===void 0&&(n="bottomup");var i=SXt.map(),o=SXt.map(),a=new Xg.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 Xg.Map,h=c.data(),f=h.length,p=0;p<f;p++){var d=h[p],g=t(d,p,c),_=_d.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}_d.stack=B7e;function H7e(e){var t=new Xg.Map,r=new Xg.Map;return e.forEach(function(n){n.forEach(function(i,o){var a=i.offset+i.value,s=Xg.Math.max([a,i.offset],i.offset),l=Xg.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}}_d.stackedExtents=H7e;function V7e(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(_d.normalizeKey(t(h,u,s)));n.push(f.value+f.offset)}}});var i=Xg.Math.max(n,0),o=Xg.Math.min(n,0);return[MXt.min(o,0),MXt.max(0,i)]}_d.stackedExtent=V7e;_d.normalizeKey=z7e.memoize(function(e){return String(e)})});var XA=H(TF=>{"use strict";Object.defineProperty(TF,"__esModule",{value:!0});TF.SHOW_WARNINGS=!0;TF.ADD_TITLE_ELEMENTS=!0});var CF=H(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});var U7e=XA();function TXt(e){!U7e.SHOW_WARNINGS||console.warn(e)}gS.warn=TXt;function CXt(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=CXt;function q7e(e,t,r){var n=null,i=[],o=function(){t.apply(r,i)};return function(){i=Array.prototype.slice.call(arguments),clearTimeout(n),n=CXt(o,e)}}gS.debounce=q7e;function G7e(e,t,r){r===void 0&&(r=""),TXt("Method "+e+" has been deprecated in version "+t+". Please refer to the release notes. "+r)}gS.deprecated=G7e});var AXt=H(kit=>{"use strict";Object.defineProperty(kit,"__esModule",{value:!0});var W7e=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}();kit.Bucket=W7e});var Nit=H(Rit=>{"use strict";Object.defineProperty(Rit,"__esModule",{value:!0});var Y7e=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}();Rit.Set=Y7e});var PXt=H(Dit=>{"use strict";Object.defineProperty(Dit,"__esModule",{value:!0});var j7e=(de(),Ut(pe)),X7e=Nit(),$7e=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}(X7e.Set);Dit.CallbackSet=$7e});var IXt=H(Oit=>{"use strict";Object.defineProperty(Oit,"__esModule",{value:!0});var $g=Lit(),K7e=function(){function e(){this._entities=[],this._rtree=new $g.RTree}return e.prototype.addAll=function(t,r,n){if(this._entities=this._entities.concat(t),n!==void 0)for(var i=$g.RTreeBounds.bounds(n),o=0;o<t.length;o++){var a=t[o],s=$g.RTreeBounds.entityBounds(r(a));$g.RTreeBounds.isBoundsOverlapBounds(i,s)&&this._rtree.insert(s,a)}else for(var o=0;o<t.length;o++){var a=t[o],s=$g.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($g.RTreeBounds.entityBounds(t))},e.prototype.entitiesInXBounds=function(t){return this._rtree.intersectX($g.RTreeBounds.entityBounds(t))},e.prototype.entitiesInYBounds=function(t){return this._rtree.intersectY($g.RTreeBounds.entityBounds(t))},e.prototype.entities=function(){return this._entities},e}();Oit.EntityStore=K7e});var LXt=H(zit=>{"use strict";Object.defineProperty(zit,"__esModule",{value:!0});var Z7e=Pit(),J7e=function(){function e(){typeof window.Map=="function"?this._es6Map=new window.Map:this._keyValuePairs=[]}return e.prototype.set=function(t,r){if(Z7e.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}();zit.Map=J7e});var kXt=H(Fit=>{"use strict";Object.defineProperty(Fit,"__esModule",{value:!0});function Q7e(){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}Fit.assign=Q7e});var DXt=H(AF=>{"use strict";Object.defineProperty(AF,"__esModule",{value:!0});var Bit=Fe(),RXt="__Plottable_ClientTranslator";function tze(e){var t=e.root().rootElement().node(),r=t[RXt];return r==null&&(r=new NXt(t),t[RXt]=r),r}AF.getTranslator=tze;var NXt=function(){function e(t){this._rootElement=t}return e.prototype.computePosition=function(t,r){var n={x:t,y:r},i=Bit.Math.getCumulativeTransform(this._rootElement);if(i==null)return n;var o=Bit.Math.applyTransform(i,n);return o},e.isEventInside=function(t,r){return Bit.DOM.contains(t.root().rootElement().node(),r.target)},e}();AF.Translator=NXt});var Fe=H(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var Kg=(de(),Ut(pe)),eze=fXt();qo.Array=eze;var rze=mXt();qo.Color=rze;var nze=Ait();qo.DOM=nze;var ize=Pit();qo.Math=ize;var oze=Lit();qo.RTree=oze;var aze=EXt();qo.Stacking=aze;var sze=CF();qo.Window=sze;Kg.__exportStar(AXt(),qo);Kg.__exportStar(PXt(),qo);Kg.__exportStar(Yg(),qo);Kg.__exportStar(IXt(),qo);Kg.__exportStar(LXt(),qo);Kg.__exportStar(kXt(),qo);Kg.__exportStar(Nit(),qo);Kg.__exportStar(DXt(),qo)});var Vit=H($A=>{"use strict";Object.defineProperty($A,"__esModule",{value:!0});var OXt=Fe(),Hit=PF(),lze=function(){function e(){}return e.prototype.render=function(){Hit.flush()},e}();$A.Immediate=lze;var cze=function(){function e(){}return e.prototype.render=function(){OXt.DOM.requestAnimationFramePolyfill(Hit.flush)},e}();$A.AnimationFrame=cze;var uze=function(){function e(){this._timeoutMsec=OXt.DOM.SCREEN_REFRESH_RATE_MILLISECONDS}return e.prototype.render=function(){setTimeout(Hit.flush,this._timeoutMsec)},e}();$A.Timeout=uze});var PF=H(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var _S=Fe(),hze=If(),IF=Vit(),ZA=new _S.Set,Uit=new _S.Set,LF=!1,qit=!1;zu.Policy=hze.makeEnum(["immediate","animationFrame","timeout"]);var KA=new IF.AnimationFrame;function fze(e){if(e==null)return KA;switch(e){case zu.Policy.immediate:KA=new IF.Immediate;break;case zu.Policy.animationFrame:KA=new IF.AnimationFrame;break;case zu.Policy.timeout:KA=new IF.Timeout;break;default:_S.Window.warn("Unrecognized renderPolicy: "+e)}}zu.renderPolicy=fze;function pze(e){qit&&_S.Window.warn("Registered to render while other components are flushing: request may be ignored"),ZA.add(e),FXt()}zu.registerToRender=pze;function zXt(e){Uit.add(e),ZA.add(e),FXt()}zu.registerToComputeLayoutAndRender=zXt;function dze(e){zXt(e)}zu.registerToComputeLayout=dze;function FXt(){LF||(LF=!0,KA.render())}function mze(){if(LF){Uit.forEach(function(t){return t.computeLayout()}),ZA.forEach(function(t){return t.render()}),qit=!0;var e=new _S.Set;ZA.forEach(function(t){try{t.renderImmediately()}catch(r){window.setTimeout(function(){throw r},0),e.add(t)}}),Uit=new _S.Set,ZA=e,LF=!1,qit=!1}}zu.flush=mze});var kc=H(JA=>{"use strict";Object.defineProperty(JA,"__esModule",{value:!0});var BXt=(Er(),Ut(Mr)),kF=PF(),yS=Fe(),gze=Oe(),HXt=Yg(),VXt=If();JA.XAlignment=VXt.makeEnum(["left","center","right"]);JA.YAlignment=VXt.makeEnum(["top","center","bottom"]);var _ze=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=HXt.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&&kF.registerToRender(this),this},e.prototype.renderLowPriority=function(){return this.render()},e.prototype._scheduleComputeLayout=function(){this._isAnchored&&this._isSetup&&kF.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"||gze.isElement(t)?r=BXt.select(t):r=HXt.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 kF.registerToComputeLayoutAndRender(this),kF.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}();JA.Component=_ze});var Bu=H(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var vS=(Er(),Ut(Mr)),yze=!1;function vze(e,t,r){e===void 0&&(e=2),t===void 0&&(t="$"),r===void 0&&(r=!0);var n=Git(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=vze;function Git(e){return e===void 0&&(e=3),RF(e),function(t){return t.toFixed(e)}}Fu.fixed=Git;function xze(e){return e===void 0&&(e=3),RF(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=xze;function bze(){return function(e){return String(e)}}Fu.identity=bze;function wze(e){e===void 0&&(e=0);var t=Git(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=wze;function Sze(e){return e===void 0&&(e=3),RF(e),function(t){return vS.format("."+e+"s")(t)}}Fu.siSuffix=Sze;function Mze(e){e===void 0&&(e=3),RF(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=Mze;function Eze(){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=Eze;function Tze(e,t){return t===void 0&&(t=yze),t?vS.utcFormat(e):vS.timeFormat(e)}Fu.time=Tze;function RF(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 QA=H(NF=>{"use strict";Object.defineProperty(NF,"__esModule",{value:!0});var Cze=(de(),Ut(pe)),yd=(Er(),Ut(Mr)),Wit=_l(),Aze=kc(),UXt=Bu(),xS=Fe(),Pze=If();NF.AxisOrientation=Pze.makeEnum(["bottom","left","right","top"]);var Ize=function(e){Cze.__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(UXt.identity()),i._rescaleCallback=function(o){return i._rescale()},i._scale.onUpdate(i._rescaleCallback),i._annotatedTicks=[],i._annotationFormatter=UXt.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:yd.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 Wit.SvgContext(r.node());this._annotationMeasurer=new Wit.CacheMeasurer(n),this._annotationWriter=new Wit.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()),yd.select(i.nodes()[0]).classed(t.END_TICK_MARK_CLASS,!0).attrs(this._generateTickMarkAttrHash(!0)),yd.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},yd.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(){yd.select(this).style("visibility","inherit")})},t.prototype._showAllTickLabels=function(){this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS).each(function(){yd.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)||yd.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=yd.select(this).style("visibility");return s==="inherit"||s==="visible"}),i=n.data();r.each(function(o,a){i.indexOf(o)===-1&&yd.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}(Aze.Component);NF.Axis=Ize});var GXt=H(Xit=>{"use strict";Object.defineProperty(Xit,"__esModule",{value:!0});var Lze=(de(),Ut(pe)),Yit=(Er(),Ut(Mr)),DF=_l(),kze=kc(),qXt=Fe(),jit=QA(),Rze=function(e){Lze.__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 DF.Wrapper;return this._tickLabelMaxLines!=null&&r.maxLines(this._tickLabelMaxLines),r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_writer",{get:function(){return new DF.Writer(this._measurer,this._typesetterContext,this._wrapper)},enumerable:!0,configurable:!0}),t.prototype._setup=function(){e.prototype._setup.call(this),this._typesetterContext=new DF.SvgContext(this._tickLabelContainer.node()),this._measurer=new DF.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 kze.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=Yit.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?Yit.sum:qXt.Math.max,d=this.isHorizontal()&&this._tickLabelAngle===0?qXt.Math.max:Yit.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("."+jit.Axis.TICK_LABEL_CLASS).data(o),u=c.enter().append("g").classed(jit.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}(jit.Axis);Xit.Category=Rze});var WXt=H(Kit=>{"use strict";Object.defineProperty(Kit,"__esModule",{value:!0});var Nze=(de(),Ut(pe)),OF=(Er(),Ut(Mr)),$it=_l(),Dze=Bu(),bS=Fe(),wS=QA(),Oze=function(e){Nze.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i._tickLabelPositioning="center",i._usesTextWidthApproximation=!1,i.formatter(Dze.general()),i}return t.prototype._setup=function(){e.prototype._setup.call(this);var r=new $it.SvgContext(this._tickLabelContainer.node(),wS.Axis.TICK_LABEL_CLASS);this._measurer=new $it.CacheMeasurer(r),this._wrapper=new $it.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)||OF.select(i).style("visibility","hidden");var o=n.nodes()[n.size()-1];bS.DOM.clientRectInside(o.getBoundingClientRect(),r)||OF.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=OF.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=OF.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);Kit.Numeric=Oze});var YXt=H(zF=>{"use strict";Object.defineProperty(zF,"__esModule",{value:!0});var zze=Fe();function Fze(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=zze.Math.range(0,a).map(function(u){return o+u*e}),c=i%e===0?[]:[i];return s.concat(l).concat(c)}}zF.intervalTickGenerator=Fze;function Bze(){return function(e){var t=e.defaultTicks();return t.filter(function(r,n){return r%1===0||n===0||n===t.length-1})}}zF.integerTickGenerator=Bze});var t4=H(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});function Jit(e,t,r){return r-(r-e)*t}I1.zoomOut=Jit;function Zit(e,t,r){return(e*t-r)/(t-1)}function Hze(e,t,r,n,i,o,a){return t=jXt(e,t,n,i),XXt(e,t,r,o,a)}I1.constrainedZoom=Hze;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)}I1.constrainZoomExtents=jXt;function XXt(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=$Xt(e),a=Uze(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=Jit(p,t,r),g=e.scaleTransformation(n),_=e.scaleTransformation(u),y=Jit(_,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=Zit(p,S,f);return{centerPoint:C,zoomAmount:S}}else return{centerPoint:r,zoomAmount:S}}else return d>f!=o?{centerPoint:Zit(p,t,f),zoomAmount:t}:y<g!=o?{centerPoint:Zit(_,t,g),zoomAmount:t}:{centerPoint:r,zoomAmount:t}}I1.constrainZoomValues=XXt;function Vze(e,t,r,n){var i=e.getTransformationDomain(),o=i[0],a=i[1],s=$Xt(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}I1.constrainedTranslation=Vze;function $Xt(e){var t=e.range();return t[1]<t[0]}function Uze(e){var t=e.getTransformationDomain();return t[1]<t[0]}});var L1=H(Qit=>{"use strict";Object.defineProperty(Qit,"__esModule",{value:!0});var KXt=Fe(),qze=function(){function e(){this._autoDomainAutomatically=!0,this._domainModificationInProgress=!1,this._updateId=0,this._callbacks=new KXt.CallbackSet,this._includedValuesProviders=new KXt.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}();Qit.Scale=qze});var rot=H(eot=>{"use strict";Object.defineProperty(eot,"__esModule",{value:!0});var Gze=(de(),Ut(pe)),FF=(Er(),Ut(Mr)),Wze=t4(),ZXt=Fe(),Yze=L1(),tot=[0,1],jze=function(e){Gze.__extends(t,e);function t(){var r=e.call(this)||this;r._range=[0,1],r._d3Scale=FF.scaleBand(),r._d3Scale.range(tot),r._d3TransformationScale=FF.scaleLinear(),r._d3TransformationScale.domain(tot);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 ZXt.Array.uniq(r)},t.prototype._getExtent=function(){return ZXt.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=FF.bisect(l,o),u=FF.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(Wze.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 tot},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}(Yze.Scale);eot.Category=jze});var JXt=H(not=>{"use strict";Object.defineProperty(not,"__esModule",{value:!0});var Xze=(de(),Ut(pe)),Nf=(Er(),Ut(Mr)),SS=Fe(),$ze=L1(),Kze=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}(),Zze=function(e){Xze.__extends(t,e);function t(r){var n=e.call(this)||this;n._rangeLength=1,n._tracker=new Kze;var i;switch(r){case null:case void 0:t._plottableColorCache==null&&(t._plottableColorCache=t._getPlottableColors()),i=Nf.scaleOrdinal().range(t._plottableColorCache);break;case"Category10":case"category10":case"10":i=Nf.scaleOrdinal(Nf.schemeCategory10);break;case"Category20":case"category20":case"20":i=Nf.scaleOrdinal(Nf.schemeCategory20);break;case"Category20b":case"category20b":case"20b":i=Nf.scaleOrdinal(Nf.schemeCategory20b);break;case"Category20c":case"category20c":case"20c":i=Nf.scaleOrdinal(Nf.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=Nf.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}($ze.Scale);not.Color=Zze});var t$t=H(iot=>{"use strict";Object.defineProperty(iot,"__esModule",{value:!0});var Jze=(de(),Ut(pe)),MS=(Er(),Ut(Mr)),QXt=Fe(),Qze=L1(),tFe=function(e){Jze.__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([QXt.Math.min(r,0),QXt.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}(Qze.Scale);iot.InterpolatedColor=tFe});var vd=H(oot=>{"use strict";Object.defineProperty(oot,"__esModule",{value:!0});var eFe=(de(),Ut(pe)),rFe=(Er(),Ut(Mr)),nFe=t4(),ES=Fe(),iFe=L1(),oFe=function(e){eFe.__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=rFe.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(nFe.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}(iFe.Scale);oot.QuantitativeScale=oFe});var e$t=H(aot=>{"use strict";Object.defineProperty(aot,"__esModule",{value:!0});var aFe=(de(),Ut(pe)),sFe=(Er(),Ut(Mr)),lFe=vd(),cFe=function(e){aFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=sFe.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}(lFe.QuantitativeScale);aot.Linear=cFe});var r$t=H(sot=>{"use strict";Object.defineProperty(sot,"__esModule",{value:!0});var uFe=(de(),Ut(pe)),hFe=(Er(),Ut(Mr)),fFe=vd(),pFe=function(e){uFe.__extends(t,e);function t(r){r===void 0&&(r=10);var n=e.call(this)||this;return n._d3Scale=hFe.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}(fFe.QuantitativeScale);sot.Log=pFe});var n$t=H(cot=>{"use strict";Object.defineProperty(cot,"__esModule",{value:!0});var dFe=(de(),Ut(pe)),e4=(Er(),Ut(Mr)),TS=Fe(),lot=ks(),mFe=vd(),gFe=function(e){dFe.__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),_=e4.scaleLinear().domain([d,g]).ticks(n._howManyTicks(d,g)),y=f.concat(_).concat(p);return y.length<=1&&(y=e4.scaleLinear().domain([a,s]).ticks(lot.ModifiedLog._DEFAULT_NUM_TICKS)),y},n._d3Scale=e4.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=e4.range(s,a,-Math.ceil((s-a)/o)),c=e4.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*lot.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(lot.ModifiedLog._DEFAULT_NUM_TICKS)},t}(mFe.QuantitativeScale);cot.ModifiedLog=gFe});var i$t=H(uot=>{"use strict";Object.defineProperty(uot,"__esModule",{value:!0});var _Fe=(de(),Ut(pe)),ga=(Er(),Ut(Mr)),k1=BF(),yFe=vd(),vFe=function(e){_Fe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=ga.scaleTime(),r.autoDomain(),r}return t.prototype.tickInterval=function(r,n,i){n===void 0&&(n=1),i===void 0&&(i=!1);var o=ga.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 k1.TimeInterval.second:return n?ga.utcSecond:ga.timeSecond;case k1.TimeInterval.minute:return n?ga.utcMinute:ga.timeMinute;case k1.TimeInterval.hour:return n?ga.utcHour:ga.timeHour;case k1.TimeInterval.day:return n?ga.utcDay:ga.timeDay;case k1.TimeInterval.week:return n?ga.utcWeek:ga.timeWeek;case k1.TimeInterval.month:return n?ga.utcMonth:ga.timeMonth;case k1.TimeInterval.year:return n?ga.utcYear:ga.timeYear;default:throw Error("TimeInterval specified does not exist: "+r)}},t}(yFe.QuantitativeScale);uot.Time=vFe});var ks=H(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var R1=(de(),Ut(pe)),xFe=YXt();Hu.TickGenerators=xFe;R1.__exportStar(rot(),Hu);R1.__exportStar(JXt(),Hu);R1.__exportStar(t$t(),Hu);R1.__exportStar(e$t(),Hu);R1.__exportStar(r$t(),Hu);R1.__exportStar(n$t(),Hu);R1.__exportStar(i$t(),Hu);var bFe=rot(),wFe=vd();function SFe(e){return e instanceof wFe.QuantitativeScale||e instanceof bFe.Category}Hu.isTransformable=SFe});var BF=H(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var MFe=(de(),Ut(pe)),Vu=(Er(),Ut(Mr)),o$t=_l(),a$t=Bu(),EFe=ks(),r4=Fe(),hot=If(),ts=QA();Se.TimeInterval=hot.makeEnum(["second","minute","hour","day","week","month","year"]);Se.TimeAxisOrientation=hot.makeEnum(["top","bottom"]);Se.TierLabelPosition=hot.makeEnum(["between","center"]);var TFe=function(e){MFe.__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(a$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=r4.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&&(r4.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=EFe.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(ts.Axis.TICK_LABEL_CLASS+"-container",!0)),this._tierMarkContainers.push(n.append("g").classed(ts.Axis.TICK_MARK_CLASS+"-container",!0)),this._tierBaselines.push(n.append("line").classed("baseline",!0))}var i=new o$t.SvgContext(this._tierLabelContainers[0].node());this._measurer=new o$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("."+ts.Axis.TICK_LABEL_CLASS).remove(),this._tierMarkContainers[r].selectAll("."+ts.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("."+ts.Axis.TICK_LABEL_CLASS).data(s,function(g){return String(g.valueOf())}),c=l.enter().append("g").classed(ts.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("."+ts.Axis.TICK_MARK_CLASS).data(r),o=i.enter().append("line").classed(ts.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(ts.Axis.END_TICK_MARK_CLASS,!0),Vu.select(o.nodes()[o.size()-1]).classed(ts.Axis.END_TICK_MARK_CLASS,!0),i.exit().remove()},t.prototype._renderLabellessTickMarks=function(r){var n=this._tickMarkContainer.selectAll("."+ts.Axis.TICK_MARK_CLASS).data(r),i=n.enter().append("line").classed(ts.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("."+ts.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("."+ts.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&&r4.DOM.clientRectsOverlap(f,c),y=d!=null&&r4.DOM.clientRectsOverlap(f,d),x=g!=null&&r4.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=(xd={},xd[Se.TimeInterval.second]=0,xd[Se.TimeInterval.minute]=1,xd[Se.TimeInterval.hour]=2,xd[Se.TimeInterval.day]=3,xd[Se.TimeInterval.week]=4,xd[Se.TimeInterval.month]=5,xd[Se.TimeInterval.year]=6,xd),t._DEFAULT_TIME_AXIS_CONFIGURATIONS=function(r){var n=function(i){return a$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}(ts.Axis);Se.Time=TFe;var xd});var s$t=H(n4=>{"use strict";Object.defineProperty(n4,"__esModule",{value:!0});var fot=(de(),Ut(pe));fot.__exportStar(GXt(),n4);fot.__exportStar(WXt(),n4);fot.__exportStar(BF(),n4)});var i4=H(pot=>{"use strict";Object.defineProperty(pot,"__esModule",{value:!0});var CFe=Fe(),AFe=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 CFe.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}();pot.Dispatcher=AFe});var l$t=H(dot=>{"use strict";Object.defineProperty(dot,"__esModule",{value:!0});var PFe=(de(),Ut(pe)),IFe=i4(),LFe=function(e){PFe.__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}(IFe.Dispatcher);dot.Key=LFe});var u$t=H(mot=>{"use strict";Object.defineProperty(mot,"__esModule",{value:!0});var kFe=(de(),Ut(pe)),c$t=Fe(),RFe=i4(),NFe=function(e){kFe.__extends(t,e);function t(r){var n=e.call(this)||this;n._lastMousePosition={x:-1,y:-1},n._translator=c$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 c$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}(RFe.Dispatcher);mot.Mouse=NFe});var f$t=H(got=>{"use strict";Object.defineProperty(got,"__esModule",{value:!0});var DFe=(de(),Ut(pe)),h$t=Fe(),OFe=i4(),zFe=function(e){DFe.__extends(t,e);function t(r){var n=e.call(this)||this;return n._translator=h$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 h$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}(OFe.Dispatcher);got.Touch=zFe});var N1=H(o4=>{"use strict";Object.defineProperty(o4,"__esModule",{value:!0});var _ot=(de(),Ut(pe));_ot.__exportStar(l$t(),o4);_ot.__exportStar(u$t(),o4);_ot.__exportStar(f$t(),o4)});var D1=H(yot=>{"use strict";Object.defineProperty(yot,"__esModule",{value:!0});var FFe=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}();yot.Interaction=FFe});var m$t=H(vot=>{"use strict";Object.defineProperty(vot,"__esModule",{value:!0});var BFe=(de(),Ut(pe)),p$t=N1(),d$t=Fe(),HFe=D1(),VFe=function(e){BFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._clickedDown=!1,r._doubleClicking=!1,r._onClickCallbacks=new d$t.CallbackSet,r._onDoubleClickCallbacks=new d$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=p$t.Mouse.getDispatcher(r),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._mouseDispatcher.onDblClick(this._dblClickCallback),this._touchDispatcher=p$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}(HFe.Interaction);vot.Click=VFe});var _$t=H(xot=>{"use strict";Object.defineProperty(xot,"__esModule",{value:!0});var UFe=(de(),Ut(pe)),g$t=N1(),a4=Fe(),qFe=D1(),GFe=function(e){UFe.__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 a4.CallbackSet,n._dragCallbacks=new a4.CallbackSet,n._dragEndCallbacks=new a4.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=g$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._touchDispatcher=g$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:a4.Math.clamp(n.x,0,this._componentAttachedTo.width()),y:a4.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}(qFe.Interaction);xot.Drag=GFe});var Sot=H(wot=>{"use strict";Object.defineProperty(wot,"__esModule",{value:!0});var WFe=(de(),Ut(pe)),y$t=N1(),bot=Fe(),YFe=D1(),jFe=function(e){WFe.__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 bot.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=y$t.Mouse.getDispatcher(this._componentAttachedTo),this._positionDispatcher.onMouseMove(this._mouseMoveCallback),this._keyDispatcher=y$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 bot.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 bot.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}(YFe.Interaction);wot.Key=jFe});var w$t=H(Mot=>{"use strict";Object.defineProperty(Mot,"__esModule",{value:!0});var XFe=(de(),Ut(pe)),$Fe=(Er(),Ut(Mr)),v$t=N1(),x$t=ks(),yl=Fe(),KFe=s4(),ZFe=D1(),b$t=t4(),JFe=function(e){XFe.__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 yl.CallbackSet,i._zoomEndCallbacks=new yl.CallbackSet,i._panZoomUpdateCallbacks=new yl.CallbackSet,i._xScales=new yl.Set,i._yScales=new yl.Set,i._dragInteraction=new KFe.Drag,i._setupDragInteraction(),i._touchIds=$Fe.map(),i._minDomainExtents=new yl.Map,i._maxDomainExtents=new yl.Map,i._minDomainValues=new yl.Map,i._maxDomainValues=new yl.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=v$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onWheel(this._wheelCallback),this._touchDispatcher=v$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 b$t.constrainedZoom(r,n,i,this.minDomainExtent(r),this.maxDomainExtent(r),this.minDomainValue(r),this.maxDomainValue(r))},t.prototype._constrainedTranslation=function(r,n){return b$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 x$t.Linear)&&!(r instanceof x$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 yl.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 yl.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)&&yl.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)&&yl.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}(ZFe.Interaction);Mot.PanZoom=JFe});var M$t=H(Tot=>{"use strict";Object.defineProperty(Tot,"__esModule",{value:!0});var QFe=(de(),Ut(pe)),S$t=N1(),Eot=Fe(),tBe=D1(),eBe=function(e){QFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._overComponent=!1,r._pointerEnterCallbacks=new Eot.CallbackSet,r._pointerMoveCallbacks=new Eot.CallbackSet,r._pointerExitCallbacks=new Eot.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=S$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._touchDispatcher=S$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}(tBe.Interaction);Tot.Pointer=eBe});var s4=H(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var l4=(de(),Ut(pe));l4.__exportStar(m$t(),Zg);l4.__exportStar(_$t(),Zg);l4.__exportStar(Sot(),Zg);l4.__exportStar(w$t(),Zg);l4.__exportStar(M$t(),Zg);var rBe=t4();Zg.zoomOut=rBe.zoomOut});var Cot=H(c4=>{"use strict";Object.defineProperty(c4,"__esModule",{value:!0});var nBe=(de(),Ut(pe)),HF=Fe(),iBe=kc(),es;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(es=c4.PropertyMode||(c4.PropertyMode={}));var oBe=function(e){nBe.__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=es.PIXEL,r._yBoundsMode=es.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=es.PIXEL,this._yBoundsMode=es.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===es.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===es.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===es.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===es.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(!(HF.Math.isValidNumber(n)&&HF.Math.isValidNumber(i)&&HF.Math.isValidNumber(o)&&HF.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=es.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=es.VALUE,this._yScale.onUpdate(this._adjustBoundsCallback),this.render(),this)},t.prototype.xExtent=function(r){return r==null?this._getXExtent():(this._setXExtent(r),this._xBoundsMode=es.VALUE,this.render(),this)},t.prototype._getXExtent=function(){return this._xBoundsMode===es.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=es.VALUE,this.render(),this)},t.prototype._getYExtent=function(){return this._yBoundsMode===es.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}(iBe.Component);c4.SelectionBoxLayer=oBe});var UF=H(Pot=>{"use strict";Object.defineProperty(Pot,"__esModule",{value:!0});var aBe=(de(),Ut(pe)),sBe=s4(),Aot=Fe(),lBe=Yg(),VF=Iot(),cBe=Cot(),uBe=function(e){aBe.__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 sBe.Drag,r._setUpCallbacks(),r._dragInteraction.attachTo(r),r._dragStartCallbacks=new Aot.CallbackSet,r._dragCallbacks=new Aot.CallbackSet,r._dragEndCallbacks=new Aot.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===VF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(f.x),r.xScale().invert(f.x)]),r._yBoundsMode===VF.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===VF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(i.x),r.xScale().invert(o.x)]),r._yBoundsMode===VF.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=lBe.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}(cBe.SelectionBoxLayer);Pot.DragBoxLayer=uBe});var kot=H(Lot=>{"use strict";Object.defineProperty(Lot,"__esModule",{value:!0});var hBe=(de(),Ut(pe)),fBe=Fe(),pBe=kc(),O1;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(O1||(O1={}));var dBe=function(e){hBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._mode=O1.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===O1.VALUE&&this.value()!=null?this._pixelPosition=this.scale().scale(this.value()):this._mode===O1.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=O1.VALUE,this._syncPixelPositionAndValue(),this.render(),this)},t.prototype.pixelPosition=function(r){if(r==null)return this._pixelPosition;if(!fBe.Math.isValidNumber(r))throw new Error("pixelPosition must be a finite number");return this._pixelPosition=r,this._mode=O1.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}(pBe.Component);Lot.GuideLineLayer=dBe});var E$t=H(Not=>{"use strict";Object.defineProperty(Not,"__esModule",{value:!0});var mBe=(de(),Ut(pe)),gBe=kot(),_Be=s4(),Rot=Fe(),yBe=function(e){mBe.__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 _Be.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 Rot.CallbackSet,n._dragCallbacks=new Rot.CallbackSet,n._dragEndCallbacks=new Rot.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}(gBe.GuideLineLayer);Not.DragLineLayer=yBe});var T$t=H(Dot=>{"use strict";Object.defineProperty(Dot,"__esModule",{value:!0});var vBe=(de(),Ut(pe)),xBe=kc();function qF(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 bBe=function(e){vBe.__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",qF(this._xScale,r,this._xScale.ticks())).attr("y1",0).attr("x2",qF(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",qF(this._yScale,r,this._yScale.ticks())).attr("x2",this.width()).attr("y2",qF(this._yScale,r,this._yScale.ticks())).classed("betweenline",r).classed("zeroline",function(a){return a===0}),i.exit().remove()}},t}(xBe.Component);Dot.Gridlines=bBe});var GF=H(Oot=>{"use strict";Object.defineProperty(Oot,"__esModule",{value:!0});var wBe=(de(),Ut(pe)),SBe=Yg(),MBe=kc(),EBe=function(e){wBe.__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=SBe.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}(MBe.Component);Oot.ComponentContainer=EBe});var Fot=H(zot=>{"use strict";Object.defineProperty(zot,"__esModule",{value:!0});var TBe=(de(),Ut(pe)),C$t=Fe(),CBe=GF(),ABe=function(e){TBe.__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:C$t.Math.max(i,function(o){return o.minWidth},0),minHeight:C$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}(CBe.ComponentContainer);zot.Group=ABe});var A$t=H(Bot=>{"use strict";Object.defineProperty(Bot,"__esModule",{value:!0});var PBe=(de(),Ut(pe)),WF=_l(),IBe=XA(),LBe=Bu(),kBe=Fe(),RBe=kc(),NBe=function(e){PBe.__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=LBe.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 WF.SvgContext(this.content().node());this._measurer=new WF.Measurer(r),this._wrapper=new WF.Wrapper,this._writer=new WF.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=kBe.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"}),IBe.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}(RBe.Component);Bot.InterpolatedColorLegend=NBe});var Uot=H(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});var Hot=(de(),Ut(pe)),YF=_l(),DBe=kc(),Vot=function(e){Hot.__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 YF.SvgContext(this._textContainer.node());this._measurer=new YF.CacheMeasurer(r),this._wrapper=new YF.Wrapper,this._writer=new YF.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}(DBe.Component);u4.Label=Vot;var OBe=function(e){Hot.__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}(Vot);u4.TitleLabel=OBe;var zBe=function(e){Hot.__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}(Vot);u4.AxisLabel=zBe});var jF=H(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var Rs=(Er(),Ut(Mr));function FBe(){return function(e){return Rs.symbol().type(Rs.symbolCircle).size(Math.PI*Math.pow(e/2,2))}}bd.circle=FBe;function BBe(){return function(e){return Rs.symbol().type(Rs.symbolSquare).size(Math.pow(e,2))}}bd.square=BBe;function HBe(){return function(e){return Rs.symbol().type(Rs.symbolCross).size(5/9*Math.pow(e,2))}}bd.cross=HBe;function VBe(){return function(e){return Rs.symbol().type(Rs.symbolDiamond).size(Math.tan(Math.PI/6)*Math.pow(e,2)/2)}}bd.diamond=VBe;function UBe(){return function(e){return Rs.symbol().type(Rs.symbolTriangle).size(Math.sqrt(3)*Math.pow(e/2,2))}}bd.triangle=UBe;var qBe=.8908130915292852;function GBe(){return function(e){return Rs.symbol().type(Rs.symbolStar).size(qBe*Math.pow(e/2,2))}}bd.star=GBe;var WBe=(1/Math.sqrt(12)/2+1)*3;function YBe(){return function(e){return Rs.symbol().type(Rs.symbolWye).size(WBe*Math.pow(e/2.4,2))}}bd.wye=YBe});var P$t=H(Got=>{"use strict";Object.defineProperty(Got,"__esModule",{value:!0});var jBe=(de(),Ut(pe)),z1=(Er(),Ut(Mr)),XF=_l(),XBe=XA(),$Be=Bu(),KBe=jF(),Jg=Fe(),ZBe=kc(),qot=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 Jg.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}(),JBe=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(Jg.Math.max(this.rows.map(function(t){return t.getWidth()}),0)+this.padding*2,this.maxWidth)},e}(),QBe=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=$Be.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 KBe.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 XF.SvgContext(r.node(),null,XBe.ADD_TITLE_ELEMENTS);this._measurer=new XF.CacheMeasurer(i),this._wrapper=new XF.Wrapper().maxLines(this.maxLinesPerEntry()),this._writer=new XF.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 JBe(r,n,this._padding),s=this._colorScale.domain().slice().sort(function(c,u){return i._comparator(i._formatter(c),i._formatter(u))}),l=new qot;return a.addRow(l),l.bottomPadding=this._rowBottomPadding,s.forEach(function(c,u){l.columns.length/2===i.maxEntriesPerRow()&&(l=new qot,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 qot,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(Jg.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=Jg.Math.within(r,l);return c?a.columns.reduce(function(u,h,f){var p=i.getColumnBounds(s,f),d=Jg.Math.within(r,p);if(d){var g=n.content().selectAll("."+t.LEGEND_ROW_CLASS).nodes()[s],_=z1.select(g).selectAll("."+t.LEGEND_ENTRY_CLASS).nodes()[Math.floor(f/2)],y=z1.select(_).select("."+t.LEGEND_SYMBOL_CLASS),x=Jg.DOM.getTranslateValues(z1.select(g)),b=Jg.DOM.getTranslateValues(y);return[{bounds:Jg.DOM.elementBBox(z1.select(g)),datum:h.data.name,position:{x:x[0]+b[0],y:x[1]+b[1]},selection:z1.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=z1.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=z1.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}(ZBe.Component);Got.Legend=QBe});var Wot=H($F=>{"use strict";Object.defineProperty($F,"__esModule",{value:!0});var tHe;(function(e){e.MAIN="main",e.RESET="reset"})(tHe=$F.Animator||($F.Animator={}))});var L$t=H((Gqn,I$t)=>{"use strict";I$t.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var N$t=H((Wqn,R$t)=>{"use strict";var eHe=L$t();function k$t(e){return eHe(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}R$t.exports=function(t){var r,n;return!(k$t(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,k$t(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)}});var jot=H(Yot=>{"use strict";Object.defineProperty(Yot,"__esModule",{value:!0});var rHe=Fe(),D$t=0,nHe=function(){function e(t,r){t===void 0&&(t=[]),r===void 0&&(r={}),this._updateId=D$t++,this._data=t,this._metadata=r,this._callbacks=new rHe.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=D$t++,this._callbacks.callCallbacks(this)},e}();Yot.Dataset=nHe});var Kot=H(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Xot=(de(),Ut(pe)),iHe=N$t(),oHe=jot(),aHe=L1();function $ot(e){return e instanceof f4?e:e instanceof Date?h4(e.valueOf()):e instanceof aHe.Scale?O$t(e):e instanceof oHe.Dataset?z$t(e):iHe(e)?KF(e):Array.isArray(e)?F$t(e):h4(e)}Rc.sign=$ot;function O$t(e){var t={domain:e.domain(),range:e.range(),updateId:e.updateId(),ref:h4(e)};return KF(t)}Rc.signScale=O$t;function z$t(e){var t={ref:h4(e),updateId:e.updateId()};return KF(t)}Rc.signDataset=z$t;function h4(e){return new H$t(e)}Rc.signRef=h4;function F$t(e){return new B$t(e.map(function(t){return $ot(t)}))}Rc.signArray=F$t;function KF(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=$ot(e[r]));return new V$t(t)}Rc.signObj=KF;var f4=function(){function e(){}return e.prototype.isDifferent=function(t){return t instanceof this.constructor?this.isSignatureDifferent(t):!0},e}();Rc.Signature=f4;var B$t=function(e){Xot.__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}(f4);Rc.ArraySignature=B$t;var H$t=function(e){Xot.__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}(f4);Rc.ReferenceSignature=H$t;var V$t=function(e){Xot.__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}(f4);Rc.ObjectSignature=V$t});var U$t=H(Zot=>{"use strict";Object.defineProperty(Zot,"__esModule",{value:!0});var sHe=Kot();function lHe(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=sHe.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}Zot.memoize=lHe});var W$t=H(ZF=>{"use strict";Object.defineProperty(ZF,"__esModule",{value:!0});var cHe=Oe(),Jot=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}(),q$t=function(){function e(){this.map=new Jot}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 Jot),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 Jot},e.resolver=function(t,r,n){return[n.updateId(),r]},e}();function G$t(e){var t=cHe.memoize(e,q$t.resolver);return t.cache=new q$t,t}ZF.memoizeProjector=G$t;function uHe(e){return Object.keys(e).forEach(function(t){e[t]=G$t(e[t])}),e}ZF.memoizeProjectors=uHe});var Y$t=H(Qot=>{"use strict";Object.defineProperty(Qot,"__esModule",{value:!0});var hHe=CS();function fHe(){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=hHe.memoize(n),o=function(){var a=this,s=r.map(function(l){return l.apply(a)});return i.apply(void 0,s)};return o}Qot.memThunk=fHe});var CS=H(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});var tat=(de(),Ut(pe));tat.__exportStar(U$t(),AS);tat.__exportStar(W$t(),AS);tat.__exportStar(Y$t(),AS);var pHe=Kot();AS.sign=pHe.sign});var F1=H(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var j$t=(Er(),Ut(Mr)),dHe=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=dHe;Nc.ContextStyleAttrs=["fill-opacity","fill","opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function mHe(e,t,r,n){var i=Nc.ContextStyleAttrs.concat(t);return X$t(e,i,r,n)}Nc.resolveAttributesSubsetWithStyles=mHe;function X$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=X$t;function gHe(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["stroke-opacity"]!=null?parseFloat(e["stroke-opacity"]):1;return r*t}function _He(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["fill-opacity"]!=null?parseFloat(e["fill-opacity"]):1;return r*t}function $$t(e){return e["stroke-width"]!=null?parseFloat(e["stroke-width"]):1}Nc.getStrokeWidth=$$t;function K$t(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=K$t;function yHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",eat(e,n),e.restore()}Nc.renderArea=yHe;function vHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",eat(e,n),e.restore()}Nc.renderLine=vHe;function eat(e,t){if(t.stroke){e.lineWidth=$$t(t);var r=j$t.color(t.stroke),n=K$t(t);e.setLineDash(n),r.opacity*=gHe(t),e.strokeStyle=r.toString(),e.stroke()}if(t.fill){var i=j$t.color(t.fill);i.opacity*=_He(t),e.fillStyle=i.toString(),e.fill()}}Nc.renderPathWithStyle=eat});var Uu=H(rat=>{"use strict";Object.defineProperty(rat,"__esModule",{value:!0});var xHe=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}();rat.ProxyDrawer=xHe});var Df=H(nat=>{"use strict";Object.defineProperty(nat,"__esModule",{value:!0});var bHe=(Er(),Ut(Mr)),Z$t=Fe(),wHe=function(){function e(t,r){this._root=bHe.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];Z$t.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 Z$t.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}();nat.SVGDrawer=wHe});var oat=H(iat=>{"use strict";Object.defineProperty(iat,"__esModule",{value:!0});var J$t=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}(),SHe=function(){function e(t,r){var n=this;this.renderCallback=t,this.applyTransformCallback=r,this.domainTransformX=new J$t,this.domainTransformY=new J$t,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}();iat.DeferredRenderer=SHe});var rs=H(JF=>{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var MHe=(de(),Ut(pe)),wd=(Er(),Ut(Mr)),p4=Lf(),Sd=Fe(),Q$t=Wot(),aat=CS(),EHe=kc(),THe=F1(),CHe=Uu(),AHe=Df(),PHe=Yg(),IHe=If(),LHe=oat();JF.Renderer=IHe.makeEnum(["svg","canvas"]);var kHe=function(e){MHe.__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 Sd.Map,r._attrBindings=wd.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=wd.map();var n=new p4.Easing().maxTotalDuration(t._ANIMATION_MAX_DURATION);return r.animator(Q$t.Animator.MAIN,n),r.animator(Q$t.Animator.RESET,new p4.Null),r._deferredResetEntityStore=Sd.Window.debounce(LHe.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=PHe.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 CHe.ProxyDrawer(function(){return new AHe.SVGDrawer("path","")},function(n){return new THe.CanvasDrawer(n,function(){})})},t.prototype._getAnimator=function(r){return this._animateOnNextRender()?this._animators[r]||new p4.Null:new p4.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=aat.memoizeProjectors(r)),this._cachedAttrToProjector=r}return Sd.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=aat.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 tKt(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=aat.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 tKt(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(wd.merge(l)))}}),this._propertyBindings.each(function(a,s){if(a.scale===r){var l=i.getExtentsForProperty(s);l!=null&&(o=o.concat(wd.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=wd.select(document.createElement("canvas")).classed("plot-canvas",!0),this._bufferCanvas=wd.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 p4.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(Sd.Math.isNaN(g.x)||Sd.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 Sd.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=Sd.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 wd.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)}}),wd.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 Sd.EntityStore;return o.addAll(this._buildLightweightPlotEntities(r),i,this._localOriginBounds()),o}else if(this._cachedEntityStore===void 0){var o=new Sd.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:wd.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}(EHe.Component);JF.Plot=kHe;function tKt(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 eKt=H(sat=>{"use strict";Object.defineProperty(sat,"__esModule",{value:!0});var RHe=(de(),Ut(pe)),NHe=rs(),DHe=Fe(),OHe=Fot(),zHe=function(e){RHe.__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=DHe.Math.distanceSquared(s.position,r);l<=i&&(i=l,n=s)}}),n},t.prototype.append=function(r){if(r!=null&&!(r instanceof NHe.Plot))throw new Error("Plot Group only accepts plots");return e.prototype.append.call(this,r),this},t}(OHe.Group);sat.PlotGroup=zHe});var rKt=H(lat=>{"use strict";Object.defineProperty(lat,"__esModule",{value:!0});var FHe=(de(),Ut(pe)),qu=(Er(),Ut(Mr)),Go=Fe(),BHe=GF(),HHe=function(e){FHe.__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}(BHe.ComponentContainer);lat.Table=HHe});var nKt=H(cat=>{"use strict";Object.defineProperty(cat,"__esModule",{value:!0});var VHe=(de(),Ut(pe)),UHe=Uot(),qHe=2,GHe=function(e){VHe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._maxLines=qHe,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}(UHe.Label);cat.WrappedLabel=GHe});var iKt=H(uat=>{"use strict";Object.defineProperty(uat,"__esModule",{value:!0});var WHe=(de(),Ut(pe)),YHe=UF(),jHe=function(e){WHe.__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}(YHe.DragBoxLayer);uat.XDragBoxLayer=jHe});var oKt=H(hat=>{"use strict";Object.defineProperty(hat,"__esModule",{value:!0});var XHe=(de(),Ut(pe)),$He=UF(),KHe=function(e){XHe.__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}($He.DragBoxLayer);hat.YDragBoxLayer=KHe});var Iot=H(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Ns=(de(),Ut(pe));Ns.__exportStar(UF(),_a);Ns.__exportStar(E$t(),_a);Ns.__exportStar(T$t(),_a);Ns.__exportStar(Fot(),_a);Ns.__exportStar(kot(),_a);Ns.__exportStar(A$t(),_a);Ns.__exportStar(Uot(),_a);Ns.__exportStar(P$t(),_a);Ns.__exportStar(eKt(),_a);Ns.__exportStar(Cot(),_a);Ns.__exportStar(rKt(),_a);Ns.__exportStar(nKt(),_a);Ns.__exportStar(iKt(),_a);Ns.__exportStar(oKt(),_a)});var pat=H(fat=>{"use strict";Object.defineProperty(fat,"__esModule",{value:!0});var ZHe=(de(),Ut(pe)),JHe=Df(),QHe=function(e){ZHe.__extends(t,e);function t(){return e.call(this,"path","arc fill")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("stroke","none")},t}(JHe.SVGDrawer);fat.ArcSVGDrawer=QHe});var mat=H(dat=>{"use strict";Object.defineProperty(dat,"__esModule",{value:!0});var tVe=(de(),Ut(pe)),eVe=Df(),rVe=function(e){tVe.__extends(t,e);function t(){return e.call(this,"path","arc outline")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("fill","none")},t}(eVe.SVGDrawer);dat.ArcOutlineSVGDrawer=rVe});var gat=H(tB=>{"use strict";Object.defineProperty(tB,"__esModule",{value:!0});var nVe=(de(),Ut(pe)),QF=F1(),iVe=Df(),oVe=function(e){nVe.__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}(iVe.SVGDrawer);tB.AreaSVGDrawer=oVe;var aVe=["opacity","fill","fill-opacity"],sVe=["opacity","stroke","stroke-width"];function lVe(e,t){return function(r,n,i){var o=QF.resolveAttributes(i,aVe,n[0],0);QF.renderArea(r,e(),n[0],o);var a=QF.resolveAttributes(i,sVe,n[0],0);QF.renderLine(r,t(),n[0],a)}}tB.makeAreaCanvasDrawStep=lVe});var rB=H(eB=>{"use strict";Object.defineProperty(eB,"__esModule",{value:!0});var cVe=(de(),Ut(pe)),aKt=F1(),uVe=Df(),hVe=function(e){cVe.__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}(uVe.SVGDrawer);eB.LineSVGDrawer=hVe;var fVe=["opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function pVe(e){return function(t,r,n){var i=aKt.resolveAttributes(n,fVe,r[0],0);aKt.renderLine(t,e(),r[0],i)}}eB.makeLineCanvasDrawStep=pVe});var iB=H(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});var sKt=(de(),Ut(pe)),nB=F1(),dVe=Df(),mVe=function(e){sKt.__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}(dVe.SVGDrawer);PS.RectangleSVGDrawer=mVe;var gVe=nB.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=nB.resolveAttributes(r,gVe,o,i);e.beginPath(),e.rect(a.x,a.y,a.width,a.height),nB.renderPathWithStyle(e,a)}}e.restore()};var _Ve=function(e){sKt.__extends(t,e);function t(r){return e.call(this,r,PS.RectangleCanvasDrawStep)||this}return t}(nB.CanvasDrawer);PS.RectangleCanvasDrawer=_Ve});var yat=H(_at=>{"use strict";Object.defineProperty(_at,"__esModule",{value:!0});var yVe=(de(),Ut(pe)),vVe=Df(),xVe=function(e){yVe.__extends(t,e);function t(){return e.call(this,"line","")||this}return t}(vVe.SVGDrawer);_at.SegmentSVGDrawer=xVe});var lKt=H(vat=>{"use strict";Object.defineProperty(vat,"__esModule",{value:!0});var bVe=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}();vat.CanvasBuffer=bVe});var xat=H(oB=>{"use strict";Object.defineProperty(oB,"__esModule",{value:!0});var wVe=(de(),Ut(pe)),d4=F1(),SVe=lKt(),MVe=Df(),EVe=function(e){wVe.__extends(t,e);function t(){return e.call(this,"path","symbol")||this}return t}(MVe.SVGDrawer);oB.SymbolSVGDrawer=EVe;var TVe=d4.ContextStyleAttrs.concat(["x","y"]);function CVe(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 SVe.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=d4.resolveAttributes(s,TVe,x,y),S=p(x,y,e);if(!!AVe(c,u,b.x,b.y,S)){var C=PVe(d,b,d4.ContextStyleAttrs),P=f(x,y,i._dataset);if(!(C&&_==S&&g==P)){var k=d4.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(),d4.renderPathWithStyle(D,b),g=P,_=S,d=b}h.blitCenter(o,b.x,b.y)}}}}}oB.makeSymbolCanvasDrawStep=CVe;function AVe(e,t,r,n,i){return r+i>=0&&r-i<=e&&n+i>=0&&n-i<=t}function PVe(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 B1=H(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Of=(de(),Ut(pe));Of.__exportStar(pat(),Dc);Of.__exportStar(mat(),Dc);Of.__exportStar(gat(),Dc);Of.__exportStar(F1(),Dc);Of.__exportStar(Uu(),Dc);Of.__exportStar(rB(),Dc);Of.__exportStar(iB(),Dc);Of.__exportStar(yat(),Dc);Of.__exportStar(Df(),Dc);Of.__exportStar(xat(),Dc)});var H1=H(wat=>{"use strict";Object.defineProperty(wat,"__esModule",{value:!0});var IVe=(de(),Ut(pe)),cKt=ks(),bat=Fe(),LVe=oat(),m4=rs(),kVe=function(e){IVe.__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 LVe.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 cKt.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 bat.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 cKt.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=m4.Plot._scaledAccessor(this.x()),a=m4.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=m4.Plot._scaledAccessor(r.x())(a,s,l),u=m4.Plot._scaledAccessor(r.y())(a,s,l);return i&&i.accessor(a,s,l)===!1?!1:bat.Math.isValidNumber(c)&&bat.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}(m4.Plot);wat.XYPlot=kVe});var Mat=H(sB=>{"use strict";Object.defineProperty(sB,"__esModule",{value:!0});var RVe=(de(),Ut(pe)),ya=(Er(),Ut(Mr)),NVe=Lf(),DVe=B1(),OVe=Uu(),uKt=rB(),zVe=ks(),aB=vd(),Qg=Fe(),FVe=If(),Sat=IS(),vl=rs(),BVe=H1(),hKt={linear:ya.curveLinear,linearClosed:ya.curveLinearClosed,step:ya.curveStep,stepBefore:ya.curveStepBefore,stepAfter:ya.curveStepAfter,basis:ya.curveBasis,basisOpen:ya.curveBasisOpen,basisClosed:ya.curveBasisClosed,bundle:ya.curveBundle,cardinal:ya.curveCardinal,cardinalOpen:ya.curveCardinalOpen,cardinalClosed:ya.curveCardinalClosed,monotone:ya.curveMonotoneX};sB.CurveName=FVe.makeEnum(["linear","linearClosed","step","stepBefore","stepAfter","basis","basisOpen","basisClosed","bundle","cardinal","cardinalOpen","cardinalClosed","monotone"]);var HVe=function(e){RVe.__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 NVe.Easing;return n.stepDuration(vl.Plot._ANIMATION_MAX_DURATION),n.easingMode("expInOut"),n.maxTotalDuration(vl.Plot._ANIMATION_MAX_DURATION),r.animator(Sat.Animator.MAIN,n),r.attr("stroke",new zVe.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 aB.QuantitativeScale&&this.x().scale.snappingDomainEnabled(!this.autorangeSmooth()),this.autorangeMode()==="y"&&this.y()&&this.y().scale&&this.y().scale instanceof aB.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 OVe.ProxyDrawer(function(){return new uKt.LineSVGDrawer},function(i){return new DVe.CanvasDrawer(i,uKt.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 ya.extent(ya.merge([a,o]))})},t.prototype._getEdgeIntersectionPoints=function(){var r=this;if(!(this.y().scale instanceof aB.QuantitativeScale&&this.x().scale instanceof aB.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(vl.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(Sat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(Sat.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(!!Qg.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(vl.Plot._scaledAccessor(this.x()),vl.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=vl.Plot._scaledAccessor(this.x())),i===void 0&&(i=vl.Plot._scaledAccessor(this.y()));var o=function(a,s,l){var c=n(a,s,l),u=i(a,s,l);return Qg.Math.isValidNumber(c)&&Qg.Math.isValidNumber(u)};return ya.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=hKt[r];return n==null?hKt.linear:n}else return r},t.prototype._getDataToDraw=function(){var r=this,n=new Qg.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=vl.Plot._scaledAccessor(this.x()),a=vl.Plot._scaledAccessor(this.y()),s=r.data(),l=[],c=function(x,b){return Qg.Math.inRange(x,0,i.width())&&Qg.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=vl.Plot._scaledAccessor(this.x()),a=vl.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=vl.Plot._scaledAccessor(this.x()),a=vl.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 Qg.Bucket(h,f,p):l.isInBucket(f)?l.addToBucket(p,h):(a.push.apply(a,l.getUniqueIndices()),l=new Qg.Bucket(h,f,p))}}return l!=null&&a.push.apply(a,l.getUniqueIndices()),a},t}(BVe.XYPlot);sB.Line=HVe});var Cat=H(Tat=>{"use strict";Object.defineProperty(Tat,"__esModule",{value:!0});var VVe=(de(),Ut(pe)),lB=(Er(),Ut(Mr)),UVe=ks(),g4=Fe(),Eat=B1(),fKt=gat(),qVe=Uu(),pKt=rB(),cB=IS(),GVe=Mat(),Ds=rs(),WVe=function(e){VVe.__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 UVe.Color().range()[0]),r._lineDrawers=new g4.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 Eat.ProxyDrawer(function(){return new pKt.LineSVGDrawer},function(i){return new Eat.CanvasDrawer(i,pKt.makeLineCanvasDrawStep(function(){var o=Ds.Plot._scaledAccessor(n.x()),a=Ds.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=Ds.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(Ds.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(cB.Animator.RESET)})}return r.push({attrToProjector:this._generateLineAttrToProjector(),animator:this._getAnimator(cB.Animator.MAIN)}),r},t.prototype._generateLineAttrToProjector=function(){var r=this._getAttrToProjector();return r.d=this._constructLineProjector(Ds.Plot._scaledAccessor(this.x()),Ds.Plot._scaledAccessor(this.y())),r},t.prototype._createDrawer=function(r){var n=this;return new qVe.ProxyDrawer(function(){return new fKt.AreaSVGDrawer},function(i){return new Eat.CanvasDrawer(i,fKt.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(Ds.Plot._scaledAccessor(this.x()),this._getResetYFunction(),Ds.Plot._scaledAccessor(this.y0())),r.push({attrToProjector:n,animator:this._getAnimator(cB.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(cB.Animator.MAIN)}),r},t.prototype._updateYScale=function(){var r=this.getExtentsForProperty("y0"),n=g4.Array.flatten(r),i=g4.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 Ds.Plot._scaledAccessor(this.y0())},t.prototype._coordinateProjectors=function(){return[Ds.Plot._scaledAccessor(this.x()),Ds.Plot._scaledAccessor(this.y()),Ds.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 lB.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())}),lB.selectAll(i)},t.prototype._constructAreaProjector=function(r,n,i){var o=this,a=this._createDefinedProjector(Ds.Plot._scaledAccessor(this.x()),Ds.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 g4.Math.isValidNumber(s)&&g4.Math.isValidNumber(l)}},t.prototype._createAreaGenerator=function(r,n,i,o,a){var s=this._getCurveFactory(),l=lB.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=lB.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}(GVe.Line);Tat.Area=WVe});var _4=H(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var YVe=(de(),Ut(pe)),Pat=(Er(),Ut(Mr)),Aat=_l(),jVe=Lf(),XVe=Bu(),$Ve=B1(),KVe=Uu(),ZVe=iB(),JVe=CS(),Iat=ks(),dKt=vd(),xl=Fe(),kat=If(),mKt=IS(),uB=rs(),QVe=H1();Gu.BarOrientation=kat.makeEnum(["vertical","horizontal"]);Gu.LabelsPosition=kat.makeEnum(["start","middle","end","outside"]);Gu.BarAlignment=kat.makeEnum(["start","middle","end"]);var Lat=function(e){YVe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this)||this;if(n._labelFormatter=XVe.identity(),n._labelsEnabled=!1,n._labelsPosition=Gu.LabelsPosition.end,n._hideBarsIfAnyAreTooWide=!0,n._barAlignment="middle",n._computeBarPixelThickness=JVe.memoize(tUe),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 Iat.Color().range()[0]),n.attr(t._BAR_THICKNESS_KEY,function(){return n._barPixelThickness()}),n._labelConfig=new xl.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 KVe.ProxyDrawer(function(){return new ZVe.RectangleSVGDrawer(t._BAR_AREA_CLASS)},function(r){return new $Ve.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 Iat.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 Aat.SvgContext(i.node()),a=new Aat.CacheMeasurer(o),s=new Aat.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];xl.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 dKt.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&&xl.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 dKt.QuantitativeScale))return i;var a=o.scale,s=this._barPixelThickness();return i=i.map(function(l){return Pat.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=xl.Color.contrast("white",s)*1.6<xl.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(mKt.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(mKt.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=uB.Plot._scaledAccessor(this.position()),c=uB.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?uB.Plot._scaledAccessor(this.y()):uB.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 xl.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=xl.Math.isValidNumber(l)&&xl.Math.isValidNumber(c)&&xl.Math.isValidNumber(u)&&xl.Math.isValidNumber(h);return f?xl.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}(QVe.XYPlot);Gu.Bar=Lat;function tUe(e,t,r){var n,i=e.scale;if(i instanceof Iat.Category)n=i.rangeBand();else{var o=e.accessor,a=Pat.set(xl.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=Pat.pairs(s);n=xl.Math.min(l,function(c,u){return Math.abs(c[1]-c[0])},r*Lat._SINGLE_BAR_DIMENSION_RATIO),n*=Lat._BAR_THICKNESS_RATIO}return n}});var _Kt=H(Rat=>{"use strict";Object.defineProperty(Rat,"__esModule",{value:!0});var eUe=(de(),Ut(pe)),rUe=ks(),nUe=Fe(),gKt=_4(),iUe=rs(),oUe=function(e){eUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._clusterOffsets=new nUe.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 rUe.Category;r.domain(this.datasets().map(function(i,o){return String(o)}));var n=iUe.Plot._scaledAccessor(this.attr(gKt.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}(gKt.Bar);Rat.ClusteredBar=oUe});var yKt=H(Dat=>{"use strict";Object.defineProperty(Dat,"__esModule",{value:!0});var aUe=(de(),Ut(pe)),y4=(Er(),Ut(Mr)),Nat=_l(),sUe=Lf(),lUe=Bu(),cUe=ks(),V1=Fe(),uUe=pat(),hUe=mat(),fUe=Uu(),pUe=CF(),Md=rs(),dUe=function(e){aUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._startAngle=0,r._endAngle=2*Math.PI,r._labelFormatter=lUe.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 cUe.Color),r._strokeDrawers=new V1.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 V1.Window.warn("Only one dataset is supported in Pie plots"),this;this._updatePieAngles(),e.prototype._addDataset.call(this,r);var n=new hUe.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())}),y4.selectAll(i)},t.prototype._onDatasetUpdate=function(){e.prototype._onDatasetUpdate.call(this),this._updatePieAngles(),this.render()},t.prototype._createDrawer=function(){return new fUe.ProxyDrawer(function(){return new uUe.ArcSVGDrawer},function(){return pUe.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=y4.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=Md.Plot._scaledAccessor(this.innerRadius()),o=Md.Plot._scaledAccessor(this.outerRadius());return n.d=function(a,s,l){return y4.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=Md.Plot._scaledAccessor(this.sectorValue()),n=this.datasets()[0],i=this._getDataToDraw().get(n),o=y4.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=Md.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 V1.Math.isValidNumber(r)&&r>=0},t.prototype._pixelPoint=function(r,n,i){var o=Md.Plot._scaledAccessor(this.sectorValue());if(!t._isValidData(o(r,n,i)))return{x:NaN,y:NaN};var a=Md.Plot._scaledAccessor(this.innerRadius())(r,n,i),s=Md.Plot._scaledAccessor(this.outerRadius())(r,n,i),l=(a+s)/2,c=y4.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&&V1.Window.setTimeout(function(){return n._drawLabels()},r);var i=this._generateStrokeDrawSteps(),o=this._getDataToDraw();this.datasets().forEach(function(a){var s=Md.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 sUe.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 Nat.SvgContext(i.node()),a=new Nat.CacheMeasurer(o),s=new Nat.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(!V1.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=V1.Color.contrast("white",I)*1.6<V1.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}(Md.Plot);Dat.Pie=dUe});var vKt=H(zat=>{"use strict";Object.defineProperty(zat,"__esModule",{value:!0});var mUe=(de(),Ut(pe)),gUe=(Er(),Ut(Mr)),Oat=_l(),_Ue=Lf(),yUe=B1(),vUe=Uu(),xUe=iB(),hB=ks(),Oc=Fe(),fB=rs(),bUe=H1(),wUe=function(e){mUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._labelsEnabled=!1,r._label=null,r.animator("rectangles",new _Ue.Null),r.addClass("rectangle-plot"),r.attr("fill",new hB.Color().range()[0]),r}return t.prototype._createDrawer=function(){return new vUe.ProxyDrawer(function(){return new xUe.RectangleSVGDrawer},function(r){return new yUe.RectangleCanvasDrawer(r)})},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=fB.Plot._scaledAccessor(this.x()),o=n[t._X2_KEY],a=fB.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 hB.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 hB.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=fB.Plot._scaledAccessor(this.x2())),this.y2()!=null&&(r.y2=fB.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 hB.Category)return r.rangeBand();var n=r===this.x().scale?this.x().accessor:this.y().accessor,i=gUe.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 Oat.SvgContext(a.node()),l=new Oat.CacheMeasurer(s),c=new Oat.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}(bUe.XYPlot);zat.Rectangle=wUe});var bKt=H(Vat=>{"use strict";Object.defineProperty(Vat,"__esModule",{value:!0});var SUe=(de(),Ut(pe)),Fat=_l(),MUe=Bu(),EUe=jF(),TUe=Uu(),xKt=xat(),CUe=Lf(),AUe=B1(),PUe=ks(),Bat=Fe(),Hat=IS(),bl=rs(),IUe=H1(),LUe=function(e){SUe.__extends(t,e);function t(){var r=e.call(this)||this;r._labelFormatter=MUe.identity(),r._labelsEnabled=!1,r.addClass("scatter-plot");var n=new CUe.Easing;n.startDelay(5),n.stepDuration(250),n.maxTotalDuration(bl.Plot._ANIMATION_MAX_DURATION),r.animator(Hat.Animator.MAIN,n),r.attr("opacity",.6),r.attr("fill",new PUe.Color().range()[0]),r.size(6);var i=EUe.circle();return r.symbol(function(){return i}),r._labelConfig=new Bat.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=bl.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 TUe.ProxyDrawer(function(){return new xKt.SymbolSVGDrawer},function(i){return new AUe.CanvasDrawer(i,xKt.makeSymbolCanvasDrawStep(r,function(){return bl.Plot._scaledAccessor(n.symbol())},function(){return bl.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=bl.Plot._scaledAccessor(this.symbol());n.d=function(o,a,s){return i(o,a,s)(0)(null)},r.push({attrToProjector:n,animator:this._getAnimator(Hat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(Hat.Animator.MAIN)}),r},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=bl.Plot._scaledAccessor(this.x()),i=bl.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=bl.Plot._scaledAccessor(this.symbol()),n=bl.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 Bat.DOM.intersectsBBox(i,o,a)},t.prototype.entitiesAt=function(r){var n=bl.Plot._scaledAccessor(this.x()),i=bl.Plot._scaledAccessor(this.y()),o=bl.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 Fat.SvgContext(i.node()),a=new Fat.CacheMeasurer(o),s=new Fat.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&&Bat.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=bl.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}(IUe.XYPlot);Vat.Scatter=LUe});var wKt=H(Uat=>{"use strict";Object.defineProperty(Uat,"__esModule",{value:!0});var kUe=(de(),Ut(pe)),RUe=Lf(),NUe=Uu(),DUe=yat(),OUe=ks(),zUe=CF(),LS=rs(),FUe=H1(),BUe=function(e){kUe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("segment-plot"),r.attr("stroke",new OUe.Color().range()[0]),r.attr("stroke-width","2px"),r}return t.prototype._createDrawer=function(){return new NUe.ProxyDrawer(function(){return new DUe.SegmentSVGDrawer},function(){return zUe.warn("canvas renderer is not supported on Segment Plot!"),null})},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:new RUe.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}(FUe.XYPlot);Uat.Segment=BUe});var EKt=H(qat=>{"use strict";Object.defineProperty(qat,"__esModule",{value:!0});var HUe=(de(),Ut(pe)),SKt=(Er(),Ut(Mr)),VUe=Lf(),MKt=CS(),t0=Fe(),UUe=Cat(),qUe=rs(),GUe=function(e){HUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._stackingResult=MKt.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 t0.Stacking.stack(n,i,o,a)}),r._stackedExtent=MKt.memThunk(r._stackingResult,function(){return r.x().accessor},function(){return r._filterForProperty("y")},function(n,i,o){return t0.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?(t0.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 VUe.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):(t0.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 SKt.set(a.data().map(function(s,l){return t0.Stacking.normalizeKey(n(s,l,a))})).values()}),o=t._domainKeys(r,n);i.some(function(a){return a.length!==o.length})&&t0.Window.warn("the domains across the datasets are not the same. Plot may produce unintended behavior.")}},t._domainKeys=function(r,n){var i=SKt.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=qUe.Plot._scaledAccessor(this.x()),i=this.y().accessor,o=this.x().accessor,a=function(u,h,f){return t0.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(t0.Stacking.normalizeKey(a)).offset);return{x:o.x,y:l}},t}(UUe.Area);qat.StackedArea=GUe});var CKt=H(Yat=>{"use strict";Object.defineProperty(Yat,"__esModule",{value:!0});var WUe=(de(),Ut(pe)),Gat=_l(),YUe=Bu(),TKt=CS(),pB=Fe(),Wat=_4(),jUe=rs(),XUe=function(e){WUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._extremaFormatter=YUe.identity(),n._stackingResult=TKt.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 pB.Stacking.stack(i,o,a,s)}),n._stackedExtent=TKt.memThunk(n._stackingResult,function(){return n.position().accessor},function(){return n._filterForProperty(n._isVertical?"y":"x")},function(i,o,a){return pB.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(Wat.Bar._LABEL_AREA_CLASS,!0);var r=new Gat.SvgContext(this._labelArea.node());this._measurer=new Gat.CacheMeasurer(r),this._writer=new Gat.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=pB.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(Wat.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 pB.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}(Wat.Bar);Yat.StackedBar=XUe});var AKt=H(jat=>{"use strict";Object.defineProperty(jat,"__esModule",{value:!0});var $Ue=(de(),Ut(pe)),KUe=Fe(),ZUe=_4(),JUe=rs(),QUe=function(e){$Ue.__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&&KUe.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=JUe.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}(ZUe.Bar);jat.Waterfall=QUe});var IS=H(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var zc=(de(),Ut(pe));zc.__exportStar(Cat(),Os);zc.__exportStar(_4(),Os);zc.__exportStar(Wot(),Os);zc.__exportStar(_Kt(),Os);zc.__exportStar(Mat(),Os);zc.__exportStar(yKt(),Os);zc.__exportStar(vKt(),Os);zc.__exportStar(bKt(),Os);zc.__exportStar(wKt(),Os);zc.__exportStar(EKt(),Os);zc.__exportStar(CKt(),Os);zc.__exportStar(AKt(),Os)});var PKt=H(Xat=>{"use strict";Object.defineProperty(Xat,"__esModule",{value:!0});Xat.version="3.9.0"});var wl=H(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var Fc=(de(),Ut(pe));Gjt();var tqe=Lf();ln.Animators=tqe;var eqe=s$t();ln.Axes=eqe;var rqe=Iot();ln.Components=rqe;var nqe=XA();ln.Configs=nqe;var iqe=Bu();ln.Formatters=iqe;var oqe=PF();ln.RenderController=oqe;var aqe=Vit();ln.RenderPolicies=aqe;var sqe=jF();ln.SymbolFactories=sqe;var lqe=N1();ln.Dispatchers=lqe;var cqe=B1();ln.Drawers=cqe;var uqe=s4();ln.Interactions=uqe;var hqe=IS();ln.Plots=hqe;var fqe=ks();ln.Scales=fqe;var pqe=Fe();ln.Utils=pqe;Fc.__exportStar(QA(),ln);var dqe=BF();ln.TimeInterval=dqe.TimeInterval;Fc.__exportStar(kc(),ln);Fc.__exportStar(GF(),ln);Fc.__exportStar(jot(),ln);var mqe=PKt();ln.version=mqe.version;Fc.__exportStar(i4(),ln);Fc.__exportStar(Uu(),ln);Fc.__exportStar(D1(),ln);Fc.__exportStar(Sot(),ln);Fc.__exportStar(H1(),ln);Fc.__exportStar(rs(),ln);Fc.__exportStar(vd(),ln);Fc.__exportStar(L1(),ln)});var XKt=H((Kjn,jKt)=>{function Nqe(){this.__data__=[],this.size=0}jKt.exports=Nqe});var Y1=H((Zjn,$Kt)=>{function Dqe(e,t){return e===t||e!==e&&t!==t}$Kt.exports=Dqe});var S4=H((Jjn,KKt)=>{var Oqe=Y1();function zqe(e,t){for(var r=e.length;r--;)if(Oqe(e[r][0],t))return r;return-1}KKt.exports=zqe});var JKt=H((Qjn,ZKt)=>{var Fqe=S4(),Bqe=Array.prototype,Hqe=Bqe.splice;function Vqe(e){var t=this.__data__,r=Fqe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Hqe.call(t,r,1),--this.size,!0}ZKt.exports=Vqe});var tZt=H((tXn,QKt)=>{var Uqe=S4();function qqe(e){var t=this.__data__,r=Uqe(t,e);return r<0?void 0:t[r][1]}QKt.exports=qqe});var rZt=H((eXn,eZt)=>{var Gqe=S4();function Wqe(e){return Gqe(this.__data__,e)>-1}eZt.exports=Wqe});var iZt=H((rXn,nZt)=>{var Yqe=S4();function jqe(e,t){var r=this.__data__,n=Yqe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}nZt.exports=jqe});var M4=H((nXn,oZt)=>{var Xqe=XKt(),$qe=JKt(),Kqe=tZt(),Zqe=rZt(),Jqe=iZt();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=Xqe;zS.prototype.delete=$qe;zS.prototype.get=Kqe;zS.prototype.has=Zqe;zS.prototype.set=Jqe;oZt.exports=zS});var sZt=H((iXn,aZt)=>{var Qqe=M4();function tGe(){this.__data__=new Qqe,this.size=0}aZt.exports=tGe});var cZt=H((oXn,lZt)=>{function eGe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}lZt.exports=eGe});var hZt=H((aXn,uZt)=>{function rGe(e){return this.__data__.get(e)}uZt.exports=rGe});var pZt=H((sXn,fZt)=>{function nGe(e){return this.__data__.has(e)}fZt.exports=nGe});var ust=H((lXn,dZt)=>{var iGe=typeof global=="object"&&global&&global.Object===Object&&global;dZt.exports=iGe});var Hc=H((cXn,mZt)=>{var oGe=ust(),aGe=typeof self=="object"&&self&&self.Object===Object&&self,sGe=oGe||aGe||Function("return this")();mZt.exports=sGe});var j1=H((uXn,gZt)=>{var lGe=Hc(),cGe=lGe.Symbol;gZt.exports=cGe});var xZt=H((hXn,vZt)=>{var _Zt=j1(),yZt=Object.prototype,uGe=yZt.hasOwnProperty,hGe=yZt.toString,E4=_Zt?_Zt.toStringTag:void 0;function fGe(e){var t=uGe.call(e,E4),r=e[E4];try{e[E4]=void 0;var n=!0}catch(o){}var i=hGe.call(e);return n&&(t?e[E4]=r:delete e[E4]),i}vZt.exports=fGe});var wZt=H((fXn,bZt)=>{var pGe=Object.prototype,dGe=pGe.toString;function mGe(e){return dGe.call(e)}bZt.exports=mGe});var s0=H((pXn,EZt)=>{var SZt=j1(),gGe=xZt(),_Ge=wZt(),yGe="[object Null]",vGe="[object Undefined]",MZt=SZt?SZt.toStringTag:void 0;function xGe(e){return e==null?e===void 0?vGe:yGe:MZt&&MZt in Object(e)?gGe(e):_Ge(e)}EZt.exports=xGe});var Ml=H((dXn,TZt)=>{function bGe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}TZt.exports=bGe});var FS=H((mXn,CZt)=>{var wGe=s0(),SGe=Ml(),MGe="[object AsyncFunction]",EGe="[object Function]",TGe="[object GeneratorFunction]",CGe="[object Proxy]";function AGe(e){if(!SGe(e))return!1;var t=wGe(e);return t==EGe||t==TGe||t==MGe||t==CGe}CZt.exports=AGe});var PZt=H((gXn,AZt)=>{var PGe=Hc(),IGe=PGe["__core-js_shared__"];AZt.exports=IGe});var kZt=H((_Xn,LZt)=>{var hst=PZt(),IZt=function(){var e=/[^.]+$/.exec(hst&&hst.keys&&hst.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function LGe(e){return!!IZt&&IZt in e}LZt.exports=LGe});var fst=H((yXn,RZt)=>{var kGe=Function.prototype,RGe=kGe.toString;function NGe(e){if(e!=null){try{return RGe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}RZt.exports=NGe});var DZt=H((vXn,NZt)=>{var DGe=FS(),OGe=kZt(),zGe=Ml(),FGe=fst(),BGe=/[\\^$.*+?()[\]{}|]/g,HGe=/^\[object .+?Constructor\]$/,VGe=Function.prototype,UGe=Object.prototype,qGe=VGe.toString,GGe=UGe.hasOwnProperty,WGe=RegExp("^"+qGe.call(GGe).replace(BGe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YGe(e){if(!zGe(e)||OGe(e))return!1;var t=DGe(e)?WGe:HGe;return t.test(FGe(e))}NZt.exports=YGe});var zZt=H((xXn,OZt)=>{function jGe(e,t){return e==null?void 0:e[t]}OZt.exports=jGe});var l0=H((bXn,FZt)=>{var XGe=DZt(),$Ge=zZt();function KGe(e,t){var r=$Ge(e,t);return XGe(r)?r:void 0}FZt.exports=KGe});var OB=H((wXn,BZt)=>{var ZGe=l0(),JGe=Hc(),QGe=ZGe(JGe,"Map");BZt.exports=QGe});var T4=H((SXn,HZt)=>{var tWe=l0(),eWe=tWe(Object,"create");HZt.exports=eWe});var qZt=H((MXn,UZt)=>{var VZt=T4();function rWe(){this.__data__=VZt?VZt(null):{},this.size=0}UZt.exports=rWe});var WZt=H((EXn,GZt)=>{function nWe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}GZt.exports=nWe});var jZt=H((TXn,YZt)=>{var iWe=T4(),oWe="__lodash_hash_undefined__",aWe=Object.prototype,sWe=aWe.hasOwnProperty;function lWe(e){var t=this.__data__;if(iWe){var r=t[e];return r===oWe?void 0:r}return sWe.call(t,e)?t[e]:void 0}YZt.exports=lWe});var $Zt=H((CXn,XZt)=>{var cWe=T4(),uWe=Object.prototype,hWe=uWe.hasOwnProperty;function fWe(e){var t=this.__data__;return cWe?t[e]!==void 0:hWe.call(t,e)}XZt.exports=fWe});var ZZt=H((AXn,KZt)=>{var pWe=T4(),dWe="__lodash_hash_undefined__";function mWe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pWe&&t===void 0?dWe:t,this}KZt.exports=mWe});var QZt=H((PXn,JZt)=>{var gWe=qZt(),_We=WZt(),yWe=jZt(),vWe=$Zt(),xWe=ZZt();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=gWe;BS.prototype.delete=_We;BS.prototype.get=yWe;BS.prototype.has=vWe;BS.prototype.set=xWe;JZt.exports=BS});var rJt=H((IXn,eJt)=>{var tJt=QZt(),bWe=M4(),wWe=OB();function SWe(){this.size=0,this.__data__={hash:new tJt,map:new(wWe||bWe),string:new tJt}}eJt.exports=SWe});var iJt=H((LXn,nJt)=>{function MWe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}nJt.exports=MWe});var C4=H((kXn,oJt)=>{var EWe=iJt();function TWe(e,t){var r=e.__data__;return EWe(t)?r[typeof t=="string"?"string":"hash"]:r.map}oJt.exports=TWe});var sJt=H((RXn,aJt)=>{var CWe=C4();function AWe(e){var t=CWe(this,e).delete(e);return this.size-=t?1:0,t}aJt.exports=AWe});var cJt=H((NXn,lJt)=>{var PWe=C4();function IWe(e){return PWe(this,e).get(e)}lJt.exports=IWe});var hJt=H((DXn,uJt)=>{var LWe=C4();function kWe(e){return LWe(this,e).has(e)}uJt.exports=kWe});var pJt=H((OXn,fJt)=>{var RWe=C4();function NWe(e,t){var r=RWe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}fJt.exports=NWe});var zB=H((zXn,dJt)=>{var DWe=rJt(),OWe=sJt(),zWe=cJt(),FWe=hJt(),BWe=pJt();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=DWe;HS.prototype.delete=OWe;HS.prototype.get=zWe;HS.prototype.has=FWe;HS.prototype.set=BWe;dJt.exports=HS});var gJt=H((FXn,mJt)=>{var HWe=M4(),VWe=OB(),UWe=zB(),qWe=200;function GWe(e,t){var r=this.__data__;if(r instanceof HWe){var n=r.__data__;if(!VWe||n.length<qWe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new UWe(n)}return r.set(e,t),this.size=r.size,this}mJt.exports=GWe});var A4=H((BXn,_Jt)=>{var WWe=M4(),YWe=sZt(),jWe=cZt(),XWe=hZt(),$We=pZt(),KWe=gJt();function VS(e){var t=this.__data__=new WWe(e);this.size=t.size}VS.prototype.clear=YWe;VS.prototype.delete=jWe;VS.prototype.get=XWe;VS.prototype.has=$We;VS.prototype.set=KWe;_Jt.exports=VS});var FB=H((HXn,yJt)=>{function ZWe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}yJt.exports=ZWe});var pst=H((VXn,vJt)=>{var JWe=l0(),QWe=function(){try{var e=JWe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();vJt.exports=QWe});var P4=H((UXn,bJt)=>{var xJt=pst();function tYe(e,t,r){t=="__proto__"&&xJt?xJt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}bJt.exports=tYe});var I4=H((qXn,wJt)=>{var eYe=P4(),rYe=Y1(),nYe=Object.prototype,iYe=nYe.hasOwnProperty;function oYe(e,t,r){var n=e[t];(!(iYe.call(e,t)&&rYe(n,r))||r===void 0&&!(t in e))&&eYe(e,t,r)}wJt.exports=oYe});var US=H((GXn,SJt)=>{var aYe=I4(),sYe=P4();function lYe(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?sYe(r,s,l):aYe(r,s,l)}return r}SJt.exports=lYe});var EJt=H((WXn,MJt)=>{function cYe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}MJt.exports=cYe});var Yu=H((YXn,TJt)=>{function uYe(e){return e!=null&&typeof e=="object"}TJt.exports=uYe});var AJt=H((jXn,CJt)=>{var hYe=s0(),fYe=Yu(),pYe="[object Arguments]";function dYe(e){return fYe(e)&&hYe(e)==pYe}CJt.exports=dYe});var qS=H((XXn,LJt)=>{var PJt=AJt(),mYe=Yu(),IJt=Object.prototype,gYe=IJt.hasOwnProperty,_Ye=IJt.propertyIsEnumerable,yYe=PJt(function(){return arguments}())?PJt:function(e){return mYe(e)&&gYe.call(e,"callee")&&!_Ye.call(e,"callee")};LJt.exports=yYe});var Ti=H(($Xn,kJt)=>{var vYe=Array.isArray;kJt.exports=vYe});var NJt=H((KXn,RJt)=>{function xYe(){return!1}RJt.exports=xYe});var X1=H((L4,GS)=>{var bYe=Hc(),wYe=NJt(),zJt=typeof L4=="object"&&L4&&!L4.nodeType&&L4,DJt=zJt&&typeof GS=="object"&&GS&&!GS.nodeType&&GS,SYe=DJt&&DJt.exports===zJt,OJt=SYe?bYe.Buffer:void 0,MYe=OJt?OJt.isBuffer:void 0,EYe=MYe||wYe;GS.exports=EYe});var k4=H((ZXn,FJt)=>{var TYe=9007199254740991,CYe=/^(?:0|[1-9]\d*)$/;function AYe(e,t){var r=typeof e;return t=t==null?TYe:t,!!t&&(r=="number"||r!="symbol"&&CYe.test(e))&&e>-1&&e%1==0&&e<t}FJt.exports=AYe});var BB=H((JXn,BJt)=>{var PYe=9007199254740991;function IYe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=PYe}BJt.exports=IYe});var VJt=H((QXn,HJt)=>{var LYe=s0(),kYe=BB(),RYe=Yu(),NYe="[object Arguments]",DYe="[object Array]",OYe="[object Boolean]",zYe="[object Date]",FYe="[object Error]",BYe="[object Function]",HYe="[object Map]",VYe="[object Number]",UYe="[object Object]",qYe="[object RegExp]",GYe="[object Set]",WYe="[object String]",YYe="[object WeakMap]",jYe="[object ArrayBuffer]",XYe="[object DataView]",$Ye="[object Float32Array]",KYe="[object Float64Array]",ZYe="[object Int8Array]",JYe="[object Int16Array]",QYe="[object Int32Array]",tje="[object Uint8Array]",eje="[object Uint8ClampedArray]",rje="[object Uint16Array]",nje="[object Uint32Array]",Un={};Un[$Ye]=Un[KYe]=Un[ZYe]=Un[JYe]=Un[QYe]=Un[tje]=Un[eje]=Un[rje]=Un[nje]=!0;Un[NYe]=Un[DYe]=Un[jYe]=Un[OYe]=Un[XYe]=Un[zYe]=Un[FYe]=Un[BYe]=Un[HYe]=Un[VYe]=Un[UYe]=Un[qYe]=Un[GYe]=Un[WYe]=Un[YYe]=!1;function ije(e){return RYe(e)&&kYe(e.length)&&!!Un[LYe(e)]}HJt.exports=ije});var R4=H((t$n,UJt)=>{function oje(e){return function(t){return e(t)}}UJt.exports=oje});var HB=H((N4,WS)=>{var aje=ust(),qJt=typeof N4=="object"&&N4&&!N4.nodeType&&N4,D4=qJt&&typeof WS=="object"&&WS&&!WS.nodeType&&WS,sje=D4&&D4.exports===qJt,dst=sje&&aje.process,lje=function(){try{var e=D4&&D4.require&&D4.require("util").types;return e||dst&&dst.binding&&dst.binding("util")}catch(t){}}();WS.exports=lje});var YS=H((e$n,YJt)=>{var cje=VJt(),uje=R4(),GJt=HB(),WJt=GJt&&GJt.isTypedArray,hje=WJt?uje(WJt):cje;YJt.exports=hje});var mst=H((r$n,jJt)=>{var fje=EJt(),pje=qS(),dje=Ti(),mje=X1(),gje=k4(),_je=YS(),yje=Object.prototype,vje=yje.hasOwnProperty;function xje(e,t){var r=dje(e),n=!r&&pje(e),i=!r&&!n&&mje(e),o=!r&&!n&&!i&&_je(e),a=r||n||i||o,s=a?fje(e.length,String):[],l=s.length;for(var c in e)(t||vje.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gje(c,l)))&&s.push(c);return s}jJt.exports=xje});var O4=H((n$n,XJt)=>{var bje=Object.prototype;function wje(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||bje;return e===r}XJt.exports=wje});var gst=H((i$n,$Jt)=>{function Sje(e,t){return function(r){return e(t(r))}}$Jt.exports=Sje});var ZJt=H((o$n,KJt)=>{var Mje=gst(),Eje=Mje(Object.keys,Object);KJt.exports=Eje});var VB=H((a$n,JJt)=>{var Tje=O4(),Cje=ZJt(),Aje=Object.prototype,Pje=Aje.hasOwnProperty;function Ije(e){if(!Tje(e))return Cje(e);var t=[];for(var r in Object(e))Pje.call(e,r)&&r!="constructor"&&t.push(r);return t}JJt.exports=Ije});var Bf=H((s$n,QJt)=>{var Lje=FS(),kje=BB();function Rje(e){return e!=null&&kje(e.length)&&!Lje(e)}QJt.exports=Rje});var Ad=H((l$n,tQt)=>{var Nje=mst(),Dje=VB(),Oje=Bf();function zje(e){return Oje(e)?Nje(e):Dje(e)}tQt.exports=zje});var rQt=H((c$n,eQt)=>{var Fje=US(),Bje=Ad();function Hje(e,t){return e&&Fje(t,Bje(t),e)}eQt.exports=Hje});var iQt=H((u$n,nQt)=>{function Vje(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}nQt.exports=Vje});var aQt=H((h$n,oQt)=>{var Uje=Ml(),qje=O4(),Gje=iQt(),Wje=Object.prototype,Yje=Wje.hasOwnProperty;function jje(e){if(!Uje(e))return Gje(e);var t=qje(e),r=[];for(var n in e)n=="constructor"&&(t||!Yje.call(e,n))||r.push(n);return r}oQt.exports=jje});var c0=H((f$n,sQt)=>{var Xje=mst(),$je=aQt(),Kje=Bf();function Zje(e){return Kje(e)?Xje(e,!0):$je(e)}sQt.exports=Zje});var cQt=H((p$n,lQt)=>{var Jje=US(),Qje=c0();function tXe(e,t){return e&&Jje(t,Qje(t),e)}lQt.exports=tXe});var _st=H((z4,jS)=>{var eXe=Hc(),pQt=typeof z4=="object"&&z4&&!z4.nodeType&&z4,uQt=pQt&&typeof jS=="object"&&jS&&!jS.nodeType&&jS,rXe=uQt&&uQt.exports===pQt,hQt=rXe?eXe.Buffer:void 0,fQt=hQt?hQt.allocUnsafe:void 0;function nXe(e,t){if(t)return e.slice();var r=e.length,n=fQt?fQt(r):new e.constructor(r);return e.copy(n),n}jS.exports=nXe});var yst=H((d$n,dQt)=>{function iXe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}dQt.exports=iXe});var vst=H((m$n,mQt)=>{function oXe(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}mQt.exports=oXe});var xst=H((g$n,gQt)=>{function aXe(){return[]}gQt.exports=aXe});var UB=H((_$n,yQt)=>{var sXe=vst(),lXe=xst(),cXe=Object.prototype,uXe=cXe.propertyIsEnumerable,_Qt=Object.getOwnPropertySymbols,hXe=_Qt?function(e){return e==null?[]:(e=Object(e),sXe(_Qt(e),function(t){return uXe.call(e,t)}))}:lXe;yQt.exports=hXe});var xQt=H((y$n,vQt)=>{var fXe=US(),pXe=UB();function dXe(e,t){return fXe(e,pXe(e),t)}vQt.exports=dXe});var qB=H((v$n,bQt)=>{function mXe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}bQt.exports=mXe});var F4=H((x$n,wQt)=>{var gXe=gst(),_Xe=gXe(Object.getPrototypeOf,Object);wQt.exports=_Xe});var bst=H((b$n,SQt)=>{var yXe=qB(),vXe=F4(),xXe=UB(),bXe=xst(),wXe=Object.getOwnPropertySymbols,SXe=wXe?function(e){for(var t=[];e;)yXe(t,xXe(e)),e=vXe(e);return t}:bXe;SQt.exports=SXe});var EQt=H((w$n,MQt)=>{var MXe=US(),EXe=bst();function TXe(e,t){return MXe(e,EXe(e),t)}MQt.exports=TXe});var wst=H((S$n,TQt)=>{var CXe=qB(),AXe=Ti();function PXe(e,t,r){var n=t(e);return AXe(e)?n:CXe(n,r(e))}TQt.exports=PXe});var Sst=H((M$n,CQt)=>{var IXe=wst(),LXe=UB(),kXe=Ad();function RXe(e){return IXe(e,kXe,LXe)}CQt.exports=RXe});var PQt=H((E$n,AQt)=>{var NXe=wst(),DXe=bst(),OXe=c0();function zXe(e){return NXe(e,OXe,DXe)}AQt.exports=zXe});var LQt=H((T$n,IQt)=>{var FXe=l0(),BXe=Hc(),HXe=FXe(BXe,"DataView");IQt.exports=HXe});var RQt=H((C$n,kQt)=>{var VXe=l0(),UXe=Hc(),qXe=VXe(UXe,"Promise");kQt.exports=qXe});var Mst=H((A$n,NQt)=>{var GXe=l0(),WXe=Hc(),YXe=GXe(WXe,"Set");NQt.exports=YXe});var OQt=H((P$n,DQt)=>{var jXe=l0(),XXe=Hc(),$Xe=jXe(XXe,"WeakMap");DQt.exports=$Xe});var K1=H((I$n,qQt)=>{var Est=LQt(),Tst=OB(),Cst=RQt(),Ast=Mst(),Pst=OQt(),UQt=s0(),XS=fst(),zQt="[object Map]",KXe="[object Object]",FQt="[object Promise]",BQt="[object Set]",HQt="[object WeakMap]",VQt="[object DataView]",ZXe=XS(Est),JXe=XS(Tst),QXe=XS(Cst),t$e=XS(Ast),e$e=XS(Pst),$1=UQt;(Est&&$1(new Est(new ArrayBuffer(1)))!=VQt||Tst&&$1(new Tst)!=zQt||Cst&&$1(Cst.resolve())!=FQt||Ast&&$1(new Ast)!=BQt||Pst&&$1(new Pst)!=HQt)&&($1=function(e){var t=UQt(e),r=t==KXe?e.constructor:void 0,n=r?XS(r):"";if(n)switch(n){case ZXe:return VQt;case JXe:return zQt;case QXe:return FQt;case t$e:return BQt;case e$e:return HQt}return t});qQt.exports=$1});var WQt=H((L$n,GQt)=>{var r$e=Object.prototype,n$e=r$e.hasOwnProperty;function i$e(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&n$e.call(e,"index")&&(r.index=e.index,r.input=e.input),r}GQt.exports=i$e});var Ist=H((k$n,YQt)=>{var o$e=Hc(),a$e=o$e.Uint8Array;YQt.exports=a$e});var GB=H((R$n,XQt)=>{var jQt=Ist();function s$e(e){var t=new e.constructor(e.byteLength);return new jQt(t).set(new jQt(e)),t}XQt.exports=s$e});var KQt=H((N$n,$Qt)=>{var l$e=GB();function c$e(e,t){var r=t?l$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}$Qt.exports=c$e});var JQt=H((D$n,ZQt)=>{var u$e=/\w*$/;function h$e(e){var t=new e.constructor(e.source,u$e.exec(e));return t.lastIndex=e.lastIndex,t}ZQt.exports=h$e});var nte=H((O$n,rte)=>{var QQt=j1(),tte=QQt?QQt.prototype:void 0,ete=tte?tte.valueOf:void 0;function f$e(e){return ete?Object(ete.call(e)):{}}rte.exports=f$e});var Lst=H((z$n,ite)=>{var p$e=GB();function d$e(e,t){var r=t?p$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}ite.exports=d$e});var ate=H((F$n,ote)=>{var m$e=GB(),g$e=KQt(),_$e=JQt(),y$e=nte(),v$e=Lst(),x$e="[object Boolean]",b$e="[object Date]",w$e="[object Map]",S$e="[object Number]",M$e="[object RegExp]",E$e="[object Set]",T$e="[object String]",C$e="[object Symbol]",A$e="[object ArrayBuffer]",P$e="[object DataView]",I$e="[object Float32Array]",L$e="[object Float64Array]",k$e="[object Int8Array]",R$e="[object Int16Array]",N$e="[object Int32Array]",D$e="[object Uint8Array]",O$e="[object Uint8ClampedArray]",z$e="[object Uint16Array]",F$e="[object Uint32Array]";function B$e(e,t,r){var n=e.constructor;switch(t){case A$e:return m$e(e);case x$e:case b$e:return new n(+e);case P$e:return g$e(e,r);case I$e:case L$e:case k$e:case R$e:case N$e:case D$e:case O$e:case z$e:case F$e:return v$e(e,r);case w$e:return new n;case S$e:case T$e:return new n(e);case M$e:return _$e(e);case E$e:return new n;case C$e:return y$e(e)}}ote.exports=B$e});var kst=H((B$n,lte)=>{var H$e=Ml(),ste=Object.create,V$e=function(){function e(){}return function(t){if(!H$e(t))return{};if(ste)return ste(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();lte.exports=V$e});var Rst=H((H$n,cte)=>{var U$e=kst(),q$e=F4(),G$e=O4();function W$e(e){return typeof e.constructor=="function"&&!G$e(e)?U$e(q$e(e)):{}}cte.exports=W$e});var hte=H((V$n,ute)=>{var Y$e=K1(),j$e=Yu(),X$e="[object Map]";function $$e(e){return j$e(e)&&Y$e(e)==X$e}ute.exports=$$e});var mte=H((U$n,dte)=>{var K$e=hte(),Z$e=R4(),fte=HB(),pte=fte&&fte.isMap,J$e=pte?Z$e(pte):K$e;dte.exports=J$e});var _te=H((q$n,gte)=>{var Q$e=K1(),tKe=Yu(),eKe="[object Set]";function rKe(e){return tKe(e)&&Q$e(e)==eKe}gte.exports=rKe});var bte=H((G$n,xte)=>{var nKe=_te(),iKe=R4(),yte=HB(),vte=yte&&yte.isSet,oKe=vte?iKe(vte):nKe;xte.exports=oKe});var Nst=H((W$n,Ete)=>{var aKe=A4(),sKe=FB(),lKe=I4(),cKe=rQt(),uKe=cQt(),hKe=_st(),fKe=yst(),pKe=xQt(),dKe=EQt(),mKe=Sst(),gKe=PQt(),_Ke=K1(),yKe=WQt(),vKe=ate(),xKe=Rst(),bKe=Ti(),wKe=X1(),SKe=mte(),MKe=Ml(),EKe=bte(),TKe=Ad(),CKe=c0(),AKe=1,PKe=2,IKe=4,wte="[object Arguments]",LKe="[object Array]",kKe="[object Boolean]",RKe="[object Date]",NKe="[object Error]",Ste="[object Function]",DKe="[object GeneratorFunction]",OKe="[object Map]",zKe="[object Number]",Mte="[object Object]",FKe="[object RegExp]",BKe="[object Set]",HKe="[object String]",VKe="[object Symbol]",UKe="[object WeakMap]",qKe="[object ArrayBuffer]",GKe="[object DataView]",WKe="[object Float32Array]",YKe="[object Float64Array]",jKe="[object Int8Array]",XKe="[object Int16Array]",$Ke="[object Int32Array]",KKe="[object Uint8Array]",ZKe="[object Uint8ClampedArray]",JKe="[object Uint16Array]",QKe="[object Uint32Array]",An={};An[wte]=An[LKe]=An[qKe]=An[GKe]=An[kKe]=An[RKe]=An[WKe]=An[YKe]=An[jKe]=An[XKe]=An[$Ke]=An[OKe]=An[zKe]=An[Mte]=An[FKe]=An[BKe]=An[HKe]=An[VKe]=An[KKe]=An[ZKe]=An[JKe]=An[QKe]=!0;An[NKe]=An[Ste]=An[UKe]=!1;function WB(e,t,r,n,i,o){var a,s=t&AKe,l=t&PKe,c=t&IKe;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!MKe(e))return e;var u=bKe(e);if(u){if(a=yKe(e),!s)return fKe(e,a)}else{var h=_Ke(e),f=h==Ste||h==DKe;if(wKe(e))return hKe(e,s);if(h==Mte||h==wte||f&&!i){if(a=l||f?{}:xKe(e),!s)return l?dKe(e,uKe(a,e)):pKe(e,cKe(a,e))}else{if(!An[h])return i?e:{};a=vKe(e,h,s)}}o||(o=new aKe);var p=o.get(e);if(p)return p;o.set(e,a),EKe(e)?e.forEach(function(_){a.add(WB(_,t,r,_,e,o))}):SKe(e)&&e.forEach(function(_,y){a.set(y,WB(_,t,r,y,e,o))});var d=c?l?gKe:mKe:l?CKe:TKe,g=u?void 0:d(e);return sKe(g||e,function(_,y){g&&(y=_,_=e[y]),lKe(a,y,WB(_,t,r,y,e,o))}),a}Ete.exports=WB});var Cte=H((Y$n,Tte)=>{var tZe=Nst(),eZe=4;function rZe(e){return tZe(e,eZe)}Tte.exports=rZe});var YB=H((j$n,Ate)=>{function nZe(e){return function(){return e}}Ate.exports=nZe});var Ite=H((X$n,Pte)=>{function iZe(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}}Pte.exports=iZe});var jB=H(($$n,Lte)=>{var oZe=Ite(),aZe=oZe();Lte.exports=aZe});var XB=H((K$n,kte)=>{var sZe=jB(),lZe=Ad();function cZe(e,t){return e&&sZe(e,t,lZe)}kte.exports=cZe});var Nte=H((Z$n,Rte)=>{var uZe=Bf();function hZe(e,t){return function(r,n){if(r==null)return r;if(!uZe(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}}Rte.exports=hZe});var B4=H((J$n,Dte)=>{var fZe=XB(),pZe=Nte(),dZe=pZe(fZe);Dte.exports=dZe});var u0=H((Q$n,Ote)=>{function mZe(e){return e}Ote.exports=mZe});var Dst=H((tKn,zte)=>{var gZe=u0();function _Ze(e){return typeof e=="function"?e:gZe}zte.exports=_Ze});var Ost=H((eKn,Fte)=>{var yZe=FB(),vZe=B4(),xZe=Dst(),bZe=Ti();function wZe(e,t){var r=bZe(e)?yZe:vZe;return r(e,xZe(t))}Fte.exports=wZe});var zst=H((rKn,Bte)=>{Bte.exports=Ost()});var Vte=H((nKn,Hte)=>{var SZe=B4();function MZe(e,t){var r=[];return SZe(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}Hte.exports=MZe});var qte=H((iKn,Ute)=>{var EZe="__lodash_hash_undefined__";function TZe(e){return this.__data__.set(e,EZe),this}Ute.exports=TZe});var Wte=H((oKn,Gte)=>{function CZe(e){return this.__data__.has(e)}Gte.exports=CZe});var Fst=H((aKn,Yte)=>{var AZe=zB(),PZe=qte(),IZe=Wte();function $B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new AZe;++t<r;)this.add(e[t])}$B.prototype.add=$B.prototype.push=PZe;$B.prototype.has=IZe;Yte.exports=$B});var Xte=H((sKn,jte)=>{function LZe(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=LZe});var Bst=H((lKn,$te)=>{function kZe(e,t){return e.has(t)}$te.exports=kZe});var Hst=H((cKn,Kte)=>{var RZe=Fst(),NZe=Xte(),DZe=Bst(),OZe=1,zZe=2;function FZe(e,t,r,n,i,o){var a=r&OZe,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&zZe?new RZe: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(!NZe(t,function(y,x){if(!DZe(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}Kte.exports=FZe});var Jte=H((uKn,Zte)=>{function BZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}Zte.exports=BZe});var KB=H((hKn,Qte)=>{function HZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}Qte.exports=HZe});var iee=H((fKn,nee)=>{var tee=j1(),eee=Ist(),VZe=Y1(),UZe=Hst(),qZe=Jte(),GZe=KB(),WZe=1,YZe=2,jZe="[object Boolean]",XZe="[object Date]",$Ze="[object Error]",KZe="[object Map]",ZZe="[object Number]",JZe="[object RegExp]",QZe="[object Set]",tJe="[object String]",eJe="[object Symbol]",rJe="[object ArrayBuffer]",nJe="[object DataView]",ree=tee?tee.prototype:void 0,Vst=ree?ree.valueOf:void 0;function iJe(e,t,r,n,i,o,a){switch(r){case nJe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rJe:return!(e.byteLength!=t.byteLength||!o(new eee(e),new eee(t)));case jZe:case XZe:case ZZe:return VZe(+e,+t);case $Ze:return e.name==t.name&&e.message==t.message;case JZe:case tJe:return e==t+"";case KZe:var s=qZe;case QZe:var l=n&WZe;if(s||(s=GZe),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=YZe,a.set(e,t);var u=UZe(s(e),s(t),n,i,o,a);return a.delete(e),u;case eJe:if(Vst)return Vst.call(e)==Vst.call(t)}return!1}nee.exports=iJe});var see=H((pKn,aee)=>{var oee=Sst(),oJe=1,aJe=Object.prototype,sJe=aJe.hasOwnProperty;function lJe(e,t,r,n,i,o){var a=r&oJe,s=oee(e),l=s.length,c=oee(t),u=c.length;if(l!=u&&!a)return!1;for(var h=l;h--;){var f=s[h];if(!(a?f in t:sJe.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}aee.exports=lJe});var mee=H((dKn,dee)=>{var Ust=A4(),cJe=Hst(),uJe=iee(),hJe=see(),lee=K1(),cee=Ti(),uee=X1(),fJe=YS(),pJe=1,hee="[object Arguments]",fee="[object Array]",ZB="[object Object]",dJe=Object.prototype,pee=dJe.hasOwnProperty;function mJe(e,t,r,n,i,o){var a=cee(e),s=cee(t),l=a?fee:lee(e),c=s?fee:lee(t);l=l==hee?ZB:l,c=c==hee?ZB:c;var u=l==ZB,h=c==ZB,f=l==c;if(f&&uee(e)){if(!uee(t))return!1;a=!0,u=!1}if(f&&!u)return o||(o=new Ust),a||fJe(e)?cJe(e,t,r,n,i,o):uJe(e,t,l,r,n,i,o);if(!(r&pJe)){var p=u&&pee.call(e,"__wrapped__"),d=h&&pee.call(t,"__wrapped__");if(p||d){var g=p?e.value():e,_=d?t.value():t;return o||(o=new Ust),i(g,_,r,n,o)}}return f?(o||(o=new Ust),hJe(e,t,r,n,i,o)):!1}dee.exports=mJe});var qst=H((mKn,yee)=>{var gJe=mee(),gee=Yu();function _ee(e,t,r,n,i){return e===t?!0:e==null||t==null||!gee(e)&&!gee(t)?e!==e&&t!==t:gJe(e,t,r,n,_ee,i)}yee.exports=_ee});var xee=H((gKn,vee)=>{var _Je=A4(),yJe=qst(),vJe=1,xJe=2;function bJe(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 _Je;if(n)var f=n(c,u,l,e,t,h);if(!(f===void 0?yJe(u,c,vJe|xJe,n,h):f))return!1}}return!0}vee.exports=bJe});var Gst=H((_Kn,bee)=>{var wJe=Ml();function SJe(e){return e===e&&!wJe(e)}bee.exports=SJe});var See=H((yKn,wee)=>{var MJe=Gst(),EJe=Ad();function TJe(e){for(var t=EJe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,MJe(i)]}return t}wee.exports=TJe});var Wst=H((vKn,Mee)=>{function CJe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}Mee.exports=CJe});var Tee=H((xKn,Eee)=>{var AJe=xee(),PJe=See(),IJe=Wst();function LJe(e){var t=PJe(e);return t.length==1&&t[0][2]?IJe(t[0][0],t[0][1]):function(r){return r===e||AJe(r,e,t)}}Eee.exports=LJe});var Z1=H((bKn,Cee)=>{var kJe=s0(),RJe=Yu(),NJe="[object Symbol]";function DJe(e){return typeof e=="symbol"||RJe(e)&&kJe(e)==NJe}Cee.exports=DJe});var JB=H((wKn,Aee)=>{var OJe=Ti(),zJe=Z1(),FJe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,BJe=/^\w*$/;function HJe(e,t){if(OJe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||zJe(e)?!0:BJe.test(e)||!FJe.test(e)||t!=null&&e in Object(t)}Aee.exports=HJe});var Lee=H((SKn,Iee)=>{var Pee=zB(),VJe="Expected a function";function Yst(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VJe);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(Yst.Cache||Pee),r}Yst.Cache=Pee;Iee.exports=Yst});var Ree=H((MKn,kee)=>{var UJe=Lee(),qJe=500;function GJe(e){var t=UJe(e,function(n){return r.size===qJe&&r.clear(),n}),r=t.cache;return t}kee.exports=GJe});var Dee=H((EKn,Nee)=>{var WJe=Ree(),YJe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jJe=/\\(\\)?/g,XJe=WJe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(YJe,function(r,n,i,o){t.push(i?o.replace(jJe,"$1"):n||r)}),t});Nee.exports=XJe});var H4=H((TKn,Oee)=>{function $Je(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}Oee.exports=$Je});var Uee=H((CKn,Vee)=>{var zee=j1(),KJe=H4(),ZJe=Ti(),JJe=Z1(),QJe=1/0,Fee=zee?zee.prototype:void 0,Bee=Fee?Fee.toString:void 0;function Hee(e){if(typeof e=="string")return e;if(ZJe(e))return KJe(e,Hee)+"";if(JJe(e))return Bee?Bee.call(e):"";var t=e+"";return t=="0"&&1/e==-QJe?"-0":t}Vee.exports=Hee});var jst=H((AKn,qee)=>{var tQe=Uee();function eQe(e){return e==null?"":tQe(e)}qee.exports=eQe});var V4=H((PKn,Gee)=>{var rQe=Ti(),nQe=JB(),iQe=Dee(),oQe=jst();function aQe(e,t){return rQe(e)?e:nQe(e,t)?[e]:iQe(oQe(e))}Gee.exports=aQe});var $S=H((IKn,Wee)=>{var sQe=Z1(),lQe=1/0;function cQe(e){if(typeof e=="string"||sQe(e))return e;var t=e+"";return t=="0"&&1/e==-lQe?"-0":t}Wee.exports=cQe});var U4=H((LKn,Yee)=>{var uQe=V4(),hQe=$S();function fQe(e,t){t=uQe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hQe(t[r++])];return r&&r==n?e:void 0}Yee.exports=fQe});var Xee=H((kKn,jee)=>{var pQe=U4();function dQe(e,t,r){var n=e==null?void 0:pQe(e,t);return n===void 0?r:n}jee.exports=dQe});var Kee=H((RKn,$ee)=>{function mQe(e,t){return e!=null&&t in Object(e)}$ee.exports=mQe});var Xst=H((NKn,Zee)=>{var gQe=V4(),_Qe=qS(),yQe=Ti(),vQe=k4(),xQe=BB(),bQe=$S();function wQe(e,t,r){t=gQe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=bQe(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&&xQe(i)&&vQe(a,i)&&(yQe(e)||_Qe(e)))}Zee.exports=wQe});var $st=H((DKn,Jee)=>{var SQe=Kee(),MQe=Xst();function EQe(e,t){return e!=null&&MQe(e,t,SQe)}Jee.exports=EQe});var tre=H((OKn,Qee)=>{var TQe=qst(),CQe=Xee(),AQe=$st(),PQe=JB(),IQe=Gst(),LQe=Wst(),kQe=$S(),RQe=1,NQe=2;function DQe(e,t){return PQe(e)&&IQe(t)?LQe(kQe(e),t):function(r){var n=CQe(r,e);return n===void 0&&n===t?AQe(r,e):TQe(t,n,RQe|NQe)}}Qee.exports=DQe});var Kst=H((zKn,ere)=>{function OQe(e){return function(t){return t==null?void 0:t[e]}}ere.exports=OQe});var nre=H((FKn,rre)=>{var zQe=U4();function FQe(e){return function(t){return zQe(t,e)}}rre.exports=FQe});var ore=H((BKn,ire)=>{var BQe=Kst(),HQe=nre(),VQe=JB(),UQe=$S();function qQe(e){return VQe(e)?BQe(UQe(e)):HQe(e)}ire.exports=qQe});var Hf=H((HKn,are)=>{var GQe=Tee(),WQe=tre(),YQe=u0(),jQe=Ti(),XQe=ore();function $Qe(e){return typeof e=="function"?e:e==null?YQe:typeof e=="object"?jQe(e)?WQe(e[0],e[1]):GQe(e):XQe(e)}are.exports=$Qe});var Zst=H((VKn,sre)=>{var KQe=vst(),ZQe=Vte(),JQe=Hf(),QQe=Ti();function ttr(e,t){var r=QQe(e)?KQe:ZQe;return r(e,JQe(t,3))}sre.exports=ttr});var cre=H((UKn,lre)=>{var etr=Object.prototype,rtr=etr.hasOwnProperty;function ntr(e,t){return e!=null&&rtr.call(e,t)}lre.exports=ntr});var Jst=H((qKn,ure)=>{var itr=cre(),otr=Xst();function atr(e,t){return e!=null&&otr(e,t,itr)}ure.exports=atr});var fre=H((GKn,hre)=>{var str=VB(),ltr=K1(),ctr=qS(),utr=Ti(),htr=Bf(),ftr=X1(),ptr=O4(),dtr=YS(),mtr="[object Map]",gtr="[object Set]",_tr=Object.prototype,ytr=_tr.hasOwnProperty;function vtr(e){if(e==null)return!0;if(htr(e)&&(utr(e)||typeof e=="string"||typeof e.splice=="function"||ftr(e)||dtr(e)||ctr(e)))return!e.length;var t=ltr(e);if(t==mtr||t==gtr)return!e.size;if(ptr(e))return!str(e).length;for(var r in e)if(ytr.call(e,r))return!1;return!0}hre.exports=vtr});var Qst=H((WKn,pre)=>{function xtr(e){return e===void 0}pre.exports=xtr});var tlt=H((YKn,dre)=>{var btr=B4(),wtr=Bf();function Str(e,t){var r=-1,n=wtr(e)?Array(e.length):[];return btr(e,function(i,o,a){n[++r]=t(i,o,a)}),n}dre.exports=Str});var elt=H((jKn,mre)=>{var Mtr=H4(),Etr=Hf(),Ttr=tlt(),Ctr=Ti();function Atr(e,t){var r=Ctr(e)?Mtr:Ttr;return r(e,Etr(t,3))}mre.exports=Atr});var _re=H((XKn,gre)=>{function Ptr(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}gre.exports=Ptr});var vre=H(($Kn,yre)=>{function Itr(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}yre.exports=Itr});var rlt=H((KKn,xre)=>{var Ltr=_re(),ktr=B4(),Rtr=Hf(),Ntr=vre(),Dtr=Ti();function Otr(e,t,r){var n=Dtr(e)?Ltr:Ntr,i=arguments.length<3;return n(e,Rtr(t,4),r,i,ktr)}xre.exports=Otr});var wre=H((ZKn,bre)=>{var ztr=s0(),Ftr=Ti(),Btr=Yu(),Htr="[object String]";function Vtr(e){return typeof e=="string"||!Ftr(e)&&Btr(e)&&ztr(e)==Htr}bre.exports=Vtr});var Mre=H((JKn,Sre)=>{var Utr=Kst(),qtr=Utr("length");Sre.exports=qtr});var Tre=H((QKn,Ere)=>{var Gtr="\\ud800-\\udfff",Wtr="\\u0300-\\u036f",Ytr="\\ufe20-\\ufe2f",jtr="\\u20d0-\\u20ff",Xtr=Wtr+Ytr+jtr,$tr="\\ufe0e\\ufe0f",Ktr="\\u200d",Ztr=RegExp("["+Ktr+Gtr+Xtr+$tr+"]");function Jtr(e){return Ztr.test(e)}Ere.exports=Jtr});var Dre=H((tZn,Nre)=>{var Are="\\ud800-\\udfff",Qtr="\\u0300-\\u036f",ter="\\ufe20-\\ufe2f",eer="\\u20d0-\\u20ff",rer=Qtr+ter+eer,ner="\\ufe0e\\ufe0f",ier="["+Are+"]",nlt="["+rer+"]",ilt="\\ud83c[\\udffb-\\udfff]",oer="(?:"+nlt+"|"+ilt+")",Pre="[^"+Are+"]",Ire="(?:\\ud83c[\\udde6-\\uddff]){2}",Lre="[\\ud800-\\udbff][\\udc00-\\udfff]",aer="\\u200d",kre=oer+"?",Rre="["+ner+"]?",ser="(?:"+aer+"(?:"+[Pre,Ire,Lre].join("|")+")"+Rre+kre+")*",ler=Rre+kre+ser,cer="(?:"+[Pre+nlt+"?",nlt,Ire,Lre,ier].join("|")+")",Cre=RegExp(ilt+"(?="+ilt+")|"+cer+ler,"g");function uer(e){for(var t=Cre.lastIndex=0;Cre.test(e);)++t;return t}Nre.exports=uer});var zre=H((eZn,Ore)=>{var her=Mre(),fer=Tre(),per=Dre();function der(e){return fer(e)?per(e):her(e)}Ore.exports=der});var Bre=H((rZn,Fre)=>{var mer=VB(),ger=K1(),_er=Bf(),yer=wre(),ver=zre(),xer="[object Map]",ber="[object Set]";function wer(e){if(e==null)return 0;if(_er(e))return yer(e)?ver(e):e.length;var t=ger(e);return t==xer||t==ber?e.size:mer(e).length}Fre.exports=wer});var Vre=H((nZn,Hre)=>{var Ser=FB(),Mer=kst(),Eer=XB(),Ter=Hf(),Cer=F4(),Aer=Ti(),Per=X1(),Ier=FS(),Ler=Ml(),ker=YS();function Rer(e,t,r){var n=Aer(e),i=n||Per(e)||ker(e);if(t=Ter(t,4),r==null){var o=e&&e.constructor;i?r=n?new o:[]:Ler(e)?r=Ier(o)?Mer(Cer(e)):{}:r={}}return(i?Ser:Eer)(e,function(a,s,l){return t(r,a,s,l)}),r}Hre.exports=Rer});var Wre=H((iZn,Gre)=>{var Ure=j1(),Ner=qS(),Der=Ti(),qre=Ure?Ure.isConcatSpreadable:void 0;function Oer(e){return Der(e)||Ner(e)||!!(qre&&e&&e[qre])}Gre.exports=Oer});var QB=H((oZn,jre)=>{var zer=qB(),Fer=Wre();function Yre(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Fer),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Yre(s,t-1,r,n,i):zer(i,s):n||(i[i.length]=s)}return i}jre.exports=Yre});var $re=H((aZn,Xre)=>{function Ber(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)}Xre.exports=Ber});var olt=H((sZn,Zre)=>{var Her=$re(),Kre=Math.max;function Ver(e,t,r){return t=Kre(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Kre(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),Her(e,this,s)}}Zre.exports=Ver});var tne=H((lZn,Qre)=>{var Uer=YB(),Jre=pst(),qer=u0(),Ger=Jre?function(e,t){return Jre(e,"toString",{configurable:!0,enumerable:!1,value:Uer(t),writable:!0})}:qer;Qre.exports=Ger});var rne=H((cZn,ene)=>{var Wer=800,Yer=16,jer=Date.now;function Xer(e){var t=0,r=0;return function(){var n=jer(),i=Yer-(n-r);if(r=n,i>0){if(++t>=Wer)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ene.exports=Xer});var alt=H((uZn,nne)=>{var $er=tne(),Ker=rne(),Zer=Ker($er);nne.exports=Zer});var q4=H((hZn,ine)=>{var Jer=u0(),Qer=olt(),trr=alt();function err(e,t){return trr(Qer(e,t,Jer),e+"")}ine.exports=err});var slt=H((fZn,one)=>{function rrr(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}one.exports=rrr});var sne=H((pZn,ane)=>{function nrr(e){return e!==e}ane.exports=nrr});var cne=H((dZn,lne)=>{function irr(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}lne.exports=irr});var hne=H((mZn,une)=>{var orr=slt(),arr=sne(),srr=cne();function lrr(e,t,r){return t===t?srr(e,t,r):orr(e,arr,r)}une.exports=lrr});var pne=H((gZn,fne)=>{var crr=hne();function urr(e,t){var r=e==null?0:e.length;return!!r&&crr(e,t,0)>-1}fne.exports=urr});var mne=H((_Zn,dne)=>{function hrr(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}dne.exports=hrr});var _ne=H((yZn,gne)=>{function frr(){}gne.exports=frr});var vne=H((vZn,yne)=>{var llt=Mst(),prr=_ne(),drr=KB(),mrr=1/0,grr=llt&&1/drr(new llt([,-0]))[1]==mrr?function(e){return new llt(e)}:prr;yne.exports=grr});var bne=H((xZn,xne)=>{var _rr=Fst(),yrr=pne(),vrr=mne(),xrr=Bst(),brr=vne(),wrr=KB(),Srr=200;function Mrr(e,t,r){var n=-1,i=yrr,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=vrr;else if(o>=Srr){var c=t?null:brr(e);if(c)return wrr(c);a=!1,i=xrr,l=new _rr}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}xne.exports=Mrr});var clt=H((bZn,wne)=>{var Err=Bf(),Trr=Yu();function Crr(e){return Trr(e)&&Err(e)}wne.exports=Crr});var Mne=H((wZn,Sne)=>{var Arr=QB(),Prr=q4(),Irr=bne(),Lrr=clt(),krr=Prr(function(e){return Irr(Arr(e,1,Lrr,!0))});Sne.exports=krr});var Tne=H((SZn,Ene)=>{var Rrr=H4();function Nrr(e,t){return Rrr(t,function(r){return e[r]})}Ene.exports=Nrr});var ult=H((MZn,Cne)=>{var Drr=Tne(),Orr=Ad();function zrr(e){return e==null?[]:Drr(e,Orr(e))}Cne.exports=zrr});var El=H((EZn,Ane)=>{var tH;if(typeof Ex=="function")try{tH={clone:Cte(),constant:YB(),each:zst(),filter:Zst(),has:Jst(),isArray:Ti(),isEmpty:fre(),isFunction:FS(),isUndefined:Qst(),keys:Ad(),map:elt(),reduce:rlt(),size:Bre(),transform:Vre(),union:Mne(),values:ult()}}catch(e){}tH||(tH=window._);Ane.exports=tH});var eH=H((CZn,kne)=>{"use strict";var je=El();kne.exports=cr;var Frr="\0",J1="\0",Pne="";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[J1]={}),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]=J1,this._children[e]={},this._children[J1][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=J1;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!==J1)return t}};cr.prototype.children=function(e){if(je.isUndefined(e)&&(e=J1),this._isCompound){var t=this._children[e];if(t)return je.keys(t)}else{if(e===J1)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=G4(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=Brr(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Ine(this._preds[t],e),Ine(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?hlt(this._isDirected,arguments[0]):G4(this._isDirected,e,t,r);return this._edgeLabels[n]};cr.prototype.hasEdge=function(e,t,r){var n=arguments.length===1?hlt(this._isDirected,arguments[0]):G4(this._isDirected,e,t,r);return je.has(this._edgeLabels,n)};cr.prototype.removeEdge=function(e,t,r){var n=arguments.length===1?hlt(this._isDirected,arguments[0]):G4(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],Lne(this._preds[t],e),Lne(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 Ine(e,t){e[t]?e[t]++:e[t]=1}function Lne(e,t){--e[t]||delete e[t]}function G4(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}return i+Pne+o+Pne+(je.isUndefined(n)?Frr:n)}function Brr(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 hlt(e,t){return G4(e,t.v,t.w,t.name)}});var Nne=H((AZn,Rne)=>{Rne.exports="2.1.8"});var One=H((PZn,Dne)=>{Dne.exports={Graph:eH(),version:Nne()}});var Fne=H((IZn,zne)=>{var Vf=El(),Hrr=eH();zne.exports={write:Vrr,read:Grr};function Vrr(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Urr(e),edges:qrr(e)};return Vf.isUndefined(e.graph())||(t.value=Vf.clone(e.graph())),t}function Urr(e){return Vf.map(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return Vf.isUndefined(r)||(i.value=r),Vf.isUndefined(n)||(i.parent=n),i})}function qrr(e){return Vf.map(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Vf.isUndefined(t.name)||(n.name=t.name),Vf.isUndefined(r)||(n.value=r),n})}function Grr(e){var t=new Hrr(e.options).setGraph(e.value);return Vf.each(e.nodes,function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),Vf.each(e.edges,function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}});var Hne=H((LZn,Bne)=>{var rH=El();Bne.exports=Wrr;function Wrr(e){var t={},r=[],n;function i(o){rH.has(t,o)||(t[o]=!0,n.push(o),rH.each(e.successors(o),i),rH.each(e.predecessors(o),i))}return rH.each(e.nodes(),function(o){n=[],i(o),n.length&&r.push(n)}),r}});var flt=H((kZn,Une)=>{var Vne=El();Une.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 Vne.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),!Vne.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 plt=H((RZn,qne)=>{var Yrr=El(),jrr=flt();qne.exports=$rr;var Xrr=Yrr.constant(1);function $rr(e,t,r,n){return Krr(e,String(t),r||Xrr,n||function(i){return e.outEdges(i)})}function Krr(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 Wne=H((NZn,Gne)=>{var Zrr=plt(),Jrr=El();Gne.exports=Qrr;function Qrr(e,t,r){return Jrr.transform(e.nodes(),function(n,i){n[i]=Zrr(e,i,t,r)},{})}});var dlt=H((DZn,jne)=>{var Yne=El();jne.exports=tnr;function tnr(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){Yne.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){Yne.has(n,a)||o(a)}),i}});var $ne=H((OZn,Xne)=>{var enr=El(),rnr=dlt();Xne.exports=nnr;function nnr(e){return enr.filter(rnr(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var Zne=H((zZn,Kne)=>{var inr=El();Kne.exports=anr;var onr=inr.constant(1);function anr(e,t,r){return snr(e,t||onr,r||function(n){return e.outEdges(n)})}function snr(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 mlt=H((FZn,Qne)=>{var W4=El();Qne.exports=Jne;Jne.CycleException=nH;function Jne(e){var t={},r={},n=[];function i(o){if(W4.has(r,o))throw new nH;W4.has(t,o)||(r[o]=!0,t[o]=!0,W4.each(e.predecessors(o),i),delete r[o],n.push(o))}if(W4.each(e.sinks(),i),W4.size(t)!==e.nodeCount())throw new nH;return n}function nH(){}nH.prototype=new Error});var rie=H((BZn,eie)=>{var tie=mlt();eie.exports=lnr;function lnr(e){try{tie(e)}catch(t){if(t instanceof tie.CycleException)return!1;throw t}return!0}});var glt=H((HZn,iie)=>{var iH=El();iie.exports=cnr;function cnr(e,t,r){iH.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return iH.each(t,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);nie(e,a,r==="post",o,n,i)}),i}function nie(e,t,r,n,i,o){iH.has(n,t)||(n[t]=!0,r||o.push(t),iH.each(i(t),function(a){nie(e,a,r,n,i,o)}),r&&o.push(t))}});var aie=H((VZn,oie)=>{var unr=glt();oie.exports=hnr;function hnr(e,t){return unr(e,t,"post")}});var lie=H((UZn,sie)=>{var fnr=glt();sie.exports=pnr;function pnr(e,t){return fnr(e,t,"pre")}});var hie=H((qZn,uie)=>{var cie=El(),dnr=eH(),mnr=flt();uie.exports=gnr;function gnr(e,t){var r=new dnr,n={},i=new mnr,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;cie.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(),cie.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 pie=H((GZn,fie)=>{fie.exports={components:Hne(),dijkstra:plt(),dijkstraAll:Wne(),findCycles:$ne(),floydWarshall:Zne(),isAcyclic:rie(),postorder:aie(),preorder:lie(),prim:hie(),tarjan:dlt(),topsort:mlt()}});var gie=H((WZn,mie)=>{var die=One();mie.exports={Graph:die.Graph,json:Fne(),alg:pie(),version:die.version}});var Uc=H((YZn,_ie)=>{var oH;if(typeof Ex=="function")try{oH=gie()}catch(e){}oH||(oH=window.graphlib);_ie.exports=oH});var vie=H((XZn,yie)=>{var _nr=Nst(),ynr=1,vnr=4;function xnr(e){return _nr(e,ynr|vnr)}yie.exports=xnr});var Y4=H(($Zn,xie)=>{var bnr=Y1(),wnr=Bf(),Snr=k4(),Mnr=Ml();function Enr(e,t,r){if(!Mnr(r))return!1;var n=typeof t;return(n=="number"?wnr(r)&&Snr(t,r.length):n=="string"&&t in r)?bnr(r[t],e):!1}xie.exports=Enr});var Sie=H((KZn,wie)=>{var Tnr=q4(),Cnr=Y1(),Anr=Y4(),Pnr=c0(),bie=Object.prototype,Inr=bie.hasOwnProperty,Lnr=Tnr(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Anr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Pnr(o),s=-1,l=a.length;++s<l;){var c=a[s],u=e[c];(u===void 0||Cnr(u,bie[c])&&!Inr.call(e,c))&&(e[c]=o[c])}return e});wie.exports=Lnr});var Eie=H((ZZn,Mie)=>{var knr=Hf(),Rnr=Bf(),Nnr=Ad();function Dnr(e){return function(t,r,n){var i=Object(t);if(!Rnr(t)){var o=knr(r,3);t=Nnr(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}}Mie.exports=Dnr});var Cie=H((JZn,Tie)=>{var Onr=/\s/;function znr(e){for(var t=e.length;t--&&Onr.test(e.charAt(t)););return t}Tie.exports=znr});var Pie=H((QZn,Aie)=>{var Fnr=Cie(),Bnr=/^\s+/;function Hnr(e){return e&&e.slice(0,Fnr(e)+1).replace(Bnr,"")}Aie.exports=Hnr});var Rie=H((tJn,kie)=>{var Vnr=Pie(),Iie=Ml(),Unr=Z1(),Lie=0/0,qnr=/^[-+]0x[0-9a-f]+$/i,Gnr=/^0b[01]+$/i,Wnr=/^0o[0-7]+$/i,Ynr=parseInt;function jnr(e){if(typeof e=="number")return e;if(Unr(e))return Lie;if(Iie(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Iie(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Vnr(e);var r=Gnr.test(e);return r||Wnr.test(e)?Ynr(e.slice(2),r?2:8):qnr.test(e)?Lie:+e}kie.exports=jnr});var _lt=H((eJn,Die)=>{var Xnr=Rie(),Nie=1/0,$nr=17976931348623157e292;function Knr(e){if(!e)return e===0?e:0;if(e=Xnr(e),e===Nie||e===-Nie){var t=e<0?-1:1;return t*$nr}return e===e?e:0}Die.exports=Knr});var zie=H((rJn,Oie)=>{var Znr=_lt();function Jnr(e){var t=Znr(e),r=t%1;return t===t?r?t-r:t:0}Oie.exports=Jnr});var Bie=H((nJn,Fie)=>{var Qnr=slt(),tir=Hf(),eir=zie(),rir=Math.max;function nir(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:eir(r);return i<0&&(i=rir(n+i,0)),Qnr(e,tir(t,3),i)}Fie.exports=nir});var Vie=H((iJn,Hie)=>{var iir=Eie(),oir=Bie(),air=iir(oir);Hie.exports=air});var ylt=H((oJn,Uie)=>{var sir=QB();function lir(e){var t=e==null?0:e.length;return t?sir(e,1):[]}Uie.exports=lir});var Gie=H((aJn,qie)=>{var cir=jB(),uir=Dst(),hir=c0();function fir(e,t){return e==null?e:cir(e,uir(t),hir)}qie.exports=fir});var Yie=H((sJn,Wie)=>{function pir(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Wie.exports=pir});var Xie=H((lJn,jie)=>{var dir=P4(),mir=XB(),gir=Hf();function _ir(e,t){var r={};return t=gir(t,3),mir(e,function(n,i,o){dir(r,i,t(n,i,o))}),r}jie.exports=_ir});var aH=H((cJn,$ie)=>{var yir=Z1();function vir(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&&!yir(a):r(a,s)))var s=a,l=o}return l}$ie.exports=vir});var Zie=H((uJn,Kie)=>{function xir(e,t){return e>t}Kie.exports=xir});var Qie=H((hJn,Jie)=>{var bir=aH(),wir=Zie(),Sir=u0();function Mir(e){return e&&e.length?bir(e,Sir,wir):void 0}Jie.exports=Mir});var vlt=H((fJn,toe)=>{var Eir=P4(),Tir=Y1();function Cir(e,t,r){(r!==void 0&&!Tir(e[t],r)||r===void 0&&!(t in e))&&Eir(e,t,r)}toe.exports=Cir});var noe=H((pJn,roe)=>{var Air=s0(),Pir=F4(),Iir=Yu(),Lir="[object Object]",kir=Function.prototype,Rir=Object.prototype,eoe=kir.toString,Nir=Rir.hasOwnProperty,Dir=eoe.call(Object);function Oir(e){if(!Iir(e)||Air(e)!=Lir)return!1;var t=Pir(e);if(t===null)return!0;var r=Nir.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&eoe.call(r)==Dir}roe.exports=Oir});var xlt=H((dJn,ioe)=>{function zir(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}ioe.exports=zir});var aoe=H((mJn,ooe)=>{var Fir=US(),Bir=c0();function Hir(e){return Fir(e,Bir(e))}ooe.exports=Hir});var foe=H((gJn,hoe)=>{var soe=vlt(),Vir=_st(),Uir=Lst(),qir=yst(),Gir=Rst(),loe=qS(),coe=Ti(),Wir=clt(),Yir=X1(),jir=FS(),Xir=Ml(),$ir=noe(),Kir=YS(),uoe=xlt(),Zir=aoe();function Jir(e,t,r,n,i,o,a){var s=uoe(e,r),l=uoe(t,r),c=a.get(l);if(c){soe(e,r,c);return}var u=o?o(s,l,r+"",e,t,a):void 0,h=u===void 0;if(h){var f=coe(l),p=!f&&Yir(l),d=!f&&!p&&Kir(l);u=l,f||p||d?coe(s)?u=s:Wir(s)?u=qir(s):p?(h=!1,u=Vir(l,!0)):d?(h=!1,u=Uir(l,!0)):u=[]:$ir(l)||loe(l)?(u=s,loe(s)?u=Zir(s):(!Xir(s)||jir(s))&&(u=Gir(l))):h=!1}h&&(a.set(l,u),i(u,l,n,o,a),a.delete(l)),soe(e,r,u)}hoe.exports=Jir});var moe=H((_Jn,doe)=>{var Qir=A4(),tor=vlt(),eor=jB(),ror=foe(),nor=Ml(),ior=c0(),oor=xlt();function poe(e,t,r,n,i){e!==t&&eor(t,function(o,a){if(i||(i=new Qir),nor(o))ror(e,t,a,r,poe,n,i);else{var s=n?n(oor(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),tor(e,a,s)}},ior)}doe.exports=poe});var _oe=H((yJn,goe)=>{var aor=q4(),sor=Y4();function lor(e){return aor(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&&sor(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})}goe.exports=lor});var voe=H((vJn,yoe)=>{var cor=moe(),uor=_oe(),hor=uor(function(e,t,r){cor(e,t,r)});yoe.exports=hor});var blt=H((xJn,xoe)=>{function por(e,t){return e<t}xoe.exports=por});var woe=H((bJn,boe)=>{var dor=aH(),mor=blt(),gor=u0();function _or(e){return e&&e.length?dor(e,gor,mor):void 0}boe.exports=_or});var Moe=H((wJn,Soe)=>{var yor=aH(),vor=Hf(),xor=blt();function bor(e,t){return e&&e.length?yor(e,vor(t,2),xor):void 0}Soe.exports=bor});var Toe=H((SJn,Eoe)=>{var wor=Hc(),Sor=function(){return wor.Date.now()};Eoe.exports=Sor});var Poe=H((MJn,Aoe)=>{var Mor=I4(),Eor=V4(),Tor=k4(),Coe=Ml(),Cor=$S();function Aor(e,t,r,n){if(!Coe(e))return e;t=Eor(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var l=Cor(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=Coe(u)?u:Tor(t[i+1])?[]:{})}Mor(s,l,c),s=s[l]}return e}Aoe.exports=Aor});var Loe=H((EJn,Ioe)=>{var Por=U4(),Ior=Poe(),Lor=V4();function kor(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Por(e,a);r(s,a)&&Ior(o,Lor(a,e),s)}return o}Ioe.exports=kor});var Roe=H((TJn,koe)=>{var Ror=Loe(),Nor=$st();function Dor(e,t){return Ror(e,t,function(r,n){return Nor(e,n)})}koe.exports=Dor});var Doe=H((CJn,Noe)=>{var Oor=ylt(),zor=olt(),For=alt();function Bor(e){return For(zor(e,void 0,Oor),e+"")}Noe.exports=Bor});var zoe=H((AJn,Ooe)=>{var Hor=Roe(),Vor=Doe(),Uor=Vor(function(e,t){return e==null?{}:Hor(e,t)});Ooe.exports=Uor});var Boe=H((PJn,Foe)=>{var qor=Math.ceil,Gor=Math.max;function Wor(e,t,r,n){for(var i=-1,o=Gor(qor((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}Foe.exports=Wor});var Voe=H((IJn,Hoe)=>{var Yor=Boe(),jor=Y4(),wlt=_lt();function Xor(e){return function(t,r,n){return n&&typeof n!="number"&&jor(t,r,n)&&(r=n=void 0),t=wlt(t),r===void 0?(r=t,t=0):r=wlt(r),n=n===void 0?t<r?1:-1:wlt(n),Yor(t,r,n,e)}}Hoe.exports=Xor});var qoe=H((LJn,Uoe)=>{var $or=Voe(),Kor=$or();Uoe.exports=Kor});var Woe=H((kJn,Goe)=>{function Zor(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}Goe.exports=Zor});var Xoe=H((RJn,joe)=>{var Yoe=Z1();function Jor(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,o=Yoe(e),a=t!==void 0,s=t===null,l=t===t,c=Yoe(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=Jor});var Koe=H((NJn,$oe)=>{var Qor=Xoe();function tar(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=Qor(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}$oe.exports=tar});var Joe=H((DJn,Zoe)=>{var Slt=H4(),ear=U4(),rar=Hf(),nar=tlt(),iar=Woe(),oar=R4(),aar=Koe(),sar=u0(),lar=Ti();function car(e,t,r){t.length?t=Slt(t,function(o){return lar(o)?function(a){return ear(a,o.length===1?o[0]:o)}:o}):t=[sar];var n=-1;t=Slt(t,oar(rar));var i=nar(e,function(o,a,s){var l=Slt(t,function(c){return c(o)});return{criteria:l,index:++n,value:o}});return iar(i,function(o,a){return aar(o,a,r)})}Zoe.exports=car});var eae=H((OJn,tae)=>{var uar=QB(),har=Joe(),far=q4(),Qoe=Y4(),par=far(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Qoe(e,t[0],t[1])?t=[]:r>2&&Qoe(t[0],t[1],t[2])&&(t=[t[0]]),har(e,uar(t,1),[])});tae.exports=par});var nae=H((zJn,rae)=>{var dar=jst(),mar=0;function gar(e){var t=++mar;return dar(e)+t}rae.exports=gar});var oae=H((FJn,iae)=>{function _ar(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}iae.exports=_ar});var sae=H((BJn,aae)=>{var yar=I4(),xar=oae();function bar(e,t){return xar(e||[],t||[],yar)}aae.exports=bar});var qn=H((HJn,lae)=>{var sH;if(typeof Ex=="function")try{sH={cloneDeep:vie(),constant:YB(),defaults:Sie(),each:zst(),filter:Zst(),find:Vie(),flatten:ylt(),forEach:Ost(),forIn:Gie(),has:Jst(),isUndefined:Qst(),last:Yie(),map:elt(),mapValues:Xie(),max:Qie(),merge:voe(),min:woe(),minBy:Moe(),now:Toe(),pick:zoe(),range:qoe(),reduce:rlt(),sortBy:eae(),uniqueId:nae(),values:ult(),zipObject:sae()}}catch(e){}sH||(sH=window._);lae.exports=sH});var hae=H((UJn,uae)=>{uae.exports=lH;function lH(){var e={};e._next=e._prev=e,this._sentinel=e}lH.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return cae(t),t};lH.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&cae(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};lH.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,war)),r=r._prev;return"["+e.join(", ")+"]"};function cae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function war(e,t){if(e!=="_next"&&e!=="_prev")return t}});var pae=H((qJn,fae)=>{var Pd=qn(),Sar=Uc().Graph,Mar=hae();fae.exports=Tar;var Ear=Pd.constant(1);function Tar(e,t){if(e.nodeCount()<=1)return[];var r=Aar(e,t||Ear),n=Car(r.graph,r.buckets,r.zeroIdx);return Pd.flatten(Pd.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function Car(e,t,r){for(var n=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)Mlt(e,t,r,a);for(;a=i.dequeue();)Mlt(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(Mlt(e,t,r,a,!0));break}}}return n}function Mlt(e,t,r,n,i){var o=i?[]:void 0;return Pd.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,Elt(t,r,l)}),Pd.forEach(e.outEdges(n.v),function(a){var s=e.edge(a),l=a.w,c=e.node(l);c.in-=s,Elt(t,r,c)}),e.removeNode(n.v),o}function Aar(e,t){var r=new Sar,n=0,i=0;Pd.forEach(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),Pd.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=Pd.range(i+n+3).map(function(){return new Mar}),a=n+1;return Pd.forEach(r.nodes(),function(s){Elt(o,a,r.node(s))}),{graph:r,buckets:o,zeroIdx:a}}function Elt(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 mae=H((GJn,dae)=>{"use strict";var Q1=qn(),Par=pae();dae.exports={run:Iar,undo:kar};function Iar(e){var t=e.graph().acyclicer==="greedy"?Par(e,r(e)):Lar(e);Q1.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,Q1.uniqueId("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function Lar(e){var t=[],r={},n={};function i(o){Q1.has(n,o)||(n[o]=!0,r[o]=!0,Q1.forEach(e.outEdges(o),function(a){Q1.has(r,a.w)?t.push(a):i(a.w)}),delete r[o])}return Q1.forEach(e.nodes(),i),t}function kar(e){Q1.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 ns=H((WJn,vae)=>{"use strict";var Qr=qn(),gae=Uc().Graph;vae.exports={addDummyNode:_ae,simplify:Rar,asNonCompoundGraph:Nar,successorWeights:Dar,predecessorWeights:Oar,intersectRect:zar,buildLayerMatrix:Far,normalizeRanks:Bar,removeEmptyRanks:Har,addBorderNode:Var,maxRank:yae,partition:Uar,time:qar,notime:Gar};function _ae(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 Rar(e){var t=new gae().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 Nar(e){var t=new gae({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 Dar(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 Oar(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 zar(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 Far(e){var t=Qr.map(Qr.range(yae(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 Bar(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 Har(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 Var(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),_ae(e,"border",i,t)}function yae(e){return Qr.max(Qr.map(e.nodes(),function(t){var r=e.node(t).rank;if(!Qr.isUndefined(r))return r}))}function Uar(e,t){var r={lhs:[],rhs:[]};return Qr.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function qar(e,t){var r=Qr.now();try{return t()}finally{console.log(e+" time: "+(Qr.now()-r)+"ms")}}function Gar(e,t){return t()}});var wae=H((YJn,bae)=>{"use strict";var xae=qn(),War=ns();bae.exports={run:Yar,undo:Xar};function Yar(e){e.graph().dummyChains=[],xae.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=War.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 Xar(e){xae.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 j4=H((jJn,Sae)=>{"use strict";var cH=qn();Sae.exports={longestPath:$ar,slack:Kar};function $ar(e){var t={};function r(n){var i=e.node(n);if(cH.has(t,n))return i.rank;t[n]=!0;var o=cH.min(cH.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}cH.forEach(e.sources(),r)}function Kar(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var Tlt=H((XJn,Mae)=>{"use strict";var uH=qn(),Zar=Uc().Graph,hH=j4().slack;Mae.exports=Jar;function Jar(e){var t=new Zar({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;Qar(t,e)<n;)i=tsr(t,e),o=t.hasNode(i.v)?hH(e,i):-hH(e,i),esr(t,e,o);return t}function Qar(e,t){function r(n){uH.forEach(t.nodeEdges(n),function(i){var o=i.v,a=n===o?i.w:o;!e.hasNode(a)&&!hH(t,i)&&(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}return uH.forEach(e.nodes(),r),e.nodeCount()}function tsr(e,t){return uH.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return hH(t,r)})}function esr(e,t,r){uH.forEach(e.nodes(),function(n){t.node(n).rank+=r})}});var kae=H(($Jn,Lae)=>{"use strict";var Id=qn(),rsr=Tlt(),nsr=j4().slack,isr=j4().longestPath,osr=Uc().alg.preorder,asr=Uc().alg.postorder,ssr=ns().simplify;Lae.exports=tv;tv.initLowLimValues=Alt;tv.initCutValues=Clt;tv.calcCutValue=Tae;tv.leaveEdge=Aae;tv.enterEdge=Pae;tv.exchangeEdges=Iae;function tv(e){e=ssr(e),isr(e);var t=rsr(e);Alt(t),Clt(t,e);for(var r,n;r=Aae(t);)n=Pae(t,e,r),Iae(t,e,r,n)}function Clt(e,t){var r=asr(e,e.nodes());r=r.slice(0,r.length-1),Id.forEach(r,function(n){lsr(e,t,n)})}function lsr(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=Tae(e,t,r)}function Tae(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,Id.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,usr(e,r,u)){var p=e.edge(r,u).cutvalue;s+=h?-p:p}}}),s}function Alt(e,t){arguments.length<2&&(t=e.nodes()[0]),Cae(e,{},1,t)}function Cae(e,t,r,n,i){var o=r,a=e.node(n);return t[n]=!0,Id.forEach(e.neighbors(n),function(s){Id.has(t,s)||(r=Cae(e,t,r,s,n))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Aae(e){return Id.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Pae(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=Id.filter(t.edges(),function(u){return l===Eae(e,e.node(u.v),s)&&l!==Eae(e,e.node(u.w),s)});return Id.minBy(c,function(u){return nsr(t,u)})}function Iae(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),Alt(e),Clt(e,t),csr(e,t)}function csr(e,t){var r=Id.find(e.nodes(),function(i){return!t.node(i).parent}),n=osr(e,r);n=n.slice(1),Id.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 usr(e,t,r){return e.hasEdge(t,r)}function Eae(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}});var Oae=H((KJn,Dae)=>{"use strict";var hsr=j4(),Nae=hsr.longestPath,fsr=Tlt(),psr=kae();Dae.exports=dsr;function dsr(e){switch(e.graph().ranker){case"network-simplex":Rae(e);break;case"tight-tree":gsr(e);break;case"longest-path":msr(e);break;default:Rae(e)}}var msr=Nae;function gsr(e){Nae(e),fsr(e)}function Rae(e){psr(e)}});var Fae=H((ZJn,zae)=>{var Plt=qn();zae.exports=_sr;function _sr(e){var t=vsr(e);Plt.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,o=ysr(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 ysr(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 vsr(e){var t={},r=0;function n(i){var o=r;Plt.forEach(e.children(i),n),t[i]={low:o,lim:r++}}return Plt.forEach(e.children(),n),t}});var Vae=H((JJn,Hae)=>{var Ld=qn(),Ilt=ns();Hae.exports={run:xsr,cleanup:Ssr};function xsr(e){var t=Ilt.addDummyNode(e,"root",{},"_root"),r=bsr(e),n=Ld.max(Ld.values(r))-1,i=2*n+1;e.graph().nestingRoot=t,Ld.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=wsr(e)+1;Ld.forEach(e.children(),function(a){Bae(e,t,i,o,n,r,a)}),e.graph().nodeRankFactor=i}function Bae(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=Ilt.addBorderNode(e,"_bt"),c=Ilt.addBorderNode(e,"_bb"),u=e.node(a);e.setParent(l,a),u.borderTop=l,e.setParent(c,a),u.borderBottom=c,Ld.forEach(s,function(h){Bae(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 bsr(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&Ld.forEach(o,function(a){r(a,i+1)}),t[n]=i}return Ld.forEach(e.children(),function(n){r(n,1)}),t}function wsr(e){return Ld.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function Ssr(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Ld.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}});var Gae=H((QJn,qae)=>{var Llt=qn(),Msr=ns();qae.exports=Esr;function Esr(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&Llt.forEach(n,t),Llt.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)Uae(e,"borderLeft","_bl",r,i,o),Uae(e,"borderRight","_br",r,i,o)}}Llt.forEach(e.children(),t)}function Uae(e,t,r,n,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],l=Msr.addDummyNode(e,"border",a,r);i[t][o]=l,e.setParent(l,n),s&&e.setEdge(s,l,{weight:1})}});var Xae=H((tQn,jae)=>{"use strict";var Uf=qn();jae.exports={adjust:Tsr,undo:Csr};function Tsr(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Yae(e)}function Csr(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&Asr(e),(t==="lr"||t==="rl")&&(Psr(e),Yae(e))}function Yae(e){Uf.forEach(e.nodes(),function(t){Wae(e.node(t))}),Uf.forEach(e.edges(),function(t){Wae(e.edge(t))})}function Wae(e){var t=e.width;e.width=e.height,e.height=t}function Asr(e){Uf.forEach(e.nodes(),function(t){klt(e.node(t))}),Uf.forEach(e.edges(),function(t){var r=e.edge(t);Uf.forEach(r.points,klt),Uf.has(r,"y")&&klt(r)})}function klt(e){e.y=-e.y}function Psr(e){Uf.forEach(e.nodes(),function(t){Rlt(e.node(t))}),Uf.forEach(e.edges(),function(t){var r=e.edge(t);Uf.forEach(r.points,Rlt),Uf.has(r,"x")&&Rlt(r)})}function Rlt(e){var t=e.x;e.x=e.y,e.y=t}});var Kae=H((eQn,$ae)=>{"use strict";var kd=qn();$ae.exports=Isr;function Isr(e){var t={},r=kd.filter(e.nodes(),function(s){return!e.children(s).length}),n=kd.max(kd.map(r,function(s){return e.node(s).rank})),i=kd.map(kd.range(n+1),function(){return[]});function o(s){if(!kd.has(t,s)){t[s]=!0;var l=e.node(s);i[l.rank].push(s),kd.forEach(e.successors(s),o)}}var a=kd.sortBy(r,function(s){return e.node(s).rank});return kd.forEach(a,o),i}});var Jae=H((rQn,Zae)=>{"use strict";var h0=qn();Zae.exports=Lsr;function Lsr(e,t){for(var r=0,n=1;n<t.length;++n)r+=ksr(e,t[n-1],t[n]);return r}function ksr(e,t,r){for(var n=h0.zipObject(r,h0.map(r,function(c,u){return u})),i=h0.flatten(h0.map(t,function(c){return h0.sortBy(h0.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=h0.map(new Array(a),function(){return 0}),l=0;return h0.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 ese=H((nQn,tse)=>{var Qae=qn();tse.exports=Rsr;function Rsr(e,t){return Qae.map(t,function(r){var n=e.inEdges(r);if(n.length){var i=Qae.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 nse=H((iQn,rse)=>{"use strict";var Tl=qn();rse.exports=Nsr;function Nsr(e,t){var r={};Tl.forEach(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Tl.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Tl.forEach(t.edges(),function(i){var o=r[i.v],a=r[i.w];!Tl.isUndefined(o)&&!Tl.isUndefined(a)&&(a.indegree++,o.out.push(r[i.w]))});var n=Tl.filter(r,function(i){return!i.indegree});return Dsr(n)}function Dsr(e){var t=[];function r(o){return function(a){a.merged||(Tl.isUndefined(a.barycenter)||Tl.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&Osr(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),Tl.forEach(i.in.reverse(),r(i)),Tl.forEach(i.out,n(i))}return Tl.map(Tl.filter(t,function(o){return!o.merged}),function(o){return Tl.pick(o,["vs","i","barycenter","weight"])})}function Osr(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 ase=H((oQn,ose)=>{var X4=qn(),zsr=ns();ose.exports=Fsr;function Fsr(e,t){var r=zsr.partition(e,function(u){return X4.has(u,"barycenter")}),n=r.lhs,i=X4.sortBy(r.rhs,function(u){return-u.i}),o=[],a=0,s=0,l=0;n.sort(Bsr(!!t)),l=ise(o,i,l),X4.forEach(n,function(u){l+=u.vs.length,o.push(u.vs),a+=u.barycenter*u.weight,s+=u.weight,l=ise(o,i,l)});var c={vs:X4.flatten(o,!0)};return s&&(c.barycenter=a/s,c.weight=s),c}function ise(e,t,r){for(var n;t.length&&(n=X4.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Bsr(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 cse=H((aQn,lse)=>{var f0=qn(),Hsr=ese(),Vsr=nse(),Usr=ase();lse.exports=sse;function sse(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=f0.filter(i,function(d){return d!==a&&d!==s}));var c=Hsr(e,i);f0.forEach(c,function(d){if(e.children(d.v).length){var g=sse(e,d.v,r,n);l[d.v]=g,f0.has(g,"barycenter")&&Gsr(d,g)}});var u=Vsr(c,r);qsr(u,l);var h=Usr(u,n);if(a&&(h.vs=f0.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]);f0.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 qsr(e,t){f0.forEach(e,function(r){r.vs=f0.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function Gsr(e,t){f0.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 hse=H((sQn,use)=>{var $4=qn(),Wsr=Uc().Graph;use.exports=Ysr;function Ysr(e,t,r){var n=jsr(e),i=new Wsr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(o){return e.node(o)});return $4.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),$4.forEach(e[r](o),function(l){var c=l.v===o?l.w:l.v,u=i.edge(c,o),h=$4.isUndefined(u)?0:u.weight;i.setEdge(c,o,{weight:e.edge(l).weight+h})}),$4.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function jsr(e){for(var t;e.hasNode(t=$4.uniqueId("_root")););return t}});var pse=H((lQn,fse)=>{var Xsr=qn();fse.exports=$sr;function $sr(e,t,r){var n={},i;Xsr.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 yse=H((cQn,_se)=>{"use strict";var p0=qn(),Ksr=Kae(),Zsr=Jae(),Jsr=cse(),Qsr=hse(),tlr=pse(),elr=Uc().Graph,dse=ns();_se.exports=rlr;function rlr(e){var t=dse.maxRank(e),r=mse(e,p0.range(1,t+1),"inEdges"),n=mse(e,p0.range(t-1,-1,-1),"outEdges"),i=Ksr(e);gse(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,l=0;l<4;++s,++l){nlr(s%2?r:n,s%4>=2),i=dse.buildLayerMatrix(e);var c=Zsr(e,i);c<o&&(l=0,a=p0.cloneDeep(i),o=c)}gse(e,a)}function mse(e,t,r){return p0.map(t,function(n){return Qsr(e,n,r)})}function nlr(e,t){var r=new elr;p0.forEach(e,function(n){var i=n.graph().root,o=Jsr(n,i,r,t);p0.forEach(o.vs,function(a,s){n.node(a).order=s}),tlr(n,r,o.vs)})}function gse(e,t){p0.forEach(t,function(r){p0.forEach(r,function(n,i){e.node(n).order=i})})}});var Ase=H((uQn,Cse)=>{"use strict";var Xe=qn(),ilr=Uc().Graph,olr=ns();Cse.exports={positionX:llr,findType1Conflicts:vse,findType2Conflicts:xse,addConflict:Nlt,hasConflict:bse,verticalAlignment:wse,horizontalCompaction:Sse,alignCoordinates:Ese,findSmallestWidthAlignment:Mse,balance:Tse};function vse(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=alr(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)&&Nlt(r,g,d)})}),s=h+1,a=p)}),o}return Xe.reduce(t,n),r}function xse(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)&&Nlt(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 alr(e,t){if(e.node(t).dummy)return Xe.find(e.predecessors(t),function(r){return e.node(r).dummy})}function Nlt(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 bse(e,t,r){if(t>r){var n=t;t=r,r=n}return Xe.has(e[t],r)}function wse(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]&&!bse(r,c,d)&&(o[d]=c,o[c]=i[c]=i[d],l=a[d])}}})}),{root:i,align:o}}function Sse(e,t,r,n,i){var o={},a=slr(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 slr(e,t,r,n){var i=new ilr,o=e.graph(),a=clr(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 Mse(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=ulr(e,a)/2;n=Math.max(o+s,n),i=Math.min(o-s,i)}),n-i})}function Ese(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 Tse(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 llr(e){var t=olr.buildLayerMatrix(e),r=Xe.merge(vse(e,t),xse(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=wse(e,i,r,l),u=Sse(e,i,c.root,c.align,s==="r");s==="r"&&(u=Xe.mapValues(u,function(h){return-h})),n[a+s]=u})});var o=Mse(e,n);return Ese(n,o),Tse(n,e.graph().align)}function clr(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 ulr(e,t){return e.node(t).width}});var Lse=H((hQn,Ise)=>{"use strict";var K4=qn(),Pse=ns(),hlr=Ase().positionX;Ise.exports=flr;function flr(e){e=Pse.asNonCompoundGraph(e),plr(e),K4.forEach(hlr(e),function(t,r){e.node(r).x=t})}function plr(e){var t=Pse.buildLayerMatrix(e),r=e.graph().ranksep,n=0;K4.forEach(t,function(i){var o=K4.max(K4.map(i,function(a){return e.node(a).height}));K4.forEach(i,function(a){e.node(a).y=n+o/2}),n+=o+r})}});var zse=H((fQn,Ose)=>{"use strict";var ir=qn(),kse=mae(),Rse=wae(),dlr=Oae(),mlr=ns().normalizeRanks,glr=Fae(),_lr=ns().removeEmptyRanks,Nse=Vae(),ylr=Gae(),Dse=Xae(),vlr=yse(),xlr=Lse(),d0=ns(),blr=Uc().Graph;Ose.exports=wlr;function wlr(e,t){var r=t&&t.debugTiming?d0.time:d0.notime;r("layout",function(){var n=r("  buildLayoutGraph",function(){return Rlr(e)});r("  runLayout",function(){Slr(n,r)}),r("  updateInputGraph",function(){Mlr(e,n)})})}function Slr(e,t){t("    makeSpaceForEdgeLabels",function(){Nlr(e)}),t("    removeSelfEdges",function(){qlr(e)}),t("    acyclic",function(){kse.run(e)}),t("    nestingGraph.run",function(){Nse.run(e)}),t("    rank",function(){dlr(d0.asNonCompoundGraph(e))}),t("    injectEdgeLabelProxies",function(){Dlr(e)}),t("    removeEmptyRanks",function(){_lr(e)}),t("    nestingGraph.cleanup",function(){Nse.cleanup(e)}),t("    normalizeRanks",function(){mlr(e)}),t("    assignRankMinMax",function(){Olr(e)}),t("    removeEdgeLabelProxies",function(){zlr(e)}),t("    normalize.run",function(){Rse.run(e)}),t("    parentDummyChains",function(){glr(e)}),t("    addBorderSegments",function(){ylr(e)}),t("    order",function(){vlr(e)}),t("    insertSelfEdges",function(){Glr(e)}),t("    adjustCoordinateSystem",function(){Dse.adjust(e)}),t("    position",function(){xlr(e)}),t("    positionSelfEdges",function(){Wlr(e)}),t("    removeBorderNodes",function(){Ulr(e)}),t("    normalize.undo",function(){Rse.undo(e)}),t("    fixupEdgeLabelCoords",function(){Hlr(e)}),t("    undoCoordinateSystem",function(){Dse.undo(e)}),t("    translateGraph",function(){Flr(e)}),t("    assignNodeIntersects",function(){Blr(e)}),t("    reversePoints",function(){Vlr(e)}),t("    acyclic.undo",function(){kse.undo(e)})}function Mlr(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 Elr=["nodesep","edgesep","ranksep","marginx","marginy"],Tlr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Clr=["acyclicer","ranker","rankdir","align"],Alr=["width","height"],Plr={width:0,height:0},Ilr=["minlen","weight","width","height","labeloffset"],Llr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},klr=["labelpos"];function Rlr(e){var t=new blr({multigraph:!0,compound:!0}),r=Olt(e.graph());return t.setGraph(ir.merge({},Tlr,Dlt(r,Elr),ir.pick(r,Clr))),ir.forEach(e.nodes(),function(n){var i=Olt(e.node(n));t.setNode(n,ir.defaults(Dlt(i,Alr),Plr)),t.setParent(n,e.parent(n))}),ir.forEach(e.edges(),function(n){var i=Olt(e.edge(n));t.setEdge(n,ir.merge({},Llr,Dlt(i,Ilr),ir.pick(i,klr)))}),t}function Nlr(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 Dlr(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};d0.addDummyNode(e,"edge-proxy",o,"_ep")}})}function Olr(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 zlr(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 Flr(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 Blr(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(d0.intersectRect(n,o)),r.points.push(d0.intersectRect(i,a))})}function Hlr(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 Vlr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Ulr(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 qlr(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 Glr(e){var t=d0.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){d0.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 Wlr(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 Dlt(e,t){return ir.mapValues(ir.pick(e,t),Number)}function Olt(e){var t={};return ir.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}});var Bse=H((pQn,Fse)=>{var fH=qn(),Ylr=ns(),jlr=Uc().Graph;Fse.exports={debugOrdering:Xlr};function Xlr(e){var t=Ylr.buildLayerMatrix(e),r=new jlr({compound:!0,multigraph:!0}).setGraph({});return fH.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),fH.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),fH.forEach(t,function(n,i){var o="layer"+i;r.setNode(o,{rank:"same"}),fH.reduce(n,function(a,s){return r.setEdge(a,s,{style:"invis"}),s})}),r}});var Vse=H((dQn,Hse)=>{Hse.exports="0.8.5"});var zlt=H((mQn,Use)=>{Use.exports={graphlib:Uc(),layout:zse(),debug:Bse(),util:{time:ns().time,notime:ns().notime},version:Vse()}});var zdt=Ee(Odt(),1),{__extends:c_r,__assign:u_r,__rest:h_r,__decorate:E,__param:f_r,__metadata:w,__awaiter:p_r,__generator:d_r,__exportStar:m_r,__createBinding:g_r,__values:__r,__read:y_r,__spread:v_r,__spreadArrays:x_r,__spreadArray:b_r,__await:w_r,__asyncGenerator:S_r,__asyncDelegator:M_r,__asyncValues:E_r,__makeTemplateObject:T_r,__importStar:C_r,__importDefault:A_r,__classPrivateFieldGet:P_r,__classPrivateFieldSet:I_r,__classPrivateFieldIn:L_r}=zdt.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 Fdt(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)=>{Fdt(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(",");Fdt(r,n,{computed:`${o}(${a})`})}}var R_r=Bdt((e,t)=>e.querySelector(t)),N_r=Bdt((e,t)=>e.querySelectorAll(t));function Bdt(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 b1e=/(url\()([^)]*)(\))/g,w1e=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,PI,Zs;function l_(e,t){if(e&&w1e.test(e)||e==="//")return e;if(PI===void 0){PI=!1;try{let r=new URL("b","http://a");r.pathname="c%20d",PI=r.href==="http://a/c%20d"}catch(r){}}if(t||(t=document.baseURI||window.location.href),PI)try{return new URL(e,t).href}catch(r){return e}return Zs||(Zs=document.implementation.createHTMLDocument("temp"),Zs.base=Zs.createElement("base"),Zs.head.appendChild(Zs.base),Zs.anchor=Zs.createElement("a"),Zs.body.appendChild(Zs.anchor)),Zs.base.href=t,Zs.anchor.href=e,Zs.anchor.href||e}function HM(e,t){return e.replace(b1e,function(r,n,i,o){return n+"'"+l_(i.replace(/["']/g,""),t)+"'"+o})}function Cx(e){return e.substring(0,e.lastIndexOf("/")+1)}var c_=!window.ShadyDOM||!window.ShadyDOM.inUse,H_r=Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),V_r=!window.customElements.polyfillWrapFlushCallback,Hdt=c_&&"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}})(),Vdt=window.Polymer&&window.Polymer.rootPath||Cx(document.baseURI||window.location.href);var VM=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;var Udt=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;var iu=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;var qdt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;var pp=window.Polymer&&window.Polymer.legacyOptimizations||!1;var II=window.Polymer&&window.Polymer.legacyWarnings||!1;var Gdt=window.Polymer&&window.Polymer.syncInitialRender||!1;var LI=window.Polymer&&window.Polymer.legacyUndefined||!1;var Wdt=window.Polymer&&window.Polymer.orderedComputed||!1;var hG=!0;var fG=window.Polymer&&window.Polymer.removeNestedTemplates||!1;var kI=window.Polymer&&window.Polymer.fastDomIf||!1;var UM=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;var qM=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;var Ydt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;var S1e=0;function jdt(){}jdt.prototype.__mixinApplications;jdt.prototype.__mixinSet;var Nn=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let r=S1e++;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 pG={},Kdt={};function Xdt(e,t){pG[e]=Kdt[e.toLowerCase()]=t}function $dt(e){return pG[e]||Kdt[e.toLowerCase()]}function M1e(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=$dt(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=l_(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Cx(r)}return this.__assetpath}register(t){if(t=t||this.id,t){if(iu&&$dt(t)!==void 0)throw Xdt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Xdt(t,this),M1e(this)}}};ou.prototype.modules=pG;customElements.define("dom-module",ou);var E1e="link[rel=import][type~=css]",T1e="include",Zdt="shady-unscoped";function dG(e){return ou.import(e)}function Jdt(e){let t=e.body?e.body:e,r=HM(t.textContent,e.baseURI),n=document.createElement("style");return n.textContent=r,n}function C1e(e){let t=e.trim().split(/\s+/),r=[];for(let n=0;n<t.length;n++)r.push(...A1e(t[n]));return r}function A1e(e){let t=dG(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(t._styles===void 0){let r=[];r.push(...mG(t));let n=t.querySelector("template");n&&r.push(...RI(n,t.assetpath)),t._styles=r}return t._styles}function RI(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(T1e);a&&r.push(...C1e(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 Qdt(e){let t=dG(e);return t?mG(t):[]}function mG(e){let t=[],r=e.querySelectorAll(E1e);for(let n=0;n<r.length;n++){let i=r[n];if(i.import){let o=i.import,a=i.hasAttribute(Zdt);if(a&&!o._unscopedStyle){let s=Jdt(o);s.setAttribute(Zdt,""),o._unscopedStyle=s}else o._style||(o._style=Jdt(o));t.push(a?o._unscopedStyle:o._style)}}return t}function tmt(e){let t=e.trim().split(/\s+/),r="";for(let n=0;n<t.length;n++)r+=P1e(t[n]);return r}function P1e(e){let t=dG(e);if(t&&t._cssText===void 0){let r=L1e(t),n=t.querySelector("template");n&&(r+=I1e(n,t.assetpath)),t._cssText=r||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function I1e(e,t){let r="",n=RI(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 L1e(e){let t="",r=mG(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 NI(e){return e.indexOf(".")>=0}function au(e){let t=e.indexOf(".");return t===-1?e:e.slice(0,t)}function gG(e,t){return e.indexOf(t+".")===0}function Ax(e,t){return t.indexOf(e+".")===0}function dp(e,t,r){return t+r.slice(e.length)}function DI(e,t){return e===t||gG(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 emt(e){return Array.isArray(e)?Px(e).split("."):e.toString().split(".")}function No(e,t,r){let n=e,i=emt(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 _G(e,t,r){let n=e,i=emt(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 OI={},k1e=/-[a-z]/g,R1e=/([A-Z])/g;function wm(e){return OI[e]||(OI[e]=e.indexOf("-")<0?e:e.replace(k1e,t=>t[1].toUpperCase()))}function Ix(e){return OI[e]||(OI[e]=e.replace(R1e,"-$1").toLowerCase())}var N1e=0,rmt=0,Lx=[],D1e=0,yG=!1,nmt=document.createTextNode("");new window.MutationObserver(O1e).observe(nmt,{characterData:!0});function O1e(){yG=!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),rmt+=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 ci={run(e){return yG||(yG=!0,nmt.textContent=D1e++),Lx.push(e),N1e++},cancel(e){let t=e-rmt;if(t>=0){if(!Lx[t])throw new Error("invalid async handle: "+e);Lx[t]=null}}};var z1e=ci,zI=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,z1e.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 imt={},FI=HTMLElement.prototype;for(;FI;){let e=Object.getOwnPropertyNames(FI);for(let t=0;t<e.length;t++)imt[e[t]]=!0;FI=Object.getPrototypeOf(FI)}function F1e(e,t){if(!imt[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 BI=Nn(e=>{let t=zI(e);class r extends t{static createPropertiesForAttributes(){let i=this.observedAttributes;for(let o=0;o<i.length;o++)this.prototype._createPropertyAccessor(wm(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){F1e(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 B1e={"dom-if":!0,"dom-repeat":!0},omt=!1,amt=!1;function H1e(){if(!omt){omt=!0;let e=document.createElement("textarea");e.placeholder="a",amt=e.placeholder===e.textContent}return amt}function V1e(e){H1e()&&e.localName==="textarea"&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}function U1e(e){let t=e.getAttribute("is");if(t&&B1e[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 smt(e,t){let r=t.parentInfo&&smt(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 q1e(e,t,r,n){n.id&&(t[n.id]=r)}function G1e(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 W1e(e,t,r,n){r.templateInfo&&(t._templateInfo=r.templateInfo,t._parentTemplateInfo=n)}function Y1e(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 lmt=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),V1e(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=U1e(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]=smt(s,h);q1e(this,s.$,f,h),W1e(this,f,h,i),G1e(this,f,h)}return s=s,s}_addMethodEventListenerToNode(n,i,o,a){a=a||n;let s=Y1e(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"},gmt="__computeInfo",j1e=/[A-Z]/;function vG(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||SG(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 X1e(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||SG(n,p.trigger))&&(p.info&&(p.info.lastRun=r),p.fn(e,n,i,o,p.info,a,s),l=!0);return l}function SG(e,t){if(t){let r=t.name;return r==e||!!(t.structured&&gG(r,e))||!!(t.wildcard&&Ax(r,e))}else return!0}function cmt(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 $1e(e,t,r,n,i){let o=e[zr.NOTIFY],a,s=jM++;for(let c in t)t[c]&&(o&&X1e(e,o,s,c,r,n,i)||i&&K1e(e,c,r))&&(a=!0);let l;a&&(l=e.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function K1e(e,t,r){let n=au(t);if(n!==t){let i=Ix(n)+"-changed";return _mt(e,i,r[t],t),!0}return!1}function _mt(e,t,r,n){let i={value:r,queueProperty:!0};n&&(i.path=n),ue(e).dispatchEvent(new CustomEvent(t,{detail:i}))}function Z1e(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]),_mt(e,i.eventName,l,s)}function J1e(e,t,r,n,i){let o,a=e.detail,s=a&&a.path;s?(n=dp(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 Q1e(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 tve(e,t,r,n){let i=e[zr.COMPUTE];if(i)if(Wdt){jM++;let o=rve(e),a=[];for(let l in t)umt(l,i,a,o,n);let s;for(;s=a.shift();)ymt(e,"",t,r,s)&&umt(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 eve=(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)},umt=(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||SG(e,l.trigger))&&(l.info.lastRun=jM,eve(l.info,r,n))}};function rve(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;let r=e[zr.COMPUTE],{counts:n,ready:i,total:o}=nve(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 nve(e){let t=e[gmt],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 ymt(e,t,r,n,i){let o=wG(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 ive(e,t,r){let n=e.__dataLinkedPaths;if(n){let i;for(let o in n){let a=n[o];Ax(o,t)?(i=dp(o,a,t),e._setPendingPropertyOrPath(i,r,!0,!0)):Ax(a,t)&&(i=dp(a,o,t),e._setPendingPropertyOrPath(i,r,!0,!0))}}}function xG(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),cve(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,ove(e,t,s,u,l)}}function ove(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=xmt(l),l.wildcard=!0),e._addTemplatePropertyEffect(t,l.rootProperty,{fn:ave,info:a,trigger:l})}}}function ave(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=dp(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&&sve(e,s,l,c,u)}}function sve(e,t,r,n,i){if(i=lve(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 lve(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 cve(e){return Boolean(e.target)&&e.kind!="attribute"&&e.kind!="text"&&!e.isCompound&&e.parts[0].mode==="{"}function uve(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];hve(a,c),fve(a,e,c)}a.__dataHost=e}}function hve(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 fve(e,t,r){if(r.listenerEvent){let n=r.parts[0];e.addEventListener(r.listenerEvent,function(i){J1e(i,t,r.target,n.source,n.negate)})}}function hmt(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 wG(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 pve=[],vmt="(?:[a-zA-Z_$][\\w.:$\\-*]*)",dve="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",mve="(?:'(?:[^'\\\\]|\\\\.)*')",gve='(?:"(?:[^"\\\\]|\\\\.)*")',_ve="(?:"+mve+"|"+gve+")",fmt="(?:("+vmt+"|"+dve+"|"+_ve+")\\s*)",yve="(?:"+fmt+"(?:,\\s*"+fmt+")*)",vve="(?:\\(\\s*(?:"+yve+"?)\\)\\s*)",xve="("+vmt+"\\s*"+vve+"?)",bve="(\\[\\[|{{)\\s*",wve="(?:]]|}})",Sve="(?:(!)\\s*)?",Mve=bve+Sve+xve+wve,pmt=new RegExp(Mve,"g");function dmt(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].literal||"";return t}function bG(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let n={methodName:t[1],static:!0,args:pve};if(t[2].trim()){let i=t[2].replace(/\\,/g,"&comma;").split(",");return Eve(i,n)}else return n}return null}function Eve(e,t){return t.args=e.map(function(r){let n=xmt(r);return n.literal||(t.static=!1),n},this),t}function xmt(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=NI(t),r.structured&&(r.wildcard=t.slice(-2)==".*",r.wildcard&&(r.name=t.slice(0,-2)))),r}function mmt(e,t,r){let n=No(e,r);return n===void 0&&(n=t[r]),n}function bmt(e,t,r,n){let i={indexSplices:n};LI&&!e._overrideLegacyUndefined&&(t.splices=i),e.notifyPath(r+".splices",i),e.notifyPath(r+".length",t.length),LI&&!e._overrideLegacyUndefined&&(i.indexSplices=[])}function GM(e,t,r,n,i,o){bmt(e,t,r,[{index:n,addedCount:i,removed:o,object:t,type:"splice"}])}function Tve(e){return e[0].toUpperCase()+e.substring(1)}var u_=Nn(e=>{let t=lmt(BI(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=vG(this,o,!0)[i];s||(s=this[o][i]=[]),s.push(a)}_removePropertyEffect(i,o,a){let s=vG(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=_G(this,i,o),!i||!super._shouldPropertyChange(i,o,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(i,o,a))return ive(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&&NI(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;tve(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&&$1e(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);bmt(this,s,a.path,o)}get(i,o){return No(o||this,i)}set(i,o,a){a?_G(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"+Tve(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:cmt,info:s,trigger:{name:i}}),a&&this._addPropertyEffect(o,zr.OBSERVE,{fn:cmt,info:s,trigger:{name:o}})}_createMethodObserver(i,o){let a=bG(i);if(!a)throw new Error("Malformed observer expression '"+i+"'");hmt(this,a,zr.OBSERVE,wG,null,o)}_createNotifyingProperty(i){this._addPropertyEffect(i,zr.NOTIFY,{fn:Z1e,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:Q1e,info:{attrName:o}})}_createComputedProperty(i,o,a){let s=bG(o);if(!s)throw new Error("Malformed computed expression '"+o+"'");let l=hmt(this,s,zr.COMPUTE,ymt,i,a);vG(this,gmt)[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=mmt(s,a,_?o:h);d={path:_?o:h,value:y,base:_?No(s,h):y}}else d=f?mmt(s,a,h):s[h];if(LI&&!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,uve(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=dmt(l)||" ",xG(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";j1e.test(s)?h="attribute":s[s.length-1]=="$"&&(s=s.slice(0,-1),h="attribute");let f=dmt(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=wm(s)),xG(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";fG&&(u||h)&&(l.removeChild(i),a=a.parentInfo,a.templateInfo=c,a.noted=!0,s=!1);let f=c.hostProps;if(kI&&u)f&&(o.hostProps=Object.assign(o.hostProps||{},f),fG||(a.parentInfo.noted=!0));else{let p="{";for(let d in f){let g=[{mode:p,source:d,dependencies:[d],hostProp:!0}];xG(this,o,a,"property","_host_"+d,g)}}return s}static _parseBindings(i,o){let a=[],s=0,l;for(;(l=pmt.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=bG(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=pmt.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=wG(i,a,s,l,o.signature):a!=o.source?u=No(i,o.source):c&&NI(a)?u=No(i,a):u=i.__data[a],o.negate&&(u=!u),u}}return r}),WM=[];var Cve=0;function wmt(){Cve++}var Ave=[];function HI(e){Ave.push(e)}function Pve(e){let t={};for(let r in e){let n=e[r];t[r]=typeof n=="function"?{type:n}:n}return t}var Smt=Nn(e=>{let t=zI(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=Pve(s))}o.__ownProperties=a}return o.__ownProperties}class i extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){HI(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(){wmt(),this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i});var Mmt="3.4.1",VI=window.ShadyCSS&&window.ShadyCSS.cssBuild,Sm=Nn(e=>{let t=Smt(u_(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(!VI){let f=c.content.querySelectorAll("style"),p=RI(c),d=Qdt(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),Ydt&&VI&&Hdt){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||qdt)&&(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 Mmt}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):pp||(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=Vdt,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?l_(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])),Gdt&&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=l_(this.importPath)),l_(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 II&&!(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 UI=class{constructor(t){this.value=t.toString()}toString(){return this.value}};function Ive(e){if(e instanceof UI)return e.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${e}`)}function Lve(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof UI)return Ive(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+Lve(o)+t[a+1],t[0]),n};var mt=Sm(HTMLElement);var fy=Ee(Oe(),1);var h_=!(window.ShadyDOM&&window.ShadyDOM.inUse),qI;function Emt(e){e&&e.shimcssproperties?qI=!1:qI=h_||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"))}var Mm;window.ShadyCSS&&window.ShadyCSS.cssBuild!==void 0&&(Mm=window.ShadyCSS.cssBuild);var GI=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&window.ShadyCSS.nativeCss!==void 0?qI=window.ShadyCSS.nativeCss:window.ShadyCSS?(Emt(window.ShadyCSS),window.ShadyCSS=void 0):Emt(window.WebComponents&&window.WebComponents.flags);var Nx=qI;var WI=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 MG(e){return e=kve(e),Tmt(Rve(e),e)}function kve(e){return e.replace(gp.comments,"").replace(gp.port,"")}function Rve(e){let t=new WI;t.start=0,t.end=e.length;let r=t;for(let n=0,i=e.length;n<i;n++)if(e[n]===Cmt){r.rules||(r.rules=[]);let o=r,a=o.rules[o.rules.length-1]||null;r=new WI,r.start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===Amt&&(r.end=n+1,r=r.parent||t);return t}function Tmt(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=Nve(r),r=r.replace(gp.multipleSpaces," "),r=r.substring(r.lastIndexOf(";")+1);let o=e.parsedSelector=e.selector=r.trim();e.atRule=o.indexOf(Hve)===0,e.atRule?o.indexOf(Bve)===0?e.type=mp.MEDIA_RULE:o.match(gp.keyframesRule)&&(e.type=mp.KEYFRAMES_RULE,e.keyframesName=e.selector.split(gp.multipleSpaces).pop()):o.indexOf(Pmt)===0?e.type=mp.MIXIN_RULE:e.type=mp.STYLE_RULE}let n=e.rules;if(n)for(let i=0,o=n.length,a;i<o&&(a=n[i]);i++)Tmt(a,t);return e}function Nve(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 EG(e,t,r=""){let n="";if(e.cssText||e.rules){let i=e.rules;if(i&&!Dve(i))for(let o=0,a=i.length,s;o<a&&(s=i[o]);o++)n=EG(s,t,n);else n=t?e.cssText:Ove(e.cssText),n=n.trim(),n&&(n="  "+n+`
`)}return n&&(e.selector&&(r+=e.selector+" "+Cmt+`
`),r+=n,e.selector&&(r+=Amt+`

`)),r}function Dve(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&t.selector.indexOf(Pmt)===0}function Ove(e){return e=zve(e),Fve(e)}function zve(e){return e.replace(gp.customProp,"").replace(gp.mixinProp,"")}function Fve(e){return e.replace(gp.mixinApply,"").replace(gp.varApply,"")}var mp={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Cmt="{",Amt="}",gp={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},Pmt="--",Bve="@media",Hve="@";var KM=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Dx=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi;var Imt=/@media\s(.*)/;var Lmt=new Set,Vve="shady-unscoped";function kmt(e){let t=e.textContent;if(!Lmt.has(t)){Lmt.add(t);let r=document.createElement("style");r.setAttribute("shady-unscoped",""),r.textContent=t,document.head.appendChild(r)}}function Rmt(e){return e.hasAttribute(Vve)}function ZM(e,t){return e?(typeof e=="string"&&(e=MG(e)),t&&Ox(e,t),EG(e,Nx)):""}function TG(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=MG(e.textContent)),e.__cssRules||null}function Ox(e,t,r,n){if(!e)return;let i=!1,o=e.type;if(n&&o===mp.MEDIA_RULE){let s=e.selector.match(Imt);s&&(window.matchMedia(s[1]).matches||(i=!0))}o===mp.STYLE_RULE?t(e):r&&o===mp.KEYFRAMES_RULE?r(e):o===mp.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 Uve(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 CG(e,t){let r=e.indexOf("var(");if(r===-1)return t(e,"","","");let n=Uve(e,r+3),i=e.substring(r+4,n),o=e.substring(0,r),a=CG(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 n1r=window.ShadyDOM&&window.ShadyDOM.wrap||(e=>e);function Nmt(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 Dmt(e){let t=[],r=e.querySelectorAll("style");for(let n=0;n<r.length;n++){let i=r[n];Rmt(i)?h_||(kmt(i),i.parentNode.removeChild(i)):(t.push(i.textContent),i.parentNode.removeChild(i))}return t.join("").trim()}var Omt="css-build";function qve(e){if(Mm!==void 0)return Mm;if(e.__cssBuild===void 0){let t=e.getAttribute(Omt);if(t)e.__cssBuild=t;else{let r=Gve(e);r!==""&&Wve(e),e.__cssBuild=r}}return e.__cssBuild||""}function AG(e){return qve(e)!==""}function Gve(e){let t=e.localName==="template"?e.content.firstChild:e.firstChild;if(t instanceof Comment){let r=t.textContent.trim().split(":");if(r[0]===Omt)return r[1]}return""}function Wve(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 YI(e,t){let r=window.getComputedStyle(e).getPropertyValue(t);return r?r.trim():""}function zmt(e){let t=Dx.test(e)||KM.test(e);return Dx.lastIndex=0,KM.lastIndex=0,t}var Yve=/;\s*/m,jve=/^\s*(initial)|(inherit)\s*$/,Fmt=/\s*!important/,PG="_-_";var IG=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}},jI=null,Do=class{constructor(){this._currentElement=null,this._measureElement=null,this._map=new IG}detectMixin(t){return zmt(t)}gatherStyles(t){let r=Dmt(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=TG(t);return this.transformRules(n,r),t.textContent=ZM(n),n}transformCustomStyle(t){let r=TG(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(Yve,"");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,PG,o],s&&a.push(",",s.replace(Fmt,"")),a.push(")"),Fmt.test(l[o])&&a.push(" !important"),n.push(a.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,r){let n=jve.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(!!jI)for(let r in t.dependants)r!==this._currentElement&&jI(r)}_produceCssProperties(t,r,n,i,o){if(n&&CG(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}${PG}${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=PG;Object.defineProperty(Do.prototype,"invalidCallback",{get(){return jI},set(e){jI=e}});var Bmt=Do;var Xve={},QM=Xve;var XI="_applyShimCurrentVersion",zx="_applyShimNextVersion",$I="_applyShimValidatingVersion",$ve=Promise.resolve();function Hmt(e){let t=QM[e];t&&Kve(t)}function Kve(e){e[XI]=e[XI]||0,e[$I]=e[$I]||0,e[zx]=(e[zx]||0)+1}function LG(e){return e[XI]===e[zx]}function Vmt(e){return!LG(e)&&e[$I]===e[zx]}function Umt(e){e[$I]=e[zx],e._validating||(e._validating=!0,$ve.then(function(){e[XI]=e[zx],e._validating=!1}))}var kG=null,qmt=window.HTMLImports&&window.HTMLImports.whenReady||null,RG;function KI(e){requestAnimationFrame(function(){qmt?qmt(e):(kG||(kG=new Promise(t=>{RG=t}),document.readyState==="complete"?RG():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&RG()})),kG.then(function(){e&&e()}))})}var Gmt="__seenByShadyCSS",ZI="__shadyCSSCachedStyle",JI=null,tE=null,Zl=class{constructor(){this.customStyles=[],this.enqueued=!1,KI(()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}enqueueDocumentValidation(){this.enqueued||!tE||(this.enqueued=!0,KI(tE))}addCustomStyle(t){t[Gmt]||(t[Gmt]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[ZI])return t[ZI];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[ZI])continue;let i=this.getStyleForCustomStyle(n);if(i){let o=i.__appliedElement||i;JI&&JI(o),n[ZI]=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 JI},set(e){JI=e}},validateCallback:{get(){return tE},set(e){let t=!1;tE||(t=!0),tE=e,t&&this.enqueueDocumentValidation()}}});var eE=new Bmt,NG=class{constructor(){this.customStyleInterface=null,eE.invalidCallback=Hmt}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(),AG(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}=Nmt(t),n=QM[r];if(!(n&&AG(n))&&n&&!LG(n)){Vmt(n)||(this.prepareTemplate(n,r),Umt(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 NG,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 YI(r,n)},flushCustomStyles(){e.flushCustomStyles()},nativeCss:Nx,nativeShadow:h_,cssBuild:Mm,disableRuntime:GI},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)},Wmt=function(){let e=Boolean(rE.size);return rE.forEach(t=>{try{t.flush()}catch(r){setTimeout(()=>{throw r})}}),e};var FG=typeof document.head.style.touchAction=="string",t9="__polymerGestures",QI="__polymerGesturesHandled",OG="__polymerGesturesTouchAction",Ymt=25,jmt=5,Jve=2,Qve=2500,Jmt=["mousedown","mousemove","mouseup","click"],txe=[0,1,4,2],exe=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(e){return!1}}();function BG(e){return Jmt.indexOf(e)>-1}var HG=!1;(function(){try{let e=Object.defineProperty({},"passive",{get(){HG=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}})();function Qmt(e){if(!(BG(e)||e==="touchend")&&FG&&HG&&Udt)return{passive:!0}}var tgt=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),zG=[],rxe={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},nxe={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ixe(e){return rxe[e.localName]||!1}function oxe(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 Xmt=function(e){let t=e.sourceCapabilities;if(!(t&&!t.firesTouchEvents)&&(e[QI]={skip:!0},e.type==="click")){let r=!1,n=r9(e);for(let i=0;i<n.length;i++){if(n[i].nodeType===Node.ELEMENT_NODE){if(n[i].localName==="label")zG.push(n[i]);else if(ixe(n[i])){let o=oxe(n[i]);for(let a=0;a<o.length;a++)r=r||zG.indexOf(o[a])>-1}}if(n[i]===ia.mouse.target)return}if(r)return;e.preventDefault(),e.stopPropagation()}};function $mt(e){let t=tgt?["click"]:Jmt;for(let r=0,n;r<t.length;r++)n=t[r],e?(zG.length=0,document.addEventListener(n,Xmt,!0)):document.removeEventListener(n,Xmt,!0)}function axe(e){if(!hG)return;ia.mouse.mouseIgnoreJob||$mt(!0);let t=function(){$mt(),ia.mouse.target=null,ia.mouse.mouseIgnoreJob=null};ia.mouse.target=r9(e)[0],ia.mouse.mouseIgnoreJob=sr.debounce(ia.mouse.mouseIgnoreJob,mo.after(Qve),t)}function p_(e){let t=e.type;if(!BG(t))return!1;if(t==="mousemove"){let r=e.buttons===void 0?1:e.buttons;return e instanceof window.MouseEvent&&!exe&&(r=txe[e.which]||0),Boolean(r&1)}else return(e.button===void 0?0:e.button)===0}function sxe(e){if(e.type==="click"){if(e.detail===0)return!0;let t=_p(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 ia={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function lxe(e){let t="auto",r=r9(e);for(let n=0,i;n<r.length;n++)if(i=r[n],i[OG]){t=i[OG];break}return t}function egt(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}hG&&document.addEventListener("touchend",axe,HG?{passive:!0}:!1);var r9=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],iE={},f_=[];function cxe(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 _p(e){let t=r9(e);return t.length>0?t[0]:e.target}function rgt(e){let t,r=e.type,i=e.currentTarget[t9];if(!i)return;let o=i[r];if(!!o){if(!e[QI]&&(e[QI]={},r.slice(0,5)==="touch")){e=e;let a=e.changedTouches[0];if(r==="touchstart"&&e.touches.length===1&&(ia.touch.id=a.identifier),ia.touch.id!==a.identifier)return;FG||(r==="touchstart"||r==="touchmove")&&uxe(e)}if(t=e[QI],!t.skip){for(let a=0,s;a<f_.length;a++)s=f_[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<f_.length;a++)s=f_[a],o[s.name]&&!t[s.name]&&(t[s.name]=!0,s[r](e))}}}function uxe(e){let t=e.changedTouches[0],r=e.type;if(r==="touchstart")ia.touch.x=t.clientX,ia.touch.y=t.clientY,ia.touch.scrollDecided=!1;else if(r==="touchmove"){if(ia.touch.scrollDecided)return;ia.touch.scrollDecided=!0;let n=lxe(e),i=!1,o=Math.abs(ia.touch.x-t.clientX),a=Math.abs(ia.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():e9("track")}}function Em(e,t,r){return iE[t]?(hxe(e,t,r),!0):!1}function ngt(e,t,r){return iE[t]?(fxe(e,t,r),!0):!1}function hxe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[t9];a||(e[t9]=a={});for(let s=0,l,c;s<i.length;s++)l=i[s],!(tgt&&BG(l)&&l!=="click")&&(c=a[l],c||(a[l]=c={_count:0}),c._count===0&&e.addEventListener(l,rgt,Qmt(l)),c[o]=(c[o]||0)+1,c._count=(c._count||0)+1);e.addEventListener(t,r),n.touchAction&&d_(e,n.touchAction)}function fxe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[t9];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,rgt,Qmt(l)));e.removeEventListener(t,r)}function VG(e){f_.push(e);for(let t=0;t<e.emits.length;t++)iE[e.emits[t]]=e}function pxe(e){for(let t=0,r;t<f_.length;t++){r=f_[t];for(let n=0,i;n<r.emits.length;n++)if(i=r.emits[n],i===e)return r}return null}function d_(e,t){FG&&e instanceof HTMLElement&&ci.run(()=>{e.style.touchAction=t}),e[OG]=t}function UG(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 e9(e){let t=pxe(e);t.info&&(t.info.prevent=!0)}VG({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(!p_(e))return;let t=_p(e),r=this,n=function(a){p_(a)||(nE("up",t,a),Fx(r.info))},i=function(a){p_(a)&&nE("up",t,a),Fx(r.info)};egt(this.info,n,i),nE("down",t,e)},touchstart:function(e){nE("down",_p(e),e.changedTouches[0],e)},touchend:function(e){nE("up",_p(e),e.changedTouches[0],e)}});function nE(e,t,r,n){!t||UG(t,e,{x:r.clientX,y:r.clientY,sourceEvent:r,preventer:n,prevent:function(i){return e9(i)}})}VG({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>Jve&&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(!p_(e))return;let t=_p(e),r=this,n=function(a){let s=a.clientX,l=a.clientY;Kmt(r.info,s,l)&&(r.info.state=r.info.started?a.type==="mouseup"?"end":"track":"start",r.info.state==="start"&&e9("tap"),r.info.addMove({x:s,y:l}),p_(a)||(r.info.state="end",Fx(r.info)),t&&DG(r.info,t,a),r.info.started=!0)},i=function(a){r.info.started&&n(a),Fx(r.info)};egt(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=_p(e),r=e.changedTouches[0],n=r.clientX,i=r.clientY;Kmt(this.info,n,i)&&(this.info.state==="start"&&e9("tap"),this.info.addMove({x:n,y:i}),DG(this.info,t,r),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=_p(e),r=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:r.clientX,y:r.clientY}),DG(this.info,t,r))}});function Kmt(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>=jmt||i>=jmt}function DG(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),UG(t,"track",{state:e.state,x:r.clientX,y:r.clientY,dx:o,dy:a,ddx:s,ddy:l,sourceEvent:r,hover:function(){return cxe(r.clientX,r.clientY)}})}VG({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){p_(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){p_(e)&&Zmt(this.info,e)},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){Zmt(this.info,e.changedTouches[0],e)}});function Zmt(e,t,r){let n=Math.abs(t.clientX-e.x),i=Math.abs(t.clientY-e.y),o=_p(r||t);!o||nxe[o.localName]&&o.hasAttribute("disabled")||(isNaN(n)||isNaN(i)||n<=Ymt&&i<=Ymt||sxe(t))&&(e.prevent||UG(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:r}))}var igt=_p;var yh=Nn(e=>{class t extends e{_addEventListenerToNode(n,i,o){Em(n,i,o)||super._addEventListenerToNode(n,i,o)}_removeEventListenerFromNode(n,i,o){ngt(n,i,o)||super._removeEventListenerFromNode(n,i,o)}}return t});var dxe=/:host\(:dir\((ltr|rtl)\)\)/g,mxe=':host([dir="$1"])',gxe=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,_xe=':host([dir="$2"]) $1',yxe=/:dir\((?:ltr|rtl)\)/,agt=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),oE=[],aE=null,qG="";function sgt(){qG=document.documentElement.getAttribute("dir")}function lgt(e){e.__autoDirOptOut||e.setAttribute("dir",qG)}function cgt(){sgt(),qG=document.documentElement.getAttribute("dir");for(let e=0;e<oE.length;e++)lgt(oE[e])}function vxe(){aE&&aE.takeRecords().length&&cgt()}var ugt=Nn(e=>{agt||aE||(sgt(),aE=new MutationObserver(cgt),aE.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));let t=BI(e);class r extends t{static _processStyleText(i,o){return i=t._processStyleText.call(this,i,o),!agt&&yxe.test(i)&&(i=this._replaceDirInCssText(i),this.__activateDir=!0),i}static _replaceDirInCssText(i){let o=i;return o=o.replace(dxe,mxe),o=o.replace(gxe,_xe),o}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(vxe(),oE.push(this),lgt(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 n9=!1,hgt=[],fgt=[];function pgt(){n9=!0,requestAnimationFrame(function(){n9=!1,xxe(hgt),setTimeout(function(){bxe(fgt)})})}function xxe(e){for(;e.length;)dgt(e.shift())}function bxe(e){for(let t=0,r=e.length;t<r;t++)dgt(e.shift())}function dgt(e){let t=e[0],r=e[1],n=e[2];try{r.apply(t,n)}catch(i){setTimeout(()=>{throw i})}}function mgt(e,t,r){n9||pgt(),hgt.push([e,t,r])}function Tm(e,t,r){n9||pgt(),fgt.push([e,t,r])}function ggt(){document.body.removeAttribute("unresolved")}document.readyState==="interactive"||document.readyState==="complete"?ggt():window.addEventListener("DOMContentLoaded",ggt);function sE(e,t,r){return{index:e,removed:t,addedCount:r}}var _gt=0,ygt=1,GG=2,WG=3;function wxe(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(YG(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 Sxe(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(GG),r--;continue}if(r==0){i.push(WG),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(_gt):(i.push(ygt),n=o),t--,r--):l==a?(i.push(WG),t--,n=a):(i.push(GG),r--,n=s)}return i.reverse(),i}function Mxe(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=Exe(e,n,c)),r==e.length&&o==n.length&&(s=Txe(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=Sxe(wxe(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 _gt:l&&(h.push(l),l=void 0),f++,p++;break;case ygt:l||(l=sE(f,[],0)),l.addedCount++,f++,l.removed.push(n[p]),p++;break;case GG:l||(l=sE(f,[],0)),l.addedCount++,f++;break;case WG:l||(l=sE(f,[],0)),l.removed.push(n[p]),p++;break}return l&&h.push(l),h}function Exe(e,t,r){for(let n=0;n<r;n++)if(!YG(e[n],t[n]))return n;return r}function Txe(e,t,r){let n=e.length,i=t.length,o=0;for(;o<r&&YG(e[--n],t[--i]);)o++;return o}function i9(e,t){return Mxe(e,0,e.length,t,0,t.length)}function YG(e,t){return e===t}function Bx(e){return e.localName==="slot"}var vh=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,ci.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=i9(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 ui=function(){let e,t;do e=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=Wmt();while(e||t)};var Hx=Element.prototype,Cxe=Hx.matches||Hx.matchesSelector||Hx.mozMatchesSelector||Hx.msMatchesSelector||Hx.oMatchesSelector||Hx.webkitMatchesSelector,XG=function(e,t){return Cxe.call(e,t)},Kr=class{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new vh(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 vh.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&&XG(a,t)&&n.push(a);return n}get activeElement(){let t=this.node;return t._activeElement!==void 0?t._activeElement:t.activeElement}};function Axe(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 vgt(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 Pxe(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 jG=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])}),vgt(e.prototype,["classList"]),jG=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 Axe(Kr.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),vgt(Kr.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),Pxe(Kr.prototype,["textContent","innerHTML","className"]);var zt=function(e){if(e=e||document,e instanceof jG||e instanceof lE)return e;let t=e.__domApi;return t||(e instanceof Event?t=new lE(e):t=new jG(e),e.__domApi=t),t};var $G=window.ShadyDOM,xgt=window.ShadyCSS;function bgt(e,t){return ue(e).getRootNode()===t}function wgt(e,t=!1){if(!$G||!xgt||!$G.handlesDynamicScoping)return null;let r=xgt.ScopingShim;if(!r)return null;let n=r.scopeForNode(e),i=ue(e).getRootNode(),o=a=>{if(!bgt(a,i))return;let s=Array.from($G.nativeMethods.querySelectorAll.call(a,"*"));s.push(a);for(let l=0;l<s.length;l++){let c=s[l];if(!bgt(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 KG="disable-upgrade",ZG=e=>{for(;e;){let t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},gvr=Nn(e=>{let t=Sm(e),r=ZG(t);class n extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return r.call(this).concat(KG)}_initializeProperties(){this.hasAttribute(KG)?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==KG?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 o9="disable-upgrade",Ixe=window.ShadyCSS,Gt=Nn(e=>{let t=yh(Sm(e)),r=VI?t:ugt(t),n=ZG(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===o9)&&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=[],HI(this.prototype)),this.__observedAttributes):n.call(this).concat(o9)}_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==o9?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(pp&&this.hasAttribute(o9))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){d_(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 wgt(s,l)}getComputedStyleValue(s){return Ixe.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):ci,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):~ci.run(s.bind(this))}cancelAsync(s){s<0?ci.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 XG(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 Cm=Ee(Oe(),1);function xh(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(m_(e[r])&&m_(t[n])){let i=r,o=n;r=Sgt(e,r+1),n=Sgt(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(JG(e[r])){if(!JG(t[n]))return-1}else{if(JG(t[n]))return 1;if(e[r]<t[n])return-1;if(e[r]>t[n])return 1}r++,n++}}function Sgt(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(!m_(e[t]))break}else if(n===r.REAL){if(e[t]==="e"||e[t]==="E")n=r.EXPONENT_SIGN;else if(!m_(e[t]))break}else if(n===r.EXPONENT_SIGN)if(m_(e[t])||e[t]==="+"||e[t]==="-")n=r.EXPONENT;else break;else if(n===r.EXPONENT&&!m_(e[t]))break;return t}function m_(e){return"0"<=e&&e<="9"}function JG(e){return e==="/"||e==="_"||m_(e)}var Lxe=[];function kxe(e){return Cm.keys(e).sort(xh)}function $i(e){return Cm.union.apply(null,Cm.values(e)).sort(xh)}function Rxe(e,t){let r=[];return t.forEach(n=>r=r.concat(e[n])),Cm.uniq(r).sort(xh)}var Egt="X-TensorBoard-Feature-Flags";var tW={};Ks(tW,{getFeatureFlags:()=>Dxe,getFeatureFlagsToSendToServer:()=>QG,initializeFeatureFlags:()=>Tgt,setFeatureFlags:()=>Nxe});var a9,s9;Tgt();function Tgt(){a9=null,s9=null}function Nxe(e,t){a9=e,s9=t}function Dxe(){if(a9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return a9}function QG(){if(s9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return s9}var l9=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)}},cE=class extends Error{constructor(t,r){super(),this.message=`RequestNetworkError: ${t.status} at ${r}`,this.name="RequestNetworkError",this.req=t,this.url=r}},Am;(function(e){e.GET="GET",e.POST="POST"})(Am||(Am={}));var Ux=class{validate(){if(this.methodType===Am.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=zxe(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 l9("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=Oxe(r.methodType,t,r.withCredentials,r.contentType);o.setRequestHeader(Egt,JSON.stringify(QG())),o.onload=function(){o.status===200?n(JSON.parse(o.responseText)):i(new cE(o,t))},o.onerror=function(){i(new cE(o,t))},r.body?o.send(r.body):o.send()})}};function Oxe(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 zxe(e){let t=new Ux;return e?(t.methodType=Am.POST,t.body=Fxe(e),t):(t.methodType=Am.GET,t)}function Fxe(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 Cgt="experimentalPlugin",Bxe=new URLSearchParams(window.location.search),Agt=Pgt();function Pgt(e="data",t=Bxe){return e[e.length-1]==="/"&&(e=e.slice(0,e.length-1)),{environment:()=>qx(e,"/environment"),experiments:()=>qx(e,"/experiments"),pluginRoute:(r,n,i)=>qx(e+"/plugin",`/${r}${n}`,i),pluginsListing:()=>qx(e,"/plugins_listing",eW({[Cgt]:t.getAll(Cgt)})),runs:()=>qx(e,"/runs"),runsForExperiment:r=>qx(e,"/experiment_runs",eW({experiment:String(r)}))}}function ve(){return Agt}function Hxe(e){if(e==null)throw new Error("Router required, but got: "+e);Agt=e}function qx(e,t,r=new URLSearchParams){let n=e+t;return String(r)&&(n+=(t.includes("?")?"&":"?")+String(r)),n}function eW(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 c9=Ee(Oe(),1);var Na;(function(e){e[e.SEARCH_RESULTS=0]="SEARCH_RESULTS",e[e.PREFIX_GROUP=1]="PREFIX_GROUP"})(Na||(Na={}));function Vxe(e,t){let r=(()=>{try{return new RegExp(t)}catch(n){return null}})();return{name:t,metadata:{type:Na.SEARCH_RESULTS,validRegex:!!r,universalRegex:t===".*"},items:r?e.filter(n=>n.match(r)):[]}}function Uxe(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:Na.PREFIX_GROUP},items:[]};n[a]=s,r.push(s)}n[a].items.push(i)}),r}function qxe(e,t=""){let r=[Vxe(e,t)],n=Uxe(e);return Array().concat(r,n)}function uE(e,t,r){let n=$i(e),i=qxe(n,r),o=Gxe(c9.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 Gxe(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 Wxe(e,t){let r=xh(e.tag,t.tag);return r!=0?r:xh(e.run,t.run)}function Ql(e,t,r){let n=uE(e,t,r);function i(o){let a=c9.flatten(o.items.map(({tag:s,runs:l})=>l.map(c=>({tag:s,run:c}))));return a.sort(Wxe),{name:o.name,metadata:o.metadata,items:a}}return n.map(i)}var uW={};Ks(uW,{IronResizableBehavior:()=>Js});var Yxe={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Rgt={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},Rgt);function Xxe(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 Ngt(e,t){return zgt({},Gt(t),e)}function $xe(e,t,r){for(let n=0;n<t.length;n++)Dgt(e,t[n],r,jxe)}function Dgt(e,t,r,n){Xxe(t,e,n);for(let i in Yxe)t[i]&&(r[i]=r[i]||[],r[i].push(t[i]))}function Ogt(e,t,r){t=t||[];for(let n=e.length-1;n>=0;n--){let i=e[n];i?Array.isArray(i)?Ogt(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 Lgt(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 kgt=Gt(HTMLElement);function zgt(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++)Lgt(l,n[c].properties);return Lgt(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(),pp&&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=Ogt(r,null,s),o.prototype.behaviors=s?s.concat(r):n}let a=s=>{n&&$xe(s,n,i),Dgt(s,e,i,Rgt)};return pp||a(o.prototype),o.generatedFrom=e,o}var u9=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let r=t?t(kgt):kgt;return r=zgt(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=u9;function rW(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 rW(this,n,i,o,!0)}}return t}),h9=Nn(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(n,i,o){return rW(this,n,i,o,this.mutableData)}}return t});Gx._mutablePropertyChange=rW;var nW=null;function iW(){return nW}iW.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:iW,writable:!0}});var Bgt=u_(iW),Kxe=Gx(Bgt);function Zxe(e,t){nW=e,Object.setPrototypeOf(e,t.prototype),new t,nW=null}var Jxe=u_(class{});function oW(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 bh=class extends Jxe{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){oW(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}};bh.prototype.__dataHost;bh.prototype.__templatizeOptions;bh.prototype._methodHost;bh.prototype.__templatizeOwner;bh.prototype.__hostProps;var Qxe=Gx(bh);function Fgt(e){let t=e.__dataHost;return t&&t._methodHost||t}function tbe(e,t,r){let n=r.mutableData?Qxe:bh;tc.mixin&&(n=tc.mixin(n));let i=class extends n{};return i.prototype.__templatizeOptions=r,i.prototype._bindTemplate(e),nbe(i,e,t,r),i}function ebe(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?Kxe:Bgt;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:rbe(l,i)}),a.prototype._createNotifyingProperty("_host_"+l);II&&n&&abe(t,r,n)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),o)Zxe(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 rbe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,i.substring(6),o[i])}}function nbe(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:ibe(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:obe()})}function ibe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,n,i,o[i])}}function obe(){return function(t,r,n){t.__dataHost._setPendingPropertyOrPath("_host_"+r,n[r],!0,!0)}}function tc(e,t,r){if(iu&&!Fgt(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:bh)._parseTemplate(e),o=i.templatizeInstanceClass;o||(o=tbe(e,i,r),i.templatizeInstanceClass=o);let a=Fgt(e);ebe(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 abe(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 f9(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 Hgt={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 f9(this._templatizerTemplate,e)}};var Vgt=!1;function Wx(){if(pp&&!c_){if(!Vgt){Vgt=!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 sbe=yh(h9(u_(HTMLElement))),aW=class extends sbe{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",aW);var lbe=h9(mt),p9=class extends lbe{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(DI(this.as,o)){let s=i[this.itemsIndexAs];o==this.as&&(this.items[s]=a);let l=dp(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):ci,t.bind(this)),Jl(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ui()}__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 f9(this.template,t)}};customElements.define(p9.is,p9);var d9=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,ci,()=>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(){ui()}__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(){}},sW=class extends d9{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,oW(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}},lW=class extends d9{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()}},Ugt=kI?sW:lW;customElements.define(Ugt.is,Ugt);var cbe=Nn(e=>{let t=Sm(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=i9(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 ube=cbe(mt),m9=class extends ube{static get is(){return"array-selector"}static get template(){return null}};customElements.define(m9.is,m9);var g9=new Zl;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,r){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,r){},styleSubtree(e,t){g9.processStyles(),JM(e,t)},styleElement(e){g9.processStyles()},styleDocument(e){g9.processStyles(),JM(document.body,e)},getComputedStyleValue(e,t){return YI(e,t)},flushCustomStyles(){},nativeCss:Nx,nativeShadow:h_,cssBuild:Mm,disableRuntime:GI});window.ShadyCSS.CustomStyleInterface=g9;var qgt="include",hbe=window.ShadyCSS.CustomStyleInterface,cW=class extends HTMLElement{constructor(){super(),this._style=null,hbe.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(qgt);return r&&(t.removeAttribute(qgt),t.textContent=tmt(r)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}};window.customElements.define("custom-style",cW);var Ggt;Ggt=Gx._mutablePropertyChange;var Wgt={properties:{mutableData:Boolean},_shouldPropertyChange(e,t,r){return Ggt(this,e,t,r,this.mutableData)}};var Da=Gt(HTMLElement).prototype;var _9=new Set,Js={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):(_9.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}c_||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):(_9.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?_9.delete(this):_9.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:[Js],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){Da._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 Ygt=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>
`;Ygt.setAttribute("style","display: none;");document.head.appendChild(Ygt.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 Xgt=document.createElement("style");Xgt.textContent="[hidden] { display: none !important; }";document.head.appendChild(Xgt);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 fbe[this.type][n]},this):[]}}byKey(t){return this.key=t,this.value}};go[" "]=function(){};go.types={};var fbe=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:Da.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 pbe=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(pbe.content);var dbe=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(dbe.content);var $gt={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},mbe={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:"*"},Kgt={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},gbe=/[a-z0-9*]/,_be=/U\+/,ybe=/^arrow/,vbe=/^space(bar)?/,xbe=/^escape$/;function Zgt(e,t){var r="";if(e){var n=e.toLowerCase();n===" "||vbe.test(n)?r="space":xbe.test(n)?r="esc":n.length==1?(!t||gbe.test(n))&&(r=n):ybe.test(n)?r=n.replace("arrow",""):n=="multiply"?r="*":r=n}return r}function bbe(e){var t="";return e&&(e in $gt?t=$gt[e]:_be.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function wbe(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=mbe[e]),t}function Sbe(e,t){return e.key?Zgt(e.key,t):e.detail&&e.detail.key?Zgt(e.detail.key,t):bbe(e.keyIdentifier)||wbe(e.keyCode)||""}function Jgt(e,t){var r=Sbe(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 Mbe(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 Kgt?(t[Kgt[i]]=!0,t.hasModifiers=!0):(t.key=i,t.event=o||"keydown"),t},{combo:e.split(":").shift()})}function Qgt(e){return e.trim().split(" ").map(function(t){return Mbe(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=Qgt(t),n=0;n<r.length;++n)if(Jgt(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){Qgt(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(Jgt(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 y9={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 t0t=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Ebe=t0t&&t0t[1]>=8,e0t=3,r0t="-10000px",hE=-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:[Hgt,Js,y9,Wgt],_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),ci)}},_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,e0t,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),ci))}},_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(e0t))},_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(),ui(),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){ui();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;!Ebe&&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)&&(ui(),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=hE,n=o?o.tabIndex:-1,t.tabIndex=r,!(o&&a!==o&&a.contains(o)&&n!==hE)&&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=hE,t.tabIndex===hE&&(n=t),n||(n=zt(t).querySelector('[tabindex="'+hE+'"]')),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,r0t,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,r0t,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(DI(this.as,t)){var n=e[this.indexAs];t==this.as&&(this.items[n]=r),this.notifyPath(dp(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 v9=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 wh={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 v9(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[wm(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:[Js,wh],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,t){this.async(this.notifyResize)}});var n0t=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>`;n0t.setAttribute("style","display: none;");document.head.appendChild(n0t.content);var i0t=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>`;i0t.setAttribute("style","display: none;");document.head.appendChild(i0t.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()}},Sh=[Oo,Yx];var Mh={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 o0t(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}o0t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var r=Mh.distance(e,t,0,0),n=Mh.distance(e,t,this.width,0),i=Mh.distance(e,t,0,this.height),o=Mh.distance(e,t,this.width,this.height);return Math.max(r,n,i,o)}};function g_(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()}g_.MAX_RADIUS=300;g_.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Mh.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Mh.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),g_.MAX_RADIUS)*1.1+5,n=1.1-.2*(r/g_.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,g_.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,g_.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 o0t(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=Mh.now(),this.center?(this.xStart=t,this.yStart=r,this.slideDistance=Mh.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=Mh.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=Mh.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 g_(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 hW={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()}},a0t=[Sh,Di,su,hW];var s0t=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>`;s0t.setAttribute("strip-whitespace","");Yt({_template:s0t,is:"paper-button",behaviors:[a0t],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?hW._calculateElevation.apply(this):this._setElevation(0)}});var l0t=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>
`;l0t.setAttribute("style","display: none;");document.head.appendChild(l0t.content);var c0t=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>`;c0t.setAttribute("style","display: none;");document.head.appendChild(c0t.content);var Eh={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},detached:function(){}};var fW=null,Th={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){fW=new go({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return fW&&fW.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 pW={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")}},u0t=[Eh,Th,pW];var fE={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=[Sh,Di,su,fE];var Tbe={_checkedChanged:function(){pW._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,u0t,Tbe];var h0t=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>`;h0t.setAttribute("strip-whitespace","");Yt({_template:h0t,is:"paper-checkbox",behaviors:[Xx],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){Tm(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,fE._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 f0t=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>`;f0t.setAttribute("style","display: none;");document.head.appendChild(f0t.content);var dW=document.createElement("template");dW.setAttribute("style","display: none;");dW.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(dW.content);var p0t={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 Cbe={_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={}}},x9=[p0t,Cbe];var b9,Abe=()=>{if(b9!==void 0)return b9;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),b9=Math.abs(e.offsetWidth-100)>1?e.offsetWidth-e.clientWidth:0,document.body.removeChild(e),b9},d0t={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=Abe(),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,w9=$x.matches||$x.matchesSelector||$x.mozMatchesSelector||$x.msMatchesSelector||$x.oMatchesSelector||$x.webkitMatchesSelector,mW=class{getTabbableNodes(t){var r=[],n=this._collectTabbableNodes(t,r);return n?this._sortByTabIndex(r):r}isFocusable(t){return w9.call(t,"input, select, textarea, button, object")?w9.call(t,":not([disabled])"):w9.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(t){return this.isFocusable(t)&&w9.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}},m0t=new mW;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 gW=class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Em(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}},g0t=new gW;var M9={pageX:0,pageY:0},_0t=null,_W=[],E9=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"],S9,yW;function y0t(e){Ch.indexOf(e)>=0||(Ch.length===0&&Ibe(),Ch.push(e),yW=Ch[Ch.length-1],x0t=[],b0t=[])}function v0t(e){var t=Ch.indexOf(e);t!==-1&&(Ch.splice(t,1),yW=Ch[Ch.length-1],x0t=[],b0t=[],Ch.length===0&&Lbe())}var Ch=[],x0t=null,b0t=null;function Pbe(e){if(e.cancelable&&kbe(e)&&e.preventDefault(),e.targetTouches){var t=e.targetTouches[0];M9.pageX=t.pageX,M9.pageY=t.pageY}}function Ibe(){S9=S9||Pbe.bind(void 0);for(var e=0,t=E9.length;e<t;e++)document.addEventListener(E9[e],S9,{capture:!0,passive:!1})}function Lbe(){for(var e=0,t=E9.length;e<t;e++)document.removeEventListener(E9[e],S9,{capture:!0,passive:!1})}function kbe(e){var t=zt(e).rootTarget;if(e.type!=="touchmove"&&_0t!==t&&(_0t=t,_W=Rbe(zt(e).path)),!_W.length)return!0;if(e.type==="touchstart")return!1;var r=Dbe(e);return!Nbe(_W,r.deltaX,r.deltaY)}function Rbe(e){for(var t=[],r=e.indexOf(yW),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 Nbe(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 Dbe(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=M9.pageX-r.pageX,t.deltaY=M9.pageY-r.pageY}}return t}var Pm={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:g0t},_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 m0t.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||zbe(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)?(v0t(this),this.__removeScrollListeners()):(r==="lock"&&(this.__saveScrollPosition(),y0t(this)),this.__addScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],c_)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)}},Obe=e=>e.assignedSlot||e.parentNode||e.host,zbe=(e,t)=>{for(let r=t;r;r=Obe(r))if(r===e)return!0;return!1},Kx=[d0t,Js,Pm];var vW={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}}}},w0t=[Kx,vW];Yt({_template:Q`
    <style include="paper-dialog-shared-styles"></style>
    <slot></slot>
`,is:"paper-dialog",behaviors:[w0t,x9],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(vW)>=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:[Th],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=Th.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 T9={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:[T9],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 S0t=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>
`;S0t.setAttribute("style","display: none;");document.head.appendChild(S0t.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 wm(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:[T9],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 Fbe={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()}}},C9=[Di,Oo,Fbe];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:[C9,Eh],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,x9],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(),Pm._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Pm._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Pm._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():Pm._applyFocus.apply(this,arguments)}});var yp={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:[yp],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:[yp],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:[yp],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:[yp],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:[yp],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:[yp],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 pE={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},Bbe=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:pE.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:pE.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:pE.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(pE).forEach(function(e){Bbe[e]=pE[e]});var xW=document.createElement("template");xW.setAttribute("style","display: none;");xW.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(xW.content);var bW=document.createElement("template");bW.setAttribute("style","display: none;");bW.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(bW.content);var Hbe=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:[Sh,Di,Eh,Th],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),Hbe.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){igt(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 wW=1,M0t=2,A9={outerScroll:{scroll:!0},shadowMode:{standard:M0t,waterfall:wW,"waterfall-tall":wW},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=A9.shadowMode[t];this.shadow?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===M0t?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===wW&&!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=A9,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&&A9.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 A9.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:[Th,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=Th.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:[C9,Eh],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 SW=document.createElement("template");SW.setAttribute("style","display: none;");SW.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(SW.content);var Vbe={hostAttributes:{role:"option",tabindex:"0"}},P9=[Sh,Di,Vbe];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:[P9]});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:[P9]});var MW={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)):wh._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)}},E0t=[wh,MW];var __={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),MW.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"),wh._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");__._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),__._shiftTabPressed=!1},1)},_onFocus:function(e){if(!__._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){wh._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)}};__._shiftTabPressed=!1;var I9=[E0t,Oo,__];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:[I9],hostAttributes:{role:"listbox"}});var T0t=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>
`;T0t.setAttribute("style","display: none;");document.body.appendChild(T0t.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 L9={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:[L9],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 C0t=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>`;C0t.setAttribute("strip-whitespace","");Yt({_template:C0t,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(){Tm(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 k9={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)}},R9=[I9,k9];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:[R9],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)}wh.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){k9._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){k9._onRightKey.apply(this,arguments),this._activateFocusedItem()}});var A0t=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>
`;A0t.setAttribute("strip-whitespace","");Yt({_template:A0t,is:"paper-slider",behaviors:[Oo,Eh,jx,L9],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&&d_(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,fE._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 EW=document.createElement("template");EW.setAttribute("style","display: none;");EW.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(EW.content);var N9={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 P0t=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>
`;P0t.setAttribute("strip-whitespace","");Yt({_template:P0t,is:"paper-spinner",behaviors:[N9]});var I0t=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>
`;I0t.setAttribute("strip-whitespace","");Yt({_template:I0t,is:"paper-spinner-lite",behaviors:[N9]});var Ube=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(Ube.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,Sh,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:[Js,R9],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(),__._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 Da._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?Da._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Da._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),Pm._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 L0t=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>

  `;L0t.setAttribute("strip-whitespace","");Yt({_template:L0t,is:"paper-toggle-button",behaviors:[Xx],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Tm(this,function(){d_(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(){ui();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 dE=class{constructor(t){this.listener=t}},TW=new Set,D9=new Set;window.addEventListener("hashchange",()=>{TW.forEach(e=>e.listener())});window.addEventListener("storage",()=>{D9.forEach(e=>e.listener())});function mE(e){let t=new dE(e);return TW.add(t),t}function CW(e){let t=new dE(e);return D9.add(t),t}function AW(){D9.forEach(e=>e.listener())}function PW(e){TW.delete(e)}function IW(e){D9.delete(e)}var RW={};Ks(RW,{getFakeHash:()=>kW,setFakeHash:()=>LW,setUseHash:()=>qbe,useHash:()=>O9});var k0t=!1;function qbe(e){k0t=e}function O9(){return k0t}var R0t="";function LW(e){R0t=e}function kW(){return R0t}var Qx="__tab__",NW={};function N0t(){return NW}function D0t(e){NW=e}mE(()=>{NW=eb(tb())});function tb(){return O9()?window.location.hash.slice(1):kW()}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 z9(e,t=!1){if(O9())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 LW(e)}function F9(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 O0t(e,t=!1){let r=eb(tb());delete r[e],z9(F9(r),t)}var F0t="disambiguator",{get:Gbe,set:Wbe,getInitializer:y_,getObserver:v_,disposeBinding:Ybe}=yE(e=>e,e=>e),{get:jbe,set:Xbe,getInitializer:vp,getObserver:xp,disposeBinding:$be}=yE(e=>e==="true"?!0:e==="false"?!1:void 0,e=>e.toString()),{get:DW,set:OW,getInitializer:gE,getObserver:_E,disposeBinding:Kbe}=yE(e=>+e,e=>e.toString()),{get:Zbe,set:Jbe,getInitializer:zW,getObserver:FW,disposeBinding:Qbe}=yE(e=>JSON.parse(atob(e)),e=>btoa(JSON.stringify(e)));function yE(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),AW();else if(!rb.isEqual(u,i(c,{useLocalStorage:p})))if(rb.isEqual(u,f))O0t(c,d);else{let _=eb(tb());_[c]=g,z9(F9(_),d)}}function a(c,u){let h=Kl({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=z0t(this,c),p=()=>{let _=i(f,h),y=this[h.polymerProperty];rb.isEqual(_,y)||(this[h.polymerProperty]=_)},g=(h.useLocalStorage?CW:mE)(()=>p());return h.useLocalStorage?n.push(g):r.push(g),p(),this[h.polymerProperty]}}function s(){r.forEach(c=>PW(c)),n.forEach(c=>IW(c))}function l(c,u){let h=Kl({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=z0t(this,c),p=this[h.polymerProperty];o(f,p,h)}}return{get:i,set:o,getInitializer:a,getObserver:l,disposeBinding:s}}function t2e(){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}}z9(F9(t)),D0t(t)}function z0t(e,t){let r=e[F0t];return(r==null?[t]:[r,t]).join(".")}var vE=class extends mt{constructor(){super(...arguments),this._tagFilter=y_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"}).call(this),this._tagFilterObserver=v_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"})}_computeTagFilter(){return this._tagFilter}};vE.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)],vE.prototype,"tagFilter",void 0);E([A({type:String,observer:"_tagFilterObserver"}),w("design:type",String)],vE.prototype,"_tagFilter",void 0);vE=E([yt("tf-tag-filterer")],vE);function _s(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)}_s({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"))}}}_s({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 HW=document.createElement("style");HW.setAttribute("is","custom-style");HW.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(HW);var VW=class extends _o(mt){};VW.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>
  `;VW=E([yt("tf-dashboard-layout")],VW);var B0t="TF.TensorBoard.PaginatedView.limit",e2e=12,Ah=null,UW=new Set;function qW(e){UW.add(e)}function GW(e){UW.delete(e)}function WW(){return Ah==null&&(Ah=DW(B0t,{useLocalStorage:!0}),(Ah==null||!isFinite(Ah)||Ah<=0)&&(Ah=e2e)),Ah}function r2e(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!==Ah&&(Ah=e,OW(B0t,Ah,{useLocalStorage:!0}),UW.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===Na.SEARCH_RESULTS&&t.name==="")}get _itemsRendered(){return this._paneRendered&&this.opened}_computeIsSearchResults(t){return t===Na.SEARCH_RESULTS}_computeIsInvalidSearchResults(t){return t.type===Na.SEARCH_RESULTS&&!t.validRegex}_computeIsUniversalSearchQuery(t){return t.type===Na.SEARCH_RESULTS&&t.universalRegex}_isCompositeSearch(){let{type:t,compositeSearch:r}=this.category.metadata;return r&&t===Na.SEARCH_RESULTS}ready(){super.ready(),this.opened=this.initialOpened==null?!0:this.initialOpened,this._limitListener=()=>{this.set("_limit",WW())},qW(this._limitListener),this._limitListener()}detached(){GW(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 H0t=Ee(Oe(),1);var B9=class{constructor(t){this.listener=t}},bp=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 B9(t);return this._listeners.add(r),r}removeListenerByKey(t){this._listeners.delete(t)}emitChange(){this._listeners.forEach(t=>{try{t.listener()}catch(r){}})}};var H9=class extends bp{load(){let t=ve().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),!H0t.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 H9;var V0t=Ee(Oe(),1);var V9=class extends bp{constructor(){super(...arguments),this._runs=[]}load(){let t=ve().runs();return this.requestManager.request(t).then(r=>{V0t.isEqual(this._runs,r)||(this._runs=r,this.emitChange())})}getRuns(){return this._runs.slice()}},wp=new V9;var Vr={};Ks(Vr,{FormatSpecifier:()=>qE,active:()=>O1t,arc:()=>NSt,area:()=>O8,areaRadial:()=>a$,ascending:()=>oa,autoType:()=>oj,axisBottom:()=>K9,axisLeft:()=>lb,axisRight:()=>u_t,axisTop:()=>c_t,bisect:()=>ys,bisectLeft:()=>G0t,bisectRight:()=>YW,bisector:()=>ob,blob:()=>Ivt,brush:()=>qL,brushSelection:()=>VL,brushX:()=>U1t,brushY:()=>UL,buffer:()=>Lvt,chord:()=>G1t,clientPoint:()=>Dm,cluster:()=>Hbt,color:()=>rc,contourDensity:()=>hvt,contours:()=>KL,create:()=>ryt,creator:()=>Rm,cross:()=>U9,csv:()=>Rvt,csvFormat:()=>gvt,csvFormatBody:()=>_vt,csvFormatRow:()=>vvt,csvFormatRows:()=>yvt,csvFormatValue:()=>xvt,csvParse:()=>Cb,csvParseRows:()=>mvt,cubehelix:()=>la,curveBasis:()=>G8,curveBasisClosed:()=>XSt,curveBasisOpen:()=>KSt,curveBundle:()=>JSt,curveCardinal:()=>QSt,curveCardinalClosed:()=>t3t,curveCardinalOpen:()=>e3t,curveCatmullRom:()=>n3t,curveCatmullRomClosed:()=>o3t,curveCatmullRomOpen:()=>s3t,curveLinear:()=>Yh,curveLinearClosed:()=>c3t,curveMonotoneX:()=>m3t,curveMonotoneY:()=>g3t,curveNatural:()=>v3t,curveStep:()=>x3t,curveStepAfter:()=>w3t,curveStepBefore:()=>b3t,customEvent:()=>Mp,descending:()=>Y0t,deviation:()=>G9,dispatch:()=>vs,drag:()=>pb,dragDisable:()=>zm,dragEnable:()=>Fm,dsv:()=>aj,dsvFormat:()=>Wm,easeBack:()=>DL,easeBackIn:()=>zY,easeBackInOut:()=>DL,easeBackOut:()=>FY,easeBounce:()=>P_,easeBounceIn:()=>NY,easeBounceInOut:()=>DY,easeBounceOut:()=>P_,easeCircle:()=>RL,easeCircleIn:()=>LY,easeCircleInOut:()=>RL,easeCircleOut:()=>kY,easeCubic:()=>xs,easeCubicIn:()=>bY,easeCubicInOut:()=>xs,easeCubicOut:()=>wY,easeElastic:()=>OL,easeElasticIn:()=>VY,easeElasticInOut:()=>UY,easeElasticOut:()=>OL,easeExp:()=>kL,easeExpIn:()=>PY,easeExpInOut:()=>kL,easeExpOut:()=>IY,easeLinear:()=>yY,easePoly:()=>IL,easePolyIn:()=>MY,easePolyInOut:()=>IL,easePolyOut:()=>EY,easeQuad:()=>PL,easeQuadIn:()=>vY,easeQuadInOut:()=>PL,easeQuadOut:()=>xY,easeSin:()=>LL,easeSinIn:()=>TY,easeSinInOut:()=>LL,easeSinOut:()=>CY,entries:()=>ovt,event:()=>qt,extent:()=>aa,forceCenter:()=>Hvt,forceCollide:()=>oxt,forceLink:()=>sxt,forceManyBody:()=>hxt,forceRadial:()=>fxt,forceSimulation:()=>uxt,forceX:()=>pxt,forceY:()=>dxt,format:()=>xn,formatDefaultLocale:()=>rk,formatLocale:()=>tk,formatPrefix:()=>GE,formatSpecifier:()=>Lp,geoAlbers:()=>Vk,geoAlbersUsa:()=>Tbt,geoArea:()=>Pxt,geoAzimuthalEqualArea:()=>Cbt,geoAzimuthalEqualAreaRaw:()=>qk,geoAzimuthalEquidistant:()=>Abt,geoAzimuthalEquidistantRaw:()=>Gk,geoBounds:()=>zxt,geoCentroid:()=>qxt,geoCircle:()=>Xxt,geoClipAntimeridian:()=>t5,geoClipCircle:()=>Ck,geoClipExtent:()=>Zxt,geoClipRectangle:()=>Dp,geoConicConformal:()=>Ibt,geoConicConformalRaw:()=>Xj,geoConicEqualArea:()=>W_,geoConicEqualAreaRaw:()=>Yj,geoConicEquidistant:()=>kbt,geoConicEquidistantRaw:()=>$j,geoContains:()=>ibt,geoDistance:()=>Nb,geoEqualEarth:()=>Rbt,geoEqualEarthRaw:()=>jk,geoEquirectangular:()=>Lbt,geoEquirectangularRaw:()=>j_,geoGnomonic:()=>Nbt,geoGnomonicRaw:()=>Xk,geoGraticule:()=>Rk,geoGraticule10:()=>sbt,geoIdentity:()=>Dbt,geoInterpolate:()=>lbt,geoLength:()=>Lk,geoMercator:()=>Pbt,geoMercatorRaw:()=>Y_,geoNaturalEarth1:()=>Obt,geoNaturalEarth1Raw:()=>$k,geoOrthographic:()=>zbt,geoOrthographicRaw:()=>Kk,geoPath:()=>bbt,geoProjection:()=>Mi,geoProjectionMutator:()=>s5,geoRotation:()=>bk,geoStereographic:()=>Fbt,geoStereographicRaw:()=>Zk,geoStream:()=>vo,geoTransform:()=>wbt,geoTransverseMercator:()=>Bbt,geoTransverseMercatorRaw:()=>Jk,gray:()=>yyt,hcl:()=>gb,hierarchy:()=>f5,histogram:()=>Z0t,hsl:()=>Vm,html:()=>Fvt,image:()=>Dvt,interpolate:()=>nc,interpolateArray:()=>Iyt,interpolateBasis:()=>sL,interpolateBasisClosed:()=>lL,interpolateBlues:()=>mSt,interpolateBrBG:()=>Xwt,interpolateBuGn:()=>nSt,interpolateBuPu:()=>iSt,interpolateCividis:()=>bSt,interpolateCool:()=>MSt,interpolateCubehelix:()=>jyt,interpolateCubehelixDefault:()=>wSt,interpolateCubehelixLong:()=>E_,interpolateDate:()=>hL,interpolateDiscrete:()=>Lyt,interpolateGnBu:()=>oSt,interpolateGreens:()=>gSt,interpolateGreys:()=>_St,interpolateHcl:()=>Gyt,interpolateHclLong:()=>Wyt,interpolateHsl:()=>Vyt,interpolateHslLong:()=>Uyt,interpolateHue:()=>kyt,interpolateInferno:()=>ISt,interpolateLab:()=>M_,interpolateMagma:()=>PSt,interpolateNumber:()=>zi,interpolateNumberArray:()=>yb,interpolateObject:()=>fL,interpolateOrRd:()=>aSt,interpolateOranges:()=>xSt,interpolatePRGn:()=>$wt,interpolatePiYG:()=>Kwt,interpolatePlasma:()=>LSt,interpolatePuBu:()=>lSt,interpolatePuBuGn:()=>sSt,interpolatePuOr:()=>Zwt,interpolatePuRd:()=>cSt,interpolatePurples:()=>ySt,interpolateRainbow:()=>ESt,interpolateRdBu:()=>Jwt,interpolateRdGy:()=>Qwt,interpolateRdPu:()=>uSt,interpolateRdYlBu:()=>tSt,interpolateRdYlGn:()=>eSt,interpolateReds:()=>vSt,interpolateRgb:()=>qm,interpolateRgbBasis:()=>cL,interpolateRgbBasisClosed:()=>Pyt,interpolateRound:()=>pL,interpolateSinebow:()=>TSt,interpolateSpectral:()=>rSt,interpolateString:()=>vb,interpolateTransformCss:()=>gL,interpolateTransformSvg:()=>_L,interpolateTurbo:()=>CSt,interpolateViridis:()=>ASt,interpolateWarm:()=>SSt,interpolateYlGn:()=>fSt,interpolateYlGnBu:()=>hSt,interpolateYlOrBr:()=>pSt,interpolateYlOrRd:()=>dSt,interpolateZoom:()=>yL,interrupt:()=>hu,interval:()=>Jyt,isoFormat:()=>Rwt,isoParse:()=>Nwt,json:()=>Ovt,keys:()=>XL,lab:()=>w_,lch:()=>xyt,line:()=>vu,lineRadial:()=>o$,linkHorizontal:()=>HSt,linkRadial:()=>USt,linkVertical:()=>VSt,local:()=>tL,map:()=>Ji,matcher:()=>ub,max:()=>lu,mean:()=>t_t,median:()=>e_t,merge:()=>Im,min:()=>Lm,mouse:()=>zo,namespace:()=>Ph,namespaces:()=>wE,nest:()=>Z1t,now:()=>Ap,pack:()=>c2t,packEnclose:()=>t8,packSiblings:()=>o2t,pairs:()=>W0t,partition:()=>u2t,path:()=>bs,permute:()=>r_t,pie:()=>FSt,piecewise:()=>mY,pointRadial:()=>ly,polygonArea:()=>v2t,polygonCentroid:()=>x2t,polygonContains:()=>M2t,polygonHull:()=>S2t,polygonLength:()=>E2t,precisionFixed:()=>nk,precisionPrefix:()=>ik,precisionRound:()=>ok,quadtree:()=>zh,quantile:()=>sa,quantize:()=>Xyt,radialArea:()=>a$,radialLine:()=>o$,randomBates:()=>A2t,randomExponential:()=>P2t,randomIrwinHall:()=>a8,randomLogNormal:()=>C2t,randomNormal:()=>o8,randomUniform:()=>T2t,range:()=>Ir,rgb:()=>cu,ribbon:()=>j1t,scaleBand:()=>Qm,scaleDiverging:()=>P8,scaleDivergingLog:()=>AX,scaleDivergingPow:()=>I8,scaleDivergingSqrt:()=>Fwt,scaleDivergingSymlog:()=>PX,scaleIdentity:()=>c8,scaleImplicit:()=>s8,scaleLinear:()=>zn,scaleLog:()=>cc,scaleOrdinal:()=>gu,scalePoint:()=>tg,scalePow:()=>K_,scaleQuantile:()=>eg,scaleQuantize:()=>qb,scaleSequential:()=>E8,scaleSequentialLog:()=>TX,scaleSequentialPow:()=>T8,scaleSequentialQuantile:()=>C8,scaleSequentialSqrt:()=>zwt,scaleSequentialSymlog:()=>CX,scaleSqrt:()=>V2t,scaleSymlog:()=>h8,scaleThreshold:()=>f8,scaleTime:()=>Yb,scaleUtc:()=>Owt,scan:()=>n_t,schemeAccent:()=>Bwt,schemeBlues:()=>ZX,schemeBrBG:()=>IX,schemeBuGn:()=>BX,schemeBuPu:()=>HX,schemeCategory10:()=>jb,schemeDark2:()=>Hwt,schemeGnBu:()=>VX,schemeGreens:()=>JX,schemeGreys:()=>QX,schemeOrRd:()=>UX,schemeOranges:()=>r$,schemePRGn:()=>LX,schemePaired:()=>Vwt,schemePastel1:()=>Uwt,schemePastel2:()=>qwt,schemePiYG:()=>kX,schemePuBu:()=>GX,schemePuBuGn:()=>qX,schemePuOr:()=>RX,schemePuRd:()=>WX,schemePurples:()=>t$,schemeRdBu:()=>NX,schemeRdGy:()=>DX,schemeRdPu:()=>YX,schemeRdYlBu:()=>OX,schemeRdYlGn:()=>zX,schemeReds:()=>e$,schemeSet1:()=>Gwt,schemeSet2:()=>Wwt,schemeSet3:()=>Ywt,schemeSpectral:()=>FX,schemeTableau10:()=>jwt,schemeYlGn:()=>XX,schemeYlGnBu:()=>jX,schemeYlOrBr:()=>$X,schemeYlOrRd:()=>KX,select:()=>Ht,selectAll:()=>Ep,selection:()=>Ih,selector:()=>Nm,selectorAll:()=>cb,set:()=>tvt,shuffle:()=>i_t,stack:()=>S3t,stackOffsetDiverging:()=>E3t,stackOffsetExpand:()=>M3t,stackOffsetNone:()=>xu,stackOffsetSilhouette:()=>T3t,stackOffsetWiggle:()=>C3t,stackOrderAppearance:()=>K8,stackOrderAscending:()=>Z8,stackOrderDescending:()=>A3t,stackOrderInsideOut:()=>P3t,stackOrderNone:()=>bu,stackOrderReverse:()=>I3t,stratify:()=>p2t,style:()=>Sp,sum:()=>o_t,svg:()=>Bvt,symbol:()=>YSt,symbolCircle:()=>L5,symbolCross:()=>F8,symbolDiamond:()=>B8,symbolSquare:()=>V8,symbolStar:()=>H8,symbolTriangle:()=>U8,symbolWye:()=>q8,symbols:()=>WSt,text:()=>D_,thresholdFreedmanDiaconis:()=>J0t,thresholdScott:()=>Q0t,thresholdSturges:()=>sb,tickFormat:()=>l8,tickIncrement:()=>x_,tickStep:()=>tl,ticks:()=>ab,timeDay:()=>ty,timeDays:()=>X2t,timeFormat:()=>S5,timeFormatDefaultLocale:()=>w8,timeFormatLocale:()=>w5,timeFriday:()=>hX,timeFridays:()=>Q2t,timeHour:()=>_8,timeHours:()=>Y2t,timeInterval:()=>br,timeMillisecond:()=>Z_,timeMilliseconds:()=>sX,timeMinute:()=>g8,timeMinutes:()=>G2t,timeMonday:()=>ry,timeMondays:()=>$2t,timeMonth:()=>y8,timeMonths:()=>rwt,timeParse:()=>SX,timeSaturday:()=>fX,timeSaturdays:()=>twt,timeSecond:()=>Q_,timeSeconds:()=>lX,timeSunday:()=>rg,timeSundays:()=>pX,timeThursday:()=>zp,timeThursdays:()=>J2t,timeTuesday:()=>cX,timeTuesdays:()=>K2t,timeWednesday:()=>uX,timeWednesdays:()=>Z2t,timeWeek:()=>rg,timeWeeks:()=>pX,timeYear:()=>Gh,timeYears:()=>nwt,timeout:()=>OE,timer:()=>A_,timerFlush:()=>_Y,touch:()=>Tp,touches:()=>nyt,transition:()=>AL,transpose:()=>W9,tree:()=>d2t,treemap:()=>m2t,treemapBinary:()=>g2t,treemapDice:()=>Uh,treemapResquarify:()=>y2t,treemapSlice:()=>Jm,treemapSliceDice:()=>_2t,treemapSquarify:()=>i8,tsv:()=>Nvt,tsvFormat:()=>Svt,tsvFormatBody:()=>Mvt,tsvFormatRow:()=>Tvt,tsvFormatRows:()=>Evt,tsvFormatValue:()=>Cvt,tsvParse:()=>Ab,tsvParseRows:()=>wvt,utcDay:()=>ny,utcDays:()=>cwt,utcFormat:()=>ay,utcFriday:()=>_X,utcFridays:()=>dwt,utcHour:()=>x8,utcHours:()=>swt,utcMillisecond:()=>Z_,utcMilliseconds:()=>sX,utcMinute:()=>v8,utcMinutes:()=>owt,utcMonday:()=>oy,utcMondays:()=>uwt,utcMonth:()=>b8,utcMonths:()=>_wt,utcParse:()=>M5,utcSaturday:()=>yX,utcSaturdays:()=>mwt,utcSecond:()=>Q_,utcSeconds:()=>lX,utcSunday:()=>ng,utcSundays:()=>vX,utcThursday:()=>Fp,utcThursdays:()=>pwt,utcTuesday:()=>mX,utcTuesdays:()=>hwt,utcWednesday:()=>gX,utcWednesdays:()=>fwt,utcWeek:()=>ng,utcWeeks:()=>vX,utcYear:()=>Wh,utcYears:()=>ywt,values:()=>nvt,variance:()=>q9,version:()=>U0t,voronoi:()=>W3t,window:()=>hb,xml:()=>zvt,zip:()=>a_t,zoom:()=>tR,zoomIdentity:()=>Xh,zoomTransform:()=>i2});var U0t="5.7.0";function oa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ob(e){return e.length===1&&(e=n2e(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 n2e(e){return function(t,r){return oa(e(t),r)}}var q0t=ob(oa),YW=q0t.right,G0t=q0t.left,ys=YW;function W0t(e,t){t==null&&(t=jW);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 jW(e,t){return[e,t]}function U9(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=jW),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 Y0t(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qs(e){return e===null?NaN:+e}function q9(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=Qs(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=Qs(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}function G9(e,t){var r=q9(e,t);return r&&Math.sqrt(r)}function aa(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,X0t=j0t.slice,$0t=j0t.map;function xE(e){return function(){return e}}function K0t(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 XW=Math.sqrt(50),$W=Math.sqrt(10),KW=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=x_(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 x_(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>=XW?10:o>=$W?5:o>=KW?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=XW?10:o>=$W?5:o>=KW?2:1)}function tl(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>=XW?i*=10:o>=$W?i*=5:o>=KW&&(i*=2),t<e?-i:i}function sb(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function Z0t(){var e=K0t,t=aa,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=tl(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[ys(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:xE(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:xE([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?xE(X0t.call(i)):xE(i),n):r},n}function sa(e,t,r){if(r==null&&(r=Qs),!!(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 J0t(e,t,r){return e=$0t.call(e,Qs).sort(oa),Math.ceil((r-t)/(2*(sa(e,.75)-sa(e,.25))*Math.pow(e.length,-1/3)))}function Q0t(e,t,r){return Math.ceil((r-t)/(3.5*G9(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 t_t(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=Qs(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=Qs(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}function e_t(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=Qs(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=Qs(t(e[n],n,e)))||o.push(i);return sa(o.sort(oa),.5)}function Im(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 Lm(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 r_t(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}function n_t(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,a=e[i];for(t==null&&(t=oa);++n<r;)(t(o=e[n],a)<0||t(a,a)!==0)&&(a=o,i=n);if(t(a,a)===0)return i}}function i_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 o_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 W9(e){if(!(o=e.length))return[];for(var t=-1,r=Lm(e,i2e),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 i2e(e){return e.length}function a_t(){return W9(arguments)}var Y9=Array.prototype.slice;function s_t(e){return e}var j9=1,X9=2,ZW=3,bE=4,l_t=1e-6;function o2e(e){return"translate("+(e+.5)+",0)"}function a2e(e){return"translate(0,"+(e+.5)+")"}function s2e(e){return function(t){return+e(t)}}function l2e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function c2e(){return!this.__axis}function $9(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===j9||e===bE?-1:1,c=e===bE||e===X9?"x":"y",u=e===j9||e===ZW?o2e:a2e;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):s_t:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?l2e:s2e)(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===j9?"0em":e===ZW?"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",l_t).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",l_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===bE||e==X9?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(c2e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===X9?"start":e===bE?"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=Y9.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:Y9.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:Y9.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 c_t(e){return $9(j9,e)}function u_t(e){return $9(X9,e)}function K9(e){return $9(ZW,e)}function lb(e){return $9(bE,e)}km();km();var J9="http://www.w3.org/1999/xhtml",wE={svg:"http://www.w3.org/2000/svg",xhtml:J9,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ph(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),wE.hasOwnProperty(t)?{space:wE[t],local:e}:e}function p2e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===J9&&t.documentElement.namespaceURI===J9?t.createElement(e):t.createElementNS(r,e)}}function d2e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rm(e){var t=Ph(e);return(t.local?d2e:p2e)(t)}function m2e(){}function Nm(e){return e==null?m2e:function(){return this.querySelector(e)}}function d_t(e){typeof e!="function"&&(e=Nm(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 g2e(){return[]}function cb(e){return e==null?g2e:function(){return this.querySelectorAll(e)}}function m_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 g_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 Q9(e){return new Array(e.length)}function __t(){return new Dn(this._enter||this._groups.map(Q9),this._parents)}function SE(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}SE.prototype={constructor:SE,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 y_t(e){return function(){return e}}var v_t="$";function _2e(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 SE(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function y2e(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=v_t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=v_t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new SE(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function x_t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?y2e:_2e,n=this._parents,i=this._groups;typeof e!="function"&&(e=y_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 b_t(){return new Dn(this._exit||this._groups.map(Q9),this._parents)}function w_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 S_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 M_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 E_t(e){e||(e=v2e);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 v2e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function T_t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function C_t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function A_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 P_t(){var e=0;return this.each(function(){++e}),e}function I_t(){return!this.node()}function L_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 x2e(e){return function(){this.removeAttribute(e)}}function b2e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function w2e(e,t){return function(){this.setAttribute(e,t)}}function S2e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function M2e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function E2e(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 k_t(e,t){var r=Ph(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?b2e:x2e:typeof t=="function"?r.local?E2e:M2e:r.local?S2e:w2e)(r,t))}function hb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function T2e(e){return function(){this.style.removeProperty(e)}}function C2e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function A2e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function R_t(e,t,r){return arguments.length>1?this.each((t==null?T2e:typeof t=="function"?A2e:C2e)(e,t,r==null?"":r)):Sp(this.node(),e)}function Sp(e,t){return e.style.getPropertyValue(t)||hb(e).getComputedStyle(e,null).getPropertyValue(t)}function P2e(e){return function(){delete this[e]}}function I2e(e,t){return function(){this[e]=t}}function L2e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function N_t(e,t){return arguments.length>1?this.each((t==null?P2e:typeof t=="function"?L2e:I2e)(e,t)):this.node()[e]}function D_t(e){return e.trim().split(/^|\s+/)}function JW(e){return e.classList||new O_t(e)}function O_t(e){this._node=e,this._names=D_t(e.getAttribute("class")||"")}O_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 z_t(e,t){for(var r=JW(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function F_t(e,t){for(var r=JW(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function k2e(e){return function(){z_t(this,e)}}function R2e(e){return function(){F_t(this,e)}}function N2e(e,t){return function(){(t.apply(this,arguments)?z_t:F_t)(this,e)}}function B_t(e,t){var r=D_t(e+"");if(arguments.length<2){for(var n=JW(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?N2e:t?k2e:R2e)(r,t))}function D2e(){this.textContent=""}function O2e(e){return function(){this.textContent=e}}function z2e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function H_t(e){return arguments.length?this.each(e==null?D2e:(typeof e=="function"?z2e:O2e)(e)):this.node().textContent}function F2e(){this.innerHTML=""}function B2e(e){return function(){this.innerHTML=e}}function H2e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function V_t(e){return arguments.length?this.each(e==null?F2e:(typeof e=="function"?H2e:B2e)(e)):this.node().innerHTML}function V2e(){this.nextSibling&&this.parentNode.appendChild(this)}function U_t(){return this.each(V2e)}function U2e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q_t(){return this.each(U2e)}function G_t(e){var t=typeof e=="function"?e:Rm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function q2e(){return null}function W_t(e,t){var r=typeof e=="function"?e:Rm(e),n=t==null?q2e:typeof t=="function"?t:Nm(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function G2e(){var e=this.parentNode;e&&e.removeChild(this)}function Y_t(){return this.each(G2e)}function W2e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Y2e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function j_t(e){return this.select(e?Y2e:W2e)}function X_t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var K_t={},qt=null;typeof document!="undefined"&&($_t=document.documentElement,"onmouseenter"in $_t||(K_t={mouseenter:"mouseover",mouseleave:"mouseout"}));var $_t;function j2e(e,t,r){return e=Z_t(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function Z_t(e,t,r){return function(n){var i=qt;qt=n;try{e.call(this,this.__data__,t,r)}finally{qt=i}}}function X2e(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 $2e(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 K2e(e,t,r){var n=K_t.hasOwnProperty(e.type)?j2e:Z_t;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 J_t(e,t,r){var n=X2e(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?K2e:$2e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Mp(e,t,r,n){var i=qt;e.sourceEvent=qt,qt=e;try{return t.apply(r,n)}finally{qt=i}}function Q_t(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 Z2e(e,t){return function(){return Q_t(this,e,t)}}function J2e(e,t){return function(){return Q_t(this,e,t.apply(this,arguments))}}function tyt(e,t){return this.each((typeof t=="function"?J2e:Z2e)(e,t))}var ME=[null];function Dn(e,t){this._groups=e,this._parents=t}function eyt(){return new Dn([[document.documentElement]],ME)}Dn.prototype=eyt.prototype={constructor:Dn,select:d_t,selectAll:m_t,filter:g_t,data:x_t,enter:__t,exit:b_t,join:w_t,merge:S_t,order:M_t,sort:E_t,call:T_t,nodes:C_t,node:A_t,size:P_t,empty:I_t,each:L_t,attr:k_t,style:R_t,property:N_t,classed:B_t,text:H_t,html:V_t,raise:U_t,lower:q_t,append:G_t,insert:W_t,remove:Y_t,clone:j_t,datum:X_t,on:J_t,dispatch:tyt};var Ih=eyt;function Ht(e){return typeof e=="string"?new Dn([[document.querySelector(e)]],[document.documentElement]):new Dn([[e]],ME)}function ryt(e){return Ht(Rm(e).call(document.documentElement))}var Q2e=0;function tL(){return new QW}function QW(){this._="@"+(++Q2e).toString(36)}QW.prototype=tL.prototype={constructor:QW,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 Dm(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]),Dm(e,t)}function Ep(e){return typeof e=="string"?new Dn([document.querySelectorAll(e)],[document.documentElement]):new Dn([e==null?[]:e],ME)}function Tp(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 Dm(e,o);return null}function nyt(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]=Dm(e,t[r]);return i}function eL(){qt.stopImmediatePropagation()}function Om(){qt.preventDefault(),qt.stopImmediatePropagation()}function zm(e){var t=e.document.documentElement,r=Ht(e).on("dragstart.drag",Om,!0);"onselectstart"in t?r.on("selectstart.drag",Om,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fm(e,t){var r=e.document.documentElement,n=Ht(e).on("dragstart.drag",null);t&&(n.on("click.drag",Om,!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 EE(e){return function(){return e}}function TE(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}TE.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function twe(){return!qt.ctrlKey&&!qt.button}function ewe(){return this.parentNode}function rwe(e){return e==null?{x:qt.x,y:qt.y}:e}function nwe(){return navigator.maxTouchPoints||"ontouchstart"in this}function pb(){var e=twe,t=ewe,r=rwe,n=nwe,i={},o=vs("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),zm(qt.view),eL(),c=!1,s=qt.clientX,l=qt.clientY,S("start"))}}function d(){if(Om(),!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),Fm(qt.view,c),Om(),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,Tp,this,arguments))&&(eL(),O("start"))}}function y(){var S=qt.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(Om(),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])&&(eL(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!Mp(new TE(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}Mp(new TE(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:EE(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:EE(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:EE(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:EE(!!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 Cp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Bm(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Rh(){}var Hm=.7,b_=1/Hm,db="\\s*([+-]?\\d+)\\s*",CE="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",kh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iwe=/^#([0-9a-f]{3,8})$/,owe=new RegExp("^rgb\\("+[db,db,db]+"\\)$"),awe=new RegExp("^rgb\\("+[kh,kh,kh]+"\\)$"),swe=new RegExp("^rgba\\("+[db,db,db,CE]+"\\)$"),lwe=new RegExp("^rgba\\("+[kh,kh,kh,CE]+"\\)$"),cwe=new RegExp("^hsl\\("+[CE,kh,kh]+"\\)$"),uwe=new RegExp("^hsla\\("+[CE,kh,kh,CE]+"\\)$"),iyt={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};Cp(Rh,rc,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:oyt,formatHex:oyt,formatHsl:hwe,formatRgb:ayt,toString:ayt});function oyt(){return this.rgb().formatHex()}function hwe(){return hyt(this).formatHsl()}function ayt(){return this.rgb().formatRgb()}function rc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=iwe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?syt(t):r===3?new Ki(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?rL(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?rL(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=owe.exec(e))?new Ki(t[1],t[2],t[3],1):(t=awe.exec(e))?new Ki(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=swe.exec(e))?rL(t[1],t[2],t[3],t[4]):(t=lwe.exec(e))?rL(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cwe.exec(e))?uyt(t[1],t[2]/100,t[3]/100,1):(t=uwe.exec(e))?uyt(t[1],t[2]/100,t[3]/100,t[4]):iyt.hasOwnProperty(e)?syt(iyt[e]):e==="transparent"?new Ki(NaN,NaN,NaN,0):null}function syt(e){return new Ki(e>>16&255,e>>8&255,e&255,1)}function rL(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ki(e,t,r,n)}function AE(e){return e instanceof Rh||(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?AE(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}Cp(Ki,cu,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new Ki(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,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:lyt,formatHex:lyt,formatRgb:cyt,toString:cyt}));function lyt(){return"#"+tY(this.r)+tY(this.g)+tY(this.b)}function cyt(){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 tY(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function uyt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Lh(e,t,r,n)}function hyt(e){if(e instanceof Lh)return new Lh(e.h,e.s,e.l,e.opacity);if(e instanceof Rh||(e=rc(e)),!e)return new Lh;if(e instanceof Lh)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 Lh(a,s,l,e.opacity)}function Vm(e,t,r,n){return arguments.length===1?hyt(e):new Lh(e,t,r,n==null?1:n)}function Lh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cp(Lh,Vm,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new Lh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,e),new Lh(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(eY(e>=240?e-240:e+120,i,n),eY(e,i,n),eY(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 eY(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 nL=Math.PI/180,iL=180/Math.PI;var oL=18,fyt=.96422,pyt=1,dyt=.82521,myt=4/29,mb=6/29,gyt=3*mb*mb,fwe=mb*mb*mb;function _yt(e){if(e instanceof uu)return new uu(e.l,e.a,e.b,e.opacity);if(e instanceof Nh)return byt(e);e instanceof Ki||(e=AE(e));var t=oY(e.r),r=oY(e.g),n=oY(e.b),i=rY((.2225045*t+.7168786*r+.0606169*n)/pyt),o,a;return t===r&&r===n?o=a=i:(o=rY((.4360747*t+.3850649*r+.1430804*n)/fyt),a=rY((.0139322*t+.0971045*r+.7141733*n)/dyt)),new uu(116*i-16,500*(o-i),200*(i-a),e.opacity)}function yyt(e,t){return new uu(e,0,0,t==null?1:t)}function w_(e,t,r,n){return arguments.length===1?_yt(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}Cp(uu,w_,Bm(Rh,{brighter:function(e){return new uu(this.l+oL*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new uu(this.l-oL*(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=fyt*nY(t),e=pyt*nY(e),r=dyt*nY(r),new Ki(iY(3.1338561*t-1.6168667*e-.4906146*r),iY(-.9787684*t+1.9161415*e+.033454*r),iY(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function rY(e){return e>fwe?Math.pow(e,1/3):e/gyt+myt}function nY(e){return e>mb?e*e*e:gyt*(e-myt)}function iY(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function oY(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vyt(e){if(e instanceof Nh)return new Nh(e.h,e.c,e.l,e.opacity);if(e instanceof uu||(e=_yt(e)),e.a===0&&e.b===0)return new Nh(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*iL;return new Nh(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xyt(e,t,r,n){return arguments.length===1?vyt(e):new Nh(r,t,e,n==null?1:n)}function gb(e,t,r,n){return arguments.length===1?vyt(e):new Nh(e,t,r,n==null?1:n)}function Nh(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function byt(e){if(isNaN(e.h))return new uu(e.l,0,0,e.opacity);var t=e.h*nL;return new uu(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Cp(Nh,gb,Bm(Rh,{brighter:function(e){return new Nh(this.h,this.c,this.l+oL*(e==null?1:e),this.opacity)},darker:function(e){return new Nh(this.h,this.c,this.l-oL*(e==null?1:e),this.opacity)},rgb:function(){return byt(this).rgb()}}));var Eyt=-.14861,aY=1.78277,sY=-.29227,aL=-.90649,PE=1.97294,wyt=PE*aL,Syt=PE*aY,Myt=aY*sY-aL*Eyt;function pwe(e){if(e instanceof S_)return new S_(e.h,e.s,e.l,e.opacity);e instanceof Ki||(e=AE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(Myt*n+wyt*t-Syt*r)/(Myt+wyt-Syt),o=n-i,a=(PE*(r-i)-sY*o)/aL,s=Math.sqrt(a*a+o*o)/(PE*i*(1-i)),l=s?Math.atan2(a,o)*iL-120:NaN;return new S_(l<0?l+360:l,s,i,e.opacity)}function la(e,t,r,n){return arguments.length===1?pwe(e):new S_(e,t,r,n==null?1:n)}function S_(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cp(S_,la,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new S_(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,e),new S_(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*nL,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*(Eyt*n+aY*i)),255*(t+r*(sY*n+aL*i)),255*(t+r*(PE*n)),this.opacity)}}));function lY(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 sL(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 lY((r-n/t)*t,a,i,o,s)}}function lL(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 lY((r-n/t)*t,i,o,a,s)}}function _b(e){return function(){return e}}function Tyt(e,t){return function(r){return e+r*t}}function dwe(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 Um(e,t){var r=t-e;return r?Tyt(e,r>180||r<-180?r-360*Math.round(r/360):r):_b(isNaN(e)?t:e)}function Cyt(e){return(e=+e)==1?Zn:function(t,r){return r-t?dwe(t,r,e):_b(isNaN(t)?r:t)}}function Zn(e,t){var r=t-e;return r?Tyt(e,r):_b(isNaN(e)?t:e)}var qm=function e(t){var r=Cyt(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 Ayt(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 cL=Ayt(sL),Pyt=Ayt(lL);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 uL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Iyt(e,t){return(uL(t)?yb:cY)(e,t)}function cY(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 hL(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 fL(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 hY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uY=new RegExp(hY.source,"g");function mwe(e){return function(){return e}}function gwe(e){return function(t){return e(t)+""}}function vb(e,t){var r=hY.lastIndex=uY.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=hY.exec(e))&&(i=uY.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=uY.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?gwe(l[0].x):mwe(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,qm):vb:t instanceof rc?qm:t instanceof Date?hL:uL(t)?yb:Array.isArray(t)?cY:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fL:zi)(e,t)}function Lyt(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}function kyt(e,t){var r=Um(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}function pL(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Ryt=180/Math.PI,dL={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fY(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)*Ryt,skewX:Math.atan(l)*Ryt,scaleX:a,scaleY:s}}var IE,pY,Nyt,mL;function Dyt(e){return e==="none"?dL:(IE||(IE=document.createElement("DIV"),pY=document.documentElement,Nyt=document.defaultView),IE.style.transform=e,e=Nyt.getComputedStyle(pY.appendChild(IE),null).getPropertyValue("transform"),pY.removeChild(IE),e=e.slice(7,-1).split(","),fY(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Oyt(e){return e==null?dL:(mL||(mL=document.createElementNS("http://www.w3.org/2000/svg","g")),mL.setAttribute("transform",e),(e=mL.transform.baseVal.consolidate())?(e=e.matrix,fY(e.a,e.b,e.c,e.d,e.e,e.f)):dL)}function zyt(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 gL=zyt(Dyt,"px, ","px)","deg)"),_L=zyt(Oyt,", ",")",")");var LE=Math.SQRT2,dY=2,Fyt=4,_we=1e-12;function Byt(e){return((e=Math.exp(e))+1/e)/2}function ywe(e){return((e=Math.exp(e))-1/e)/2}function vwe(e){return((e=Math.exp(2*e))-1)/(e+1)}function yL(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<_we)f=Math.log(s/i)/LE,h=function(x){return[r+x*l,n+x*c,i*Math.exp(LE*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+Fyt*u)/(2*i*dY*p),g=(s*s-i*i-Fyt*u)/(2*s*dY*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/LE,h=function(x){var b=x*f,S=Byt(_),C=i/(dY*p)*(S*vwe(LE*b+_)-ywe(_));return[r+C*l,n+C*c,i*S/Byt(LE*b+_)]}}return h.duration=f*1e3,h}function Hyt(e){return function(t,r){var n=e((t=Vm(t)).h,(r=Vm(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 Vyt=Hyt(Um),Uyt=Hyt(Zn);function M_(e,t){var r=Zn((e=w_(e)).l,(t=w_(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 qyt(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 Gyt=qyt(Um),Wyt=qyt(Zn);function Yyt(e){return function t(r){r=+r;function n(i,o){var a=e((i=la(i)).h,(o=la(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=Yyt(Um),E_=Yyt(Zn);function mY(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 Xyt(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}km();var xb=0,RE=0,kE=0,Kyt=1e3,vL,NE,xL=0,T_=0,bL=0,DE=typeof performance=="object"&&performance.now?performance:Date,Zyt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ap(){return T_||(Zyt(xwe),T_=DE.now()+bL)}function xwe(){T_=0}function C_(){this._call=this._time=this._next=null}C_.prototype=A_.prototype={constructor:C_,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ap():+r)+(t==null?0:+t),!this._next&&NE!==this&&(NE?NE._next=this:vL=this,NE=this),this._call=e,this._time=r,gY()},stop:function(){this._call&&(this._call=null,this._time=1/0,gY())}};function A_(e,t,r){var n=new C_;return n.restart(e,t,r),n}function _Y(){Ap(),++xb;for(var e=vL,t;e;)(t=T_-e._time)>=0&&e._call.call(null,t),e=e._next;--xb}function $yt(){T_=(xL=DE.now())+bL,xb=RE=0;try{_Y()}finally{xb=0,wwe(),T_=0}}function bwe(){var e=DE.now(),t=e-xL;t>Kyt&&(bL-=t,xL=e)}function wwe(){for(var e,t=vL,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:vL=r);NE=e,gY(n)}function gY(e){if(!xb){RE&&(RE=clearTimeout(RE));var t=e-T_;t>24?(e<1/0&&(RE=setTimeout($yt,e-DE.now()-bL)),kE&&(kE=clearInterval(kE))):(kE||(xL=DE.now(),kE=setInterval(bwe,Kyt)),xb=1,Zyt($yt))}}function OE(e,t,r){var n=new C_;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}function Jyt(e,t,r){var n=new C_,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?Ap():+r,n.restart(function o(a){a+=i,n.restart(o,i+=t,r),e(a)},t,r),n)}var Swe=vs("start","end","cancel","interrupt"),Mwe=[],t1t=0,SL=1,ML=2,wL=3,Qyt=4,EL=5,zE=6;function Gm(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Ewe(e,r,{name:t,index:n,group:i,on:Swe,tween:Mwe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:t1t})}function FE(e,t){var r=Zi(e,t);if(r.state>t1t)throw new Error("too late; already scheduled");return r}function Oa(e,t){var r=Zi(e,t);if(r.state>wL)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 Ewe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=A_(o,0,r.time);function o(c){r.state=SL,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!==SL)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===wL)return OE(a);p.state===Qyt?(p.state=zE,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=zE,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(OE(function(){r.state===wL&&(r.state=Qyt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=ML,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ML){for(r.state=wL,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=EL,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===EL&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=zE,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>ML&&n.state<EL,n.state=zE,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function e1t(e){return this.each(function(){hu(this,e)})}function Twe(e,t){var r,n;return function(){var i=Oa(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 Cwe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Oa(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 r1t(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?Twe:Cwe)(r,e,t))}function bb(e,t,r){var n=e._id;return e.each(function(){var i=Oa(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Zi(i,n).value[t]}}function TL(e,t){var r;return(typeof t=="number"?zi:t instanceof rc?qm:(r=rc(t))?(t=r,qm):vb)(e,t)}function Awe(e){return function(){this.removeAttribute(e)}}function Pwe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Iwe(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 Lwe(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 kwe(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 Rwe(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 n1t(e,t){var r=Ph(e),n=r==="transform"?_L:TL;return this.attrTween(e,typeof t=="function"?(r.local?Rwe:kwe)(r,n,bb(this,"attr."+e,t)):t==null?(r.local?Pwe:Awe)(r):(r.local?Lwe:Iwe)(r,n,t))}function Nwe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Dwe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Owe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Dwe(e,o)),r}return i._value=t,i}function zwe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Nwe(e,o)),r}return i._value=t,i}function i1t(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=Ph(e);return this.tween(r,(n.local?Owe:zwe)(n,t))}function Fwe(e,t){return function(){FE(this,e).delay=+t.apply(this,arguments)}}function Bwe(e,t){return t=+t,function(){FE(this,e).delay=t}}function o1t(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fwe:Bwe)(t,e)):Zi(this.node(),t).delay}function Hwe(e,t){return function(){Oa(this,e).duration=+t.apply(this,arguments)}}function Vwe(e,t){return t=+t,function(){Oa(this,e).duration=t}}function a1t(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hwe:Vwe)(t,e)):Zi(this.node(),t).duration}function Uwe(e,t){if(typeof t!="function")throw new Error;return function(){Oa(this,e).ease=t}}function s1t(e){var t=this._id;return arguments.length?this.each(Uwe(t,e)):Zi(this.node(),t).ease}function l1t(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 c1t(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 qwe(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 Gwe(e,t,r){var n,i,o=qwe(t)?FE:Oa;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function u1t(e,t){var r=this._id;return arguments.length<2?Zi(this.node(),r).on.on(e):this.each(Gwe(r,e,t))}function Wwe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function h1t(){return this.on("end.remove",Wwe(this._id))}function f1t(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Nm(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,Gm(c[f],t,r,f,c,Zi(u,r)));return new Fo(o,this._parents,t,r)}function p1t(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])&&Gm(p,t,r,g,f,d);o.push(f),a.push(u)}return new Fo(o,a,t,r)}var Ywe=Ih.prototype.constructor;function d1t(){return new Ywe(this._groups,this._parents)}function jwe(e,t){var r,n,i;return function(){var o=Sp(this,e),a=(this.style.removeProperty(e),Sp(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function m1t(e){return function(){this.style.removeProperty(e)}}function Xwe(e,t,r){var n,i=r+"",o;return function(){var a=Sp(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function $we(e,t,r){var n,i,o;return function(){var a=Sp(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Sp(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function Kwe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Oa(this,e),c=l.on,u=l.value[o]==null?s||(s=m1t(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function g1t(e,t,r){var n=(e+="")=="transform"?gL:TL;return t==null?this.styleTween(e,jwe(e,n)).on("end.style."+e,m1t(e)):typeof t=="function"?this.styleTween(e,$we(e,n,bb(this,"style."+e,t))).each(Kwe(this._id,e)):this.styleTween(e,Xwe(e,n,t),r).on("end.style."+e,null)}function Zwe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function Jwe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&Zwe(e,a,r)),n}return o._value=t,o}function _1t(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,Jwe(e,t,r==null?"":r))}function Qwe(e){return function(){this.textContent=e}}function tSe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function y1t(e){return this.tween("text",typeof e=="function"?tSe(bb(this,"text",e)):Qwe(e==null?"":e+""))}function eSe(e){return function(t){this.textContent=e.call(this,t)}}function rSe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&eSe(i)),t}return n._value=e,n}function v1t(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,rSe(e))}function x1t(){for(var e=this._name,t=this._id,r=CL(),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);Gm(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 b1t(){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=Oa(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 nSe=0;function Fo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function AL(e){return Ih().transition(e)}function CL(){return++nSe}var wb=Ih.prototype;Fo.prototype=AL.prototype={constructor:Fo,select:f1t,selectAll:p1t,filter:l1t,merge:c1t,selection:d1t,transition:x1t,call:wb.call,nodes:wb.nodes,node:wb.node,size:wb.size,empty:wb.empty,each:wb.each,on:u1t,attr:n1t,attrTween:i1t,style:g1t,styleTween:_1t,text:y1t,textTween:v1t,remove:h1t,tween:r1t,delay:o1t,duration:a1t,ease:s1t,end:b1t};I_();var qY={time:null,delay:0,duration:250,ease:xs};function fSe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return qY.time=Ap(),qY;return r}function D1t(e){var t,r;e instanceof Fo?(t=e._id,e=e._name):(t=CL(),(r=qY).time=Ap(),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])&&Gm(l,e,t,c,a,r||fSe(l,t));return new Fo(n,this._parents,e,t)}Ih.prototype.interrupt=e1t;Ih.prototype.transition=D1t;var pSe=[null];function O1t(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>SL&&n.name===t)return new Fo([[e]],pSe,t,+i)}return null}function zL(e){return function(){return e}}function z1t(e,t,r){this.target=e,this.type=t,this.selection=r}function GY(){qt.stopImmediatePropagation()}function FL(){qt.preventDefault(),qt.stopImmediatePropagation()}var F1t={name:"drag"},WY={name:"space"},Mb={name:"handle"},Eb={name:"center"};function B1t(e){return[+e[0],+e[1]]}function jY(e){return[B1t(e[0]),B1t(e[1])]}function dSe(e){return function(t){return Tp(t,qt.touches,e)}}var BL={name:"x",handles:["w","e"].map(BE),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]]}},HL={name:"y",handles:["n","s"].map(BE),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]]}},mSe={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(BE),input:function(e){return e==null?null:jY(e)},output:function(e){return e}},Pp={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"},H1t={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},V1t={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},gSe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_Se={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function BE(e){return{type:e}}function ySe(){return!qt.ctrlKey&&!qt.button}function vSe(){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 xSe(){return navigator.maxTouchPoints||"ontouchstart"in this}function YY(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function bSe(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function VL(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function U1t(){return XY(BL)}function UL(){return XY(HL)}function qL(){return XY(mSe)}function XY(e){var t=vSe,r=ySe,n=xSe,i=!0,o=vs("start","brush","end"),a=6,s;function l(_){var y=_.property("__brush",g).selectAll(".overlay").data([BE("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pp.overlay).merge(y).each(function(){var b=YY(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([BE("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pp.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 Pp[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=YY(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(_){Mp(new z1t(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"?F1t:i&&qt.altKey?Eb:Mb,b=e===HL?null:gSe[y],S=e===BL?null:_Se[y],C=YY(_),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?dSe(qt.changedTouches[0].identifier):zo,_t=Kt(_),ct=_t,X=u(_,arguments,!0).beforestart();y==="overlay"?(k&&(St=!0),C.selection=k=[[D=e===HL?O:_t[0],L=e===BL?I:_t[1]],[z=e===HL?F:D,Z=e===BL?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",Pp[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),zm(qt.view)}GY(),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,FL(),ht()}function ht(){var ee;switch(ot=ct[0]-_t[0],st=ct[1]-_t[1],x){case WY:case F1t:{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 H1t&&dt.attr("cursor",Pp[y=H1t[y]])),rt<R&&(S*=-1,ee=L,L=Z,Z=ee,ee=R,R=rt,rt=ee,y in V1t&&dt.attr("cursor",Pp[y=V1t[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(GY(),qt.touches){if(qt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Fm(qt.view,St),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);et.attr("pointer-events","all"),dt.attr("cursor",Pp.overlay),C.selection&&(k=C.selection),bSe(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=WY,dt.attr("cursor",Pp.selection),ht());break}default:return}FL()}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===WY&&(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",Pp[y]),ht());break}default:return}FL()}}function p(){u(this,arguments).moved()}function d(){u(this,arguments).ended()}function g(){var _=this.__brush||{selection:null};return _.extent=jY(t.apply(this,arguments)),_.dim=e,_}return l.extent=function(_){return arguments.length?(t=typeof _=="function"?_:zL(jY(_)),l):t},l.filter=function(_){return arguments.length?(r=typeof _=="function"?_:zL(!!_),l):r},l.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:zL(!!_),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 $Y=Math.cos,KY=Math.sin,q1t=Math.PI,HE=q1t/2,ZY=q1t*2,JY=Math.max;function wSe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function G1t(){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=JY(0,ZY-e*a)/p,_=p?e:ZY/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=JY(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=wSe(o))._=o,i):n&&n._},i}var W1t=Array.prototype.slice;function GL(e){return function(){return e}}var QY=Math.PI,tj=2*QY,L_=1e-6,SSe=tj-L_;function ej(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Y1t(){return new ej}ej.prototype=Y1t.prototype={constructor:ej,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>L_)if(!(Math.abs(u*s-l*c)>L_)||!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((QY-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>L_&&(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)>L_||Math.abs(this._y1-c)>L_)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%tj+tj),h>SSe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>L_&&(this._+="A"+r+","+r+",0,"+ +(h>=QY)+","+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 bs=Y1t;function MSe(e){return e.source}function ESe(e){return e.target}function TSe(e){return e.radius}function CSe(e){return e.startAngle}function ASe(e){return e.endAngle}function j1t(){var e=MSe,t=ESe,r=TSe,n=CSe,i=ASe,o=null;function a(){var s,l=W1t.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)-HE,p=i.apply(this,l)-HE,d=h*$Y(f),g=h*KY(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-HE,x=i.apply(this,l)-HE;if(o||(o=s=bs()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*$Y(y),_*KY(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:GL(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:GL(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:GL(+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 LSe=Array.prototype,$L=LSe.slice;function svt(e,t){return e-t}function lvt(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 Oh(e){return function(){return e}}function cvt(e,t){for(var r=-1,n=t.length,i;++r<n;)if(i=kSe(e,t[r]))return i;return 0}function kSe(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(RSe(l,h,t))return 0;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=-i)}return i}function RSe(e,t,r){var n;return NSe(e,t,r)&&DSe(e[n=+(e[0]===t[0])],r[n],t[n])}function NSe(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function DSe(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function uvt(){}var Ip=[[],[[[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 KL(){var e=1,t=1,r=sb,n=l;function i(c){var u=r(c);if(Array.isArray(u))u=u.slice().sort(svt);else{var h=aa(c),f=h[0],p=h[1];u=tl(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),lvt(p)>0?h.push([p]):f.push(p)}),f.forEach(function(p){for(var d=0,g=h.length,_;d<g;++d)if(cvt((_=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,Ip[y<<1].forEach(S);++d<e-1;)_=y,y=c[d+1]>=u,Ip[_|y<<1].forEach(S);for(Ip[y<<0].forEach(S);++g<t-1;){for(d=-1,y=c[g*e+e]>=u,x=c[g*e]>=u,Ip[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,Ip[_|y<<1|x<<2|b<<3].forEach(S);Ip[y|x<<3].forEach(S)}for(d=-1,x=c[g*e]>=u,Ip[x<<2].forEach(S);++d<e-1;)b=x,x=c[g*e+d+1]>=u,Ip[x<<2|b<<3].forEach(S);Ip[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)?Oh($L.call(c)):Oh(c),i):r},i.smooth=function(c){return arguments.length?(n=c?l:uvt,i):n===l},i}function ZL(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 JL(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 OSe(e){return e[0]}function zSe(e){return e[1]}function FSe(){return 1}function hvt(){var e=OSe,t=zSe,r=FSe,n=960,i=500,o=20,a=2,s=o*3,l=n+s*2>>a,c=i+s*2>>a,u=Oh(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)}),ZL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),JL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),ZL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),JL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),ZL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),JL({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=tl(0,C,S),S=Ir(0,Math.floor(C/S)*S,S),S.shift()}return KL().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:Oh(+y),h):e},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:Oh(+y),h):t},h.weight=function(y){return arguments.length?(r=typeof y=="function"?y:Oh(+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)?Oh($L.call(y)):Oh(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}km();UE();I_();function qSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function Ivt(e,t){return fetch(e,t).then(qSe)}function GSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function Lvt(e,t){return fetch(e,t).then(GSe)}UE();function WSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function D_(e,t){return fetch(e,t).then(WSe)}function kvt(e){return function(t,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),D_(t,r).then(function(i){return e(i,n)})}}function aj(e,t,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=Wm(e);return D_(t,r).then(function(o){return i.parse(o,n)})}var Rvt=kvt(Cb),Nvt=kvt(Ab);function Dvt(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 YSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function Ovt(e,t){return fetch(e,t).then(YSe)}function sj(e){return function(t,r){return D_(t,r).then(function(n){return new DOMParser().parseFromString(n,e)})}}var zvt=sj("application/xml"),Fvt=sj("text/html"),Bvt=sj("image/svg+xml");function Hvt(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 Vvt(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return Uvt(this.cover(t,r),t,r,e)}function Uvt(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 qvt(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)Uvt(this,a[r],s[r],e[r]);return this}function Gvt(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 Wvt(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Yvt(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 jvt(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 Xvt(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 $vt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Kvt(){return this._root}function Zvt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Jvt(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 Qvt(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 txt(e){return e[0]}function ext(e){return arguments.length?(this._x=e,this):this._x}function rxt(e){return e[1]}function nxt(e){return arguments.length?(this._y=e,this):this._y}function zh(e,t,r){var n=new lj(t==null?txt:t,r==null?rxt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function lj(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 ixt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var za=zh.prototype=lj.prototype;za.copy=function(){var e=new lj(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=ixt(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]=ixt(n));return e};za.add=Vvt;za.addAll=qvt;za.cover=Gvt;za.data=Wvt;za.extent=Yvt;za.find=jvt;za.remove=Xvt;za.removeAll=$vt;za.root=Kvt;za.size=Zvt;za.visit=Jvt;za.visitAfter=Qvt;za.x=ext;za.y=nxt;function jSe(e){return e.x+e.vx}function XSe(e){return e.y+e.vy}function oxt(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=zh(t,jSe,XSe).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 $Se(e){return e.index}function axt(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function sxt(e){var t=$Se,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=axt(x,b.source)),typeof b.target!="object"&&(b.target=axt(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}km();Tb();function lxt(e){return e.x}function cxt(e){return e.y}var KSe=10,ZSe=Math.PI*(3-Math.sqrt(5));function uxt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=Ji(),l=A_(u),c=vs("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=KSe*Math.sqrt(d),x=d*ZSe;_.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 hxt(){var e,t,r,n=On(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=zh(e,lxt,cxt).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 fxt(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 pxt(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 dxt(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 mxt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function O_(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 Fh(e){return e=O_(Math.abs(e)),e?e[1]:NaN}function gxt(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 _xt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JSe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lp(e){if(!(t=JSe.exec(e)))throw new Error("invalid format: "+e);var t;return new qE({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]})}Lp.prototype=qE.prototype;function qE(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+""}qE.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 yxt(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 cj;function vxt(e,t){var r=O_(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(cj=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")+O_(e,Math.max(0,t+o-1))[0]}function uj(e,t){var r=O_(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 hj={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:mxt,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 uj(e*100,t)},r:uj,s:vxt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function fj(e){return e}var xxt=Array.prototype.map,bxt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function tk(e){var t=e.grouping===void 0||e.thousands===void 0?fj:gxt(xxt.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?fj:_xt(xxt.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=Lp(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"):hj[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=hj[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=yxt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?bxt[8+cj/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=Lp(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Fh(f)/3)))*3,g=Math.pow(10,-d),_=bxt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var ek,xn,GE;rk({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function rk(e){return ek=tk(e),xn=ek.format,GE=ek.formatPrefix,ek}function nk(e){return Math.max(0,-Fh(Math.abs(e)))}function ik(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fh(t)/3)))*3-Fh(Math.abs(e)))}function ok(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fh(t)-Fh(e))+1}function Ss(){return new sk}function sk(){this.reset()}sk.prototype={constructor:sk,reset:function(){this.s=this.t=0},add:function(e){wxt(ak,e,this.t),wxt(this,ak.s,this.s),this.s?this.t+=ak.t:this.s=ak.t},valueOf:function(){return this.s}};var ak=new sk;function wxt(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,z_=1e-12,Be=Math.PI,mn=Be/2,Pb=Be/4,Si=Be*2,vr=180/Be,_e=Be/180,Re=Math.abs,ic=Math.atan,bn=Math.atan2,Zt=Math.cos,WE=Math.ceil,lk=Math.exp;var F_=Math.log,ck=Math.pow,Xt=Math.sin,ca=Math.sign||function(e){return e>0?1:e<0?-1:0},xr=Math.sqrt,Ib=Math.tan;function uk(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 pj(e){return(e=Xt(e/2))*e}function Fr(){}function hk(e,t){e&&Mxt.hasOwnProperty(e.type)&&Mxt[e.type](e,t)}var Sxt={Feature:function(e,t){hk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)hk(r[n].geometry,t)}},Mxt={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){dj(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)dj(r[n],t,0)},Polygon:function(e,t){Ext(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)Ext(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)hk(r[n],t)}};function dj(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 Ext(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)dj(e[r],t,1);t.polygonEnd()}function vo(e,t){e&&Sxt.hasOwnProperty(e.type)?Sxt[e.type](e,t):hk(e,t)}var YE=Ss(),fk=Ss(),Txt,Cxt,mj,gj,_j,pu={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){YE.reset(),pu.lineStart=QSe,pu.lineEnd=t3e},polygonEnd:function(){var e=+YE;fk.add(e<0?Si+e:e),this.lineStart=this.lineEnd=this.point=Fr},sphere:function(){fk.add(Si)}};function QSe(){pu.point=e3e}function t3e(){Axt(Txt,Cxt)}function e3e(e,t){pu.point=Axt,Txt=e,Cxt=t,e*=_e,t*=_e,mj=e,gj=Zt(t=t/2+Pb),_j=Xt(t)}function Axt(e,t){e*=_e,t*=_e,t=t/2+Pb;var r=e-mj,n=r>=0?1:-1,i=n*r,o=Zt(t),a=Xt(t),s=_j*a,l=gj*o+s*Zt(i),c=s*n*Xt(i);YE.add(bn(c,l)),mj=e,gj=o,_j=a}function Pxt(e){return fk.reset(),vo(e,pu),fk*2}function B_(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 jE(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 pk(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function XE(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function H_(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 ni,Ms,hi,nl,V_,Rxt,Nxt,Lb,$E=Ss(),Ym,Np,Rp={point:yj,lineStart:Ixt,lineEnd:Lxt,polygonStart:function(){Rp.point=Oxt,Rp.lineStart=r3e,Rp.lineEnd=n3e,$E.reset(),pu.polygonStart()},polygonEnd:function(){pu.polygonEnd(),Rp.point=yj,Rp.lineStart=Ixt,Rp.lineEnd=Lxt,YE<0?(ni=-(hi=180),Ms=-(nl=90)):$E>le?nl=90:$E<-le&&(Ms=-90),Np[0]=ni,Np[1]=hi},sphere:function(){ni=-(hi=180),Ms=-(nl=90)}};function yj(e,t){Ym.push(Np=[ni=e,hi=e]),t<Ms&&(Ms=t),t>nl&&(nl=t)}function Dxt(e,t){var r=oc([e*_e,t*_e]);if(Lb){var n=kp(Lb,r),i=[n[1],-n[0],0],o=kp(i,n);H_(o),o=B_(o);var a=e-V_,s=a>0?1:-1,l=o[0]*vr*s,c,u=Re(a)>180;u^(s*V_<l&&l<s*e)?(c=o[1]*vr,c>nl&&(nl=c)):(l=(l+360)%360-180,u^(s*V_<l&&l<s*e)?(c=-o[1]*vr,c<Ms&&(Ms=c)):(t<Ms&&(Ms=t),t>nl&&(nl=t))),u?e<V_?rl(ni,e)>rl(ni,hi)&&(hi=e):rl(e,hi)>rl(ni,hi)&&(ni=e):hi>=ni?(e<ni&&(ni=e),e>hi&&(hi=e)):e>V_?rl(ni,e)>rl(ni,hi)&&(hi=e):rl(e,hi)>rl(ni,hi)&&(ni=e)}else Ym.push(Np=[ni=e,hi=e]);t<Ms&&(Ms=t),t>nl&&(nl=t),Lb=r,V_=e}function Ixt(){Rp.point=Dxt}function Lxt(){Np[0]=ni,Np[1]=hi,Rp.point=yj,Lb=null}function Oxt(e,t){if(Lb){var r=e-V_;$E.add(Re(r)>180?r+(r>0?360:-360):r)}else Rxt=e,Nxt=t;pu.point(e,t),Dxt(e,t)}function r3e(){pu.lineStart()}function n3e(){Oxt(Rxt,Nxt),pu.lineEnd(),Re($E)>le&&(ni=-(hi=180)),Np[0]=ni,Np[1]=hi,Lb=null}function rl(e,t){return(t-=e)<0?t+360:t}function i3e(e,t){return e[0]-t[0]}function kxt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function zxt(e){var t,r,n,i,o,a,s;if(nl=hi=-(ni=Ms=1/0),Ym=[],vo(e,Rp),r=Ym.length){for(Ym.sort(i3e),t=1,n=Ym[0],o=[n];t<r;++t)i=Ym[t],kxt(n,i[0])||kxt(n,i[1])?(rl(n[0],i[1])>rl(n[0],n[1])&&(n[1]=i[1]),rl(i[0],n[1])>rl(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=rl(n[1],i[0]))>a&&(a=s,ni=i[0],hi=n[1])}return Ym=Np=null,ni===1/0||Ms===1/0?[[NaN,NaN],[NaN,NaN]]:[[ni,Ms],[hi,nl]]}var KE,dk,mk,gk,_k,yk,vk,xk,vj,xj,bj,Hxt,Vxt,Fa,Ba,Ha,du={sphere:Fr,point:wj,lineStart:Fxt,lineEnd:Bxt,polygonStart:function(){du.lineStart=s3e,du.lineEnd=l3e},polygonEnd:function(){du.lineStart=Fxt,du.lineEnd=Bxt}};function wj(e,t){e*=_e,t*=_e;var r=Zt(t);ZE(r*Zt(e),r*Xt(e),Xt(t))}function ZE(e,t,r){++KE,mk+=(e-mk)/KE,gk+=(t-gk)/KE,_k+=(r-_k)/KE}function Fxt(){du.point=o3e}function o3e(e,t){e*=_e,t*=_e;var r=Zt(t);Fa=r*Zt(e),Ba=r*Xt(e),Ha=Xt(t),du.point=a3e,ZE(Fa,Ba,Ha)}function a3e(e,t){e*=_e,t*=_e;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=bn(xr((a=Ba*o-Ha*i)*a+(a=Ha*n-Fa*o)*a+(a=Fa*i-Ba*n)*a),Fa*n+Ba*i+Ha*o);dk+=a,yk+=a*(Fa+(Fa=n)),vk+=a*(Ba+(Ba=i)),xk+=a*(Ha+(Ha=o)),ZE(Fa,Ba,Ha)}function Bxt(){du.point=wj}function s3e(){du.point=c3e}function l3e(){Uxt(Hxt,Vxt),du.point=wj}function c3e(e,t){Hxt=e,Vxt=t,e*=_e,t*=_e,du.point=Uxt;var r=Zt(t);Fa=r*Zt(e),Ba=r*Xt(e),Ha=Xt(t),ZE(Fa,Ba,Ha)}function Uxt(e,t){e*=_e,t*=_e;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=Ba*o-Ha*i,s=Ha*n-Fa*o,l=Fa*i-Ba*n,c=xr(a*a+s*s+l*l),u=wn(c),h=c&&-u/c;vj+=h*a,xj+=h*s,bj+=h*l,dk+=u,yk+=u*(Fa+(Fa=n)),vk+=u*(Ba+(Ba=i)),xk+=u*(Ha+(Ha=o)),ZE(Fa,Ba,Ha)}function qxt(e){KE=dk=mk=gk=_k=yk=vk=xk=vj=xj=bj=0,vo(e,du);var t=vj,r=xj,n=bj,i=t*t+r*r+n*n;return i<z_&&(t=yk,r=vk,n=xk,dk<le&&(t=mk,r=gk,n=_k),i=t*t+r*r+n*n,i<z_)?[NaN,NaN]:[bn(r,t)*vr,wn(n/xr(i))*vr]}function U_(e){return function(){return e}}function JE(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 Sj(e,t){return[Re(e)>Be?e+Math.round(-e/Si)*Si:e,t]}Sj.invert=Sj;function QE(e,t,r){return(e%=Si)?t||r?JE(Wxt(e),Yxt(t,r)):Wxt(e):t||r?Yxt(t,r):Sj}function Gxt(e){return function(t,r){return t+=e,[t>Be?t-Si:t<-Be?t+Si:t,r]}}function Wxt(e){var t=Gxt(e);return t.invert=Gxt(-e),t}function Yxt(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 bk(e){e=QE(e[0]*_e,e[1]*_e,e.length>2?e[2]*_e:0);function t(r){return r=e(r[0]*_e,r[1]*_e),r[0]*=vr,r[1]*=vr,r}return t.invert=function(r){return r=e.invert(r[0]*_e,r[1]*_e),r[0]*=vr,r[1]*=vr,r},t}function Mj(e,t,r,n,i,o){if(!!r){var a=Zt(t),s=Xt(t),l=n*r;i==null?(i=t+n*Si,o=t-l/2):(i=jxt(a,i),o=jxt(a,o),(n>0?i<o:i>o)&&(i+=n*Si));for(var c,u=i;n>0?u>o:u<o;u-=l)c=B_([a,-s*Zt(u),-s*Xt(u)]),e.point(c[0],c[1])}}function jxt(e,t){t=oc(t),t[0]-=e,H_(t);var r=uk(-t[1]);return((-t[2]<0?-r:r)+Si-le)%Si}function Xxt(){var e=U_([0,0]),t=U_(90),r=U_(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)*_e,u=r.apply(this,arguments)*_e;return n=[],i=QE(-l[0]*_e,-l[1]*_e,0).invert,Mj(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:U_([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:U_(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:U_(+l),s):r},s}function wk(){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 Sk(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 Mk(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 Sk(_,d,null,!0)),a.push(x.o=new Sk(_,null,x,!1)),o.push(x=new Sk(y,d,null,!1)),a.push(x.o=new Sk(y,null,x,!0))}}),!!o.length){for(a.sort(t),$xt(o),$xt(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 $xt(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 Ej=Ss();function Tj(e){return Re(e[0])<=Be?e[0]:ca(e[0])*((Re(e[0])+Be)%Si-Be)}function Ek(e,t){var r=Tj(t),n=t[1],i=Xt(n),o=[Xt(r),-Zt(r),0],a=0,s=0;Ej.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=Tj(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=Tj(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(Ej.add(bn(I*O*Xt(D),_*P+I*Zt(D))),a+=B?k+O*Si:k,B^p>=r^b>=r){var L=kp(oc(f),oc(x));H_(L);var R=kp(o,L);H_(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&&Ej<-le)^s&1}function Tk(e,t,r,n){return function(i){var o=t(i),a=wk(),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=Im(u);var S=Ek(c,n);u.length?(l||(i.polygonStart(),l=!0),Mk(u,h3e,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(u3e))}}return f}}function u3e(e){return e.length>1}function h3e(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 t5=Tk(function(){return!0},f3e,d3e,[-Be,-mn]);function f3e(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=p3e(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 p3e(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 d3e(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 Ck(e){var t=Zt(e),r=6*_e,n=t>0,i=Re(t)>le;function o(u,h,f,p){Mj(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],_=kp(p,d),y=jE(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=kp(g,_),k=XE(g,S),O=XE(_,C);pk(k,O);var D=P,B=jE(k,D),I=jE(D,D),L=B*B-I*(jE(k,k)-1);if(!(L<0)){var R=xr(L),F=XE(D,(-B-R)/I);if(pk(F,k),F=B_(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=XE(D,(-B+R)/I);return pk(bt,k),[F,B_(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 Tk(a,s,o,n?[0,-e]:[-Be,e-Be])}function Kxt(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 e5=1e9,Ak=-e5;function Dp(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=wk(),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=Im(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&Mk(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(Ak,Math.min(e5,x)),b=Math.max(Ak,Math.min(e5,b))],rt=[z=Math.max(Ak,Math.min(e5,z)),U=Math.max(Ak,Math.min(e5,U))];Kxt(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 Zxt(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Dp(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 Cj=Ss(),Aj,Pk,Ik,Rb={sphere:Fr,point:Fr,lineStart:m3e,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr};function m3e(){Rb.point=_3e,Rb.lineEnd=g3e}function g3e(){Rb.point=Rb.lineEnd=Fr}function _3e(e,t){e*=_e,t*=_e,Aj=e,Pk=Xt(t),Ik=Zt(t),Rb.point=y3e}function y3e(e,t){e*=_e,t*=_e;var r=Xt(t),n=Zt(t),i=Re(e-Aj),o=Zt(i),a=Xt(i),s=n*a,l=Ik*r-Pk*n*o,c=Pk*r+Ik*n*o;Cj.add(bn(xr(s*s+l*l),c)),Aj=e,Pk=r,Ik=n}function Lk(e){return Cj.reset(),vo(e,Rb),+Cj}var Pj=[null,null],v3e={type:"LineString",coordinates:Pj};function Nb(e,t){return Pj[0]=e,Pj[1]=t,Lk(v3e)}var Jxt={Feature:function(e,t){return kk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(kk(r[n].geometry,t))return!0;return!1}},Qxt={Sphere:function(){return!0},Point:function(e,t){return tbt(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(tbt(r[n],t))return!0;return!1},LineString:function(e,t){return ebt(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(ebt(r[n],t))return!0;return!1},Polygon:function(e,t){return rbt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(rbt(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(kk(r[n],t))return!0;return!1}};function kk(e,t){return e&&Qxt.hasOwnProperty(e.type)?Qxt[e.type](e,t):!1}function tbt(e,t){return Nb(e,t)===0}function ebt(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))<z_*i))return!0;r=n}return!1}function rbt(e,t){return!!Ek(e.map(x3e),nbt(t))}function x3e(e){return e=e.map(nbt),e.pop(),e}function nbt(e){return[e[0]*_e,e[1]*_e]}function ibt(e,t){return(e&&Jxt.hasOwnProperty(e.type)?Jxt[e.type]:kk)(e,t)}function obt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function abt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function Rk(){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(WE(n/u)*u,r,u).map(d).concat(Ir(WE(s/h)*h,a,h).map(g)).concat(Ir(WE(t/l)*l,e,l).filter(function(b){return Re(b%u)>le}).map(f)).concat(Ir(WE(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=obt(o,i,90),p=abt(t,e,_),d=obt(s,a,90),g=abt(n,r,_),y):_},y.extentMajor([[-180,-90+le],[180,90-le]]).extentMinor([[-180,-80-le],[180,80+le]])}function sbt(){return Rk()()}function lbt(e,t){var r=e[0]*_e,n=e[1]*_e,i=t[0]*_e,o=t[1]*_e,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(pj(o-n)+a*l*pj(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 jm(e){return e}var Ij=Ss(),Lj=Ss(),cbt,ubt,kj,Rj,Xm={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){Xm.lineStart=b3e,Xm.lineEnd=S3e},polygonEnd:function(){Xm.lineStart=Xm.lineEnd=Xm.point=Fr,Ij.add(Re(Lj)),Lj.reset()},result:function(){var e=Ij/2;return Ij.reset(),e}};function b3e(){Xm.point=w3e}function w3e(e,t){Xm.point=hbt,cbt=kj=e,ubt=Rj=t}function hbt(e,t){Lj.add(Rj*e-kj*t),kj=e,Rj=t}function S3e(){hbt(cbt,ubt)}var Nj=Xm;var Db=1/0,Nk=Db,r5=-Db,Dk=r5,M3e={point:E3e,lineStart:Fr,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr,result:function(){var e=[[Db,Nk],[r5,Dk]];return r5=Dk=-(Nk=Db=1/0),e}};function E3e(e,t){e<Db&&(Db=e),e>r5&&(r5=e),t<Nk&&(Nk=t),t>Dk&&(Dk=t)}var Ob=M3e;var Dj=0,Oj=0,n5=0,Ok=0,zk=0,zb=0,zj=0,Fj=0,i5=0,dbt,mbt,Bh,Hh,mu={point:q_,lineStart:fbt,lineEnd:pbt,polygonStart:function(){mu.lineStart=A3e,mu.lineEnd=P3e},polygonEnd:function(){mu.point=q_,mu.lineStart=fbt,mu.lineEnd=pbt},result:function(){var e=i5?[zj/i5,Fj/i5]:zb?[Ok/zb,zk/zb]:n5?[Dj/n5,Oj/n5]:[NaN,NaN];return Dj=Oj=n5=Ok=zk=zb=zj=Fj=i5=0,e}};function q_(e,t){Dj+=e,Oj+=t,++n5}function fbt(){mu.point=T3e}function T3e(e,t){mu.point=C3e,q_(Bh=e,Hh=t)}function C3e(e,t){var r=e-Bh,n=t-Hh,i=xr(r*r+n*n);Ok+=i*(Bh+e)/2,zk+=i*(Hh+t)/2,zb+=i,q_(Bh=e,Hh=t)}function pbt(){mu.point=q_}function A3e(){mu.point=I3e}function P3e(){gbt(dbt,mbt)}function I3e(e,t){mu.point=gbt,q_(dbt=Bh=e,mbt=Hh=t)}function gbt(e,t){var r=e-Bh,n=t-Hh,i=xr(r*r+n*n);Ok+=i*(Bh+e)/2,zk+=i*(Hh+t)/2,zb+=i,i=Hh*e-Bh*t,zj+=i*(Bh+e),Fj+=i*(Hh+t),i5+=i*3,q_(Bh=e,Hh=t)}var Bj=mu;function Fk(e){this._context=e}Fk.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,Si);break}}},result:Fr};var Vj=Ss(),Hj,_bt,ybt,o5,a5,Bk={point:Fr,lineStart:function(){Bk.point=L3e},lineEnd:function(){Hj&&vbt(_bt,ybt),Bk.point=Fr},polygonStart:function(){Hj=!0},polygonEnd:function(){Hj=null},result:function(){var e=+Vj;return Vj.reset(),e}};function L3e(e,t){Bk.point=vbt,_bt=o5=e,ybt=a5=t}function vbt(e,t){o5-=e,a5-=t,Vj.add(xr(o5*o5+a5*a5)),o5=e,a5=t}var Uj=Bk;function Hk(){this._string=[]}Hk.prototype={_radius:4.5,_circle:xbt(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=xbt(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 xbt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function bbt(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(Nj)),Nj.result()},o.measure=function(a){return vo(a,n(Uj)),Uj.result()},o.bounds=function(a){return vo(a,n(Ob)),Ob.result()},o.centroid=function(a){return vo(a,n(Bj)),Bj.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,jm):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new Hk):new Fk(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 wbt(e){return{stream:$m(e)}}function $m(e){return function(t){var r=new qj;for(var n in e)r[n]=e[n];return r.stream=t,r}}function qj(){}qj.prototype={constructor:qj,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 Gj(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 G_(e,t,r){return Gj(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 G_(e,[[0,0],t],r)}function Bb(e,t,r){return Gj(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 Gj(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 Sbt=16,k3e=Zt(30*_e);function Wj(e,t){return+t?N3e(e,t):R3e(e)}function R3e(e){return $m({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function N3e(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<k3e)&&(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],Sbt,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,Sbt,n),_.lineEnd=S,S()}return _}}var D3e=$m({point:function(e,t){this.stream.point(e*_e,t*_e)}});function O3e(e){return $m({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function z3e(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 Mbt(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 Mi(e){return s5(function(){return e})()}function s5(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=t5,_=null,y,x,b,S=jm,C=.5,P,k,O,D,B;function I(z){return O(z[0]*_e,z[1]*_e)}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=D3e(O3e(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?Ck(d=z*_e):(d=null,t5),F()):d*vr},I.clipExtent=function(z){return arguments.length?(S=z==null?(_=y=x=b=null,jm):Dp(_=+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*_e,a=z[1]%360*_e,R()):[o*vr,a*vr]},I.rotate=function(z){return arguments.length?(s=z[0]%360*_e,l=z[1]%360*_e,c=z.length>2?z[2]%360*_e:0,R()):[s*vr,l*vr,c*vr]},I.angle=function(z){return arguments.length?(h=z%360*_e,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=Wj(k,C=z*z),F()):xr(C)},I.fitExtent=function(z,U){return G_(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=Mbt(r,0,0,f,p,h).apply(null,t(o,a)),U=(h?Mbt:z3e)(r,n-z[0],i-z[1],f,p,h);return u=QE(s,l,c),k=JE(t,U),O=JE(u,k),P=Wj(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=s5(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*_e,r=o[1]*_e):[t*vr,r*vr]},i}function Ebt(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 Yj(e,t){var r=Xt(e),n=(r+Xt(t))/2;if(Re(n)<le)return Ebt(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))*ca(c);return c*n<0&&(u-=Be*ca(s)*ca(c)),[u/n,wn((i-(s*s+c*c)*n*n)/(2*n))]},a}function W_(){return Vb(Yj).scale(155.424).center([0,33.6442])}function Vk(){return W_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function F3e(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 Tbt(){var e,t,r=Vk(),n,i=W_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=W_().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=F3e([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 G_(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 Uk(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 Vh(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 qk=Uk(function(e){return xr(2/(1+e))});qk.invert=Vh(function(e){return 2*wn(e/2)});function Cbt(){return Mi(qk).scale(124.75).clipAngle(180-.001)}var Gk=Uk(function(e){return(e=uk(e))&&e/Xt(e)});Gk.invert=Vh(function(e){return e});function Abt(){return Mi(Gk).scale(79.4188).clipAngle(180-.001)}function Y_(e,t){return[e,F_(Ib((mn+t)/2))]}Y_.invert=function(e,t){return[e,2*ic(lk(t))-mn]};function Pbt(){return jj(Y_).scale(961/Si)}function jj(e){var t=Mi(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(bk(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===Y_?[[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 Wk(e){return Ib((mn+e)/2)}function Xj(e,t){var r=Zt(e),n=e===t?Xt(e):F_(r/Zt(t))/F_(Wk(t)/Wk(e)),i=r*ck(Wk(e),n)/n;if(!n)return Y_;function o(a,s){i>0?s<-mn+le&&(s=-mn+le):s>mn-le&&(s=mn-le);var l=i/ck(Wk(s),n);return[l*Xt(n*a),i-l*Zt(n*a)]}return o.invert=function(a,s){var l=i-s,c=ca(n)*xr(a*a+l*l),u=bn(a,Re(l))*ca(l);return l*n<0&&(u-=Be*ca(a)*ca(l)),[u/n,2*ic(ck(i/c,1/n))-mn]},o}function Ibt(){return Vb(Xj).scale(109.5).parallels([30,30])}function j_(e,t){return[e,t]}j_.invert=j_;function Lbt(){return Mi(j_).scale(152.63)}function $j(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 j_;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))*ca(l);return l*n<0&&(c-=Be*ca(a)*ca(l)),[c/n,i-ca(n)*xr(a*a+l*l)]},o}function kbt(){return Vb($j).scale(131.154).center([0,13.9389])}var l5=1.340264,c5=-.081106,u5=893e-6,h5=.003796,Yk=xr(3)/2,B3e=12;function jk(e,t){var r=wn(Yk*Xt(t)),n=r*r,i=n*n*n;return[e*Zt(r)/(Yk*(l5+3*c5*n+i*(7*u5+9*h5*n))),r*(l5+c5*n+i*(u5+h5*n))]}jk.invert=function(e,t){for(var r=t,n=r*r,i=n*n*n,o=0,a,s,l;o<B3e&&(s=r*(l5+c5*n+i*(u5+h5*n))-t,l=l5+3*c5*n+i*(7*u5+9*h5*n),r-=a=s/l,n=r*r,i=n*n*n,!(Re(a)<z_));++o);return[Yk*e*(l5+3*c5*n+i*(7*u5+9*h5*n))/Zt(r),wn(Xt(r)/Yk)]};function Rbt(){return Mi(jk).scale(177.158)}function Xk(e,t){var r=Zt(t),n=Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}Xk.invert=Vh(ic);function Nbt(){return Mi(Xk).scale(144.049).clipAngle(60)}function Dbt(){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=$m({point:function(S,C){var P=b([S,C]);this.stream.point(P[0],P[1])}}),g=jm,_,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,jm):Dp(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*_e,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 G_(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 $k(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)))]}$k.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 Obt(){return Mi($k).scale(175.295)}function Kk(e,t){return[Zt(t)*Xt(e),Xt(t)]}Kk.invert=Vh(wn);function zbt(){return Mi(Kk).scale(249.5).clipAngle(90+le)}function Zk(e,t){var r=Zt(t),n=1+Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}Zk.invert=Vh(function(e){return 2*ic(e)});function Fbt(){return Mi(Zk).scale(250).clipAngle(142)}function Jk(e,t){return[F_(Ib((mn+t)/2)),-e]}Jk.invert=function(e,t){return[-t,2*ic(lk(e))-mn]};function Bbt(){var e=jj(Jk),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 H3e(e,t){return e.parent===t.parent?1:2}function V3e(e){return e.reduce(U3e,0)/e.length}function U3e(e,t){return e+t.x}function q3e(e){return 1+e.reduce(G3e,0)}function G3e(e,t){return Math.max(e,t.y)}function W3e(e){for(var t;t=e.children;)e=t[0];return e}function Y3e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Hbt(){var e=H3e,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=V3e(p),f.y=q3e(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=W3e(o),c=Y3e(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 Vbt(){return this.eachAfter(j3e)}function Ubt(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 qbt(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 Gbt(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 Wbt(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 Ybt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function jbt(e){for(var t=this,r=X3e(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 X3e(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 Xbt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function $bt(){var e=[];return this.each(function(t){e.push(t)}),e}function Kbt(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Zbt(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function f5(e,t){var r=new Km(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=K3e);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 Km(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(Kj)}function $3e(){return f5(this).eachBefore(Z3e)}function K3e(e){return e.children}function Z3e(e){e.data=e.data.data}function Kj(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Km(e){this.data=e,this.depth=this.height=0,this.parent=null}Km.prototype=f5.prototype={constructor:Km,count:Vbt,each:Ubt,eachAfter:Gbt,eachBefore:qbt,sum:Wbt,sort:Ybt,path:jbt,ancestors:Xbt,descendants:$bt,leaves:Kbt,links:Zbt,copy:$3e};var Jbt=Array.prototype.slice;function Qbt(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 t8(e){for(var t=0,r=(e=Qbt(Jbt.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&t2t(o,i)?++t:(o=Q3e(n=J3e(n,i)),t=0);return o}function J3e(e,t){var r,n;if(Zj(t,e))return[t];for(r=0;r<e.length;++r)if(Qk(t,e[r])&&Zj(p5(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(Qk(p5(e[r],e[n]),t)&&Qk(p5(e[r],t),e[n])&&Qk(p5(e[n],t),e[r])&&Zj(e2t(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function Qk(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 t2t(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 Zj(e,t){for(var r=0;r<t.length;++r)if(!t2t(e,t[r]))return!1;return!0}function Q3e(e){switch(e.length){case 1:return tMe(e[0]);case 2:return p5(e[0],e[1]);case 3:return e2t(e[0],e[1],e[2])}}function tMe(e){return{x:e.x,y:e.y,r:e.r}}function p5(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 e2t(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 r2t(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 n2t(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 i2t(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 e8(e){this._=e,this.next=null,this.previous=null}function Jj(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;r2t(r,t,n=e[2]),t=new e8(t),r=new e8(r),n=new e8(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){r2t(t._,r._,n=e[s]),n=new e8(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(n2t(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(n2t(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=i2t(t);(n=n.next)!==r;)(a=i2t(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=t8(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function o2t(e){return Jj(e),e}function a2t(e){return e==null?null:Ub(e)}function Ub(e){if(typeof e!="function")throw new Error;return e}function Op(){return 0}function Zm(e){return function(){return e}}function eMe(e){return Math.sqrt(e.value)}function c2t(){var e=null,t=1,r=1,n=Op;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(s2t(e)).eachAfter(Qj(n,.5)).eachBefore(l2t(1)):o.eachBefore(s2t(eMe)).eachAfter(Qj(Op,1)).eachAfter(Qj(n,o.r/Math.min(t,r))).eachBefore(l2t(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=a2t(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:Zm(+o),i):n},i}function s2t(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Qj(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=Jj(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function l2t(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 r8(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 Uh(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 u2t(){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(r8),a}function o(a,s){return function(l){l.children&&Uh(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 h2t="$",rMe={depth:-1},f2t={};function nMe(e){return e.id}function iMe(e){return e.parentId}function p2t(){var e=nMe,t=iMe;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 Km(i),(h=e(i,o,n))!=null&&(h+="")&&(f=h2t+(c.id=h),p[f]=f in p?f2t: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[h2t+h],!l)throw new Error("missing: "+h);if(l===f2t)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=rMe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(Kj),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 oMe(e,t){return e.parent===t.parent?1:2}function tX(e){var t=e.children;return t?t[0]:e.t}function eX(e){var t=e.children;return t?t[t.length-1]:e.t}function aMe(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 sMe(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 lMe(e,t,r){return e.a.parent===t.parent?e.a:r}function n8(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}n8.prototype=Object.create(Km.prototype);function cMe(e){for(var t=new n8(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 n8(o[a],a)),i.parent=r;return(t.parent=new n8(null,0)).children=[t],t}function d2t(){var e=oMe,t=1,r=1,n=null;function i(c){var u=cMe(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){sMe(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=eX(d),f=tX(f),d&&f;)g=tX(g),p=eX(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(aMe(lMe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!eX(p)&&(p.t=d,p.m+=x-y),f&&!tX(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 Jm(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 rX=(1+Math.sqrt(5))/2;function nX(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?Uh(l,r,n,i,g?n+=d*_/g:o):Jm(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var i8=function e(t){function r(n,i,o,a,s){nX(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(rX);function m2t(){var e=i8,t=!1,r=1,n=1,i=[0],o=Op,a=Op,s=Op,l=Op,c=Op;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(r8),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:Zm(+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:Zm(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Zm(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Zm(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Zm(+f),u):c},u}function g2t(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 _2t(e,t,r,n,i){(e.depth&1?Jm:Uh)(e,t,r,n,i)}var y2t=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?Uh(c,i,o,a,o+=(s-o)*c.value/g):Jm(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=nX(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(rX);function v2t(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 x2t(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 b2t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function uMe(e,t){return e[0]-t[0]||e[1]-t[1]}function w2t(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&b2t(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function S2t(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(uMe),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=w2t(n),a=w2t(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 M2t(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 E2t(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 T2t=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 o8=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 C2t=function e(t){function r(){var n=o8.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(ac);var a8=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 A2t=function e(t){function r(n){var i=a8.source(t)(n);return function(){return i()/n}}return r.source=e,r}(ac);var P2t=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(ac);function fi(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 I2t=Array.prototype,X_=I2t.map,lc=I2t.slice;var s8={name:"implicit"};function gu(){var e=Ji(),t=[],r=[],n=s8;function i(o){var a=o+"",s=e.get(a);if(!s){if(n!==s8)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)},fi.apply(i,arguments),i}function Qm(){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 Qm(t(),n).round(a).paddingInner(s).paddingOuter(l).align(c)},fi.apply(u(),arguments)}function L2t(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return L2t(t())},e}function tg(){return L2t(Qm.apply(null,arguments).paddingInner(1))}function k2t(e){return function(){return e}}function d5(e){return+e}var R2t=[0,1];function ii(e){return e}function iX(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:k2t(isNaN(t)?NaN:.5)}function N2t(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 hMe(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=iX(i,n),o=r(a,o)):(n=iX(n,i),o=r(o,a)),function(s){return o(n(s))}}function fMe(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]=iX(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=ys(e,s,1,n)-1;return o[l](i[l](s))}}function qh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $_(){var e=R2t,t=R2t,r=nc,n,i,o,a=ii,s,l,c;function u(){return s=Math.min(e.length,t.length)>2?fMe:hMe,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=X_.call(f,d5),a===ii||(a=N2t(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=pL,u()},h.clamp=function(f){return arguments.length?(a=f?N2t(e):ii,h):a!==ii},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 m5(e,t){return $_()(e,t)}function l8(e,t,r,n){var i=tl(e,t,r),o;switch(n=Lp(n==null?",f":n),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=ik(i,a))&&(n.precision=o),GE(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=ok(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=nk(i))&&(n.precision=o-(n.type==="%")*2);break}}return xn(n)}function il(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 l8(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=x_(a,s,r),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=x_(a,s,r)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=x_(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=m5(ii,ii);return e.copy=function(){return qh(e,zn())},fi.apply(e,arguments),il(e)}function c8(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=X_.call(n,d5),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return c8(e).unknown(t)},e=arguments.length?X_.call(e,d5):[0,1],il(r)}function u8(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 D2t(e){return Math.log(e)}function O2t(e){return Math.exp(e)}function pMe(e){return-Math.log(-e)}function dMe(e){return-Math.exp(-e)}function mMe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function gMe(e){return e===10?mMe:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function _Me(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 z2t(e){return function(t){return-e(-t)}}function g5(e){var t=e(D2t,O2t),r=t.domain,n=10,i,o;function a(){return i=_Me(n),o=gMe(n),r()[0]<0?(i=z2t(i),o=z2t(o),e(pMe,dMe)):e(D2t,O2t),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(u8(r(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function cc(){var e=g5($_()).domain([1,10]);return e.copy=function(){return qh(e,cc()).base(e.base())},fi.apply(e,arguments),e}function F2t(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function B2t(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _5(e){var t=1,r=e(F2t(t),B2t(t));return r.constant=function(n){return arguments.length?e(F2t(t=+n),B2t(t)):t},il(r)}function h8(){var e=_5($_());return e.copy=function(){return qh(e,h8()).constant(e.constant())},fi.apply(e,arguments)}function H2t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function yMe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vMe(e){return e<0?-e*e:e*e}function y5(e){var t=e(ii,ii),r=1;function n(){return r===1?e(ii,ii):r===.5?e(yMe,vMe):e(H2t(r),H2t(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},il(t)}function K_(){var e=y5($_());return e.copy=function(){return qh(e,K_()).exponent(e.exponent())},fi.apply(e,arguments),e}function V2t(){return K_.apply(null,arguments).exponent(.5)}function eg(){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]=sa(e,a/s);return o}function o(a){return isNaN(a=+a)?n:t[ys(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(oa),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 eg().domain(e).range(t).unknown(n)},fi.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[ys(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)},fi.apply(il(a),arguments)}function f8(){var e=[.5],t=[0,1],r,n=1;function i(o){return o<=o?t[ys(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 f8().domain(e).range(t).unknown(r)},fi.apply(i,arguments)}var oX=new Date,aX=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 oX.setTime(+o),aX.setTime(+a),e(oX),e(aX),Math.floor(r(oX,aX))},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 p8=br(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});p8.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}):p8};var Z_=p8,sX=p8.range;var J_=1e3,uc=6e4,Gb=36e5,d8=864e5,m8=6048e5;var U2t=br(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*J_)},function(e,t){return(t-e)/J_},function(e){return e.getUTCSeconds()}),Q_=U2t,lX=U2t.range;var q2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*J_)},function(e,t){e.setTime(+e+t*uc)},function(e,t){return(t-e)/uc},function(e){return e.getMinutes()}),g8=q2t,G2t=q2t.range;var W2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*J_-e.getMinutes()*uc)},function(e,t){e.setTime(+e+t*Gb)},function(e,t){return(t-e)/Gb},function(e){return e.getHours()}),_8=W2t,Y2t=W2t.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)/d8},function(e){return e.getDate()-1}),ty=j2t,X2t=j2t.range;function ey(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)/m8})}var rg=ey(0),ry=ey(1),cX=ey(2),uX=ey(3),zp=ey(4),hX=ey(5),fX=ey(6),pX=rg.range,$2t=ry.range,K2t=cX.range,Z2t=uX.range,J2t=zp.range,Q2t=hX.range,twt=fX.range;var ewt=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()}),y8=ewt,rwt=ewt.range;var dX=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()});dX.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 Gh=dX,nwt=dX.range;var iwt=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()}),v8=iwt,owt=iwt.range;var awt=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()}),x8=awt,swt=awt.range;var lwt=br(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/d8},function(e){return e.getUTCDate()-1}),ny=lwt,cwt=lwt.range;function iy(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)/m8})}var ng=iy(0),oy=iy(1),mX=iy(2),gX=iy(3),Fp=iy(4),_X=iy(5),yX=iy(6),vX=ng.range,uwt=oy.range,hwt=mX.range,fwt=gX.range,pwt=Fp.range,dwt=_X.range,mwt=yX.range;var gwt=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()}),b8=gwt,_wt=gwt.range;var xX=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()});xX.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 Wh=xX,ywt=xX.range;function bX(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 wX(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 v5(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function w5(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=x5(i),u=b5(i),h=x5(o),f=b5(o),p=x5(a),d=b5(a),g=x5(s),_=b5(s),y=x5(l),x=b5(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:Mwt,e:Mwt,f:UMe,g:JMe,G:tEe,H:BMe,I:HMe,j:VMe,L:Pwt,m:qMe,M:GMe,p:st,q:St,Q:Cwt,s:Awt,S:WMe,u:YMe,U:jMe,V:XMe,w:$Me,W:KMe,x:null,X:null,y:ZMe,Y:QMe,Z:eEe,"%":Twt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:Ewt,e:Ewt,f:oEe,g:mEe,G:_Ee,H:rEe,I:nEe,j:iEe,L:Lwt,m:aEe,M:sEe,p:_t,q:ct,Q:Cwt,s:Awt,S:lEe,u:cEe,U:uEe,V:hEe,w:fEe,W:pEe,x:null,X:null,y:dEe,Y:gEe,Z:yEe,"%":Twt},C={a:B,A:I,b:L,B:R,c:F,d:wwt,e:wwt,f:DMe,g:bwt,G:xwt,H:Swt,I:Swt,j:LMe,L:NMe,m:IMe,M:kMe,p:D,q:PMe,Q:zMe,s:FMe,S:RMe,u:MMe,U:EMe,V:TMe,w:SMe,W:CMe,x:z,X:U,y:bwt,Y:xwt,Z:AMe,"%":OMe};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=vwt[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=v5(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=wX(v5(q.y,0,1)),wt=ht.getUTCDay(),ht=wt>4||wt===0?oy.ceil(ht):oy(ht),ht=ny.offset(ht,(q.V-1)*7),q.y=ht.getUTCFullYear(),q.m=ht.getUTCMonth(),q.d=ht.getUTCDate()+(q.w+6)%7):(ht=bX(v5(q.y,0,1)),wt=ht.getDay(),ht=wt>4||wt===0?ry.ceil(ht):ry(ht),ht=ty.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?wX(v5(q.y,0,1)).getUTCDay():bX(v5(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,wX(q)):bX(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 vwt?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 vwt={"-":"",_:" ",0:"0"},xo=/^\s*\d+/,xMe=/^%/,bMe=/[\\^$*+?|[\]().{}]/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 wMe(e){return e.replace(bMe,"\\$&")}function x5(e){return new RegExp("^(?:"+e.map(wMe).join("|")+")","i")}function b5(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function SMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function MMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function EMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function TMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function CMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function xwt(e,t,r){var n=xo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function bwt(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 AMe(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 PMe(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 IMe(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 wwt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function LMe(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 Swt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function kMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function RMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function NMe(e,t,r){var n=xo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function DMe(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 OMe(e,t,r){var n=xMe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Mwt(e,t){return Br(e.getDate(),t,2)}function BMe(e,t){return Br(e.getHours(),t,2)}function HMe(e,t){return Br(e.getHours()%12||12,t,2)}function VMe(e,t){return Br(1+ty.count(Gh(e),e),t,3)}function Pwt(e,t){return Br(e.getMilliseconds(),t,3)}function UMe(e,t){return Pwt(e,t)+"000"}function qMe(e,t){return Br(e.getMonth()+1,t,2)}function GMe(e,t){return Br(e.getMinutes(),t,2)}function WMe(e,t){return Br(e.getSeconds(),t,2)}function YMe(e){var t=e.getDay();return t===0?7:t}function jMe(e,t){return Br(rg.count(Gh(e)-1,e),t,2)}function Iwt(e){var t=e.getDay();return t>=4||t===0?zp(e):zp.ceil(e)}function XMe(e,t){return e=Iwt(e),Br(zp.count(Gh(e),e)+(Gh(e).getDay()===4),t,2)}function $Me(e){return e.getDay()}function KMe(e,t){return Br(ry.count(Gh(e)-1,e),t,2)}function ZMe(e,t){return Br(e.getFullYear()%100,t,2)}function JMe(e,t){return e=Iwt(e),Br(e.getFullYear()%100,t,2)}function QMe(e,t){return Br(e.getFullYear()%1e4,t,4)}function tEe(e,t){var r=e.getDay();return e=r>=4||r===0?zp(e):zp.ceil(e),Br(e.getFullYear()%1e4,t,4)}function eEe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Br(t/60|0,"0",2)+Br(t%60,"0",2)}function Ewt(e,t){return Br(e.getUTCDate(),t,2)}function rEe(e,t){return Br(e.getUTCHours(),t,2)}function nEe(e,t){return Br(e.getUTCHours()%12||12,t,2)}function iEe(e,t){return Br(1+ny.count(Wh(e),e),t,3)}function Lwt(e,t){return Br(e.getUTCMilliseconds(),t,3)}function oEe(e,t){return Lwt(e,t)+"000"}function aEe(e,t){return Br(e.getUTCMonth()+1,t,2)}function sEe(e,t){return Br(e.getUTCMinutes(),t,2)}function lEe(e,t){return Br(e.getUTCSeconds(),t,2)}function cEe(e){var t=e.getUTCDay();return t===0?7:t}function uEe(e,t){return Br(ng.count(Wh(e)-1,e),t,2)}function kwt(e){var t=e.getUTCDay();return t>=4||t===0?Fp(e):Fp.ceil(e)}function hEe(e,t){return e=kwt(e),Br(Fp.count(Wh(e),e)+(Wh(e).getUTCDay()===4),t,2)}function fEe(e){return e.getUTCDay()}function pEe(e,t){return Br(oy.count(Wh(e)-1,e),t,2)}function dEe(e,t){return Br(e.getUTCFullYear()%100,t,2)}function mEe(e,t){return e=kwt(e),Br(e.getUTCFullYear()%100,t,2)}function gEe(e,t){return Br(e.getUTCFullYear()%1e4,t,4)}function _Ee(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fp(e):Fp.ceil(e),Br(e.getUTCFullYear()%1e4,t,4)}function yEe(){return"+0000"}function Twt(){return"%"}function Cwt(e){return+e}function Awt(e){return Math.floor(+e/1e3)}var Wb,S5,SX,ay,M5;w8({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 w8(e){return Wb=w5(e),S5=Wb.format,SX=Wb.parse,ay=Wb.utcFormat,M5=Wb.utcParse,Wb}var MX="%Y-%m-%dT%H:%M:%S.%LZ";function vEe(e){return e.toISOString()}var xEe=Date.prototype.toISOString?vEe:ay(MX),Rwt=xEe;function bEe(e){var t=new Date(e);return isNaN(t)?null:t}var wEe=+new Date("2000-01-01T00:00:00.000Z")?bEe:M5(MX),Nwt=wEe;var E5=1e3,T5=E5*60,C5=T5*60,A5=C5*24,SEe=A5*7,Dwt=A5*30,EX=A5*365;function MEe(e){return new Date(e)}function EEe(e){return e instanceof Date?+e:+new Date(+e)}function S8(e,t,r,n,i,o,a,s,l){var c=m5(ii,ii),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,E5],[a,5,5*E5],[a,15,15*E5],[a,30,30*E5],[o,1,T5],[o,5,5*T5],[o,15,15*T5],[o,30,30*T5],[i,1,C5],[i,3,3*C5],[i,6,6*C5],[i,12,12*C5],[n,1,A5],[n,2,2*A5],[r,1,SEe],[t,1,Dwt],[t,3,3*Dwt],[e,1,EX]];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=tl(O/EX,D/EX,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(tl(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(X_.call(k,EEe)):h().map(MEe)},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(u8(D,k)):c},c.copy=function(){return qh(c,S8(e,t,r,n,i,o,a,s,l))},c}function Yb(){return fi.apply(S8(Gh,y8,rg,ty,_8,g8,Q_,Z_,S5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Owt(){return fi.apply(S8(Wh,b8,ng,ny,x8,v8,Q_,Z_,ay).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function M8(){var e=0,t=1,r,n,i,o,a=ii,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 Bp(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function E8(){var e=il(M8()(ii));return e.copy=function(){return Bp(e,E8())},sc.apply(e,arguments)}function TX(){var e=g5(M8()).domain([1,10]);return e.copy=function(){return Bp(e,TX()).base(e.base())},sc.apply(e,arguments)}function CX(){var e=_5(M8());return e.copy=function(){return Bp(e,CX()).constant(e.constant())},sc.apply(e,arguments)}function T8(){var e=y5(M8());return e.copy=function(){return Bp(e,T8()).exponent(e.exponent())},sc.apply(e,arguments)}function zwt(){return T8.apply(null,arguments).exponent(.5)}function C8(){var e=[],t=ii;function r(n){if(!isNaN(n=+n))return t((ys(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(oa),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return C8(t).domain(e)},sc.apply(r,arguments)}function A8(){var e=0,t=.5,r=1,n,i,o,a,s,l=ii,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 P8(){var e=il(A8()(ii));return e.copy=function(){return Bp(e,P8())},sc.apply(e,arguments)}function AX(){var e=g5(A8()).domain([.1,1,10]);return e.copy=function(){return Bp(e,AX()).base(e.base())},sc.apply(e,arguments)}function PX(){var e=_5(A8());return e.copy=function(){return Bp(e,PX()).constant(e.constant())},sc.apply(e,arguments)}function I8(){var e=y5(A8());return e.copy=function(){return Bp(e,I8()).exponent(e.exponent())},sc.apply(e,arguments)}function Fwt(){return I8.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 Bwt=te("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var Hwt=te("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var Vwt=te("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var Uwt=te("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var qwt=te("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var Gwt=te("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var Wwt=te("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var Ywt=te("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var jwt=te("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Ie(e){return cL(e[e.length-1])}var IX=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(te),Xwt=Ie(IX);var LX=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(te),$wt=Ie(LX);var kX=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(te),Kwt=Ie(kX);var RX=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(te),Zwt=Ie(RX);var NX=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(te),Jwt=Ie(NX);var DX=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(te),Qwt=Ie(DX);var OX=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(te),tSt=Ie(OX);var zX=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(te),eSt=Ie(zX);var FX=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(te),rSt=Ie(FX);var BX=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(te),nSt=Ie(BX);var HX=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(te),iSt=Ie(HX);var VX=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(te),oSt=Ie(VX);var UX=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(te),aSt=Ie(UX);var qX=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(te),sSt=Ie(qX);var GX=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(te),lSt=Ie(GX);var WX=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(te),cSt=Ie(WX);var YX=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(te),uSt=Ie(YX);var jX=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(te),hSt=Ie(jX);var XX=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(te),fSt=Ie(XX);var $X=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(te),pSt=Ie($X);var KX=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(te),dSt=Ie(KX);var ZX=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(te),mSt=Ie(ZX);var JX=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(te),gSt=Ie(JX);var QX=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(te),_St=Ie(QX);var t$=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(te),ySt=Ie(t$);var e$=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(te),vSt=Ie(e$);var r$=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(te),xSt=Ie(r$);function bSt(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 wSt=E_(la(300,.5,0),la(-240,.5,1));var SSt=E_(la(-100,.75,.35),la(80,1.5,.8)),MSt=E_(la(260,.75,.35),la(80,1.5,.8)),L8=la();function ESt(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return L8.h=360*e-100,L8.s=1.5-1.5*t,L8.l=.8-.9*t,L8+""}var k8=cu(),TEe=Math.PI/3,CEe=Math.PI*2/3;function TSt(e){var t;return e=(.5-e)*Math.PI,k8.r=255*(t=Math.sin(e))*t,k8.g=255*(t=Math.sin(e+TEe))*t,k8.b=255*(t=Math.sin(e+CEe))*t,k8+""}function CSt(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 R8(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var ASt=R8(te("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),PSt=R8(te("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ISt=R8(te("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),LSt=R8(te("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function qe(e){return function(){return e}}var n$=Math.abs,Bo=Math.atan2,ig=Math.cos,kSt=Math.max,N8=Math.min,_u=Math.sin,sy=Math.sqrt,bo=1e-12,yu=Math.PI,P5=yu/2,hc=2*yu;function RSt(e){return e>1?0:e<-1?yu:Math.acos(e)}function i$(e){return e>=1?P5:e<=-1?-P5:Math.asin(e)}function AEe(e){return e.innerRadius}function PEe(e){return e.outerRadius}function IEe(e){return e.startAngle}function LEe(e){return e.endAngle}function kEe(e){return e&&e.padAngle}function REe(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 D8(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/sy(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)*sy(kSt(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 NSt(){var e=AEe,t=PEe,r=qe(0),n=null,i=IEe,o=LEe,a=kEe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-P5,d=o.apply(this,arguments)-P5,g=n$(d-p),_=d>p;if(s||(s=c=bs()),f<h&&(u=f,f=h,h=u),!(f>bo))s.moveTo(0,0);else if(g>hc-bo)s.moveTo(f*ig(p),f*_u(p)),s.arc(0,0,f,p,d,!_),h>bo&&(s.moveTo(h*ig(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):sy(h*h+f*f)),D=N8(n$(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>bo){var F=i$(O/h*_u(k)),z=i$(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*ig(y),W=f*_u(y),Z=h*ig(S),rt=h*_u(S);if(D>bo){var ot=f*ig(x),st=f*_u(x),St=h*ig(b),bt=h*_u(b),Mt;if(g<yu&&(Mt=REe(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(RSt((lt*_t+Kt*ct)/(sy(lt*lt+Kt*Kt)*sy(_t*_t+ct*ct)))/2),et=sy(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=N8(D,(h-et)/(X-1)),I=N8(D,(f-et)/(X+1))}}P>bo?I>bo?(L=D8(St,bt,U,W,f,I,_),R=D8(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=D8(Z,rt,ot,st,h,-B,_),R=D8(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[ig(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 DSt(e){this._context=e}DSt.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 Yh(e){return new DSt(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=Yh,o=null;function a(s){var l,c=s.length,u,h=!1,f;for(n==null&&(o=i(f=bs())),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 O8(){var e=Xb,t=null,r=qe(0),n=$b,i=qe(!0),o=null,a=Yh,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=bs())),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 OSt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function zSt(e){return e}function FSt(){var e=zSt,t=OSt,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 z8=Kb(Yh);function BSt(e){this._curve=e}BSt.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 BSt(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 o$(){return Zb(vu().curve(z8))}function a$(){var e=O8().curve(z8),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 ly(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var I5=Array.prototype.slice;function NEe(e){return e.source}function DEe(e){return e.target}function s$(e){var t=NEe,r=DEe,n=Xb,i=$b,o=null;function a(){var s,l=I5.call(arguments),c=t.apply(this,l),u=r.apply(this,l);if(o||(o=s=bs()),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 OEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function zEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function FEe(e,t,r,n,i){var o=ly(t,r),a=ly(t,r=(r+i)/2),s=ly(n,r),l=ly(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function HSt(){return s$(OEe)}function VSt(){return s$(zEe)}function USt(){var e=s$(FEe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var L5={draw:function(e,t){var r=Math.sqrt(t/yu);e.moveTo(r,0),e.arc(0,0,r,0,hc)}};var F8={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 qSt=Math.sqrt(.3333333333333333),BEe=qSt*2,B8={draw:function(e,t){var r=Math.sqrt(t/BEe),n=r*qSt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var HEe=.8908130915292852,GSt=Math.sin(yu/10)/Math.sin(7*yu/10),VEe=Math.sin(hc/10)*GSt,UEe=-Math.cos(hc/10)*GSt,H8={draw:function(e,t){var r=Math.sqrt(t*HEe),n=VEe*r,i=UEe*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 V8={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}};var l$=Math.sqrt(3),U8={draw:function(e,t){var r=-Math.sqrt(t/(l$*3));e.moveTo(0,r*2),e.lineTo(-l$*r,-r),e.lineTo(l$*r,-r),e.closePath()}};var fc=-.5,pc=Math.sqrt(3)/2,c$=1/Math.sqrt(12),qEe=(c$/2+1)*3,q8={draw:function(e,t){var r=Math.sqrt(t/qEe),n=r/2,i=r*c$,o=n,a=r*c$+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 WSt=[L5,F8,B8,V8,H8,U8,q8];function YSt(){var e=qe(L5),t=qe(64),r=null;function n(){var i;if(r||(r=i=bs()),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 k5(e){this._context=e}k5.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 G8(e){return new k5(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 XSt(e){return new jSt(e)}function $St(e){this._context=e}$St.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 KSt(e){return new $St(e)}function ZSt(e,t){this._basis=new k5(e),this._beta=t}ZSt.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 JSt=function e(t){function r(n){return t===1?new k5(n):new ZSt(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 W8(e,t){this._context=e,this._k=(1-t)/6}W8.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 QSt=function e(t){function r(n){return new W8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function Y8(e,t){this._context=e,this._k=(1-t)/6}Y8.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 t3t=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: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 e3t=function e(t){function r(n){return new j8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function R5(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 r3t(e,t){this._context=e,this._alpha=t}r3t.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:R5(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 n3t=function e(t){function r(n){return t?new r3t(n,t):new W8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function i3t(e,t){this._context=e,this._alpha=t}i3t.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:R5(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 o3t=function e(t){function r(n){return t?new i3t(n,t):new Y8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function a3t(e,t){this._context=e,this._alpha=t}a3t.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:R5(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 s3t=function e(t){function r(n){return t?new a3t(n,t):new j8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function l3t(e){this._context=e}l3t.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 c3t(e){return new l3t(e)}function u3t(e){return e<0?-1:1}function h3t(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(u3t(o)+u3t(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function f3t(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function u$(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 X8(e){this._context=e}X8.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:u$(this,this._t0,f3t(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,u$(this,f3t(this,r=h3t(this,e,t)),r);break;default:u$(this,this._t0,r=h3t(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function p3t(e){this._context=new d3t(e)}(p3t.prototype=Object.create(X8.prototype)).point=function(e,t){X8.prototype.point.call(this,t,e)};function d3t(e){this._context=e}d3t.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 m3t(e){return new X8(e)}function g3t(e){return new p3t(e)}function y3t(e){this._context=e}y3t.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=_3t(e),i=_3t(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 _3t(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 v3t(e){return new y3t(e)}function $8(e,t){this._context=e,this._t=t}$8.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 x3t(e){return new $8(e,.5)}function b3t(e){return new $8(e,0)}function w3t(e){return new $8(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 GEe(e,t){return e[t]}function S3t(){var e=qe([]),t=bu,r=xu,n=GEe;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(I5.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(I5.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?xu:o,i):r},i}function M3t(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 E3t(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 T3t(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 C3t(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 K8(e){var t=e.map(WEe);return bu(e).sort(function(r,n){return t[r]-t[n]})}function WEe(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 Z8(e){var t=e.map(h$);return bu(e).sort(function(r,n){return t[r]-t[n]})}function h$(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function A3t(e){return Z8(e).reverse()}function P3t(e){var t=e.length,r,n,i=e.map(h$),o=K8(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 I3t(e){return bu(e).reverse()}function f$(e){return function(){return e}}function L3t(e){return e[0]}function k3t(e){return e[1]}function p$(){this._=null}function t2(e){e.U=e.C=e.L=e.R=e.P=e.N=null}p$.prototype={constructor:p$,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=R3t(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&&(N5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,D5(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(D5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,N5(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=R3t(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,N5(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,D5(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,N5(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,D5(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,N5(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,D5(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function N5(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 D5(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 R3t(e){for(;e.L;)e=e.L;return e}var d$=p$;function e2(e,t,r,n){var i=[null,null],o=wo.push(i)-1;return i.left=e,i.right=t,r&&O5(i,e,t,r),n&&O5(i,t,e,n),Va[e.index].halfedges.push(o),Va[t.index].halfedges.push(o),i}function r2(e,t,r){var n=[t,r];return n.left=e,n}function O5(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 YEe(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 N3t(e,t,r,n){for(var i=wo.length,o;i--;)(!jEe(o=wo[i],e,t,r,n)||!YEe(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 D3t(e){return Va[e.index]={site:e,halfedges:[]}}function XEe(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 m$(e,t){return t[+(t.left!==e.site)]}function $Ee(e,t){return t[+(t.left===e.site)]}function O3t(){for(var e=0,t=Va.length,r,n,i,o;e<t;++e)if((r=Va[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]=XEe(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 z3t(e,t,r,n){var i=Va.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Va[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=$Ee(a,wo[c[l]]),g=d[0],_=d[1],h=m$(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=Va[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=Va[o])&&(a.halfedges.length||delete Va[o])}var F3t=[],J8;function KEe(){t2(this),this.x=this.y=this.arc=this.site=this.cy=null}function cy(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>=-B3t)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=F3t.pop()||new KEe;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||(J8=y)}}}}function uy(e){var t=e.circle;t&&(t.P||(J8=t.N),n2.remove(t),F3t.push(t),t2(t),e.circle=null)}var V3t=[];function ZEe(){t2(this),this.edge=this.site=this.circle=null}function H3t(e){var t=V3t.pop()||new ZEe;return t.site=e,t}function g$(e){uy(e),hy.remove(e),V3t.push(e),t2(e)}function U3t(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];g$(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),g$(l),l=o;s.unshift(l),uy(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),g$(c),c=a;s.push(c),uy(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],O5(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=e2(l.site,c.site,null,i),cy(l),cy(c)}function q3t(e){for(var t=e[0],r=e[1],n,i,o,a,s=hy._;s;)if(o=G3t(s,r)-t,o>Hr)s=s.L;else if(a=t-JEe(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}D3t(e);var l=H3t(e);if(hy.insert(n,l),!(!n&&!i)){if(n===i){uy(n),i=H3t(n.site),hy.insert(l,i),l.edge=i.edge=e2(n.site,l.site),cy(n),cy(i);return}if(!i){l.edge=e2(n.site,l.site);return}uy(n),uy(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];O5(i.edge,c,d,S),l.edge=e2(c,e,null,S),i.edge=e2(e,d,null,S),cy(n),cy(i)}}function G3t(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 JEe(e,t){var r=e.N;if(r)return G3t(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var Hr=1e-6,B3t=1e-12,hy,Va,n2,wo;function QEe(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function t5e(e,t){return t[1]-e[1]||t[0]-e[0]}function z5(e,t){var r=e.sort(t5e).pop(),n,i,o;for(wo=[],Va=new Array(e.length),hy=new d$,n2=new d$;;)if(o=J8,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(q3t(r),n=r[0],i=r[1]),r=e.pop();else if(o)U3t(o.arc);else break;if(O3t(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];N3t(a,s,l,c),z3t(a,s,l,c)}this.edges=wo,this.cells=Va,hy=n2=wo=Va=null}z5.prototype={constructor:z5,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return m$(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&&QEe(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 W3t(){var e=L3t,t=k3t,r=null;function n(i){return new z5(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:f$(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:f$(+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}km();function F5(e){return function(){return e}}function _$(e,t,r){this.target=e,this.type=t,this.transform=r}function jh(e,t,r){this.k=e,this.x=t,this.y=r}jh.prototype={constructor:jh,scale:function(e){return e===1?this:new jh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new jh(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 Xh=new jh(1,0,0);i2.prototype=jh.prototype;function i2(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xh;return e.__zoom}function Q8(){qt.stopImmediatePropagation()}function o2(){qt.preventDefault(),qt.stopImmediatePropagation()}function e5e(){return!qt.ctrlKey&&!qt.button}function r5e(){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 Y3t(){return this.__zoom||Xh}function n5e(){return-qt.deltaY*(qt.deltaMode===1?.05:qt.deltaMode?1:.002)}function i5e(){return navigator.maxTouchPoints||"ontouchstart"in this}function o5e(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 tR(){var e=e5e,t=r5e,r=o5e,n=n5e,i=i5e,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=yL,c=vs("start","zoom","end"),u,h,f=500,p=150,d=0;function g(L){L.property("__zoom",Y3t).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",Y3t),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(Xh.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 jh(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 jh(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 jh(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){Mp(new _$(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;zm(qt.view),Q8(),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),Fm(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(Q8(),U=0;U<R;++U)W=L[U],Z=Tp(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=Tp(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(Q8(),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:F5(+L),g):n},g.filter=function(L){return arguments.length?(e=typeof L=="function"?L:F5(!!L),g):e},g.touchable=function(L){return arguments.length?(i=typeof L=="function"?L:F5(!!L),g):i},g.extent=function(L){return arguments.length?(t=typeof L=="function"?L:F5([[+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 eR=class extends bp{constructor(){super(...arguments),this._experiments=[]}load(){let t=ve().experiments();return this.requestManager.request(t).then(r=>{j3t.isEqual(this._experiments,r)||(this._experiments=r,this.emitChange())})}getExperiments(){return this._experiments.slice()}},rR=new eR;var a5e={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"]},nR=a5e.tensorboardColorBlindAssist;var y$=class{constructor(t=nR){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 X3t(e,t){let r=new y$;function n(){r.setDomain(t())}return e.addListener(n),n(),i=>r.getColor(i)}var fn=X3t(wp,()=>wp.getRuns()),lQr=X3t(rR,()=>rR.getExperiments().map(({name:e})=>e));var og=Ee(Oe(),1);_s({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 ol=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=og.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=og.filter(og.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=og.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}};ol.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)],ol.prototype,"names",void 0);E([A({type:Object}),w("design:type",Object)],ol.prototype,"coloring",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ol.prototype,"regex",void 0);E([A({type:Array,computed:"computeNamesMatchingRegex(names.*, _regex)"}),w("design:type",Array)],ol.prototype,"namesMatchingRegex",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],ol.prototype,"selectionState",void 0);E([A({type:Array,notify:!0,computed:"computeOutSelected(namesMatchingRegex.*, selectionState.*)"}),w("design:type",Array)],ol.prototype,"outSelected",void 0);E([A({type:Number}),w("design:type",Number)],ol.prototype,"maxNamesToEnableByDefault",void 0);E([A({type:Object}),w("design:type",Object)],ol.prototype,"_debouncedRegexChange",void 0);E([Rt("regex"),w("design:type",Object),w("design:paramtypes",[])],ol.prototype,"_regex",null);E([Bt("selectionState","names"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ol.prototype,"_setIsolatorIcon",null);ol=E([yt("tf-multi-checkbox")],ol);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=zW("runSelectionState",{defaultValue:{}}).call(this),this.regexInput=y_("regexInput",{defaultValue:""}).call(this),this._dataLocationClipLength=250,this._dataLocationDelimiterPattern="[/=_,-]",this.coloring={getColor:fn},this._storeRunSelectionState=FW("runSelectionState",{defaultValue:{}}),this._regexObserver=v_("regexInput",{defaultValue:""})}attached(){this._runStoreListener=wp.addListener(()=>{this.set("runs",wp.getRuns())}),this.set("runs",wp.getRuns()),this._envStoreListener=ib.addListener(()=>{this.set("dataLocation",ib.getDataLocation())}),this.set("dataLocation",ib.getDataLocation())}detached(){wp.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 B5=class extends Gt(mt){constructor(){super(...arguments),this.html=""}get sanitizedHtml(){return this.html}attached(){window.requestAnimationFrame(()=>{this.scopeSubtree(this.$.markdown,!0)})}};B5.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;
      }

      /* 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)],B5.prototype,"html",void 0);E([Rt("html"),w("design:type",Object),w("design:paramtypes",[])],B5.prototype,"sanitizedHtml",null);B5=E([yt("tf-markdown-view")],B5);_s({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 $3t(e){let t=l5e(e);return t?Math.round((t[0]*299+t[1]*587+t[2]*114)/1e3)>125?"inherit":"#eee":"inherit"}function l5e(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 $3t(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=ve().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=ve().pluginRoute("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 $h=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=ve().pluginRoute("audio","/tags");return this._requestManager.request(t).then(r=>{if(fy.isEqual(r,this._runToTagInfo))return;let n=fy.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=fy.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return fy.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]}};$h.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)],$h.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],$h.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],$h.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],$h.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],$h.prototype,"_tagFilter",void 0);E([A({type:Object}),w("design:type",Ae)],$h.prototype,"_requestManager",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter"),w("design:type",Array),w("design:paramtypes",[])],$h.prototype,"_categories",null);$h=E([yt("tf-audio-dashboard")],$h);var H5=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"))}};H5.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)],H5.prototype,"name",void 0);E([A({type:String,notify:!0,observer:"_selectedIdChanged"}),w("design:type",String)],H5.prototype,"selectedId",void 0);H5=E([yt("tf-option-selector")],H5);function iR(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 ${c5e(u.length,"run","runs")} ${h}:</p>${c}</li>`}).join("")}</ul>`})();return{displayName:i,description:o}}function c5e(e,t,r){return e===1?t:r}var Z3t=Ee(Oe(),1);var Hp=class extends mt{constructor(){super(...arguments),this.weight=.6,this._updateWeight=Z3t.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)}};Hp.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)],Hp.prototype,"step",void 0);E([A({type:Number}),w("design:type",Number)],Hp.prototype,"max",void 0);E([A({type:Number}),w("design:type",Number)],Hp.prototype,"min",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],Hp.prototype,"weight",void 0);E([A({type:Number,notify:!0,observer:"_immediateWeightNumberForPaperSliderChanged"}),w("design:type",Number)],Hp.prototype,"_immediateWeightNumberForPaperSlider",void 0);E([A({type:String,notify:!0,observer:"_inputWeightStringForPaperInputChanged"}),w("design:type",String)],Hp.prototype,"_inputWeightStringForPaperInput",void 0);Hp=E([yt("tf-smoothing-input")],Hp);var Yo=Ee(Oe(),1);function Cn(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}=${u5e(c)}`)})).join("&");return e+n+o}function u5e(e){return encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29")}var GKt=Ee(Oe(),1),HWn=Ee(wl(),1);var IKt=Ee(Oe(),1);var v4;(function(e){e[e.LOADING=0]="LOADING",e[e.LOADED=1]="LOADED"})(v4||(v4={}));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=IKt.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,v4.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,v4.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(v4.LOADING)||(this.dataLoading=!1)});this.requestData(n,i,()=>o(void 0))})))}}}var gqe=Ee(Oe(),1),Wo=Ee(wl(),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}],Ed;(function(e){e.STEP="step",e.RELATIVE="relative",e.WALL_TIME="wall_time"})(Ed||(Ed={}));var e0=4,_qe=4,dB=3,mB=20,gB=4,LKt=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 x4=xn(`.${_qe}~s`);function $at(){let e=new Wo.Scales.Linear;e.tickGenerator(Wo.Scales.TickGenerators.integerTickGenerator());let t=new Wo.Axes.Numeric(e,"bottom");return t.formatter(x4),{scale:e,axis:t,accessor:r=>r.step}}var _B=Wo.Formatters.time("%a %b %e, %H:%M:%S");function yqe(){let e=new Wo.Scales.Time;return{scale:e,axis:new Wo.Axes.Time(e,"bottom"),accessor:t=>t.wall_time}}var r0=(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)},yB=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 vqe(){let e=new Wo.Scales.Linear;return{scale:e,axis:new Wo.Axes.Numeric(e,"bottom"),accessor:r0}}function vB(e){switch(e){case Ed.STEP:return $at();case Ed.WALL_TIME:return yqe();case Ed.RELATIVE:return vqe();default:throw new Error("invalid xType: "+e)}}var zs=Ee(Oe(),1),Mn=Ee(wl(),1);var va=Ee(wl(),1);function xqe(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 bqe=[1,0,0,1,0,0];function wqe(e){let t=xqe(e),r=bqe,n=null;for(let i of t){let o=va.Utils.DOM.getElementTransform(i);if(o!=null){let l=i.clientWidth/2,c=i.clientHeight/2;r=va.Utils.Math.multiplyTranslate(r,[l,c]),r=va.Utils.Math.multiplyMatrix(r,va.Utils.Math.invertMatrix(o)),r=va.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=va.Utils.Math.multiplyTranslate(r,[a,s])}return r}var bB=class extends va.Utils.Translator{computePosition(t,r){let n={x:t,y:r},i=wqe(this._rootElement);return i==null?n:va.Utils.Math.applyTransform(i,n)}},U1=class extends va.Dispatchers.Mouse{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new bB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[U1._DISPATCHER_KEY];return n||(n=new U1(t),r[U1._DISPATCHER_KEY]=n),n}},q1=class extends va.Dispatchers.Touch{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new bB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[q1._DISPATCHER_KEY];return n||(n=new q1(t),r[q1._DISPATCHER_KEY]=n),n}};va.Interaction.prototype._isInsideComponent=function(e){return 0<=e.x&&0<=e.y&&e.x<this._componentAttachedTo.width()&&e.y<this._componentAttachedTo.height()};var wB=class extends va.Interactions.Pointer{_anchor(t){let r=this;r._isAnchored=!0,r._mouseDispatcher=U1.getDispatcher(r._componentAttachedTo),r._mouseDispatcher.onMouseMove(r._mouseMoveCallback),r._touchDispatcher=q1.getDispatcher(r._componentAttachedTo),r._touchDispatcher.onTouchStart(r._touchStartCallback)}};var kKt=Ee(Oe(),1);var G1;(function(e){e.AUTO="auto",e.BOTTOM="bottom",e.RIGHT="right"})(G1||(G1={}));var Sqe={boxShadow:"0 1px 4px rgba(0, 0, 0, .3)",opacity:0,position:"fixed",willChange:"transform",zIndex:5},b4=class extends Gt(mt){constructor(){super(...arguments),this.position=G1.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+mB,u=null,h=Math.max(this.minDistFromEdge,n.left),f=null,p=s;this.position==G1.RIGHT?h=n.right:(p=l+mB,a<h+i.width+this.minDistFromEdge&&(h=null,f=this.minDistFromEdge)),this.position==G1.AUTO&&n.top-c>0&&o<n.top+n.height+c&&(p=null,u=o-s+mB);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};kKt.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,Sqe),document.body.appendChild(t),t}_removeTunnel(t){document.body.removeChild(t)}};E([A({type:String}),w("design:type",String)],b4.prototype,"contentComponentName",void 0);E([A({type:String}),w("design:type",String)],b4.prototype,"position",void 0);E([A({type:Number}),w("design:type",Number)],b4.prototype,"minDistFromEdge",void 0);b4=E([yt("vz-chart-tooltip")],b4);var NS=Ee(wl(),1);var DKt=1e4,OKt=.001,zKt=xn(".2~e"),Mqe=xn(".4~r"),RKt=xn(",~");function NKt(e){if(e===0)return"0";let t=Math.abs(e);return t>=DKt||t<OKt?zKt(e):Mqe(e)}var Zat={formatTick:NKt,formatShort:NKt,formatReadable(e){let t=Math.abs(e);return t>=DKt||t<OKt?zKt(e):RKt(e)},formatLong:RKt},jGn=new Intl.NumberFormat(void 0,{maximumFractionDigits:3});var XGn=xn("0.3~s"),$Gn=xn(",.3~f");var Eqe=1e3,Tqe=60*Eqe,Cqe=60*Tqe,Aqe=24*Cqe,KGn=365*Aqe,ZGn=xn(".4~");var Pqe=Yb().tickFormat(),Kat,FKt={formatTick(e){return Pqe(new Date(e))},formatShort(e){return new Date(e).toLocaleString(Kat,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})},formatReadable(e){return new Date(e).toLocaleString(Kat,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})},formatLong(e){return new Date(e).toLocaleString(Kat,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})}};var Td;(function(e){e[e.LINEAR=0]="LINEAR",e[e.LOG10=1]="LOG10",e[e.TIME=2]="TIME"})(Td||(Td={}));function BKt(e){switch(e){case Td.LINEAR:return new Jat;case Td.LOG10:return new Qat;case Td.TIME:return new tst;default:let t=e;throw new RangeError(`ScaleType ${t} not supported.`)}}var Iqe=.05,Jat=class{constructor(){this.defaultFormatter=Zat}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)*Iqe,[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)}},Qat=class{constructor(){this.defaultFormatter=Zat}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}},tst=class{constructor(){this.scale=Yb(),this.defaultFormatter=FKt}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 SB=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 BKt(Td.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=sa(o,.05),s=sa(o,.95);n=r.filter(l=>l>=a&&l<=s)}let i=aa(n);return i[0]==null||i[1]==null?[]:i}ignoreOutlier(t){return typeof t=="boolean"?(this._ignoreOutlier=t,this):this._ignoreOutlier}};var TB=Ee(wl(),1);var HKt=Ee(wl(),1),MB=class extends HKt.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 EB=Math.pow(2,-1074);function w4(e){return Math.log10(e)}function est(e){return Math.pow(10,e)}var CB=class extends MB{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(EB,r),n])}_niceDomain(t,r){let[n,i]=t,o=Math.max(w4(EB),w4(n)),a=w4(i),s=a-o,l=s?s*this.padProportion():1;return[est(Math.max(w4(EB),o-l)),est(a+l)]}_getUnboundedExtent(t){let r=this._getAllIncludedValues(t),n=this._defaultExtent();if(r.length!==0){let i=[TB.Utils.Math.min(r,n[0]),TB.Utils.Math.max(r,n[1])];n=this._niceDomain(i)}return n}_getAllIncludedValues(t=!1){return super._getAllIncludedValues().map(n=>n>0?n:EB)}_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=>TB.Utils.Math.isValidNumber(o)&&o>0),n=r;if(this.ignoreOutlier()){let a=r.map(w4).sort((c,u)=>c-u),s=sa(a,.05),l=sa(a,.95);n=a.filter(c=>c>=s&&c<=l).map(est)}let i=aa(n);return i[0]==null||i[1]==null?[]:i}};var Cd=Ee(wl(),1);var n0=Ee(wl(),1),AB=class extends n0.Components.SelectionBoxLayer{constructor(t,r,n){super(),this.easeFn=xs,this._animationTime=750,this.xScale(t),this.yScale(r),this._dragInteraction=new n0.Interactions.Drag,this._doubleClickInteraction=new n0.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)&&n0.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?n0.Utils.DOM.requestAnimationFramePolyfill(f):(this.onEnd(),this.isZooming(!1))};f()}};var xa;(function(e){e[e.NONE=0]="NONE",e[e.DRAG_ZOOMING=1]="DRAG_ZOOMING",e[e.PANNING=2]="PANNING"})(xa||(xa={}));var zf=class extends Cd.Components.Group{constructor(t,r,n){super(),this.state=xa.NONE,this.panStartCallback=new Cd.Utils.CallbackSet,this.panEndCallback=new Cd.Utils.CallbackSet,this.panZoom=new Cd.Interactions.PanZoom(t,r),this.panZoom.dragInteraction().mouseFilter(o=>zf.isPanKey(o)&&o.button===0),this.panZoom.wheelFilter(this.canScrollZoom),this.dragZoomLayer=new AB(t,r,n),this.dragZoomLayer.dragInteraction().mouseFilter(o=>!zf.isPanKey(o)&&o.button===0),this.append(this.dragZoomLayer);let i=this.onWheel.bind(this);this.onAnchor(()=>{this._mouseDispatcher=Cd.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==xa.NONE&&this.setState(xa.PANNING)}),this.panZoom.dragInteraction().onDragEnd(()=>{this.state==xa.PANNING&&this.setState(xa.NONE)}),this.dragZoomLayer.dragInteraction().onDragStart(()=>{this.state==xa.NONE&&this.setState(xa.DRAG_ZOOMING)}),this.dragZoomLayer.dragInteraction().onDragEnd(()=>{this.state==xa.DRAG_ZOOMING&&this.setState(xa.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==xa.PANNING&&this.panEndCallback.callCallbacks(),t==xa.PANNING&&this.panStartCallback.callCallbacks()}stateClassName(t){switch(t){case xa.PANNING:return"panning";case xa.DRAG_ZOOMING:return"drag-zooming";case xa.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 PB;(function(e){e[e.TEXT=0]="TEXT",e[e.DOM=1]="DOM"})(PB||(PB={}));var Ff;(function(e){e.LOG="log",e.LINEAR="linear"})(Ff||(Ff={}));var VKt=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(dB);this.yAxis.margin(0).tickLabelPadding(5).formatter(s),this.yAxis.usesTextWidthApproximation(!0),this.fillArea=i;let l=new zf(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!==Ff.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(gB*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(gB*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(LKt*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 zs.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=r0(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=r0(s[l],-1,o),c.push(s[l])):a=t(s[l],-1,o);return c},i=zs.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 wB,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",gB).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:PB.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(e0),s=d=>Math.pow(d.x-r.x,2)+Math.pow(d.y-r.y,2),l=zs.min(t.map(s)),c=this.smoothingEnabled?this.smoothedAccessor:this.yValueAccessor;this.tooltipSortingMethod==="ascending"?t=zs.sortBy(t,d=>c(d.datum,-1,d.dataset)):this.tooltipSortingMethod==="descending"?t=zs.sortBy(t,d=>c(d.datum,-1,d.dataset)).reverse():this.tooltipSortingMethod==="nearest"?t=zs.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],_=zs.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==PB.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=zs.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===Ff.LOG)return new CB;if(t===Ff.LINEAR)return new SB;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<=VKt)return t;let n=Math.ceil(r.length/VKt),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(Mx(Kl({},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 qKt=Ee(Oe(),1),ist=Ee(wl(),1);_s({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 i0;(function(e){e.GROUP="G",e.DIV="DIV",e.SVG="SVG",e.TEXT="TEXT"})(i0||(i0={}));var rst=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==i0.DIV||r==i0.SVG)){let n=document.createElement(i0.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()==i0.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==i0.TEXT&&Object.assign(n.style,{fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight}),i!=i0.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}},IB=class extends rst{shouldOmitNode(t){return t.nodeType==Node.ELEMENT_NODE?t.classList.contains("scatter-plot"):!1}};_s({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 Lqe=Wu(e0),UKt=e=>isNaN(e)?"NaN":Lqe(e),ost=[{title:"Name",evaluate:e=>e.dataset.metadata().name},{title:"Smoothed",evaluate(e,t){let{smoothingEnabled:r}=t;return UKt(r?e.datum.smoothed:e.datum.scalar)}},{title:"Value",evaluate:e=>UKt(e.datum.scalar)},{title:"Step",evaluate:e=>x4(e.datum.step)},{title:"Time",evaluate:e=>_B(e.datum.wall_time)},{title:"Relative",evaluate:e=>yB(r0(e.datum,-1,e.dataset))}],Zr=class extends Gt(mt){constructor(){super(...arguments),this.colorScale=new ist.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=ost,this.yScaleType=Ff.LINEAR,this.ignoreYOutliers=!1,this.tooltipSortingMethod="default",this.tooltipPosition=G1.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",zf.isPanKey(t))}_onKeyUp(t){this.toggleClass("pankey",zf.isPanKey(t))}_onMouseDown(t){this.toggleClass("mousedown",!0)}_onMouseUp(t){this.toggleClass("mousedown",!1)}isDataFitToDomain(){return this._chart?this._chart.isDataFitToDomain():!0}setVisibleSeries(t){qKt.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=$at:this.xType&&(t=()=>vB(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 IB(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",ist.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 nst=class extends mt{};nst.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>
  `;nst=E([yt("vz-line-chart-tooltip")],nst);var ast=[],kqe=0,Rqe=GKt.throttle(function e(){if(ast.length==0)return;let t=ast.shift();t&&t.active&&(t.redraw(),t._maybeRenderedInBadState=!1),window.cancelAnimationFrame(kqe),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?Ff.LOG:Ff.LINEAR,this.redraw()}_fixBadStateWhenActive(){this.active&&this._maybeRenderedInBadState&&(ast.push(this),Rqe())}_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);_s({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 LB(e,t){return`${t} (${e})`}var W1=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 W1({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=ve().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Cn(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(e0),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=>x4(n.datum.step)},{title:"Time",evaluate:n=>_B(n.datum.wall_time)},{title:"Relative",evaluate:n=>yB(r0(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 Cn(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Cn(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i={tag:n.getTag(),run:n.getRun()};return Cn(ve().pluginRoute("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=LB(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 o0=Ee(Oe(),1);var kB={};Ks(kB,{BaseStore:()=>bp,Canceller:()=>an,EnvironmentStore:()=>H9,ExperimentsStore:()=>eR,HttpMethodType:()=>Am,InvalidRequestOptionsError:()=>Vx,ListenKey:()=>B9,RequestCancellationError:()=>l9,RequestManager:()=>Ae,RequestNetworkError:()=>cE,RequestOptions:()=>Ux,RunsStore:()=>V9,TYPES:()=>Lxe,addParams:()=>Cn,createRouter:()=>Pgt,createSearchParam:()=>eW,environmentStore:()=>ib,experimentsStore:()=>rR,filterTags:()=>Rxe,getRouter:()=>ve,getRunsNamed:()=>kxe,getTags:()=>$i,runsStore:()=>wp,setRouter:()=>Hxe});var En=class extends Gt(mt){constructor(){super(...arguments),this.active=!0,this._colorScale=new W1({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=ve().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Cn(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 Cn(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Cn(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i={tag:n.getTag(),run:n.getRun()};return Cn(ve().pluginRoute("custom_scalars","/download_data"),i)}_createProcessDataFunction(){return(t,r,n)=>{if(n.regex_valid){let i=o0.clone(this._nameToDataSeries);o0.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=LB(r,a),c=i[l];if(c)c.setData(s);else{o0.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 o0.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",W1)],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=vp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=gE("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=vp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType="step",this._active=!0,this.reloadOnReady=!0,this._showDownloadLinksObserver=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=_E("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){let t=ve().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=ve().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:Na.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 NB=Ee(Oe(),1);var sst=Ee(Oe(),1),ba=Ee(wl(),1);var RB=class{constructor(t,r){this.run2datasets={},this.colorScale=r,this.buildChart(t)}getDataset(t){return this.run2datasets[t]===void 0&&(this.run2datasets[t]=new ba.Dataset([],{run:t})),this.run2datasets[t]}buildChart(t){this.outer&&this.outer.destroy();let r=vB(t);this.xAccessor=r.accessor,this.xScale=r.scale,this.xAxis=r.axis,this.xAxis.margin(0),this.xAxis.tickLabelPadding(3),this.yScale=new ba.Scales.Linear,this.yAxis=new ba.Axes.Numeric(this.yScale,"left");let n=Wu(dB);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 ba.Components.Gridlines(this.xScale,this.yScale),this.center=new ba.Components.Group([this.gridlines,i]),this.outer=new ba.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=sst.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=sst.range(a.length-1).map(h=>{let f=new ba.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 ba.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 ba.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 ba.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 RB(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",ba.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",RB)],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 wa=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=ve().pluginRoute("distributions","/distributions");Promise.all(t.map(a=>{let s=Cn(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()}};wa.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)],wa.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],wa.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],wa.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"_colorScale",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],wa.prototype,"_expanded",void 0);E([A({type:Object}),w("design:type",Ae)],wa.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],wa.prototype,"_canceller",void 0);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],wa.prototype,"_reloadOnRunTagChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],wa.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],wa.prototype,"_runColor",null);wa=E([yt("tf-distribution-loader")],wa);var Sl=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=ve().pluginRoute("distributions","/tags");return this._requestManager.request(t).then(r=>{if(NB.isEqual(r,this._runToTagInfo))return;let n=NB.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]}};Sl.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)],Sl.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],Sl.prototype,"_xType",void 0);E([A({type:Array}),w("design:type",Array)],Sl.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Sl.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],Sl.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Sl.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Sl.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Sl.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],Sl.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Sl.prototype,"_categories",null);Sl=E([yt("tf-distribution-dashboard")],Sl);var DB={};Ks(DB,{DISAMBIGUATOR:()=>F0t,ListenKey:()=>dE,addHashListener:()=>mE,addStorageListener:()=>CW,disposeBooleanBinding:()=>$be,disposeNumberBinding:()=>Kbe,disposeObjectBinding:()=>Qbe,disposeStringBinding:()=>Ybe,fireStorageChanged:()=>AW,getBoolean:()=>jbe,getBooleanInitializer:()=>vp,getBooleanObserver:()=>xp,getNumber:()=>DW,getNumberInitializer:()=>gE,getNumberObserver:()=>_E,getObject:()=>Zbe,getObjectInitializer:()=>zW,getObjectObserver:()=>FW,getString:()=>Gbe,getStringInitializer:()=>y_,getStringObserver:()=>v_,getUrlHashDict:()=>N0t,makeBindings:()=>yE,migrateLegacyURLScheme:()=>t2e,removeHashListenerByKey:()=>PW,removeStorageListenerByKey:()=>IW,setBoolean:()=>Xbe,setNumber:()=>OW,setObject:()=>Jbe,setString:()=>Wbe});var oct=Ee(Oe(),1);var WKt="Graph dashboard actions",YKt="Graph dashboard timings",lst;(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"})(lst||(lst={}));var cst;(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"})(cst||(cst={}));var jr=Kl(Kl({},lst),cst);var Jse=Ee(zlt(),1),pn=Ee(Oe(),1);var Fs;(function(e){e.OP_GRAPH="op_graph",e.CONCEPTUAL_GRAPH="conceptual_graph",e.PROFILE="profile"})(Fs||(Fs={}));var ye={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"},Z4={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 m0(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 Pn(e,t,r,n){let i=m0(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}},J4=.75,Q4=12,$lr=.3,Klr=[1,5e6],qse=K_().exponent($lr).domain(Klr).range([J4,Q4]).clamp(!0);var ZS=Ee(Oe(),1);var Wse=20;function Zlr(e){return e.hasOwnProperty("timingId")}function Po(e){Zlr(e)?(YKt,e.timingId,e.eventValue,void 0):(WKt,e.actionId,e.eventLabel,void 0)}function Rd(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 rP(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 Yse(e,t,r,n,i){n.setMessage(e);try{let o=Rd(e,r,i);return n.updateProgress(t),o}catch(o){return n.reportError("Failed "+e,o),null}}function ev(e,t,r,n,i){return new Promise((o,a)=>{n.setMessage(e),setTimeout(function(){try{let s=Rd(e,r,i);n.updateProgress(t),o(s)}catch(s){n.reportError("Failed "+e,s)}},Wse)})}function dH(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)}},Wse)})}function jse(e){return e.replace(/([:.\[\],/\\\(\)])/g,"\\$1")}var nP=[{symbol:"B"},{symbol:"KB",numUnits:1024},{symbol:"MB",numUnits:1024},{symbol:"GB",numUnits:1024},{symbol:"TB",numUnits:1024},{symbol:"PB",numUnits:1024}],iP=[{symbol:"\xB5s"},{symbol:"ms",numUnits:1e3},{symbol:"s",numUnits:1e3},{symbol:"min",numUnits:60},{symbol:"hr",numUnits:60},{symbol:"days",numUnits:24}];function Nd(e,t,r=0){return r+1<t.length&&e>=t[r+1].numUnits?Nd(e/t[r+1].numUnits,t,r+1):Number(e.toPrecision(3))+" "+t[r].symbol}function mH(e){return!!(e&&(e.totalBytes>0||e.getTotalMicros()>0||e.outputSize))}function Flt(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 Xse(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 Jlr=document.createElement("canvas"),eP=Jlr.getContext("2d");function Gse(e,t){return eP&&(eP.font=`${t}px Roboto, sans-serif`),eP==null?void 0:eP.measureText(e).width}function $se(e,t,r){if(!e)return"";if(Gse(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";Gse(a,t)<=r?n=o:i=o-1}return n===0?e[0]:e.slice(0,n)+"\u2026"}var pH=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 Al="/",qc="__root__",Sa="__function_library__",Qse="_too_large_attrs";var tle="--",g0;(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"})(g0||(g0={}));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 is;(function(e){e[e.GROUP=0]="GROUP",e[e.UNGROUP=1]="UNGROUP"})(is||(is={}));var Qlr="_output_shapes",tcr="_XlaCluster",Xu=class{constructor(){this.nodes={},this.edges=[]}},gH=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"}},_0=class{constructor(t){this.op=t.op,this.name=t.name,this.device=t.device,this.attr=t.attr,this.inputs=icr(t.input),this.outputShapes=ecr(t.attr),this.xlaCluster=rcr(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 sP(e,t={}){return new oP(e,t)}function ele(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:aP(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 oP=class{constructor(t,r={}){this.name=t,this.type=jt.META,this.depth=1,this.isGroupNode=!0,this.cardinality=0,this.metagraph=e3(t,g0.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 Vlt(e,t){return new qf(e,t)}var qf=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+=qf.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 Hlt(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 Hlt=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,g0.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 ecr(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===Qlr){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));return e.splice(r,1),o}}return null}function rcr(e){if(!e)return null;for(let t=0;t<e.length;t++)if(e[t].key===tcr)return e[t].value.s||null;return null}var ncr=/^([^:]+):((\w+:|)\d+)$/;function icr(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(ncr);s&&(o=s[1],a=s[2]),r!==o&&(r=o,t.push({name:o,outputTensorKey:a,isControlDependency:i}))}return t}function Blt(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 rle={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 nle(e,t,r){let n={},i={},o={},a=Kse(t.inEmbeddingTypes),s=Kse(t.outEmbeddingTypes),l=[],c=e.node,u=new Array(c.length);return ev("Normalizing names",30,()=>{let h=new Array(c.length),f=0,p=g=>{let _=new _0(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 _=Sa+g.signature.name;if(p({name:_,input:[],device:"",op:"",attr:[]}),g.signature.input_arg){let b=0,S=C=>{let P=p({name:_+Al+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[_+Al+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=_+Al+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=>ev("Building the data structure",70,()=>{let f=ocr(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)Blt(p,f[b.name]||b.name,d,b,t,_)}else if(y in i){let x=i[y];for(let b of x.inputs)Blt(p,f[b.name]||b.name,d,g,t,_)}else Blt(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 Jse.graphlib.Graph(r);return n.setGraph({name:e,rankdir:r.rankdir||"BT",type:t}),n}function Kse(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 aP(e){let t=e.split(Al);return e+Al+"("+t[t.length-1]+")"}function ocr(e,t){let r={},n={};e.sort();for(let i=0;i<e.length-1;++i){let o=e[i];pn.each(lP(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)===Al){r[o]=aP(o);break}}else break}}return pn.each(t,i=>{i in n&&(r[i]=aP(i))}),r}function Zse(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 ile(e,t){let r=Zse(e),n=Zse(t);for(let i=0;i<r.length;i++)if(r[i]!==n[i])return!1;return!0}function lP(e,t){let r=[],n=e.indexOf(Al);for(;n>=0;)r.push(e.substring(0,n)),n=e.indexOf(Al,n+1);if(t){let i=t[e];i&&r.push(i)}return r.push(e),r}function _H(e){return e===ur.EXCLUDE?"Add to main graph":"Remove from main graph"}function ole(e){return e===is.GROUP?"Ungroup this series of nodes":"Group this series of nodes"}var He=Ee(Oe(),1);var rv=Ee(Oe(),1);function ale(e,t){let r=scr(e),n=lcr(r,t);return Object.keys(n).sort(i=>n[i].level).reduce((i,o)=>(i[o]=n[o],i),{})}function acr(e){let t=rv.map({depth:e.depth,"|V|":e.metagraph.nodes().length,"|E|":e.metagraph.edges().length},function(n,i){return i+"="+n}).join(" "),r=rv.map(e.opHistogram,function(n,i){return i+"="+n}).join(",");return t+" [ops] "+r}function scr(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=acr(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 lcr(e,t){return rv.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||ccr(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 yH(e,t,r){return rv.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 ccr(e,t){if(!ile(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=yH(l,e,r),c=yH(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(!ucr(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=yH(f,e,r),p=yH(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 ucr(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 Dd;(function(e){e[e.TEMPLATES_UPDATED=0]="TEMPLATES_UPDATED"})(Dd||(Dd={}));var os=class extends pH{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=sP(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:is.GROUP}setSeriesGroupType(t,r){return this.seriesGroupMap.set(t,r)}buildSeriesGroupMapToggled(t){let r=this.getSeriesGroupType(t)===is.GROUP?is.UNGROUP:is.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",g0.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=Vlt(_.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 qf(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 qf(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 sle(o,t,r,n),sle(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=XL(this.templates);if(!t.length)return null;let r=gu().domain(t).range(Ir(0,t.length));return n=>r(n)}updateTemplates(){Rd("Finding similar subgraphs",()=>{this.templates=ale(this,this.verifyTemplate),this.dispatchEvent(Dd.TEMPLATES_UPDATED)},jr.HIERARCHY_FIND_SIMILAR_SUBGRAPHS)}};function sle(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 xH(e,t,r){let n=new os(t),i={};return ev("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),fcr(n,e)},r,jr.HIERARCHY_ADD_NODES).then(()=>ev("Detect series",30,()=>{t.seriesNodeMinSize>0&&ule(n.root,n,i,t.seriesNodeMinSize,t.seriesMap,t.useGeneralizedSeriesPatterns)},r,jr.HIERARCHY_DETECT_SERIES)).then(()=>ev("Adding edges",40,()=>{pcr(n,e,i)},r,jr.HIERARCHY_ADD_EDGES)).then(()=>n)}function lle(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 cle(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)===is.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 fcr(e,t){let r={};He.each(t.nodes,(n,i)=>{let o=lP(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=sP(l,e.graphOptions),c.parentNode=a,e.setNode(l,c),a.metagraph.setNode(l,c),l.indexOf(Sa)===0&&a.name===qc)){let u=l.substring(Sa.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 pcr(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=Vlt(h,f),u.metagraph.setEdge(h,f,p)),!u.hasNonControlEdges&&!s.isControlDependency&&(u.hasNonControlEdges=!0),p.addBaseEdge(s,e)})}function ule(e,t,r,n,i,o){let a=e.metagraph;He.each(a.nodes(),u=>{let h=a.node(u);h.type===jt.META&&ule(h,t,r,n,i,o)});let s=dcr(a),c=(o?gcr:mcr)(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)===is.GROUP&&t.setSeriesGroupType(u.name,is.UNGROUP),t.getSeriesGroupType(u.name)!==is.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 dcr(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 mcr(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}vH(c,n,+o,t,r),c=[h]}vH(c,n,+o,t,r)})}),n}function gcr(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}vH(h,n,+o,t,r),h=[p]}vH(h,n,+o,t,r)})}),n}function vH(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 y0={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 Vm(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"},Ult={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},_cr=new RegExp("^(?:"+Sa+")?(\\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 wH(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?qse:zn().domain([1,this.hierarchy.maxMetaEdgeSize]).range([J4,Q4])}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 wH(r,this.hierarchy.graphOptions):new Gf(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&&!mH(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:y0.COMPATIBLE,proportion:a},{color:y0.INCOMPATIBLE,proportion:1-a}]),this.index[t]}getNearestVisibleAncestor(t){let r=lP(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){ple(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 _0({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=sP(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 qf(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(Sa)===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 Od(null),b=new Gf(y);hle(g,y,b,x,_i.CONSTANT),this.index[y.name]=b}),me.each(_.outEmbeddings,y=>{let x=new Od(null),b=new Gf(y);fle(g,y,b,x,_i.SUMMARY),this.index[y.name]=b}))}),me.each(i.edges(),d=>{let g=i.edge(d),_=new Od(g);_.isFadedOut=this.index[d.v].isFadedOut||this.index[d.w].isFadedOut,o.setEdge(d.v,d.w,_)}),n.node.type===jt.META&&Mcr(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 Od(g),_i.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 Gf(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 Gf(Z),this.index[F]=z,o.setNode(F,z),o.setParent(F,R),W.node.cardinality++}let U=new Od(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 Gf(D),C.structural=!0,this.index[S]=C,o.setNode(S,C),_.node.cardinality++,o.setParent(S,g)}let P=new Od(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 Od(n);me.forEach(i.metaedge.baseEdgeList,o=>{let a=o.v.split(Al);for(let s=a.length;s>=0;s--){let l=a.slice(0,s),c=this.hierarchy.node(l.join(Al));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(Al);!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=[]}},_i;(function(e){e[e.SHORTCUT=0]="SHORTCUT",e[e.CONSTANT=1]="CONSTANT",e[e.SUMMARY=2]="SUMMARY",e[e.ELLIPSIS=3]="ELLIPSIS"})(_i||(_i={}));var bH=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===_i.ELLIPSIS){let i=r.node;i.setNumMoreNodes(++i.numMoreNodes);return}let n=new gH(1);this.list.push(new i3(n,new Gf(n),null,_i.ELLIPSIS,t.isIn))}},Gf=class{constructor(t){if(this.node=t,this.expanded=!1,this.inAnnotations=new bH,this.outAnnotations=new bH,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(Al)+1),t.type===jt.META&&t.associatedFunction){let r=this.displayName.match(_cr);r?this.displayName=r[1]:me.startsWith(this.displayName,Sa)&&(this.displayName=this.displayName.substring(Sa.length))}}isInCore(){return!this.isInExtract&&!this.isOutExtract&&!this.isLibraryFunction}},Od=class{constructor(t){this.metaedge=t,this.adjoiningMetaedge=null,this.structural=!1,this.weight=1,this.isFadedOut=!1}};function hle(e,t,r,n,i){let o=new i3(t,r,n,i,!0);e.inAnnotations.push(o)}function fle(e,t,r,n,i){let o=new i3(t,r,n,i,!1);e.outAnnotations.push(o)}function ycr(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:ple(n,t-1);break}})}var wH=class extends Gf{constructor(t,r){super(t);let i=t.metagraph.graph();this.coreGraph=e3(i.name,g0.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 ple(e,t){e.coreGraph&&ycr(e.coreGraph,t)}function cP(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||(fle(n,i.node,i,o,_i.SHORTCUT),hle(i,n.node,n,o,_i.SHORTCUT),e.removeEdge(t,r))}function qlt(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isOutExtract=!0,me.each(n.predecessors(t),(a,s)=>{cP(n,a,t)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.successors(t),(a,s)=>{cP(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 Glt(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isInExtract=!0,me.each(n.successors(t),(a,s)=>{cP(n,t,a)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.predecessors(t),(a,s)=>{cP(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 dle(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 vcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{var i,o;t.node(r).node.include===ur.EXCLUDE&&!r.startsWith(Sa)&&(((i=e.coreGraph.outEdges(r))==null?void 0:i.length)>((o=e.coreGraph.inEdges(r))==null?void 0:o.length)?qlt(e,r,!0):Glt(e,r,!0))})}function xcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&dle(n.node,Xo.outExtractTypes)&&qlt(e,r)})}function bcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&dle(n.node,Xo.inExtractTypes)&&Glt(e,r)})}function wcr(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;_--)Glt(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||qlt(e,f[_])}}function Scr(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=>cP(t,o.v,o.w))})}function Mcr(e,t){vcr(e),Xo.outExtractTypes.length&&xcr(e),Xo.inExtractTypes.length&&bcr(e),t&&wcr(e),Xo.maxControlDegree&&Scr(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 mle(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 vle=Ee(zlt(),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 SH(e){e.node.isGroupNode&&Tcr(e),e.node.type===jt.META?Ccr(e):e.node.type===jt.SERIES&&Acr(e)}function Ecr(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 Tcr(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?SH(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),SH(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||Ecr(r),Pcr(r)})}function xle(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};vle.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&&Icr(c.points)){if(u!=null){let d=u.expanded?u.x:v0(u);c.points[0].x=d}if(h!=null){let d=h.expanded?h.x:v0(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]=yle(f,h));let p=c.points[1];u!=null&&(c.points[0]=yle(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 Ccr(e){let t=Tr.subscene.meta;Ze.extend(e,t),Ze.extend(e.coreBox,xle(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 Acr(e){let t=e.coreGraph,r=Tr.subscene.series;Ze.extend(e,r),Ze.extend(e.coreBox,xle(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 Pcr(e){if(e.expanded)return;let t=e.inAnnotations.list,r=e.outAnnotations.list;Ze.each(t,u=>gle(u)),Ze.each(r,u=>gle(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 gle(e){switch(e.annotationType){case _i.CONSTANT:Ze.extend(e,Tr.constant.size);break;case _i.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 _i.SUMMARY:Ze.extend(e,Tr.constant.size);break}}function v0(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 _le(e,t){let r=t.x-e.x,n=t.y-e.y;return 180*Math.atan(n/r)/Math.PI}function Icr(e){let t=_le(e[0],e[1]);for(let r=1;r<e.length-1;r++){let n=_le(e[r],e[r+1]);if(Math.abs(n-t)>1)return!1;t=n}return!0}function yle(e,t){let r=t.expanded?t.x:v0(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 Pl=m0,Hi=ye,Lcr=320,kcr=150,hP=[{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 wle(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=Xh.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 Sle(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-Lcr,f=u.top+u.height-kcr;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 Mle(e,t){let r=t.node.type===jt.SERIES?0:Tr.subscene.meta.labelHeight;a3(Pl(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(Pl(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(Pl(e,"g",Hi.Scene.OUTEXTRACT),l,r)}if(o){let l=t.coreBox.width-t.libraryFunctionsBox.width/2;a3(Pl(e,"g",Hi.Scene.FUNCTION_LIBRARY),l,r)}}function Ele(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 zd(e,t,r,n,i){e.transition().attr("x",t-n/2).attr("y",r-i/2).attr("width",n).attr("height",i)}function Tle(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 Cle(e,t){let r=v0(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 MH(e,t,r,n,i){e.transition().attr("cx",t).attr("cy",r).attr("rx",n/2).attr("ry",i/2)}function ble(e,t){return t?e.toFixed(0):Math.abs(e)>=1?e.toFixed(1):e.toExponential(1)}function Rcr(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("#("+hP[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 Ncr(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",hP[D].background_color),y.appendChild(B);let I=document.createElementNS(ju,"stop"),L=b*100/p+"%";I.setAttribute("offset",L),I.setAttribute("stop-color",hP[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=Rcr(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=ble(d.min,k),B=ble(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 Ale(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;Ncr(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 dP=Ee(Oe(),1);var Vi=Ee(Oe(),1);function Dcr(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 Ylt(e,t){let r=e.getContextMenu(),n=Ht(e.getContextMenu());return function(i,o){let a=qt,s=Dcr(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 CH=Ee(Oe(),1);var zcr="\xD7",Ple=qb().domain([J4,Q4]).range(["small","medium","large","xlarge"]),Fcr=2.5;function fP(e){return e.v+tle+e.w}function kle(e,t,r){let n=r,i=[];i=CH.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=Pn(e,"g",ye.Edge.CONTAINER).selectAll(function(){return this.childNodes}).data(i,fP);return a.enter().append("g").attr("class",ye.Edge.GROUP).attr("data-edge",fP).each(function(s){let l=Ht(this);s.label.edgeGroup=l,n._edgeGroupIndex[fP(s)]=l,n.handleEdgeSelected&&l.on("click",c=>{qt.stopPropagation(),n.fire("edge-select",{edgeData:c,edgeGroup:l})}),$lt(l,s,n)}).merge(a).each(function(){Hcr(r,this)}).each(function(s){Vcr(Ht(this),s,n)}),a.exit().each(s=>{delete n._edgeGroupIndex[fP(s)]}).remove(),a}function jlt(e,t){let r=t.getNodeByName(e.v);if(r.outputShapes==null||CH.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(zcr)}function Xlt(e,t){return t.edgeLabelFunction?t.edgeLabelFunction(e,t):e.baseEdgeList.length>1?e.baseEdgeList.length+" tensors":jlt(e.baseEdgeList[0],t)}function Ile(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 Lle(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=Ile(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=Ile(e,h,n);return e[p]={x:f.x,y:f.y},e.slice(0,p+1)}}function $lt(e,t,r,n){n=n||ye.Edge.LINE,t.label&&t.label.structural&&(n+=" "+ye.Edge.STRUCTURAL),t.label&&t.label.metaedge&&t.label.metaedge.numRefEdges&&(n+=" "+ye.Edge.REFERENCE_EDGE),r.handleEdgeSelected&&(n+=" "+ye.Edge.SELECTABLE);let i="path_"+fP(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-${Ple(o)}`;a.style("marker-start",`url(#${c})`),t.label.startMarkerId=c}else{let c=`dataflow-arrowhead-${Ple(o)}`;a.style("marker-end",`url(#${c})`),t.label.endMarkerId=c}if(t.label==null||t.label.metaedge==null)return;let s=Xlt(t.label.metaedge,r.renderHierarchy);if(s==null)return;let l=o>Fcr?"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 TH=vu().curve(G8).x(e=>e.x).y(e=>e.y);function Bcr(e,t,r,n,i){let o=r.label,a=o.adjoiningMetaedge,s=o.points,{shadowRoot:l}=e;if(r.label.startMarkerId&&(s=Lle(s,Ht(l==null?void 0:l.querySelector("#"+r.label.startMarkerId)),!0)),r.label.endMarkerId&&(s=Lle(s,Ht(l==null?void 0:l.querySelector("#"+r.label.endMarkerId)),!1)),!a)return nc(i,TH(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,TH(s)}}function Hcr(e,t){Ht(t).select("path."+ye.Edge.LINE).transition().attrTween("d",function(r,n,i){return Bcr(e,this,r,n,i)})}function Vcr(e,t,r){e.classed("faded",t.label.isFadedOut);let n=t.label.metaedge;e.select("path."+ye.Edge.LINE).classed("control-dep",n&&!n.numRegularEdges)}function AH(e,t,r){let i=Pn(e,"g",ye.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=>ye.Node.GROUP+" "+Hle(o)).each(function(o){let a=Ht(this),s=Pn(a,"g",ye.Annotation.INBOX);Ole(s,o.inAnnotations,o,r);let l=Pn(a,"g",ye.Annotation.OUTBOX);Ole(l,o.outAnnotations,o,r);let c=Ble(a,o,ye.Node.SHAPE);o.node.isGroupNode&&qcr(c,o,r),Dle(c,o,r),Ucr(a,o,r);let u=Wcr(a,o,r);Dle(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("."+ye.Annotation.INBOX).selectAll("."+ye.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)}),o.outAnnotations.list.length>0&&a.select("."+ye.Annotation.OUTBOX).selectAll("."+ye.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)})}).remove(),i}function Ucr(e,t,r){if(t.node.isGroupNode){if(t.expanded)return rct(e,t,r,ye.Subscene.GROUP);Pl(e,"g",ye.Subscene.GROUP).remove()}return null}function Nle(e,t){let r=t.x-t.width/2+t.paddingLeft,n=t.y-t.height/2+t.paddingTop,i=Pl(e,"g",ye.Subscene.GROUP);a3(i,r,n)}function qcr(e,t,r){let n=Pn(e,"g",ye.Node.BUTTON_CONTAINER);Pn(n,"circle",ye.Node.BUTTON_CIRCLE),Pn(n,"path",ye.Node.EXPAND_BUTTON).attr("d","M0,-2.2 V2.2 M-2.2,0 H2.2"),Pn(n,"path",ye.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})}),Cle(n,t)}function Dle(e,t,r,n){if(n){e.attr("pointer-events","none");return}let i=Ylt(r,zle(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 zle(e,t){let r=[{title:n=>_H(e.include),action:(n,i,o)=>{t.fire("node-toggle-extract",{name:e.name})}}];return t.nodeContextMenuItems&&(r=r.concat(t.nodeContextMenuItems)),Qlt(e)&&r.push({title:n=>tct(e),action:(n,i,o)=>{t.fire("node-toggle-seriesgroup",{name:PH(e)})}}),r}function Qlt(e){return PH(e)!==null}function PH(e){return e?e.type===jt.SERIES?e.name:e.type===jt.OP?e.owningSeries:null:null}function Gcr(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 tct(e){return ole(Gcr(e)!==null?is.GROUP:is.UNGROUP)}function Wcr(e,t,r){var c;let n=t.displayName,i=t.node.type===jt.META&&!t.expanded,o=Pn(e,"text",ye.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?Z4.Node.EXPANDED_LABEL:Z4.Node.SERIES_LABEL;break;case jt.OP:s=Z4.Node.OP_LABEL;break}if(i){n.length>r.maxMetanodeLabelLength&&(n=n.substr(0,r.maxMetanodeLabelLength-2)+"\u2026");let u=Ycr(r);o.attr("font-size",u(n.length)+"px"),s=u(n.length)}let l=o.text(n);return Fle(l,t.node.type,s,t),o}function Fle(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=$se(i.textContent,r,a),e.append("title").text(o)}var Klt=null;function Ycr(e){return Klt||(Klt=zn().domain([e.maxMetanodeLabelLengthLargeFont,e.maxMetanodeLabelLength]).range([e.maxMetanodeLabelLengthFontSize,e.minMetanodeLabelLengthFontSize]).clamp(!0)),Klt}function pP(e,t,r,n){Pl(e,"text",ye.Node.LABEL).transition().attr("x",t).attr("y",r+n)}function Ble(e,t,r){let n=Pn(e,"g",r);switch(t.node.type){case jt.OP:let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){Pn(n,"polygon",ye.Node.COLOR_TARGET);break}Pn(n,"ellipse",ye.Node.COLOR_TARGET);break;case jt.SERIES:let o="annotation",a=t;a.coreGraph&&(o=a.node.hasNonControlEdges?"vertical":"horizontal");let s=[ye.Node.COLOR_TARGET];a.isFadedOut&&s.push("faded-ellipse"),Pn(n,"use",s).attr("xlink:href","#op-series-"+o+"-stamp"),Pn(n,"rect",ye.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.BRIDGE:Pn(n,"rect",ye.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.META:Pn(n,"rect",ye.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;default:throw Error("Unrecognized node type: "+t.node.type)}return n}function Hle(e){switch(e.node.type){case jt.OP:return ye.OPNODE;case jt.META:return ye.METANODE;case jt.SERIES:return ye.SERIESNODE;case jt.BRIDGE:return ye.BRIDGENODE;case jt.ELLIPSIS:return ye.ELLIPSISNODE}throw Error("Unrecognized node type: "+e.node.type)}function jcr(e,t){let r=Pl(e,"g",ye.Node.SHAPE),n=v0(t);switch(t.node.type){case jt.OP:{let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){let o=Pl(r,"polygon");Tle(o,t.x,t.y,t.coreBox.width,t.coreBox.height)}else{let o=Pl(r,"ellipse");MH(o,n,t.y,t.coreBox.width,t.coreBox.height)}pP(e,n,t.y,t.labelOffset);break}case jt.META:{let i=r.selectAll("rect");t.expanded?(zd(i,t.x,t.y,t.width,t.height),Nle(e,t),pP(e,n,t.y,-t.height/2+t.labelHeight/2)):(zd(i,n,t.y,t.coreBox.width,t.coreBox.height),pP(e,n,t.y,0));break}case jt.SERIES:{let i=Pl(r,"use");t.expanded?(zd(i,t.x,t.y,t.width,t.height),Nle(e,t),pP(e,n,t.y,-t.height/2+t.labelHeight/2)):(zd(i,n,t.y,t.coreBox.width,t.coreBox.height),pP(e,n,t.y,t.labelOffset));break}case jt.BRIDGE:{let i=Pl(r,"rect");zd(i,t.x,t.y,t.width,t.height);break}default:throw Error("Unrecognized node type: "+t.node.type)}}function Zlt(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 IH(e){Ht(e).select("defs#_graph-gradients").remove()}function LH(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:Zlt("device-"+r.node.name,r.deviceColors,i);case Gn.XLA_CLUSTER:return r.xlaClusterColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Zlt("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:Zlt("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||ye.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!==ye.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+" ."+ye.Node.COLOR_TARGET),u=LH(r.templateIndex,r.colorBy,t,s,r.getGraphSvgRoot());c.style("fill",u),c.style("stroke",o?null:ect(u))}function ect(e){return e.substring(0,3)==="url"?Ku.GRADIENT_OUTLINE:cu(e).darker().toString()}function Vle(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=Ule(r,t),a={};Vi.each(o,function(c){a=qle(e,t,c,a)});let s=Object.keys(a),l=$cr(t,s);Kcr(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 Ule(e,t){let r=[],n=t.getNodeByName(e);if(n instanceof _0)return[n].concat(n.inEmbeddings);let i=n.metagraph.nodes();return Vi.each(i,function(o){r=r.concat(Ule(o,t))}),r}function qle(e,t,r,n){if(n[r.name])return n;n[r.name]=!0;let i=r.inputs,o=Jlt(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 oP){let d=aP(h.name);h=t.getNodeByName(d)}let f=Jlt(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=qle(e,t,p,n)}),f.name!==o.name&&Xcr(e,f,s,l)}),n}function Xcr(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 $cr(e,t){let r={};return Vi.each(t,function(n){let i=e.getNodeByName(n),o=Jlt(e,i);r[o.name]=o}),r}function Kcr(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 Jlt(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 _0)&&(r=!0)}return t}function Ole(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=ye.Annotation.EDGE,l=o.renderMetaedgeInfo&&o.renderMetaedgeInfo.metaedge;l&&!l.numRegularEdges&&(s+=" "+ye.Annotation.CONTROL_EDGE),l&&l.numRefEdges&&(s+=" "+ye.Edge.REF_LINE),$lt(a,o,n,s),o.annotationType!==_i.ELLIPSIS?(Qcr(a,o),Jcr(a,o)):Gle(a,o.node.name,o,ye.Annotation.ELLIPSIS)}).merge(i).attr("class",o=>ye.Annotation.GROUP+" "+Zcr(o.annotationType)+" "+Hle(o)).each(function(o){let a=Ht(this);eur(a,r,o,n),o.annotationType!==_i.ELLIPSIS&&tur(a,r,o,n)}),i.exit().each(function(o){n.removeAnnotationGroup(o,r)}).remove(),i}function Zcr(e){return(_i[e]||"").toLowerCase()||null}function Jcr(e,t){if(t.annotationType===_i.SUMMARY)Pn(e,"use").attr("class","summary").attr("xlink:href","#summary-icon").attr("cursor","pointer");else{let r=Ble(e,t,ye.Annotation.NODE);Pn(r,"title").text(t.node.name)}}function Qcr(e,t){let r=t.node.name.split("/"),n=r[r.length-1];return Gle(e,n,t,null)}function Gle(e,t,r,n){let i=ye.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 Fle(o,-1,Z4.Annotation.LABEL)}function tur(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!==_i.SUMMARY&&r.annotationType!==_i.CONSTANT&&e.on("contextmenu",Ylt(n,zle(r.node,n)))}function eur(e,t,r,n){let i=v0(t);r.renderNodeInfo&&r.annotationType!==_i.ELLIPSIS&&s3(e,r.renderNodeInfo,n,ye.Annotation.NODE),r.annotationType===_i.SUMMARY&&(r.width+=10),e.select("text."+ye.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),MH(e.select("."+ye.Annotation.NODE+" ellipse"),i+r.dx,t.y+r.dy,r.width,r.height),zd(e.select("."+ye.Annotation.NODE+" rect"),i+r.dx,t.y+r.dy,r.width,r.height),zd(e.select("."+ye.Annotation.NODE+" use"),i+r.dx,t.y+r.dy,r.width,r.height),e.select("path."+ye.Annotation.EDGE).transition().attr("d",o=>{let a=o.points.map(s=>({x:s.dx+i,y:s.dy+t.y}));return TH(a)})}function rct(e,t,r,n){n=n||ye.Scene.GROUP;let i=m0(e,"g",n).empty(),o=Pn(e,"g",n),a=Pn(o,"g",ye.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(),kle(a,t.coreGraph,r),AH(a,s,r),t.isolatedInExtract.length>0){let l=Pn(o,"g",ye.Scene.INEXTRACT);AH(l,t.isolatedInExtract,r)}else m0(o,"g",ye.Scene.INEXTRACT).remove();if(t.isolatedOutExtract.length>0){let l=Pn(o,"g",ye.Scene.OUTEXTRACT);AH(l,t.isolatedOutExtract,r)}else m0(o,"g",ye.Scene.OUTEXTRACT).remove();if(t.libraryFunctionsExtract.length>0){let l=Pn(o,"g",ye.Scene.FUNCTION_LIBRARY);AH(l,t.libraryFunctionsExtract,r)}else m0(o,"g",ye.Scene.FUNCTION_LIBRARY).remove();return Mle(o,t),i&&o.attr("opacity",0).transition().attr("opacity",1),o}var rur=.8,kH=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,Xh.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)<rur?this.minimap.classList.remove("hidden"):this.minimap.classList.add("hidden")}};var ict=class extends mt{init(t,r,n,i,o){return new kH(t,r,n,this,i,o)}};ict.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>
  `;ict=E([yt("tf-graph-minimap")],ict);var Wle=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: white;
    }
    /* 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){Sle(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(),IH(this.$.svg)}_build(t){this.templateIndex=t.hierarchy.getTemplateIndex(),Rd("tf-graph-scene (layout):",function(){SH(t.root)}.bind(this),jr.RENDER_SCENE_LAYOUT),Rd("tf-graph-scene (build scene):",function(){rct(Ht(this.$.root),t.root,this),Ele(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=tR().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(),dP.each(this._nodeGroupIndex,(t,r)=>{this._updateNodeState(r)}),this.minimap.update())}fit(){this._hasRenderHierarchyBeenFitOnce=!0,wle(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;Ale(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=Sa+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);dP.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;dP.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(){Vle(this.getGraphSvgRoot(),this.renderHierarchy,this.selectedNode,this.traceInputs)}};Lr.template=Wle;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&&(ele(this.basicGraph,t,r),lle(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=Rd("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:oct.map(i.deviceColorMap.domain(),function(a){return{device:a,color:i.deviceColorMap(a)}}),xla_cluster:oct.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(Dd.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=rP(this),n=JS(r,100,"Namespace hierarchy");let i=Mx(Kl({},this.hierarchyParams),{seriesMap:this.graphHierarchy.buildSeriesGroupMapToggled(t)});xH(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",os)],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=hP}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=Xse(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=mle(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 act={};Ks(act,{GraphIconType:()=>nv});var nv;(function(e){e.CONST="CONST",e.META="META",e.OP="OP",e.SERIES="SERIES",e.SUMMARY="SUMMARY"})(nv||(nv={}));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 nv.META:return Ku.DEFAULT_FILL;case nv.SERIES:return Ult.DEFAULT_FILL;default:return y0.DEFAULT_FILL}}get _stroke(){var t=this.type,r=this.strokeOverride;if(r!=null)return r;switch(t){case nv.META:return Ku.DEFAULT_STROKE;case nv.SERIES:return Ult.DEFAULT_STROKE;default:return y0.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 Bs=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?LH(i,n,r,!1):o}_getStrokeOverride(t){return t?ect(t):null}_getType(t,r,n,i){let{GraphIconType:o}=act;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&&IH(this.$.icon.getSvgDefinableElement()),n&&i&&a&&LH(a,o,i,!1,this.$.icon.getSvgDefinableElement())}};Bs.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)],Bs.prototype,"node",void 0);E([A({type:Object}),w("design:type",Object)],Bs.prototype,"renderInfo",void 0);E([A({type:Object}),w("design:type",String)],Bs.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Bs.prototype,"templateIndex",void 0);E([A({type:String}),w("design:type",Object)],Bs.prototype,"type",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"vertical",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"const",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"summary",void 0);E([A({type:String}),w("design:type",Object)],Bs.prototype,"fill",void 0);E([A({type:Number}),w("design:type",Number)],Bs.prototype,"height",void 0);E([A({type:String,computed:"_computeFillOverride(node, renderInfo, colorBy, templateIndex, fill)",observer:"_onFillOverrideChanged"}),w("design:type",String)],Bs.prototype,"_fillOverride",void 0);Bs=E([yt("tf-node-icon")],Bs);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 as=class extends Gt(_o(mt)){constructor(){super(...arguments),this._expanded=!0,this._opCompatColor=y0.COMPATIBLE,this._opIncompatColor=y0.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")),cle(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(Dd.TEMPLATES_UPDATED,()=>{this._templateIndex=this.graphHierarchy.getTemplateIndex()})}};as.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",os)],as.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",lo)],as.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"nodeTitle",void 0);E([A({type:Boolean}),w("design:type",Boolean)],as.prototype,"_expanded",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"_opCompatColor",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"_opIncompatColor",void 0);E([A({type:Object}),w("design:type",Object)],as.prototype,"_templateIndex",void 0);E([Rt("graphHierarchy"),w("design:type",Array),w("design:paramtypes",[])],as.prototype,"_incompatibleOpNodes",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],as.prototype,"_opCompatScore",null);E([Rt("_opCompatScore"),w("design:type",String),w("design:paramtypes",[])],as.prototype,"_opCompatScoreLabel",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],as.prototype,"_totalIncompatOps",null);E([Bt("graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],as.prototype,"_graphHierarchyChanged",null);as=E([yt("tf-graph-op-compat-card")],as);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 mH(t)}get _nodeStatsFormattedBytes(){var t=this._nodeStats;if(!(!t||!t.totalBytes))return Nd(t.totalBytes,nP)}get _nodeStatsFormattedComputeTime(){var t=this._nodeStats;if(!(!t||!t.getTotalMicros()))return Nd(t.getTotalMicros(),iP)}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===Qse?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:jlt(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:Xlt(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",tct(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",_H(t))}_toggleGroup(){var t=PH(this._node);this.fire("node-toggle-seriesgroup",{name:t})}_isLibraryFunction(t){return t&&t.name.startsWith(Sa)}_isInSeries(t){return Qlt(t)}_graphHierarchyChanged(){this._templateIndex=this.graphHierarchy.getTemplateIndex(),this.graphHierarchy.addListener(Dd.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",os)],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 ss=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}};ss.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)],ss.prototype,"title",void 0);E([A({type:Object}),w("design:type",os)],ss.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],ss.prototype,"graph",void 0);E([A({type:Object}),w("design:type",lo)],ss.prototype,"renderHierarchy",void 0);E([A({type:Object}),w("design:type",Object)],ss.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ss.prototype,"healthPillStepIndex",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"colorBy",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"compatNodeTitle",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ss.prototype,"selectedNode",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ss.prototype,"highlightedNode",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ss.prototype,"selectedNodeInclude",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ss.prototype,"debuggerDataEnabled",void 0);ss=E([yt("tf-graph-info")],ss);var iur={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}=iur;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",os)],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(Sa)==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 Yle(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 mP=Ee(Oe(),1);var jle=Ee(Oe(),1);var Il=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})}};Il.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)],Il.prototype,"renderHierarchy",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Il.prototype,"selectedNode",void 0);E([A({type:String}),w("design:type",String)],Il.prototype,"_rawRegexInput",void 0);E([A({type:String}),w("design:type",String)],Il.prototype,"_previousRegexInput",void 0);E([A({type:Number}),w("design:type",Number)],Il.prototype,"_searchTimeoutDelay",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Il.prototype,"_searchPending",void 0);E([A({type:Number}),w("design:type",Number)],Il.prototype,"_maxRegexResults",void 0);E([A({type:Array}),w("design:type",Array)],Il.prototype,"_regexMatches",void 0);E([Rt("renderHierarchy","_rawRegexInput"),w("design:type",String),w("design:paramtypes",[])],Il.prototype,"_regexInput",null);E([Bt("_regexInput"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Il.prototype,"_regexInputChanged",null);Il=E([yt("tf-graph-node-search")],Il);var cct=/device:([^:]+:[0-9]+)$/,lct=[{regex:cct}],Xle=[],our=new Set([Gn.COMPUTE_TIME,Gn.MEMORY]),In=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=Fs.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=mP.each(t.dev_stats,function(i){var o=mP.some(lct,function(s){return s.regex.test(i.device)}),a=mP.some(Xle,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=>lct.some(l=>l.regex.test(s))),a=Flt(o);if(a.length==1){let s=a[0].match(cct);s&&(a[0]=s[1])}return o.map((s,l)=>{let c=null;return Xle.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 our.has(r)&&t!=null}_equals(t,r){return t===r}get _currentDeviceParams(){var t=this.colorByParams;let r=t.device.filter(o=>lct.some(a=>a.regex.test(o.device))),n=Flt(r.map(o=>o.device));if(n.length==1){var i=n[0].match(cct);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=Nd(i,nP),o=Nd(o,nP)):r===Gn.COMPUTE_TIME&&(i=Nd(i,iP),o=Nd(o,iP)),{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 Fs.OP_GRAPH;let i=t[r];return i.tags[n].profile?Fs.PROFILE:i.tags[n].conceptualGraph?Fs.CONCEPTUAL_GRAPH:Fs.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}};In.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: #266236;
        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)],In.prototype,"stats",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],In.prototype,"devicesForStats",void 0);E([A({type:String,notify:!0}),w("design:type",String)],In.prototype,"colorBy",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],In.prototype,"colorByParams",void 0);E([A({type:Array,observer:"_datasetsChanged"}),w("design:type",Object)],In.prototype,"datasets",void 0);E([A({type:Object}),w("design:type",lo)],In.prototype,"renderHierarchy",void 0);E([A({type:Object,notify:!0,readOnly:!0,computed:"_computeSelection(datasets, _selectedRunIndex, _selectedTagIndex, _selectedGraphType)"}),w("design:type",Object)],In.prototype,"selection",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],In.prototype,"selectedFile",void 0);E([A({type:Number,observer:"_selectedRunIndexChanged"}),w("design:type",Number)],In.prototype,"_selectedRunIndex",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],In.prototype,"traceInputs",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],In.prototype,"autoExtractNodes",void 0);E([A({type:Number,observer:"_selectedTagIndexChanged"}),w("design:type",Number)],In.prototype,"_selectedTagIndex",void 0);E([A({type:String}),w("design:type",String)],In.prototype,"_selectedGraphType",void 0);E([A({type:String,notify:!0}),w("design:type",String)],In.prototype,"selectedNode",void 0);E([A({type:Boolean}),w("design:type",Boolean)],In.prototype,"showSessionRunsDropdown",void 0);E([A({type:Boolean}),w("design:type",Boolean)],In.prototype,"showUploadButton",void 0);E([A({type:Boolean}),w("design:type",Boolean)],In.prototype,"healthPillsFeatureEnabled",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],In.prototype,"healthPillsToggledOn",void 0);E([A({type:Boolean}),w("design:type",Boolean)],In.prototype,"_legendOpened",void 0);E([Rt("devicesForStats"),w("design:type",Array),w("design:paramtypes",[])],In.prototype,"_currentDevices",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],In.prototype,"_currentDeviceParams",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],In.prototype,"_currentXlaClusterParams",null);E([Rt("colorByParams","colorBy"),w("design:type",Object),w("design:paramtypes",[])],In.prototype,"_currentGradientParams",null);In=E([yt("tf-graph-controls")],In);function aur(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 $le(e){return new Promise((t,r)=>{fetch(e).then(n=>{n.ok?n.arrayBuffer().then(t,r):n.text().then(r,r)})})}function Kle(e,t){return Yse("Reading metadata pbtxt",40,()=>e==null?Promise.resolve(null):$le(e),t,jr.FETCH_METADATA_PBTXT_BYTES).then(r=>dH("Parsing metadata.pbtxt",60,()=>r!=null?hur(r):Promise.resolve(null),t,jr.PARSE_METADATA_PBTXT_INTO_OBJECT))}function Zle(e,t,r){return dH("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 $le(e);return Po({timingId:jr.FETCH_PBTXT_BYTES_FROM_SERVER,eventValue:Date.now()-n}),i}),r,jr.FETCH_PBTXT_BYTES).then(n=>dH("Parsing graph.pbtxt",60,()=>uur(n),r,jr.PARSE_PBTXT_INTO_OBJECT))}function sur(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 lur={"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},cur={"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 uur(e){return Jle(e,lur)}function hur(e){return Jle(e,cur).then(t=>t.step_stats)}function Jle(e,t){let r={},n=[],i=[],o=r;function a(l){let c=l.indexOf(":"),u=l.substring(0,c).trim(),h=aur(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 sur(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 tce(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 Zle(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 nle(c,rle,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*(){Yle(c,n);let u=yield xH(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 Hs=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 Fs.OP_GRAPH:case Fs.CONCEPTUAL_GRAPH:{(function(){this._setOutStats(null)}).bind(this)();let o=new URLSearchParams;o.set("run",r),o.set("conceptual",String(i===Fs.CONCEPTUAL_GRAPH)),n&&o.set("tag",n);let a=ve().pluginRoute("graphs","/graph",o);return this._fetchAndConstructHierarchicalGraph(a).then(()=>{this._graphRunTag={run:r,tag:n}})}case Fs.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:Fs.OP_GRAPH}):Promise.resolve(),u=new URLSearchParams;u.set("tag",n),u.set("run",r);let h=ve().pluginRoute("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=rP(this);Kle(t,r).then(function(n){this._setOutStats(n)}.bind(this))}_fetchAndConstructHierarchicalGraph(t,r){this.set("progress",{value:0,msg:""});let n=rP(this);return tce(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)],Hs.prototype,"datasets",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Hs.prototype,"progress",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"selection",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"selectedFile",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"compatibilityProvider",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"hierarchyParams",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",os)],Hs.prototype,"outGraphHierarchy",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Xu)],Hs.prototype,"outGraph",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Object)],Hs.prototype,"outStats",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"_graphRunTag",void 0);E([Bt("selection","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hs.prototype,"_selectionChanged",null);E([Bt("selectedFile","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hs.prototype,"_selectedFileChanged",null);Hs=E([yt("tf-graph-dashboard-loader")],Hs);var ece="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=y_(ece,{defaultValue:"",useLocalStorage:!1}).call(this),this._runObserver=v_(ece,{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(ve().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(ve().pluginRoute("graphs","/info"))}_fetchHealthPills(t,r){let n={node_names:JSON.stringify(t),run:"__debugger_data__"};r!==void 0&&(n.step=r);let i=ve().pluginRoute("debugger","/health_pills");return this._requestManager.request(i,n)}_fetchDebuggerNumericsAlerts(){return this._requestManager.request(ve().pluginRoute("debugger","/numerics_alert_report"))}_graphUrl(t,r,n){return ve().pluginRoute("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(xh).map(i=>{let o=r[i],s=Object.keys(o.tags).sort(xh).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 RH=Ee(Oe(),1);var kr=Vr,Ma=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,Pa=1/0,ho;Tt.attr("transform",function(cn,cx){var rp=Wi(cn);ho=cn;var K=rt(cn[i][rp][n]+cn[i][rp][o]/2),gt=W(cn[i][rp][a]),Et=c==="offset"?U(_(cn))-(S-gt):gt,xt=Math.abs(Nt[1]-Et);return xt<Pa&&(Pa=xt,Ar=cn),"translate("+K+","+gt+")"}),Tt.select("text").text(function(cn){var cx=Wi(cn);return cn[i][cx][a]}),Tt.classed("hover-closest",function(cn){return cn===Ar}),It.classed("outline-hover",function(cn){return cn===Ar});var Ia=Wi(ho);Ct.attr("transform",function(cn){return"translate("+rt(ho[i][Ia][n]+ho[i][Ia][o]/2)+", "+k+")"}).select("text").text(function(cn){return B(ho[i][Ia][n]+ho[i][Ia][o]/2)});var lx=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 lx(_(Ar))});var cm=Mt.tickFormat();Ce.attr("transform",function(cn){return"translate("+P+", "+(c==="offset"?0:W(Ar[i][Ia][a]))+")"}).style("display",c==="offset"?"none":"").select("text").text(function(cn){return cm(Ar[i][Ia][a])});var J0=kr.mouse(ct);h.style("transform","translate("+(J0[0]+15)+"px,"+(J0[1]-15)+"px)").select("span").text(c==="offset"?cm(Ar[i][Ia][a]):(r==="step"?"step ":"")+lx(_(Ar)))}}};Ma.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)],Ma.prototype,"mode",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"timeProperty",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"bins",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"x",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"dx",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"y",void 0);E([A({type:Object}),w("design:type",Object)],Ma.prototype,"colorScale",void 0);E([A({type:Number}),w("design:type",Number)],Ma.prototype,"modeTransitionDuration",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ma.prototype,"_attached",void 0);E([A({type:String}),w("design:type",Object)],Ma.prototype,"_name",void 0);E([A({type:Array}),w("design:type",Object)],Ma.prototype,"_data",void 0);E([Bt("timeProperty","colorScale","_attached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ma.prototype,"_redrawOnChange",null);E([Bt("mode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ma.prototype,"_modeRedraw",null);Ma=E([yt("vz-histogram-timeseries")],Ma);function pur(e){let[t,r,n]=e;return{wall_time:t,step:r,min:Lm(n.map(([i,,])=>i)),max:lu(n.map(([,i])=>i)),buckets:n.map(([i,o,a])=>({left:i,right:o,count:a}))}}function dur(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 rce(e){let t=e.map(pur),r=Lm(t,i=>i.min),n=lu(t,i=>i.max);return t.map(i=>({wall_time:i.wall_time,step:i.step,bins:dur(i,r,n)}))}var Ea=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=ve().pluginRoute("histograms","/histograms");Promise.all(t.map(a=>{let s=Cn(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=rce(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()}};Ea.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)],Ea.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Ae)],Ea.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"tagMetadata",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,"histogramMode",void 0);E([A({type:Object}),w("design:type",Function)],Ea.prototype,"_colorScaleFunction",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Ea.prototype,"_expanded",void 0);E([Bt("run","tag","requestManager"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_reloadOnRunTagRequestManagerChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Ea.prototype,"_runColor",null);Ea=E([yt("tf-histogram-loader")],Ea);var ls=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=ve().pluginRoute("histograms","/tags");return this._requestManager.request(t).then(r=>{if(RH.isEqual(r,this._runToTagInfo))return;let n=RH.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]}};ls.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)],ls.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_histogramMode",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_timeProperty",void 0);E([A({type:Array}),w("design:type",Array)],ls.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ls.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],ls.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_restamp",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],ls.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],ls.prototype,"_categories",null);ls=E([yt("tf-histogram-dashboard")],ls);var u3=class{constructor(t,r,n=!0){this._apiUrl=t,this._requestManager=r,this._useHttpGet=n}getExperiment(t){return this._sendRequest("experiment",t)}getDownloadUrl(t,r,n){return this._apiUrl+"/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=encodeURIComponent(JSON.stringify(r)),a=this._apiUrl+"/"+t+"?request="+o;return this._requestManager.request(a)}let n=new Ux;n.withCredentials=!0,n.methodType=Am.POST,n.contentType="text/plain",n.body=JSON.stringify(r);let i=this._apiUrl+"/"+t;return this._requestManager.requestWithOptions(i,n)}};var fce=Ee(Oe(),1);var NH=class extends mt{constructor(){super(...arguments),this.orientation="horizontal"}};NH.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)],NH.prototype,"orientation",void 0);NH=E([yt("hparams-split-layout")],NH);var cs={};Ks(cs,{columnValueByIndex:()=>x0,columnValueByVisibleIndex:()=>FH,euclideanDist:()=>h3,filterSet:()=>Mur,getAbsoluteColumnIndex:()=>OH,hashOfString:()=>mct,hparamName:()=>Fd,hparamValueByIndex:()=>ace,hparamValueByName:()=>oce,hparamValueByVisibleIndex:()=>uce,isNullOrUndefined:()=>bur,l2NormSquared:()=>p3,metricName:()=>Qu,metricValueByIndex:()=>sce,metricValueByName:()=>f3,metricValueByVisibleIndex:()=>zH,numColumns:()=>hct,numHParams:()=>nce,numMetrics:()=>ice,numVisibleColumns:()=>_ur,numVisibleHParams:()=>lce,numVisibleMetrics:()=>cce,numericColumnExtent:()=>fct,pointToRectangleDist:()=>hce,prettyPrint:()=>b0,prettyPrintHParamValueByName:()=>yur,prettyPrintMetricValueByName:()=>vur,quadTreeVisitPointsInDisk:()=>Sur,quadTreeVisitPointsInRect:()=>wur,rotateStr:()=>xur,schemaColumnName:()=>uct,schemaVisibleColumnName:()=>gur,sessionGroupWithName:()=>pct,setArrayObservably:()=>dct,translateStr:()=>_P,visibleNumericColumnExtent:()=>gP});var DH=Ee(Oe(),1);function Fd(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===""?r:t+"."+r}function uct(e,t){if(t<e.hparamColumns.length)return Fd(e.hparamColumns[t].hparamInfo);let r=t-e.hparamColumns.length;return Qu(e.metricColumns[r].metricInfo)}function nce(e){return e.hparamColumns.length}function ice(e){return e.metricColumns.length}function hct(e){return nce(e)+ice(e)}function oce(e,t){return e[t]}function f3(e,t){return e.find(r=>DH.isEqual(r.name,t))}function ace(e,t,r){return t.hparams[e.hparamColumns[r].hparamInfo.name]}function sce(e,t,r){let n=e.metricColumns[r].metricInfo.name,i=f3(t.metricValues,n);return i===void 0?void 0:i.value}function x0(e,t,r){return r<e.hparamColumns.length?ace(e,t,r):sce(e,t,r-e.hparamColumns.length)}function fct(e,t,r){return aa(t,n=>x0(e,n,r))}function OH(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 gur(e,t){if(t<e.hparamInfos.length)return Fd(e.hparamInfos[t]);let r=t-e.hparamInfos.length;return Qu(e.metricInfos[r])}function lce(e){return e.hparamInfos.length}function cce(e){return e.metricInfos.length}function _ur(e){return lce(e)+cce(e)}function gP(e,t,r){return aa(t,n=>FH(e,n,r))}function yur(e,t){return b0(oce(e,t))}function vur(e,t){return b0(f3(e,t))}function pct(e,t){return e.find(r=>r.name===t)}function uce(e,t,r){return t.hparams[e.hparamInfos[r].name]}function zH(e,t,r){let n=e.metricInfos[r].name,i=f3(t.metricValues,n);return i===void 0?void 0:i.value}function FH(e,t,r){return r<e.hparamInfos.length?uce(e,t,r):zH(e,t,r-e.hparamInfos.length)}function b0(e){return DH.isNumber(e)?e.toPrecision(5):e===void 0?"":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 hce(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 _P(e,t){return t===void 0?"translate("+e+")":"translate("+e+","+t+")"}function xur(e,t,r){let n="rotate("+e;return t!==void 0&&r!==void 0&&(n=n+","+t+","+r),n=n+")",n}function bur(e){return e==null}function wur(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 Sur(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 hce(t,r,a,s,l,c)>n})}function Mur(e,t){let r=new Set;return e.forEach(n=>{t(n)&&r.add(n)}),r}function dct(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 mct(e){let t=0;for(let r=0;r<e.length;++r)t=t*31+e.charCodeAt(r)&4294967295;return t+EI(2,31)}var ti=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._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=Fd,this._metricName=Qu,this._prettyPrint=b0}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=cs;if(t.isNullOrUndefined(this.backend)||t.isNullOrUndefined(this.experimentName))return;let r={experimentName:this.experimentName};this.backend.getExperiment(r).then(n=>{fce.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._experiment.metricInfos&&this._experiment.metricInfos.length>0);this.set("dataLoadedWithNonEmptyHparams",t),this.set("dataLoadedWithEmptyHparams",!t)}_computeHParams(){let t=[];this._experiment.hparamInfos.forEach((n,i)=>{let o={info:n,displayed:i<5,filter:{}};o.info.hasOwnProperty("domainDiscrete")?(o.filter.domainDiscrete=[],o.info.domainDiscrete.forEach(a=>{o.filter.domainDiscrete.push({value:a,checked:!0})})):o.info.type==="DATA_TYPE_BOOL"?o.filter.domainDiscrete=[{value:!1,checked:!0},{value:!0,checked:!0}]:o.info.type==="DATA_TYPE_FLOAT64"?o.filter.interval={min:{value:"",invalid:!1},max:{value:"",invalid:!1}}:o.info.type==="DATA_TYPE_STRING"?o.filter.regexp="":console.warn("unknown hparam.info.type: %s",o.info.type),t.push(o)}),this.set("_hparams",t)}_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}}_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");dct(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(u){let h=t.get(u+".min.value");console.assert(h!==void 0);let f=h===""?"-Infinity":+h;t.set(u+".min.invalid",isNaN(f)),r=r&&!isNaN(f);let p=t.get(u+".max.value");console.assert(p!==void 0);let d=p===""?"Infinity":+p;return t.set(u+".max.invalid",isNaN(d)),r=r&&!isNaN(d),isNaN(f)||isNaN(d)?null:{minValue:f,maxValue:d}}function i(u){let h=t.get(u+".value");console.assert(h!==void 0);let f=+h,p=Number.isInteger(f)&&f>0;return t.set(u+".invalid",!p),r=r&&p,p?f:null}let o=this._statuses.filter(u=>u.allowed).map(u=>u.value),a=[];if(this._hparams.forEach((u,h)=>{let f={hparam:u.info.name};u.filter.domainDiscrete?(f.filterDiscrete=[],u.filter.domainDiscrete.forEach(p=>{p.checked&&f.filterDiscrete.push(p.value)})):u.filter.interval?f.filterInterval=n("_hparams."+h+".filter.interval"):u.filter.regexp&&(f.filterRegexp=u.filter.regexp),a.push(f)}),this._metrics.forEach((u,h)=>{let f={metric:u.info.name,filterInterval:n("_metrics."+h+".filter.interval")};a.push(f)}),this._sortByIndex!==void 0&&this._sortDirection!==void 0){if(!(this._sortByIndex in a))return console.error("No column in colParams with index sortByIndex: %s",this._sortByIndex),null;a[this._sortByIndex].order=this._sortDirection===0?"ORDER_ASC":"ORDER_DESC"}let s=i("_pageNumberInput")||0,l=i("_pageSizeInput")||0;if(!r)return null;let c=l*(s-1);return{experimentName:this.experimentName,allowedStatuses:o,colParams:a,startIndex:c,sliceSize:l}}_metricSortByIndex(t){return t+this._hparams.length}};ti.template=Q`
    <hparams-split-layout orientation="vertical">
      <div slot="content" class="section hyperparameters">
        <div class="section-title">Hyperparameters</div>
        <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="[[hparam.filter.regexp]]">
              <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;
      }
      .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)],ti.prototype,"experimentName",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],ti.prototype,"configuration",void 0);E([A({type:Array,notify:!0}),w("design:type",Object)],ti.prototype,"sessionGroups",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],ti.prototype,"dataLoadedWithNonEmptyHparams",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],ti.prototype,"dataLoadedWithEmptyHparams",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_experiment",void 0);E([A({type:Array}),w("design:type",Array)],ti.prototype,"_hparams",void 0);E([A({type:Array}),w("design:type",Array)],ti.prototype,"_metrics",void 0);E([A({type:Array}),w("design:type",Object)],ti.prototype,"_statuses",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_getExperimentResolved",void 0);E([A({type:Object}),w("design:type",Function)],ti.prototype,"_resolveGetExperiment",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_listSessionGroupsCanceller",void 0);E([A({type:Number}),w("design:type",Number)],ti.prototype,"_sortByIndex",void 0);E([A({type:Number}),w("design:type",Number)],ti.prototype,"_sortDirection",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_pageSizeInput",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_pageNumberInput",void 0);E([A({type:String}),w("design:type",String)],ti.prototype,"_pageCountStr",void 0);E([A({type:String}),w("design:type",String)],ti.prototype,"_totalSessionGroupsCountStr",void 0);E([A({type:Object}),w("design:type",Object)],ti.prototype,"_sessionGroupsRequest",void 0);E([Bt("backend","experimentName"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ti.prototype,"_computeExperimentAndRelatedProps",null);E([Bt("_hparams.*","_metrics.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ti.prototype,"_updateConfiguration",null);ti=E([yt("tf-hparams-query-pane")],ti);var qct=Ee(Oe(),1);var gct=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0;var iv=(e,t,r=null)=>{for(;t!==r;){let n=t.nextSibling;e.removeChild(t),t=n}};var Yc=`{{lit-${String(Math.random()).slice(2)}}}`,_ct=`<!--${Yc}-->`,pce=new RegExp(`${Yc}|${_ct}`),d3="$lit$",ov=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++)dce(f[g].name,d3)&&d++;for(;d-- >0;){let g=c[l],_=BH.exec(g)[2],y=_.toLowerCase()+d3,x=h.getAttribute(y);h.removeAttribute(y);let b=x.split(pce);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(pce),g=d.length-1;for(let _=0;_<g;_++){let y,x=d[_];if(x==="")y=Yf();else{let b=BH.exec(x);b!==null&&dce(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(Yf(),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(Yf(),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)}},dce=(e,t)=>{let r=e.length-t.length;return r>=0&&e.slice(r)===t},yP=e=>e.index!==-1,Yf=()=>document.createComment(""),BH=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var yct=133;function vct(e,t){let{element:{content:r},parts:n}=e,i=document.createTreeWalker(r,yct,null,!1),o=vP(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=vP(n,o),a=n[o]}c.forEach(h=>h.parentNode.removeChild(h))}var Eur=e=>{let t=e.nodeType===11?0:1,r=document.createTreeWalker(e,yct,null,!1);for(;r.nextNode();)t++;return t},vP=(e,t=-1)=>{for(let r=t+1;r<e.length;r++){let n=e[r];if(yP(n))return r}return-1};function mce(e,t,r=null){let{element:{content:n},parts:i}=e;if(r==null){n.appendChild(t);return}let o=document.createTreeWalker(n,yct,null,!1),a=vP(i),s=0,l=-1;for(;o.nextNode();)for(l++,o.currentNode===r&&(s=Eur(t),r.parentNode.insertBefore(t,r));a!==-1&&i[a].index===l;){if(s>0){for(;a!==-1;)i[a].index+=s,a=vP(i,a);return}a=vP(i,a)}}var Tur=new WeakMap;var av=e=>typeof e=="function"&&Tur.has(e);var Ll={},HH={};var w0=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=gct?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],!yP(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 gct&&(document.adoptNode(t),customElements.upgrade(t)),t}};var gce=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Aur=` ${Yc} `,S0=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=BH.exec(o);s===null?r+=o+(n?Aur:_ct):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 gce!==void 0&&(r=gce.createHTML(r)),t.innerHTML=r,t}};var qH=e=>e===null||!(typeof e=="object"||typeof e=="function"),VH=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 xP(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"||!VH(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(qH(s)||!VH(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()))}},xP=class{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==Ll&&(!qH(t)||t!==this.value)&&(this.value=t,av(t)||(this.committer.dirty=!0))}commit(){for(;av(this.value);){let t=this.value;this.value=Ll,t(this)}this.value!==Ll&&this.committer.commit()}},Bd=class{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(Yf()),this.endNode=t.appendChild(Yf())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=Yf()),t.__insert(this.endNode=Yf())}insertAfterPart(t){t.__insert(this.startNode=Yf()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(this.startNode.parentNode===null)return;for(;av(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=Ll,r(this)}let t=this.__pendingValue;t!==Ll&&(qH(t)?t!==this.value&&this.__commitText(t):t instanceof S0?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):VH(t)?this.__commitIterable(t):t===HH?(this.value=HH,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 w0&&this.value.template===r)this.value.update(t.values);else{let n=new w0(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 Bd(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){iv(this.startNode.parentNode,t.nextSibling,this.endNode)}},bP=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(;av(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=Ll,r(this)}if(this.__pendingValue===Ll)return;let t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=Ll}},wP=class extends m3{constructor(t,r,n){super(t,r,n),this.single=n.length===2&&n[0]===""&&n[1]===""}_createPart(){return new UH(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}},UH=class extends xP{},_ce=!1;(()=>{try{let e={get capture(){return _ce=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();var SP=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(;av(this.__pendingValue);){let o=this.__pendingValue;this.__pendingValue=Ll,o(this)}if(this.__pendingValue===Ll)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=Pur(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=Ll}handleEvent(t){typeof this.value=="function"?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}},Pur=e=>e&&(_ce?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);function xct(e){let t=sv.get(e.type);t===void 0&&(t={stringsArray:new WeakMap,keyString:new Map},sv.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 ov(e,e.getTemplateElement()),t.keyString.set(n,r)),t.stringsArray.set(e.strings,r),r}var sv=new Map;var M0=new WeakMap,bct=(e,t,r)=>{let n=M0.get(t);n===void 0&&(iv(t,t.firstChild),M0.set(t,n=new Bd(Object.assign({templateFactory:xct},r))),n.appendInto(t)),n.setValue(e),n.commit()};var GH=class{handleAttributeExpressions(t,r,n,i){let o=r[0];return o==="."?new wP(t,r.slice(1),n).parts:o==="@"?[new SP(t,r.slice(1),i.eventContext)]:o==="?"?[new bP(t,r.slice(1),n)]:new m3(t,r,n).parts}handleTextExpression(t){return new Bd(t)}},yce=new GH;typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");var xce=(e,t)=>`${e}--${t}`,WH=!0;typeof window.ShadyCSS=="undefined"?WH=!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."),WH=!1);var kur=e=>t=>{let r=xce(t.type,e),n=sv.get(r);n===void 0&&(n={stringsArray:new WeakMap,keyString:new Map},sv.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();WH&&window.ShadyCSS.prepareTemplateDom(a,e),i=new ov(t,a),n.keyString.set(o,i)}return n.stringsArray.set(t.strings,i),i},Rur=["html","svg"],Nur=e=>{Rur.forEach(t=>{let r=sv.get(xce(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)}),vct(n,o)})})},bce=new Set,Dur=(e,t,r)=>{bce.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}Nur(e);let s=n.content;r?mce(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),vct(r,c)}},wce=(e,t,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let n=r.scopeName,i=M0.has(t),o=WH&&t.nodeType===11&&!!t.host,a=o&&!bce.has(n),s=a?document.createDocumentFragment():t;if(bct(e,s,Object.assign({templateFactory:kur(n)},r)),a){let l=M0.get(s);M0.delete(s);let c=l.value instanceof w0?l.value.template:void 0;Dur(n,s,c),iv(t,t.firstChild),t.appendChild(s),M0.set(t,l)}!i&&o&&window.ShadyCSS.styleElement(t.host)};var Sce;window.JSCompiler_renameProperty=(e,t)=>e;var Cct={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}},Mce=(e,t)=>t!==e&&(t===t||e===e),wct={attribute:!0,type:String,converter:Cct,reflect:!1,hasChanged:Mce},Sct=1,Mct=1<<2,Ect=1<<3,Tct=1<<4,Act="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=wct){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)||wct}static finalize(){let t=Object.getPrototypeOf(this);if(t.hasOwnProperty(Act)||t.finalize(),this[Act]=!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=Mce){return n(t,r)}static _propertyValueFromAttribute(t,r){let n=r.type,i=r.converter||Cct,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||Cct.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=wct){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|Ect,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._updateState=this._updateState&~Ect}}_attributeToProperty(t,r){if(this._updateState&Ect)return;let n=this.constructor,i=n._attributeToPropertyMap.get(t);if(i!==void 0){let o=n.getPropertyOptions(i);this._updateState=this._updateState|Tct,this[i]=n._propertyValueFromAttribute(r,o),this._updateState=this._updateState&~Tct}}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&Tct)&&(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|Mct;try{yield this._updatePromise}catch(r){}let t=this.performUpdate();return t!=null&&(yield t),!this._hasRequestedUpdate})}get _hasRequestedUpdate(){return this._updateState&Mct}get hasUpdated(){return this._updateState&Sct}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&Sct||(this._updateState=this._updateState|Sct,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Mct}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){}};Sce=Act;g3[Sce]=!0;var Ece=Element.prototype,yii=Ece.msMatchesSelector||Ece.webkitMatchesSelector;var YH=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pct=Symbol(),lv=class{constructor(t,r){if(r!==Pct)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return this._styleSheet===void 0&&(YH?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}},Ict=e=>new lv(String(e),Pct),Our=e=>{if(e instanceof lv)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+Our(i)+e[o+1],e[0]);return new lv(r,Pct)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var Tce={},MP=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&&!YH){let n=Array.prototype.slice.call(r.cssRules).reduce((i,o)=>i+o.cssText,"");return Ict(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):YH?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!==Tce&&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 Tce}};MP.finalized=!0;MP.render=wce;MP.shadowRootOptions={mode:"open"};var Cce=0,Lct={},jc=(e,t,r)=>{let n=r&&r.moduleId||`custom-style-module-${Cce++}`;Array.isArray(t)||(t=t?[t]:[]),t.forEach(a=>{if(!(a instanceof lv))throw new Error("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");if(!Lct[a]){let s=document.createElement("dom-module");s.innerHTML=`
        <template>
          <style>${a.toString()}</style>
        </template>
      `;let l=`custom-style-module-${Cce++}`;s.register(l),Lct[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=${Lct[a]}></style>`)}
    </template>
  `,i.register(n)};var kct=class extends HTMLElement{static get version(){return"20.0.2"}};customElements.define("vaadin-lumo-styles",kct);var zur=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;
  }
`,Ace=document.createElement("template");Ace.innerHTML=`<style>${zur.toString().replace(":host","html")}</style>`;document.head.appendChild(Ace.content);var Fur=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("",Fur,{moduleId:"lumo-color"});var Bur=Ci`
  :host {
    color: var(--lumo-body-text-color) !important;
    background-color: var(--lumo-base-color) !important;
  }
`;jc("",Bur,{moduleId:"lumo-color-legacy",include:["lumo-color"]});var Pce=document.createElement("template");Pce.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(Pce.content);var Hur=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);
  }
`,Ice=document.createElement("template");Ice.innerHTML=`<style>${Hur.toString().replace(":host","html")}</style>`;document.head.appendChild(Ice.content);var Vur=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);
  }
`,Lce=document.createElement("template");Lce.innerHTML=`<style>${Vur.toString().replace(":host","html")}</style>`;document.head.appendChild(Lce.content);var Uur=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;
  }
`,kce=document.createElement("template");kce.innerHTML=`<style>${Uur.toString().replace(":host","html")}</style>`;document.head.appendChild(kce.content);var qur=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;
  }
`,Rce=document.createElement("template");Rce.innerHTML=`<style>${qur.toString().replace(":host","html")}</style>`;document.head.appendChild(Rce.content);var Gur=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("",Gur,{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 Nce=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 jH=e=>class extends Nce(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 Rct=!1;window.addEventListener("keydown",()=>{Rct=!0},{capture:!0});window.addEventListener("mousedown",()=>{Rct=!1},{capture:!0});var Wur=e=>class extends e{static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}}}},Dce=e=>class extends Wur(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&&Rct?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 Yur=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,XH=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function jur(){function e(){return!0}return Oce(e)}function Xur(){try{return $ur()?!0:Kur()?XH?!Zur():!jur():!1}catch(e){return!1}}function $ur(){return localStorage.getItem("vaadin.developmentmode.force")}function Kur(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Zur(){return!!(XH&&Object.keys(XH).map(t=>XH[t]).filter(t=>t.productionMode).length>0)}function Oce(e,t){if(typeof e!="function")return;let r=Yur.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 Nct=function(e,t){if(window.Vaadin.developmentMode)return Oce(e,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Xur());function Jur(){}var zce=function(){if(typeof Nct=="function")return Nct(Jur)};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 E0=[],Qur=function(){let e=Oct();E0.forEach(t=>{Dct(t,e)})},$H,thr=new MutationObserver(Qur);thr.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var Dct=function(e,t,r=e.getAttribute("dir")){t?e.setAttribute("dir",t):r!=null&&e.removeAttribute("dir")},Oct=function(){return document.documentElement.getAttribute("dir")},KH=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0}}}static finalize(){super.finalize(),$H||($H=_3.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Dct(this,Oct(),null))}attributeChangedCallback(r,n,i){if(super.attributeChangedCallback(r,n,i),r!=="dir")return;let o=Oct(),a=i===o&&E0.indexOf(this)===-1,s=!i&&n&&E0.indexOf(this)===-1;a||s?(this.__subscribe(),Dct(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?E0.indexOf(this)===-1&&E0.push(this):E0.indexOf(this)>-1&&E0.splice(E0.indexOf(this),1)}__getNormalizedScrollLeft(r){return _3.getNormalizedScrollLeft($H,this.getAttribute("dir")||"ltr",r)}__setNormalizedScrollLeft(r,n){return _3.setNormalizedScrollLeft($H,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(){zce()};var zct,Fce=new Set,ZH=e=>class extends KH(e){static finalize(){super.finalize();let{is:r}=this;r&&!Fce.has(r)&&(window.Vaadin.registrations.push(this),Fce.add(r),window.Vaadin.developmentModeCallback&&(zct=sr.debounce(zct,kx,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),Jl(zct)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};var JH=class extends ZH(Dce(jH(yh(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(JH.is,JH);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 Bce=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),ehr=Bce&&Bce[1]>=8,Hce=3,Vce=u9({behaviors:[Js,y9],_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),ci)}},_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,Hce,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),ci))}},_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(Hce))},_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;ui();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;!ehr&&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||(ui(),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 QH=class extends Vce{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 Tm(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(),ui()}};var Uce=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 qce=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 rhr(r)}},rhr=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 Gce=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(/\.[^.]*$/,"");Da.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(Da.get(i.path,r),Da.get(i.path,n)):i.direction==="desc"?this._compare(Da.get(i.path,n),Da.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(Da.get(i.path,n)),a=this._normalizeEmptyValue(i.value).toString().toLowerCase();return o.toString().toLowerCase().indexOf(a)===-1}).length===0)}};var Wce=e=>class extends yh(e){ready(){super.ready();let r=this.$.scroller;Em(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 Yce=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}}},Xce=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 Yce(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 Yce(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 $ce=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 vh.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=vh.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 vh(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 Kce=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 Zce=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 T0=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(T0.is,T0);var Jce=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 T0;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)),ui(),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 Fct={SCROLLING:500,IGNORE_WHEEL:500},Qce=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(),Fct.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(Fct.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(Fct.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,ci,()=>{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 tue=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 eue=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 rue=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 EP={BETWEEN:"between",ON_TOP:"on-top",ON_TOP_OR_BETWEEN:"on-top-or-between",ON_GRID:"on-grid"},C0={ON_TOP:"on-top",ABOVE:"above",BELOW:"below",EMPTY:"empty"},nue=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===EP.ON_GRID)this._dropLocation=C0.EMPTY;else if(!n||n.parentNode!==this.$.items){if(n)return;if(this.dropMode===EP.BETWEEN||this.dropMode===EP.ON_TOP_OR_BETWEEN)n=Array.from(this.$.items.children).filter(i=>!i.hidden).pop(),this._dropLocation=C0.BELOW;else return}else{let i=n.getBoundingClientRect();if(this._dropLocation=C0.ON_TOP,this.dropMode===EP.BETWEEN){let o=r.clientY-i.top<i.bottom-r.clientY;this._dropLocation=o?C0.ABOVE:C0.BELOW}else this.dropMode===EP.ON_TOP_OR_BETWEEN&&(r.clientY-i.top<i.height/3?this._dropLocation=C0.ABOVE:r.clientY-i.top>i.height/3*2&&(this._dropLocation=C0.BELOW))}if(n&&n.hasAttribute("drop-disabled")){this._dropLocation=void 0;return}r.stopPropagation(),r.preventDefault(),this._dropLocation===C0.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 iue=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 oue(e,t,r){let n=1;e.forEach(i=>{n%10===0&&n++,i._order=r+n*t,n++})}var aue=e=>class extends yh(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(),Em(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),oue(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 nhr=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 vh(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 T0;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 vh.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}},tV=class extends nhr(KH(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(tV.is,tV);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 ihr=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),eV=class extends ZH(jH(Xce(Gce($ce(qce(Qce(tue(eue(Jce(iue(Uce(Zce(aue(Wce(Kce(nue(rue(QH)))))))))))))))))){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:ihr},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)),mgt(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(eV.is,eV);function sue(e,t){return Ngt(e,t)}var cv=class extends mt{constructor(){super(...arguments),this._run=""}_csvUrl(t,r,n){return r?Cn(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`:""}};cv.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)],cv.prototype,"_run",void 0);E([A({type:Array}),w("design:type",Array)],cv.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],cv.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],cv.prototype,"urlFn",void 0);cv=E([yt("tf-downloader")],cv);var ohr=64,pli=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})=>ve().pluginRoute("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=ve().pluginRoute("scalars","/scalars");Promise.all(t.map(a=>{let s=Cn(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=ve().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:ohr,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=ost.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 Vs=class extends sue([uW],mt){constructor(){super(...arguments),this.sessionGroup=null,this._xType=Ed.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=nR;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=mct(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||""}}};Vs.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)],Vs.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Vs.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"visibleSchema",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"sessionGroup",void 0);E([A({type:String}),w("design:type",String)],Vs.prototype,"_xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vs.prototype,"_noMultiExperiments",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"_indexOfSession",void 0);E([A({type:Number}),w("design:type",Number)],Vs.prototype,"_sessionGroupNameHash",void 0);E([A({type:Object}),w("design:type",Function)],Vs.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"_colorScale",void 0);E([Bt("sessionGroup.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vs.prototype,"_sessionGroupChanged",null);Vs=E([yt("tf-hparams-session-group-details")],Vs);var Hd=class extends Gt(_o(mt)){constructor(){super(...arguments),this._hparamName=Fd,this._metricName=Qu}_visibleSchemaOrSessionGroupsChanged(){let t=this.$.sessionGroupsTable.get("detailsOpenedItems");this.$.sessionGroupsTable.set("detailsOpenedItems",[]),ui();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)?"":b0(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 b0(i.value)}return""}_rowNumber(t){return t+1}};Hd.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)],Hd.prototype,"visibleSchema",void 0);E([A({type:Array}),w("design:type",Array)],Hd.prototype,"sessionGroups",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hd.prototype,"enableShowMetrics",void 0);E([A({type:Object}),w("design:type",Object)],Hd.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Hd.prototype,"experimentName",void 0);E([Bt("visibleSchema.*","sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hd.prototype,"_visibleSchemaOrSessionGroupsChanged",null);Hd=E([yt("tf-hparams-table-view")],Hd);var TP=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]}};TP.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)],TP.prototype,"sessionGroup",void 0);E([A({type:Object}),w("design:type",Object)],TP.prototype,"visibleSchema",void 0);TP=E([yt("tf-hparams-session-group-values")],TP);var CP=Ee(Oe(),1);function lue(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=CP.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 cue(e,t,r){return e.domain().filter(n=>{let i=e(n);return t<=i&&i<=r})}function uue(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]:aa(Im(i))}function hue(e,t,r){return[e.invert(t),e.invert(r)].sort((n,i)=>n-i)}function Bct(e,t,r){function n(){if(e.length===0)return[1,2];let[i,o]=aa(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?Bct(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]),eg().domain(CP.uniq(e)).range(o)}else{if(r==="NON_NUMERIC")return tg().domain(CP.uniq(e.sort())).range([t,0]).padding(.1);throw RangeError("Unknown scale: "+r)}}var uv;(function(e){e.LINEAR="LINEAR",e.LOG="LOG",e.QUANTILE="QUANTILE",e.NON_NUMERIC="NON_NUMERIC"})(uv||(uv={}));var AP=class{isPassing(t){return!0}},rV=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}},Vct=class{constructor(t){this._domainSet=t}isPassing(t){return this._domainSet.findIndex(r=>r===t)!==-1}},Uct=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=Bct(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()===uv.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=>uct(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=UL().extent([[-8,0],[8,this._svgProps.height+1]]).on("start",()=>{!Hct(qt)||(t.setAttribute("is-brushing",""),this._interactionManager.onBrushChanged(this.colIndex(),qt.selection))}).on("brush",()=>{!Hct(qt)||this._interactionManager.onBrushChanged(this.colIndex(),qt.selection)}).on("end",()=>{!Hct(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 AP;if(r===null)return console.error("Scale type is null, but brushSelection isn't: ",t),new AP;switch(r){case uv.LINEAR:case uv.LOG:{let[i,o]=hue(n,t[0],t[1]);return new rV(i,o,!1,!1)}case uv.QUANTILE:{let[i,o]=uue(n,t[0],t[1]);return new rV(i,o,!1,!0)}case uv.NON_NUMERIC:return new Vct(cue(n,t[0],t[1]))}return console.error("Unknown scale type: ",r),new AP}},nV=class{constructor(t,r,n){this._svgProps=t,this._schema=r,this._axes=this._createAxes(n),this._stationaryAxesPositions=tg().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=>x0(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=>_P(this.getAxisPosition(r)))}_createAxes(t){return Ir(hct(this._schema)).map(r=>new Uct(this._svgProps,this._schema,t,r))}};function Hct(e){return e.sourceEvent!==null}var jf;(function(e){e[e.FOREGROUND=0]="FOREGROUND",e[e.BACKGROUND=1]="BACKGROUND"})(jf||(jf={}));var th=class{constructor(t){t===void 0&&(t=Ep(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)}},iV=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(Yh)}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===jf.FOREGROUND?this._fgPathsSel:this._bgPathsSel).transition().duration(r).attr("d",i=>this._pathDAttribute(i)),t===jf.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(x0(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(jf.FOREGROUND),this.recomputeControlPoints(jf.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=lue(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(fct(this._schema,this._sessionGroups,t)).range([r,n]).interpolate(M_);return o=>i(x0(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()(x0(this._schema,t,n.colIndex()))])}_pathDAttribute(t){return this._d3line(this._computeControlPoints(t))}_updateVisibleFgPathsSel(){this._visibleFgPathsSel=this._fgPathsSel.filter(":not(.invisible-path)")}};var oV=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",_P(n.left,n.top))}},aV=class{constructor(t,r,n,i){this._svgProps=t,this._schema=r,this._peakedSessionGroupChangedCB=n,this._selectedSessionGroupChangedCB=i,this._axesCollection=new nV(t,r,this),this._linesCollection=new iV(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(jf.FOREGROUND)}onDragEnd(){this._axesCollection.dragEnd(500),this._linesCollection.recomputeControlPoints(jf.FOREGROUND,500),window.setTimeout(()=>{this._linesCollection.recomputeControlPoints(jf.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||!qct.isEqual(t==null?void 0:t.schema,r.schema)||!qct.isEqual(t==null?void 0:t.columnsVisibility,r.columnsVisibility)){Ht(this.$.svg).selectAll("*").remove();let i=new oV(this.$.svg,r.columnsVisibility.filter(Boolean).length);this.scopeSubtree(this.$.svg,!0),this._interactionManager=new aV(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=cs;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]&&t.columnValueByIndex(r,n,i)===void 0)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 A0=class extends mt{constructor(){super(...arguments),this.options=null}_configurationChanged(){let t=this.configuration.visibleSchema,r=this.configuration.schema,n=(a,s)=>({name:Fd(a),index:s,absoluteIndex:OH(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:OH(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),ui(),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]=gP(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}};A0.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)],A0.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],A0.prototype,"sessionGroups",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],A0.prototype,"options",void 0);E([Bt("configuration.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],A0.prototype,"_configurationChanged",null);E([Bt("sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],A0.prototype,"_unselectDisabledLogScales",null);A0=E([yt("tf-hparams-scale-and-color-controls")],A0);var hv=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};hv.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)],hv.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],hv.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],hv.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],hv.prototype,"sessionGroups",void 0);hv=E([yt("tf-hparams-parallel-coords-view")],hv);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=pct(this.sessionGroups,this.selectedSessionGroup.name)||null),this._redraw()}_visibleSchemaChanged(){this._brushedCellIndex=null,this._brushSelection=null,this._redraw()}_redraw(){this.debounce("_redraw",()=>{let t=cs,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=cs,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=Qm().domain(n).range([o+s,this.width-1-s]).paddingInner(.1),c=Qm().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,K9(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(U9(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(M_));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)}),zh().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)),Ep(Array.from(t.filterSet(ct,X=>!Z.has(X)))).attr("fill",O),Ep(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=qL().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=VL(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=Ep(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:Ep(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 eg().domain(y3.uniq(this.sessionGroups.map(s=>this._colValue(s,t)))).range(a)}else{if(this.options.columns[t].scale==="NON_NUMERIC")return tg().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 FH(this.visibleSchema,t,r)}_metricValue(t,r){return zH(this.visibleSchema,t,r)}_colExtent(t){return gP(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 fv=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};fv.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)],fv.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],fv.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],fv.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],fv.prototype,"sessionGroups",void 0);fv=E([yt("tf-hparams-scatter-plot-matrix-view")],fv);var Xf=class extends mt{constructor(){super(...arguments),this._selectedTab=0}};Xf.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 view-id="table-view"> TABLE VIEW </paper-tab>
          <paper-tab view-id="parallel-coords-view">
            PARALLEL COORDINATES VIEW
          </paper-tab>
          <paper-tab 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)],Xf.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"helpUrl",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"bugReportUrl",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],Xf.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],Xf.prototype,"sessionGroups",void 0);E([A({type:Number}),w("design:type",Number)],Xf.prototype,"_selectedTab",void 0);Xf=E([yt("tf-hparams-sessions-pane")],Xf);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 shr=new URLSearchParams(window.location.search).get("tensorboardColab")==="true",lhr="hparams",sV=class extends Gt(mt){constructor(){super(...arguments),this._backend=new u3(ve().pluginRoute(lhr,""),new Ae,shr)}reload(){this.$["hparams-main"].reload()}};sV.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)],sV.prototype,"_backend",void 0);sV=E([yt("tf-hparams-dashboard")],sV);var pv=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=ve(),r=Cn(t.pluginRoute("images","/images"),{tag:this.tag,run:this.run,sample: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=ve().pluginRoute("images","/individualImage");return r=Cn(r,{ts:t.wall_time}),r+="&"+t.query,{wall_time:new Date(t.wall_time*1e3),step:t.step,url:r}}_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=ve().pluginRoute("images","/tags");return this._requestManager.request(t).then(r=>{if(pv.isEqual(r,this._runToTagInfo))return;let n=pv.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=pv.mapValues(t,c=>Object.keys(c)),a=Ql(o,r,n);function s(c){let u=t[c.run][c.tag].samples;return pv.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 sx=Ee(Oe(),1);var dv;(function(e){e[e.CANCELLED=1]="CANCELLED"})(dv||(dv={}));var lV;(function(e){e[e.VERTEX=1]="VERTEX",e[e.FACE=2]="FACE",e[e.COLOR=3]="COLOR"})(lV||(lV={}));var Gct;(function(e){e.VERTEX="float32",e.FACE="int32",e.COLOR="uint8"})(Gct||(Gct={}));var PP=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=ve().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:dv.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:Gct[n]}}).then(u=>u.arrayBuffer()).then(c)}fetchData(t,r,n,i){let o=[],a=new Map;return Object.keys(lV).forEach(s=>{let l=1<<lV[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=ve().pluginRoute("mesh","/meshes",new URLSearchParams({tag:r,run:t,sample:n})),o=this._canceller.cancellable(a=>a.cancelled?Promise.reject({code:dv.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={};Ks(wM,{ACESFilmicToneMapping:()=>lfe,AddEquation:()=>Mv,AddOperation:()=>ife,AdditiveAnimationBlendMode:()=>Rht,AdditiveBlending:()=>Eut,AlphaFormat:()=>mfe,AlwaysDepth:()=>Zhe,AlwaysStencilFunc:()=>Lfe,AmbientLight:()=>I6,AmbientLightProbe:()=>OU,AnimationClip:()=>Qv,AnimationLoader:()=>aht,AnimationMixer:()=>HU,AnimationObjectGroup:()=>BU,AnimationUtils:()=>jn,ArcCurve:()=>s6,ArrayCamera:()=>r6,ArrowHelper:()=>Eht,Audio:()=>N6,AudioAnalyser:()=>zU,AudioContext:()=>Fht,AudioListener:()=>uht,AudioLoader:()=>NU,AxesHelper:()=>vM,AxisHelper:()=>W0r,BackSide:()=>Ii,BasicDepthPacking:()=>Afe,BasicShadowMap:()=>uhr,BinaryTextureLoader:()=>K0r,Bone:()=>sM,BooleanKeyframeTrack:()=>am,BoundingBoxHelper:()=>Y0r,Box2:()=>$0,Box3:()=>ta,Box3Helper:()=>Sht,BoxBufferGeometry:()=>Qf,BoxGeometry:()=>Qf,BoxHelper:()=>yM,BufferAttribute:()=>Je,BufferGeometry:()=>Pe,BufferGeometryLoader:()=>kU,ByteType:()=>ufe,Cache:()=>tx,Camera:()=>Rv,CameraHelper:()=>wht,CanvasRenderer:()=>J0r,CanvasTexture:()=>vU,CatmullRomCurve3:()=>l6,CineonToneMapping:()=>sfe,CircleBufferGeometry:()=>Fv,CircleGeometry:()=>Fv,ClampToEdgeWrapping:()=>Jo,Clock:()=>mM,Color:()=>ne,ColorKeyframeTrack:()=>S6,CompressedTexture:()=>o6,CompressedTextureLoader:()=>sht,ConeBufferGeometry:()=>Bv,ConeGeometry:()=>Bv,CubeCamera:()=>J3,CubeReflectionMapping:()=>nx,CubeRefractionMapping:()=>ix,CubeTexture:()=>H0,CubeTextureLoader:()=>EU,CubeUVReflectionMapping:()=>xM,CubeUVRefractionMapping:()=>O6,CubicBezierCurve:()=>cM,CubicBezierCurve3:()=>c6,CubicInterpolant:()=>wU,CullFaceBack:()=>Mut,CullFaceFront:()=>Ohe,CullFaceFrontBack:()=>chr,CullFaceNone:()=>Dhe,Curve:()=>fs,CurvePath:()=>bU,CustomBlending:()=>Fhe,CustomToneMapping:()=>cfe,CylinderBufferGeometry:()=>om,CylinderGeometry:()=>om,Cylindrical:()=>ght,DataTexture:()=>Jd,DataTexture2DArray:()=>tM,DataTexture3D:()=>e6,DataTextureLoader:()=>TU,DataUtils:()=>Cht,DecrementStencilOp:()=>bhr,DecrementWrapStencilOp:()=>Shr,DefaultLoadingManager:()=>Qfe,DepthFormat:()=>z0,DepthStencilFormat:()=>kv,DepthTexture:()=>nM,DirectionalLight:()=>P6,DirectionalLightHelper:()=>bht,DiscreteInterpolant:()=>SU,DodecahedronBufferGeometry:()=>Hv,DodecahedronGeometry:()=>Hv,DoubleSide:()=>Lv,DstAlphaFactor:()=>Whe,DstColorFactor:()=>jhe,DynamicBufferAttribute:()=>D0r,DynamicCopyUsage:()=>zhr,DynamicDrawUsage:()=>Y3,DynamicReadUsage:()=>Nhr,EdgesGeometry:()=>a6,EdgesHelper:()=>j0r,EllipseCurve:()=>Vv,EqualDepth:()=>Qhe,EqualStencilFunc:()=>Chr,EquirectangularReflectionMapping:()=>WP,EquirectangularRefractionMapping:()=>YP,Euler:()=>tm,EventDispatcher:()=>Us,ExtrudeBufferGeometry:()=>hh,ExtrudeGeometry:()=>hh,FaceColors:()=>M0r,FileLoader:()=>Jc,FlatShading:()=>Pht,Float16BufferAttribute:()=>pU,Float32Attribute:()=>q0r,Float32BufferAttribute:()=>xe,Float64Attribute:()=>G0r,Float64BufferAttribute:()=>dU,FloatType:()=>jd,Fog:()=>zv,FogExp2:()=>Ov,Font:()=>o_r,FontLoader:()=>i_r,FramebufferTexture:()=>yU,FrontSide:()=>Iv,Frustum:()=>Nv,GLBufferAttribute:()=>UU,GLSL1:()=>Bhr,GLSL3:()=>Zut,GreaterDepth:()=>efe,GreaterEqualDepth:()=>tfe,GreaterEqualStencilFunc:()=>Lhr,GreaterStencilFunc:()=>Phr,GridHelper:()=>WU,Group:()=>Xd,HalfFloatType:()=>Cv,HemisphereLight:()=>E6,HemisphereLightHelper:()=>vht,HemisphereLightProbe:()=>DU,IcosahedronBufferGeometry:()=>Gv,IcosahedronGeometry:()=>Gv,ImageBitmapLoader:()=>RU,ImageLoader:()=>ex,ImageUtils:()=>Kf,ImmediateRenderObject:()=>a_r,IncrementStencilOp:()=>xhr,IncrementWrapStencilOp:()=>whr,InstancedBufferAttribute:()=>rm,InstancedBufferGeometry:()=>R6,InstancedInterleavedBuffer:()=>VU,InstancedMesh:()=>n6,Int16Attribute:()=>B0r,Int16BufferAttribute:()=>hU,Int32Attribute:()=>V0r,Int32BufferAttribute:()=>fU,Int8Attribute:()=>O0r,Int8BufferAttribute:()=>lU,IntType:()=>ffe,InterleavedBuffer:()=>em,InterleavedBufferAttribute:()=>tp,Interpolant:()=>fh,InterpolateDiscrete:()=>$P,InterpolateLinear:()=>KP,InterpolateSmooth:()=>eU,InvertStencilOp:()=>Mhr,JSONLoader:()=>Q0r,KeepStencilOp:()=>rU,KeyframeTrack:()=>Dl,LOD:()=>gU,LatheBufferGeometry:()=>Wv,LatheGeometry:()=>Wv,Layers:()=>X3,LensFlare:()=>e_r,LessDepth:()=>Jhe,LessEqualDepth:()=>nU,LessEqualStencilFunc:()=>Ahr,LessStencilFunc:()=>Thr,Light:()=>Ol,LightProbe:()=>rx,Line:()=>ch,Line3:()=>qU,LineBasicMaterial:()=>Gi,LineCurve:()=>Uv,LineCurve3:()=>xU,LineDashedMaterial:()=>b6,LineLoop:()=>i6,LinePieces:()=>w0r,LineSegments:()=>Aa,LineStrip:()=>b0r,LinearEncoding:()=>Qd,LinearFilter:()=>oi,LinearInterpolant:()=>w6,LinearMipMapLinearFilter:()=>mhr,LinearMipMapNearestFilter:()=>dhr,LinearMipmapLinearFilter:()=>ox,LinearMipmapNearestFilter:()=>kht,LinearToneMapping:()=>ofe,Loader:()=>ea,LoaderUtils:()=>dM,LoadingManager:()=>M6,LoopOnce:()=>Mfe,LoopPingPong:()=>Tfe,LoopRepeat:()=>Efe,LuminanceAlphaFormat:()=>_fe,LuminanceFormat:()=>gfe,MOUSE:()=>K0,Material:()=>qi,MaterialLoader:()=>LU,Math:()=>Qhr,MathUtils:()=>Qhr,Matrix3:()=>ki,Matrix4:()=>Me,MaxEquation:()=>Put,Mesh:()=>ei,MeshBasicMaterial:()=>sh,MeshDepthMaterial:()=>eM,MeshDistanceMaterial:()=>rM,MeshFaceMaterial:()=>T0r,MeshLambertMaterial:()=>v6,MeshMatcapMaterial:()=>x6,MeshNormalMaterial:()=>y6,MeshPhongMaterial:()=>g6,MeshPhysicalMaterial:()=>m6,MeshStandardMaterial:()=>pM,MeshToonMaterial:()=>_6,MinEquation:()=>Aut,MirroredRepeatWrapping:()=>XP,MixOperation:()=>nfe,MultiMaterial:()=>C0r,MultiplyBlending:()=>Cut,MultiplyOperation:()=>D6,NearestFilter:()=>Li,NearestMipMapLinearFilter:()=>phr,NearestMipMapNearestFilter:()=>fhr,NearestMipmapLinearFilter:()=>oU,NearestMipmapNearestFilter:()=>iU,NeverDepth:()=>Khe,NeverStencilFunc:()=>Ehr,NoBlending:()=>$d,NoColors:()=>S0r,NoToneMapping:()=>Kd,NormalAnimationBlendMode:()=>XU,NormalBlending:()=>V3,NotEqualDepth:()=>rfe,NotEqualStencilFunc:()=>Ihr,NumberKeyframeTrack:()=>Zv,Object3D:()=>or,ObjectLoader:()=>lht,ObjectSpaceNormalMap:()=>Ife,OctahedronBufferGeometry:()=>W0,OctahedronGeometry:()=>W0,OneFactor:()=>Uhe,OneMinusDstAlphaFactor:()=>Yhe,OneMinusDstColorFactor:()=>Xhe,OneMinusSrcAlphaFactor:()=>Lht,OneMinusSrcColorFactor:()=>Ghe,OrthographicCamera:()=>Dv,PCFShadowMap:()=>Aht,PCFSoftShadowMap:()=>zhe,PMREMGenerator:()=>t6,ParametricGeometry:()=>r_r,Particle:()=>P0r,ParticleBasicMaterial:()=>k0r,ParticleSystem:()=>I0r,ParticleSystemMaterial:()=>R0r,Path:()=>qv,PerspectiveCamera:()=>Ui,Plane:()=>$c,PlaneBufferGeometry:()=>V0,PlaneGeometry:()=>V0,PlaneHelper:()=>Mht,PointCloud:()=>A0r,PointCloudMaterial:()=>L0r,PointLight:()=>A6,PointLightHelper:()=>yht,Points:()=>im,PointsMaterial:()=>nm,PolarGridHelper:()=>xht,PolyhedronBufferGeometry:()=>uh,PolyhedronGeometry:()=>uh,PositionalAudio:()=>hht,PropertyBinding:()=>Cr,PropertyMixer:()=>FU,QuadraticBezierCurve:()=>uM,QuadraticBezierCurve3:()=>hM,Quaternion:()=>vi,QuaternionKeyframeTrack:()=>X0,QuaternionLinearInterpolant:()=>MU,REVISION:()=>YU,RGBADepthPacking:()=>Pfe,RGBAFormat:()=>Qo,RGBAIntegerFormat:()=>wfe,RGBA_ASTC_10x10_Format:()=>jut,RGBA_ASTC_10x5_Format:()=>Gut,RGBA_ASTC_10x6_Format:()=>Wut,RGBA_ASTC_10x8_Format:()=>Yut,RGBA_ASTC_12x10_Format:()=>Xut,RGBA_ASTC_12x12_Format:()=>$ut,RGBA_ASTC_4x4_Format:()=>Out,RGBA_ASTC_5x4_Format:()=>zut,RGBA_ASTC_5x5_Format:()=>Fut,RGBA_ASTC_6x5_Format:()=>But,RGBA_ASTC_6x6_Format:()=>Hut,RGBA_ASTC_8x5_Format:()=>Vut,RGBA_ASTC_8x6_Format:()=>Uut,RGBA_ASTC_8x8_Format:()=>qut,RGBA_BPTC_Format:()=>Kut,RGBA_ETC2_EAC_Format:()=>Dut,RGBA_PVRTC_2BPPV1_Format:()=>Rut,RGBA_PVRTC_4BPPV1_Format:()=>kut,RGBA_S3TC_DXT1_Format:()=>JV,RGBA_S3TC_DXT3_Format:()=>QV,RGBA_S3TC_DXT5_Format:()=>tU,RGB_ETC1_Format:()=>Sfe,RGB_ETC2_Format:()=>Nut,RGB_PVRTC_2BPPV1_Format:()=>Lut,RGB_PVRTC_4BPPV1_Format:()=>Iut,RGB_S3TC_DXT1_Format:()=>ZV,RGFormat:()=>xfe,RGIntegerFormat:()=>bfe,RawShaderMaterial:()=>U0,Ray:()=>Jf,Raycaster:()=>dht,RectAreaLight:()=>L6,RedFormat:()=>yfe,RedIntegerFormat:()=>vfe,ReinhardToneMapping:()=>afe,RepeatWrapping:()=>jP,ReplaceStencilOp:()=>vhr,ReverseSubtractEquation:()=>Hhe,RingBufferGeometry:()=>Yv,RingGeometry:()=>Yv,Scene:()=>q0,SceneUtils:()=>t_r,ShaderChunk:()=>hr,ShaderLib:()=>ah,ShaderMaterial:()=>lh,ShadowMaterial:()=>d6,Shape:()=>Kc,ShapeBufferGeometry:()=>Y0,ShapeGeometry:()=>Y0,ShapePath:()=>Tht,ShapeUtils:()=>Zc,ShortType:()=>hfe,Skeleton:()=>lM,SkeletonHelper:()=>GU,SkinnedMesh:()=>aM,SmoothShading:()=>hhr,Sphere:()=>Zf,SphereBufferGeometry:()=>j0,SphereGeometry:()=>j0,Spherical:()=>_M,SphericalHarmonics3:()=>k6,SplineCurve:()=>fM,SpotLight:()=>C6,SpotLightHelper:()=>_ht,Sprite:()=>oM,SpriteMaterial:()=>iM,SrcAlphaFactor:()=>Iht,SrcAlphaSaturateFactor:()=>$he,SrcColorFactor:()=>qhe,StaticCopyUsage:()=>Ohr,StaticDrawUsage:()=>W3,StaticReadUsage:()=>Rhr,StereoCamera:()=>cht,StreamCopyUsage:()=>Fhr,StreamDrawUsage:()=>khr,StreamReadUsage:()=>Dhr,StringKeyframeTrack:()=>sm,SubtractEquation:()=>Bhe,SubtractiveBlending:()=>Tut,TOUCH:()=>Z0,TangentSpaceNormalMap:()=>ax,TetrahedronBufferGeometry:()=>jv,TetrahedronGeometry:()=>jv,TextGeometry:()=>n_r,Texture:()=>xi,TextureLoader:()=>CU,TorusBufferGeometry:()=>Xv,TorusGeometry:()=>Xv,TorusKnotBufferGeometry:()=>$v,TorusKnotGeometry:()=>$v,Triangle:()=>ai,TriangleFanDrawMode:()=>_hr,TriangleStripDrawMode:()=>ghr,TrianglesDrawMode:()=>Cfe,TubeBufferGeometry:()=>Kv,TubeGeometry:()=>Kv,UVMapping:()=>jU,Uint16Attribute:()=>H0r,Uint16BufferAttribute:()=>$3,Uint32Attribute:()=>U0r,Uint32BufferAttribute:()=>K3,Uint8Attribute:()=>z0r,Uint8BufferAttribute:()=>cU,Uint8ClampedAttribute:()=>F0r,Uint8ClampedBufferAttribute:()=>uU,Uniform:()=>gM,UniformsLib:()=>re,UniformsUtils:()=>Ofe,UnsignedByteType:()=>Zd,UnsignedInt248Type:()=>Av,UnsignedIntType:()=>HP,UnsignedShort4444Type:()=>pfe,UnsignedShort5551Type:()=>dfe,UnsignedShortType:()=>G3,VSMShadowMap:()=>F3,Vector2:()=>Lt,Vector3:()=>j,Vector4:()=>en,VectorKeyframeTrack:()=>Jv,Vertex:()=>N0r,VertexColors:()=>E0r,VideoTexture:()=>_U,WebGL1Renderer:()=>mU,WebGLCubeRenderTarget:()=>Q3,WebGLMultipleRenderTargets:()=>sU,WebGLMultisampleRenderTarget:()=>j3,WebGLRenderTarget:()=>us,WebGLRenderTargetCube:()=>Z0r,WebGLRenderer:()=>rn,WebGLUtils:()=>Xfe,WireframeGeometry:()=>p6,WireframeHelper:()=>X0r,WrapAroundEnding:()=>ZP,XHRLoader:()=>$0r,ZeroCurvatureEnding:()=>Ev,ZeroFactor:()=>Vhe,ZeroSlopeEnding:()=>Tv,ZeroStencilOp:()=>yhr,_SRGBAFormat:()=>aU,sRGBEncoding:()=>Yn});var YU="137",K0={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Z0={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Dhe=0,Mut=1,Ohe=2,chr=3,uhr=0,Aht=1,zhe=2,F3=3,Iv=0,Ii=1,Lv=2,Pht=1,hhr=2,$d=0,V3=1,Eut=2,Tut=3,Cut=4,Fhe=5,Mv=100,Bhe=101,Hhe=102,Aut=103,Put=104,Vhe=200,Uhe=201,qhe=202,Ghe=203,Iht=204,Lht=205,Whe=206,Yhe=207,jhe=208,Xhe=209,$he=210,Khe=0,Zhe=1,Jhe=2,nU=3,Qhe=4,tfe=5,efe=6,rfe=7,D6=0,nfe=1,ife=2,Kd=0,ofe=1,afe=2,sfe=3,lfe=4,cfe=5,jU=300,nx=301,ix=302,WP=303,YP=304,xM=306,O6=307,jP=1e3,Jo=1001,XP=1002,Li=1003,iU=1004,fhr=1004,oU=1005,phr=1005,oi=1006,kht=1007,dhr=1007,ox=1008,mhr=1008,Zd=1009,ufe=1010,hfe=1011,G3=1012,ffe=1013,HP=1014,jd=1015,Cv=1016,pfe=1017,dfe=1018,Av=1020,mfe=1021,Qo=1023,gfe=1024,_fe=1025,z0=1026,kv=1027,yfe=1028,vfe=1029,xfe=1030,bfe=1031,wfe=1033,ZV=33776,JV=33777,QV=33778,tU=33779,Iut=35840,Lut=35841,kut=35842,Rut=35843,Sfe=36196,Nut=37492,Dut=37496,Out=37808,zut=37809,Fut=37810,But=37811,Hut=37812,Vut=37813,Uut=37814,qut=37815,Gut=37816,Wut=37817,Yut=37818,jut=37819,Xut=37820,$ut=37821,Kut=36492,Mfe=2200,Efe=2201,Tfe=2202,$P=2300,KP=2301,eU=2302,Ev=2400,Tv=2401,ZP=2402,XU=2500,Rht=2501,Cfe=0,ghr=1,_hr=2,Qd=3e3,Yn=3001,Afe=3200,Pfe=3201,ax=0,Ife=1,yhr=0,rU=7680,vhr=7681,xhr=7682,bhr=7683,whr=34055,Shr=34056,Mhr=5386,Ehr=512,Thr=513,Chr=514,Ahr=515,Phr=516,Ihr=517,Lhr=518,Lfe=519,W3=35044,Y3=35048,khr=35040,Rhr=35045,Nhr=35049,Dhr=35041,Ohr=35046,zhr=35050,Fhr=35042,Bhr="100",Zut="300 es",aU=1035,Us=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 cV=1234567,Pv=Math.PI/180,JP=180/Math.PI;function Nl(){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 Nht(e,t){return(e%t+t)%t}function Hhr(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)}function Vhr(e,t,r){return e!==t?(r-e)/(t-e):0}function VP(e,t,r){return(1-r)*e+r*t}function Uhr(e,t,r,n){return VP(e,t,1-Math.exp(-r*n))}function qhr(e,t=1){return t-Math.abs(Nht(e,t*2)-t)}function Ghr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*(3-2*e))}function Whr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*e*(e*(e*6-15)+10))}function Yhr(e,t){return e+Math.floor(Math.random()*(t-e+1))}function jhr(e,t){return e+Math.random()*(t-e)}function Xhr(e){return e*(.5-Math.random())}function $hr(e){return e!==void 0&&(cV=e%2147483647),cV=cV*16807%2147483647,(cV-1)/2147483646}function Khr(e){return e*Pv}function Zhr(e){return e*JP}function Jut(e){return(e&e-1)===0&&e!==0}function kfe(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Rfe(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Jhr(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 Qhr=Object.freeze({__proto__:null,DEG2RAD:Pv,RAD2DEG:JP,generateUUID:Nl,clamp:Zo,euclideanModulo:Nht,mapLinear:Hhr,inverseLerp:Vhr,lerp:VP,damp:Uhr,pingpong:qhr,smoothstep:Ghr,smootherstep:Whr,randInt:Yhr,randFloat:jhr,randFloatSpread:Xhr,seededRandom:$hr,degToRad:Khr,radToDeg:Zhr,isPowerOfTwo:Jut,ceilPowerOfTwo:kfe,floorPowerOfTwo:Rfe,setQuaternionFromProperEuler:Jhr}),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 Nfe(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}var tfr={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function B3(e,t){return new tfr[e](t)}function QP(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}var Dfe={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},uV={h:0,s:0,l:0};function Wct(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 Yct(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=Nht(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=Wct(o,i,t+1/3),this.g=Wct(o,i,t),this.b=Wct(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=Dfe[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=Yct(t.r),this.g=Yct(t.g),this.b=Yct(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(uV);let n=VP(nh.h,uV.h,r),i=VP(nh.s,uV.s,r),o=VP(nh.l,uV.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=Dfe;ne.prototype.isColor=!0;ne.prototype.r=1;ne.prototype.g=1;ne.prototype.b=1;var v3,Kf=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=QP("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=QP("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}},efr=0,xi=class extends Us{constructor(t=xi.DEFAULT_IMAGE,r=xi.DEFAULT_MAPPING,n=Jo,i=Jo,o=oi,a=ox,s=Qo,l=Zd,c=1,u=Qd){super(),Object.defineProperty(this,"id",{value:efr++}),this.uuid=Nl(),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=Nl()),!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(jct(i[a].image)):o.push(jct(i[a]))}else o=jct(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!==jU)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case jP:t.x=t.x-Math.floor(t.x);break;case Jo:t.x=t.x<0?0:1;break;case XP: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 jP:t.y=t.y-Math.floor(t.y);break;case Jo:t.y=t.y<0?0:1;break;case XP: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++}};xi.DEFAULT_IMAGE=void 0;xi.DEFAULT_MAPPING=jU;xi.prototype.isTexture=!0;function jct(e){return typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap?Kf.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 us=class extends Us{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 xi(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:oi,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"})}};us.prototype.isWebGLRenderTarget=!0;var sU=class extends us{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}};sU.prototype.isWebGLMultipleRenderTargets=!0;var j3=class extends us{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 vi=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(){}};vi.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(pue.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(pue.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 Xct.copy(this).projectOnVector(t),this.sub(Xct)}reflect(t){return this.sub(Xct.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-EI(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 Xct=new j,pue=new vi,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=mv.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++)mv.fromBufferAttribute(o,a).applyMatrix4(t.matrixWorld),this.expandByPoint(mv)}else n.boundingBox===null&&n.computeBoundingBox(),$ct.copy(n.boundingBox),$ct.applyMatrix4(t.matrixWorld),this.union($ct);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,mv),mv.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(IP),hV.subVectors(this.max,IP),x3.subVectors(t.a,IP),b3.subVectors(t.b,IP),w3.subVectors(t.c,IP),P0.subVectors(b3,x3),I0.subVectors(w3,b3),gv.subVectors(x3,w3);let r=[0,-P0.z,P0.y,0,-I0.z,I0.y,0,-gv.z,gv.y,P0.z,0,-P0.x,I0.z,0,-I0.x,gv.z,0,-gv.x,-P0.y,P0.x,0,-I0.y,I0.x,0,-gv.y,gv.x,0];return!Kct(r,x3,b3,w3,hV)||(r=[1,0,0,0,1,0,0,0,1],!Kct(r,x3,b3,w3,hV))?!1:(fV.crossVectors(P0,I0),r=[fV.x,fV.y,fV.z],Kct(r,x3,b3,w3,hV))}clampPoint(t,r){return r.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return mv.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(mv).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:(Vd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Vd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Vd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Vd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Vd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Vd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Vd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Vd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Vd),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 Vd=[new j,new j,new j,new j,new j,new j,new j,new j],mv=new j,$ct=new ta,x3=new j,b3=new j,w3=new j,P0=new j,I0=new j,gv=new j,IP=new j,hV=new j,fV=new j,_v=new j;function Kct(e,t,r,n,i){for(let o=0,a=e.length-3;o<=a;o+=3){_v.fromArray(e,o);let s=i.x*Math.abs(_v.x)+i.y*Math.abs(_v.y)+i.z*Math.abs(_v.z),l=t.dot(_v),c=r.dot(_v),u=n.dot(_v);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var rfr=new ta,due=new j,pV=new j,Zct=new j,Zf=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):rfr.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){Zct.subVectors(t,this.center);let r=Zct.lengthSq();if(r>this.radius*this.radius){let n=Math.sqrt(r),i=(n-this.radius)*.5;this.center.add(Zct.multiplyScalar(i/n)),this.radius+=i}return this}union(t){return this.center.equals(t.center)===!0?pV.set(0,0,1).multiplyScalar(t.radius):pV.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(due.copy(t.center).add(pV)),this.expandByPoint(due.copy(t.center).sub(pV)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Ud=new j,Jct=new j,dV=new j,L0=new j,Qct=new j,mV=new j,tut=new j,Jf=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,Ud)),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=Ud.subVectors(t,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(t):(Ud.copy(this.direction).multiplyScalar(r).add(this.origin),Ud.distanceToSquared(t))}distanceSqToSegment(t,r,n,i){Jct.copy(t).add(r).multiplyScalar(.5),dV.copy(r).sub(t).normalize(),L0.copy(this.origin).sub(Jct);let o=t.distanceTo(r)*.5,a=-this.direction.dot(dV),s=L0.dot(this.direction),l=-L0.dot(dV),c=L0.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(dV).multiplyScalar(f).add(Jct),p}intersectSphere(t,r){Ud.subVectors(t.center,this.origin);let n=Ud.dot(this.direction),i=Ud.dot(Ud)-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,Ud)!==null}intersectTriangle(t,r,n,i,o){Qct.subVectors(r,t),mV.subVectors(n,t),tut.crossVectors(Qct,mV);let a=this.direction.dot(tut),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;L0.subVectors(this.origin,t);let l=s*this.direction.dot(mV.crossVectors(L0,mV));if(l<0)return null;let c=s*this.direction.dot(Qct.cross(L0));if(c<0||l+c>a)return null;let u=-s*L0.dot(tut);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(nfr,t,ifr)}lookAt(t,r,n){let i=this.elements;return kl.subVectors(t,r),kl.lengthSq()===0&&(kl.z=1),kl.normalize(),k0.crossVectors(n,kl),k0.lengthSq()===0&&(Math.abs(n.z)===1?kl.x+=1e-4:kl.z+=1e-4,kl.normalize(),k0.crossVectors(n,kl)),k0.normalize(),gV.crossVectors(kl,k0),i[0]=k0.x,i[4]=gV.x,i[8]=kl.x,i[1]=k0.y,i[5]=gV.y,i[9]=kl.y,i[2]=k0.z,i[6]=gV.z,i[10]=kl.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,nfr=new j(0,0,0),ifr=new j(1,1,1),k0=new j,gV=new j,kl=new j,mue=new Me,gue=new vi,tm=class{constructor(t=0,r=0,n=0,i=tm.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 mue.makeRotationFromQuaternion(t),this.setFromRotationMatrix(mue,r,n)}setFromVector3(t,r=this._order){return this.set(t.x,t.y,t.z,r)}reorder(t){return gue.setFromEuler(this),this.setFromQuaternion(gue,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(){}};tm.prototype.isEuler=!0;tm.DefaultOrder="XYZ";tm.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}},ofr=0,_ue=new j,M3=new vi,qd=new Me,_V=new j,LP=new j,afr=new j,sfr=new vi,yue=new j(1,0,0),vue=new j(0,1,0),xue=new j(0,0,1),lfr={type:"added"},bue={type:"removed"},or=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:ofr++}),this.uuid=Nl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=or.DefaultUp.clone();let t=new j,r=new tm,n=new vi,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(yue,t)}rotateY(t){return this.rotateOnAxis(vue,t)}rotateZ(t){return this.rotateOnAxis(xue,t)}translateOnAxis(t,r){return _ue.copy(t).applyQuaternion(this.quaternion),this.position.add(_ue.multiplyScalar(r)),this}translateX(t){return this.translateOnAxis(yue,t)}translateY(t){return this.translateOnAxis(vue,t)}translateZ(t){return this.translateOnAxis(xue,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(qd.copy(this.matrixWorld).invert())}lookAt(t,r,n){t.isVector3?_V.copy(t):_V.set(t,r,n);let i=this.parent;this.updateWorldMatrix(!0,!1),LP.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qd.lookAt(LP,_V,this.up):qd.lookAt(_V,LP,this.up),this.quaternion.setFromRotationMatrix(qd),i&&(qd.extractRotation(i.matrixWorld),M3.setFromRotationMatrix(qd),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(lfr)):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(bue)),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(bue)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),qd.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),qd.multiply(t.parent.matrixWorld)),t.applyMatrix4(qd),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(LP,t,afr),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(LP,sfr,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,Gd=new j,eut=new j,Wd=new j,E3=new j,T3=new j,wue=new j,rut=new j,nut=new j,iut=new j,ai=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),Gd.subVectors(n,r),eut.subVectors(t,r);let a=oh.dot(oh),s=oh.dot(Gd),l=oh.dot(eut),c=Gd.dot(Gd),u=Gd.dot(eut),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,Wd),Wd.x>=0&&Wd.y>=0&&Wd.x+Wd.y<=1}static getUV(t,r,n,i,o,a,s,l){return this.getBarycoord(t,r,n,i,Wd),l.set(0,0),l.addScaledVector(o,Wd.x),l.addScaledVector(a,Wd.y),l.addScaledVector(s,Wd.z),l}static isFrontFacing(t,r,n,i){return oh.subVectors(n,r),Gd.subVectors(t,r),oh.cross(Gd).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),Gd.subVectors(this.a,this.b),oh.cross(Gd).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ai.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,r){return ai.getBarycoord(t,this.a,this.b,this.c,r)}getUV(t,r,n,i,o){return ai.getUV(t,this.a,this.b,this.c,r,n,i,o)}containsPoint(t){return ai.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ai.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),rut.subVectors(t,n);let l=E3.dot(rut),c=T3.dot(rut);if(l<=0&&c<=0)return r.copy(n);nut.subVectors(t,i);let u=E3.dot(nut),h=T3.dot(nut);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);iut.subVectors(t,o);let p=E3.dot(iut),d=T3.dot(iut);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 wue.subVectors(o,i),s=(h-u)/(h-u+(p-d)),r.copy(i).addScaledVector(wue,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)}},cfr=0,qi=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:cfr++}),this.uuid=Nl(),this.name="",this.type="Material",this.fog=!0,this.blending=V3,this.side=Iv,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Iht,this.blendDst=Lht,this.blendEquation=Mv,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=nU,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Lfe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=rU,this.stencilZFail=rU,this.stencilZPass=rU,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===Pht;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!==Iv&&(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=D6,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,yV=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++)yV.fromBufferAttribute(this,r),yV.applyMatrix3(t),this.setXY(r,yV.x,yV.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 lU=class extends Je{constructor(t,r,n){super(new Int8Array(t),r,n)}},cU=class extends Je{constructor(t,r,n){super(new Uint8Array(t),r,n)}},uU=class extends Je{constructor(t,r,n){super(new Uint8ClampedArray(t),r,n)}},hU=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)}},fU=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)}},pU=class extends Je{constructor(t,r,n){super(new Uint16Array(t),r,n)}};pU.prototype.isFloat16BufferAttribute=!0;var xe=class extends Je{constructor(t,r,n){super(new Float32Array(t),r,n)}},dU=class extends Je{constructor(t,r,n){super(new Float64Array(t),r,n)}},ufr=0,Xc=new Me,out=new or,C3=new j,Rl=new ta,kP=new ta,Lo=new j,Pe=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:ufr++}),this.uuid=Nl(),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(Nfe(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 out.lookAt(t),out.updateMatrix(),this.applyMatrix4(out.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];Rl.setFromBufferAttribute(o),this.morphTargetsRelative?(Lo.addVectors(this.boundingBox.min,Rl.min),this.boundingBox.expandByPoint(Lo),Lo.addVectors(this.boundingBox.max,Rl.max),this.boundingBox.expandByPoint(Lo)):(this.boundingBox.expandByPoint(Rl.min),this.boundingBox.expandByPoint(Rl.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 Zf);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(Rl.setFromBufferAttribute(t),r)for(let o=0,a=r.length;o<a;o++){let s=r[o];kP.setFromBufferAttribute(s),this.morphTargetsRelative?(Lo.addVectors(Rl.min,kP.min),Rl.expandByPoint(Lo),Lo.addVectors(Rl.max,kP.max),Rl.expandByPoint(Lo)):(Rl.expandByPoint(kP.min),Rl.expandByPoint(kP.max))}Rl.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 Sue=new Me,A3=new Jf,aut=new Zf,R0=new j,N0=new j,D0=new j,sut=new j,lut=new j,cut=new j,vV=new j,xV=new j,bV=new j,wV=new Lt,SV=new Lt,MV=new Lt,uut=new j,EV=new j,ei=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(),aut.copy(n.boundingSphere),aut.applyMatrix4(o),t.ray.intersectsSphere(aut)===!1)||(Sue.copy(o).invert(),A3.copy(t.ray).applyMatrix4(Sue),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=TV(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=TV(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=TV(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=TV(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.")}};ei.prototype.isMesh=!0;function hfr(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!==Lv,s),l===null)return null;EV.copy(s),EV.applyMatrix4(e.matrixWorld);let c=r.ray.origin.distanceTo(EV);return c<r.near||c>r.far?null:{distance:c,point:EV.clone(),object:e}}function TV(e,t,r,n,i,o,a,s,l,c,u,h){R0.fromBufferAttribute(i,c),N0.fromBufferAttribute(i,u),D0.fromBufferAttribute(i,h);let f=e.morphTargetInfluences;if(o&&f){vV.set(0,0,0),xV.set(0,0,0),bV.set(0,0,0);for(let d=0,g=o.length;d<g;d++){let _=f[d],y=o[d];_!==0&&(sut.fromBufferAttribute(y,c),lut.fromBufferAttribute(y,u),cut.fromBufferAttribute(y,h),a?(vV.addScaledVector(sut,_),xV.addScaledVector(lut,_),bV.addScaledVector(cut,_)):(vV.addScaledVector(sut.sub(R0),_),xV.addScaledVector(lut.sub(N0),_),bV.addScaledVector(cut.sub(D0),_)))}R0.add(vV),N0.add(xV),D0.add(bV)}e.isSkinnedMesh&&(e.boneTransform(c,R0),e.boneTransform(u,N0),e.boneTransform(h,D0));let p=hfr(e,t,r,n,R0,N0,D0,uut);if(p){s&&(wV.fromBufferAttribute(s,c),SV.fromBufferAttribute(s,u),MV.fromBufferAttribute(s,h),p.uv=ai.getUV(uut,R0,N0,D0,wV,SV,MV,new Lt)),l&&(wV.fromBufferAttribute(l,c),SV.fromBufferAttribute(l,u),MV.fromBufferAttribute(l,h),p.uv2=ai.getUV(uut,R0,N0,D0,wV,SV,MV,new Lt));let d={a:c,b:u,c:h,normal:new j,materialIndex:0};ai.getNormal(R0,N0,D0,d.normal),p.face=d}return p}var Qf=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 Qf(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 Ta(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 Ofe={clone:Z3,merge:Ta},ffr=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,pfr=`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=ffr,this.fragmentShader=pfr,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 Rv=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)}};Rv.prototype.isCamera=!0;var Ui=class extends Rv{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=JP*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(Pv*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return JP*2*Math.atan(Math.tan(Pv*.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(Pv*.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}},H0=class extends xi{constructor(t,r,n,i,o,a,s,l,c,u){t=t!==void 0?t:[],r=r!==void 0?r:nx,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}};H0.prototype.isCubeTexture=!0;var Q3=class extends us{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 H0(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:oi}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 Qf(5,5,5),o=new lh({name:"CubemapFromEquirect",uniforms:Z3(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ii,blending:$d});o.uniforms.tEquirect.value=r;let a=new ei(i,o),s=r.minFilter;return r.minFilter===ox&&(r.minFilter=oi),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 hut=new j,dfr=new j,mfr=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=hut.subVectors(n,r).cross(dfr.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(hut),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||mfr.getNormalMatrix(t),i=this.coplanarPoint(hut).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 Zf,CV=new j,Nv=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(CV.x=i.normal.x>0?t.max.x:t.min.x,CV.y=i.normal.y>0?t.max.y:t.min.y,CV.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(CV)<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 zfe(){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 gfr(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 V0=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 V0(t.width,t.height,t.widthSegments,t.heightSegments)}},_fr=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vUv ).g;
#endif`,yfr=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,vfr=`#ifdef USE_ALPHATEST
	if ( diffuseColor.a < alphaTest ) discard;
#endif`,xfr=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,bfr=`#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`,wfr=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,Sfr="vec3 transformed = vec3( position );",Mfr=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,Efr=`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`,Tfr=`#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`,Cfr=`#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`,Afr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,Pfr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,Ifr=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,Lfr=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,kfr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,Rfr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	varying vec3 vColor;
#endif`,Nfr=`#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`,Dfr=`#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 );
}`,Ofr=`#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`,zfr=`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`,Ffr=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,Bfr=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
#endif`,Hfr=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vUv );
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,Vfr=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,Ufr="gl_FragColor = linearToOutputTexel( gl_FragColor );",qfr=`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 );
}`,Gfr=`#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`,Wfr=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,Yfr=`#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`,Xfr=`#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`,$fr=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,Kfr=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,Zfr=`#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`,Jfr=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,Qfr=`#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
}`,tpr=`#ifdef USE_LIGHTMAP
	vec4 lightMapTexel = texture2D( lightMap, vUv2 );
	vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
	#ifndef PHYSICALLY_CORRECT_LIGHTS
		lightMapIrradiance *= PI;
	#endif
	reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,epr=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,rpr=`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`,npr=`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`,ipr=`#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`,opr=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,apr=`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)`,spr=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,lpr=`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)`,cpr=`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`,upr=`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 );
}`,hpr=`
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`,fpr=`#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`,ppr=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif`,dpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,mpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,gpr=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		varying float vFragDepth;
		varying float vIsPerspective;
	#else
		uniform float logDepthBufFC;
	#endif
#endif`,_pr=`#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`,ypr=`#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`,vpr=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,xpr=`#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`,bpr=`#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`,wpr=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vUv );
	metalnessFactor *= texelMetalness.b;
#endif`,Spr=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,Mpr=`#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`,Epr=`#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`,Tpr=`#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`,Cpr=`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;`,Apr=`#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`,Ppr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Ipr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Lpr=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,kpr=`#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`,Rpr=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = geometryNormal;
#endif`,Npr=`#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`,Dpr=`#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`,Opr=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= transmissionAlpha + 0.1;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,zpr=`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 );
}`,Fpr=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,Bpr=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,Hpr=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,Vpr=`#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`,Upr=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vUv );
	roughnessFactor *= texelRoughness.g;
#endif`,qpr=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,Gpr=`#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`,Wpr=`#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`,Ypr=`#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;
}`,Xpr=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,$pr=`#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`,Kpr=`#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`,Zpr=`#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`,Jpr=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,Qpr=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,tdr=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,edr=`#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; }`,rdr=`#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`,ndr=`#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`,idr=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
	varying vec2 vUv;
#endif`,odr=`#ifdef USE_UV
	#ifdef UVS_VERTEX_ONLY
		vec2 vUv;
	#else
		varying vec2 vUv;
	#endif
	uniform mat3 uvTransform;
#endif`,adr=`#ifdef USE_UV
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif`,sdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	varying vec2 vUv2;
#endif`,ldr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	attribute vec2 uv2;
	varying vec2 vUv2;
	uniform mat3 uv2Transform;
#endif`,cdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
#endif`,udr=`#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`,hdr=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,fdr=`uniform sampler2D t2D;
varying vec2 vUv;
void main() {
	gl_FragColor = texture2D( t2D, vUv );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,pdr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,ddr=`#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>
}`,mdr=`#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;
}`,gdr=`#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
}`,_dr=`#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;
}`,ydr=`#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 );
}`,vdr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,xdr=`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>
}`,bdr=`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>
}`,wdr=`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>
}`,Sdr=`#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>
}`,Mdr=`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>
}`,Edr=`#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>
}`,Tdr=`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>
}`,Cdr=`#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;
}`,Adr=`#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>
}`,Pdr=`#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
}`,Idr=`#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 );
}`,Ldr=`#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>
}`,kdr=`#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>
}`,Rdr=`#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
}`,Ndr=`#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>
}`,Ddr=`#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>
}`,Odr=`#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>
}`,zdr=`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>
}`,Fdr=`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>
}`,Bdr=`#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>
}`,Hdr=`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>
}`,Vdr=`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>
}`,Udr=`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:_fr,alphamap_pars_fragment:yfr,alphatest_fragment:vfr,alphatest_pars_fragment:xfr,aomap_fragment:bfr,aomap_pars_fragment:wfr,begin_vertex:Sfr,beginnormal_vertex:Mfr,bsdfs:Efr,bumpmap_pars_fragment:Tfr,clipping_planes_fragment:Cfr,clipping_planes_pars_fragment:Afr,clipping_planes_pars_vertex:Pfr,clipping_planes_vertex:Ifr,color_fragment:Lfr,color_pars_fragment:kfr,color_pars_vertex:Rfr,color_vertex:Nfr,common:Dfr,cube_uv_reflection_fragment:Ofr,defaultnormal_vertex:zfr,displacementmap_pars_vertex:Ffr,displacementmap_vertex:Bfr,emissivemap_fragment:Hfr,emissivemap_pars_fragment:Vfr,encodings_fragment:Ufr,encodings_pars_fragment:qfr,envmap_fragment:Gfr,envmap_common_pars_fragment:Wfr,envmap_pars_fragment:Yfr,envmap_pars_vertex:jfr,envmap_physical_pars_fragment:ipr,envmap_vertex:Xfr,fog_vertex:$fr,fog_pars_vertex:Kfr,fog_fragment:Zfr,fog_pars_fragment:Jfr,gradientmap_pars_fragment:Qfr,lightmap_fragment:tpr,lightmap_pars_fragment:epr,lights_lambert_vertex:rpr,lights_pars_begin:npr,lights_toon_fragment:opr,lights_toon_pars_fragment:apr,lights_phong_fragment:spr,lights_phong_pars_fragment:lpr,lights_physical_fragment:cpr,lights_physical_pars_fragment:upr,lights_fragment_begin:hpr,lights_fragment_maps:fpr,lights_fragment_end:ppr,logdepthbuf_fragment:dpr,logdepthbuf_pars_fragment:mpr,logdepthbuf_pars_vertex:gpr,logdepthbuf_vertex:_pr,map_fragment:ypr,map_pars_fragment:vpr,map_particle_fragment:xpr,map_particle_pars_fragment:bpr,metalnessmap_fragment:wpr,metalnessmap_pars_fragment:Spr,morphnormal_vertex:Mpr,morphtarget_pars_vertex:Epr,morphtarget_vertex:Tpr,normal_fragment_begin:Cpr,normal_fragment_maps:Apr,normal_pars_fragment:Ppr,normal_pars_vertex:Ipr,normal_vertex:Lpr,normalmap_pars_fragment:kpr,clearcoat_normal_fragment_begin:Rpr,clearcoat_normal_fragment_maps:Npr,clearcoat_pars_fragment:Dpr,output_fragment:Opr,packing:zpr,premultiplied_alpha_fragment:Fpr,project_vertex:Bpr,dithering_fragment:Hpr,dithering_pars_fragment:Vpr,roughnessmap_fragment:Upr,roughnessmap_pars_fragment:qpr,shadowmap_pars_fragment:Gpr,shadowmap_pars_vertex:Wpr,shadowmap_vertex:Ypr,shadowmask_pars_fragment:jpr,skinbase_vertex:Xpr,skinning_pars_vertex:$pr,skinning_vertex:Kpr,skinnormal_vertex:Zpr,specularmap_fragment:Jpr,specularmap_pars_fragment:Qpr,tonemapping_fragment:tdr,tonemapping_pars_fragment:edr,transmission_fragment:rdr,transmission_pars_fragment:ndr,uv_pars_fragment:idr,uv_pars_vertex:odr,uv_vertex:adr,uv2_pars_fragment:sdr,uv2_pars_vertex:ldr,uv2_vertex:cdr,worldpos_vertex:udr,background_vert:hdr,background_frag:fdr,cube_vert:pdr,cube_frag:ddr,depth_vert:mdr,depth_frag:gdr,distanceRGBA_vert:_dr,distanceRGBA_frag:ydr,equirect_vert:vdr,equirect_frag:xdr,linedashed_vert:bdr,linedashed_frag:wdr,meshbasic_vert:Sdr,meshbasic_frag:Mdr,meshlambert_vert:Edr,meshlambert_frag:Tdr,meshmatcap_vert:Cdr,meshmatcap_frag:Adr,meshnormal_vert:Pdr,meshnormal_frag:Idr,meshphong_vert:Ldr,meshphong_frag:kdr,meshphysical_vert:Rdr,meshphysical_frag:Ndr,meshtoon_vert:Ddr,meshtoon_frag:Odr,points_vert:zdr,points_frag:Fdr,shadow_vert:Bdr,shadow_frag:Hdr,sprite_vert:Vdr,sprite_frag:Udr},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:Ta([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.fog]),vertexShader:hr.meshbasic_vert,fragmentShader:hr.meshbasic_frag},lambert:{uniforms:Ta([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:Ta([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:Ta([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:Ta([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:Ta([re.common,re.bumpmap,re.normalmap,re.displacementmap,re.fog,{matcap:{value:null}}]),vertexShader:hr.meshmatcap_vert,fragmentShader:hr.meshmatcap_frag},points:{uniforms:Ta([re.points,re.fog]),vertexShader:hr.points_vert,fragmentShader:hr.points_frag},dashed:{uniforms:Ta([re.common,re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hr.linedashed_vert,fragmentShader:hr.linedashed_frag},depth:{uniforms:Ta([re.common,re.displacementmap]),vertexShader:hr.depth_vert,fragmentShader:hr.depth_frag},normal:{uniforms:Ta([re.common,re.bumpmap,re.normalmap,re.displacementmap,{opacity:{value:1}}]),vertexShader:hr.meshnormal_vert,fragmentShader:hr.meshnormal_frag},sprite:{uniforms:Ta([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:Ta([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:Ta([re.common,re.displacementmap,{referencePosition:{value:new j},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hr.distanceRGBA_vert,fragmentShader:hr.distanceRGBA_frag},shadow:{uniforms:Ta([re.lights,re.fog,{color:{value:new ne(0)},opacity:{value:1}}]),vertexShader:hr.shadow_vert,fragmentShader:hr.shadow_frag}};ah.physical={uniforms:Ta([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 qdr(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 ei(new Qf(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 ei(new V0(2,2),new lh({name:"BackgroundMaterial",uniforms:Z3(ah.background.uniforms),vertexShader:ah.background.vertexShader,fragmentShader:ah.background.fragmentShader,side:Iv,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 Gdr(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 Wdr(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 Ydr(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 Xdr(e){let t=new WeakMap;function r(a,s){return s===WP?a.mapping=nx:s===YP&&(a.mapping=ix),a}function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let s=a.mapping;if(s===WP||s===YP)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 Dv=class extends Rv{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}};Dv.prototype.isOrthographicCamera=!0;var U0=class extends lh{constructor(t){super(t),this.type="RawShaderMaterial"}};U0.prototype.isRawShaderMaterial=!0;var q3=4,F0=8,$f=Math.pow(2,F0),Ffe=[.125,.215,.35,.446,.526,.582],Bfe=F0-q3+1+Ffe.length,k3=20,fut=new Dv,{_lodPlanes:RP,_sizeLods:Mue,_sigmas:AV}=$dr(),Eue=new ne,put=null,Sv=(1+Math.sqrt(5))/2,R3=1/Sv,Tue=[new j(1,1,1),new j(-1,1,1),new j(1,1,-1),new j(-1,1,-1),new j(0,Sv,R3),new j(0,Sv,-R3),new j(R3,0,Sv),new j(-R3,0,Sv),new j(Sv,R3,0),new j(-Sv,R3,0)],t6=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=Kdr(k3),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,r=0,n=.1,i=100){put=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=Pue(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Aue(),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<RP.length;t++)RP[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(put),t.scissorTest=!1,PV(t,0,0,t.width,t.height)}_fromTexture(t,r){put=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:oi,minFilter:oi,generateMipmaps:!1,type:Cv,format:Qo,encoding:Qd,depthBuffer:!1},n=Cue(r);return n.depthBuffer=!t,this._pingPongRenderTarget===null&&(this._pingPongRenderTarget=Cue(r)),n}_compileMaterial(t){let r=new ei(RP[0],t);this._renderer.compile(r,fut)}_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(Eue),u.toneMapping=Kd,u.autoClear=!1;let p=new sh({name:"PMREM.Background",side:Ii,depthWrite:!1,depthTest:!1}),d=new ei(new Qf,p),g=!1,_=t.background;_?_.isColor&&(p.color.copy(_),t.background=null,g=!0):(p.color.copy(Eue),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])),PV(i,x*$f,y>2?$f:0,$f,$f),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===nx||t.mapping===ix;i?(this._cubemapShader===null&&(this._cubemapShader=Pue()),this._cubemapShader.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=Aue());let o=i?this._cubemapShader:this._equirectShader,a=new ei(RP[0],o),s=o.uniforms;s.envMap.value=t,i||s.texelSize.value.set(1/t.image.width,1/t.image.height),PV(r,0,0,3*$f,2*$f),n.setRenderTarget(r),n.render(a,fut)}_applyPMREM(t){let r=this._renderer,n=r.autoClear;r.autoClear=!1;for(let i=1;i<Bfe;i++){let o=Math.sqrt(AV[i]*AV[i]-AV[i-1]*AV[i-1]),a=Tue[(i-1)%Tue.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 ei(RP[i],c),f=c.uniforms,p=Mue[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=F0-n;let b=Mue[i],S=3*Math.max(0,$f-2*b),C=(i===0?0:2*$f)+2*b*(i>F0-q3?i-F0+q3:0);PV(r,S,C,3*b,2*b),l.setRenderTarget(r),l.render(h,fut)}};function $dr(){let e=[],t=[],r=[],n=F0;for(let i=0;i<Bfe;i++){let o=Math.pow(2,n);t.push(o);let a=1/o;i>F0-q3?a=Ffe[i-F0+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 Cue(e){let t=new us(3*$f,3*$f,e);return t.texture.mapping=xM,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function PV(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function Kdr(e){let t=new Float32Array(e),r=new j(0,1,0);return new U0({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:Dht(),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:$d,depthTest:!1,depthWrite:!1})}function Aue(){let e=new Lt(1,1);return new U0({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e}},vertexShader:Dht(),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:$d,depthTest:!1,depthWrite:!1})}function Pue(){return new U0({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Dht(),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:$d,depthTest:!1,depthWrite:!1})}function Dht(){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 Zdr(e){let t=new WeakMap,r=null;function n(s){if(s&&s.isTexture){let l=s.mapping,c=l===WP||l===YP,u=l===nx||l===ix;if(c||u)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let h=t.get(s);return r===null&&(r=new t6(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 t6(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 Jdr(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 Qdr(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(Nfe(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 tmr(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 emr(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 xi{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 rmr(e,t){return e[0]-t[0]}function nmr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Iue(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 imr(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=jd,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&&Iue(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&&Iue(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(nmr);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(rmr);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 omr(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 e6=class extends xi{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}};e6.prototype.isDataTexture3D=!0;var Hfe=new xi,Vfe=new tM,Ufe=new e6,qfe=new H0,Lue=[],kue=[],Rue=new Float32Array(16),Nue=new Float32Array(9),Due=new Float32Array(4);function bM(e,t,r){let n=e[0];if(n<=0||n>0)return e;let i=t*r,o=Lue[i];if(o===void 0&&(o=new Float32Array(i),Lue[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 hs(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 Ca(e,t){for(let r=0,n=t.length;r<n;r++)e[r]=t[r]}function $U(e,t){let r=kue[t];r===void 0&&(r=new Int32Array(t),kue[t]=r);for(let n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function amr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function smr(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(hs(r,t))return;e.uniform2fv(this.addr,t),Ca(r,t)}}function lmr(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(hs(r,t))return;e.uniform3fv(this.addr,t),Ca(r,t)}}function cmr(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(hs(r,t))return;e.uniform4fv(this.addr,t),Ca(r,t)}}function umr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Due.set(n),e.uniformMatrix2fv(this.addr,!1,Due),Ca(r,n)}}function hmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Nue.set(n),e.uniformMatrix3fv(this.addr,!1,Nue),Ca(r,n)}}function fmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Rue.set(n),e.uniformMatrix4fv(this.addr,!1,Rue),Ca(r,n)}}function pmr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function dmr(e,t){let r=this.cache;hs(r,t)||(e.uniform2iv(this.addr,t),Ca(r,t))}function mmr(e,t){let r=this.cache;hs(r,t)||(e.uniform3iv(this.addr,t),Ca(r,t))}function gmr(e,t){let r=this.cache;hs(r,t)||(e.uniform4iv(this.addr,t),Ca(r,t))}function _mr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function ymr(e,t){let r=this.cache;hs(r,t)||(e.uniform2uiv(this.addr,t),Ca(r,t))}function vmr(e,t){let r=this.cache;hs(r,t)||(e.uniform3uiv(this.addr,t),Ca(r,t))}function xmr(e,t){let r=this.cache;hs(r,t)||(e.uniform4uiv(this.addr,t),Ca(r,t))}function bmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTexture2D(t||Hfe,i)}function wmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||Ufe,i)}function Smr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTextureCube(t||qfe,i)}function Mmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||Vfe,i)}function Emr(e){switch(e){case 5126:return amr;case 35664:return smr;case 35665:return lmr;case 35666:return cmr;case 35674:return umr;case 35675:return hmr;case 35676:return fmr;case 5124:case 35670:return pmr;case 35667:case 35671:return dmr;case 35668:case 35672:return mmr;case 35669:case 35673:return gmr;case 5125:return _mr;case 36294:return ymr;case 36295:return vmr;case 36296:return xmr;case 35678:case 36198:case 36298:case 36306:case 35682:return bmr;case 35679:case 36299:case 36307:return wmr;case 35680:case 36300:case 36308:case 36293:return Smr;case 36289:case 36303:case 36311:case 36292:return Mmr}}function Tmr(e,t){e.uniform1fv(this.addr,t)}function Cmr(e,t){let r=bM(t,this.size,2);e.uniform2fv(this.addr,r)}function Amr(e,t){let r=bM(t,this.size,3);e.uniform3fv(this.addr,r)}function Pmr(e,t){let r=bM(t,this.size,4);e.uniform4fv(this.addr,r)}function Imr(e,t){let r=bM(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function Lmr(e,t){let r=bM(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function kmr(e,t){let r=bM(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function Rmr(e,t){e.uniform1iv(this.addr,t)}function Nmr(e,t){e.uniform2iv(this.addr,t)}function Dmr(e,t){e.uniform3iv(this.addr,t)}function Omr(e,t){e.uniform4iv(this.addr,t)}function zmr(e,t){e.uniform1uiv(this.addr,t)}function Fmr(e,t){e.uniform2uiv(this.addr,t)}function Bmr(e,t){e.uniform3uiv(this.addr,t)}function Hmr(e,t){e.uniform4uiv(this.addr,t)}function Vmr(e,t,r){let n=t.length,i=$U(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTexture2D(t[o]||Hfe,i[o])}function Umr(e,t,r){let n=t.length,i=$U(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture3D(t[o]||Ufe,i[o])}function qmr(e,t,r){let n=t.length,i=$U(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTextureCube(t[o]||qfe,i[o])}function Gmr(e,t,r){let n=t.length,i=$U(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture2DArray(t[o]||Vfe,i[o])}function Wmr(e){switch(e){case 5126:return Tmr;case 35664:return Cmr;case 35665:return Amr;case 35666:return Pmr;case 35674:return Imr;case 35675:return Lmr;case 35676:return kmr;case 5124:case 35670:return Rmr;case 35667:case 35671:return Nmr;case 35668:case 35672:return Dmr;case 35669:case 35673:return Omr;case 5125:return zmr;case 36294:return Fmr;case 36295:return Bmr;case 36296:return Hmr;case 35678:case 36198:case 36298:case 36306:case 35682:return Vmr;case 35679:case 36299:case 36307:return Umr;case 35680:case 36300:case 36308:case 36293:return qmr;case 36289:case 36303:case 36311:case 36292:return Gmr}}function Ymr(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=Emr(t.type)}function Gfe(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=Wmr(t.type)}Gfe.prototype.updateCache=function(e){let t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Ca(t,e)};function Wfe(e){this.id=e,this.seq=[],this.map={}}Wfe.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 dut=/(\w+)(\])?(\[|\.)?/g;function Oue(e,t){e.seq.push(t),e.map[t.id]=t}function jmr(e,t,r){let n=e.name,i=n.length;for(dut.lastIndex=0;;){let o=dut.exec(n),a=dut.lastIndex,s=o[1],l=o[2]==="]",c=o[3];if(l&&(s=s|0),c===void 0||c==="["&&a+2===i){Oue(r,c===void 0?new Ymr(s,e,t):new Gfe(s,e,t));break}else{let h=r.map[s];h===void 0&&(h=new Wfe(s),Oue(r,h)),r=h}}}function B0(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)}}B0.prototype.setValue=function(e,t,r,n){let i=this.map[t];i!==void 0&&i.setValue(e,r,n)};B0.prototype.setOptional=function(e,t,r){let n=t[r];n!==void 0&&this.setValue(e,r,n)};B0.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)}};B0.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 zue(e,t,r){let n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}var Xmr=0;function $mr(e){let t=e.split(`
`);for(let r=0;r<t.length;r++)t[r]=r+1+": "+t[r];return t.join(`
`)}function Kmr(e){switch(e){case Qd:return["Linear","( value )"];case Yn:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Fue(e,t,r){let n=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return n&&i===""?"":r.toUpperCase()+`

`+i+`

`+$mr(e.getShaderSource(t))}function Zmr(e,t){let r=Kmr(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function Jmr(e,t){let r;switch(t){case ofe:r="Linear";break;case afe:r="Reinhard";break;case sfe:r="OptimizedCineon";break;case lfe:r="ACESFilmic";break;case cfe:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),r="Linear"}return"vec3 "+e+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function Qmr(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(BP).join(`
`)}function tgr(e){let t=[];for(let r in e){let n=e[r];n!==!1&&t.push("#define "+r+" "+n)}return t.join(`
`)}function egr(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 BP(e){return e!==""}function Bue(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 Hue(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var rgr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Qut(e){return e.replace(rgr,ngr)}function ngr(e,t){let r=hr[t];if(r===void 0)throw new Error("Can not resolve #include <"+t+">");return Qut(r)}var igr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,ogr=/#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 Vue(e){return e.replace(ogr,Yfe).replace(igr,agr)}function agr(e,t,r,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Yfe(e,t,r,n)}function Yfe(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 Uue(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 sgr(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===Aht?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===zhe?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===F3&&(t="SHADOWMAP_TYPE_VSM"),t}function lgr(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case nx:case ix:t="ENVMAP_TYPE_CUBE";break;case xM:case O6:t="ENVMAP_TYPE_CUBE_UV";break}return t}function cgr(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ix:case O6:t="ENVMAP_MODE_REFRACTION";break}return t}function ugr(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case D6:t="ENVMAP_BLENDING_MULTIPLY";break;case nfe:t="ENVMAP_BLENDING_MIX";break;case ife:t="ENVMAP_BLENDING_ADD";break}return t}function hgr(e,t,r,n){let i=e.getContext(),o=r.defines,a=r.vertexShader,s=r.fragmentShader,l=sgr(r),c=lgr(r),u=cgr(r),h=ugr(r),f=r.isWebGL2?"":Qmr(r),p=tgr(o),d=i.createProgram(),g,_,y=r.glslVersion?"#version "+r.glslVersion+`
`:"";r.isRawShaderMaterial?(g=[p].filter(BP).join(`
`),g.length>0&&(g+=`
`),_=[f,p].filter(BP).join(`
`),_.length>0&&(_+=`
`)):(g=[Uue(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(BP).join(`
`),_=[f,Uue(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!==Kd?"#define TONE_MAPPING":"",r.toneMapping!==Kd?hr.tonemapping_pars_fragment:"",r.toneMapping!==Kd?Jmr("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.alphaWrite?"":"#define OPAQUE",hr.encodings_pars_fragment,Zmr("linearToOutputTexel",r.outputEncoding),r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",`
`].filter(BP).join(`
`)),a=Qut(a),a=Bue(a,r),a=Hue(a,r),s=Qut(s),s=Bue(s,r),s=Hue(s,r),a=Vue(a),s=Vue(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===Zut?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Zut?"":"#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=zue(i,35633,x),C=zue(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=Fue(i,S,"vertex"),F=Fue(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 B0(i,d)),P};let k;return this.getAttributes=function(){return k===void 0&&(k=egr(i,d)),k},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(d),this.program=void 0},this.name=r.shaderName,this.id=Xmr++,this.cacheKey=t,this.usedTimes=1,this.program=d,this.vertexShader=S,this.fragmentShader=C,this}var fgr=0,tht=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 eht;r.set(t,n)}return r.get(t)}},eht=class{constructor(){this.id=fgr++,this.usedTimes=0}};function pgr(e,t,r,n,i,o,a){let s=new X3,l=new tht,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:Qd,map:!!I.map,matcap:!!I.matcap,envMap:!!Z,envMapMode:Z&&Z.mapping,envMapCubeUV:!!Z&&(Z.mapping===xM||Z.mapping===O6),lightMap:!!I.lightMap,aoMap:!!I.aoMap,emissiveMap:!!I.emissiveMap,bumpMap:!!I.bumpMap,normalMap:!!I.normalMap,objectSpaceNormalMap:I.normalMapType===Ife,tangentSpaceNormalMap:I.normalMapType===ax,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:Kd,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===Lv,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=Ofe.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 hgr(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 dgr(){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 mgr(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 que(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 Gue(){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||mgr),n.length>1&&n.sort(f||que),i.length>1&&i.sort(f||que)}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 ggr(){let e=new WeakMap;function t(n,i){let o;return e.has(n)===!1?(o=new Gue,e.set(n,[o])):i>=e.get(n).length?(o=new Gue,e.get(n).push(o)):o=e.get(n)[i],o}function r(){e=new WeakMap}return{get:t,dispose:r}}function _gr(){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 ygr(){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 vgr=0;function xgr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function bgr(e,t){let r=new _gr,n=ygr(),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(xgr);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=vgr++)}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 Wue(e,t){let r=new bgr(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 wgr(e,t){let r=new WeakMap;function n(o,a=0){let s;return r.has(o)===!1?(s=new Wue(e,t),r.set(o,[s])):a>=r.get(o).length?(s=new Wue(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=Afe,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 Sgr=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,Mgr=`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 Nv,i=new Lt,o=new Lt,a=new en,s=new eM({depthPacking:Pfe}),l=new rM,c={},u=r.maxTextureSize,h={0:Ii,1:Iv,2:Lv},f=new lh({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Lt},radius:{value:4}},vertexShader:Sgr,fragmentShader:Mgr}),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 ei(d,f),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Aht,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($d),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:oi,magFilter:oi,format:Qo};F.map=new us(i.x,i.y,W),F.map.texture.name=R.name+".shadowMap",F.mapPass=new us(i.x,i.y,W),F.camera.updateProjectionMatrix()}if(F.map===null){let W={minFilter:Li,magFilter:Li,format:Qo};F.map=new us(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 Egr(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 Khe:e.depthFunc(512);break;case Zhe:e.depthFunc(519);break;case Jhe:e.depthFunc(513);break;case nU:e.depthFunc(515);break;case Qhe:e.depthFunc(514);break;case tfe:e.depthFunc(518);break;case efe:e.depthFunc(516);break;case rfe: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,Pa,ho){(Qt!==Ar||Ce!==Pa||Pt!==ho)&&(e.stencilFunc(Ar,Pa,ho),Qt=Ar,Ce=Pa,Pt=ho)},setOp:function(Ar,Pa,ho){(Nt!==Ar||ze!==Pa||yn!==ho)&&(e.stencilOp(Ar,Pa,ho),Nt=Ar,ze=Pa,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(nU),ht(!1),wt(Mut),lt(2884),q($d);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={[Mv]:32774,[Bhe]:32778,[Hhe]:32779};if(n)et[Aut]=32775,et[Put]=32776;else{let at=t.get("EXT_blend_minmax");at!==null&&(et[Aut]=at.MIN_EXT,et[Put]=at.MAX_EXT)}let dt={[Vhe]:0,[Uhe]:1,[qhe]:768,[Iht]:770,[$he]:776,[jhe]:774,[Whe]:772,[Ghe]:769,[Lht]:771,[Xhe]:775,[Yhe]:773};function q(at,se,Qt,Ce,Pt,Nt,ze,yn){if(at===$d){g===!0&&(Kt(3042),g=!1);return}if(g===!1&&(lt(3042),g=!0),at!==Fhe){if(at!==_||yn!==k){if((y!==Mv||S!==Mv)&&(e.blendEquation(32774),y=Mv,S=Mv),yn)switch(at){case V3:e.blendFuncSeparate(1,771,1,771);break;case Eut:e.blendFunc(1,1);break;case Tut:e.blendFuncSeparate(0,769,0,1);break;case Cut: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 Eut:e.blendFunc(770,1);break;case Tut:e.blendFuncSeparate(0,769,0,1);break;case Cut: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===Lv?Kt(2884):lt(2884);let Qt=at.side===Ii;se&&(Qt=!Qt),ht(Qt),at.blending===V3&&at.transparent===!1?q($d):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!==Dhe?(lt(2884),at!==D&&(at===Mut?e.cullFace(1029):at===Ohe?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 Tgr(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,$):QP("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=$?Rfe: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 Jut(tt.width)&&Jut(tt.height)}function S(tt){return s?!1:tt.wrapS!==Jo||tt.wrapT!==Jo||tt.minFilter!==Li&&tt.minFilter!==oi}function C(tt,$){return tt.generateMipmaps&&$&&tt.minFilter!==Li&&tt.minFilter!==oi}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!==oi?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===iU||tt===oU?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={[jP]:10497,[Jo]:33071,[XP]:33648},St={[Li]:9728,[iU]:9984,[oU]:9986,[oi]:9729,[kht]:9985,[ox]: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!==oi&&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===jd&&t.has("OES_texture_float_linear")===!1||s===!1&&$.type===Cv&&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===jd?Wt=36012:$.type===HP?Wt=33190:$.type===Av?Wt=35056:Wt=33189:$.type===jd&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),$.format===z0&&Wt===6402&&$.type!==G3&&$.type!==HP&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),$.type=G3,Ct=o.convert($.type)),$.format===kv&&Wt===6402&&(Wt=34041,$.type!==Av&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),$.type=Av,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===jd?$t=36012:he.type===HP&&($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===z0)$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,36096,3553,$t,0,he):e.framebufferTexture2D(36160,36096,3553,$t,0);else if($.depthTexture.format===kv)$.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===aU||It!==Qd&&(It===Yn?s===!1?t.has("EXT_sRGB")===!0&&$t===Qo?(tt.format=aU,tt.minFilter=oi,tt.generateMipmaps=!1):$=Kf.sRGBToLinear($):($t!==Qo||he!==Zd)&&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 Xfe(e,t,r){let n=r.isWebGL2;function i(o,a=null){let s;if(o===Zd)return 5121;if(o===pfe)return 32819;if(o===dfe)return 32820;if(o===ufe)return 5120;if(o===hfe)return 5122;if(o===G3)return 5123;if(o===ffe)return 5124;if(o===HP)return 5125;if(o===jd)return 5126;if(o===Cv)return n?5131:(s=t.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(o===mfe)return 6406;if(o===Qo)return 6408;if(o===gfe)return 6409;if(o===_fe)return 6410;if(o===z0)return 6402;if(o===kv)return 34041;if(o===yfe)return 6403;if(o===aU)return s=t.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(o===vfe)return 36244;if(o===xfe)return 33319;if(o===bfe)return 33320;if(o===wfe)return 36249;if(o===ZV||o===JV||o===QV||o===tU)if(a===Yn)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(o===ZV)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===JV)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===tU)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(o===ZV)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===JV)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===tU)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===Iut||o===Lut||o===kut||o===Rut)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(o===Iut)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===Lut)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===kut)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===Rut)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===Sfe)return s=t.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===Nut||o===Dut)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(o===Nut)return a===Yn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===Dut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(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||o===$ut)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(o===Out)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===zut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===Fut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===But)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===Hut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===Vut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===Uut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===qut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===Gut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===Wut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===Yut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===jut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===Xut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===$ut)return a===Yn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===Kut)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(o===Kut)return a===Yn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(o===Av)return n?34042:(s=t.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null)}return{convert:i}}var r6=class extends Ui{constructor(t=[]){super(),this.cameras=t}};r6.prototype.isArrayCamera=!0;var Xd=class extends or{constructor(){super(),this.type="Group"}};Xd.prototype.isGroup=!0;var Cgr={type:"move"},UP=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Xd,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 Xd,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 Xd,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(Cgr))),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 Xd;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 xi{constructor(t,r,n,i,o,a,s,l,c,u){if(u=u!==void 0?u:z0,u!==z0&&u!==kv)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&u===z0&&(n=G3),n===void 0&&u===kv&&(n=Av),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 rht=class extends Us{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 r6;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 UP,x[ot]=st),st.getTargetRaySpace()},this.getControllerGrip=function(ot){let st=x[ot];return st===void 0&&(st=new UP,x[ot]=st),st.getGripSpace()},this.getHand=function(ot){let st=x[ot];return st===void 0&&(st=new UP,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 us(f.framebufferWidth,f.framebufferHeight,{format:Qo,type:Zd,encoding:t.outputEncoding})}else{p=g.antialias;let st=null,St=null,bt=null;g.depth&&(bt=g.stencil?35056:33190,st=g.stencil?kv:z0,St=g.stencil?Av: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:Zd,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 us(h.textureWidth,h.textureHeight,{format:Qo,type:Zd,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 zfe;rt.setAnimationLoop(Z),this.setAnimationLoop=function(ot){W=ot},this.dispose=function(){}}};function Agr(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 Pgr(){let e=QP("canvas");return e.style.display="block",e}function rn(e={}){let t=e.canvas!==void 0?e.canvas:Pgr(),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=Qd,this.physicallyCorrectLights=!1,this.toneMapping=Kd,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 Nv,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${YU}`),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 Jdr(lt),ct=new Ydr(lt,_t,e),_t.init(ct),be=new Xfe(lt,_t,ct),X=new Egr(lt,_t,ct),et=new emr(lt),dt=new dgr,q=new Tgr(lt,_t,X,dt,ct,be,et),pt=new Xdr(g),ht=new Zdr(g),wt=new gfr(lt,ct),nt=new Gdr(lt,_t,wt,ct),kt=new Qdr(lt,wt,et,nt),ie=new omr(lt,kt,wt,et),$t=new imr(lt,ct,q),tt=new jdr(dt),ee=new pgr(g,pt,ht,_t,ct,nt,tt),Le=new Agr(dt),ar=new ggr,fr=new wgr(_t,ct),It=new qdr(g,pt,X,ie,n,s),$=new jfe(g,ie,ct),he=new Wdr(lt,_t,et,ct),Tt=new tmr(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 rht(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 np=Ke!==null?Ke.count:Xr.count,um=Et.drawRange.start*_r,mr=Et.drawRange.count*_r,Fl=Ve!==null?Ve.start*_r:0,$n=Ve!==null?Ve.count*_r:1/0,Bl=Math.max(um,Fl),ux=Math.min(np,um+mr,Fl+$n)-1,Hl=Math.max(0,ux-Bl+1);if(Hl!==0){if(Ft.isMesh)xt.wireframe===!0?(X.setLineWidth(xt.wireframeLinewidth*Mt()),Xn.setMode(1)):Xn.setMode(4);else if(Ft.isLine){let Vl=xt.linewidth;Vl===void 0&&(Vl=1),X.setLineWidth(Vl*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(Bl,Hl,Ft.count);else if(Et.isInstancedBufferGeometry){let Vl=Math.min(Et.instanceCount,Et._maxInstanceCount);Xn.renderInstances(Bl,Hl,Vl)}else Xn.render(Bl,Hl)}},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];cm(Ve,K,Et)}else cm(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 zfe;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];Pa(h,K,Ue,Ue.viewport)}}else Pa(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 Pa(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&&Ia(Ft,gt,Et),Ve.length>0&&Ia(Ve,gt,Et),Ue.length>0&&Ia(Ue,gt,Et)}function ho(K,gt,Et){if(ot===null){let Ue=a===!0&&ct.isWebGL2===!0?j3:us;ot=new Ue(1024,1024,{generateMipmaps:!0,type:be.convert(Cv)!==null?Cv:Zd,minFilter:ox,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=Kd,Ia(K,gt,Et),g.toneMapping=Ft,q.updateMultisampleRenderTarget(ot),q.updateRenderTargetMipmap(ot),g.setRenderTarget(xt)}function Ia(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)&&lx(tr,gt,Et,Ke,Xr,_r)}}function lx(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===Lv?(Ft.side=Ii,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=Iv,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=Lv):g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),K.onAfterRender(g,gt,Et,xt,Ft,Ve)}function cm(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 J0(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),J0(K,tr),xt.needsLights=rp(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(),np=B0.seqWithValue(Xn.seq,Pr);return xt.currentProgram=_r,xt.uniformsList=np,_r}function J0(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:Qd,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,np=Et.morphAttributes.position?Et.morphAttributes.position.length:0,um=xt.toneMapped?g.toneMapping:Kd,mr=dt.get(xt),Fl=f.state.lights;if(Z===!0&&(rt===!0||K!==C)){let qs=K===C&&xt.id===S;tt.setState(xt,K,qs)}let $n=!1;xt.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==Fl.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!==um||ct.isWebGL2===!0&&mr.morphTargetsCount!==np)&&($n=!0):($n=!0,mr.__version=xt.version);let Bl=mr.currentProgram;$n===!0&&(Bl=cm(xt,gt,Ft));let ux=!1,Hl=!1,Vl=!1,Yi=Bl.getUniforms(),hm=mr.uniforms;if(X.useProgram(Bl.program)&&(ux=!0,Hl=!0,Vl=!0),xt.id!==S&&(S=xt.id,Hl=!0),ux||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,Hl=!0,Vl=!0),xt.isShaderMaterial||xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshStandardMaterial||xt.envMap){let qs=Yi.map.cameraPosition;qs!==void 0&&qs.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 qs=Ft.skeleton;qs&&(ct.floatVertexTextures?(qs.boneTexture===null&&qs.computeBoneTexture(),Yi.setValue(lt,"boneTexture",qs.boneTexture,q),Yi.setValue(lt,"boneTextureSize",qs.boneTextureSize)):Yi.setOptional(lt,qs,"boneMatrices"))}return!!Et&&(Et.morphAttributes.position!==void 0||Et.morphAttributes.normal!==void 0)&&$t.update(Ft,Et,xt,Bl),(Hl||mr.receiveShadow!==Ft.receiveShadow)&&(mr.receiveShadow=Ft.receiveShadow,Yi.setValue(lt,"receiveShadow",Ft.receiveShadow)),Hl&&(Yi.setValue(lt,"toneMappingExposure",g.toneMappingExposure),mr.needsLights&&cx(hm,Vl),Ve&&xt.fog&&Le.refreshFogUniforms(hm,Ve),Le.refreshMaterialUniforms(hm,xt,I,B,ot),B0.upload(lt,mr.uniformsList,hm,q)),xt.isShaderMaterial&&xt.uniformsNeedUpdate===!0&&(B0.upload(lt,mr.uniformsList,hm,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),Bl}function cx(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 rp(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===Cv&&(_t.has("EXT_color_buffer_half_float")||ct.isWebGL2&&_t.has("EXT_color_buffer_float"));if(_r!==Zd&&be.convert(_r)!==lt.getParameter(35738)&&!(_r===jd&&(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),np=lt.getParameter(3316),um=lt.getParameter(3315),mr=lt.getParameter(32877),Fl=Et.isCompressedTexture?Et.mipmaps[0]:Et.image;lt.pixelStorei(3314,Fl.width),lt.pixelStorei(32878,Fl.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,Fl.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,Fl.data)):lt.texSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Xr,Fl),lt.pixelStorei(3314,Pr),lt.pixelStorei(32878,Xn),lt.pixelStorei(3316,np),lt.pixelStorei(3315,um),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 mU=class extends rn{};mU.prototype.isWebGL1Renderer=!0;var Ov=class{constructor(t,r=25e-5){this.name="",this.color=new ne(t),this.density=r}clone(){return new Ov(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Ov.prototype.isFogExp2=!0;var zv=class{constructor(t,r=1,n=1e3){this.name="",this.color=new ne(t),this.near=r,this.far=n}clone(){return new zv(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};zv.prototype.isFog=!0;var q0=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}};q0.prototype.isScene=!0;var em=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=Nl()}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=Nl()),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=Nl()),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}}};em.prototype.isInterleavedBuffer=!0;var Ai=new j,tp=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 tp(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}}};tp.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,NP=new j,D3=new j,O3=new j,z3=new Lt,DP=new Lt,$fe=new Me,IV=new j,OP=new j,LV=new j,Yue=new Lt,mut=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 em(r,5);N3.setIndex([0,1,2,0,2,3]),N3.setAttribute("position",new tp(n,3,0,!1)),N3.setAttribute("uv",new tp(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),$fe.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;kV(IV.set(-.5,-.5,0),O3,a,D3,i,o),kV(OP.set(.5,-.5,0),O3,a,D3,i,o),kV(LV.set(.5,.5,0),O3,a,D3,i,o),Yue.set(0,0),mut.set(1,0),jue.set(1,1);let s=t.ray.intersectTriangle(IV,OP,LV,!1,NP);if(s===null&&(kV(OP.set(-.5,.5,0),O3,a,D3,i,o),mut.set(0,1),s=t.ray.intersectTriangle(IV,LV,OP,!1,NP),s===null))return;let l=t.ray.origin.distanceTo(NP);l<t.near||l>t.far||r.push({distance:l,point:NP.clone(),uv:ai.getUV(NP,IV,OP,LV,Yue,mut,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 kV(e,t,r,n,i,o){z3.subVectors(e,r).addScalar(.5).multiply(n),i!==void 0?(DP.x=o*z3.x-i*z3.y,DP.y=i*z3.x+o*z3.y):DP.copy(z3),e.copy(t),e.x+=DP.x,e.y+=DP.y,e.applyMatrix4($fe)}var RV=new j,Xue=new j,gU=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){RV.setFromMatrixPosition(this.matrixWorld);let i=t.ray.origin.distanceTo(RV);this.getObjectForDistance(i).raycast(t,r)}}update(t){let r=this.levels;if(r.length>1){RV.setFromMatrixPosition(t.matrixWorld),Xue.setFromMatrixPosition(this.matrixWorld);let n=RV.distanceTo(Xue)/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}},$ue=new j,Kue=new en,Zue=new en,Igr=new j,Jue=new Me,aM=class extends ei{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;Kue.fromBufferAttribute(i.attributes.skinIndex,t),Zue.fromBufferAttribute(i.attributes.skinWeight,t),$ue.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let o=0;o<4;o++){let a=Zue.getComponent(o);if(a!==0){let s=Kue.getComponent(o);Jue.multiplyMatrices(n.bones[s].matrixWorld,n.boneInverses[s]),r.addScaledVector(Igr.copy($ue).applyMatrix4(Jue),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 Jd=class extends xi{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}};Jd.prototype.isDataTexture=!0;var Que=new Me,Lgr=new Me,lM=class{constructor(t=[],r=[]){this.uuid=Nl(),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:Lgr;Que.multiplyMatrices(s,r[o]),Que.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=kfe(t),t=Math.max(t,4);let r=new Float32Array(t*t*4);r.set(this.boneMatrices);let n=new Jd(r,t,t,Qo,jd);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}},rm=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}};rm.prototype.isInstancedBufferAttribute=!0;var the=new Me,ehe=new Me,NV=[],zP=new ei,n6=class extends ei{constructor(t,r,n){super(t,r),this.instanceMatrix=new rm(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(zP.geometry=this.geometry,zP.material=this.material,zP.material!==void 0)for(let o=0;o<i;o++){this.getMatrixAt(o,the),ehe.multiplyMatrices(n,the),zP.matrixWorld=ehe,zP.raycast(t,NV);for(let a=0,s=NV.length;a<s;a++){let l=NV[a];l.instanceId=o,l.object=this,r.push(l)}NV.length=0}}setColorAt(t,r){this.instanceColor===null&&(this.instanceColor=new rm(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"})}};n6.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 rhe=new j,nhe=new j,ihe=new Me,gut=new Jf,DV=new Zf,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++)rhe.fromBufferAttribute(r,i-1),nhe.fromBufferAttribute(r,i),n[i]=n[i-1],n[i]+=rhe.distanceTo(nhe);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(),DV.copy(n.boundingSphere),DV.applyMatrix4(i),DV.radius+=o,t.ray.intersectsSphere(DV)===!1)return;ihe.copy(i).invert(),gut.copy(t.ray).applyMatrix4(ihe);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),gut.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),gut.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 ohe=new j,ahe=new j,Aa=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)ohe.fromBufferAttribute(r,i),ahe.fromBufferAttribute(r,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ohe.distanceTo(ahe);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}};Aa.prototype.isLineSegments=!0;var i6=class extends ch{constructor(t,r){super(t,r),this.type="LineLoop"}};i6.prototype.isLineLoop=!0;var nm=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}};nm.prototype.isPointsMaterial=!0;var she=new Me,nht=new Jf,OV=new Zf,zV=new j,im=class extends or{constructor(t=new Pe,r=new nm){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(),OV.copy(n.boundingSphere),OV.applyMatrix4(i),OV.radius+=o,t.ray.intersectsSphere(OV)===!1)return;she.copy(i).invert(),nht.copy(t.ray).applyMatrix4(she);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);zV.fromBufferAttribute(h,_),lhe(zV,_,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++)zV.fromBufferAttribute(h,d),lhe(zV,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.")}}};im.prototype.isPoints=!0;function lhe(e,t,r,n,i,o,a){let s=nht.distanceSqToPoint(e);if(s<r){let l=new j;nht.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 _U=class extends xi{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:oi,this.magFilter=o!==void 0?o:oi,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)}};_U.prototype.isVideoTexture=!0;var yU=class extends xi{constructor(t,r,n){super({width:t,height:r}),this.format=n,this.magFilter=Li,this.minFilter=Li,this.generateMipmaps=!1,this.needsUpdate=!0}};yU.prototype.isFramebufferTexture=!0;var o6=class extends xi{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}};o6.prototype.isCompressedTexture=!0;var vU=class extends xi{constructor(t,r,n,i,o,a,s,l,c){super(t,r,n,i,o,a,s,l,c),this.needsUpdate=!0}};vU.prototype.isCanvasTexture=!0;var Fv=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 Fv(t.radius,t.segments,t.thetaStart,t.thetaLength)}},om=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 om(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},Bv=class extends om{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 Bv(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)}},Hv=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 Hv(t.radius,t.detail)}},FV=new j,BV=new j,_ut=new j,HV=new ai,a6=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(Pv*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}=HV;if(g.fromBufferAttribute(s,c[0]),_.fromBufferAttribute(s,c[1]),y.fromBufferAttribute(s,c[2]),HV.getNormal(_ut),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=HV[u[x]],k=HV[u[b]],O=`${S}_${C}`,D=`${C}_${S}`;D in f&&f[D]?(_ut.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:_ut.clone()})}}for(let d in f)if(f[d]){let{index0:g,index1:_}=f[d];FV.fromBufferAttribute(s,g),BV.fromBufferAttribute(s,_),p.push(FV.x,FV.y,FV.z),p.push(BV.x,BV.y,BV.z)}this.setAttribute("position",new xe(p,3))}}},fs=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}},Vv=class extends fs{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}};Vv.prototype.isEllipseCurve=!0;var s6=class extends Vv{constructor(t,r,n,i,o,a){super(t,r,n,n,i,o,a),this.type="ArcCurve"}};s6.prototype.isArcCurve=!0;function Oht(){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 VV=new j,yut=new Oht,vut=new Oht,xut=new Oht,l6=class extends fs{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]:(VV.subVectors(i[0],i[1]).add(i[0]),c=VV);let h=i[s%o],f=i[(s+1)%o];if(this.closed||s+2<o?u=i[(s+2)%o]:(VV.subVectors(i[o-1],i[o-2]).add(i[o-1]),u=VV),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),yut.initNonuniformCatmullRom(c.x,h.x,f.x,u.x,d,g,_),vut.initNonuniformCatmullRom(c.y,h.y,f.y,u.y,d,g,_),xut.initNonuniformCatmullRom(c.z,h.z,f.z,u.z,d,g,_)}else this.curveType==="catmullrom"&&(yut.initCatmullRom(c.x,h.x,f.x,u.x,this.tension),vut.initCatmullRom(c.y,h.y,f.y,u.y,this.tension),xut.initCatmullRom(c.z,h.z,f.z,u.z,this.tension));return n.set(yut.calc(l),vut.calc(l),xut.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}};l6.prototype.isCatmullRomCurve3=!0;function che(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 kgr(e,t){let r=1-e;return r*r*t}function Rgr(e,t){return 2*(1-e)*e*t}function Ngr(e,t){return e*e*t}function qP(e,t,r,n){return kgr(e,t)+Rgr(e,r)+Ngr(e,n)}function Dgr(e,t){let r=1-e;return r*r*r*t}function Ogr(e,t){let r=1-e;return 3*r*r*e*t}function zgr(e,t){return 3*(1-e)*e*e*t}function Fgr(e,t){return e*e*e*t}function GP(e,t,r,n,i){return Dgr(e,t)+Ogr(e,r)+zgr(e,n)+Fgr(e,i)}var cM=class extends fs{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(GP(t,i.x,o.x,a.x,s.x),GP(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 c6=class extends fs{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(GP(t,i.x,o.x,a.x,s.x),GP(t,i.y,o.y,a.y,s.y),GP(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}};c6.prototype.isCubicBezierCurve3=!0;var Uv=class extends fs{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}};Uv.prototype.isLineCurve=!0;var xU=class extends fs{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 fs{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(qP(t,i.x,o.x,a.x),qP(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 fs{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(qP(t,i.x,o.x,a.x),qP(t,i.y,o.y,a.y),qP(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 fs{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(che(s,l.x,c.x,u.x,h.x),che(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 zht=Object.freeze({__proto__:null,ArcCurve:s6,CatmullRomCurve3:l6,CubicBezierCurve:cM,CubicBezierCurve3:c6,EllipseCurve:Vv,LineCurve:Uv,LineCurve3:xU,QuadraticBezierCurve:uM,QuadraticBezierCurve3:hM,SplineCurve:fM}),bU=class extends fs{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 Uv(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 zht[i.type]().fromJSON(i))}return this}},qv=class extends bU{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 Uv(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 Vv(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 qv{constructor(t){super(t),this.uuid=Nl(),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 qv().fromJSON(i))}return this}},Bgr={triangulate:function(e,t,r=2){let n=t&&t.length,i=n?t[0]*r:e.length,o=Kfe(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=Ggr(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 u6(o,a,r,s,l,p),a}};function Kfe(e,t,r,n,i){let o,a;if(i===e0r(e,t,r,n)>0)for(o=t;o<r;o+=n)a=uhe(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=uhe(o,e[o],e[o+1],a);return a&&KU(a,a.next)&&(f6(a),a=a.next),a}function G0(e,t){if(!e)return e;t||(t=e);let r=e,n;do if(n=!1,!r.steiner&&(KU(r,r.next)||si(r.prev,r,r.next)===0)){if(f6(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function u6(e,t,r,n,i,o,a){if(!e)return;!a&&o&&$gr(e,n,i,o);let s=e,l,c;for(;e.prev!==e.next;){if(l=e.prev,c=e.next,o?Vgr(e,n,i,o):Hgr(e)){t.push(l.i/r),t.push(e.i/r),t.push(c.i/r),f6(e),e=c.next,s=c.next;continue}if(e=c,e===s){a?a===1?(e=Ugr(G0(e),t,r),u6(e,t,r,n,i,o,2)):a===2&&qgr(e,t,r,n,i,o):u6(G0(e),t,r,n,i,o,1);break}}}function Hgr(e){let t=e.prev,r=e,n=e.next;if(si(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)&&si(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vgr(e,t,r,n){let i=e.prev,o=e,a=e.next;if(si(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=iht(s,l,t,r,n),f=iht(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)&&si(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)&&si(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)&&si(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)&&si(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ugr(e,t,r){let n=e;do{let i=n.prev,o=n.next.next;!KU(i,o)&&Zfe(i,n,n.next,o)&&h6(i,o)&&h6(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),f6(n),f6(n.next),n=e=o),n=n.next}while(n!==e);return G0(n)}function qgr(e,t,r,n,i,o){let a=e;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&Jgr(a,s)){let l=Jfe(a,s);a=G0(a,a.next),l=G0(l,l.next),u6(a,t,r,n,i,o),u6(l,t,r,n,i,o);return}s=s.next}a=a.next}while(a!==e)}function Ggr(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=Kfe(e,s,l,n,!1),c===c.next&&(c.steiner=!0),i.push(Zgr(c));for(i.sort(Wgr),o=0;o<i.length;o++)Ygr(i[o],r),r=G0(r,r.next);return r}function Wgr(e,t){return e.x-t.x}function Ygr(e,t){if(t=jgr(e,t),t){let r=Jfe(t,e);G0(t,t.next),G0(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),h6(r,e)&&(h<u||h===u&&(r.x>a.x||r.x===a.x&&Xgr(a,r)))&&(a=r,u=h)),r=r.next;while(r!==s);return a}function Xgr(e,t){return si(e.prev,e,t.prev)<0&&si(t.next,e,e.next)<0}function $gr(e,t,r,n){let i=e;do i.z===null&&(i.z=iht(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,Kgr(i)}function Kgr(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 iht(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 Zgr(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 Jgr(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Qgr(e,t)&&(h6(e,t)&&h6(t,e)&&t0r(e,t)&&(si(e.prev,e,t.prev)||si(e,t.prev,t))||KU(e,t)&&si(e.prev,e,e.next)>0&&si(t.prev,t,t.next)>0)}function si(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function KU(e,t){return e.x===t.x&&e.y===t.y}function Zfe(e,t,r,n){let i=qV(si(e,t,r)),o=qV(si(e,t,n)),a=qV(si(r,n,e)),s=qV(si(r,n,t));return!!(i!==o&&a!==s||i===0&&UV(e,r,t)||o===0&&UV(e,n,t)||a===0&&UV(r,e,n)||s===0&&UV(r,t,n))}function UV(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 qV(e){return e>0?1:e<0?-1:0}function Qgr(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&&Zfe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function h6(e,t){return si(e.prev,e,e.next)<0?si(e,t,e.next)>=0&&si(e,e.prev,t)>=0:si(e,t,e.prev)<0||si(e,e.next,t)<0}function t0r(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 Jfe(e,t){let r=new oht(e.i,e.x,e.y),n=new oht(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 uhe(e,t,r,n){let i=new oht(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 f6(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 oht(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 e0r(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=[];hhe(t),fhe(n,t);let a=t.length;r.forEach(hhe);for(let l=0;l<r.length;l++)i.push(a),a+=r[l].length,fhe(n,r[l]);let s=Bgr.triangulate(n,i);for(let l=0;l<s.length;l+=3)o.push(s.slice(l,l+3));return o}};function hhe(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function fhe(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:r0r;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 n0r(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 zht[i.type]().fromJSON(i)),new hh(n,t.options)}},r0r={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 n0r(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 Gv=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 Gv(t.radius,t.detail)}},Wv=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 Wv(t.points,t.segments,t.phiStart,t.phiLength)}},W0=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 W0(t.radius,t.detail)}},Yv=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 Yv(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}},Y0=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 i0r(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 Y0(n,t.curveSegments)}};function i0r(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 j0=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 j0(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}},jv=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 jv(t.radius,t.detail)}},Xv=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 Xv(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}},$v=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 $v(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}},Kv=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 Kv(new zht[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}},p6=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),phe(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),phe(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 phe(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 dhe=Object.freeze({__proto__:null,BoxGeometry:Qf,BoxBufferGeometry:Qf,CircleGeometry:Fv,CircleBufferGeometry:Fv,ConeGeometry:Bv,ConeBufferGeometry:Bv,CylinderGeometry:om,CylinderBufferGeometry:om,DodecahedronGeometry:Hv,DodecahedronBufferGeometry:Hv,EdgesGeometry:a6,ExtrudeGeometry:hh,ExtrudeBufferGeometry:hh,IcosahedronGeometry:Gv,IcosahedronBufferGeometry:Gv,LatheGeometry:Wv,LatheBufferGeometry:Wv,OctahedronGeometry:W0,OctahedronBufferGeometry:W0,PlaneGeometry:V0,PlaneBufferGeometry:V0,PolyhedronGeometry:uh,PolyhedronBufferGeometry:uh,RingGeometry:Yv,RingBufferGeometry:Yv,ShapeGeometry:Y0,ShapeBufferGeometry:Y0,SphereGeometry:j0,SphereBufferGeometry:j0,TetrahedronGeometry:jv,TetrahedronBufferGeometry:jv,TorusGeometry:Xv,TorusBufferGeometry:Xv,TorusKnotGeometry:$v,TorusKnotBufferGeometry:$v,TubeGeometry:Kv,TubeBufferGeometry:Kv,WireframeGeometry:p6}),d6=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}};d6.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=ax,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 m6=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}};m6.prototype.isMeshPhysicalMaterial=!0;var g6=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=ax,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=D6,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}};g6.prototype.isMeshPhongMaterial=!0;var _6=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=ax,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}};_6.prototype.isMeshToonMaterial=!0;var y6=class extends qi{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,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}};y6.prototype.isMeshNormalMaterial=!0;var v6=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=D6,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}};v6.prototype.isMeshLambertMaterial=!0;var x6=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=ax,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}};x6.prototype.isMeshMatcapMaterial=!0;var b6=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}};b6.prototype.isLineDashedMaterial=!0;var o0r=Object.freeze({__proto__:null,ShadowMaterial:d6,SpriteMaterial:iM,RawShaderMaterial:U0,ShaderMaterial:lh,PointsMaterial:nm,MeshPhysicalMaterial:m6,MeshStandardMaterial:pM,MeshPhongMaterial:g6,MeshToonMaterial:_6,MeshNormalMaterial:y6,MeshLambertMaterial:v6,MeshDepthMaterial:eM,MeshDistanceMaterial:rM,MeshBasicMaterial:sh,MeshMatcapMaterial:x6,LineDashedMaterial:b6,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 vi().fromArray(g).normalize().conjugate().toArray(g);let _=c.times.length;for(let y=0;y<_;++y){let x=y*p+f;if(l==="quaternion")vi.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=Rht,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 wU=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:Ev,endingEnd:Ev}}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 Tv:o=t,s=2*r-n;break;case ZP: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 Tv:a=t,l=2*n-r;break;case ZP: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}},w6=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}},SU=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},Dl=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 SU(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new w6(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new wU(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let r;switch(t){case $P:r=this.InterpolantFactoryMethodDiscrete;break;case KP:r=this.InterpolantFactoryMethodLinear;break;case eU: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 $P;case this.InterpolantFactoryMethodLinear:return KP;case this.InterpolantFactoryMethodSmooth:return eU}}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()===eU,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}};Dl.prototype.TimeBufferType=Float32Array;Dl.prototype.ValueBufferType=Float32Array;Dl.prototype.DefaultInterpolation=KP;var am=class extends Dl{};am.prototype.ValueTypeName="bool";am.prototype.ValueBufferType=Array;am.prototype.DefaultInterpolation=$P;am.prototype.InterpolantFactoryMethodLinear=void 0;am.prototype.InterpolantFactoryMethodSmooth=void 0;var S6=class extends Dl{};S6.prototype.ValueTypeName="color";var Zv=class extends Dl{};Zv.prototype.ValueTypeName="number";var MU=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)vi.slerpFlat(o,0,a,c-s,a,c,l);return o}},X0=class extends Dl{InterpolantFactoryMethodLinear(t){return new MU(this.times,this.values,this.getValueSize(),t)}};X0.prototype.ValueTypeName="quaternion";X0.prototype.DefaultInterpolation=KP;X0.prototype.InterpolantFactoryMethodSmooth=void 0;var sm=class extends Dl{};sm.prototype.ValueTypeName="string";sm.prototype.ValueBufferType=Array;sm.prototype.DefaultInterpolation=$P;sm.prototype.InterpolantFactoryMethodLinear=void 0;sm.prototype.InterpolantFactoryMethodSmooth=void 0;var Jv=class extends Dl{};Jv.prototype.ValueTypeName="vector";var Qv=class{constructor(t,r=-1,n,i=XU){this.name=t,this.tracks=n,this.duration=r,this.blendMode=i,this.uuid=Nl(),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(s0r(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(Dl.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 Zv(".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 Zv(".morphTargetInfluence["+g+"]",_,y))}l=p.length*(a||1)}else{let p=".bones["+r[h].name+"]";n(Jv,p+".position",f,"pos",i),n(X0,p+".quaternion",f,"rot",i),n(Jv,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 a0r(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Zv;case"vector":case"vector2":case"vector3":case"vector4":return Jv;case"color":return S6;case"quaternion":return X0;case"bool":case"boolean":return am;case"string":return sm}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function s0r(e){if(e.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=a0r(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 tx={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={}}},M6=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}}},Qfe=new M6,ea=class{constructor(t){this.manager=t!==void 0?t:Qfe,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}},Yd={},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=tx.get(t);if(o!==void 0)return this.manager.itemStart(t),setTimeout(()=>{r&&r(o),this.manager.itemEnd(t)},0),o;if(Yd[t]!==void 0){Yd[t].push({onLoad:r,onProgress:n,onError:i});return}Yd[t]=[],Yd[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=Yd[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=>{tx.add(t,c);let u=Yd[t];delete Yd[t];for(let h=0,f=u.length;h<f;h++){let p=u[h];p.onLoad&&p.onLoad(c)}}).catch(c=>{let u=Yd[t];if(u===void 0)throw this.manager.itemError(t),c;delete Yd[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}},aht=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=Qv.parse(t[n]);r.push(i)}return r}},sht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=[],s=new o6,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=oi),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=oi),s.format=f.format,s.needsUpdate=!0,r&&r(s)},n,i);return s}},ex=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=tx.get(t);if(a!==void 0)return o.manager.itemStart(t),setTimeout(function(){r&&r(a),o.manager.itemEnd(t)},0),a;let s=QP("img");function l(){u(),tx.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}},EU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new H0,a=new ex(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}},TU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jd,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:oi,a.minFilter=c.minFilter!==void 0?c.minFilter:oi,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=ox),c.mipmapCount===1&&(a.minFilter=oi),c.generateMipmaps!==void 0&&(a.generateMipmaps=c.generateMipmaps),a.needsUpdate=!0,r&&r(a,c))},n,i),a}},CU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new xi,a=new ex(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}},Ol=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}};Ol.prototype.isLight=!0;var E6=class extends Ol{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 Ol.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}};E6.prototype.isHemisphereLight=!0;var mhe=new Me,ghe=new j,_he=new j,T6=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 Nv,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;ghe.setFromMatrixPosition(t.matrixWorld),r.position.copy(ghe),_he.setFromMatrixPosition(t.target.matrixWorld),r.lookAt(_he),r.updateMatrixWorld(),mhe.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(mhe),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}},AU=class extends T6{constructor(){super(new Ui(50,1,.5,500)),this.focus=1}updateMatrices(t){let r=this.camera,n=JP*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}};AU.prototype.isSpotLightShadow=!0;var C6=class extends Ol{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 AU}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}};C6.prototype.isSpotLight=!0;var yhe=new Me,FP=new j,but=new j,PU=class extends T6{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()),FP.setFromMatrixPosition(t.matrixWorld),n.position.copy(FP),but.copy(n.position),but.add(this._cubeDirections[r]),n.up.copy(this._cubeUps[r]),n.lookAt(but),n.updateMatrixWorld(),i.makeTranslation(-FP.x,-FP.y,-FP.z),yhe.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(yhe)}};PU.prototype.isPointLightShadow=!0;var A6=class extends Ol{constructor(t,r,n=0,i=1){super(t,r),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new PU}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}};A6.prototype.isPointLight=!0;var IU=class extends T6{constructor(){super(new Dv(-5,5,5,-5,.5,500))}};IU.prototype.isDirectionalLightShadow=!0;var P6=class extends Ol{constructor(t,r){super(t,r),this.type="DirectionalLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.target=new or,this.shadow=new IU}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};P6.prototype.isDirectionalLight=!0;var I6=class extends Ol{constructor(t,r){super(t,r),this.type="AmbientLight"}};I6.prototype.isAmbientLight=!0;var L6=class extends Ol{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}};L6.prototype.isRectAreaLight=!0;var k6=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)}};k6.prototype.isSphericalHarmonics3=!0;var rx=class extends Ol{constructor(t=new k6,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}};rx.prototype.isLightProbe=!0;var LU=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 o0r[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)}},R6=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}};R6.prototype.isInstancedBufferGeometry=!0;var kU=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 em(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 R6: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 tp(_,d.itemSize,d.offset,d.normalized)}else{let _=B3(d.type,d.array),y=d.isInstancedBufferAttribute?rm: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 tp(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 Zf(p,f.radius)}return t.name&&(a.name=t.name),t.userData&&(a.userData=t.userData),a}},lht=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 kU;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 dhe?s=dhe[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 LU;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=Qv.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 M6(r);o=new ex(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 Jd(_.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 ex(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 Jd(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 H0(c),c.length===6&&(l.needsUpdate=!0)):(c&&c.data?l=new Jd(c.data,c.width,c.height):l=new xi(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,l0r)),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],vhe),l.wrapT=n(s.wrap[1],vhe)),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,xhe)),s.magFilter!==void 0&&(l.magFilter=n(s.magFilter,xhe)),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 q0,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 zv(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(a.fog=new Ov(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 Dv(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 I6(t.color,t.intensity);break;case"DirectionalLight":a=new P6(t.color,t.intensity);break;case"PointLight":a=new A6(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":a=new L6(t.color,t.intensity,t.width,t.height);break;case"SpotLight":a=new C6(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":a=new E6(t.color,t.groundColor,t.intensity);break;case"LightProbe":a=new rx().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 ei(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 n6(u,h,f),a.instanceMatrix=new rm(new Float32Array(p.array),16),d!==void 0&&(a.instanceColor=new rm(new Float32Array(d.array),d.itemSize));break;case"LOD":a=new gU;break;case"Line":a=new ch(s(t.geometry),l(t.material));break;case"LineLoop":a=new i6(s(t.geometry),l(t.material));break;case"LineSegments":a=new Aa(s(t.geometry),l(t.material));break;case"PointCloud":case"Points":a=new im(s(t.geometry),l(t.material));break;case"Sprite":a=new oM(l(t.material));break;case"Group":a=new Xd;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)}},l0r={UVMapping:jU,CubeReflectionMapping:nx,CubeRefractionMapping:ix,EquirectangularReflectionMapping:WP,EquirectangularRefractionMapping:YP,CubeUVReflectionMapping:xM,CubeUVRefractionMapping:O6},vhe={RepeatWrapping:jP,ClampToEdgeWrapping:Jo,MirroredRepeatWrapping:XP},xhe={NearestFilter:Li,NearestMipmapNearestFilter:iU,NearestMipmapLinearFilter:oU,LinearFilter:oi,LinearMipmapNearestFilter:kht,LinearMipmapLinearFilter:ox},RU=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=tx.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){tx.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)}};RU.prototype.isImageBitmapLoader=!0;var GV,Fht={getContext:function(){return GV===void 0&&(GV=new(window.AudioContext||window.webkitAudioContext)),GV},setContext:function(e){GV=e}},NU=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);Fht.getContext().decodeAudioData(l,function(u){r(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}},DU=class extends rx{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)}};DU.prototype.isHemisphereLightProbe=!0;var OU=class extends rx{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))}};OU.prototype.isAmbientLightProbe=!0;var bhe=new Me,whe=new Me,yv=new Me,cht=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,yv.copy(t.projectionMatrix);let i=r.eyeSep/2,o=i*r.near/r.focus,a=r.near*Math.tan(Pv*r.fov*.5)/r.zoom,s,l;whe.elements[12]=-i,bhe.elements[12]=i,s=-a*r.aspect+o,l=a*r.aspect+o,yv.elements[0]=2*r.near/(l-s),yv.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(yv),s=-a*r.aspect-o,l=a*r.aspect-o,yv.elements[0]=2*r.near/(l-s),yv.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(yv)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(whe),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(bhe)}},mM=class{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=She(),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=She();t=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=t}return t}};function She(){return(typeof performance=="undefined"?Date:performance).now()}var vv=new j,Mhe=new vi,c0r=new j,xv=new j,uht=class extends or{constructor(){super(),this.type="AudioListener",this.context=Fht.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(vv,Mhe,c0r),xv.set(0,0,-1).applyQuaternion(Mhe),r.positionX){let i=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(vv.x,i),r.positionY.linearRampToValueAtTime(vv.y,i),r.positionZ.linearRampToValueAtTime(vv.z,i),r.forwardX.linearRampToValueAtTime(xv.x,i),r.forwardY.linearRampToValueAtTime(xv.y,i),r.forwardZ.linearRampToValueAtTime(xv.z,i),r.upX.linearRampToValueAtTime(n.x,i),r.upY.linearRampToValueAtTime(n.y,i),r.upZ.linearRampToValueAtTime(n.z,i)}else r.setPosition(vv.x,vv.y,vv.z),r.setOrientation(xv.x,xv.y,xv.z,n.x,n.y,n.z)}},N6=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}},bv=new j,Ehe=new vi,u0r=new j,wv=new j,hht=class extends N6{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(bv,Ehe,u0r),wv.set(0,0,1).applyQuaternion(Ehe);let r=this.panner;if(r.positionX){let n=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(bv.x,n),r.positionY.linearRampToValueAtTime(bv.y,n),r.positionZ.linearRampToValueAtTime(bv.z,n),r.orientationX.linearRampToValueAtTime(wv.x,n),r.orientationY.linearRampToValueAtTime(wv.y,n),r.orientationZ.linearRampToValueAtTime(wv.z,n)}else r.setPosition(bv.x,bv.y,bv.z),r.setOrientation(wv.x,wv.y,wv.z)}},zU=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}},FU=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){vi.slerpFlat(t,r,t,r,t,n,i)}_slerpAdditive(t,r,n,i,o){let a=this._workIndex*o;vi.multiplyQuaternionsFlat(t,a,t,r,t,n),vi.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}}},Bht="\\[\\]\\.:\\/",h0r=new RegExp("["+Bht+"]","g"),Hht="[^"+Bht+"]",f0r="[^"+Bht.replace("\\.","")+"]",p0r=/((?:WC+[\/:])*)/.source.replace("WC",Hht),d0r=/(WCOD+)?/.source.replace("WCOD",f0r),m0r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Hht),g0r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Hht),_0r=new RegExp("^"+p0r+d0r+m0r+g0r+"$"),y0r=["material","materials","bones"],fht=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(h0r,"")}static parseTrackName(t){let r=_0r.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);y0r.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=fht;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 BU=class{constructor(){this.uuid=Nl(),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()}}};BU.prototype.isAnimationObjectGroup=!0;var pht=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:Ev,endingEnd:Ev};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=Efe,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 Rht:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case XU: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===Tfe;if(t===0)return o===-1?i:a&&(o&1)===1?r-i:i;if(n===Mfe){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=Tv,i.endingEnd=Tv):(t?i.endingStart=this.zeroSlopeAtStart?Tv:Ev:i.endingStart=ZP,r?i.endingEnd=this.zeroSlopeAtEnd?Tv:Ev:i.endingEnd=ZP)}_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}},HU=class extends Us{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 FU(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 w6(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"?Qv.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=XU),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 pht(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"?Qv.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))}};HU.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())}},VU=class extends em{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}};VU.prototype.isInstancedInterleavedBuffer=!0;var UU=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}};UU.prototype.isGLBufferAttribute=!0;var dht=class{constructor(t,r,n=0,i=1/0){this.ray=new Jf(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 mht(t,this,n,r),n.sort(The),n}intersectObjects(t,r=!0,n=[]){for(let i=0,o=t.length;i<o;i++)mht(t[i],this,n,r);return n.sort(The),n}};function The(e,t){return e.distance-t.distance}function mht(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++)mht(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)}},ght=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)}},Che=new Lt,$0=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=Che.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 Che.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)}};$0.prototype.isBox2=!0;var Ahe=new j,WV=new j,qU=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){Ahe.subVectors(t,this.start),WV.subVectors(this.end,this.start);let n=WV.dot(WV),o=WV.dot(Ahe)/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)}},Phe=new j,_ht=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 Aa(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),Phe.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Phe),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},O0=new j,YV=new Me,wut=new Me,GU=class extends Aa{constructor(t){let r=tpe(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");wut.copy(this.root.matrixWorld).invert();for(let o=0,a=0;o<r.length;o++){let s=r[o];s.parent&&s.parent.isBone&&(YV.multiplyMatrices(wut,s.matrixWorld),O0.setFromMatrixPosition(YV),i.setXYZ(a,O0.x,O0.y,O0.z),YV.multiplyMatrices(wut,s.parent.matrixWorld),O0.setFromMatrixPosition(YV),i.setXYZ(a+1,O0.x,O0.y,O0.z),a+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}};function tpe(e){let t=[];e&&e.isBone&&t.push(e);for(let r=0;r<e.children.length;r++)t.push.apply(t,tpe(e.children[r]));return t}var yht=class extends ei{constructor(t,r,n){let i=new j0(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)}},v0r=new j,Ihe=new ne,Lhe=new ne,vht=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 W0(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 ei(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");Ihe.copy(this.light.color),Lhe.copy(this.light.groundColor);for(let n=0,i=r.count;n<i;n++){let o=n<i/2?Ihe:Lhe;r.setXYZ(n,o.r,o.g,o.b)}r.needsUpdate=!0}t.lookAt(v0r.setFromMatrixPosition(this.light.matrixWorld).negate())}},WU=class extends Aa{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"}},xht=class extends Aa{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"}},khe=new j,jV=new j,Rhe=new j,bht=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(){khe.setFromMatrixPosition(this.light.matrixWorld),jV.setFromMatrixPosition(this.light.target.matrixWorld),Rhe.subVectors(jV,khe),this.lightPlane.lookAt(jV),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(jV),this.targetLine.scale.z=Rhe.length()}},XV=new j,yi=new Rv,wht=class extends Aa{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;yi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Pi("c",r,t,yi,0,0,-1),Pi("t",r,t,yi,0,0,1),Pi("n1",r,t,yi,-n,-i,-1),Pi("n2",r,t,yi,n,-i,-1),Pi("n3",r,t,yi,-n,i,-1),Pi("n4",r,t,yi,n,i,-1),Pi("f1",r,t,yi,-n,-i,1),Pi("f2",r,t,yi,n,-i,1),Pi("f3",r,t,yi,-n,i,1),Pi("f4",r,t,yi,n,i,1),Pi("u1",r,t,yi,n*.7,i*1.1,-1),Pi("u2",r,t,yi,-n*.7,i*1.1,-1),Pi("u3",r,t,yi,0,i*2,-1),Pi("cf1",r,t,yi,-n,0,1),Pi("cf2",r,t,yi,n,0,1),Pi("cf3",r,t,yi,0,-i,1),Pi("cf4",r,t,yi,0,i,1),Pi("cn1",r,t,yi,-n,0,-1),Pi("cn2",r,t,yi,n,0,-1),Pi("cn3",r,t,yi,0,-i,-1),Pi("cn4",r,t,yi,0,i,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function Pi(e,t,r,n,i,o,a){XV.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],XV.x,XV.y,XV.z)}}var $V=new ta,yM=class extends Aa{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&&$V.setFromObject(this.object),$V.isEmpty())return;let r=$V.min,n=$V.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 Aa.prototype.copy.call(this,t),this.object=t.object,this}},Sht=class extends Aa{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))}},Mht=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 ei(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:Iv,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}},Nhe=new j,KV,Sut,Eht=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",KV===void 0&&(KV=new Pe,KV.setAttribute("position",new xe([0,0,0,0,1,0],3)),Sut=new om(0,.5,1,5,1),Sut.translate(0,-.5,0)),this.position.copy(r),this.line=new ch(KV,new Gi({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ei(Sut,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{Nhe.set(t.z,0,-t.x).normalize();let r=Math.acos(t.y);this.quaternion.setFromAxisAngle(Nhe,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 Aa{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()}},Tht=class{constructor(){this.type="ShapePath",this.color=new ne,this.subPaths=[],this.currentPath=null}moveTo(t,r){return this.currentPath=new qv,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}},epe=new Float32Array(1),x0r=new Int32Array(epe.buffer),Cht=class{static toHalfFloat(t){t>65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),t=65504),epe[0]=t;let r=x0r[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)}},b0r=0,w0r=1,S0r=0,M0r=1,E0r=2;function T0r(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function C0r(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 A0r(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new im(e,t)}function P0r(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new oM(e)}function I0r(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new im(e,t)}function L0r(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function k0r(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function R0r(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function N0r(e,t,r){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new j(e,t,r)}function D0r(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 O0r(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new lU(e,t)}function z0r(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new cU(e,t)}function F0r(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new uU(e,t)}function B0r(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new hU(e,t)}function H0r(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new $3(e,t)}function V0r(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new fU(e,t)}function U0r(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new K3(e,t)}function q0r(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new xe(e,t)}function G0r(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new dU(e,t)}fs.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(fs.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e};qv.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)};function W0r(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new vM(e)}function Y0r(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 Aa(new a6(e.geometry),new Gi({color:t!==void 0?t:16777215}))}WU.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};GU.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function X0r(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Aa(new p6(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 $0r(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Jc(e)}function K0r(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new TU(e)}$0.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)};$0.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};$0.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};$0.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)};Zf.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Nv.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)};qU.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)};vi.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)};vi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};Jf.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};Jf.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)};Jf.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)};ai.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};ai.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)};ai.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)};ai.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)};ai.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)};ai.barycoordFromPoint=function(e,t,r,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ai.getBarycoord(e,t,r,n,i)};ai.normal=function(e,t,r,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ai.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 Y0(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.")}}});ei.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(ei.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Cfe},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(Ol.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}}});em.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(e===!0?Y3:W3),this};em.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.")};q0.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===Pht}},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:Qd}},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 Z0r(e,t,r){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Q3(e,r)}Object.defineProperties(us.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}}});N6.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return new NU().load(e,function(n){t.setBuffer(n)}),this};zU.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)};Kf.crossOrigin=void 0;Kf.loadTexture=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let i=new CU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Kf.loadTextureCube=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let i=new EU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Kf.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Kf.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function J0r(){console.error("THREE.CanvasRenderer has been removed")}function Q0r(){console.error("THREE.JSONLoader has been removed.")}var t_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 e_r(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function r_r(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Pe}function n_r(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Pe}function i_r(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function o_r(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function a_r(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:YU}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=YU);var rpe={type:"change"},Vht={type:"start"},npe={type:"end"},ZU=class extends Us{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:K0.ROTATE,MIDDLE:K0.DOLLY,RIGHT:K0.PAN},this.touches={ONE:Z0.ROTATE,TWO:Z0.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(rpe),n.update(),o=i.NONE},this.update=function(){let nt=new j,Ct=new vi().setFromUnitVectors(t.up,new j(0,1,0)),Wt=Ct.clone().invert(),fe=new j,at=new vi,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(rpe),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(npe),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 K0.DOLLY:if(n.enableZoom===!1)return;W(nt),o=i.DOLLY;break;case K0.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 K0.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(Vht)}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(Vht),St(nt),n.dispatchEvent(npe))}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 Z0.ROTATE:if(n.enableRotate===!1)return;Mt(),o=i.TOUCH_ROTATE;break;case Z0.PAN:if(n.enablePan===!1)return;lt(),o=i.TOUCH_PAN;break;default:o=i.NONE}break;case 2:switch(n.touches.TWO){case Z0.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_t(),o=i.TOUCH_DOLLY_PAN;break;case Z0.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(Vht)}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 z6=class extends Us{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 q0;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 ZU(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 im(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 ei(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 PP(this.requestManager);let t=new z6(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!=dv.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!=dv.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",z6)],kn.prototype,"_meshViewer",void 0);E([A({type:Object}),w("design:type",PP)],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=ve().pluginRoute("mesh","/tags");return this._requestManager.request(t).then(r=>{if(sx.isEqual(r,this._runToTagInfo))return;let n=sx.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=sx.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return sx.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 JU=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=""}};JU.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)],JU.prototype,"_installCommand",void 0);JU=E([yt("tf-profile-redirect-dashboard")],JU);var lm=Ee(Oe(),1);var zl=Ee(Oe(),1),QU=Ee(wl(),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 QU.Scales.Linear;return{scale:t,axis:new QU.Axes.Numeric(t,"bottom"),accessor:r=>r.recall}},this._yValueAccessor=t=>t.precision,this._tooltipColumns=(()=>{let t=Wu(e0),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=ve().pluginRoute("pr_curves","/pr_curves");Promise.all(t.map(a=>{let s=a,l=this.tag,c=Cn(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;zl.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=zl.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]=zl.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={};zl.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(zl.sortedIndex(r.map(i=>i.step),t),r.length-1);return r[n]}get _runsWithStepAvailable(){var t=this.runs,r=this._runToPrCurveEntry;return zl.filter(t,n=>r[n]).sort()}get _setOfRelevantRuns(){var t=this._runsWithStepAvailable;let r={};return zl.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 ep=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])}};ep.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)],ep.prototype,"runs",void 0);E([A({type:Object}),w("design:type",Object)],ep.prototype,"runToAvailableTimeEntries",void 0);E([A({type:Object,notify:!0,computed:"_computeRunToStep(runToAvailableTimeEntries, _runToStepIndex)"}),w("design:type",Object)],ep.prototype,"runToStep",void 0);E([A({type:String}),w("design:type",String)],ep.prototype,"timeDisplayType",void 0);E([A({type:Object}),w("design:type",Object)],ep.prototype,"_runToStepIndex",void 0);E([Bt("runToAvailableTimeEntries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ep.prototype,"_updateStepsForNewRuns",null);E([Rt("runs","runToAvailableTimeEntries"),w("design:type",Array),w("design:paramtypes",[])],ep.prototype,"_runsWithSliders",null);ep=E([yt("tf-pr-curve-steps-selector")],ep);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=ve().pluginRoute("pr_curves","/tags");return this._requestManager.request(t).then(r=>{if(lm.isEqual(r,this._runToTagInfo))return;let n=lm.mapValues(r,o=>lm.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadCards(){var t;lm.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=lm.mapValues(t,o=>Object.keys(o));return uE(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 iR(i,o)}_createDataChangeCallback(t){return r=>{this.set("_tagToRunToData",Mx(Kl({},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 F6=Ee(Oe(),1);var uo=class extends Gt(nb){constructor(){super(...arguments),this.reloadOnReady=!0,this._showDownloadLinks=vp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=gE("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=vp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType=Ed.STEP,this._selectedRuns=[],this._tagFilter="",this._categories=[],this._getCategoryItemKey=t=>t.tag,this._requestManager=new Ae(50),this._showDownloadLinksObserver=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=_E("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}get _smoothingEnabled(){var t=this._smoothingWeight;return t>0}_getCategoryKey(t){return t.metadata.type==Na.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=ve().pluginRoute("scalars","/tags");return this._requestManager.request(t).then(r=>{if(F6.isEqual(r,this._runToTagInfo))return;let n=F6.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=F6.mapValues(t,s=>Object.keys(s));i=uE(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}=iR(a,s);return t.metadata.type==Na.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 ipe=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=ve(),r=Cn(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=vp("_markdownEnabled",{defaultValue:!0,useLocalStorage:!0}).call(this),this._requestManager=new Ae,this._markdownEnabledStorageObserver=xp("_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=ve().pluginRoute("text","/tags");return this._requestManager.request(t).then(r=>{if(ipe.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 ope=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_backend=kB}};ope=E([yt("tf-backend")],ope);var ape=class extends mt{constructor(){super(...arguments),this._template=null,this.runsColorScale=fn}};ape=E([yt("tf-color-scale")],ape);var spe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_feature_flags=tW}};spe=E([yt("tf-feature-flags")],spe);var lpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_globals=RW}};lpe=E([yt("tf-globals")],lpe);var Uht={};Ks(Uht,{TfDomRepeat:()=>Oi,addLimitListener:()=>qW,getLimit:()=>WW,removeLimitListener:()=>GW,setLimit:()=>r2e});var cpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_paginated_view=Uht}};cpe=E([yt("tf-paginated-view-store")],cpe);var upe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_storage=DB}};upe=E([yt("tf-storage")],upe);})();
/*!
 * 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 Jge=Object.create,LE=Object.defineProperty,$ge=Object.getOwnPropertyDescriptor,e0e=Object.getOwnPropertyNames,t0e=Object.getPrototypeOf,n0e=Object.prototype.hasOwnProperty,ho=(n,t)=>()=>(n&&(t=n(n=0)),t),Rd=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),BE=(n,t)=>{for(var e in t)LE(n,e,{get:t[e],enumerable:!0})},I6=(n,t,e,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of e0e(t))!n0e.call(n,r)&&r!==e&&LE(n,r,{get:()=>t[r],enumerable:!(i=$ge(t,r))||i.enumerable});return n},oN=(n,t,e)=>(e=null!=n?Jge(t0e(n)):{},I6(!t&&n&&n.__esModule?e:LE(e,"default",{value:n,enumerable:!0}),n)),uW=Rd((Drt,e1)=>{var j6,G6,W6,q6,Y6,X6,Q6,K6,Z6,JE,yN,J6,$6,eW,m0,tW,nW,iW,rW,oW,sW,aW,lW,cW,$E;!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,s){return i[o]=r?r(o,s):s}}"function"==typeof define&&define.amd?define("tslib",["exports"],function(i){n(e(t,e(i)))}):n("object"==typeof e1&&"object"==typeof e1.exports?e(t,e(e1.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])};j6=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)},G6=Object.assign||function(i){for(var r,o=1,s=arguments.length;o<s;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i},W6=function(i,r){var o={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&r.indexOf(s)<0&&(o[s]=i[s]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(i);a<s.length;a++)r.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(i,s[a])&&(o[s[a]]=i[s[a]])}return o},q6=function(i,r,o,s){var c,a=arguments.length,l=a<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,r,o,s);else for(var u=i.length-1;u>=0;u--)(c=i[u])&&(l=(a<3?c(l):a>3?c(r,o,l):c(r,o))||l);return a>3&&l&&Object.defineProperty(r,o,l),l},Y6=function(i,r){return function(o,s){r(o,s,i)}},X6=function(i,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(i,r)},Q6=function(i,r,o,s){return new(o||(o=Promise))(function(l,c){function u(h){try{p(s.next(h))}catch(f){c(f)}}function d(h){try{p(s.throw(h))}catch(f){c(f)}}function p(h){h.done?l(h.value):function(l){return l instanceof o?l:new o(function(c){c(l)})}(h.value).then(u,d)}p((s=s.apply(i,r||[])).next())})},K6=function(i,r){var s,a,l,c,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return c={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function u(p){return function(h){return function(p){if(s)throw new TypeError("Generator is already executing.");for(;c&&(c=0,p[0]&&(o=0)),o;)try{if(s=1,a&&(l=2&p[0]?a.return:p[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,p[1])).done)return l;switch(a=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++,a=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],a=0}finally{s=l=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,h])}}},Z6=function(i,r){for(var o in i)"default"!==o&&!Object.prototype.hasOwnProperty.call(r,o)&&$E(r,i,o)},$E=Object.create?function(i,r,o,s){void 0===s&&(s=o);var a=Object.getOwnPropertyDescriptor(r,o);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(i,s,a)}:function(i,r,o,s){void 0===s&&(s=o),i[s]=r[o]},JE=function(i){var r="function"==typeof Symbol&&Symbol.iterator,o=r&&i[r],s=0;if(o)return o.call(i);if(i&&"number"==typeof i.length)return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},yN=function(i,r){var o="function"==typeof Symbol&&i[Symbol.iterator];if(!o)return i;var a,c,s=o.call(i),l=[];try{for(;(void 0===r||r-- >0)&&!(a=s.next()).done;)l.push(a.value)}catch(u){c={error:u}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(c)throw c.error}}return l},J6=function(){for(var i=[],r=0;r<arguments.length;r++)i=i.concat(yN(arguments[r]));return i},$6=function(){for(var i=0,r=0,o=arguments.length;r<o;r++)i+=arguments[r].length;var s=Array(i),a=0;for(r=0;r<o;r++)for(var l=arguments[r],c=0,u=l.length;c<u;c++,a++)s[a]=l[c];return s},eW=function(i,r,o){if(o||2===arguments.length)for(var l,s=0,a=r.length;s<a;s++)(l||!(s in r))&&(l||(l=Array.prototype.slice.call(r,0,s)),l[s]=r[s]);return i.concat(l||Array.prototype.slice.call(r))},m0=function(i){return this instanceof m0?(this.v=i,this):new m0(i)},tW=function(i,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,s=o.apply(i,r||[]),l=[];return a={},c("next"),c("throw"),c("return"),a[Symbol.asyncIterator]=function(){return this},a;function c(m){s[m]&&(a[m]=function(x){return new Promise(function(g,b){l.push([m,x,g,b])>1||u(m,x)})})}function u(m,x){try{!function(m){m.value instanceof m0?Promise.resolve(m.value.v).then(p,h):f(l[0][2],m)}(s[m](x))}catch(g){f(l[0][3],g)}}function p(m){u("next",m)}function h(m){u("throw",m)}function f(m,x){m(x),l.shift(),l.length&&u(l[0][0],l[0][1])}},nW=function(i){var r,o;return r={},s("next"),s("throw",function(a){throw a}),s("return"),r[Symbol.iterator]=function(){return this},r;function s(a,l){r[a]=i[a]?function(c){return(o=!o)?{value:m0(i[a](c)),done:"return"===a}:l?l(c):c}:l}},iW=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=JE(i),o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o);function s(l){o[l]=i[l]&&function(c){return new Promise(function(u,d){!function(l,c,u,d){Promise.resolve(d).then(function(p){l({value:p,done:u})},c)}(u,d,(c=i[l](c)).done,c.value)})}}},rW=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};oW=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)&&$E(r,i,o);return e(r,i),r},sW=function(i){return i&&i.__esModule?i:{default:i}},aW=function(i,r,o,s){if("a"===o&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?i!==r||!s:!r.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?s:"a"===o?s.call(i):s?s.value:r.get(i)},lW=function(i,r,o,s,a){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?i!==r||!a:!r.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?a.call(i,o):a?a.value=o:r.set(i,o),o},cW=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",j6),n("__assign",G6),n("__rest",W6),n("__decorate",q6),n("__param",Y6),n("__metadata",X6),n("__awaiter",Q6),n("__generator",K6),n("__exportStar",Z6),n("__createBinding",$E),n("__values",JE),n("__read",yN),n("__spread",J6),n("__spreadArrays",$6),n("__spreadArray",eW),n("__await",m0),n("__asyncGenerator",tW),n("__asyncDelegator",nW),n("__asyncValues",iW),n("__makeTemplateObject",rW),n("__importStar",oW),n("__importDefault",sW),n("__classPrivateFieldGet",aW),n("__classPrivateFieldSet",lW),n("__classPrivateFieldIn",cW)})}),mZ=Rd(b5=>{"use strict";var n,uh=b5&&b5.__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(Q){var re=Q.performance;function _e(St){re&&re.mark&&re.mark(St)}function I(St,we){re&&re.measure&&re.measure(St,we)}_e("Zone");var X=Q.__Zone_symbol_prefix||"__zone_symbol__";function $(St){return X+St}var ne=!0===Q[$("forceDuplicateZoneCheck")];if(Q.Zone){if(ne||"function"!=typeof Q.Zone.__symbol__)throw new Error("Zone already loaded.");return Q.Zone}var me=function(){function St(we,Ee){this._parent=we,this._name=Ee?Ee.name||"unnamed":"<root>",this._properties=Ee&&Ee.properties||{},this._zoneDelegate=new lt(this,this._parent&&this._parent._zoneDelegate,Ee)}return St.assertZonePatched=function(){if(Q.Promise!==jn.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(St,"root",{get:function(){for(var we=St.current;we.parent;)we=we.parent;return we},enumerable:!1,configurable:!0}),Object.defineProperty(St,"current",{get:function(){return br.zone},enumerable:!1,configurable:!0}),Object.defineProperty(St,"currentTask",{get:function(){return xa},enumerable:!1,configurable:!0}),St.__load_patch=function(we,Ee,Ve){if(void 0===Ve&&(Ve=!1),jn.hasOwnProperty(we)){if(!Ve&&ne)throw Error("Already loaded patch: "+we)}else if(!Q["__Zone_disable_"+we]){var kn="Zone:"+we;_e(kn),jn[we]=Ee(Q,St,Dr),I(kn,kn)}},Object.defineProperty(St.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),St.prototype.get=function(we){var Ee=this.getZoneWith(we);if(Ee)return Ee._properties[we]},St.prototype.getZoneWith=function(we){for(var Ee=this;Ee;){if(Ee._properties.hasOwnProperty(we))return Ee;Ee=Ee._parent}return null},St.prototype.fork=function(we){if(!we)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,we)},St.prototype.wrap=function(we,Ee){if("function"!=typeof we)throw new Error("Expecting function got: "+we);var Ve=this._zoneDelegate.intercept(this,we,Ee),kn=this;return function(){return kn.runGuarded(Ve,this,arguments,Ee)}},St.prototype.run=function(we,Ee,Ve,kn){br={parent:br,zone:this};try{return this._zoneDelegate.invoke(this,we,Ee,Ve,kn)}finally{br=br.parent}},St.prototype.runGuarded=function(we,Ee,Ve,kn){void 0===Ee&&(Ee=null),br={parent:br,zone:this};try{try{return this._zoneDelegate.invoke(this,we,Ee,Ve,kn)}catch(Ir){if(this._zoneDelegate.handleError(this,Ir))throw Ir}}finally{br=br.parent}},St.prototype.runTask=function(we,Ee,Ve){if(we.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(we.zone||Ot).name+"; Execution: "+this.name+")");if(we.state!==wi||we.type!==Si&&we.type!==Un){var kn=we.state!=$n;kn&&we._transitionTo($n,Yn),we.runCount++;var Ir=xa;xa=we,br={parent:br,zone:this};try{we.type==Un&&we.data&&!we.data.isPeriodic&&(we.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,we,Ee,Ve)}catch(xc){if(this._zoneDelegate.handleError(this,xc))throw xc}}finally{we.state!==wi&&we.state!==Yi&&(we.type==Si||we.data&&we.data.isPeriodic?kn&&we._transitionTo(Yn,$n):(we.runCount=0,this._updateTaskCount(we,-1),kn&&we._transitionTo(wi,$n,wi))),br=br.parent,xa=Ir}}},St.prototype.scheduleTask=function(we){if(we.zone&&we.zone!==this)for(var Ee=this;Ee;){if(Ee===we.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(we.zone.name));Ee=Ee.parent}we._transitionTo(ai,wi);var Ve=[];we._zoneDelegates=Ve,we._zone=this;try{we=this._zoneDelegate.scheduleTask(this,we)}catch(kn){throw we._transitionTo(Yi,ai,wi),this._zoneDelegate.handleError(this,kn),kn}return we._zoneDelegates===Ve&&this._updateTaskCount(we,1),we.state==ai&&we._transitionTo(Yn,ai),we},St.prototype.scheduleMicroTask=function(we,Ee,Ve,kn){return this.scheduleTask(new Je(An,we,Ee,Ve,kn,void 0))},St.prototype.scheduleMacroTask=function(we,Ee,Ve,kn,Ir){return this.scheduleTask(new Je(Un,we,Ee,Ve,kn,Ir))},St.prototype.scheduleEventTask=function(we,Ee,Ve,kn,Ir){return this.scheduleTask(new Je(Si,we,Ee,Ve,kn,Ir))},St.prototype.cancelTask=function(we){if(we.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(we.zone||Ot).name+"; Execution: "+this.name+")");if(we.state===Yn||we.state===$n){we._transitionTo(Yt,Yn,$n);try{this._zoneDelegate.cancelTask(this,we)}catch(Ee){throw we._transitionTo(Yi,Yt),this._zoneDelegate.handleError(this,Ee),Ee}return this._updateTaskCount(we,-1),we._transitionTo(wi,Yt),we.runCount=0,we}},St.prototype._updateTaskCount=function(we,Ee){var Ve=we._zoneDelegates;-1==Ee&&(we._zoneDelegates=null);for(var kn=0;kn<Ve.length;kn++)Ve[kn]._updateTaskCount(we.type,Ee)},St}();me.__symbol__=$;var rr,Ke={name:"",onHasTask:function(St,we,Ee,Ve){return St.hasTask(Ee,Ve)},onScheduleTask:function(St,we,Ee,Ve){return St.scheduleTask(Ee,Ve)},onInvokeTask:function(St,we,Ee,Ve,kn,Ir){return St.invokeTask(Ee,Ve,kn,Ir)},onCancelTask:function(St,we,Ee,Ve){return St.cancelTask(Ee,Ve)}},lt=function(){function St(we,Ee,Ve){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=we,this._parentDelegate=Ee,this._forkZS=Ve&&(Ve&&Ve.onFork?Ve:Ee._forkZS),this._forkDlgt=Ve&&(Ve.onFork?Ee:Ee._forkDlgt),this._forkCurrZone=Ve&&(Ve.onFork?this.zone:Ee._forkCurrZone),this._interceptZS=Ve&&(Ve.onIntercept?Ve:Ee._interceptZS),this._interceptDlgt=Ve&&(Ve.onIntercept?Ee:Ee._interceptDlgt),this._interceptCurrZone=Ve&&(Ve.onIntercept?this.zone:Ee._interceptCurrZone),this._invokeZS=Ve&&(Ve.onInvoke?Ve:Ee._invokeZS),this._invokeDlgt=Ve&&(Ve.onInvoke?Ee:Ee._invokeDlgt),this._invokeCurrZone=Ve&&(Ve.onInvoke?this.zone:Ee._invokeCurrZone),this._handleErrorZS=Ve&&(Ve.onHandleError?Ve:Ee._handleErrorZS),this._handleErrorDlgt=Ve&&(Ve.onHandleError?Ee:Ee._handleErrorDlgt),this._handleErrorCurrZone=Ve&&(Ve.onHandleError?this.zone:Ee._handleErrorCurrZone),this._scheduleTaskZS=Ve&&(Ve.onScheduleTask?Ve:Ee._scheduleTaskZS),this._scheduleTaskDlgt=Ve&&(Ve.onScheduleTask?Ee:Ee._scheduleTaskDlgt),this._scheduleTaskCurrZone=Ve&&(Ve.onScheduleTask?this.zone:Ee._scheduleTaskCurrZone),this._invokeTaskZS=Ve&&(Ve.onInvokeTask?Ve:Ee._invokeTaskZS),this._invokeTaskDlgt=Ve&&(Ve.onInvokeTask?Ee:Ee._invokeTaskDlgt),this._invokeTaskCurrZone=Ve&&(Ve.onInvokeTask?this.zone:Ee._invokeTaskCurrZone),this._cancelTaskZS=Ve&&(Ve.onCancelTask?Ve:Ee._cancelTaskZS),this._cancelTaskDlgt=Ve&&(Ve.onCancelTask?Ee:Ee._cancelTaskDlgt),this._cancelTaskCurrZone=Ve&&(Ve.onCancelTask?this.zone:Ee._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var kn=Ve&&Ve.onHasTask;(kn||Ee&&Ee._hasTaskZS)&&(this._hasTaskZS=kn?Ve:Ke,this._hasTaskDlgt=Ee,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=we,Ve.onScheduleTask||(this._scheduleTaskZS=Ke,this._scheduleTaskDlgt=Ee,this._scheduleTaskCurrZone=this.zone),Ve.onInvokeTask||(this._invokeTaskZS=Ke,this._invokeTaskDlgt=Ee,this._invokeTaskCurrZone=this.zone),Ve.onCancelTask||(this._cancelTaskZS=Ke,this._cancelTaskDlgt=Ee,this._cancelTaskCurrZone=this.zone))}return St.prototype.fork=function(we,Ee){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,we,Ee):new me(we,Ee)},St.prototype.intercept=function(we,Ee,Ve){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,we,Ee,Ve):Ee},St.prototype.invoke=function(we,Ee,Ve,kn,Ir){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,we,Ee,Ve,kn,Ir):Ee.apply(Ve,kn)},St.prototype.handleError=function(we,Ee){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,we,Ee)},St.prototype.scheduleTask=function(we,Ee){var Ve=Ee;if(this._scheduleTaskZS)this._hasTaskZS&&Ve._zoneDelegates.push(this._hasTaskDlgtOwner),(Ve=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,we,Ee))||(Ve=Ee);else if(Ee.scheduleFn)Ee.scheduleFn(Ee);else{if(Ee.type!=An)throw new Error("Task is missing scheduleFn.");Mn(Ee)}return Ve},St.prototype.invokeTask=function(we,Ee,Ve,kn){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,we,Ee,Ve,kn):Ee.callback.apply(Ve,kn)},St.prototype.cancelTask=function(we,Ee){var Ve;if(this._cancelTaskZS)Ve=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,we,Ee);else{if(!Ee.cancelFn)throw Error("Task is not cancelable");Ve=Ee.cancelFn(Ee)}return Ve},St.prototype.hasTask=function(we,Ee){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,we,Ee)}catch(Ve){this.handleError(we,Ve)}},St.prototype._updateTaskCount=function(we,Ee){var Ve=this._taskCounts,kn=Ve[we],Ir=Ve[we]=kn+Ee;if(Ir<0)throw new Error("More tasks executed then were scheduled.");0!=kn&&0!=Ir||this.hasTask(this.zone,{microTask:Ve.microTask>0,macroTask:Ve.macroTask>0,eventTask:Ve.eventTask>0,change:we})},St}(),Je=function(){function St(we,Ee,Ve,kn,Ir,xc){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=we,this.source=Ee,this.data=kn,this.scheduleFn=Ir,this.cancelFn=xc,!Ve)throw new Error("callback is not defined");this.callback=Ve;var ct=this;this.invoke=we===Si&&kn&&kn.useG?St.invokeTask:function(){return St.invokeTask.call(Q,ct,this,arguments)}}return St.invokeTask=function(we,Ee,Ve){we||(we=this),Vr++;try{return we.runCount++,we.zone.runTask(we,Ee,Ve)}finally{1==Vr&&Hn(),Vr--}},Object.defineProperty(St.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),St.prototype.cancelScheduleRequest=function(){this._transitionTo(wi,ai)},St.prototype._transitionTo=function(we,Ee,Ve){if(this._state!==Ee&&this._state!==Ve)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(we,"', expecting state '").concat(Ee,"'").concat(Ve?" or '"+Ve+"'":"",", was '").concat(this._state,"'."));this._state=we,we==wi&&(this._zoneDelegates=null)},St.prototype.toString=function(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)},St.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},St}(),ft=$("setTimeout"),Ct=$("Promise"),It=$("then"),Nt=[],bn=!1;function Ai(St){if(rr||Q[Ct]&&(rr=Q[Ct].resolve(0)),rr){var we=rr[It];we||(we=rr.then),we.call(rr,St)}else Q[ft](St,0)}function Mn(St){0===Vr&&0===Nt.length&&Ai(Hn),St&&Nt.push(St)}function Hn(){if(!bn){for(bn=!0;Nt.length;){var St=Nt;Nt=[];for(var we=0;we<St.length;we++){var Ee=St[we];try{Ee.zone.runTask(Ee,null,null)}catch(Ve){Dr.onUnhandledError(Ve)}}}Dr.microtaskDrainDone(),bn=!1}}var Ot={name:"NO ZONE"},wi="notScheduled",ai="scheduling",Yn="scheduled",$n="running",Yt="canceling",Yi="unknown",An="microTask",Un="macroTask",Si="eventTask",jn={},Dr={symbol:$,currentZoneFrame:function(){return br},onUnhandledError:Ar,microtaskDrainDone:Ar,scheduleMicroTask:Mn,showUncaughtError:function(){return!me[$("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:Ar,patchMethod:function(){return Ar},bindArguments:function(){return[]},patchThen:function(){return Ar},patchMacroTask:function(){return Ar},patchEventPrototype:function(){return Ar},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return Ar},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return Ar},wrapWithCurrentZone:function(){return Ar},filterProperties:function(){return[]},attachOriginToPatched:function(){return Ar},_redefineProperty:function(){return Ar},patchCallbacks:function(){return Ar},nativeScheduleMicroTask:Ai},br={parent:null,zone:new me(null,null)},xa=null,Vr=0;function Ar(){}I("Zone","Zone"),Q.Zone=me}(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",s="removeEventListener",a=Zone.__symbol__(o),l=Zone.__symbol__(s),c="true",u="false",d=Zone.__symbol__("");function p(Q,re){return Zone.current.wrap(Q,re)}function h(Q,re,_e,I,X){return Zone.current.scheduleMacroTask(Q,re,_e,I,X)}var f=Zone.__symbol__,m=typeof window<"u",x=m?window:void 0,g=m&&x||"object"==typeof self&&self||global;function D(Q,re){for(var _e=Q.length-1;_e>=0;_e--)"function"==typeof Q[_e]&&(Q[_e]=p(Q[_e],re+"_"+_e));return Q}function k(Q){return!Q||!1!==Q.writable&&!("function"==typeof Q.get&&typeof Q.set>"u")}var Z=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,z=!("nw"in g)&&typeof g.process<"u"&&"[object process]"==={}.toString.call(g.process),fe=!z&&!Z&&!(!m||!x.HTMLElement),ue=typeof g.process<"u"&&"[object process]"==={}.toString.call(g.process)&&!Z&&!(!m||!x.HTMLElement),he={},w=function(Q){if(Q=Q||g.event){var re=he[Q.type];re||(re=he[Q.type]=f("ON_PROPERTY"+Q.type));var X,_e=this||Q.target||g,I=_e[re];if(fe&&_e===x&&"error"===Q.type){var $=Q;!0===(X=I&&I.call(this,$.message,$.filename,$.lineno,$.colno,$.error))&&Q.preventDefault()}else null!=(X=I&&I.apply(this,arguments))&&!X&&Q.preventDefault();return X}};function F(Q,re,_e){var I=n(Q,re);if(!I&&_e&&n(_e,re)&&(I={enumerable:!0,configurable:!0}),I&&I.configurable){var $=f("on"+re+"patched");if(!Q.hasOwnProperty($)||!Q[$]){delete I.writable,delete I.value;var ne=I.get,me=I.set,Ke=re.slice(2),lt=he[Ke];lt||(lt=he[Ke]=f("ON_PROPERTY"+Ke)),I.set=function(Je){var ft=this;!ft&&Q===g&&(ft=g),ft&&("function"==typeof ft[lt]&&ft.removeEventListener(Ke,w),me&&me.call(ft,null),ft[lt]=Je,"function"==typeof Je&&ft.addEventListener(Ke,w,!1))},I.get=function(){var Je=this;if(!Je&&Q===g&&(Je=g),!Je)return null;var ft=Je[lt];if(ft)return ft;if(ne){var Ct=ne.call(this);if(Ct)return I.set.call(this,Ct),"function"==typeof Je.removeAttribute&&Je.removeAttribute(re),Ct}return null},t(Q,re,I),Q[$]=!0}}}function q(Q,re,_e){if(re)for(var I=0;I<re.length;I++)F(Q,"on"+re[I],_e);else{var X=[];for(var $ in Q)"on"==$.slice(0,2)&&X.push($);for(var ne=0;ne<X.length;ne++)F(Q,X[ne],_e)}}var K=f("originalInstance");function de(Q){var re=g[Q];if(re){g[f(Q)]=re,g[Q]=function(){var X=D(arguments,Q);switch(X.length){case 0:this[K]=new re;break;case 1:this[K]=new re(X[0]);break;case 2:this[K]=new re(X[0],X[1]);break;case 3:this[K]=new re(X[0],X[1],X[2]);break;case 4:this[K]=new re(X[0],X[1],X[2],X[3]);break;default:throw new Error("Arg list too long.")}},le(g[Q],re);var I,_e=new re(function(){});for(I in _e)"XMLHttpRequest"===Q&&"responseBlob"===I||function(X){"function"==typeof _e[X]?g[Q].prototype[X]=function(){return this[K][X].apply(this[K],arguments)}:t(g[Q].prototype,X,{set:function($){"function"==typeof $?(this[K][X]=p($,Q+"."+X),le(this[K][X],$)):this[K][X]=$},get:function(){return this[K][X]}})}(I);for(I in re)"prototype"!==I&&re.hasOwnProperty(I)&&(g[Q][I]=re[I])}}function Y(Q,re,_e){for(var I=Q;I&&!I.hasOwnProperty(re);)I=e(I);!I&&Q[re]&&(I=Q);var X=f(re),$=null;if(I&&(!($=I[X])||!I.hasOwnProperty(X))&&($=I[X]=I[re],k(I&&n(I,re)))){var me=_e($,X,re);I[re]=function(){return me(this,arguments)},le(I[re],$)}return $}function ae(Q,re,_e){var I=null;function X($){var ne=$.data;return ne.args[ne.cbIdx]=function(){$.invoke.apply(this,arguments)},I.apply(ne.target,ne.args),$}I=Y(Q,re,function($){return function(ne,me){var Ke=_e(ne,me);return Ke.cbIdx>=0&&"function"==typeof me[Ke.cbIdx]?h(Ke.name,me[Ke.cbIdx],Ke,X):$.apply(ne,me)}})}function le(Q,re){Q[f("OriginalDelegate")]=re}var Ie=!1,ve=!1;function nt(){if(Ie)return ve;Ie=!0;try{var Q=x.navigator.userAgent;(-1!==Q.indexOf("MSIE ")||-1!==Q.indexOf("Trident/")||-1!==Q.indexOf("Edge/"))&&(ve=!0)}catch{}return ve}Zone.__load_patch("ZoneAwarePromise",function(Q,re,_e){var I=Object.getOwnPropertyDescriptor,X=Object.defineProperty,ne=_e.symbol,me=[],Ke=!0===Q[ne("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],lt=ne("Promise"),Je=ne("then");_e.onUnhandledError=function(ct){if(_e.showUncaughtError()){var Vt=ct&&ct.rejection;Vt?console.error("Unhandled Promise rejection:",Vt instanceof Error?Vt.message:Vt,"; Zone:",ct.zone.name,"; Task:",ct.task&&ct.task.source,"; Value:",Vt,Vt instanceof Error?Vt.stack:void 0):console.error(ct)}},_e.microtaskDrainDone=function(){for(var ct=function(){var Vt=me.shift();try{Vt.zone.runGuarded(function(){throw Vt.throwOriginal?Vt.rejection:Vt})}catch(Dt){!function(ct){_e.onUnhandledError(ct);try{var Vt=re[Ct];"function"==typeof Vt&&Vt.call(this,ct)}catch{}}(Dt)}};me.length;)ct()};var Ct=ne("unhandledPromiseRejectionHandler");function Nt(ct){return ct&&ct.then}function bn(ct){return ct}function rr(ct){return Ee.reject(ct)}var Ai=ne("state"),Mn=ne("value"),Hn=ne("finally"),Ot=ne("parentPromiseValue"),wi=ne("parentPromiseState"),Yn=null,Yt=!1;function An(ct,Vt){return function(Dt){try{Dr(ct,Vt,Dt)}catch(it){Dr(ct,!1,it)}}}var Un=function(){var ct=!1;return function(Dt){return function(){ct||(ct=!0,Dt.apply(null,arguments))}}},jn=ne("currentTaskTrace");function Dr(ct,Vt,Dt){var it=Un();if(ct===Dt)throw new TypeError("Promise resolved with itself");if(ct[Ai]===Yn){var cn=null;try{("object"==typeof Dt||"function"==typeof Dt)&&(cn=Dt&&Dt.then)}catch(mi){return it(function(){Dr(ct,!1,mi)})(),ct}if(Vt!==Yt&&Dt instanceof Ee&&Dt.hasOwnProperty(Ai)&&Dt.hasOwnProperty(Mn)&&Dt[Ai]!==Yn)xa(Dt),Dr(ct,Dt[Ai],Dt[Mn]);else if(Vt!==Yt&&"function"==typeof cn)try{cn.call(Dt,it(An(ct,Vt)),it(An(ct,!1)))}catch(mi){it(function(){Dr(ct,!1,mi)})()}else{ct[Ai]=Vt;var qn=ct[Mn];if(ct[Mn]=Dt,ct[Hn]===Hn&&!0===Vt&&(ct[Ai]=ct[wi],ct[Mn]=ct[Ot]),Vt===Yt&&Dt instanceof Error){var Bn=re.currentTask&&re.currentTask.data&&re.currentTask.data.__creationTrace__;Bn&&X(Dt,jn,{configurable:!0,enumerable:!1,writable:!0,value:Bn})}for(var li=0;li<qn.length;)Vr(ct,qn[li++],qn[li++],qn[li++],qn[li++]);if(0==qn.length&&Vt==Yt){ct[Ai]=0;var ci=Dt;try{throw new Error("Uncaught (in promise): "+function(ct){return ct&&ct.toString===Object.prototype.toString?(ct.constructor&&ct.constructor.name||"")+": "+JSON.stringify(ct):ct?ct.toString():Object.prototype.toString.call(ct)}(Dt)+(Dt&&Dt.stack?"\n"+Dt.stack:""))}catch(mi){ci=mi}Ke&&(ci.throwOriginal=!0),ci.rejection=Dt,ci.promise=ct,ci.zone=re.current,ci.task=re.currentTask,me.push(ci),_e.scheduleMicroTask()}}}return ct}var br=ne("rejectionHandledHandler");function xa(ct){if(0===ct[Ai]){try{var Vt=re[br];Vt&&"function"==typeof Vt&&Vt.call(this,{rejection:ct[Mn],promise:ct})}catch{}ct[Ai]=Yt;for(var Dt=0;Dt<me.length;Dt++)ct===me[Dt].promise&&me.splice(Dt,1)}}function Vr(ct,Vt,Dt,it,cn){xa(ct);var qn=ct[Ai],Bn=qn?"function"==typeof it?it:bn:"function"==typeof cn?cn:rr;Vt.scheduleMicroTask("Promise.then",function(){try{var li=ct[Mn],ci=!!Dt&&Hn===Dt[Hn];ci&&(Dt[Ot]=li,Dt[wi]=qn);var mi=Vt.run(Bn,void 0,ci&&Bn!==rr&&Bn!==bn?[]:[li]);Dr(Dt,!0,mi)}catch(Ii){Dr(Dt,!1,Ii)}},Dt)}var St=function(){},we=Q.AggregateError,Ee=function(){function ct(Vt){var Dt=this;if(!(Dt instanceof ct))throw new Error("Must be an instanceof Promise.");Dt[Ai]=Yn,Dt[Mn]=[];try{var it=Un();Vt&&Vt(it(An(Dt,!0)),it(An(Dt,Yt)))}catch(cn){Dr(Dt,!1,cn)}}return ct.toString=function(){return"function ZoneAwarePromise() { [native code] }"},ct.resolve=function(Vt){return Dr(new this(null),!0,Vt)},ct.reject=function(Vt){return Dr(new this(null),Yt,Vt)},ct.any=function(Vt){if(!Vt||"function"!=typeof Vt[Symbol.iterator])return Promise.reject(new we([],"All promises were rejected"));var Dt=[],it=0;try{for(var cn=0,qn=Vt;cn<qn.length;cn++)it++,Dt.push(ct.resolve(qn[cn]))}catch{return Promise.reject(new we([],"All promises were rejected"))}if(0===it)return Promise.reject(new we([],"All promises were rejected"));var li=!1,ci=[];return new ct(function(mi,Ii){for(var Pr=0;Pr<Dt.length;Pr++)Dt[Pr].then(function(fs){li||(li=!0,mi(fs))},function(fs){ci.push(fs),0==--it&&(li=!0,Ii(new we(ci,"All promises were rejected")))})})},ct.race=function(Vt){var Dt,it,cn=new this(function(Ii,Pr){Dt=Ii,it=Pr});function qn(Ii){Dt(Ii)}function Bn(Ii){it(Ii)}for(var li=0,ci=Vt;li<ci.length;li++){var mi=ci[li];Nt(mi)||(mi=this.resolve(mi)),mi.then(qn,Bn)}return cn},ct.all=function(Vt){return ct.allWithCallback(Vt)},ct.allSettled=function(Vt){return(this&&this.prototype instanceof ct?this:ct).allWithCallback(Vt,{thenCallback:function(it){return{status:"fulfilled",value:it}},errorCallback:function(it){return{status:"rejected",reason:it}}})},ct.allWithCallback=function(Vt,Dt){for(var it,cn,qn=new this(function(So,ts){it=So,cn=ts}),Bn=2,li=0,ci=[],mi=function(So){Nt(So)||(So=Ii.resolve(So));var ts=li;try{So.then(function(po){ci[ts]=Dt?Dt.thenCallback(po):po,0==--Bn&&it(ci)},function(po){Dt?(ci[ts]=Dt.errorCallback(po),0==--Bn&&it(ci)):cn(po)})}catch(po){cn(po)}Bn++,li++},Ii=this,Pr=0,fs=Vt;Pr<fs.length;Pr++)mi(fs[Pr]);return 0==(Bn-=2)&&it(ci),qn},Object.defineProperty(ct.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(ct.prototype,Symbol.species,{get:function(){return ct},enumerable:!1,configurable:!0}),ct.prototype.then=function(Vt,Dt){var it,cn=null===(it=this.constructor)||void 0===it?void 0:it[Symbol.species];(!cn||"function"!=typeof cn)&&(cn=this.constructor||ct);var qn=new cn(St),Bn=re.current;return this[Ai]==Yn?this[Mn].push(Bn,qn,Vt,Dt):Vr(this,Bn,qn,Vt,Dt),qn},ct.prototype.catch=function(Vt){return this.then(null,Vt)},ct.prototype.finally=function(Vt){var Dt,it=null===(Dt=this.constructor)||void 0===Dt?void 0:Dt[Symbol.species];(!it||"function"!=typeof it)&&(it=ct);var cn=new it(St);cn[Hn]=Hn;var qn=re.current;return this[Ai]==Yn?this[Mn].push(qn,cn,Vt,Vt):Vr(this,qn,cn,Vt,Vt),cn},ct}();Ee.resolve=Ee.resolve,Ee.reject=Ee.reject,Ee.race=Ee.race,Ee.all=Ee.all;var Ve=Q[lt]=Q.Promise;Q.Promise=Ee;var kn=ne("thenPatched");function Ir(ct){var Vt=ct.prototype,Dt=I(Vt,"then");if(!Dt||!1!==Dt.writable&&Dt.configurable){var it=Vt.then;Vt[Je]=it,ct.prototype.then=function(cn,qn){var Bn=this;return new Ee(function(ci,mi){it.call(Bn,ci,mi)}).then(cn,qn)},ct[kn]=!0}}return _e.patchThen=Ir,Ve&&(Ir(Ve),Y(Q,"fetch",function(ct){return function(ct){return function(Vt,Dt){var it=ct.apply(Vt,Dt);if(it instanceof Ee)return it;var cn=it.constructor;return cn[kn]||Ir(cn),it}}(ct)})),Promise[re.__symbol__("uncaughtPromiseErrors")]=me,Ee}),Zone.__load_patch("toString",function(Q){var re=Function.prototype.toString,_e=f("OriginalDelegate"),I=f("Promise"),X=f("Error"),$=function(){if("function"==typeof this){var lt=this[_e];if(lt)return"function"==typeof lt?re.call(lt):Object.prototype.toString.call(lt);if(this===Promise){var Je=Q[I];if(Je)return re.call(Je)}if(this===Error){var ft=Q[X];if(ft)return re.call(ft)}}return re.call(this)};$[_e]=re,Function.prototype.toString=$;var ne=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":ne.call(this)}});var gt=!1;if(typeof window<"u")try{var Ue=Object.defineProperty({},"passive",{get:function(){gt=!0}});window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch{gt=!1}var fi,Wi,qi,ee,W,Ae={useG:!0},tn={},pt={},wt=new RegExp("^"+d+"(\\w+)(true|false)$"),Te=f("propagationStopped");function xt(Q,re){var _e=(re?re(Q):Q)+u,I=(re?re(Q):Q)+c,X=d+_e,$=d+I;tn[Q]={},tn[Q][u]=X,tn[Q][c]=$}function mt(Q,re,_e,I){var X=I&&I.add||o,$=I&&I.rm||s,ne=I&&I.listeners||"eventListeners",me=I&&I.rmAll||"removeAllListeners",Ke=f(X),lt="."+X+":",Ct=function(Hn,Ot,wi){if(!Hn.isRemoved){var Yn,ai=Hn.callback;"object"==typeof ai&&ai.handleEvent&&(Hn.callback=function(Yi){return ai.handleEvent(Yi)},Hn.originalDelegate=ai);try{Hn.invoke(Hn,Ot,[wi])}catch(Yi){Yn=Yi}var $n=Hn.options;return $n&&"object"==typeof $n&&$n.once&&Ot[$].call(Ot,wi.type,Hn.originalDelegate?Hn.originalDelegate:Hn.callback,$n),Yn}};function It(Hn,Ot,wi){if(Ot=Ot||Q.event){var ai=Hn||Ot.target||Q,Yn=ai[tn[Ot.type][wi?c:u]];if(Yn){var $n=[];if(1===Yn.length)(Yt=Ct(Yn[0],ai,Ot))&&$n.push(Yt);else for(var Yi=Yn.slice(),An=0;An<Yi.length&&(!Ot||!0!==Ot[Te]);An++){var Yt;(Yt=Ct(Yi[An],ai,Ot))&&$n.push(Yt)}if(1===$n.length)throw $n[0];var Un=function(Si){var jn=$n[Si];re.nativeScheduleMicroTask(function(){throw jn})};for(An=0;An<$n.length;An++)Un(An)}}}var Nt=function(Hn){return It(this,Hn,!1)},bn=function(Hn){return It(this,Hn,!0)};function rr(Hn,Ot){if(!Hn)return!1;var wi=!0;Ot&&void 0!==Ot.useG&&(wi=Ot.useG);var ai=Ot&&Ot.vh,Yn=!0;Ot&&void 0!==Ot.chkDup&&(Yn=Ot.chkDup);var $n=!1;Ot&&void 0!==Ot.rt&&($n=Ot.rt);for(var Yt=Hn;Yt&&!Yt.hasOwnProperty(X);)Yt=e(Yt);if(!Yt&&Hn[X]&&(Yt=Hn),!Yt||Yt[Ke])return!1;var br,Yi=Ot&&Ot.eventNameToString,An={},Un=Yt[Ke]=Yt[X],Si=Yt[f($)]=Yt[$],jn=Yt[f(ne)]=Yt[ne],Dr=Yt[f(me)]=Yt[me];function xa(it,cn){return!gt&&"object"==typeof it&&it?!!it.capture:gt&&cn?"boolean"==typeof it?{capture:it,passive:!0}:it?"object"==typeof it&&!1!==it.passive?Object.assign(Object.assign({},it),{passive:!0}):it:{passive:!0}:it}Ot&&Ot.prepend&&(br=Yt[f(Ot.prepend)]=Yt[Ot.prepend]);var Ve=wi?function(it){if(!An.isExisting)return Un.call(An.target,An.eventName,An.capture?bn:Nt,An.options)}:function(it){return Un.call(An.target,An.eventName,it.invoke,An.options)},kn=wi?function(it){if(!it.isRemoved){var cn=tn[it.eventName],qn=void 0;cn&&(qn=cn[it.capture?c:u]);var Bn=qn&&it.target[qn];if(Bn)for(var li=0;li<Bn.length;li++)if(Bn[li]===it){Bn.splice(li,1),it.isRemoved=!0,0===Bn.length&&(it.allRemoved=!0,it.target[qn]=null);break}}if(it.allRemoved)return Si.call(it.target,it.eventName,it.capture?bn:Nt,it.options)}:function(it){return Si.call(it.target,it.eventName,it.invoke,it.options)},xc=Ot&&Ot.diff?Ot.diff:function(it,cn){var qn=typeof cn;return"function"===qn&&it.callback===cn||"object"===qn&&it.originalDelegate===cn},ct=Zone[f("UNPATCHED_EVENTS")],Vt=Q[f("PASSIVE_EVENTS")],Dt=function(it,cn,qn,Bn,li,ci){return void 0===li&&(li=!1),void 0===ci&&(ci=!1),function(){var mi=this||Q,Ii=arguments[0];Ot&&Ot.transferEventName&&(Ii=Ot.transferEventName(Ii));var Pr=arguments[1];if(!Pr)return it.apply(this,arguments);if(z&&"uncaughtException"===Ii)return it.apply(this,arguments);var fs=!1;if("function"!=typeof Pr){if(!Pr.handleEvent)return it.apply(this,arguments);fs=!0}if(!ai||ai(it,Pr,mi,arguments)){var Pd=gt&&!!Vt&&-1!==Vt.indexOf(Ii),So=xa(arguments[2],Pd);if(ct)for(var ts=0;ts<ct.length;ts++)if(Ii===ct[ts])return Pd?it.call(mi,Ii,Pr,So):it.apply(this,arguments);var po=!!So&&("boolean"==typeof So||So.capture),a0=!(!So||"object"!=typeof So)&&So.once,Zge=Zone.current,rN=tn[Ii];rN||(xt(Ii,Yi),rN=tn[Ii]);var E6=rN[po?c:u],l0=mi[E6],T6=!1;if(l0){if(T6=!0,Yn)for(ts=0;ts<l0.length;ts++)if(xc(l0[ts],Pr))return}else l0=mi[E6]=[];var NE,D6=mi.constructor.name,A6=pt[D6];A6&&(NE=A6[Ii]),NE||(NE=D6+cn+(Yi?Yi(Ii):Ii)),An.options=So,a0&&(An.options.once=!1),An.target=mi,An.capture=po,An.eventName=Ii,An.isExisting=T6;var tx=wi?Ae:void 0;tx&&(tx.taskData=An);var Np=Zge.scheduleEventTask(NE,Pr,tx,qn,Bn);if(An.target=null,tx&&(tx.taskData=null),a0&&(So.once=!0),!gt&&"boolean"==typeof Np.options||(Np.options=So),Np.target=mi,Np.capture=po,Np.eventName=Ii,fs&&(Np.originalDelegate=Pr),ci?l0.unshift(Np):l0.push(Np),li)return mi}}};return Yt[X]=Dt(Un,lt,Ve,kn,$n),br&&(Yt.prependListener=Dt(br,".prependListener:",function(it){return br.call(An.target,An.eventName,it.invoke,An.options)},kn,$n,!0)),Yt[$]=function(){var it=this||Q,cn=arguments[0];Ot&&Ot.transferEventName&&(cn=Ot.transferEventName(cn));var qn=arguments[2],Bn=!!qn&&("boolean"==typeof qn||qn.capture),li=arguments[1];if(!li)return Si.apply(this,arguments);if(!ai||ai(Si,li,it,arguments)){var mi,ci=tn[cn];ci&&(mi=ci[Bn?c:u]);var Ii=mi&&it[mi];if(Ii)for(var Pr=0;Pr<Ii.length;Pr++){var fs=Ii[Pr];if(xc(fs,li)){if(Ii.splice(Pr,1),fs.isRemoved=!0,0===Ii.length&&(fs.allRemoved=!0,it[mi]=null,"string"==typeof cn)){var Pd=d+"ON_PROPERTY"+cn;it[Pd]=null}return fs.zone.cancelTask(fs),$n?it:void 0}}return Si.apply(this,arguments)}},Yt[ne]=function(){var it=this||Q,cn=arguments[0];Ot&&Ot.transferEventName&&(cn=Ot.transferEventName(cn));for(var qn=[],Bn=ce(it,Yi?Yi(cn):cn),li=0;li<Bn.length;li++){var ci=Bn[li],mi=ci.originalDelegate?ci.originalDelegate:ci.callback;qn.push(mi)}return qn},Yt[me]=function(){var it=this||Q,cn=arguments[0];if(cn){Ot&&Ot.transferEventName&&(cn=Ot.transferEventName(cn));var Ii=tn[cn];if(Ii){var Pr=Ii[u],fs=Ii[c],Pd=it[Pr],So=it[fs];if(Pd)for(var ts=Pd.slice(),Bn=0;Bn<ts.length;Bn++)this[$].call(this,cn,(po=ts[Bn]).originalDelegate?po.originalDelegate:po.callback,po.options);if(So)for(ts=So.slice(),Bn=0;Bn<ts.length;Bn++){var po;this[$].call(this,cn,(po=ts[Bn]).originalDelegate?po.originalDelegate:po.callback,po.options)}}}else{var qn=Object.keys(it);for(Bn=0;Bn<qn.length;Bn++){var li=qn[Bn],ci=wt.exec(li),mi=ci&&ci[1];mi&&"removeListener"!==mi&&this[me].call(this,mi)}this[me].call(this,"removeListener")}if($n)return this},le(Yt[X],Un),le(Yt[$],Si),Dr&&le(Yt[me],Dr),jn&&le(Yt[ne],jn),!0}for(var Ai=[],Mn=0;Mn<_e.length;Mn++)Ai[Mn]=rr(_e[Mn],I);return Ai}function ce(Q,re){if(!re){var _e=[];for(var I in Q){var X=wt.exec(I),$=X&&X[1];if($&&(!re||$===re)){var ne=Q[I];if(ne)for(var me=0;me<ne.length;me++)_e.push(ne[me])}}return _e}var Ke=tn[re];Ke||(xt(re),Ke=tn[re]);var lt=Q[Ke[u]],Je=Q[Ke[c]];return lt?Je?lt.concat(Je):lt.slice():Je?Je.slice():[]}function dt(Q,re){var _e=Q.Event;_e&&_e.prototype&&re.patchMethod(_e.prototype,"stopImmediatePropagation",function(I){return function(X,$){X[Te]=!0,I&&I.apply(X,$)}})}function We(Q,re,_e,I,X){var $=Zone.__symbol__(I);if(!re[$]){var ne=re[$]=re[I];re[I]=function(me,Ke,lt){return Ke&&Ke.prototype&&X.forEach(function(Je){var ft="".concat(_e,".").concat(I,"::")+Je,Ct=Ke.prototype;try{if(Ct.hasOwnProperty(Je)){var It=Q.ObjectGetOwnPropertyDescriptor(Ct,Je);It&&It.value?(It.value=Q.wrapWithCurrentZone(It.value,ft),Q._redefineProperty(Ke.prototype,Je,It)):Ct[Je]&&(Ct[Je]=Q.wrapWithCurrentZone(Ct[Je],ft))}else Ct[Je]&&(Ct[Je]=Q.wrapWithCurrentZone(Ct[Je],ft))}catch{}}),ne.call(re,me,Ke,lt)},Q.attachOriginToPatched(re[I],ne)}}function Mt(Q,re,_e){if(!_e||0===_e.length)return re;var I=_e.filter(function($){return $.target===Q});if(!I||0===I.length)return re;var X=I[0].ignoreProperties;return re.filter(function($){return-1===X.indexOf($)})}function bt(Q,re,_e,I){Q&&q(Q,Mt(Q,re,_e),I)}function hn(Q){return Object.getOwnPropertyNames(Q).filter(function(re){return re.startsWith("on")&&re.length>2}).map(function(re){return re.substring(2)})}function Tt(Q,re,_e){var I=_e.configurable;return wn(Q,re,_e=qe(Q,re,_e),I)}function mn(Q,re){return Q&&Q[W]&&Q[W][re]}function qe(Q,re,_e){return Object.isFrozen(_e)||(_e.configurable=!0),_e.configurable||(!Q[W]&&!Object.isFrozen(Q)&&Wi(Q,W,{writable:!0,value:{}}),Q[W]&&(Q[W][re]=!0)),_e}function wn(Q,re,_e,I){try{return Wi(Q,re,_e)}catch(ne){if(!_e.configurable)throw ne;typeof I>"u"?delete _e.configurable:_e.configurable=I;try{return Wi(Q,re,_e)}catch(me){var X=!1;if(("createdCallback"===re||"attachedCallback"===re||"detachedCallback"===re||"attributeChangedCallback"===re)&&(X=!0),!X)throw me;var $=null;try{$=JSON.stringify(_e)}catch{$=_e.toString()}console.log("Attempting to configure '".concat(re,"' with descriptor '").concat($,"' on object '").concat(Q,"' and got error, giving up: ").concat(me))}}}Zone.__load_patch("util",function(Q,re,_e){var I=hn(Q);_e.patchOnProperties=q,_e.patchMethod=Y,_e.bindArguments=D,_e.patchMacroTask=ae;var X=re.__symbol__("BLACK_LISTED_EVENTS"),$=re.__symbol__("UNPATCHED_EVENTS");Q[$]&&(Q[X]=Q[$]),Q[X]&&(re[X]=re[$]=Q[X]),_e.patchEventPrototype=dt,_e.patchEventTarget=mt,_e.isIEOrEdge=nt,_e.ObjectDefineProperty=t,_e.ObjectGetOwnPropertyDescriptor=n,_e.ObjectCreate=i,_e.ArraySlice=r,_e.patchClass=de,_e.wrapWithCurrentZone=p,_e.filterProperties=Mt,_e.attachOriginToPatched=le,_e._redefineProperty=Object.defineProperty,_e.patchCallbacks=We,_e.getGlobalObjects=function(){return{globalSources:pt,zoneSymbolEventNames:tn,eventNames:I,isBrowser:fe,isMix:ue,isNode:z,TRUE_STR:c,FALSE_STR:u,ZONE_SYMBOL_PREFIX:d,ADD_EVENT_LISTENER_STR:o,REMOVE_EVENT_LISTENER_STR:s}}});var Q,Es=uh(uh(uh(uh(uh(uh(uh(uh([],["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);(Q=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{})[("legacyPatch",(Q.__Zone_symbol_prefix||"__zone_symbol__")+"legacyPatch")]=function(){var I=Q.Zone;I.__load_patch("defineProperty",function(X,$,ne){ne._redefineProperty=Tt,fi=Zone.__symbol__,Wi=Object[fi("defineProperty")]=Object.defineProperty,qi=Object[fi("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,ee=Object.create,W=fi("unconfigurables"),Object.defineProperty=function(Q,re,_e){if(mn(Q,re))throw new TypeError("Cannot assign to read only property '"+re+"' of "+Q);var I=_e.configurable;return"prototype"!==re&&(_e=qe(Q,re,_e)),wn(Q,re,_e,I)},Object.defineProperties=function(Q,re){Object.keys(re).forEach(function(ne){Object.defineProperty(Q,ne,re[ne])});for(var _e=0,I=Object.getOwnPropertySymbols(re);_e<I.length;_e++){var X=I[_e];Object.getOwnPropertyDescriptor(re,X)?.enumerable&&Object.defineProperty(Q,X,re[X])}return Q},Object.create=function(Q,re){return"object"==typeof re&&!Object.isFrozen(re)&&Object.keys(re).forEach(function(_e){re[_e]=qe(Q,_e,re[_e])}),ee(Q,re)},Object.getOwnPropertyDescriptor=function(Q,re){var _e=qi(Q,re);return _e&&mn(Q,re)&&(_e.configurable=!1),_e}}),I.__load_patch("registerElement",function(X,$,ne){!function(Q,re){var _e=re.getGlobalObjects();(_e.isBrowser||_e.isMix)&&"registerElement"in Q.document&&re.patchCallbacks(re,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(X,ne)}),I.__load_patch("EventTargetLegacy",function(X,$,ne){(function(Q,re){var _e=re.getGlobalObjects(),I=_e.eventNames,X=_e.globalSources,$=_e.zoneSymbolEventNames,ne=_e.TRUE_STR,me=_e.FALSE_STR,Ke=_e.ZONE_SYMBOL_PREFIX,Je="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(","),ft="EventTarget",Ct=[],It=Q.wtf,Nt="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(",");It?Ct=Nt.map(function(Vr){return"HTML"+Vr+"Element"}).concat(Je):Q[ft]?Ct.push(ft):Ct=Je;for(var bn=Q.__Zone_disable_IE_check||!1,rr=Q.__Zone_enable_cross_context_check||!1,Ai=re.isIEOrEdge(),Hn="[object FunctionWrapper]",Ot="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",wi={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},ai=0;ai<I.length;ai++){var Yi=Ke+((Yn=I[ai])+me),An=Ke+(Yn+ne);$[Yn]={},$[Yn][me]=Yi,$[Yn][ne]=An}for(ai=0;ai<Nt.length;ai++)for(var Un=Nt[ai],Si=X[Un]={},jn=0;jn<I.length;jn++){var Yn;Si[Yn=I[jn]]=Un+".addEventListener:"+Yn}var br=[];for(ai=0;ai<Ct.length;ai++){var xa=Q[Ct[ai]];br.push(xa&&xa.prototype)}re.patchEventTarget(Q,re,br,{vh:function(Vr,Ar,St,we){if(!bn&&Ai)if(rr)try{if((Ee=Ar.toString())===Hn||Ee==Ot)return Vr.apply(St,we),!1}catch{return Vr.apply(St,we),!1}else{var Ee;if((Ee=Ar.toString())===Hn||Ee==Ot)return Vr.apply(St,we),!1}else if(rr)try{Ar.toString()}catch{return Vr.apply(St,we),!1}return!0},transferEventName:function(Vr){return wi[Vr]||Vr}}),Zone[re.symbol("patchEventTarget")]=!!Q[ft]})(X,ne),function(Q,re){var _e=Q.getGlobalObjects();if((!_e.isNode||_e.isMix)&&!function(Q,re){var _e=Q.getGlobalObjects();if((_e.isBrowser||_e.isMix)&&!Q.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&typeof Element<"u"){var $=Q.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if($&&!$.configurable)return!1;if($){Q.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var me=!!document.createElement("div").onclick;return Q.ObjectDefineProperty(Element.prototype,"onclick",$),me}}var Ke=re.XMLHttpRequest;if(!Ke)return!1;var lt="onreadystatechange",Je=Ke.prototype,ft=Q.ObjectGetOwnPropertyDescriptor(Je,lt);if(ft)return Q.ObjectDefineProperty(Je,lt,{enumerable:!0,configurable:!0,get:function(){return!0}}),me=!!(Ct=new Ke).onreadystatechange,Q.ObjectDefineProperty(Je,lt,ft||{}),me;var It=Q.symbol("fake");Q.ObjectDefineProperty(Je,lt,{enumerable:!0,configurable:!0,get:function(){return this[It]},set:function(Ai){this[It]=Ai}});var Ct,Nt=function(){};return(Ct=new Ke).onreadystatechange=Nt,me=Ct[It]===Nt,Ct.onreadystatechange=null,me}(Q,re)){var $=typeof WebSocket<"u";(function(Q){for(var re=Q.symbol("unbound"),_e=function(X){var $=Es[X],ne="on"+$;self.addEventListener($,function(me){var lt,Je,Ke=me.target;for(Je=Ke?Ke.constructor.name+"."+ne:"unknown."+ne;Ke;)Ke[ne]&&!Ke[ne][re]&&((lt=Q.wrapWithCurrentZone(Ke[ne],Je))[re]=Ke[ne],Ke[ne]=lt),Ke=Ke.parentElement},!0)},I=0;I<Es.length;I++)_e(I)})(Q),Q.patchClass("XMLHttpRequest"),$&&function(Q,re){var _e=Q.getGlobalObjects(),I=_e.ADD_EVENT_LISTENER_STR,X=_e.REMOVE_EVENT_LISTENER_STR,$=re.WebSocket;re.EventTarget||Q.patchEventTarget(re,Q,[$.prototype]),re.WebSocket=function(Ke,lt){var ft,Ct,Je=arguments.length>1?new $(Ke,lt):new $(Ke),It=Q.ObjectGetOwnPropertyDescriptor(Je,"onmessage");return It&&!1===It.configurable?(ft=Q.ObjectCreate(Je),Ct=Je,[I,X,"send","close"].forEach(function(Nt){ft[Nt]=function(){var bn=Q.ArraySlice.call(arguments);if(Nt===I||Nt===X){var rr=bn.length>0?bn[0]:void 0;if(rr){var Ai=Zone.__symbol__("ON_PROPERTY"+rr);Je[Ai]=ft[Ai]}}return Je[Nt].apply(Je,bn)}})):ft=Je,Q.patchOnProperties(ft,["close","error","message","open"],Ct),ft};var ne=re.WebSocket;for(var me in $)ne[me]=$[me]}(Q,re),Zone[Q.symbol("patchEvents")]=!0}}(ne,X)})};var ba=f("zoneTask");function bc(Q,re,_e,I){var X=null,$=null;_e+=I;var ne={};function me(lt){var Je=lt.data;return Je.args[0]=function(){return lt.invoke.apply(this,arguments)},Je.handleId=X.apply(Q,Je.args),lt}function Ke(lt){return $.call(Q,lt.data.handleId)}X=Y(Q,re+=I,function(lt){return function(Je,ft){if("function"==typeof ft[0]){var Ct={isPeriodic:"Interval"===I,delay:"Timeout"===I||"Interval"===I?ft[1]||0:void 0,args:ft},It=ft[0];ft[0]=function(){try{return It.apply(this,arguments)}finally{Ct.isPeriodic||("number"==typeof Ct.handleId?delete ne[Ct.handleId]:Ct.handleId&&(Ct.handleId[ba]=null))}};var Nt=h(re,ft[0],Ct,me,Ke);if(!Nt)return Nt;var bn=Nt.data.handleId;return"number"==typeof bn?ne[bn]=Nt:bn&&(bn[ba]=Nt),bn&&bn.ref&&bn.unref&&"function"==typeof bn.ref&&"function"==typeof bn.unref&&(Nt.ref=bn.ref.bind(bn),Nt.unref=bn.unref.bind(bn)),"number"==typeof bn||bn?bn:Nt}return lt.apply(Q,ft)}}),$=Y(Q,_e,function(lt){return function(Je,ft){var It,Ct=ft[0];"number"==typeof Ct?It=ne[Ct]:(It=Ct&&Ct[ba])||(It=Ct),It&&"string"==typeof It.type?"notScheduled"!==It.state&&(It.cancelFn&&It.data.isPeriodic||0===It.runCount)&&("number"==typeof Ct?delete ne[Ct]:Ct&&(Ct[ba]=null),It.zone.cancelTask(It)):lt.apply(Q,ft)}})}Zone.__load_patch("legacy",function(Q){var re=Q[Zone.__symbol__("legacyPatch")];re&&re()}),Zone.__load_patch("queueMicrotask",function(Q,re,_e){_e.patchMethod(Q,"queueMicrotask",function(I){return function(X,$){re.current.scheduleMicroTask("queueMicrotask",$[0])}})}),Zone.__load_patch("timers",function(Q){var _e="clear";bc(Q,"set",_e,"Timeout"),bc(Q,"set",_e,"Interval"),bc(Q,"set",_e,"Immediate")}),Zone.__load_patch("requestAnimationFrame",function(Q){bc(Q,"request","cancel","AnimationFrame"),bc(Q,"mozRequest","mozCancel","AnimationFrame"),bc(Q,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(Q,re){for(var _e=["alert","prompt","confirm"],I=0;I<_e.length;I++)Y(Q,_e[I],function($,ne,me){return function(Ke,lt){return re.current.run($,Q,lt,me)}})}),Zone.__load_patch("EventTarget",function(Q,re,_e){(function(Q,re){re.patchEventPrototype(Q,re)})(Q,_e),function(Q,re){if(!Zone[re.symbol("patchEventTarget")]){for(var _e=re.getGlobalObjects(),I=_e.eventNames,X=_e.zoneSymbolEventNames,$=_e.TRUE_STR,ne=_e.FALSE_STR,me=_e.ZONE_SYMBOL_PREFIX,Ke=0;Ke<I.length;Ke++){var lt=I[Ke],Ct=me+(lt+ne),It=me+(lt+$);X[lt]={},X[lt][ne]=Ct,X[lt][$]=It}var Nt=Q.EventTarget;Nt&&Nt.prototype&&re.patchEventTarget(Q,re,[Nt&&Nt.prototype])}}(Q,_e);var I=Q.XMLHttpRequestEventTarget;I&&I.prototype&&_e.patchEventTarget(Q,_e,[I.prototype])}),Zone.__load_patch("MutationObserver",function(Q,re,_e){de("MutationObserver"),de("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",function(Q,re,_e){de("IntersectionObserver")}),Zone.__load_patch("FileReader",function(Q,re,_e){de("FileReader")}),Zone.__load_patch("on_property",function(Q,re,_e){!function(Q,re){if((!z||ue)&&!Zone[Q.symbol("patchEvents")]){var _e=re.__Zone_ignore_on_properties,I=[];if(fe){var X=window;I=I.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var $=function(){try{var Q=x.navigator.userAgent;if(-1!==Q.indexOf("MSIE ")||-1!==Q.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:X,ignoreProperties:["error"]}]:[];bt(X,hn(X),_e&&_e.concat($),e(X))}I=I.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var ne=0;ne<I.length;ne++){var me=re[I[ne]];me&&me.prototype&&bt(me.prototype,hn(me.prototype),_e)}}}(_e,Q)}),Zone.__load_patch("customElements",function(Q,re,_e){!function(Q,re){var _e=re.getGlobalObjects();(_e.isBrowser||_e.isMix)&&Q.customElements&&"customElements"in Q&&re.patchCallbacks(re,Q.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(Q,_e)}),Zone.__load_patch("XHR",function(Q,re){!function(lt){var Je=lt.XMLHttpRequest;if(Je){var ft=Je.prototype,It=ft[a],Nt=ft[l];if(!It){var bn=lt.XMLHttpRequestEventTarget;if(bn){var rr=bn.prototype;It=rr[a],Nt=rr[l]}}var Ai="readystatechange",Mn="scheduled",ai=Y(ft,"open",function(){return function(Un,Si){return Un[I]=0==Si[2],Un[ne]=Si[1],ai.apply(Un,Si)}}),$n=f("fetchTaskAborting"),Yt=f("fetchTaskScheduling"),Yi=Y(ft,"send",function(){return function(Un,Si){if(!0===re.current[Yt]||Un[I])return Yi.apply(Un,Si);var jn={target:Un,url:Un[ne],isPeriodic:!1,args:Si,aborted:!1},Dr=h("XMLHttpRequest.send",Ot,jn,Hn,wi);Un&&!0===Un[me]&&!jn.aborted&&Dr.state===Mn&&Dr.invoke()}}),An=Y(ft,"abort",function(){return function(Un,Si){var jn=function(Un){return Un[_e]}(Un);if(jn&&"string"==typeof jn.type){if(null==jn.cancelFn||jn.data&&jn.data.aborted)return;jn.zone.cancelTask(jn)}else if(!0===re.current[$n])return An.apply(Un,Si)}})}function Hn(Un){var Si=Un.data,jn=Si.target;jn[$]=!1,jn[me]=!1;var Dr=jn[X];It||(It=jn[a],Nt=jn[l]),Dr&&Nt.call(jn,Ai,Dr);var br=jn[X]=function(){if(jn.readyState===jn.DONE)if(!Si.aborted&&jn[$]&&Un.state===Mn){var Vr=jn[re.__symbol__("loadfalse")];if(0!==jn.status&&Vr&&Vr.length>0){var Ar=Un.invoke;Un.invoke=function(){for(var St=jn[re.__symbol__("loadfalse")],we=0;we<St.length;we++)St[we]===Un&&St.splice(we,1);!Si.aborted&&Un.state===Mn&&Ar.call(Un)},Vr.push(Un)}else Un.invoke()}else!Si.aborted&&!1===jn[$]&&(jn[me]=!0)};return It.call(jn,Ai,br),jn[_e]||(jn[_e]=Un),Yi.apply(jn,Si.args),jn[$]=!0,Un}function Ot(){}function wi(Un){var Si=Un.data;return Si.aborted=!0,An.apply(Si.target,Si.args)}}(Q);var _e=f("xhrTask"),I=f("xhrSync"),X=f("xhrListener"),$=f("xhrScheduled"),ne=f("xhrURL"),me=f("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(Q){Q.navigator&&Q.navigator.geolocation&&function(Q,re){for(var _e=Q.constructor.name,I=function($){var lt,Je,ne=re[$],me=Q[ne];if(me){if(!k(n(Q,ne)))return"continue";Q[ne]=(Je=function(){return lt.apply(this,D(arguments,_e+"."+ne))},le(Je,lt=me),Je)}},X=0;X<re.length;X++)I(X)}(Q.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(Q,re){function _e(I){return function(X){ce(Q,I).forEach(function(ne){var me=Q.PromiseRejectionEvent;if(me){var Ke=new me(I,{promise:X.promise,reason:X.rejection});ne.invoke(Ke)}})}}Q.PromiseRejectionEvent&&(re[f("unhandledPromiseRejectionHandler")]=_e("unhandledrejection"),re[f("rejectionHandledHandler")]=_e("rejectionhandled"))})},"function"==typeof define&&define.amd?define(n):n()}),Hb=Rd($o=>{"use strict";var FJe=$o&&$o.__values||function(n){var t="function"==typeof Symbol&&n[Symbol.iterator],e=0;return t?t.call(n):{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}}};function Vhe(n,t){return Math.floor(t()*n)}function lF(n){for(var t=[],e=0;e<n;e++)t.push(void 0);return t}function QG(n,t){return lF(n).map(function(){return t})}function Hhe(n){return QG(n,0)}function Uhe(n){return n.reduce(function(t,e){return t+e})}Object.defineProperty($o,"__esModule",{value:!0}),$o.tauRandInt=Vhe,$o.tauRand=function(n){return n()},$o.norm=function(n){var t,e,i=0;try{for(var r=FJe(n),o=r.next();!o.done;o=r.next())i+=Math.pow(o.value,2)}catch(a){t={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return Math.sqrt(i)},$o.empty=lF,$o.range=function(n){return lF(n).map(function(t,e){return e})},$o.filled=QG,$o.zeros=Hhe,$o.ones=function(n){return QG(n,1)},$o.linear=function(n,t,e){return lF(e).map(function(i,r){return n+r*((t-n)/(e-1))})},$o.sum=Uhe,$o.mean=function(n){return Uhe(n)/n.length},$o.max=function(n){for(var t=0,e=0;e<n.length;e++)t=n[e]>t?n[e]:t;return t},$o.max2d=function(n){for(var t=0,e=0;e<n.length;e++)for(var i=0;i<n[e].length;i++)t=n[e][i]>t?n[e][i]:t;return t},$o.rejectionSample=function(n,t,e){for(var i=Hhe(n),r=0;r<n;r++)for(var o=!0;o;){for(var s=Vhe(t,e),a=!1,l=0;l<r;l++)if(s===i[l]){a=!0;break}a||(o=!1),i[r]=s}return i},$o.reshape2d=function(n,t,e){var i=[],o=0;if(n.length!==t*e)throw new Error("Array dimensions must match input length.");for(var s=0;s<t;s++){for(var a=[],l=0;l<e;l++)a.push(n[o]),o+=1;i.push(a)}return i}}),ZG=Rd(fu=>{"use strict";var qJe=fu&&fu.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t};Object.defineProperty(fu,"__esModule",{value:!0});var wE=qJe(Hb());function zhe(n,t){var e=function(r){return wE.empty(n).map(function(){return wE.filled(t,r)})},i=[];return i.push(e(-1)),i.push(e(1/0)),i.push(e(0)),i}function KG(n,t,e,i,r){t=Math.floor(t);var o=n[0][t];if(e>=n[1][t][0])return 0;for(var l=0;l<o.length;l++)if(i===o[l])return 0;return jhe(n,t,e,i,r)}function jhe(n,t,e,i,r){var o=n[0][t],s=n[1][t],a=n[2][t];if(e>=s[0])return 0;s[0]=e,o[0]=i,a[0]=r;for(var l=0,c=0;;){var u=2*l+1,d=u+1,p=n[0][0].length;if(u>=p)break;if(d>=p){if(!(s[u]>e))break;c=u}else if(s[u]>=s[d]){if(!(e<s[u]))break;c=u}else{if(!(e<s[d]))break;c=d}s[l]=s[c],o[l]=o[c],a[l]=a[c],l=c}return s[l]=e,o[l]=i,a[l]=r,1}function KJe(n,t,e,i){for(;2*i+1<e;){var r=2*i+1,o=r+1,s=i;if(n[s]<n[r]&&(s=r),o<e&&n[s]<n[o]&&(s=o),s===i)break;var a=n[i];n[i]=n[s],n[s]=a;var l=t[i];t[i]=t[s],t[s]=l,i=s}}fu.makeHeap=zhe,fu.rejectionSample=function(n,t,e){for(var i=wE.zeros(n),r=0;r<n;r++){for(var o=!0,s=0;o;){s=wE.tauRandInt(t,e);for(var a=!1,l=0;l<r;l++)if(s===i[l]){a=!0;break}a||(o=!1)}i[r]=s}return i},fu.heapPush=KG,fu.uncheckedHeapPush=jhe,fu.buildCandidates=function(n,t,e,i,r){for(var o=zhe(t,i),s=0;s<t;s++)for(var a=0;a<e;a++)if(!(n[0][s][a]<0)){var l=n[0][s][a],c=n[2][s][a],u=wE.tauRand(r);KG(o,s,u,l,c),KG(o,l,u,s,c),n[2][s][a]=0}return o},fu.deheapSort=function(n){for(var t=n[0],e=n[1],i=0;i<t.length;i++)for(var r=t[i],o=e[i],s=0;s<r.length-1;s++){var a=r.length-s-1,l=o.length-s-1,c=r[0];r[0]=r[a],r[a]=c;var u=o[0];o[0]=o[l],o[l]=u,KJe(o,r,l,0)}return{indices:t,weights:e}},fu.smallestFlagged=function(n,t){for(var e=n[0][t],i=n[1][t],r=n[2][t],o=1/0,s=-1,a=0;a>e.length;a++)1===r[a]&&i[a]<o&&(o=i[a],s=a);return s>=0?(r[s]=0,Math.floor(e[s])):-1}}),JG=Rd(es=>{"use strict";var cF=es&&es.__read||function(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,s,i=e.call(n),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(s)throw s.error}}return o},JJe=es&&es.__values||function(n){var t="function"==typeof Symbol&&n[Symbol.iterator],e=0;return t?t.call(n):{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}}},$Je=es&&es.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t};Object.defineProperty(es,"__esModule",{value:!0});var SE,Ghe=$Je(Hb()),Ub=function(){function n(t,e,i,r){if(this.entries=new Map,this.nRows=0,this.nCols=0,t.length!==e.length||t.length!==i.length)throw new Error("rows, cols and values arrays must all have the same length");this.nRows=r[0],this.nCols=r[1];for(var o=0;o<i.length;o++){var s=t[o],a=e[o];this.checkDims(s,a);var l=this.makeKey(s,a);this.entries.set(l,{value:i[o],row:s,col:a})}}return n.prototype.makeKey=function(t,e){return t+":"+e},n.prototype.checkDims=function(t,e){if(!(t<this.nRows&&e<this.nCols))throw new Error("row and/or col specified outside of matrix dimensions")},n.prototype.set=function(t,e,i){this.checkDims(t,e);var r=this.makeKey(t,e);this.entries.has(r)?this.entries.get(r).value=i:this.entries.set(r,{value:i,row:t,col:e})},n.prototype.get=function(t,e,i){void 0===i&&(i=0),this.checkDims(t,e);var r=this.makeKey(t,e);return this.entries.has(r)?this.entries.get(r).value:i},n.prototype.getAll=function(t){void 0===t&&(t=!0);var e=[];return this.entries.forEach(function(i){e.push(i)}),t&&e.sort(function(i,r){return i.row===r.row?i.col-r.col:i.row-r.row}),e},n.prototype.getDims=function(){return[this.nRows,this.nCols]},n.prototype.getRows=function(){return Array.from(this.entries,function(t){return cF(t,2)[1].row})},n.prototype.getCols=function(){return Array.from(this.entries,function(t){return cF(t,2)[1].col})},n.prototype.getValues=function(){return Array.from(this.entries,function(t){return cF(t,2)[1].value})},n.prototype.forEach=function(t){this.entries.forEach(function(e){return t(e.value,e.row,e.col)})},n.prototype.map=function(t){var e=[];this.entries.forEach(function(r){e.push(t(r.value,r.row,r.col))});var i=[this.nRows,this.nCols];return new n(this.getRows(),this.getCols(),e,i)},n.prototype.toArray=function(){var t=this,i=Ghe.empty(this.nRows).map(function(){return Ghe.zeros(t.nCols)});return this.entries.forEach(function(r){i[r.row][r.col]=r.value}),i},n}();es.SparseMatrix=Ub,es.transpose=function(n){var t=[],e=[],i=[];return n.forEach(function(o,s,a){t.push(s),e.push(a),i.push(o)}),new Ub(e,t,i,[n.nCols,n.nRows])},es.identity=function(n){for(var e=cF(n,1)[0],i=new Ub([],[],[],n),r=0;r<e;r++)i.set(r,r,1);return i},es.pairwiseMultiply=function(n,t){return uF(n,t,function(e,i){return e*i})},es.add=function(n,t){return uF(n,t,function(e,i){return e+i})},es.subtract=function(n,t){return uF(n,t,function(e,i){return e-i})},es.maximum=function(n,t){return uF(n,t,function(e,i){return e>i?e:i})},es.multiplyScalar=function(n,t){return n.map(function(e){return e*t})},es.eliminateZeros=function(n){for(var t=new Set,e=n.getValues(),i=n.getRows(),r=n.getCols(),o=0;o<e.length;o++)0===e[o]&&t.add(o);var s=function(u,d){return!t.has(d)},a=e.filter(s),l=i.filter(s),c=r.filter(s);return new Ub(l,c,a,n.getDims())},es.normalize=function(n,t){void 0===t&&(t="l2");var e,i,r=c$e[t],o=new Map;n.forEach(function(d,p,h){var f=o.get(p)||[];f.push(h),o.set(p,f)});var s=new Ub([],[],[],n.getDims()),a=function(d){for(var p=o.get(d).sort(),h=p.map(function(x){return n.get(d,x)}),f=r(h),m=0;m<f.length;m++)s.set(d,p[m],f[m])};try{for(var l=JJe(o.keys()),c=l.next();!c.done;c=l.next())a(c.value)}catch(d){e={error:d}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(e)throw e.error}}return s};var c$e=((SE={}).max=function(n){for(var t=-1/0,e=0;e<n.length;e++)t=n[e]>t?n[e]:t;return n.map(function(i){return i/t})},SE.l1=function(n){for(var t=0,e=0;e<n.length;e++)t+=n[e];return n.map(function(i){return i/t})},SE.l2=function(n){for(var t=0,e=0;e<n.length;e++)t+=Math.pow(n[e],2);return n.map(function(i){return Math.sqrt(Math.pow(i,2)/t)})},SE);function uF(n,t,e){for(var i=new Set,r=[],o=[],s=[],a=function(D,T){r.push(D),o.push(T);var k=e(n.get(D,T),t.get(D,T));s.push(k)},l=n.getValues(),c=n.getRows(),u=n.getCols(),d=0;d<l.length;d++)i.add((p=c[d])+":"+(h=u[d])),a(p,h);var m=t.getValues(),x=t.getRows(),g=t.getCols();for(d=0;d<m.length;d++){var p,h;i.has((p=x[d])+":"+(h=g[d]))||a(p,h)}return new Ub(r,o,s,[n.nRows,n.nCols])}es.getCSR=function(n){var t=[];n.forEach(function(d,p,h){t.push({value:d,row:p,col:h})}),t.sort(function(d,p){return d.row===p.row?d.col-p.col:d.row-p.row});for(var e=[],i=[],r=[],o=-1,s=0;s<t.length;s++){var a=t[s],l=a.row,c=a.col,u=a.value;l!==o&&(o=l,r.push(s)),e.push(c),i.push(u)}return{indices:e,values:i,indptr:r}}}),i6=Rd(Ya=>{"use strict";var d$e=Ya&&Ya.__read||function(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,s,i=e.call(n),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(s)throw s.error}}return o},Whe=Ya&&Ya.__spread||function(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(d$e(arguments[t]));return n},p$e=Ya&&Ya.__values||function(n){var t="function"==typeof Symbol&&n[Symbol.iterator],e=0;return t?t.call(n):{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}}},h$e=Ya&&Ya.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t};Object.defineProperty(Ya,"__esModule",{value:!0});var Xs=h$e(Hb()),qhe=function(t,e,i,r){this.hyperplanes=t,this.offsets=e,this.children=i,this.indices=r};function $G(n,t,e,i,r){if(void 0===e&&(e=30),t.length>e){var o=function(n,t,e){for(var i=n[0].length,r=Xs.tauRandInt(t.length,e),o=Xs.tauRandInt(t.length,e),s=t[r],a=t[o=(o+=r===o?1:0)%t.length],l=0,c=Xs.zeros(i),u=0;u<c.length;u++)c[u]=n[s][u]-n[a][u],l-=c[u]*(n[s][u]+n[a][u])/2;var d=0,p=0,h=Xs.zeros(t.length);for(u=0;u<t.length;u++){for(var f=l,m=0;m<i;m++)f+=c[m]*n[t[u]][m];0===f?(h[u]=Xs.tauRandInt(2,e),0===h[u]?d+=1:p+=1):f>0?(h[u]=0,d+=1):(h[u]=1,p+=1)}var x=Xs.zeros(d),g=Xs.zeros(p);for(d=0,p=0,u=0;u<h.length;u++)0===h[u]?(x[d]=t[u],d+=1):(g[p]=t[u],p+=1);return{indicesLeft:x,indicesRight:g,hyperplane:c,offset:l}}(n,t,r),a=o.indicesRight,l=o.hyperplane,c=o.offset;return{leftChild:$G(n,o.indicesLeft,e,i+1,r),rightChild:$G(n,a,e,i+1,r),isLeaf:!1,hyperplane:l,offset:c}}return{indices:t,isLeaf:!0}}function e6(n,t,e,i,r,o,s){var a;if(n.isLeaf)return i[o][0]=-s,(a=r[s]).splice.apply(a,Whe([0,n.indices.length],n.indices)),{nodeNum:o,leafNum:s+=1};t[o]=n.hyperplane,e[o]=n.offset,i[o][0]=o+1;var l=o,c=e6(n.leftChild,t,e,i,r,o+1,s);return s=c.leafNum,i[l][1]=(o=c.nodeNum)+1,{nodeNum:(c=e6(n.rightChild,t,e,i,r,o+1,s)).nodeNum,leafNum:c.leafNum}}function t6(n){return n.isLeaf?1:1+t6(n.leftChild)+t6(n.rightChild)}function n6(n){return n.isLeaf?1:n6(n.leftChild)+n6(n.rightChild)}function y$e(n,t,e,i){for(var r=t,o=0;o<e.length;o++)r+=n[o]*e[o];return 0===r?Xs.tauRandInt(2,i):r>0?0:1}Ya.FlatTree=qhe,Ya.makeForest=function(n,t,e,i){var r=Math.max(10,t),o=Xs.range(e).map(function(a,l){return function(n,t,e,i){return void 0===t&&(t=30),$G(n,Xs.range(n.length),t,e,i)}(n,r,l,i)}),s=o.map(function(a){return function(n,t){var e=t6(n),i=n6(n),r=Xs.range(e).map(function(){return Xs.zeros(n.hyperplane?n.hyperplane.length:0)}),o=Xs.zeros(e),s=Xs.range(e).map(function(){return[-1,-1]}),a=Xs.range(i).map(function(){return Xs.range(t).map(function(){return-1})});return e6(n,r,o,s,a,0,0),new qhe(r,o,s,a)}(a,r)});return s},Ya.makeLeafArray=function(n){var t,e;if(n.length>0){var i=[];try{for(var r=p$e(n),o=r.next();!o.done;o=r.next())i.push.apply(i,Whe(o.value.indices))}catch(a){t={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return i}return[[-1]]},Ya.searchFlatTree=function(n,t,e){for(var i=0;t.children[i][0]>0;)i=0===y$e(t.hyperplanes[i],t.offsets[i],n,e)?t.children[i][0]:t.children[i][1];return t.indices[-1*t.children[i][0]]}}),Qhe=Rd(Id=>{"use strict";var Yhe=Id&&Id.__values||function(n){var t="function"==typeof Symbol&&n[Symbol.iterator],e=0;return t?t.call(n):{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}}},dF=Id&&Id.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t};Object.defineProperty(Id,"__esModule",{value:!0});var ya=dF(ZG()),x$e=dF(JG()),C$e=dF(i6()),Xhe=dF(Hb());Id.makeNNDescent=function(n,t){return function(i,r,o,s,a,l,c,u){void 0===s&&(s=10),void 0===a&&(a=50),void 0===l&&(l=.001),void 0===c&&(c=.5),void 0===u&&(u=!0);for(var d=i.length,p=ya.makeHeap(i.length,o),h=0;h<i.length;h++)for(var f=ya.rejectionSample(o,i.length,t),m=0;m<f.length;m++){var x=n(i[h],i[f[m]]);ya.heapPush(p,h,x,f[m],1),ya.heapPush(p,f[m],x,h,1)}if(u)for(var g=0;g<r.length;g++)for(h=0;h<r[g].length&&!(r[g][h]<0);h++)for(m=h+1;m<r[g].length&&!(r[g][m]<0);m++)x=n(i[r[g][h]],i[r[g][m]]),ya.heapPush(p,r[g][h],x,r[g][m],1),ya.heapPush(p,r[g][m],x,r[g][h],1);for(g=0;g<s;g++){var b=ya.buildCandidates(p,d,o,a,t),D=0;for(h=0;h<d;h++)for(m=0;m<a;m++){var T=Math.floor(b[0][h][m]);if(!(T<0||Xhe.tauRand(t)<c))for(var k=0;k<a;k++){var Z=Math.floor(b[0][h][k]);Z<0||!b[2][h][m]&&!b[2][h][k]||(x=n(i[T],i[Z]),D+=ya.heapPush(p,T,x,Z,1),D+=ya.heapPush(p,Z,x,T,1))}}if(D<=l*o*i.length)break}return ya.deheapSort(p)}},Id.makeInitializations=function(n){return{initFromRandom:function(i,r,o,s,a){for(var l=0;l<o.length;l++)for(var c=Xhe.rejectionSample(i,r.length,a),u=0;u<c.length;u++)if(!(c[u]<0)){var d=n(r[c[u]],o[l]);ya.heapPush(s,l,d,c[u],1)}},initFromTree:function(i,r,o,s,a){for(var l=0;l<o.length;l++)for(var c=C$e.searchFlatTree(o[l],i,a),u=0;u<c.length;u++){if(c[u]<0)return;var d=n(r[c[u]],o[l]);ya.heapPush(s,l,d,c[u],1)}}}},Id.makeInitializedNNSearch=function(n){return function(e,i,r,o){for(var s,a,l=x$e.getCSR(i),c=l.indices,u=l.indptr,d=0;d<o.length;d++)for(var p=new Set(r[0][d]);;){var h=ya.smallestFlagged(r,d);if(-1===h)break;var f=c.slice(u[h],u[h+1]);try{for(var m=Yhe(f),x=m.next();!x.done;x=m.next()){var g=x.value;if(g!==h&&-1!==g&&!p.has(g)){var b=n(e[g],o[d]);ya.uncheckedHeapPush(r,d,b,g,1),p.add(g)}}}catch(D){s={error:D}}finally{try{x&&!x.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}}return r}},Id.initializeSearch=function(n,t,e,i,r,o,s){var a,l,c=ya.makeHeap(e.length,i);if(r(i,t,e,c,s),n)try{for(var u=Yhe(n),d=u.next();!d.done;d=u.next())o(d.value,t,e,c,s)}catch(h){a={error:h}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(a)throw a.error}}return c}});function EE(n){return T$e.call(n).endsWith("Array]")}var T$e,Khe=ho(()=>{T$e=Object.prototype.toString});function pF(n,t,e){let i=0,r=e(t);for(let o=0;o<n.x.length;o++)i+=Math.abs(n.y[o]-r(n.x[o]));return i}var Zhe=ho(()=>{});function If(n){return D$e.call(n).endsWith("Array]")}var D$e,hF=ho(()=>{D$e=Object.prototype.toString});function A$e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!If(n))throw new TypeError("input must be an array");if(0===n.length)throw new TypeError("input must not be empty");var e=t.fromIndex,i=void 0===e?0:e,r=t.toIndex,o=void 0===r?n.length:r;if(i<0||i>=n.length||!Number.isInteger(i))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=i||o>n.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=n[i],a=i+1;a<o;a++)n[a]>s&&(s=n[a]);return s}var Jhe,$he=ho(()=>{hF(),Jhe=A$e});function I$e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!If(n))throw new TypeError("input must be an array");if(0===n.length)throw new TypeError("input must not be empty");var e=t.fromIndex,i=void 0===e?0:e,r=t.toIndex,o=void 0===r?n.length:r;if(i<0||i>=n.length||!Number.isInteger(i))throw new Error("fromIndex must be a positive integer smaller than length");if(o<=i||o>n.length||!Number.isInteger(o))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var s=n[i],a=i+1;a<o;a++)n[a]<s&&(s=n[a]);return s}var efe,tfe=ho(()=>{hF(),efe=I$e});function P$e(n){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!If(n))throw new TypeError("input must be an array");if(0===n.length)throw new TypeError("input must not be empty");if(void 0!==t.output){if(!If(t.output))throw new TypeError("output option must be an array if specified");e=t.output}else e=new Array(n.length);var i=efe(n),r=Jhe(n);if(i===r)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var o=t.min,s=void 0===o?t.autoMinMax?i:0:o,a=t.max,l=void 0===a?t.autoMinMax?r:1:a;if(s>=l)throw new RangeError("min option must be smaller than max option");for(var c=(l-s)/(r-i),u=0;u<n.length;u++)e[u]=(n[u]-i)*c+s;return e}var r6,nfe=ho(()=>{hF(),$he(),tfe(),r6=P$e});function rfe(){return o6(this)}function o6(n,t={}){let{maxRows:e=15,maxColumns:i=10,maxNumSize:r=8}=t;return`${n.constructor.name} {\n${fF}[\n${ife}${function(n,t,e,i){let{rows:r,columns:o}=n,s=Math.min(r,t),a=Math.min(o,e),l=[];for(let c=0;c<s;c++){let u=[];for(let d=0;d<a;d++)u.push(O$e(n.get(c,d),i));l.push(`${u.join(" ")}`)}return a!==o&&(l[l.length-1]+=` ... ${o-e} more columns`),s!==r&&l.push(`... ${r-t} more rows`),l.join(`\n${ife}`)}(n,e,i,r)}\n${fF}]\n${fF}rows: ${n.rows}\n${fF}columns: ${n.columns}\n}`}function O$e(n,t){let e=String(n);if(e.length<=t)return e.padEnd(t," ");let i=n.toPrecision(t-2);if(i.length<=t)return i;let r=n.toExponential(t-2),o=r.indexOf("e"),s=r.slice(o);return r.slice(0,t-s.length)+s}var fF,ife,ofe=ho(()=>{fF=" ".repeat(2),ife=" ".repeat(4)}),afe=ho(()=>{});function gc(n,t,e){if(t<0||t>(e?n.rows:n.rows-1))throw new RangeError("Row index out of range")}function _c(n,t,e){if(t<0||t>(e?n.columns:n.columns-1))throw new RangeError("Column index out of range")}function n0(n,t){if(t.to1DArray&&(t=t.to1DArray()),t.length!==n.columns)throw new RangeError("vector size must be the same as the number of columns");return t}function i0(n,t){if(t.to1DArray&&(t=t.to1DArray()),t.length!==n.rows)throw new RangeError("vector size must be the same as the number of rows");return t}function k$e(n,t){if("object"!=typeof t)throw new TypeError("unexpected type for row indices");if(t.some(i=>i<0||i>=n.rows))throw new RangeError("row indices are out of range");return Array.isArray(t)||(t=Array.from(t)),t}function F$e(n,t){if("object"!=typeof t)throw new TypeError("unexpected type for column indices");if(t.some(i=>i<0||i>=n.columns))throw new RangeError("column indices are out of range");return Array.isArray(t)||(t=Array.from(t)),t}function s6(n,t,e,i,r){if(5!==arguments.length)throw new RangeError("expected 4 arguments");if(mF("startRow",t),mF("endRow",e),mF("startColumn",i),mF("endColumn",r),t>e||i>r||t<0||t>=n.rows||e<0||e>=n.rows||i<0||i>=n.columns||r<0||r>=n.columns)throw new RangeError("Submatrix indices are out of range")}function TE(n,t=0){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function mF(n,t){if("number"!=typeof t)throw new TypeError(`${n} must be a number`)}function r0(n){if(n.isEmpty())throw new Error("Empty matrix has no elements to index")}var a6=ho(()=>{}),Tfe=ho(()=>{a6()});function Dfe(n,t){return n-t}var ti,rn,Al,AE,o0=ho(()=>{var n,t;nfe(),ofe(),afe(),Tfe(),a6(),ti=class{static from1DArray(t,e,i){if(t*e!==i.length)throw new RangeError("data length does not match given dimensions");let o=new rn(t,e);for(let s=0;s<t;s++)for(let a=0;a<e;a++)o.set(s,a,i[s*e+a]);return o}static rowVector(t){let e=new rn(1,t.length);for(let i=0;i<t.length;i++)e.set(0,i,t[i]);return e}static columnVector(t){let e=new rn(t.length,1);for(let i=0;i<t.length;i++)e.set(i,0,t[i]);return e}static zeros(t,e){return new rn(t,e)}static ones(t,e){return new rn(t,e).fill(1)}static rand(t,e,i={}){if("object"!=typeof i)throw new TypeError("options must be an object");let{random:r=Math.random}=i,o=new rn(t,e);for(let s=0;s<t;s++)for(let a=0;a<e;a++)o.set(s,a,r());return o}static randInt(t,e,i={}){if("object"!=typeof i)throw new TypeError("options must be an object");let{min:r=0,max:o=1e3,random:s=Math.random}=i;if(!Number.isInteger(r))throw new TypeError("min must be an integer");if(!Number.isInteger(o))throw new TypeError("max must be an integer");if(r>=o)throw new RangeError("min must be smaller than max");let a=o-r,l=new rn(t,e);for(let c=0;c<t;c++)for(let u=0;u<e;u++){let d=r+Math.round(s()*a);l.set(c,u,d)}return l}static eye(t,e,i){void 0===e&&(e=t),void 0===i&&(i=1);let r=Math.min(t,e),o=this.zeros(t,e);for(let s=0;s<r;s++)o.set(s,s,i);return o}static diag(t,e,i){let r=t.length;void 0===e&&(e=r),void 0===i&&(i=e);let o=Math.min(r,e,i),s=this.zeros(e,i);for(let a=0;a<o;a++)s.set(a,a,t[a]);return s}static min(t,e){t=this.checkMatrix(t),e=this.checkMatrix(e);let i=t.rows,r=t.columns,o=new rn(i,r);for(let s=0;s<i;s++)for(let a=0;a<r;a++)o.set(s,a,Math.min(t.get(s,a),e.get(s,a)));return o}static max(t,e){t=this.checkMatrix(t),e=this.checkMatrix(e);let i=t.rows,r=t.columns,o=new this(i,r);for(let s=0;s<i;s++)for(let a=0;a<r;a++)o.set(s,a,Math.max(t.get(s,a),e.get(s,a)));return o}static checkMatrix(t){return ti.isMatrix(t)?t:new rn(t)}static isMatrix(t){return null!=t&&"Matrix"===t.klass}get size(){return this.rows*this.columns}apply(t){if("function"!=typeof t)throw new TypeError("callback must be a function");for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)t.call(this,e,i);return this}to1DArray(){let t=[];for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)t.push(this.get(e,i));return t}to2DArray(){let t=[];for(let e=0;e<this.rows;e++){t.push([]);for(let i=0;i<this.columns;i++)t[e].push(this.get(e,i))}return t}toJSON(){return this.to2DArray()}isRowVector(){return 1===this.rows}isColumnVector(){return 1===this.columns}isVector(){return 1===this.rows||1===this.columns}isSquare(){return this.rows===this.columns}isEmpty(){return 0===this.rows||0===this.columns}isSymmetric(){if(this.isSquare()){for(let t=0;t<this.rows;t++)for(let e=0;e<=t;e++)if(this.get(t,e)!==this.get(e,t))return!1;return!0}return!1}isEchelonForm(){let t=0,e=0,i=-1,r=!0,o=!1;for(;t<this.rows&&r;){for(e=0,o=!1;e<this.columns&&!1===o;)0===this.get(t,e)?e++:1===this.get(t,e)&&e>i?(o=!0,i=e):(r=!1,o=!0);t++}return r}isReducedEchelonForm(){let t=0,e=0,i=-1,r=!0,o=!1;for(;t<this.rows&&r;){for(e=0,o=!1;e<this.columns&&!1===o;)0===this.get(t,e)?e++:1===this.get(t,e)&&e>i?(o=!0,i=e):(r=!1,o=!0);for(let s=e+1;s<this.rows;s++)0!==this.get(t,s)&&(r=!1);t++}return r}echelonForm(){let t=this.clone(),e=0,i=0;for(;e<t.rows&&i<t.columns;){let r=e;for(let o=e;o<t.rows;o++)t.get(o,i)>t.get(r,i)&&(r=o);if(0===t.get(r,i))i++;else{t.swapRows(e,r);let o=t.get(e,i);for(let s=i;s<t.columns;s++)t.set(e,s,t.get(e,s)/o);for(let s=e+1;s<t.rows;s++){let a=t.get(s,i)/t.get(e,i);t.set(s,i,0);for(let l=i+1;l<t.columns;l++)t.set(s,l,t.get(s,l)-t.get(e,l)*a)}e++,i++}}return t}reducedEchelonForm(){let t=this.echelonForm(),e=t.columns,i=t.rows,r=i-1;for(;r>=0;)if(0===t.maxRow(r))r--;else{let o=0,s=!1;for(;o<i&&!1===s;)1===t.get(r,o)?s=!0:o++;for(let a=0;a<r;a++){let l=t.get(a,o);for(let c=o;c<e;c++){let u=t.get(a,c)-l*t.get(r,c);t.set(a,c,u)}}r--}return t}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(t={}){if("object"!=typeof t)throw new TypeError("options must be an object");let{rows:e=1,columns:i=1}=t;if(!Number.isInteger(e)||e<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(i)||i<=0)throw new TypeError("columns must be a positive integer");let r=new rn(this.rows*e,this.columns*i);for(let o=0;o<e;o++)for(let s=0;s<i;s++)r.setSubMatrix(this,this.rows*o,this.columns*s);return r}fill(t){for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,t);return this}neg(){return this.mulS(-1)}getRow(t){gc(this,t);let e=[];for(let i=0;i<this.columns;i++)e.push(this.get(t,i));return e}getRowVector(t){return rn.rowVector(this.getRow(t))}setRow(t,e){gc(this,t),e=n0(this,e);for(let i=0;i<this.columns;i++)this.set(t,i,e[i]);return this}swapRows(t,e){gc(this,t),gc(this,e);for(let i=0;i<this.columns;i++){let r=this.get(t,i);this.set(t,i,this.get(e,i)),this.set(e,i,r)}return this}getColumn(t){_c(this,t);let e=[];for(let i=0;i<this.rows;i++)e.push(this.get(i,t));return e}getColumnVector(t){return rn.columnVector(this.getColumn(t))}setColumn(t,e){_c(this,t),e=i0(this,e);for(let i=0;i<this.rows;i++)this.set(i,t,e[i]);return this}swapColumns(t,e){_c(this,t),_c(this,e);for(let i=0;i<this.rows;i++){let r=this.get(i,t);this.set(i,t,this.get(i,e)),this.set(i,e,r)}return this}addRowVector(t){t=n0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)+t[i]);return this}subRowVector(t){t=n0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)-t[i]);return this}mulRowVector(t){t=n0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)*t[i]);return this}divRowVector(t){t=n0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)/t[i]);return this}addColumnVector(t){t=i0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)+t[e]);return this}subColumnVector(t){t=i0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)-t[e]);return this}mulColumnVector(t){t=i0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)*t[e]);return this}divColumnVector(t){t=i0(this,t);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.set(e,i,this.get(e,i)/t[e]);return this}mulRow(t,e){gc(this,t);for(let i=0;i<this.columns;i++)this.set(t,i,this.get(t,i)*e);return this}mulColumn(t,e){_c(this,t);for(let i=0;i<this.rows;i++)this.set(i,t,this.get(i,t)*e);return this}max(){if(this.isEmpty())return NaN;let t=this.get(0,0);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.get(e,i)>t&&(t=this.get(e,i));return t}maxIndex(){r0(this);let t=this.get(0,0),e=[0,0];for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.get(i,r)>t&&(t=this.get(i,r),e[0]=i,e[1]=r);return e}min(){if(this.isEmpty())return NaN;let t=this.get(0,0);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)this.get(e,i)<t&&(t=this.get(e,i));return t}minIndex(){r0(this);let t=this.get(0,0),e=[0,0];for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.get(i,r)<t&&(t=this.get(i,r),e[0]=i,e[1]=r);return e}maxRow(t){if(gc(this,t),this.isEmpty())return NaN;let e=this.get(t,0);for(let i=1;i<this.columns;i++)this.get(t,i)>e&&(e=this.get(t,i));return e}maxRowIndex(t){gc(this,t),r0(this);let e=this.get(t,0),i=[t,0];for(let r=1;r<this.columns;r++)this.get(t,r)>e&&(e=this.get(t,r),i[1]=r);return i}minRow(t){if(gc(this,t),this.isEmpty())return NaN;let e=this.get(t,0);for(let i=1;i<this.columns;i++)this.get(t,i)<e&&(e=this.get(t,i));return e}minRowIndex(t){gc(this,t),r0(this);let e=this.get(t,0),i=[t,0];for(let r=1;r<this.columns;r++)this.get(t,r)<e&&(e=this.get(t,r),i[1]=r);return i}maxColumn(t){if(_c(this,t),this.isEmpty())return NaN;let e=this.get(0,t);for(let i=1;i<this.rows;i++)this.get(i,t)>e&&(e=this.get(i,t));return e}maxColumnIndex(t){_c(this,t),r0(this);let e=this.get(0,t),i=[0,t];for(let r=1;r<this.rows;r++)this.get(r,t)>e&&(e=this.get(r,t),i[0]=r);return i}minColumn(t){if(_c(this,t),this.isEmpty())return NaN;let e=this.get(0,t);for(let i=1;i<this.rows;i++)this.get(i,t)<e&&(e=this.get(i,t));return e}minColumnIndex(t){_c(this,t),r0(this);let e=this.get(0,t),i=[0,t];for(let r=1;r<this.rows;r++)this.get(r,t)<e&&(e=this.get(r,t),i[0]=r);return i}diag(){let t=Math.min(this.rows,this.columns),e=[];for(let i=0;i<t;i++)e.push(this.get(i,i));return e}norm(t="frobenius"){let e=0;if("max"===t)return this.max();if("frobenius"===t){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)e+=this.get(i,r)*this.get(i,r);return Math.sqrt(e)}throw new RangeError(`unknown norm type: ${t}`)}cumulativeSum(){let t=0;for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)t+=this.get(e,i),this.set(e,i,t);return this}dot(t){ti.isMatrix(t)&&(t=t.to1DArray());let e=this.to1DArray();if(e.length!==t.length)throw new RangeError("vectors do not have the same size");let i=0;for(let r=0;r<e.length;r++)i+=e[r]*t[r];return i}mmul(t){t=rn.checkMatrix(t);let e=this.rows,i=this.columns,r=t.columns,o=new rn(e,r),s=new Float64Array(i);for(let a=0;a<r;a++){for(let l=0;l<i;l++)s[l]=t.get(l,a);for(let l=0;l<e;l++){let c=0;for(let u=0;u<i;u++)c+=this.get(l,u)*s[u];o.set(l,a,c)}}return o}strassen2x2(t){t=rn.checkMatrix(t);let e=new rn(2,2),i=this.get(0,0),r=t.get(0,0),o=this.get(0,1),s=t.get(0,1),a=this.get(1,0),l=t.get(1,0),c=this.get(1,1),u=t.get(1,1),d=(i+c)*(r+u),p=(a+c)*r,h=i*(s-u),f=c*(l-r),m=(i+o)*u,D=h+m,T=p+f,k=d-p+h+(a-i)*(r+s);return e.set(0,0,d+f-m+(o-c)*(l+u)),e.set(0,1,D),e.set(1,0,T),e.set(1,1,k),e}strassen3x3(t){t=rn.checkMatrix(t);let e=new rn(3,3),i=this.get(0,0),r=this.get(0,1),o=this.get(0,2),s=this.get(1,0),a=this.get(1,1),l=this.get(1,2),c=this.get(2,0),u=this.get(2,1),d=this.get(2,2),p=t.get(0,0),h=t.get(0,1),f=t.get(0,2),m=t.get(1,0),x=t.get(1,1),g=t.get(1,2),b=t.get(2,0),D=t.get(2,1),T=t.get(2,2),Z=(i-s)*(-h+x),fe=(-i+s+a)*(p-h+x),ue=(s+a)*(-p+h),he=i*p,w=(-i+c+u)*(p-f+g),F=(-i+c)*(f-g),q=(c+u)*(-p+f),Y=(-o+u+d)*(x+b-D),ae=(o-d)*(x-D),le=o*b,Ie=(u+d)*(-b+D),ve=(-o+a+l)*(g+b-T),De=(o-l)*(g-T),nt=(a+l)*(-b+T),Te=(i+r+o-s-a-u-d)*x+fe+ue+he+Y+le+Ie,xt=he+w+q+(i+r+o-a-l-c-u)*g+le+ve+nt,mt=Z+a*(-p+h+m-x-g-b+T)+fe+he+le+ve+De,ce=Z+fe+ue+he+l*D,dt=le+ve+De+nt+s*f,We=he+w+F+u*(-p+f+m-x-g-b+D)+Y+ae+le,Mt=Y+ae+le+Ie+c*h,bt=he+w+F+q+d*T;return e.set(0,0,he+le+r*m),e.set(0,1,Te),e.set(0,2,xt),e.set(1,0,mt),e.set(1,1,ce),e.set(1,2,dt),e.set(2,0,We),e.set(2,1,Mt),e.set(2,2,bt),e}mmulStrassen(t){t=rn.checkMatrix(t);let e=this.clone(),i=e.rows,r=e.columns,o=t.rows,s=t.columns;function a(d,p,h){if(d.rows===p&&d.columns===h)return d;{let x=ti.zeros(p,h);return x=x.setSubMatrix(d,0,0),x}}r!==o&&console.warn(`Multiplying ${i} x ${r} and ${o} x ${s} matrix: dimensions do not match.`);let l=Math.max(i,o),c=Math.max(r,s);return e=a(e,l,c),function u(d,p,h,f){if(h<=512||f<=512)return d.mmul(p);h%2==1&&f%2==1?(d=a(d,h+1,f+1),p=a(p,h+1,f+1)):h%2==1?(d=a(d,h+1,f),p=a(p,h+1,f)):f%2==1&&(d=a(d,h,f+1),p=a(p,h,f+1));let m=parseInt(d.rows/2,10),x=parseInt(d.columns/2,10),g=d.subMatrix(0,m-1,0,x-1),b=p.subMatrix(0,m-1,0,x-1),D=d.subMatrix(0,m-1,x,d.columns-1),T=p.subMatrix(0,m-1,x,p.columns-1),k=d.subMatrix(m,d.rows-1,0,x-1),Z=p.subMatrix(m,p.rows-1,0,x-1),z=d.subMatrix(m,d.rows-1,x,d.columns-1),fe=p.subMatrix(m,p.rows-1,x,p.columns-1),ue=u(ti.add(g,z),ti.add(b,fe),m,x),he=u(ti.add(k,z),b,m,x),w=u(g,ti.sub(T,fe),m,x),F=u(z,ti.sub(Z,b),m,x),q=u(ti.add(g,D),fe,m,x),K=u(ti.sub(k,g),ti.add(b,T),m,x),de=u(ti.sub(D,z),ti.add(Z,fe),m,x),Y=ti.add(ue,F);Y.sub(q),Y.add(de);let ae=ti.add(w,q),le=ti.add(he,F),Ie=ti.sub(ue,he);Ie.add(w),Ie.add(K);let ve=ti.zeros(2*Y.rows,2*Y.columns);return ve=ve.setSubMatrix(Y,0,0),ve=ve.setSubMatrix(ae,Y.rows,0),ve=ve.setSubMatrix(le,0,Y.columns),ve=ve.setSubMatrix(Ie,Y.rows,Y.columns),ve.subMatrix(0,h-1,0,f-1)}(e,t=a(t,l,c),l,c)}scaleRows(t={}){if("object"!=typeof t)throw new TypeError("options must be an object");let{min:e=0,max:i=1}=t;if(!Number.isFinite(e))throw new TypeError("min must be a number");if(!Number.isFinite(i))throw new TypeError("max must be a number");if(e>=i)throw new RangeError("min must be smaller than max");let r=new rn(this.rows,this.columns);for(let o=0;o<this.rows;o++){let s=this.getRow(o);s.length>0&&r6(s,{min:e,max:i,output:s}),r.setRow(o,s)}return r}scaleColumns(t={}){if("object"!=typeof t)throw new TypeError("options must be an object");let{min:e=0,max:i=1}=t;if(!Number.isFinite(e))throw new TypeError("min must be a number");if(!Number.isFinite(i))throw new TypeError("max must be a number");if(e>=i)throw new RangeError("min must be smaller than max");let r=new rn(this.rows,this.columns);for(let o=0;o<this.columns;o++){let s=this.getColumn(o);s.length&&r6(s,{min:e,max:i,output:s}),r.setColumn(o,s)}return r}flipRows(){let t=Math.ceil(this.columns/2);for(let e=0;e<this.rows;e++)for(let i=0;i<t;i++){let r=this.get(e,i),o=this.get(e,this.columns-1-i);this.set(e,i,o),this.set(e,this.columns-1-i,r)}return this}flipColumns(){let t=Math.ceil(this.rows/2);for(let e=0;e<this.columns;e++)for(let i=0;i<t;i++){let r=this.get(i,e),o=this.get(this.rows-1-i,e);this.set(i,e,o),this.set(this.rows-1-i,e,r)}return this}kroneckerProduct(t){t=rn.checkMatrix(t);let e=this.rows,i=this.columns,r=t.rows,o=t.columns,s=new rn(e*r,i*o);for(let a=0;a<e;a++)for(let l=0;l<i;l++)for(let c=0;c<r;c++)for(let u=0;u<o;u++)s.set(r*a+c,o*l+u,this.get(a,l)*t.get(c,u));return s}kroneckerSum(t){if(t=rn.checkMatrix(t),!this.isSquare()||!t.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let e=this.rows,i=t.rows,r=this.kroneckerProduct(rn.eye(i,i)),o=rn.eye(e,e).kroneckerProduct(t);return r.add(o)}transpose(){let t=new rn(this.columns,this.rows);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)t.set(i,e,this.get(e,i));return t}sortRows(t=Dfe){for(let e=0;e<this.rows;e++)this.setRow(e,this.getRow(e).sort(t));return this}sortColumns(t=Dfe){for(let e=0;e<this.columns;e++)this.setColumn(e,this.getColumn(e).sort(t));return this}subMatrix(t,e,i,r){s6(this,t,e,i,r);let o=new rn(e-t+1,r-i+1);for(let s=t;s<=e;s++)for(let a=i;a<=r;a++)o.set(s-t,a-i,this.get(s,a));return o}subMatrixRow(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=this.columns-1),e>i||e<0||e>=this.columns||i<0||i>=this.columns)throw new RangeError("Argument out of range");let r=new rn(t.length,i-e+1);for(let o=0;o<t.length;o++)for(let s=e;s<=i;s++){if(t[o]<0||t[o]>=this.rows)throw new RangeError(`Row index out of range: ${t[o]}`);r.set(o,s-e,this.get(t[o],s))}return r}subMatrixColumn(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=this.rows-1),e>i||e<0||e>=this.rows||i<0||i>=this.rows)throw new RangeError("Argument out of range");let r=new rn(i-e+1,t.length);for(let o=0;o<t.length;o++)for(let s=e;s<=i;s++){if(t[o]<0||t[o]>=this.columns)throw new RangeError(`Column index out of range: ${t[o]}`);r.set(s-e,o,this.get(s,t[o]))}return r}setSubMatrix(t,e,i){if((t=rn.checkMatrix(t)).isEmpty())return this;s6(this,e,e+t.rows-1,i,i+t.columns-1);for(let s=0;s<t.rows;s++)for(let a=0;a<t.columns;a++)this.set(e+s,i+a,t.get(s,a));return this}selection(t,e){let i=function(n,t,e){return{row:k$e(n,t),column:F$e(n,e)}}(this,t,e),r=new rn(t.length,e.length);for(let o=0;o<i.row.length;o++){let s=i.row[o];for(let a=0;a<i.column.length;a++)r.set(o,a,this.get(s,i.column[a]))}return r}trace(){let t=Math.min(this.rows,this.columns),e=0;for(let i=0;i<t;i++)e+=this.get(i,i);return e}clone(){let t=new rn(this.rows,this.columns);for(let e=0;e<this.rows;e++)for(let i=0;i<this.columns;i++)t.set(e,i,this.get(e,i));return t}sum(t){switch(t){case"row":return function(n){let t=TE(n.rows);for(let e=0;e<n.rows;++e)for(let i=0;i<n.columns;++i)t[e]+=n.get(e,i);return t}(this);case"column":return function(n){let t=TE(n.columns);for(let e=0;e<n.rows;++e)for(let i=0;i<n.columns;++i)t[i]+=n.get(e,i);return t}(this);case void 0:return function(n){let t=0;for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)t+=n.get(e,i);return t}(this);default:throw new Error(`invalid option: ${t}`)}}product(t){switch(t){case"row":return function(n){let t=TE(n.rows,1);for(let e=0;e<n.rows;++e)for(let i=0;i<n.columns;++i)t[e]*=n.get(e,i);return t}(this);case"column":return function(n){let t=TE(n.columns,1);for(let e=0;e<n.rows;++e)for(let i=0;i<n.columns;++i)t[i]*=n.get(e,i);return t}(this);case void 0:return function(n){let t=1;for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)t*=n.get(e,i);return t}(this);default:throw new Error(`invalid option: ${t}`)}}mean(t){let e=this.sum(t);switch(t){case"row":for(let i=0;i<this.rows;i++)e[i]/=this.columns;return e;case"column":for(let i=0;i<this.columns;i++)e[i]/=this.rows;return e;case void 0:return e/this.size;default:throw new Error(`invalid option: ${t}`)}}variance(t,e={}){if("object"==typeof t&&(e=t,t=void 0),"object"!=typeof e)throw new TypeError("options must be an object");let{unbiased:i=!0,mean:r=this.mean(t)}=e;if("boolean"!=typeof i)throw new TypeError("unbiased must be a boolean");switch(t){case"row":if(!Array.isArray(r))throw new TypeError("mean must be an array");return function(n,t,e){let i=n.rows,r=n.columns,o=[];for(let s=0;s<i;s++){let a=0,l=0,c=0;for(let u=0;u<r;u++)c=n.get(s,u)-e[s],a+=c,l+=c*c;o.push(t?(l-a*a/r)/(r-1):(l-a*a/r)/r)}return o}(this,i,r);case"column":if(!Array.isArray(r))throw new TypeError("mean must be an array");return function(n,t,e){let i=n.rows,r=n.columns,o=[];for(let s=0;s<r;s++){let a=0,l=0,c=0;for(let u=0;u<i;u++)c=n.get(u,s)-e[s],a+=c,l+=c*c;o.push(t?(l-a*a/i)/(i-1):(l-a*a/i)/i)}return o}(this,i,r);case void 0:if("number"!=typeof r)throw new TypeError("mean must be a number");return function(n,t,e){let i=n.rows,r=n.columns,o=i*r,s=0,a=0,l=0;for(let c=0;c<i;c++)for(let u=0;u<r;u++)l=n.get(c,u)-e,s+=l,a+=l*l;return t?(a-s*s/o)/(o-1):(a-s*s/o)/o}(this,i,r);default:throw new Error(`invalid option: ${t}`)}}standardDeviation(t,e){"object"==typeof t&&(e=t,t=void 0);let i=this.variance(t,e);if(void 0===t)return Math.sqrt(i);for(let r=0;r<i.length;r++)i[r]=Math.sqrt(i[r]);return i}center(t,e={}){if("object"==typeof t&&(e=t,t=void 0),"object"!=typeof e)throw new TypeError("options must be an object");let{center:i=this.mean(t)}=e;switch(t){case"row":if(!Array.isArray(i))throw new TypeError("center must be an array");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)-t[e])}(this,i),this;case"column":if(!Array.isArray(i))throw new TypeError("center must be an array");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)-t[i])}(this,i),this;case void 0:if("number"!=typeof i)throw new TypeError("center must be a number");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)-t)}(this,i),this;default:throw new Error(`invalid option: ${t}`)}}scale(t,e={}){if("object"==typeof t&&(e=t,t=void 0),"object"!=typeof e)throw new TypeError("options must be an object");let i=e.scale;switch(t){case"row":if(void 0===i)i=function(n){let t=[];for(let e=0;e<n.rows;e++){let i=0;for(let r=0;r<n.columns;r++)i+=Math.pow(n.get(e,r),2)/(n.columns-1);t.push(Math.sqrt(i))}return t}(this);else if(!Array.isArray(i))throw new TypeError("scale must be an array");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)/t[e])}(this,i),this;case"column":if(void 0===i)i=function(n){let t=[];for(let e=0;e<n.columns;e++){let i=0;for(let r=0;r<n.rows;r++)i+=Math.pow(n.get(r,e),2)/(n.rows-1);t.push(Math.sqrt(i))}return t}(this);else if(!Array.isArray(i))throw new TypeError("scale must be an array");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)/t[i])}(this,i),this;case void 0:if(void 0===i)i=function(n){let t=n.size-1,e=0;for(let i=0;i<n.columns;i++)for(let r=0;r<n.rows;r++)e+=Math.pow(n.get(r,i),2)/t;return Math.sqrt(e)}(this);else if("number"!=typeof i)throw new TypeError("scale must be a number");return function(n,t){for(let e=0;e<n.rows;e++)for(let i=0;i<n.columns;i++)n.set(e,i,n.get(e,i)/t)}(this,i),this;default:throw new Error(`invalid option: ${t}`)}}toString(t){return o6(this,t)}},ti.prototype.klass="Matrix",typeof Symbol<"u"&&(ti.prototype[Symbol.for("nodejs.util.inspect.custom")]=rfe),ti.random=ti.rand,ti.randomInt=ti.randInt,ti.diagonal=ti.diag,ti.prototype.diagonal=ti.prototype.diag,ti.identity=ti.eye,ti.prototype.negate=ti.prototype.neg,ti.prototype.tensorProduct=ti.prototype.kroneckerProduct,rn=class extends ti{constructor(t,e){if(super(),rn.isMatrix(t))return t.clone();if(Number.isInteger(t)&&t>=0){if(this.data=[],!(Number.isInteger(e)&&e>=0))throw new TypeError("nColumns must be a positive integer");for(let i=0;i<t;i++)this.data.push(new Float64Array(e))}else{if(!Array.isArray(t))throw new TypeError("First argument must be a positive number or an array");{let i=t;if("number"!=typeof(e=(t=i.length)?i[0].length:0))throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let r=0;r<t;r++){if(i[r].length!==e)throw new RangeError("Inconsistent array dimensions");this.data.push(Float64Array.from(i[r]))}}}this.rows=t,this.columns=e}set(t,e,i){return this.data[t][e]=i,this}get(t,e){return this.data[t][e]}removeRow(t){return gc(this,t),this.data.splice(t,1),this.rows-=1,this}addRow(t,e){return void 0===e&&(e=t,t=this.rows),gc(this,t,!0),e=Float64Array.from(n0(this,e)),this.data.splice(t,0,e),this.rows+=1,this}removeColumn(t){_c(this,t);for(let e=0;e<this.rows;e++){let i=new Float64Array(this.columns-1);for(let r=0;r<t;r++)i[r]=this.data[e][r];for(let r=t+1;r<this.columns;r++)i[r-1]=this.data[e][r];this.data[e]=i}return this.columns-=1,this}addColumn(t,e){typeof e>"u"&&(e=t,t=this.columns),_c(this,t,!0),e=i0(this,e);for(let i=0;i<this.rows;i++){let r=new Float64Array(this.columns+1),o=0;for(;o<t;o++)r[o]=this.data[i][o];for(r[o++]=e[i];o<this.columns+1;o++)r[o]=this.data[i][o-1];this.data[i]=r}return this.columns+=1,this}},t=rn,(n=ti).prototype.add=function(i){return"number"==typeof i?this.addS(i):this.addM(i)},n.prototype.addS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)+i);return this},n.prototype.addM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)+i.get(r,o));return this},n.add=function(i,r){return new t(i).add(r)},n.prototype.sub=function(i){return"number"==typeof i?this.subS(i):this.subM(i)},n.prototype.subS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)-i);return this},n.prototype.subM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)-i.get(r,o));return this},n.sub=function(i,r){return new t(i).sub(r)},n.prototype.subtract=n.prototype.sub,n.prototype.subtractS=n.prototype.subS,n.prototype.subtractM=n.prototype.subM,n.subtract=n.sub,n.prototype.mul=function(i){return"number"==typeof i?this.mulS(i):this.mulM(i)},n.prototype.mulS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)*i);return this},n.prototype.mulM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)*i.get(r,o));return this},n.mul=function(i,r){return new t(i).mul(r)},n.prototype.multiply=n.prototype.mul,n.prototype.multiplyS=n.prototype.mulS,n.prototype.multiplyM=n.prototype.mulM,n.multiply=n.mul,n.prototype.div=function(i){return"number"==typeof i?this.divS(i):this.divM(i)},n.prototype.divS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)/i);return this},n.prototype.divM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)/i.get(r,o));return this},n.div=function(i,r){return new t(i).div(r)},n.prototype.divide=n.prototype.div,n.prototype.divideS=n.prototype.divS,n.prototype.divideM=n.prototype.divM,n.divide=n.div,n.prototype.mod=function(i){return"number"==typeof i?this.modS(i):this.modM(i)},n.prototype.modS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)%i);return this},n.prototype.modM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)%i.get(r,o));return this},n.mod=function(i,r){return new t(i).mod(r)},n.prototype.modulus=n.prototype.mod,n.prototype.modulusS=n.prototype.modS,n.prototype.modulusM=n.prototype.modM,n.modulus=n.mod,n.prototype.and=function(i){return"number"==typeof i?this.andS(i):this.andM(i)},n.prototype.andS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)&i);return this},n.prototype.andM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)&i.get(r,o));return this},n.and=function(i,r){return new t(i).and(r)},n.prototype.or=function(i){return"number"==typeof i?this.orS(i):this.orM(i)},n.prototype.orS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)|i);return this},n.prototype.orM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)|i.get(r,o));return this},n.or=function(i,r){return new t(i).or(r)},n.prototype.xor=function(i){return"number"==typeof i?this.xorS(i):this.xorM(i)},n.prototype.xorS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)^i);return this},n.prototype.xorM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)^i.get(r,o));return this},n.xor=function(i,r){return new t(i).xor(r)},n.prototype.leftShift=function(i){return"number"==typeof i?this.leftShiftS(i):this.leftShiftM(i)},n.prototype.leftShiftS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)<<i);return this},n.prototype.leftShiftM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)<<i.get(r,o));return this},n.leftShift=function(i,r){return new t(i).leftShift(r)},n.prototype.signPropagatingRightShift=function(i){return"number"==typeof i?this.signPropagatingRightShiftS(i):this.signPropagatingRightShiftM(i)},n.prototype.signPropagatingRightShiftS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)>>i);return this},n.prototype.signPropagatingRightShiftM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)>>i.get(r,o));return this},n.signPropagatingRightShift=function(i,r){return new t(i).signPropagatingRightShift(r)},n.prototype.rightShift=function(i){return"number"==typeof i?this.rightShiftS(i):this.rightShiftM(i)},n.prototype.rightShiftS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)>>>i);return this},n.prototype.rightShiftM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,this.get(r,o)>>>i.get(r,o));return this},n.rightShift=function(i,r){return new t(i).rightShift(r)},n.prototype.zeroFillRightShift=n.prototype.rightShift,n.prototype.zeroFillRightShiftS=n.prototype.rightShiftS,n.prototype.zeroFillRightShiftM=n.prototype.rightShiftM,n.zeroFillRightShift=n.rightShift,n.prototype.not=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,~this.get(i,r));return this},n.not=function(i){return new t(i).not()},n.prototype.abs=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.abs(this.get(i,r)));return this},n.abs=function(i){return new t(i).abs()},n.prototype.acos=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.acos(this.get(i,r)));return this},n.acos=function(i){return new t(i).acos()},n.prototype.acosh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.acosh(this.get(i,r)));return this},n.acosh=function(i){return new t(i).acosh()},n.prototype.asin=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.asin(this.get(i,r)));return this},n.asin=function(i){return new t(i).asin()},n.prototype.asinh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.asinh(this.get(i,r)));return this},n.asinh=function(i){return new t(i).asinh()},n.prototype.atan=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.atan(this.get(i,r)));return this},n.atan=function(i){return new t(i).atan()},n.prototype.atanh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.atanh(this.get(i,r)));return this},n.atanh=function(i){return new t(i).atanh()},n.prototype.cbrt=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.cbrt(this.get(i,r)));return this},n.cbrt=function(i){return new t(i).cbrt()},n.prototype.ceil=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.ceil(this.get(i,r)));return this},n.ceil=function(i){return new t(i).ceil()},n.prototype.clz32=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.clz32(this.get(i,r)));return this},n.clz32=function(i){return new t(i).clz32()},n.prototype.cos=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.cos(this.get(i,r)));return this},n.cos=function(i){return new t(i).cos()},n.prototype.cosh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.cosh(this.get(i,r)));return this},n.cosh=function(i){return new t(i).cosh()},n.prototype.exp=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.exp(this.get(i,r)));return this},n.exp=function(i){return new t(i).exp()},n.prototype.expm1=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.expm1(this.get(i,r)));return this},n.expm1=function(i){return new t(i).expm1()},n.prototype.floor=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.floor(this.get(i,r)));return this},n.floor=function(i){return new t(i).floor()},n.prototype.fround=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.fround(this.get(i,r)));return this},n.fround=function(i){return new t(i).fround()},n.prototype.log=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.log(this.get(i,r)));return this},n.log=function(i){return new t(i).log()},n.prototype.log1p=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.log1p(this.get(i,r)));return this},n.log1p=function(i){return new t(i).log1p()},n.prototype.log10=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.log10(this.get(i,r)));return this},n.log10=function(i){return new t(i).log10()},n.prototype.log2=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.log2(this.get(i,r)));return this},n.log2=function(i){return new t(i).log2()},n.prototype.round=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.round(this.get(i,r)));return this},n.round=function(i){return new t(i).round()},n.prototype.sign=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.sign(this.get(i,r)));return this},n.sign=function(i){return new t(i).sign()},n.prototype.sin=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.sin(this.get(i,r)));return this},n.sin=function(i){return new t(i).sin()},n.prototype.sinh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.sinh(this.get(i,r)));return this},n.sinh=function(i){return new t(i).sinh()},n.prototype.sqrt=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.sqrt(this.get(i,r)));return this},n.sqrt=function(i){return new t(i).sqrt()},n.prototype.tan=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.tan(this.get(i,r)));return this},n.tan=function(i){return new t(i).tan()},n.prototype.tanh=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.tanh(this.get(i,r)));return this},n.tanh=function(i){return new t(i).tanh()},n.prototype.trunc=function(){for(let i=0;i<this.rows;i++)for(let r=0;r<this.columns;r++)this.set(i,r,Math.trunc(this.get(i,r)));return this},n.trunc=function(i){return new t(i).trunc()},n.pow=function(i,r){return new t(i).pow(r)},n.prototype.pow=function(i){return"number"==typeof i?this.powS(i):this.powM(i)},n.prototype.powS=function(i){for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,Math.pow(this.get(r,o),i));return this},n.prototype.powM=function(i){if(i=t.checkMatrix(i),this.rows!==i.rows||this.columns!==i.columns)throw new RangeError("Matrices dimensions must be equal");for(let r=0;r<this.rows;r++)for(let o=0;o<this.columns;o++)this.set(r,o,Math.pow(this.get(r,o),i.get(r,o)));return this}}),Afe=ho(()=>{}),DE=ho(()=>{o0(),Al=class extends ti{constructor(t){super(),this.data=t,this.rows=t.length,this.columns=t[0].length}set(t,e,i){return this.data[t][e]=i,this}get(t,e){return this.data[t][e]}}}),Ife=ho(()=>{o0(),DE(),AE=class{constructor(t){let a,l,c,u,d,p,h,f,m,e=(t=Al.checkMatrix(t)).clone(),i=e.rows,r=e.columns,o=new Float64Array(i),s=1;for(a=0;a<i;a++)o[a]=a;for(f=new Float64Array(i),l=0;l<r;l++){for(a=0;a<i;a++)f[a]=e.get(a,l);for(a=0;a<i;a++){for(m=Math.min(a,l),d=0,c=0;c<m;c++)d+=e.get(a,c)*f[c];f[a]-=d,e.set(a,l,f[a])}for(u=l,a=l+1;a<i;a++)Math.abs(f[a])>Math.abs(f[u])&&(u=a);if(u!==l){for(c=0;c<r;c++)p=e.get(u,c),e.set(u,c,e.get(l,c)),e.set(l,c,p);h=o[u],o[u]=o[l],o[l]=h,s=-s}if(l<i&&0!==e.get(l,l))for(a=l+1;a<i;a++)e.set(a,l,e.get(a,l)/e.get(l,l))}this.LU=e,this.pivotVector=o,this.pivotSign=s}isSingular(){let t=this.LU,e=t.columns;for(let i=0;i<e;i++)if(0===t.get(i,i))return!0;return!1}solve(t){t=rn.checkMatrix(t);let e=this.LU;if(e.rows!==t.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let a,l,c,r=t.columns,o=t.subMatrixRow(this.pivotVector,0,r-1),s=e.columns;for(c=0;c<s;c++)for(a=c+1;a<s;a++)for(l=0;l<r;l++)o.set(a,l,o.get(a,l)-o.get(c,l)*e.get(a,c));for(c=s-1;c>=0;c--){for(l=0;l<r;l++)o.set(c,l,o.get(c,l)/e.get(c,c));for(a=0;a<c;a++)for(l=0;l<r;l++)o.set(a,l,o.get(a,l)-o.get(c,l)*e.get(a,c))}return o}get determinant(){let t=this.LU;if(!t.isSquare())throw new Error("Matrix must be square");let e=this.pivotSign,i=t.columns;for(let r=0;r<i;r++)e*=t.get(r,r);return e}get lowerTriangularMatrix(){let t=this.LU,e=t.rows,i=t.columns,r=new rn(e,i);for(let o=0;o<e;o++)for(let s=0;s<i;s++)r.set(o,s,o>s?t.get(o,s):o===s?1:0);return r}get upperTriangularMatrix(){let t=this.LU,e=t.rows,i=t.columns,r=new rn(e,i);for(let o=0;o<e;o++)for(let s=0;s<i;s++)r.set(o,s,o<=s?t.get(o,s):0);return r}get pivotPermutationVector(){return Array.from(this.pivotVector)}}});function Op(n,t){let e=0;return Math.abs(n)>Math.abs(t)?(e=t/n,Math.abs(n)*Math.sqrt(1+e*e)):0!==t?(e=n/t,Math.abs(t)*Math.sqrt(1+e*e)):0}var IE,zb,l6=ho(()=>{}),Pfe=ho(()=>{o0(),DE(),l6(),IE=class{constructor(t){let s,a,l,c,e=(t=Al.checkMatrix(t)).clone(),i=t.rows,r=t.columns,o=new Float64Array(r);for(l=0;l<r;l++){let u=0;for(s=l;s<i;s++)u=Op(u,e.get(s,l));if(0!==u){for(e.get(l,l)<0&&(u=-u),s=l;s<i;s++)e.set(s,l,e.get(s,l)/u);for(e.set(l,l,e.get(l,l)+1),a=l+1;a<r;a++){for(c=0,s=l;s<i;s++)c+=e.get(s,l)*e.get(s,a);for(c=-c/e.get(l,l),s=l;s<i;s++)e.set(s,a,e.get(s,a)+c*e.get(s,l))}}o[l]=-u}this.QR=e,this.Rdiag=o}solve(t){t=rn.checkMatrix(t);let e=this.QR,i=e.rows;if(t.rows!==i)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let a,l,c,u,r=t.columns,o=t.clone(),s=e.columns;for(c=0;c<s;c++)for(l=0;l<r;l++){for(u=0,a=c;a<i;a++)u+=e.get(a,c)*o.get(a,l);for(u=-u/e.get(c,c),a=c;a<i;a++)o.set(a,l,o.get(a,l)+u*e.get(a,c))}for(c=s-1;c>=0;c--){for(l=0;l<r;l++)o.set(c,l,o.get(c,l)/this.Rdiag[c]);for(a=0;a<c;a++)for(l=0;l<r;l++)o.set(a,l,o.get(a,l)-o.get(c,l)*e.get(a,c))}return o.subMatrix(0,s-1,0,r-1)}isFullRank(){let t=this.QR.columns;for(let e=0;e<t;e++)if(0===this.Rdiag[e])return!1;return!0}get upperTriangularMatrix(){let r,o,t=this.QR,e=t.columns,i=new rn(e,e);for(r=0;r<e;r++)for(o=0;o<e;o++)i.set(r,o,r<o?t.get(r,o):r===o?this.Rdiag[r]:0);return i}get orthogonalMatrix(){let o,s,a,l,t=this.QR,e=t.rows,i=t.columns,r=new rn(e,i);for(a=i-1;a>=0;a--){for(o=0;o<e;o++)r.set(o,a,0);for(r.set(a,a,1),s=a;s<i;s++)if(0!==t.get(a,a)){for(l=0,o=a;o<e;o++)l+=t.get(o,a)*r.get(o,s);for(l=-l/t.get(a,a),o=a;o<e;o++)r.set(o,s,r.get(o,s)+l*t.get(o,a))}}return r}}}),Rfe=ho(()=>{o0(),DE(),l6(),zb=class{constructor(t,e={}){if((t=Al.checkMatrix(t)).isEmpty())throw new Error("Matrix must be non-empty");let d,i=t.rows,r=t.columns,{computeLeftSingularVectors:o=!0,computeRightSingularVectors:s=!0,autoTranspose:a=!1}=e,l=Boolean(o),c=Boolean(s),u=!1;if(i<r)if(a){d=t.transpose(),i=d.rows,r=d.columns,u=!0;let w=l;l=c,c=w}else d=t.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else d=t.clone();let p=Math.min(i,r),h=Math.min(i+1,r),f=new Float64Array(h),m=new rn(i,p),x=new rn(r,r),g=new Float64Array(r),b=new Float64Array(i),D=new Float64Array(h);for(let w=0;w<h;w++)D[w]=w;let T=Math.min(i-1,r),k=Math.max(0,Math.min(r-2,i)),Z=Math.max(T,k);for(let w=0;w<Z;w++){if(w<T){f[w]=0;for(let F=w;F<i;F++)f[w]=Op(f[w],d.get(F,w));if(0!==f[w]){d.get(w,w)<0&&(f[w]=-f[w]);for(let F=w;F<i;F++)d.set(F,w,d.get(F,w)/f[w]);d.set(w,w,d.get(w,w)+1)}f[w]=-f[w]}for(let F=w+1;F<r;F++){if(w<T&&0!==f[w]){let q=0;for(let K=w;K<i;K++)q+=d.get(K,w)*d.get(K,F);q=-q/d.get(w,w);for(let K=w;K<i;K++)d.set(K,F,d.get(K,F)+q*d.get(K,w))}g[F]=d.get(w,F)}if(l&&w<T)for(let F=w;F<i;F++)m.set(F,w,d.get(F,w));if(w<k){g[w]=0;for(let F=w+1;F<r;F++)g[w]=Op(g[w],g[F]);if(0!==g[w]){g[w+1]<0&&(g[w]=0-g[w]);for(let F=w+1;F<r;F++)g[F]/=g[w];g[w+1]+=1}if(g[w]=-g[w],w+1<i&&0!==g[w]){for(let F=w+1;F<i;F++)b[F]=0;for(let F=w+1;F<i;F++)for(let q=w+1;q<r;q++)b[F]+=g[q]*d.get(F,q);for(let F=w+1;F<r;F++){let q=-g[F]/g[w+1];for(let K=w+1;K<i;K++)d.set(K,F,d.get(K,F)+q*b[K])}}if(c)for(let F=w+1;F<r;F++)x.set(F,w,g[F])}}let z=Math.min(r,i+1);if(T<r&&(f[T]=d.get(T,T)),i<z&&(f[z-1]=0),k+1<z&&(g[k]=d.get(k,z-1)),g[z-1]=0,l){for(let w=T;w<p;w++){for(let F=0;F<i;F++)m.set(F,w,0);m.set(w,w,1)}for(let w=T-1;w>=0;w--)if(0!==f[w]){for(let F=w+1;F<p;F++){let q=0;for(let K=w;K<i;K++)q+=m.get(K,w)*m.get(K,F);q=-q/m.get(w,w);for(let K=w;K<i;K++)m.set(K,F,m.get(K,F)+q*m.get(K,w))}for(let F=w;F<i;F++)m.set(F,w,-m.get(F,w));m.set(w,w,1+m.get(w,w));for(let F=0;F<w-1;F++)m.set(F,w,0)}else{for(let F=0;F<i;F++)m.set(F,w,0);m.set(w,w,1)}}if(c)for(let w=r-1;w>=0;w--){if(w<k&&0!==g[w])for(let F=w+1;F<r;F++){let q=0;for(let K=w+1;K<r;K++)q+=x.get(K,w)*x.get(K,F);q=-q/x.get(w+1,w);for(let K=w+1;K<r;K++)x.set(K,F,x.get(K,F)+q*x.get(K,w))}for(let F=0;F<r;F++)x.set(F,w,0);x.set(w,w,1)}let fe=z-1,ue=0,he=Number.EPSILON;for(;z>0;){let w,F;for(w=z-2;w>=-1&&-1!==w;w--){let q=Number.MIN_VALUE+he*Math.abs(f[w]+Math.abs(f[w+1]));if(Math.abs(g[w])<=q||Number.isNaN(g[w])){g[w]=0;break}}if(w===z-2)F=4;else{let q;for(q=z-1;q>=w&&q!==w;q--){let K=(q!==z?Math.abs(g[q]):0)+(q!==w+1?Math.abs(g[q-1]):0);if(Math.abs(f[q])<=he*K){f[q]=0;break}}q===w?F=3:q===z-1?F=1:(F=2,w=q)}switch(w++,F){case 1:{let q=g[z-2];g[z-2]=0;for(let K=z-2;K>=w;K--){let de=Op(f[K],q),Y=f[K]/de,ae=q/de;if(f[K]=de,K!==w&&(q=-ae*g[K-1],g[K-1]=Y*g[K-1]),c)for(let le=0;le<r;le++)de=Y*x.get(le,K)+ae*x.get(le,z-1),x.set(le,z-1,-ae*x.get(le,K)+Y*x.get(le,z-1)),x.set(le,K,de)}break}case 2:{let q=g[w-1];g[w-1]=0;for(let K=w;K<z;K++){let de=Op(f[K],q),Y=f[K]/de,ae=q/de;if(f[K]=de,q=-ae*g[K],g[K]=Y*g[K],l)for(let le=0;le<i;le++)de=Y*m.get(le,K)+ae*m.get(le,w-1),m.set(le,w-1,-ae*m.get(le,K)+Y*m.get(le,w-1)),m.set(le,K,de)}break}case 3:{let q=Math.max(Math.abs(f[z-1]),Math.abs(f[z-2]),Math.abs(g[z-2]),Math.abs(f[w]),Math.abs(g[w])),K=f[z-1]/q,de=f[z-2]/q,Y=g[z-2]/q,ae=f[w]/q,le=g[w]/q,Ie=((de+K)*(de-K)+Y*Y)/2,ve=K*Y*(K*Y),De=0;(0!==Ie||0!==ve)&&(De=Ie<0?0-Math.sqrt(Ie*Ie+ve):Math.sqrt(Ie*Ie+ve),De=ve/(Ie+De));let nt=(ae+K)*(ae-K)+De,gt=ae*le;for(let Ue=w;Ue<z-1;Ue++){let Ae=Op(nt,gt);0===Ae&&(Ae=Number.MIN_VALUE);let tn=nt/Ae,pt=gt/Ae;if(Ue!==w&&(g[Ue-1]=Ae),nt=tn*f[Ue]+pt*g[Ue],g[Ue]=tn*g[Ue]-pt*f[Ue],gt=pt*f[Ue+1],f[Ue+1]=tn*f[Ue+1],c)for(let wt=0;wt<r;wt++)Ae=tn*x.get(wt,Ue)+pt*x.get(wt,Ue+1),x.set(wt,Ue+1,-pt*x.get(wt,Ue)+tn*x.get(wt,Ue+1)),x.set(wt,Ue,Ae);if(Ae=Op(nt,gt),0===Ae&&(Ae=Number.MIN_VALUE),tn=nt/Ae,pt=gt/Ae,f[Ue]=Ae,nt=tn*g[Ue]+pt*f[Ue+1],f[Ue+1]=-pt*g[Ue]+tn*f[Ue+1],gt=pt*g[Ue+1],g[Ue+1]=tn*g[Ue+1],l&&Ue<i-1)for(let wt=0;wt<i;wt++)Ae=tn*m.get(wt,Ue)+pt*m.get(wt,Ue+1),m.set(wt,Ue+1,-pt*m.get(wt,Ue)+tn*m.get(wt,Ue+1)),m.set(wt,Ue,Ae)}g[z-2]=nt,ue+=1;break}case 4:if(f[w]<=0&&(f[w]=f[w]<0?-f[w]:0,c))for(let q=0;q<=fe;q++)x.set(q,w,-x.get(q,w));for(;w<fe&&!(f[w]>=f[w+1]);){let q=f[w];if(f[w]=f[w+1],f[w+1]=q,c&&w<r-1)for(let K=0;K<r;K++)q=x.get(K,w+1),x.set(K,w+1,x.get(K,w)),x.set(K,w,q);if(l&&w<i-1)for(let K=0;K<i;K++)q=m.get(K,w+1),m.set(K,w+1,m.get(K,w)),m.set(K,w,q);w++}ue=0,z--}}if(u){let w=x;x=m,m=w}this.m=i,this.n=r,this.s=f,this.U=m,this.V=x}solve(t){let e=t,i=this.threshold,r=this.s.length,o=rn.zeros(r,r);for(let p=0;p<r;p++)Math.abs(this.s[p])<=i?o.set(p,p,0):o.set(p,p,1/this.s[p]);let s=this.U,a=this.rightSingularVectors,l=a.mmul(o),c=a.rows,u=s.rows,d=rn.zeros(c,u);for(let p=0;p<c;p++)for(let h=0;h<u;h++){let f=0;for(let m=0;m<r;m++)f+=l.get(p,m)*s.get(h,m);d.set(p,h,f)}return d.mmul(e)}solveForDiagonal(t){return this.solve(rn.diag(t))}inverse(){let t=this.V,e=this.threshold,i=t.rows,r=t.columns,o=new rn(i,this.s.length);for(let u=0;u<i;u++)for(let d=0;d<r;d++)Math.abs(this.s[d])>e&&o.set(u,d,t.get(u,d)/this.s[d]);let s=this.U,a=s.rows,l=s.columns,c=new rn(i,a);for(let u=0;u<i;u++)for(let d=0;d<a;d++){let p=0;for(let h=0;h<l;h++)p+=o.get(u,h)*s.get(d,h);c.set(u,d,p)}return c}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let t=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,e=0,i=this.s;for(let r=0,o=i.length;r<o;r++)i[r]>t&&e++;return e}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return rn.diag(this.s)}}});var kfe=ho(()=>{Ife(),Pfe(),Rfe(),o0(),DE()}),Ffe=ho(()=>{o0(),Afe(),kfe()});function u6(n,t,e,i,r){let s=rn.eye(t.length,t.length,e*i*i),a=r(t),l=new Float64Array(n.x.length);for(let p=0;p<n.x.length;p++)l[p]=a(n.x[p]);let c=function(n,t,e,i,r){let o=e.length,s=n.x.length,a=new Array(o);for(let l=0;l<o;l++){a[l]=new Array(s);let c=e.slice();c[l]+=i;let u=r(c);for(let d=0;d<s;d++)a[l][d]=t[d]-u(n.x[d])}return new rn(a)}(n,l,t,i,r),u=function(n,t){let e=n.x.length,i=new Array(e);for(let r=0;r<e;r++)i[r]=[n.y[r]-t[r]];return new rn(i)}(n,l),d=function(n,t=!1){return n=Al.checkMatrix(n),t?new zb(n).inverse():function(n,t,e=!1){return n=Al.checkMatrix(n),t=Al.checkMatrix(t),e?new zb(n).solve(t):n.isSquare()?new AE(n).solve(t):new IE(n).solve(t)}(n,rn.eye(n.rows))}(s.add(c.mmul(c.transpose())));return(t=(t=new rn([t])).sub(d.mmul(c).mmul(u).mul(i).transpose())).to1DArray()}var Nfe=ho(()=>{Ffe()}),Bfe={};function Lfe(n,t,e={}){let{maxIterations:i=100,gradientDifference:r=.1,damping:o=0,errorTolerance:s=.01,minValues:a,maxValues:l,initialValues:c}=e;if(o<=0)throw new Error("The damping option must be a positive number");if(!n.x||!n.y)throw new Error("The data parameter must have x and y elements");if(!EE(n.x)||n.x.length<2||!EE(n.y)||n.y.length<2)throw new Error("The data parameter elements must be an array with more than 2 points");if(n.x.length!==n.y.length)throw new Error("The data parameter elements must have the same size");let u=c||new Array(t.length).fill(1),d=u.length;if(l=l||new Array(d).fill(Number.MAX_SAFE_INTEGER),a=a||new Array(d).fill(Number.MIN_SAFE_INTEGER),l.length!==a.length)throw new Error("minValues and maxValues must be the same size");if(!EE(u))throw new Error("initialValues must be an array");let f,p=pF(n,u,t),h=p<=s;for(f=0;f<i&&!h;f++){u=u6(n,u,o,r,t);for(let m=0;m<d;m++)u[m]=Math.min(Math.max(a[m],u[m]),l[m]);if(p=pF(n,u,t),isNaN(p))break;h=p<=s}return{parameterValues:u,parameterError:p,iterations:f}}BE(Bfe,{default:()=>Lfe});var Vfe=ho(()=>{Khe(),Zhe(),Nfe()}),Jfe=Rd(wo=>{"use strict";var Hfe=wo&&wo.__awaiter||function(n,t,e,i){return new(e||(e=Promise))(function(r,o){function s(c){try{l(i.next(c))}catch(u){o(u)}}function a(c){try{l(i.throw(c))}catch(u){o(u)}}function l(c){c.done?r(c.value):new e(function(u){u(c.value)}).then(s,a)}l((i=i.apply(n,t||[])).next())})},Ufe=wo&&wo.__generator||function(n,t){var i,r,o,s,e={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,r=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(!(o=(o=e.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){e=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){e.label=c[1];break}if(6===c[0]&&e.label<o[1]){e.label=o[1],o=c;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(c);break}o[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(n,e)}catch(u){c=[6,u],r=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},d6=wo&&wo.__read||function(n,t){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var r,s,i=e.call(n),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(s)throw s.error}}return o},zfe=wo&&wo.__spread||function(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(d6(arguments[t]));return n},PE=wo&&wo.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t},B$e=wo&&wo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wo,"__esModule",{value:!0});var n,V$e=PE(ZG()),co=PE(JG()),gF=PE(Qhe()),jfe=PE(i6()),Mo=PE(Hb()),H$e=B$e((Vfe(),n=Bfe,I6(LE({},"__esModule",{value:!0}),n))),_F=.001,U$e=function(){function n(t){void 0===t&&(t={});var e=this;this.learningRate=1,this.localConnectivity=1,this.minDist=.1,this.nComponents=2,this.nEpochs=0,this.nNeighbors=15,this.negativeSampleRate=5,this.random=Math.random,this.repulsionStrength=1,this.setOpMixRatio=1,this.spread=1,this.transformQueueSize=4,this.targetMetric="categorical",this.targetWeight=.5,this.targetNNeighbors=this.nNeighbors,this.distanceFn=Yfe,this.isInitialized=!1,this.rpForest=[],this.embedding=[],this.optimizationState=new j$e;var i=function(r){void 0!==t[r]&&(e[r]=t[r])};i("distanceFn"),i("learningRate"),i("localConnectivity"),i("minDist"),i("nComponents"),i("nEpochs"),i("nNeighbors"),i("negativeSampleRate"),i("random"),i("repulsionStrength"),i("setOpMixRatio"),i("spread"),i("transformQueueSize")}return n.prototype.fit=function(t){return this.initializeFit(t),this.optimizeLayout(),this.embedding},n.prototype.fitAsync=function(t,e){return void 0===e&&(e=function(){return!0}),Hfe(this,void 0,void 0,function(){return Ufe(this,function(i){switch(i.label){case 0:return this.initializeFit(t),[4,this.optimizeLayoutAsync(e)];case 1:return i.sent(),[2,this.embedding]}})})},n.prototype.setSupervisedProjection=function(t,e){void 0===e&&(e={}),this.Y=t,this.targetMetric=e.targetMetric||this.targetMetric,this.targetWeight=e.targetWeight||this.targetWeight,this.targetNNeighbors=e.targetNNeighbors||this.targetNNeighbors},n.prototype.setPrecomputedKNN=function(t,e){this.knnIndices=t,this.knnDistances=e},n.prototype.initializeFit=function(t){if(t.length<=this.nNeighbors)throw new Error("Not enough data points ("+t.length+") to create nNeighbors: "+this.nNeighbors+".  Add more data points or adjust the configuration.");if(this.X===t&&this.isInitialized)return this.getNEpochs();if(this.X=t,!this.knnIndices&&!this.knnDistances){var e=this.nearestNeighbors(t);this.knnIndices=e.knnIndices,this.knnDistances=e.knnDistances}this.graph=this.fuzzySimplicialSet(t,this.nNeighbors,this.setOpMixRatio),this.makeSearchFns(),this.searchGraph=this.makeSearchGraph(t),this.processGraphForSupervisedProjection();var i=this.initializeSimplicialSetEmbedding(),o=i.tail,s=i.epochsPerSample;return this.optimizationState.head=i.head,this.optimizationState.tail=o,this.optimizationState.epochsPerSample=s,this.initializeOptimization(),this.prepareForOptimizationLoop(),this.isInitialized=!0,this.getNEpochs()},n.prototype.makeSearchFns=function(){var t=gF.makeInitializations(this.distanceFn),i=t.initFromRandom;this.initFromTree=t.initFromTree,this.initFromRandom=i,this.search=gF.makeInitializedNNSearch(this.distanceFn)},n.prototype.makeSearchGraph=function(t){for(var e=this.knnIndices,i=this.knnDistances,o=new co.SparseMatrix([],[],[],[t.length,t.length]),s=0;s<e.length;s++)for(var a=e[s],l=i[s],c=0;c<a.length;c++){var d=l[c];d>0&&o.set(s,a[c],d)}var p=co.transpose(o);return co.maximum(o,p)},n.prototype.transform=function(t){var e=this,i=this.X;if(void 0===i||0===i.length)throw new Error("No data has been fit.");var r=Math.floor(this.nNeighbors*this.transformQueueSize);r=Math.min(i.length,r);var o=gF.initializeSearch(this.rpForest,i,t,r,this.initFromRandom,this.initFromTree,this.random),s=this.search(i,this.searchGraph,o,t),a=V$e.deheapSort(s),l=a.indices,c=a.weights;l=l.map(function(de){return de.slice(0,e.nNeighbors)}),c=c.map(function(de){return de.slice(0,e.nNeighbors)});var u=Math.max(0,this.localConnectivity-1),d=this.smoothKNNDistance(c,this.nNeighbors,u),f=this.computeMembershipStrengths(l,c,d.sigmas,d.rhos),D=new co.SparseMatrix(f.rows,f.cols,f.vals,[t.length,i.length]),T=co.normalize(D,"l1"),k=co.getCSR(T),Z=t.length,ue=Zfe(Mo.reshape2d(k.indices,Z,this.nNeighbors),Mo.reshape2d(k.values,Z,this.nNeighbors),this.embedding),he=this.nEpochs?this.nEpochs/3:D.nRows<=1e4?100:30,w=D.getValues().reduce(function(de,Y){return Y>de?Y:de},0);D=D.map(function(de){return de<w/he?0:de}),D=co.eliminateZeros(D);var F=this.makeEpochsPerSample(D.getValues(),he),q=D.getRows(),K=D.getCols();return this.assignOptimizationStateParameters({headEmbedding:ue,tailEmbedding:this.embedding,head:q,tail:K,currentEpoch:0,nEpochs:he,nVertices:D.getDims()[1],epochsPerSample:F}),this.prepareForOptimizationLoop(),this.optimizeLayout()},n.prototype.processGraphForSupervisedProjection=function(){var e=this.Y;if(e){if(e.length!==this.X.length)throw new Error("Length of X and y must be equal");"categorical"===this.targetMetric&&(this.graph=this.categoricalSimplicialSetIntersection(this.graph,e,this.targetWeight<1?1/(1-this.targetWeight)*2.5:1e12))}},n.prototype.step=function(){var t=this.optimizationState.currentEpoch;return t<this.getNEpochs()&&this.optimizeLayoutStep(t),this.optimizationState.currentEpoch},n.prototype.getEmbedding=function(){return this.embedding},n.prototype.nearestNeighbors=function(t){var f,r=this.nNeighbors,s=gF.makeNNDescent(this.distanceFn,this.random),l=5+Math.floor(.5==(f=Math.pow(t.length,.5)/20)?0:Math.round(f)),c=Math.max(5,Math.floor(Math.round(function(f){return Math.log(f)/Math.log(2)}(t.length))));this.rpForest=jfe.makeForest(t,r,l,this.random);var d=s(t,jfe.makeLeafArray(this.rpForest),r,c);return{knnIndices:d.indices,knnDistances:d.weights}},n.prototype.fuzzySimplicialSet=function(t,e,i){void 0===i&&(i=1);var r=this,o=r.knnIndices,s=void 0===o?[]:o,a=r.knnDistances,l=void 0===a?[]:a,u=this.smoothKNNDistance(l,e,r.localConnectivity),h=this.computeMembershipStrengths(s,l,u.sigmas,u.rhos),b=new co.SparseMatrix(h.rows,h.cols,h.vals,[t.length,t.length]),D=co.transpose(b),T=co.pairwiseMultiply(b,D),k=co.subtract(co.add(b,D),T),Z=co.multiplyScalar(k,i),z=co.multiplyScalar(T,1-i);return co.add(Z,z)},n.prototype.categoricalSimplicialSetIntersection=function(t,e,i,r){void 0===r&&(r=1);var o=Qfe(t,e,r,i);return Kfe(o=co.eliminateZeros(o))},n.prototype.smoothKNNDistance=function(t,e,i,r,o){void 0===i&&(i=1),void 0===r&&(r=64),void 0===o&&(o=1);for(var s=Math.log(e)/Math.log(2)*o,a=Mo.zeros(t.length),l=Mo.zeros(t.length),c=0;c<t.length;c++){var u=0,d=1/0,p=1,h=t[c],f=h.filter(function(z){return z>0});if(f.length>=i){var m=Math.floor(i),x=i-m;m>0?(a[c]=f[m-1],x>1e-5&&(a[c]+=x*(f[m]-f[m-1]))):a[c]=x*f[0]}else f.length>0&&(a[c]=Mo.max(f));for(var g=0;g<r;g++){for(var b=0,D=1;D<t[c].length;D++){var T=t[c][D]-a[c];b+=T>0?Math.exp(-T/p):1}if(Math.abs(b-s)<1e-5)break;b>s?p=(u+(d=p))/2:(u=p,d===1/0?p*=2:p=(u+d)/2)}if(l[c]=p,a[c]>0){var k=Mo.mean(h);l[c]<_F*k&&(l[c]=_F*k)}else{var Z=Mo.mean(t.map(Mo.mean));l[c]<_F*Z&&(l[c]=_F*Z)}}return{sigmas:l,rhos:a}},n.prototype.computeMembershipStrengths=function(t,e,i,r){for(var o=t.length,s=t[0].length,a=Mo.zeros(o*s),l=Mo.zeros(o*s),c=Mo.zeros(o*s),u=0;u<o;u++)for(var d=0;d<s;d++){var p=0;-1!==t[u][d]&&(p=t[u][d]===u?0:e[u][d]-r[u]<=0?1:Math.exp(-(e[u][d]-r[u])/i[u]),a[u*s+d]=u,l[u*s+d]=t[u][d],c[u*s+d]=p)}return{rows:a,cols:l,vals:c}},n.prototype.initializeSimplicialSetEmbedding=function(){for(var t=this,e=this.getNEpochs(),i=this.nComponents,r=this.graph.getValues(),o=0,s=0;s<r.length;s++)o<r[s]&&(o=r[s]);var l=this.graph.map(function(m){return m<o/e?0:m});this.embedding=Mo.zeros(l.nRows).map(function(){return Mo.zeros(i).map(function(){return 20*Mo.tauRand(t.random)-10})});var c=[],u=[],d=[],p=l.getAll();for(s=0;s<p.length;s++){var h=p[s];h.value&&(c.push(h.value),d.push(h.row),u.push(h.col))}return{head:u,tail:d,epochsPerSample:this.makeEpochsPerSample(c,e)}},n.prototype.makeEpochsPerSample=function(t,e){var i=Mo.filled(t.length,-1),r=Mo.max(t),o=t.map(function(s){return s/r*e});return o.forEach(function(s,a){s>0&&(i[a]=e/o[a])}),i},n.prototype.assignOptimizationStateParameters=function(t){Object.assign(this.optimizationState,t)},n.prototype.prepareForOptimizationLoop=function(){var t=this,e=t.repulsionStrength,i=t.learningRate,r=t.negativeSampleRate,o=this.optimizationState,s=o.epochsPerSample,a=o.headEmbedding,c=a[0].length,u=a.length===o.tailEmbedding.length,d=s.map(function(f){return f/r}),p=zfe(d),h=zfe(s);this.assignOptimizationStateParameters({epochOfNextSample:h,epochOfNextNegativeSample:p,epochsPerNegativeSample:d,moveOther:u,initialAlpha:i,alpha:i,gamma:e,dim:c})},n.prototype.initializeOptimization=function(){var t=this.embedding,e=this.embedding,i=this.optimizationState,r=i.head,o=i.tail,s=i.epochsPerSample,a=this.getNEpochs(),l=this.graph.nCols,c=Xfe(this.spread,this.minDist);this.assignOptimizationStateParameters({headEmbedding:t,tailEmbedding:e,head:r,tail:o,epochsPerSample:s,a:c.a,b:c.b,nEpochs:a,nVertices:l})},n.prototype.optimizeLayoutStep=function(t){for(var e=this.optimizationState,i=e.head,r=e.tail,o=e.headEmbedding,s=e.tailEmbedding,a=e.epochsPerSample,l=e.epochOfNextSample,c=e.epochOfNextNegativeSample,u=e.epochsPerNegativeSample,d=e.moveOther,p=e.initialAlpha,h=e.alpha,f=e.gamma,m=e.a,x=e.b,g=e.dim,b=e.nEpochs,D=e.nVertices,k=0;k<a.length;k++)if(!(l[k]>t)){var Z=i[k],fe=o[Z],ue=s[r[k]],he=qfe(fe,ue),w=0;he>0&&(w=-2*m*x*Math.pow(he,x-1),w/=m*Math.pow(he,x)+1);for(var F=0;F<g;F++){var q=Wfe(w*(fe[F]-ue[F]),4);fe[F]+=q*h,d&&(ue[F]+=-q*h)}l[k]+=a[k];for(var K=Math.floor((t-c[k])/u[k]),de=0;de<K;de++){var Y=Mo.tauRandInt(D,this.random),ae=s[Y],le=qfe(fe,ae),Ie=0;if(le>0)Ie=2*f*x,Ie/=(.001+le)*(m*Math.pow(le,x)+1);else if(Z===Y)continue;for(F=0;F<g;F++)q=4,Ie>0&&(q=Wfe(Ie*(fe[F]-ae[F]),4)),fe[F]+=q*h}c[k]+=K*u[k]}return e.alpha=p*(1-t/b),e.currentEpoch+=1,o},n.prototype.optimizeLayoutAsync=function(t){var e=this;return void 0===t&&(t=function(){return!0}),new Promise(function(i,r){var o=function(){return Hfe(e,void 0,void 0,function(){var s,a,c,u,d;return Ufe(this,function(p){try{if(a=(s=this.optimizationState).nEpochs,this.embedding=this.optimizeLayoutStep(s.currentEpoch),u=!1===t(c=this.optimizationState.currentEpoch),d=c===a,u||d)return[2,i(d)];setTimeout(function(){return o()},0)}catch(h){r(h)}return[2]})})};setTimeout(function(){return o()},0)})},n.prototype.optimizeLayout=function(t){void 0===t&&(t=function(){return!0});for(var e=!1,i=[];!e;){var r=this.optimizationState,o=r.nEpochs;i=this.optimizeLayoutStep(r.currentEpoch);var a=this.optimizationState.currentEpoch,l=!1===t(a);e=a===o||l}return i},n.prototype.getNEpochs=function(){if(this.nEpochs>0)return this.nEpochs;var e=this.graph.nRows;return e<=2500?500:e<=5e3?400:e<=7500?300:200},n}();function Yfe(n,t){for(var e=0,i=0;i<n.length;i++)e+=Math.pow(n[i]-t[i],2);return Math.sqrt(e)}wo.UMAP=U$e,wo.euclidean=Yfe,wo.cosine=function(n,t){for(var e=0,i=0,r=0,o=0;o<n.length;o++)e+=n[o]*t[o],i+=Math.pow(n[o],2),r+=Math.pow(t[o],2);return 0===i&&0===r?0:0===i||0===r?1:1-e/Math.sqrt(i*r)};var j$e=function(){this.currentEpoch=0,this.headEmbedding=[],this.tailEmbedding=[],this.head=[],this.tail=[],this.epochsPerSample=[],this.epochOfNextSample=[],this.epochOfNextNegativeSample=[],this.epochsPerNegativeSample=[],this.moveOther=!0,this.initialAlpha=1,this.alpha=1,this.gamma=1,this.a=1.5769434603113077,this.b=.8950608779109733,this.dim=2,this.nEpochs=500,this.nVertices=0};function Wfe(n,t){return n>t?t:n<-t?-t:n}function qfe(n,t){for(var e=0,i=0;i<n.length;i++)e+=Math.pow(n[i]-t[i],2);return e}function Xfe(n,t){var i=Mo.linear(0,3*n,300).map(function(p){return p<t?1:p}),r=Mo.zeros(i.length).map(function(p,h){return i[h]>=t?Math.exp(-(i[h]-t)/n):p}),l=H$e.default({x:i,y:r},function(p){var h=d6(p,2),f=h[0],m=h[1];return function(x){return 1/(1+f*Math.pow(x,2*m))}},{damping:1.5,initialValues:[.5,.5],gradientDifference:.1,maxIterations:100,errorTolerance:.01}).parameterValues,c=d6(l,2);return{a:c[0],b:c[1]}}function Qfe(n,t,e,i){return void 0===e&&(e=1),void 0===i&&(i=5),n.map(function(r,o,s){return-1===t[o]||-1===t[s]?r*Math.exp(-e):t[o]!==t[s]?r*Math.exp(-i):r})}function Kfe(n){n=co.normalize(n,"max");var t=co.transpose(n),e=co.pairwiseMultiply(t,n);return n=co.add(n,co.subtract(t,e)),co.eliminateZeros(n)}function Zfe(n,t,e){for(var i=Mo.zeros(n.length).map(function(l){return Mo.zeros(e[0].length)}),r=0;r<n.length;r++)for(var o=0;o<n[0].length;o++)for(var s=0;s<e[0].length;s++)i[r][s]+=t[r][o]*e[n[r][o]][s];return i}wo.findABParams=Xfe,wo.fastIntersection=Qfe,wo.resetLocalConnectivity=Kfe,wo.initTransform=Zfe}),$fe=Rd(p6=>{"use strict";Object.defineProperty(p6,"__esModule",{value:!0});var G$e=Jfe();p6.UMAP=G$e.UMAP});function En(n){return"function"==typeof n}function c0(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 VE=c0(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 kf(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Sn=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(En(i))try{i()}catch(o){t=o instanceof VE?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{P6(o)}catch(s){t=t??[],s instanceof VE?t=[...t,...s.errors]:t.push(s)}}if(t)throw new VE(t)}}add(t){var e;if(t&&t!==this)if(this.closed)P6(t);else{if(t instanceof Sn){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)&&kf(e,t)}remove(t){let{_finalizers:e}=this;e&&kf(e,t),t instanceof Sn&&t._removeParent(this)}};Sn.EMPTY=(()=>{let n=new Sn;return n.closed=!0,n})();var sN=Sn.EMPTY;function HE(n){return n instanceof Sn||n&&"closed"in n&&En(n.remove)&&En(n.add)&&En(n.unsubscribe)}function P6(n){En(n)?n():n.unsubscribe()}var Cc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},u0={setTimeout(n,t,...e){let{delegate:i}=u0;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=u0;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function UE(n){u0.setTimeout(()=>{let{onUnhandledError:t}=Cc;if(!t)throw n;t(n)})}function Mc(){}var R6=aN("C",void 0,void 0);function aN(n,t,e){return{kind:n,value:t,error:e}}var Ff=null;function d0(n){if(Cc.useDeprecatedSynchronousErrorHandling){let t=!Ff;if(t&&(Ff={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Ff;if(Ff=null,e)throw i}}else n()}var Nf=class extends Sn{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,HE(t)&&t.add(this)):this.destination=s0e}static create(t,e,i){return new Od(t,e,i)}next(t){this.isStopped?cN(aN("N",t,void 0),this):this._next(t)}error(t){this.isStopped?cN(aN("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?cN(R6,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()}}},r0e=Function.prototype.bind;function lN(n,t){return r0e.call(n,t)}var Od=class extends Nf{constructor(t,e,i){let r;if(super(),En(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&Cc.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&lN(t.next,o),error:t.error&&lN(t.error,o),complete:t.complete&&lN(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){zE(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){zE(i)}else zE(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){zE(e)}}}(r)}};function zE(n){Cc.useDeprecatedSynchronousErrorHandling?function(n){Cc.useDeprecatedSynchronousErrorHandling&&Ff&&(Ff.errorThrown=!0,Ff.error=n)}(n):UE(n)}function cN(n,t){let{onStoppedNotification:e}=Cc;e&&u0.setTimeout(()=>e(n,t))}var s0e={closed:!0,next:Mc,error:function(n){throw n},complete:Mc},p0="function"==typeof Symbol&&Symbol.observable||"@@observable";function ms(n){return n}function pN(n){return 0===n.length?ms:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var un=(()=>{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 Nf||function(n){return n&&En(n.next)&&En(n.error)&&En(n.complete)}(n)&&HE(n)}(e)?e:new Od(e,i,r);return d0(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?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=N6(i))((r,o)=>{let s=new Od({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[p0](){return this}pipe(...e){return pN(e)(this)}toPromise(e){return new(e=N6(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function N6(n){var t;return null!==(t=n??Cc.Promise)&&void 0!==t?t:Promise}function hN(n){return En(n?.lift)}function en(n){return t=>{if(hN(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 jt(n,t,e,i,r){return new nx(n,t,e,i,r)}var fN,nx=class extends Nf{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}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))}}},ix=class extends un{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,hN(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 Sn;let e=this.getSubject();t.add(this.source.subscribe(jt(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Sn.EMPTY)}return t}refCount(){return en((n,t)=>{let e=null;n._refCount++;let i=jt(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)}},h0={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=h0;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Sn(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=h0;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=h0;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},B6=c0(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ke=(()=>{class n extends un{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new jE(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new B6}next(e){d0(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){d0(()=>{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(){d0(()=>{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?sN:(this.currentObservers=null,o.push(e),new Sn(()=>{this.currentObservers=null,kf(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new un;return e.source=this,e}}return n.create=(t,e)=>new jE(t,e),n})(),jE=class extends ke{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:sN}},hr=class extends ke{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)}},rx={now:()=>(rx.delegate||Date).now(),delegate:void 0},Lf=class extends ke{constructor(t=1/0,e=1/0,i=rx){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:s}=this;e||(i.push(t),!r&&i.push(o.now()+s)),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 s=0;s<o.length&&!t.closed;s+=i?1:2)t.next(o[s]);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 s=e.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}},GE=class extends Sn{constructor(t,e){super()}schedule(t,e=0){return this}},ox={setInterval(n,t,...e){let{delegate:i}=ox;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=ox;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},gu=class extends GE{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 ox.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&&ox.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,kf(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},c0e=1,mN={};function V6(n){return n in mN&&(delete mN[n],!0)}var H6={setImmediate(n){let t=c0e++;return mN[t]=!0,fN||(fN=Promise.resolve()),fN.then(()=>V6(t)&&n()),t},clearImmediate(n){V6(n)}},{setImmediate:u0e,clearImmediate:d0e}=H6,sx={setImmediate(...n){let{delegate:t}=sx;return(t?.setImmediate||u0e)(...n)},clearImmediate(n){let{delegate:t}=sx;return(t?.clearImmediate||d0e)(n)},delegate:void 0},Lp=class{constructor(t,e=Lp.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};Lp.now=rx.now;var _u=class extends Lp{constructor(t,e=Lp.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}}}},f0=new class extends _u{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 gu{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=sx.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&&(sx.clearImmediate(e),t._scheduled=void 0)}}),kd=new _u(gu),U6=kd,gN=new class extends _u{}(class extends gu{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)}}),_N=new class extends _u{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 gu{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=h0.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&&(h0.cancelAnimationFrame(e),t._scheduled=void 0)}}),eo=new un(n=>n.complete());function ZE(n){return n&&En(n.schedule)}function vN(n){return n[n.length-1]}function vu(n){return En(vN(n))?n.pop():void 0}function yu(n){return ZE(vN(n))?n.pop():void 0}var dW=oN(uW(),1),{__decorate:pW,__awaiter:hW,__await:t1,__asyncGenerator:fW,__asyncValues:mW}=dW.default,g0=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function n1(n){return En(n?.then)}function i1(n){return En(n[p0])}function r1(n){return Symbol.asyncIterator&&En(n?.[Symbol.asyncIterator])}function o1(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 s1="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function a1(n){return En(n?.[s1])}function l1(n){return fW(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield t1(e.read());if(r)return yield t1(void 0);yield yield t1(i)}}finally{e.releaseLock()}})}function c1(n){return En(n?.getReader)}function gi(n){if(n instanceof un)return n;if(null!=n){if(i1(n))return function(n){return new un(t=>{let e=n[p0]();if(En(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(g0(n))return function(n){return new un(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}(n);if(n1(n))return function(n){return new un(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,UE)})}(n);if(r1(n))return gW(n);if(a1(n))return function(n){return new un(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(c1(n))return function(n){return gW(l1(n))}(n)}throw o1(n)}function gW(n){return new un(t=>{(function(n,t){var e,i,r,o;return hW(this,void 0,void 0,function*(){try{for(e=mW(n);!(i=yield e.next()).done;)if(t.next(i.value),t.closed)return}catch(s){r={error:s}}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 Ca(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 Bf(n,t=0){return en((e,i)=>{e.subscribe(jt(i,r=>Ca(i,n,()=>i.next(r),t),()=>Ca(i,n,()=>i.complete(),t),r=>Ca(i,n,()=>i.error(r),t)))})}function u1(n,t=0){return en((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function d1(n,t){if(!n)throw new Error("Iterable cannot be null");return new un(e=>{Ca(e,t,()=>{let i=n[Symbol.asyncIterator]();Ca(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Eo(n,t){return t?function(n,t){if(null!=n){if(i1(n))return function(n,t){return gi(n).pipe(u1(t),Bf(t))}(n,t);if(g0(n))return function(n,t){return new un(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(n1(n))return function(n,t){return gi(n).pipe(u1(t),Bf(t))}(n,t);if(r1(n))return d1(n,t);if(a1(n))return function(n,t){return new un(e=>{let i;return Ca(e,t,()=>{i=n[s1](),Ca(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>En(i?.return)&&i.return()})}(n,t);if(c1(n))return function(n,t){return d1(l1(n),t)}(n,t)}throw o1(n)}(n,t):gi(n)}function Xt(...n){return Eo(n,yu(n))}function wc(n,t){let e=En(n)?n:()=>n,i=r=>r.error(e());return new un(t?r=>t.schedule(i,0,r):i)}var Rl=class{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){return bN(this,t)}do(t,e,i){let{kind:r,value:o,error:s}=this;return"N"===r?t?.(o):"E"===r?e?.(s):i?.()}accept(t,e,i){var r;return En(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?Xt(e):"E"===t?wc(()=>i):"C"===t?eo:0;if(!r)throw new TypeError(`Unexpected notification kind ${t}`);return r}static createNext(t){return new Rl("N",t)}static createError(t){return new Rl("E",void 0,t)}static createComplete(){return Rl.completeNotification}};function bN(n,t){var e,i,r;let{kind:o,value:s,error:a}=n;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(e=t.next)||void 0===e||e.call(t,s):"E"===o?null===(i=t.error)||void 0===i||i.call(t,a):null===(r=t.complete)||void 0===r||r.call(t)}function ax(n){return!!n&&(n instanceof un||En(n.lift)&&En(n.subscribe))}Rl.completeNotification=new Rl("C");var _0=c0(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function L(n,t){return en((e,i)=>{let r=0;e.subscribe(jt(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:y0e}=Array;function Bp(n){return L(t=>function(n,t){return y0e(t)?n(...t):n(t)}(n,t))}var{isArray:x0e}=Array,{getPrototypeOf:C0e,prototype:M0e,keys:w0e}=Object;function p1(n){if(1===n.length){let t=n[0];if(x0e(t))return{args:t,keys:null};if(function(n){return n&&"object"==typeof n&&C0e(n)===M0e}(t)){let e=w0e(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function h1(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Lt(...n){let t=yu(n),e=vu(n),{args:i,keys:r}=p1(n);if(0===i.length)return Eo([],t);let o=new un(xN(i,t,r?s=>h1(r,s):ms));return e?o.pipe(Bp(e)):o}function xN(n,t,e=ms){return i=>{wW(t,()=>{let{length:r}=n,o=new Array(r),s=r,a=r;for(let l=0;l<r;l++)wW(t,()=>{let c=Eo(n[l],t),u=!1;c.subscribe(jt(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}function wW(n,t,e){n?Ca(e,n,t):t()}function xn(n,t,e=1/0){return En(t)?xn((i,r)=>L((o,s)=>t(i,o,r,s))(gi(n(i,r))),e):("number"==typeof t&&(e=t),en((i,r)=>function(n,t,e,i,r,o,s,a){let l=[],c=0,u=0,d=!1,p=()=>{d&&!l.length&&!c&&t.complete()},h=m=>c<i?f(m):l.push(m),f=m=>{c++;let x=!1;gi(e(m,u++)).subscribe(jt(t,g=>{t.next(g)},()=>{x=!0},void 0,()=>{if(x)try{for(c--;l.length&&c<i;){let g=l.shift();f(g)}p()}catch(g){t.error(g)}}))};return n.subscribe(jt(t,h,()=>{d=!0,p()})),()=>{}}(i,r,n,e)))}function f1(n=1/0){return xn(ms,n)}function Vp(...n){return f1(1)(Eo(n,yu(n)))}function Qa(n){return new un(t=>{gi(n()).subscribe(t)})}function lr(...n){let t=vu(n),{args:e,keys:i}=p1(n),r=new un(o=>{let{length:s}=e;if(!s)return void o.complete();let a=new Array(s),l=s,c=s;for(let u=0;u<s;u++){let d=!1;gi(e[u]).subscribe(jt(o,p=>{d||(d=!0,c--),a[u]=p},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?h1(i,a):a),o.complete())}))}});return t?r.pipe(Bp(t)):r}var E0e=["addListener","removeListener"],T0e=["addEventListener","removeEventListener"],D0e=["on","off"];function _i(n,t,e,i){if(En(e)&&(i=e,e=void 0),i)return _i(n,t,e).pipe(Bp(i));let[r,o]=function(n){return En(n.addEventListener)&&En(n.removeEventListener)}(n)?T0e.map(s=>a=>n[s](t,a,e)):function(n){return En(n.addListener)&&En(n.removeListener)}(n)?E0e.map(TW(n,t)):function(n){return En(n.on)&&En(n.off)}(n)?D0e.map(TW(n,t)):[];if(!r&&g0(n))return xn(s=>_i(s,t,e))(gi(n));if(!r)throw new TypeError("Invalid event target");return new un(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return r(a),()=>o(a)})}function TW(n,t){return e=>i=>n[e](t,i)}function Ka(n=0,t,e=U6){let i=-1;return null!=t&&(ZE(t)?e=t:i=t),new un(r=>{let o=function(n){return n instanceof Date&&!isNaN(n)}(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function Jt(...n){let t=yu(n),e=function(n,t){return"number"==typeof vN(n)?n.pop():1/0}(n),i=n;return i.length?1===i.length?gi(i[0]):f1(e)(Eo(i,t)):eo}var{isArray:R0e}=Array;function m1(n){return 1===n.length&&R0e(n[0])?n[0]:n}function Ye(n,t){return en((e,i)=>{let r=0;e.subscribe(jt(i,o=>n.call(t,o,r++)&&i.next(o)))})}function bu(n,t=kd){return function(n){return en((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(jt(e,c=>{i=!0,r=c,o||gi(n()).subscribe(o=jt(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>Ka(n,t))}function fo(n){return en((t,e)=>{let o,i=null,r=!1;i=t.subscribe(jt(e,void 0,void 0,s=>{o=gi(n(s,fo(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function AW(n,t,e,i,r){return(o,s)=>{let a=e,l=t,c=0;o.subscribe(jt(s,u=>{let d=c++;l=a?n(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function wN(...n){let t=vu(n);return t?function(...n){return pN(n)}(wN(...n),Bp(t)):en((e,i)=>{xN([e,...m1(n)])(i)})}function fr(...n){return wN(...n)}function Hr(n,t=kd){return en((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=s+n,u=t.now();if(u<c)return r=this.schedule(void 0,c-u),void i.add(r);a()}e.subscribe(jt(i,c=>{o=c,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function _1(n){return en((t,e)=>{let i=!1;t.subscribe(jt(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}function Qt(n){return n<=0?()=>eo:en((t,e)=>{let i=0;t.subscribe(jt(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function lx(){return en((n,t)=>{n.subscribe(jt(t,Mc))})}function v0(n,t){return t?e=>Vp(t.pipe(Qt(1),lx()),e.pipe(v0(n))):xn((e,i)=>n(e,i).pipe(Qt(1),function(n){return L(()=>n)}(e)))}function Ol(n,t=kd){let e=Ka(n,t);return v0(()=>e)}function yi(n,t=ms){return n=n??O0e,en((e,i)=>{let r,o=!0;e.subscribe(jt(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function O0e(n,t){return n===t}function v1(n=k0e){return en((t,e)=>{let i=!1;t.subscribe(jt(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function k0e(){return new _0}function y1(n,t){return t?e=>e.pipe(y1((i,r)=>gi(n(i,r)).pipe(L((o,s)=>t(i,o,r,s))))):en((e,i)=>{let r=0,o=null,s=!1;e.subscribe(jt(i,a=>{o||(o=jt(i,void 0,()=>{o=null,s&&i.complete()}),gi(n(a,r++)).subscribe(o))},()=>{s=!0,!o&&i.complete()}))})}function x1(n,t,e,i){return en((r,o)=>{let s;t&&"function"!=typeof t?({duration:e,element:s,connector:i}=t):s=t;let a=new Map,l=f=>{a.forEach(f),f(o)},c=f=>l(m=>m.error(f)),u=0,d=!1,p=new nx(o,f=>{try{let m=n(f),x=a.get(m);if(!x){a.set(m,x=i?i():new ke);let g=function(f,m){let x=new un(g=>{u++;let b=m.subscribe(g);return()=>{b.unsubscribe(),0==--u&&d&&p.unsubscribe()}});return x.key=f,x}(m,x);if(o.next(g),e){let b=jt(x,()=>{x.complete(),b?.unsubscribe()},void 0,void 0,()=>a.delete(m));p.add(gi(e(g)).subscribe(b))}}x.next(s?s(f):f)}catch(m){c(m)}},()=>l(f=>f.complete()),c,()=>a.clear(),()=>(d=!0,0===u));r.subscribe(p)})}function PW(n){return n<=0?()=>eo:en((t,e)=>{let i=[];t.subscribe(jt(e,r=>{i.push(r),n<i.length&&i.shift()},()=>{for(let r of i)e.next(r);e.complete()},void 0,()=>{i=null}))})}function y0(){return en((n,t)=>{let e,i=!1;n.subscribe(jt(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Ts(n={}){let{connector:t=(()=>new ke),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,c=0,u=!1,d=!1,p=()=>{a?.unsubscribe(),a=void 0},h=()=>{p(),s=l=void 0,u=d=!1},f=()=>{let m=s;h(),m?.unsubscribe()};return en((m,x)=>{c++,!d&&!u&&p();let g=l=l??t();x.add(()=>{c--,0===c&&!d&&!u&&(a=RN(f,r))}),g.subscribe(x),!s&&c>0&&(s=new Od({next:b=>g.next(b),error:b=>{d=!0,p(),a=RN(h,e,b),g.error(b)},complete:()=>{u=!0,p(),a=RN(h,i),g.complete()}}),gi(m).subscribe(s))})(o)}}function RN(n,t,...e){if(!0===t)return void n();if(!1===t)return;let i=new Od({next:()=>{i.unsubscribe(),n()}});return t(...e).subscribe(i)}function Ma(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,Ts({connector:()=>new Lf(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function Za(n){return Ye((t,e)=>n<=e)}function zn(...n){let t=yu(n);return en((e,i)=>{(t?Vp(n,e,t):Vp(n,e)).subscribe(i)})}function ui(n,t){return en((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(jt(i,l=>{r?.unsubscribe();let c=0,u=o++;gi(n(l,u)).subscribe(r=jt(i,d=>i.next(t?t(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function st(n){return en((t,e)=>{gi(n).subscribe(jt(e,()=>e.complete(),Mc)),!e.closed&&t.subscribe(e)})}function cx(n,t=!1){return en((e,i)=>{let r=0;e.subscribe(jt(i,o=>{let s=n(o,r++);(s||t)&&i.next(o),!s&&i.complete()}))})}function kt(n,t,e){let i=En(n)||t||e?{next:n,error:t,complete:e}:n;return i?en((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(jt(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):ms}var ON={leading:!0,trailing:!1};function b0(n,t=kd,e=ON){let i=Ka(n,t);return function(n,t=ON){return en((e,i)=>{let{leading:r,trailing:o}=t,s=!1,a=null,l=null,c=!1,u=()=>{l?.unsubscribe(),l=null,o&&(h(),c&&i.complete())},d=()=>{l=null,c&&i.complete()},p=f=>l=gi(n(f)).subscribe(jt(i,u,d)),h=()=>{if(s){s=!1;let f=a;a=null,i.next(f),!c&&p(f)}};e.subscribe(jt(i,f=>{s=!0,a=f,(!l||l.closed)&&(r?h():p(f))},()=>{c=!0,(!(o&&s&&l)||l.closed)&&i.complete()}))})}(()=>i,e)}function Wt(...n){let t=vu(n);return en((e,i)=>{let r=n.length,o=new Array(r),s=n.map(()=>!1),a=!1;for(let l=0;l<r;l++)gi(n[l]).subscribe(jt(i,c=>{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(ms))&&(s=null))},Mc));e.subscribe(jt(i,l=>{if(a){let c=[l,...o];i.next(t?t(...c):c)}}))})}function mr(n){for(let t in n)if(n[t]===mr)return t;throw Error("Could not find renamed property on target object.")}function kN(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function To(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(To).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 tL(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}var F0e=mr({__forward_ref__:mr});function Jn(n){return n.__forward_ref__=Jn,n.toString=function(){return To(this())},n}function Ki(n){return E7(n)?n():n}function E7(n){return"function"==typeof n&&n.hasOwnProperty(F0e)&&n.__forward_ref__===Jn}var At=class extends Error{constructor(t,e){super(function(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}};function Kn(n){return"string"==typeof n?n:null==n?"":String(n)}function o3(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Kn(n)}function s3(n,t){throw new At(-201,!1)}function T7(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}function ye(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function V(n){return{providers:n.providers||[],imports:n.imports||[]}}function a3(n){return OW(n,L1)||OW(n,D7)}function OW(n,t){return n.hasOwnProperty(t)?n[t]:null}function kW(n){return n&&(n.hasOwnProperty(nL)||n.hasOwnProperty(U0e))?n[nL]:null}var iL,L1=mr({"\u0275prov":mr}),nL=mr({"\u0275inj":mr}),D7=mr({ngInjectableDef:mr}),U0e=mr({ngInjectorDef:mr}),di=(()=>{return(n=di||(di={}))[n.Default=0]="Default",n[n.Host=1]="Host",n[n.Self=2]="Self",n[n.SkipSelf=4]="SkipSelf",n[n.Optional=8]="Optional",di;var n})();function kl(n){let t=iL;return iL=n,t}function A7(n,t,e){let i=a3(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&di.Optional?null:void 0!==t?t:void s3(To(n))}function Zf(n){return{toString:n}.toString()}var px=(()=>{return(n=px||(px={}))[n.OnPush=0]="OnPush",n[n.Default=1]="Default",px;var n})(),Ja=(()=>{return(n=Ja||(Ja={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",Ja;var n})(),to=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),A0={},Qi=[],cT=mr({"\u0275cmp":mr}),l3=mr({"\u0275dir":mr}),c3=mr({"\u0275pipe":mr}),I7=mr({"\u0275mod":mr}),Nd=mr({"\u0275fac":mr}),hx=mr({__NG_ELEMENT_ID__:mr}),j0e=0;function R(n){return Zf(()=>{let e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===px.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Qi,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Ja.Emulated,id:"c"+j0e++,styles:n.styles||Qi,_:null,setInput:null,schemas:n.schemas||null,tView:null},o=n.dependencies,s=n.features;return r.inputs=NW(n.inputs,i),r.outputs=NW(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(P7).filter(FW):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(Ld).filter(FW):null,r})}function Nx(n,t,e){let i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(P7),i.pipeDefs=()=>("function"==typeof e?e():e).map(Ld)}function P7(n){return Nl(n)||Gf(n)}function FW(n){return null!==n}function H(n){return Zf(()=>({type:n.type,bootstrap:n.bootstrap||Qi,declarations:n.declarations||Qi,imports:n.imports||Qi,exports:n.exports||Qi,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function NW(n,t){if(null==n)return A0;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}var He=R;function B0(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 Nl(n){return n[cT]||null}function Gf(n){return n[l3]||null}function Ld(n){return n[c3]||null}function R7(n){let t=Nl(n)||Gf(n)||Ld(n);return null!==t&&t.standalone}function I0(n,t){let e=n[I7]||null;if(!e&&!0===t)throw new Error(`Type ${To(n)} does not have '\u0275mod' property.`);return e}function zf(n){return Array.isArray(n)&&"object"==typeof n[1]}function Vd(n){return Array.isArray(n)&&!0===n[1]}function p3(n){return 0!=(8&n.flags)}function h3(n){return 2==(2&n.flags)}function dT(n){return 1==(1&n.flags)}function Ac(n){return null!==n.template}function q0e(n){return 0!=(256&n[2])}function Wf(n,t){return n.hasOwnProperty(Nd)?n[Nd]:null}function Ft(){return F7}function F7(n){return n.type.prototype.ngOnChanges&&(n.setInput=X0e),Y0e}function Y0e(){let n=L7(this),t=n?.current;if(t){let e=n.previous;if(e===A0)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function X0e(n,t,e,i){let r=L7(n)||function(n,t){return n[N7]=t}(n,{previous:A0,current:null}),o=r.current||(r.current={}),s=r.previous,a=this.declaredInputs[e],l=s[a];o[a]=new class{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}(l&&l.currentValue,t,s===A0),n[i]=t}Ft.ngInherit=!0;var N7="__ngSimpleChanges__";function L7(n){return n[N7]||null}function $a(n){for(;Array.isArray(n);)n=n[0];return n}function pT(n,t){return $a(t[n])}function Ul(n,t){return $a(t[n.index])}function H7(n,t){return n.data[t]}function H0(n,t){return n[t]}function qp(n,t){let e=t[n];return zf(e)?e:e[0]}function U1(n){return 64==(64&n[2])}function Up(n,t){return null==t?null:n[t]}function U7(n){n[18]=0}function f3(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}var Zn={lFrame:Q7(null),bindingsEnabled:!0};function z7(){return Zn.bindingsEnabled}function rt(){return Zn.lFrame.lView}function Fi(){return Zn.lFrame.tView}function oe(n){return Zn.lFrame.contextLView=n,n[8]}function se(n){return Zn.lFrame.contextLView=null,n}function zo(){let n=j7();for(;null!==n&&64===n.type;)n=n.parent;return n}function j7(){return Zn.lFrame.currentTNode}function wx(){let n=Zn.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function Mu(n,t){let e=Zn.lFrame;e.currentTNode=n,e.isParent=t}function m3(){return Zn.lFrame.isParent}function g3(){Zn.lFrame.isParent=!1}function Ks(){let n=Zn.lFrame,t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function Hd(){return Zn.lFrame.bindingIndex}function G7(n){return Zn.lFrame.bindingIndex=n}function U0(){return Zn.lFrame.bindingIndex++}function Ud(n){let t=Zn.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function W7(n){Zn.lFrame.inI18n=n}function s_e(n,t){let e=Zn.lFrame;e.bindingIndex=e.bindingRootIndex=n,sL(t)}function sL(n){Zn.lFrame.currentDirectiveIndex=n}function _3(n){let t=Zn.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function q7(){return Zn.lFrame.currentQueryIndex}function v3(n){Zn.lFrame.currentQueryIndex=n}function l_e(n){let t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function Y7(n,t,e){if(e&di.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&di.Host||(r=l_e(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}let i=Zn.lFrame=X7();return i.currentTNode=t,i.lView=n,!0}function y3(n){let t=X7(),e=n[1];Zn.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function X7(){let n=Zn.lFrame,t=null===n?null:n.child;return null===t?Q7(n):t}function Q7(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 K7(){let n=Zn.lFrame;return Zn.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var Z7=K7;function b3(){let n=K7();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 Zs(){return Zn.lFrame.selectedIndex}function zp(n){Zn.lFrame.selectedIndex=n}function no(){let n=Zn.lFrame;return H7(n.tView,n.selectedIndex)}function In(){Zn.lFrame.currentNamespace="svg"}function Js(){Zn.lFrame.currentNamespace=null}function hT(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=o;s&&(n.contentHooks||(n.contentHooks=[])).push(-e,s),a&&((n.contentHooks||(n.contentHooks=[])).push(e,a),(n.contentCheckHooks||(n.contentCheckHooks=[])).push(e,a)),l&&(n.viewHooks||(n.viewHooks=[])).push(-e,l),c&&((n.viewHooks||(n.viewHooks=[])).push(e,c),(n.viewCheckHooks||(n.viewCheckHooks=[])).push(e,c)),null!=u&&(n.destroyHooks||(n.destroyHooks=[])).push(e,u)}}function D1(n,t,e){J7(n,t,3,e)}function A1(n,t,e,i){(3&n[2])===e&&J7(n,t,e,i)}function FN(n,t){let e=n[2];(3&e)===t&&(e&=2047,e+=1,n[2]=e)}function J7(n,t,e,i){let o=i??-1,s=t.length-1,a=0;for(let l=void 0!==i?65535&n[18]:0;l<s;l++)if("number"==typeof t[l+1]){if(a=t[l],null!=i&&a>=i)break}else t[l]<0&&(n[18]+=65536),(a<o||-1==o)&&(m_e(n,e,t,l),n[18]=(4294901760&n[18])+l+2),l++}function m_e(n,t,e,i){let r=e[i]<0,o=e[i+1],a=n[r?-e[i]:e[i]];if(r){if(n[2]>>11<n[18]>>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}var qf=class{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}};function z1(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++],s=e[i++],a=e[i++];n.setAttribute(t,s,a,o)}else{let o=r,s=e[++i];b_e(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function $7(n){return 3===n||4===n||6===n}function b_e(n){return 64===n.charCodeAt(0)}function j1(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||VW(n,e,r,null,-1===e||2===e?t[++i]:null)}}return n}function VW(n,t,e,i,r){let o=0,s=n.length;if(-1===t)s=-1;else for(;o<n.length;){let a=n[o++];if("number"==typeof a){if(a===t){s=-1;break}if(a>t){s=o-1;break}}}for(;o<n.length;){let a=n[o];if("number"==typeof a)break;if(a===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!==s&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),null!==i&&n.splice(o++,0,i),null!==r&&n.splice(o++,0,r)}function e9(n){return-1!==n}function G1(n){return 32767&n}function W1(n,t){let e=function(n){return n>>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}var aL=!0;function q1(n){let t=aL;return aL=n,t}var M_e=0,xu={};function Sx(n,t){let e=i9(n,t);if(-1!==e)return e;let i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,NN(i.data,n),NN(t,null),NN(i.blueprint,null));let r=C3(n,t),o=n.injectorIndex;if(e9(r)){let s=G1(r),a=W1(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function NN(n,t){n.push(0,0,0,0,0,0,0,0,t)}function i9(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function C3(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=l9(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Y1(n,t,e){!function(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(hx)&&(i=e[hx]),null==i&&(i=e[hx]=M_e++);let r=255&i;t.data[n+(r>>5)]|=1<<r}(n,t,e)}function r9(n,t,e){if(e&di.Optional||void 0!==n)return n;s3()}function o9(n,t,e,i){if(e&di.Optional&&void 0===i&&(i=null),0==(e&(di.Self|di.Host))){let r=n[9],o=kl(void 0);try{return r?r.get(t,i,e&di.Optional):A7(t,i,e&di.Optional)}finally{kl(o)}}return r9(i,0,e)}function s9(n,t,e,i=di.Default,r){if(null!==n){if(1024&t[2]){let s=function(n,t,e,i,r){let o=n,s=t;for(;null!==o&&null!==s&&1024&s[2]&&!(256&s[2]);){let a=a9(o,s,e,i|di.Self,xu);if(a!==xu)return a;let l=o.parent;if(!l){let c=s[21];if(c){let u=c.get(e,xu,i);if(u!==xu)return u}l=l9(s),s=s[15]}o=l}return r}(n,t,e,i,xu);if(s!==xu)return s}let o=a9(n,t,e,i,xu);if(o!==xu)return o}return o9(t,e,i,r)}function a9(n,t,e,i,r){let o=function(n){if("string"==typeof n)return n.charCodeAt(0)||0;let t=n.hasOwnProperty(hx)?n[hx]:void 0;return"number"==typeof t?t>=0?255&t:D_e:t}(e);if("function"==typeof o){if(!Y7(t,n,i))return i&di.Host?r9(r,0,i):o9(t,e,i,r);try{let s=o(i);if(null!=s||i&di.Optional)return s;s3()}finally{Z7()}}else if("number"==typeof o){let s=null,a=i9(n,t),l=-1,c=i&di.Host?t[16][6]:null;for((-1===a||i&di.SkipSelf)&&(l=-1===a?C3(n,t):t[a+8],-1!==l&&UW(i,!1)?(s=t[1],a=G1(l),t=W1(l,t)):a=-1);-1!==a;){let u=t[1];if(HW(o,a,u.data)){let d=E_e(a,t,e,s,i,c);if(d!==xu)return d}l=t[a+8],-1!==l&&UW(i,t[1].data[a+8]===c)&&HW(o,a,t)?(s=u,a=G1(l),t=W1(l,t)):a=-1}}return r}function E_e(n,t,e,i,r,o){let s=t[1],a=s.data[n+8],u=I1(a,s,e,null==i?h3(a)&&aL:i!=s&&0!=(3&a.type),r&di.Host&&o===a);return null!==u?Bx(t,s,u,a):xu}function I1(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=1048575&o,l=n.directiveStart,u=o>>20,p=r?a+u:n.directiveEnd;for(let h=i?a:a+u;h<p;h++){let f=s[h];if(h<l&&e===f||h>=l&&f.type===e)return h}if(r){let h=s[l];if(h&&Ac(h)&&h.type===e)return l}return null}function Bx(n,t,e,i){let r=n[e],o=t.data;if(function(n){return n instanceof qf}(r)){let s=r;s.resolving&&function(n,t){throw new At(-200,`Circular dependency in DI detected for ${n}`)}(o3(o[e]));let a=q1(s.canSeeViewProviders);s.resolving=!0;let l=s.injectImpl?kl(s.injectImpl):null;Y7(n,i,di.Default);try{r=n[e]=s.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 s=F7(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}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&&kl(l),q1(a),s.resolving=!1,Z7()}}return r}function HW(n,t,e){return!!(e[t+(n>>5)]&1<<n)}function UW(n,t){return!(n&di.Self||n&di.Host&&t)}var jf=class{constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return s9(this._tNode,this._lView,t,i,e)}};function D_e(){return new jf(zo(),rt())}function pi(n){return Zf(()=>{let t=n.prototype.constructor,e=t[Nd]||lL(t),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[Nd]||lL(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function lL(n){return E7(n)?()=>{let t=lL(Ki(n));return t&&t()}:Wf(n)}function l9(n){let t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}function vo(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($7(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}(zo(),n)}var M0="__annotations__",w0="__parameters__",S0="__prop__metadata__";function Vx(n,t,e,i,r){return Zf(()=>{let o=M3(t);function s(...a){if(this instanceof s)return o.call(this,...a),this;let l=new s(...a);return function(u){return r&&r(u,...a),(u.hasOwnProperty(M0)?u[M0]:Object.defineProperty(u,M0,{value:[]})[M0]).push(l),i&&i(u),u}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=n,s.annotationCls=s,s})}function M3(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function z0(n,t,e){return Zf(()=>{let i=M3(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,u){let d=l.hasOwnProperty(w0)?l[w0]:Object.defineProperty(l,w0,{value:[]})[w0];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}function Yp(n,t,e,i){return Zf(()=>{let r=M3(t);function o(...s){if(this instanceof o)return r.apply(this,s),this;let a=new o(...s);return function(c,u){let d=c.constructor,p=d.hasOwnProperty(S0)?d[S0]:Object.defineProperty(d,S0,{value:{}})[S0];p[u]=p.hasOwnProperty(u)&&p[u]||[],p[u].unshift(a),i&&i(c,u,...s)}}return e&&(o.prototype=Object.create(e.prototype)),o.prototype.ngMetadataName=n,o.annotationCls=o,o})}var I_e=z0("Attribute",n=>({attributeName:n,__NG_ELEMENT_ID__:()=>vo(n)})),pe=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=ye({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}},R0=(new pe("AnalyzeForEntryComponents"),class{});function Ll(n){let t=to.ng;if(t&&t.\u0275compilerFacade)return t.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}Yp("ContentChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:!0,...t}),R0),Yp("ContentChild",(n,t={})=>({selector:n,first:!0,isViewQuery:!1,descendants:!0,...t}),R0),Yp("ViewChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:!0,...t}),R0),Yp("ViewChild",(n,t)=>({selector:n,first:!0,isViewQuery:!0,descendants:!0,...t}),R0);var P_e=Function;function ux(n){return"function"==typeof n}function Fd(n,t){void 0===t&&(t=n);for(let e=0;e<n.length;e++){let i=n[e];Array.isArray(i)?(t===n&&(t=n.slice(0,e)),Fd(i,t)):t!==n&&t.push(i)}return t}function Ex(n,t){n.forEach(e=>Array.isArray(e)?Ex(e,t):t(e))}function u9(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function X1(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function fx(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function el(n,t,e){let i=Hx(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 LN(n,t){let e=Hx(n,t);if(e>=0)return n[1|e]}function Hx(n,t){return function(n,t,e){let i=0,r=n.length>>1;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<1];if(t===s)return o<<1;s>t?r=o:i=o+1}return~(r<<1)}(n,t)}var F_e=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,N_e=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,L_e=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,B_e=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/;function BN(n){return n?n.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function C1(n){let t=n.prototype?Object.getPrototypeOf(n.prototype):null;return(t?t.constructor:null)||Object}var mx,Tx={},uL="__NG_DI_FLAG__",Q1="ngTempTokenPath",z_e=/\n/gm,zW="__source";function x0(n){let t=mx;return mx=n,t}function G_e(n,t=di.Default){if(void 0===mx)throw new At(-203,!1);return null===mx?A7(n,void 0,t):mx.get(n,t&di.Optional?null:void 0,t)}function j(n,t=di.Default){return(iL||G_e)(Ki(n),t)}function d9(n){throw new At(202,!1)}function jo(n,t=di.Default){return"number"!=typeof t&&(t=0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)),j(n,t)}function dL(n){let t=[];for(let e=0;e<n.length;e++){let i=Ki(n[e]);if(Array.isArray(i)){if(0===i.length)throw new At(900,!1);let r,o=di.Default;for(let s=0;s<i.length;s++){let a=i[s],l=W_e(a);"number"==typeof l?-1===l?r=a.token:o|=l:r=a}t.push(j(r,o))}else t.push(j(i))}return t}function Ux(n,t){return n[uL]=t,n.prototype[uL]=t,n}function W_e(n){return n[uL]}var j0=Ux(z0("Inject",n=>({token:n})),-1),ns=Ux(z0("Optional"),8),w3=Ux(z0("Self"),2),tl=Ux(z0("SkipSelf"),4),X_e=Ux(z0("Host"),1),jW=null;function S3(){return jW=jW||new class{constructor(t){this._reflect=t||to.Reflect}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let i;i=fx(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(F_e.test(n=i)||B_e.test(n)||N_e.test(n)&&!L_e.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 a="function"==typeof r?r():r,l=a.map(u=>u&&u.type),c=a.map(u=>u&&BN(u.decorators));return this._zipTypesAndAnnotations(l,c)}let o=t.hasOwnProperty(w0)&&t[w0],s=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return s||o?this._zipTypesAndAnnotations(s,o):fx(t.length)}parameters(t){if(!ux(t))return[];let e=C1(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?BN(t.decorators):t.hasOwnProperty(M0)?t[M0]:null}annotations(t){if(!ux(t))return[];let e=C1(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]=BN(i[o])}),r}return t.hasOwnProperty(S0)?t[S0]:null}propMetadata(t){if(!ux(t))return{};let e=C1(t),i={};if(e!==Object){let o=this.propMetadata(e);Object.keys(o).forEach(s=>{i[s]=o[s]})}let r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach(o=>{let s=[];i.hasOwnProperty(o)&&s.push(...i[o]),s.push(...r[o]),i[o]=s}),i}ownPropMetadata(t){return ux(t)&&this._ownPropMetadata(t,C1(t))||{}}hasLifecycleHook(t,e){return t instanceof P_e&&e in t.prototype}}}function fT(n){return p9(S3().parameters(n))}function p9(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 ns||"Optional"===r.ngMetadataName)t.optional=!0;else if(i instanceof tl||"SkipSelf"===r.ngMetadataName)t.skipSelf=!0;else if(i instanceof w3||"Self"===r.ngMetadataName)t.self=!0;else if(i instanceof X_e||"Host"===r.ngMetadataName)t.host=!0;else if(i instanceof j0)t.token=i.token;else if(i instanceof I_e){if(void 0===i.attributeName)throw new At(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 Dx=new Map,h9=new Set;function f9(n){return!!(n.templateUrl&&!n.hasOwnProperty("template")||n.styleUrls&&n.styleUrls.length)}var pL,M1,w1,GW=new Map;function m9(n,t){(function(n,t,e){if(t&&t!==e)throw new Error(`Duplicate module registered for ${n} - ${To(t)} vs ${To(t.name)}`)})(t,GW.get(t)||null,n),GW.set(t,n)}function _9(){return void 0!==pL?pL:typeof document<"u"?document:void 0}function v9(){if(void 0===M1&&(M1=null,to.trustedTypes))try{M1=to.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return M1}function O0(n){return v9()?.createHTML(n)||n}function E3(){if(void 0===w1&&(w1=null,to.trustedTypes))try{w1=to.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return w1}function WW(n){return E3()?.createHTML(n)||n}function qW(n){return E3()?.createScript(n)||n}function YW(n){return E3()?.createScriptURL(n)||n}var Bd=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}},hL=class extends Bd{getTypeName(){return"HTML"}},fL=class extends Bd{getTypeName(){return"Style"}},mL=class extends Bd{getTypeName(){return"Script"}},gL=class extends Bd{getTypeName(){return"URL"}},_L=class extends Bd{getTypeName(){return"ResourceURL"}};function Ta(n){return n instanceof Bd?n.changingThisBreaksApplicationSecurity:n}function Pc(n,t){let e=function(n){return n instanceof Bd&&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 https://g.co/ng/security#xss)`)}return e===t}function w9(n){let t=new yL(n);return function(){try{return!!(new window.DOMParser).parseFromString(O0(""),"text/html")}catch{return!1}}()?new vL(t):t}var vL=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=(new window.DOMParser).parseFromString(O0(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}},yL=class{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){let e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);let i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){let e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=O0(t),e;let i=this.inertDocument.createElement("body");return i.innerHTML=O0(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){let e=t.attributes;for(let r=e.length-1;0<r;r--){let s=e.item(r).name;("xmlns:ns1"===s||0===s.indexOf("ns1:"))&&t.removeAttribute(s)}let i=t.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}},ave=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;function zx(n){return(n=String(n)).match(ave)?n:"unsafe:"+n}function zd(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function jx(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var S1,S9=zd("area,br,col,hr,img,wbr"),E9=zd("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),T9=zd("rp,rt"),lve=jx(T9,E9),cve=jx(E9,zd("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")),uve=jx(T9,zd("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")),bL=jx(S9,cve,uve,lve),T3=zd("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),dve=zd("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"),pve=zd("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"),D9=jx(T3,dve,pve),hve=zd("script,style,template"),fve=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mve=/([^\#-~ |!])/g;function XW(n){return n.replace(/&/g,"&amp;").replace(fve,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(mve,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function D3(n,t){let e=null;try{S1=S1||w9(n);let i=t?String(t):"";e=S1.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=S1.getInertBodyElement(i)}while(i!==o);let a=(new 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(!bL.hasOwnProperty(e))return this.sanitizedSomething=!0,!hve.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),s=o.name,a=s.toLowerCase();if(!D9.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;T3[a]&&(l=zx(l)),this.buf.push(" ",s,'="',XW(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=t.nodeName.toLowerCase();bL.hasOwnProperty(e)&&!S9.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(XW(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}}).sanitizeChildren(CL(e)||e);return O0(a)}finally{if(e){let i=CL(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function CL(n){return"content"in n&&function(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var mo=(()=>{return(n=mo||(mo={}))[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",mo;var n})();function A3(n){let t=Gx();return t?WW(t.sanitize(mo.HTML,n)||""):Pc(n,"HTML")?WW(Ta(n)):D3(_9(),Kn(n))}function zl(n){let t=Gx();return t?t.sanitize(mo.URL,n)||"":Pc(n,"URL")?Ta(n):zx(Kn(n))}function A9(n){let t=Gx();if(t)return YW(t.sanitize(mo.RESOURCE_URL,n)||"");if(Pc(n,"ResourceURL"))return YW(Ta(n));throw new At(904,!1)}function Gx(){let n=rt();return n&&n[12]}var mT=new pe("ENVIRONMENT_INITIALIZER"),I9=new pe("INJECTOR",-1),P9=new pe("INJECTOR_DEF_TYPES"),K1=class{get(t,e=Tx){if(e===Tx){let i=new Error(`NullInjectorError: No provider for ${To(t)}!`);throw i.name="NullInjectorError",i}return e}};function Mve(...n){return{"\u0275providers":R9(0,n)}}function R9(n,...t){let r,e=[],i=new Set;return Ex(t,o=>{let s=o;ML(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&O9(r,e),e}function O9(n,t){for(let e=0;e<n.length;e++){let{providers:r}=n[e];Ex(r,o=>{t.push(o)})}}function ML(n,t,e,i){if(!(n=Ki(n)))return!1;let r=null,o=kW(n),s=!o&&Nl(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{let l=n.ngModule;if(o=kW(l),!o)return!1;r=l}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(let c of l)ML(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Ex(o.imports,u=>{ML(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&O9(c,t)}if(!a){let c=Wf(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Qi},{provide:P9,useValue:r,multi:!0},{provide:mT,useValue:()=>j(r),multi:!0})}let l=o.providers;null==l||a||Ex(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}var wve=mr({provide:String,useValue:mr});function k9(n){return null!==n&&"object"==typeof n&&wve in n}function k0(n){return"function"==typeof n}var VN,gT=new pe("Set Injector scope."),P1={},Dve={};function I3(){return void 0===VN&&(VN=new K1),VN}var jp=class{},Z1=class extends jp{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,SL(t,s=>this.processProvider(s)),this.records.set(I9,E0(void 0,this)),r.has("environment")&&this.records.set(jp,E0(void 0,this));let o=this.records.get(gT);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(P9.multi,Qi,di.Self))}get destroyed(){return this._destroyed}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=x0(this),i=kl(void 0);try{return t()}finally{x0(e),kl(i)}}get(t,e=Tx,i=di.Default){this.assertNotDestroyed();let r=x0(this),o=kl(void 0);try{if(!(i&di.SkipSelf)){let a=this.records.get(t);if(void 0===a){let l=("function"==typeof(n=t)||"object"==typeof n&&n instanceof pe)&&a3(t);a=l&&this.injectableDefInScope(l)?E0(wL(t),P1):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&di.Self?I3():this.parent).get(t,e=i&di.Optional&&e===Tx?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Q1]=s[Q1]||[]).unshift(To(t)),r)throw s;return function(n,t,e,i){let r=n[Q1];throw t[zW]&&r.unshift(t[zW]),n.message=function(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=To(t);if(Array.isArray(t))r=t.map(To).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):To(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(z_e,"\n  ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[Q1]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{kl(o),x0(r)}var n}resolveInjectorInitializers(){let t=x0(this),e=kl(void 0);try{let i=this.get(mT.multi,Qi,di.Self);for(let r of i)r()}finally{x0(t),kl(e)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(To(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new At(205,!1)}processProvider(t){let e=k0(t=Ki(t))?t:Ki(t&&t.provide),i=function(n){return k9(n)?E0(void 0,n.useValue):E0(F9(n),P1)}(t);if(k0(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=E0(void 0,P1,!0),r.factory=()=>dL(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===P1&&(e.value=Dve,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=Ki(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}};function wL(n){let t=a3(n),e=null!==t?t.factory:Wf(n);if(null!==e)return e;if(n instanceof pe)throw new At(204,!1);if(n instanceof Function)return function(n){let t=n.length;if(t>0)throw fx(t,"?"),new At(204,!1);let e=function(n){let t=n&&(n[L1]||n[D7]);if(t){let e=function(n){if(n.hasOwnProperty("name"))return n.name;let t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new At(204,!1)}function F9(n,t,e){let i;if(k0(n)){let r=Ki(n);return Wf(r)||wL(r)}if(k9(n))i=()=>Ki(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...dL(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))i=()=>j(Ki(n.useExisting));else{let r=Ki(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return Wf(r)||wL(r);i=()=>new r(...dL(n.deps))}return i}function E0(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function kve(n){return!!n.\u0275providers}function SL(n,t){for(let e of n)Array.isArray(e)?SL(e,t):kve(e)?SL(e.\u0275providers,t):t(e)}var EL=class{},J1=class{},TL=class{resolveComponentFactory(t){throw function(n){let t=Error(`No component factory found for ${To(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}},gs=(()=>{class n{}return n.NULL=new TL,n})();function Lve(){return G0(zo(),rt())}function G0(n,t){return new Re(Ul(n,t))}var Re=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=Lve,n})();function Bve(n){return n instanceof Re?n.nativeElement:n}new pe("Renderer2Interceptor");var wu=class{},Eu=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function(){let n=rt(),e=qp(zo().index,n);return(zf(e)?e:n)[11]}(),n})(),Hve=(()=>{class n{}return n.\u0275prov=ye({token:n,providedIn:"root",factory:()=>null}),n})(),Ic=class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}},Uve=new Ic("14.2.11"),HN={};function UN(n){return n.ngOriginalError}var Qs=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&&UN(t);for(;e&&UN(e);)e=UN(e);return e||null}},jve=/^>|^->|<!--|-->|--!>|<!-$/g,Gve=/(<|>)/,N9=new Map,Yve=0,QW="__ngContext__";function Su(n,t){zf(t)?(n[QW]=t[20],function(n){N9.set(n[20],n)}(t)):n[QW]=t}function Wx(n){return n.ownerDocument.defaultView}function _T(n){return n.ownerDocument}function R1(n){return n instanceof Function?n():n}var DL,Bl=(()=>{return(n=Bl||(Bl={}))[n.Important=1]="Important",n[n.DashCase=2]="DashCase",Bl;var n})();function P3(n,t){return DL(n,t)}function R3(n){let t=n[3];return Vd(t)?t[3]:t}function O3(n){return B9(n[13])}function k3(n){return B9(n[4])}function B9(n){for(;null!==n&&!Vd(n);)n=n[4];return n}function T0(n,t,e,i,r){if(null!=i){let o,s=!1;Vd(i)?o=i:zf(i)&&(s=!0,i=i[0]);let a=$a(i);0===n&&null!==e?null==r?G9(t,e,a):Yf(t,e,a,r||null,!0):1===n&&null!==e?Yf(t,e,a,r||null,!0):2===n?K9(t,a,s):3===n&&t.destroyNode(a),null!=o&&function(n,t,e,i,r){let o=e[7];o!==$a(e)&&T0(t,n,i,o,r);for(let a=10;a<e.length;a++){let l=e[a];qx(l[1],l,n,t,i,o)}}(t,n,o,e,r)}}function F3(n,t){return n.createText(t)}function V9(n,t,e){n.setValue(t,e)}function eye(n,t){return n.createComment(function(n){return n.replace(jve,t=>t.replace(Gve,"\u200b$1\u200b"))}(t))}function N3(n,t,e){return n.createElement(t,e)}function H9(n,t){let e=n[9],i=e.indexOf(t),r=t[3];512&t[2]&&(t[2]&=-513,f3(r,-1)),e.splice(i,1)}function AL(n,t){if(n.length<=10)return;let e=10+t,i=n[e];if(i){let r=i[17];null!==r&&r!==n&&H9(r,i),t>0&&(n[e-1][4]=i[4]);let o=X1(n,10+t);!function(n,t){qx(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);let s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function U9(n,t){if(!(128&t[2])){let e=t[11];e.destroyNode&&qx(n,t,e,3,null,null),function(n){let t=n[13];if(!t)return zN(n[1],n);for(;t;){let e=null;if(zf(t))e=t[13];else{let i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)zf(t)&&zN(t[1],t),t=t[3];null===t&&(t=n),zf(t)&&zN(t[1],t),e=t&&t[4]}t=e}}(t)}}function zN(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=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 qf)){let o=e[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];try{l.call(a)}finally{}}else try{o.call(r)}finally{}}}}(n,t),function(n,t){let e=n.cleanup,i=t[7],r=-1;if(null!==e)for(let o=0;o<e.length-1;o+=2)if("string"==typeof e[o]){let s=e[o+1],a="function"==typeof s?s(t):$a(t[s]),l=i[r=e[o+2]],c=e[o+3];"boolean"==typeof c?a.removeEventListener(e[o],l,c):c>=0?i[r=c]():i[r=-c].unsubscribe(),o+=2}else{let s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o<i.length;o++)(0,i[o])();t[7]=null}}(n,t),1===t[1].type&&t[11].destroy();let e=t[17];if(null!==e&&Vd(t[3])){e!==t[3]&&H9(e,t);let i=t[19];null!==i&&i.detachView(n)}!function(n){N9.delete(n[20])}(t)}}function z9(n,t,e){return j9(n,t.parent,e)}function j9(n,t,e){let i=t;for(;null!==i&&40&i.type;)i=(t=i).parent;if(null===i)return e[0];if(2&i.flags){let r=n.data[i.directiveStart].encapsulation;if(r===Ja.None||r===Ja.Emulated)return null}return Ul(i,e)}function Yf(n,t,e,i,r){n.insertBefore(t,e,i,r)}function G9(n,t,e){n.appendChild(t,e)}function KW(n,t,e,i,r){null!==i?Yf(n,t,e,i,r):G9(n,t,e)}function vT(n,t){return n.parentNode(t)}function W9(n,t,e){return Y9(n,t,e)}function q9(n,t,e){return 40&n.type?Ul(n,e):null}var IL,Y9=q9;function X9(n,t){Y9=n,IL=t}function yT(n,t,e,i){let r=z9(n,i,t),o=t[11],a=W9(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;l<e.length;l++)KW(o,r,e[l],a,!1);else KW(o,r,e,a,!1);void 0!==IL&&IL(o,i,t,e,r)}function O1(n,t){if(null!==t){let e=t.type;if(3&e)return Ul(t,n);if(4&e)return PL(-1,n[t.index]);if(8&e){let i=t.child;if(null!==i)return O1(n,i);{let r=n[t.index];return Vd(r)?PL(-1,r):$a(r)}}if(32&e)return P3(t,n)()||$a(n[t.index]);{let i=Q9(n,t);return null!==i?Array.isArray(i)?i[0]:O1(R3(n[16]),i):O1(n,t.next)}}return null}function Q9(n,t){return null!==t?n[16][6].projection[t.projection]:null}function PL(n,t){let e=10+n+1;if(e<t.length){let i=t[e],r=i[1].firstChild;if(null!==r)return O1(i,r)}return t[7]}function K9(n,t,e){let i=vT(n,t);i&&function(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}function L3(n,t,e,i,r,o,s){for(;null!=e;){let a=i[e.index],l=e.type;if(s&&0===t&&(a&&Su($a(a),i),e.flags|=4),64!=(64&e.flags))if(8&l)L3(n,t,e.child,i,r,o,!1),T0(t,n,r,a,o);else if(32&l){let u,c=P3(e,i);for(;u=c();)T0(t,n,r,u,o);T0(t,n,r,a,o)}else 16&l?Z9(n,t,i,e,r,o):T0(t,n,r,a,o);e=s?e.projectionNext:e.next}}function qx(n,t,e,i,r,o){L3(e,i,n.firstChild,t,r,o,!1)}function Z9(n,t,e,i,r,o){let s=e[16],l=s[6].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)T0(t,n,r,l[c],o);else L3(n,t,l,s[3],r,o,!0)}function J9(n,t,e){n.setAttribute(t,"style",e)}function B3(n,t,e){""===e?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function $9(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 eq="ng-template";function fye(n,t,e){let i=0;for(;i<n.length;){let r=n[i++];if(e&&"class"===r){if(r=n[i],-1!==$9(r.toLowerCase(),t,0))return!0}else if(1===r){for(;i<n.length&&"string"==typeof(r=n[i++]);)if(r.toLowerCase()===t)return!0;return!1}}return!1}function tq(n){return 4===n.type&&n.value!==eq}function mye(n,t,e){return t===(4!==n.type||e?n.value:eq)}function gye(n,t,e){let i=4,r=n.attrs||[],o=function(n){for(let t=0;t<n.length;t++)if($7(n[t]))return t;return n.length}(r),s=!1;for(let a=0;a<t.length;a++){let l=t[a];if("number"!=typeof l){if(!s)if(4&i){if(i=2|1&i,""!==l&&!mye(n,l,e)||""===l&&1===t.length){if(Sc(i))return!1;s=!0}}else{let c=8&i?l:t[++a];if(8&i&&null!==n.attrs){if(!fye(n.attrs,c,e)){if(Sc(i))return!1;s=!0}continue}let d=_ye(8&i?"class":l,r,tq(n),e);if(-1===d){if(Sc(i))return!1;s=!0;continue}if(""!==c){let p;p=d>o?"":r[d+1].toLowerCase();let h=8&i?p:null;if(h&&-1!==$9(h,c,0)||2&i&&c!==p){if(Sc(i))return!1;s=!0}}}}else{if(!s&&!Sc(i)&&!Sc(l))return!1;if(s&&Sc(l))continue;s=!1,i=l|1&i}}return Sc(i)||s}function Sc(n){return 0==(1&n)}function _ye(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let s=t[r];if(s===n)return r;if(3===s||6===s)o=!0;else{if(1===s||2===s){let a=t[++r];for(;"string"==typeof a;)a=t[++r];continue}if(4===s)break;if(0===s){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 nq(n,t,e=!1){for(let i=0;i<t.length;i++)if(gye(n,t[i],e))return!0;return!1}function xye(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 ZW(n,t){return n?":not("+t.trim()+")":t}function Cye(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let s=n[e];if("string"==typeof s)if(2&i){let a=n[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Sc(s)&&(t+=ZW(o,r),r=""),i=s,o=o||!Sc(i);e++}return""!==r&&(t+=ZW(o,r)),t}var Qn={};function C(n){iq(Fi(),rt(),Zs()+n,!1)}function iq(n,t,e,i){if(!i)if(3==(3&t[2])){let o=n.preOrderCheckHooks;null!==o&&D1(t,o,e)}else{let o=n.preOrderHooks;null!==o&&A1(t,o,0,e)}zp(e)}var JW={"\u0275\u0275defineInjectable":ye,"\u0275\u0275defineInjector":V,"\u0275\u0275inject":j,"\u0275\u0275invalidFactoryDep":d9,resolveForwardRef:Ki};var Eye=mr({provide:String,useValue:mr});function $W(n){return void 0!==n.useClass}function e7(n){return void 0!==n.useFactory}var rq=Vx("Injectable",void 0,void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;n.hasOwnProperty(L1)||Object.defineProperty(n,L1,{get:()=>(null===e&&(e=Ll().compileInjectable(JW,`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($W(e)||e7(e))&&void 0!==e.deps&&(i.deps=p9(e.deps)),$W(e)?i.useClass=e.useClass:function(n){return Eye in n}(e)?i.useValue=e.useValue:e7(e)?i.useFactory=e.useFactory:function(n){return void 0!==n.useExisting}(e)&&(i.useExisting=e.useExisting),i}(n,t))),e)}),n.hasOwnProperty(Nd)||Object.defineProperty(n,Nd,{get:()=>{if(null===i){let r=Ll();i=r.compileFactory(JW,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,typeArgumentCount:0,deps:fT(n),target:r.FactoryTarget.Injectable})}return i},configurable:!0})}(n,t));function t7(n,t=null,e=null,i){let r=oq(n,t,e,i);return r.resolveInjectorInitializers(),r}function oq(n,t=null,e=null,i,r=new Set){let o=[e||Qi,Mve(n)];return i=i||("object"==typeof n?void 0:To(n)),new Z1(o,t||I3(),i||null,r)}var Xn=(()=>{class n{static create(e,i){if(Array.isArray(e))return t7({name:""},i,e,"");{let r=e.name??"";return t7({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Tx,n.NULL=new K1,n.\u0275prov=ye({token:n,providedIn:"any",factory:()=>j(I9)}),n.__NG_ELEMENT_ID__=-1,n})(),gx=class{constructor(t,e){if(this.token=t,this.id=e,!t)throw new At(208,!1);this.displayName=To(this.token)}static get(t){return n7.get(Ki(t))}static get numberOfKeys(){return n7.numberOfKeys}},n7=new class{constructor(){this._allKeys=new Map}get(t){if(t instanceof gx)return t;if(this._allKeys.has(t))return this._allKeys.get(t);let e=new gx(t,gx.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}};function M(n,t=di.Default){let e=rt();return null===e?j(n,t):s9(zo(),e,Ki(n),t)}function nl(){throw new Error("invalid")}function E1(n,t){return n<<17|t<<2}function Xf(n){return n>>17&32767}function OL(n){return 2|n}function F0(n){return(131068&n)>>2}function jN(n,t){return-131069&n|t<<2}function kL(n){return 1|n}function sq(n,t){let e=n.contentQueries;if(null!==e)for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];if(-1!==o){let s=n.data[o];v3(r),s.contentQueries(2,t[o],o)}}}function bT(n,t,e,i,r,o,s,a,l,c,u){let d=t.blueprint.slice();return d[0]=r,d[2]=76|i,(null!==u||n&&1024&n[2])&&(d[2]|=1024),U7(d),d[3]=d[15]=n,d[8]=e,d[10]=s||n&&n[10],d[11]=a||n&&n[11],d[12]=l||n&&n[12]||null,d[9]=c||n&&n[9]||null,d[6]=o,d[20]=Yve++,d[21]=u,d[16]=2==t.type?n[16]:d,d}function W0(n,t,e,i,r){let o=n.data[t];if(null===o)o=V3(n,t,e,i,r),Zn.lFrame.inI18n&&(o.flags|=64);else if(64&o.type){o.type=e,o.value=i,o.attrs=r;let s=wx();o.injectorIndex=null===s?-1:s.injectorIndex}return Mu(o,!0),o}function V3(n,t,e,i,r){let o=j7(),s=m3(),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,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next: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,s?o:o&&o.parent,e,t,i,r);return null===n.firstChild&&(n.firstChild=l),null!==o&&(s?null==o.child&&null!==l.parent&&(o.child=l):null===o.next&&(o.next=l)),l}function q0(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 H3(n,t,e){y3(t);try{let i=n.viewQuery;null!==i&&NL(1,i,e);let r=n.template;null!==r&&aq(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&sq(n,t),n.staticViewQueries&&NL(2,n.viewQuery,e);let o=n.components;null!==o&&function(n,t){for(let e=0;e<t.length;e++)$ye(n,t[e])}(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[2]&=-5,b3()}}function xT(n,t,e,i){let r=t[2];if(128!=(128&r)){y3(t);try{U7(t),G7(n.bindingStartIndex),null!==e&&aq(n,t,e,2,i);let s=3==(3&r);if(s){let c=n.preOrderCheckHooks;null!==c&&D1(t,c,null)}else{let c=n.preOrderHooks;null!==c&&A1(t,c,0,null),FN(t,0)}if(function(n){for(let t=O3(n);null!==t;t=k3(t)){if(!t[2])continue;let e=t[9];for(let i=0;i<e.length;i++){let r=e[i],o=r[3];0==(512&r[2])&&f3(o,1),r[2]|=512}}}(t),function(n){for(let t=O3(n);null!==t;t=k3(t))for(let e=10;e<t.length;e++){let i=t[e],r=i[1];U1(i)&&xT(r,i,r.template,i[8])}}(t),null!==n.contentQueries&&sq(n,t),s){let c=n.contentCheckHooks;null!==c&&D1(t,c)}else{let c=n.contentHooks;null!==c&&A1(t,c,1),FN(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)zp(~r);else{let o=r,s=e[++i],a=e[++i];s_e(s,o),a(2,t[o])}}}finally{zp(-1)}}(n,t);let a=n.components;null!==a&&function(n,t){for(let e=0;e<t.length;e++)Jye(n,t[e])}(t,a);let l=n.viewQuery;if(null!==l&&NL(2,l,i),s){let c=n.viewCheckHooks;null!==c&&D1(t,c)}else{let c=n.viewHooks;null!==c&&A1(t,c,2),FN(t,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),t[2]&=-41,512&t[2]&&(t[2]&=-513,f3(t[3],-1))}finally{b3()}}}function aq(n,t,e,i,r){let o=Zs(),s=2&i;try{zp(-1),s&&t.length>22&&iq(n,t,22,!1),e(i,r)}finally{zp(o)}}function lq(n,t,e){if(p3(t)){let r=t.directiveEnd;for(let o=t.directiveStart;o<r;o++){let s=n.data[o];s.contentQueries&&s.contentQueries(1,e[o],o)}}}function U3(n,t,e){!z7()||(function(n,t,e,i){let r=e.directiveStart,o=e.directiveEnd;n.firstCreatePass||Sx(e,t),Su(i,t);let s=e.initialInputs;for(let a=r;a<o;a++){let l=n.data[a],c=Ac(l);c&&Yye(t,e,l);let u=Bx(t,n,a,e);Su(u,t),null!==s&&Xye(0,a-r,u,l,0,s),c&&(qp(e.index,t)[8]=u)}}(n,t,e,Ul(e,t)),128==(128&e.flags)&&function(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=Zn.lFrame.currentDirectiveIndex;try{zp(o);for(let a=i;a<r;a++){let l=n.data[a],c=t[a];sL(a),(null!==l.hostBindings||0!==l.hostVars||null!==l.hostAttrs)&&fq(l,c)}}finally{zp(-1),sL(s)}}(n,t,e))}function z3(n,t,e=Ul){let i=t.localNames;if(null!==i){let r=t.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=-1===s?e(t,n):n[s];n[r++]=a}}}function cq(n){let t=n.tView;return null===t||t.incompleteFirstPass?n.tView=j3(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):t}function j3(n,t,e,i,r,o,s,a,l,c){let u=22+i,d=u+r,p=function(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:Qn);return e}(u,d),h="function"==typeof c?c():c;return p[1]={type:n,blueprint:p,template:e,queries:null,viewQuery:a,declTNode:t,data:p.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:d,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 s?s():s,firstChild:null,schemas:l,consts:h,incompleteFirstPass:!1}}function uq(n,t,e,i){let r=xq(t);null===e?r.push(i):(r.push(e),n.firstCreatePass&&Cq(n).push(i,r.length-1))}function i7(n,t,e){for(let i in n)if(n.hasOwnProperty(i)){let r=n[i];(e=null===e?{}:e).hasOwnProperty(i)?e[i].push(t,r):e[i]=[t,r]}return e}function dq(n,t){let i=t.directiveEnd,r=n.data,o=t.attrs,s=[],a=null,l=null;for(let c=t.directiveStart;c<i;c++){let u=r[c],d=u.inputs,p=null===o||tq(t)?null:Qye(d,o);s.push(p),a=i7(d,c,a),l=i7(u.outputs,c,l)}null!==a&&(a.hasOwnProperty("class")&&(t.flags|=16),a.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=s,t.inputs=a,t.outputs=l}function il(n,t,e,i,r,o,s,a){let u,l=Ul(t,e),c=t.inputs;!a&&null!=c&&(u=c[i])?(q3(n,e,u,i,r),h3(t)&&pq(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!=s?s(r,t.value||"",i):r,o.setProperty(l,i,r))}function pq(n,t){let e=qp(t,n);16&e[2]||(e[2]|=32)}function G3(n,t,e,i){let r=!1;if(z7()){let o=function(n,t,e){let i=n.directiveRegistry,r=null;if(i)for(let o=0;o<i.length;o++){let s=i[o];nq(e,s.selectors,!1)&&(r||(r=[]),Y1(Sx(e,t),n,s.type),Ac(s)?(mq(n,e),r.unshift(s)):r.push(s))}return r}(n,t,e),s=null===i?null:{"":-1};if(null!==o){r=!0,gq(e,n.data.length,o.length);for(let u=0;u<o.length;u++){let d=o[u];d.providersResolver&&d.providersResolver(d)}let a=!1,l=!1,c=q0(n,t,o.length,null);for(let u=0;u<o.length;u++){let d=o[u];e.mergedAttrs=j1(e.mergedAttrs,d.hostAttrs),_q(n,e,t,c,d),qye(c,d,s),null!==d.contentQueries&&(e.flags|=8),(null!==d.hostBindings||null!==d.hostAttrs||0!==d.hostVars)&&(e.flags|=128);let p=d.type.prototype;!a&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e.index),a=!0),!l&&(p.ngOnChanges||p.ngDoCheck)&&((n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e.index),l=!0),c++}dq(n,e)}s&&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 At(-301,!1);i.push(t[r],o)}}}(e,i,s)}return e.mergedAttrs=j1(e.mergedAttrs,e.attrs),r}function hq(n,t,e,i,r,o){let s=o.hostBindings;if(s){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);let l=~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)!=l&&a.push(l),a.push(i,r,s)}}function fq(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function mq(n,t){t.flags|=2,(n.components||(n.components=[])).push(t.index)}function qye(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;Ac(t)&&(e[""]=n)}}function gq(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function _q(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Wf(r.type)),s=new qf(o,Ac(r),M);n.blueprint[i]=s,e[i]=s,hq(n,t,0,i,q0(n,e,r.hostVars,Qn),r)}function Yye(n,t,e){let i=Ul(t,n),r=cq(e),o=n[10],s=CT(n,bT(n,r,null,e.onPush?32:16,i,t,o,o.createRenderer(i,e),null,null,null));n[t.index]=s}function Tu(n,t,e,i,r,o){let s=Ul(n,t);W3(t[11],s,o,n.value,e,i,r)}function W3(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{let a=null==s?Kn(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function Xye(n,t,e,i,r,o){let s=o[t];if(null!==s){let a=i.setInput;for(let l=0;l<s.length;){let c=s[l++],u=s[l++],d=s[l++];null!==a?i.setInput(e,d,c,u):e[u]=d}}}function Qye(n,t){let e=null,i=0;for(;i<t.length;){let r=t[i];if(0!==r)if(5!==r){if("number"==typeof r)break;n.hasOwnProperty(r)&&(null===e&&(e=[]),e.push(r,n[r],t[i+1])),i+=2}else i+=2;else i+=4}return e}function vq(n,t,e,i){return new Array(n,!0,!1,t,null,0,i,e,null,null)}function Jye(n,t){let e=qp(t,n);if(U1(e)){let i=e[1];48&e[2]?xT(i,e,i.template,e[8]):e[5]>0&&FL(e)}}function FL(n){for(let i=O3(n);null!==i;i=k3(i))for(let r=10;r<i.length;r++){let o=i[r];if(U1(o))if(512&o[2]){let s=o[1];xT(s,o,s.template,o[8])}else o[5]>0&&FL(o)}let e=n[1].components;if(null!==e)for(let i=0;i<e.length;i++){let r=qp(e[i],n);U1(r)&&r[5]>0&&FL(r)}}function $ye(n,t){let e=qp(t,n),i=e[1];(function(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])})(i,e),H3(i,e,e[8])}function CT(n,t){return n[13]?n[14][4]=t:n[13]=t,n[14]=t,t}function yq(n){for(;n;){n[2]|=32;let t=R3(n);if(q0e(n)&&!t)return n;n=t}return null}function bq(n,t,e,i=!0){let r=t[10];r.begin&&r.begin();try{xT(n,t,n.template,e)}catch(s){throw i&&wq(t,s),s}finally{r.end&&r.end()}}function NL(n,t,e){v3(0),t(n,e)}function xq(n){return n[7]||(n[7]=[])}function Cq(n){return n.cleanup||(n.cleanup=[])}function Mq(n,t,e){return(null===n||Ac(n))&&(e=function(n){for(;Array.isArray(n);){if("object"==typeof n[1])return n;n=n[0]}return null}(e[t.index])),e[11]}function wq(n,t){let e=n[9],i=e?e.get(Qs,null):null;i&&i.handleError(t)}function q3(n,t,e,i,r){for(let o=0;o<e.length;){let s=e[o++],a=e[o++],l=t[s],c=n.data[s];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function jd(n,t,e){let i=pT(t,n);V9(n[11],i,e)}function $1(n,t,e){let i=e?n.styles:null,r=e?n.classes:null,o=0;if(null!==t)for(let s=0;s<t.length;s++){let a=t[s];"number"==typeof a?o=a:1==o?r=tL(r,a):2==o&&(i=tL(i,a+": "+t[++s]+";"))}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function k1(n,t,e,i,r=!1){for(;null!==e;){let o=t[e.index];if(null!==o&&i.push($a(o)),Vd(o))for(let a=10;a<o.length;a++){let l=o[a],c=l[1].firstChild;null!==c&&k1(l[1],l,c,i)}let s=e.type;if(8&s)k1(n,t,e.child,i);else if(32&s){let l,a=P3(e,t);for(;l=a();)i.push(l)}else if(16&s){let a=Q9(t,e);if(Array.isArray(a))i.push(...a);else{let l=R3(t[16]);k1(l[1],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}var Qf=class{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){let t=this._lView,e=t[1];return k1(e,t,e.firstChild,[])}get context(){return this._lView[8]}set context(t){this._lView[8]=t}get destroyed(){return 128==(128&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[3];if(Vd(t)){let e=t[8],i=e?e.indexOf(this):-1;i>-1&&(AL(t,i),X1(e,i))}this._attachedToViewContainer=!1}U9(this._lView[1],this._lView)}onDestroy(t){uq(this._lView[1],this._lView,null,t)}markForCheck(){yq(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){bq(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new At(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,qx(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new At(902,!1);this._appRef=t}},LL=class extends Qf{constructor(t){super(t),this._view=t}detectChanges(){let t=this._view;bq(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}},Ax=class extends gs{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Nl(t);return new eT(e,this.ngModule)}};function r7(n){let t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}var eT=class extends J1{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(Cye).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return r7(this.componentDef.inputs)}get outputs(){return r7(this.componentDef.outputs)}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof jp?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);let s=o?new class{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,HN,i);return r!==HN||e===HN?r:this.parentInjector.get(t,e,i)}}(t,o):t,a=s.get(wu,null);if(null===a)throw new At(407,!1);let m,x,l=s.get(Hve,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function(n,t,e){return n.selectRootElement(t,e===Ja.ShadowDom)}(c,i,this.componentDef.encapsulation):N3(c,u,function(n){let t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),p=this.componentDef.onPush?288:272,h=j3(0,null,null,1,0,null,null,null,null,null),f=bT(null,h,null,p,null,null,a,c,l,s,null);y3(f);try{let g=function(n,t,e,i,r,o){let s=e[1];e[22]=n;let l=W0(s,22,2,"#host",null),c=l.mergedAttrs=t.hostAttrs;null!==c&&($1(l,c,!0),null!==n&&(z1(r,n,c),null!==l.classes&&B3(r,n,l.classes),null!==l.styles&&J9(r,n,l.styles)));let u=i.createRenderer(n,t),d=bT(e,cq(t),null,t.onPush?32:16,e[22],l,i,u,null,null,null);return s.firstCreatePass&&(Y1(Sx(l,e),s,t.type),mq(s,l),gq(l,e.length,1)),CT(e,d),e[22]=d}(d,this.componentDef,f,a,c);if(d)if(i)z1(c,d,["ng-version",Uve.full]);else{let{attrs:b,classes:D}=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(!Sc(r))break;r=o}i++}return{attrs:t,classes:e}}(this.componentDef.selectors[0]);b&&z1(c,d,b),D&&D.length>0&&B3(c,d,D.join(" "))}if(x=H7(h,22),void 0!==e){let b=x.projection=[];for(let D=0;D<this.ngContentSelectors.length;D++){let T=e[D];b.push(null!=T?Array.from(T):null)}}m=function(n,t,e,i){let r=e[1],o=function(n,t,e){let i=zo();n.firstCreatePass&&(e.providersResolver&&e.providersResolver(e),_q(n,i,t,q0(n,t,1,null),e),dq(n,i));let r=Bx(t,n,i.directiveStart,i);Su(r,t);let o=Ul(i,t);return o&&Su(o,t),r}(r,e,t);if(n[8]=e[8]=o,null!==i)for(let a of i)a(o,t);if(t.contentQueries){let a=zo();t.contentQueries(1,o,a.directiveStart)}let s=zo();return!r.firstCreatePass||null===t.hostBindings&&null===t.hostAttrs||(zp(s.index),hq(e[1],s,0,s.directiveStart,s.directiveEnd,t),fq(t,o)),o}(g,this.componentDef,f,[rbe]),H3(h,f,null)}finally{b3()}return new VL(this.componentType,m,G0(x,f),f,x)}},VL=(new Ax,class extends EL{constructor(t,e,i,r,o){super(),this.location=i,this._rootLView=r,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new LL(r),this.componentType=t}setInput(t,e){let r,i=this._tNode.inputs;if(null!==i&&(r=i[t])){let o=this._rootLView;q3(o[1],o,r,t,e),pq(o,this._tNode.index)}}get injector(){return new jf(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}});function rbe(){let n=zo();hT(rt()[1],n)}function Sq(n){return Object.getPrototypeOf(n.prototype).constructor}function tt(n){let t=Sq(n.type),e=!0,i=[n];for(;t;){let r;if(Ac(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new At(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=GN(n.inputs),s.declaredInputs=GN(n.declaredInputs),s.outputs=GN(n.outputs);let a=r.hostBindings;a&&lbe(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&sbe(n,l),c&&abe(n,c),kN(n.inputs,r.inputs),kN(n.declaredInputs,r.declaredInputs),kN(n.outputs,r.outputs),Ac(r)&&r.data.animation){let u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===tt&&(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=j1(r.hostAttrs,e=j1(e,r.hostAttrs))}}(i)}function GN(n){return n===A0?{}:n===Qi?[]:n}function sbe(n,t){let e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function abe(n,t){let e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function lbe(n,t){let e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}var cbe=["providersResolver"],ube=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];var T1=null;function MT(){if(!T1){let n=to.Symbol;if(n&&n.iterator)T1=n.iterator;else{let t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){let i=t[e];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(T1=i)}}}return T1}function wT(n){return!!Y3(n)&&(Array.isArray(n)||!(n instanceof Map)&&MT()in n)}function Y3(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function Du(n,t,e){return n[t]=e}function Yx(n,t){return n[t]}function Ds(n,t,e){return!Object.is(n[t],e)&&(n[t]=e,!0)}function Kf(n,t,e,i){let r=Ds(n,t,e);return Ds(n,t+1,i)||r}function ST(n,t,e,i,r){let o=Kf(n,t,e,i);return Ds(n,t+2,r)||o}function Vl(n,t,e,i,r,o){let s=Kf(n,t,e,i);return Kf(n,t+2,r,o)||s}function ze(n,t,e,i){let r=rt();return Ds(r,U0(),t)&&(Fi(),Tu(no(),r,n,t,e,i)),ze}function Y0(n,t){let e=!1,i=Hd();for(let o=1;o<t.length;o+=2)e=Ds(n,i++,t[o])||e;if(G7(i),!e)return Qn;let r=t[0];for(let o=1;o<t.length;o+=2)r+=Kn(t[o])+t[o+1];return r}function X0(n,t,e,i){return Ds(n,U0(),e)?t+Kn(e)+i:Qn}function Q0(n,t,e,i,r,o){let a=Kf(n,Hd(),e,r);return Ud(2),a?t+Kn(e)+i+Kn(r)+o:Qn}function K0(n,t,e,i,r,o,s,a){let c=ST(n,Hd(),e,r,s);return Ud(3),c?t+Kn(e)+i+Kn(r)+o+Kn(s)+a:Qn}function Z0(n,t,e,i,r,o,s,a,l,c){let d=Vl(n,Hd(),e,r,s,l);return Ud(4),d?t+Kn(e)+i+Kn(r)+o+Kn(s)+a+Kn(l)+c:Qn}function J0(n,t,e,i,r,o,s,a,l,c,u,d){let p=Hd(),h=Vl(n,p,e,r,s,l);return h=Ds(n,p+4,u)||h,Ud(5),h?t+Kn(e)+i+Kn(r)+o+Kn(s)+a+Kn(l)+c+Kn(u)+d:Qn}function $0(n,t,e,i,r,o,s,a,l,c,u,d,p,h){let f=Hd(),m=Vl(n,f,e,r,s,l);return m=Kf(n,f+4,u,p)||m,Ud(6),m?t+Kn(e)+i+Kn(r)+o+Kn(s)+a+Kn(l)+c+Kn(u)+d+Kn(p)+h:Qn}function e_(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m){let x=Hd(),g=Vl(n,x,e,r,s,l);return g=ST(n,x+4,u,p,f)||g,Ud(7),g?t+Kn(e)+i+Kn(r)+o+Kn(s)+a+Kn(l)+c+Kn(u)+d+Kn(p)+h+Kn(f)+m:Qn}function t_(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g){let b=Hd(),D=Vl(n,b,e,r,s,l);return D=Vl(n,b+4,u,p,f,x)||D,Ud(8),D?t+Kn(e)+i+Kn(r)+o+Kn(s)+a+Kn(l)+c+Kn(u)+d+Kn(p)+h+Kn(f)+m+Kn(x)+g:Qn}function E(n,t,e,i,r,o,s,a){let l=rt(),c=Fi(),u=n+22,d=c.firstCreatePass?function(n,t,e,i,r,o,s,a,l){let c=t.consts,u=W0(t,n,4,s||null,Up(c,a));G3(t,e,u,Up(c,l)),hT(t,u);let d=u.tViews=j3(2,u,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,u),d.queries=t.queries.embeddedTView(u)),u}(u,c,l,t,e,i,r,o,s):c.data[u];Mu(d,!1);let p=l[11].createComment("");yT(c,l,p,d),Su(p,l),CT(l,l[u]=vq(p,l,p,d)),dT(d)&&U3(c,l,d),null!=s&&z3(l,d,a)}function $e(n){return H0(Zn.lFrame.contextLView,22+n)}function y(n,t,e){let i=rt();return Ds(i,U0(),t)&&il(Fi(),no(),i,n,t,i[11],e,!1),y}function HL(n,t,e,i,r){let s=r?"class":"style";q3(n,e,t.inputs[s],s,i)}function _(n,t,e,i){let r=rt(),o=Fi(),s=22+n,a=r[11],l=r[s]=N3(a,t,Zn.lFrame.currentNamespace),c=o.firstCreatePass?function(n,t,e,i,r,o,s){let a=t.consts,c=W0(t,n,2,r,Up(a,o));return G3(t,e,c,Up(a,s)),null!==c.attrs&&$1(c,c.attrs,!1),null!==c.mergedAttrs&&$1(c,c.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,c),c}(s,o,r,0,t,e,i):o.data[s];Mu(c,!0);let u=c.mergedAttrs;null!==u&&z1(a,l,u);let d=c.classes;null!==d&&B3(a,l,d);let p=c.styles;return null!==p&&J9(a,l,p),64!=(64&c.flags)&&yT(o,r,l,c),0===Zn.lFrame.elementDepthCount&&Su(l,r),Zn.lFrame.elementDepthCount++,dT(c)&&(U3(o,r,c),lq(o,c,r)),null!==i&&z3(r,c),_}function v(){let n=zo();m3()?g3():(n=n.parent,Mu(n,!1));let t=n;Zn.lFrame.elementDepthCount--;let e=Fi();return e.firstCreatePass&&(hT(e,n),p3(n)&&e.queries.elementEnd(n)),null!=t.classesWithoutHost&&function(n){return 0!=(16&n.flags)}(t)&&HL(e,t,rt(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(n){return 0!=(32&n.flags)}(t)&&HL(e,t,rt(),t.stylesWithoutHost,!1),v}function O(n,t,e,i){return _(n,t,e,i),v(),O}function sn(n,t,e){let i=rt(),r=Fi(),o=n+22,s=r.firstCreatePass?function(n,t,e,i,r){let o=t.consts,s=Up(o,i),a=W0(t,n,8,"ng-container",s);return null!==s&&$1(a,s,!0),G3(t,e,a,Up(o,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(o,r,i,t,e):r.data[o];Mu(s,!0);let a=i[o]=i[11].createComment("");return yT(r,i,a,s),Su(a,i),dT(s)&&(U3(r,i,s),lq(r,s,i)),null!=e&&z3(i,s),sn}function an(){let n=zo(),t=Fi();return m3()?g3():(n=n.parent,Mu(n,!1)),t.firstCreatePass&&(hT(t,n),p3(n)&&t.queries.elementEnd(n)),an}function Ni(n,t,e){return sn(n,t,e),an(),Ni}function Pe(){return rt()}function n_(n){return!!n&&"function"==typeof n.then}function X3(n){return!!n&&"function"==typeof n.subscribe}var Q3=X3;function P(n,t,e,i){let r=rt(),o=Fi(),s=zo();return Fq(o,r,r[11],s,n,t,0,i),P}function i_(n,t){let e=zo(),i=rt(),r=Fi();return Fq(r,i,Mq(_3(r.data),e,i),e,n,t),i_}function Fq(n,t,e,i,r,o,s,a){let l=dT(i),u=n.firstCreatePass&&Cq(n),p=xq(t),h=!0;if(3&i.type||a){let x=Ul(i,t),g=a?a(x):x,b=p.length,D=a?k=>a($a(k[i.index])):i.index,T=null;if(!a&&l&&(T=function(n,t,e,i){let r=n.cleanup;if(null!=r)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===i){let a=t[7],l=r[o+2];return a.length>l?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==T)(T.__ngLastListenerFn__||T).__ngNextListenerFn__=o,T.__ngLastListenerFn__=o,h=!1;else{o=s7(i,t,0,o,!1);let k=e.listen(g,r,o);p.push(o,k),u&&u.push(r,D,b,b+1)}}else o=s7(i,t,0,o,!1);let m,f=i.outputs;if(h&&null!==f&&(m=f[r])){let x=m.length;if(x)for(let g=0;g<x;g+=2){let Z=t[m[g]][m[g+1]].subscribe(o),z=p.length;p.push(o,Z),u&&u.push(r,i.index,z,-(z+1))}}}function o7(n,t,e,i){try{return!1!==e(i)}catch(r){return wq(n,r),!1}}function s7(n,t,e,i,r){return function o(s){if(s===Function)return i;yq(2&n.flags?qp(n.index,t):t);let l=o7(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=o7(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function S(n=1){return function(n){return(Zn.lFrame.contextLView=function(n,t){for(;n>0;)t=t[15],n--;return t}(n,Zn.lFrame.contextLView))[8]}(n)}function vbe(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?nq(n,o,!0):xye(i,o))return r}else e=r}return e}function xi(n){let t=rt()[16][6];if(!t.projection){let i=t.projection=fx(n?n.length:1,null),r=i.slice(),o=t.child;for(;null!==o;){let s=n?vbe(o,n):0;null!==s&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o),o=o.next}}}function Vn(n,t=0,e){let i=rt(),r=Fi(),o=W0(r,22+n,16,null,e||null);null===o.projection&&(o.projection=t),g3(),64!=(64&o.flags)&&function(n,t,e){Z9(t[11],0,t,e,z9(n,e,t),W9(e.parent||t[6],e,t))}(r,i,o)}function Zi(n,t,e){return Xx(n,"",t,"",e),Zi}function Xx(n,t,e,i,r){let o=rt(),s=X0(o,t,e,i);return s!==Qn&&il(Fi(),no(),o,n,s,o[11],r,!1),Xx}function ET(n,t,e,i,r,o,s){let a=rt(),l=Q0(a,t,e,i,r,o);return l!==Qn&&il(Fi(),no(),a,n,l,a[11],s,!1),ET}function a7(n,t,e,i,r){let o=n[e+1],s=null===t,a=i?Xf(o):F0(o),l=!1;for(;0!==a&&(!1===l||s);){let u=n[a+1];xbe(n[a],t)&&(l=!0,n[a+1]=i?kL(u):OL(u)),a=i?Xf(u):F0(u)}l&&(n[e+1]=i?OL(o):kL(o))}function xbe(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&Hx(n,t)>=0}var Uo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function jq(n){return n.substring(Uo.key,Uo.keyEnd)}function Cbe(n){return n.substring(Uo.value,Uo.valueEnd)}function Gq(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),N0(n,t,e))}function Wq(n,t){let e=Uo.textEnd,i=Uo.key=N0(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=l7(n,i,e),i=Uo.value=N0(n,i,e),i=Uo.valueEnd=function(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s<e;){let l=n.charCodeAt(s++);if(59===l)return a;34===l||39===l?a=s=c7(n,l,s,e):t===s-4&&85===o&&82===r&&76===i&&40===l?a=s=c7(n,41,s,e):l>32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),l7(n,i,e))}function qq(n){Uo.key=0,Uo.keyEnd=0,Uo.value=0,Uo.valueEnd=0,Uo.textEnd=n.length}function N0(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function l7(n,t,e,i){return(t=N0(n,t,e))<e&&t++,t}function c7(n,t,e,i){let r=-1,o=e;for(;o<i;){let s=n.charCodeAt(o++);if(s==t&&92!==r)return o;r=92==s&&92===r?0:s}throw new Error}function Pt(n,t,e){return Rc(n,t,e,!1),Pt}function et(n,t){return Rc(n,t,null,!0),et}function jl(n){Oc(Qq,Dbe,n,!1)}function Dbe(n,t){for(let e=function(n){return qq(n),Wq(n,N0(n,0,Uo.textEnd))}(t);e>=0;e=Wq(t,e))Qq(n,jq(t),Cbe(t))}function Da(n){Oc(el,Au,n,!0)}function Au(n,t){for(let e=function(n){return qq(n),Gq(n,N0(n,0,Uo.textEnd))}(t);e>=0;e=Gq(t,e))el(n,jq(t),!0)}function Rc(n,t,e,i){let r=rt(),o=Fi(),s=Ud(2);o.firstUpdatePass&&Xq(o,n,s,i),t!==Qn&&Ds(r,s,t)&&Kq(o,o.data[Zs()],r,r[11],n,r[s+1]=function(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=To(Ta(n)))),n}(t,e),i,s)}function Oc(n,t,e,i){let r=Fi(),o=Ud(2);r.firstUpdatePass&&Xq(r,null,o,i);let s=rt();if(e!==Qn&&Ds(s,o,e)){let a=r.data[Zs()];if(Zq(a,i)&&!Yq(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=tL(l,e||"")),HL(r,a,s,e,i)}else!function(n,t,e,i,r,o,s,a){r===Qn&&(r=Qi);let l=0,c=0,u=0<r.length?r[0]:null,d=0<o.length?o[0]:null;for(;null!==u||null!==d;){let m,p=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,f=null;u===d?(l+=2,c+=2,p!==h&&(f=d,m=h)):null===d||null!==u&&u<d?(l+=2,f=u):(c+=2,f=d,m=h),null!==f&&Kq(n,t,e,i,f,m,s,a),u=l<r.length?r[l]:null,d=c<o.length?o[c]:null}}(r,a,s,s[11],s[o+1],s[o+1]=function(n,t,e){if(null==e||""===e)return Qi;let i=[],r=Ta(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 Yq(n,t){return t>=n.expandoStartIndex}function Xq(n,t,e,i){let r=n.data;if(null===r[e+1]){let o=r[Zs()],s=Yq(n,e);Zq(o,i)&&null===t&&!s&&(t=!1),t=function(n,t,e,i){let r=_3(n),o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Ix(e=WN(null,n,t,e,i),t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=WN(r,n,t,e,i),null===o){let l=function(n,t,e){let i=e?t.classBindings:t.styleBindings;if(0!==F0(i))return n[Xf(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=WN(null,n,t,l[1],i),l=Ix(l,t.attrs,i),function(n,t,e,i){n[Xf(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=Ix(i,n[o].hostAttrs,e);return Ix(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 s=o?t.classBindings:t.styleBindings,a=Xf(s),l=F0(s);n[i]=e;let u,c=!1;if(Array.isArray(e)){let d=e;u=d[1],(null===u||Hx(d,u)>0)&&(c=!0)}else u=e;if(r)if(0!==l){let p=Xf(n[a+1]);n[i+1]=E1(p,a),0!==p&&(n[p+1]=jN(n[p+1],i)),n[a+1]=function(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=E1(a,0),0!==a&&(n[a+1]=jN(n[a+1],i)),a=i;else n[i+1]=E1(l,0),0===a?a=i:n[l+1]=jN(n[l+1],i),l=i;c&&(n[i+1]=OL(n[i+1])),a7(n,u,i,!0),a7(n,u,i,!1),function(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&Hx(o,t)>=0&&(e[i+1]=kL(e[i+1]))}(t,u,n,i,o),s=E1(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function WN(n,t,e,i,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a<s&&(o=t[a],i=Ix(i,o.hostAttrs,r),o!==n);)a++;return null!==n&&(e.directiveStylingLast=a),i}function Ix(n,t,e){let i=e?1:2,r=-1;if(null!==t)for(let o=0;o<t.length;o++){let s=t[o];"number"==typeof s?r=s:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),el(n,s,!!e||t[++o]))}return void 0===n?null:n}function Qq(n,t,e){el(n,t,Ta(e))}function Kq(n,t,e,i,r,o,s,a){if(!(3&t.type))return;let l=n.data,c=l[a+1],u=function(n){return 1==(1&n)}(c)?u7(l,t,e,r,F0(c),s):void 0;tT(u)||(tT(o)||function(n){return 2==(2&n)}(c)&&(o=u7(l,null,e,r,a,s)),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:Bl.DashCase;null==r?n.removeStyle(e,i,o):("string"==typeof r&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Bl.Important),n.setStyle(e,i,r,o))}}(i,s,pT(Zs(),e),r,o))}function u7(n,t,e,i,r,o){let a,s=null===t;for(;r>0;){let l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u,p=e[r+1];p===Qn&&(p=d?Qi:void 0);let h=d?LN(p,i):u===i?p:void 0;if(c&&!tT(h)&&(h=LN(l,i)),tT(h)&&(a=h,s))return a;let f=n[r+1];r=s?Xf(f):F0(f)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=LN(l,i))}return a}function tT(n){return void 0!==n}function Zq(n,t){return 0!=(n.flags&(t?16:32))}function A(n,t=""){let e=rt(),i=Fi(),r=n+22,o=i.firstCreatePass?W0(i,r,1,t,null):i.data[r],s=e[r]=F3(e[11],t);yT(i,e,s,o),Mu(o,!1)}function yt(n){return je("",n,""),yt}function je(n,t,e){let i=rt(),r=X0(i,n,t,e);return r!==Qn&&jd(i,Zs(),r),je}function Xp(n,t,e,i,r){let o=rt(),s=Q0(o,n,t,e,i,r);return s!==Qn&&jd(o,Zs(),s),Xp}function TT(n,t,e,i,r,o,s){let a=rt(),l=K0(a,n,t,e,i,r,o,s);return l!==Qn&&jd(a,Zs(),l),TT}function Qx(n,t,e){Oc(el,Au,X0(rt(),n,t,e),!0)}function _s(n,t,e){let i=rt();return Ds(i,U0(),t)&&il(Fi(),no(),i,n,t,i[11],e,!0),_s}function r_(n,t,e){let i=rt();if(Ds(i,U0(),t)){let o=Fi(),s=no();il(o,s,i,n,t,Mq(_3(o.data),s,i),e,!0)}return r_}var Vf=void 0,exe=["en",[["a","p"],["AM","PM"],Vf],[["AM","PM"],Vf,Vf],[["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"]],Vf,[["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"]],Vf,[["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}",Vf,"{1} 'at' {0}",Vf],[".",",",";","%","+","-","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}],qN={};function Aa(n){let t=function(n){return n.toLowerCase().replace(/_/g,"-")}(n),e=d7(t);if(e)return e;let i=t.split("-")[0];if(e=d7(i),e)return e;if("en"===i)return exe;throw new At(701,!1)}function d7(n){return n in qN||(qN[n]=to.ng&&to.ng.common&&to.ng.common.locales&&to.ng.common.locales[n]),qN[n]}var Rr=(()=>{return(n=Rr||(Rr={}))[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",Rr;var n})(),nxe=["zero","one","two","few","many"];var nT="en-US",fY={marker:"element"},mY={marker:"ICU"},Ec=(()=>{return(n=Ec||(Ec={}))[n.SHIFT=2]="SHIFT",n[n.APPEND_EAGERLY=1]="APPEND_EAGERLY",n[n.COMMENT=2]="COMMENT",Ec;var n})(),gY=nT;function _Y(n,t,e){let i=t.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?q9(n,0,e):$a(e[r])}function vY(n,t,e,i,r){let o=t.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&t.type||(a=s,s=r),null!==s&&0==(2&t.flags))for(let l=1;l<o.length;l++)Yf(n,s,e[o[l]],a,!1)}}function yY(n,t){if(n.push(t),n.length>1)for(let e=n.length-2;e>=0;e--){let i=n[e];bY(i)||axe(i,t)&&null===lxe(i)&&cxe(i,t.index)}}function bY(n){return!(64&n.type)}function axe(n,t){return bY(t)||n.index>t.index}function lxe(n){let t=n.insertBeforeIndex;return Array.isArray(t)?t[0]:t}function cxe(n,t){let e=n.insertBeforeIndex;Array.isArray(e)?e[0]=t:(X9(_Y,vY),n.insertBeforeIndex=t)}function _x(n,t){let e=n.data[t];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function pxe(n,t,e){let i=V3(n,e,64,null,null);return yY(t,i),i}function DT(n,t){let e=t[n.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function hxe(n){return n>>>17}function fxe(n){return(131070&n)>>>1}var Px=0,vx=0;function xY(n,t,e,i){let s,r=e[11],o=null;for(let a=0;a<t.length;a++){let l=t[a];if("string"==typeof l){let c=t[++a];null===e[c]&&(e[c]=F3(r,l))}else if("number"==typeof l)switch(1&l){case 0:let u,d,c=hxe(l);if(null===o&&(o=c,s=vT(r,i)),c===o?(u=i,d=s):(u=null,d=$a(e[c])),null!==d){let m=fxe(l);Yf(r,d,e[m],u,!1);let g=_x(n,m);if(null!==g&&"object"==typeof g){let b=DT(g,e);null!==b&&xY(n,g.create[b],e,e[g.anchorIdx])}}break;case 1:let h=t[++a],f=t[++a];W3(r,pT(l>>>1,e),null,null,h,f,null)}else switch(l){case mY:let c=t[++a],u=t[++a];null===e[u]&&Su(e[u]=eye(r,c),e);break;case fY:let d=t[++a],p=t[++a];null===e[p]&&Su(e[p]=N3(r,d,null),e)}}}function CY(n,t,e,i,r){for(let o=0;o<e.length;o++){let s=e[o],a=e[++o];if(s&r){let l="";for(let c=o+1;c<=o+a;c++){let u=e[c];if("string"==typeof u)l+=u;else if("number"==typeof u)if(u<0)l+=Kn(t[i-u]);else{let d=u>>>2;switch(3&u){case 1:let p=e[++c],h=e[++c],f=n.data[d];"string"==typeof f?W3(t[11],t[d],null,f,p,l,h):il(n,f,t,p,l,t[11],h,!1);break;case 0:let m=t[d];null!==m&&V9(t[11],m,l);break;case 2:yxe(n,_x(n,d),t,l);break;case 3:p7(n,_x(n,d),i,t)}}}}else{let l=e[o+1];if(l>0&&3==(3&l)){let u=_x(n,l>>>2);t[u.currentCaseLViewIndex]<0&&p7(n,u,i,t)}}o+=a}}function p7(n,t,e,i){let r=i[t.currentCaseLViewIndex];if(null!==r){let o=Px;r<0&&(r=i[t.currentCaseLViewIndex]=~r,o=-1),CY(n,i,t.update[r],e,o)}}function yxe(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 Aa(n)[Rr.PluralCase]}(t)(parseInt(n,10)),i=nxe[e];return void 0!==i?i:"other"}(t,gY);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(DT(t,e)!==r&&(MY(n,t,e),e[t.currentCaseLViewIndex]=null===r?null:~r,null!==r)){let s=e[t.anchorIdx];s&&xY(n,t.create[r],e,s)}}function MY(n,t,e){let i=DT(t,e);if(null!==i){let r=t.remove[i];for(let o=0;o<r.length;o++){let s=r[o];if(s>0){let a=pT(s,e);null!==a&&K9(e[11],a)}else MY(n,_x(n,~s),e)}}}function xxe(){let e,i,n=[],t=-1;function o(a,l){t=0;let c=DT(a,l);i=null!==c?a.remove[c]:Qi}function s(){if(t<i.length){let a=i[t++];return a>0?e[a]:(n.push(t,i),o(e[1].data[~a],e),s())}return 0===n.length?null:(i=n.pop(),t=n.pop(),s())}return function(a,l){for(e=l;n.length;)n.pop();return o(a.value,l),s}}var iT=/\ufffd(\d+):?\d*\ufffd/gi,Cxe=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,Mxe=/\ufffd(\d+)\ufffd/,wY=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,wxe=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,Sxe=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Exe=/\uE500/g;function SY(n,t,e,i,r,o,s){let a=q0(n,i,1,null),l=a<<Ec.SHIFT,c=wx();t===c&&(c=null),null===c&&(l|=Ec.APPEND_EAGERLY),s&&(l|=Ec.COMMENT,function(n){void 0===DL&&(DL=n())}(xxe)),r.push(l,null===o?"":o);let u=V3(n,a,s?32:1,null===o?"":o,null);yY(e,u);let d=u.index;return Mu(u,!1),null!==c&&t!==c&&function(n,t){let e=n.insertBeforeIndex;null===e?(X9(_Y,vY),e=n.insertBeforeIndex=[null,t]):(function(n,t,e){1!=n&&T7("Expecting array here",n,!0,"==")}(Array.isArray(e)),e.push(t))}(c,d),u}function Axe(n,t,e,i,r,o,s){let a=s.match(iT),l=SY(n,t,e,o,i,a?null:s,!1);a&&bx(r,s,l.index,null,0,null)}function bx(n,t,e,i,r,o){let s=n.length,a=s+1;n.push(null,null);let l=s+2,c=t.split(iT),u=0;for(let d=0;d<c.length;d++){let p=c[d];if(1&d){let h=r+parseInt(p,10);n.push(-1-h),u|=EY(h)}else""!==p&&n.push(p)}return n.push(e<<2|(i?1:0)),i&&n.push(i,o),n[s]=u,n[a]=n.length-l,u}function Pxe(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 EY(n){return 1<<Math.min(n,31)}function h7(n){let t,o,e="",i=0,r=!1;for(;null!==(t=wxe.exec(n));)r?t[0]===`\ufffd/*${o}\ufffd`&&(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 TY(n,t,e,i,r,o){let s=0,a={type:r.type,currentCaseLViewIndex:q0(n,t,1,null),anchorIdx:o,cases:[],create:[],remove:[],update:[]};(function(n,t,e){n.push(EY(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,a);let l=r.values;for(let c=0;c<l.length;c++){let u=l[c],d=[];for(let p=0;p<u.length;p++){let h=u[p];if("string"!=typeof h){let f=d.push(h)-1;u[p]=`\x3c!--\ufffd${f}\ufffd--\x3e`}}s=Fxe(n,a,t,e,i,r.cases[c],u.join(""),d)|s}s&&function(n,t,e){n.push(t,1,e<<2|3)}(e,s,o)}function kxe(n){let t=[],e=[],i=1,r=0,o=UL(n=n.replace(wY,function(s,a,l){return i="select"===l?0:1,r=parseInt(a.slice(1),10),""}));for(let s=0;s<o.length;){let a=o[s++].trim();1===i&&(a=a.replace(/\s*(?:=)?(\w+)\s*/,"$1")),a.length&&t.push(a);let l=UL(o[s++]);t.length>e.length&&e.push(l)}return{type:i,mainBinding:r,cases:t,values:e}}function UL(n){if(!n)return[];let o,t=0,e=[],i=[],r=/[{}]/g;for(r.lastIndex=0;o=r.exec(n);){let a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){let l=n.substring(t,a);wY.test(l)?i.push(kxe(l)):i.push(l),t=a+1}}else{if(0==e.length){let l=n.substring(t,a);i.push(l),t=a+1}e.push("{")}}let s=n.substring(t);return i.push(s),i}function Fxe(n,t,e,i,r,o,s,a){let l=[],c=[],u=[];t.cases.push(o),t.create.push(l),t.remove.push(c),t.update.push(u);let p=w9(_9()).getInertBodyElement(s),h=CL(p)||p;return h?DY(n,t,e,i,l,c,u,h,r,a,0):0}function DY(n,t,e,i,r,o,s,a,l,c,u){let d=0,p=a.firstChild;for(;p;){let h=q0(n,e,1,null);switch(p.nodeType){case Node.ELEMENT_NODE:let f=p,m=f.tagName.toLowerCase();if(bL.hasOwnProperty(m)){YN(r,fY,m,l,h),n.data[h]=m;let D=f.attributes;for(let T=0;T<D.length;T++){let k=D.item(T),Z=k.name.toLowerCase();k.value.match(iT)?D9.hasOwnProperty(Z)&&bx(s,k.value,h,k.name,0,T3[Z]?zx:null):Vxe(r,h,k)}d=DY(n,t,e,i,r,o,s,p,h,c,u+1)|d,f7(o,h,u)}break;case Node.TEXT_NODE:let x=p.textContent||"",g=x.match(iT);YN(r,null,g?"":x,l,h),f7(o,h,u),g&&(d=bx(s,x,h,null,0,null)|d);break;case Node.COMMENT_NODE:let b=Mxe.exec(p.textContent||"");if(b){let T=c[parseInt(b[1],10)];YN(r,mY,"",l,h),TY(n,e,i,l,T,h),Nxe(o,h,u)}}p=p.nextSibling}return d}function f7(n,t,e){0===e&&n.push(t)}function Nxe(n,t,e){0===e&&(n.push(~t),n.push(t))}function YN(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 Vxe(n,t,e){n.push(t<<1|1,e.name,e.value)}var Hxe=/\[(\ufffd.+?\ufffd?)\]/,Uxe=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,zxe=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,jxe=/{([A-Z0-9_]+)}/g,Gxe=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Wxe=/\/\*/,qxe=/\d+\:(\d+)/;function AY(n,t,e=-1){let i=Fi(),r=rt(),o=22+n,s=Up(i.consts,t),a=wx();i.firstCreatePass&&function(n,t,e,i,r,o){let s=wx(),a=[],l=[],c=[[]];r=function(n,t){if(function(n){return-1===n}(t))return h7(n);{let e=n.indexOf(`:${t}\ufffd`)+2+t.toString().length,i=n.search(new RegExp(`\ufffd\\/\\*\\d+:${t}\ufffd`));return h7(n.substring(e,i))}}(r,o);let u=function(n){return n.replace(Exe," ")}(r).split(Sxe);for(let d=0;d<u.length;d++){let p=u[d];if(0==(1&d)){let h=UL(p);for(let f=0;f<h.length;f++){let m=h[f];if(0==(1&f)){let x=m;""!==x&&Axe(n,s,c[0],a,l,e,x)}else{let x=m;if("object"!=typeof x)throw new Error(`Unable to parse ICU expression in "${r}" message.`);TY(n,e,l,t,x,SY(n,s,c[0],e,a,"",!0).index)}}}else{let h=47===p.charCodeAt(0),m=(p.charCodeAt(h?1:0),22+Number.parseInt(p.substring(h?2:1)));if(h)c.shift(),Mu(wx(),!1);else{let x=pxe(n,c[0],m);c.unshift([]),Mu(x,!0)}}}n.data[i]={create:a,update:l}}(i,null===a?0:a.index,r,o,s,e);let l=i.data[o],u=j9(i,a===r[6]?null:a,r);(function(n,t,e,i){let r=n[11];for(let o=0;o<t.length;o++){let s=t[o++],a=t[o],l=(s&Ec.COMMENT)===Ec.COMMENT,c=(s&Ec.APPEND_EAGERLY)===Ec.APPEND_EAGERLY,u=s>>>Ec.SHIFT,d=n[u];null===d&&(d=n[u]=l?r.createComment(a):F3(r,a)),c&&null!==e&&Yf(r,e,d,i,!1)}})(r,l.create,u,a&&8&a.type?r[a.index]:null),W7(!0)}function IY(){W7(!1)}function AT(n,t,e){AY(n,t,e),IY()}function Kx(n){return function(n){n&&(Px|=1<<Math.min(vx,31)),vx++}(Ds(rt(),U0(),n)),Kx}function IT(n){!function(n,t,e){if(vx>0){let i=n.data[e];CY(n,t,Array.isArray(i)?i:i.update,Hd()-vx-1,Px)}Px=0,vx=0}(Fi(),rt(),n+22)}function PT(n,t={}){return function(n,t={}){let e=n;if(Hxe.test(n)){let i={},r=[0];e=e.replace(Uxe,(o,s,a)=>{let l=s||a,c=i[l]||[];if(c.length||(l.split("|").forEach(m=>{let x=m.match(qxe),g=x?parseInt(x[1],10):0,b=Wxe.test(m);c.push([g,b,m])}),i[l]=c),!c.length)throw new Error(`i18n postprocess: unmatched placeholder - ${l}`);let u=r[r.length-1],d=0;for(let m=0;m<c.length;m++)if(c[m][0]===u){d=m;break}let[p,h,f]=c[d];return h?r.pop():u!==p&&r.push(p),c.splice(d,1),f})}return Object.keys(t).length&&(e=e.replace(zxe,(i,r,o,s,a,l)=>t.hasOwnProperty(o)?`${r}${t[o]}${l}`:i),e=e.replace(jxe,(i,r)=>t.hasOwnProperty(r)?t[r]:i),e=e.replace(Gxe,(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 zL(n,t,e,i,r){if(n=Ki(n),Array.isArray(n))for(let o=0;o<n.length;o++)zL(n[o],t,e,i,r);else{let o=Fi(),s=rt(),a=k0(n)?n:Ki(n.provide),l=F9(n),c=zo(),u=1048575&c.providerIndexes,d=c.directiveStart,p=c.providerIndexes>>20;if(k0(n)||!n.multi){let h=new qf(l,r,M),f=QN(a,t,r?u:u+p,d);-1===f?(Y1(Sx(c,s),o,a),XN(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(h),s.push(h)):(e[f]=h,s[f]=h)}else{let h=QN(a,t,u+p,d),f=QN(a,t,u,u+p),m=h>=0&&e[h],x=f>=0&&e[f];if(r&&!x||!r&&!m){Y1(Sx(c,s),o,a);let g=function(n,t,e,i,r){let o=new qf(n,e,M);return o.multi=[],o.index=t,o.componentProviders=0,PY(o,r,i&&!e),o}(r?Zxe:Kxe,e.length,r,i,l);!r&&x&&(e[f].providerFactory=g),XN(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(g),s.push(g)}else XN(o,n,h>-1?h:f,PY(e[r?f:h],l,!r&&i));!r&&i&&x&&e[f].componentProviders++}}}function XN(n,t,e,i){let r=k0(t),o=function(n){return!!n.useClass}(t);if(r||o){let l=(o?Ki(t.useClass):t).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function PY(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function QN(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function Kxe(n,t,e,i){return jL(this.multi,[])}function Zxe(n,t,e,i){let o,r=this.multi;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=Bx(e,e[1],this.providerFactory.index,i);o=a.slice(0,s),jL(r,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],jL(r,o);return o}function jL(n,t){for(let e=0;e<n.length;e++)t.push((0,n[e])());return t}function $t(n,t=[]){return e=>{e.providersResolver=(i,r)=>function(n,t,e){let i=Fi();if(i.firstCreatePass){let r=Ac(n);zL(e,i.data,i.blueprint,r,!0),zL(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}var Gp=class{},GL=class{},WL=class extends Gp{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Ax(this);let i=I0(t);this._bootstrapComponents=R1(i.bootstrap),this._r3Injector=oq(t,e,[{provide:Gp,useValue:this},{provide:gs,useValue:this.componentFactoryResolver}],To(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)}},qL=class extends GL{constructor(t){super(),this.moduleType=t}create(t){return new WL(this.moduleType,t)}},YL=class extends Gp{constructor(t,e,i){super(),this.componentFactoryResolver=new Ax(this),this.instance=null;let r=new Z1([...t,{provide:Gp,useValue:this},{provide:gs,useValue:this.componentFactoryResolver}],e||I3(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}},eCe=(()=>{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=R9(0,e.type),r=i.length>0?function(n,t,e=null){return new YL(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=ye({token:n,providedIn:"environment",factory:()=>new n(j(jp))}),n})();function Qp(n,t,e){let i=Ks()+n,r=rt();return r[i]===Qn?Du(r,i,e?t.call(e):t()):Yx(r,i)}function On(n,t,e,i){return RY(rt(),Ks(),n,t,e,i)}function Qr(n,t,e,i,r){return OY(rt(),Ks(),n,t,e,i,r)}function Zx(n,t,e,i,r,o){return kY(rt(),Ks(),n,t,e,i,r,o)}function K3(n,t,e,i,r,o,s){return FY(rt(),Ks(),n,t,e,i,r,o,s)}function Z3(n,t,e,i,r,o,s,a){let l=Ks()+n,c=rt(),u=Vl(c,l,e,i,r,o);return Ds(c,l+4,s)||u?Du(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):Yx(c,l+5)}function Jx(n,t){let e=n[t];return e===Qn?void 0:e}function RY(n,t,e,i,r,o){let s=t+e;return Ds(n,s,r)?Du(n,s+1,o?i.call(o,r):i(r)):Jx(n,s+1)}function OY(n,t,e,i,r,o,s){let a=t+e;return Kf(n,a,r,o)?Du(n,a+2,s?i.call(s,r,o):i(r,o)):Jx(n,a+2)}function kY(n,t,e,i,r,o,s,a){let l=t+e;return ST(n,l,r,o,s)?Du(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Jx(n,l+3)}function FY(n,t,e,i,r,o,s,a,l){let c=t+e;return Vl(n,c,r,o,s,a)?Du(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Jx(n,c+4)}function NY(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l<r.length;l++)Ds(n,s++,r[l])&&(a=!0);return a?Du(n,s,i.apply(o,r)):Jx(n,s)}function B(n,t){let i,e=Fi(),r=n+22;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=Wf(i.type)),s=kl(M);try{let a=q1(!1),l=o();return q1(a),function(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,rt(),r,l),l}finally{kl(s)}}function U(n,t,e){let i=n+22,r=rt(),o=H0(r,i);return $x(r,i)?RY(r,Ks(),t,o.transform,e,o):o.transform(e)}function Jf(n,t,e,i){let r=n+22,o=rt(),s=H0(o,r);return $x(o,r)?OY(o,Ks(),t,s.transform,e,i,s):s.transform(e,i)}function J3(n,t,e,i,r){let o=n+22,s=rt(),a=H0(s,o);return $x(s,o)?kY(s,Ks(),t,a.transform,e,i,r,a):a.transform(e,i,r)}function $x(n,t){return n[1].data[t].pure}function KN(n){return t=>{setTimeout(n,void 0,t)}}var G=class extends ke{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){let l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=KN(o),r&&(r=KN(r)),s&&(s=KN(s)));let a=super.subscribe({next:r,error:o,complete:s});return t instanceof Sn&&t.add(a),a}};function cCe(){return this._results[MT()]()}var Hl=class{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=MT(),i=Hl.prototype;i[e]||(i[e]=cCe)}get changes(){return this._changes||(this._changes=new G)}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=Fd(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()}},Vi=(()=>{class n{}return n.__NG_ELEMENT_ID__=pCe,n})(),uCe=Vi,dCe=class extends uCe{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){let i=this._declarationTContainer.tViews,r=bT(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];let s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),H3(i,r,t),new Qf(r)}};function pCe(){return RT(zo(),rt())}function RT(n,t){return 4&n.type?new dCe(t,n,G0(n,t)):null}var Oi=(()=>{class n{}return n.__NG_ELEMENT_ID__=hCe,n})();function hCe(){return BY(zo(),rt())}var fCe=Oi,LY=class extends fCe{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return G0(this._hostTNode,this._hostLView)}get injector(){return new jf(this._hostTNode,this._hostLView)}get parentInjector(){let t=C3(this._hostTNode,this._hostLView);if(e9(t)){let e=W1(t,this._hostLView),i=G1(t);return new jf(e[1].data[i+8],e)}return new jf(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=g7(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);let s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){let a,s=t&&!ux(t);if(s)a=e;else{let d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}let l=s?t:new eT(Nl(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){let p=(s?c:this.parentInjector).get(jp,null);p&&(o=p)}let u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){let i=t._lView,r=i[1];if(Vd(i[3])){let u=this.indexOf(t);if(-1!==u)this.detach(u);else{let d=i[3],p=new LY(d,d[6],d[3]);p.detach(p.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;!function(n,t,e,i){let r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i<o-10?(t[4]=e[r],u9(e,10+i,t)):(e.push(t),t[4]=null),t[3]=e;let s=t[17];null!==s&&e!==s&&function(n,t){let e=n[9];t[16]!==t[3][3][16]&&(n[2]=!0),null===e?n[9]=[t]:e.push(t)}(s,t);let a=t[19];null!==a&&a.insertView(n),t[2]|=64}(r,i,s,o);let a=PL(o,s),l=i[11],c=vT(l,s[7]);return null!==c&&function(n,t,e,i,r,o){i[0]=r,i[6]=t,qx(n,i,e,1,r,o)}(r,s[6],l,i,c,a),t.attachToViewContainerRef(),u9(ZN(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=g7(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=AL(this._lContainer,e);i&&(X1(ZN(this._lContainer),e),U9(i[1],i))}detach(t){let e=this._adjustIndex(t,-1),i=AL(this._lContainer,e);return i&&null!=X1(ZN(this._lContainer),e)?new Qf(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function g7(n){return n[8]}function ZN(n){return n[8]||(n[8]=[])}function BY(n,t){let e,i=t[n.index];if(Vd(i))e=i;else{let r;if(8&n.type)r=$a(i);else{let o=t[11];r=o.createComment("");let s=Ul(n,t);Yf(o,vT(o,s),r,function(n,t){return n.nextSibling(t)}(o,s),!1)}t[n.index]=e=vq(i,t,r,n),CT(t,e)}return new LY(e,n,t)}var Rx=class{constructor(t){this.queryList=t,this.matches=null}clone(){return new Rx(this.queryList)}setDirty(){this.queryList.setDirty()}},Ox=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 s=e.getByIndex(o);r.push(this.queries[s.indexInDeclarationView].clone())}return new Ox(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!==zY(t,e).matches&&this.queries[e].setDirty()}},rT=class{constructor(t,e,i=null){this.predicate=t,this.flags=e,this.read=i}},kx=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 kx(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)}},Fx=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 Fx(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,_Ce(e,o)),this.matchTNodeWithReadOption(t,e,I1(e,t,o,!1,!1))}else i===Vi?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,I1(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){let r=this.metadata.read;if(null!==r)if(r===Re||r===Oi||r===Vi&&4&e.type)this.addMatch(e.index,-2);else{let o=I1(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 _Ce(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 yCe(n,t,e,i){return-1===e?function(n,t){return 11&n.type?G0(n,t):4&n.type?RT(n,t):null}(t,n):-2===e?function(n,t,e){return e===Re?G0(t,n):e===Vi?RT(t,n):e===Oi?BY(t,n):void 0}(n,t,i):Bx(n,n[1],e,t)}function VY(n,t,e,i){let r=t[19].queries[i];if(null===r.matches){let o=n.data,s=e.matches,a=[];for(let l=0;l<s.length;l+=2){let c=s[l];a.push(c<0?null:yCe(t,o[c],s[l+1],e.metadata.read))}r.matches=a}return r.matches}function QL(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(null!==o){let s=VY(n,t,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],u=t[-l];for(let d=10;d<u.length;d++){let p=u[d];p[17]===p[3]&&QL(p[1],p,c,i)}if(null!==u[9]){let d=u[9];for(let p=0;p<d.length;p++){let h=d[p];QL(h[1],h,c,i)}}}}}return i}function Ne(n){let t=rt(),e=Fi(),i=q7();v3(i+1);let r=zY(e,i);if(n.dirty&&function(n){return 4==(4&n[2])}(t)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{let o=r.crossesNgTemplate?QL(e,t,i,[]):VY(e,t,r,i);n.reset(o,Bve),n.notifyOnChanges()}return!0}return!1}function ot(n,t,e){let i=Fi();i.firstCreatePass&&(UY(i,new rT(n,t,e),-1),2==(2&t)&&(i.staticViewQueries=!0)),HY(i,rt(),t)}function Ei(n,t,e,i){let r=Fi();if(r.firstCreatePass){let o=zo();UY(r,new rT(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)}HY(r,rt(),e)}function Le(){return n=rt(),t=q7(),n[19].queries[t].queryList;var n,t}function HY(n,t,e){let i=new Hl(4==(4&e));uq(n,t,i,i.destroy),null===t[19]&&(t[19]=new Ox),t[19].queries.push(new Rx(i))}function UY(n,t,e){null===n.queries&&(n.queries=new kx),n.queries.track(new Fx(t,e))}function zY(n,t){return n.queries.getByIndex(t)}function qt(n,t){return RT(n,t)}var Hp={"\u0275\u0275attribute":ze,"\u0275\u0275attributeInterpolate1":function Eq(n,t,e,i,r,o){let s=rt(),a=X0(s,t,e,i);return a!==Qn&&Tu(no(),s,n,a,r,o),Eq},"\u0275\u0275attributeInterpolate2":function Tq(n,t,e,i,r,o,s,a){let l=rt(),c=Q0(l,t,e,i,r,o);return c!==Qn&&Tu(no(),l,n,c,s,a),Tq},"\u0275\u0275attributeInterpolate3":function Dq(n,t,e,i,r,o,s,a,l,c){let u=rt(),d=K0(u,t,e,i,r,o,s,a);return d!==Qn&&Tu(no(),u,n,d,l,c),Dq},"\u0275\u0275attributeInterpolate4":function Aq(n,t,e,i,r,o,s,a,l,c,u,d){let p=rt(),h=Z0(p,t,e,i,r,o,s,a,l,c);return h!==Qn&&Tu(no(),p,n,h,u,d),Aq},"\u0275\u0275attributeInterpolate5":function Iq(n,t,e,i,r,o,s,a,l,c,u,d,p,h){let f=rt(),m=J0(f,t,e,i,r,o,s,a,l,c,u,d);return m!==Qn&&Tu(no(),f,n,m,p,h),Iq},"\u0275\u0275attributeInterpolate6":function Pq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m){let x=rt(),g=$0(x,t,e,i,r,o,s,a,l,c,u,d,p,h);return g!==Qn&&Tu(no(),x,n,g,f,m),Pq},"\u0275\u0275attributeInterpolate7":function Rq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g){let b=rt(),D=e_(b,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m);return D!==Qn&&Tu(no(),b,n,D,x,g),Rq},"\u0275\u0275attributeInterpolate8":function Oq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g,b,D){let T=rt(),k=t_(T,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g);return k!==Qn&&Tu(no(),T,n,k,b,D),Oq},"\u0275\u0275attributeInterpolateV":function kq(n,t,e,i){let r=rt(),o=Y0(r,t);return o!==Qn&&Tu(no(),r,n,o,e,i),kq},"\u0275\u0275defineComponent":R,"\u0275\u0275defineDirective":He,"\u0275\u0275defineInjectable":ye,"\u0275\u0275defineInjector":V,"\u0275\u0275defineNgModule":H,"\u0275\u0275definePipe":B0,"\u0275\u0275directiveInject":M,"\u0275\u0275getInheritedFactory":pi,"\u0275\u0275inject":j,"\u0275\u0275injectAttribute":vo,"\u0275\u0275invalidFactory":nl,"\u0275\u0275invalidFactoryDep":d9,"\u0275\u0275templateRefExtractor":qt,"\u0275\u0275resetView":se,"\u0275\u0275NgOnChangesFeature":Ft,"\u0275\u0275ProvidersFeature":$t,"\u0275\u0275CopyDefinitionFeature":function(n){let e,t=Sq(n.type);e=Ac(n)?t.\u0275cmp:t.\u0275dir;let i=n;for(let r of cbe)i[r]=e[r];if(Ac(e))for(let r of ube)i[r]=e[r]},"\u0275\u0275InheritDefinitionFeature":tt,"\u0275\u0275StandaloneFeature":function(n){n.getStandaloneInjector=t=>t.get(eCe).getOrCreateStandaloneInjector(n)},"\u0275\u0275nextContext":S,"\u0275\u0275namespaceHTML":Js,"\u0275\u0275namespaceMathML":function(){Zn.lFrame.currentNamespace="math"},"\u0275\u0275namespaceSVG":In,"\u0275\u0275enableBindings":function(){Zn.bindingsEnabled=!0},"\u0275\u0275disableBindings":function(){Zn.bindingsEnabled=!1},"\u0275\u0275elementStart":_,"\u0275\u0275elementEnd":v,"\u0275\u0275element":O,"\u0275\u0275elementContainerStart":sn,"\u0275\u0275elementContainerEnd":an,"\u0275\u0275elementContainer":Ni,"\u0275\u0275pureFunction0":Qp,"\u0275\u0275pureFunction1":On,"\u0275\u0275pureFunction2":Qr,"\u0275\u0275pureFunction3":Zx,"\u0275\u0275pureFunction4":K3,"\u0275\u0275pureFunction5":Z3,"\u0275\u0275pureFunction6":function(n,t,e,i,r,o,s,a,l){let c=Ks()+n,u=rt(),d=Vl(u,c,e,i,r,o);return Kf(u,c+4,s,a)||d?Du(u,c+6,l?t.call(l,e,i,r,o,s,a):t(e,i,r,o,s,a)):Yx(u,c+6)},"\u0275\u0275pureFunction7":function(n,t,e,i,r,o,s,a,l,c){let u=Ks()+n,d=rt(),p=Vl(d,u,e,i,r,o);return ST(d,u+4,s,a,l)||p?Du(d,u+7,c?t.call(c,e,i,r,o,s,a,l):t(e,i,r,o,s,a,l)):Yx(d,u+7)},"\u0275\u0275pureFunction8":function(n,t,e,i,r,o,s,a,l,c,u){let d=Ks()+n,p=rt(),h=Vl(p,d,e,i,r,o);return Vl(p,d+4,s,a,l,c)||h?Du(p,d+8,u?t.call(u,e,i,r,o,s,a,l,c):t(e,i,r,o,s,a,l,c)):Yx(p,d+8)},"\u0275\u0275pureFunctionV":function(n,t,e,i){return NY(rt(),Ks(),n,t,e,i)},"\u0275\u0275getCurrentView":Pe,"\u0275\u0275restoreView":oe,"\u0275\u0275listener":P,"\u0275\u0275projection":Vn,"\u0275\u0275syntheticHostProperty":r_,"\u0275\u0275syntheticHostListener":i_,"\u0275\u0275pipeBind1":U,"\u0275\u0275pipeBind2":Jf,"\u0275\u0275pipeBind3":J3,"\u0275\u0275pipeBind4":function(n,t,e,i,r,o){let s=n+22,a=rt(),l=H0(a,s);return $x(a,s)?FY(a,Ks(),t,l.transform,e,i,r,o,l):l.transform(e,i,r,o)},"\u0275\u0275pipeBindV":function(n,t,e){let i=n+22,r=rt(),o=H0(r,i);return $x(r,i)?NY(r,Ks(),t,o.transform,e,o):o.transform.apply(o,e)},"\u0275\u0275projectionDef":xi,"\u0275\u0275hostProperty":_s,"\u0275\u0275property":y,"\u0275\u0275propertyInterpolate":Zi,"\u0275\u0275propertyInterpolate1":Xx,"\u0275\u0275propertyInterpolate2":ET,"\u0275\u0275propertyInterpolate3":function Nq(n,t,e,i,r,o,s,a,l){let c=rt(),u=K0(c,t,e,i,r,o,s,a);return u!==Qn&&il(Fi(),no(),c,n,u,c[11],l,!1),Nq},"\u0275\u0275propertyInterpolate4":function Lq(n,t,e,i,r,o,s,a,l,c,u){let d=rt(),p=Z0(d,t,e,i,r,o,s,a,l,c);return p!==Qn&&il(Fi(),no(),d,n,p,d[11],u,!1),Lq},"\u0275\u0275propertyInterpolate5":function Bq(n,t,e,i,r,o,s,a,l,c,u,d,p){let h=rt(),f=J0(h,t,e,i,r,o,s,a,l,c,u,d);return f!==Qn&&il(Fi(),no(),h,n,f,h[11],p,!1),Bq},"\u0275\u0275propertyInterpolate6":function Vq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f){let m=rt(),x=$0(m,t,e,i,r,o,s,a,l,c,u,d,p,h);return x!==Qn&&il(Fi(),no(),m,n,x,m[11],f,!1),Vq},"\u0275\u0275propertyInterpolate7":function Hq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x){let g=rt(),b=e_(g,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m);return b!==Qn&&il(Fi(),no(),g,n,b,g[11],x,!1),Hq},"\u0275\u0275propertyInterpolate8":function Uq(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g,b){let D=rt(),T=t_(D,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g);return T!==Qn&&il(Fi(),no(),D,n,T,D[11],b,!1),Uq},"\u0275\u0275propertyInterpolateV":function zq(n,t,e){let i=rt(),r=Y0(i,t);return r!==Qn&&il(Fi(),no(),i,n,r,i[11],e,!1),zq},"\u0275\u0275pipe":B,"\u0275\u0275queryRefresh":Ne,"\u0275\u0275viewQuery":ot,"\u0275\u0275loadQuery":Le,"\u0275\u0275contentQuery":Ei,"\u0275\u0275reference":$e,"\u0275\u0275classMap":Da,"\u0275\u0275classMapInterpolate1":Qx,"\u0275\u0275classMapInterpolate2":function(n,t,e,i,r){Oc(el,Au,Q0(rt(),n,t,e,i,r),!0)},"\u0275\u0275classMapInterpolate3":function(n,t,e,i,r,o,s){Oc(el,Au,K0(rt(),n,t,e,i,r,o,s),!0)},"\u0275\u0275classMapInterpolate4":function(n,t,e,i,r,o,s,a,l){Oc(el,Au,Z0(rt(),n,t,e,i,r,o,s,a,l),!0)},"\u0275\u0275classMapInterpolate5":function(n,t,e,i,r,o,s,a,l,c,u){Oc(el,Au,J0(rt(),n,t,e,i,r,o,s,a,l,c,u),!0)},"\u0275\u0275classMapInterpolate6":function(n,t,e,i,r,o,s,a,l,c,u,d,p){Oc(el,Au,$0(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p),!0)},"\u0275\u0275classMapInterpolate7":function(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f){Oc(el,Au,e_(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p,h,f),!0)},"\u0275\u0275classMapInterpolate8":function(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x){Oc(el,Au,t_(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x),!0)},"\u0275\u0275classMapInterpolateV":function(n){Oc(el,Au,Y0(rt(),n),!0)},"\u0275\u0275styleMap":jl,"\u0275\u0275styleMapInterpolate1":function(n,t,e){jl(X0(rt(),n,t,e))},"\u0275\u0275styleMapInterpolate2":function(n,t,e,i,r){jl(Q0(rt(),n,t,e,i,r))},"\u0275\u0275styleMapInterpolate3":function(n,t,e,i,r,o,s){jl(K0(rt(),n,t,e,i,r,o,s))},"\u0275\u0275styleMapInterpolate4":function(n,t,e,i,r,o,s,a,l){jl(Z0(rt(),n,t,e,i,r,o,s,a,l))},"\u0275\u0275styleMapInterpolate5":function(n,t,e,i,r,o,s,a,l,c,u){jl(J0(rt(),n,t,e,i,r,o,s,a,l,c,u))},"\u0275\u0275styleMapInterpolate6":function(n,t,e,i,r,o,s,a,l,c,u,d,p){jl($0(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p))},"\u0275\u0275styleMapInterpolate7":function(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f){jl(e_(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p,h,f))},"\u0275\u0275styleMapInterpolate8":function(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x){jl(t_(rt(),n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x))},"\u0275\u0275styleMapInterpolateV":function(n){jl(Y0(rt(),n))},"\u0275\u0275styleProp":Pt,"\u0275\u0275stylePropInterpolate1":function rY(n,t,e,i,r){return Rc(n,X0(rt(),t,e,i),r,!1),rY},"\u0275\u0275stylePropInterpolate2":function oY(n,t,e,i,r,o,s){return Rc(n,Q0(rt(),t,e,i,r,o),s,!1),oY},"\u0275\u0275stylePropInterpolate3":function sY(n,t,e,i,r,o,s,a,l){return Rc(n,K0(rt(),t,e,i,r,o,s,a),l,!1),sY},"\u0275\u0275stylePropInterpolate4":function aY(n,t,e,i,r,o,s,a,l,c,u){return Rc(n,Z0(rt(),t,e,i,r,o,s,a,l,c),u,!1),aY},"\u0275\u0275stylePropInterpolate5":function lY(n,t,e,i,r,o,s,a,l,c,u,d,p){return Rc(n,J0(rt(),t,e,i,r,o,s,a,l,c,u,d),p,!1),lY},"\u0275\u0275stylePropInterpolate6":function cY(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f){return Rc(n,$0(rt(),t,e,i,r,o,s,a,l,c,u,d,p,h),f,!1),cY},"\u0275\u0275stylePropInterpolate7":function uY(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x){return Rc(n,e_(rt(),t,e,i,r,o,s,a,l,c,u,d,p,h,f,m),x,!1),uY},"\u0275\u0275stylePropInterpolate8":function dY(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g,b){return Rc(n,t_(rt(),t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x,g),b,!1),dY},"\u0275\u0275stylePropInterpolateV":function pY(n,t,e){return Rc(n,Y0(rt(),t),e,!1),pY},"\u0275\u0275classProp":et,"\u0275\u0275advance":C,"\u0275\u0275template":E,"\u0275\u0275text":A,"\u0275\u0275textInterpolate":yt,"\u0275\u0275textInterpolate1":je,"\u0275\u0275textInterpolate2":Xp,"\u0275\u0275textInterpolate3":TT,"\u0275\u0275textInterpolate4":function Jq(n,t,e,i,r,o,s,a,l){let c=rt(),u=Z0(c,n,t,e,i,r,o,s,a,l);return u!==Qn&&jd(c,Zs(),u),Jq},"\u0275\u0275textInterpolate5":function $q(n,t,e,i,r,o,s,a,l,c,u){let d=rt(),p=J0(d,n,t,e,i,r,o,s,a,l,c,u);return p!==Qn&&jd(d,Zs(),p),$q},"\u0275\u0275textInterpolate6":function eY(n,t,e,i,r,o,s,a,l,c,u,d,p){let h=rt(),f=$0(h,n,t,e,i,r,o,s,a,l,c,u,d,p);return f!==Qn&&jd(h,Zs(),f),eY},"\u0275\u0275textInterpolate7":function tY(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f){let m=rt(),x=e_(m,n,t,e,i,r,o,s,a,l,c,u,d,p,h,f);return x!==Qn&&jd(m,Zs(),x),tY},"\u0275\u0275textInterpolate8":function nY(n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x){let g=rt(),b=t_(g,n,t,e,i,r,o,s,a,l,c,u,d,p,h,f,m,x);return b!==Qn&&jd(g,Zs(),b),nY},"\u0275\u0275textInterpolateV":function iY(n){let t=rt(),e=Y0(t,n);return e!==Qn&&jd(t,Zs(),e),iY},"\u0275\u0275i18n":AT,"\u0275\u0275i18nAttributes":function(n,t){let e=Fi();!function(n,t,e){let r=zo().index,o=[];if(n.firstCreatePass&&null===n.data[t]){for(let s=0;s<e.length;s+=2){let a=e[s],l=e[s+1];if(""!==l){if(Cxe.test(l))throw new Error(`ICU expressions are not supported in attributes. Message: "${l}".`);bx(o,l,r,a,Pxe(o),null)}}n.data[t]=o}}(e,n+22,Up(e.consts,t))},"\u0275\u0275i18nExp":Kx,"\u0275\u0275i18nStart":AY,"\u0275\u0275i18nEnd":IY,"\u0275\u0275i18nApply":IT,"\u0275\u0275i18nPostprocess":PT,"\u0275\u0275resolveWindow":Wx,"\u0275\u0275resolveDocument":_T,"\u0275\u0275resolveBody":function(n){return n.ownerDocument.body},"\u0275\u0275setComponentScope":Nx,"\u0275\u0275setNgModuleScope":function(n,t){return Zf(()=>{let e=I0(n,!0);e.declarations=t.declarations||Qi,e.imports=t.imports||Qi,e.exports=t.exports||Qi})},"\u0275\u0275registerNgModuleType":m9,"\u0275\u0275sanitizeHtml":A3,"\u0275\u0275sanitizeStyle":function(n){let t=Gx();return t?t.sanitize(mo.STYLE,n)||"":Pc(n,"Style")?Ta(n):Kn(n)},"\u0275\u0275sanitizeResourceUrl":A9,"\u0275\u0275sanitizeScript":function(n){let t=Gx();if(t)return qW(t.sanitize(mo.SCRIPT,n)||"");if(Pc(n,"Script"))return qW(Ta(n));throw new At(905,!1)},"\u0275\u0275sanitizeUrl":zl,"\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)?A9:zl}(t,e)(n)},"\u0275\u0275trustConstantHtml":function(n){return O0(n[0])},"\u0275\u0275trustConstantResourceUrl":function(n){return function(n){return v9()?.createScriptURL(n)||n}(n[0])},forwardRef:Jn,resolveForwardRef:Ki};function jY(n){return!!I0(n)}var F1=[],JN=!1;function GY(n){return Array.isArray(n)?n.every(GY):!!Ki(n)}function ICe(n,t){let e=Fd(t.declarations||Qi),i=L0(n);e.forEach(r=>{(r=Ki(r)).hasOwnProperty(cT)?WY(Nl(r),i):!r.hasOwnProperty(l3)&&!r.hasOwnProperty(c3)&&(r.ngSelectorScope=n)})}function WY(n,t){n.directiveDefs=()=>Array.from(t.compilation.directives).map(e=>e.hasOwnProperty(cT)?Nl(e):Gf(e)).filter(e=>!!e),n.pipeDefs=()=>Array.from(t.compilation.pipes).map(e=>Ld(e)),n.schemas=t.schemas,n.tView=null}function L0(n){if(jY(n))return function(n){let t=I0(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 R1(t.imports).forEach(i=>{let r=L0(i);r.exported.directives.forEach(o=>e.compilation.directives.add(o)),r.exported.pipes.forEach(o=>e.compilation.pipes.add(o))}),R1(t.declarations).forEach(i=>{Ld(i)?e.compilation.pipes.add(i):e.compilation.directives.add(i)}),R1(t.exports).forEach(i=>{let r=i;if(jY(r)){let o=L0(r);o.exported.directives.forEach(s=>{e.compilation.directives.add(s),e.exported.directives.add(s)}),o.exported.pipes.forEach(s=>{e.compilation.pipes.add(s),e.exported.pipes.add(s)})}else Ld(r)?e.exported.pipes.add(r):e.exported.directives.add(r)}),t.transitiveCompileScopes=e,e}(n);if(R7(n)){if(null!==(Nl(n)||Gf(n)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([n]),pipes:new Set}};if(null!==Ld(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 _7(n){return function(n){return void 0!==n.ngModule}(n)?n.ngModule:n}var $N=0;function qY(n,t){let e=null;XY(n,t||{}),Object.defineProperty(n,l3,{get:()=>{if(null===e){let i=YY(n,t||{});e=Ll().compileDirective(Hp,i.sourceMapUrl,i.metadata)}return e},configurable:!1})}function YY(n,t){let e=n&&n.name,i=`ng:///${e}/\u0275dir.js`,r=Ll(),o=QY(n,t);return o.typeSourceSpan=r.createParseSourceSpan("Directive",e,i),o.usesInheritance&&KY(n),{metadata:o,sourceMapUrl:i}}function XY(n,t){let e=null;Object.defineProperty(n,Nd,{get:()=>{if(null===e){let i=YY(n,t),r=Ll();e=r.compileFactory(Hp,`ng:///${n.name}/\u0275fac.js`,{name:i.metadata.name,type:i.metadata.type,typeArgumentCount:0,deps:fT(n),target:r.FactoryTarget.Directive})}return e},configurable:!1})}function FCe(n){return Object.getPrototypeOf(n.prototype)===Object.prototype}function QY(n,t){let e=S3(),i=e.ownPropMetadata(n);return{name:n.name,type:n,selector:void 0!==t.selector?t.selector:null,host:t.host||A0,propMetadata:i,inputs:t.inputs||Qi,outputs:t.outputs||Qi,queries:v7(n,i,ZY),lifecycle:{usesOnChanges:e.hasLifecycleHook(n,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!FCe(n),exportAs:BCe(t.exportAs),providers:t.providers||null,viewQueries:v7(n,i,JY),isStandalone:!!t.standalone}}function KY(n){let t=Object.prototype,e=Object.getPrototypeOf(n.prototype).constructor;for(;e&&e!==t;)!Gf(e)&&!Nl(e)&&HCe(e)&&qY(e,null),e=Object.getPrototypeOf(e)}function NCe(n){return"string"==typeof n?eX(n):Ki(n)}function LCe(n,t){return{propertyName:n,predicate:NCe(t.selector),descendants:t.descendants,first:t.first,read:t.read?t.read:null,static:!!t.static,emitDistinctChangesOnly:!!t.emitDistinctChangesOnly}}function v7(n,t,e){let i=[];for(let r in t)if(t.hasOwnProperty(r)){let o=t[r];o.forEach(s=>{if(e(s)){if(!s.selector)throw new Error(`Can't construct a query for the property "${r}" of "${o3(n)}" since the query selector wasn't defined.`);if(o.some($Y))throw new Error("Cannot combine @Input decorators with query decorators");i.push(LCe(r,s))}})}return i}function BCe(n){return void 0===n?null:eX(n)}function ZY(n){let t=n.ngMetadataName;return"ContentChild"===t||"ContentChildren"===t}function JY(n){let t=n.ngMetadataName;return"ViewChild"===t||"ViewChildren"===t}function $Y(n){return"Input"===n.ngMetadataName}function eX(n){return n.split(",").map(t=>t.trim())}var VCe=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function HCe(n){let t=S3();if(VCe.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 s=r[o],a=s.ngMetadataName;if($Y(s)||ZY(s)||JY(s)||"Output"===a||"HostBinding"===a||"HostListener"===a)return!0}}return!1}function y7(n,t){return{type:n,name:n.name,pipeName:t.name,pure:void 0===t.pure||t.pure,isStandalone:!!t.standalone}}var zCe=Vx("Directive",(n={})=>n,void 0,void 0,(n,t)=>qY(n,t));function oT(...n){}Vx("Component",(n={})=>({changeDetection:px.Default,...n}),zCe,void 0,(n,t)=>function(n,t){let e=null;(function(n,t){f9(t)&&(Dx.set(n,t),h9.add(n))})(n,t),XY(n,t),Object.defineProperty(n,cT,{get:()=>{if(null===e){let i=Ll();if(f9(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 r=null,o=t.preserveWhitespaces;void 0===o&&(o=null!==r&&void 0!==r.preserveWhitespaces&&r.preserveWhitespaces);let s=t.encapsulation;void 0===s&&(s=null!==r&&void 0!==r.defaultEncapsulation?r.defaultEncapsulation:Ja.Emulated);let a=t.templateUrl||`ng:///${n.name}/template.html`,l={...QY(n,t),typeSourceSpan:i.createParseSourceSpan("Component",n.name,a),template:t.template||"",preserveWhitespaces:o,styles:t.styles||Qi,animations:t.animations,declarations:[],changeDetection:t.changeDetection,encapsulation:s,interpolation:t.interpolation,viewProviders:t.viewProviders||null,isStandalone:!!t.standalone};$N++;try{if(l.usesInheritance&&KY(n),e=i.compileComponent(Hp,a,l),t.standalone){let c=Fd(t.imports||Qi),{directiveDefs:u,pipeDefs:d}=function(n,t){let e=null,i=null;return{directiveDefs:()=>{if(null===e){e=[Nl(n)];let s=new Set;for(let a of t){let l=Ki(a);if(!s.has(l))if(s.add(l),I0(l)){let c=L0(l);for(let u of c.exported.directives){let d=Nl(u)||Gf(u);d&&!s.has(u)&&(s.add(u),e.push(d))}}else{let c=Nl(l)||Gf(l);c&&e.push(c)}}}return e},pipeDefs:()=>{if(null===i){i=[];let s=new Set;for(let a of t){let l=Ki(a);if(!s.has(l))if(s.add(l),I0(l)){let c=L0(l);for(let u of c.exported.pipes){let d=Ld(u);d&&!s.has(u)&&(s.add(u),i.push(d))}}else{let c=Ld(l);c&&i.push(c)}}}return i}}}(n,c);e.directiveDefs=u,e.pipeDefs=d,e.dependencies=()=>c.map(Ki)}}finally{$N--}if(0===$N&&function(){if(!JN){JN=!0;try{for(let n=F1.length-1;n>=0;n--){let{moduleType:t,ngModule:e}=F1[n];e.declarations&&e.declarations.every(GY)&&(F1.splice(n,1),ICe(t,e))}}finally{JN=!1}}}(),function(n){return void 0!==n.ngSelectorScope}(n)){let c=L0(n.ngSelectorScope);WY(e,c)}if(t.schemas){if(!t.standalone)throw new Error(`The 'schemas' was specified for the ${o3(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)),Vx("Pipe",n=>({pure:!0,...n}),void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;Object.defineProperty(n,Nd,{get:()=>{if(null===i){let r=y7(n,t),o=Ll();i=o.compileFactory(Hp,`ng:///${r.name}/\u0275fac.js`,{name:r.name,type:r.type,typeArgumentCount:0,deps:fT(n),target:o.FactoryTarget.Pipe})}return i},configurable:!1}),Object.defineProperty(n,c3,{get:()=>{if(null===e){let r=y7(n,t);e=Ll().compilePipe(Hp,`ng:///${r.name}/\u0275pipe.js`,r)}return e},configurable:!1})}(n,t)),Yp("Input",n=>({bindingPropertyName:n})),Yp("Output",n=>({bindingPropertyName:n})),Yp("HostBinding",n=>({hostPropertyName:n})),Yp("HostListener",(n,t)=>({eventName:n,args:t})),Vx("NgModule",n=>n,void 0,void 0,(n,t)=>function(n,t={}){(function(n,t,e=!1){let i=Fd(t.declarations||Qi),r=null;Object.defineProperty(n,I7,{configurable:!0,get:()=>(null===r&&(r=Ll().compileNgModule(Hp,`ng:///${n.name}/\u0275mod.js`,{type:n,bootstrap:Fd(t.bootstrap||Qi).map(Ki),declarations:i.map(Ki),imports:Fd(t.imports||Qi).map(Ki).map(_7),exports:Fd(t.exports||Qi).map(Ki).map(_7),schemas:t.schemas?Fd(t.schemas):null,id:t.id||null}),r.schemas||(r.schemas=[])),r)});let o=null;Object.defineProperty(n,Nd,{get:()=>{if(null===o){let a=Ll();o=a.compileFactory(Hp,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,deps:fT(n),target:a.FactoryTarget.NgModule,typeArgumentCount:0})}return o},configurable:!1});let s=null;Object.defineProperty(n,nL,{get:()=>{if(null===s){let a={name:n.name,type:n,providers:t.providers||Qi,imports:[(t.imports||Qi).map(Ki),(t.exports||Qi).map(Ki)]};s=Ll().compileInjector(Hp,`ng:///${n.name}/\u0275inj.js`,a)}return s},configurable:!1})})(n,t),void 0!==t.id&&m9(n,t.id),function(n,t){F1.push({moduleType:n,ngModule:t})}(n,t)}(n,t));var $3=new pe("Application Initializer"),OT=(()=>{class n{constructor(e){this.appInits=e,this.resolve=oT,this.reject=oT,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(n_(o))e.push(o);else if(Q3(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}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)(j($3,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$f=new pe("AppId",{providedIn:"root",factory:function(){return`${eL()}${eL()}${eL()}`}});function eL(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var eB=new pe("Platform Initializer"),Gd=new pe("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),GCe=new pe("appBootstrapListener"),Pi=(new pe("Application Packages Root URL"),new pe("AnimationModuleType")),Wd=new pe("LocaleId",{providedIn:"root",factory:()=>jo(Wd,di.Optional|di.SkipSelf)||typeof $localize<"u"&&$localize.locale||nT}),XCe=(new pe("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"}),new pe("Translations"),new pe("TranslationsFormat"),new pe("compilerOptions"),Promise.resolve(0));function KL(n){typeof Zone>"u"?XCe.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}var _t=class{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new G(!1),this.onMicrotaskEmpty=new G(!1),this.onStable=new G(!1),this.onError=new G(!1),typeof Zone>"u")throw new At(908,!1);Zone.assertZonePatched();let r=this;if(r._nesting=0,r._outer=r._inner=Zone.current,Zone.AsyncStackTaggingZoneSpec){let o=Zone.AsyncStackTaggingZoneSpec;r._inner=r._inner.fork(new o("Angular"))}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=to.requestAnimationFrame,t=to.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(to,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,ZL(n),n.isCheckStableRunning=!0,tB(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),ZL(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return b7(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),x7(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return b7(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),x7(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,ZL(n),tB(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(!_t.isInAngularZone())throw new At(909,!1)}static assertNotInAngularZone(){if(_t.isInAngularZone())throw new At(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,KCe,oT,oT);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},KCe={};function tB(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 ZL(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function b7(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function x7(n){n._nesting--,tB(n)}var iB,nB=new pe(""),eC=new pe(""),kT=(()=>{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,iB||(function(n){iB=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:()=>{_t.assertNotInAngularZone(),KL(()=>{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())KL(()=>{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(s=>s.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)(j(_t),j(FT),j(eC))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),FT=(()=>{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 iB?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),xx=null,tX=new pe("AllowMultipleToken"),nX=new pe("PlatformDestroyListeners");function rB(n,t,e=[]){let i=`Platform: ${t}`,r=new pe(i);return(o=[])=>{let s=iX();if(!s||s.injector.get(tX,!1)){let a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function(n){if(xx&&!xx.get(tX,!1))throw new At(400,!1);xx=n;let t=n.get(rX);(function(n){let t=n.get(eB,null);t&&t.forEach(e=>e())})(n)}(function(n=[],t){return Xn.create({name:t,providers:[{provide:gT,useValue:"platform"},{provide:nX,useValue:new Set([()=>xx=null])},...n]})}(a,i))}return function(n){let t=iX();if(!t)throw new At(401,!1);return t}()}}function iX(){return xx?.get(rX)??null}var rX=(()=>{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 G,this.onMicrotaskEmpty=new G,this.onStable=new G,this.onError=new G}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 _t(t),e}(i?.ngZone,function(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:_t,useValue:r}];return r.run(()=>{let s=Xn.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Qs,null);if(!l)throw new At(402,!1);return r.runOutsideAngular(()=>{let c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{N1(this._modules,a),c.unsubscribe()})}),function(n,t,e){try{let i=e();return n_(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=a.injector.get(OT);return c.runInitializers(),c.donePromise.then(()=>(function(n){(function(n,t){null==n&&T7("Expected localeId to be defined",n,null,"!=")})(n),"string"==typeof n&&(gY=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Wd,nT)||nT),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){let r=oX({},i);return function(n,t,e){let i=new qL(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){let i=e.injector.get(Iu);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new At(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 At(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let e=this._injector.get(nX,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)(j(Xn))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function oX(n,t){return Array.isArray(t)?t.reduce(oX,n):{...n,...t}}var Iu=(()=>{class n{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 un(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new un(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{_t.assertNotInAngularZone(),KL(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});let c=this._zone.onUnstable.subscribe(()=>{_t.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Jt(o,s.pipe(Ts()))}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(e,i){let s,r=e instanceof J1;if(!this._injector.get(OT).done)throw!r&&R7(e),new At(405,false);s=r?e:this._injector.get(gs).resolveComponentFactory(e),this.componentTypes.push(s.componentType);let a=function(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Gp),c=s.create(Xn.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(nB,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),N1(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new At(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;N1(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(GCe,[]).concat(this._bootstrapListeners).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),()=>N1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new At(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)(j(_t),j(jp),j(Qs))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function N1(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var sX=!0,aX=!1;function tC(){return aX=!0,sX}var nn=(()=>{class n{}return n.__NG_ELEMENT_ID__=uMe,n})();function uMe(n){return function(n,t,e){if(h3(n)&&!e){let i=qp(n.index,t);return new Qf(i,i)}return 47&n.type?new Qf(t[16],t):null}(zo(),rt(),16==(16&n))}var sT=class{constructor(){}supports(t){return wT(t)}create(t){return new $L(t)}},pMe=(n,t)=>t,$L=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||pMe}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 s=!i||e&&e.currentIndex<M7(i,r,o)?e:i,a=M7(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)r++;else{o||(o=[]);let c=a-r,u=l-r;if(c!=u){for(let p=0;p<c;p++){let h=p<o.length?o[p]:o[p]=0,f=h+p;u<=f&&f<c&&(o[p]=h+1)}o[s.previousIndex]=u-c}}a!==l&&t(s,a,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=[]),!wT(t))throw new At(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let r,o,s,e=this._itHead,i=!1;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,o,s,a)),Object.is(e.item,o)||this._addIdentityChange(e,o)):(e=this._mismatch(e,o,s,a),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[MT()]();for(;!(i=e.next()).done;)t(i.value)}}(t,a=>{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,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 e3(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 aT),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 aT),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}},e3=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}},aT=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 M7(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 lT=class{constructor(){}supports(t){return t instanceof Map||Y3(t)}create(){return new n3}},n3=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||Y3(t)))throw new At(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,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}let i=new i3(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))}},i3=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 w7(){return new kc([new sT])}var kc=(()=>{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||w7()),deps:[[n,new tl,new ns]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new At(901,!1)}}return n.\u0275prov=ye({token:n,providedIn:"root",factory:w7}),n})();function S7(){return new nC([new lT])}var nC=(()=>{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||S7()),deps:[[n,new tl,new ns]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(i)return i;throw new At(901,!1)}}return n.\u0275prov=ye({token:n,providedIn:"root",factory:S7}),n})(),hMe=[new lT],fMe=[new sT],cX=(new kc(fMe),new nC(hMe),rB(null,"core",[])),uX=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(j(Iu))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})();function NT(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}var Wl=(()=>{return(n=Wl||(Wl={}))[n.RAW_TEXT=0]="RAW_TEXT",n[n.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",n[n.PARSABLE_DATA=2]="PARSABLE_DATA",Wl;var n})();function Kd(n){if(":"!=n[0])return[null,n];let t=n.indexOf(":",1);if(-1===t)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[n.slice(1,t),n.slice(t+1)]}function CB(n){return"ng-container"===Kd(n)[1]}function MB(n){return"ng-content"===Kd(n)[1]}function dX(n){return null===n?null:Kd(n)[0]}function wB(n,t){return n?`:${n}:${t}`:t}var pX,LT,ei=class{constructor({closedByChildren:t,implicitNamespacePrefix:e,contentType:i=Wl.PARSABLE_DATA,closedByParent:r=!1,isVoid:o=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,t&&t.length>0&&t.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=o,this.closedByParent=r||o,this.implicitNamespacePrefix=e||null,this.contentType=i,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return"object"==typeof this.contentType?(void 0===t?void 0:this.contentType[t])??this.contentType.default:this.contentType}};function FV(n){return LT||(pX=new ei,LT={base:new ei({isVoid:!0}),meta:new ei({isVoid:!0}),area:new ei({isVoid:!0}),embed:new ei({isVoid:!0}),link:new ei({isVoid:!0}),img:new ei({isVoid:!0}),input:new ei({isVoid:!0}),param:new ei({isVoid:!0}),hr:new ei({isVoid:!0}),br:new ei({isVoid:!0}),source:new ei({isVoid:!0}),track:new ei({isVoid:!0}),wbr:new ei({isVoid:!0}),p:new ei({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new ei({closedByChildren:["tbody","tfoot"]}),tbody:new ei({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new ei({closedByChildren:["tbody"],closedByParent:!0}),tr:new ei({closedByChildren:["tr"],closedByParent:!0}),td:new ei({closedByChildren:["td","th"],closedByParent:!0}),th:new ei({closedByChildren:["td","th"],closedByParent:!0}),col:new ei({isVoid:!0}),svg:new ei({implicitNamespacePrefix:"svg"}),foreignObject:new ei({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new ei({implicitNamespacePrefix:"math"}),li:new ei({closedByChildren:["li"],closedByParent:!0}),dt:new ei({closedByChildren:["dt","dd"]}),dd:new ei({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new ei({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new ei({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new ei({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new ei({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new ei({closedByChildren:["optgroup"],closedByParent:!0}),option:new ei({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new ei({ignoreFirstLf:!0}),listing:new ei({ignoreFirstLf:!0}),style:new ei({contentType:Wl.RAW_TEXT}),script:new ei({contentType:Wl.RAW_TEXT}),title:new ei({contentType:{default:Wl.ESCAPABLE_RAW_TEXT,svg:Wl.PARSABLE_DATA}}),textarea:new ei({contentType:Wl.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),LT[n]??LT[n.toLowerCase()]??pX}var hX=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),Zd=class{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(t){let o,e=[],i=(l,c)=>{c.notSelectors.length>0&&!c.element&&0==c.classNames.length&&0==c.attrs.length&&(c.element="*"),l.push(c)},r=new Zd,s=r,a=!1;for(hX.lastIndex=0;o=hX.exec(t);){if(o[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,s=new Zd,r.notSelectors.push(s)}let l=o[2];if(l){let u=o[3];"#"===u?s.addAttribute("id",l.slice(1)):"."===u?s.addClassName(l.slice(1)):s.setElement(l)}let c=o[4];if(c&&s.addAttribute(s.unescapeAttribute(c),o[6]),o[7]&&(a=!1,s=r),o[8]){if(a)throw new Error("Multiple selectors in :not are not supported");i(e,r),r=s=new Zd}}return i(e,r),e}unescapeAttribute(t){let e="",i=!1;for(let r=0;r<t.length;r++){let o=t.charAt(r);if("\\"!==o){if("$"===o&&!i)throw new Error(`Error in attribute selector "${t}". Unescaped "$" is not supported. Please escape with "\\$".`);i=!1,e+=o}else i=!0}return e}escapeAttribute(t){return t.replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(t=null){this.element=t}getMatchingElementTemplate(){let t=this.element||"div",e=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"",i="";for(let r=0;r<this.attrs.length;r+=2)i+=` ${this.attrs[r]}${""!==this.attrs[r+1]?`="${this.attrs[r+1]}"`:""}`;return FV(t).isVoid?`<${t}${e}${i}/>`:`<${t}${e}${i}></${t}>`}getAttrs(){let t=[];return this.classNames.length>0&&t.push("class",this.classNames.join(" ")),t.concat(this.attrs)}addAttribute(t,e=""){this.attrs.push(t,e&&e.toLowerCase()||"")}addClassName(t){this.classNames.push(t.toLowerCase())}toString(){let t=this.element||"";if(this.classNames&&this.classNames.forEach(e=>t+=`.${e}`),this.attrs)for(let e=0;e<this.attrs.length;e+=2){let i=this.escapeAttribute(this.attrs[e]),r=this.attrs[e+1];t+=`[${i}${r?"="+r:""}]`}return this.notSelectors.forEach(e=>t+=`:not(${e})`),t}},qd=(()=>{return(n=qd||(qd={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",qd;var n})(),cC=(()=>{return(n=cC||(cC={}))[n.OnPush=0]="OnPush",n[n.Default=1]="Default",cC;var n})(),io=(()=>{return(n=io||(io={}))[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",io;var n})();function vMe(n){let t=function(n){let t=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&"*"!==n.element?n.element:"",...n.attrs,...t]}(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(i=>function(n){let t=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...t]:n.attrs.length?[3,...n.attrs,...t]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}(i)):[];return t.concat(...e)}function NV(n){return n?Zd.parse(n).map(vMe):[]}var yMe=/-+([a-z0-9])/g;function OQ(n,t,e){let i=n.indexOf(t);return-1==i?e:[n.slice(0,i).trim(),n.slice(i+1).trim()]}function QT(n){throw new Error(`Internal Error: ${n}`)}function LV(n){let t=[];for(let e=0;e<n.length;e++){let i=n.charCodeAt(e);if(i>=55296&&i<=56319&&n.length>e+1){let r=n.charCodeAt(e+1);r>=56320&&r<=57343&&(e++,i=(i-55296<<10)+r-56320+65536)}i<=127?t.push(i):i<=2047?t.push(i>>6&31|192,63&i|128):i<=65535?t.push(i>>12|224,i>>6&63|128,63&i|128):i<=2097151&&t.push(i>>18&7|240,i>>12&63|128,i>>6&63|128,63&i|128)}return t}function kQ(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(kQ).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;if(!n.toString)return"object";let t=n.toString();if(null==t)return""+t;let e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}var p_=(()=>typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),nh=class{constructor(t){this.digits=t}static zero(){return new nh([0])}static one(){return new nh([1])}clone(){return new nh(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}},KT=class{constructor(t){this.powerOfTwos=[t]}getValue(){return this.powerOfTwos[0]}multiplyBy(t){let e=nh.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]}};function SMe(n){return function(n){let t=LV(n),e=function(n,t){let e=n.length+3>>>2,i=[];for(let r=0;r<e;r++)i[r]=em(n,4*r,t);return i}(t,Fc.Big),i=8*t.length,r=function(n,t){let e=[];for(let i=0;i<80;i++)e.push(undefined);return e}(),o=1732584193,s=4023233417,a=2562383102,l=271733878,c=3285377520;e[i>>5]|=128<<24-i%32,e[15+(i+64>>9<<4)]=i;for(let u=0;u<e.length;u+=16){let d=o,p=s,h=a,f=l,m=c;for(let x=0;x<80;x++){r[x]=x<16?e[u+x]:oB(r[x-3]^r[x-8]^r[x-14]^r[x-16],1);let g=IMe(x,s,a,l),b=g[0],D=g[1],T=[oB(o,5),b,c,D,r[x]].reduce(ea);c=l,l=a,a=oB(s,30),s=o,o=T}o=ea(o,d),s=ea(s,p),a=ea(a,h),l=ea(l,f),c=ea(c,m)}return function(n){let t="";for(let e=0;e<n.length;e++){let i=DB(n,e);t+=(i>>>4).toString(16)+(15&i).toString(16)}return t.toLowerCase()}(function(n){return n.reduce((t,e)=>t.concat(function(n){let t=[];for(let e=0;e<4;e++)t.push(n>>>8*(3-e)&255);return t}(e)),[])}([o,s,a,l,c]))}(function(n){return n.map(t=>t.visit(TMe,null))}(n.nodes).join("")+`[${n.meaning}]`)}function FQ(n){let t=new TB;return AD(n.nodes.map(i=>i.visit(t,null)).join(""),n.meaning)}var ZT=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>`}},TMe=new ZT,TB=class extends ZT{visitIcu(t,e){let i=Object.keys(t.cases).map(r=>`${r} {${t.cases[r].visit(this)}}`);return`{${t.type}, ${i.join(", ")}}`}};function IMe(n,t,e,i){return n<20?[t&e|~t&i,1518500249]:n<40?[t^e^i,1859775393]:n<60?[t&e|t&i|e&i,2400959708]:[t^e^i,3395469782]}function gX(n){let t=LV(n),e=_X(t,0),i=_X(t,102072);return 0==e&&(0==i||1==i)&&(e^=319790063,i^=-1801410264),[e,i]}function AD(n,t=""){let e=gX(n);if(t){let o=gX(t);e=function(n,t){let e=n[0],r=t[0],s=NQ(n[1],t[1]),a=s[0],l=s[1];return[ea(ea(e,r),a),l]}(function(n,t){let e=n[0],i=n[1];return[e<<1|i>>>31,i<<1|e>>>31]}(e),o)}return function(n,t){let e=yX.toThePowerOf(0).multiplyBy(t);return yX.toThePowerOf(4).multiplyByAndAddTo(n,e),e.toString()}(2147483647&e[0],e[1])}function _X(n,t){let r,e=2654435769,i=2654435769,o=n.length;for(r=0;r+12<=o;r+=12){e=ea(e,em(n,r,Fc.Little)),i=ea(i,em(n,r+4,Fc.Little));let s=vX(e,i,t=ea(t,em(n,r+8,Fc.Little)));e=s[0],i=s[1],t=s[2]}return e=ea(e,em(n,r,Fc.Little)),i=ea(i,em(n,r+4,Fc.Little)),t=ea(t,o),vX(e,i,t=ea(t,em(n,r+8,Fc.Little)<<8))[2]}function vX(n,t,e){return n=is(n,t),n=is(n,e),n^=e>>>13,t=is(t,e),t=is(t,n),t^=n<<8,e=is(e,n),e=is(e,t),e^=t>>>13,n=is(n,t),n=is(n,e),n^=e>>>12,t=is(t,e),t=is(t,n),t^=n<<16,e=is(e,n),e=is(e,t),e^=t>>>5,n=is(n,t),n=is(n,e),n^=e>>>3,t=is(t,e),t=is(t,n),t^=n<<10,e=is(e,n),e=is(e,t),[n,t,e^=t>>>15]}var Fc=(()=>{return(n=Fc||(Fc={}))[n.Little=0]="Little",n[n.Big=1]="Big",Fc;var n})();function ea(n,t){return NQ(n,t)[1]}function NQ(n,t){let e=(65535&n)+(65535&t),i=(n>>>16)+(t>>>16)+(e>>>16);return[i>>>16,i<<16|65535&e]}function is(n,t){let e=(65535&n)-(65535&t);return(n>>16)-(t>>16)+(e>>16)<<16|65535&e}function oB(n,t){return n<<t|n>>>32-t}function DB(n,t){return t>=n.length?0:n[t]}function em(n,t,e){let i=0;if(e===Fc.Big)for(let r=0;r<4;r++)i+=DB(n,t+r)<<24-8*r;else for(let r=0;r<4;r++)i+=DB(n,t+r)<<8*r;return i}var yX=new class{constructor(t){this.base=t,this.exponents=[new KT(nh.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 KT(i)}return this.exponents[t]}}(256),jT=(()=>{return(n=jT||(jT={}))[n.None=0]="None",n[n.Const=1]="Const",jT;var n})(),JT=class{constructor(t=jT.None){this.modifiers=t}hasModifier(t){return 0!=(this.modifiers&t)}},Bc=(()=>{return(n=Bc||(Bc={}))[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None",Bc;var n})(),Bu=class extends JT{constructor(t,e){super(e),this.name=t}visitType(t,e){return t.visitBuiltinType(this,e)}},Vc=class extends JT{constructor(t,e,i=null){super(e),this.value=t,this.typeParams=i}visitType(t,e){return t.visitExpressionType(this,e)}},V_=new Bu(Bc.Dynamic),Pa=new Bu(Bc.Inferred),BMe=new Bu(Bc.Bool),ZC=(new Bu(Bc.Int),new Bu(Bc.Number)),LQ=new Bu(Bc.String),Jd=(new Bu(Bc.Function),new Bu(Bc.None)),am=(()=>{return(n=am||(am={}))[n.Minus=0]="Minus",n[n.Plus=1]="Plus",am;var n})(),Cn=(()=>{return(n=Cn||(Cn={}))[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Identical=2]="Identical",n[n.NotIdentical=3]="NotIdentical",n[n.Minus=4]="Minus",n[n.Plus=5]="Plus",n[n.Divide=6]="Divide",n[n.Multiply=7]="Multiply",n[n.Modulo=8]="Modulo",n[n.And=9]="And",n[n.Or=10]="Or",n[n.BitwiseAnd=11]="BitwiseAnd",n[n.Lower=12]="Lower",n[n.LowerEquals=13]="LowerEquals",n[n.Bigger=14]="Bigger",n[n.BiggerEquals=15]="BiggerEquals",n[n.NullishCoalesce=16]="NullishCoalesce",Cn;var n})();function BQ(n,t,e){let i=n.length;if(i!==t.length)return!1;for(let r=0;r<i;r++)if(!e(n[r],t[r]))return!1;return!0}function Uc(n,t){return BQ(n,t,(e,i)=>e.isEquivalent(i))}var Or=class{constructor(t,e){this.type=t||null,this.sourceSpan=e||null}prop(t,e){return new b_(this,t,null,e)}key(t,e,i){return new MC(this,t,e,i)}callFn(t,e,i){return new oh(this,t,null,e,i)}instantiate(t,e,i){return new dm(this,t,e,i)}conditional(t,e=null,i){return new bC(this,t,e,null,i)}equals(t,e){return new gr(Cn.Equals,this,t,null,e)}notEquals(t,e){return new gr(Cn.NotEquals,this,t,null,e)}identical(t,e){return new gr(Cn.Identical,this,t,null,e)}notIdentical(t,e){return new gr(Cn.NotIdentical,this,t,null,e)}minus(t,e){return new gr(Cn.Minus,this,t,null,e)}plus(t,e){return new gr(Cn.Plus,this,t,null,e)}divide(t,e){return new gr(Cn.Divide,this,t,null,e)}multiply(t,e){return new gr(Cn.Multiply,this,t,null,e)}modulo(t,e){return new gr(Cn.Modulo,this,t,null,e)}and(t,e){return new gr(Cn.And,this,t,null,e)}bitwiseAnd(t,e,i=!0){return new gr(Cn.BitwiseAnd,this,t,null,e,i)}or(t,e){return new gr(Cn.Or,this,t,null,e)}lower(t,e){return new gr(Cn.Lower,this,t,null,e)}lowerEquals(t,e){return new gr(Cn.LowerEquals,this,t,null,e)}bigger(t,e){return new gr(Cn.Bigger,this,t,null,e)}biggerEquals(t,e){return new gr(Cn.BiggerEquals,this,t,null,e)}isBlank(t){return this.equals(WT,t)}nullishCoalesce(t,e){return new gr(Cn.NullishCoalesce,this,t,null,e)}toStmt(){return new Hu(this,null)}},um=class extends Or{constructor(t,e,i){super(e,i),this.name=t}isEquivalent(t){return t instanceof um&&this.name===t.name}isConstant(){return!1}visitExpression(t,e){return t.visitReadVarExpr(this,e)}set(t){return new gC(this.name,t,null,this.sourceSpan)}},v_=class extends Or{constructor(t,e,i){super(e,i),this.expr=t}visitExpression(t,e){return t.visitTypeofExpr(this,e)}isEquivalent(t){return t instanceof v_&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}},Ln=class extends Or{constructor(t,e,i){super(e,i),this.node=t}isEquivalent(t){return t instanceof Ln&&this.node===t.node}isConstant(){return!1}visitExpression(t,e){return t.visitWrappedNodeExpr(this,e)}},gC=class extends Or{constructor(t,e,i,r){super(i||e.type,r),this.name=t,this.value=e}isEquivalent(t){return t instanceof gC&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,e){return t.visitWriteVarExpr(this,e)}toDeclStmt(t,e){return new Vu(this.name,this.value,t,e,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(Pa,ll.Final)}},_C=class extends Or{constructor(t,e,i,r,o){super(r||i.type,o),this.receiver=t,this.index=e,this.value=i}isEquivalent(t){return t instanceof _C&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,e){return t.visitWriteKeyExpr(this,e)}},vC=class extends Or{constructor(t,e,i,r,o){super(r||i.type,o),this.receiver=t,this.name=e,this.value=i}isEquivalent(t){return t instanceof vC&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,e){return t.visitWritePropExpr(this,e)}},oh=class extends Or{constructor(t,e,i,r,o=!1){super(i,r),this.fn=t,this.args=e,this.pure=o}isEquivalent(t){return t instanceof oh&&this.fn.isEquivalent(t.fn)&&Uc(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(t,e){return t.visitInvokeFunctionExpr(this,e)}},yC=class extends Or{constructor(t,e,i,r){super(i,r),this.tag=t,this.template=e}isEquivalent(t){return t instanceof yC&&this.tag.isEquivalent(t.tag)&&BQ(this.template.elements,t.template.elements,(e,i)=>e.text===i.text)&&Uc(this.template.expressions,t.template.expressions)}isConstant(){return!1}visitExpression(t,e){return t.visitTaggedTemplateExpr(this,e)}},dm=class extends Or{constructor(t,e,i,r){super(i,r),this.classExpr=t,this.args=e}isEquivalent(t){return t instanceof dm&&this.classExpr.isEquivalent(t.classExpr)&&Uc(this.args,t.args)}isConstant(){return!1}visitExpression(t,e){return t.visitInstantiateExpr(this,e)}},cl=class extends Or{constructor(t,e,i){super(e,i),this.value=t}isEquivalent(t){return t instanceof cl&&this.value===t.value}isConstant(){return!0}visitExpression(t,e){return t.visitLiteralExpr(this,e)}},$T=class{constructor(t,e){this.elements=t,this.expressions=e}},eD=class{constructor(t,e,i){this.text=t,this.sourceSpan=e,this.rawText=i??e?.toString()??IB(GT(t))}},lm=class{constructor(t,e){this.text=t,this.sourceSpan=e}},h_=class{constructor(t,e,i){this.text=t,this.sourceSpan=e,this.associatedMessage=i}},AB=class extends Or{constructor(t,e,i,r,o){super(LQ,o),this.metaBlock=t,this.messageParts=e,this.placeHolderNames=i,this.expressions=r}isEquivalent(t){return!1}isConstant(){return!1}visitExpression(t,e){return t.visitLocalizedString(this,e)}serializeI18nHead(){let t=this.metaBlock.description||"";return this.metaBlock.meaning&&(t=`${this.metaBlock.meaning}|${t}`),this.metaBlock.customId&&(t=`${t}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{t=`${t}\u241f${e}`}),xX(t,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(t){return this.messageParts[t]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(t){return this.placeHolderNames[t]?.sourceSpan??this.expressions[t]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(t){let e=this.placeHolderNames[t-1],i=this.messageParts[t],r=e.text;return 0===e.associatedMessage?.legacyIds.length&&(r+=`@@${AD(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),xX(r,i.text,this.getMessagePartSourceSpan(t))}},GT=n=>n.replace(/\\/g,"\\\\"),zMe=n=>n.replace(/^:/,"\\:"),jMe=n=>n.replace(/:/g,"\\:"),IB=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function xX(n,t,e){return""===n?{cooked:t,raw:IB(zMe(GT(t))),range:e}:{cooked:`:${n}:${t}`,raw:IB(`:${jMe(GT(n))}:${GT(t)}`),range:e}}var y_=class extends Or{constructor(t,e,i=null,r){super(e,r),this.value=t,this.typeParams=i}isEquivalent(t){return t instanceof y_&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName&&this.value.runtime===t.value.runtime}isConstant(){return!1}visitExpression(t,e){return t.visitExternalExpr(this,e)}},bC=class extends Or{constructor(t,e,i=null,r,o){super(r||e.type,o),this.condition=t,this.falseCase=i,this.trueCase=e}isEquivalent(t){return t instanceof bC&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&function(n,t){return null==n||null==t?n==t:n.isEquivalent(t)}(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(t,e){return t.visitConditionalExpr(this,e)}},xC=class extends Or{constructor(t,e){super(BMe,e),this.condition=t}isEquivalent(t){return t instanceof xC&&this.condition.isEquivalent(t.condition)}isConstant(){return!1}visitExpression(t,e){return t.visitNotExpr(this,e)}},ia=class{constructor(t,e=null){this.name=t,this.type=e}isEquivalent(t){return this.name===t.name}},pm=class extends Or{constructor(t,e,i,r,o){super(i,r),this.params=t,this.statements=e,this.name=o}isEquivalent(t){return t instanceof pm&&Uc(this.params,t.params)&&Uc(this.statements,t.statements)}isConstant(){return!1}visitExpression(t,e){return t.visitFunctionExpr(this,e)}toDeclStmt(t,e){return new wC(t,this.params,this.statements,this.type,e,this.sourceSpan)}},CC=class extends Or{constructor(t,e,i,r,o=!0){super(i||ZC,r),this.operator=t,this.expr=e,this.parens=o}isEquivalent(t){return t instanceof CC&&this.operator===t.operator&&this.expr.isEquivalent(t.expr)}isConstant(){return!1}visitExpression(t,e){return t.visitUnaryOperatorExpr(this,e)}},gr=class extends Or{constructor(t,e,i,r,o,s=!0){super(r||e.type,o),this.operator=t,this.rhs=i,this.parens=s,this.lhs=e}isEquivalent(t){return t instanceof gr&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(t,e){return t.visitBinaryOperatorExpr(this,e)}},b_=class extends Or{constructor(t,e,i,r){super(i,r),this.receiver=t,this.name=e}isEquivalent(t){return t instanceof b_&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name}isConstant(){return!1}visitExpression(t,e){return t.visitReadPropExpr(this,e)}set(t){return new vC(this.receiver,this.name,t,null,this.sourceSpan)}},MC=class extends Or{constructor(t,e,i,r){super(i,r),this.receiver=t,this.index=e}isEquivalent(t){return t instanceof MC&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)}isConstant(){return!1}visitExpression(t,e){return t.visitReadKeyExpr(this,e)}set(t){return new _C(this.receiver,this.index,t,null,this.sourceSpan)}},hm=class extends Or{constructor(t,e,i){super(e,i),this.entries=t}isConstant(){return this.entries.every(t=>t.isConstant())}isEquivalent(t){return t instanceof hm&&Uc(this.entries,t.entries)}visitExpression(t,e){return t.visitLiteralArrayExpr(this,e)}},tD=class{constructor(t,e,i){this.key=t,this.value=e,this.quoted=i}isEquivalent(t){return this.key===t.key&&this.value.isEquivalent(t.value)}},x_=class extends Or{constructor(t,e,i){super(e,i),this.entries=t,this.valueType=null,e&&(this.valueType=e.valueType)}isEquivalent(t){return t instanceof x_&&Uc(this.entries,t.entries)}isConstant(){return this.entries.every(t=>t.value.isConstant())}visitExpression(t,e){return t.visitLiteralMapExpr(this,e)}},PB=new cl(null,null,null),WT=new cl(null,Pa,null),ll=(()=>{return(n=ll||(ll={}))[n.None=0]="None",n[n.Final=1]="Final",n[n.Private=2]="Private",n[n.Exported=4]="Exported",n[n.Static=8]="Static",ll;var n})(),RB=class{constructor(t,e,i){this.text=t,this.multiline=e,this.trailingNewline=i}toString(){return this.multiline?` ${this.text} `:this.text}},nD=class extends RB{constructor(t){super("",!0,!0),this.tags=t}toString(){return function(n){if(0===n.length)return"";if(1===n.length&&n[0].tagName&&!n[0].text)return`*${MX(n[0])} `;let t="*\n";for(let e of n)t+=" *",t+=MX(e).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}},fm=class{constructor(t=ll.None,e=null,i){this.modifiers=t,this.sourceSpan=e,this.leadingComments=i}hasModifier(t){return 0!=(this.modifiers&t)}addLeadingComment(t){this.leadingComments=this.leadingComments??[],this.leadingComments.push(t)}},Vu=class extends fm{constructor(t,e,i,r,o,s){super(r,o,s),this.name=t,this.value=e,this.type=i||e&&e.type||null}isEquivalent(t){return t instanceof Vu&&this.name===t.name&&(this.value?!!t.value&&this.value.isEquivalent(t.value):!t.value)}visitStatement(t,e){return t.visitDeclareVarStmt(this,e)}},wC=class extends fm{constructor(t,e,i,r,o,s,a){super(o,s,a),this.name=t,this.params=e,this.statements=i,this.type=r||null}isEquivalent(t){return t instanceof wC&&Uc(this.params,t.params)&&Uc(this.statements,t.statements)}visitStatement(t,e){return t.visitDeclareFunctionStmt(this,e)}},Hu=class extends fm{constructor(t,e,i){super(ll.None,e,i),this.expr=t}isEquivalent(t){return t instanceof Hu&&this.expr.isEquivalent(t.expr)}visitStatement(t,e){return t.visitExpressionStmt(this,e)}},Do=class extends fm{constructor(t,e=null,i){super(ll.None,e,i),this.value=t}isEquivalent(t){return t instanceof Do&&this.value.isEquivalent(t.value)}visitStatement(t,e){return t.visitReturnStmt(this,e)}},SC=class extends fm{constructor(t,e,i=[],r,o){super(ll.None,r,o),this.condition=t,this.trueCase=e,this.falseCase=i}isEquivalent(t){return t instanceof SC&&this.condition.isEquivalent(t.condition)&&Uc(this.trueCase,t.trueCase)&&Uc(this.falseCase,t.falseCase)}visitStatement(t,e){return t.visitIfStmt(this,e)}};function Ri(n,t,e){return new um(n,t,e)}function Tn(n,t=null,e){return new y_(n,null,t,e)}function ul(n,t,e){return new Vc(n,t,e)}function BV(n){return new v_(n)}function _r(n,t,e){return new hm(n,t,e)}function ql(n,t=null){return new x_(n.map(e=>new tD(e.key,e.value,e.quoted)),t,null)}function ra(n,t,e,i,r){return new pm(n,t,e,i,r)}function VV(n,t,e,i,r){return new SC(n,t,e,i,r)}function CX(n,t,e,i){return new yC(n,t,e,i)}function ht(n,t,e){return new cl(n,t,e)}function VQ(n){return n instanceof cl&&null===n.value}function MX(n){let t="";if(n.tagName&&(t+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+n.text.replace(/@/g,"\\@")}return t}var wX=Ri("<unknown>"),HQ={},C_=class extends Or{constructor(t){super(t.type),this.resolved=t,this.original=t}visitExpression(t,e){return e===HQ?this.original.visitExpression(t,e):this.resolved.visitExpression(t,e)}isEquivalent(t){return t instanceof C_&&this.resolved.isEquivalent(t.resolved)}isConstant(){return!0}fixup(t){this.resolved=t,this.shared=!0}},iD=class{constructor(t=!1){this.isClosureCompilerEnabled=t,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.nextNameIndex=0}getConstLiteral(t,e){if(t instanceof cl&&!SX(t)||t instanceof C_)return t;let i=this.keyOf(t),r=this.literals.get(i),o=!1;if(r||(r=new C_(t),this.literals.set(i,r),o=!0),!o&&!r.shared||o&&e){let a,l,s=this.freshName();this.isClosureCompilerEnabled&&SX(t)?(a=Ri(s).set(new pm([],[new Do(t)])),l=Ri(s).callFn([])):(a=Ri(s).set(t),l=Ri(s)),this.statements.push(a.toDeclStmt(Pa,ll.Final)),r.fixup(l)}return r}getLiteralFactory(t){if(t instanceof hm){let e=t.entries.map(r=>r.isConstant()?r:wX),i=this.keyOf(_r(e));return this._getLiteralFactory(i,t.entries,r=>_r(r))}{let e=ql(t.entries.map(r=>({key:r.key,value:r.value.isConstant()?r.value:wX,quoted:r.quoted}))),i=this.keyOf(e);return this._getLiteralFactory(i,t.entries.map(r=>r.value),r=>ql(r.map((o,s)=>({key:t.entries[s].key,value:o,quoted:t.entries[s].quoted}))))}}_getLiteralFactory(t,e,i){let r=this.literalFactories.get(t),o=e.filter(s=>!s.isConstant());if(!r){let s=e.map((u,d)=>u.isConstant()?this.getConstLiteral(u,!0):Ri(`a${d}`)),l=ra(s.filter(KMe).map(u=>new ia(u.name,V_)),[new Do(i(s))],Pa),c=this.freshName();this.statements.push(Ri(c).set(l).toDeclStmt(Pa,ll.Final)),r=Ri(c),this.literalFactories.set(t,r)}return{literalFactory:r,literalFactoryArguments:o}}uniqueName(t){return`${t}${this.nextNameIndex++}`}freshName(){return this.uniqueName("_c")}keyOf(t){return t.visitExpression(new OB,HQ)}},OB=class{constructor(){this.visitWrappedNodeExpr=rs,this.visitWriteVarExpr=rs,this.visitWriteKeyExpr=rs,this.visitWritePropExpr=rs,this.visitInvokeFunctionExpr=rs,this.visitTaggedTemplateExpr=rs,this.visitInstantiateExpr=rs,this.visitConditionalExpr=rs,this.visitNotExpr=rs,this.visitAssertNotNullExpr=rs,this.visitCastExpr=rs,this.visitFunctionExpr=rs,this.visitUnaryOperatorExpr=rs,this.visitBinaryOperatorExpr=rs,this.visitReadPropExpr=rs,this.visitReadKeyExpr=rs,this.visitCommaExpr=rs,this.visitLocalizedString=rs}visitLiteralExpr(t){return`${"string"==typeof t.value?'"'+t.value+'"':t.value}`}visitLiteralArrayExpr(t,e){return`[${t.entries.map(i=>i.visitExpression(this,e)).join(",")}]`}visitLiteralMapExpr(t,e){return`{${t.entries.map(o=>`${(o=>{let s=o.quoted?'"':"";return`${s}${o.key}${s}`})(o)}:${o.value.visitExpression(this,e)}`).join(",")}`}visitExternalExpr(t){return t.value.moduleName?`EX:${t.value.moduleName}:${t.value.name}`:`EX:${t.value.runtime.name}`}visitReadVarExpr(t){return`VAR:${t.name}`}visitTypeofExpr(t,e){return`TYPEOF:${t.expr.visitExpression(this,e)}`}};function rs(n){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${n.constructor.name}`)}function KMe(n){return n instanceof um}function SX(n){return n instanceof cl&&"string"==typeof n.value&&n.value.length>=50}var xe="@angular/core",te=(()=>{class n{}return n.NEW_METHOD="factory",n.TRANSFORM_METHOD="transform",n.PATCH_DEPS="patchedDeps",n.core={name:null,moduleName:xe},n.namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:xe},n.namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:xe},n.namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:xe},n.element={name:"\u0275\u0275element",moduleName:xe},n.elementStart={name:"\u0275\u0275elementStart",moduleName:xe},n.elementEnd={name:"\u0275\u0275elementEnd",moduleName:xe},n.advance={name:"\u0275\u0275advance",moduleName:xe},n.syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:xe},n.syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:xe},n.attribute={name:"\u0275\u0275attribute",moduleName:xe},n.attributeInterpolate1={name:"\u0275\u0275attributeInterpolate1",moduleName:xe},n.attributeInterpolate2={name:"\u0275\u0275attributeInterpolate2",moduleName:xe},n.attributeInterpolate3={name:"\u0275\u0275attributeInterpolate3",moduleName:xe},n.attributeInterpolate4={name:"\u0275\u0275attributeInterpolate4",moduleName:xe},n.attributeInterpolate5={name:"\u0275\u0275attributeInterpolate5",moduleName:xe},n.attributeInterpolate6={name:"\u0275\u0275attributeInterpolate6",moduleName:xe},n.attributeInterpolate7={name:"\u0275\u0275attributeInterpolate7",moduleName:xe},n.attributeInterpolate8={name:"\u0275\u0275attributeInterpolate8",moduleName:xe},n.attributeInterpolateV={name:"\u0275\u0275attributeInterpolateV",moduleName:xe},n.classProp={name:"\u0275\u0275classProp",moduleName:xe},n.elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:xe},n.elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:xe},n.elementContainer={name:"\u0275\u0275elementContainer",moduleName:xe},n.styleMap={name:"\u0275\u0275styleMap",moduleName:xe},n.styleMapInterpolate1={name:"\u0275\u0275styleMapInterpolate1",moduleName:xe},n.styleMapInterpolate2={name:"\u0275\u0275styleMapInterpolate2",moduleName:xe},n.styleMapInterpolate3={name:"\u0275\u0275styleMapInterpolate3",moduleName:xe},n.styleMapInterpolate4={name:"\u0275\u0275styleMapInterpolate4",moduleName:xe},n.styleMapInterpolate5={name:"\u0275\u0275styleMapInterpolate5",moduleName:xe},n.styleMapInterpolate6={name:"\u0275\u0275styleMapInterpolate6",moduleName:xe},n.styleMapInterpolate7={name:"\u0275\u0275styleMapInterpolate7",moduleName:xe},n.styleMapInterpolate8={name:"\u0275\u0275styleMapInterpolate8",moduleName:xe},n.styleMapInterpolateV={name:"\u0275\u0275styleMapInterpolateV",moduleName:xe},n.classMap={name:"\u0275\u0275classMap",moduleName:xe},n.classMapInterpolate1={name:"\u0275\u0275classMapInterpolate1",moduleName:xe},n.classMapInterpolate2={name:"\u0275\u0275classMapInterpolate2",moduleName:xe},n.classMapInterpolate3={name:"\u0275\u0275classMapInterpolate3",moduleName:xe},n.classMapInterpolate4={name:"\u0275\u0275classMapInterpolate4",moduleName:xe},n.classMapInterpolate5={name:"\u0275\u0275classMapInterpolate5",moduleName:xe},n.classMapInterpolate6={name:"\u0275\u0275classMapInterpolate6",moduleName:xe},n.classMapInterpolate7={name:"\u0275\u0275classMapInterpolate7",moduleName:xe},n.classMapInterpolate8={name:"\u0275\u0275classMapInterpolate8",moduleName:xe},n.classMapInterpolateV={name:"\u0275\u0275classMapInterpolateV",moduleName:xe},n.styleProp={name:"\u0275\u0275styleProp",moduleName:xe},n.stylePropInterpolate1={name:"\u0275\u0275stylePropInterpolate1",moduleName:xe},n.stylePropInterpolate2={name:"\u0275\u0275stylePropInterpolate2",moduleName:xe},n.stylePropInterpolate3={name:"\u0275\u0275stylePropInterpolate3",moduleName:xe},n.stylePropInterpolate4={name:"\u0275\u0275stylePropInterpolate4",moduleName:xe},n.stylePropInterpolate5={name:"\u0275\u0275stylePropInterpolate5",moduleName:xe},n.stylePropInterpolate6={name:"\u0275\u0275stylePropInterpolate6",moduleName:xe},n.stylePropInterpolate7={name:"\u0275\u0275stylePropInterpolate7",moduleName:xe},n.stylePropInterpolate8={name:"\u0275\u0275stylePropInterpolate8",moduleName:xe},n.stylePropInterpolateV={name:"\u0275\u0275stylePropInterpolateV",moduleName:xe},n.nextContext={name:"\u0275\u0275nextContext",moduleName:xe},n.resetView={name:"\u0275\u0275resetView",moduleName:xe},n.templateCreate={name:"\u0275\u0275template",moduleName:xe},n.text={name:"\u0275\u0275text",moduleName:xe},n.enableBindings={name:"\u0275\u0275enableBindings",moduleName:xe},n.disableBindings={name:"\u0275\u0275disableBindings",moduleName:xe},n.getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:xe},n.textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:xe},n.textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:xe},n.textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:xe},n.textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:xe},n.textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:xe},n.textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:xe},n.textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:xe},n.textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:xe},n.textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:xe},n.textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:xe},n.restoreView={name:"\u0275\u0275restoreView",moduleName:xe},n.pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:xe},n.pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:xe},n.pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:xe},n.pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:xe},n.pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:xe},n.pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:xe},n.pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:xe},n.pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:xe},n.pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:xe},n.pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:xe},n.pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:xe},n.pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:xe},n.pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:xe},n.pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:xe},n.pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:xe},n.hostProperty={name:"\u0275\u0275hostProperty",moduleName:xe},n.property={name:"\u0275\u0275property",moduleName:xe},n.propertyInterpolate={name:"\u0275\u0275propertyInterpolate",moduleName:xe},n.propertyInterpolate1={name:"\u0275\u0275propertyInterpolate1",moduleName:xe},n.propertyInterpolate2={name:"\u0275\u0275propertyInterpolate2",moduleName:xe},n.propertyInterpolate3={name:"\u0275\u0275propertyInterpolate3",moduleName:xe},n.propertyInterpolate4={name:"\u0275\u0275propertyInterpolate4",moduleName:xe},n.propertyInterpolate5={name:"\u0275\u0275propertyInterpolate5",moduleName:xe},n.propertyInterpolate6={name:"\u0275\u0275propertyInterpolate6",moduleName:xe},n.propertyInterpolate7={name:"\u0275\u0275propertyInterpolate7",moduleName:xe},n.propertyInterpolate8={name:"\u0275\u0275propertyInterpolate8",moduleName:xe},n.propertyInterpolateV={name:"\u0275\u0275propertyInterpolateV",moduleName:xe},n.i18n={name:"\u0275\u0275i18n",moduleName:xe},n.i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:xe},n.i18nExp={name:"\u0275\u0275i18nExp",moduleName:xe},n.i18nStart={name:"\u0275\u0275i18nStart",moduleName:xe},n.i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:xe},n.i18nApply={name:"\u0275\u0275i18nApply",moduleName:xe},n.i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:xe},n.pipe={name:"\u0275\u0275pipe",moduleName:xe},n.projection={name:"\u0275\u0275projection",moduleName:xe},n.projectionDef={name:"\u0275\u0275projectionDef",moduleName:xe},n.reference={name:"\u0275\u0275reference",moduleName:xe},n.inject={name:"\u0275\u0275inject",moduleName:xe},n.injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:xe},n.directiveInject={name:"\u0275\u0275directiveInject",moduleName:xe},n.invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:xe},n.invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:xe},n.templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:xe},n.forwardRef={name:"forwardRef",moduleName:xe},n.resolveForwardRef={name:"resolveForwardRef",moduleName:xe},n.\u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:xe},n.declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:xe},n.InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:xe},n.resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:xe},n.resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:xe},n.resolveBody={name:"\u0275\u0275resolveBody",moduleName:xe},n.defineComponent={name:"\u0275\u0275defineComponent",moduleName:xe},n.declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:xe},n.setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:xe},n.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:xe},n.ViewEncapsulation={name:"ViewEncapsulation",moduleName:xe},n.ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:xe},n.FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:xe},n.declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:xe},n.FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:xe},n.defineDirective={name:"\u0275\u0275defineDirective",moduleName:xe},n.declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:xe},n.DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:xe},n.InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:xe},n.InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:xe},n.defineInjector={name:"\u0275\u0275defineInjector",moduleName:xe},n.declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:xe},n.NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:xe},n.ModuleWithProviders={name:"ModuleWithProviders",moduleName:xe},n.defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:xe},n.declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:xe},n.setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:xe},n.registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:xe},n.PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:xe},n.definePipe={name:"\u0275\u0275definePipe",moduleName:xe},n.declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:xe},n.declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:xe},n.setClassMetadata={name:"\u0275setClassMetadata",moduleName:xe},n.queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:xe},n.viewQuery={name:"\u0275\u0275viewQuery",moduleName:xe},n.loadQuery={name:"\u0275\u0275loadQuery",moduleName:xe},n.contentQuery={name:"\u0275\u0275contentQuery",moduleName:xe},n.NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:xe},n.InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:xe},n.CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:xe},n.StandaloneFeature={name:"\u0275\u0275StandaloneFeature",moduleName:xe},n.ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:xe},n.listener={name:"\u0275\u0275listener",moduleName:xe},n.getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:xe},n.sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:xe},n.sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:xe},n.sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:xe},n.sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:xe},n.sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:xe},n.sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:xe},n.trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:xe},n.trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:xe},n})();function BT(n){n=n<0?1+(-n<<1):n<<1;let t="";do{let e=31&n;(n>>=5)>0&&(e|=32),t+=sC(e)}while(n>0);return t}function sC(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}var twe=/'|\\|\n|\r|\$/g,nwe=/^[$A-Z_][0-9A-Z_$]*$/i,rD=class{constructor(t){this.indent=t,this.partsLength=0,this.parts=[],this.srcSpans=[]}},EC=class{constructor(t){this._indent=t,this._lines=[new rD(t)]}static createRoot(){return new EC(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(t,e=""){this.print(t||null,e,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*"  ".length+this._currentLine.partsLength}print(t,e,i=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(t&&t.sourceSpan||null)),i&&this._lines.push(new rD(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(t=>t.parts.length>0?EX(t.indent)+t.parts.join(""):"").join("\n")}toSourceMapGenerator(t,e=0){let i=new class{constructor(t=null){this.file=t,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(t,e=null){return this.sourcesContent.has(t)||this.sourcesContent.set(t,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(t,e,i,r){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=e&&!this.sourcesContent.has(e))throw new Error(`Unknown source file "${e}"`);if(null==t)throw new Error("The column in the generated code must be provided");if(t<this.lastCol0)throw new Error("Mapping should be added in output order");if(e&&(null==i||null==r))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=t,this.currentLine.push({col0:t,sourceUrl:e,sourceLine0:i,sourceCol0:r}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;let t=new Map,e=[],i=[];Array.from(this.sourcesContent.keys()).forEach((c,u)=>{t.set(c,u),e.push(c),i.push(this.sourcesContent.get(c)||null)});let r="",o=0,s=0,a=0,l=0;return this.lines.forEach(c=>{o=0,r+=c.map(u=>{let d=BT(u.col0-o);return o=u.col0,null!=u.sourceUrl&&(d+=BT(t.get(u.sourceUrl)-s),s=t.get(u.sourceUrl),d+=BT(u.sourceLine0-a),a=u.sourceLine0,d+=BT(u.sourceCol0-l),l=u.sourceCol0),d}).join(","),r+=";"}),r=r.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:e,sourcesContent:i,mappings:r}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(n){let t="",e=LV(n);for(let i=0;i<e.length;){let r=e[i++],o=i<e.length?e[i++]:null,s=i<e.length?e[i++]:null;t+=sC(r>>2),t+=sC((3&r)<<4|(null===o?0:o>>4)),t+=null===o?"=":sC((15&o)<<2|(null===s?0:s>>6)),t+=null===o||null===s?"=":sC(63&s)}return t}(JSON.stringify(this,null,0)):""}}(t),r=!1,o=()=>{r||(i.addSource(t," ").addMapping(0,t,0,0),r=!0)};for(let s=0;s<e;s++)i.addLine(),o();return this.sourceLines.forEach((s,a)=>{i.addLine();let l=s.srcSpans,c=s.parts,u=s.indent*"  ".length,d=0;for(;d<l.length&&!l[d];)u+=c[d].length,d++;for(d<l.length&&0===a&&0===u?r=!0:o();d<l.length;){let p=l[d],h=p.start.file,f=p.start.line,m=p.start.col;for(i.addSource(h.url,h.content).addMapping(u,h.url,f,m),u+=c[d].length,d++;d<l.length&&(p===l[d]||!l[d]);)u+=c[d].length,d++}}),i}spanOf(t,e){let i=this._lines[t];if(i){let r=e-EX(i.indent).length;for(let o=0;o<i.parts.length;o++){let s=i.parts[o];if(s.length>r)return i.srcSpans[o];r-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}},NB=class{constructor(t){this._escapeDollarInStrings=t}printLeadingComments(t,e){if(void 0!==t.leadingComments)for(let i of t.leadingComments)i instanceof nD?e.print(t,`/*${i.toString()}*/`,i.trailingNewline):i.multiline?e.print(t,`/* ${i.text} */`,i.trailingNewline):i.text.split("\n").forEach(r=>{e.println(t,`// ${r}`)})}visitExpressionStmt(t,e){return this.printLeadingComments(t,e),t.expr.visitExpression(this,e),e.println(t,";"),null}visitReturnStmt(t,e){return this.printLeadingComments(t,e),e.print(t,"return "),t.value.visitExpression(this,e),e.println(t,";"),null}visitIfStmt(t,e){this.printLeadingComments(t,e),e.print(t,"if ("),t.condition.visitExpression(this,e),e.print(t,") {");let i=null!=t.falseCase&&t.falseCase.length>0;return t.trueCase.length<=1&&!i?(e.print(t," "),this.visitAllStatements(t.trueCase,e),e.removeEmptyLastLine(),e.print(t," ")):(e.println(),e.incIndent(),this.visitAllStatements(t.trueCase,e),e.decIndent(),i&&(e.println(t,"} else {"),e.incIndent(),this.visitAllStatements(t.falseCase,e),e.decIndent())),e.println(t,"}"),null}visitWriteVarExpr(t,e){let i=e.lineIsEmpty();return i||e.print(t,"("),e.print(t,`${t.name} = `),t.value.visitExpression(this,e),i||e.print(t,")"),null}visitWriteKeyExpr(t,e){let i=e.lineIsEmpty();return i||e.print(t,"("),t.receiver.visitExpression(this,e),e.print(t,"["),t.index.visitExpression(this,e),e.print(t,"] = "),t.value.visitExpression(this,e),i||e.print(t,")"),null}visitWritePropExpr(t,e){let i=e.lineIsEmpty();return i||e.print(t,"("),t.receiver.visitExpression(this,e),e.print(t,`.${t.name} = `),t.value.visitExpression(this,e),i||e.print(t,")"),null}visitInvokeFunctionExpr(t,e){return t.fn.visitExpression(this,e),e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null}visitTaggedTemplateExpr(t,e){t.tag.visitExpression(this,e),e.print(t,"`"+t.template.elements[0].rawText);for(let i=1;i<t.template.elements.length;i++)e.print(t,"${"),t.template.expressions[i-1].visitExpression(this,e),e.print(t,`}${t.template.elements[i].rawText}`);return e.print(t,"`"),null}visitWrappedNodeExpr(t,e){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(t,e){e.print(t,"typeof "),t.expr.visitExpression(this,e)}visitReadVarExpr(t,e){return e.print(t,t.name),null}visitInstantiateExpr(t,e){return e.print(t,"new "),t.classExpr.visitExpression(this,e),e.print(t,"("),this.visitAllExpressions(t.args,e,","),e.print(t,")"),null}visitLiteralExpr(t,e){let i=t.value;return e.print(t,"string"==typeof i?rm(i,this._escapeDollarInStrings):`${i}`),null}visitLocalizedString(t,e){let i=t.serializeI18nHead();e.print(t,"$localize `"+i.raw);for(let r=1;r<t.messageParts.length;r++)e.print(t,"${"),t.expressions[r-1].visitExpression(this,e),e.print(t,`}${t.serializeI18nTemplatePart(r).raw}`);return e.print(t,"`"),null}visitConditionalExpr(t,e){return e.print(t,"("),t.condition.visitExpression(this,e),e.print(t,"? "),t.trueCase.visitExpression(this,e),e.print(t,": "),t.falseCase.visitExpression(this,e),e.print(t,")"),null}visitNotExpr(t,e){return e.print(t,"!"),t.condition.visitExpression(this,e),null}visitUnaryOperatorExpr(t,e){let i;switch(t.operator){case am.Plus:i="+";break;case am.Minus:i="-";break;default:throw new Error(`Unknown operator ${t.operator}`)}return t.parens&&e.print(t,"("),e.print(t,i),t.expr.visitExpression(this,e),t.parens&&e.print(t,")"),null}visitBinaryOperatorExpr(t,e){let i;switch(t.operator){case Cn.Equals:i="==";break;case Cn.Identical:i="===";break;case Cn.NotEquals:i="!=";break;case Cn.NotIdentical:i="!==";break;case Cn.And:i="&&";break;case Cn.BitwiseAnd:i="&";break;case Cn.Or:i="||";break;case Cn.Plus:i="+";break;case Cn.Minus:i="-";break;case Cn.Divide:i="/";break;case Cn.Multiply:i="*";break;case Cn.Modulo:i="%";break;case Cn.Lower:i="<";break;case Cn.LowerEquals:i="<=";break;case Cn.Bigger:i=">";break;case Cn.BiggerEquals:i=">=";break;case Cn.NullishCoalesce:i="??";break;default:throw new Error(`Unknown operator ${t.operator}`)}return t.parens&&e.print(t,"("),t.lhs.visitExpression(this,e),e.print(t,` ${i} `),t.rhs.visitExpression(this,e),t.parens&&e.print(t,")"),null}visitReadPropExpr(t,e){return t.receiver.visitExpression(this,e),e.print(t,"."),e.print(t,t.name),null}visitReadKeyExpr(t,e){return t.receiver.visitExpression(this,e),e.print(t,"["),t.index.visitExpression(this,e),e.print(t,"]"),null}visitLiteralArrayExpr(t,e){return e.print(t,"["),this.visitAllExpressions(t.entries,e,","),e.print(t,"]"),null}visitLiteralMapExpr(t,e){return e.print(t,"{"),this.visitAllObjects(i=>{e.print(t,`${rm(i.key,this._escapeDollarInStrings,i.quoted)}:`),i.value.visitExpression(this,e)},t.entries,e,","),e.print(t,"}"),null}visitCommaExpr(t,e){return e.print(t,"("),this.visitAllExpressions(t.parts,e,","),e.print(t,")"),null}visitAllExpressions(t,e,i){this.visitAllObjects(r=>r.visitExpression(this,e),t,e,i)}visitAllObjects(t,e,i,r){let o=!1;for(let s=0;s<e.length;s++)s>0&&(i.lineLength()>80?(i.print(null,r,!0),o||(i.incIndent(),i.incIndent(),o=!0)):i.print(null,r,!1)),t(e[s]);o&&(i.decIndent(),i.decIndent())}visitAllStatements(t,e){t.forEach(i=>i.visitStatement(this,e))}};function rm(n,t,e=!0){if(null==n)return null;let i=n.replace(twe,(...o)=>"$"==o[0]?t?"\\$":"$":"\n"==o[0]?"\\n":"\r"==o[0]?"\\r":`\\${o[0]}`);return e||!nwe.test(i)?`'${i}'`:i}function EX(n){let t="";for(let e=0;e<n;e++)t+="  ";return t}function ID(n,t){if(0===t)return ul(n);let e=[];for(let i=0;i<t;i++)e.push(V_);return ul(n,void 0,e)}function zQ(n){return`@${n}`}function rwe(n,t){let e=rm(t,!1,!1);return e!==t?`${n}[${e}]`:`${n}.${t}`}function jQ(n,t){return`animation_${n}_${t}`}function As(n){let t=new Ln(n);return{value:t,type:t}}function om(n,t){let e=_r(n.map(i=>i.value));return t?ra([],[new Do(e)]):e}function HV(n,t){return{expression:n,forwardRef:t}}var f_=(()=>{return(n=f_||(f_={}))[n.Class=0]="Class",n[n.Function=1]="Function",f_;var n})(),Nc=(()=>{return(n=Nc||(Nc={}))[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule",Nc;var n})();function nm(n){let t=Ri("t"),e=null,i=DX(n)?t:new gr(Cn.Or,t,n.internalType),r=null;null!==n.deps?"invalid"!==n.deps&&(r=new dm(i,TX(n.deps,n.target))):(e=Ri(`\u0275${n.name}_BaseFactory`),r=e.callFn([i]));let o=[],s=null;function a(c){let u=Ri("r");o.push(u.set(PB).toDeclStmt());let d=null!==r?u.set(r).toStmt():Tn(te.invalidFactory).callFn([]).toStmt();return o.push(VV(t,[d],[u.set(c).toStmt()])),u}if(DX(n)){let c=TX(n.delegateDeps,n.target);s=a(new(n.delegateType===f_.Class?dm:oh)(n.delegate,c))}else s=function(n){return void 0!==n.expression}(n)?a(n.expression):r;if(null===s)o.push(Tn(te.invalidFactory).callFn([]).toStmt());else if(null!==e){let c=Tn(te.getInheritedFactory).callFn([n.internalType]),u=new gr(Cn.Or,e,e.set(c));o.push(new Do(u.callFn([i])))}else o.push(new Do(s));let l=ra([new ia("t",V_)],o,Pa,void 0,`${n.name}_Factory`);return null!==e&&(l=ra([],[new Vu(e.name),new Do(l)]).callFn([],void 0,!0)),{expression:l,statements:[],type:cwe(n)}}function cwe(n){let t=null!==n.deps&&"invalid"!==n.deps?function(n){let t=!1,e=n.map(i=>{let r=function(n){let t=[];return null!==n.attributeNameType&&t.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&t.push({key:"optional",value:ht(!0),quoted:!1}),n.host&&t.push({key:"host",value:ht(!0),quoted:!1}),n.self&&t.push({key:"self",value:ht(!0),quoted:!1}),n.skipSelf&&t.push({key:"skipSelf",value:ht(!0),quoted:!1}),t.length>0?ql(t):null}(i);return null!==r?(t=!0,r):ht(null)});return t?ul(_r(e)):Jd}(n.deps):Jd;return ul(Tn(te.FactoryDeclaration,[ID(n.type.type,n.typeArgumentCount),t]))}function TX(n,t){return n.map((e,i)=>function(n,t,e){if(null===n.token)return Tn(te.invalidFactoryDep).callFn([ht(e)]);if(null===n.attributeNameType){let i=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(t===Nc.Pipe?16:0),r=0!==i||n.optional?ht(i):null,o=[n.token];r&&o.push(r);let s=function(n){switch(n){case Nc.Component:case Nc.Directive:case Nc.Pipe:return te.directiveInject;default:return te.inject}}(t);return Tn(s).callFn(o)}return Tn(te.injectAttribute).callFn([n.token])}(e,t,i))}function DX(n){return void 0!==n.delegateType}var M_=class{constructor(t,e){this.value=t,this.sourceSpan=e}visit(t){return t.visitText(this)}},TC=class{constructor(t,e,i){this.value=t,this.sourceSpan=e,this.i18n=i}visit(t){return t.visitBoundText(this)}},DC=class{constructor(t,e,i,r,o,s){this.name=t,this.value=e,this.sourceSpan=i,this.keySpan=r,this.valueSpan=o,this.i18n=s}visit(t){return t.visitTextAttribute(this)}},w_=class{constructor(t,e,i,r,o,s,a,l,c){this.name=t,this.type=e,this.securityContext=i,this.value=r,this.unit=o,this.sourceSpan=s,this.keySpan=a,this.valueSpan=l,this.i18n=c}static fromBoundElementProperty(t,e){if(void 0===t.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${t.name}: ${t.sourceSpan}`);return new w_(t.name,t.type,t.securityContext,t.value,t.unit,t.sourceSpan,t.keySpan,t.valueSpan,e)}visit(t){return t.visitBoundAttribute(this)}},S_=class{constructor(t,e,i,r,o,s,a,l){this.name=t,this.type=e,this.handler=i,this.target=r,this.phase=o,this.sourceSpan=s,this.handlerSpan=a,this.keySpan=l}static fromParsedEvent(t){let e=0===t.type?t.targetOrPhase:null,i=1===t.type?t.targetOrPhase:null;if(void 0===t.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${t.name}: ${t.sourceSpan}`);return new S_(t.name,t.type,t.handler,e,i,t.sourceSpan,t.handlerSpan,t.keySpan)}visit(t){return t.visitBoundEvent(this)}},E_=class{constructor(t,e,i,r,o,s,a,l,c,u){this.name=t,this.attributes=e,this.inputs=i,this.outputs=r,this.children=o,this.references=s,this.sourceSpan=a,this.startSourceSpan=l,this.endSourceSpan=c,this.i18n=u}visit(t){return t.visitElement(this)}},uC=class{constructor(t,e,i,r,o,s,a,l,c,u,d,p){this.tagName=t,this.attributes=e,this.inputs=i,this.outputs=r,this.templateAttrs=o,this.children=s,this.references=a,this.variables=l,this.sourceSpan=c,this.startSourceSpan=u,this.endSourceSpan=d,this.i18n=p}visit(t){return t.visitTemplate(this)}},oD=class{constructor(t,e,i,r,o){this.name=t,this.value=e,this.sourceSpan=i,this.keySpan=r,this.valueSpan=o}visit(t){return t.visitVariable(this)}},sD=class{constructor(t,e,i,r){this.vars=t,this.placeholders=e,this.sourceSpan=i,this.i18n=r}visit(t){return t.visitIcu(this)}};function AX(n,t){let e=[];if(n.visit)for(let i of t)n.visit(i)||i.visit(n);else for(let i of t){let r=i.visit(n);r&&e.push(r)}return e}var Fu=class{constructor(t,e,i,r,o,s){this.nodes=t,this.placeholders=e,this.placeholderToMessage=i,this.meaning=r,this.description=o,this.customId=s,this.id=this.customId,this.legacyIds=[],this.messageString=function(n){let t=new UB;return n.map(i=>i.visit(t)).join("")}(this.nodes),this.sources=t.length?[{filePath:t[0].sourceSpan.start.file.url,startLine:t[0].sourceSpan.start.line+1,startCol:t[0].sourceSpan.start.col+1,endLine:t[t.length-1].sourceSpan.end.line+1,endCol:t[0].sourceSpan.start.col+1}]:[]}},l_=class{constructor(t,e){this.value=t,this.sourceSpan=e}visit(t,e){return t.visitText(this,e)}},mm=class{constructor(t,e){this.children=t,this.sourceSpan=e}visit(t,e){return t.visitContainer(this,e)}},aD=class{constructor(t,e,i,r){this.expression=t,this.type=e,this.cases=i,this.sourceSpan=r}visit(t,e){return t.visitIcu(this,e)}},lD=class{constructor(t,e,i){this.value=t,this.name=e,this.sourceSpan=i}visit(t,e){return t.visitPlaceholder(this,e)}},T_=class{constructor(t,e,i){this.value=t,this.name=e,this.sourceSpan=i}visit(t,e){return t.visitIcuPlaceholder(this,e)}},UB=class{visitText(t){return t.value}visitContainer(t){return t.children.map(e=>e.visit(this)).join("")}visitIcu(t){let e=Object.keys(t.cases).map(i=>`${i} {${t.cases[i].visit(this)}}`);return`{${t.expressionPlaceholder}, ${t.type}, ${e.join(" ")}}`}visitTagPlaceholder(t){let e=t.children.map(i=>i.visit(this)).join("");return`{$${t.startName}}${e}{$${t.closeName}}`}visitPlaceholder(t){return`{$${t.name}}`}visitIcuPlaceholder(t){return`{$${t.name}}`}};new class{visitTag(t){let e=this._serializeAttributes(t.attrs);if(0==t.children.length)return`<${t.name}${e}/>`;let i=t.children.map(r=>r.visit(this));return`<${t.name}${e}>${i.join("")}</${t.name}>`}visitText(t){return t.value}visitDeclaration(t){return`<?xml${this._serializeAttributes(t.attrs)} ?>`}_serializeAttributes(t){let e=Object.keys(t).map(i=>`${i}="${t[i]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(t){return`<!DOCTYPE ${t.rootTag} [\n${t.dtd}\n]>`}};var jB="i18n-";function AC(n){return n instanceof Fu}function VT(n){return AC(n)&&1===n.nodes.length&&n.nodes[0]instanceof aD}function Cwe(n){return!!n.i18n}function WQ(n){return n.nodes[0]}function PD(n,t=0){return`\ufffd${n}${t>0?`:${t}`:""}\ufffd`}function Swe(n=0){let t=n;return()=>t++}function PX(n){let t={};return n.forEach((e,i)=>{t[i]=ht(e.length>1?`[${e.join("|")}]`:e[0])}),t}function qT(n,t,...e){let i=n.get(t)||[];i.push(...e),n.set(t,i)}function qQ(n,t=0,e=0){let i=t,r=new Map,o=n instanceof Fu?n.nodes.find(s=>s instanceof mm):n;return o&&o.children.filter(s=>s instanceof lD).forEach((s,a)=>{let l=PD(i+a,e);qT(r,s.name,l)}),r}function UV(n={},t){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(i=>e[JC(i,t)]=n[i]),e}function JC(n,t=!0){let e=function(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}(n);if(!t)return e;let r,i=e.split("_");if(1===i.length)return n.toLowerCase();/^\d+$/.test(i[i.length-1])&&(r=i.pop());let o=i.shift().toLowerCase();return i.length&&(o+=i.map(s=>s.charAt(0).toUpperCase()+s.slice(1).toLowerCase()).join("")),r?`${o}_${r}`:o}function RX(n){return`MSG_${n}`.toUpperCase()}function Ewe(n){return new Vu(n.name,void 0,Pa,void 0,n.sourceSpan)}var Twe=/[-.]/,Hc="ctx",$C="rf",YQ="restoredCtx",Rwe=new Set([te.element,te.elementStart,te.elementEnd,te.elementContainer,te.elementContainerStart,te.elementContainerEnd,te.i18nExp,te.listener,te.classProp,te.syntheticHostListener,te.hostProperty,te.syntheticHostProperty,te.property,te.propertyInterpolate1,te.propertyInterpolate2,te.propertyInterpolate3,te.propertyInterpolate4,te.propertyInterpolate5,te.propertyInterpolate6,te.propertyInterpolate7,te.propertyInterpolate8,te.propertyInterpolateV,te.attribute,te.attributeInterpolate1,te.attributeInterpolate2,te.attributeInterpolate3,te.attributeInterpolate4,te.attributeInterpolate5,te.attributeInterpolate6,te.attributeInterpolate7,te.attributeInterpolate8,te.attributeInterpolateV,te.styleProp,te.stylePropInterpolate1,te.stylePropInterpolate2,te.stylePropInterpolate3,te.stylePropInterpolate4,te.stylePropInterpolate5,te.stylePropInterpolate6,te.stylePropInterpolate7,te.stylePropInterpolate8,te.stylePropInterpolateV,te.textInterpolate,te.textInterpolate1,te.textInterpolate2,te.textInterpolate3,te.textInterpolate4,te.textInterpolate5,te.textInterpolate6,te.textInterpolate7,te.textInterpolate8,te.textInterpolateV]);function gm(n,t,e){return Tn(t,null,n).callFn(e,n)}function XQ(n,t){let e=null;return()=>(e||(n.push(new Vu("_t",void 0,V_)),e=Ri(t)),e)}function iC(n){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${n.constructor.name}`)}function Nu(n){return Array.isArray(n)?_r(n.map(Nu)):ht(n,Pa)}function OX(n,t){return Object.getOwnPropertyNames(n).length>0?function(n,t){return ql(Object.getOwnPropertyNames(n).map(e=>{let r,o,s,a,i=n[e];return Array.isArray(i)?([o,r]=i,s=e,a=o!==r):(s=r=e,o=i,a=!1),{key:s,quoted:Twe.test(s),value:t&&a?_r([Nu(o),Nu(r)]):Nu(o)}}))}(n,t):null}function sB(n){for(;VQ(n[n.length-1]);)n.pop();return n}function kwe(n,t){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(i=>{let r=i.split(",").map(o=>ht(o.trim()));e.push(...r)}),t.getConstLiteral(_r(e),!0)}switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return Tn(te.resolveForwardRef).callFn([n.predicate.expression])}}var sh=class{constructor(){this.values=[]}set(t,e){e&&this.values.push({key:t,value:e,quoted:!1})}toLiteralMap(){return ql(this.values)}};function wm(n){let{expressions:t,strings:e}=n;return 1===t.length&&2===e.length&&""===e[0]&&""===e[1]?1:t.length+e.length}function cD(n){let t=[],e=null,i=null,r=0;for(let o of n){let s=("function"==typeof o.paramsOrFn?o.paramsOrFn():o.paramsOrFn)??[],a=Array.isArray(s)?s:[s];r<500&&i===o.reference&&Rwe.has(i)?(e=e.callFn(a,e.sourceSpan),r++):(null!==e&&t.push(e.toStmt()),e=gm(o.span,o.reference,a),i=o.reference,r=0)}return null!==e&&t.push(e.toStmt()),t}function kX(n,t){let e=null,i={name:n.name,type:n.type,internalType:n.internalType,typeArgumentCount:n.typeArgumentCount,deps:[],target:Nc.Injectable};if(void 0!==n.useClass){let l,a=n.useClass.expression.isEquivalent(n.internalType);void 0!==n.deps&&(l=n.deps),e=void 0!==l?nm({...i,delegate:n.useClass.expression,delegateDeps:l,delegateType:f_.Class}):a?nm(i):{statements:[],expression:FX(n.type.value,n.useClass.expression,t)}}else e=void 0!==n.useFactory?void 0!==n.deps?nm({...i,delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:f_.Function}):{statements:[],expression:ra([],[new Do(n.useFactory.callFn([]))])}:void 0!==n.useValue?nm({...i,expression:n.useValue.expression}):void 0!==n.useExisting?nm({...i,expression:Tn(te.inject).callFn([n.useExisting.expression])}):{statements:[],expression:FX(n.type.value,n.internalType,t)};let r=n.internalType,o=new sh;return o.set("token",r),o.set("factory",e.expression),null!==n.providedIn.expression.value&&o.set("providedIn",function({expression:n,forwardRef:t}){switch(t){case 0:case 1:return n;case 2:return function(n){return Tn(te.forwardRef).callFn([ra([],[new Do(n)])])}(n)}}(n.providedIn)),{expression:Tn(te.\u0275\u0275defineInjectable).callFn([o.toLiteralMap()],void 0,!0),type:Fwe(n),statements:e.statements}}function Fwe(n){return new Vc(Tn(te.InjectableDeclaration,[ID(n.type.type,n.typeArgumentCount)]))}function FX(n,t,e){return n.node===t.node?t.prop("\u0275fac"):NX(e?Tn(te.resolveForwardRef).callFn([t]):t)}function NX(n){return ra([new ia("t",V_)],[new Do(n.prop("\u0275fac").callFn([Ri("t")]))])}var Nwe=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//],D_=class{constructor(t,e){this.start=t,this.end=e}static fromArray(t){return t?(function(n,t){if(null!=t&&(!Array.isArray(t)||2!=t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){let e=t[0],i=t[1];Nwe.forEach(r=>{if(r.test(e)||r.test(i))throw new Error(`['${e}', '${i}'] contains unusable interpolation symbol.`)})}}(0,t),new D_(t[0],t[1])):Pu}},Pu=new D_("{{","}}"),th=123,Ou=125;function QV(n){return n>=9&&n<=32||160==n}function $p(n){return 48<=n&&n<=57}function KV(n){return n>=97&&n<=122||n>=65&&n<=90}function cK(n){return 10===n||13===n}function VX(n){return 48<=n&&n<=55}function WB(n){return 39===n||34===n||96===n}var vm=class{constructor(t,e,i,r){this.file=t,this.offset=e,this.line=i,this.col=r}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let e=this.file.content,i=e.length,r=this.offset,o=this.line,s=this.col;for(;r>0&&t<0;)if(r--,t++,10==e.charCodeAt(r)){o--;let l=e.substring(0,r-1).lastIndexOf(String.fromCharCode(10));s=l>0?r-l:r}else s--;for(;r<i&&t>0;){let a=e.charCodeAt(r);r++,t--,10==a?(o++,s=0):s++}return new vm(this.file,r,o,s)}getContext(t,e){let i=this.file.content,r=this.offset;if(null!=r){r>i.length-1&&(r=i.length-1);let o=r,s=0,a=0;for(;s<t&&r>0&&(r--,s++,"\n"!=i[r]||++a!=e););for(s=0,a=0;s<t&&o<i.length-1&&(o++,s++,"\n"!=i[o]||++a!=e););return{before:i.substring(r,this.offset),after:i.substring(this.offset,o+1)}}return null}},pD=class{constructor(t,e){this.content=t,this.url=e}},Go=class{constructor(t,e,i=t,r=null){this.start=t,this.end=e,this.fullStart=i,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},ku=(()=>{return(n=ku||(ku={}))[n.WARNING=0]="WARNING",n[n.ERROR=1]="ERROR",ku;var n})(),ym=class{constructor(t,e,i=ku.ERROR){this.span=t,this.msg=e,this.level=i}contextualMessage(){let t=this.span.start.getContext(100,3);return t?`${this.msg} ("${t.before}[${ku[this.level]} ->]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},Zwe=0;function m_(n){return n.replace(/\W/g,"_")}var HT,HX='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',qB=class extends NB{constructor(){super(!1)}visitWrappedNodeExpr(t,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(t,e){return e.print(t,`var ${t.name}`),t.value&&(e.print(t," = "),t.value.visitExpression(this,e)),e.println(t,";"),null}visitTaggedTemplateExpr(t,e){let i=t.template.elements;return t.tag.visitExpression(this,e),e.print(t,`(${HX}(`),e.print(t,`[${i.map(r=>rm(r.text,!1)).join(", ")}], `),e.print(t,`[${i.map(r=>rm(r.rawText,!1)).join(", ")}])`),t.template.expressions.forEach(r=>{e.print(t,", "),r.visitExpression(this,e)}),e.print(t,")"),null}visitFunctionExpr(t,e){return e.print(t,`function${t.name?" "+t.name:""}(`),this._visitParams(t.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print(t,"}"),null}visitDeclareFunctionStmt(t,e){return e.print(t,`function ${t.name}(`),this._visitParams(t.params,e),e.println(t,") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println(t,"}"),null}visitLocalizedString(t,e){e.print(t,`$localize(${HX}(`);let i=[t.serializeI18nHead()];for(let r=1;r<t.messageParts.length;r++)i.push(t.serializeI18nTemplatePart(r));return e.print(t,`[${i.map(r=>rm(r.cooked,!1)).join(", ")}], `),e.print(t,`[${i.map(r=>rm(r.raw,!1)).join(", ")}])`),t.expressions.forEach(r=>{e.print(t,", "),r.visitExpression(this,e)}),e.print(t,")"),null}_visitParams(t,e){this.visitAllObjects(i=>e.print(null,i.name),t,e,",")}};function UX(...n){if(!p_.trustedTypes)return new Function(...n);let i=`(function anonymous(${n.slice(0,-1).join(",")}\n) { ${n[n.length-1]}\n})`,r=p_.eval(function(n){return function(){if(void 0===HT&&(HT=null,p_.trustedTypes))try{HT=p_.trustedTypes.createPolicy("angular#unsafe-jit",{createScript:n=>n})}catch{}return HT}()?.createScript(n)||n}(i));return void 0===r.bind?new Function(...n):(r.toString=()=>i,r.bind(p_))}var XB=class extends qB{constructor(t){super(),this.refResolver=t,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(t){new Do(new x_(this._evalExportedVars.map(i=>new tD(i,Ri(i),!1)))).visitStatement(this,t)}getArgs(){let t={};for(let e=0;e<this._evalArgNames.length;e++)t[this._evalArgNames[e]]=this._evalArgValues[e];return t}visitExternalExpr(t,e){return this._emitReferenceToExternal(t,this.refResolver.resolveExternalReference(t.value),e),null}visitWrappedNodeExpr(t,e){return this._emitReferenceToExternal(t,t.node,e),null}visitDeclareVarStmt(t,e){return t.hasModifier(ll.Exported)&&this._evalExportedVars.push(t.name),super.visitDeclareVarStmt(t,e)}visitDeclareFunctionStmt(t,e){return t.hasModifier(ll.Exported)&&this._evalExportedVars.push(t.name),super.visitDeclareFunctionStmt(t,e)}_emitReferenceToExternal(t,e,i){let r=this._evalArgValues.indexOf(e);if(-1===r){r=this._evalArgValues.length,this._evalArgValues.push(e);let o=function(n){if(!n||!n.reference)return null;let t=n.reference;if(t.__anonymousType)return t.__anonymousType;if(t.__forward_ref__)return"__forward_ref__";let e=kQ(t);return e.indexOf("(")>=0?(e="anonymous_"+Zwe++,t.__anonymousType=e):e=m_(e),e}({reference:e})||"val";this._evalArgNames.push(`jit_${o}_${r}`)}i.print(t,this._evalArgNames[r])}};function zX(n){let t=new sh;null!==n.providers&&t.set("providers",n.providers),n.imports.length>0&&t.set("imports",_r(n.imports));let e=Tn(te.defineInjector).callFn([t.toLiteralMap()],void 0,!0),i=function(n){return new Vc(Tn(te.InjectorDeclaration,[new Vc(n.type.type)]))}(n);return{expression:e,type:i,statements:[]}}var g_=(()=>{return(n=g_||(g_={}))[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",g_;var n})();function iSe(n){let{adjacentType:t,internalType:e,bootstrap:i,declarations:r,imports:o,exports:s,schemas:a,containsForwardDecls:l,selectorScopeMode:c,id:u}=n,d=[],p=new sh;if(p.set("type",e),i.length>0&&p.set("bootstrap",om(i,l)),c===g_.Inline)r.length>0&&p.set("declarations",om(r,l)),o.length>0&&p.set("imports",om(o,l)),s.length>0&&p.set("exports",om(s,l));else if(c===g_.SideEffect){let m=function(n){let{adjacentType:t,declarations:e,imports:i,exports:r,containsForwardDecls:o}=n,s=new sh;if(e.length>0&&s.set("declarations",om(e,o)),i.length>0&&s.set("imports",om(i,o)),r.length>0&&s.set("exports",om(r,o)),0===Object.keys(s.values).length)return null;let l=function(n){return function(n,t){let e=new y_({name:"ngJitMode",moduleName:null}),i=new gr(Cn.Identical,new v_(e),ht("undefined")),r=new gr(Cn.Or,i,e,void 0,void 0,!0);return new gr(Cn.And,r,t)}(0,n)}(new oh(Tn(te.setNgModuleScope),[t,s.toLiteralMap()])),c=new pm([],[l.toStmt()]);return new oh(c,[]).toStmt()}(n);null!==m&&d.push(m)}null!==a&&a.length>0&&p.set("schemas",_r(a.map(m=>m.value))),null!==u&&(p.set("id",u),d.push(Tn(te.registerNgModuleType).callFn([t,u]).toStmt()));let h=Tn(te.defineNgModule).callFn([p.toLiteralMap()],void 0,!0),f=function({type:n,declarations:t,exports:e,imports:i,includeImportTypes:r,publicDeclarationTypes:o}){return new Vc(Tn(te.NgModuleDeclaration,[new Vc(n.type),null===o?aB(t):aSe(o),r?aB(i):Jd,aB(e)]))}(n);return{expression:h,type:f,statements:d}}function aB(n){let t=n.map(e=>BV(e.type));return n.length>0?ul(_r(t)):Jd}function aSe(n){let t=n.map(e=>BV(e));return n.length>0?ul(_r(t)):Jd}function jX(n){let t=[];t.push({key:"name",value:ht(n.pipeName),quoted:!1}),t.push({key:"type",value:n.type.value,quoted:!1}),t.push({key:"pure",value:ht(n.pure),quoted:!1}),n.isStandalone&&t.push({key:"standalone",value:ht(!0),quoted:!1});let e=Tn(te.definePipe).callFn([ql(t)],void 0,!0),i=function(n){return new Vc(Tn(te.PipeDeclaration,[ID(n.type.type,n.typeArgumentCount),new Vc(new cl(n.pipeName)),new Vc(new cl(n.isStandalone))]))}(n);return{expression:e,type:i,statements:[]}}var __=(()=>{return(n=__||(__={}))[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",__;var n})(),RC=class{constructor(t,e,i,r){this.input=e,this.errLocation=i,this.ctxLocation=r,this.message=`Parser Error: ${t} ${i} [${e}] in ${r}`}},bm=class{constructor(t,e){this.start=t,this.end=e}toAbsolute(t){return new al(t+this.start,t+this.end)}},Ao=class{constructor(t,e){this.span=t,this.sourceSpan=e}toString(){return"AST"}},A_=class extends Ao{constructor(t,e,i){super(t,e),this.nameSpan=i}},Ia=class extends Ao{visit(t,e=null){}},xm=class extends Ao{visit(t,e=null){return t.visitImplicitReceiver(this,e)}},OC=class extends xm{visit(t,e=null){return t.visitThisReceiver?.(this,e)}},kC=class extends Ao{constructor(t,e,i){super(t,e),this.expressions=i}visit(t,e=null){return t.visitChain(this,e)}},FC=class extends Ao{constructor(t,e,i,r,o){super(t,e),this.condition=i,this.trueExp=r,this.falseExp=o}visit(t,e=null){return t.visitConditional(this,e)}},Lu=class extends A_{constructor(t,e,i,r,o){super(t,e,i),this.receiver=r,this.name=o}visit(t,e=null){return t.visitPropertyRead(this,e)}},NC=class extends A_{constructor(t,e,i,r,o,s){super(t,e,i),this.receiver=r,this.name=o,this.value=s}visit(t,e=null){return t.visitPropertyWrite(this,e)}},LC=class extends A_{constructor(t,e,i,r,o){super(t,e,i),this.receiver=r,this.name=o}visit(t,e=null){return t.visitSafePropertyRead(this,e)}},I_=class extends Ao{constructor(t,e,i,r){super(t,e),this.receiver=i,this.key=r}visit(t,e=null){return t.visitKeyedRead(this,e)}},P_=class extends Ao{constructor(t,e,i,r){super(t,e),this.receiver=i,this.key=r}visit(t,e=null){return t.visitSafeKeyedRead(this,e)}},BC=class extends Ao{constructor(t,e,i,r,o){super(t,e),this.receiver=i,this.key=r,this.value=o}visit(t,e=null){return t.visitKeyedWrite(this,e)}},R_=class extends A_{constructor(t,e,i,r,o,s){super(t,e,s),this.exp=i,this.name=r,this.args=o}visit(t,e=null){return t.visitPipe(this,e)}},ta=class extends Ao{constructor(t,e,i){super(t,e),this.value=i}visit(t,e=null){return t.visitLiteralPrimitive(this,e)}},O_=class extends Ao{constructor(t,e,i){super(t,e),this.expressions=i}visit(t,e=null){return t.visitLiteralArray(this,e)}},VC=class extends Ao{constructor(t,e,i,r){super(t,e),this.keys=i,this.values=r}visit(t,e=null){return t.visitLiteralMap(this,e)}},vs=class extends Ao{constructor(t,e,i,r){super(t,e),this.strings=i,this.expressions=r}visit(t,e=null){return t.visitInterpolation(this,e)}},Gl=class extends Ao{constructor(t,e,i,r,o){super(t,e),this.operation=i,this.left=r,this.right=o}visit(t,e=null){return t.visitBinary(this,e)}},zc=class extends Gl{constructor(t,e,i,r,o,s,a){super(t,e,o,s,a),this.operator=i,this.expr=r,this.left=null,this.right=null,this.operation=null}static createMinus(t,e,i){return new zc(t,e,"-",i,"-",new ta(t,e,0),i)}static createPlus(t,e,i){return new zc(t,e,"+",i,"-",i,new ta(t,e,0))}visit(t,e=null){return void 0!==t.visitUnary?t.visitUnary(this,e):t.visitBinary(this,e)}},HC=class extends Ao{constructor(t,e,i){super(t,e),this.expression=i}visit(t,e=null){return t.visitPrefixNot(this,e)}},UC=class extends Ao{constructor(t,e,i){super(t,e),this.expression=i}visit(t,e=null){return t.visitNonNullAssert(this,e)}},ah=class extends Ao{constructor(t,e,i,r,o){super(t,e),this.receiver=i,this.args=r,this.argumentSpan=o}visit(t,e=null){return t.visitCall(this,e)}},k_=class extends Ao{constructor(t,e,i,r,o){super(t,e),this.receiver=i,this.args=r,this.argumentSpan=o}visit(t,e=null){return t.visitSafeCall(this,e)}},al=class{constructor(t,e){this.start=t,this.end=e}},Ru=class extends Ao{constructor(t,e,i,r,o){super(new bm(0,null===e?0:e.length),new al(r,null===e?r:r+e.length)),this.ast=t,this.source=e,this.location=i,this.errors=o}visit(t,e=null){return t.visitASTWithSource?t.visitASTWithSource(this,e):this.ast.visit(t,e)}toString(){return`${this.source} in ${this.location}`}},zC=class{constructor(t,e,i){this.sourceSpan=t,this.key=e,this.value=i}},ZB=class{visit(t,e){t.visit(this,e)}visitUnary(t,e){this.visit(t.expr,e)}visitBinary(t,e){this.visit(t.left,e),this.visit(t.right,e)}visitChain(t,e){this.visitAll(t.expressions,e)}visitConditional(t,e){this.visit(t.condition,e),this.visit(t.trueExp,e),this.visit(t.falseExp,e)}visitPipe(t,e){this.visit(t.exp,e),this.visitAll(t.args,e)}visitImplicitReceiver(t,e){}visitThisReceiver(t,e){}visitInterpolation(t,e){this.visitAll(t.expressions,e)}visitKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitKeyedWrite(t,e){this.visit(t.receiver,e),this.visit(t.key,e),this.visit(t.value,e)}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitLiteralPrimitive(t,e){}visitPrefixNot(t,e){this.visit(t.expression,e)}visitNonNullAssert(t,e){this.visit(t.expression,e)}visitPropertyRead(t,e){this.visit(t.receiver,e)}visitPropertyWrite(t,e){this.visit(t.receiver,e),this.visit(t.value,e)}visitSafePropertyRead(t,e){this.visit(t.receiver,e)}visitSafeKeyedRead(t,e){this.visit(t.receiver,e),this.visit(t.key,e)}visitCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitSafeCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitAll(t,e){for(let i of t)this.visit(i,e)}},JB=class{visitImplicitReceiver(t,e){return t}visitThisReceiver(t,e){return t}visitInterpolation(t,e){return new vs(t.span,t.sourceSpan,t.strings,this.visitAll(t.expressions))}visitLiteralPrimitive(t,e){return new ta(t.span,t.sourceSpan,t.value)}visitPropertyRead(t,e){return new Lu(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitPropertyWrite(t,e){return new NC(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,t.value.visit(this))}visitSafePropertyRead(t,e){return new LC(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitLiteralArray(t,e){return new O_(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitLiteralMap(t,e){return new VC(t.span,t.sourceSpan,t.keys,this.visitAll(t.values))}visitUnary(t,e){switch(t.operator){case"+":return zc.createPlus(t.span,t.sourceSpan,t.expr.visit(this));case"-":return zc.createMinus(t.span,t.sourceSpan,t.expr.visit(this));default:throw new Error(`Unknown unary operator ${t.operator}`)}}visitBinary(t,e){return new Gl(t.span,t.sourceSpan,t.operation,t.left.visit(this),t.right.visit(this))}visitPrefixNot(t,e){return new HC(t.span,t.sourceSpan,t.expression.visit(this))}visitNonNullAssert(t,e){return new UC(t.span,t.sourceSpan,t.expression.visit(this))}visitConditional(t,e){return new FC(t.span,t.sourceSpan,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))}visitPipe(t,e){return new R_(t.span,t.sourceSpan,t.exp.visit(this),t.name,this.visitAll(t.args),t.nameSpan)}visitKeyedRead(t,e){return new I_(t.span,t.sourceSpan,t.receiver.visit(this),t.key.visit(this))}visitKeyedWrite(t,e){return new BC(t.span,t.sourceSpan,t.receiver.visit(this),t.key.visit(this),t.value.visit(this))}visitCall(t,e){return new ah(t.span,t.sourceSpan,t.receiver.visit(this),this.visitAll(t.args),t.argumentSpan)}visitSafeCall(t,e){return new k_(t.span,t.sourceSpan,t.receiver.visit(this),this.visitAll(t.args),t.argumentSpan)}visitAll(t){let e=[];for(let i=0;i<t.length;++i)e[i]=t[i].visit(this);return e}visitChain(t,e){return new kC(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitSafeKeyedRead(t,e){return new P_(t.span,t.sourceSpan,t.receiver.visit(this),t.key.visit(this))}},$B=class{visitImplicitReceiver(t,e){return t}visitThisReceiver(t,e){return t}visitInterpolation(t,e){let i=this.visitAll(t.expressions);return i!==t.expressions?new vs(t.span,t.sourceSpan,t.strings,i):t}visitLiteralPrimitive(t,e){return t}visitPropertyRead(t,e){let i=t.receiver.visit(this);return i!==t.receiver?new Lu(t.span,t.sourceSpan,t.nameSpan,i,t.name):t}visitPropertyWrite(t,e){let i=t.receiver.visit(this),r=t.value.visit(this);return i!==t.receiver||r!==t.value?new NC(t.span,t.sourceSpan,t.nameSpan,i,t.name,r):t}visitSafePropertyRead(t,e){let i=t.receiver.visit(this);return i!==t.receiver?new LC(t.span,t.sourceSpan,t.nameSpan,i,t.name):t}visitLiteralArray(t,e){let i=this.visitAll(t.expressions);return i!==t.expressions?new O_(t.span,t.sourceSpan,i):t}visitLiteralMap(t,e){let i=this.visitAll(t.values);return i!==t.values?new VC(t.span,t.sourceSpan,t.keys,i):t}visitUnary(t,e){let i=t.expr.visit(this);if(i!==t.expr)switch(t.operator){case"+":return zc.createPlus(t.span,t.sourceSpan,i);case"-":return zc.createMinus(t.span,t.sourceSpan,i);default:throw new Error(`Unknown unary operator ${t.operator}`)}return t}visitBinary(t,e){let i=t.left.visit(this),r=t.right.visit(this);return i!==t.left||r!==t.right?new Gl(t.span,t.sourceSpan,t.operation,i,r):t}visitPrefixNot(t,e){let i=t.expression.visit(this);return i!==t.expression?new HC(t.span,t.sourceSpan,i):t}visitNonNullAssert(t,e){let i=t.expression.visit(this);return i!==t.expression?new UC(t.span,t.sourceSpan,i):t}visitConditional(t,e){let i=t.condition.visit(this),r=t.trueExp.visit(this),o=t.falseExp.visit(this);return i!==t.condition||r!==t.trueExp||o!==t.falseExp?new FC(t.span,t.sourceSpan,i,r,o):t}visitPipe(t,e){let i=t.exp.visit(this),r=this.visitAll(t.args);return i!==t.exp||r!==t.args?new R_(t.span,t.sourceSpan,i,t.name,r,t.nameSpan):t}visitKeyedRead(t,e){let i=t.receiver.visit(this),r=t.key.visit(this);return i!==t.receiver||r!==t.key?new I_(t.span,t.sourceSpan,i,r):t}visitKeyedWrite(t,e){let i=t.receiver.visit(this),r=t.key.visit(this),o=t.value.visit(this);return i!==t.receiver||r!==t.key||o!==t.value?new BC(t.span,t.sourceSpan,i,r,o):t}visitAll(t){let e=[],i=!1;for(let r=0;r<t.length;++r){let o=t[r],s=o.visit(this);e[r]=s,i=i||s!==o}return i?e:t}visitChain(t,e){let i=this.visitAll(t.expressions);return i!==t.expressions?new kC(t.span,t.sourceSpan,i):t}visitCall(t,e){let i=t.receiver.visit(this),r=this.visitAll(t.args);return i!==t.receiver||r!==t.args?new ah(t.span,t.sourceSpan,i,r,t.argumentSpan):t}visitSafeCall(t,e){let i=t.receiver.visit(this),r=this.visitAll(t.args);return i!==t.receiver||r!==t.args?new k_(t.span,t.sourceSpan,i,r,t.argumentSpan):t}visitSafeKeyedRead(t,e){let i=t.receiver.visit(this),r=t.key.visit(this);return i!==t.receiver||r!==t.key?new P_(t.span,t.sourceSpan,i,r):t}},pC=class{constructor(t,e,i,r,o,s){this.name=t,this.expression=e,this.type=i,this.sourceSpan=r,this.keySpan=o,this.valueSpan=s,this.isLiteral=this.type===ih.LITERAL_ATTR,this.isAnimation=this.type===ih.ANIMATION}},ih=(()=>{return(n=ih||(ih={}))[n.DEFAULT=0]="DEFAULT",n[n.LITERAL_ATTR=1]="LITERAL_ATTR",n[n.ANIMATION=2]="ANIMATION",ih;var n})(),hD=class{constructor(t,e,i,r,o,s,a){this.name=t,this.targetOrPhase=e,this.type=i,this.handler=r,this.sourceSpan=o,this.handlerSpan=s,this.keySpan=a}},eV=class{constructor(t,e,i,r,o){this.name=t,this.value=e,this.sourceSpan=i,this.keySpan=r,this.valueSpan=o}},fD=class{constructor(t,e,i,r,o,s,a,l){this.name=t,this.type=e,this.securityContext=i,this.value=r,this.unit=o,this.sourceSpan=s,this.keySpan=a,this.valueSpan=l}},jC=class{};function cSe(n,t,e,i,r,o,s){n||(n=new mD(s));let a=function(n,t){return function(n,t){let e=new iV(n);return t.visit(e)}(n,t)}({createLiteralArrayConverter:d=>p=>_r(p),createLiteralMapConverter:d=>p=>ql(d.map((f,m)=>({key:f.key,value:p[m],quoted:f.quoted}))),createPipeConverter:d=>{throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${d}`)}},e),l=new GC(n,t,i,!1,r,o),c=[];hK(a.visit(l,zi.Statement),c),function(n,t,e){for(let i=n-1;i>=0;i--)e.unshift(pK(t,i))}(l.temporaryCount,i,c),l.usesImplicitReceiver&&n.notifyImplicitReceiverUse();let u=c.length-1;if(u>=0){let d=c[u];d instanceof Hu&&(c[u]=new Do(d.expr))}return c}function uK(n,t,e,i){n||(n=new mD);let r=new GC(n,t,i,!1),o=e.visit(r,zi.Expression),s=dK(r,i);return r.usesImplicitReceiver&&n.notifyImplicitReceiverUse(),new class{constructor(t,e){this.stmts=t,this.currValExpr=e}}(s,o)}function dK(n,t){let e=[];for(let i=0;i<n.temporaryCount;i++)e.push(pK(t,i));return e}function nV(n,t){return`tmp_${n}_${t}`}function pK(n,t){return new Vu(nV(n,t))}jC.event=Ri("$event");var zi=(()=>{return(n=zi||(zi={}))[n.Statement=0]="Statement",n[n.Expression=1]="Expression",zi;var n})();function GX(n,t){if(n!==zi.Expression)throw new Error(`Expected an expression, but saw ${t}`)}function $s(n,t){return n===zi.Statement?t.toStmt():t}var iV=class extends JB{constructor(t){super(),this._converterFactory=t}visitPipe(t,e){let i=[t.exp,...t.args].map(r=>r.visit(this,e));return new rh(t.span,t.sourceSpan,i,this._converterFactory.createPipeConverter(t.name,i.length))}visitLiteralArray(t,e){let i=t.expressions.map(r=>r.visit(this,e));return new rh(t.span,t.sourceSpan,i,this._converterFactory.createLiteralArrayConverter(t.expressions.length))}visitLiteralMap(t,e){let i=t.values.map(r=>r.visit(this,e));return new rh(t.span,t.sourceSpan,i,this._converterFactory.createLiteralMapConverter(t.keys))}},GC=class{constructor(t,e,i,r,o,s){this._localResolver=t,this._implicitReceiver=e,this.bindingId=i,this.supportsInterpolation=r,this.baseSourceSpan=o,this.implicitReceiverAccesses=s,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(t,e){let i;switch(t.operator){case"+":i=am.Plus;break;case"-":i=am.Minus;break;default:throw new Error(`Unsupported operator ${t.operator}`)}return $s(e,new CC(i,this._visit(t.expr,zi.Expression),void 0,this.convertSourceSpan(t.span)))}visitBinary(t,e){let i;switch(t.operation){case"+":i=Cn.Plus;break;case"-":i=Cn.Minus;break;case"*":i=Cn.Multiply;break;case"/":i=Cn.Divide;break;case"%":i=Cn.Modulo;break;case"&&":i=Cn.And;break;case"||":i=Cn.Or;break;case"==":i=Cn.Equals;break;case"!=":i=Cn.NotEquals;break;case"===":i=Cn.Identical;break;case"!==":i=Cn.NotIdentical;break;case"<":i=Cn.Lower;break;case">":i=Cn.Bigger;break;case"<=":i=Cn.LowerEquals;break;case">=":i=Cn.BiggerEquals;break;case"??":return this.convertNullishCoalesce(t,e);default:throw new Error(`Unsupported operation ${t.operation}`)}return $s(e,new gr(i,this._visit(t.left,zi.Expression),this._visit(t.right,zi.Expression),void 0,this.convertSourceSpan(t.span)))}visitChain(t,e){return function(n,t){if(n!==zi.Statement)throw new Error(`Expected a statement, but saw ${t}`)}(e,t),this.visitAll(t.expressions,e)}visitConditional(t,e){return $s(e,this._visit(t.condition,zi.Expression).conditional(this._visit(t.trueExp,zi.Expression),this._visit(t.falseExp,zi.Expression),this.convertSourceSpan(t.span)))}visitPipe(t,e){throw new Error(`Illegal state: Pipes should have been converted into functions. Pipe: ${t.name}`)}visitImplicitReceiver(t,e){return GX(e,t),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(t,e){return this.visitImplicitReceiver(t,e)}visitInterpolation(t,e){if(!this.supportsInterpolation)throw new Error("Unexpected interpolation");GX(e,t);let i=[];for(let o=0;o<t.strings.length-1;o++)i.push(ht(t.strings[o])),i.push(this._visit(t.expressions[o],zi.Expression));i.push(ht(t.strings[t.strings.length-1]));let r=t.strings;return 2===r.length&&""===r[0]&&""===r[1]?i=[i[1]]:t.expressions.length>=9&&(i=[_r(i)]),new rV(i)}visitKeyedRead(t,e){let i=this.leftMostSafeNode(t);return i?this.convertSafeAccess(t,i,e):$s(e,this._visit(t.receiver,zi.Expression).key(this._visit(t.key,zi.Expression)))}visitKeyedWrite(t,e){let i=this._visit(t.receiver,zi.Expression),r=this._visit(t.key,zi.Expression),o=this._visit(t.value,zi.Expression);return i===this._implicitReceiver&&this._localResolver.maybeRestoreView(),$s(e,i.key(r).set(o))}visitLiteralArray(t,e){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(t,e){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(t,e){return $s(e,ht(t.value,null==t.value||!0===t.value||!0===t.value?Pa:void 0,this.convertSourceSpan(t.span)))}_getLocal(t,e){return this._localResolver.globals?.has(t)&&e instanceof OC?null:this._localResolver.getLocal(t)}visitPrefixNot(t,e){return $s(e,function(n,t){return new xC(n,void 0)}(this._visit(t.expression,zi.Expression)))}visitNonNullAssert(t,e){return $s(e,this._visit(t.expression,zi.Expression))}visitPropertyRead(t,e){let i=this.leftMostSafeNode(t);if(i)return this.convertSafeAccess(t,i,e);{let r=null,o=this.usesImplicitReceiver,s=this._visit(t.receiver,zi.Expression);return s===this._implicitReceiver&&(r=this._getLocal(t.name,t.receiver),r&&(this.usesImplicitReceiver=o,this.addImplicitReceiverAccess(t.name))),null==r&&(r=s.prop(t.name,this.convertSourceSpan(t.span))),$s(e,r)}}visitPropertyWrite(t,e){let i=this._visit(t.receiver,zi.Expression),r=this.usesImplicitReceiver,o=null;if(i===this._implicitReceiver){let s=this._getLocal(t.name,t.receiver);if(s){if(!(s instanceof b_))throw new Error(`Cannot assign value "${t.value instanceof Lu?t.value.name:void 0}" to template variable "${t.name}". Template variables are read-only.`);o=s,this.usesImplicitReceiver=r,this.addImplicitReceiverAccess(t.name)}}return null===o&&(o=i.prop(t.name,this.convertSourceSpan(t.span))),$s(e,o.set(this._visit(t.value,zi.Expression)))}visitSafePropertyRead(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)}visitSafeKeyedRead(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)}visitAll(t,e){return t.map(i=>this._visit(i,e))}visitCall(t,e){let i=this.leftMostSafeNode(t);if(i)return this.convertSafeAccess(t,i,e);let r=this.visitAll(t.args,zi.Expression);if(t instanceof rh)return $s(e,t.converter(r));let o=t.receiver;if(o instanceof Lu&&o.receiver instanceof xm&&!(o.receiver instanceof OC)&&"$any"===o.name){if(1!==r.length)throw new Error(`Invalid call to $any, expected 1 argument but received ${r.length||"none"}`);return $s(e,r[0])}return $s(e,this._visit(o,zi.Expression).callFn(r,this.convertSourceSpan(t.span)))}visitSafeCall(t,e){return this.convertSafeAccess(t,this.leftMostSafeNode(t),e)}_visit(t,e){return this._resultMap.get(t)||(this._nodeMap.get(t)||t).visit(this,e)}convertSafeAccess(t,e,i){let o,r=this._visit(e.receiver,zi.Expression);this.needsTemporaryInSafeAccess(e.receiver)&&(o=this.allocateTemporary(),r=o.set(r),this._resultMap.set(e.receiver,o));let s=r.isBlank();this._nodeMap.set(e,e instanceof k_?new ah(e.span,e.sourceSpan,e.receiver,e.args,e.argumentSpan):e instanceof P_?new I_(e.span,e.sourceSpan,e.receiver,e.key):new Lu(e.span,e.sourceSpan,e.nameSpan,e.receiver,e.name));let a=this._visit(t,zi.Expression);return this._nodeMap.delete(e),o&&this.releaseTemporary(o),$s(i,s.conditional(PB,a))}convertNullishCoalesce(t,e){let i=this._visit(t.left,zi.Expression),r=this._visit(t.right,zi.Expression),o=this.allocateTemporary();return this.releaseTemporary(o),$s(e,o.set(i).notIdentical(PB).and(o.notIdentical(ht(void 0))).conditional(o,r))}leftMostSafeNode(t){let e=(i,r)=>(this._nodeMap.get(r)||r).visit(i);return t.visit({visitUnary:i=>null,visitBinary:i=>null,visitChain:i=>null,visitConditional:i=>null,visitCall(i){return e(this,i.receiver)},visitSafeCall(i){return e(this,i.receiver)||i},visitImplicitReceiver:i=>null,visitThisReceiver:i=>null,visitInterpolation:i=>null,visitKeyedRead(i){return e(this,i.receiver)},visitKeyedWrite:i=>null,visitLiteralArray:i=>null,visitLiteralMap:i=>null,visitLiteralPrimitive:i=>null,visitPipe:i=>null,visitPrefixNot:i=>null,visitNonNullAssert:i=>null,visitPropertyRead(i){return e(this,i.receiver)},visitPropertyWrite:i=>null,visitSafePropertyRead(i){return e(this,i.receiver)||i},visitSafeKeyedRead(i){return e(this,i.receiver)||i}})}needsTemporaryInSafeAccess(t){let e=(r,o)=>o&&(this._nodeMap.get(o)||o).visit(r);return t.visit({visitUnary(r){return e(this,r.expr)},visitBinary(r){return e(this,r.left)||e(this,r.right)},visitChain:r=>!1,visitConditional(r){return e(this,r.condition)||e(this,r.trueExp)||e(this,r.falseExp)},visitCall:r=>!0,visitSafeCall:r=>!0,visitImplicitReceiver:r=>!1,visitThisReceiver:r=>!1,visitInterpolation(r){return((r,o)=>o.some(s=>e(r,s)))(this,r.expressions)},visitKeyedRead:r=>!1,visitKeyedWrite:r=>!1,visitLiteralArray:r=>!0,visitLiteralMap:r=>!0,visitLiteralPrimitive:r=>!1,visitPipe:r=>!0,visitPrefixNot(r){return e(this,r.expression)},visitNonNullAssert(r){return e(this,r.expression)},visitPropertyRead:r=>!1,visitPropertyWrite:r=>!1,visitSafePropertyRead:r=>!1,visitSafeKeyedRead:r=>!1})}allocateTemporary(){let t=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new um(nV(this.bindingId,t))}releaseTemporary(t){if(this._currentTemporary--,t.name!=nV(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${t.name} released out of order`)}convertSourceSpan(t){if(this.baseSourceSpan){let e=this.baseSourceSpan.start.moveBy(t.start),i=this.baseSourceSpan.start.moveBy(t.end),r=this.baseSourceSpan.fullStart.moveBy(t.start);return new Go(e,i,r)}return null}addImplicitReceiverAccess(t){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(t)}};function hK(n,t){Array.isArray(n)?n.forEach(e=>hK(e,t)):t.push(n)}function lB(){throw new Error("Unsupported operation")}var rV=class extends Or{constructor(t){super(null,null),this.args=t,this.isConstant=lB,this.isEquivalent=lB,this.visitExpression=lB}},mD=class{constructor(t){this.globals=t}notifyImplicitReceiverUse(){}maybeRestoreView(){}getLocal(t){return t===jC.event.name?jC.event:null}},rh=class extends ah{constructor(t,e,i,r){super(t,e,new Ia(t,e),i,null),this.converter=r}},mSe=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,gSe=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,WX=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,gD="-shadowcsshost",ZV="-shadowcsscontext",JV="(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",_Se=new RegExp(gD+JV,"gim"),vSe=new RegExp(ZV+JV,"gim"),ySe=new RegExp(ZV+JV,"im"),tm=gD+"-no-combinator",qX=/-shadowcsshost-no-combinator([^\s]*)/,bSe=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],YX=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,d_=/-shadowcsshost/gim,CSe=/:host/gim,MSe=/:host-context/gim,wSe=/\/\*[\s\S]*?\*\//g,ESe=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,cB="%BLOCK%",ASe=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,ISe=/%QUOTED%/g,PSe=new Map([["{","}"]]),RSe=new Map([['"','"'],["'","'"]]),WC=class{constructor(t,e){this.selector=t,this.content=e}};function XX(n,t){let e=QX(n,RSe,"%QUOTED%"),i=QX(e.escapedString,PSe,cB),r=0,o=0;return i.escapedString.replace(ASe,(...s)=>{let a=s[2],l="",c=s[4],u="";c&&c.startsWith("{"+cB)&&(l=i.blocks[r++],c=c.substring(cB.length+1),u="{");let d=t(new WC(a,l));return`${s[1]}${d.selector}${s[3]}${u}${d.content}${c}`}).replace(ISe,()=>e.blocks[o++])}function QX(n,t,e){let l,c,i=[],r=[],o=0,s=0,a=-1;for(let u=0;u<n.length;u++){let d=n[u];"\\"===d?u++:d===c?(o--,0===o&&(r.push(n.substring(a,u)),i.push(e),s=u,a=-1,l=c=void 0)):d===l?o++:0===o&&t.has(d)&&(l=d,c=t.get(d),o=1,a=u+1,i.push(n.substring(s,a)))}return-1!==a?(r.push(n.substring(a)),i.push(e)):i.push(n.substring(s)),new class{constructor(t,e){this.escapedString=t,this.blocks=e}}(i.join(""),r)}function kSe(n,t){let e=n.length;for(let i=1;i<t;i++)for(let r=0;r<e;r++)n[r+i*e]=n[r].slice(0)}function KX(n){let t=n.charCodeAt(0);if(t==n.charCodeAt(n.length-1)&&(39==t||34==t)){let i=n.substring(1,n.length-1);-1==i.indexOf("'")&&-1==i.indexOf('"')&&(n=i)}return n}function fK(n){return n.replace(/[a-z][A-Z]/g,t=>t.charAt(0)+"-"+t.charAt(1)).toLowerCase()}var vD=class{constructor(t){this._directiveExpr=t,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(t){let e=null,i=t.name;switch(t.type){case 0:e=this.registerInputBasedOnName(i,t.value,t.sourceSpan);break;case 3:e=this.registerStyleInput(i,!1,t.value,t.sourceSpan,t.unit);break;case 2:e=this.registerClassInput(i,!1,t.value,t.sourceSpan)}return!!e}registerInputBasedOnName(t,e,i){let r=null,o=t.substring(0,6),s="style"===t||"style."===o||"style!"===o;if(s||!s&&("class"===t||"class."===o||"class!"===o)){let l="."!==t.charAt(5),c=t.slice(l?5:6);r=s?this.registerStyleInput(c,l,e,i):this.registerClassInput(c,l,e,i)}return r}registerStyleInput(t,e,i,r,o){if($X(i))return null;t.startsWith("--")||(t=fK(t));let{property:s,hasOverrideFlag:a,suffix:l}=JX(t),c={name:s,suffix:o="string"==typeof o&&0!==o.length?o:l,value:i,sourceSpan:r,hasOverrideFlag:a};return e?this._styleMapInput=c:((this._singleStyleInputs=this._singleStyleInputs||[]).push(c),ZX(this._stylesIndex,s)),this._lastStylingInput=c,this._firstStylingInput=this._firstStylingInput||c,this._checkForPipes(i),this.hasBindings=!0,c}registerClassInput(t,e,i,r){if($X(i))return null;let{property:o,hasOverrideFlag:s}=JX(t),a={name:o,value:i,sourceSpan:r,hasOverrideFlag:s,suffix:null};return e?this._classMapInput=a:((this._singleClassInputs=this._singleClassInputs||[]).push(a),ZX(this._classesIndex,o)),this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(i),this.hasBindings=!0,a}_checkForPipes(t){t instanceof Ru&&t.ast instanceof R_&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(t){this._initialStyleValues=function(n){let t=[],e=0,i=0,r=0,o=0,s=0,a=null,l=!1;for(;e<n.length;)switch(n.charCodeAt(e++)){case 40:i++;break;case 41:i--;break;case 39:l=l||o>0,0===r?r=39:39===r&&92!==n.charCodeAt(e-1)&&(r=0);break;case 34:l=l||o>0,0===r?r=34:34===r&&92!==n.charCodeAt(e-1)&&(r=0);break;case 58:!a&&0===i&&0===r&&(a=fK(n.substring(s,e-1).trim()),o=e);break;case 59:if(a&&o>0&&0===i&&0===r){let u=n.substring(o,e-1).trim();t.push(a,l?KX(u):u),s=e,o=0,a=null,l=!1}}if(a&&o){let c=n.slice(o).trim();t.push(a,l?KX(c):c)}return t}(t),this._hasInitialValues=!0}registerClassAttr(t){this._initialClassValues=t.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(t){if(this._initialClassValues.length){t.push(ht(1));for(let e=0;e<this._initialClassValues.length;e++)t.push(ht(this._initialClassValues[e]))}if(this._initialStyleValues.length){t.push(ht(2));for(let e=0;e<this._initialStyleValues.length;e+=2)t.push(ht(this._initialStyleValues[e]),ht(this._initialStyleValues[e+1]))}}assignHostAttrs(t,e){this._directiveExpr&&(t.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(t),e.set("hostAttrs",_r(t)))}buildClassMapInstruction(t){return this._classMapInput?this._buildMapBasedInstruction(t,!0,this._classMapInput):null}buildStyleMapInstruction(t){return this._styleMapInput?this._buildMapBasedInstruction(t,!1,this._styleMapInput):null}_buildMapBasedInstruction(t,e,i){let s,r=2,o=i.value.visit(t);return o instanceof vs?(r+=o.expressions.length,s=e?function(n){switch(wm(n)){case 1:return te.classMap;case 3:return te.classMapInterpolate1;case 5:return te.classMapInterpolate2;case 7:return te.classMapInterpolate3;case 9:return te.classMapInterpolate4;case 11:return te.classMapInterpolate5;case 13:return te.classMapInterpolate6;case 15:return te.classMapInterpolate7;case 17:return te.classMapInterpolate8;default:return te.classMapInterpolateV}}(o):function(n){switch(wm(n)){case 1:return te.styleMap;case 3:return te.styleMapInterpolate1;case 5:return te.styleMapInterpolate2;case 7:return te.styleMapInterpolate3;case 9:return te.styleMapInterpolate4;case 11:return te.styleMapInterpolate5;case 13:return te.styleMapInterpolate6;case 15:return te.styleMapInterpolate7;case 17:return te.styleMapInterpolate8;default:return te.styleMapInterpolateV}}(o)):s=e?te.classMap:te.styleMap,{reference:s,calls:[{supportsInterpolation:!0,sourceSpan:i.sourceSpan,allocateBindingSlots:r,params:a=>{let l=a(o);return Array.isArray(l)?l:[l]}}]}}_buildSingleInputs(t,e,i,r,o){let s=[];return e.forEach(a=>{let l=s[s.length-1],c=a.value.visit(i),u=t,d=2;c instanceof vs&&(d+=c.expressions.length,r&&(u=r(c)));let p={sourceSpan:a.sourceSpan,allocateBindingSlots:d,supportsInterpolation:!!r,params:h=>{let f=[];f.push(ht(a.name));let m=h(c);return Array.isArray(m)?f.push(...m):f.push(m),!o&&null!==a.suffix&&f.push(ht(a.suffix)),f}};l&&l.reference===u?l.calls.push(p):s.push({reference:u,calls:[p]})}),s}_buildClassInputs(t){return this._singleClassInputs?this._buildSingleInputs(te.classProp,this._singleClassInputs,t,null,!0):[]}_buildStyleInputs(t){return this._singleStyleInputs?this._buildSingleInputs(te.styleProp,this._singleStyleInputs,t,VSe,!1):[]}buildUpdateLevelInstructions(t){let e=[];if(this.hasBindings){let i=this.buildStyleMapInstruction(t);i&&e.push(i);let r=this.buildClassMapInstruction(t);r&&e.push(r),e.push(...this._buildStyleInputs(t)),e.push(...this._buildClassInputs(t))}return e}};function ZX(n,t){n.has(t)||n.set(t,n.size)}function JX(n){let t=!1,e=n.indexOf("!important");-1!==e&&(n=e>0?n.substring(0,e):"",t=!0);let i=null,r=n,o=n.lastIndexOf(".");return o>0&&(i=n.slice(o+1),r=n.substring(0,o)),{property:r,suffix:i,hasOverrideFlag:t}}function VSe(n){switch(wm(n)){case 1:return te.styleProp;case 3:return te.stylePropInterpolate1;case 5:return te.stylePropInterpolate2;case 7:return te.stylePropInterpolate3;case 9:return te.stylePropInterpolate4;case 11:return te.stylePropInterpolate5;case 13:return te.stylePropInterpolate6;case 15:return te.stylePropInterpolate7;case 17:return te.stylePropInterpolate8;default:return te.stylePropInterpolateV}}function $X(n){return n instanceof Ru&&(n=n.ast),n instanceof Ia}var ni=(()=>{return(n=ni||(ni={}))[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.Error=7]="Error",ni;var n})(),USe=["var","let","as","null","undefined","true","false","if","else","this"],yD=class{tokenize(t){let e=new lV(t),i=[],r=e.scanToken();for(;null!=r;)i.push(r),r=e.scanToken();return i}},jc=class{constructor(t,e,i,r,o){this.index=t,this.end=e,this.type=i,this.numValue=r,this.strValue=o}isCharacter(t){return this.type==ni.Character&&this.numValue==t}isNumber(){return this.type==ni.Number}isString(){return this.type==ni.String}isOperator(t){return this.type==ni.Operator&&this.strValue==t}isIdentifier(){return this.type==ni.Identifier}isPrivateIdentifier(){return this.type==ni.PrivateIdentifier}isKeyword(){return this.type==ni.Keyword}isKeywordLet(){return this.type==ni.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==ni.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==ni.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==ni.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==ni.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==ni.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==ni.Keyword&&"this"==this.strValue}isError(){return this.type==ni.Error}toNumber(){return this.type==ni.Number?this.numValue:-1}toString(){switch(this.type){case ni.Character:case ni.Identifier:case ni.Keyword:case ni.Operator:case ni.PrivateIdentifier:case ni.String:case ni.Error:return this.strValue;case ni.Number:return this.numValue.toString();default:return null}}};function eQ(n,t,e){return new jc(n,t,ni.Character,e,String.fromCharCode(e))}function uB(n,t,e){return new jc(n,t,ni.Operator,0,e)}var dB=new jc(-1,-1,ni.Character,0,""),lV=class{constructor(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let t=this.input,e=this.length,i=this.peek,r=this.index;for(;i<=32;){if(++r>=e){i=0;break}i=t.charCodeAt(r)}if(this.peek=i,this.index=r,r>=e)return null;if(tQ(i))return this.scanIdentifier();if($p(i))return this.scanNumber(r);let o=r;switch(i){case 46:return this.advance(),$p(this.peek)?this.scanNumber(o):eQ(o,this.index,46);case 40:case 41:case th:case Ou:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(o,i);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(o,String.fromCharCode(i));case 63:return this.scanQuestion(o);case 60:case 62:return this.scanComplexOperator(o,String.fromCharCode(i),61,"=");case 33:case 61:return this.scanComplexOperator(o,String.fromCharCode(i),61,"=",61,"=");case 38:return this.scanComplexOperator(o,"&",38,"&");case 124:return this.scanComplexOperator(o,"|",124,"|");case 160:for(;QV(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(i)}]`,0)}scanCharacter(t,e){return this.advance(),eQ(t,this.index,e)}scanOperator(t,e){return this.advance(),uB(t,this.index,e)}scanComplexOperator(t,e,i,r,o,s){this.advance();let a=e;return this.peek==i&&(this.advance(),a+=r),null!=o&&this.peek==o&&(this.advance(),a+=s),uB(t,this.index,a)}scanIdentifier(){let t=this.index;for(this.advance();nQ(this.peek);)this.advance();let e=this.input.substring(t,this.index);return USe.indexOf(e)>-1?function(n,t,e){return new jc(n,t,ni.Keyword,0,e)}(t,this.index,e):function(n,t,e){return new jc(n,t,ni.Identifier,0,e)}(t,this.index,e)}scanPrivateIdentifier(){let t=this.index;if(this.advance(),!tQ(this.peek))return this.error("Invalid character [#]",-1);for(;nQ(this.peek);)this.advance();let e=this.input.substring(t,this.index);return function(n,t,e){return new jc(n,t,ni.PrivateIdentifier,0,e)}(t,this.index,e)}scanNumber(t){let e=this.index===t,i=!1;for(this.advance();;){if(!$p(this.peek))if(95===this.peek){if(!$p(this.input.charCodeAt(this.index-1))||!$p(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);i=!0}else if(46===this.peek)e=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),QSe(this.peek)&&this.advance(),!$p(this.peek))return this.error("Invalid exponent",-1);e=!1}this.advance()}var n;let r=this.input.substring(t,this.index);i&&(r=r.replace(/_/g,""));let o=e?function(n){let t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}(r):parseFloat(r);return function(n,t,e){return new jc(n,t,ni.Number,e,"")}(t,this.index,o)}scanString(){let t=this.index,e=this.peek;this.advance();let i="",r=this.index,o=this.input;for(;this.peek!=e;)if(92==this.peek){let a;if(i+=o.substring(r,this.index),this.advance(),this.peek=this.peek,117==this.peek){let l=o.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(l))return this.error(`Invalid unicode escape [\\u${l}]`,0);a=parseInt(l,16);for(let c=0;c<5;c++)this.advance()}else a=KSe(this.peek),this.advance();i+=String.fromCharCode(a),r=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}let s=o.substring(r,this.index);return this.advance(),function(n,t,e){return new jc(n,t,ni.String,0,e)}(t,this.index,i+s)}scanQuestion(t){this.advance();let e="?";return(63===this.peek||46===this.peek)&&(e+=46===this.peek?".":"?",this.advance()),uB(t,this.index,e)}error(t,e){let i=this.index+e;return function(n,t,e){return new jc(n,t,ni.Error,0,e)}(i,this.index,`Lexer Error: ${t} at column ${i} in expression [${this.input}]`)}};function tQ(n){return 97<=n&&n<=122||65<=n&&n<=90||95==n||36==n}function nQ(n){return KV(n)||$p(n)||95==n||36==n}function QSe(n){return 45==n||43==n}function KSe(n){switch(n){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return n}}var bD=class{constructor(t){this._lexer=t,this.errors=[]}parseAction(t,e,i,r,o=Pu){this._checkNoInterpolation(t,i,o);let s=this._stripComments(t),a=this._lexer.tokenize(s),l=1;e&&(l|=2);let c=new im(t,i,r,a,l,this.errors,0).parseChain();return new Ru(c,t,i,r,this.errors)}parseBinding(t,e,i,r=Pu){let o=this._parseBindingAst(t,e,i,r);return new Ru(o,t,e,i,this.errors)}checkSimpleExpression(t){let e=new dV;return t.visit(e),e.errors}parseSimpleBinding(t,e,i,r=Pu){let o=this._parseBindingAst(t,e,i,r),s=this.checkSimpleExpression(o);return s.length>0&&this._reportError(`Host binding expression cannot contain ${s.join(" ")}`,t,e),new Ru(o,t,e,i,this.errors)}_reportError(t,e,i,r){this.errors.push(new RC(t,e,i,r))}_parseBindingAst(t,e,i,r){this._checkNoInterpolation(t,e,r);let o=this._stripComments(t),s=this._lexer.tokenize(o);return new im(t,e,i,s,0,this.errors,0).parseChain()}parseTemplateBindings(t,e,i,r,o){let s=this._lexer.tokenize(e);return new im(e,i,o,s,0,this.errors,0).parseTemplateBindings({source:t,span:new al(r,r+t.length)})}parseInterpolation(t,e,i,r,o=Pu){let{strings:s,expressions:a,offsets:l}=this.splitInterpolation(t,e,r,o);if(0===a.length)return null;let c=[];for(let u=0;u<a.length;++u){let p=this._stripComments(a[u].text),h=this._lexer.tokenize(p),f=new im(t,e,i,h,0,this.errors,l[u]).parseChain();c.push(f)}return this.createInterpolationAst(s.map(u=>u.text),c,t,e,i)}parseInterpolationExpression(t,e,i){let r=this._stripComments(t),o=this._lexer.tokenize(r),s=new im(t,e,i,o,0,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[s],t,e,i)}createInterpolationAst(t,e,i,r,o){let s=new bm(0,i.length),a=new vs(s,s.toAbsolute(o),t,e);return new Ru(a,i,r,o,this.errors)}splitInterpolation(t,e,i,r=Pu){let o=[],s=[],a=[],l=i?function(n){let t=new Map,e=0,i=0,r=0;for(;r<n.length;){let o=n[r];if(9===o.type){let[s,a]=o.parts;e+=a.length,i+=s.length}else{let s=o.parts.reduce((a,l)=>a+l.length,0);i+=s,e+=s}t.set(i,e),r++}return t}(i):null,c=0,u=!1,d=!1,{start:p,end:h}=r;for(;c<t.length;)if(u){let f=c,m=f+p.length,x=this._getInterpolationEndIndex(t,h,m);if(-1===x){u=!1,d=!0;break}let g=x+h.length,b=t.substring(m,x);0===b.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",t,`at column ${c} in`,e),s.push({text:b,start:f,end:g});let T=(l?.get(f)??f)+p.length;a.push(T),c=g,u=!1}else{let f=c;c=t.indexOf(p,c),-1===c&&(c=t.length);let m=t.substring(f,c);o.push({text:m,start:f,end:c}),u=!0}if(!u)if(d){let f=o[o.length-1];f.text+=t.substring(c),f.end=t.length}else o.push({text:t.substring(c),start:c,end:t.length});return new class{constructor(t,e,i){this.strings=t,this.expressions=e,this.offsets=i}}(o,s,a)}wrapLiteralPrimitive(t,e,i){let r=new bm(0,null==t?0:t.length);return new Ru(new ta(r,r.toAbsolute(i),t),t,e,i,this.errors)}_stripComments(t){let e=this._commentStart(t);return null!=e?t.substring(0,e):t}_commentStart(t){let e=null;for(let i=0;i<t.length-1;i++){let r=t.charCodeAt(i),o=t.charCodeAt(i+1);if(47===r&&47==o&&null==e)return i;e===r?e=null:null==e&&WB(r)&&(e=r)}return null}_checkNoInterpolation(t,e,{start:i,end:r}){let o=-1,s=-1;for(let a of this._forEachUnquotedChar(t,0))if(-1===o)t.startsWith(i)&&(o=a);else if(s=this._getInterpolationEndIndex(t,r,a),s>-1)break;o>-1&&s>-1&&this._reportError(`Got interpolation (${i}${r}) where expression was expected`,t,`at column ${o} in`,e)}_getInterpolationEndIndex(t,e,i){for(let r of this._forEachUnquotedChar(t,i)){if(t.startsWith(e,r))return r;if(t.startsWith("//",r))return t.indexOf(e,r)}return-1}*_forEachUnquotedChar(t,e){let i=null,r=0;for(let o=e;o<t.length;o++){let s=t[o];!WB(t.charCodeAt(o))||null!==i&&i!==s||r%2!=0?null===i&&(yield o):i=null===i?s:null,r="\\"===s?r+1:0}}},sm=(()=>{return(n=sm||(sm={}))[n.None=0]="None",n[n.Writable=1]="Writable",sm;var n})(),im=class{constructor(t,e,i,r,o,s,a){this.input=t,this.location=e,this.absoluteOffset=i,this.tokens=r,this.parseFlags=o,this.errors=s,this.offset=a,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=sm.None,this.sourceSpanCache=new Map,this.index=0}peek(t){let e=this.index+t;return e<this.tokens.length?this.tokens[e]:dB}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(t,e){let i=this.currentEndIndex;if(void 0!==e&&e>this.currentEndIndex&&(i=e),t>i){let r=i;i=t,t=r}return new bm(t,i)}sourceSpan(t,e){let i=`${t}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(i)||this.sourceSpanCache.set(i,this.span(t,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(i)}advance(){this.index++}withContext(t,e){this.context|=t;let i=e();return this.context^=t,i}consumeOptionalCharacter(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(t){this.consumeOptionalCharacter(t)||this.error(`Missing expected ${String.fromCharCode(t)}`)}consumeOptionalOperator(t){return!!this.next.isOperator(t)&&(this.advance(),!0)}expectOperator(t){this.consumeOptionalOperator(t)||this.error(`Missing expected operator ${t}`)}prettyPrintToken(t){return t===dB?"end of input":`token ${t}`}expectIdentifierOrKeyword(){let t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier or keyword`),null)}expectIdentifierOrKeywordOrString(){let t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(t.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(t,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier, keyword, or string`),"")}parseChain(){let t=[],e=this.inputIndex;for(;this.index<this.tokens.length;){let i=this.parsePipe();if(t.push(i),this.consumeOptionalCharacter(59))for(1&this.parseFlags||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){let r=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===r)break}}if(0===t.length){let i=this.offset,r=this.offset+this.input.length;return new Ia(this.span(i,r),this.sourceSpan(i,r))}return 1==t.length?t[0]:new kC(this.span(e),this.sourceSpan(e),t)}parsePipe(){let t=this.inputIndex,e=this.parseExpression();if(this.consumeOptionalOperator("|")){1&this.parseFlags&&this.error("Cannot have a pipe in an action expression");do{let o,s,i=this.inputIndex,r=this.expectIdentifierOrKeyword();null!==r?o=this.sourceSpan(i):(r="",s=-1!==this.next.index?this.next.index:this.input.length+this.offset,o=new bm(s,s).toAbsolute(this.absoluteOffset));let a=[];for(;this.consumeOptionalCharacter(58);)a.push(this.parseExpression());e=new R_(this.span(t),this.sourceSpan(t,s),e,r,a,o)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let t=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let r,i=this.parsePipe();if(this.consumeOptionalCharacter(58))r=this.parsePipe();else{let s=this.input.substring(t,this.inputIndex);this.error(`Conditional expression ${s} requires all 3 expressions`),r=new Ia(this.span(t),this.sourceSpan(t))}return new FC(this.span(t),this.sourceSpan(t),e,i,r)}return e}parseLogicalOr(){let t=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let i=this.parseLogicalAnd();e=new Gl(this.span(t),this.sourceSpan(t),"||",e,i)}return e}parseLogicalAnd(){let t=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let i=this.parseNullishCoalescing();e=new Gl(this.span(t),this.sourceSpan(t),"&&",e,i)}return e}parseNullishCoalescing(){let t=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let i=this.parseEquality();e=new Gl(this.span(t),this.sourceSpan(t),"??",e,i)}return e}parseEquality(){let t=this.inputIndex,e=this.parseRelational();for(;this.next.type==ni.Operator;){let i=this.next.strValue;switch(i){case"==":case"===":case"!=":case"!==":this.advance();let r=this.parseRelational();e=new Gl(this.span(t),this.sourceSpan(t),i,e,r);continue}break}return e}parseRelational(){let t=this.inputIndex,e=this.parseAdditive();for(;this.next.type==ni.Operator;){let i=this.next.strValue;switch(i){case"<":case">":case"<=":case">=":this.advance();let r=this.parseAdditive();e=new Gl(this.span(t),this.sourceSpan(t),i,e,r);continue}break}return e}parseAdditive(){let t=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==ni.Operator;){let i=this.next.strValue;switch(i){case"+":case"-":this.advance();let r=this.parseMultiplicative();e=new Gl(this.span(t),this.sourceSpan(t),i,e,r);continue}break}return e}parseMultiplicative(){let t=this.inputIndex,e=this.parsePrefix();for(;this.next.type==ni.Operator;){let i=this.next.strValue;switch(i){case"*":case"%":case"/":this.advance();let r=this.parsePrefix();e=new Gl(this.span(t),this.sourceSpan(t),i,e,r);continue}break}return e}parsePrefix(){if(this.next.type==ni.Operator){let i,t=this.inputIndex;switch(this.next.strValue){case"+":return this.advance(),i=this.parsePrefix(),zc.createPlus(this.span(t),this.sourceSpan(t),i);case"-":return this.advance(),i=this.parsePrefix(),zc.createMinus(this.span(t),this.sourceSpan(t),i);case"!":return this.advance(),i=this.parsePrefix(),new HC(this.span(t),this.sourceSpan(t),i)}}return this.parseCallChain()}parseCallChain(){let t=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMember(e,t,!1);else if(this.consumeOptionalOperator("?."))e=this.consumeOptionalCharacter(40)?this.parseCall(e,t,!0):this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(e,t,!0):this.parseAccessMember(e,t,!0);else if(this.consumeOptionalCharacter(91))e=this.parseKeyedReadOrWrite(e,t,!1);else if(this.consumeOptionalCharacter(40))e=this.parseCall(e,t,!1);else{if(!this.consumeOptionalOperator("!"))return e;e=new UC(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){let t=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new ta(this.span(t),this.sourceSpan(t),null);if(this.next.isKeywordUndefined())return this.advance(),new ta(this.span(t),this.sourceSpan(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new ta(this.span(t),this.sourceSpan(t),!0);if(this.next.isKeywordFalse())return this.advance(),new ta(this.span(t),this.sourceSpan(t),!1);if(this.next.isKeywordThis())return this.advance(),new OC(this.span(t),this.sourceSpan(t));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let e=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new O_(this.span(t),this.sourceSpan(t),e)}if(this.next.isCharacter(th))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new xm(this.span(t),this.sourceSpan(t)),t,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new ta(this.span(t),this.sourceSpan(t),e)}if(this.next.isString()){let e=this.next.toString();return this.advance(),new ta(this.span(t),this.sourceSpan(t),e)}return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new Ia(this.span(t),this.sourceSpan(t))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new Ia(this.span(t),this.sourceSpan(t))):(this.error(`Unexpected token ${this.next}`),new Ia(this.span(t),this.sourceSpan(t)))}parseExpressionList(t){let e=[];do{if(this.next.isCharacter(t))break;e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}parseLiteralMap(){let t=[],e=[],i=this.inputIndex;if(this.expectCharacter(th),!this.consumeOptionalCharacter(Ou)){this.rbracesExpected++;do{let r=this.inputIndex,o=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();if(t.push({key:s,quoted:o}),o)this.expectCharacter(58),e.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))e.push(this.parsePipe());else{let a=this.span(r),l=this.sourceSpan(r);e.push(new Lu(a,l,l,new xm(a,l),s))}}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(Ou)}return new VC(this.span(i),this.sourceSpan(i),t,e)}parseAccessMember(t,e,i){let a,r=this.inputIndex,o=this.withContext(sm.Writable,()=>{let l=this.expectIdentifierOrKeyword()??"";return 0===l.length&&this.error("Expected identifier for property access",t.span.end),l}),s=this.sourceSpan(r);if(i)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),a=new Ia(this.span(e),this.sourceSpan(e))):a=new LC(this.span(e),this.sourceSpan(e),s,t,o);else if(this.consumeOptionalAssignment()){if(!(1&this.parseFlags))return this.error("Bindings cannot contain assignments"),new Ia(this.span(e),this.sourceSpan(e));let l=this.parseConditional();a=new NC(this.span(e),this.sourceSpan(e),s,t,o,l)}else a=new Lu(this.span(e),this.sourceSpan(e),s,t,o);return a}parseCall(t,e,i){let r=this.inputIndex;this.rparensExpected++;let o=this.parseCallArguments(),s=this.span(r,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let a=this.span(e),l=this.sourceSpan(e);return i?new k_(a,l,t,o,s):new ah(a,l,t,o,s)}consumeOptionalAssignment(){return 2&this.parseFlags&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let t=[];do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}expectTemplateBindingKey(){let t="",e=!1,i=this.currentAbsoluteOffset;do{t+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(t+="-")}while(e);return{source:t,span:new al(i,i+t.length)}}parseTemplateBindings(t){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(t));this.index<this.tokens.length;){let i=this.parseLetBinding();if(i)e.push(i);else{let r=this.expectTemplateBindingKey(),o=this.parseAsBinding(r);o?e.push(o):(r.source=t.source+r.source.charAt(0).toUpperCase()+r.source.substring(1),e.push(...this.parseDirectiveKeywordBindings(r)))}this.consumeStatementTerminator()}return new class{constructor(t,e,i){this.templateBindings=t,this.warnings=e,this.errors=i}}(e,[],this.errors)}parseKeyedReadOrWrite(t,e,i){return this.withContext(sm.Writable,()=>{this.rbracketsExpected++;let r=this.parsePipe();if(r instanceof Ia&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),!this.consumeOptionalOperator("="))return i?new P_(this.span(e),this.sourceSpan(e),t,r):new I_(this.span(e),this.sourceSpan(e),t,r);if(!i){let o=this.parseConditional();return new BC(this.span(e),this.sourceSpan(e),t,r,o)}return this.error("The '?.' operator cannot be used in the assignment"),new Ia(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(t){let e=[];this.consumeOptionalCharacter(58);let i=this.getDirectiveBoundTarget(),r=this.currentAbsoluteOffset,o=this.parseAsBinding(t);o||(this.consumeStatementTerminator(),r=this.currentAbsoluteOffset);let s=new al(t.span.start,r);return e.push(new class{constructor(t,e,i){this.sourceSpan=t,this.key=e,this.value=i}}(s,t,i)),o&&e.push(o),e}getDirectiveBoundTarget(){if(this.next===dB||this.peekKeywordAs()||this.peekKeywordLet())return null;let t=this.parsePipe(),{start:e,end:i}=t.span,r=this.input.substring(e,i);return new Ru(t,r,this.location,this.absoluteOffset+e,this.errors)}parseAsBinding(t){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let i=new al(t.span.start,this.currentAbsoluteOffset);return new zC(i,e,t)}parseLetBinding(){if(!this.peekKeywordLet())return null;let t=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),i=null;this.consumeOptionalOperator("=")&&(i=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let r=new al(t,this.currentAbsoluteOffset);return new zC(r,e,i)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(t,e=null){this.errors.push(new RC(t,this.input,this.locationText(e),this.location)),this.skip()}locationText(t=null){return null==t&&(t=this.index),t<this.tokens.length?`at column ${this.tokens[t].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(t,e){let i=`Private identifiers are not supported. Unexpected private identifier: ${t}`;null!==e&&(i+=`, ${e}`),this.error(i)}skip(){let t=this.next;for(;this.index<this.tokens.length&&!t.isCharacter(59)&&!t.isOperator("|")&&(this.rparensExpected<=0||!t.isCharacter(41))&&(this.rbracesExpected<=0||!t.isCharacter(Ou))&&(this.rbracketsExpected<=0||!t.isCharacter(93))&&!(this.context&sm.Writable&&t.isOperator("="));)this.next.isError()&&this.errors.push(new RC(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next}},dV=class extends ZB{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}},Cm=class{constructor(t,e){this.sourceSpan=t,this.i18n=e}},F_=class extends Cm{constructor(t,e,i,r){super(e,r),this.value=t,this.tokens=i}visit(t,e){return t.visitText(this,e)}},N_=class extends Cm{constructor(t,e,i,r,o,s){super(r,s),this.switchValue=t,this.type=e,this.cases=i,this.switchValueSourceSpan=o}visit(t,e){return t.visitExpansion(this,e)}},hV=class extends Cm{constructor(t,e,i,r,o,s,a){super(i,a),this.name=t,this.value=e,this.keySpan=r,this.valueSpan=o,this.valueTokens=s}visit(t,e){return t.visitAttribute(this,e)}},qC=class extends Cm{constructor(t,e,i,r,o,s=null,a){super(r,a),this.name=t,this.attrs=e,this.children=i,this.startSourceSpan=o,this.endSourceSpan=s}visit(t,e){return t.visitElement(this,e)}},xD=class{constructor(t,e){this.value=t,this.sourceSpan=e}visit(t,e){return t.visitComment(this,e)}};function Uu(n,t,e=null){let i=[],r=n.visit?o=>n.visit(o,e)||o.visit(n,e):o=>o.visit(n,e);return t.forEach(o=>{let s=r(o);s&&i.push(s)}),i}var CD={AElig:"\xc6",AMP:"&",amp:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xc5",angst:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212c",Bscr:"\u212c",bernou:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",breve:"\u02d8",Bumpeq:"\u224e",HumpDownHump:"\u224e",bump:"\u224e",CHcy:"\u0427",COPY:"\xa9",copy:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212d",Cfr:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",cedil:"\xb8",CenterDot:"\xb7",centerdot:"\xb7",middot:"\xb7",Chi:"\u03a7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201d",rdquo:"\u201d",rdquor:"\u201d",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2a74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222f",DoubleContourIntegral:"\u222f",ContourIntegral:"\u222e",conint:"\u222e",oint:"\u222e",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",asympeq:"\u224d",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",DoubleLeftTee:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",acute:"\xb4",DiacriticalDot:"\u02d9",dot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",dblac:"\u02dd",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02dc",tilde:"\u02dc",Diamond:"\u22c4",diam:"\u22c4",diamond:"\u22c4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DoubleDot:"\xa8",die:"\xa8",uml:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21d3",Downarrow:"\u21d3",dArr:"\u21d3",DoubleLeftArrow:"\u21d0",Leftarrow:"\u21d0",lArr:"\u21d0",DoubleLeftRightArrow:"\u21d4",Leftrightarrow:"\u21d4",hArr:"\u21d4",iff:"\u21d4",DoubleLongLeftArrow:"\u27f8",Longleftarrow:"\u27f8",xlArr:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",Longleftrightarrow:"\u27fa",xhArr:"\u27fa",DoubleLongRightArrow:"\u27f9",Longrightarrow:"\u27f9",xrArr:"\u27f9",DoubleRightArrow:"\u21d2",Implies:"\u21d2",Rightarrow:"\u21d2",rArr:"\u21d2",DoubleRightTee:"\u22a8",vDash:"\u22a8",DoubleUpArrow:"\u21d1",Uparrow:"\u21d1",uArr:"\u21d1",DoubleUpDownArrow:"\u21d5",Updownarrow:"\u21d5",vArr:"\u21d5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",duarr:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",leftharpoondown:"\u21bd",lhard:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",rhard:"\u21c1",rightharpoondown:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",top:"\u22a4",DownTeeArrow:"\u21a7",mapstodown:"\u21a7",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrave:"\xc8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21cc",rightleftharpoons:"\u21cc",rlhar:"\u21cc",Escr:"\u2130",expectation:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",blacksquare:"\u25aa",squarf:"\u25aa",squf:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",ggg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22db",gel:"\u22db",gtreqless:"\u22db",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2a7e",geqslant:"\u2a7e",ges:"\u2a7e",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",NestedGreaterGreater:"\u226b",gg:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",caron:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",Poincareplane:"\u210c",HilbertSpace:"\u210b",Hscr:"\u210b",hamilt:"\u210b",Hopf:"\u210d",quaternions:"\u210d",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224f",bumpe:"\u224f",bumpeq:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xcc",Imacr:"\u012a",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222c",Integral:"\u222b",int:"\u222b",Intersection:"\u22c2",bigcap:"\u22c2",xcap:"\u22c2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219e",twoheadleftarrow:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",lang:"\u27e8",langle:"\u27e8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21e4",larrb:"\u21e4",LeftArrowRightArrow:"\u21c6",leftrightarrows:"\u21c6",lrarr:"\u21c6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27e6",lobrk:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",dharl:"\u21c3",downharpoonleft:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",lfloor:"\u230a",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",dashv:"\u22a3",LeftTeeArrow:"\u21a4",mapstoleft:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",vartriangleleft:"\u22b2",vltri:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",ltrie:"\u22b4",trianglelefteq:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",uharl:"\u21bf",upharpoonleft:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",leftharpoonup:"\u21bc",lharu:"\u21bc",LeftVectorBar:"\u2952",LessEqualGreater:"\u22da",leg:"\u22da",lesseqgtr:"\u22da",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",leqslant:"\u2a7d",les:"\u2a7d",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",lAarr:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",longleftarrow:"\u27f5",xlarr:"\u27f5",LongLeftRightArrow:"\u27f7",longleftrightarrow:"\u27f7",xharr:"\u27f7",LongRightArrow:"\u27f6",longrightarrow:"\u27f6",xrarr:"\u27f6",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21b0",lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",NestedLessLess:"\u226a",ll:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\ud835\udd44",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",ZeroWidthSpace:"\u200b",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",nbsp:"\xa0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226f",ngt:"\u226f",ngtr:"\u226f",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",nGtv:"\u226b\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224e\u0338",nbump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",nbumpe:"\u224f\u0338",NotLeftTriangle:"\u22ea",nltri:"\u22ea",ntriangleleft:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",nltrie:"\u22ec",ntrianglelefteq:"\u22ec",NotLess:"\u226e",nless:"\u226e",nlt:"\u226e",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226a\u0338",nLtv:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",npre:"\u2aaf\u0338",npreceq:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",nprcue:"\u22e0",NotReverseElement:"\u220c",notni:"\u220c",notniva:"\u220c",NotRightTriangle:"\u22eb",nrtri:"\u22eb",ntriangleright:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",nrtrie:"\u22ed",ntrianglerighteq:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",nsqsube:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",nsqsupe:"\u22e3",NotSubset:"\u2282\u20d2",nsubset:"\u2282\u20d2",vnsub:"\u2282\u20d2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",nsce:"\u2ab0\u0338",nsucceq:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",nsccue:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",nsupset:"\u2283\u20d2",vnsup:"\u2283\u20d2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\ud835\udca9",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",ohm:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",ldquo:"\u201c",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",oline:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",tbrk:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",part:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",plusmn:"\xb1",pm:"\xb1",Popf:"\u2119",primes:"\u2119",Pr:"\u2abb",Precedes:"\u227a",pr:"\u227a",prec:"\u227a",PrecedesEqual:"\u2aaf",pre:"\u2aaf",preceq:"\u2aaf",PrecedesSlantEqual:"\u227c",prcue:"\u227c",preccurlyeq:"\u227c",PrecedesTilde:"\u227e",precsim:"\u227e",prsim:"\u227e",Prime:"\u2033",Product:"\u220f",prod:"\u220f",Proportional:"\u221d",prop:"\u221d",propto:"\u221d",varpropto:"\u221d",vprop:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUOT:'"',quot:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",rationals:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xae",circledR:"\xae",reg:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",twoheadrightarrow:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",Rfr:"\u211c",real:"\u211c",realpart:"\u211c",ReverseElement:"\u220b",SuchThat:"\u220b",ni:"\u220b",niv:"\u220b",ReverseEquilibrium:"\u21cb",leftrightharpoons:"\u21cb",lrhar:"\u21cb",ReverseUpEquilibrium:"\u296f",duhar:"\u296f",Rho:"\u03a1",RightAngleBracket:"\u27e9",rang:"\u27e9",rangle:"\u27e9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21e5",rarrb:"\u21e5",RightArrowLeftArrow:"\u21c4",rightleftarrows:"\u21c4",rlarr:"\u21c4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27e7",robrk:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",dharr:"\u21c2",downharpoonright:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rfloor:"\u230b",RightTee:"\u22a2",vdash:"\u22a2",RightTeeArrow:"\u21a6",map:"\u21a6",mapsto:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",vartriangleright:"\u22b3",vrtri:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",rtrie:"\u22b5",trianglerighteq:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",uharr:"\u21be",upharpoonright:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",rharu:"\u21c0",rightharpoonup:"\u21c0",RightVectorBar:"\u2953",Ropf:"\u211d",reals:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",rAarr:"\u21db",Rscr:"\u211b",realine:"\u211b",Rsh:"\u21b1",rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",radic:"\u221a",Square:"\u25a1",squ:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228f",sqsub:"\u228f",sqsubset:"\u228f",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",sstarf:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227b",sc:"\u227b",succ:"\u227b",SucceedsEqual:"\u2ab0",sce:"\u2ab0",succeq:"\u2ab0",SucceedsSlantEqual:"\u227d",sccue:"\u227d",succcurlyeq:"\u227d",SucceedsTilde:"\u227f",scsim:"\u227f",succsim:"\u227f",Sum:"\u2211",sum:"\u2211",Sup:"\u22d1",Supset:"\u22d1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xde",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223c",sim:"\u223c",thicksim:"\u223c",thksim:"\u223c",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",tdot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",lowbar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",bbrk:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",bigcup:"\u22c3",xcup:"\u22c3",UnionPlus:"\u228e",uplus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",udarr:"\u21c5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296e",udhar:"\u296e",UpTee:"\u22a5",bot:"\u22a5",bottom:"\u22a5",perp:"\u22a5",UpTeeArrow:"\u21a5",mapstoup:"\u21a5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03d2",upsih:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",bigvee:"\u22c1",xvee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200a",hairsp:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",bigwedge:"\u22c0",xwedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\ud835\udcb5",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",mstpos:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acy:"\u0430",aelig:"\xe6",afr:"\ud835\udd1e",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",and:"\u2227",wedge:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",angle:"\u2220",ange:"\u29a4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",approxeq:"\u224a",apid:"\u224b",apos:"'",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",midast:"*",atilde:"\xe3",auml:"\xe4",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",bcong:"\u224c",backepsilon:"\u03f6",bepsi:"\u03f6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223d",bsim:"\u223d",backsimeq:"\u22cd",bsime:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23b6",bcy:"\u0431",bdquo:"\u201e",ldquor:"\u201e",bemptyv:"\u29b0",beta:"\u03b2",beth:"\u2136",between:"\u226c",twixt:"\u226c",bfr:"\ud835\udd1f",bigcirc:"\u25ef",xcirc:"\u25ef",bigodot:"\u2a00",xodot:"\u2a00",bigoplus:"\u2a01",xoplus:"\u2a01",bigotimes:"\u2a02",xotime:"\u2a02",bigsqcup:"\u2a06",xsqcup:"\u2a06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25bd",xdtri:"\u25bd",bigtriangleup:"\u25b3",xutri:"\u25b3",biguplus:"\u2a04",xuplus:"\u2a04",bkarow:"\u290d",rbarr:"\u290d",blacklozenge:"\u29eb",lozf:"\u29eb",blacktriangle:"\u25b4",utrif:"\u25b4",blacktriangledown:"\u25be",dtrif:"\u25be",blacktriangleleft:"\u25c2",ltrif:"\u25c2",blacktriangleright:"\u25b8",rtrif:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",minusb:"\u229f",boxplus:"\u229e",plusb:"\u229e",boxtimes:"\u22a0",timesb:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2aae",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cemptyv:"\u29b2",cent:"\xa2",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21ba",olarr:"\u21ba",circlearrowright:"\u21bb",orarr:"\u21bb",circledS:"\u24c8",oS:"\u24c8",circledast:"\u229b",oast:"\u229b",circledcirc:"\u229a",ocir:"\u229a",circleddash:"\u229d",odash:"\u229d",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2a6d",copf:"\ud835\udd54",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",curlyeqprec:"\u22de",cuesc:"\u22df",curlyeqsucc:"\u22df",cularr:"\u21b6",curvearrowleft:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curvearrowright:"\u21b7",curarrm:"\u293c",curlyvee:"\u22ce",cuvee:"\u22ce",curlywedge:"\u22cf",cuwed:"\u22cf",curren:"\xa4",cwint:"\u2231",cylcty:"\u232d",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290f",rBarr:"\u290f",dcaron:"\u010f",dcy:"\u0434",ddarr:"\u21ca",downdownarrows:"\u21ca",ddotseq:"\u2a77",eDDot:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03dd",gammad:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",llcorner:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22a1",sdotb:"\u22a1",drcorn:"\u231f",lrcorner:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",triangledown:"\u25bf",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xea",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044d",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",eqslantgtr:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",eqslantless:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",straightepsilon:"\u03f5",varepsilon:"\u03f5",equals:"=",equest:"\u225f",questeq:"\u225f",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212f",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",fork:"\u22d4",pitchfork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",half:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\ud835\udcbb",gEl:"\u2a8c",gtreqqless:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gap:"\u2a86",gtrapprox:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gimel:"\u2137",gjcy:"\u0453",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gnsim:"\u22e7",gopf:"\ud835\udd58",gscr:"\u210a",gsime:"\u2a8e",gsiml:"\u2a90",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtrdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrarr:"\u2978",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hardcy:"\u044a",harrcir:"\u2948",harrw:"\u21ad",leftrightsquigarrow:"\u21ad",hbar:"\u210f",hslash:"\u210f",planck:"\u210f",plankv:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",larrhk:"\u21a9",hookrightarrow:"\u21aa",rarrhk:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hstrok:"\u0127",hybull:"\u2043",iacute:"\xed",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",ifr:"\ud835\udd26",igrave:"\xec",iiiint:"\u2a0c",qint:"\u2a0c",iiint:"\u222d",tint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",imath:"\u0131",inodot:"\u0131",imof:"\u22b7",imped:"\u01b5",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",intcal:"\u22ba",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iquest:"\xbf",iscr:"\ud835\udcbe",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",varkappa:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAtail:"\u291b",lBarr:"\u290e",lEg:"\u2a8b",lesseqqgtr:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lambda:"\u03bb",langd:"\u2991",lap:"\u2a85",lessapprox:"\u2a85",laquo:"\xab",larrbfs:"\u291f",larrfs:"\u291d",larrlp:"\u21ab",looparrowleft:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",leftarrowtail:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lcy:"\u043b",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21c7",llarr:"\u21c7",leftthreetimes:"\u22cb",lthree:"\u22cb",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessdot:"\u22d6",ltdot:"\u22d6",lfisht:"\u297c",lfr:"\ud835\udd29",lgE:"\u2a91",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",longmapsto:"\u27fc",xmap:"\u27fc",looparrowright:"\u21ac",rarrlp:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",loz:"\u25ca",lozenge:"\u25ca",lpar:"(",lparlt:"\u2993",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsime:"\u2a8d",lsimg:"\u2a8f",lsquor:"\u201a",sbquo:"\u201a",lstrok:"\u0142",ltcc:"\u2aa6",ltcir:"\u2a79",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",triangleleft:"\u25c3",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",strns:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",midcir:"\u2af0",minus:"\u2212",minusdu:"\u2a2a",mlcp:"\u2adb",models:"\u22a7",mopf:"\ud835\udd5e",mscr:"\ud835\udcc2",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nLeftarrow:"\u21cd",nlArr:"\u21cd",nLeftrightarrow:"\u21ce",nhArr:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nRightarrow:"\u21cf",nrArr:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nacute:"\u0144",nang:"\u2220\u20d2",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",natur:"\u266e",natural:"\u266e",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",neArr:"\u21d7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\ud835\udd2b",nharr:"\u21ae",nleftrightarrow:"\u21ae",nhpar:"\u2af2",nis:"\u22fc",nisd:"\u22fa",njcy:"\u045a",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219a",nleftarrow:"\u219a",nldr:"\u2025",nopf:"\ud835\udd5f",not:"\xac",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinvb:"\u22f7",notinvc:"\u22f6",notnivb:"\u22fe",notnivc:"\u22fd",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",nrarr:"\u219b",nrightarrow:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nscr:"\ud835\udcc3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsubseteqq:"\u2ac5\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupseteqq:"\u2ac6\u0338",ntilde:"\xf1",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xf3",ocirc:"\xf4",ocy:"\u043e",odblac:"\u0151",odiv:"\u2a38",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",olcir:"\u29be",olcross:"\u29bb",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",or:"\u2228",vee:"\u2228",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",para:"\xb6",parsim:"\u2af3",parsl:"\u2afd",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",straightphi:"\u03d5",varphi:"\u03d5",phone:"\u260e",pi:"\u03c0",piv:"\u03d6",varpi:"\u03d6",planckh:"\u210e",plus:"+",plusacir:"\u2a23",pluscir:"\u2a22",plusdu:"\u2a25",pluse:"\u2a72",plussim:"\u2a26",plustwo:"\u2a27",pointint:"\u2a15",popf:"\ud835\udd61",pound:"\xa3",prE:"\u2ab3",prap:"\u2ab7",precapprox:"\u2ab7",precnapprox:"\u2ab9",prnap:"\u2ab9",precneqq:"\u2ab5",prnE:"\u2ab5",precnsim:"\u22e8",prnsim:"\u22e8",prime:"\u2032",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quatint:"\u2a16",quest:"?",rAtail:"\u291c",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",raemptyv:"\u29b3",rangd:"\u2992",range:"\u29a5",raquo:"\xbb",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rightarrowtail:"\u21a3",rarrw:"\u219d",rightsquigarrow:"\u219d",ratail:"\u291a",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21b3",rect:"\u25ad",rfisht:"\u297d",rfr:"\ud835\udd2f",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",varrho:"\u03f1",rightrightarrows:"\u21c9",rrarr:"\u21c9",rightthreetimes:"\u22cc",rthree:"\u22cc",ring:"\u02da",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rsaquo:"\u203a",rscr:"\ud835\udcc7",rtimes:"\u22ca",rtri:"\u25b9",triangleright:"\u25b9",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",scE:"\u2ab4",scap:"\u2ab8",succapprox:"\u2ab8",scaron:"\u0161",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",succneqq:"\u2ab6",scnap:"\u2aba",succnapprox:"\u2aba",scnsim:"\u22e9",succnsim:"\u22e9",scpolint:"\u2a13",scy:"\u0441",sdot:"\u22c5",sdote:"\u2a66",seArr:"\u21d8",sect:"\xa7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\ud835\udd30",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",varsigma:"\u03c2",simdot:"\u2a6a",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",smashp:"\u2a33",smeparsl:"\u29e4",smile:"\u2323",ssmile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\ufe00",sqcups:"\u2294\ufe00",sscr:"\ud835\udcc8",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2ac5",subseteqq:"\u2ac5",subdot:"\u2abd",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subsetneqq:"\u2acb",subne:"\u228a",subsetneq:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supE:"\u2ac6",supseteqq:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supsetneqq:"\u2acc",supne:"\u228b",supsetneq:"\u228b",supplus:"\u2ac0",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\ud835\udd31",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",vartheta:"\u03d1",thorn:"\xfe",times:"\xd7",timesbar:"\u2a31",timesd:"\u2a30",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tprime:"\u2034",triangle:"\u25b5",utri:"\u25b5",triangleq:"\u225c",trie:"\u225c",tridot:"\u25ec",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",uHar:"\u2963",uacute:"\xfa",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297e",ufr:"\ud835\udd32",ugrave:"\xf9",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uogon:"\u0173",uopf:"\ud835\udd66",upsi:"\u03c5",upsilon:"\u03c5",upuparrows:"\u21c8",uuarr:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",uuml:"\xfc",uwangle:"\u29a7",vBar:"\u2ae8",vBarv:"\u2ae9",vangrt:"\u299c",varsubsetneq:"\u228a\ufe00",vsubne:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",vsubnE:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",vsupne:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vsupnE:"\u2acc\ufe00",vcy:"\u0432",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",vfr:"\ud835\udd33",vopf:"\ud835\udd67",vscr:"\ud835\udccb",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wscr:"\ud835\udccc",xfr:"\ud835\udd35",xi:"\u03be",xnis:"\u22fb",xopf:"\ud835\udd69",xscr:"\ud835\udccd",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c",ngsp:"\ue500"},hC=class extends ym{constructor(t,e,i){super(i,t),this.tokenType=e}},eEe=/\r\n?/g;function rC(n){return`Unexpected character "${0===n?"EOF":String.fromCharCode(n)}"`}function iQ(n){return`Unknown entity "${n}" - use the "&#<decimal>;" or  "&#x<hex>;" syntax`}var fC=(()=>{return(n=fC||(fC={})).HEX="hexadecimal",n.DEC="decimal",fC;var n})(),mC=class{constructor(t){this.error=t}};function rl(n){return!QV(n)||0===n}function rQ(n){return QV(n)||62===n||60===n||47===n||39===n||34===n||61===n||0===n}function iEe(n){return 59===n||0===n||!function(n){return n>=97&&n<=102||n>=65&&n<=70||$p(n)}(n)}function rEe(n){return 59===n||0===n||!KV(n)}function oQ(n){return n>=97&&n<=122?n-97+65:n}var Mm=class{constructor(t,e){if(t instanceof Mm){this.file=t.file,this.input=t.input,this.end=t.end;let i=t.state;this.state={peek:i.peek,offset:i.offset,line:i.line,column:i.column}}else{if(!e)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=e.endPos,this.state={peek:-1,offset:e.startPos,line:e.startLine,column:e.startCol}}}clone(){return new Mm(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(t){return this.state.offset-t.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(t,e){let i=t=t||this;if(e)for(;this.diff(t)>0&&-1!==e.indexOf(t.peek());)i===t&&(t=t.clone()),t.advance();let r=this.locationFromCursor(t),o=this.locationFromCursor(this),s=i!==t?this.locationFromCursor(i):r;return new Go(r,o,s)}getChars(t){return this.input.substring(t.state.offset,this.state.offset)}charAt(t){return this.input.charCodeAt(t)}advanceState(t){if(t.offset>=this.end)throw this.state=t,new YC('Unexpected character "EOF"',this);let e=this.charAt(t.offset);10===e?(t.line++,t.column=0):cK(e)||t.column++,t.offset++,this.updatePeek(t)}updatePeek(t){t.peek=t.offset>=this.end?0:this.charAt(t.offset)}locationFromCursor(t){return new vm(t.file,t.state.offset,t.state.line,t.state.column)}},L_=class extends Mm{constructor(t,e){t instanceof L_?(super(t),this.internalState={...t.internalState}):(super(t,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new L_(this)}getChars(t){let e=t.clone(),i="";for(;e.internalState.offset<this.internalState.offset;)i+=String.fromCodePoint(e.peek()),e.advance();return i}processEscapeSequence(){let t=()=>this.internalState.peek;if(92===t())if(this.internalState={...this.state},this.advanceState(this.internalState),110===t())this.state.peek=10;else if(114===t())this.state.peek=13;else if(118===t())this.state.peek=11;else if(116===t())this.state.peek=9;else if(98===t())this.state.peek=8;else if(102===t())this.state.peek=12;else if(117===t())if(this.advanceState(this.internalState),t()===th){this.advanceState(this.internalState);let e=this.clone(),i=0;for(;t()!==Ou;)this.advanceState(this.internalState),i++;this.state.peek=this.decodeHexDigits(e,i)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===t()){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(VX(t())){let e="",i=0,r=this.clone();for(;VX(t())&&i<3;)r=this.clone(),e+=String.fromCodePoint(t()),this.advanceState(this.internalState),i++;this.state.peek=parseInt(e,8),this.internalState=r.internalState}else cK(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(t,e){let i=this.input.slice(t.internalState.offset,t.internalState.offset+e),r=parseInt(i,16);if(isNaN(r))throw t.state=t.internalState,new YC("Invalid hexadecimal escape sequence",t);return r}},YC=class{constructor(t,e){this.msg=t,this.cursor=e}},ol=class extends ym{constructor(t,e,i){super(e,i),this.elementName=t}static create(t,e,i){return new ol(t,e,i)}},MD=class{constructor(t,e){this.rootNodes=t,this.errors=e}},gV=class{constructor(t){this.getTagDefinition=t}parse(t,e,i){let r=function(n,t,e,i={}){let r=new class{constructor(t,e,i){this._getTagDefinition=e,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=i.tokenizeExpansionForms||!1,this._interpolationConfig=i.interpolationConfig||Pu,this._leadingTriviaCodePoints=i.leadingTriviaChars&&i.leadingTriviaChars.map(o=>o.codePointAt(0)||0);let r=i.range||{endPos:t.content.length,startPos:0,startLine:0,startCol:0};this._cursor=i.escapedString?new L_(t,r):new Mm(t,r),this._preserveLineEndings=i.preserveLineEndings||!1,this._escapedString=i.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=i.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(o){this.handleError(o)}}_processCarriageReturns(t){return this._preserveLineEndings?t:t.replace(eEe,"\n")}tokenize(){for(;0!==this._cursor.peek();){let t=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(t):this._attemptCharCode(45)?this._consumeComment(t):this._consumeDocType(t):this._attemptCharCode(47)?this._consumeTagClose(t):this._consumeTagOpen(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(24),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(this._cursor.peek()!==Ou&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ou){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(t,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=t}_endToken(t,e){if(null===this._currentTokenStart)throw new hC("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(e));if(null===this._currentTokenType)throw new hC("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let i={type:this._currentTokenType,parts:t,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(i),this._currentTokenStart=null,this._currentTokenType=null,i}_createError(t,e){this._isInExpansionForm()&&(t+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');let i=new hC(t,this._currentTokenType,e);return this._currentTokenStart=null,this._currentTokenType=null,new mC(i)}handleError(t){if(t instanceof YC&&(t=this._createError(t.msg,this._cursor.getSpan(t.cursor))),!(t instanceof mC))throw t;this.errors.push(t.error)}_attemptCharCode(t){return this._cursor.peek()===t&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(t){return!!function(n,t){return oQ(n)===oQ(t)}(this._cursor.peek(),t)&&(this._cursor.advance(),!0)}_requireCharCode(t){let e=this._cursor.clone();if(!this._attemptCharCode(t))throw this._createError(rC(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(t){let e=t.length;if(this._cursor.charsLeft()<e)return!1;let i=this._cursor.clone();for(let r=0;r<e;r++)if(!this._attemptCharCode(t.charCodeAt(r)))return this._cursor=i,!1;return!0}_attemptStrCaseInsensitive(t){for(let e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0}_requireStr(t){let e=this._cursor.clone();if(!this._attemptStr(t))throw this._createError(rC(this._cursor.peek()),this._cursor.getSpan(e))}_attemptCharCodeUntilFn(t){for(;!t(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(t,e){let i=this._cursor.clone();if(this._attemptCharCodeUntilFn(t),this._cursor.diff(i)<e)throw this._createError(rC(this._cursor.peek()),this._cursor.getSpan(i))}_attemptUntilChar(t){for(;this._cursor.peek()!==t;)this._cursor.advance()}_readChar(){let t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t}_consumeEntity(t){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let i=this._attemptCharCode(120)||this._attemptCharCode(88),r=this._cursor.clone();if(this._attemptCharCodeUntilFn(iEe),59!=this._cursor.peek())throw this._cursor.advance(),this._createError(function(n,t){return`Unable to parse entity "${t}" - ${n} character reference entities must end with ";"`}(i?fC.HEX:fC.DEC,this._cursor.getChars(e)),this._cursor.getSpan());let o=this._cursor.getChars(r);this._cursor.advance();try{let s=parseInt(o,i?16:10);this._endToken([String.fromCharCode(s),this._cursor.getChars(e)])}catch{throw this._createError(iQ(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let i=this._cursor.clone();if(this._attemptCharCodeUntilFn(rEe),59!=this._cursor.peek())this._beginToken(t,e),this._cursor=i,this._endToken(["&"]);else{let r=this._cursor.getChars(i);this._cursor.advance();let o=CD[r];if(!o)throw this._createError(iQ(r),this._cursor.getSpan(e));this._endToken([o,`&${r};`])}}}_consumeRawText(t,e){this._beginToken(t?6:7);let i=[];for(;;){let r=this._cursor.clone(),o=e();if(this._cursor=r,o)break;t&&38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(6),this._beginToken(6)):i.push(this._readChar())}this._endToken([this._processCarriageReturns(i.join(""))])}_consumeComment(t){this._beginToken(10,t),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(11),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(t){this._beginToken(12,t),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(t){this._beginToken(18,t);let e=this._cursor.clone();this._attemptUntilChar(62);let i=this._cursor.getChars(e);this._cursor.advance(),this._endToken([i])}_consumePrefixAndName(){let t=this._cursor.clone(),e="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let i;return 58===this._cursor.peek()?(e=this._cursor.getChars(t),this._cursor.advance(),i=this._cursor.clone()):i=t,this._requireCharCodeUntilFn(rQ,""===e?0:1),[e,this._cursor.getChars(i)]}_consumeTagOpen(t){let e,i,r;try{if(!KV(this._cursor.peek()))throw this._createError(rC(this._cursor.peek()),this._cursor.getSpan(t));for(r=this._consumeTagOpenStart(t),i=r.parts[0],e=r.parts[1],this._attemptCharCodeUntilFn(rl);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek()&&0!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(rl),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(rl),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(rl);this._consumeTagOpenEnd()}catch(s){if(s instanceof mC)return void(r?r.type=4:(this._beginToken(5,t),this._endToken(["<"])));throw s}let o=this._getTagDefinition(e).getContentType(i);o===Wl.RAW_TEXT?this._consumeRawTextWithTagClose(i,e,!1):o===Wl.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(i,e,!0)}_consumeRawTextWithTagClose(t,e,i){this._consumeRawText(i,()=>!!(this._attemptCharCode(60)&&this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(rl),this._attemptStrCaseInsensitive(e)))&&(this._attemptCharCodeUntilFn(rl),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(r=>62===r,3),this._cursor.advance(),this._endToken([t,e])}_consumeTagOpenStart(t){this._beginToken(0,t);let e=this._consumePrefixAndName();return this._endToken(e)}_consumeAttributeName(){let t=this._cursor.peek();if(39===t||34===t)throw this._createError(rC(t),this._cursor.getSpan());this._beginToken(14);let e=this._consumePrefixAndName();this._endToken(e)}_consumeAttributeValue(){if(39===this._cursor.peek()||34===this._cursor.peek()){let e=this._cursor.peek();this._consumeQuote(e);let i=()=>this._cursor.peek()===e;this._consumeWithInterpolation(16,17,i,i),this._consumeQuote(e)}else{let e=()=>rQ(this._cursor.peek());this._consumeWithInterpolation(16,17,e,e)}}_consumeQuote(t){this._beginToken(15),this._requireCharCode(t),this._endToken([String.fromCodePoint(t)])}_consumeTagOpenEnd(){let t=this._attemptCharCode(47)?2:1;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeTagClose(t){this._beginToken(3,t),this._attemptCharCodeUntilFn(rl);let e=this._consumePrefixAndName();this._attemptCharCodeUntilFn(rl),this._requireCharCode(62),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(th),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let t=this._readUntil(44),e=this._processCarriageReturns(t);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let r=this._endToken([t]);e!==t&&this.nonNormalizedIcuExpressions.push(r)}this._requireCharCode(44),this._attemptCharCodeUntilFn(rl),this._beginToken(7);let i=this._readUntil(44);this._endToken([i]),this._requireCharCode(44),this._attemptCharCodeUntilFn(rl)}_consumeExpansionCaseStart(){this._beginToken(20);let t=this._readUntil(th).trim();this._endToken([t]),this._attemptCharCodeUntilFn(rl),this._beginToken(21),this._requireCharCode(th),this._endToken([]),this._attemptCharCodeUntilFn(rl),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ou),this._endToken([]),this._attemptCharCodeUntilFn(rl),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ou),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(t,e,i,r){this._beginToken(t);let o=[];for(;!i();){let s=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(o.join(""))],s),o.length=0,this._consumeInterpolation(e,s,r),this._beginToken(t)):38===this._cursor.peek()?(this._endToken([this._processCarriageReturns(o.join(""))]),o.length=0,this._consumeEntity(t),this._beginToken(t)):o.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(o.join(""))])}_consumeInterpolation(t,e,i){let r=[];this._beginToken(t,e),r.push(this._interpolationConfig.start);let o=this._cursor.clone(),s=null,a=!1;for(;0!==this._cursor.peek()&&(null===i||!i());){let l=this._cursor.clone();if(this._isTagStart())return this._cursor=l,r.push(this._getProcessedChars(o,l)),void this._endToken(r);if(null===s){if(this._attemptStr(this._interpolationConfig.end))return r.push(this._getProcessedChars(o,l)),r.push(this._interpolationConfig.end),void this._endToken(r);this._attemptStr("//")&&(a=!0)}let c=this._cursor.peek();this._cursor.advance(),92===c?this._cursor.advance():c===s?s=null:!a&&null===s&&WB(c)&&(s=c)}r.push(this._getProcessedChars(o,this._cursor)),this._endToken(r)}_getProcessedChars(t,e){return this._processCarriageReturns(e.getChars(t))}_isTextEnd(){return!!(this._isTagStart()||0===this._cursor.peek()||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ou&&this._isInExpansionCase()))}_isTagStart(){if(60===this._cursor.peek()){let t=this._cursor.clone();t.advance();let e=t.peek();if(97<=e&&e<=122||65<=e&&e<=90||47===e||33===e)return!0}return!1}_readUntil(t){let e=this._cursor.clone();return this._attemptUntilChar(t),this._cursor.getChars(e)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&21===this._expansionCaseStack[this._expansionCaseStack.length-1]}_isInExpansionForm(){return this._expansionCaseStack.length>0&&19===this._expansionCaseStack[this._expansionCaseStack.length-1]}isExpansionFormStart(){if(this._cursor.peek()!==th)return!1;if(this._interpolationConfig){let t=this._cursor.clone(),e=this._attemptStr(this._interpolationConfig.start);return this._cursor=t,!e}return!0}}(new pD(n,t),e,i);return r.tokenize(),new class{constructor(t,e,i){this.tokens=t,this.errors=e,this.nonNormalizedIcuExpressions=i}}(function(n){let e,t=[];for(let i=0;i<n.length;i++){let r=n[i];e&&5===e.type&&5===r.type||e&&16===e.type&&16===r.type?(e.parts[0]+=r.parts[0],e.sourceSpan.end=r.sourceSpan.end):(e=r,t.push(e))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(t,e,this.getTagDefinition,i),o=new XC(r.tokens,this.getTagDefinition);return o.build(),new MD(o.rootNodes,r.errors.concat(o.errors))}},XC=class{constructor(t,e){this.tokens=t,this.getTagDefinition=e,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;24!==this._peek.type;)0===this._peek.type||4===this._peek.type?this._consumeStartTag(this._advance()):3===this._peek.type?this._consumeEndTag(this._advance()):12===this._peek.type?(this._closeVoidElement(),this._consumeCdata(this._advance())):10===this._peek.type?(this._closeVoidElement(),this._consumeComment(this._advance())):5===this._peek.type||7===this._peek.type||6===this._peek.type?(this._closeVoidElement(),this._consumeText(this._advance())):19===this._peek.type?this._consumeExpansion(this._advance()):this._advance()}_advance(){let t=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],t}_advanceIf(t){return this._peek.type===t?this._advance():null}_consumeCdata(t){this._consumeText(this._advance()),this._advanceIf(13)}_consumeComment(t){let e=this._advanceIf(7);this._advanceIf(11);let i=null!=e?e.parts[0].trim():null;this._addToParent(new xD(i,t.sourceSpan))}_consumeExpansion(t){let e=this._advance(),i=this._advance(),r=[];for(;20===this._peek.type;){let s=this._parseExpansionCase();if(!s)return;r.push(s)}if(23!==this._peek.type)return void this.errors.push(ol.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));let o=new Go(t.sourceSpan.start,this._peek.sourceSpan.end,t.sourceSpan.fullStart);this._addToParent(new N_(e.parts[0],i.parts[0],r,o,e.sourceSpan)),this._advance()}_parseExpansionCase(){let t=this._advance();if(21!==this._peek.type)return this.errors.push(ol.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;let e=this._advance(),i=this._collectExpansionExpTokens(e);if(!i)return null;let r=this._advance();i.push({type:24,parts:[],sourceSpan:r.sourceSpan});let o=new XC(i,this.getTagDefinition);if(o.build(),o.errors.length>0)return this.errors=this.errors.concat(o.errors),null;let s=new Go(t.sourceSpan.start,r.sourceSpan.end,t.sourceSpan.fullStart),a=new Go(e.sourceSpan.start,r.sourceSpan.end,e.sourceSpan.fullStart);return new class{constructor(t,e,i,r,o){this.value=t,this.expression=e,this.sourceSpan=i,this.valueSourceSpan=r,this.expSourceSpan=o}visit(t,e){return t.visitExpansionCase(this,e)}}(t.parts[0],o.rootNodes,s,t.sourceSpan,a)}_collectExpansionExpTokens(t){let e=[],i=[21];for(;;){if((19===this._peek.type||21===this._peek.type)&&i.push(this._peek.type),22===this._peek.type){if(!sQ(i,21))return this.errors.push(ol.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(i.pop(),0===i.length)return e}if(23===this._peek.type){if(!sQ(i,19))return this.errors.push(ol.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;i.pop()}if(24===this._peek.type)return this.errors.push(ol.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(t){let e=[t],i=t.sourceSpan,r=t.parts[0];if(r.length>0&&"\n"===r[0]){let o=this._getParentElement();null!=o&&0===o.children.length&&this.getTagDefinition(o.name).ignoreFirstLf&&(r=r.substring(1),e[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[r]})}for(;8===this._peek.type||5===this._peek.type||9===this._peek.type;)t=this._advance(),e.push(t),r+=8===t.type?t.parts.join("").replace(/&([^;]+);/g,aQ):9===t.type?t.parts[0]:t.parts.join("");r.length>0&&this._addToParent(new F_(r,new Go(i.start,t.sourceSpan.end,i.fullStart,i.details),e))}_closeVoidElement(){let t=this._getParentElement();t&&this.getTagDefinition(t.name).isVoid&&this._elementStack.pop()}_consumeStartTag(t){let[e,i]=t.parts,r=[];for(;14===this._peek.type;)r.push(this._consumeAttr(this._advance()));let o=this._getElementFullName(e,i,this._getParentElement()),s=!1;if(2===this._peek.type){this._advance(),s=!0;let d=this.getTagDefinition(o);d.canSelfClose||null!==dX(o)||d.isVoid||this.errors.push(ol.create(o,t.sourceSpan,`Only void and foreign elements can be self closed "${t.parts[1]}"`))}else 1===this._peek.type&&(this._advance(),s=!1);let a=this._peek.sourceSpan.fullStart,l=new Go(t.sourceSpan.start,a,t.sourceSpan.fullStart),c=new Go(t.sourceSpan.start,a,t.sourceSpan.fullStart),u=new qC(o,r,[],l,c,void 0);this._pushElement(u),s?this._popElement(o,l):4===t.type&&(this._popElement(o,null),this.errors.push(ol.create(o,l,`Opening tag "${o}" not terminated.`)))}_pushElement(t){let e=this._getParentElement();e&&this.getTagDefinition(e.name).isClosedByChild(t.name)&&this._elementStack.pop(),this._addToParent(t),this._elementStack.push(t)}_consumeEndTag(t){let e=this._getElementFullName(t.parts[0],t.parts[1],this._getParentElement());this.getTagDefinition(e).isVoid?this.errors.push(ol.create(e,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`)):this._popElement(e,t.sourceSpan)||this.errors.push(ol.create(e,t.sourceSpan,`Unexpected closing tag "${e}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popElement(t,e){let i=!1;for(let r=this._elementStack.length-1;r>=0;r--){let o=this._elementStack[r];if(o.name===t)return o.endSourceSpan=e,o.sourceSpan.end=null!==e?e.end:o.sourceSpan.end,this._elementStack.splice(r,this._elementStack.length-r),!i;this.getTagDefinition(o.name).closedByParent||(i=!0)}return!1}_consumeAttr(t){let e=wB(t.parts[0],t.parts[1]),i=t.sourceSpan.end;15===this._peek.type&&this._advance();let s,a,r="",o=[];if(16===this._peek.type)for(s=this._peek.sourceSpan,a=this._peek.sourceSpan.end;16===this._peek.type||17===this._peek.type||9===this._peek.type;){let u=this._advance();o.push(u),r+=17===u.type?u.parts.join("").replace(/&([^;]+);/g,aQ):9===u.type?u.parts[0]:u.parts.join(""),a=i=u.sourceSpan.end}15===this._peek.type&&(i=this._advance().sourceSpan.end);let c=s&&a&&new Go(s.start,a,s.fullStart);return new hV(e,r,new Go(t.sourceSpan.start,i,t.sourceSpan.fullStart),t.sourceSpan,c,o.length>0?o:void 0,void 0)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(t){let e=this._getParentElement();null!=e?e.children.push(t):this.rootNodes.push(t)}_getElementFullName(t,e,i){if(""===t&&""===(t=this.getTagDefinition(e).implicitNamespacePrefix||"")&&null!=i){let r=Kd(i.name)[1];this.getTagDefinition(r).preventNamespaceInheritance||(t=dX(i.name))}return wB(t,e)}};function sQ(n,t){return n.length>0&&n[n.length-1]===t}function aQ(n,t){return void 0!==CD[t]?CD[t]||n:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):n}var XT,_V=class extends gV{constructor(){super(FV)}parse(t,e,i){return super.parse(t,e,i)}},gK="ngPreserveWhitespaces",lEe=new Set(["pre","template","textarea","script","style"]),_K=" \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff",cEe=new RegExp(`[^${_K}]`),uEe=new RegExp(`[${_K}]{2,}`,"g");function vK(n){return n.replace(new RegExp("\ue500","g")," ")}function yK(n){return vK(n).replace(uEe," ")}function wD(n,t=!1){return ql(Object.keys(n).map(e=>({key:e,quoted:t,value:n[e]})))}function lQ(){return XT||(XT={},UT(io.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),UT(io.STYLE,["*|style"]),UT(io.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),UT(io.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),XT}function UT(n,t){for(let e of t)XT[e.toLowerCase()]=n}var yV=class{},vEe=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|autocomplete,!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,autocomplete,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],bK=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),yEe=Array.from(bK).reduce((n,[t,e])=>(n.set(t,e),n),new Map),SD=class extends yV{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,vEe.forEach(t=>{let e=new Map,i=new Set,[r,o]=t.split("|"),s=o.split(","),[a,l]=r.split("^");a.split(",").forEach(u=>{this._schema.set(u.toLowerCase(),e),this._eventSchema.set(u.toLowerCase(),i)});let c=l&&this._schema.get(l.toLowerCase());if(c){for(let[u,d]of c)e.set(u,d);for(let u of this._eventSchema.get(l.toLowerCase()))i.add(u)}s.forEach(u=>{if(u.length>0)switch(u[0]){case"*":i.add(u.substring(1));break;case"!":e.set(u.substring(1),"boolean");break;case"#":e.set(u.substring(1),"number");break;case"%":e.set(u.substring(1),"object");break;default:e.set(u,"string")}})})}hasProperty(t,e,i){if(i.some(o=>"no-errors-schema"===o.name))return!0;if(t.indexOf("-")>-1){if(CB(t)||MB(t))return!1;if(i.some(o=>"custom-elements"===o.name))return!0}return(this._schema.get(t.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(t,e){return!!(e.some(i=>"no-errors-schema"===i.name)||t.indexOf("-")>-1&&(CB(t)||MB(t)||e.some(i=>"custom-elements"===i.name)))||this._schema.has(t.toLowerCase())}securityContext(t,e,i){i&&(e=this.getMappedPropName(e)),t=t.toLowerCase(),e=e.toLowerCase();let r=lQ()[t+"|"+e];return r||(r=lQ()["*|"+e],r||io.NONE)}getMappedPropName(t){return bK.get(t)??t}getDefaultComponentElementName(){return"ng-component"}validateProperty(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...\nIf '${t}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(t){return t.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${t}' is disallowed for security reasons, please use (${t.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(t){let e=this._schema.get(t.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(i=>yEe.get(i)??i)}allKnownEventsOfElement(t){return Array.from(this._eventSchema.get(t.toLowerCase())??[])}normalizeAnimationStyleProperty(t){return t.replace(yMe,(...t)=>t[1].toUpperCase())}normalizeAnimationStyleValue(t,e,i){let r="",o=i.toString().trim(),s=null;if(function(n){switch(n){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}(t)&&0!==i&&"0"!==i)if("number"==typeof i)r="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&(s=`Please provide a CSS unit value for ${e}:${i}`)}return{error:s,value:o+r}}},cQ=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","object|codebase","object|data"]);function xK(n,t){return n=n.toLowerCase(),t=t.toLowerCase(),cQ.has(n+"|"+t)||cQ.has("*|"+t)}var pB="animate-";function hB(n){return"@"==n[0]}function fB(n,t,e,i){let r=[];return Zd.parse(t).forEach(o=>{let s=o.element?[o.element]:n.allKnownElementNames(),a=new Set(o.notSelectors.filter(c=>c.isElementSelector()).map(c=>c.element)),l=s.filter(c=>!a.has(c));r.push(...l.map(c=>n.securityContext(c,e,i)))}),0===r.length?[io.NONE]:Array.from(new Set(r)).sort()}function Kp(n,t){let e=t.start-n.start.offset,i=t.end-n.end.offset;return new Go(n.start.moveBy(e),n.end.moveBy(i),n.fullStart.moveBy(e),n.details)}var EEe=/^([^:/?#]+):/;function CK(n){let t=null,e=null,i=null,r=!1,o="";n.attrs.forEach(l=>{let c=l.name.toLowerCase();"select"==c?t=l.value:"href"==c?e=l.value:"rel"==c?i=l.value:"ngNonBindable"==l.name?r=!0:"ngProjectAs"==l.name&&l.value.length>0&&(o=l.value)}),t=function(n){return null===n||0===n.length?"*":n}(t);let s=n.name.toLowerCase(),a=na.OTHER;return MB(s)?a=na.NG_CONTENT:"style"==s?a=na.STYLE:"script"==s?a=na.SCRIPT:"link"==s&&"stylesheet"==i&&(a=na.STYLESHEET),new xV(a,t,e,r,o)}var na=(()=>{return(n=na||(na={}))[n.NG_CONTENT=0]="NG_CONTENT",n[n.STYLE=1]="STYLE",n[n.STYLESHEET=2]="STYLESHEET",n[n.SCRIPT=3]="SCRIPT",n[n.OTHER=4]="OTHER",na;var n})(),xV=class{constructor(t,e,i,r,o){this.type=t,this.selectAttr=e,this.hrefAttr=i,this.nonBindable=r,this.projectAs=o}},LEe=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,Zp_BANANA_BOX={start:"[(",end:")]"},Zp_PROPERTY={start:"[",end:"]"},Zp_EVENT={start:"(",end:")"},HEe=new class{visitElement(t){let e=CK(t);if(e.type===na.SCRIPT||e.type===na.STYLE||e.type===na.STYLESHEET)return null;let i=Uu(this,t.children,null);return new E_(t.name,Uu(this,t.attrs),[],[],i,[],t.sourceSpan,t.startSourceSpan,t.endSourceSpan)}visitComment(t){return null}visitAttribute(t){return new DC(t.name,t.value,t.sourceSpan,t.keySpan,t.valueSpan,t.i18n)}visitText(t){return new M_(t.value,t.sourceSpan)}visitExpansion(t){return null}visitExpansionCase(t){return null}};function _Q(n){return/^data-/i.test(n)?n.substring(5):n}function mB(n,t){t.push(...n.map(e=>S_.fromParsedEvent(e)))}var Lc=(()=>{return(n=Lc||(Lc={}))[n.ELEMENT=0]="ELEMENT",n[n.TEMPLATE=1]="TEMPLATE",Lc;var n})(),QC=class{constructor(t,e,i=0,r=null,o,s){this.index=t,this.ref=e,this.level=i,this.templateIndex=r,this.meta=o,this.registry=s,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=s||{getUniqueId:Swe(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(t,e,i,r){e.isVoid&&r||qT(this.placeholders,e.isVoid||!r?e.startName:e.closeName,{type:t,index:i,ctx:this.id,isVoid:e.isVoid,closed:r})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){let t=new Map;return this.placeholders.forEach((e,i)=>t.set(i,e.map(WEe))),t}appendBinding(t){this.bindings.add(t)}appendIcu(t,e){qT(this._registry.icus,t,e)}appendBoundText(t){qQ(t,this.bindings.size,this.id).forEach((i,r)=>qT(this.placeholders,r,...i))}appendTemplate(t,e){this.appendTag(Lc.TEMPLATE,t,e,!1),this.appendTag(Lc.TEMPLATE,t,e,!0),this._unresolvedCtxCount++}appendElement(t,e,i){this.appendTag(Lc.ELEMENT,t,e,i)}appendProjection(t,e){this.appendTag(Lc.ELEMENT,t,e,!1),this.appendTag(Lc.ELEMENT,t,e,!0)}forkChildContext(t,e,i){return new QC(t,this.ref,this.level+1,e,i,this._registry)}reconcileChildContext(t){["start","close"].forEach(i=>{let s=(this.placeholders.get(t.meta[`${i}Name`])||[]).find(vQ(this.id,t.templateIndex));s&&(s.ctx=t.id)}),t.placeholders.forEach((i,r)=>{let o=this.placeholders.get(r);if(!o)return void this.placeholders.set(r,i);let s=o.findIndex(vQ(t.id,t.templateIndex));if(s>=0){let a=r.startsWith("CLOSE");r.endsWith("NG-TEMPLATE")?o.splice(s+(a?0:1),0,...i):(i[a?i.length-1:0].tmpl=o[s],o.splice(s,1,...i))}else o.push(...i);this.placeholders.set(r,o)}),this._unresolvedCtxCount--}};function gB(n,t,e,i){return PD(`${i?"/":""}${n}${t}`,e)}function _B(n,{index:t,ctx:e,isVoid:i},r){return i?gB(n,t,e)+gB(n,t,e,!0):gB(n,t,e,r)}function vQ(n,t){return e=>"object"==typeof e&&e.type===Lc.TEMPLATE&&e.index===t&&e.ctx===n}function WEe(n){let t=(r,o)=>_B("#",r,o),e=(r,o)=>_B("*",r,o);switch(n.type){case Lc.ELEMENT:return n.closed?t(n,!0)+(n.tmpl?e(n.tmpl,!0):""):n.tmpl?e(n.tmpl)+t(n)+(n.isVoid?e(n.tmpl,!0):""):t(n);case Lc.TEMPLATE:return e(n,n.closed);default:return n}}var qEe=new class{visitText(t){return t.value}visitContainer(t){return t.children.map(e=>e.visit(this)).join("")}visitIcu(t){let e=Object.keys(t.cases).map(r=>`${r} {${t.cases[r].visit(this)}}`);return`{${t.expressionPlaceholder}, ${t.type}, ${e.join(" ")}}`}visitTagPlaceholder(t){return t.isVoid?this.formatPh(t.startName):`${this.formatPh(t.startName)}${t.children.map(e=>e.visit(this)).join("")}${this.formatPh(t.closeName)}`}visitPlaceholder(t){return this.formatPh(t.name)}visitIcuPlaceholder(t,e){return this.formatPh(t.name)}formatPh(t){return`{${JC(t,!1)}}`}};function MK(n){return n.visit(qEe)}var yQ={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},SV=class{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(t,e,i){let r=this._hashTag(t,e,i);if(this._signatureToName[r])return this._signatureToName[r];let o=t.toUpperCase(),s=yQ[o]||`TAG_${o}`,a=this._generateUniqueName(i?s:`START_${s}`);return this._signatureToName[r]=a,a}getCloseTagPlaceholderName(t){let e=this._hashClosingTag(t);if(this._signatureToName[e])return this._signatureToName[e];let i=t.toUpperCase(),o=this._generateUniqueName(`CLOSE_${yQ[i]||`TAG_${i}`}`);return this._signatureToName[e]=o,o}getPlaceholderName(t,e){let i=t.toUpperCase(),r=`PH: ${i}=${e}`;if(this._signatureToName[r])return this._signatureToName[r];let o=this._generateUniqueName(i);return this._signatureToName[r]=o,o}getUniquePlaceholder(t){return this._generateUniqueName(t.toUpperCase())}_hashTag(t,e,i){return`<${t}`+Object.keys(e).sort().map(a=>` ${a}=${e[a]}`).join("")+(i?"/>":`></${t}>`)}_hashClosingTag(t){return this._hashTag(`/${t}`,{},!1)}_generateUniqueName(t){if(!this._placeHolderNameCounts.hasOwnProperty(t))return this._placeHolderNameCounts[t]=1,t;let i=this._placeHolderNameCounts[t];return this._placeHolderNameCounts[t]=i+1,`${t}_${i}`}},YEe=new bD(new yD);function QEe(n,t){return t}var $Ee=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,TV=class extends ym{constructor(t,e){super(t,e)}},t1e=(n,t)=>(n instanceof Cm&&(t instanceof T_&&n.i18n instanceof Fu&&(t.previousMessage=n.i18n),n.i18n=t),t),ED=class{constructor(t=Pu,e=!1,i=!1){this.interpolationConfig=t,this.keepI18nAttrs=e,this.enableI18nLegacyMessageIdFormat=i,this.hasI18nMeta=!1,this._errors=[],this._createI18nMessage=function(n){let t=new class{constructor(t,e){this._expressionParser=t,this._interpolationConfig=e}toI18nMessage(t,e="",i="",r="",o){let s={isIcu:1==t.length&&t[0]instanceof N_,icuDepth:0,placeholderRegistry:new SV,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:o||QEe},a=Uu(this,t,s);return new Fu(a,s.placeholderToContent,s.placeholderToMessage,e,i,r)}visitElement(t,e){let i=Uu(this,t.children,e),r={};t.attrs.forEach(c=>{r[c.name]=c.value});let o=FV(t.name).isVoid,s=e.placeholderRegistry.getStartTagPlaceholderName(t.name,r,o);e.placeholderToContent[s]={text:t.startSourceSpan.toString(),sourceSpan:t.startSourceSpan};let a="";o||(a=e.placeholderRegistry.getCloseTagPlaceholderName(t.name),e.placeholderToContent[a]={text:`</${t.name}>`,sourceSpan:t.endSourceSpan??t.sourceSpan});let l=new class{constructor(t,e,i,r,o,s,a,l,c){this.tag=t,this.attrs=e,this.startName=i,this.closeName=r,this.children=o,this.isVoid=s,this.sourceSpan=a,this.startSourceSpan=l,this.endSourceSpan=c}visit(t,e){return t.visitTagPlaceholder(this,e)}}(t.name,r,s,a,i,o,t.sourceSpan,t.startSourceSpan,t.endSourceSpan);return e.visitNodeFn(t,l)}visitAttribute(t,e){let i=void 0===t.valueTokens||1===t.valueTokens.length?new l_(t.value,t.valueSpan||t.sourceSpan):this._visitTextWithInterpolation(t.valueTokens,t.valueSpan||t.sourceSpan,e,t.i18n);return e.visitNodeFn(t,i)}visitText(t,e){let i=1===t.tokens.length?new l_(t.value,t.sourceSpan):this._visitTextWithInterpolation(t.tokens,t.sourceSpan,e,t.i18n);return e.visitNodeFn(t,i)}visitComment(t,e){return null}visitExpansion(t,e){e.icuDepth++;let i={},r=new aD(t.switchValue,t.type,i,t.sourceSpan);if(t.cases.forEach(a=>{i[a.value]=new mm(a.expression.map(l=>l.visit(this,e)),a.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let a=e.placeholderRegistry.getUniquePlaceholder(`VAR_${t.type}`);return r.expressionPlaceholder=a,e.placeholderToContent[a]={text:t.switchValue,sourceSpan:t.switchValueSourceSpan},e.visitNodeFn(t,r)}let o=e.placeholderRegistry.getPlaceholderName("ICU",t.sourceSpan.toString());e.placeholderToMessage[o]=this.toI18nMessage([t],"","","",void 0);let s=new T_(r,o,t.sourceSpan);return e.visitNodeFn(t,s)}visitExpansionCase(t,e){throw new Error("Unreachable code")}_visitTextWithInterpolation(t,e,i,r){let o=[],s=!1;for(let a of t)switch(a.type){case 8:case 17:s=!0;let l=a.parts[1],c=l.split($Ee)[2]||"INTERPOLATION",u=i.placeholderRegistry.getPlaceholderName(c,l);i.placeholderToContent[u]={text:a.parts.join(""),sourceSpan:a.sourceSpan},o.push(new lD(l,u,a.sourceSpan));break;default:if(a.parts[0].length>0){let d=o[o.length-1];d instanceof l_?(d.value+=a.parts[0],d.sourceSpan=new Go(d.sourceSpan.start,a.sourceSpan.end,d.sourceSpan.fullStart,d.sourceSpan.details)):o.push(new l_(a.parts[0],a.sourceSpan))}}return s?(function(n,t){if(t instanceof Fu&&(function(n){let t=n.nodes;if(1!==t.length||!(t[0]instanceof mm))throw new Error("Unexpected previous i18n message - expected it to consist of only a single `Container` node.")}(t),t=t.nodes[0]),t instanceof mm){!function(n,t){if(n.length!==t.length)throw new Error("The number of i18n message children changed between first and second pass.");if(n.some((e,i)=>t[i].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}(t.children,n);for(let e=0;e<n.length;e++)n[e].sourceSpan=t.children[e].sourceSpan}}(o,r),new mm(o,e)):o[0]}}(YEe,n);return(e,i,r,o,s)=>t.toI18nMessage(e,i,r,o,s)}(this.interpolationConfig)}_generateI18nMessage(t,e="",i){let{meaning:r,description:o,customId:s}=this._parseMetadata(e),a=this._createI18nMessage(t,r,o,s,i);return this._setMessageId(a,e),this._setLegacyIds(a,e),a}visitAllWithErrors(t){let e=t.map(i=>i.visit(this,null));return new MD(e,this._errors)}visitElement(t){let e;if(function(n){return n.attrs.some(t=>function(n){return"i18n"===n||n.startsWith(jB)}(t.name))}(t)){this.hasI18nMeta=!0;let i=[],r={};for(let o of t.attrs)if("i18n"===o.name)e=this._generateI18nMessage(t.children,t.i18n||o.value,t1e),0===e.nodes.length&&(e=void 0),t.i18n=e;else if(o.name.startsWith(jB)){let s=o.name.slice(jB.length);xK(t.name,s)?this._reportError(o,`Translating attribute '${s}' is disallowed for security reasons.`):r[s]=o.value}else i.push(o);if(Object.keys(r).length)for(let o of i){let s=r[o.name];void 0!==s&&o.value&&(o.i18n=this._generateI18nMessage([o],o.i18n||s))}this.keepI18nAttrs||(t.attrs=i)}return Uu(this,t.children,e),t}visitExpansion(t,e){let i,r=t.i18n;if(this.hasI18nMeta=!0,r instanceof T_){let o=r.name;i=this._generateI18nMessage([t],r),WQ(i).name=o,null!==e&&(e.placeholderToMessage[o]=i)}else i=this._generateI18nMessage([t],e||r);return t.i18n=i,t}visitText(t){return t}visitAttribute(t){return t}visitComment(t){return t}visitExpansionCase(t){return t}_parseMetadata(t){return"string"==typeof t?function(n=""){let t,e,i;if(n=n.trim()){let s,r=n.indexOf("@@"),o=n.indexOf("|");[s,t]=r>-1?[n.slice(0,r),n.slice(r+2)]:[n,""],[e,i]=o>-1?[s.slice(0,o),s.slice(o+1)]:["",s]}return{customId:t,meaning:e,description:i}}(t):t instanceof Fu?t:{}}_setMessageId(t,e){var n;t.id||(t.id=e instanceof Fu&&e.id||(n=t).id||FQ(n))}_setLegacyIds(t,e){if(this.enableI18nLegacyMessageIdFormat)t.legacyIds=[SMe(t),FQ(t)];else if("string"!=typeof e){let i=e instanceof Fu?e:e instanceof T_?e.previousMessage:void 0;t.legacyIds=i?i.legacyIds:[]}}_reportError(t,e){this._errors.push(new TV(t.sourceSpan,e))}};function a1e(n,t,e,i){let r=function(n){return n.nodes.map(t=>t.visit(l1e,null)).join("")}(t),o=[ht(r)];Object.keys(i).length&&(o.push(wD(UV(i,!0),!0)),o.push(wD({original_code:ql(Object.keys(i).map(l=>({key:JC(l),quoted:!0,value:ht(t.placeholders[l]?t.placeholders[l].sourceSpan.toString():t.placeholderToMessage[l].nodes.map(c=>c.sourceSpan.toString()).join(""))})))})));let s=e.set(Ri("goog.getMsg").callFn(o)).toConstDecl();return s.addLeadingComment(function(n){let t=[];return t.push(n.description?{tagName:"desc",text:n.description}:{tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&t.push({tagName:"meaning",text:n.meaning}),function(n=[]){return new nD(n)}(t)}(t)),[s,new Hu(n.set(e))]}var l1e=new class{formatPh(t){return`{$${JC(t)}}`}visitText(t){return t.value}visitContainer(t){return t.children.map(e=>e.visit(this)).join("")}visitIcu(t){return MK(t)}visitTagPlaceholder(t){return t.isVoid?this.formatPh(t.startName):`${this.formatPh(t.startName)}${t.children.map(e=>e.visit(this)).join("")}${this.formatPh(t.closeName)}`}visitPlaceholder(t){return this.formatPh(t.name)}visitIcuPlaceholder(t,e){return this.formatPh(t.name)}};function u1e(n,t,e){let{messageParts:i,placeHolders:r}=function(n){let t=[],e=new class{constructor(t,e){this.placeholderToMessage=t,this.pieces=e}visitText(t){if(this.pieces[this.pieces.length-1]instanceof lm)this.pieces[this.pieces.length-1].text+=t.value;else{let e=new Go(t.sourceSpan.fullStart,t.sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details);this.pieces.push(new lm(t.value,e))}}visitContainer(t){t.children.forEach(e=>e.visit(this))}visitIcu(t){this.pieces.push(new lm(MK(t),t.sourceSpan))}visitTagPlaceholder(t){this.pieces.push(this.createPlaceholderPiece(t.startName,t.startSourceSpan??t.sourceSpan)),t.isVoid||(t.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(t.closeName,t.endSourceSpan??t.sourceSpan)))}visitPlaceholder(t){this.pieces.push(this.createPlaceholderPiece(t.name,t.sourceSpan))}visitIcuPlaceholder(t){this.pieces.push(this.createPlaceholderPiece(t.name,t.sourceSpan,this.placeholderToMessage[t.name]))}createPlaceholderPiece(t,e,i){return new h_(JC(t,!1),e,i)}}(n.placeholderToMessage,t);return n.nodes.forEach(i=>i.visit(e)),function(n){let t=[],e=[];n[0]instanceof h_&&t.push(vB(n[0].sourceSpan.start));for(let i=0;i<n.length;i++){let r=n[i];r instanceof lm?t.push(r):(e.push(r),n[i-1]instanceof h_&&t.push(vB(n[i-1].sourceSpan.end)))}return n[n.length-1]instanceof h_&&t.push(vB(n[n.length-1].sourceSpan.end)),{messageParts:t,placeHolders:e}}(t)}(t),o=function(n){let t=n.nodes[0];return new Go(t.sourceSpan.fullStart,n.nodes[n.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),s=r.map(c=>e[c.text]),a=function(n,t,e,i,r){return new AB(n,t,e,i,r)}(t,i,r,s,o),l=n.set(a);return[new Hu(l)]}function vB(n){return new lm("",new Go(n,n))}var wK=new Set(["$event"]),yB=new Map([["window",te.resolveWindow],["document",te.resolveDocument],["body",te.resolveBody]]),g1e=[" ","\n","\r","\t"];function lh(n,t){return VV(Ri($C).bitwiseAnd(ht(n),null,!1),t)}function SK(n,t=null,e=null){let{type:i,name:r,target:o,phase:s,handler:a}=n;if(o&&!yB.has(o))throw new Error(`Unexpected global target '${o}' defined for '${r}' event.\n        Supported list of global targets: ${Array.from(yB.keys())}.`);let l="$event",c=new Set,u=null===e||0===e.bindingLevel?Ri(Hc):e.getOrCreateSharedContextVar(0),d=cSe(e,u,a,"b",n.handlerSpan,c,wK),p=[],h=e?.variableDeclarations(),f=e?.restoreViewStatement();if(h&&p.push(...h),p.push(...d),f){p.unshift(f);let T=p[p.length-1];T instanceof Do?p[p.length-1]=new Do(gm(T.value.sourceSpan,te.resetView,[T.value])):p.push(new Hu(gm(null,te.resetView,[])))}let m=1===i?function(n,t){return`@${n}.${t}`}(r,s):r,x=t&&m_(t),g=[];c.has(l)&&g.push(new ia(l,V_));let b=ra(g,p,Pa,null,x),D=[ht(m),b];return o&&D.push(ht(!1),Tn(yB.get(o))),D}var KC=class{constructor(t,e,i=0,r,o,s,a,l,c,u,d=function(){return{prepareStatements:[],constExpressions:[],i18nVarRefsCache:new Map}}()){this.constantPool=t,this.level=i,this.contextName=r,this.i18nContext=o,this.templateIndex=s,this.templateName=a,this._namespace=l,this.i18nUseExternalIds=u,this._constants=d,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=iC,this.visitVariable=iC,this.visitTextAttribute=iC,this.visitBoundAttribute=iC,this.visitBoundEvent=iC,this._bindingScope=e.nestedScope(i),this.fileBasedI18nSuffix=c.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new TD(t,()=>this.allocateDataSlot(),p=>this.allocatePureFunctionSlots(p),(p,h,f,m)=>{this._bindingScope.set(this.level,h,m),this.creationInstruction(null,te.pipe,[ht(f),ht(p)])})}buildTemplateFunction(t,e,i=0,r){this._ngContentSelectorsOffset=i,this._namespace!==te.namespaceHTML&&this.creationInstruction(null,this._namespace),e.forEach(h=>this.registerContextVariables(h));let o=this.i18nContext||AC(r)&&!VT(r)&&!(1===(n=t).length&&n[0]instanceof E_&&t[0].i18n===r),s=bB(t);var n;if(o&&this.i18nStart(null,r,s),AX(this,t),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(h=>h()),0===this.level&&this._ngContentReservedSlots.length){let h=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){let f=this._ngContentReservedSlots.map(m=>"*"!==m?NV(m):m);h.push(this.constantPool.getConstLiteral(Nu(f),!0))}this.creationInstruction(null,te.projectionDef,h,!0)}o&&this.i18nEnd(null,s);let a=cD(this._creationCodeFns),l=cD(this._updateCodeFns),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),d=a.length>0?[lh(1,c.concat(a))]:[],p=l.length>0?[lh(2,u.concat(l))]:[];return ra([new ia($C,ZC),new ia(Hc,null)],[...this._prefixCode,...d,...p],Pa,null,this.templateName)}getLocal(t){return this._bindingScope.get(t)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}maybeRestoreView(){this._bindingScope.maybeRestoreView()}i18nTranslate(t,e={},i,r){let o=i||this.i18nGenerateMainBlockVar(),a=function(n,t,e,i={},r){let o=[Ewe(t),VV(BV(Ri(MQ)).notIdentical(ht("undefined",LQ)).and(Ri(MQ)),a1e(t,n,e,i),u1e(t,n,UV(i,!1)))];return r&&o.push(new Hu(t.set(r(t)))),o}(t,o,this.i18nGenerateClosureVar(t.id),e,r);return this._constants.prepareStatements.push(...a),o}registerContextVariables(t){let e=this._bindingScope.freshReferenceName(),i=this.level,r=Ri(t.name+e);this._bindingScope.set(i,t.name,r,1,(o,s)=>{let a;return o.bindingLevel===i?o.isListenerScope()&&o.hasRestoreViewVariable()?(a=Ri(YQ),o.notifyRestoredViewContextUse()):a=Ri(Hc):a=o.getSharedContextName(i)||IV(s),[r.set(a.prop(t.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(t){t.length>0&&t.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(t){let e={};return Object.keys(t).forEach(i=>{let r=t[i];if(r instanceof M_)e[i]=ht(r.value);else{let o=r.value.visit(this._valueConverter);if(this.allocateBindingSlots(o),o instanceof vs){let{strings:s,expressions:a}=o,{id:l,bindings:c}=this.i18n,u=function(n,t=0,e=0){if(!n.length)return"";let i="",r=n.length-1;for(let o=0;o<r;o++)i+=`${n[o]}${PD(t+o,e)}`;return i+=n[r],i}(s,c.size,l);this.i18nAppendBindings(a),e[i]=ht(u)}}}),e}i18nGenerateMainBlockVar(){return Ri(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(t){let e,i=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){let r=RX("EXTERNAL_"),o=this.constantPool.uniqueName(i);e=`${r}${m_(t)}$$${o}`}else{let r=RX(i);e=this.constantPool.uniqueName(r)}return Ri(e)}i18nUpdateRef(t){let{icus:e,meta:i,isRoot:r,isResolved:o,isEmitted:s}=t;if(r&&o&&!s&&!VT(i)){t.isEmitted=!0;let d,a=t.getSerializedPlaceholders(),l={},c=a.size?PX(a):{};e.size&&e.forEach((p,h)=>{if(1===p.length)c[h]=p[0];else{let f=PD(`I18N_EXP_${h}`);c[h]=ht(f),l[h]=_r(p)}}),(Array.from(a.values()).some(p=>p.length>1)||Object.keys(l).length)&&(d=p=>{let h=[p];return Object.keys(l).length&&h.push(wD(l,!0)),gm(null,te.i18nPostprocess,h)}),this.i18nTranslate(i,c,t.ref,d)}}i18nStart(t=null,e,i){let r=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(r,this.templateIndex,e):new QC(r,this.i18nGenerateMainBlockVar(),0,this.templateIndex,e);let{id:o,ref:s}=this.i18n,a=[ht(r),this.addToConsts(s)];o>0&&a.push(ht(o)),this.creationInstruction(t,i?te.i18n:te.i18nStart,a)}i18nEnd(t=null,e){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);let{index:i,bindings:r}=this.i18n;if(r.size){for(let o of r)this.updateInstructionWithAdvance(this.getConstCount()-1,t,te.i18nExp,()=>this.convertPropertyBinding(o));this.updateInstruction(t,te.i18nApply,[ht(i)])}e||this.creationInstruction(t,te.i18nEnd),this.i18n=null}i18nAttributesInstruction(t,e,i){let r=!1,o=[];if(e.forEach(s=>{let a=s.i18n,l=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(l),l instanceof vs){let u=PX(qQ(a));o.push(ht(s.name),this.i18nTranslate(a,u)),l.expressions.forEach(d=>{r=!0,this.updateInstructionWithAdvance(t,i,te.i18nExp,()=>this.convertPropertyBinding(d))})}}),o.length>0){let s=ht(this.allocateDataSlot()),a=this.addToConsts(_r(o));this.creationInstruction(i,te.i18nAttributes,[s,a]),r&&this.updateInstruction(i,te.i18nApply,[s])}}getNamespaceInstruction(t){switch(t){case"math":return te.namespaceMathML;case"svg":return te.namespaceSVG;default:return te.namespaceHTML}}addNamespaceInstruction(t,e){this._namespace=t,this.creationInstruction(e.startSourceSpan,t)}interpolatedUpdateInstruction(t,e,i,r,o,s){this.updateInstructionWithAdvance(e,r.sourceSpan,t,()=>[ht(i),...this.getUpdateInstructionArguments(o),...s])}visitContent(t){let e=this.allocateDataSlot(),i=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,r=[ht(e)];this._ngContentReservedSlots.push(t.selector);let o=t.attributes.filter(a=>"select"!==a.name.toLowerCase()),s=this.getAttributeExpressions(t.name,o,[],[]);s.length>0?r.push(ht(i),_r(s)):0!==i&&r.push(ht(i)),this.creationInstruction(t.sourceSpan,te.projection,r),this.i18n&&this.i18n.appendProjection(t.i18n,e)}visitElement(t){let e=this.allocateDataSlot(),i=new vD(null),r=!1,o=AC(t.i18n)&&!VT(t.i18n),s=[],[a,l]=Kd(t.name),c=CB(t.name);for(let ue of t.attributes){let{name:he,value:w}=ue;"ngNonBindable"===he?r=!0:"style"===he?i.registerStyleAttr(w):"class"===he?i.registerClassAttr(w):s.push(ue)}let u=[ht(e)];c||u.push(ht(l));let d=[],p=[];t.inputs.forEach(ue=>{i.registerBoundInput(ue)||(0===ue.type&&ue.i18n?p.push(ue):d.push(ue))});let h=this.getAttributeExpressions(t.name,s,d,t.outputs,i,[],p);u.push(this.addAttrsToConsts(h));let f=this.prepareRefsArray(t.references);u.push(this.addToConsts(f));let m=this._namespace,x=this.getNamespaceInstruction(a);x!==m&&this.addNamespaceInstruction(x,t),this.i18n&&this.i18n.appendElement(t.i18n,e);let g=!o&&this.i18n?!bB(t.children):t.children.length>0,b=!i.hasBindingsWithPipes&&0===t.outputs.length&&0===p.length&&!g,D=!b&&bB(t.children);if(b)this.creationInstruction(t.sourceSpan,c?te.elementContainer:te.element,sB(u));else{if(this.creationInstruction(t.startSourceSpan,c?te.elementContainerStart:te.elementStart,sB(u)),r&&this.creationInstruction(t.startSourceSpan,te.disableBindings),p.length>0&&this.i18nAttributesInstruction(e,p,t.startSourceSpan??t.sourceSpan),t.outputs.length>0)for(let ue of t.outputs)this.creationInstruction(ue.sourceSpan,te.listener,this.prepareListenerParameter(t.name,ue,e));o&&this.i18nStart(t.startSourceSpan,t.i18n,D)}let T=i.buildUpdateLevelInstructions(this._valueConverter),k=T.length-1;for(let ue=0;ue<=k;ue++)this._bindingSlots+=this.processStylingUpdateInstruction(e,T[ue]);let Z=ht(void 0),z=[],fe=[];d.forEach(ue=>{let he=ue.type;if(4===he){let w=ue.value.visit(this._valueConverter),F=!(w instanceof ta&&!w.value);this.allocateBindingSlots(w),z.push({span:ue.sourceSpan,paramsOrFn:zT(()=>F?this.convertPropertyBinding(w):Z,zQ(ue.name))})}else{if(ue.i18n)return;let w=ue.value.visit(this._valueConverter);if(void 0!==w){let F=[],[q,K]=Kd(ue.name),Y=TK(ue.securityContext,1===he);if(Y&&F.push(Y),q){let ae=ht(q);Y?F.push(ae):F.push(ht(null),ae)}if(this.allocateBindingSlots(w),0===he)w instanceof vs?this.interpolatedUpdateInstruction(CQ(w),e,K,ue,w,F):z.push({span:ue.sourceSpan,paramsOrFn:zT(()=>this.convertPropertyBinding(w),K,F)});else if(1===he)if(w instanceof vs&&wm(w)>1)this.interpolatedUpdateInstruction(function(n){switch(wm(n)){case 3:return te.attributeInterpolate1;case 5:return te.attributeInterpolate2;case 7:return te.attributeInterpolate3;case 9:return te.attributeInterpolate4;case 11:return te.attributeInterpolate5;case 13:return te.attributeInterpolate6;case 15:return te.attributeInterpolate7;case 17:return te.attributeInterpolate8;default:return te.attributeInterpolateV}}(w),e,K,ue,w,F);else{let ae=w instanceof vs?w.expressions[0]:w;fe.push({span:ue.sourceSpan,paramsOrFn:zT(()=>this.convertPropertyBinding(ae),K,F)})}else this.updateInstructionWithAdvance(e,ue.sourceSpan,te.classProp,()=>[ht(e),ht(K),this.convertPropertyBinding(w),...F])}}});for(let ue of z)this.updateInstructionWithAdvance(e,ue.span,te.property,ue.paramsOrFn);for(let ue of fe)this.updateInstructionWithAdvance(e,ue.span,te.attribute,ue.paramsOrFn);if(AX(this,t.children),!o&&this.i18n&&this.i18n.appendElement(t.i18n,e,!0),!b){let ue=t.endSourceSpan??t.sourceSpan;o&&this.i18nEnd(ue,D),r&&this.creationInstruction(ue,te.enableBindings),this.creationInstruction(ue,c?te.elementContainerEnd:te.elementEnd)}}visitTemplate(t){let e="ng-template",i=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(t.i18n,i);let r=t.tagName?Kd(t.tagName)[1]:t.tagName,o=`${this.contextName}${t.tagName?"_"+m_(t.tagName):""}_${i}`,s=`${o}_Template`,a=[ht(i),Ri(s),ht(r)],l=this.getAttributeExpressions(e,t.attributes,t.inputs,t.outputs,void 0,t.templateAttrs);if(a.push(this.addAttrsToConsts(l)),t.references&&t.references.length){let u=this.prepareRefsArray(t.references);a.push(this.addToConsts(u)),a.push(Tn(te.templateRefExtractor))}let c=new KC(this.constantPool,this._bindingScope,this.level+1,o,this.i18n,i,s,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{let u=c.buildTemplateFunction(t.children,t.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,t.i18n);this.constantPool.statements.push(u.toDeclStmt(s)),c._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...c._ngContentReservedSlots)}),this.creationInstruction(t.sourceSpan,te.templateCreate,()=>(a.splice(2,0,ht(c.getConstCount()),ht(c.getVarCount())),sB(a))),this.templatePropertyBindings(i,t.templateAttrs),r===e){let[u,d]=function(n,t){let e=[],i=[];for(let r of n)(t(r)?e:i).push(r);return[e,i]}(t.inputs,Cwe);u.length>0&&this.i18nAttributesInstruction(i,u,t.startSourceSpan??t.sourceSpan),d.length>0&&this.templatePropertyBindings(i,d);for(let p of t.outputs)this.creationInstruction(p.sourceSpan,te.listener,this.prepareListenerParameter("ng_template",p,i))}}visitBoundText(t){if(this.i18n){let r=t.value.visit(this._valueConverter);return this.allocateBindingSlots(r),void(r instanceof vs&&(this.i18n.appendBoundText(t.i18n),this.i18nAppendBindings(r.expressions)))}let e=this.allocateDataSlot();this.creationInstruction(t.sourceSpan,te.text,[ht(e)]);let i=t.value.visit(this._valueConverter);this.allocateBindingSlots(i),i instanceof vs?this.updateInstructionWithAdvance(e,t.sourceSpan,function(n){switch(wm(n)){case 1:return te.textInterpolate;case 3:return te.textInterpolate1;case 5:return te.textInterpolate2;case 7:return te.textInterpolate3;case 9:return te.textInterpolate4;case 11:return te.textInterpolate5;case 13:return te.textInterpolate6;case 15:return te.textInterpolate7;case 17:return te.textInterpolate8;default:return te.textInterpolateV}}(i),()=>this.getUpdateInstructionArguments(i)):QT("Text nodes should be interpolated and never bound directly.")}visitText(t){this.i18n||this.creationInstruction(t.sourceSpan,te.text,[ht(this.allocateDataSlot()),ht(t.value)])}visitIcu(t){let e=!1;this.i18n||(e=!0,this.i18nStart(null,t.i18n,!0));let i=this.i18n,r=this.i18nBindProps(t.vars),o=this.i18nBindProps(t.placeholders),s=t.i18n,a=l=>{let u=UV({...r,...o},!1);return gm(null,te.i18nPostprocess,[l,wD(u,!0)])};if(VT(i.meta))this.i18nTranslate(s,{},i.ref,a);else{let l=this.i18nTranslate(s,{},void 0,a);i.appendIcu(WQ(s).name,l)}return e&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Nu(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(t,e){let i=[];for(let r of e){if(!(r instanceof w_))continue;let o=r.value.visit(this._valueConverter);if(void 0!==o)if(this.allocateBindingSlots(o),o instanceof vs){let s=[];this.interpolatedUpdateInstruction(CQ(o),t,r.name,r,o,s)}else i.push({span:r.sourceSpan,paramsOrFn:zT(()=>this.convertPropertyBinding(o),r.name)})}for(let r of i)this.updateInstructionWithAdvance(t,r.span,te.property,r.paramsOrFn)}instructionFn(t,e,i,r,o=!1){t[o?"unshift":"push"]({span:e,reference:i,paramsOrFn:r})}processStylingUpdateInstruction(t,e){let i=0;if(e)for(let r of e.calls)i+=r.allocateBindingSlots,this.updateInstructionWithAdvance(t,r.sourceSpan,e.reference,()=>r.params(o=>r.supportsInterpolation&&o instanceof vs?this.getUpdateInstructionArguments(o):this.convertPropertyBinding(o)));return i}creationInstruction(t,e,i,r){this.instructionFn(this._creationCodeFns,t,e,i||[],r)}updateInstructionWithAdvance(t,e,i,r){this.addAdvanceInstructionIfNecessary(t,e),this.updateInstruction(e,i,r)}updateInstruction(t,e,i){this.instructionFn(this._updateCodeFns,t,e,i||[])}addAdvanceInstructionIfNecessary(t,e){if(t!==this._currentIndex){let i=t-this._currentIndex;if(i<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,e,te.advance,[ht(i)]),this._currentIndex=t}}allocatePureFunctionSlots(t){let e=this._pureFunctionSlots;return this._pureFunctionSlots+=t,e}allocateBindingSlots(t){this._bindingSlots+=t instanceof vs?t.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Ri(Hc):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(t){let e=uK(this,this.getImplicitReceiverExpr(),t,this.bindingContext()),i=e.currValExpr;return this._tempVariables.push(...e.stmts),i}getUpdateInstructionArguments(t){let{args:e,stmts:i}=function(n,t,e,i){let r=new GC(n,t,i,!0),o=r.visitInterpolation(e,zi.Expression);return r.usesImplicitReceiver&&n.notifyImplicitReceiverUse(),{stmts:dK(r,i),args:o.args}}(this,this.getImplicitReceiverExpr(),t,this.bindingContext());return this._tempVariables.push(...i),e}getAttributeExpressions(t,e,i,r,o,s=[],a=[]){let u,l=new Set,c=[];for(let p of e)if("ngProjectAs"===p.name&&(u=p),p.i18n){let f,{i18nVarRefsCache:h}=this._constants;h.has(p.i18n)?f=h.get(p.i18n):(f=this.i18nTranslate(p.i18n),h.set(p.i18n,f)),c.push(ht(p.name),f)}else c.push(...xQ(p.name),E1e(t,p));function d(p,h){"string"==typeof p?l.has(p)||(c.push(...xQ(p)),void 0!==h&&c.push(h),l.add(p)):c.push(ht(p))}if(u&&c.push(...function(n){let t=NV(n.value)[0];return[ht(5),Nu(t)]}(u)),o&&o.populateInitialStylingAttrs(c),i.length||r.length){let p=c.length;for(let h=0;h<i.length;h++){let f=i[h];4!==f.type&&1!==f.type&&d(f.name)}for(let h=0;h<r.length;h++){let f=r[h];1!==f.type&&d(f.name)}c.length!==p&&c.splice(p,0,ht(3))}return s.length&&(c.push(ht(4)),s.forEach(p=>d(p.name))),a.length&&(c.push(ht(6)),a.forEach(p=>d(p.name))),c}addToConsts(t){if(VQ(t))return WT;let e=this._constants.constExpressions;for(let i=0;i<e.length;i++)if(e[i].isEquivalent(t))return ht(i);return ht(e.push(t)-1)}addAttrsToConsts(t){return t.length>0?this.addToConsts(_r(t)):WT}prepareRefsArray(t){return t&&0!==t.length?Nu(DK(t.map(i=>{let r=this.allocateDataSlot(),o=this._bindingScope.freshReferenceName(),s=this.level,a=Ri(o);return this._bindingScope.set(s,i.name,a,0,(l,c)=>{let u=c>0?[IV(c).toStmt()]:[],d=a.set(Tn(te.reference).callFn([ht(r)]));return u.concat(d.toConstDecl())},!0),[i.name,i.value]}))):WT}prepareListenerParameter(t,e,i){return()=>{let r=e.name,o=1===e.type?jQ(r,e.phase):m_(r),s=`${this.templateName}_${t}_${o}_${i}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,wK);return SK(e,s,a)}}},TD=class extends $B{constructor(t,e,i,r){super(),this.constantPool=t,this.allocateSlot=e,this.allocatePureFunctionSlots=i,this.definePipe=r,this._pipeBindExprs=[]}visitPipe(t,e){let i=this.allocateSlot(),r=`PIPE:${i}`,o=this.allocatePureFunctionSlots(2+t.args.length),s=new Lu(t.span,t.sourceSpan,t.nameSpan,new xm(t.span,t.sourceSpan),r),{identifier:a,isVarLength:l}=function(n){let t=v1e[n.length];return{identifier:t||te.pipeBindV,isVarLength:!t}}(t.args);this.definePipe(t.name,r,i,Tn(a));let c=[t.exp,...t.args],u=this.visitAll(l?[new O_(t.span,t.sourceSpan,c)]:c),d=new ah(t.span,t.sourceSpan,s,[new ta(t.span,t.sourceSpan,i),new ta(t.span,t.sourceSpan,o),...u],null);return this._pipeBindExprs.push(d),d}updatePipeSlotOffsets(t){this._pipeBindExprs.forEach(e=>{e.args[1].value+=t})}visitLiteralArray(t,e){return new rh(t.span,t.sourceSpan,this.visitAll(t.expressions),i=>{let r=_r(i);return bQ(this.constantPool,r,this.allocatePureFunctionSlots)})}visitLiteralMap(t,e){return new rh(t.span,t.sourceSpan,this.visitAll(t.values),i=>{let r=ql(i.map((o,s)=>({key:t.keys[s].key,value:o,quoted:t.keys[s].quoted})));return bQ(this.constantPool,r,this.allocatePureFunctionSlots)})}},v1e=[te.pipeBind1,te.pipeBind2,te.pipeBind3,te.pipeBind4],b1e=[te.pureFunction0,te.pureFunction1,te.pureFunction2,te.pureFunction3,te.pureFunction4,te.pureFunction5,te.pureFunction6,te.pureFunction7,te.pureFunction8];function IV(n){return Tn(te.nextContext).callFn(n>1?[ht(n)]:[])}function bQ(n,t,e){let{literalFactory:i,literalFactoryArguments:r}=n.getLiteralFactory(t),o=e(1+r.length),{identifier:s,isVarLength:a}=function(n){let t=b1e[n.length];return{identifier:t||te.pureFunctionV,isVarLength:!t}}(r),l=[ht(o),i];return a?l.push(_r(r)):l.push(...r),Tn(s).callFn(l)}function xQ(n){let[t,e]=Kd(n),i=ht(e);return t?[ht(0),ht(t),i]:[i]}var o_="$$shared_ctx$$",B_=class{constructor(t=0,e=null,i){if(this.bindingLevel=t,this.parent=e,this.globals=i,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,this.usesRestoredViewContext=!1,void 0!==i)for(let r of i)this.set(0,r,Ri(r))}static createRootScope(){return new B_}get(t){let e=this;for(;e;){let i=e.map.get(t);if(null!=i)return e!==this&&(i={retrievalLevel:i.retrievalLevel,lhs:i.lhs,declareLocalCallback:i.declareLocalCallback,declare:!1,priority:i.priority},this.map.set(t,i),this.maybeGenerateSharedContextVar(i),this.maybeRestoreView()),i.declareLocalCallback&&!i.declare&&(i.declare=!0),i.lhs;e=e.parent}return 0===this.bindingLevel?null:this.getComponentProperty(t)}set(t,e,i,r=0,o,s){if(this.map.has(e)){if(s)return this;QT(`The name ${e} is already defined in scope to be ${this.map.get(e)}`)}return this.map.set(e,{retrievalLevel:t,lhs:i,declare:!1,declareLocalCallback:o,priority:r}),this}getLocal(t){return this.get(t)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get(o_+0).declare=!0)}nestedScope(t,e){let i=new B_(t,this,e);return t>0&&i.generateSharedContextVar(0),i}getOrCreateSharedContextVar(t){let e=o_+t;return this.map.has(e)||this.generateSharedContextVar(t),this.map.get(e).lhs}getSharedContextName(t){let e=this.map.get(o_+t);return e&&e.declare?e.lhs:null}maybeGenerateSharedContextVar(t){if(1===t.priority&&t.retrievalLevel<this.bindingLevel){let e=this.map.get(o_+t.retrievalLevel);e?e.declare=!0:this.generateSharedContextVar(t.retrievalLevel)}}generateSharedContextVar(t){let e=Ri(Hc+this.freshReferenceName());this.map.set(o_+t,{retrievalLevel:t,lhs:e,declareLocalCallback:(i,r)=>[e.set(IV(r)).toConstDecl()],declare:!1,priority:2})}getComponentProperty(t){let e=this.map.get(o_+0);return e.declare=!0,this.maybeRestoreView(),e.lhs.prop(t)}maybeRestoreView(){this.isListenerScope()&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Ri(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){if(this.restoreViewVariable){let t=gm(null,te.restoreView,[this.restoreViewVariable]);return this.usesRestoredViewContext?Ri(YQ).set(t).toConstDecl():t.toStmt()}return null}viewSnapshotStatements(){return this.restoreViewVariable?[this.restoreViewVariable.set(gm(null,te.getCurrentView,[])).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let t=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,i)=>i.retrievalLevel-e.retrievalLevel||i.priority-e.priority).reduce((e,i)=>{let r=this.bindingLevel-i.retrievalLevel,o=i.declareLocalCallback(this,r-t);return t=r,e.concat(o)},[])}freshReferenceName(){let t=this;for(;t.parent;)t=t.parent;return"_r"+t.referenceNameIndex++}hasRestoreViewVariable(){return!!this.restoreViewVariable}notifyRestoredViewContextUse(){this.usesRestoredViewContext=!0}};function CQ(n){switch(wm(n)){case 1:return te.propertyInterpolate;case 3:return te.propertyInterpolate1;case 5:return te.propertyInterpolate2;case 7:return te.propertyInterpolate3;case 9:return te.propertyInterpolate4;case 11:return te.propertyInterpolate5;case 13:return te.propertyInterpolate6;case 15:return te.propertyInterpolate7;case 17:return te.propertyInterpolate8;default:return te.propertyInterpolateV}}function S1e(n,t,e={}){let{interpolationConfig:i,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:o}=e,s=DD(i),l=(new _V).parse(n,t,{leadingTriviaChars:g1e,...e,tokenizeExpansionForms:!0});if(!e.alwaysAttemptHtmlToR3AstConversion&&l.errors&&l.errors.length>0){let D={interpolationConfig:i,preserveWhitespaces:r,errors:l.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}let c=l.rootNodes,u=new ED(i,!r,o),d=u.visitAllWithErrors(c);if(!e.alwaysAttemptHtmlToR3AstConversion&&d.errors&&d.errors.length>0){let D={interpolationConfig:i,preserveWhitespaces:r,errors:d.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}c=d.rootNodes,r||(c=Uu(new class{visitElement(t,e){return lEe.has(t.name)||t.attrs.some(t=>t.name===gK)?new qC(t.name,Uu(this,t.attrs),t.children,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n):new qC(t.name,t.attrs,function(n,t){let e=[];return t.forEach((i,r)=>{let s=i.visit(n,{prev:t[r-1],next:t[r+1]});s&&e.push(s)}),e}(this,t.children),t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}visitAttribute(t,e){return t.name!==gK?t:null}visitText(t,e){if(t.value.match(cEe)||e&&(e.prev instanceof N_||e.next instanceof N_)){let o=t.tokens.map(a=>5===a.type?function({type:n,parts:t,sourceSpan:e}){return{type:n,parts:[yK(t[0])],sourceSpan:e}}(a):a),s=yK(t.value);return new F_(s,t.sourceSpan,o,t.i18n)}return null}visitComment(t,e){return t}visitExpansion(t,e){return t}visitExpansionCase(t,e){return t}},c),u.hasI18nMeta&&(c=Uu(new ED(i,!1),c)));let{nodes:p,errors:h,styleUrls:f,styles:m,ngContentSelectors:x,commentNodes:g}=function(n,t,e){let i=new class{constructor(t,e){this.bindingParser=t,this.options=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.commentNodes=[],this.inI18nBlock=!1}visitElement(t){let e=AC(t.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",t.sourceSpan),this.inI18nBlock=!0);let i=CK(t);if(i.type===na.SCRIPT)return null;if(i.type===na.STYLE){let x=1===(n=t).children.length&&n.children[0]instanceof F_?n.children[0].value:null;return null!==x&&this.styles.push(x),null}if(i.type===na.STYLESHEET&&function(n){if(null==n||0===n.length||"/"==n[0])return!1;let t=n.match(EEe);return null===t||"package"==t[1]||"asset"==t[1]}(i.hrefAttr))return this.styleUrls.push(i.hrefAttr),null;var n;let r=function(n){return"ng-template"===Kd(n)[1]}(t.name),o=[],s=[],a=[],l=[],c=[],u={},d=[],p=[],h=!1;for(let x of t.attrs){let g=!1,b=_Q(x.name),D=!1;if(x.i18n&&(u[x.name]=x.i18n),b.startsWith("*")){h&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",x.sourceSpan),D=!0,h=!0;let T=x.value,k=b.substring("*".length),Z=[];this.bindingParser.parseInlineTemplateBinding(k,T,x.sourceSpan,x.valueSpan?x.valueSpan.start.offset:x.sourceSpan.start.offset+x.name.length,[],d,Z,!0),p.push(...Z.map(fe=>new oD(fe.name,fe.value,fe.sourceSpan,fe.keySpan,fe.valueSpan)))}else g=this.parseAttribute(r,x,[],o,s,a,l);!g&&!D&&c.push(this.visitAttribute(x))}let m,f=Uu(i.nonBindable?HEe:this,t.children);if(i.type===na.NG_CONTENT){t.children&&!t.children.every(b=>function(n){return n instanceof F_&&0==n.value.trim().length}(b)||function(n){return n instanceof xD}(b))&&this.reportError("<ng-content> element cannot have content.",t.sourceSpan);let x=i.selectAttr,g=t.attrs.map(b=>this.visitAttribute(b));m=new class{constructor(t,e,i,r){this.selector=t,this.attributes=e,this.sourceSpan=i,this.i18n=r,this.name="ng-content"}visit(t){return t.visitContent(this)}}(x,g,t.sourceSpan,t.i18n),this.ngContentSelectors.push(x)}else if(r){let x=this.extractAttributes(t.name,o,u);m=new uC(t.name,c,x.bound,s,[],f,l,a,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}else{let x=this.extractAttributes(t.name,o,u);m=new E_(t.name,c,x.bound,s,f,l,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}if(h){let x=this.extractAttributes("ng-template",d,u),g=[];x.literal.forEach(k=>g.push(k)),x.bound.forEach(k=>g.push(k));let b=m instanceof E_?{attributes:m.attributes,inputs:m.inputs,outputs:m.outputs}:{attributes:[],inputs:[],outputs:[]};m=new uC(m instanceof uC?null:m.name,b.attributes,b.inputs,b.outputs,g,[m],[],p,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,r&&e?void 0:t.i18n)}return e&&(this.inI18nBlock=!1),m}visitAttribute(t){return new DC(t.name,t.value,t.sourceSpan,t.keySpan,t.valueSpan,t.i18n)}visitText(t){return this._visitTextWithInterpolation(t.value,t.sourceSpan,t.tokens,t.i18n)}visitExpansion(t){if(!t.i18n)return null;if(!AC(t.i18n))throw new Error(`Invalid type "${t.i18n.constructor}" for "i18n" property of ${t.sourceSpan.toString()}. Expected a "Message"`);let e=t.i18n,i={},r={};return Object.keys(e.placeholders).forEach(o=>{let s=e.placeholders[o];if(o.startsWith("VAR_")){let a=o.trim(),l=this.bindingParser.parseInterpolationExpression(s.text,s.sourceSpan);i[a]=new TC(l,s.sourceSpan)}else r[o]=this._visitTextWithInterpolation(s.text,s.sourceSpan,null)}),new sD(i,r,t.sourceSpan,e)}visitExpansionCase(t){return null}visitComment(t){return this.options.collectCommentNodes&&this.commentNodes.push(new class{constructor(t,e){this.value=t,this.sourceSpan=e}visit(t){throw new Error("visit() not implemented for Comment")}}(t.value||"",t.sourceSpan)),null}extractAttributes(t,e,i){let r=[],o=[];return e.forEach(s=>{let a=i[s.name];if(s.isLiteral)o.push(new DC(s.name,s.expression.source||"",s.sourceSpan,s.keySpan,s.valueSpan,a));else{let l=this.bindingParser.createBoundElementProperty(t,s,!0,!1);r.push(w_.fromBoundElementProperty(l,a))}}),{bound:r,literal:o}}parseAttribute(t,e,i,r,o,s,a){let l=_Q(e.name),c=e.value,u=e.sourceSpan,d=e.valueSpan?e.valueSpan.start.offset:u.start.offset;function p(g,b,D){let k=g.start.moveBy(b.length+(e.name.length-l.length)),Z=k.moveBy(D.length);return new Go(k,Z,k,D)}let h=l.match(LEe);if(h){if(null!=h[1]){let g=h[7],b=p(u,h[1],g);this.bindingParser.parsePropertyBinding(g,c,!1,u,d,e.valueSpan,i,r,b)}else if(h[2])if(t){let g=h[7],b=p(u,h[2],g);this.parseVariable(g,c,u,b,e.valueSpan,s)}else this.reportError('"let-" is only supported on ng-template elements.',u);else if(h[3]){let g=h[7],b=p(u,h[3],g);this.parseReference(g,c,u,b,e.valueSpan,a)}else if(h[4]){let g=[],b=h[7],D=p(u,h[4],b);this.bindingParser.parseEvent(b,c,!1,u,e.valueSpan||u,i,g,D),mB(g,o)}else if(h[5]){let g=h[7],b=p(u,h[5],g);this.bindingParser.parsePropertyBinding(g,c,!1,u,d,e.valueSpan,i,r,b),this.parseAssignmentEvent(g,c,u,e.valueSpan,i,o,b)}else if(h[6]){let g=p(u,"",l);this.bindingParser.parseLiteralAttr(l,c,u,d,e.valueSpan,i,r,g)}return!0}let f=null;if(l.startsWith(Zp_BANANA_BOX.start)?f=Zp_BANANA_BOX:l.startsWith(Zp_PROPERTY.start)?f=Zp_PROPERTY:l.startsWith(Zp_EVENT.start)&&(f=Zp_EVENT),null!==f&&l.endsWith(f.end)&&l.length>f.start.length+f.end.length){let g=l.substring(f.start.length,l.length-f.end.length),b=p(u,f.start,g);if(f.start===Zp_BANANA_BOX.start)this.bindingParser.parsePropertyBinding(g,c,!1,u,d,e.valueSpan,i,r,b),this.parseAssignmentEvent(g,c,u,e.valueSpan,i,o,b);else if(f.start===Zp_PROPERTY.start)this.bindingParser.parsePropertyBinding(g,c,!1,u,d,e.valueSpan,i,r,b);else{let D=[];this.bindingParser.parseEvent(g,c,!1,u,e.valueSpan||u,i,D,b),mB(D,o)}return!0}let m=p(u,"",l);return this.bindingParser.parsePropertyInterpolation(l,c,u,e.valueSpan,i,r,m,e.valueTokens??null)}_visitTextWithInterpolation(t,e,i,r){let o=vK(t),s=this.bindingParser.parseInterpolation(o,e,i);return s?new TC(s,e,r):new M_(o,e)}parseVariable(t,e,i,r,o,s){t.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',i):0===t.length&&this.reportError("Variable does not have a name",i),s.push(new oD(t,e,i,r,o))}parseReference(t,e,i,r,o,s){t.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',i):0===t.length?this.reportError("Reference does not have a name",i):s.some(a=>a.name===t)&&this.reportError(`Reference "#${t}" is defined more than once`,i),s.push(new class{constructor(t,e,i,r,o){this.name=t,this.value=e,this.sourceSpan=i,this.keySpan=r,this.valueSpan=o}visit(t){return t.visitReference(this)}}(t,e,i,r,o))}parseAssignmentEvent(t,e,i,r,o,s,a){let l=[];this.bindingParser.parseEvent(`${t}Change`,`${e} =$event`,!0,i,r||i,o,l,a),mB(l,s)}reportError(t,e,i=ku.ERROR){this.errors.push(new ym(e,t,i))}}(t,e),s={nodes:Uu(i,n),errors:t.errors.concat(i.errors),styleUrls:i.styleUrls,styles:i.styles,ngContentSelectors:i.ngContentSelectors};return e.collectCommentNodes&&(s.commentNodes=i.commentNodes),s}(c,s,{collectCommentNodes:!!e.collectCommentNodes});h.push(...l.errors,...d.errors);let b={interpolationConfig:i,preserveWhitespaces:r,errors:h.length>0?h:null,nodes:p,styleUrls:f,styles:m,ngContentSelectors:x};return e.collectCommentNodes&&(b.commentNodes=g),b}var EK=new SD;function DD(n=Pu){return new class{constructor(t,e,i,r){this._exprParser=t,this._interpolationConfig=e,this._schemaRegistry=i,this.errors=r}get interpolationConfig(){return this._interpolationConfig}createBoundHostProperties(t,e){let i=[];for(let r of Object.keys(t)){let o=t[r];"string"==typeof o?this.parsePropertyBinding(r,o,!0,e,e.start.offset,void 0,[],i,e):this._reportError(`Value of the host property binding "${r}" needs to be a string representing an expression but got "${o}" (${typeof o})`,e)}return i}createDirectiveHostEventAsts(t,e){let i=[];for(let r of Object.keys(t)){let o=t[r];"string"==typeof o?this.parseEvent(r,o,!1,e,e,[],i,e):this._reportError(`Value of the host listener "${r}" needs to be a string representing an expression but got "${o}" (${typeof o})`,e)}return i}parseInterpolation(t,e,i){let r=e.start.toString(),o=e.fullStart.offset;try{let s=this._exprParser.parseInterpolation(t,r,o,i,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,e),s}catch(s){return this._reportError(`${s}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",r,o)}}parseInterpolationExpression(t,e){let i=e.start.toString(),r=e.start.offset;try{let o=this._exprParser.parseInterpolationExpression(t,i,r);return o&&this._reportExpressionParserErrors(o.errors,e),o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",i,r)}}parseInlineTemplateBinding(t,e,i,r,o,s,a,l){let u=this._parseTemplateBindings(t,e,i,i.start.offset+"*".length,r);for(let d of u){let p=Kp(i,d.sourceSpan),h=d.key.source,f=Kp(i,d.key.span);if(d instanceof zC){let m=d.value?d.value.source:"$implicit",x=d.value?Kp(i,d.value.span):void 0;a.push(new eV(h,m,p,f,x))}else if(d.value){let m=l?p:i,x=Kp(i,d.value.ast.sourceSpan);this._parsePropertyAst(h,d.value,m,f,x,o,s)}else o.push([h,""]),this.parseLiteralAttr(h,null,f,r,void 0,o,s,f)}}_parseTemplateBindings(t,e,i,r,o){let s=i.start.toString();try{let a=this._exprParser.parseTemplateBindings(t,e,s,r,o);return this._reportExpressionParserErrors(a.errors,i),a.warnings.forEach(l=>{this._reportError(l,i,ku.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,i),[]}}parseLiteralAttr(t,e,i,r,o,s,a,l){hB(t)?(t=t.substring(1),void 0!==l&&(l=Kp(l,new al(l.start.offset+1,l.end.offset))),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',i,ku.ERROR),this._parseAnimation(t,e,i,r,l,o,s,a)):a.push(new pC(t,this._exprParser.wrapLiteralPrimitive(e,"",r),ih.LITERAL_ATTR,i,l,o))}parsePropertyBinding(t,e,i,r,o,s,a,l,c){0===t.length&&this._reportError("Property name is missing in binding",r);let u=!1;t.startsWith(pB)?(u=!0,t=t.substring(pB.length),void 0!==c&&(c=Kp(c,new al(c.start.offset+pB.length,c.end.offset)))):hB(t)&&(u=!0,t=t.substring(1),void 0!==c&&(c=Kp(c,new al(c.start.offset+1,c.end.offset)))),u?this._parseAnimation(t,e,r,o,c,s,a,l):this._parsePropertyAst(t,this._parseBinding(e,i,s||r,o),r,c,s,a,l)}parsePropertyInterpolation(t,e,i,r,o,s,a,l){let c=this.parseInterpolation(e,r||i,l);return!!c&&(this._parsePropertyAst(t,c,i,a,r,o,s),!0)}_parsePropertyAst(t,e,i,r,o,s,a){s.push([t,e.source]),a.push(new pC(t,e,ih.DEFAULT,i,r,o))}_parseAnimation(t,e,i,r,o,s,a,l){0===t.length&&this._reportError("Animation trigger is missing",i);let c=this._parseBinding(e||"undefined",!1,s||i,r);a.push([t,c.source]),l.push(new pC(t,c,ih.ANIMATION,i,o,s))}_parseBinding(t,e,i,r){let o=(i&&i.start||"(unknown)").toString();try{let s=e?this._exprParser.parseSimpleBinding(t,o,r,this._interpolationConfig):this._exprParser.parseBinding(t,o,r,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,i),s}catch(s){return this._reportError(`${s}`,i),this._exprParser.wrapLiteralPrimitive("ERROR",o,r)}}createBoundElementProperty(t,e,i=!1,r=!0){if(e.isAnimation)return new fD(e.name,4,io.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let s,c,o=null,a=null,l=e.name.split(".");if(l.length>1)if("attr"==l[0]){a=l.slice(1).join("."),i||this._validatePropertyOrAttributeName(a,e.sourceSpan,!0),c=fB(this._schemaRegistry,t,a,!0);let u=a.indexOf(":");if(u>-1){let d=a.substring(0,u),p=a.substring(u+1);a=wB(d,p)}s=1}else"class"==l[0]?(a=l[1],s=2,c=[io.NONE]):"style"==l[0]&&(o=l.length>2?l[2]:null,a=l[1],s=3,c=[io.STYLE]);if(null===a){let u=this._schemaRegistry.getMappedPropName(e.name);a=r?u:e.name,c=fB(this._schemaRegistry,t,u,!1),s=0,i||this._validatePropertyOrAttributeName(u,e.sourceSpan,!1)}return new fD(a,s,c[0],e.expression,o,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(t,e,i,r,o,s,a,l){0===t.length&&this._reportError("Event name is missing in binding",r),hB(t)?(t=t.slice(1),void 0!==l&&(l=Kp(l,new al(l.start.offset+1,l.end.offset))),this._parseAnimationEvent(t,e,i,r,o,a,l)):this._parseRegularEvent(t,e,i,r,o,s,a,l)}calcPossibleSecurityContexts(t,e,i){let r=this._schemaRegistry.getMappedPropName(e);return fB(this._schemaRegistry,t,r,i)}_parseAnimationEvent(t,e,i,r,o,s,a){let l=function(n,t){return OQ(n,".",t)}(t,[t,""]),c=l[0],u=l[1].toLowerCase(),d=this._parseAction(e,i,o);s.push(new hD(c,u,1,d,r,o,a)),0===c.length&&this._reportError("Animation event name is missing in binding",r),u?"start"!==u&&"done"!==u&&this._reportError(`The provided animation output phase value "${u}" for "@${c}" is not supported (use start or done)`,r):this._reportError(`The animation trigger output event (@${c}) is missing its phase value name (start or done are currently supported)`,r)}_parseRegularEvent(t,e,i,r,o,s,a,l){let[c,u]=function(n,t){return OQ(n,":",t)}(t,[null,t]),d=this._parseAction(e,i,o);s.push([t,d.source]),a.push(new hD(u,c,0,d,r,o,l))}_parseAction(t,e,i){let r=(i&&i.start||"(unknown").toString(),o=i&&i.start?i.start.offset:0;try{let s=this._exprParser.parseAction(t,e,r,o,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,i),!s||s.ast instanceof Ia?(this._reportError("Empty expressions are not allowed",i),this._exprParser.wrapLiteralPrimitive("ERROR",r,o)):s}catch(s){return this._reportError(`${s}`,i),this._exprParser.wrapLiteralPrimitive("ERROR",r,o)}}_reportError(t,e,i=ku.ERROR){this.errors.push(new ym(e,t,i))}_reportExpressionParserErrors(t,e){for(let i of t)this._reportError(i.message,e)}_validatePropertyOrAttributeName(t,e,i){let r=i?this._schemaRegistry.validateAttribute(t):this._schemaRegistry.validateProperty(t);r.error&&this._reportError(r.msg,e,ku.ERROR)}}(new bD(new yD),n,EK,[])}function TK(n,t){switch(n){case io.HTML:return Tn(te.sanitizeHtml);case io.SCRIPT:return Tn(te.sanitizeScript);case io.STYLE:return t?Tn(te.sanitizeStyle):null;case io.URL:return Tn(te.sanitizeUrl);case io.RESOURCE_URL:return Tn(te.sanitizeResourceUrl);default:return null}}function E1e(n,t){let e=Nu(t.value);if(!xK(n,t.name))return e;switch(EK.securityContext(n,t.name,!0)){case io.HTML:return CX(Tn(te.trustConstantHtml),new $T([new eD(t.value)],[]),void 0,t.valueSpan);case io.RESOURCE_URL:return CX(Tn(te.trustConstantResourceUrl),new $T([new eD(t.value)],[]),void 0,t.valueSpan);default:return e}}function D1e(n){return n instanceof M_||n instanceof TC||n instanceof sD}function bB(n){return n.every(D1e)}function zT(n,t,e){return()=>{let i=n(),r=Array.isArray(i)?i:[i];return e&&r.push(...e),t&&r.unshift(ht(t)),r}}var MQ="ngI18nClosureMode";function DK(n){return n.reduce((t,e)=>{let i=Array.isArray(e)?DK(e):e;return t.concat(i)},[])}var P1e=/attr\.([^\]]+)/;function IK(n,t,e){let i=new sh,r=NV(n.selector);return i.set("type",n.internalType),r.length>0&&i.set("selectors",Nu(r)),n.queries.length>0&&i.set("contentQueries",function(n,t,e){let i=[],r=[],o=XQ(r,"_t");for(let a of n){i.push(Tn(te.contentQuery).callFn([Ri("dirIndex"),...RK(a,t)]).toStmt());let l=o(),c=Tn(te.loadQuery).callFn([]),u=Tn(te.queryRefresh).callFn([l.set(c)]),d=Ri(Hc).prop(a.propertyName).set(a.first?l.prop("first"):l);r.push(u.and(d).toStmt())}let s=e?`${e}_ContentQueries`:null;return ra([new ia($C,ZC),new ia(Hc,null),new ia("dirIndex",null)],[lh(1,i),lh(2,r)],Pa,null,s)}(n.queries,t,n.name)),n.viewQueries.length&&i.set("viewQuery",function(n,t,e){let i=[],r=[],o=XQ(r,"_t");n.forEach(a=>{let l=Tn(te.viewQuery).callFn(RK(a,t));i.push(l.toStmt());let c=o(),u=Tn(te.loadQuery).callFn([]),d=Tn(te.queryRefresh).callFn([c.set(u)]),p=Ri(Hc).prop(a.propertyName).set(a.first?c.prop("first"):c);r.push(d.and(p).toStmt())});let s=e?`${e}_Query`:null;return ra([new ia($C,ZC),new ia(Hc,null)],[lh(1,i),lh(2,r)],Pa,null,s)}(n.viewQueries,t,n.name)),i.set("hostBindings",function(n,t,e,i,r,o,s){let a=Ri(Hc),l=new vD(a),{styleAttr:c,classAttr:u}=n.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);let d=[],p=[],h=[],f=t,m=e.createDirectiveHostEventAsts(n.listeners,f);m&&m.length&&d.push(...function(n,t){let e=[],i=[],r=[];for(let o of n){let s=o.name&&m_(o.name),a=1===o.type?jQ(s,o.targetOrPhase):s,l=t&&s?`${t}_${a}_HostBindingHandler`:null,c=SK(S_.fromParsedEvent(o),l);1==o.type?i.push(c):e.push(c)}for(let o of i)r.push({reference:te.syntheticHostListener,paramsOrFn:o,span:null});for(let o of e)r.push({reference:te.listener,paramsOrFn:o,span:null});return r}(m,o));let x=e.createBoundHostProperties(n.properties,f),g=[],b=0;x&&x.forEach(ue=>{l.registerInputBasedOnName(ue.name,ue.expression,f)?b+=2:(g.push(ue),b++)});let D,T=()=>(D||(D=new TD(i,()=>QT("Unexpected node"),he=>{let w=b;return b+=he,w},()=>QT("Unexpected pipe"))),D),k=[],Z=[],z=[];for(let ue of g){let he=ue.expression.visit(T()),w=SQ(a,he),{bindingName:F,instruction:q,isAttribute:K}=q1e(ue),de=e.calcPossibleSecurityContexts(r,F,K).filter(le=>le!==io.NONE),Y=null;de.length&&(Y=2===de.length&&de.indexOf(io.URL)>-1&&de.indexOf(io.RESOURCE_URL)>-1?Tn(te.sanitizeUrlOrResourceUrl):TK(de[0],K));let ae=[ht(F),w.currValExpr];Y&&ae.push(Y),h.push(...w.stmts),q===te.hostProperty?k.push(ae):q===te.attribute?Z.push(ae):q===te.syntheticHostProperty?z.push(ae):p.push({reference:q,paramsOrFn:ae,span:null})}for(let ue of k)p.push({reference:te.hostProperty,paramsOrFn:ue,span:null});for(let ue of Z)p.push({reference:te.attribute,paramsOrFn:ue,span:null});for(let ue of z)p.push({reference:te.syntheticHostProperty,paramsOrFn:ue,span:null});let fe=function(n){let t=[];for(let e of Object.getOwnPropertyNames(n)){let i=n[e];t.push(ht(e),i)}return t}(n.attributes);if(l.assignHostAttrs(fe,s),l.hasBindings&&l.buildUpdateLevelInstructions(T()).forEach(ue=>{for(let he of ue.calls)b+=Math.max(he.allocateBindingSlots-2,0),p.push({reference:ue.reference,paramsOrFn:W1e(he,a,SQ),span:null})}),b&&s.set("hostVars",ht(b)),d.length>0||p.length>0){let ue=o?`${o}_HostBindings`:null,he=[];return d.length>0&&he.push(lh(1,cD(d))),p.length>0&&he.push(lh(2,h.concat(cD(p)))),ra([new ia($C,ZC),new ia(Hc,null)],he,Pa,null,ue)}return null}(n.host,n.typeSourceSpan,e,t,n.selector||"",n.name,i)),i.set("inputs",OX(n.inputs,!0)),i.set("outputs",OX(n.outputs)),null!==n.exportAs&&i.set("exportAs",_r(n.exportAs.map(o=>ht(o)))),n.isStandalone&&i.set("standalone",ht(!0)),i}function PK(n,t){let e=[],i=t.providers,r=t.viewProviders;if(i||r){let o=[i||new hm([])];r&&o.push(r),e.push(Tn(te.ProvidersFeature).callFn(o))}t.usesInheritance&&e.push(Tn(te.InheritDefinitionFeature)),t.fullInheritance&&e.push(Tn(te.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&e.push(Tn(te.NgOnChangesFeature)),t.hasOwnProperty("template")&&t.isStandalone&&e.push(Tn(te.StandaloneFeature)),e.length&&n.set("features",_r(e))}function RK(n,t){let e=[kwe(n,t),ht(B1e(n))];return n.read&&e.push(n.read),e}function B1e(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function U1e(n){return ul(ht(n))}function wQ(n){return ul(ql(Object.keys(n).map(e=>({key:e,value:ht(Array.isArray(n[e])?n[e][0]:n[e]),quoted:!0}))))}function PV(n){return n.length>0?ul(_r(n.map(t=>ht(t)))):Jd}function OK(n){let t=null!==n.selector?n.selector.replace(/\n/g,""):null;return[ID(n.type.type,n.typeArgumentCount),null!==t?U1e(t):Jd,null!==n.exportAs?PV(n.exportAs):Jd,wQ(n.inputs),wQ(n.outputs),PV(n.queries.map(e=>e.propertyName))]}function SQ(n,t){return uK(null,n,t,"b")}function W1e(n,t,e){return n.params(i=>e(t,i).currValExpr)}function q1e(n){let e,t=n.name,i=t.match(P1e);return i?(t=i[1],e=te.attribute):n.isAnimation?(t=zQ(t),e=te.syntheticHostProperty):e=te.hostProperty,{bindingName:t,instruction:e,isAttribute:!!i}}var n,X1e=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/,RV=class{};function EQ(n){return{...n,predicate:kK(n.predicate),read:n.read?new Ln(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly}}function TQ(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:kK(n.predicate),descendants:n.descendants??!1,read:n.read?new Ln(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0}}function kK(n){return Array.isArray(n)?n:HV(new Ln(n),1)}function DQ(n){let t=RQ(n.inputs||[]),e=RQ(n.outputs||[]),i=n.propMetadata,r={},o={};for(let s in i)i.hasOwnProperty(s)&&i[s].forEach(a=>{lTe(a)?r[s]=a.bindingPropertyName?[a.bindingPropertyName,s]:s:cTe(a)&&(o[s]=a.bindingPropertyName||s)});return{...n,typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:As(n.type),internalType:new Ln(n.type),deps:null,host:oTe(n.propMetadata,n.typeSourceSpan,n.host),inputs:{...t,...r},outputs:{...e,...o},queries:n.queries.map(EQ),providers:null!=n.providers?new Ln(n.providers):null,viewQueries:n.viewQueries.map(EQ),fullInheritance:!1}}function FK(n,t){return{name:n.type.name,type:As(n.type),typeSourceSpan:t,internalType:new Ln(n.type),selector:n.selector??null,inputs:n.inputs??{},outputs:n.outputs??{},host:J1e(n.host),queries:(n.queries??[]).map(TQ),viewQueries:(n.viewQueries??[]).map(TQ),providers:void 0!==n.providers?new Ln(n.providers):null,exportAs:n.exportAs??null,usesInheritance:n.usesInheritance??!1,lifecycle:{usesOnChanges:n.usesOnChanges??!1},deps:null,typeArgumentCount:0,fullInheritance:!1,isStandalone:n.isStandalone??!1}}function J1e(n={}){return{attributes:$1e(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function $1e(n){let t={};for(let e of Object.keys(n))t[e]=new Ln(n[e]);return t}function tTe(n){return{...n,type:new Ln(n.type)}}function xB(n,t=null){return{kind:__.Directive,isComponent:t||"component"===n.kind,selector:n.selector,type:new Ln(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function iTe(n){return{kind:__.Pipe,name:n.name,type:new Ln(n.type)}}function NK(n,t,e,i,r){let o=r?D_.fromArray(r):Pu,s=S1e(n,e,{preserveWhitespaces:i,interpolationConfig:o});if(null!==s.errors){let a=s.errors.map(l=>l.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${t}: ${a}`)}return{template:s,interpolation:o}}function s_(n,t){if(n.hasOwnProperty(t))return HV(new Ln(n[t]),0)}function AQ(n,t){if(n.hasOwnProperty(t))return new Ln(n[t])}function IQ(n){return HV("function"==typeof n?new Ln(n):new cl(n??null),0)}function LK(n){let t=null!=n.attribute,e=null===n.token?null:new Ln(n.token);return BK(t?new Ln(n.attribute):e,t,n.host,n.optional,n.self,n.skipSelf)}function PQ(n){let t=n.attribute??!1;return BK(null===n.token?null:new Ln(n.token),t,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function BK(n,t,e,i,r,o){return{token:n,attributeNameType:t?ht("unknown"):null,host:e,optional:i,self:r,skipSelf:o}}function oTe(n,t,e){let i=function(n){let t={},e={},i={},r={};for(let o of Object.keys(n)){let s=n[o],a=o.match(X1e);if(null===a)switch(o){case"class":if("string"!=typeof s)throw new Error("Class binding must be string");r.classAttr=s;break;case"style":if("string"!=typeof s)throw new Error("Style binding must be string");r.styleAttr=s;break;default:t[o]="string"==typeof s?ht(s):s}else if(null!=a[1]){if("string"!=typeof s)throw new Error("Property binding must be string");i[a[1]]=s}else if(null!=a[2]){if("string"!=typeof s)throw new Error("Event binding must be string");e[a[2]]=s}}return{attributes:t,listeners:e,properties:i,specialAttributes:r}}(e||{}),r=function(n,t){let e=DD();return e.createDirectiveHostEventAsts(n.listeners,t),e.createBoundHostProperties(n.properties,t),e.errors}(i,t);if(r.length)throw new Error(r.map(o=>o.msg).join("\n"));for(let o in n)n.hasOwnProperty(o)&&n[o].forEach(s=>{sTe(s)?i.properties[s.hostPropertyName||o]=rwe("this",o):aTe(s)&&(i.listeners[s.eventName||o]=`${o}(${(s.args||[]).join(",")})`)});return i}function sTe(n){return"HostBinding"===n.ngMetadataName}function aTe(n){return"HostListener"===n.ngMetadataName}function lTe(n){return"Input"===n.ngMetadataName}function cTe(n){return"Output"===n.ngMetadataName}function RQ(n){return n.reduce((t,e)=>{let[i,r]=e.split(":",2).map(o=>o.trim());return t[i]=r||i,t},{})}new class{constructor(t){this.full=t;let e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}}("14.2.11"),new class{constructor(){this.closedByParent=!1,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0,this.preventNamespaceInheritance=!1}requireExtraParent(t){return!1}isClosedByChild(t){return!1}getContentType(){return Wl.PARSABLE_DATA}},((n=p_).ng||(n.ng={})).\u0275compilerFacade=new class{constructor(t=new class{evaluateStatements(t,e,i,r){let o=new XB(i),s=EC.createRoot();return e.length>0&&!e[0].isEquivalent(ht("use strict").toStmt())&&(e=[ht("use strict").toStmt(),...e]),o.visitAllStatements(e,s),o.createReturnStmt(s),this.evaluateCode(t,s,o.getArgs(),r)}evaluateCode(t,e,i,r){let o=`"use strict";${e.toSource()}\n//# sourceURL=${t}`,s=[],a=[];for(let c in i)a.push(i[c]),s.push(c);if(r){let c=UX(...s.concat("return null;")).toString(),u=c.slice(0,c.indexOf("return null;")).split("\n").length-1;o+=`\n${e.toSourceMapGenerator(t,u).toJsComment()}`}let l=UX(...s.concat(o));return this.executeFunction(l,a)}executeFunction(t,e){return t(...e)}}){this.jitEvaluator=t,this.FactoryTarget=Nc,this.ResourceLoader=RV,this.elementSchemaRegistry=new SD}compilePipe(t,e,i){let o=jX({name:i.name,type:As(i.type),internalType:new Ln(i.type),typeArgumentCount:0,deps:null,pipeName:i.pipeName,pure:i.pure,isStandalone:i.isStandalone});return this.jitExpression(o.expression,t,e,[])}compilePipeDeclaration(t,e,i){let o=jX({name:(n=i).type.name,type:As(n.type),internalType:new Ln(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??!1});var n;return this.jitExpression(o.expression,t,e,[])}compileInjectable(t,e,i){let{expression:r,statements:o}=kX({name:i.name,type:As(i.type),internalType:new Ln(i.type),typeArgumentCount:i.typeArgumentCount,providedIn:IQ(i.providedIn),useClass:s_(i,"useClass"),useFactory:AQ(i,"useFactory"),useValue:s_(i,"useValue"),useExisting:s_(i,"useExisting"),deps:i.deps?.map(LK)},!0);return this.jitExpression(r,t,e,o)}compileInjectableDeclaration(t,e,i){let{expression:r,statements:o}=kX({name:i.type.name,type:As(i.type),internalType:new Ln(i.type),typeArgumentCount:0,providedIn:IQ(i.providedIn),useClass:s_(i,"useClass"),useFactory:AQ(i,"useFactory"),useValue:s_(i,"useValue"),useExisting:s_(i,"useExisting"),deps:i.deps?.map(PQ)},!0);return this.jitExpression(r,t,e,o)}compileInjector(t,e,i){let o=zX({name:i.name,type:As(i.type),internalType:new Ln(i.type),providers:i.providers&&i.providers.length>0?new Ln(i.providers):null,imports:i.imports.map(s=>new Ln(s))});return this.jitExpression(o.expression,t,e,[])}compileInjectorDeclaration(t,e,i){let r={name:(n=i).type.name,type:As(n.type),internalType:new Ln(n.type),providers:void 0!==n.providers&&n.providers.length>0?new Ln(n.providers):null,imports:void 0!==n.imports?n.imports.map(t=>new Ln(t)):[]},o=zX(r);var n;return this.jitExpression(o.expression,t,e,[])}compileNgModule(t,e,i){let o=iSe({type:As(i.type),internalType:new Ln(i.type),adjacentType:new Ln(i.type),bootstrap:i.bootstrap.map(As),declarations:i.declarations.map(As),publicDeclarationTypes:null,imports:i.imports.map(As),includeImportTypes:!0,exports:i.exports.map(As),selectorScopeMode:g_.Inline,containsForwardDecls:!1,schemas:i.schemas?i.schemas.map(As):null,id:i.id?new Ln(i.id):null});return this.jitExpression(o.expression,t,e,[])}compileNgModuleDeclaration(t,e,i){let r=function(n){let t=new sh;return t.set("type",new Ln(n.type)),void 0!==n.bootstrap&&t.set("bootstrap",new Ln(n.bootstrap)),void 0!==n.declarations&&t.set("declarations",new Ln(n.declarations)),void 0!==n.imports&&t.set("imports",new Ln(n.imports)),void 0!==n.exports&&t.set("exports",new Ln(n.exports)),void 0!==n.schemas&&t.set("schemas",new Ln(n.schemas)),void 0!==n.id&&t.set("id",new Ln(n.id)),Tn(te.defineNgModule).callFn([t.toLiteralMap()])}(i);return this.jitExpression(r,t,e,[])}compileDirective(t,e,i){let r=DQ(i);return this.compileDirectiveFromMeta(t,e,r)}compileDirectiveDeclaration(t,e,i){let o=FK(i,this.createParseSourceSpan("Directive",i.type.name,e));return this.compileDirectiveFromMeta(t,e,o)}compileDirectiveFromMeta(t,e,i){let r=new iD,s=function(n,t,e){let i=IK(n,t,e);PK(i,n);let r=Tn(te.defineDirective).callFn([i.toLiteralMap()],void 0,!0),o=function(n){let t=OK(n);return t.push(Jd),t.push(ul(ht(n.isStandalone))),ul(Tn(te.DirectiveDeclaration,t))}(n);return{expression:r,type:o,statements:[]}}(i,r,DD());return this.jitExpression(s.expression,t,e,r.statements)}compileComponent(t,e,i){let{template:r,interpolation:o}=NK(i.template,i.name,e,i.preserveWhitespaces,i.interpolation),s={...i,...DQ(i),selector:i.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:r,declarations:i.declarations.map(tTe),declarationListEmitMode:0,styles:[...i.styles,...r.styles],encapsulation:i.encapsulation,interpolation:o,changeDetection:i.changeDetection,animations:null!=i.animations?new Ln(i.animations):null,viewProviders:null!=i.viewProviders?new Ln(i.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0};return this.compileComponentFromMeta(t,`ng:///${i.name}.js`,s)}compileComponentDeclaration(t,e,i){let o=function(n,t,e){let{template:i,interpolation:r}=NK(n.template,n.type.name,e,n.preserveWhitespaces??!1,n.interpolation),o=[];if(n.dependencies)for(let s of n.dependencies)switch(s.kind){case"directive":case"component":o.push(xB(s));break;case"pipe":o.push(iTe(s))}else(n.components||n.directives||n.pipes)&&(n.components&&o.push(...n.components.map(s=>xB(s,!0))),n.directives&&o.push(...n.directives.map(s=>xB(s))),n.pipes&&o.push(...function(n){return n?Object.keys(n).map(t=>({kind:__.Pipe,name:t,type:new Ln(n[t])})):[]}(n.pipes)));return{...FK(n,t),template:i,styles:n.styles??[],declarations:o,viewProviders:void 0!==n.viewProviders?new Ln(n.viewProviders):null,animations:void 0!==n.animations?new Ln(n.animations):null,changeDetection:n.changeDetection??cC.Default,encapsulation:n.encapsulation??qd.Emulated,interpolation:r,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0}}(i,this.createParseSourceSpan("Component",i.type.name,e),e);return this.compileComponentFromMeta(t,e,o)}compileComponentFromMeta(t,e,i){let r=new iD,s=function(n,t,e){let i=IK(n,t,e);PK(i,n);let r=n.selector&&Zd.parse(n.selector),o=r&&r[0];if(o){let g=o.getAttrs();g.length&&i.set("attrs",t.getConstLiteral(_r(g.map(b=>ht(null!=b?b:void 0))),!0))}let s=n.name,a=s?`${s}_Template`:null,l=n.changeDetection,c=n.template,u=new KC(t,B_.createRootScope(),0,s,null,null,a,te.namespaceHTML,n.relativeContextFilePath,n.i18nUseExternalIds),d=u.buildTemplateFunction(c.nodes,[]),p=u.getNgContentSelectors();p&&i.set("ngContentSelectors",p),i.set("decls",ht(u.getConstCount())),i.set("vars",ht(u.getVarCount()));let{constExpressions:h,prepareStatements:f}=u.getConsts();if(h.length>0){let g=_r(h);f.length>0&&(g=ra([],[...f,new Do(g)])),i.set("consts",g)}if(i.set("template",d),n.declarations.length>0&&i.set("dependencies",function(n,t){switch(t){case 0:return n;case 1:return ra([],[new Do(n)]);case 2:let e=n.prop("map").callFn([Tn(te.resolveForwardRef)]);return ra([],[new Do(e)])}}(_r(n.declarations.map(g=>g.type)),n.declarationListEmitMode)),null===n.encapsulation&&(n.encapsulation=qd.Emulated),n.styles&&n.styles.length){let b=(n.encapsulation==qd.Emulated?function(n,t,e){let i=new class{constructor(){this.strictStyling=!0}shimCssText(t,e,i=""){let r=t.match(ESe)||[];return t=function(n){return n.replace(wSe,"")}(t),t=this._insertDirectives(t),[this._scopeCssText(t,e,i),...r].join("\n")}_insertDirectives(t){return t=this._insertPolyfillDirectivesInCssText(t),this._insertPolyfillRulesInCssText(t)}_insertPolyfillDirectivesInCssText(t){return t.replace(mSe,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(t){return t.replace(gSe,(...e)=>{let i=e[0].replace(e[1],"").replace(e[2],"");return e[4]+i})}_scopeCssText(t,e,i){let r=this._extractUnscopedRulesFromCssText(t);return t=this._insertPolyfillHostInCssText(t),t=this._convertColonHost(t),t=this._convertColonHostContext(t),t=this._convertShadowDOMSelectors(t),e&&(t=this._scopeSelectors(t,e,i)),(t=t+"\n"+r).trim()}_extractUnscopedRulesFromCssText(t){let i,e="";for(WX.lastIndex=0;null!==(i=WX.exec(t));)e+=i[0].replace(i[2],"").replace(i[1],i[4])+"\n\n";return e}_convertColonHost(t){return t.replace(_Se,(e,i,r)=>{if(i){let o=[],s=i.split(",").map(a=>a.trim());for(let a of s){if(!a)break;let l=tm+a.replace(gD,"")+r;o.push(l)}return o.join(",")}return tm+r})}_convertColonHostContext(t){return t.replace(vSe,e=>{let r,i=[[]];for(;r=ySe.exec(e);){let o=(r[1]??"").trim().split(",").map(a=>a.trim()).filter(a=>""!==a),s=i.length;kSe(i,o.length);for(let a=0;a<o.length;a++)for(let l=0;l<s;l++)i[l+a*s].push(o[a]);e=r[2]}return i.map(o=>function(n,t){let e=tm;d_.lastIndex=0;let i=d_.test(t);if(0===n.length)return e+t;let r=[n.pop()||""];for(;n.length>0;){let o=r.length,s=n.pop();for(let a=0;a<o;a++){let l=r[a];r[2*o+a]=l+" "+s,r[o+a]=s+" "+l,r[a]=s+l}}return r.map(o=>i?`${o}${t}`:`${o}${e}${t}, ${o} ${e}${t}`).join(",")}(o,e)).join(", ")})}_convertShadowDOMSelectors(t){return bSe.reduce((e,i)=>e.replace(i," "),t)}_scopeSelectors(t,e,i){return XX(t,r=>{let o=r.selector,s=r.content;return"@"!==r.selector[0]?o=this._scopeSelector(r.selector,e,i,this.strictStyling):r.selector.startsWith("@media")||r.selector.startsWith("@supports")||r.selector.startsWith("@document")||r.selector.startsWith("@layer")?s=this._scopeSelectors(r.content,e,i):(r.selector.startsWith("@font-face")||r.selector.startsWith("@page"))&&(s=this._stripScopingSelectors(r.content)),new WC(o,s)})}_stripScopingSelectors(t){return XX(t,e=>{let i=e.selector.replace(YX," ").replace(qX," ");return new WC(i,e.content)})}_scopeSelector(t,e,i,r){return t.split(",").map(o=>o.trim().split(YX)).map(o=>{let[s,...a]=o;return[(c=>this._selectorNeedsScoping(c,e)?r?this._applyStrictSelectorScope(c,e,i):this._applySelectorScope(c,e,i):c)(s),...a].join(" ")}).join(", ")}_selectorNeedsScoping(t,e){return!this._makeScopeMatcher(e).test(t)}_makeScopeMatcher(t){return t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+t+")([>\\s~+[.,{:][\\s\\S]*)?$","m")}_applySelectorScope(t,e,i){return this._applySimpleSelectorScope(t,e,i)}_applySimpleSelectorScope(t,e,i){if(d_.lastIndex=0,d_.test(t)){let r=this.strictStyling?`[${i}]`:e;return t.replace(qX,(o,s)=>s.replace(/([^:]*)(:*)(.*)/,(a,l,c,u)=>l+r+c+u)).replace(d_,r+" ")}return e+" "+t}_applyStrictSelectorScope(t,e,i){let u,o="["+(e=e.replace(/\[is=([^\]]*)\]/g,(m,...x)=>x[0]))+"]",s=m=>{let x=m.trim();if(!x)return"";if(m.indexOf(tm)>-1)x=this._applySimpleSelectorScope(m,e,i);else{let g=m.replace(d_,"");if(g.length>0){let b=g.match(/([^:]*)(:*)(.*)/);b&&(x=b[1]+o+b[2]+b[3])}}return x},a=new class{constructor(t){this.placeholders=[],this.index=0,t=this._escapeRegexMatches(t,/(\[[^\]]*\])/g),t=this._escapeRegexMatches(t,/(\\.)/g),this._content=t.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,i,r)=>{let o=`__ph-${this.index}__`;return this.placeholders.push(r),this.index++,i+o})}restore(t){return t.replace(/__ph-(\d+)__/g,(e,i)=>this.placeholders[+i])}content(){return this._content}_escapeRegexMatches(t,e){return t.replace(e,(i,r)=>{let o=`__ph-${this.index}__`;return this.placeholders.push(r),this.index++,o})}}(t),l="",c=0,d=/( |>|\+|~(?!=))\s*/g,h=!((t=a.content()).indexOf(tm)>-1);for(;null!==(u=d.exec(t));){let m=u[1],x=t.slice(c,u.index).trim();h=h||x.indexOf(tm)>-1,l+=`${h?s(x):x} ${m} `,c=d.lastIndex}let f=t.substring(c);return h=h||f.indexOf(tm)>-1,l+=h?s(f):f,a.restore(l)}_insertPolyfillHostInCssText(t){return t.replace(MSe,ZV).replace(CSe,gD)}};return n.map(r=>i.shimCssText(r,"_ngcontent-%COMP%","_nghost-%COMP%"))}(n.styles):n.styles).reduce((D,T)=>(T.trim().length>0&&D.push(t.getConstLiteral(ht(T))),D),[]);b.length>0&&i.set("styles",_r(b))}else n.encapsulation===qd.Emulated&&(n.encapsulation=qd.None);n.encapsulation!==qd.Emulated&&i.set("encapsulation",ht(n.encapsulation)),null!==n.animations&&i.set("data",ql([{key:"animation",value:n.animations,quoted:!1}])),null!=l&&l!==cC.Default&&i.set("changeDetection",ht(l));let m=Tn(te.defineComponent).callFn([i.toLiteralMap()],void 0,!0),x=function(n){let t=OK(n);return t.push(PV(n.template.ngContentSelectors)),t.push(ul(ht(n.isStandalone))),ul(Tn(te.ComponentDeclaration,t))}(n);return{expression:m,type:x,statements:[]}}(i,r,DD(i.interpolation));return this.jitExpression(s.expression,t,e,r.statements)}compileFactory(t,e,i){let r=nm({name:i.name,type:As(i.type),internalType:new Ln(i.type),typeArgumentCount:i.typeArgumentCount,deps:(n=i.deps,null==n?null:n.map(LK)),target:i.target});var n;return this.jitExpression(r.expression,t,e,r.statements)}compileFactoryDeclaration(t,e,i){let r=nm({name:i.type.name,type:As(i.type),internalType:new Ln(i.type),typeArgumentCount:0,deps:Array.isArray(i.deps)?i.deps.map(PQ):i.deps,target:i.target});return this.jitExpression(r.expression,t,e,r.statements)}createParseSourceSpan(t,e,i){return function(n,t,e){let r=new pD("",`in ${n} ${t} in ${e}`);return new Go(new vm(r,-1,-1,-1),new vm(r,-1,-1,-1))}(t,e,i)}jitExpression(t,e,i,r){let o=[...r,new Vu("$def",t,void 0,ll.Exported)];return this.jitEvaluator.evaluateStatements(i,o,new class{constructor(t){this.context=t}resolveExternalReference(t){if("@angular/core"!==t.moduleName)throw new Error(`Cannot resolve external reference to ${t.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(t.name))throw new Error(`No value provided for @angular/core symbol '${t.name}'.`);return this.context[t.name]}}(e),!0).$def}};var OD=function(n,...t){if(OD.translate){let i=OD.translate(n,t);n=i[0],t=i[1]}let e=VK(n[0],n.raw[0]);for(let i=1;i<n.length;i++)e+=t[i-1]+VK(n[i],n.raw[i]);return e};function VK(n,t){return":"===t.charAt(0)?n.substring(function(n,t){for(let e=1,i=1;e<n.length;e++,i++)if("\\"===t[i])i++;else if(":"===n[e])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=OD;var r5=null;function Yl(){return r5}var zD=class{},Ht=new pe("DocumentToken"),KK=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:function(){return j(ZK)},providedIn:"platform"}),n})();new pe("Location Initialized");var ZK=(()=>{class n extends KK{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Yl().getBaseHref(this._doc)}onPopState(e){let i=Yl().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=Yl().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){UK()?this._history.pushState(e,i,r):this.location.hash=r}replaceState(e,i,r){UK()?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)(j(Ht))},n.\u0275prov=ye({token:n,factory:function(){return new ZK(j(Ht))},providedIn:"platform"}),n})();function UK(){return!!window.history.pushState}function JK(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 zK(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 Sm(n){return n&&"?"!==n[0]?"?"+n:n}var c5=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:function(){return jo(yTe)},providedIn:"root"}),n})(),vTe=new pe("appBaseHref"),yTe=(()=>{class n extends c5{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??jo(Ht).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 JK(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+Sm(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Sm(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Sm(o));this._platformLocation.replaceState(e,i,s)}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)(j(KK),j(vTe,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),iM=(()=>{class n{constructor(e){this._subject=new G,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._baseHref=zK(jK(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+Sm(i))}normalize(e){return n.stripTrailingSlash(function(n,t){return n&&t.startsWith(n)?t.substring(n.length):t}(this._baseHref,jK(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+Sm(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Sm(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=Sm,n.joinWithSlash=JK,n.stripTrailingSlash=zK,n.\u0275fac=function(e){return new(e||n)(j(c5))},n.\u0275prov=ye({token:n,factory:function(){return new iM(j(c5))},providedIn:"root"}),n})();function jK(n){return n.replace(/\/index.html$/,"")}var HD=(()=>(function(n){n[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific"}(HD||(HD={})),HD))(),ys=(()=>(function(n){n[n.Format=0]="Format",n[n.Standalone=1]="Standalone"}(ys||(ys={})),ys))(),or=(()=>(function(n){n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short"}(or||(or={})),or))(),oa=(()=>(function(n){n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full"}(oa||(oa={})),oa))(),Is=(()=>(function(n){n[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"}(Is||(Is={})),Is))();function kD(n,t){return Xl(Aa(n)[Rr.DateFormat],t)}function FD(n,t){return Xl(Aa(n)[Rr.TimeFormat],t)}function ND(n,t){return Xl(Aa(n)[Rr.DateTimeFormat],t)}function ep(n,t){let e=Aa(n),i=e[Rr.NumberSymbols][t];if(typeof i>"u"){if(t===Is.CurrencyDecimal)return e[Rr.NumberSymbols][Is.Decimal];if(t===Is.CurrencyGroup)return e[Rr.NumberSymbols][Is.Group]}return i}function $K(n){if(!n[Rr.ExtraData])throw new Error(`Missing extra locale data for the locale "${n[Rr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Xl(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 $V(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var ITe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,tM={},PTe=/((?:[^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]*)/,Wc=(()=>(function(n){n[n.Short=0]="Short",n[n.ShortGMT=1]="ShortGMT",n[n.Long=2]="Long",n[n.Extended=3]="Extended"}(Wc||(Wc={})),Wc))(),Ui=(()=>(function(n){n[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"}(Ui||(Ui={})),Ui))(),Hi=(()=>(function(n){n[n.DayPeriods=0]="DayPeriods",n[n.Days=1]="Days",n[n.Months=2]="Months",n[n.Eras=3]="Eras"}(Hi||(Hi={})),Hi))();function RTe(n,t,e,i){let r=function(n){if(GK(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,s=1]=n.split("-").map(a=>+a);return jD(r,o-1,s)}let i,e=parseFloat(n);if(!isNaN(n-e))return new Date(e);if(i=n.match(ITe))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 s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(1e3*parseFloat("0."+(n[7]||0)));return o.call(t,s,a,l,c),t}(i)}let t=new Date(n);if(!GK(t))throw new Error(`Unable to convert "${n}" into a date`);return t}(n);t=$d(e,t)||t;let a,s=[];for(;t;){if(a=PTe.exec(t),!a){s.push(t);break}{s=s.concat(a.slice(1));let u=s.pop();if(!u)break;t=u}}let l=r.getTimezoneOffset();i&&(l=tZ(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*(tZ(t,r)-r))}(r,i));let c="";return s.forEach(u=>{let d=function(n){if(t5[n])return t5[n];let t;switch(n){case"G":case"GG":case"GGG":t=xr(Hi.Eras,or.Abbreviated);break;case"GGGG":t=xr(Hi.Eras,or.Wide);break;case"GGGGG":t=xr(Hi.Eras,or.Narrow);break;case"y":t=Io(Ui.FullYear,1,0,!1,!0);break;case"yy":t=Io(Ui.FullYear,2,0,!0,!0);break;case"yyy":t=Io(Ui.FullYear,3,0,!1,!0);break;case"yyyy":t=Io(Ui.FullYear,4,0,!1,!0);break;case"Y":t=VD(1);break;case"YY":t=VD(2,!0);break;case"YYY":t=VD(3);break;case"YYYY":t=VD(4);break;case"M":case"L":t=Io(Ui.Month,1,1);break;case"MM":case"LL":t=Io(Ui.Month,2,1);break;case"MMM":t=xr(Hi.Months,or.Abbreviated);break;case"MMMM":t=xr(Hi.Months,or.Wide);break;case"MMMMM":t=xr(Hi.Months,or.Narrow);break;case"LLL":t=xr(Hi.Months,or.Abbreviated,ys.Standalone);break;case"LLLL":t=xr(Hi.Months,or.Wide,ys.Standalone);break;case"LLLLL":t=xr(Hi.Months,or.Narrow,ys.Standalone);break;case"w":t=e5(1);break;case"ww":t=e5(2);break;case"W":t=e5(1,!0);break;case"d":t=Io(Ui.Date,1);break;case"dd":t=Io(Ui.Date,2);break;case"c":case"cc":t=Io(Ui.Day,1);break;case"ccc":t=xr(Hi.Days,or.Abbreviated,ys.Standalone);break;case"cccc":t=xr(Hi.Days,or.Wide,ys.Standalone);break;case"ccccc":t=xr(Hi.Days,or.Narrow,ys.Standalone);break;case"cccccc":t=xr(Hi.Days,or.Short,ys.Standalone);break;case"E":case"EE":case"EEE":t=xr(Hi.Days,or.Abbreviated);break;case"EEEE":t=xr(Hi.Days,or.Wide);break;case"EEEEE":t=xr(Hi.Days,or.Narrow);break;case"EEEEEE":t=xr(Hi.Days,or.Short);break;case"a":case"aa":case"aaa":t=xr(Hi.DayPeriods,or.Abbreviated);break;case"aaaa":t=xr(Hi.DayPeriods,or.Wide);break;case"aaaaa":t=xr(Hi.DayPeriods,or.Narrow);break;case"b":case"bb":case"bbb":t=xr(Hi.DayPeriods,or.Abbreviated,ys.Standalone,!0);break;case"bbbb":t=xr(Hi.DayPeriods,or.Wide,ys.Standalone,!0);break;case"bbbbb":t=xr(Hi.DayPeriods,or.Narrow,ys.Standalone,!0);break;case"B":case"BB":case"BBB":t=xr(Hi.DayPeriods,or.Abbreviated,ys.Format,!0);break;case"BBBB":t=xr(Hi.DayPeriods,or.Wide,ys.Format,!0);break;case"BBBBB":t=xr(Hi.DayPeriods,or.Narrow,ys.Format,!0);break;case"h":t=Io(Ui.Hours,1,-12);break;case"hh":t=Io(Ui.Hours,2,-12);break;case"H":t=Io(Ui.Hours,1);break;case"HH":t=Io(Ui.Hours,2);break;case"m":t=Io(Ui.Minutes,1);break;case"mm":t=Io(Ui.Minutes,2);break;case"s":t=Io(Ui.Seconds,1);break;case"ss":t=Io(Ui.Seconds,2);break;case"S":t=Io(Ui.FractionalSeconds,1);break;case"SS":t=Io(Ui.FractionalSeconds,2);break;case"SSS":t=Io(Ui.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=BD(Wc.Short);break;case"ZZZZZ":t=BD(Wc.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=BD(Wc.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=BD(Wc.Long);break;default:return null}return t5[n]=t,t}(u);c+=d?d(r,e,l):"''"===u?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function jD(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function $d(n,t){let e=function(n){return Aa(n)[Rr.LocaleId]}(n);if(tM[e]=tM[e]||{},tM[e][t])return tM[e][t];let i="";switch(t){case"shortDate":i=kD(n,oa.Short);break;case"mediumDate":i=kD(n,oa.Medium);break;case"longDate":i=kD(n,oa.Long);break;case"fullDate":i=kD(n,oa.Full);break;case"shortTime":i=FD(n,oa.Short);break;case"mediumTime":i=FD(n,oa.Medium);break;case"longTime":i=FD(n,oa.Long);break;case"fullTime":i=FD(n,oa.Full);break;case"short":let r=$d(n,"shortTime"),o=$d(n,"shortDate");i=LD(ND(n,oa.Short),[r,o]);break;case"medium":let s=$d(n,"mediumTime"),a=$d(n,"mediumDate");i=LD(ND(n,oa.Medium),[s,a]);break;case"long":let l=$d(n,"longTime"),c=$d(n,"longDate");i=LD(ND(n,oa.Long),[l,c]);break;case"full":let u=$d(n,"fullTime"),d=$d(n,"fullDate");i=LD(ND(n,oa.Full),[u,d])}return i&&(tM[e][t]=i),i}function LD(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return null!=t&&i in t?t[i]:e})),n}function Gc(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=1-n:(n=-n,o=e));let s=String(n);for(;s.length<t;)s="0"+s;return i&&(s=s.slice(s.length-t)),o+s}function Io(n,t,e=0,i=!1,r=!1){return function(o,s){let a=function(n,t){switch(n){case Ui.FullYear:return t.getFullYear();case Ui.Month:return t.getMonth();case Ui.Date:return t.getDate();case Ui.Hours:return t.getHours();case Ui.Minutes:return t.getMinutes();case Ui.Seconds:return t.getSeconds();case Ui.FractionalSeconds:return t.getMilliseconds();case Ui.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${n}".`)}}(n,o);if((e>0||a>-e)&&(a+=e),n===Ui.Hours)0===a&&-12===e&&(a=12);else if(n===Ui.FractionalSeconds)return function(n,t){return Gc(n,3).substring(0,t)}(a,t);let l=ep(s,Is.MinusSign);return Gc(a,t,l,i,r)}}function xr(n,t,e=ys.Format,i=!1){return function(r,o){return function(n,t,e,i,r,o){switch(e){case Hi.Months:return function(n,t,e){let i=Aa(n),o=Xl([i[Rr.MonthsFormat],i[Rr.MonthsStandalone]],t);return Xl(o,e)}(t,r,i)[n.getMonth()];case Hi.Days:return function(n,t,e){let i=Aa(n),o=Xl([i[Rr.DaysFormat],i[Rr.DaysStandalone]],t);return Xl(o,e)}(t,r,i)[n.getDay()];case Hi.DayPeriods:let s=n.getHours(),a=n.getMinutes();if(o){let c=function(n){let t=Aa(n);return $K(t),(t[Rr.ExtraData][2]||[]).map(i=>"string"==typeof i?$V(i):[$V(i[0]),$V(i[1])])}(t),u=function(n,t,e){let i=Aa(n);$K(i);let o=Xl([i[Rr.ExtraData][0],i[Rr.ExtraData][1]],t)||[];return Xl(o,e)||[]}(t,r,i),d=c.findIndex(p=>{if(Array.isArray(p)){let[h,f]=p,m=s>=h.hours&&a>=h.minutes,x=s<f.hours||s===f.hours&&a<f.minutes;if(h.hours<f.hours){if(m&&x)return!0}else if(m||x)return!0}else if(p.hours===s&&p.minutes===a)return!0;return!1});if(-1!==d)return u[d]}return function(n,t,e){let i=Aa(n),o=Xl([i[Rr.DayPeriodsFormat],i[Rr.DayPeriodsStandalone]],t);return Xl(o,e)}(t,r,i)[s<12?0:1];case Hi.Eras:return function(n,t){return Xl(Aa(n)[Rr.Eras],t)}(t,i)[n.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${e}`)}}(r,o,n,t,e,i)}}function BD(n){return function(t,e,i){let r=-1*i,o=ep(e,Is.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case Wc.Short:return(r>=0?"+":"")+Gc(s,2,o)+Gc(Math.abs(r%60),2,o);case Wc.ShortGMT:return"GMT"+(r>=0?"+":"")+Gc(s,1,o);case Wc.Long:return"GMT"+(r>=0?"+":"")+Gc(s,2,o)+":"+Gc(Math.abs(r%60),2,o);case Wc.Extended:return 0===i?"Z":(r>=0?"+":"")+Gc(s,2,o)+":"+Gc(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${n}"`)}}}function eZ(n){return jD(n.getFullYear(),n.getMonth(),n.getDate()+(4-n.getDay()))}function e5(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=eZ(e),s=function(n){let t=jD(n,0,1).getDay();return jD(n,0,1+(t<=4?4:11)-t)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Gc(r,n,ep(i,Is.MinusSign))}}function VD(n,t=!1){return function(e,i){return Gc(eZ(e).getFullYear(),n,ep(i,Is.MinusSign),t)}}var t5={};function tZ(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function GK(n){return n instanceof Date&&!isNaN(n.valueOf())}var jTe=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function u5(n,t,e){let i=function(n,t){return Aa(n)[Rr.NumberFormats][t]}(t,HD.Decimal),r=function(n,t="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(";"),r=i[0],o=i[1],s=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf("#"));for(let u=0;u<l.length;u++){let d=l.charAt(u);"0"===d?e.minFrac=e.maxFrac=u+1:"#"===d?e.maxFrac=u+1:e.posSuf+=d}let c=a.split(",");if(e.gSize=c[1]?c[1].length:0,e.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let u=r.length-e.posPre.length-e.posSuf.length,d=o.indexOf("#");e.negPre=o.substring(0,d).replace(/'/g,""),e.negSuf=o.slice(d+u).replace(/'/g,"")}else e.negPre=t+e.posPre,e.negSuf=e.posSuf;return e}(i,ep(t,Is.MinusSign));return function(n,t,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(n)){let c=function(n){let i,r,o,s,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(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;"0"===t.charAt(o);o++);if(o===(a=t.length))i=[0],r=1;else{for(a--;"0"===t.charAt(a);)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(t.charAt(o))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);s&&(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 u=t.minInt,d=t.minFrac,p=t.maxFrac;if(o){let b=o.match(jTe);if(null===b)throw new Error(`${o} is not a valid digit info`);let D=b[1],T=b[3],k=b[5];null!=D&&(u=i5(D)),null!=T&&(d=i5(T)),null!=k?p=i5(k):null!=T&&d>p&&(p=d)}!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),s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let d=s;d<i.length;d++)i[d]=0}else{r=Math.max(0,r),n.integerLen=1,i.length=Math.max(1,s=o+1),i[0]=0;for(let d=1;d<s;d++)i[d]=0}if(a>=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r<Math.max(0,o);r++)i.push(0);let l=0!==o,c=t+n.integerLen,u=i.reduceRight(function(d,p,h,f){return f[h]=(p+=d)<10?p:p-10,l&&(0===f[h]&&h>=c?f.pop():l=!1),p>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}(c,d,p);let h=c.digits,f=c.integerLen,m=c.exponent,x=[];for(l=h.every(b=>!b);f<u;f++)h.unshift(0);for(;f<0;f++)h.unshift(0);f>0?x=h.splice(f,h.length):(x=h,h=[0]);let g=[];for(h.length>=t.lgSize&&g.unshift(h.splice(-t.lgSize,h.length).join(""));h.length>t.gSize;)g.unshift(h.splice(-t.gSize,h.length).join(""));h.length&&g.unshift(h.join("")),a=g.join(ep(e,i)),x.length&&(a+=ep(e,r)+x.join("")),m&&(a+=ep(e,Is.Exponential)+"+"+m)}else a=ep(e,Is.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,r,t,Is.Group,Is.Decimal,e)}function i5(n){let t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function qD(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 Fn=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(wT(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){let e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){let e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachChangedItem(i=>this._toggleClass(i.key,i.currentValue)),e.forEachRemovedItem(i=>{i.previousValue&&this._toggleClass(i.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(i=>{if("string"!=typeof i.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${To(i.item)}`);this._toggleClass(i.item,!0)}),e.forEachRemovedItem(i=>this._toggleClass(i.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!0)):Object.keys(e).forEach(i=>this._toggleClass(i,!!e[i])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(i=>this._toggleClass(i,!1)):Object.keys(e).forEach(i=>this._toggleClass(i,!1)))}_toggleClass(e,i){(e=e.trim())&&e.split(/\s+/g).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)(M(kc),M(nC),M(Re),M(Eu))},n.\u0275dir=He({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})(),dn=(()=>{class n{constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}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,s)=>{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===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){let a=i.get(o);i.move(a,s),YK(a,r)}});for(let r=0,o=i.length;r<o;r++){let a=i.get(r).context;a.index=r,a.count=o,a.ngForOf=this._ngForOf}e.forEachIdentityChange(r=>{YK(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(M(Oi),M(Vi),M(kc))},n.\u0275dir=He({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function YK(n,t){n.context.$implicit=t.item}var Be=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new s5,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){XK("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){XK("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)(M(Oi),M(Vi))},n.\u0275dir=He({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})(),s5=class{constructor(){this.$implicit=null,this.ngIf=null}};function XK(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${To(t)}'.`)}var WD=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()}},Cr=(()=>{class n{constructor(){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||(this._defaultViews=[]),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&&e!==this._defaultUsed){this._defaultUsed=e;for(let i=0;i<this._defaultViews.length;i++)this._defaultViews[i].enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),Ur=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new WD(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(M(Oi),M(Vi),M(Cr,9))},n.\u0275dir=He({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),ch=(()=>{class n{constructor(e,i,r){r._addDefault(new WD(e,i))}}return n.\u0275fac=function(e){return new(e||n)(M(Oi),M(Vi),M(Cr,9))},n.\u0275dir=He({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),zu=(()=>{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("."),s=-1===r.indexOf("-")?void 0:Bl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_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)(M(Re),M(nC),M(Eu))},n.\u0275dir=He({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),os=(()=>{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:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}: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)(M(Oi))},n.\u0275dir=He({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Ft]}),n})();function YD(n,t){return new At(2100,!1)}var JTe=new class{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}},$Te=new class{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}},Ge=(()=>{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(n_(e))return JTe;if(X3(e))return $Te;throw YD()}_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)(M(nn,16))},n.\u0275pipe=B0({name:"async",type:n,pure:!1,standalone:!0}),n})(),eDe=new pe("DATE_PIPE_DEFAULT_TIMEZONE"),U_=(()=>{class n{constructor(e,i){this.locale=e,this.defaultTimezone=i}transform(e,i="mediumDate",r,o){if(null==e||""===e||e!=e)return null;try{return RTe(e,i,o||this.locale,r??this.defaultTimezone??void 0)}catch(s){throw YD()}}}return n.\u0275fac=function(e){return new(e||n)(M(Wd,16),M(eDe,24))},n.\u0275pipe=B0({name:"date",type:n,pure:!0,standalone:!0}),n})(),Ql=(()=>{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 u5(o,r,i)}catch(o){throw YD()}}}return n.\u0275fac=function(e){return new(e||n)(M(Wd,16))},n.\u0275pipe=B0({name:"number",type:n,pure:!0,standalone:!0}),n})(),nZ=(()=>{class n{transform(e,i,r){if(null==e)return null;if(!this.supports(e))throw YD();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=B0({name:"slice",type:n,pure:!1,standalone:!0}),n})(),Me=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),d5="browser";function XD(n){return n===d5}new Ic("14.2.11");var Em=class{};function sDe(n){return n.startsWith("/")?n.slice(1):n}new pe("PRECONNECT_CHECK_BLOCKLIST");var aDe=n=>n.src,lDe=new pe("ImageLoader",{providedIn:"root",factory:()=>aDe});function QD(n,t){return function(i,r={ensurePreconnect:!0}){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 At(2959,!1)}(),i=function(n){return n.endsWith("/")?n.slice(0,-1):n}(i),[{provide:lDe,useValue:a=>(function(n){return/^https?:\/\//.test(n)}(a.src)&&function(n,t){throw new At(2959,!1)}(),n(i,{...a,src:sDe(a.src)}))}]}}QD(function(n,t){let e="format=auto";return t.width&&(e+=`,width=${t.width}`),`${n}/cdn-cgi/image/${e}/${t.src}`}),QD(function(n,t){let e="f_auto,q_auto";return t.width&&(e+=`,w_${t.width}`),`${n}/image/upload/${e}/${t.src}`}),QD(function(n,t){let e="tr:q-auto";return t.width&&(e+=`,w-${t.width}`),`${n}/${e}/${t.src}`}),QD(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});var KD,h5=class extends zD{constructor(){super(...arguments),this.supportsDOMEvents=!0}},aM=class extends h5{static makeCurrent(){!function(n){r5||(r5=n)}(new aM)}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=(rM=rM||document.querySelector("base"))?rM.getAttribute("href"):null;return null==e?null:function(n){(KD=KD||document.createElement("a")).setAttribute("href",n);let t=KD.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){rM=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return qD(document.cookie,t)}},rM=null,cZ=new pe("TRANSITION_ID"),yDe=[{provide:$3,useFactory:function(n,t,e){return()=>{e.get(OT).donePromise.then(()=>{let i=Yl(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o<r.length;o++)i.remove(r[o])})}},deps:[cZ,Ht,Xn],multi:!0}],bDe=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ZD=new pe("EventManagerPlugins"),JD=(()=>{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 s=r[o];if(s.supports(e))return this._eventNameToPlugin.set(e,s),s}throw new Error(`No event manager plugin found for event ${e}`)}}return n.\u0275fac=function(e){return new(e||n)(j(ZD),j(_t))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),$D=class{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){let r=Yl().getGlobalEventTarget(this._doc,t);if(!r)throw new Error(`Unsupported event target ${r} for event ${e}`);return this.addEventListener(r,e,i)}},uZ=(()=>{class n{constructor(){this._stylesSet=new Set}addStyles(e){let i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),oM=(()=>{class n extends uZ{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{let s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){let i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){let i=this._hostNodes.get(e);i&&i.forEach(iZ),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(iZ))}}return n.\u0275fac=function(e){return new(e||n)(j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})();function iZ(n){Yl().remove(n)}var p5={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/"},_5=/%COMP%/g;function eA(n,t,e){for(let i=0;i<t.length;i++){let r=t[i];Array.isArray(r)?eA(n,r,e):(r=r.replace(_5,n),e.push(r))}return e}function oZ(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}var sM=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new lM(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case Ja.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new m5(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case 1:case Ja.ShadowDom:return new g5(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){let r=eA(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(j(JD),j(oM),j($f))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),lM=class{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(p5[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(aZ(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(aZ(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=p5[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=p5[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&(Bl.DashCase|Bl.Important)?t.style.setProperty(e,i,r&Bl.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Bl.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,oZ(i)):this.eventManager.addEventListener(t,e,oZ(i))}};function aZ(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}"@".charCodeAt(0);var m5=class extends lM{constructor(t,e,i,r){super(t),this.component=i;let o=eA(r+"-"+i.id,i.styles,[]);e.addStyles(o),this.contentAttr=function(n){return"_ngcontent-%COMP%".replace(_5,n)}(r+"-"+i.id),this.hostAttr=function(n){return"_nghost-%COMP%".replace(_5,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},g5=class extends lM{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=eA(r.id,r.styles,[]);for(let s=0;s<o.length;s++){let a=document.createElement("style");a.textContent=o[s],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}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)))}},EDe=(()=>{class n extends $D{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)(j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),lZ=["alt","control","meta","shift"],TDe={"\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"},DDe={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},ADe=(()=>{class n extends $D{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){let o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Yl().onAndCancel(e,o.domEventName,s))}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()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),lZ.forEach(c=>{let u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=TDe[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"),lZ.forEach(s=>{s!==r&&(0,DDe[s])(e)&&(o+=s+".")}),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)(j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ODe=[{provide:Gd,useValue:d5},{provide:eB,useValue:function(){aM.makeCurrent()},multi:!0},{provide:Ht,useFactory:function(){return function(n){pL=n}(document),document},deps:[]}],y5=rB(cX,"browser",ODe),pZ=new pe(""),kDe=[{provide:eC,useClass:class{addToWindow(t){to.getAngularTestability=(i,r=!0)=>{let o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},to.getAllAngularTestabilities=()=>t.getAllTestabilities(),to.getAllAngularRootElements=()=>t.getAllRootElements(),to.frameworkStabilizers||(to.frameworkStabilizers=[]),to.frameworkStabilizers.push(i=>{let r=to.getAllAngularTestabilities(),o=r.length,s=!1,a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Yl().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:nB,useClass:kT,deps:[_t,FT,eC]},{provide:kT,useClass:kT,deps:[_t,FT,eC]}],FDe=[{provide:gT,useValue:"root"},{provide:Qs,useFactory:function(){return new Qs},deps:[]},{provide:ZD,useClass:EDe,multi:!0,deps:[Ht,_t,Gd]},{provide:ZD,useClass:ADe,multi:!0,deps:[Ht]},{provide:sM,useClass:sM,deps:[JD,oM,$f]},{provide:wu,useExisting:sM},{provide:uZ,useExisting:oM},{provide:oM,useClass:oM,deps:[Ht]},{provide:JD,useClass:JD,deps:[ZD,_t]},{provide:Em,useClass:bDe,deps:[]},[]],tA=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:$f,useValue:e.appId},{provide:cZ,useExisting:$f},yDe]}}}return n.\u0275fac=function(e){return new(e||n)(j(pZ,12))},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[...FDe,...kDe],imports:[Me,uX]}),n})(),Tm=(new pe("HammerGestureConfig"),new pe("HammerLoader"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:function(e){let i=null;return i=e?new(e||n):j(hZ),i},providedIn:"root"}),n})()),hZ=(()=>{class n extends Tm{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case mo.NONE:return i;case mo.HTML:return Pc(i,"HTML")?Ta(i):D3(this._doc,String(i)).toString();case mo.STYLE:return Pc(i,"Style")?Ta(i):i;case mo.SCRIPT:if(Pc(i,"Script"))return Ta(i);throw new Error("unsafe value used in a script context");case mo.URL:return Pc(i,"URL")?Ta(i):zx(String(i));case mo.RESOURCE_URL:if(Pc(i,"ResourceURL"))return Ta(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return function(n){return new hL(n)}(e)}bypassSecurityTrustStyle(e){return function(n){return new fL(n)}(e)}bypassSecurityTrustScript(e){return function(n){return new mL(n)}(e)}bypassSecurityTrustUrl(e){return function(n){return new gL(n)}(e)}bypassSecurityTrustResourceUrl(e){return function(n){return new _L(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(j(Ht))},n.\u0275prov=ye({token:n,factory:function(e){let i=null;return i=e?new e:function(n){return new hZ(n.get(Ht))}(j(Xn)),i},providedIn:"root"}),n})(),cM=(new Ic("14.2.11"),oN(mZ(),1),class{}),nA=class{},ju="*";function Kr(n,t){return{type:7,name:n,definitions:t,options:{}}}function ji(n,t=null){return{type:4,styles:t,timings:n}}function x5(n,t=null){return{type:3,steps:n,options:t}}function iA(n,t=null){return{type:2,steps:n,options:t}}function gn(n){return{type:6,styles:n,offset:null}}function ki(n,t,e){return{type:0,name:n,styles:t,options:e}}function Dm(n){return{type:5,steps:n}}function Li(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function Am(n=null){return{type:9,options:n}}function Im(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function gZ(n){Promise.resolve().then(n)}var dh=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(){gZ(()=>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}},uM=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?gZ(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.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}};function _Z(n){return new At(3e3,!1)}function z5(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ph(n){switch(n.length){case 0:return new dh;case 1:return n[0];default:return new uM(n)}}function RZ(n,t,e,i,r=new Map,o=new Map){let s=[],a=[],l=-1,c=null;if(i.forEach(u=>{let d=u.get("offset"),p=d==l,h=p&&c||new Map;u.forEach((f,m)=>{let x=m,g=f;if("offset"!==m)switch(x=t.normalizePropertyName(x,s),g){case"!":g=r.get(m);break;case ju:g=o.get(m);break;default:g=t.normalizeStyleValue(m,x,g,s)}h.set(x,g)}),p||a.push(h),c=h,l=d}),s.length)throw new At(3502,!1);return a}function j5(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&C5(e,"start",n)));break;case"done":n.onDone(()=>i(e&&C5(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&C5(e,"destroy",n)))}}function C5(n,t,e){let o=G5(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function G5(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function pl(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function vZ(n){let t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}var D5=(n,t)=>!1,OZ=(n,t,e)=>[],kZ=null;function W5(n){let t=n.parentNode||n.host;return t===kZ?null:t}(z5()||typeof Element<"u")&&(typeof window<"u"&&typeof window.document<"u"?(kZ=(()=>document.documentElement)(),D5=(n,t)=>{for(;t;){if(t===n)return!0;t=W5(t)}return!1}):D5=(n,t)=>n.contains(t),OZ=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));let i=n.querySelector(t);return i?[i]:[]});var Pm=null,yZ=!1;var FZ=D5,NZ=OZ,q5=(()=>{class n{validateStyleProperty(e){return function(n){Pm||(Pm=(typeof document<"u"?document.body:null)||{},yZ=!!Pm.style&&"WebkitAppearance"in Pm.style);let t=!0;return Pm.style&&!function(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in Pm.style,!t&&yZ&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Pm.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return FZ(e,i)}getParentElement(e){return W5(e)}query(e,i,r){return NZ(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new dh(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),vM=(()=>{class n{}return n.NOOP=new q5,n})(),BZ="ng-enter",A5="ng-leave",oA="ng-trigger",cA=".ng-trigger",bZ="ng-animating",I5=".ng-animating";function tp(n){if("number"==typeof n)return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:P5(parseFloat(t[1]),t[2])}function P5(n,t){return"s"===t?1e3*n:n}function uA(n,t,e){return n.hasOwnProperty("duration")?n:function(n,t,e){let r,o=0,s="";if("string"==typeof n){let a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(_Z()),{duration:0,delay:0,easing:""};r=P5(parseFloat(a[1]),a[2]);let l=a[3];null!=l&&(o=P5(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(new At(3100,!1)),a=!0),o<0&&(t.push(new At(3101,!1)),a=!0),a&&t.splice(l,0,_Z())}return{duration:r,delay:o,easing:s}}(n,t,e)}function yM(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function VZ(n){let t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function j_(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 xZ(n,t,e){return e?t+":"+e+";":""}function HZ(n){let t="";for(let e=0;e<n.style.length;e++){let i=n.style.item(e);t+=xZ(0,i,n.style.getPropertyValue(i))}for(let e in n.style)n.style.hasOwnProperty(e)&&!e.startsWith("_")&&(t+=xZ(0,SAe(e),n.style[e]));n.setAttribute("style",t)}function Gu(n,t,e){n.style&&(t.forEach((i,r)=>{let o=Y5(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),z5()&&HZ(n))}function Om(n,t){n.style&&(t.forEach((e,i)=>{let r=Y5(i);n.style[r]=""}),z5()&&HZ(n))}function dM(n){return Array.isArray(n)?1==n.length?n[0]:iA(n):n}var R5=new RegExp("{{\\s*(.+?)\\s*}}","g");function UZ(n){let t=[];if("string"==typeof n){let e;for(;e=R5.exec(n);)t.push(e[1]);R5.lastIndex=0}return t}function hM(n,t,e){let i=n.toString(),r=i.replace(R5,(o,s)=>{let a=t[s];return null==a&&(e.push(new At(3003,!1)),a=""),a.toString()});return r==i?n:r}function dA(n){let t=[],e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}var wAe=/-+([a-z0-9])/g;function Y5(n){return n.replace(wAe,(...t)=>t[1].toUpperCase())}function SAe(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function dl(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 At(3004,!1)}}function zZ(n,t){return window.getComputedStyle(n)[t]}function IAe(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 At(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 At(3015,!1)),t;let r=i[1],o=i[2],s=i[3];t.push(CZ(r,s)),"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(CZ(s,r))}(i,e,t)):e.push(n),e}var sA=new Set(["true","1"]),aA=new Set(["false","0"]);function CZ(n,t){let e=sA.has(n)||aA.has(n),i=sA.has(t)||aA.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?sA.has(n):aA.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?sA.has(t):aA.has(t)),s&&a}}var OAe=new RegExp("s*:selfs*,?","g");function qZ(n,t,e,i){return new O5(n).build(t,e,i)}var O5=class{constructor(t){this._driver=t}build(t,e,i){let r=new k5(e);return this._resetContextStyleTimingState(r),dl(this,dM(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=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(new At(3006,!1)),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){let l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(new At(3007,!1))}),{type:7,name:t.name,states:o,transitions:s,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,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{UZ(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(dA(o.values()),e.errors.push(new At(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=dl(this,dM(t.animation),e);return{type:1,matchers:IAe(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Rm(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>dl(this,i,e)),options:Rm(t.options)}}visitGroup(t,e){let i=e.currentTime,r=0,o=t.steps.map(s=>{e.currentTime=i;let a=dl(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Rm(t.options)}}visitAnimate(t,e){let i=function(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return M5(uA(n,t).duration,0,"");let e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){let o=M5(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=uA(e,t);return M5(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:gn({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;let c={};i.easing&&(c.easing=i.easing),s=gn(c)}e.currentTime+=i.duration+i.delay;let l=this.visitStyle(s,e);l.isEmptyStep=a,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 a of r)"string"==typeof a?a===ju?i.push(a):e.errors.push(new At(3002,!1)):i.push(VZ(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,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(s=>{"string"!=typeof s&&s.forEach((a,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l),d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(new At(3010,!1)),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function(n,t,e){let i=t.params||{},r=UZ(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(new At(3001,!1))})}(a,e.options,e.errors)})})}visitKeyframes(t,e){let i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(new At(3011,!1)),i;let o=0,s=[],a=!1,l=!1,c=0,u=t.steps.map(g=>{let b=this._makeStyleAst(g,e),D=null!=b.offset?b.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}(b.styles),T=0;return null!=D&&(o++,T=b.offset=D),l=l||T<0||T>1,a=a||T<c,c=T,s.push(T),b});l&&e.errors.push(new At(3012,!1)),a&&e.errors.push(new At(3200,!1));let d=t.steps.length,p=0;o>0&&o<d?e.errors.push(new At(3202,!1)):0==o&&(p=1/(d-1));let h=d-1,f=e.currentTime,m=e.currentAnimateTimings,x=m.duration;return u.forEach((g,b)=>{let D=p>0?b==h?1:p*b:s[b],T=D*x;e.currentTime=f+m.delay+T,m.duration=T,this._validateStyleAst(g,e),g.offset=D,i.styles.push(g)}),i}visitReference(t,e){return{type:8,animation:dl(this,dM(t.animation),e),options:Rm(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Rm(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Rm(t.options)}}visitQuery(t,e){let i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;let[o,s]=function(n){let t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(OAe,"")),n=n.replace(/@\*/g,cA).replace(/@\w+/g,e=>cA+"-"+e.slice(1)).replace(/:animating/g,I5),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,pl(e.collectedStyles,e.currentQuerySelector,new Map);let a=dl(this,dM(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Rm(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(new At(3013,!1));let i="full"===t.timings?{duration:0,delay:0,easing:"full"}:uA(t.timings,e.errors,!0);return{type:12,animation:dl(this,dM(t.animation),e),timings:i,options:null}}},k5=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 Rm(n){return n?(n=yM(n)).params&&(n.params=function(n){return n?yM(n):null}(n.params)):n={},n}function M5(n,t,e){return{duration:n,delay:t,easing:e}}function X5(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var fM=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()}},HAe=new RegExp(":enter","g"),zAe=new RegExp(":leave","g");function YZ(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new F5).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}var F5=class{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new fM;let d=new mM(t,e,c,r,o,u,[]);d.options=l;let p=l.delay?tp(l.delay):0;d.currentTimeline.delayNextStep(p),d.currentTimeline.setStyles([s],null,d.errors,l),dl(this,i,d);let h=d.timelines.filter(f=>f.containsAnimation());if(h.length&&a.size){let f;for(let m=h.length-1;m>=0;m--){let x=h[m];if(x.element===e){f=x;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,d.errors,l)}return h.length?h.map(f=>f.buildKeyframes()):[X5(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,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}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 s="number"==typeof o?o:tp(hM(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime,s=null!=i.duration?tp(i.duration):null,a=null!=i.delay?tp(i.delay):null;return 0!==s&&t.forEach(l=>{let c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),dl(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=hA);let s=tp(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>dl(this,s,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?tp(t.options.delay):0;t.steps.forEach(s=>{let a=e.createSubContext(t.options);o&&a.delayNextStep(o),dl(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let i=t.strValue;return uA(e.params?hM(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,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){let i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?tp(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=hA);let s=i,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;let d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),dl(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1),l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}let u=e.currentTimeline;l&&u.delayNextStep(l);let d=u.currentTime;dl(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}},hA={},mM=class{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=hA,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new G_(this._driver,e,0),a.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=tp(i.duration)),null!=i.delay&&(r.delay=tp(i.delay));let o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=hM(o[a],s,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 mM(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=hA,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 N5(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,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(HAe,"."+this._enterClassName)).replace(zAe,"."+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)),a.push(...c)}return!o&&0==a.length&&s.push(new At(3014,!1)),a}},G_=class{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,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 G_(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||ju),this._currentKeyframe.set(e,ju);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},s=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,ju)}else j_(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){let c=hM(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??ju),this._updateStyle(a,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((a,l)=>{let c=j_(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===ju&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});let o=t.size?dA(t.values()):[],s=e.size?dA(e.values()):[];if(i){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return X5(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},N5=class extends G_{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.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=[],s=i+e,a=e/s,l=j_(t[0]);l.set("offset",0),o.push(l);let c=j_(t[0]);c.set("offset",wZ(a)),o.push(c);let u=t.length-1;for(let d=1;d<=u;d++){let p=j_(t[d]),h=p.get("offset");p.set("offset",wZ((e+h*i)/s)),o.push(p)}i=s,e=0,r="",t=o}return X5(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}};function wZ(n,t=3){let e=Math.pow(10,t-1);return Math.round(n*e)/e}var km=class{},GAe=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"]),fA=class extends km{normalizePropertyName(t,e){return Y5(t)}normalizeStyleValue(t,e,i,r){let o="",s=i.toString().trim();if(GAe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(new At(3005,!1))}return s+o}};function SZ(n,t,e,i,r,o,s,a,l,c,u,d,p){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:p}}var w5={},mA=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,s,a,l,c,u){let d=[],p=this.ast.options&&this.ast.options.params||w5,f=this.buildStyles(i,a&&a.params||w5,d),m=l&&l.params||w5,x=this.buildStyles(r,m,d),g=new Set,b=new Map,D=new Map,T="void"===r,k={params:qAe(m,p),delay:this.ast.options?.delay},Z=u?[]:YZ(t,e,this.ast.animation,o,s,f,x,k,c,d),z=0;if(Z.forEach(ue=>{z=Math.max(ue.duration+ue.delay,z)}),d.length)return SZ(e,this._triggerName,i,r,T,f,x,[],[],b,D,z,d);Z.forEach(ue=>{let he=ue.element,w=pl(b,he,new Set);ue.preStyleProps.forEach(q=>w.add(q));let F=pl(D,he,new Set);ue.postStyleProps.forEach(q=>F.add(q)),he!==e&&g.add(he)});let fe=dA(g.values());return SZ(e,this._triggerName,i,r,T,f,x,Z,fe,b,D,z)}};function qAe(n,t){let e=yM(t);for(let i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}function EZ(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 QAe=new fM,TZ="ng-animate-queued",S5="ng-animate-disabled",eIe=[],XZ={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tIe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Kl="__ng_removed",gM=class{constructor(t,e=""){this.namespaceId=e;let i=t&&t.hasOwnProperty("value");if(this.value=function(n){return n??null}(i?t.value:t),i){let o=yM(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}get params(){return 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])})}}},pM="void",E5=new gM(pM),_M=class{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new dh,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,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=>j5(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){pl(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 lA(n){return n&&1===n.nodeType}function DZ(n,t){let e=n.style.display;return n.style.display=t??"none",e}function AZ(n,t,e,i,r){let o=[];e.forEach(l=>o.push(DZ(l)));let s=[];i.forEach((l,c)=>{let u=new Map;l.forEach(d=>{let p=t.computeStyle(c,d,r);u.set(d,p),(!p||0==p.length)&&(c[Kl]=tIe,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>DZ(l,o[a++])),s}function IZ(n,t){let e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;let r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;let c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{let l=s(a);1!==l&&e.get(l).push(a)}),e}function Zl(n,t){n.classList?.add(t)}function z_(n,t){n.classList?.remove(t)}function oIe(n,t,e){ph(e).onDone(()=>n.processLeaveNode(t))}function QZ(n,t){for(let e=0;e<n.length;e++){let i=n[e];i instanceof uM?QZ(i.players,t):t.push(i)}}function PZ(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 hh=class{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new class{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)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}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,Zl(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw new At(3302,!1);if(null==i||0==i.length)throw new At(3303,!1);if(!function(n){return"start"==n||"done"==n}(i))throw new At(3400,!1);let o=pl(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);let a=pl(this._engine.statesByElement,t,new Map);return a.has(e)||(Zl(t,oA),Zl(t,oA+"-"+e),a.set(e,E5)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.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 At(3401,!1);return e}trigger(t,e,i,r=!0){let o=this._getTrigger(e),s=new _M(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Zl(t,oA),Zl(t,oA+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e),c=new gM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=E5),c.value!==pM&&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=[],x=o.matchStyles(l.value,l.params,m),g=o.matchStyles(c.value,c.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{Om(t,x),Gu(t,g)})}return}let p=pl(this._engine.playersByElement,t,[]);p.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let h=o.matchTransition(l.value,c.value,t,c.params),f=!1;if(!h){if(!r)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Zl(t,TZ),s.onStart(()=>{z_(t,TZ)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let x=this._engine.playersByElement.get(t);if(x){let g=x.indexOf(s);g>=0&&x.splice(g,1)}}),this.players.push(s),p.push(s),s}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,cA,!0);i.forEach(r=>{if(r[Kl])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.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),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let u=this.trigger(t,c,pM,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&ph(a).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 s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=i.get(s)||E5,u=new gM(pM),d=new _M(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,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 s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{let o=t[Kl];(!o||o===XZ)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Zl(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){let l=G5(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,j5(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{let o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s: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 s=!1,a=this.driver.getParentElement(e);for(;a;){let l=r.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||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(lA(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!lA(e))return;let o=e[Kl];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.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),Zl(t,S5)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),z_(t,S5))}removeNode(t,e,i,r){if(lA(e)){let o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){let s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Kl]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return lA(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,cA,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,I5,!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 ph(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[Kl];if(e&&e.setForRemoval){if(t[Kl]=XZ,e.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(S5)&&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++)Zl(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?ph(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw new At(3402,!1)}_flushAnimations(t,e){let i=new fM,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Y=>{u.add(Y);let ae=this.driver.query(Y,".ng-animate-queued",!0);for(let le=0;le<ae.length;le++)u.add(ae[le])});let d=this.bodyNode,p=Array.from(this.statesByElement.keys()),h=IZ(p,this.collectedEnterElements),f=new Map,m=0;h.forEach((Y,ae)=>{let le=BZ+m++;f.set(ae,le),Y.forEach(Ie=>Zl(Ie,le))});let x=[],g=new Set,b=new Set;for(let Y=0;Y<this.collectedLeaveElements.length;Y++){let ae=this.collectedLeaveElements[Y],le=ae[Kl];le&&le.setForRemoval&&(x.push(ae),g.add(ae),le.hasAnimation?this.driver.query(ae,".ng-star-inserted",!0).forEach(Ie=>g.add(Ie)):b.add(ae))}let D=new Map,T=IZ(p,Array.from(g));T.forEach((Y,ae)=>{let le=A5+m++;D.set(ae,le),Y.forEach(Ie=>Zl(Ie,le))}),t.push(()=>{h.forEach((Y,ae)=>{let le=f.get(ae);Y.forEach(Ie=>z_(Ie,le))}),T.forEach((Y,ae)=>{let le=D.get(ae);Y.forEach(Ie=>z_(Ie,le))}),x.forEach(Y=>{this.processLeaveNode(Y)})});let k=[],Z=[];for(let Y=this._namespaceList.length-1;Y>=0;Y--)this._namespaceList[Y].drainQueuedTransitions(e).forEach(le=>{let Ie=le.player,ve=le.element;if(k.push(Ie),this.collectedEnterElements.length){let pt=ve[Kl];if(pt&&pt.setForMove){if(pt.previousTriggersValues&&pt.previousTriggersValues.has(le.triggerName)){let wt=pt.previousTriggersValues.get(le.triggerName),Te=this.statesByElement.get(le.element);if(Te&&Te.has(le.triggerName)){let xt=Te.get(le.triggerName);xt.value=wt,Te.set(le.triggerName,xt)}}return void Ie.destroy()}}let De=!d||!this.driver.containsElement(d,ve),nt=D.get(ve),gt=f.get(ve),Ue=this._buildInstruction(le,i,gt,nt,De);if(Ue.errors&&Ue.errors.length)return void Z.push(Ue);if(De)return Ie.onStart(()=>Om(ve,Ue.fromStyles)),Ie.onDestroy(()=>Gu(ve,Ue.toStyles)),void r.push(Ie);if(le.isFallbackTransition)return Ie.onStart(()=>Om(ve,Ue.fromStyles)),Ie.onDestroy(()=>Gu(ve,Ue.toStyles)),void r.push(Ie);let Ae=[];Ue.timelines.forEach(pt=>{pt.stretchStartingKeyframe=!0,this.disabledNodes.has(pt.element)||Ae.push(pt)}),Ue.timelines=Ae,i.append(ve,Ue.timelines),s.push({instruction:Ue,player:Ie,element:ve}),Ue.queriedElements.forEach(pt=>pl(a,pt,[]).push(Ie)),Ue.preStyleProps.forEach((pt,wt)=>{if(pt.size){let Te=l.get(wt);Te||l.set(wt,Te=new Set),pt.forEach((xt,mt)=>Te.add(mt))}}),Ue.postStyleProps.forEach((pt,wt)=>{let Te=c.get(wt);Te||c.set(wt,Te=new Set),pt.forEach((xt,mt)=>Te.add(mt))})});if(Z.length){let Y=[];Z.forEach(ae=>{Y.push(new At(3505,!1))}),k.forEach(ae=>ae.destroy()),this.reportError(Y)}let z=new Map,fe=new Map;s.forEach(Y=>{let ae=Y.element;i.has(ae)&&(fe.set(ae,ae),this._beforeAnimationBuild(Y.player.namespaceId,Y.instruction,z))}),r.forEach(Y=>{let ae=Y.element;this._getPreviousPlayers(ae,!1,Y.namespaceId,Y.triggerName,null).forEach(Ie=>{pl(z,ae,[]).push(Ie),Ie.destroy()})});let ue=x.filter(Y=>PZ(Y,l,c)),he=new Map;AZ(he,this.driver,b,c,ju).forEach(Y=>{PZ(Y,l,c)&&ue.push(Y)});let F=new Map;h.forEach((Y,ae)=>{AZ(F,this.driver,new Set(Y),l,"!")}),ue.forEach(Y=>{let ae=he.get(Y),le=F.get(Y);he.set(Y,new Map([...Array.from(ae?.entries()??[]),...Array.from(le?.entries()??[])]))});let q=[],K=[],de={};s.forEach(Y=>{let{element:ae,player:le,instruction:Ie}=Y;if(i.has(ae)){if(u.has(ae))return le.onDestroy(()=>Gu(ae,Ie.toStyles)),le.disabled=!0,le.overrideTotalTime(Ie.totalTime),void r.push(le);let ve=de;if(fe.size>1){let nt=ae,gt=[];for(;nt=nt.parentNode;){let Ue=fe.get(nt);if(Ue){ve=Ue;break}gt.push(nt)}gt.forEach(Ue=>fe.set(Ue,ve))}let De=this._buildAnimation(le.namespaceId,Ie,z,o,F,he);if(le.setRealPlayer(De),ve===de)q.push(le);else{let nt=this.playersByElement.get(ve);nt&&nt.length&&(le.parentPlayer=ph(nt)),r.push(le)}}else Om(ae,Ie.fromStyles),le.onDestroy(()=>Gu(ae,Ie.toStyles)),K.push(le),u.has(ae)&&r.push(le)}),K.forEach(Y=>{let ae=o.get(Y.element);if(ae&&ae.length){let le=ph(ae);Y.setRealPlayer(le)}}),r.forEach(Y=>{Y.parentPlayer?Y.syncPlayerEvents(Y.parentPlayer):Y.destroy()});for(let Y=0;Y<x.length;Y++){let ae=x[Y],le=ae[Kl];if(z_(ae,A5),le&&le.hasAnimation)continue;let Ie=[];if(a.size){let De=a.get(ae);De&&De.length&&Ie.push(...De);let nt=this.driver.query(ae,I5,!0);for(let gt=0;gt<nt.length;gt++){let Ue=a.get(nt[gt]);Ue&&Ue.length&&Ie.push(...Ue)}}let ve=Ie.filter(De=>!De.destroyed);ve.length?oIe(this,ae,ve):this.processLeaveNode(ae)}return x.length=0,q.forEach(Y=>{this.players.push(Y),Y.onDone(()=>{Y.destroy();let ae=this.players.indexOf(Y);this.players.splice(ae,1)}),Y.play()}),q}elementContainsData(t,e){let i=!1,r=e[Kl];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 s=[];if(e){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let l=!o||o==pM;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){let o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(let l of e.timelines){let c=l.element,u=c!==o,d=pl(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(h=>{let f=h.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),h.destroy(),d.push(h)})}Om(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){let a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,p=e.timelines.map(f=>{let m=f.element;u.add(m);let x=m[Kl];if(x&&x.removedBeforeQueried)return new dh(f.duration,f.delay);let g=m!==l,b=function(n){let t=[];return QZ(n,t),t}((i.get(m)||eIe).map(z=>z.getRealPlayer())).filter(z=>!!z.element&&z.element===m),D=o.get(m),T=s.get(m),k=RZ(0,this._normalizer,0,f.keyframes,D,T),Z=this._buildPlayer(f,k,b);if(f.subTimeline&&r&&d.add(m),g){let z=new _M(t,a,m);z.setRealPlayer(Z),c.push(z)}return Z});c.forEach(f=>{pl(this.playersByQueriedElement,f.element,[]).push(f),f.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,f.element,f))}),u.forEach(f=>Zl(f,bZ));let h=ph(p);return h.onDestroy(()=>{u.forEach(f=>z_(f,bZ)),Gu(l,e.toStyles)}),d.forEach(f=>{pl(r,f,[]).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 dh(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=[],o=qZ(this._driver,e,i,[]);if(i.length)throw new At(3503,!1);this._animations.set(t,o)}_buildPlayer(t,e,i){let r=t.element,o=RZ(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 s,r=[],o=this._animations.get(t),a=new Map;if(o?(s=YZ(this._driver,e,o,BZ,A5,new Map,new Map,i,QAe,r),s.forEach(u=>{let d=pl(a,u.element,new Map);u.postStyleProps.forEach(p=>d.set(p,null))})):(r.push(new At(3300,!1)),s=[]),r.length)throw new At(3504,!1);a.forEach((u,d)=>{u.forEach((p,h)=>{u.set(h,this._driver.computeStyle(d,h,ju))})});let c=ph(s.map(u=>{let d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));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 At(3301,!1);return e}listen(t,e,i,r){let o=G5(e,"","","");return j5(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 s=t+"-"+r,a=this._triggerCache[s];if(!a){let l=[],u=qZ(this._driver,o,l,[]);if(l.length)throw new At(3404,!1);a=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=yM(this.defaultParams);return Object.keys(t).forEach(o=>{let s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=hM(s,r,e));let l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(l,s)})}),i}}(r.style,o,i))}),EZ(this.states,"true","1"),EZ(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new mA(t,r,this.states))}),this.fallbackTransition=function(n,t,e){return new mA(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!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(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}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,s]=vZ(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){let[s,a]=vZ(i);return this._timelineEngine.listen(s,e,a,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()}},cIe=(()=>{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&&Gu(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Gu(this._element,this._initialStyles),this._endStyles&&(Gu(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Om(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Om(this._element,this._endStyles),this._endStyles=null),Gu(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function T5(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 gA=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:zZ(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){let e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},pIe=(()=>{class n extends cM{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:Ja.None,styles:[],data:{animation:[]}})}build(e){let i=this._nextAnimationId.toString();this._nextAnimationId++;let r=Array.isArray(e)?iA(e):e;return ZZ(this._renderer,null,i,"register",[r]),new Q5(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(j(wu),j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),Q5=class extends nA{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new K5(this._id,t,e||{},this._renderer)}},K5=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 ZZ(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 ZZ(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}var JZ="@.disabled",hIe=(()=>{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,s)=>{let a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){let o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new yA("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}let s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new Z5(this,a,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[s,a]=o;s(a)}),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)(j(wu),j(hh),j(_t))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),yA=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==JZ?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)}},Z5=class extends yA{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==JZ?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),s="";return"@"!=o.charAt(0)&&([o,s]=function(n){let t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}},gIe=(()=>{class n extends hh{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(j(Ht),j(vM),j(km),j(Iu))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),$Z=[{provide:cM,useClass:pIe},{provide:km,useFactory:function(){return new fA}},{provide:hh,useClass:gIe},{provide:wu,useFactory:function(n,t,e){return new hIe(n,t,e)},deps:[sM,hh,_t]}],KZ=[{provide:vM,useFactory:()=>new class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return FZ(t,e)}getParentElement(t){return W5(t)}query(t,e,i){return NZ(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){let l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);let c=new Map,u=s.filter(h=>h instanceof gA);(function(n,t){return 0===n||0===t})(i,r)&&u.forEach(h=>{h.currentSnapshot.forEach((f,m)=>c.set(m,f))});let d=function(n){return n.length?n[0]instanceof Map?n:n.map(t=>VZ(t)):[]}(e).map(h=>j_(h));d=function(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;o<t.length;o++){let s=t[o];r.forEach(a=>s.set(a,zZ(n,a)))}}return t}(t,d,c);let p=function(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=T5(t[0]),t.length>1&&(i=T5(t[t.length-1]))):t instanceof Map&&(e=T5(t)),e||i?new cIe(n,e,i):null}(t,d);return new gA(t,d,l,p)}}},{provide:Pi,useValue:"BrowserAnimations"},...$Z],yIe=[{provide:vM,useClass:q5},{provide:Pi,useValue:"NoopAnimations"},...$Z],eJ=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?yIe:KZ}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:KZ,imports:[tA]}),n})(),t4={};function be(n,t){if(t4[n]=(t4[n]||0)+1,"function"==typeof t)return J5(n,(...i)=>({...t(...i),type:n}));switch(t?t._as:"empty"){case"empty":return J5(n,()=>({type:n}));case"props":return J5(n,i=>({...i,type:n}));default:throw new Error("Unexpected config.")}}function J5(n,t){return Object.defineProperty(t,"type",{value:n,writable:!1})}var gJ="@ngrx/store/init",q_=(()=>{class n extends hr{constructor(){super({type:gJ})}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=ye({token:n,factory:n.\u0275fac}),n})(),bIe=[q_],_J=new pe("@ngrx/store Internal Root Guard"),tJ=new pe("@ngrx/store Internal Initial State"),o4=new pe("@ngrx/store Initial State"),vJ=new pe("@ngrx/store Reducer Factory"),nJ=new pe("@ngrx/store Internal Reducer Factory Provider"),yJ=new pe("@ngrx/store Initial Reducers"),$5=new pe("@ngrx/store Internal Initial Reducers"),iJ=new pe("@ngrx/store Store Features"),rJ=new pe("@ngrx/store Internal Store Reducers"),e4=new pe("@ngrx/store Internal Feature Reducers"),oJ=new pe("@ngrx/store Internal Feature Configs"),bJ=new pe("@ngrx/store Internal Store Features"),sJ=new pe("@ngrx/store Internal Feature Reducers Token"),xJ=new pe("@ngrx/store Feature Reducers"),aJ=new pe("@ngrx/store User Provided Meta Reducers"),W_=new pe("@ngrx/store Meta Reducers"),lJ=new pe("@ngrx/store Internal Resolved Meta Reducers"),cJ=new pe("@ngrx/store User Runtime Checks Config"),uJ=new pe("@ngrx/store Internal User Runtime Checks Config"),bM=new pe("@ngrx/store Internal Runtime Checks"),s4=new pe("@ngrx/store Check if Action types are unique");function Fm(n,t={}){let e=Object.keys(n),i={};for(let o=0;o<e.length;o++){let s=e[o];"function"==typeof n[s]&&(i[s]=n[s])}let r=Object.keys(i);return function(s,a){s=void 0===s?t:s;let l=!1,c={};for(let u=0;u<r.length;u++){let d=r[u],h=s[d],f=(0,i[d])(h,a);c[d]=f,l=l||f!==h}return l?c:s}}function MA(...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 CJ(n,t){return Array.isArray(t)&&t.length>0&&(n=MA.apply(null,[...t,n])),(e,i)=>{let r=n(e);return(o,s)=>r(o=void 0===o?i:o,s)}}new pe("@ngrx/store Root Store Provider"),new pe("@ngrx/store Feature State Provider");var xM=class extends un{},bA=class extends q_{},xA=(()=>{class n extends hr{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:s,metaReducers:a,initialState:l,key:c})=>{let u="function"==typeof o?function(n){let t=Array.isArray(n)&&n.length>0?MA(...n):e=>e;return(e,i)=>(e=t(e),(r,o)=>e(r=void 0===r?i:r,o))}(a)(o,l):CJ(s,a)(o,l);return r[c]=u,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)(j(bA),j(o4),j(yJ),j(vJ))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),EIe=[xA,{provide:xM,useExisting:xA},{provide:bA,useExisting:q_}],CM=(()=>{class n extends ke{ngOnDestroy(){this.complete()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),TIe=[CM],CA=class extends un{},dJ=(()=>{class n extends hr{constructor(e,i,r,o){super(o);let c=e.pipe(Bf(gN)).pipe(Wt(i)).pipe(function(n,t){return en(AW(n,t,arguments.length>=2,!0))}(DIe,{state:o}));this.stateSubscription=c.subscribe(({state:u,action:d})=>{this.next(u),r.next(d)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return n.INIT=gJ,n.\u0275fac=function(e){return new(e||n)(j(q_),j(xM),j(CM),j(o4))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})();function DIe(n={state:void 0},[t,e]){let{state:i}=n;return{state:e(i,t),action:t}}var AIe=[dJ,{provide:CA,useExisting:dJ}],Ce=(()=>{class n extends un{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e}select(e,...i){return vt.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)(j(CA),j(q_),j(xA))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),IIe=[Ce];function vt(n,t,...e){return function(r){let o;if("string"==typeof n){let s=[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 L(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,...s))}else{if("function"!=typeof n)throw new TypeError(`Unexpected type '${typeof n}' in select operator, expected 'string' or 'function'`);o=r.pipe(L(s=>n(s,t)))}return o.pipe(yi())}}var a4="https://ngrx.io/guide/store/configuration/runtime-checks";function pJ(n){return void 0===n}function hJ(n){return null===n}function MJ(n){return Array.isArray(n)}function wJ(n){return"object"==typeof n&&null!==n}function n4(n){return"function"==typeof n}function fJ(n,t){return n===t}function HIe(n,t,e){for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!0;return!1}function SJ(n,t=fJ,e=fJ){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(!HIe(arguments,i,t))return r;let u=n.apply(null,arguments);return i=arguments,e(r,u)?r:(r=u,u)},reset:function(){i=null,r=null},setResult:function(u){o={result:u}},clearResult:function(){o=void 0}}}function J(...n){return function(n,t={stateFn:UIe}){return function(...e){let i=e;if(Array.isArray(i[0])){let[u,...d]=i;i=[...u,...d]}let r=i.slice(0,i.length-1),o=i[i.length-1],s=r.filter(u=>u.release&&"function"==typeof u.release),a=n(function(...u){return o.apply(null,u)}),l=SJ(function(u,d){return t.stateFn.apply(null,[u,r,d,a])});return Object.assign(l.memoized,{release:function(){l.reset(),a.reset(),s.forEach(u=>u.release())},projector:a.memoized,setResult:l.setResult,clearResult:l.clearResult})}}(SJ)(...n)}function UIe(n,t,e,i){if(void 0===e){let o=t.map(s=>s(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 J(t=>{let e=t[n];return tC()&&!(n in t)&&console.warn(`@ngrx/store: The feature name "${n}" does not exist in the state, therefore createFeatureSelector cannot access it.  Be sure it is imported in a loaded module using StoreModule.forRoot('${n}', ...) or StoreModule.forFeature('${n}', ...).  If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.`),e},t=>t)}function jIe(n,t){return t instanceof pe?n.get(t):t}function GIe(n,t,e){return e.map((i,r)=>{if(t[r]instanceof pe){let o=n.get(t[r]);return{key:i.key,reducerFactory:o.reducerFactory?o.reducerFactory:Fm,metaReducers:o.metaReducers?o.metaReducers:[],initialState:o.initialState}}return i})}function WIe(n,t){return t.map(i=>i instanceof pe?n.get(i):i)}function EJ(n){return"function"==typeof n?n():n}function qIe(n,t){return n.concat(t)}function YIe(n){if(n)throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function i4(n){Object.freeze(n);let t=n4(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];(wJ(i)||n4(i))&&!Object.isFrozen(i)&&i4(i)}}),n}function r4(n,t=[]){return(pJ(n)||hJ(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 n4(n)&&n.hasOwnProperty("\u0275cmp")}(o)?i:!(pJ(o)||hJ(o)||function(n){return"number"==typeof n}(o)||function(n){return"boolean"==typeof n}(o)||function(n){return"string"==typeof n}(o)||MJ(o))&&(function(n){if(!function(n){return wJ(n)&&!MJ(n)}(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||null===t}(o)?r4(o,[...t,r]):{path:[...t,r],value:o})},!1)}function mJ(n,t){if(!1===n)return;let e=n.path.join("."),i=new Error(`Detected unserializable ${t} at "${e}". ${a4}#strict${t}serializability`);throw i.value=n.value,i.unserializablePath=e,i}function ZIe(n){return tC()?{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1,...n}:{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function JIe({strictActionSerializability:n,strictStateSerializability:t}){return e=>n||t?function(n,t){return function(e,i){t.action(i)&&mJ(r4(i),"action");let r=n(e,i);return t.state()&&mJ(r4(r),"state"),r}}(e,{action:i=>n&&!l4(i),state:()=>t}):e}function $Ie({strictActionImmutability:n,strictStateImmutability:t}){return e=>n||t?function(n,t){return function(e,i){let r=t.action(i)?i4(i):i,o=n(e,r);return t.state()?i4(o):o}}(e,{action:i=>n&&!l4(i),state:()=>t}):e}function l4(n){return n.type.startsWith("@ngrx")}function e2e({strictActionWithinNgZone:n}){return t=>n?function(n,t){return function(e,i){if(t.action(i)&&!_t.isInAngularZone())throw new Error(`Action '${i.type}' running outside NgZone. ${a4}#strictactionwithinngzone`);return n(e,i)}}(t,{action:e=>n&&!l4(e)}):t}function t2e(n){return[{provide:uJ,useValue:n},{provide:cJ,useFactory:n2e,deps:[uJ]},{provide:bM,deps:[cJ],useFactory:ZIe},{provide:W_,multi:!0,deps:[bM],useFactory:$Ie},{provide:W_,multi:!0,deps:[bM],useFactory:JIe},{provide:W_,multi:!0,deps:[bM],useFactory:e2e}]}function TJ(){return[{provide:s4,multi:!0,deps:[bM],useFactory:i2e}]}function n2e(n){return n}function i2e(n){if(!n.strictActionTypeUniqueness)return;let t=Object.entries(t4).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(", ")}. ${a4}#strictactiontypeuniqueness`)}function r2e(n,t){return[{provide:_J,useFactory:YIe,deps:[[Ce,new ns,new tl]]},{provide:tJ,useValue:t.initialState},{provide:o4,useFactory:EJ,deps:[tJ]},{provide:$5,useValue:n},{provide:rJ,useExisting:n instanceof pe?n:$5},{provide:yJ,deps:[Xn,$5,[new j0(rJ)]],useFactory:jIe},{provide:aJ,useValue:t.metaReducers?t.metaReducers:[]},{provide:lJ,deps:[W_,aJ],useFactory:qIe},{provide:nJ,useValue:t.reducerFactory?t.reducerFactory:Fm},{provide:vJ,deps:[nJ,lJ],useFactory:CJ},bIe,EIe,TIe,AIe,IIe,t2e(t.runtimeChecks),TJ()]}function o2e(n,t,e={}){return[{provide:oJ,multi:!0,useValue:n instanceof Object?{}:e},{provide:iJ,multi:!0,useValue:{key:n instanceof Object?n.name:n,reducerFactory:e instanceof pe||!e.reducerFactory?Fm:e.reducerFactory,metaReducers:e instanceof pe||!e.metaReducers?[]:e.metaReducers,initialState:e instanceof pe||!e.initialState?void 0:e.initialState}},{provide:bJ,deps:[Xn,oJ,iJ],useFactory:GIe},{provide:e4,multi:!0,useValue:n instanceof Object?n.reducer:t},{provide:sJ,multi:!0,useExisting:t instanceof pe?t:e4},{provide:xJ,multi:!0,deps:[Xn,e4,[new j0(sJ)]],useFactory:WIe},TJ()]}var MM=(()=>{class n{constructor(e,i,r,o,s,a){}}return n.\u0275fac=function(e){return new(e||n)(j(q_),j(xM),j(CM),j(Ce),j(_J,8),j(s4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),wA=(()=>{class n{constructor(e,i,r,o,s){this.features=e,this.featureReducers=i,this.reducerManager=r;let a=e.map((l,c)=>{let d=i.shift()[c];return{...l,reducers:d,initialState:EJ(l.initialState)}});r.addFeatures(a)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return n.\u0275fac=function(e){return new(e||n)(j(bJ),j(xJ),j(xA),j(MM),j(s4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),wr=(()=>{class n{static forRoot(e,i={}){return{ngModule:MM,providers:[...r2e(e,i)]}}static forFeature(e,i,r={}){return{ngModule:wA,providers:[...o2e(e,i,r)]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})();function Se(...n){return{reducer:n.pop(),types:n.map(i=>i.type)}}function vr(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?(a,l)=>i.reducer(o(a,l),l):i.reducer)}return function(i=n,r){let o=e.get(r.type);return o?o(i,r):i}}var s2e={dispatch:!0,useEffectsErrorHandler:!0},EA="__@ngrx/effects_create__";function cr(n,t){let e=n(),i={...s2e,...t};return Object.defineProperty(e,EA,{value:i}),e}function a2e(n){return Object.getOwnPropertyNames(n).filter(i=>!(!n[i]||!n[i].hasOwnProperty(EA))&&n[i][EA].hasOwnProperty("dispatch")).map(i=>({propertyName:i,...n[i][EA]}))}function u4(n){return Object.getPrototypeOf(n)}var IJ="__@ngrx/effects__";function l2e(n){return MA(u2e,u4)(n)}function u2e(n){return function(n){return n.constructor.hasOwnProperty(IJ)}(n)?n.constructor[IJ]:[]}function PJ(n,t,e=10){return n.pipe(fo(i=>(t&&t.handleError(i),e<=1?n:PJ(n,t,e-1))))}var Po=(()=>{class n extends un{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)(j(CM))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function ii(...n){return Ye(t=>n.some(e=>"string"==typeof e?e===t.type:e.type===t.type))}var RJ=new pe("@ngrx/effects Internal Root Guard"),SA=new pe("@ngrx/effects User Provided Effects"),c4=new pe("@ngrx/effects Internal Root Effects"),OJ=new pe("@ngrx/effects Root Effects"),DJ=new pe("@ngrx/effects Internal Feature Effects"),kJ=new pe("@ngrx/effects Feature Effects"),f2e=new pe("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>PJ}),FJ="@ngrx/effects/init";function w2e(n){return d4(n,"ngrxOnInitEffects")}function d4(n,t){return n&&t in n&&"function"==typeof n[t]}be(FJ);var NJ=(()=>{class n extends ke{constructor(e,i){super(),this.errorHandler=e,this.effectsErrorHandler=i}addEffects(e){this.next(e)}toActions(){return this.pipe(x1(u4),xn(e=>e.pipe(x1(S2e))),xn(e=>{let i=e.pipe(y1(o=>function(n,t){return e=>{let i=function(n,t,e){let i=u4(n).constructor.name,r=function(n){return[l2e,a2e].reduce((e,i)=>e.concat(i(n)),[])}(n).map(({propertyName:o,dispatch:s,useEffectsErrorHandler:a})=>{let l="function"==typeof n[o]?n[o]():n[o],c=a?e(l,t):l;return!1===s?c.pipe(lx()):c.pipe(en((n,t)=>{n.subscribe(jt(t,e=>{t.next(Rl.createNext(e))},()=>{t.next(Rl.createComplete()),t.complete()},e=>{t.next(Rl.createError(e)),t.complete()}))})).pipe(L(d=>({effect:n[o],notification:d,propertyName:o,sourceName:i,sourceInstance:n})))});return Jt(...r)}(e,n,t);return function(n){return d4(n,"ngrxOnRunEffects")}(e)?e.ngrxOnRunEffects(i):i}}(this.errorHandler,this.effectsErrorHandler)(o)),L(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)),Ye(o=>"N"===o.kind&&null!=o.value),en((n,t)=>{n.subscribe(jt(t,e=>bN(e,t)))}));return Jt(i,e.pipe(Qt(1),Ye(w2e),L(o=>o.ngrxOnInitEffects())))}))}}return n.\u0275fac=function(e){return new(e||n)(j(Qs),j(f2e))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function S2e(n){return function(n){return d4(n,"ngrxOnIdentifyEffects")}(n)?n.ngrxOnIdentifyEffects():""}var LJ=(()=>{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)(j(NJ),j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),BJ=(()=>{class n{constructor(e,i,r,o,s,a,l){this.sources=e,i.start(),o.forEach(c=>e.addEffects(c)),r.dispatch({type:FJ})}addEffects(e){this.sources.addEffects(e)}}return n.\u0275fac=function(e){return new(e||n)(j(NJ),j(LJ),j(Ce),j(OJ),j(MM,8),j(wA,8),j(RJ,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),T2e=(()=>{class n{constructor(e,i,r,o){i.forEach(s=>s.forEach(a=>e.addEffects(a)))}}return n.\u0275fac=function(e){return new(e||n)(j(BJ),j(kJ),j(MM,8),j(wA,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),ro=(()=>{class n{static forFeature(e=[]){return{ngModule:T2e,providers:[e,{provide:DJ,multi:!0,useValue:e},{provide:SA,multi:!0,useValue:[]},{provide:kJ,multi:!0,useFactory:AJ,deps:[Xn,DJ,SA]}]}}static forRoot(e=[]){return{ngModule:BJ,providers:[e,{provide:c4,useValue:[e]},{provide:RJ,useFactory:A2e,deps:[[LJ,new ns,new tl],[c4,new w3]]},{provide:SA,multi:!0,useValue:[]},{provide:OJ,useFactory:AJ,deps:[Xn,c4,SA]}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})();function AJ(n,t,e){let i=[];for(let r of t)i.push(...r);for(let r of e)i.push(...r);return function(n,t){return t.map(e=>n.get(e))}(n,i)}function A2e(n,t){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 hi=(()=>(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.EXPERIMENTS=1]="EXPERIMENTS",n[n.EXPERIMENT=2]="EXPERIMENT",n[n.COMPARE_EXPERIMENT=3]="COMPARE_EXPERIMENT",n[n.NOT_SET=4]="NOT_SET",n[n.FLAGS=5]="FLAGS"}(hi||(hi={})),hi))(),TA="defaultExperimentId",Y_=(()=>(function(n){n[n.EXPERIMENTS=0]="EXPERIMENTS",n[n.DASHBOARD=1]="DASHBOARD"}(Y_||(Y_={})),Y_))();function SM(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 VJ(n){return n.map(({alias:t,id:e})=>`${t}:${e}`).join(",")}function wM(n,t){switch(n){case hi.EXPERIMENT:return Object.prototype.hasOwnProperty.call(t,"experimentId")?[t.experimentId]:[TA];case hi.COMPARE_EXPERIMENT:return SM(t.experimentIds).map(({id:i})=>i);default:return null}}function Ps(n,t){if(!n||!t)return n===t;if(n.routeKind!==t.routeKind)return!1;let e=wM(n.routeKind,n.params),i=wM(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,s)=>r[s]===o)}function p4(n){switch(n){case hi.EXPERIMENTS:return Y_.EXPERIMENTS;case hi.EXPERIMENT:case hi.COMPARE_EXPERIMENT:return Y_.DASHBOARD;case hi.UNKNOWN:case hi.NOT_SET:case hi.FLAGS:return null}}function DA(n,t,e){let i=p4(n);return null!==i&&!e.some(r=>r.deepLinkGroup===i&&r.namespaceId===t)}var jJ_getHref=()=>window.location.href,Nm=(()=>{class n{getHref(){return jJ_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 _i(window,"popstate").pipe(L(e=>({pathname:this.getPath(),state:e.state})))}getResolvedPath(e){return new URL(e,jJ_getHref()).pathname}getFullPath(e,i,r){let o=this.getResolvedPath(e),s="";return i.length&&(s="?"+function(n){let t=new URLSearchParams;for(let{key:e,value:i}of n)t.append(e,i);return t}(i).toString()),`${o}${s}${r?this.getHash():""}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),Lm=(()=>{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)(j(Nm))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),X_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[Nm]}),n})(),Q_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[Lm],imports:[X_]}),n})(),m4=new pe("[App Routing] Dirty Updates"),AA=(()=>{class n{constructor(e){this.dirtyUpdatesSelectorFactories=e}getDirtyUpdatesSelectors(){return this.dirtyUpdatesSelectorFactories??[]}static registerDirtyUpdates(e){return{ngModule:n,providers:[{provide:m4,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(j(m4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),GJ=be("[App Routing] Discarding Unsaved Updates"),K_=be("[App Routing] State Rehydrated From Url",{_as:"props",_p:void 0}),IA=be("[App Routing] Route Config Loaded",{_as:"props",_p:void 0}),g4=be("[App Routing] In App Navigation Requested",{_as:"props",_p:void 0}),PA=be("[App Routing] In App Navigating",{_as:"props",_p:void 0}),Jl=be("[App Routing] In App Navigated",{_as:"props",_p:void 0}),_4=new pe("[App Routing] Programmatical Navigation Provider"),RA=(()=>{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:_4,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(j(_4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})();function EM(n){return null!=n.routeKind}function b4(n){return XJ(n).map(e=>{let i=e.startsWith(":");return i?{pathPart:e,isParam:!0,paramName:e.slice(1)}:{pathPart:e,isParam:i}})}var Z_=class{constructor(t){this.validateConfig(t),this.pathFragments=b4(t.path),this.pathMatchers=this.getPathMatchers(this.pathFragments)}static getMatcher(t){return EM(t)?new TM(t):function(n){return void 0!==n.redirectionPath}(t)?new v4(t):new y4(t)}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 s=r(t[i++]);if(!s.partMatched)return{result:!1};s.isParamPathPart&&(e={...e,[s.paramName]:s.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}},TM=class extends Z_{constructor(t){super(t),this.definition=t}},v4=class extends Z_{constructor(t){super(t),this.definition=t,this.redirectionFragments=b4(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}}},y4=class extends Z_{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}}},DM=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=Z_.getMatcher(i);this.configMatchers.push(r),r instanceof TM&&(this.routeKindToConcreteConfigMatchers.set(r.definition.routeKind,r),r.definition.defaultRoute&&(this.defaultRouteConfig=r))}}validateRouteConfigs(t){let e=t.filter(EM),i=e.filter(o=>o.defaultRoute);if(i.length>1){let o=i.map(({path:s})=>s).join(", ");throw new RangeError(`There are more than one defaultRoutes. ${o}`)}if(1===i.length){let{path:o}=i[0];if(Boolean(b4(o).find(({isParam:a})=>a)))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=XJ(t.pathname),i=0,r=!1;for(;;){let s=!1;for(let a of this.configMatchers){let l=a.match(e);if(l.result){s=!0;let{params:c,pathParts:u,isRedirection:d}=l;if(d){e=u,r=!0,o=l.redirectionQueryParams;break}if(!(a instanceof TM))throw new RangeError("No concrete route definition `match` return redirection");let{definition:p}=a,h={routeKind:p.routeKind,params:c,pathname:YJ(u),deepLinkProvider:p.deepLinkProvider||null,action:this.generateAction(p,u)};return r?{...h,originateFromRedirection:!0,redirectionOnlyQueryParams:o}:{...h,originateFromRedirection:!1}}}if(r&&i++,!s||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:s}=this.defaultRouteConfig;return{routeKind:s.routeKind,deepLinkProvider:s.deepLinkProvider??null,pathname:s.path,params:{},originateFromRedirection:!0,redirectionOnlyQueryParams:void 0,action:this.generateAction(s,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:YJ(r.pathParts),deepLinkProvider:i.definition.deepLinkProvider||null,originateFromRedirection:!1,action:this.generateAction(i.definition,r.pathParts)}}};function XJ(n){return n.split("/").slice(1)}function YJ(n){return"/"+n.join("/")}var x4=new pe("[App Routing] Route Config"),qc=(()=>{class n{constructor(e){if(this.routeKindToNgComponent=new Map,!e)return void(this.routeConfigs=new DM([]));let i=[];for(let r of e)for(let o of r)i.push(o);this.routeConfigs=new DM(i),i.forEach(r=>{EM(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:x4,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(j(x4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),OA="app_routing",AM=Mr(OA),Ra=J(AM,n=>n.activeRoute),ZJ=J(AM,n=>n.nextRoute),JJ=J(AM,n=>n.activeNamespaceId),$J=J(AM,n=>n.rehydratedDeepLinks),e$=J(AM,n=>n.registeredRouteKeys),qu=J(Ra,n=>n?n.routeKind:hi.NOT_SET),M4=J(Ra,n=>n?n.params:{}),Wo=J(qu,M4,(n,t)=>wM(n,t)),Yu=(J(qu,M4,(n,t)=>{if(n!==hi.COMPARE_EXPERIMENT)return{};let i=function(n){let t=new Map,e=SM(n.experimentIds);for(let{id:i,name:r}of e)r&&t.set(i,r);return t}(t);return Object.fromEntries(i.entries())}),J(qu,M4,(n,t)=>{if(n!==hi.COMPARE_EXPERIMENT)return{};let i=function(n){let t=new Map,e=SM(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}(t);return Object.fromEntries(i.entries())})),w4=be("[App Routing] Effects Init"),sa=(()=>(function(n){n[n.UNCHANGED=0]="UNCHANGED",n[n.NEW=1]="NEW",n[n.FROM_HISTORY=2]="FROM_HISTORY"}(sa||(sa={})),sa))(),t$=(()=>{class n{constructor(e,i,r,o,s,a,l){this.actions$=e,this.store=i,this.location=r,this.dirtyUpdatesRegistry=o,this.registry=s,this.programmaticalNavModule=a,this.appRootProvider=l,this.onNavigationRequested$=this.actions$.pipe(ii(g4),L(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?sa.NEW:sa.UNCHANGED}}}))),this.bootstrapReducers$=cr(()=>this.actions$.pipe(ii(w4),L(()=>IA({routeKinds:new Set(this.registry.getRegisteredRouteKinds())})))),this.onInit$=this.actions$.pipe(ii(w4)).pipe(Ol(0),L(()=>{let c=this.location.getHistoryState()?.namespaceId,u=void 0===c?{option:sa.NEW}:{option:sa.FROM_HISTORY,namespaceId:c};return{pathname:this.location.getPath(),options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:u}}})),this.onPopState$=this.location.onPopState().pipe(L(c=>({pathname:c.pathname,options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:void 0===c.state?.namespaceId?{option:sa.UNCHANGED}:{option:sa.FROM_HISTORY,namespaceId:c.state.namespaceId}}}))),this.userInitNavRoute$=Jt(this.onNavigationRequested$,this.onInit$,this.onPopState$).pipe(L(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)}}),L(c=>({routeMatch:this.routeConfigs.match(c),options:c.options}))),this.programmaticalNavRoute$=this.actions$.pipe(L(c=>this.programmaticalNavModule.getNavigation(c)),Ye(c=>null!==c),L(c=>{let f,u=c,{replaceState:d=!1,resetNamespacedState:p,routeKind:h}=u;return f=u.routeKind===hi.COMPARE_EXPERIMENT?{experimentIds:VJ(u.routeParams.aliasAndExperimentIds)}:u.routeParams,{replaceState:d,routeKind:h,routeParams:f,resetNamespacedState:p}}),L(({replaceState:c,routeKind:u,routeParams:d,resetNamespacedState:p})=>({routeMatch:this.routeConfigs?this.routeConfigs.matchByRouteKind(u,d):null,options:{replaceState:c,browserInitiated:!1,namespaceUpdate:{option:p?sa.NEW:sa.UNCHANGED}}}))),this.validatedRouteMatch$=Jt(this.userInitNavRoute$,this.programmaticalNavRoute$).pipe(Ye(({routeMatch:c})=>Boolean(c)),L(({routeMatch:c,options:u})=>({routeMatch:c,options:u}))),this.navigate$=cr(()=>this.validatedRouteMatch$.pipe(Wt(this.store.select(Ra)),xn(([d,p])=>{let h=null!==p&&Ps(p,d.routeMatch),f=this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors();return h||!f.length?Xt(d):lr(this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors().map(m=>this.store.select(m).pipe(Qt(1)))).pipe(L(m=>void 0!==m[0].experimentIds&&m[0].experimentIds.length>0),Ye(m=>{if(m){let x=window.confirm("You have unsaved edits, are you sure you want to discard them?");return x&&this.store.dispatch(GJ()),x}return!0}),L(()=>d))}),Wt(this.store.select($J)),kt(([{routeMatch:d,options:p},h])=>{if(!p.browserInitiated||!d.deepLinkProvider||p.namespaceUpdate.option===sa.FROM_HISTORY&&!DA(d.routeKind,p.namespaceUpdate.namespaceId,h))return;let f=d.originateFromRedirection&&d.redirectionOnlyQueryParams?d.redirectionOnlyQueryParams:this.location.getSearch(),m=d.deepLinkProvider.deserializeQueryParams(f);this.store.dispatch(K_({routeKind:d.routeKind,partialState:m}))}),kt(([{routeMatch:d}])=>{d.action&&this.store.dispatch(d.action)}),ui(([{routeMatch:d,options:p}])=>null===d.deepLinkProvider?Xt({route:{routeKind:d.routeKind,params:d.params},pathname:d.pathname,queryParams:[],options:p}):d.deepLinkProvider.serializeStateToQueryParams(this.store).pipe(L((h,f)=>({route:{routeKind:d.routeKind,params:d.params},pathname:d.pathname,queryParams:h,options:0===f?p:{...p,namespaceUpdate:{option:sa.UNCHANGED},replaceState:!0}})))),kt(({route:d})=>{this.store.dispatch(PA({after:d}))}),Hr(0)).pipe(Wt(this.store.select(Ra)),L(([d,p])=>{let h=null===p||null===d.route||Ps(p,d.route);return{...d,preserveHash:h}}),kt(({preserveHash:d,pathname:p,queryParams:h,options:f})=>{(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()})||(f.replaceState?this.location.replaceStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,h,d))):this.location.pushStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,h,d))))})).pipe(Wt(this.store.select(Ra),this.store.select(JJ)),L(([{route:d,options:p},h,f])=>{let m=function(n,t,e){return t.namespaceUpdate.option===sa.FROM_HISTORY?t.namespaceUpdate.namespaceId:null==e||t.namespaceUpdate.option===sa.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,f);return this.location.replaceStateData({...this.location.getHistoryState(),namespaceId:m}),Jl({before:h,after:d,beforeNamespaceId:f,afterNamespaceId:m})}))),this.routeConfigs=s.getRouteConfigs()}ngrxOnInitEffects(){return w4()}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(Nm),j(AA),j(qc),j(RA),j(Lm))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),k2e=vr({activeRoute:null,nextRoute:null,activeNamespaceId:null,rehydratedDeepLinks:[],registeredRouteKeys:new Set},Se(PA,(n,{after:t})=>({...n,nextRoute:t})),Se(Jl,(n,{after:t,afterNamespaceId:e})=>{let i=n.rehydratedDeepLinks;return DA(t.routeKind,e,i)&&(i=[...i],i.push({deepLinkGroup:p4(t.routeKind),namespaceId:e})),{...n,activeRoute:t,nextRoute:null,activeNamespaceId:e,rehydratedDeepLinks:i}}),Se(IA,(n,{routeKinds:t})=>({...n,registeredRouteKeys:t})));function n$(n,t){return k2e(n,t)}var J_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[AA,RA],imports:[qc,wr.forFeature(OA,n$),ro.forFeature([t$]),Q_,X_]}),n})(),i$="__tab__",r$=(()=>{class n{constructor(){this.tfStorage=document.createElement("tf-storage"),document.createElement("tf-globals").tf_globals.setUseHash(!0),this.tfStorage.tf_storage.migrateLegacyURLScheme()}getString(e){return this.tfStorage.tf_storage.getString(e)}setString(e,i,r){this.tfStorage.tf_storage.setString(e,i,r)}getPluginId(){return this.getString(i$)}setPluginId(e,i){this.setString(i$,e,i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),fh=class{},S4=new pe("[Persistent Settings] Global Settings"),Sr=(()=>{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:S4,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(j(S4,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Oa=(()=>(function(n){n.BROWSER_DEFAULT="browser_default",n.LIGHT="light",n.DARK="dark"}(Oa||(Oa={})),Oa))(),o$="_tb_global_settings.timeseries",s$="_tb_global_settings",a$="notificationLastReadTimestamp",kA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),FA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),E4=(()=>{class n extends FA{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),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(Oa)).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),i}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),l$=(()=>{class n{constructor(e){this.converter=e}setSettings(e){return Object.keys(e)?this.getSettings().pipe(kt(i=>{localStorage.setItem(s$,JSON.stringify(this.converter.uiToBackend({...i,...e}))),localStorage.removeItem(o$),localStorage.removeItem(a$)}),L(()=>{})):eo}deserialize(e){try{return JSON.parse(e)}catch{return{}}}getSettings(){let e=localStorage.getItem(a$);return Xt({...this.converter.backendToUi(this.deserialize(e?JSON.stringify({notificationLastReadTimeInMs:Number(e)}):"{}")),...this.converter.backendToUi(this.deserialize(localStorage.getItem(o$)??"{}")),...this.converter.backendToUi(this.deserialize(localStorage.getItem(s$)??"{}"))})}}return n.\u0275fac=function(e){return new(e||n)(j(FA))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),c$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:kA,useClass:l$},E4,{provide:FA,useExisting:E4}]}),n})(),Yc=be("[Persistent Settings] Global Settings Loaded",{_as:"props",_p:void 0}),u$=be("[Persistent Settings] Effects Init"),d$=(()=>{class n{constructor(e,i,r,o){this.actions$=e,this.store=i,this.configModule=r,this.dataSource=o,this.initializeAndUpdateSettings$=cr(()=>{let s=this.actions$.pipe(ii(u$),xn(()=>this.dataSource.getSettings()),kt(a=>{this.store.dispatch(Yc({partialSettings:a}))}),Ol(0),xn(()=>Jt(...this.configModule.getGlobalSettingSelectors().map(l=>this.store.select(l).pipe(yi((c,u)=>{let d=Object.values(c),p=Object.values(u);return d.length===p.length&&d.every((h,f)=>h===p[f])}),Za(1))))),Ts());return s.pipe(function(n){return en((t,e)=>{let i=[];return t.subscribe(jt(e,r=>i.push(r),()=>{e.next(i),e.complete()})),n.subscribe(jt(e,()=>{let r=i;i=[],e.next(r)},Mc)),()=>{i=null}})}(s.pipe(Hr(500))),xn(a=>{let l={};for(let c of a)Object.assign(l,c);return this.dataSource.setSettings(l)}))},{dispatch:!1})}ngrxOnInitEffects(){return u$()}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(Sr),j(kA))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),T4=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[Sr],imports:[ro.forFeature([d$]),c$]}),n})(),LA=class{},BA=class{},hl=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(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e],r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}: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 hl?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 hl;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof hl?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 s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}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)))}},V2e=/%(\d[a-f0-9])/gi,H2e={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function p$(n){return encodeURIComponent(n).replace(V2e,(t,e)=>H2e[e]??t)}function NA(n){return`${n}`}var Xu=class{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new class{encodeKey(t){return p$(t)}encodeValue(t){return p$(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("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,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(NA):[NA(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 Xu({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(NA(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(NA(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 h$(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function f$(n){return typeof Blob<"u"&&n instanceof Blob}function m$(n){return typeof FormData<"u"&&n instanceof FormData}var Bm=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 hl),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 s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{let a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":a<e.length-1?"&":"")+s}}else this.params=new Xu,this.urlWithParams=e}serializeBody(){return null===this.body?null:h$(this.body)||f$(this.body)||m$(this.body)||function(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof Xu?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||m$(this.body)?null:f$(this.body)?this.body.type||null:h$(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Xu?"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,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,c=t.params||this.params,u=t.context??this.context;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((d,p)=>d.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,p)=>d.set(p,t.setParams[p]),c)),new Bm(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}},mh=(()=>(function(n){n[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"}(mh||(mh={})),mh))(),PM=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new hl,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}},RM=class extends PM{constructor(t={}){super(t),this.type=mh.ResponseHeader}clone(t={}){return new RM({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})}},$_=class extends PM{constructor(t={}){super(t),this.type=mh.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new $_({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})}},np=class extends PM{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 D4(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 Vm=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Bm)o=e;else{let l,c;l=r.headers instanceof hl?r.headers:new hl(r.headers),r.params&&(c=r.params instanceof Xu?r.params:new Xu({fromObject:r.params})),o=new Bm(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 s=Xt(o).pipe(function(n,t){return En(t)?xn(n,t,1):xn(n,1)}(l=>this.handler.handle(l)));if(e instanceof Bm||"events"===r.observe)return s;let a=s.pipe(Ye(l=>l instanceof $_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(L(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(L(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(L(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(L(l=>l.body))}case"response":return a;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 Xu).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,D4(r,i))}post(e,i,r={}){return this.request("POST",e,D4(r,i))}put(e,i,r={}){return this.request("PUT",e,D4(r,i))}}return n.\u0275fac=function(e){return new(e||n)(j(LA))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),HA=new pe("HTTP_INTERCEPTORS"),j2e=(()=>{class n{intercept(e,i){return i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),G2e=/^\)\]\}',?\n/,g$=(()=>{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 un(i=>{let r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((h,f)=>r.setRequestHeader(h,f.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(),s=null,a=()=>{if(null!==s)return s;let h=r.statusText||"OK",f=new hl(r.getAllResponseHeaders()),m=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 s=new RM({headers:f,status:r.status,statusText:h,url:m}),s},l=()=>{let{headers:h,status:f,statusText:m,url:x}=a(),g=null;204!==f&&(g=typeof r.response>"u"?r.responseText:r.response),0===f&&(f=g?200:0);let b=f>=200&&f<300;if("json"===e.responseType&&"string"==typeof g){let D=g;g=g.replace(G2e,"");try{g=""!==g?JSON.parse(g):null}catch(T){g=D,b&&(b=!1,g={error:T,text:g})}}b?(i.next(new $_({body:g,headers:h,status:f,statusText:m,url:x||void 0})),i.complete()):i.error(new np({error:g,headers:h,status:f,statusText:m,url:x||void 0}))},c=h=>{let{url:f}=a(),m=new np({error:h,status:r.status||0,statusText:r.statusText||"Unknown Error",url:f||void 0});i.error(m)},u=!1,d=h=>{u||(i.next(a()),u=!0);let f={type:mh.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),"text"===e.responseType&&!!r.responseText&&(f.partialText=r.responseText),i.next(f)},p=h=>{let f={type:mh.UploadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),i.next(f)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",p)),r.send(o),i.next({type:mh.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",p)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(j(Em))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),O4=new pe("XSRF_COOKIE_NAME"),k4=new pe("XSRF_HEADER_NAME"),VA=class{},q2e=(()=>{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=qD(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(j(Ht),j(Gd),j(O4))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),A4=(()=>{class n{constructor(e,i){this.tokenService=e,this.headerName=i}intercept(e,i){let r=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||r.startsWith("http://")||r.startsWith("https://"))return i.handle(e);let o=this.tokenService.getToken();return null!==o&&!e.headers.has(this.headerName)&&(e=e.clone({headers:e.headers.set(this.headerName,o)})),i.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(j(VA),j(k4))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),Y2e=(()=>{class n{constructor(e,i){this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){let i=this.injector.get(HA,[]);this.chain=i.reduceRight((r,o)=>new class{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}(r,o),this.backend)}return this.chain.handle(e)}}return n.\u0275fac=function(e){return new(e||n)(j(BA),j(Xn))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),X2e=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:A4,useClass:j2e}]}}static withOptions(e={}){return{ngModule:n,providers:[e.cookieName?{provide:O4,useValue:e.cookieName}:[],e.headerName?{provide:k4,useValue:e.headerName}:[]]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[A4,{provide:HA,useExisting:A4,multi:!0},{provide:VA,useClass:q2e},{provide:O4,useValue:"XSRF-TOKEN"},{provide:k4,useValue:"X-XSRF-TOKEN"}]}),n})(),_$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[Vm,{provide:LA,useClass:Y2e},g$,{provide:BA,useExisting:g$}],imports:[X2e.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]}),n})(),UA="feature",ev=Mr(UA),gh=J(ev,n=>n.isFeatureFlagsLoaded),bs=J(ev,n=>({...n.defaultFlags,...n.flagOverrides})),y$=J(ev,n=>n.defaultFlags),zA=J(ev,n=>n.flagOverrides||{}),Hm=J(ev,n=>n.metadata),jA=J(ev,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}),b$=J(bs,n=>n.isAutoDarkModeAllowed),Qu=J(bs,n=>null!==n.enableDarkModeOverride?n.enableDarkModeOverride:n.defaultEnableDarkMode),GA=J(bs,n=>n.enableDarkModeOverride),x$=J(bs,n=>n.enabledExperimentalPlugins),C$=J(bs,n=>n.inColab),WA=J(bs,n=>n.metricsImageSupportEnabled),M$=J(bs,n=>n.enabledLinkedTime),w$=J(bs,n=>n.forceSvg),S$=J(bs,n=>n.enabledScalarDataTable),E$=J(bs,n=>n.enableShowFlags),T$=J(bs,n=>n.allowRangeSelection),D$=J(bs,n=>n.enabledProspectiveFob),qA=J(bs,n=>n.enableScalarColumnCustomization);function Q2e(n){let t={};for(let[e,i]of n.entries())t[e]=i;return t}function F4(n){let t=n.headers||new hl;return t=t.append("X-XSRF-Protected","1"),{...n,headers:t}}var ka=(()=>{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={}){return r=F4(r),this.store.select(gh).pipe(Ye(o=>Boolean(o)),Qt(1),Wt(this.store.select(C$)),xn(([,o])=>{let s=this.resolveAppRoot(e);return o?this.http.get(s,{headers:r.headers??{},params:Q2e(i)}):this.http.post(s,i,r)}))}put(e,i,r={}){return this.http.put(this.resolveAppRoot(e),i,F4(r))}delete(e,i={}){return this.http.delete(this.resolveAppRoot(e),F4(i))}}return n.\u0275fac=function(e){return new(e||n)(j(Lm),j(Vm),j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),Ku=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[ka],imports:[_$,Q_]}),n})(),$l=(()=>(function(n){n.UNKNOWN="UNKNOWN",n.NOT_FOUND="NOT_FOUND",n.PERMISSION_DENIED="PERMISSION_DENIED"}($l||($l={})),$l))(),A$=new pe("TensorBoard brand name"),Ro=(()=>(function(n){n.STEP="step",n.WALL_TIME="wall_time",n.RELATIVE="relative"}(Ro||(Ro={})),Ro))(),zr=(()=>(function(n){n.OFFSET="offset",n.OVERLAY="overlay"}(zr||(zr={})),zr))();function I$(n){let t=$l.UNKNOWN;return n instanceof np&&(404===n.status&&(t=$l.NOT_FOUND),403===n.status&&(t=$l.PERMISSION_DENIED)),wc(new OM(t))}var OM=class{constructor(t){this.failureCode=t}},YA=(()=>{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(fo(I$))}fetchEnvironment(){return lr([this.http.get("data/environment"),Eo(this.tfBackend.environmentStore.refresh())]).pipe(L(([r])=>r),fo(I$))}}return n.\u0275fac=function(e){return new(e||n)(j(ka))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),P$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[YA],imports:[Ku]}),n})(),Oe=(()=>(function(n){n[n.NOT_LOADED=0]="NOT_LOADED",n[n.LOADED=1]="LOADED",n[n.LOADING=2]="LOADING",n[n.FAILED=3]="FAILED"}(Oe||(Oe={})),Oe))(),Zu=be("[Core] Plugin Changed",{_as:"props",_p:void 0}),XA=be("[Core] Plugin Url Hash Changed",{_as:"props",_p:void 0}),R$=be("[Core] Loaded"),Fa=be("[Core] User Triggered Reload"),aa=be("[Core] Auto Reload"),QA=be("[Core] PluginListing Fetch Requested"),Um=be("[Core] PluginListing Fetch Successful",{_as:"props",_p:void 0}),kM=be("[Core] PluginListing Fetch Failed",{_as:"props",_p:void 0}),KA=be("[Core] Polymer Component Runs Fetch Requested"),ZA=be("[Core] Polymer Component Runs Fetch Successful"),JA=be("[Core] Polymer Component Runs Fetch Failed"),$A=be("[Core] Environment Fetch Successful",{_as:"props",_p:void 0}),O$=be("[Core] Run Selection Changed",{_as:"props",_p:void 0}),k$=be("[Core] Run Fetch Successful",{_as:"props",_p:void 0}),nv=be("[Core] Side Bar Width Changed",{_as:"props",_p:void 0});function zm(n,t,e){let i=Object.keys(n),r={...n,...t,privateNamespacedState:{}};return{initialState:r,reducers:vr(r,Se(Jl,(a,{before:l,after:c,beforeNamespaceId:u,afterNamespaceId:d})=>{let p=a;return u!==d&&(p=function(a,l,c){let u={...a.privateNamespacedState};if(l){let p={};for(let h of i)p[h]=a[h];u={...u,[l]:p}}let d={};return a.privateNamespacedState?.[c]?d=a.privateNamespacedState[c]:l&&(d=n),{...a,...d,privateNamespacedState:u}}(a,u,d)),e&&(p=e(p,l,c)),p}))}}function jm(...n){return(t,e)=>{let i=t;for(let r of n)i=r(i,e);return i}}var FM={activePlugin:null,plugins:{},coreDataLoadState:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},pluginsListLoaded:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null,failureCode:null},environment:{data_location:"",window_title:""},polymerRunsLoadState:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},polymerInteropRuns:[],polymerInteropRunSelection:new Set,sideBarWidthInPercent:20},$2e=vr(FM,Se(Zu,XA,(n,{plugin:t})=>({...n,activePlugin:t})),Se(QA,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Oe.LOADING},pluginsListLoaded:{...n.pluginsListLoaded,state:Oe.LOADING}})),Se(kM,(n,{failureCode:t})=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Oe.FAILED},pluginsListLoaded:{...n.pluginsListLoaded,state:Oe.FAILED,failureCode:t}})),Se(Um,(n,{plugins:t})=>{let e=Object.keys(t).find(s=>t[s].enabled)||null,i=n.activePlugin||e,r=Date.now(),o=n.coreDataLoadState;return n.polymerRunsLoadState.state===Oe.LOADED&&(o={state:Oe.LOADED,lastLoadedTimeInMs:r}),{...n,activePlugin:i,coreDataLoadState:o,plugins:t,pluginsListLoaded:{state:Oe.LOADED,lastLoadedTimeInMs:r,failureCode:null}}}),Se(KA,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Oe.LOADING},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Oe.LOADING}})),Se(ZA,n=>{let t=Date.now(),e=n.coreDataLoadState;return n.pluginsListLoaded.state===Oe.LOADED&&(e={state:Oe.LOADED,lastLoadedTimeInMs:t}),{...n,coreDataLoadState:e,polymerRunsLoadState:{...n.polymerRunsLoadState,state:Oe.LOADED,lastLoadedTimeInMs:t}}}),Se(JA,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Oe.FAILED},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Oe.FAILED}})),Se($A,(n,{environment:t})=>({...n,environment:t})),Se(k$,(n,{runs:t})=>({...n,polymerInteropRuns:t})),Se(O$,(n,{nextSelection:t})=>({...n,polymerInteropRunSelection:new Set(t)})),Se(nv,(n,{widthInPercent:t})=>({...n,sideBarWidthInPercent:Math.min(Math.max(0,t),100)})),Se(Yc,(n,{partialSettings:t})=>{let e={...n},i=t.sideBarWidthInPercent;return"number"==typeof i&&i>=0&&i<=100&&(e.sideBarWidthInPercent=i),e})),{reducers:ePe}=zm(FM,{});function F$(n,t){return jm($2e,ePe)(n,t)}var _h=Mr("core"),nI=J(_h,n=>n.pluginsListLoaded),N$=J(_h,n=>n.polymerRunsLoadState),L$=J(_h,n=>n.coreDataLoadState.state),iv=J(_h,n=>n.coreDataLoadState.lastLoadedTimeInMs),Rs=J(_h,n=>n.activePlugin),rv=J(_h,n=>n.plugins),ov=J(_h,n=>n.environment),iI=J(_h,n=>n.sideBarWidthInPercent),B$=new Set([hi.COMPARE_EXPERIMENT,hi.EXPERIMENT,hi.NOT_SET]),V$=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.webappDataSource=r,this.tfBackend={ref:document.createElement("tf-backend").tf_backend},this.onDashboardLoad$=Jt(this.actions$.pipe(ii(R$,Jl),Wt(this.store.select(Ra)),yi(([,o],[,s])=>Ps(o,s))),this.actions$.pipe(ii(aa,Fa))).pipe(Wt(this.store.select(qu)),Ye(([,o])=>B$.has(o)),b0(1,void 0,{leading:!0})),this.fetchWebAppData$=cr(()=>{let o=this.onDashboardLoad$.pipe(Wt(this.store.select(nI),this.store.select(x$)),Ye(([,{state:a}])=>a!==Oe.LOADING),kt(()=>this.store.dispatch(QA())),xn(([,,a])=>function(...n){let t=vu(n),e=m1(n);return e.length?new un(i=>{let r=e.map(()=>[]),o=e.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s<e.length;s++)gi(e[s]).subscribe(jt(i,a=>{if(r[s].push(a),r.every(l=>l.length)){let l=r.map(c=>c.shift());i.next(t?t(...l):l),r.some((c,u)=>!c.length&&o[u])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):eo}(this.webappDataSource.fetchPluginsListing(a),this.fetchEnvironment()).pipe(L(([l])=>{this.store.dispatch(Um({plugins:l}))}),fo(l=>(this.store.dispatch(kM(l instanceof OM?{failureCode:l.failureCode}:{failureCode:$l.UNKNOWN})),eo)))));return Jt(o,this.onDashboardLoad$.pipe(L(([,a])=>a),ui(a=>a!==hi.COMPARE_EXPERIMENT?Xt([]):this.store.select(Yu).pipe(yi((l,c)=>{let u=Object.entries(l),d=new Map(Object.entries(c));if(u.length!==d.size)return!1;for(let[p,h]of u)if(!d.get(p)||d.get(p).aliasText!==h.aliasText||d.get(p).aliasNumber!==h.aliasNumber)return!1;return!0}),Ol(0),b0(500,void 0,{leading:!0,trailing:!0}))),Wt(this.store.select(qu),this.store.select(N$)),Ye(([,a,l])=>B$.has(a)&&l.state!==Oe.LOADING),kt(()=>{this.store.dispatch(KA())}),ui(()=>this.refreshPolymerRuns()),kt(()=>{this.store.dispatch(ZA())}),fo(()=>(this.store.dispatch(JA()),eo))))},{dispatch:!1}),this.dispatchChangePlugin$=cr(()=>Jt(this.onDashboardLoad$,this.actions$.pipe(ii(Um))).pipe(Wt(this.store.select(Rs)),L(([,o])=>o),yi(),Ye(o=>null!==o),Qt(1),kt(o=>{this.store.dispatch(Zu({plugin:o}))})),{dispatch:!1})}refreshPolymerRuns(){return Eo(this.tfBackend.ref.runsStore.refresh())}fetchEnvironment(){return this.webappDataSource.fetchEnvironment().pipe(kt(e=>{this.store.dispatch($A({environment:e}))}))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(YA))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),N4=new pe("Core Feature Config");function H$(n){return{initialState:{...FM,activePlugin:n.getPluginId()||null}}}function iPe(){return J(iI,n=>({sideBarWidthInPercent:n}))}var ec=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:N4,deps:[fh],useFactory:H$}],imports:[ro.forFeature([V$]),wr.forFeature("core",F$,N4),P$,Sr.defineGlobalSetting(iPe)]}),n})(),U$=new pe("[Alert] Action-To-Alert Provider"),Ju=(()=>{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:U$,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(j(U$,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),rI=be("[Runs] Fetch Runs Requested",{_as:"props",_p:void 0}),vh=be("[Runs] Fetch Runs Succeeded",{_as:"props",_p:void 0}),sv=be("[Runs] Fetch Runs Failed",{_as:"props",_p:void 0}),oI=be("[Runs] Run Selection Toggled",{_as:"props",_p:void 0}),sI=be("[Runs] Single Run Selected",{_as:"props",_p:void 0}),aI=be("[Runs] Run Page Selection Toggled",{_as:"props",_p:void 0}),lI=be("[Runs] Run Selector Pagination Option Changed",{_as:"props",_p:void 0}),cI=be("[Runs] Run Selector Sort Changed",{_as:"props",_p:void 0}),NM=be("[Runs] Run Selector Regex Filter Changed",{_as:"props",_p:void 0}),uI=be("[Runs] Run Color Changed",{_as:"props",_p:void 0}),dI=be("[Runs] Run Table Shown",{_as:"props",_p:void 0}),av=be("[Runs] Run Group By Changed",{_as:"props",_p:void 0}),Ci=(()=>(function(n){n[n.DISCRETE=0]="DISCRETE",n[n.INTERVAL=1]="INTERVAL"}(Ci||(Ci={})),Ci))(),pI=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Gm={};BE(Gm,{hparamsDiscreteHparamFilterChanged:()=>V4,hparamsIntervalHparamFilterChanged:()=>H4,hparamsMetricFilterChanged:()=>U4});var V4=be("[Hparams] Hparams Discrete Hparam Filter Changed",{_as:"props",_p:void 0}),H4=be("[Hparams] Hparams Interval Hparam Filter Changed",{_as:"props",_p:void 0}),U4=be("[Hparams] Hparams Metric Filter Changed",{_as:"props",_p:void 0});function Wm(n){return JSON.stringify([...n].sort())}function LM(n){let t=new Map,e=new Map,i=new Map;for(let r of n)for(let[o,s]of r)if(s.type===Ci.DISCRETE){let{possibleValues:a,values:l}=e.get(o)||{possibleValues:new Set,values:new Set};for(let c of s.filterValues)l.add(c);for(let c of s.possibleValues)a.add(c);e.set(o,{possibleValues:a,values:l})}else{let a=i.get(o);i.set(o,{filterLowerValue:Math.min(s.filterLowerValue,a?.filterLowerValue??1/0),filterUpperValue:Math.max(s.filterUpperValue,a?.filterUpperValue??-1/0),minValue:Math.min(s.minValue,a?.minValue??1/0),maxValue:Math.max(s.maxValue,a?.maxValue??-1/0)})}for(let[r,{values:o,possibleValues:s}]of e)t.set(r,{type:Ci.DISCRETE,includeUndefined:!0,possibleValues:[...s],filterValues:[...o]});for(let[r,{minValue:o,maxValue:s,filterLowerValue:a,filterUpperValue:l}]of i){if(t.has(r)){let c=t.get(r);if(c.type===Ci.DISCRETE&&c.possibleValues.some(u=>u))throw new RangeError(`Cannot combine hparam, ${r}, as it is of mixed types.`)}t.set(r,{type:Ci.INTERVAL,includeUndefined:!0,minValue:o,maxValue:s,filterLowerValue:a,filterUpperValue:l})}return t}function hI(n){let t=new Map;for(let e of n)for(let[i,r]of e){let o=t.get(i);t.set(i,{type:Ci.INTERVAL,includeUndefined:!0,...o,minValue:Math.min(r.minValue,o?.minValue??1/0),maxValue:Math.max(r.maxValue,o?.maxValue??-1/0),filterLowerValue:Math.min(r.filterLowerValue,o?.filterLowerValue??1/0),filterUpperValue:Math.max(r.filterUpperValue,o?.filterUpperValue??-1/0)})}return t}var lPe=vr({specs:{},filters:{}},Se(V4,(n,t)=>{let{experimentIds:e,hparamName:i,filterValues:r,includeUndefined:o}=t,s=Wm(e),a=n.filters[s]??{hparams:new Map},l=a.hparams.get(i);if(l&&l.type!==Ci.DISCRETE)throw new RangeError(`New discrete filter of ${i} conflicts existing filter of `+Ci[l.type]);let c=LM(e.filter(h=>Boolean(n.specs[h])).map(h=>n.specs[h].hparam.defaultFilters)).get(i);if(!c)throw new Error(`Cannot set hparam, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);if(c.type!==Ci.DISCRETE)throw new Error(`Cannot set ${i} when default filter is not of discrete type.`);let u=new Set(c.possibleValues),d=[...r].filter(h=>!u.has(h));if(d.length)throw new Error(`New filter for ${i} has more than one value that is not present in the spec. Bad values: ${d.join(", ")}`);let p=new Map(a.hparams);return p.set(i,{...l,type:Ci.DISCRETE,includeUndefined:o,possibleValues:[...u],filterValues:r}),{...n,filters:{...n.filters,[s]:{...a,hparams:p}}}}),Se(H4,(n,t)=>{let{experimentIds:e,hparamName:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=t,a=Wm(e),l=n.filters[a]??{metrics:new Map,hparams:new Map},c=l.hparams.get(i);if(c&&c.type!==Ci.INTERVAL)throw new RangeError(`New interval filter of ${i} conflicts existing filter of `+Ci[c.type]);let u=LM(e.filter(p=>Boolean(n.specs[p])).map(p=>n.specs[p].hparam.defaultFilters)).get(i);if(!u)throw new Error(`Cannot set hpara, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);if(u.type!==Ci.INTERVAL)throw new Error(`Cannot set ${i} when default filter is not of interval type.`);let d=new Map(l.hparams);return d.set(i,{...c,type:Ci.INTERVAL,includeUndefined:s,minValue:u.minValue,maxValue:u.maxValue,filterLowerValue:r,filterUpperValue:o}),{...n,filters:{...n.filters,[a]:{...l,hparams:d}}}}),Se(U4,(n,t)=>{let{experimentIds:e,metricTag:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=t,a=Wm(e),l=n.filters[a]??{metrics:new Map,hparams:new Map},c=hI(e.filter(p=>Boolean(n.specs[p])).map(p=>n.specs[p].metric.defaultFilters)).get(i);if(!c)throw new Error(`Cannot set metric, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);let u=l.metrics.get(i),d=new Map(l.metrics);return d.set(i,{...u,type:Ci.INTERVAL,includeUndefined:s,minValue:c.minValue,maxValue:c.maxValue,filterLowerValue:r,filterUpperValue:o}),{...n,filters:{...n.filters,[a]:{...l,metrics:d}}}}),Se(vh,(n,t)=>{if(0===Object.keys(t.newRunsAndMetadata).length)return n;let e={...n.specs},i=new Map,r=new Set;for(let o of Object.keys(t.newRunsAndMetadata)){let s=new Map,a=new Map,l=new Map,c=new Map,{runs:u,metadata:d}=t.newRunsAndMetadata[o];for(let p of u){let h=d.runToHparamsAndMetrics[p.id];if(h)for(let f of h.metrics){let m=i.get(f.tag);i.set(f.tag,{min:m?Math.min(m.min,f.value):f.value,max:m?Math.max(m.max,f.value):f.value})}}for(let{name:p,domain:h}of d.hparamSpecs)if(h.type===Ci.DISCRETE){let f=l.get(p)||new Set;for(let m of h.values)f.add(m);l.set(p,f)}else{let f=c.get(p);c.set(p,{minValue:f?Math.min(h.minValue,f.minValue):h.minValue,maxValue:f?Math.max(h.maxValue,f.maxValue):h.maxValue})}for(let p of d.metricSpecs)r.add(p.tag);for(let[p,h]of l)s.set(p,{type:Ci.DISCRETE,includeUndefined:!0,possibleValues:[...h],filterValues:[...h]});for(let[p,{minValue:h,maxValue:f}]of c)s.set(p,{type:Ci.INTERVAL,includeUndefined:!0,minValue:h,maxValue:f,filterLowerValue:h,filterUpperValue:f});for(let p of r){let h=i.get(p),f=h?.min??0,m=h?.max??0;a.set(p,{type:Ci.INTERVAL,includeUndefined:!0,minValue:f,maxValue:m,filterLowerValue:f,filterUpperValue:m})}e[o]={hparam:{...e[o]?.hparam,specs:d.hparamSpecs,defaultFilters:s},metric:{...e[o]?.metric,specs:d.metricSpecs,defaultFilters:a}}}return{...n,specs:e}}));function z$(n,t){return lPe(n,t)}var fI="hparams",j$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[wr.forFeature(fI,z$)]}),n})(),mI=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[j$]}),n})();function cPe(n,t){return`${t}/${n}`}var G$=(()=>{class n{constructor(e){this.http=e}fetchRuns(e){return this.http.get("data/runs").pipe(L(i=>i.map(r=>({id:cPe(r,e),name:r,startTime:0}))))}fetchHparamsMetadata(e){return Xt({hparamSpecs:[],metricSpecs:[],runToHparamsAndMetrics:{}})}}return n.\u0275fac=function(e){return new(e||n)(j(ka))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),W$=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:pI,useClass:G$}]}),n})(),q$=J(Mr("alerts"),n=>n.latestAlert),_I="experiments",pPe=J(Mr(_I),n=>n.data),vI=J(pPe,(n,t)=>{let{experimentId:e}=t;return n.experimentMap[e]||null}),ri=(()=>(function(n){n.SCALARS="scalars",n.HISTOGRAMS="histograms",n.IMAGES="images"}(ri||(ri={})),ri))(),Ji=(()=>(function(n){n[n.STEP=0]="STEP",n[n.RELATIVE=1]="RELATIVE",n[n.WALL_TIME=2]="WALL_TIME"}(Ji||(Ji={})),Ji))(),BM="timeseries";function X$(n){return n===ri.SCALARS||n===ri.HISTOGRAMS||n===ri.IMAGES}var hPe=[ri.IMAGES];function fl(n){return hPe.includes(n)}var fPe=[ri.HISTOGRAMS,ri.IMAGES];function ml(n){return fPe.includes(n)}function z4(n){return ml(n.plugin)}var $u=class{};function bI(n){return n.hasOwnProperty("error")}var j4="data/plugin/timeseries";function Q$(n){let t=n.indexOf("/");return{run:n.substring(t+1),experimentId:n.substring(0,t)}}function Z$(n,t){return`${t}/${n}`}function K$(n,t){let{runToSeries:e,run:i,...r}=n,o={...r};return e&&(o.runToSeries=G4(e,t)),i&&(o.runId=Z$(i,t)),o}function G4(n,t){let e={};for(let i in n)n.hasOwnProperty(i)&&(e[Z$(i,t)]=n[i]);return e}var J$=(()=>{class n{constructor(e,i){this.http=e,this.store=i}fetchTagMetadata(e){let i=e.map(o=>this.http.get(`/experiment/${o}/${j4}/tags`).pipe(L(a=>function(n,t){let e={};for(let i of Object.keys(n)){let r=i;if(fl(r)){let{tagRunSampledInfo:o,...s}=n[r],a={};for(let l in o)o.hasOwnProperty(l)&&(a[l]=G4(o[l],t));e[r]={...s,tagRunSampledInfo:a}}else{let{runTagInfo:o,...s}=n[r];e[r]={...s,runTagInfo:G4(o,t)}}}return e}(a,o)))),r=this.store.select(gh).pipe(Ye(Boolean),Qt(1),Wt(this.store.select(WA)),L(([,o])=>o));return lr(i).pipe(Wt(r),L(([o,s])=>{let a=function(n){let t={};for(let e of n)for(let i of Object.values(ri))if(fl(i)){t[i]=t[i]||{tagDescriptions:{},tagRunSampledInfo:{}};let{tagDescriptions:r,tagRunSampledInfo:o}=e[i];t[i].tagDescriptions={...t[i].tagDescriptions,...r};let s=t[i].tagRunSampledInfo;for(let a of Object.keys(o)){s[a]=s[a]||{};for(let l of Object.keys(o[a]))s[a][l]=o[a][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 s||(a[ri.IMAGES]={tagDescriptions:{},tagRunSampledInfo:{}}),a}))}fetchTimeSeries(e){let i=e.map(r=>{if(ml(r.plugin)){let{runId:l,...c}=r,{run:u,experimentId:d}=Q$(l),p={...c,run:u};return this.fetchTimeSeriesBackendRequest(p,d).pipe(L(({response:h,experimentId:f})=>K$(h,f)))}let{experimentIds:o,...s}=r;return lr(o.map(l=>this.fetchTimeSeriesBackendRequest(s,l))).pipe(L(l=>{let{runToSeries:c,error:u,...d}=l[0].response,p=d;for(let{response:h,experimentId:f}of l){let m=K$(h,f);if(p.error)continue;let{runToSeries:x,error:g}=m;if(g)p.error=g,p.runToSeries=void 0;else{p.runToSeries=p.runToSeries||{};for(let b of Object.keys(x))p.runToSeries[b]=x[b]}}return p}))});return lr(i)}fetchTimeSeriesBackendRequest(e,i){let r=new FormData;return r.append("requests",JSON.stringify([e])),this.http.post(`/experiment/${i}/${j4}/timeSeries`,r).pipe(L(o=>({response:o[0],experimentId:i})))}imageUrl(e){return`${j4}/imageData?imageId=${e}`}downloadUrl(e,i,r,o){let l,{run:s,experimentId:a}=Q$(r);if(e!==ri.SCALARS)throw new Error(`Not implemented: downloadUrl for ${e} is not implemented yet`);if(l="scalars/scalars",!a)throw new Error("experimentId is empty; it is required to form downloadUrl.");return`/experiment/${a}/data/plugin/scalars/scalars?${new URLSearchParams({tag:i,run:s,format:o})}`}}return n.\u0275fac=function(e){return new(e||n)(j(ka),j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),vPe=new URLSearchParams(window.location.search),xI=(()=>{class n{getParams(){return vPe}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),VM="tb_feature_flag_storage_key",W4=(()=>{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(([a])=>i[a])),...o}}persistFeatureFlags(e){let r={...this.getPersistentFeatureFlags(),...e};localStorage.setItem(VM,JSON.stringify(r))}resetPersistedFeatureFlag(e){let i=this.getPersistentFeatureFlags();if(null!=i[e]){if(delete i[e],0===Object.keys(i).length)return void localStorage.removeItem(VM);localStorage.setItem(VM,JSON.stringify(i))}}resetAllPersistedFeatureFlags(){localStorage.removeItem(VM)}getPersistentFeatureFlags(){let e=localStorage.getItem(VM);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)(j(xI))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),CI=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),tee=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[W4,xI,{provide:CI,useClass:W4}]}),n})(),HM=be("[FEATURE FLAG] Partial Feature Flags Loaded",{_as:"props",_p:void 0}),MI=be("[FEATURE FLAG] Enable Dark Mode Override Changed",{_as:"props",_p:void 0}),qm=be("[FEATURE FLAG] Store the feature flags in persistent localStorage",{_as:"props",_p:void 0}),yh=be("[FEATURE FLAG] Reset feature flag overrides",{_as:"props",_p:void 0}),lv=be("[FEATURE FLAG] Reset all feature flag overrides"),q4="_tb_force_svg",wI=(()=>{class n{constructor(){}getForceSvgFlag(){return!!localStorage.getItem(q4)}updateForceSvgFlag(e){e?localStorage.setItem(q4,"present"):localStorage.removeItem(q4)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),nee=be("[FEATURE FLAG] Effects Init"),iee=(()=>{class n{constructor(e,i,r,o){this.actions$=e,this.store=i,this.dataSource=r,this.forceSvgDataSource=o,this.tfFeatureFlags={ref:document.createElement("tf-feature-flags").tf_feature_flags},this.getFeatureFlags$=cr(()=>this.actions$.pipe(ii(nee),fr(this.store.select(b$),this.store.select(Hm)),L(([,s,a])=>{let l=this.dataSource.getFeatures(s,a);return null!=l.forceSvg?this.forceSvgDataSource.updateForceSvgFlag(l.forceSvg):this.forceSvgDataSource.getForceSvgFlag()&&(l.forceSvg=!0),HM({features:l})}))),this.updatePolymerFeatureFlags$=cr(()=>this.actions$.pipe(ii(HM),Wt(this.store.select(bs),this.store.select(jA)),kt(([,s,a])=>{this.tfFeatureFlags.ref.setFeatureFlags(s,a)})),{dispatch:!1}),this.storeFeatureFlag$=cr(()=>this.actions$.pipe(ii(qm),kt(({flags:s})=>{this.dataSource.persistFeatureFlags(s)})),{dispatch:!1}),this.resetFeatureFlagOverrides$=cr(()=>this.actions$.pipe(ii(yh),kt(({flags:s})=>{s.forEach(a=>{this.dataSource.resetPersistedFeatureFlag(a)})})),{dispatch:!1}),this.resetAllFeatureFlagOverrides$=cr(()=>this.actions$.pipe(ii(lv),kt(()=>{this.dataSource.resetAllPersistedFeatureFlags()})),{dispatch:!1})}ngrxOnInitEffects(){return nee()}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(CI),j(wI))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ree=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[wI]}),n})(),see=(()=>{class n{constructor(e){this.store=e}intercept(e,i){return this.store.pipe(vt(jA),function(n,t){let e=arguments.length>=2;return i=>i.pipe(n?Ye((r,o)=>n(r,o,i)):ms,Qt(1),e?_1(t):v1(()=>new _0))}(),ui(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)(j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})();function ip(n){return"false"!==n}var Y4={scalarsBatchSize:{defaultValue:void 0,queryParamOverride:"scalarsBatchSize",parseValue:parseInt},enabledExperimentalPlugins:{defaultValue:[],queryParamOverride:"experimentalPlugin",parseValue:function(n){return n?n.split(","):[]}},enabledLinkedTime:{defaultValue:!0,queryParamOverride:"enableLinkedTime",parseValue:ip},enabledScalarDataTable:{defaultValue:!0,queryParamOverride:"enableDataTable",parseValue:ip},forceSvg:{defaultValue:!1,queryParamOverride:"forceSVG",parseValue:ip},enableDarkModeOverride:{defaultValue:null,queryParamOverride:null},defaultEnableDarkMode:{defaultValue:!1,queryParamOverride:"darkMode",parseValue:ip},isAutoDarkModeAllowed:{defaultValue:!0,queryParamOverride:null},inColab:{defaultValue:!1,queryParamOverride:"tensorboardColab",parseValue:ip},metricsImageSupportEnabled:{defaultValue:!0,queryParamOverride:null},enableShowFlags:{defaultValue:!1,queryParamOverride:"showFlags",parseValue:ip},allowRangeSelection:{defaultValue:!0,queryParamOverride:"allowRangeSelection",parseValue:ip},enabledProspectiveFob:{defaultValue:!0,queryParamOverride:"enableProspectiveFob",parseValue:ip},enableScalarColumnCustomization:{defaultValue:!1,queryParamOverride:"enableScalarColumnCustomization",parseValue:ip}},X4={isFeatureFlagsLoaded:!1,defaultFlags:function(n){return Object.entries(n).reduce((t,[e,i])=>(t[e]=i.defaultValue,t),{})}(Y4),metadata:Y4,flagOverrides:{}},Q4=new pe("[Feature Flag] Store Config");function lee(){return{initialState:X4}}var EPe=vr(X4,Se(HM,(n,{features:t})=>({...n,isFeatureFlagsLoaded:!0,flagOverrides:{...n.flagOverrides,...t}})),Se(MI,(n,{enableDarkMode:t})=>({...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:t}})),Se(qm,(n,t)=>({...n,flagOverrides:{...n.flagOverrides,...t.flags}})),Se(yh,(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}}),Se(lv,n=>({...n,flagOverrides:{}})),Se(Yc,(n,{partialSettings:t})=>{if(!t.themeOverride)return n;let e;switch(t.themeOverride){case Oa.BROWSER_DEFAULT:e=null;break;case Oa.DARK:e=!0;break;case Oa.LIGHT:e=!1}return{...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:e}}}));function cee(n,t){return EPe(n,t)}function TPe(){return J(GA,n=>null===n?{themeOverride:Oa.BROWSER_DEFAULT}:{themeOverride:n?Oa.DARK:Oa.LIGHT})}var cv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:Q4,useFactory:lee},{provide:HA,useClass:see,multi:!0}],imports:[ree,tee,wr.forFeature(UA,cee,Q4),ro.forFeature([iee]),Sr.defineGlobalSetting(TPe)]}),n})(),SI=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:$u,useClass:J$}],imports:[cv,Ku]}),n})();function rp(n,t,e,i){return n[t].hasOwnProperty(e)?fl(t)?n[t][e].hasOwnProperty(i)?n[t][e][i]:null:n[t][e]:null}function EI(n,t,e,i){if(fl(t)){let s={...n[t]},a=function(n,t,e){let r=n.hasOwnProperty(t)?{...n[t]}:{},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}(s,e,i);return s[e]=a,s}let r={...n[t]},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}function pee(n){return JSON.stringify(n)}function TI(n,t,e){let i={...e};for(let r of t)i[r]=n;return i}function uv(n,t,e,i){if(fl(t)){let o=n[t].tagRunSampledInfo;return o.hasOwnProperty(e)?Object.keys(o[e]).filter(a=>i<o[e][a].maxSamplesPerStep):[]}let r=n[t].tagToRuns;return r.hasOwnProperty(e)?r[e]:[]}function PPe(n,t){return n.plugin===t.plugin&&n.tag===t.tag&&n.sample===t.sample&&(n.runId===t.runId||!n.runId&&!t.runId)}function K4(n,t,e,i,r,o,s){let a=new Set(n),l=[];for(let u of n)for(let d of t)if(PPe(e[d],u)){l.push(d),a.delete(u);break}if(!l.length)return{unresolvedImportedPinnedCards:n,cardMetadataMap:e,cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:s};let c={cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:s,cardMetadataMap:e};for(let u of l)c=Z4(u,c.cardToPinnedCopy,c.cardToPinnedCopyCache,c.pinnedCardToOriginal,c.cardStepIndex,c.cardMetadataMap);return{...c,unresolvedImportedPinnedCards:[...a]}}function Z4(n,t,e,i,r,o){if(t.has(n))return{cardToPinnedCopy:t,cardToPinnedCopyCache:e,pinnedCardToOriginal:i,cardStepIndex:r,cardMetadataMap:o};let s=new Map(t),a=new Map(e),l=new Map(i),c={...r},u={...o},d=function(n){return JSON.stringify({baseCardId:n})}(n);s.set(n,d),a.set(n,d),l.set(d,n),r.hasOwnProperty(n)&&(c[d]=r[n]);let p=o[n];if(!p)throw new Error("Cannot pin a card without metadata");return u[d]=p,{cardToPinnedCopy:s,cardToPinnedCopyCache:a,pinnedCardToOriginal:l,cardStepIndex:c,cardMetadataMap:u}}function DI(n){return n.pinnedCardToOriginal.size+n.unresolvedImportedPinnedCards.length<10}function J4(n,t,e,i){let r={...n};return Object.keys(n).forEach(o=>{if(!o.includes('"plugin":"images"'))return;let s=$4(o,t,e),a=null;if(null===i.end)a=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],s=.1*(o-r);if(n<r)return null;if(!(n>o)){if(n-r<=s)return{index:i,isClosest:!0};if(o-n<=s)return{index:i+1,isClosest:!0}}}return null}(i.start.step,s);else{let c=s[n[o].index],u=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,s);a=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}(u,s,c)}null!==a&&(r[o]=a)}),r}function $4(n,t,e){if(!t.hasOwnProperty(n))return[];let{plugin:i,tag:r,sample:o,runId:s}=t[n];if(null===s)return[];let a=rp(e,i,r,o);return null!==a&&a.runToSeries.hasOwnProperty(s)?a.runToSeries[s].map(l=>l.step):[]}var 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))(),AI="metrics",II={cardMinWidth:null,tooltipSort:Oo.ALPHABETICAL,ignoreOutliers:!0,xAxisType:Ji.STEP,scalarSmoothing:.6,scalarPartitionNonMonotonicX:!1,imageBrightnessInMilli:1e3,imageContrastInMilli:1e3,imageShowActualSize:!1,histogramMode:zr.OFFSET},ur=Mr(AI),UM=J(ur,n=>n.tagMetadataLoadState),LPe=(J(ur,n=>n.tagMetadata),J(ur,n=>n.cardList)),bh=J(ur,(n,t)=>{if(!n.cardMetadataMap.hasOwnProperty(t))return Oe.NOT_LOADED;let{plugin:e,tag:i,runId:r,sample:o}=n.cardMetadataMap[t],s=rp(n.timeSeriesData,e,i,o);if(!s)return Oe.NOT_LOADED;let a=s.runToLoadState;if(r)return a.hasOwnProperty(r)?a[r]:Oe.NOT_LOADED;let l=uv(n.tagMetadata,e,i,o);if(!l.length)throw new Error("Cannot load a card whose tag has no runs");return l.every(c=>a[c]===Oe.LOADED)?Oe.LOADED:l.some(c=>a[c]===Oe.LOADING)?Oe.LOADING:Oe.NOT_LOADED}),xh=J(ur,(n,t)=>{if(!n.cardMetadataMap.hasOwnProperty(t))return null;let{plugin:e,tag:i,sample:r}=n.cardMetadataMap[t],o=rp(n.timeSeriesData,e,i,r);return o?o.runToSeries:null}),eH=J(ur,n=>n.cardMetadataMap),tc=J(eH,(n,t)=>n.hasOwnProperty(t)?n[t]:null),BPe=J(ur,n=>n.visibleCardMap),mee=J(BPe,n=>new Set(n.values())),PI=J(LPe,eH,(n,t)=>n.filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),tH=J(ur,(n,t)=>n.cardStepIndex.hasOwnProperty(t)?n.cardStepIndex[t]:null),gee=J(ur,(n,t)=>$4(t,n.cardMetadataMap,n.timeSeriesData)),_ee=J(ur,n=>n.cardToPinnedCopy),VPe=J(ur,n=>n.pinnedCardToOriginal),zM=J(_ee,eH,(n,t)=>[...n.values()].filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),Ch=J(_ee,VPe,(n,t,e)=>n.has(e)||t.has(e)),vee=J(ur,n=>n.unresolvedImportedPinnedCards),yee=J(ur,n=>DI(n)),ed=J(ur,n=>({...n.settings,...n.settingOverrides})),bee=J(ur,n=>n.settingOverrides),dv=J(ed,n=>n.cardMinWidth),pv=J(ed,n=>n.tooltipSort),hv=J(ed,n=>n.ignoreOutliers),td=J(ed,n=>n.xAxisType),RI=J(ed,n=>n.histogramMode),op=J(ed,n=>n.scalarSmoothing),OI=J(ed,n=>n.scalarPartitionNonMonotonicX),kI=J(ed,n=>n.imageBrightnessInMilli),FI=J(ed,n=>n.imageContrastInMilli),NI=J(ed,n=>n.imageShowActualSize),Xc=J(ur,n=>n.tagFilter),LI=J(ur,(n,t)=>Boolean(n.tagGroupExpanded.get(t))),Ym=J(ur,n=>n.linkedTimeEnabled),fv=J(ur,n=>n.stepSelectorEnabled),mv=J(ur,n=>n.rangeSelectionEnabled),nH=J(ur,n=>{let{min:t,max:e}=n.stepMinMax;return{min:t===1/0?0:t,max:e===-1/0?1e3:e}}),BI=J(ur,n=>n.singleSelectionHeaders),VI=J(ur,n=>n.rangeSelectionHeaders),iH=J(ur,nH,(n,t)=>n.linkedTimeSelection?n.linkedTimeSelection:{start:{step:t.min},end:null}),Xm=J(ur,iH,(n,t)=>n.linkedTimeEnabled?t:null),nd=J(ur,n=>n.filteredPluginTypes),HI=J(ur,n=>n.isSettingsPaneOpen),UI=J(ur,n=>n.isSlideoutMenuOpen),Cee=Mr("notification"),id=(J(Cee,n=>n.notifications),J(Cee,n=>n.lastReadTimestampInMs??-1),(()=>(function(n){n[n.EXPERIMENT_NAME=0]="EXPERIMENT_NAME",n[n.HPARAM=1]="HPARAM",n[n.METRIC=2]="METRIC",n[n.RUN_NAME=3]="RUN_NAME"}(id||(id={})),id))()),sr=(()=>(function(n){n[n.RUN=0]="RUN",n[n.EXPERIMENT=1]="EXPERIMENT",n[n.REGEX=2]="REGEX"}(sr||(sr={})),sr))();function GM(n,t,e){let i={},r=[],o={matches:i,nonMatches:r};switch(n.key){case sr.RUN:for(let a of t)i[a.id]=[a];break;case sr.EXPERIMENT:for(let a of t){let l=e[a.id],c=i[l]||[];c.push(a),i[l]=c}break;case sr.REGEX:if(!n.regexString)break;let s;try{s=new RegExp(n.regexString)}catch{break}for(let a of t){let l=a.name.match(s);if(l){let u=l.length>1?JSON.stringify(l.slice(1)):"pseudo_group",d=i[u]||[];d.push(a),i[u]=d}else r.push(a)}}return o}function jI(n,t){return n===sr.REGEX?{key:n,regexString:t??""}:{key:n}}var Mee=Mr("runs"),gl=J(Mee,n=>n.data),wee=J(gl,n=>n.runIdToExpId),GI=J(gl,(n,t)=>n.runIdToExpId[t.runId]??null),WI=J(gl,(n,t)=>n.runMetadata[t.runId]??null),rd=J(gl,(n,t)=>(n.runIds[t.experimentId]||[]).filter(i=>Boolean(n.runMetadata[i])).map(i=>n.runMetadata[i])),See=J(gl,(n,t)=>n.runIds[t.experimentId]??[]),qI=J(gl,n=>new Map(Object.entries(n.runMetadata))),WM=J(gl,(n,t)=>n.runsLoadState[t.experimentId]||{lastLoadedTimeInMs:null,state:Oe.NOT_LOADED}),rH=J(gl,n=>null!==n.userSetGroupByKey?jI(n.userSetGroupByKey,n.colorGroupRegexString):null),Eee=J(rH,gl,(n,t)=>n??t.initialGroupBy),Qm=J(gl,n=>n.regexFilter),oH=J(Mee,n=>n.ui),sH=J(oH,n=>n.paginationOption),aH=J(oH,n=>n.sort),Tee=J(oH,n=>n.selectionState),Dee=J(gl,n=>n.runColorOverrideForGroupBy),Aee=J(gl,n=>n.defaultRunColorIdForGroupBy),YI=J(gl,n=>n.colorGroupRegexString),XI=be("[Settings] Reload Enable Toggled"),QI=be("[Settings] Reload Period Change",{_as:"props",_p:void 0}),KI=be("[Settings] Page Size Change",{_as:"props",_p:void 0}),Na={};BE(Na,{getColorPalette:()=>HPe,getPageSize:()=>Km,getReloadEnabled:()=>YM,getReloadPeriodInMs:()=>XM,getSettingsLoadState:()=>lH});var ZI="settings",Ree={state:Oe.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"}}}},qM=Mr(ZI),lH=J(qM,n=>n.state),YM=J(qM,n=>n.settings.reloadEnabled),XM=J(qM,n=>n.settings.reloadPeriodInMs),Km=J(qM,n=>n.settings.pageSize),HPe=J(qM,n=>n.settings.colorPalette);function JI(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 UPe=J(Wo,Tee,wee,(n,t,e)=>{if(!n)return new Map;let i=new Map;for(let[r,o]of t.entries()){let s=e[r];s&&n.indexOf(s)>=0&&i.set(r,o)}return i}),oo=J(Wo,UPe,Qm,n=>{let t=Wo(n)??[],e=Yu(n),i=new Map;for(let r of t){let o=rd(n,{experimentId:r});for(let s of o)i.set(s.id,{runName:s.name,experimentAlias:e[r]})}return i},qu,(n,t,e,i,r)=>{if(!n)return null;let o=r===hi.COMPARE_EXPERIMENT,s=new Map;for(let[a,l]of t.entries()){let c=i.get(a);s.set(a,JI(c,e,o)&&l)}return s}),nc=J(Na.getColorPalette,Aee,Dee,Qu,(n,t,e,i)=>{let r={};return t.forEach((o,s)=>{let a=i?n.inactive.darkHex:n.inactive.lightHex;if(e.has(s))a=e.get(s);else if(o>=0){let l=n.colors[o%n.colors.length];a=i?l.darkHex:l.lightHex}r[s]=a}),r}),Oee=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.runsDataSource=r,this.loadRunsOnRunTableShown$=cr(()=>this.actions$.pipe(ii(dI),xn(({experimentIds:o})=>this.getExperimentsWithLoadState(o,a=>a===Oe.FAILED||a===Oe.NOT_LOADED).pipe(Ye(a=>!!a.length),xn(a=>this.fetchAllRunsList(o,a))))),{dispatch:!1}),this.experimentsWithStaleRunsOnRouteChange$=this.actions$.pipe(ii(Jl),Wt(this.store.select(Ra)),yi(([,o],[,s])=>Ps(o,s)),Wt(this.store.select(Wo)),Ye(([,o])=>!!o),L(([,o])=>o),xn(o=>this.getExperimentsWithLoadState(o,s=>s===Oe.FAILED||s===Oe.NOT_LOADED).pipe(L(s=>({experimentIds:o,experimentIdsToBeFetched:s}))))),this.experimentsWithStaleRunsOnReload$=this.actions$.pipe(ii(aa,Fa),Wt(this.store.select(Wo)),Ye(([,o])=>!!o),L(([,o])=>o),xn(o=>this.getExperimentsWithLoadState(o,s=>s!==Oe.LOADING).pipe(L(s=>({experimentIds:o,experimentIdsToBeFetched:s}))))),this.loadRunsOnNavigationOrReload$=cr(()=>Jt(this.experimentsWithStaleRunsOnRouteChange$,this.experimentsWithStaleRunsOnReload$).pipe(xn(({experimentIds:o,experimentIdsToBeFetched:s})=>this.fetchAllRunsList(o,s))),{dispatch:!1})}getRunsListLoadState(e){return this.store.select(WM,{experimentId:e}).pipe(Qt(1))}getExperimentsWithLoadState(e,i){return lr(e.map(r=>this.getRunsListLoadState(r))).pipe(L(r=>e.filter((o,s)=>i(r[s].state))))}fetchAllRunsList(e,i){return Xt({experimentIds:e,experimentIdsToBeFetched:i}).pipe(kt(()=>{this.store.dispatch(rI({experimentIds:e,requestedExperimentIds:i}))}),xn(()=>{let r=new Set(i);return lr(e.map(s=>r.has(s)?this.fetchRunsForExperiment(s):this.maybeWaitForRunsAndGetRuns(s)))}),L(r=>{let o={},s=[];for(let a of r)s.push(...a.runs),a.fromRemote&&(o[a.experimentId]={runs:a.runs,metadata:a.metadata});return{newRunsAndMetadata:o,runsForAllExperiments:s}}),kt(({newRunsAndMetadata:r,runsForAllExperiments:o})=>{this.store.dispatch(vh({experimentIds:e,newRunsAndMetadata:r,runsForAllExperiments:o}))}),fo(r=>(this.store.dispatch(sv({experimentIds:e,requestedExperimentIds:i})),Xt(null))),L(()=>null))}maybeWaitForRunsAndGetRuns(e){return this.store.select(WM,{experimentId:e}).pipe(Ye(i=>i.state!==Oe.LOADING),Qt(1),xn(i=>i.state===Oe.FAILED?wc(new Error("Pending request failed")):Xt(i)),Wt(this.store.select(rd,{experimentId:e})),L(([,i])=>({fromRemote:!1,experimentId:e,runs:i})))}fetchRunsForExperiment(e){return lr([this.runsDataSource.fetchRuns(e),this.runsDataSource.fetchHparamsMetadata(e)]).pipe(L(([i,r])=>({fromRemote:!0,experimentId:e,runs:i,metadata:r})))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(pI))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ic=(()=>(function(n){n.ASC="asc",n.DESC="desc",n.UNSET=""}(ic||(ic={})),ic))(),{initialState:zPe,reducers:jPe}=zm({runColorOverrideForGroupBy:new Map,defaultRunColorIdForGroupBy:new Map,groupKeyToColorId:new Map,initialGroupBy:{key:sr.RUN},userSetGroupByKey:null,colorGroupRegexString:"",regexFilter:""},{runIds:{},runIdToExpId:{},runMetadata:{},runsLoadState:{}},(n,t,e)=>Ps(t,e)?n:{...n,initialGroupBy:{key:e.routeKind===hi.COMPARE_EXPERIMENT?sr.EXPERIMENT:sr.RUN}}),GPe=vr(zPe,Se(K_,(n,{routeKind:t,partialState:e})=>{if(t!==hi.COMPARE_EXPERIMENT&&t!==hi.EXPERIMENT)return n;let r=e.runs.groupBy,o=e.runs.regexFilter??"";if(!r&&!o)return n;let{colorGroupRegexString:s,userSetGroupByKey:a}=n;return r&&(s=r.key===sr.REGEX?r.regexString:n.colorGroupRegexString,a=r.key??null),{...n,colorGroupRegexString:s,regexFilter:o,userSetGroupByKey:a}}),Se(rI,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Oe.LOADING}:{lastLoadedTimeInMs:null,state:Oe.LOADING};return{...n,runsLoadState:e}}),Se(vh,(n,t)=>{let e={...n.runIds},i={...n.runMetadata},r={...n.runIdToExpId},o={...n.runsLoadState};for(let s of Object.keys(t.newRunsAndMetadata)){let{runs:a,metadata:l}=t.newRunsAndMetadata[s];e[s]=a.map(({id:c})=>c),o[s]={...o[s],lastLoadedTimeInMs:Date.now(),state:Oe.LOADED};for(let c of a){let u=l.runToHparamsAndMetrics[c.id];i[c.id]={...c,hparams:u?u.hparams:null,metrics:u?u.metrics:null},r[c.id]=s}}return{...n,runIds:e,runIdToExpId:r,runMetadata:i,runsLoadState:o}}),Se(sv,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Oe.FAILED}:{lastLoadedTimeInMs:null,state:Oe.FAILED};return{...n,runsLoadState:e}}),Se(vh,(n,{runsForAllExperiments:t})=>{let e=new Map(n.groupKeyToColorId),i=new Map(n.defaultRunColorIdForGroupBy),r=n.initialGroupBy;null!==n.userSetGroupByKey&&(r=jI(n.userSetGroupByKey,n.colorGroupRegexString));let o=GM(r,t,n.runIdToExpId);Object.entries(o.matches).forEach(([s,a])=>{let l=e.get(s)??e.size;e.set(s,l);for(let c of a)i.set(c.id,l)});for(let s of o.nonMatches)i.set(s.id,-1);return{...n,defaultRunColorIdForGroupBy:i,groupKeyToColorId:e}}),Se(av,(n,{experimentIds:t,groupBy:e})=>{let i=new Map,r=new Map(n.defaultRunColorIdForGroupBy),s=GM(e,t.flatMap(l=>n.runIds[l]).map(l=>n.runMetadata[l]),n.runIdToExpId);Object.entries(s.matches).forEach(([l,c])=>{let u=i.get(l)??i.size;i.set(l,u);for(let d of c)r.set(d.id,u)});for(let l of s.nonMatches)r.set(l.id,-1);let a=e.key===sr.REGEX?e.regexString:n.colorGroupRegexString;return{...n,colorGroupRegexString:a,userSetGroupByKey:e.key,defaultRunColorIdForGroupBy:r,groupKeyToColorId:i,runColorOverrideForGroupBy:new Map}}),Se(uI,(n,{runId:t,newColor:e})=>{let i=new Map(n.runColorOverrideForGroupBy);return i.set(t,e),{...n,runColorOverrideForGroupBy:i}}),Se(NM,(n,t)=>({...n,regexFilter:t.regexString}))),WPe=jm(GPe,jPe),qPe={key:null,direction:ic.UNSET},{initialState:YPe,reducers:XPe}=zm({paginationOption:{pageIndex:0,pageSize:10},sort:qPe,selectionState:new Map},{}),QPe=vr(YPe,Se(lI,(n,{pageSize:t,pageIndex:e})=>({...n,paginationOption:{pageSize:t,pageIndex:e}})),Se(NM,(n,t)=>({...n,paginationOption:{...n.paginationOption,pageIndex:0}})),Se(cI,(n,t)=>({...n,sort:{key:t.key,direction:t.direction}})),Se(vh,(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}}),Se(oI,(n,{runId:t})=>{let e=new Map(n.selectionState);return e.set(t,!Boolean(e.get(t))),{...n,selectionState:e}}),Se(sI,(n,{runId:t})=>{let e=new Map;for(let i of n.selectionState.keys())e.set(i,t===i);return{...n,selectionState:e}}),Se(aI,(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}})),KPe=jm(QPe,XPe);function kee(n,t){return Fm({data:WPe,ui:KPe})(n,t)}function ZPe(){return[{actionCreator:sv,alertFromAction:()=>({localizedMessage:"Failed to fetch runs"})}]}var $I=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[wr.forFeature("runs",kee),ro.forFeature([Oee]),W$,Ju.registerAlertActions(ZPe),mI]}),n})(),sp=(()=>(function(n){n.RUNS_CHANGED="experimental.RunsChanged",n.GET_RUNS="experimental.GetRuns",n.GET_URL_DATA="experimental.GetURLPluginData",n.DATA_RELOADED="experimental.DataReloaded"}(sp||(sp={})),sp))(),Nee=new WeakMap,gv=new Set,cH=new Map,t2=new Map;function Lee(n,t){return e=>{let i=t2.get(t),r=Nee.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,s=e.error;if(e.isReply){if(!this.responseWaits.has(r))return;let{resolve:d,reject:p}=this.responseWaits.get(r);return this.responseWaits.delete(r),void(s?p(new Error(s)):d(o))}let l=null,c=null;if(this.listeners.has(i)){let d=this.listeners.get(i);try{l=await d(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,s)=>{this.responseWaits.set(i,{resolve:o,reject:s})})}}(n);gv.add(e),t2.set(e,t),n.start();for(let[i,r]of cH){let o=Lee(r,e);e.listen(i,o)}}(t,e)});var dH,_v=(()=>{class n{broadcast(e,i){return function(n,t){for(let i of gv)t2.get(i).isConnected||(gv.delete(i),t2.delete(i));let e=[...gv].map(i=>i.sendMessage(n,t));return Promise.all(e)}(e,i)}listen(e,i){!function(n,t){cH.set(n,t);for(let e of gv){let i=Lee(t,e);e.listen(n,i)}}(e,i)}unlisten(e){!function(n){cH.delete(n);for(let t of gv)t.unlisten(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),n2=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){let e=document.createElement("tf-storage");this.ipc.listen(sp.GET_URL_DATA,i=>{if(!i)return;let r=`p.${i.pluginName}.`,o={},s=e.tf_storage.getUrlHashDict();for(let a in s)a.startsWith(r)&&(o[a.substring(r.length)]=s[a]);return o}),this.store.select(iv).pipe(Ye(i=>null!==i),yi()).subscribe(()=>{this.ipc.broadcast(sp.DATA_RELOADED,void 0)})}}return n.\u0275fac=function(e){return new(e||n)(j(_v),j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),i2=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){let e=this.store.select(Wo).pipe(xn(i=>i?Lt(i.map(o=>this.store.select(rd,{experimentId:o}))).pipe(L(o=>o.flat()),yi((o,s)=>o.length===s.length&&o.every((a,l)=>s[l].id===a.id)),L(o=>o.map(({name:s})=>s))):Xt([])));e.subscribe(i=>{this.ipc.broadcast(sp.RUNS_CHANGED,i)}),this.ipc.listen(sp.GET_RUNS,()=>e.pipe(Qt(1)).toPromise())}}return n.\u0275fac=function(e){return new(e||n)(j(_v),j(Ce))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),r2=(()=>{class n{constructor(e,i){i.init(),e.init()}registerPluginIframe(e,i){!function(n,t){Nee.set(n,{pluginName:t})}(e,i)}}return n.\u0275fac=function(e){return new(e||n)(j(i2),j(n2))},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[_v,n2,i2],imports:[J_,ec,$I]}),n})(),vv=be("[Alert] Alert Reported",{_as:"props",_p:void 0}),Hee=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.alertActionModule=r,this.reportRegisteredActionAlerts$=cr(()=>this.actions$.pipe(kt(o=>{let s=this.alertActionModule.getAlertFromAction(o);s&&this.store.dispatch(vv(s))})),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(Ju))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),aRe=vr({latestAlert:null},Se(vv,(n,{localizedMessage:t,followupAction:e})=>{let i={localizedMessage:t,created:Date.now()};return e&&(i.followupAction=e),{...n,latestAlert:i}}));function Uee(n,t){return aRe(n,t)}try{dH=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dH=!1}var yv,QM,o2,Zm,uH,oi=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?XD(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&&!dH)&&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)(j(Gd))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),zee=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function pH(){if(yv)return yv;if("object"!=typeof document||!document)return yv=new Set(zee);let n=document.createElement("input");return yv=new Set(zee.filter(t=>(n.setAttribute("type",t),n.type===t)))}function la(n){return function(){if(null==QM&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>QM=!0}))}finally{QM=QM||!1}return QM}()?n:!!n.capture}function s2(){if(null==Zm){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Zm=!1;if("scrollBehavior"in document.documentElement.style)Zm=!0;else{let n=Element.prototype.scrollTo;Zm=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return Zm}function bv(){if("object"!=typeof document||!document)return 0;if(null==o2){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),o2=0,0===n.scrollLeft&&(n.scrollLeft=1,o2=0===n.scrollLeft?1:2),n.remove()}return o2}function a2(n){if(function(){if(null==uH){let n=typeof document<"u"?document.head:null;uH=!(!n||!n.createShadowRoot&&!n.attachShadow)}return uH}()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function KM(){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 Qc(n){return n.composedPath?n.composedPath()[0]:n.target}function ZM(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function kr(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}function Rt(n){return null!=n&&"false"!=`${n}`}function Bi(n,t=0){return hH(n)?Number(n):t}function hH(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function xv(n){return Array.isArray(n)?n:[n]}function yo(n){return null==n?"":"string"==typeof n?n:`${n}px`}function La(n){return n instanceof Re?n.nativeElement:n}var Cv,Gee=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),uRe=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){let i=La(e);return new un(r=>{let s=this._observeElement(i).subscribe(r);return()=>{s.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let i=new ke,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)(j(Gee))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),wh=(()=>{class n{constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new G,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=Bi(e),this._subscribe()}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(Hr(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(M(uRe),M(Re),M(_t))},n.\u0275dir=He({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),od=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[Gee]}),n})(),Wee=new Set,dRe=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):hRe}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function(n){if(!Wee.has(n))try{Cv||((Cv=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(Cv)),Cv.sheet&&(Cv.sheet.insertRule(`@media ${n} {body{ }}`,0),Wee.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(j(oi))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function hRe(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}var Jm=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new ke}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return qee(xv(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let o=Lt(qee(xv(e)).map(s=>this._registerQuery(s).observable));return o=Vp(o.pipe(Qt(1)),o.pipe(Za(1),Hr(0))),o.pipe(L(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),o={observable:new un(s=>{let a=l=>this._zone.run(()=>s.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(zn(i),L(({matches:s})=>({query:e,matches:s})),st(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(j(dRe),j(_t))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function qee(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function p2(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}var $ee="cdk-describedby-message",u2="cdk-describedby-host",gH=0,f2=(()=>{class n{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+gH++,this._document=e,this._id=jo($f)+"-"+gH++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;let o=fH(i,r);"string"!=typeof i?(Xee(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=fH(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),"string"==typeof i){let s=this._messageRegistry.get(o);s&&0===s.referenceCount&&this._deleteMessageElement(o)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${u2}="${this._id}"]`);for(let i=0;i<e.length;i++)this._removeCdkDescribedByReferenceIds(e[i]),e[i].removeAttribute(u2);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,i){let r=this._document.createElement("div");Xee(r,this._id),r.textContent=e,i&&r.setAttribute("role",i),this._createMessagesContainer(),this._messagesContainer.appendChild(r),this._messageRegistry.set(fH(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=p2(e,"aria-describedby").filter(r=>0!=r.indexOf($ee));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let r=this._messageRegistry.get(i);(function(n,t,e){let i=p2(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(u2,this._id),r.referenceCount++}_removeMessageReference(e,i){let r=this._messageRegistry.get(i);r.referenceCount--,function(n,t,e){let r=p2(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(u2)}_isElementDescribedByMessage(e,i){let r=p2(e,"aria-describedby"),o=this._messageRegistry.get(i),s=o&&o.messageElement.id;return!!s&&-1!=r.indexOf(s)}_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)(j(Ht),j(oi))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function fH(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function Xee(n,t){n.id||(n.id=`${$ee}-${t}-${gH++}`)}var h2=class{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ke,this._typeaheadSubscription=Sn.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ke,this.change=new ke,t instanceof Hl&&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(kt(e=>this._pressedLetters.push(e)),Hr(t),Ye(()=>this._pressedLetters.length>0),L(()=>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,s=i[o];if(!this._skipPredicateFn(s)&&0===s.getLabel().toUpperCase().trim().indexOf(e)){this.setActiveItem(o);break}}this._pressedLetters=[]}),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,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;default:return void((r||kr(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}_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 Hl?this._items.toArray():this._items}},wv=class extends h2{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}},Sh=class extends h2{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)}},Sv=(()=>{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===Qee(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=Qee(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")||ete(n))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(j(oi))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function ete(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function Qee(n){if(!ete(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var JM=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new class{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()}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))}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(Qt(1)).subscribe(t)}}(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(j(Sv),j(_t),j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function $M(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function ew(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 pe("FOCUS_TRAP_INERT_STRATEGY");var kRe=new pe("cdk-input-modality-detector-options"),FRe={ignoreKeys:[18,17,224,91,16]},Mv=la({passive:!0,capture:!0}),NRe=(()=>{class n{constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new hr(null),this._lastTouchMs=0,this._onKeydown=s=>{this._options?.ignoreKeys?.some(a=>a===s.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Qc(s))},this._onMousedown=s=>{Date.now()-this._lastTouchMs<650||(this._modality.next($M(s)?"keyboard":"mouse"),this._mostRecentTarget=Qc(s))},this._onTouchstart=s=>{ew(s)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Qc(s))},this._options={...FRe,...o},this.modalityDetected=this._modality.pipe(Za(1)),this.modalityChanged=this.modalityDetected.pipe(yi()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,Mv),r.addEventListener("mousedown",this._onMousedown,Mv),r.addEventListener("touchstart",this._onTouchstart,Mv)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Mv),document.removeEventListener("mousedown",this._onMousedown,Mv),document.removeEventListener("touchstart",this._onTouchstart,Mv))}}return n.\u0275fac=function(e){return new(e||n)(j(oi),j(_t),j(Ht),j(kRe,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),LRe=new pe("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),VRe=new pe("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),tw=(()=>{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,s,r=this._defaultOptions;return 1===i.length&&"number"==typeof i[0]?s=i[0]:[o,s]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==s&&r&&(s=r.duration),this._liveElement.setAttribute("aria-live",o),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof s&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),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"),this._document.body.appendChild(r),r}}return n.\u0275fac=function(e){return new(e||n)(j(LRe,8),j(_t),j(Ht),j(VRe,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),HRe=new pe("cdk-focus-monitor-default-options"),d2=la({passive:!0,capture:!0}),Fr=(()=>{class n{constructor(e,i,r,o,s){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 ke,this._rootNodeFocusAndBlurListener=a=>{for(let c=Qc(a);c;c=c.parentElement)"focus"===a.type?this._onFocus(a,c):this._onBlur(a,c)},this._document=o,this._detectionMode=s?.detectionMode||0}monitor(e,i=!1){let r=La(e);if(!this._platform.isBrowser||1!==r.nodeType)return Xt(null);let o=a2(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;let a={checkChildren:i,subject:new ke,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let i=La(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=La(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,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=Qc(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,d2),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,d2)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(st(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,d2),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,d2),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 s=0;s<o.length;s++)if(o[s].contains(i))return!0;return!1}}return n.\u0275fac=function(e){return new(e||n)(j(_t),j(oi),j(NRe),j(Ht,8),j(HRe,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),nte=(()=>{class n{constructor(e,i){this._elementRef=e,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new G}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)(M(Re),M(Fr))},n.\u0275dir=He({type:n,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]}),n})(),Kee="cdk-high-contrast-black-on-white",Zee="cdk-high-contrast-white-on-black",mH="cdk-high-contrast-active",CH=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=jo(Jm).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(mH,Kee,Zee),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();1===i?e.add(mH,Kee):2===i&&e.add(mH,Zee)}}}return n.\u0275fac=function(e){return new(e||n)(j(oi),j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ev=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(j(CH))},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[od]}),n})(),URe=new pe("cdk-dir-doc",{providedIn:"root",factory:function(){return jo(Ht)}}),jRe=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,$i=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new G,e){let r=e.documentElement?e.documentElement.dir:null;this.value=function(n){let t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?jRe.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||r||"ltr")}}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(j(URe,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Dh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})();function WRe(n,t){if(1&n&&O(0,"mat-pseudo-checkbox",4),2&n){let e=S();y("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function qRe(n,t){if(1&n&&(_(0,"span",5),A(1),v()),2&n){let e=S();C(1),je("(",e.group.label,")")}}var YRe=["*"],ste=(new Ic("14.2.7"),(()=>{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})()),ate=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})(),QRe=new pe("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),ln=(()=>{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!ZM()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(j(CH),j(QRe,8),j(Ht))},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Dh,Dh]}),n})();function so(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Rt(t)}}}function ko(n,t){return class extends n{constructor(...e){super(...e),this.defaultColor=t,this.color=t}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)}}}function qo(n){return class extends n{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Rt(t)}}}function oc(n,t=0){return class extends n{constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?Bi(e):this.defaultTabIndex}}}function Dv(n){return class extends n{constructor(...t){super(...t),this.errorState=!1}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())}}}function m2(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new un(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 pe("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return jo(Wd)}}),new pe("mat-date-formats");var cd=(()=>{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=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ite={enterDuration:225,exitDuration:150},MH=la({passive:!0}),rte=["mousedown","touchstart"],ote=["mouseup","mouseleave","touchend","touchcancel"],Tv=class{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=La(i))}fadeInRipple(t,e,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...ite,...i.animation};i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=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),a=t-r.left,l=e-r.top,c=o.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=a-s+"px",u.style.top=l-s+"px",u.style.height=2*s+"px",u.style.width=2*s+"px",null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(u);let d=window.getComputedStyle(u),h=d.transitionDuration,f="none"===d.transitionProperty||"0s"===h||"0s, 0s"===h,m=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,u,i,f);u.style.transform="scale3d(1, 1, 1)",m.state=0,i.persistent||(this._mostRecentTransientRipple=m);let x=null;return!f&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let g=()=>this._finishRippleTransition(m),b=()=>this._destroyRipple(m);u.addEventListener("transitionend",g),u.addEventListener("transitioncancel",b),x={onTransitionEnd:g,onTransitionCancel:b}}),this._activeRipples.set(m,x),(f||!c)&&this._finishRippleTransition(m),m}fadeOutRipple(t){if(2===t.state||3===t.state)return;let e=t.element,i={...ite,...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=La(t);!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(rte))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(ote),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=$M(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&&!ew(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()}))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(e=>{this._triggerElement.addEventListener(e,this,MH)})})}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){this._triggerElement&&(rte.forEach(t=>{this._triggerElement.removeEventListener(t,this,MH)}),this._pointerUpEventsRegistered&&ote.forEach(t=>{this._triggerElement.removeEventListener(t,this,MH)}))}},g2=new pe("mat-ripple-global-options"),Yo=(()=>{class n{constructor(e,i,r,o,s){this._elementRef=e,this._animationMode=s,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new Tv(this,i,e,r)}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()}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)(M(Re),M(_t),M(oi),M(g2,8),M(Pi,8))},n.\u0275dir=He({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&et("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})(),_l=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln,ln]}),n})(),$Re=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1}}return n.\u0275fac=function(e){return new(e||n)(M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(e,i){2&e&&et("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;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-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.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{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}'],encapsulation:2,changeDetection:0}),n})(),eOe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln]}),n})(),iw=new pe("MAT_OPTION_PARENT_COMPONENT"),rw=(so(class{}),new pe("MatOptgroup")),tOe=0,nw=class{constructor(t,e=!1){this.source=t,this.isUserInput=e}},nOe=(()=>{class n{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-"+tOe++,this.onSelectionChange=new G,this._stateChanges=new ke}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=Rt(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._getHostElement().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)&&!kr(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue=e,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new nw(this,e))}}return n.\u0275fac=function(e){nl()},n.\u0275dir=He({type:n,inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),Os=(()=>{class n extends nOe{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M(iw,8),M(rw,8))},n.\u0275cmp=R({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(e,i){1&e&&P("click",function(){return i._selectViaInteraction()})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(_s("id",i.id),ze("tabindex",i._getTabIndex())("aria-selected",i._getAriaSelected())("aria-disabled",i.disabled.toString()),et("mat-selected",i.selected)("mat-option-multiple",i.multiple)("mat-active",i.active)("mat-option-disabled",i.disabled))},exportAs:["matOption"],features:[tt],ngContentSelectors:YRe,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(xi(),E(0,WRe,1,2,"mat-pseudo-checkbox",0),_(1,"span",1),Vn(2),v(),E(3,qRe,2,1,"span",2),O(4,"div",3)),2&e&&(y("ngIf",i.multiple),C(3),y("ngIf",i.group&&i.group._inert),C(1),y("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[Yo,Be,$Re],styles:['.mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.mat-option.mat-active::before{content:""}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.cdk-high-contrast-active .mat-option.mat-selected:not(.mat-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-option.mat-selected:not(.mat-option-multiple)::after{right:auto;left:16px}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}'],encapsulation:2,changeDetection:0}),n})();function ow(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let s=0;s<n+1;s++)i[s].group&&i[s].group===r[o]&&o++;return o}return 0}function _2(n,t,e,i){return n<e?n:n+t>e+i?Math.max(0,n-i+t):e}var Av=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[_l,Me,ln,eOe]}),n})(),lte=["mat-button",""],cte=["*"],oOe=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],sOe=ko(so(qo(class{constructor(n){this._elementRef=n}}))),_n=(()=>{class n extends sOe{constructor(e,i,r){super(e),this._focusMonitor=i,this._animationMode=r,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(let o of oOe)this._hasHostAttributes(o)&&this._getHostElement().classList.add(o);e.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...e){return e.some(i=>this._getHostElement().hasAttribute(i))}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(Fr),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(e,i){if(1&e&&ot(Yo,5),2&e){let r;Ne(r=Le())&&(i.ripple=r.first)}},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(e,i){2&e&&(ze("disabled",i.disabled||null),et("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[tt],attrs:lte,ngContentSelectors:cte,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(xi(),_(0,"span",0),Vn(1),v(),O(2,"span",1)(3,"span",2)),2&e&&(C(2),et("mat-button-ripple-round",i.isRoundButton||i.isIconButton),y("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[Yo],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),Iv=(()=>{class n extends _n{constructor(e,i,r,o){super(i,e,r),this._ngZone=o,this._haltDisabledEvents=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())}}ngAfterViewInit(){super.ngAfterViewInit(),this._ngZone?this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)}):this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return n.\u0275fac=function(e){return new(e||n)(M(Fr),M(Re),M(Pi,8),M(_t,8))},n.\u0275cmp=R({type:n,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(e,i){2&e&&(ze("tabindex",i.disabled?-1:i.tabIndex)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString()),et("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-button-disabled",i.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[tt],attrs:lte,ngContentSelectors:cte,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(e,i){1&e&&(xi(),_(0,"span",0),Vn(1),v(),O(2,"span",1)(3,"span",2)),2&e&&(C(2),et("mat-button-ripple-round",i.isRoundButton||i.isIconButton),y("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",i.isIconButton)("matRippleTrigger",i._getHostElement()))},dependencies:[Yo],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),Pn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[_l,ln,ln]}),n})(),Pv=class{},v2=class extends Pv{constructor(t){super(),this._data=t}connect(){return ax(this._data)?this._data:Xt(this._data)}disconnect(){}},y2=class{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let c,u;null==s.previousIndex?(c=this._insertView(()=>i(s,a,l),l,e,r(s)),u=c?1:0):null==l?(this._detachAndCacheView(a,e),u=3):(c=this._moveView(a,l,e,r(s)),u=2),o&&o({context:c?.context,operation:u,record:s})})}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 s=t();return i.createEmbeddedView(s.templateRef,s.context,s.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}},Ah=class{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 ke,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}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){if(this.compareWith){for(let e of this._selection)if(this.compareWith(e,t))return!0;return!1}return this._selection.has(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){this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(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)}},SH=new pe("_ViewRepeater"),aOe=["contentWrapper"],lOe=["*"],hte=new pe("VIRTUAL_SCROLL_STRATEGY");function cOe(n){return n._scrollStrategy}var b2=(()=>{class n{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new class{constructor(t,e,i){this._scrolledIndexChange=new ke,this.scrolledIndexChange=this._scrolledIndexChange.pipe(yi()),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(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}let a=o-e.start*this._itemSize;if(a<this._minBufferPx&&0!=e.start){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(s+(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(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=Bi(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=Bi(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=Bi(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[$t([{provide:hte,useFactory:cOe,deps:[Jn(()=>n)]}]),Ft]}),n})(),$m=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new ke,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 un(i=>{this._globalSubscription||this._addGlobalListener();let r=e>0?this._scrolled.pipe(bu(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Xt()}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(Ye(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=La(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>_i(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)(j(_t),j(oi),j(Ht,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ih=(()=>{class n{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new ke,this._elementScrolled=new un(s=>this.ngZone.runOutsideAngular(()=>_i(this.elementRef.nativeElement,"scroll").pipe(st(this._destroyed)).subscribe(s)))}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!=bv()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==bv()?e.left=e.right:1==bv()&&(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;s2()?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 s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==bv()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==bv()?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)(M(Re),M($m),M(_t),M($i,8))},n.\u0275dir=He({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),n})(),Va=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new ke,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(bu(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)(j(oi),j(_t),j(Ht,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dte=new pe("VIRTUAL_SCROLLABLE"),pOe=(()=>{class n extends Ih{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)(M(Re),M($m),M(_t),M($i,8))},n.\u0275dir=He({type:n,features:[tt]}),n})(),fOe=typeof requestAnimationFrame<"u"?_N:f0,eg=(()=>{class n extends pOe{constructor(e,i,r,o,s,a,l,c){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this.scrollable=c,this._platform=jo(oi),this._detachedSubject=new ke,this._renderedRangeSubject=new ke,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new un(u=>this._scrollStrategy.scrolledIndexChange.subscribe(d=>Promise.resolve().then(()=>this.ngZone.run(()=>u.next(d))))),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=Sn.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}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=Rt(e)}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(zn(null),bu(0,fOe)).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(st(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,s=o?"X":"Y",l=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(l+=` translate${s}(-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",s="rtl"==this.dir?.value;i="start"==e?s?o:r:"end"==e?s?r:o:e||("horizontal"===this.orientation?"left":"top");let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}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)(M(Re),M(nn),M(_t),M(hte,8),M($i,8),M($m),M(Va),M(dte,8))},n.\u0275cmp=R({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&ot(aOe,7),2&e){let r;Ne(r=Le())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&et("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[$t([{provide:Ih,useFactory:(t,e)=>t||e,deps:[[new ns,new j0(dte)],n]}]),tt],ngContentSelectors:lOe,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(xi(),_(0,"div",0,1),Vn(2),v(),O(3,"div",2)),2&e&&(C(3),Pt("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 pte(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 x2=(()=>{class n{constructor(e,i,r,o,s,a){this._viewContainerRef=e,this._template=i,this._differs=r,this._viewRepeater=o,this._viewport=s,this.viewChange=new ke,this._dataSourceChanges=new ke,this.dataStream=this._dataSourceChanges.pipe(zn(null),y0(),ui(([l,c])=>this._changeDataSource(l,c)),Ma(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new ke,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(st(this._destroyed)).subscribe(l=>{this._renderedRange=l,this.viewChange.observers.length&&a.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function(n){return n&&"function"==typeof n.connect&&!(n instanceof ix)}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new v2(ax(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=Bi(e)}measureRangeSize(e,i){if(e.start>=e.end)return 0;let s,a,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){s=a=c.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?pte(i,"end",a)-pte(i,"start",s):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):Xt()}_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,s,a)=>this._getEmbeddedViewArgs(o,a),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)(M(Oi),M(Vi),M(kc),M(SH),M(eg,4),M(_t))},n.\u0275dir=He({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[$t([{provide:SH,useClass:y2}])]}),n})(),ud=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Zc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Dh,ud,Dh,ud]}),n})(),sw=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}},$c=class extends sw{constructor(t,e,i,r){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r}},ks=class extends sw{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()}},TH=class extends sw{constructor(t){super(),this.element=t instanceof Re?t.nativeElement:t}},Ph=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof $c?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof ks?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof TH?(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)}},aw=class extends Ph{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=s=>{let a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,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),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Xn.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]}},fte=(()=>{class n extends ks{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(M(Vi),M(Oi))},n.\u0275dir=He({type:n,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[tt]}),n})(),da=(()=>{class n extends Ph{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new G,this.attachDomPortal=o=>{let s=o.element,a=this._document.createComment("dom-portal");o.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=o,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},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._attachedPortal=null,this._attachedRef=null}attachComponentPortal(e){e.setAttachedHost(this);let i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=i.createComponent(o,i.length,e.injector||i.injector);return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}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)(M(gs),M(Oi),M(Ht))},n.\u0275dir=He({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[tt]}),n})(),eu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),mte=s2(),M2=class{enable(){}disable(){}attach(){}};function IH(n,t){return t.some(e=>n.bottom<e.top||n.top>e.bottom||n.right<e.left||n.left>e.right)}function gte(n,t){return t.some(e=>n.top<e.top||n.bottom>e.bottom||n.left<e.left||n.right>e.right)}var ng=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();IH(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}},mOe=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new M2,this.close=s=>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);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,s),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=yo(-this._previousScrollPosition.left),t.style.top=yo(-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||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),mte&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),mte&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_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=s=>new ng(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}}return n.\u0275fac=function(e){return new(e||n)(j($m),j(Va),j(_t),j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sc=class{constructor(t){if(this.scrollStrategy=new M2,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])}}},xte=(()=>{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)(j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),gOe=(()=>{class n extends xte{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{let o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){let a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.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)(j(Ht),j(_t,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),_Oe=(()=>{class n extends xte{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=Qc(o)},this._clickListener=o=>{let s=Qc(o),a="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let u=l[c];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(u.overlayElement.contains(s)||u.overlayElement.contains(a))break;let d=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>d.next(o)):d.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)(j(Ht),j(oi),j(_t,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Rv=(()=>{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||ZM()){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),ZM()?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)(j(Ht),j(oi))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dd=class{constructor(t,e,i,r,o,s,a,l,c,u=!1){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=u,this._backdropElement=null,this._backdropClick=new ke,this._attachments=new ke,this._detachments=new ke,this._locationChanges=Sn.EMPTY,this._backdropClickHandler=d=>this._backdropClick.next(d),this._backdropTransitionendHandler=d=>{this._disposeBackdrop(d.target)},this._keydownEvents=new ke,this._outsidePointerEvents=new ke,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(Qt(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=yo(this._config.width),t.height=yo(this._config.height),t.minWidth=yo(this._config.minWidth),t.minHeight=yo(this._config.minHeight),t.maxWidth=yo(this._config.maxWidth),t.maxHeight=yo(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=xv(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(st(Jt(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)}},_te="cdk-overlay-connected-position-bounding-box",vOe=/([A-Za-z%]+)$/;function tg(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function vte(n){if("number"!=typeof n&&null!=n){let[t,e]=n.split(vOe);return e&&"px"!==e?null:parseFloat(t)}return n||null}function yte(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 bte="cdk-global-overlay-wrapper",yOe=(()=>{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(bte),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:s,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||s&&"100%"!==s&&"100vw"!==s),c=!("100%"!==o&&"100vh"!==o||a&&"100%"!==a&&"100vh"!==a),u=this._xPosition,d=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction,h="",f="",m="";l?m="flex-start":"center"===u?(m="center",p?f=d:h=d):p?"left"===u||"end"===u?(m="flex-end",h=d):("right"===u||"start"===u)&&(m="flex-start",f=d):"left"===u||"start"===u?(m="flex-start",h=d):("right"===u||"end"===u)&&(m="flex-end",f=d),t.position=this._cssPosition,t.marginLeft=l?"0":h,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":f,e.justifyContent=m,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(bte),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{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 ke,this._resizeSubscription=Sn.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add(_te),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 s,t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),u=this._getOverlayFit(c,e,i,a);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(u,c,i)?o.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!s||s.overlayFit.visibleArea<u.visibleArea)&&(s={overlayFit:u,overlayPoint:c,originPoint:l,position:a,overlayRect:e})}if(o.length){let a=null,l=-1;for(let c of o){let u=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);u>l&&(l=u,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&tg(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(_te),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 s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?s:a}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=yte(e),{x:s,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let p=0-a,h=a+o.height-i.height,f=this._subtractOverflows(o.width,0-s,s+o.width-i.width),m=this._subtractOverflows(o.height,p,h),x=f*m;return{visibleArea:x,isCompletelyWithinViewport:o.width*o.height===x,fitsInViewportVertically:m===o.height,fitsInViewportHorizontally:f==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let r=i.bottom-e.y,o=i.right-e.x,s=vte(this._overlayRef.getConfig().minHeight),a=vte(this._overlayRef.getConfig().minWidth),c=t.fitsInViewportHorizontally||null!=a&&a<=o;return(t.fitsInViewportVertically||null!=s&&s<=r)&&c}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=yte(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=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),u=0,d=0;return u=r.width<=o.width?c||-s:t.x<this._viewportMargin?o.left-i.left-t.x:0,d=r.height<=o.height?l||-a:t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:u,y:d},{x:t.x+u,y:t.y+d}}_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,s,a,u,d,p,i=this._viewportRect,r=this._isRtl();if("top"===e.overlayY)s=t.y,o=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)a=i.height-t.y+2*this._viewportMargin,o=i.height-a+this._viewportMargin;else{let h=Math.min(i.bottom-t.y+i.top,t.y),f=this._lastBoundingBoxSize.height;o=2*h,s=t.y-h,o>f&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-f/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)p=i.width-t.x+this._viewportMargin,u=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)d=t.x,u=i.right-t.x;else{let h=Math.min(i.right-t.x+i.left,t.x),f=this._lastBoundingBoxSize.width;u=2*h,d=t.x-h,u>f&&!this._isInitialRender&&!this._growAfterOpen&&(d=t.x-f/2)}return{top:s,left:d,bottom:a,right:p,width:u,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,s=this._overlayRef.getConfig().maxWidth;r.height=yo(i.height),r.top=yo(i.top),r.bottom=yo(i.bottom),r.width=yo(i.width),r.left=yo(i.left),r.right=yo(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=yo(o)),s&&(r.maxWidth=yo(s))}this._lastBoundingBoxSize=i,tg(this._boundingBox.style,r)}_resetBoundingBoxStyles(){tg(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){tg(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let u=this._viewportRuler.getViewportScrollPosition();tg(i,this._getExactOverlayY(e,t,u)),tg(i,this._getExactOverlayX(e,t,u))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=yo(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=yo(s.maxWidth):o&&(i.maxWidth="")),tg(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=yo(o.y),r}_getExactOverlayX(t,e,i){let s,r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=yo(o.x),r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:gte(t,i),isOriginOutsideView:IH(t,i),isOverlayClipped:gte(e,i),isOverlayOutsideView:IH(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&&xv(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 Re)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)(j(Va),j(Ht),j(oi),j(Rv))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bOe=0,tr=(()=>{class n{constructor(e,i,r,o,s,a,l,c,u,d,p,h){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=u,this._location=d,this._outsideClickDispatcher=p,this._animationsModuleType=h}create(e){let i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),s=new sc(e);return s.direction=s.direction||this._directionality.value,new dd(o,i,r,s,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-"+bOe++,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(Iu)),new aw(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(j(mOe),j(Rv),j(gs),j(yOe),j(gOe),j(Xn),j(_t),j(Ht),j($i),j(iM),j(_Oe),j(Pi,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),xOe=[{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"}],Cte=new pe("cdk-connected-overlay-scroll-strategy"),ig=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(M(Re))},n.\u0275dir=He({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),n})(),Rh=(()=>{class n{constructor(e,i,r,o,s){this._overlay=e,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=Sn.EMPTY,this._attachSubscription=Sn.EMPTY,this._detachSubscription=Sn.EMPTY,this._positionSubscription=Sn.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new G,this.positionChange=new G,this.attach=new G,this.detach=new G,this.overlayKeydown=new G,this.overlayOutsideClick=new G,this._templatePortal=new ks(i,r),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}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=Rt(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=Rt(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=Rt(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=Rt(e)}get push(){return this._push}set push(e){this._push=Rt(e)}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=xOe);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&&!kr(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 sc({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 ig?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(cx(()=>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)(M(tr),M(Vi),M(Oi),M(Cte),M($i,8))},n.\u0275dir=He({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"],features:[Ft]}),n})(),MOe={provide:Cte,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},ss=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[tr,MOe],imports:[Dh,eu,Zc,Zc]}),n})();function wOe(n,t){if(1&n){let e=Pe();_(0,"div",2)(1,"button",3),P("click",function(){return oe(e),se(S().action())}),A(2),v()()}if(2&n){let e=S();C(2),yt(e.data.action)}}function SOe(n,t){}var w2=new pe("MatSnackBarData"),Ov=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},EOe=Math.pow(2,31)-1,rg=class{constructor(t,e){this._overlayRef=e,this._afterDismissed=new ke,this._afterOpened=new ke,this._onAction=new ke,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,EOe))}_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}},TOe=(()=>{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)(M(rg),M(w2))},n.\u0275cmp=R({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[[1,"mat-simple-snack-bar-content"],["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(e,i){1&e&&(_(0,"span",0),A(1),v(),E(2,wOe,3,1,"div",1)),2&e&&(C(1),yt(i.data.message),C(1),y("ngIf",i.hasAction))},dependencies:[Be,_n],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),n})(),DOe={snackBarState:Kr("state",[ki("void, hidden",gn({transform:"scale(0.8)",opacity:0})),ki("visible",gn({transform:"scale(1)",opacity:1})),Li("* => visible",ji("150ms cubic-bezier(0, 0, 0.2, 1)")),Li("* => void, * => hidden",ji("75ms cubic-bezier(0.4, 0.0, 1, 1)",gn({opacity:0})))])},AOe=(()=>{class n extends Ph{constructor(e,i,r,o,s){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=s,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new ke,this._onExit=new ke,this._onEnter=new ke,this._animationState="void",this.attachDomPortal=a=>{this._assertNotAttached();let l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.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._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Qt(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))}_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)(M(_t),M(Re),M(nn),M(oi),M(Ov))},n.\u0275dir=He({type:n,viewQuery:function(e,i){if(1&e&&ot(da,7),2&e){let r;Ne(r=Le())&&(i._portalOutlet=r.first)}},features:[tt]}),n})(),IOe=(()=>{class n extends AOe{_afterPortalAttached(){super._afterPortalAttached(),"center"===this.snackBarConfig.horizontalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&this._elementRef.nativeElement.classList.add("mat-snack-bar-top")}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275cmp=R({type:n,selectors:[["snack-bar-container"]],hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(e,i){1&e&&i_("@state.done",function(o){return i.onAnimationEnd(o)}),2&e&&r_("@state",i._animationState)},features:[tt],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(_(0,"div",0),E(1,SOe,0,0,"ng-template",1),v(),O(2,"div")),2&e&&(C(2),ze("aria-live",i._live)("role",i._role))},dependencies:[da],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}"],encapsulation:2,data:{animation:[DOe.snackBarState]}}),n})(),kH=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ss,eu,Me,Pn,ln,ln]}),n})(),Mte=new pe("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new Ov}}),ROe=(()=>{class n{constructor(e,i,r,o,s,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=s,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}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=Xn.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:Ov,useValue:i}]}),s=new $c(this.snackBarContainerComponent,i.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){let r={...new Ov,...this._defaultConfig,...i},o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new rg(s,o);if(e instanceof Vi){let l=new ks(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(l)}else{let l=this._createInjector(r,a),c=new $c(e,void 0,l),u=s.attachComponentPortal(c);a.instance=u.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(st(o.detachments())).subscribe(l=>{o.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,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 sc;i.direction=e.direction;let r=this._overlay.position().global(),o="rtl"===e.direction,s="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!o||"end"===e.horizontalPosition&&o,a=!s&&"center"!==e.horizontalPosition;return s?r.left("0"):a?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 Xn.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:rg,useValue:i},{provide:w2,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(j(tr),j(tw),j(Xn),j(Jm),j(n,12),j(Mte))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),wte=(()=>{class n extends ROe{constructor(e,i,r,o,s,a){super(e,i,r,o,s,a),this.simpleSnackBarComponent=TOe,this.snackBarContainerComponent=IOe,this.handsetCssClass="mat-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(j(tr),j(tw),j(Xn),j(Jm),j(n,12),j(Mte))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:kH}),n})(),OOe=/[\\^$.*+?()[\]{}|]/g,Ete="\\u0000-\\u0020\\u007f-\\u009f",FOe=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+Ete+'"]{2,}[^\\s'+Ete+"\"')}\\],:;.!?]","gu");function Dte(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,s=r[0];o>i&&e.push({index:i,text:n.substring(i,o),matchesRegex:!1}),e.push({index:o,text:s,matchesRegex:!0}),i=o+s.length}return n.length>i&&e.push({index:i,text:n.substring(i,n.length),matchesRegex:!1}),e}(n,FOe).map(({matchesRegex:t,text:e})=>({isURL:t,text:e}))}function NOe(n,t){if(1&n&&(sn(0),A(1),an()),2&n){let e=S().$implicit;C(1),je(" ",e.text," ")}}function LOe(n,t){if(1&n&&(_(0,"a",7),A(1),v()),2&n){let e=S().$implicit;Zi("href",e.text,zl),C(1),yt(e.text)}}function BOe(n,t){if(1&n&&(sn(0),E(1,NOe,2,1,"ng-container",5),E(2,LOe,2,2,"ng-template",null,6,qt),an()),2&n){let e=t.$implicit,i=$e(3);C(1),y("ngIf",!e.isURL)("ngIfElse",i)}}function VOe(n,t){if(1&n){let e=Pe();_(0,"button",8),P("click",function(){return oe(e),se(S().onActionButtonClicked())}),A(1),v()}if(2&n){let e=S();C(1),je(" ",e.alert.followupAction.localizedLabel," ")}}var Ate=(()=>{class n{constructor(e,i,r){this.snackBarRef=e,this.unknownData=i,this.store=r,this.splitByURL=Dte,this.alert=i}async onActionButtonClicked(){this.snackBarRef.dismiss();let e=await this.alert.followupAction.getFollowupAction(this.store);this.store.dispatch(e)}onCloseButtonClicked(){this.snackBarRef.dismiss()}}return n.\u0275fac=function(e){return new(e||n)(M(rg),M(w2),M(Ce))},n.\u0275cmp=R({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&&(_(0,"div",0),E(1,BOe,4,2,"ng-container",1),v(),_(2,"div",2),E(3,VOe,2,1,"button",3),_(4,"button",4),P("click",function(){return i.onCloseButtonClicked()}),A(5," Dismiss "),v()()),2&e&&(C(1),y("ngForOf",i.splitByURL(i.alert.localizedMessage)),C(2),y("ngIf",i.alert.followupAction))},dependencies:[dn,Be,_n],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[_ngcontent-%COMP%]{text-transform:uppercase}"],changeDetection:0}),n})(),Ite=(()=>{class n{constructor(e,i){this.store=e,this.snackBar=i,this.ngUnsubscribe=new ke}ngOnInit(){this.store.select(q$).pipe(st(this.ngUnsubscribe),Ye(e=>Boolean(e))).subscribe(e=>{this.showAlert(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}showAlert(e){this.snackBar.openFromComponent(Ate,{duration:5e3,horizontalPosition:"start",verticalPosition:"bottom",data:e})}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(wte))},n.\u0275cmp=R({type:n,selectors:[["alert-snackbar"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),S2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Pn,kH]}),n})(),E2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Ju,S2,wr.forFeature("alerts",Uee),ro.forFeature([Hee])]}),n})();function UOe(n,t){}var og=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}},NH=(()=>{class n extends Ph{constructor(e,i,r,o,s,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();let d=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),d},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=KM(),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=KM();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=KM())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(JM),M(Ht,8),M(og),M(Sv),M(_t),M(dd),M(Fr))},n.\u0275cmp=R({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&ot(da,7),2&e){let r;Ne(r=Le())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&ze("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:[tt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&E(0,UOe,0,0,"ng-template",0)},dependencies:[da],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})(),lw=class{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new ke,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&&!kr(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})})}close(t,e){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",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}},Pte=new pe("DialogScrollStrategy"),zOe=new pe("DialogData"),jOe=new pe("DefaultDialogConfig"),WOe={provide:Pte,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.block()}},qOe=0,LH=(()=>{class n{constructor(e,i,r,o,s,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ke,this._afterOpenedAtThisLevel=new ke,this._ariaHiddenElements=new Map,this.afterAllClosed=Qa(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(zn(void 0))),this._scrollStrategy=a}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}open(e,i){(i={...this._defaultOptions||new og,...i}).id=i.id||"cdk-dialog-"+qOe++,i.id&&this.getDialogById(i.id);let o=this._getOverlayConfig(i),s=this._overlay.create(o),a=new lw(s,i),l=this._attachContainer(s,a,i);return a.containerInstance=l,this._attachDialogContent(e,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){FH(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){FH(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),FH(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new sc({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 a,o=r.injector||r.viewContainerRef?.injector,s=[{provide:og,useValue:r},{provide:lw,useValue:i},{provide:dd,useValue:e}];r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=NH;let l=new $c(a,r.viewContainerRef,Xn.create({parent:o||this._injector,providers:s}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,i,r,o){if(e instanceof Vi){let s=this._createInjector(o,i,r,void 0),a={$implicit:o.data,dialogRef:i};o.templateContext&&(a={...a,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new ks(e,null,a,s))}else{let s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new $c(e,o.viewContainerRef,s,o.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r,o){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:zOe,useValue:e.data},{provide:lw,useValue:i}];return e.providers&&("function"==typeof e.providers?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get($i,null,di.Optional))&&a.push({provide:$i,useValue:{value:e.direction,change:Xt()}}),Xn.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.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)(j(tr),j(Xn),j(jOe,8),j(n,12),j(Rv),j(Pte))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})();function FH(n,t){let e=n.length;for(;e--;)t(n[e])}var Rte=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[LH,WOe],imports:[ss,eu,Ev,eu]}),n})();function YOe(n,t){}var kv={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},XOe={dialogContainer:Kr("dialogContainer",[ki("void, exit",gn({opacity:0,transform:"scale(0.7)"})),ki("enter",gn({transform:"none"})),Li("* => enter",x5([ji("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",gn({transform:"none",opacity:1})),Im("@*",Am(),{optional:!0})]),kv),Li("* => void, * => exit",x5([ji("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",gn({opacity:0})),Im("@*",Am(),{optional:!0})]),kv)])},Fv=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,this.enterAnimationDuration=kv.params.enterAnimationDuration,this.exitAnimationDuration=kv.params.exitAnimationDuration}},QOe=(()=>{class n extends NH{constructor(e,i,r,o,s,a,l,c){super(e,i,r,o,s,a,l,c),this._animationStateChanged=new G}_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)(M(Re),M(JM),M(Ht,8),M(Fv),M(Sv),M(_t),M(dd),M(Fr))},n.\u0275cmp=R({type:n,selectors:[["ng-component"]],features:[tt],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),KOe=(()=>{class n extends QOe{constructor(e,i,r,o,s,a,l,c,u){super(e,i,r,o,s,a,l,u),this._changeDetectorRef=c,this._state="enter"}_onAnimationDone({toState:e,totalTime:i}){"enter"===e?this._openAnimationDone(i):"exit"===e&&this._animationStateChanged.next({state:"closed",totalTime:i})}_onAnimationStart({toState:e,totalTime:i}){"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:i}):("exit"===e||"void"===e)&&this._animationStateChanged.next({state:"closing",totalTime:i})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}_getAnimationState(){return{value:this._state,params:{enterAnimationDuration:this._config.enterAnimationDuration||kv.params.enterAnimationDuration,exitAnimationDuration:this._config.exitAnimationDuration||kv.params.exitAnimationDuration}}}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(JM),M(Ht,8),M(Fv),M(Sv),M(_t),M(dd),M(nn),M(Fr))},n.\u0275cmp=R({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-dialog-container"],hostVars:7,hostBindings:function(e,i){1&e&&i_("@dialogContainer.start",function(o){return i._onAnimationStart(o)})("@dialogContainer.done",function(o){return i._onAnimationDone(o)}),2&e&&(_s("id",i._config.id),ze("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),r_("@dialogContainer",i._getAnimationState()))},features:[tt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&E(0,YOe,0,0,"ng-template",0)},dependencies:[da],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,data:{animation:[XOe.dialogContainer]}}),n})(),tu=class{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new ke,this._beforeClosed=new ke,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(Ye(r=>"opened"===r.state),Qt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(Ye(r=>"closed"===r.state),Qt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Jt(this.backdropClick(),this.keydownEvents().pipe(Ye(r=>27===r.keyCode&&!this.disableClose&&!kr(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Ote(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(Ye(e=>"closing"===e.state),Qt(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 Ote(n,t,e){return n._closeInteractionType=t,n.close(e)}var cw=new pe("MatDialogData"),ZOe=new pe("mat-dialog-default-options"),kte=new pe("mat-dialog-scroll-strategy"),$Oe={provide:kte,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.block()}},eke=0,tke=(()=>{class n{constructor(e,i,r,o,s,a,l,c,u,d){this._overlay=e,this._defaultOptions=r,this._parentDialog=o,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=u,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ke,this._afterOpenedAtThisLevel=new ke,this._idPrefix="mat-dialog-",this.afterAllClosed=Qa(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(zn(void 0))),this._scrollStrategy=a,this._dialog=i.get(LH)}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}open(e,i){let r;(i={...this._defaultOptions||new Fv,...i}).id=i.id||`${this._idPrefix}${eke++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:Fv,useValue:i},{provide:og,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,l)=>(r=new this._dialogRefConstructor(s,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,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){nl()},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),vl=(()=>{class n extends tke{constructor(e,i,r,o,s,a,l,c){super(e,i,o,a,l,s,tu,KOe,cw,c)}}return n.\u0275fac=function(e){return new(e||n)(j(tr),j(Xn),j(iM,8),j(ZOe,8),j(kte),j(n,12),j(Rv),j(Pi,8))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),nke=0,T2=(()=>{class n{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Nte(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){Ote(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(e){return new(e||n)(M(tu,8),M(Re),M(vl))},n.\u0275dir=He({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&P("click",function(o){return i._onButtonClick(o)}),2&e&&ze("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:[Ft]}),n})(),Fte=(()=>{class n{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-dialog-title-"+nke++}ngOnInit(){this._dialogRef||(this._dialogRef=Nte(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)(M(tu,8),M(Re),M(vl))},n.\u0275dir=He({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(e,i){2&e&&_s("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),D2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),n})(),A2=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"],hostVars:4,hostBindings:function(e,i){2&e&&et("mat-dialog-actions-align-center","center"===i.align)("mat-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function Nte(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}var Oh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[vl,$Oe],imports:[Rte,ss,eu,ln,ln]}),n})(),ike=["connectionContainer"],rke=["inputContainer"],oke=["label"];function ske(n,t){1&n&&(sn(0),_(1,"div",14),O(2,"div",15)(3,"div",16)(4,"div",17),v(),_(5,"div",18),O(6,"div",15)(7,"div",16)(8,"div",17),v(),an())}function ake(n,t){if(1&n){let e=Pe();_(0,"div",19),P("cdkObserveContent",function(){return oe(e),se(S().updateOutlineGap())}),Vn(1,1),v()}2&n&&y("cdkObserveContentDisabled","outline"!=S().appearance)}function lke(n,t){if(1&n&&(sn(0),Vn(1,2),_(2,"span"),A(3),v(),an()),2&n){let e=S(2);C(3),yt(e._control.placeholder)}}function cke(n,t){1&n&&Vn(0,3,["*ngSwitchCase","true"])}function uke(n,t){1&n&&(_(0,"span",23),A(1," *"),v())}function dke(n,t){if(1&n){let e=Pe();_(0,"label",20,21),P("cdkObserveContent",function(){return oe(e),se(S().updateOutlineGap())}),E(2,lke,4,1,"ng-container",12),E(3,cke,1,0,"ng-content",12),E(4,uke,2,0,"span",22),v()}if(2&n){let e=S();et("mat-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-form-field-empty",e._control.empty&&!e._shouldAlwaysFloat())("mat-accent","accent"==e.color)("mat-warn","warn"==e.color),y("cdkObserveContentDisabled","outline"!=e.appearance)("id",e._labelId)("ngSwitch",e._hasLabel()),ze("for",e._control.id)("aria-owns",e._control.id),C(2),y("ngSwitchCase",!1),C(1),y("ngSwitchCase",!0),C(1),y("ngIf",!e.hideRequiredMarker&&e._control.required&&!e._control.disabled)}}function pke(n,t){1&n&&(_(0,"div",24),Vn(1,4),v())}function hke(n,t){if(1&n&&(_(0,"div",25),O(1,"span",26),v()),2&n){let e=S();C(1),et("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)}}function fke(n,t){1&n&&(_(0,"div"),Vn(1,5),v()),2&n&&y("@transitionMessages",S()._subscriptAnimationState)}function mke(n,t){if(1&n&&(_(0,"div",30),A(1),v()),2&n){let e=S(2);y("id",e._hintLabelId),C(1),yt(e.hintLabel)}}function gke(n,t){if(1&n&&(_(0,"div",27),E(1,mke,2,2,"div",28),Vn(2,6),O(3,"div",29),Vn(4,7),v()),2&n){let e=S();y("@transitionMessages",e._subscriptAnimationState),C(1),y("ngIf",e.hintLabel)}}var _ke=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],vke=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],yke=0,Vte=new pe("MatError"),Hte=(()=>{class n{constructor(e,i){this.id="mat-error-"+yke++,e||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(e){return new(e||n)(vo("aria-live"),M(Re))},n.\u0275dir=He({type:n,selectors:[["mat-error"]],hostAttrs:["aria-atomic","true",1,"mat-error"],hostVars:1,hostBindings:function(e,i){2&e&&ze("id",i.id)},inputs:{id:"id"},features:[$t([{provide:Vte,useExisting:n}])]}),n})(),bke={transitionMessages:Kr("transitionMessages",[ki("enter",gn({opacity:1,transform:"translateY(0%)"})),Li("void => enter",[gn({opacity:0,transform:"translateY(-5px)"}),ji("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},kh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n}),n})(),xke=new pe("MatHint"),Nv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["mat-label"]]}),n})(),Cke=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["mat-placeholder"]]}),n})(),Mke=new pe("MatPrefix"),wke=new pe("MatSuffix"),Lte=0,Eke=ko(class{constructor(n){this._elementRef=n}},"primary"),Tke=new pe("MAT_FORM_FIELD_DEFAULT_OPTIONS"),sg=new pe("MatFormField"),pd=(()=>{class n extends Eke{constructor(e,i,r,o,s,a,l){super(e),this._changeDetectorRef=i,this._dir=r,this._defaults=o,this._platform=s,this._ngZone=a,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new ke,this._hideRequiredMarker=!1,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+Lte++,this._labelId="mat-form-field-label-"+Lte++,this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==l,this.appearance=o?.appearance||"legacy",o&&(this._hideRequiredMarker=Boolean(o.hideRequiredMarker),o.color&&(this.color=this.defaultColor=o.color))}get appearance(){return this._appearance}set appearance(e){let i=this._appearance;this._appearance=e||this._defaults?.appearance||"legacy","outline"===this._appearance&&i!==e&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Rt(e)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(e){this._explicitFormFieldControl=e}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();let e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-form-field-type-${e.controlType}`),e.stateChanges.pipe(zn(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(st(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(st(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Jt(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(zn(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(zn(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(st(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,_i(this._label.nativeElement,"transitionend").pipe(Qt(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||"auto"}_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)}}_validateControlChild(){}updateOutlineGap(){let e=this._label?this._label.nativeElement:null,i=this._connectionContainerRef.nativeElement,r=".mat-form-field-outline-start",o=".mat-form-field-outline-gap";if("outline"!==this.appearance||!this._platform.isBrowser)return;if(!e||!e.children.length||!e.textContent.trim()){let u=i.querySelectorAll(`${r}, ${o}`);for(let d=0;d<u.length;d++)u[d].style.width="0";return}if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);let s=0,a=0,l=i.querySelectorAll(r),c=i.querySelectorAll(o);if(this._label&&this._label.nativeElement.children.length){let u=i.getBoundingClientRect();if(0===u.width&&0===u.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);let d=this._getStartEnd(u),p=e.children,h=this._getStartEnd(p[0].getBoundingClientRect()),f=0;for(let m=0;m<p.length;m++)f+=p[m].offsetWidth;s=Math.abs(h-d)-5,a=f>0?.75*f+10:0}for(let u=0;u<l.length;u++)l[u].style.width=`${s}px`;for(let u=0;u<c.length;u++)c[u].style.width=`${a}px`;this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}_getStartEnd(e){return this._dir&&"rtl"===this._dir.value?e.right:e.left}_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)(M(Re),M(nn),M($i,8),M(Tke,8),M(oi),M(_t),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-form-field"]],contentQueries:function(e,i,r){if(1&e&&(Ei(r,kh,5),Ei(r,kh,7),Ei(r,Nv,5),Ei(r,Nv,7),Ei(r,Cke,5),Ei(r,Vte,5),Ei(r,xke,5),Ei(r,Mke,5),Ei(r,wke,5)),2&e){let o;Ne(o=Le())&&(i._controlNonStatic=o.first),Ne(o=Le())&&(i._controlStatic=o.first),Ne(o=Le())&&(i._labelChildNonStatic=o.first),Ne(o=Le())&&(i._labelChildStatic=o.first),Ne(o=Le())&&(i._placeholderChild=o.first),Ne(o=Le())&&(i._errorChildren=o),Ne(o=Le())&&(i._hintChildren=o),Ne(o=Le())&&(i._prefixChildren=o),Ne(o=Le())&&(i._suffixChildren=o)}},viewQuery:function(e,i){if(1&e&&(ot(ike,7),ot(rke,5),ot(oke,5)),2&e){let r;Ne(r=Le())&&(i._connectionContainerRef=r.first),Ne(r=Le())&&(i._inputContainerRef=r.first),Ne(r=Le())&&(i._label=r.first)}},hostAttrs:[1,"mat-form-field"],hostVars:40,hostBindings:function(e,i){2&e&&et("mat-form-field-appearance-standard","standard"==i.appearance)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-appearance-legacy","legacy"==i.appearance)("mat-form-field-invalid",i._control.errorState)("mat-form-field-can-float",i._canLabelFloat())("mat-form-field-should-float",i._shouldLabelFloat())("mat-form-field-has-label",i._hasFloatingLabel())("mat-form-field-hide-placeholder",i._hideControlPlaceholder())("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-focused",i._control.focused)("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"))("_mat-animation-noopable",!i._animationsEnabled)},inputs:{color:"color",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel",floatLabel:"floatLabel"},exportAs:["matFormField"],features:[$t([{provide:sg,useExisting:n}]),tt],ngContentSelectors:vke,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",3,"cdkObserveContentDisabled","cdkObserveContent",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix",3,"cdkObserveContentDisabled","cdkObserveContent"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(e,i){1&e&&(xi(_ke),_(0,"div",0)(1,"div",1,2),P("click",function(o){return i._control.onContainerClick&&i._control.onContainerClick(o)}),E(3,ske,9,0,"ng-container",3),E(4,ake,2,1,"div",4),_(5,"div",5,6),Vn(7),_(8,"span",7),E(9,dke,5,16,"label",8),v()(),E(10,pke,2,0,"div",9),v(),E(11,hke,2,4,"div",10),_(12,"div",11),E(13,fke,2,1,"div",12),E(14,gke,5,2,"div",13),v()()),2&e&&(C(3),y("ngIf","outline"==i.appearance),C(1),y("ngIf",i._prefixChildren.length),C(5),y("ngIf",i._hasFloatingLabel()),C(1),y("ngIf",i._suffixChildren.length),C(1),y("ngIf","outline"!=i.appearance),C(1),y("ngSwitch",i._getDisplayedMessages()),C(1),y("ngSwitchCase","error"),C(1),y("ngSwitchCase","hint"))},dependencies:[Be,Cr,Ur,wh],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.cdk-high-contrast-active .mat-form-field-disabled .mat-form-field-label{color:GrayText}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}','.mat-input-element{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-input-element::placeholder{transition:none}._mat-animation-noopable .mat-input-element::-moz-placeholder{transition:none}._mat-animation-noopable .mat-input-element::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-input-element:-ms-input-placeholder{transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}.mat-form-field-type-mat-native-select .mat-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;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px)}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px;border-top-color:GrayText}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:rgba(0,0,0,0)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:GrayText}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}"],encapsulation:2,data:{animation:[bke.transitionMessages]},changeDetection:0}),n})(),ag=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,ln,od,ln]}),n})(),Kte=(()=>{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)(M(Eu),M(Re))},n.\u0275dir=He({type:n}),n})(),lg=(()=>{class n extends Kte{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,features:[tt]}),n})(),No=new pe("NgValueAccessor"),Dke={provide:No,useExisting:Jn(()=>Ake),multi:!0},Ake=(()=>{class n extends lg{writeValue(e){this.setProperty("checked",e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&P("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[$t([Dke]),tt]}),n})(),Ike={provide:No,useExisting:Jn(()=>Bv),multi:!0},Rke=new pe("CompositionEventMode"),Bv=(()=>{class n extends Kte{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){let n=Yl()?Yl().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)(M(Eu),M(Re),M(Rke,8))},n.\u0275dir=He({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&&P("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:[$t([Ike]),tt]}),n})();function Fh(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function Zte(n){return null!=n&&"number"==typeof n.length}var Lo=new pe("NgValidators"),Nh=new pe("NgAsyncValidators"),kke=/^(?=.{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])?)*$/,Fo=class{static min(t){return Jte(t)}static max(t){return $te(t)}static required(t){return ene(t)}static requiredTrue(t){return tne(t)}static email(t){return nne(t)}static minLength(t){return ine(t)}static maxLength(t){return rne(t)}static pattern(t){return one(t)}static nullValidator(t){return null}static compose(t){return dne(t)}static composeAsync(t){return pne(t)}};function Jte(n){return t=>{if(Fh(t.value)||Fh(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function $te(n){return t=>{if(Fh(t.value)||Fh(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ene(n){return Fh(n.value)?{required:!0}:null}function tne(n){return!0===n.value?null:{required:!0}}function nne(n){return Fh(n.value)||kke.test(n.value)?null:{email:!0}}function ine(n){return t=>Fh(t.value)||!Zte(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function rne(n){return t=>Zte(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function one(n){if(!n)return P2;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(Fh(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function P2(n){return null}function sne(n){return null!=n}function ane(n){return n_(n)?Eo(n):n}function lne(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function cne(n,t){return t.map(e=>e(n))}function une(n){return n.map(t=>function(n){return!n.validate}(t)?t:e=>t.validate(e))}function dne(n){if(!n)return null;let t=n.filter(sne);return 0==t.length?null:function(e){return lne(cne(e,t))}}function UH(n){return null!=n?dne(une(n)):null}function pne(n){if(!n)return null;let t=n.filter(sne);return 0==t.length?null:function(e){return lr(cne(e,t).map(ane)).pipe(L(lne))}}function zH(n){return null!=n?pne(une(n)):null}function Ute(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function hne(n){return n._rawValidators}function fne(n){return n._rawAsyncValidators}function BH(n){return n?Array.isArray(n)?n:[n]:[]}function R2(n,t){return Array.isArray(n)?n.includes(t):n===t}function zte(n,t){let e=BH(t);return BH(n).forEach(r=>{R2(e,r)||e.push(r)}),e}function jte(n,t){return BH(t).filter(e=>!R2(n,e))}var O2=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=UH(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=zH(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}},Fs=class extends O2{get formDirective(){return null}get path(){return null}},Ns=class extends O2{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},VH=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}},V2=(()=>{class n extends VH{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(M(Ns,2))},n.\u0275dir=He({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&et("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:[tt]}),n})(),dw="VALID",I2="INVALID",Lv="PENDING",pw="DISABLED";function gne(n){return(H2(n)?n.validators:n)||null}function Gte(n){return Array.isArray(n)?UH(n):n||null}function _ne(n,t){return(H2(t)?t.asyncValidators:n)||null}function Wte(n){return Array.isArray(n)?zH(n):n||null}function H2(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}var k2=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._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=Gte(this._rawValidators),this._composedAsyncValidatorFn=Wte(this._rawAsyncValidators)}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===dw}get invalid(){return this.status===I2}get pending(){return this.status==Lv}get disabled(){return this.status===pw}get enabled(){return this.status!==pw}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._rawValidators=t,this._composedValidatorFn=Gte(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Wte(t)}addValidators(t){this.setValidators(zte(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(zte(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(jte(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(jte(t,this._rawAsyncValidators))}hasValidator(t){return R2(this._rawValidators,t)}hasAsyncValidator(t){return R2(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=Lv,!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=pw,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=dw,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===dw||this.status===Lv)&&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()?pw:dw}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Lv,this._hasOwnPendingAsyncValidator=!0;let e=ane(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 G,this.statusChanges=new G}_calculateStatus(){return this._allControlsDisabled()?pw:this.errors?I2:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Lv)?Lv:this._anyControlsHaveStatus(I2)?I2:dw}_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){H2(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}},F2=class extends k2{constructor(t,e,i){super(gne(e),_ne(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 At(1002,"")})})(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 At(1e3,"");if(!i[e])throw new At(1001,"")})(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}};function U2(n,t){return[...t.path,n]}function fw(n,t){jH(n,t),t.valueAccessor.writeValue(n.value),n.disabled&&t.valueAccessor.setDisabledState?.(!0),function(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&vne(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&&vne(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 N2(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),B2(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function L2(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function jH(n,t){let e=hne(n);null!==t.validator?n.setValidators(Ute(e,t.validator)):"function"==typeof e&&n.setValidators([e]);let i=fne(n);null!==t.asyncValidator?n.setAsyncValidators(Ute(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();L2(t._rawValidators,r),L2(t._rawAsyncValidators,r)}function B2(n,t){let e=!1;if(null!==n){if(null!==t.validator){let r=hne(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){let r=fne(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return L2(t._rawValidators,i),L2(t._rawAsyncValidators,i),e}function vne(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function yne(n,t){jH(n,t)}function GH(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function bne(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function WH(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===Bv?e=o:function(n){return Object.getPrototypeOf(n.constructor)===lg}(o)?i=o:r=o}),r||i||e||null}var Qke={provide:Fs,useExisting:Jn(()=>Lh)},hw=Promise.resolve(),Lh=(()=>{class n extends Fs{constructor(e,i){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new G,this.form=new F2({},UH(e),zH(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){hw.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),fw(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){hw.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){hw.then(()=>{let i=this._findContainer(e.path),r=new F2({});yne(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){hw.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){hw.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,bne(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)(M(Lo,10),M(Nh,10))},n.\u0275dir=He({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&P("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[$t([Qke]),tt]}),n})();function qte(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Yte(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}var Bh=class extends k2{constructor(t=null,e,i){super(gne(e),_ne(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}),H2(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=Yte(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){qte(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){qte(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){Yte(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}},xne=(()=>{class n extends Fs{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return U2(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=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,features:[tt]}),n})(),Zke={provide:Fs,useExisting:Jn(()=>Jke)},Jke=(()=>{class n extends xne{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){}}return n.\u0275fac=function(e){return new(e||n)(M(Fs,5),M(Lo,10),M(Nh,10))},n.\u0275dir=He({type:n,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[$t([Zke]),tt]}),n})(),$ke={provide:Ns,useExisting:Jn(()=>eFe)},Xte=Promise.resolve(),eFe=(()=>{class n extends Ns{constructor(e,i,r,o,s){super(),this._changeDetectorRef=s,this.control=new Bh,this._registered=!1,this.update=new G,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=WH(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),GH(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(){fw(this.control,this),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){Xte.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=0!==i&&NT(i);Xte.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?U2(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(M(Fs,9),M(Lo,10),M(Nh,10),M(No,10),M(nn,8))},n.\u0275dir=He({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:[$t([$ke]),tt,Ft]}),n})(),tFe={provide:No,useExisting:Jn(()=>qH),multi:!0},qH=(()=>{class n extends lg{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=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&P("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[$t([tFe]),tt]}),n})(),nFe={provide:No,useExisting:Jn(()=>rFe),multi:!0},Cne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),iFe=(()=>{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=ye({token:n,factory:n.\u0275fac,providedIn:Cne}),n})(),rFe=(()=>{class n extends lg{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.onChange=()=>{}}ngOnInit(){this._control=this._injector.get(Ns),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)}}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return n.\u0275fac=function(e){return new(e||n)(M(Eu),M(Re),M(iFe),M(Xn))},n.\u0275dir=He({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&P("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[$t([nFe]),tt]}),n})(),oFe={provide:No,useExisting:Jn(()=>sFe),multi:!0},sFe=(()=>{class n extends lg{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=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,i){1&e&&P("change",function(o){return i.onChange(o.target.value)})("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[$t([oFe]),tt]}),n})(),YH=new pe("NgModelWithFormControlWarning"),aFe={provide:Ns,useExisting:Jn(()=>mw)},mw=(()=>{class n extends Ns{constructor(e,i,r,o){super(),this._ngModelWarningConfig=o,this.update=new G,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=WH(0,r)}set isDisabled(e){}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&N2(i,this,!1),fw(this.form,this),this.form.updateValueAndValidity({emitEvent:!1})}GH(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&N2(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)(M(Lo,10),M(Nh,10),M(No,10),M(YH,8))},n.\u0275dir=He({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[$t([aFe]),tt,Ft]}),n})(),lFe={provide:Fs,useExisting:Jn(()=>Vh)},Vh=(()=>{class n extends Fs{constructor(e,i){super(),this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new G,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&&(B2(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 fw(i,e),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){N2(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,bne(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&&(N2(i||null,e),(n=>n instanceof Bh)(r)&&(fw(r,e),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);yne(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&function(n,t){return B2(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){jH(this.form,this),this._oldForm&&B2(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(M(Lo,10),M(Nh,10))},n.\u0275dir=He({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&P("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[$t([lFe]),tt,Ft]}),n})(),cFe={provide:Fs,useExisting:Jn(()=>Mne)},Mne=(()=>{class n extends xne{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){Sne(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(M(Fs,13),M(Lo,10),M(Nh,10))},n.\u0275dir=He({type:n,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[$t([cFe]),tt]}),n})(),uFe={provide:Fs,useExisting:Jn(()=>wne)},wne=(()=>{class n extends Fs{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 U2(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){Sne(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(M(Fs,13),M(Lo,10),M(Nh,10))},n.\u0275dir=He({type:n,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[$t([uFe]),tt]}),n})();function Sne(n){return!(n instanceof Mne||n instanceof Vh||n instanceof wne)}var dFe={provide:Ns,useExisting:Jn(()=>pFe)},pFe=(()=>{class n extends Ns{constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new G,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=WH(0,o)}set isDisabled(e){}ngOnChanges(e){this._added||this._setUpControl(),GH(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 U2(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)(M(Fs,13),M(Lo,10),M(Nh,10),M(No,10),M(YH,8))},n.\u0275dir=He({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[$t([dFe]),tt,Ft]}),n})(),hFe={provide:No,useExisting:Jn(()=>Tne),multi:!0};function Ene(n,t){return null==n?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var Tne=(()=>{class n extends lg{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=Ene(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=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&P("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[$t([hFe]),tt]}),n})(),Dne=(()=>{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(Ene(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)(M(Re),M(Eu),M(Tne,9))},n.\u0275dir=He({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})(),mFe={provide:No,useExisting:Jn(()=>Ane),multi:!0};function Qte(n,t){return null==n?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var Ane=(()=>{class n extends lg{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,s)=>{o._setSelected(r.indexOf(s.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 s=o;for(let a=0;a<s.length;a++){let c=this._getOptionValue(s[a].value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];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=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,i){1&e&&P("change",function(o){return i.onChange(o.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[$t([mFe]),tt]}),n})(),Ine=(()=>{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(Qte(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Qte(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)(M(Re),M(Eu),M(Ane,9))},n.\u0275dir=He({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})();function Pne(n){return"number"==typeof n?n:parseInt(n,10)}function Rne(n){return"number"==typeof n?n:parseFloat(n)}var cg=(()=>{class n{constructor(){this._validator=P2}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):P2,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=He({type:n,features:[Ft]}),n})(),_Fe={provide:Lo,useExisting:Jn(()=>vFe),multi:!0},vFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>Rne(e),this.createValidator=e=>$te(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({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&&ze("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[$t([_Fe]),tt]}),n})(),yFe={provide:Lo,useExisting:Jn(()=>bFe),multi:!0},bFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>Rne(e),this.createValidator=e=>Jte(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({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&&ze("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[$t([yFe]),tt]}),n})(),xFe={provide:Lo,useExisting:Jn(()=>One),multi:!0},CFe={provide:Lo,useExisting:Jn(()=>gw),multi:!0},One=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=NT,this.createValidator=e=>ene}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({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&&ze("required",i._enabled?"":null)},inputs:{required:"required"},features:[$t([xFe]),tt]}),n})(),gw=(()=>{class n extends One{constructor(){super(...arguments),this.createValidator=e=>tne}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({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&&ze("required",i._enabled?"":null)},features:[$t([CFe]),tt]}),n})(),MFe={provide:Lo,useExisting:Jn(()=>wFe),multi:!0},wFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=NT,this.createValidator=e=>nne}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[$t([MFe]),tt]}),n})(),SFe={provide:Lo,useExisting:Jn(()=>EFe),multi:!0},EFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>Pne(e),this.createValidator=e=>ine(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ze("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[$t([SFe]),tt]}),n})(),TFe={provide:Lo,useExisting:Jn(()=>DFe),multi:!0},DFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>Pne(e),this.createValidator=e=>rne(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ze("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[$t([TFe]),tt]}),n})(),AFe={provide:Lo,useExisting:Jn(()=>IFe),multi:!0},IFe=(()=>{class n extends cg{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>one(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ze("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[$t([AFe]),tt]}),n})(),kne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Cne]}),n})(),jr=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[kne]}),n})(),z2=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:YH,useValue:e.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[kne]}),n})(),PFe=(new Ic("14.2.11"),["trigger"]),RFe=["panel"];function OFe(n,t){if(1&n&&(_(0,"span",8),A(1),v()),2&n){let e=S();C(1),yt(e.placeholder)}}function kFe(n,t){if(1&n&&(_(0,"span",12),A(1),v()),2&n){let e=S(2);C(1),yt(e.triggerValue)}}function FFe(n,t){1&n&&Vn(0,0,["*ngSwitchCase","true"])}function NFe(n,t){1&n&&(_(0,"span",9),E(1,kFe,2,1,"span",10),E(2,FFe,1,0,"ng-content",11),v()),2&n&&(y("ngSwitch",!!S().customTrigger),C(2),y("ngSwitchCase",!0))}function LFe(n,t){if(1&n){let e=Pe();_(0,"div",13)(1,"div",14,15),P("@transformPanel.done",function(r){return oe(e),se(S()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return oe(e),se(S()._handleKeydown(r))}),Vn(3,1),v()()}if(2&n){let e=S();y("@transformPanelWrap",void 0),C(1),Qx("mat-select-panel ",e._getPanelTheme(),""),Pt("transform-origin",e._transformOrigin)("font-size",e._triggerFontSize,"px"),y("ngClass",e.panelClass)("@transformPanel",e.multiple?"showing-multiple":"showing"),ze("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var BFe=[[["mat-select-trigger"]],"*"],VFe=["mat-select-trigger","*"],Fne={transformPanelWrap:Kr("transformPanelWrap",[Li("* => void",Im("@transformPanel",[Am()],{optional:!0}))]),transformPanel:Kr("transformPanel",[ki("void",gn({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),ki("showing",gn({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),ki("showing-multiple",gn({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Li("void => *",ji("120ms cubic-bezier(0, 0, 0.2, 1)")),Li("* => void",ji("100ms 25ms linear",gn({opacity:0})))])},Nne=0,Bne=new pe("mat-select-scroll-strategy"),jFe=new pe("MAT_SELECT_CONFIG"),GFe={provide:Bne,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},WFe=qo(oc(so(Dv(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 ke}})))),qFe=new pe("MatSelectTrigger"),YFe=(()=>{class n extends WFe{constructor(e,i,r,o,s,a,l,c,u,d,p,h,f,m){super(s,o,l,c,d),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=u,this._liveAnnouncer=f,this._defaultOptions=m,this._panelOpen=!1,this._compareWith=(x,g)=>x===g,this._uid="mat-select-"+Nne++,this._triggerAriaLabelledBy=null,this._destroy=new ke,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+Nne++,this._panelDoneAnimatingStream=new ke,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=Qa(()=>{let x=this.options;return x?x.changes.pipe(zn(x),ui(()=>Jt(...x.map(g=>g.onSelectionChange)))):this._ngZone.onStable.pipe(Qt(1),ui(()=>this.optionSelectionChanges))}),this.openedChange=new G,this._openedStream=this.openedChange.pipe(Ye(x=>x),L(()=>{})),this._closedStream=this.openedChange.pipe(Ye(x=>!x),L(()=>{})),this.selectionChange=new G,this.valueChange=new G,this.ngControl&&(this.ngControl.valueAccessor=this),null!=m?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=m.typeaheadDebounceInterval),this._scrollStrategyFactory=h,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}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(Fo.required)??!1}set required(e){this._required=Rt(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=Rt(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=Rt(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=Bi(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new Ah(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(yi(),st(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(st(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(zn(null),st(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._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,s=this._keyManager;if(!s.isTyping()&&o&&!kr(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let a=this.selected;s.onKeydown(e);let l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,r=e.keyCode,o=40===r||38===r,s=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(s||13!==r&&32!==r||!i.activeItem||kr(e))if(!s&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();let a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{let a=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Qt(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._selectionModel.selected.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 wv(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(st(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(st(this._destroy)).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=Jt(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(st(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Jt(...this.options.map(i=>i._stateChanges)).pipe(st(e)).subscribe(()=>{this._changeDetectorRef.markForCheck(),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)(M(Va),M(nn),M(_t),M(cd),M(Re),M($i,8),M(Lh,8),M(Vh,8),M(sg,8),M(Ns,10),vo("tabindex"),M(Bne),M(tw),M(jFe,8))},n.\u0275dir=He({type:n,viewQuery:function(e,i){if(1&e&&(ot(PFe,5),ot(RFe,5),ot(Rh,5)),2&e){let r;Ne(r=Le())&&(i.trigger=r.first),Ne(r=Le())&&(i.panel=r.first),Ne(r=Le())&&(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:[tt,Ft]}),n})(),Hh=(()=>{class n extends YFe{constructor(){super(...arguments),this._scrollTop=0,this._triggerFontSize=0,this._transformOrigin="top",this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}]}_calculateOverlayScroll(e,i,r){let o=this._getItemHeight();return Math.min(Math.max(0,o*e-i+o/2),r)}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(st(this._destroy)).subscribe(()=>{this.panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}open(){super._canOpen()&&(super.open(),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Qt(1)).subscribe(()=>{this._triggerFontSize&&this._overlayDir.overlayRef&&this._overlayDir.overlayRef.overlayElement&&(this._overlayDir.overlayRef.overlayElement.style.fontSize=`${this._triggerFontSize}px`)}))}_scrollOptionIntoView(e){let i=ow(e,this.options,this.optionGroups),r=this._getItemHeight();this.panel.nativeElement.scrollTop=0===e&&1===i?0:_2((e+i)*r,r,this.panel.nativeElement.scrollTop,256)}_positioningSettled(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}_panelDoneAnimating(e){this.panelOpen?this._scrollTop=0:(this._overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),super._panelDoneAnimating(e)}_getChangeEvent(e){return new class{constructor(t,e){this.source=t,this.value=e}}(this,e)}_calculateOverlayOffsetX(){let s,e=this._overlayDir.overlayRef.overlayElement.getBoundingClientRect(),i=this._viewportRuler.getViewportSize(),r=this._isRtl(),o=this.multiple?56:32;if(this.multiple)s=40;else if(this.disableOptionCentering)s=16;else{let c=this._selectionModel.selected[0]||this.options.first;s=c&&c.group?32:16}r||(s*=-1);let a=0-(e.left+s-(r?o:0)),l=e.right+s-i.width+(r?0:o);a>0?s+=a+8:l>0&&(s-=l+8),this._overlayDir.offsetX=Math.round(s),this._overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(e,i,r){let l,o=this._getItemHeight(),s=(o-this._triggerRect.height)/2,a=Math.floor(256/o);return this.disableOptionCentering?0:(l=0===this._scrollTop?e*o:this._scrollTop===r?(e-(this._getItemCount()-a))*o+(o-(this._getItemCount()*o-256)%o):i-o/2,Math.round(-1*l-s))}_checkOverlayWithinViewport(e){let i=this._getItemHeight(),r=this._viewportRuler.getViewportSize(),o=this._triggerRect.top-8,s=r.height-this._triggerRect.bottom-8,a=Math.abs(this._offsetY),c=Math.min(this._getItemCount()*i,256)-a-this._triggerRect.height;c>s?this._adjustPanelUp(c,s):a>o?this._adjustPanelDown(a,o,e):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(e,i){let r=Math.round(e-i);this._scrollTop-=r,this._offsetY-=r,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(e,i,r){let o=Math.round(e-i);if(this._scrollTop+=o,this._offsetY+=o,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=r)return this._scrollTop=r,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_calculateOverlayPosition(){let a,e=this._getItemHeight(),i=this._getItemCount(),r=Math.min(i*e,256),s=i*e-r;a=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),a+=ow(a,this.options,this.optionGroups);let l=r/2;this._scrollTop=this._calculateOverlayScroll(a,l,s),this._offsetY=this._calculateOverlayOffsetY(a,l,s),this._checkOverlayWithinViewport(s)}_getOriginBasedOnOption(){let e=this._getItemHeight(),i=(e-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-i+e/2}px 0px`}_getItemHeight(){return 3*this._triggerFontSize}_getItemCount(){return this.options.length+this.optionGroups.length}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275cmp=R({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(Ei(r,qFe,5),Ei(r,Os,5),Ei(r,rw,5)),2&e){let o;Ne(o=Le())&&(i.customTrigger=o.first),Ne(o=Le())&&(i.options=o),Ne(o=Le())&&(i.optionGroups=o)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:19,hostBindings:function(e,i){1&e&&P("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(ze("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()),et("mat-select-disabled",i.disabled)("mat-select-invalid",i.errorState)("mat-select-required",i.required)("mat-select-empty",i.empty)("mat-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[$t([{provide:kh,useExisting:n},{provide:iw,useExisting:n}]),tt],ngContentSelectors:VFe,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(xi(BFe),_(0,"div",0,1),P("click",function(){return i.toggle()}),_(3,"div",2),E(4,OFe,2,1,"span",3),E(5,NFe,3,2,"span",4),v(),_(6,"div",5),O(7,"div",6),v()(),E(8,LFe,4,14,"ng-template",7),P("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){let r=$e(1);ze("aria-owns",i.panelOpen?i.id+"-panel":null),C(3),y("ngSwitch",i.empty),ze("id",i._valueId),C(1),y("ngSwitchCase",!0),C(1),y("ngSwitchCase",!1),C(3),y("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayMinWidth",null==i._triggerRect?null:i._triggerRect.width)("cdkConnectedOverlayOffsetY",i._offsetY)}},dependencies:[Fn,Cr,Ur,ch,Rh,ig],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{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;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Fne.transformPanelWrap,Fne.transformPanel]},changeDetection:0}),n})(),lc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[GFe],imports:[Me,ss,Av,ln,ud,ag,Av,ln]}),n})();function XFe(n,t){1&n&&(sn(0),_(1,"div",1),A(2," There is a difference between Default - (Enabled/Disabled) and (Enabled/Disabled) "),v(),_(3,"div",1),A(4," Only flags with non default values are sent to the backend. "),v(),an())}function QFe(n,t){1&n&&(_(0,"sup",11),A(1,"1"),v())}function KFe(n,t){1&n&&Ni(0)}function ZFe(n,t){if(1&n){let e=Pe();_(0,"mat-select",12),P("selectionChange",function(r){oe(e);let o=S().$implicit;return se(S().flagChanged.emit({flag:o.flag,status:r.value}))}),_(1,"mat-option",13),A(2),v(),_(3,"mat-option",14),A(4,"Enabled"),v(),_(5,"mat-option",15),A(6,"Disabled"),v()()}if(2&n){let e=S().$implicit,i=S();y("value",e.status),C(2),je(" Default ",i.formatFlagValue(e.defaultValue)," ")}}function JFe(n,t){if(1&n&&(_(0,"td"),A(1),v()),2&n){let e=S().$implicit,i=S();C(1),je("Unsupported By UI ",i.formatFlagValue(e.value),"")}}function $Fe(n,t){if(1&n&&(sn(0),_(1,"tr")(2,"td")(3,"div"),A(4),E(5,QFe,2,0,"sup",7),v()(),E(6,KFe,1,0,"ng-container",8),E(7,ZFe,7,2,"ng-template",null,9,qt),E(9,JFe,2,1,"ng-template",null,10,qt),v(),an()),2&n){let e=t.$implicit,i=$e(8),r=$e(10),o=S();C(4),je(" ",e.flag," "),C(1),y("ngIf",e.sendToServerWhenOverridden),C(1),y("ngIf",o.isEditable(e))("ngIfThen",i)("ngIfElse",r)}}function eNe(n,t){1&n&&(_(0,"div",11),A(1," 1. Sent to server when overridden "),v())}var q2,Vne=(()=>{class n{constructor(){this.hasFlagsSentToServer=!1,this.flagChanged=new G,this.allFlagsReset=new G}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=R({type:n,selectors:[["feature-flag-page-component"]],inputs:{featureFlagStatuses:"featureFlagStatuses",hasFlagsSentToServer:"hasFlagsSentToServer"},outputs:{flagChanged:"flagChanged",allFlagsReset:"allFlagsReset"},decls:11,vars:3,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&&(_(0,"div",0)(1,"div",1)(2,"h2",2),A(3,"WARNING: EXPERIMENTAL FEATURES AHEAD!"),v(),A(4," By enabling these features, you could put the application in an unusable state or expose yourself to untested features or potential bugs. "),v(),E(5,XFe,5,0,"ng-container",3),_(6,"table",4),E(7,$Fe,11,5,"ng-container",5),v(),_(8,"button",6),P("click",function(){return i.allFlagsReset.emit()}),A(9,"Reset All"),v(),E(10,eNe,2,0,"div",7),v()),2&e&&(C(5),y("ngIf",i.hasFlagsSentToServer),C(2),y("ngForOf",i.featureFlagStatuses),C(3),y("ngIf",i.hasFlagsSentToServer))},dependencies:[dn,Be,_n,Hh,Os],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})(),W2=(()=>{class n{constructor(e){this.store=e,this.hasFlagsSentToServer$=this.store.select(Hm).pipe(L(i=>Object.values(i).some(r=>r.sendToServerWhenOverridden))),this.featureFlags$=this.store.select(zA).pipe(Wt(this.store.select(y$),this.store.select(Hm)),L(([i,r,o])=>Object.entries(r).map(([s,a])=>{let l=function(n,t){return void 0===t[n]?"default":t[n]?"enabled":"disabled"}(s,i);return{flag:s,defaultValue:a,status:l,sendToServerWhenOverridden:o[s].sendToServerWhenOverridden}})))}onFlagChanged({flag:e,status:i}){switch(i){case"default":this.store.dispatch(yh({flags:[e]}));break;case"enabled":this.store.dispatch(qm({flags:{[e]:!0}}));break;case"disabled":this.store.dispatch(qm({flags:{[e]:!1}}));break;default:throw new Error("Flag changed to invalid status")}}onAllFlagsReset(){this.store.dispatch(lv())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["feature-flag-page"]],decls:3,vars:6,consts:[[3,"featureFlagStatuses","hasFlagsSentToServer","flagChanged","allFlagsReset"]],template:function(e,i){1&e&&(_(0,"feature-flag-page-component",0),P("flagChanged",function(o){return i.onFlagChanged(o)})("allFlagsReset",function(){return i.onAllFlagsReset()}),B(1,"async"),B(2,"async"),v()),2&e&&y("featureFlagStatuses",U(1,2,i.featureFlags$))("hasFlagsSentToServer",U(2,4,i.hasFlagsSentToServer$))},dependencies:[Vne,Ge],encapsulation:2}),n})(),Hne=(()=>{class n{constructor(e,i){this.store=e,this.dialog=i,this.showFeatureFlags$=this.store.select(E$)}ngOnInit(){this.showFeatureFlags$.subscribe(e=>{if(e)return this.featureFlagsDialog=this.dialog.open(W2),void this.featureFlagsDialog.afterClosed().subscribe(()=>{this.store.dispatch(yh({flags:["enableShowFlags"]})),setTimeout(()=>{window.location.reload()},1)})})}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(vl))},n.\u0275cmp=R({type:n,selectors:[["feature-flag-modal-trigger"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),oNe=["routeContainer"],Une=(()=>{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)(M(gs))},n.\u0275cmp=R({type:n,selectors:[["router-outlet-component"]],viewQuery:function(e,i){if(1&e&&ot(oNe,7,Oi),2&e){let r;Ne(r=Le())&&(i.routeContainer=r.first)}},inputs:{activeNgComponent:"activeNgComponent"},features:[Ft],decls:2,vars:0,consts:[["routeContainer",""]],template:function(e,i){1&e&&Ni(0,null,0)},encapsulation:2,changeDetection:0}),n})(),zne=(()=>{class n{constructor(e,i){this.store=e,this.registry=i,this.activeNgComponent$=Lt([this.store.select(Ra),this.store.select(ZJ)]).pipe(L(([r,o])=>r&&(null===o||Ps(r,o))?this.registry.getNgComponentByRouteKind(r.routeKind):null))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(qc))},n.\u0275cmp=R({type:n,selectors:[["router-outlet"]],decls:2,vars:3,consts:[[3,"activeNgComponent"]],template:function(e,i){1&e&&(O(0,"router-outlet-component",0),B(1,"async")),2&e&&y("activeNgComponent",U(1,1,i.activeNgComponent$))},dependencies:[Une,Ge],encapsulation:2,changeDetection:0}),n})(),jne=(()=>{class n{constructor(e){e.select(Qu).subscribe(i=>{document.body.classList.toggle("dark-mode",i)})}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["dark-mode-supporter"]],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),Uv=(()=>(function(n){n[n.ACTIVE_PLUGIN=0]="ACTIVE_PLUGIN"}(Uv||(Uv={})),Uv))(),Gne=(()=>{class n{constructor(e){this.deepLinker=e,this.onValueChange=new G,this.ngUnsubscribe=new ke,this.onHashChange=_i(window,"popstate",{passive:!0}).pipe(st(this.ngUnsubscribe))}ngOnInit(){this.onHashChange.subscribe(()=>{let e=this.deepLinker.getPluginId();e!==this.activePluginId&&this.onValueChange.emit({prop:Uv.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)(M(fh))},n.\u0275cmp=R({type:n,selectors:[["hash-storage-component"]],inputs:{activePluginId:"activePluginId"},outputs:{onValueChange:"onValueChange"},features:[Ft],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Wne=(()=>{class n{constructor(e){this.store=e,this.activePluginId$=this.store.pipe(vt(Rs))}onValueChanged(e){e.prop===Uv.ACTIVE_PLUGIN&&this.store.dispatch(XA({plugin:e.value}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["hash-storage"]],decls:2,vars:3,consts:[[3,"activePluginId","onValueChange"]],template:function(e,i){1&e&&(_(0,"hash-storage-component",0),P("onValueChange",function(o){return i.onValueChanged(o)}),B(1,"async"),v()),2&e&&y("activePluginId",U(1,1,i.activePluginId$))},dependencies:[Gne,Ge],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),dNe=["*"];function vw(n){return function(){if(void 0===q2&&(q2=null,typeof window<"u")){let n=window;void 0!==n.trustedTypes&&(q2=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return q2}()?.createHTML(n)||n}function qne(n){return Error(`Unable to find icon with the name "${n}"`)}function Yne(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function Xne(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}var cp=class{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}},zv=(()=>{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 cp(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){let s=this._sanitizer.sanitize(mo.HTML,r);if(!s)throw Xne(r);let a=vw(s);return this._addSvgIconConfig(e,i,new cp("",a,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 cp(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){let o=this._sanitizer.sanitize(mo.HTML,i);if(!o)throw Xne(i);let s=vw(o);return this._addSvgIconSetConfig(e,new cp("",s,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(mo.RESOURCE_URL,e);if(!i)throw Yne(e);let r=this._cachedIconsByUrl.get(i);return r?Xt(Y2(r)):this._loadSvgIconFromConfig(new cp(e,null)).pipe(kt(o=>this._cachedIconsByUrl.set(i,o)),L(o=>Y2(o)))}getNamedSvgIcon(e,i=""){let r=Qne(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 s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):wc(qne(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?Xt(Y2(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(L(i=>Y2(i)))}_getSvgFromIconSetConfigs(e,i){let r=this._extractIconWithNameFromAnySet(e,i);return r?Xt(r):lr(i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(fo(a=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(mo.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),Xt(null)})))).pipe(L(()=>{let s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw qne(e);return s}))}_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 s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(kt(i=>e.svgText=i),L(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?Xt(null):this._fetchIcon(e).pipe(kt(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){let o=e.querySelector(`[id="${i}"]`);if(!o)return null;let s=o.cloneNode(!0);if(s.removeAttribute("id"),"svg"===s.nodeName.toLowerCase())return this._setSvgAttributes(s,r);if("symbol"===s.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(s),r);let a=this._svgElementFromString(vw("<svg></svg>"));return a.appendChild(s),this._setSvgAttributes(a,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(vw("<svg></svg>")),r=e.attributes;for(let o=0;o<r.length;o++){let{name:s,value:a}=r[o];"id"!==s&&i.setAttribute(s,a)}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 s=this._sanitizer.sanitize(mo.RESOURCE_URL,i);if(!s)throw Yne(i);let a=this._inProgressUrlFetches.get(s);if(a)return a;let l=this._httpClient.get(s,{responseType:"text",withCredentials:o}).pipe(L(c=>vw(c)),function(n){return en((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}(()=>this._inProgressUrlFetches.delete(s)),Ts());return this._inProgressUrlFetches.set(s,l),l}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(Qne(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 mNe(o)?new cp(o.url,null,o.options):new cp(o,null)}}}return n.\u0275fac=function(e){return new(e||n)(j(Vm,8),j(Tm),j(Ht,8),j(Qs))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Y2(n){return n.cloneNode(!0)}function Qne(n,t){return n+":"+t}function mNe(n){return!(!n.url||!n.options)}new ns,new tl,new ns,new ns;var gNe=ko(class{constructor(n){this._elementRef=n}}),_Ne=new pe("MAT_ICON_DEFAULT_OPTIONS"),vNe=new pe("mat-icon-location",{providedIn:"root",factory:function(){let n=jo(Ht),t=n?n.location:null;return{getPathname:()=>t?t.pathname+t.search:""}}}),Kne=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],bNe=Kne.map(n=>`[${n}]`).join(", "),xNe=/^url\(['"]?#(.*?)['"]?\)$/,Gt=(()=>{class n extends gNe{constructor(e,i,r,o,s,a){super(e),this._iconRegistry=i,this._location=o,this._errorHandler=s,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Sn.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(e){this._inline=Rt(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())}_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(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(bNe),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<i.length;o++)Kne.forEach(s=>{let a=i[o],l=a.getAttribute(s),c=l?l.match(xNe):null;if(c){let u=r.get(a);u||(u=[],r.set(a,u)),u.push({name:s,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(Qt(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)(M(Re),M(zv),vo("aria-hidden"),M(vNe),M(Qs),M(_Ne,8))},n.\u0275cmp=R({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(ze("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),et("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:[tt],ngContentSelectors:dNe,decls:1,vars:0,template:function(e,i){1&e&&(xi(),Vn(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})(),pn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln,ln]}),n})(),CNe=["*",[["mat-toolbar-row"]]],MNe=["*","mat-toolbar-row"],wNe=ko(class{constructor(n){this._elementRef=n}}),SNe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=He({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),Zne=(()=>{class n extends wNe{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)(M(Re),M(oi),M(Ht))},n.\u0275cmp=R({type:n,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&Ei(r,SNe,5),2&e){let o;Ne(o=Le())&&(i._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&et("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[tt],ngContentSelectors:MNe,decls:2,vars:0,template:function(e,i){1&e&&(xi(CNe),Vn(0),Vn(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.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})(),Jne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln,ln]}),n})();function QH(n){return n.state!==Oe.NOT_LOADED&&n.state!==Oe.LOADING}var TNe=vr(Ree,Se(XI,n=>QH(n)?{...n,settings:{...n.settings,reloadEnabled:!n.settings.reloadEnabled}}:n),Se(QI,(n,{periodInMs:t})=>{if(!QH(n))return n;let e=t>=3e4?t:n.settings.reloadPeriodInMs;return{...n,settings:{...n.settings,reloadPeriodInMs:e}}}),Se(KI,(n,{size:t})=>{if(!QH(n))return n;let e=t>0?t:n.settings.pageSize;return{...n,settings:{...n.settings,pageSize:e}}}),Se(Yc,(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 $ne(n,t){return TNe(n,t)}var DNe=["input"],ANe=["label"],INe=function(n){return{enterDuration:n}},PNe=["*"],RNe=new pe("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}});var ONe=0,eie={color:"accent",clickAction:"check-indeterminate"},kNe={provide:No,useExisting:Jn(()=>yl),multi:!0},FNe=oc(ko(qo(so(class{constructor(n){this._elementRef=n}})))),NNe=(()=>{class n extends FNe{constructor(e,i,r,o,s,a,l){super(i),this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=l,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new G,this.indeterminateChange=new G,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||eie,this.color=this.defaultColor=this._options.color||eie.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`${e}${++ONe}`}get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=Rt(e)}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){let i=Rt(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){let i=Rt(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=Rt(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}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_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){nl()},n.\u0275dir=He({type:n,viewQuery:function(e,i){if(1&e&&(ot(DNe,5),ot(ANe,5),ot(Yo,5)),2&e){let r;Ne(r=Le())&&(i._inputElement=r.first),Ne(r=Le())&&(i._labelElement=r.first),Ne(r=Le())&&(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:[tt]}),n})(),yl=(()=>{class n extends NNe{constructor(e,i,r,o,s,a,l){super("mat-checkbox-",e,i,o,s,a,l),this._focusMonitor=r,this._animationClasses={uncheckedToChecked:"mat-checkbox-anim-unchecked-checked",uncheckedToIndeterminate:"mat-checkbox-anim-unchecked-indeterminate",checkedToUnchecked:"mat-checkbox-anim-checked-unchecked",checkedToIndeterminate:"mat-checkbox-anim-checked-indeterminate",indeterminateToChecked:"mat-checkbox-anim-indeterminate-checked",indeterminateToUnchecked:"mat-checkbox-anim-indeterminate-unchecked"}}_createChangeEvent(e){let i=new class{};return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._elementRef.nativeElement}ngAfterViewInit(){super.ngAfterViewInit(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e||this._onBlur()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onInputClick(e){e.stopPropagation(),super._handleInputClick()}focus(e,i){e?this._focusMonitor.focusVia(this._inputElement,e,i):this._inputElement.nativeElement.focus(i)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M(Fr),M(_t),vo("tabindex"),M(Pi,8),M(RNe,8))},n.\u0275cmp=R({type:n,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-checkbox"],hostVars:14,hostBindings:function(e,i){2&e&&(_s("id",i.id),ze("tabindex",null)("aria-label",null)("aria-labelledby",null),et("mat-checkbox-indeterminate",i.indeterminate)("mat-checkbox-checked",i.checked)("mat-checkbox-disabled",i.disabled)("mat-checkbox-label-before","before"==i.labelPosition)("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[$t([kNe]),tt],ngContentSelectors:PNe,decls:17,vars:21,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(e,i){if(1&e&&(xi(),_(0,"label",0,1)(2,"span",2)(3,"input",3,4),P("change",function(o){return i._onInteractionEvent(o)})("click",function(o){return i._onInputClick(o)}),v(),_(5,"span",5),O(6,"span",6),v(),O(7,"span",7),_(8,"span",8),In(),_(9,"svg",9),O(10,"path",10),v(),Js(),O(11,"span",11),v()(),_(12,"span",12,13),P("cdkObserveContent",function(){return i._onLabelTextChange()}),_(14,"span",14),A(15,"\xa0"),v(),Vn(16),v()()),2&e){let r=$e(1),o=$e(13);ze("for",i.inputId),C(2),et("mat-checkbox-inner-container-no-side-margin",!o.textContent||!o.textContent.trim()),C(1),y("id",i.inputId)("required",i.required)("checked",i.checked)("disabled",i.disabled)("tabIndex",i.tabIndex),ze("value",i.value)("name",i.name)("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-checked",i._getAriaChecked())("aria-describedby",i.ariaDescribedby),C(2),y("matRippleTrigger",r)("matRippleDisabled",i._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",On(19,INe,"NoopAnimations"===i._animationMode?0:150))}},dependencies:[Yo,wh],styles:['@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-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 mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),LNe={provide:Lo,useExisting:Jn(()=>BNe),multi:!0},BNe=(()=>{class n extends gw{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[$t([LNe]),tt]}),n})(),tie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Ls=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[_l,ln,od,tie,ln,tie]}),n})(),iie=la({passive:!0}),rie=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return eo;let i=La(e),r=this._monitoredElements.get(i);if(r)return r.subject;let o=new ke,s="cdk-text-field-autofilled",a=l=>{"cdk-text-field-autofill-start"!==l.animationName||i.classList.contains(s)?"cdk-text-field-autofill-end"===l.animationName&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!1}))):(i.classList.add(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,iie),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",a,iie)}}),o}stopMonitoring(e){let i=La(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)(j(oi),j(_t))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ZH=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),HNe=new pe("MAT_INPUT_VALUE_ACCESSOR"),UNe=["button","checkbox","file","hidden","image","radio","range","reset","submit"],zNe=0,jNe=Dv(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new ke}}),Uh=(()=>{class n extends jNe{constructor(e,i,r,o,s,a,l,c,u,d){super(a,o,s,r),this._elementRef=e,this._platform=i,this._autofillMonitor=c,this._formField=d,this._uid="mat-input-"+zNe++,this.focused=!1,this.stateChanges=new ke,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(f=>pH().has(f)),this._iOSKeyupListener=f=>{let m=f.target;!m.value&&0===m.selectionStart&&0===m.selectionEnd&&(m.setSelectionRange(1,1),m.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&&u.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===h,this._isTextarea="textarea"===h,this._isInFormField=!!d,this._isNativeSelect&&(this.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=Rt(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(Fo.required)??!1}set required(e){this._required=Rt(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&pH().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=Rt(e)}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(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){let e=this._formField,i=e&&"legacy"===e.appearance&&!e._hasLabel?.()?null:this.placeholder;if(i!==this._previousPlaceholder){let r=this._elementRef.nativeElement;this._previousPlaceholder=i,i?r.setAttribute("placeholder",i):r.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_validateType(){UNe.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)(M(Re),M(oi),M(Ns,10),M(Lh,8),M(Vh,8),M(cd),M(HNe,10),M(rie),M(_t),M(sg,8))},n.\u0275dir=He({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:12,hostBindings:function(e,i){1&e&&P("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(_s("disabled",i.disabled)("required",i.required),ze("id",i.id)("data-placeholder",i.placeholder)("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required),et("mat-input-server",i._isServer)("mat-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:[$t([{provide:kh,useExisting:n}]),tt,Ft]}),n})(),Ha=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[cd],imports:[ZH,ag,ln,ZH,ag]}),n})();function GNe(n,t){if(1&n&&(_(0,"mat-error"),A(1),v()),2&n){let e=S();C(1),je(" Reload period has to be minimum of ",e.MIN_RELOAD_PERIOD_IN_S," seconds. ")}}function WNe(n,t){1&n&&(_(0,"mat-error"),A(1," Page size has to be a positive integer. "),v())}var oie=(()=>{class n{constructor(){this.reloadToggled=new G,this.reloadPeriodInMsChanged=new G,this.pageSizeChanged=new G,this.MIN_RELOAD_PERIOD_IN_S=30,this.reloadPeriodControl=new Bh(this.MIN_RELOAD_PERIOD_IN_S,[Fo.required,Fo.min(this.MIN_RELOAD_PERIOD_IN_S)]),this.paginationControl=new Bh(1,[Fo.required,Fo.min(1),n=>{let t=Number(n.value);return Math.round(t)===n.value?null:{integer:{value:n.value}}}]),this.ngUnsubscribe=new ke}ngOnInit(){this.reloadPeriodControl.valueChanges.pipe(st(this.ngUnsubscribe),Hr(500),Ye(()=>this.reloadPeriodControl.valid)).subscribe(()=>{this.reloadPeriodControl.valid&&this.reloadPeriodInMsChanged.emit(1e3*this.reloadPeriodControl.value)}),this.paginationControl.valueChanges.pipe(st(this.ngUnsubscribe),Hr(500),Ye(()=>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=R({type:n,selectors:[["settings-dialog-component"]],inputs:{reloadEnabled:"reloadEnabled",reloadPeriodInMs:"reloadPeriodInMs",pageSize:"pageSize"},outputs:{reloadToggled:"reloadToggled",reloadPeriodInMsChanged:"reloadPeriodInMsChanged",pageSizeChanged:"pageSizeChanged"},features:[Ft],decls:14,vars:5,consts:[[1,"reload-toggle"],[3,"checked","change"],["matInput","","type","number","placeholder","Reload Period (seconds)",1,"reload-period",3,"formControl"],[4,"ngIf"],["matInput","","type","number","placeholder","Pagination Limit",1,"page-size",3,"formControl"]],template:function(e,i){1&e&&(_(0,"h3"),A(1,"Settings"),v(),_(2,"div")(3,"div",0)(4,"mat-checkbox",1),P("change",function(){return i.onReloadToggle()}),A(5,"Reload data"),v()(),_(6,"div")(7,"mat-form-field"),O(8,"input",2),v(),E(9,GNe,2,1,"mat-error",3),v()(),_(10,"div")(11,"mat-form-field"),O(12,"input",4),v(),E(13,WNe,2,0,"mat-error",3),v()),2&e&&(C(4),y("checked",i.reloadEnabled),C(4),y("formControl",i.reloadPeriodControl),C(1),y("ngIf",i.reloadPeriodControl.hasError("min")||i.reloadPeriodControl.hasError("required")),C(3),y("formControl",i.paginationControl),C(1),y("ngIf",i.paginationControl.invalid))},dependencies:[Be,Bv,qH,V2,mw,yl,Hte,pd,Uh],styles:["[_nghost-%COMP%] {\n  font-size: 15px;\n}\n\n[_nghost-%COMP%]    > div[_ngcontent-%COMP%] {\n  margin: 10px 0;\n}\n\n[_nghost-%COMP%]    > [_ngcontent-%COMP%]:first-child {\n  margin-top: 0;\n}\n\n[_nghost-%COMP%]    > [_ngcontent-%COMP%]:last-child {\n  margin-bottom: 0;\n}\n\nh3[_ngcontent-%COMP%] {\n  font-size: 20px;\n}\n\n.reload-toggle[_ngcontent-%COMP%] {\n  margin-bottom: 10px;\n}"]}),n})(),sie=(()=>{class n{constructor(e){this.store=e,this.reloadEnabled$=this.store.select(YM),this.reloadPeriodInMs$=this.store.select(XM),this.pageSize$=this.store.select(Km)}onReloadToggled(){this.store.dispatch(XI())}onReloadPeriodInMsChanged(e){this.store.dispatch(QI({periodInMs:e}))}onPageSizeChanged(e){this.store.dispatch(KI({size:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["settings-dialog"]],decls:4,vars:9,consts:[[3,"reloadEnabled","reloadPeriodInMs","pageSize","reloadToggled","reloadPeriodInMsChanged","pageSizeChanged"]],template:function(e,i){1&e&&(_(0,"settings-dialog-component",0),P("reloadToggled",function(){return i.onReloadToggled()})("reloadPeriodInMsChanged",function(o){return i.onReloadPeriodInMsChanged(o)})("pageSizeChanged",function(o){return i.onPageSizeChanged(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("reloadEnabled",U(1,3,i.reloadEnabled$))("reloadPeriodInMs",U(2,5,i.reloadPeriodInMs$))("pageSize",U(3,7,i.pageSize$))},dependencies:[oie,Ge],encapsulation:2}),n})(),aie=(()=>{class n{constructor(e){this.dialog=e}isButtonDisabled(){return this.settingsLoadState===Oe.NOT_LOADED||this.settingsLoadState===Oe.LOADING}openDialog(){this.dialog.open(sie,{width:"400px"})}}return n.\u0275fac=function(e){return new(e||n)(M(vl))},n.\u0275cmp=R({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&&(_(0,"button",0),P("click",function(){return i.openDialog()}),O(1,"mat-icon",1),v()),2&e&&y("disabled",i.isButtonDisabled())},dependencies:[_n,Gt],encapsulation:2}),n})(),lie=(()=>{class n{constructor(e){this.store=e,this.settingsLoadState$=this.store.select(lH)}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["settings-button"]],decls:2,vars:3,consts:[[3,"settingsLoadState"]],template:function(e,i){1&e&&(O(0,"settings-button-component",0),B(1,"async")),2&e&&y("settingsLoadState",U(1,1,i.settingsLoadState$))},dependencies:[aie,Ge],encapsulation:2}),n})(),KNe=(()=>{class n{constructor(e){this._document=e}copy(e){let i=this.beginCopy(e),r=i.copy();return i.destroy(),r}beginCopy(e){return new class{constructor(t,e){this._document=e;let i=this._textarea=this._document.createElement("textarea"),r=i.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",i.setAttribute("aria-hidden","true"),i.value=t,i.readOnly=!0,this._document.body.appendChild(i)}copy(){let t=this._textarea,e=!1;try{if(t){let i=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),e=this._document.execCommand("copy"),i&&i.focus()}}catch{}return e}destroy(){let t=this._textarea;t&&(t.remove(),this._textarea=void 0)}}(e,this._document)}}return n.\u0275fac=function(e){return new(e||n)(j(Ht))},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ZNe=new pe("CDK_COPY_TO_CLIPBOARD_CONFIG"),cie=(()=>{class n{constructor(e,i,r){this._clipboard=e,this._ngZone=i,this.text="",this.attempts=1,this.copied=new G,this._pending=new Set,r&&null!=r.attempts&&(this.attempts=r.attempts)}copy(e=this.attempts){if(e>1){let i=e,r=this._clipboard.beginCopy(this.text);this._pending.add(r);let o=()=>{let s=r.copy();s||!--i||this._destroyed?(this._currentTimeout=null,this._pending.delete(r),r.destroy(),this.copied.emit(s)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(o,1))};o()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}}return n.\u0275fac=function(e){return new(e||n)(M(KNe),M(_t),M(ZNe,8))},n.\u0275dir=He({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(e,i){1&e&&P("click",function(){return i.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),n})(),uie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),die=(()=>{class n{constructor(e){this.dialogRef=e,this.tensorboardDotDevUrl="https://tensorboard.dev/?utm_source=tensorboard"}onClose(){this.dialogRef.close()}getCommandText(){return this.logdir?"tensorboard dev upload --logdir \\\n    '"+this.logdir.replace(/'/g,"'\\''")+"'":"tensorboard dev upload --logdir {logdir}"}}return n.\u0275fac=function(e){return new(e||n)(M(tu))},n.\u0275cmp=R({type:n,selectors:[["tbdev-upload-dialog-component"]],inputs:{logdir:"logdir"},decls:21,vars:4,consts:[["target","_blank","rel","noreferrer noopener",1,"anchor-text",3,"href"],[1,"command"],["mat-icon-button","","title","Click to copy the command",1,"command-copy",3,"cdkCopyToClipboard"],["svgIcon","content_copy_24px"],[1,"bottom-buttons"],["mat-flat-button","",1,"close-button",3,"click"],["mat-flat-button","","target","_blank","rel","noreferrer noopener",1,"learn-more-button",3,"href"]],template:function(e,i){1&e&&(_(0,"h3"),A(1,"Upload to TensorBoard.dev"),v(),_(2,"p")(3,"a",0),A(4," TensorBoard.dev"),v(),A(5," enables you to easily host, track, and share your ML experiments with everyone. You can share a link to the uploaded TensorBoard in papers, blog posts, and social media. This can showcase the results more effectively and helps reproducibility.\n"),v(),_(6,"p"),A(7,"To upload a logdir to TensorBoard.dev, run the command:"),v(),_(8,"div",1)(9,"pre")(10,"code"),A(11),v()(),_(12,"button",2),O(13,"mat-icon",3),v()(),_(14,"p"),A(15," Only certain plugins are currently supported. Uploaded TensorBoards are public and visible to everyone; do not upload sensitive data.\n"),v(),_(16,"div",4)(17,"button",5),P("click",function(){return i.onClose()}),A(18," Close "),v(),_(19,"a",6),A(20," Learn more "),v()()),2&e&&(C(3),Zi("href",i.tensorboardDotDevUrl,zl),C(8),yt(i.getCommandText()),C(1),y("cdkCopyToClipboard",i.getCommandText()),C(7),Zi("href",i.tensorboardDotDevUrl,zl))},dependencies:[cie,_n,Iv,Gt],styles:["div[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:16px 0}[_nghost-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-top:0}[_nghost-%COMP%] > [_ngcontent-%COMP%]:last-child{margin-bottom:0}h3[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:1.5}p[_ngcontent-%COMP%]{color:#212121;font-size:12px;line-height:1.5}body.dark-mode[_nghost-%COMP%]   p[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   p[_ngcontent-%COMP%]{color:#fff}.anchor-text[_ngcontent-%COMP%]{text-decoration:none}.command[_ngcontent-%COMP%]{align-items:center;background:#f5f6f7;border-radius:4px;display:flex;justify-content:space-between;padding:2px 12px}body.dark-mode[_nghost-%COMP%]   .command[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .command[_ngcontent-%COMP%]{background-color:#616161}pre[_ngcontent-%COMP%]{overflow-x:auto}code[_ngcontent-%COMP%]{font-size:14px;line-height:1.5}.bottom-buttons[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:flex-end}.close-button[_ngcontent-%COMP%]{color:#616161;text-transform:uppercase;margin-right:8px}body.dark-mode[_nghost-%COMP%]   .close-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .close-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}[_nghost-%COMP%]   .learn-more-button[_ngcontent-%COMP%]{color:#1976d2;text-transform:uppercase}body.dark-mode   [_nghost-%COMP%]   .learn-more-button[_ngcontent-%COMP%]{color:#42a5f5}"]}),n})(),eLe=J(ov,n=>n.data_location),pie=(()=>{class n{constructor(e){this.store=e,this.logdir$=this.store.pipe(vt(eLe))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tbdev-upload-dialog"]],decls:2,vars:3,consts:[[3,"logdir"]],template:function(e,i){1&e&&(O(0,"tbdev-upload-dialog-component",0),B(1,"async")),2&e&&y("logdir",U(1,1,i.logdir$))},dependencies:[die,Ge],encapsulation:2}),n})();function tLe(n,t){if(1&n){let e=Pe();_(0,"button",1),P("click",function(){return oe(e),se(S().openDialog())}),_(1,"span",2),O(2,"mat-icon",3),A(3," Upload "),v()()}}var nLe=["localhost","127.0.0.1"],hie=(()=>{class n{constructor(e,i){this.window=e,this.dialog=i,this.shown=nLe.includes(e.location.hostname)}openDialog(){this.dialog.open(pie,{width:"560px"})}}return n.\u0275fac=function(e){return new(e||n)(M("window"),M(vl))},n.\u0275cmp=R({type:n,selectors:[["tbdev-upload-button"]],hostVars:2,hostBindings:function(e,i){2&e&&et("shown",i.shown)},decls:1,vars:1,consts:[["mat-stroked-button","",3,"click",4,"ngIf"],["mat-stroked-button","",3,"click"],[1,"button-contents"],["svgIcon","info_outline_24px"]],template:function(e,i){1&e&&E(0,tLe,4,0,"button",0),2&e&&y("ngIf",i.shown)},dependencies:[Be,_n,Gt],styles:["[_nghost-%COMP%]   button.mat-stroked-button[_ngcontent-%COMP%]{background-color:#ff9800;border:1px solid #ebebeb}body.dark-mode   [_nghost-%COMP%]   button.mat-stroked-button[_ngcontent-%COMP%]{background-color:#ef6c00}.button-contents[_ngcontent-%COMP%]{align-items:center;display:flex;text-transform:uppercase}mat-icon[_ngcontent-%COMP%]{margin-right:6px}"]}),n})(),rLe=["mat-menu-item",""];function oLe(n,t){1&n&&(In(),_(0,"svg",2),O(1,"polygon",3),v())}var mie=["*"];function sLe(n,t){if(1&n){let e=Pe();_(0,"div",0),P("keydown",function(r){return oe(e),se(S()._handleKeydown(r))})("click",function(){return oe(e),se(S().closed.emit("click"))})("@transformMenu.start",function(r){return oe(e),se(S()._onAnimationStart(r))})("@transformMenu.done",function(r){return oe(e),se(S()._onAnimationDone(r))}),_(1,"div",1),Vn(2),v()()}if(2&n){let e=S();y("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),ze("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var K2={transformMenu:Kr("transformMenu",[ki("void",gn({opacity:0,transform:"scale(0.8)"})),Li("void => enter",ji("120ms cubic-bezier(0, 0, 0.2, 1)",gn({opacity:1,transform:"scale(1)"}))),Li("* => void",ji("100ms 25ms linear",gn({opacity:0})))]),fadeInItems:Kr("fadeInItems",[ki("showing",gn({opacity:1})),Li("void => *",[gn({opacity:0}),ji("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},aLe=new pe("MatMenuContent"),$H=new pe("MAT_MENU_PANEL"),lLe=qo(so(class{})),nu=(()=>{class n extends lLe{constructor(e,i,r,o,s){super(),this._elementRef=e,this._document=i,this._focusMonitor=r,this._parentMenu=o,this._changeDetectorRef=s,this.role="menuitem",this._hovered=new ke,this._focused=new ke,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()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(Ht),M(Fr),M($H,8),M(nn))},n.\u0275cmp=R({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(e,i){1&e&&P("click",function(o){return i._checkDisabled(o)})("mouseenter",function(){return i._handleMouseEnter()}),2&e&&(ze("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled.toString())("disabled",i.disabled||null),et("mat-menu-item",!0)("mat-menu-item-highlighted",i._highlighted)("mat-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[tt],attrs:rLe,ngContentSelectors:mie,decls:3,vars:3,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["class","mat-menu-submenu-icon","viewBox","0 0 5 10","focusable","false",4,"ngIf"],["viewBox","0 0 5 10","focusable","false",1,"mat-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(e,i){1&e&&(xi(),Vn(0),O(1,"div",0),E(2,oLe,2,0,"svg",1)),2&e&&(C(1),y("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),C(1),y("ngIf",i._triggersSubmenu))},dependencies:[Be,Yo],encapsulation:2,changeDetection:0}),n})(),gie=new pe("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),uLe=0,yw=(()=>{class n{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 Hl,this._tabSubscription=Sn.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new ke,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new G,this.close=this.closed,this.panelId="mat-menu-panel-"+uLe++}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=Rt(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Rt(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}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Sh(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(zn(this._directDescendantItems),ui(e=>Jt(...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._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._directDescendantItems.changes.pipe(zn(this._directDescendantItems),ui(i=>Jt(...i.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,r=this._keyManager;switch(i){case 27:kr(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._ngZone.onStable.pipe(Qt(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(s=>s.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(zn(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)(M(Re),M(_t),M(gie),M(nn))},n.\u0275dir=He({type:n,contentQueries:function(e,i,r){if(1&e&&(Ei(r,aLe,5),Ei(r,nu,5),Ei(r,nu,4)),2&e){let o;Ne(o=Le())&&(i.lazyContent=o.first),Ne(o=Le())&&(i._allItems=o),Ne(o=Le())&&(i.items=o)}},viewQuery:function(e,i){if(1&e&&ot(Vi,5),2&e){let r;Ne(r=Le())&&(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})(),hd=(()=>{class n extends yw{constructor(e,i,r,o){super(e,i,r,o),this._elevationPrefix="mat-elevation-z",this._baseElevation=4}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(_t),M(gie),M(nn))},n.\u0275cmp=R({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,i){2&e&&ze("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[$t([{provide:$H,useExisting:n}]),tt],ngContentSelectors:mie,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(e,i){1&e&&(xi(),E(0,sLe,3,6,"ng-template"))},dependencies:[Fn],styles:['mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[K2.transformMenu,K2.fadeInItems]},changeDetection:0}),n})(),_ie=new pe("mat-menu-scroll-strategy"),pLe={provide:_ie,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},fie=la({passive:!0}),hLe=(()=>{class n{constructor(e,i,r,o,s,a,l,c,u){this._overlay=e,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Sn.EMPTY,this._hoverSubscription=Sn.EMPTY,this._menuCloseSubscription=Sn.EMPTY,this._handleTouchStart=d=>{ew(d)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new G,this.onMenuOpen=this.menuOpened,this.menuClosed=new G,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=s instanceof yw?s:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,fie),a&&(a._triggersSubmenu=this.triggersSubmenu())}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)})))}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,fie),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)}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 yw&&(e._startAnimation(),e._directDescendantItems.changes.pipe(st(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 yw?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(Ye(r=>"void"===r.toState),Qt(1),st(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){this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e)}_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 sc({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",s="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(o,s)):e.setPositionClasses(o,s)})}_setPosition(e,i){let[r,o]="before"===e.xPosition?["end","start"]:["start","end"],[s,a]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[s,a],[u,d]=[r,o],p=0;if(this.triggersSubmenu()){if(d=r="before"===e.xPosition?"start":"end",o=u="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"===s?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(l="top"===s?"bottom":"top",c="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:l,overlayX:u,overlayY:s,offsetY:p},{originX:o,originY:l,overlayX:d,overlayY:s,offsetY:p},{originX:r,originY:c,overlayX:u,overlayY:a,offsetY:-p},{originX:o,originY:c,overlayX:d,overlayY:a,offsetY:-p}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return Jt(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:Xt(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Ye(s=>s!==this._menuItemInstance),Ye(()=>this._menuOpen)):Xt(),i)}_handleMousedown(e){$M(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(Ye(e=>e===this._menuItemInstance&&!e.disabled),Ol(0,f0)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof yw&&this.menu._isAnimating?this.menu._animationDone.pipe(Qt(1),Ol(0,f0),st(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new ks(e.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(e){return new(e||n)(M(tr),M(Re),M(Oi),M(_ie),M($H,8),M(nu,10),M($i,8),M(Fr),M(_t))},n.\u0275dir=He({type:n,hostVars:3,hostBindings:function(e,i){1&e&&P("click",function(o){return i._handleClick(o)})("mousedown",function(o){return i._handleMousedown(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&ze("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen||null)("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})(),fd=(()=>{class n extends hLe{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-menu-trigger"],exportAs:["matMenuTrigger"],features:[tt]}),n})(),zh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[pLe],imports:[Me,ln,_l,ss,ud,ln]}),n})();function fLe(n,t){1&n&&O(0,"mat-icon",8)}function mLe(n,t){1&n&&O(0,"mat-icon",9)}function gLe(n,t){1&n&&O(0,"mat-icon",10)}var Ua=(()=>(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"}(Ua||(Ua={})),Ua))(),vie=(()=>{class n{constructor(){this.DarkModeOverride=Ua,this.onOverrideChanged=new G}getButtonTitle(){let e;switch(this.darkModeOverride){case Ua.DEFAULT:e="Browser default";break;case Ua.DARK_MODE_ON:e="Dark mode";break;case Ua.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=R({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&&(_(0,"button",0),E(1,fLe,1,0,"mat-icon",1),E(2,mLe,1,0,"mat-icon",2),E(3,gLe,1,0,"mat-icon",3),v(),_(4,"mat-menu",null,4)(6,"button",5),P("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DEFAULT)}),_(7,"label"),A(8,"Browser default"),v()(),_(9,"button",6),P("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_OFF)}),_(10,"label"),A(11,"Light"),v()(),_(12,"button",7),P("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_ON)}),_(13,"label"),A(14,"Dark"),v()()()),2&e&&(y("matMenuTriggerFor",$e(5))("ngSwitch",i.darkModeOverride)("title",i.getButtonTitle()),C(1),y("ngSwitchCase",i.DarkModeOverride.DEFAULT),C(1),y("ngSwitchCase",i.DarkModeOverride.DARK_MODE_OFF),C(1),y("ngSwitchCase",i.DarkModeOverride.DARK_MODE_ON))},dependencies:[_n,Gt,hd,nu,fd,Cr,Ur],encapsulation:2}),n})(),yie=(()=>{class n{constructor(e){this.store=e,this.darkModeOverride$=this.store.select(GA).pipe(L(i=>null===i?Ua.DEFAULT:i?Ua.DARK_MODE_ON:Ua.DARK_MODE_OFF))}changeDarkMode(e){let i=null;switch(e){case Ua.DEFAULT:i=null;break;case Ua.DARK_MODE_OFF:i=!1;break;case Ua.DARK_MODE_ON:i=!0}this.store.dispatch(MI({enableDarkMode:i}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["app-header-dark-mode-toggle"]],decls:2,vars:3,consts:[[3,"darkModeOverride","onOverrideChanged"]],template:function(e,i){1&e&&(_(0,"app-header-dark-mode-toggle-component",0),P("onOverrideChanged",function(o){return i.changeDarkMode(o)}),B(1,"async"),v()),2&e&&y("darkModeOverride",U(1,1,i.darkModeOverride$))},dependencies:[vie,Ge],encapsulation:2}),n})();function yLe(n,t){1&n&&Vn(0)}var Mie=["*"];function bLe(n,t){}var xLe=function(n){return{animationDuration:n}},CLe=function(n,t){return{value:n,params:t}},MLe=["tabListContainer"],wLe=["tabList"],SLe=["tabListInner"],ELe=["nextPaginator"],TLe=["previousPaginator"],DLe=["tabBodyWrapper"],ALe=["tabHeader"];function ILe(n,t){}function PLe(n,t){1&n&&E(0,ILe,0,0,"ng-template",10),2&n&&y("cdkPortalOutlet",S().$implicit.templateLabel)}function RLe(n,t){1&n&&A(0),2&n&&yt(S().$implicit.textLabel)}function OLe(n,t){if(1&n){let e=Pe();_(0,"div",6),P("click",function(){let r=oe(e),o=r.$implicit,s=r.index,a=S(),l=$e(1);return se(a._handleClick(o,l,s))})("cdkFocusChange",function(r){let s=oe(e).index;return se(S()._tabFocusChanged(r,s))}),_(1,"div",7),E(2,PLe,1,1,"ng-template",8),E(3,RLe,1,1,"ng-template",null,9,qt),v()()}if(2&n){let e=t.$implicit,i=t.index,r=$e(4),o=S();et("mat-tab-label-active",o.selectedIndex===i),y("id",o._getTabLabelId(i))("ngClass",e.labelClass)("disabled",e.disabled)("matRippleDisabled",e.disabled||o.disableRipple),ze("tabIndex",o._getTabIndex(e,i))("aria-posinset",i+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(i))("aria-selected",o.selectedIndex===i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),C(2),y("ngIf",e.templateLabel)("ngIfElse",r)}}function kLe(n,t){if(1&n){let e=Pe();_(0,"mat-tab-body",11),P("_onCentered",function(){return oe(e),se(S()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return oe(e),se(S()._setTabBodyWrapperHeight(r))}),v()}if(2&n){let e=t.$implicit,i=t.index,r=S();et("mat-tab-body-active",r.selectedIndex===i),y("id",r._getTabContentId(i))("ngClass",e.bodyClass)("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),ze("tabindex",null!=r.contentTabIndex&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))}}var FLe=new pe("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}}),bie=(()=>{class n{constructor(e,i,r,o){this._elementRef=e,this._ngZone=i,this._inkBarPositioner=r,this._animationMode=o}alignToElement(e){this.show(),this._ngZone.run(()=>{this._ngZone.onStable.pipe(Qt(1)).subscribe(()=>{let i=this._inkBarPositioner(e),r=this._elementRef.nativeElement;r.style.left=i.left,r.style.width=i.width})})}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(_t),M(FLe),M(Pi,8))},n.\u0275dir=He({type:n,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(e,i){2&e&&et("_mat-animation-noopable","NoopAnimations"===i._animationMode)}}),n})(),LLe=new pe("MatTabContent"),wie=new pe("MatTabLabel"),Sie=new pe("MAT_TAB"),Eie=(()=>{class n extends fte{constructor(e,i,r){super(e,i),this._closestTab=r}}return n.\u0275fac=function(e){return new(e||n)(M(Vi),M(Oi),M(Sie,8))},n.\u0275dir=He({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[$t([{provide:wie,useExisting:n}]),tt]}),n})(),BLe=so(class{}),Tie=new pe("MAT_TAB_GROUP"),xw=(()=>{class n extends BLe{constructor(e,i){super(),this._viewContainerRef=e,this._closestTabGroup=i,this.textLabel="",this._contentPortal=null,this._stateChanges=new ke,this.position=null,this.origin=null,this.isActive=!1}get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}get content(){return this._contentPortal}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new ks(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}}return n.\u0275fac=function(e){return new(e||n)(M(Oi),M(Tie,8))},n.\u0275cmp=R({type:n,selectors:[["mat-tab"]],contentQueries:function(e,i,r){if(1&e&&(Ei(r,wie,5),Ei(r,LLe,7,Vi)),2&e){let o;Ne(o=Le())&&(i.templateLabel=o.first),Ne(o=Le())&&(i._explicitContent=o.first)}},viewQuery:function(e,i){if(1&e&&ot(Vi,7),2&e){let r;Ne(r=Le())&&(i._implicitContent=r.first)}},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],features:[$t([{provide:Sie,useExisting:n}]),tt,Ft],ngContentSelectors:Mie,decls:1,vars:0,template:function(e,i){1&e&&(xi(),E(0,yLe,1,0,"ng-template"))},encapsulation:2}),n})(),VLe={translateTab:Kr("translateTab",[ki("center, void, left-origin-center, right-origin-center",gn({transform:"none"})),ki("left",gn({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),ki("right",gn({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Li("* => left, * => right, left => center, right => center",ji("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Li("void => left-origin-center",[gn({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),ji("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Li("void => right-origin-center",[gn({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),ji("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},HLe=(()=>{class n extends da{constructor(e,i,r,o){super(e,i,o),this._host=r,this._centeringSub=Sn.EMPTY,this._leavingSub=Sn.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(zn(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)(M(gs),M(Oi),M(Jn(()=>Die)),M(Ht))},n.\u0275dir=He({type:n,selectors:[["","matTabBodyHost",""]],features:[tt]}),n})(),ULe=(()=>{class n{constructor(e,i,r){this._elementRef=e,this._dir=i,this._dirChangeSubscription=Sn.EMPTY,this._translateTabComplete=new ke,this._onCentering=new G,this._beforeCentering=new G,this._afterLeavingCenter=new G,this._onCentered=new G(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(o=>{this._computePositionAnimationState(o),r.markForCheck()})),this._translateTabComplete.pipe(yi((o,s)=>o.fromState===s.fromState&&o.toState===s.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()})}set position(e){this._positionIndex=e,this._computePositionAnimationState()}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)(M(Re),M($i,8),M(nn))},n.\u0275dir=He({type:n,inputs:{_content:["content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),n})(),Die=(()=>{class n extends ULe{constructor(e,i,r){super(e,i,r)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M($i,8),M(nn))},n.\u0275cmp=R({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(1&e&&ot(da,5),2&e){let r;Ne(r=Le())&&(i._portalHost=r.first)}},hostAttrs:[1,"mat-tab-body"],features:[tt],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(e,i){1&e&&(_(0,"div",0,1),P("@translateTab.start",function(o){return i._onTranslateTabStarted(o)})("@translateTab.done",function(o){return i._translateTabComplete.next(o)}),E(2,bLe,0,0,"ng-template",2),v()),2&e&&y("@translateTab",Qr(3,CLe,i._position,On(1,xLe,i.animationDuration)))},dependencies:[HLe],styles:['.mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}.mat-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[VLe.translateTab]}}),n})(),Aie=new pe("MAT_TABS_CONFIG"),zLe=so(class{}),Iie=(()=>{class n extends zLe{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)(M(Re))},n.\u0275dir=He({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){2&e&&(ze("aria-disabled",!!i.disabled),et("mat-tab-disabled",i.disabled))},inputs:{disabled:"disabled"},features:[tt]}),n})(),xie=la({passive:!0}),WLe=(()=>{class n{constructor(e,i,r,o,s,a,l){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=o,this._ngZone=s,this._platform=a,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new ke,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new ke,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new G,this.indexFocused=new G,s.runOutsideAngular(()=>{_i(e.nativeElement,"mouseleave").pipe(st(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Rt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=Bi(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}ngAfterViewInit(){_i(this._previousPaginator.nativeElement,"touchstart",xie).pipe(st(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),_i(this._nextPaginator.nativeElement,"touchstart",xie).pipe(st(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let e=this._dir?this._dir.change:Xt("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Sh(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(Qt(1)).subscribe(r),Jt(e,i,this._items.changes,this._itemsResized()).pipe(st(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.pipe(st(this._destroyed)).subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?eo:this._items.changes.pipe(zn(this._items),ui(e=>new un(i=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(o=>i.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),Za(1),Ye(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._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!kr(e))switch(e.keyCode){case 13:case 32:this.focusIndex!==this.selectedIndex&&(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){if(!this._items)return!0;let i=this._items?this._items.toArray()[e]:null;return!!i&&!i.disabled}_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 a,l,r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:s}=i.elementRef.nativeElement;"ltr"==this._getLayoutDirection()?(a=o,l=a+s):(l=this._tabListInner.nativeElement.offsetWidth-o,a=l-s);let c=this.scrollDistance,u=this.scrollDistance+r;a<c?this.scrollDistance-=c-a+60:l>u&&(this.scrollDistance+=l-u+60)}_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(),Ka(650,100).pipe(st(Jt(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)(M(Re),M(nn),M(Va),M($i,8),M(_t),M(oi),M(Pi,8))},n.\u0275dir=He({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),qLe=(()=>{class n extends WLe{constructor(e,i,r,o,s,a,l){super(e,i,r,o,s,a,l),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Rt(e)}_itemSelected(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M(Va),M($i,8),M(_t),M(oi),M(Pi,8))},n.\u0275dir=He({type:n,inputs:{disableRipple:"disableRipple"},features:[tt]}),n})(),YLe=(()=>{class n extends qLe{constructor(e,i,r,o,s,a,l){super(e,i,r,o,s,a,l)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M(Va),M($i,8),M(_t),M(oi),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,i,r){if(1&e&&Ei(r,Iie,4),2&e){let o;Ne(o=Le())&&(i._items=o)}},viewQuery:function(e,i){if(1&e&&(ot(bie,7),ot(MLe,7),ot(wLe,7),ot(SLe,7),ot(ELe,5),ot(TLe,5)),2&e){let r;Ne(r=Le())&&(i._inkBar=r.first),Ne(r=Le())&&(i._tabListContainer=r.first),Ne(r=Le())&&(i._tabList=r.first),Ne(r=Le())&&(i._tabListInner=r.first),Ne(r=Le())&&(i._nextPaginator=r.first),Ne(r=Le())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(e,i){2&e&&et("mat-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-tab-header-rtl","rtl"==i._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[tt],ngContentSelectors:Mie,decls:14,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(xi(),_(0,"button",0,1),P("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),O(2,"div",2),v(),_(3,"div",3,4),P("keydown",function(o){return i._handleKeydown(o)}),_(5,"div",5,6),P("cdkObserveContent",function(){return i._onContentChanges()}),_(7,"div",7,8),Vn(9),v(),O(10,"mat-ink-bar"),v()(),_(11,"button",9,10),P("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),O(13,"div",2),v()),2&e&&(et("mat-tab-header-pagination-disabled",i._disableScrollBefore),y("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),C(5),et("_mat-animation-noopable","NoopAnimations"===i._animationMode),C(6),et("mat-tab-header-pagination-disabled",i._disableScrollAfter),y("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[Yo,wh,bie],styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-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-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-list._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}.mat-tab-label::before{margin:5px}@media(max-width: 599px){.mat-tab-label{min-width:72px}}"],encapsulation:2}),n})(),XLe=0,QLe=ko(qo(class{constructor(n){this._elementRef=n}}),"primary"),KLe=(()=>{class n extends QLe{constructor(e,i,r,o){super(e),this._changeDetectorRef=i,this._animationMode=o,this._tabs=new Hl,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=Sn.EMPTY,this._tabLabelSubscription=Sn.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this._disablePagination=!1,this._preserveContent=!1,this.selectedIndexChange=new G,this.focusChange=new G,this.animationDone=new G,this.selectedTabChange=new G(!0),this._groupId=XLe++,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}get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(e){this._dynamicHeight=Rt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=Bi(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=Bi(e,null)}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Rt(e)}get preserveContent(){return this._preserveContent}set preserveContent(e){this._preserveContent=Rt(e)}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement;i.classList.remove(`mat-background-${this.backgroundColor}`),e&&i.classList.add(`mat-background-${e}`),this._backgroundColor=e}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(zn(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 class{};return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Jt(...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){e.disabled||(this.selectedIndex=i.focusIndex=r)}_getTabIndex(e,i){return e.disabled?null:i===(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)(M(Re),M(nn),M(Aie,8),M(Pi,8))},n.\u0275dir=He({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:[tt]}),n})(),Z2=(()=>{class n extends KLe{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M(Aie,8),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,i,r){if(1&e&&Ei(r,xw,5),2&e){let o;Ne(o=Le())&&(i._allTabs=o)}},viewQuery:function(e,i){if(1&e&&(ot(DLe,5),ot(ALe,5)),2&e){let r;Ne(r=Le())&&(i._tabBodyWrapper=r.first),Ne(r=Le())&&(i._tabHeader=r.first)}},hostAttrs:[1,"mat-tab-group"],hostVars:4,hostBindings:function(e,i){2&e&&et("mat-tab-group-dynamic-height",i.dynamicHeight)("mat-tab-group-inverted-header","below"===i.headerPosition)},inputs:{color:"color",disableRipple:"disableRipple"},exportAs:["matTabGroup"],features:[$t([{provide:Tie,useExisting:n}]),tt],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mat-tab-label mat-focus-indicator","role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",3,"id","mat-tab-label-active","ngClass","disabled","matRippleDisabled","click","cdkFocusChange",4,"ngFor","ngForOf"],[1,"mat-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",1,"mat-tab-label","mat-focus-indicator",3,"id","ngClass","disabled","matRippleDisabled","click","cdkFocusChange"],[1,"mat-tab-label-content"],[3,"ngIf","ngIfElse"],["tabTextLabel",""],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering"]],template:function(e,i){1&e&&(_(0,"mat-tab-header",0,1),P("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),E(2,OLe,5,15,"div",2),v(),_(3,"div",3,4),E(5,kLe,1,11,"mat-tab-body",5),v()),2&e&&(y("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),C(2),y("ngForOf",i._tabs),C(1),et("_mat-animation-noopable","NoopAnimations"===i._animationMode),C(2),y("ngForOf",i._tabs))},dependencies:[Fn,dn,Be,da,Yo,nte,Iie,Die,YLe],styles:[".mat-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{padding:0 12px}}@media(max-width: 959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}"],encapsulation:2}),n})(),J2=(oc(qo(so(class{}))),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,ln,eu,_l,od,Ev,ln]}),n})());function ZLe(n,t){if(1&n){let e=Pe();_(0,"span",5),P("click",function(r){oe(e);let o=S().$implicit;return se(S().onActivePluginSelection(r,o.id))}),A(1),v()}if(2&n){let e=S().$implicit;ze("data-plugin-id",e.id),C(1),je(" ",e.tab_name," ")}}function JLe(n,t){1&n&&(_(0,"mat-tab",3),E(1,ZLe,2,2,"ng-template",4),v()),2&n&&y("disabled",!t.$implicit.enabled)}function $Le(n,t){if(1&n&&(_(0,"mat-option",9),A(1),v()),2&n){let e=t.$implicit;y("value",e.id),ze("data-plugin-id",e.id),C(1),je(" ",e.tab_name," ")}}function e3e(n,t){if(1&n){let e=Pe();_(0,"mat-form-field",6)(1,"mat-label"),A(2,"Inactive"),v(),_(3,"mat-select",7),P("selectionChange",function(r){return oe(e),se(S().onDisabledPluginSelectionChanged(r))}),E(4,$Le,2,3,"mat-option",8),v()()}if(2&n){let e=S();C(3),y("value",e.selectedPlugin),C(1),y("ngForOf",e.disabledPlugins)}}var Rie=(()=>{class n{constructor(){this.onPluginSelectionChanged=new G}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=R({type:n,selectors:[["plugin-selector-component"]],inputs:{activePlugins:"activePlugins",disabledPlugins:"disabledPlugins",selectedPlugin:"selectedPlugin"},outputs:{onPluginSelectionChanged:"onPluginSelectionChanged"},decls:3,vars:3,consts:[["animationDuration","100ms",1,"active-plugin-list",3,"selectedIndex"],[3,"disabled",4,"ngFor","ngForOf"],["floatLabel","never",4,"ngIf"],[3,"disabled"],["mat-tab-label",""],[1,"plugin-name",3,"click"],["floatLabel","never"],[3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,i){1&e&&(_(0,"mat-tab-group",0),E(1,JLe,2,1,"mat-tab",1),v(),E(2,e3e,5,2,"mat-form-field",2)),2&e&&(y("selectedIndex",i.getActivePluginIndex()),C(1),y("ngForOf",i.activePlugins),C(1),y("ngIf",i.disabledPlugins.length>0))},dependencies:[Z2,Eie,xw,pd,Nv,Hh,Os,dn,Be],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex:1 1 auto;font-size:14px;height:100%;overflow:hidden}mat-form-field[_ngcontent-%COMP%]{flex:0 0;margin-top:5px;width:130px}mat-label[_ngcontent-%COMP%], mat-select[_ngcontent-%COMP%], mat-option[_ngcontent-%COMP%]{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-primary .mat-tab-list .mat-ink-bar{background-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-tab-label, [_nghost-%COMP%]     .active-plugin-list .mat-tab-link{color:inherit;opacity:.7}[_nghost-%COMP%]     .active-plugin-list .mat-tab-label.mat-tab-label-active, [_nghost-%COMP%]     .active-plugin-list .mat-tab-link.mat-tab-label-active{opacity:1}[_nghost-%COMP%]     .active-plugin-list .mat-tab-header-pagination-chevron{border-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-tab-header-pagination-disabled{visibility:hidden}[_nghost-%COMP%]     .active-plugin-list .mat-tab-disabled{display:none}[_nghost-%COMP%]     .active-plugin-list mat-tab-list, [_nghost-%COMP%]     .active-plugin-list .mat-tab-header, [_nghost-%COMP%]     .active-plugin-list .mat-tab-labels, [_nghost-%COMP%]     .active-plugin-list .mat-tab-label{height:100%}[_nghost-%COMP%]     .active-plugin-list .mat-tab-label{min-width:48px;padding:0;text-transform:uppercase}[_nghost-%COMP%]     .active-plugin-list .mat-tab-label-content{height:100%}[_nghost-%COMP%]     .active-plugin-list mat-tab-header .mat-tab-list{padding:0 36px}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:first-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-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-tab-label-container{left:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:last-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-tab-label-container{right:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-tab-header-pagination{background-color:#f57c00}body.dark-mode   [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-tab-header-pagination{background-color:#ef6c00}"]}),n})(),Oie=J(rv,n=>Object.keys(n).map(t=>Object.assign({},{id:t},n[t]))),n3e=J(Oie,n=>n.filter(t=>!t.enabled)),kie=(()=>{class n{constructor(e){this.store=e,this.activePlugin$=this.store.pipe(vt(Rs)),this.plugins$=this.store.pipe(vt(Oie)),this.disabledPlugins$=this.store.pipe(vt(n3e))}onPluginSelectionChange(e){this.store.dispatch(Zu({plugin:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["plugin-selector"]],decls:4,vars:9,consts:[[3,"activePlugins","disabledPlugins","selectedPlugin","onPluginSelectionChanged"]],template:function(e,i){1&e&&(_(0,"plugin-selector-component",0),P("onPluginSelectionChanged",function(o){return i.onPluginSelectionChange(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("activePlugins",U(1,3,i.plugins$))("disabledPlugins",U(2,5,i.disabledPlugins$))("selectedPlugin",U(3,7,i.activePlugin$))},dependencies:[Rie,Ge],encapsulation:2}),n})(),r3e=J(rv,Rs,(n,t)=>!(!t||!n[t])&&n[t].disable_reload),Fie=(()=>{class n{constructor(e){this.store=e,this.reloadDisabled$=this.store.select(r3e),this.isReloading$=this.store.select(L$).pipe(fr(this.reloadDisabled$),L(([i,r])=>!r&&i===Oe.LOADING)),this.lastLoadedTimeInMs$=this.store.select(iv)}triggerReload(){this.store.dispatch(Fa())}getReloadTitle(e){return e?`Last Updated: ${e}`:"Loading..."}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"button",0),P("click",function(){return i.triggerReload()}),B(1,"async"),B(2,"date"),B(3,"async"),B(4,"async"),O(5,"mat-icon",1),v()),2&e&&(et("loading",U(1,4,i.isReloading$)),y("title",i.getReloadTitle(Jf(2,6,U(3,9,i.lastLoadedTimeInMs$),"medium")))("disabled",U(4,11,i.reloadDisabled$)))},dependencies:[_n,Gt,Ge,U_],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: rotate 2s linear infinite;\n      }\n\n      @keyframes rotate {\n        0% {\n          transform: rotate(0deg);\n        }\n        50% {\n          transform: rotate(180deg);\n        }\n        100% {\n          transform: rotate(360deg);\n        }\n      }"]}),n})(),Nie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["app-header"]],decls:10,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&&(_(0,"mat-toolbar")(1,"span",0),A(2,"TensorBoard"),v(),O(3,"plugin-selector",1)(4,"tbdev-upload-button")(5,"app-header-dark-mode-toggle")(6,"app-header-reload")(7,"settings-button"),_(8,"a",2),O(9,"mat-icon",3),v()())},dependencies:[Iv,Gt,Zne,lie,hie,yie,kie,Fie],styles:["mat-toolbar[_ngcontent-%COMP%]{align-items:center;color:#fff;display:flex;height:64px;overflow:hidden;width:100%}tbdev-upload-button.shown[_ngcontent-%COMP%]{margin:0 8px 0 16px}.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})(),l3e_setDocumentTitle=function(n){document.title=n},Lie=(()=>{class n{ngOnChanges(e){e.title&&l3e_setDocumentTitle(e.title.currentValue)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["page-title-component"]],inputs:{title:"title"},features:[Ft],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Bie="TensorBoard",Vie=(()=>{class n{constructor(e,i){this.store=e,this.customBrandName=i,this.getExperimentId$=this.store.select(Wo).pipe(L(r=>r?.[0])),this.experimentName$=this.getExperimentId$.pipe(Ye(Boolean),xn(r=>this.store.select(vI,{experimentId:r})),L(r=>r?r.name:null)),this.title$=this.store.select(ov).pipe(fr(this.store.select(qu),this.experimentName$),L(([r,o,s])=>{let a=this.customBrandName||Bie;return r.window_title?r.window_title:o===hi.EXPERIMENT&&s?`${s} - ${a}`:a}),zn(this.customBrandName||Bie),yi())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(A$,8))},n.\u0275cmp=R({type:n,selectors:[["page-title"]],decls:2,vars:3,consts:[[3,"title"]],template:function(e,i){1&e&&(O(0,"page-title-component",0),B(1,"async")),2&e&&y("title",U(1,1,i.title$))},dependencies:[Lie,Ge],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),Hie=(()=>{class n{constructor(e){this.store=e,this.ngUnsubscribe=new ke,this.getPageSize$=this.store.pipe(vt(Km)),this.paginatedViewStore=document.createElement("tf-paginated-view-store").tf_paginated_view}ngOnInit(){this.getPageSize$.pipe(st(this.ngUnsubscribe),yi()).subscribe(e=>{this.paginatedViewStore.setLimit(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["settings-polymer-interop"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Uie=(()=>{class n{constructor(e){this.vcRef=e}}return n.\u0275fac=function(e){return new(e||n)(M(Oi))},n.\u0275cmp=R({type:n,selectors:[["tb-webapp"]],decls:9,vars:0,template:function(e,i){1&e&&(O(0,"app-header"),_(1,"main"),O(2,"router-outlet"),v(),O(3,"alert-snackbar")(4,"hash-storage")(5,"page-title")(6,"settings-polymer-interop")(7,"dark-mode-supporter")(8,"feature-flag-modal-trigger"))},dependencies:[Hne,zne,Ite,jne,Wne,Nie,Vie,Hie],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})(),zie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Q_,X_,qc]}),n})(),jie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Gie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:fh,useClass:r$}]}),n})(),Wie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Gie]}),n})(),qie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),Yie={id:TA,name:"",start_time:0},h3e=vr({experimentMap:{[Yie.id]:Yie}});function Xie(n,t){return Fm({data:h3e})(n,t)}var Qie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[wr.forFeature(_I,Xie)]}),n})(),Kie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Pn,lc]}),n})(),Zie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Kie]}),n})(),Jie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,z2,Pn,Ls,Oh,pn,Ha]}),n})();function f3e(){return J(YM,n=>({autoReload:n}))}function m3e(){return J(XM,n=>({autoReloadPeriodInMs:n}))}function g3e(){return J(Km,n=>({pageSize:n}))}var $2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[wr.forFeature(ZI,$ne),Sr.defineGlobalSetting(f3e),Sr.defineGlobalSetting(m3e),Sr.defineGlobalSetting(g3e),Jie]}),n})(),$ie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:"window",useValue:window}],imports:[uie,Me,Pn,Oh,pn]}),n})(),ere=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Pn,pn,J2,Jne,lc,zh,Me,ec,$2,$ie]}),n})(),tre=(()=>{class n{constructor(e,i){let r=e.bypassSecurityTrustResourceUrl("./icon_bundle.svg");i.addSvgIconSet(r)}}return n.\u0275fac=function(e){return new(e||n)(j(Tm),j(zv))},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[pn]}),n})(),tU=new pe("[plugins] Plugin registry config"),nre=new Map,Bs=(()=>{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:s}=r;nre.set(o,s)}}static forPlugin(e,i){return{ngModule:n,providers:[{provide:tU,multi:!0,useValue:{pluginName:e,componentClass:i}}]}}getComponent(e){return nre.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)(j(tU,8))},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),eP=(()=>{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(L(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 s={run:e,begin:String(i),end:String(r)};return void 0!==o&&(s.alert_type=o),this.http.get(this.httpPathPrefix+"/alerts",{params:s})}}return n.\u0275fac=function(e){return new(e||n)(j(ka))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ire=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[eP],imports:[Ku]}),n})(),tP=be("[Debugger] Debugger Loaded"),nP=be("[Debugger] Debugger Unloaded"),Mw=be("[Debugger] A New Debugger Data Polling Event Begins"),iP=be("[Debugger] Debugger Runs Requested"),rP=be("[Debugger] Debugger Runs Loaded",{_as:"props",_p:void 0}),rre=be("[Debugger] Debugger Runs Request Failed"),ww=be("[Debugger] Number and Breakdown of Alerts Requested"),oP=be("[Debugger] Number and Breakdown of Alerts Loaded",{_as:"props",_p:void 0}),sP=be("[Debugger] Alerts Data of an AlertType Is Loaded",{_as:"props",_p:void 0}),Gv=be("[Debugger] Alert Type Focus Toggled",{_as:"props",_p:void 0}),aP=be("[Debugger] Number of Top-Level Executions Requested"),lP=be("[Debugger] Number of Top-Level Executions Loaded",{_as:"props",_p:void 0}),cP=be("[Debugger] ExecutionDigests Requested",{_as:"props",_p:void 0}),uP=be("[Debugger] ExecutionDigests Loaded",{_as:"props",_p:void 0}),Wv=be("[Debugger] Scroll Leftward on the Execution Timeline"),qv=be("[Debugger] Scroll Rightward on the Execution Timeline"),Yv=be("[Debugger] Scroll the Execution Timeline to Given Index",{_as:"props",_p:void 0}),Xv=be("[Debugger] Execution Data Objects Being Focused On",{_as:"props",_p:void 0}),dP=be("[Debugger] Execution Data Objects Loaded",{_as:"props",_p:void 0}),pP=be("[Debugger] Number of Intra-Graph Executions Requested"),hP=be("[Debugger] Number of Intra-Graph Executions Loaded",{_as:"props",_p:void 0}),fP=be("[Debugger] Intra-Graph Execution Data Requested",{_as:"props",_p:void 0}),mP=be("[Debugger] Intra-Graph Execution Data Loaded",{_as:"props",_p:void 0}),Qv=be("[Debugger] Scroll Intra-Graph Execution List to Given Index",{_as:"props",_p:void 0}),Kv=be("[Debugger] Graph Execution is Focused On",{_as:"props",_p:void 0}),Zv=be("[Debugger] Graph Op Is Focused On",{_as:"props",_p:void 0}),gP=be("[Debugger] Graph Op Info Requested",{_as:"props",_p:void 0}),_P=be("[Debugger] Graph Op Info Loaded",{_as:"props",_p:void 0}),vP=be("[Debugger] Source File List Requested."),yP=be("[Debugger] Source File List Loaded",{_as:"props",_p:void 0}),Jv=be("[Debugger] Source File Line Is Focused on",{_as:"props",_p:void 0}),bP=be("[Debugger] Source File Requested",{_as:"props",_p:void 0}),xP=be("[Debugger] Source File Loaded",{_as:"props",_p:void 0}),Sw=be("[Debugger] A Set of Stack Frames Have Been Loaded",{_as:"props",_p:void 0}),Ew="debugger",as=(()=>(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"}(as||(as={})),as))(),md=(()=>(function(n){n.FUNCTION_RECOMPILE_ALERT="FunctionRecompilesAlert",n.INF_NAN_ALERT="InfNanAlert",n.TENSOR_SHAPE_ALERT="TensorShapeAlert"}(md||(md={})),md))(),xs=(()=>(function(n){n[n.EXECUTION=0]="EXECUTION",n[n.GRAPH_OP_CREATION=1]="GRAPH_OP_CREATION"}(xs||(xs={})),xs))();function $v(n){if(null===n.codeLocationFocusType)return null;let t=[];if(n.codeLocationFocusType===xs.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 Tw(n,t){return n.findIndex(e=>e.host_name===t.host_name&&e.file_path===t.file_path)}function nU(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 CP(n){let t=n.sourceCode.focusLineSpec;if(!n.stickToBottommostFrameInFocusedFile)return t;let e=$v(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 D3e=vr({runs:{},runsLoaded:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},activeRunId:null,lastDataPollOnsetTimeMs:-1,lastNonEmptyPollDataTimeMs:1,alerts:{alertsLoaded:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},numAlerts:0,alertsBreakdown:{},alerts:{},executionIndices:{},graphExecutionIndices:{},focusType:null},executions:{numExecutionsLoaded:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},executionDigestsLoaded:{loadingRanges:[],numExecutions:0,pageLoadedSizes:{}},displayCount:50,pageSize:100,scrollBeginIndex:0,focusIndex:null,executionDigests:{},executionData:{}},graphExecutions:{numExecutionsLoaded:{state:Oe.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:Oe.NOT_LOADED,lastLoadedTimeInMs:null},sourceFileList:[],fileContents:[],focusLineSpec:null}},Se(iP,n=>({...n,runsLoaded:{...n.runsLoaded,state:Oe.LOADING}})),Se(rre,n=>({...n,runsLoaded:{...n.runsLoaded,state:Oe.FAILED}})),Se(rP,(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:Oe.LOADED,lastLoadedTimeInMs:Date.now()},activeRunId:e.length>0?e[0]:null}}),Se(Mw,n=>({...n,lastDataPollOnsetTimeMs:Date.now()})),Se(ww,n=>null===n.activeRunId?n:{...n,alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Oe.LOADING}}}),Se(oP,(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:Oe.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e}}}),Se(sP,(n,{numAlerts:t,alertsBreakdown:e,alertType:i,begin:r,alerts:o})=>{if(null===n.activeRunId)return n;let a={},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,f=o[p];if(a[h]=f,f.alert_type===md.INF_NAN_ALERT){let m=f;l[h]=m.execution_index,null!==m.graph_execution_trace_index&&(c[h]=m.graph_execution_trace_index)}}void 0!==n.alerts.alerts[i]&&Object.assign(a,n.alerts.alerts[i]);let u=n.executions.scrollBeginIndex,d=n.graphExecutions.focusIndex;if(i===md.INF_NAN_ALERT&&0===r){let p=o[0];u=Math.max(0,p.execution_index-Math.floor(n.executions.displayCount/2)),null!==p.graph_execution_trace_index&&(d=p.graph_execution_trace_index)}return{...n,executions:{...n.executions,scrollBeginIndex:u},graphExecutions:{...n.graphExecutions,focusIndex:d},alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Oe.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e,alerts:{...n.alerts.alerts,[i]:a},executionIndices:{...n.alerts.executionIndices,[i]:l},graphExecutionIndices:{...n.alerts.graphExecutionIndices,[i]:c}}}}),Se(Gv,(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}),Se(aP,n=>null===n.activeRunId?n:{...n,executions:{...n.executions,numExecutionsLoaded:{...n.executions.numExecutionsLoaded,state:Oe.LOADING}}}),Se(lP,(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:Oe.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.executions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.executions.focusIndex&&(r.executions.focusIndex=0),r}),Se(cP,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges];return-1===nU(i,t.begin,t.end)&&i.push({begin:t.begin,end:t.end}),{...n,executions:{...n.executions,executionDigestsLoaded:{...n.executions.executionDigestsLoaded,loadingRanges:i}}}}),Se(uP,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges],r=nU(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 s=t.begin;s<t.end;++s)o.executions.executionDigests[s]=t.execution_digests[s-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}),Se(Wv,n=>{if(null===n.activeRunId)return n;let e=n.executions.scrollBeginIndex;return e>0&&e--,{...n,executions:{...n.executions,scrollBeginIndex:e}}}),Se(qv,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}}}),Se(Yv,(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}}}),Se(Xv,(n,t)=>{let e={...n,executions:{...n.executions,focusIndex:n.executions.scrollBeginIndex+t.displayIndex},codeLocationFocusType:xs.EXECUTION,sourceCode:{...n.sourceCode}};return e.sourceCode.focusLineSpec=CP(e),e}),Se(dP,(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}),Se(pP,n=>null===n.activeRunId?n:{...n,graphExecutions:{...n.graphExecutions,numExecutionsLoaded:{...n.graphExecutions.numExecutionsLoaded,state:Oe.LOADING}}}),Se(hP,(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:Oe.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.graphExecutions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.graphExecutions.focusIndex&&(i.graphExecutions.focusIndex=0),i}),Se(fP,(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}}}),Se(mP,(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 s=t.begin;s<t.end;++s){let a=Math.floor(s/e);-1!==i.indexOf(a)&&i.splice(i.indexOf(a),1),void 0===r[a]&&(r[a]=0),void 0===o[s]&&r[a]++,o[s]=t.graph_executions[s-t.begin]}return{...n,graphExecutions:{...n.graphExecutions,graphExecutionDataLoadingPages:i,graphExecutionDataPageLoadedSizes:r,graphExecutionData:o}}}),Se(Qv,(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}}}),Se(Kv,(n,t)=>are(n,t.graph_id,t.op_name,t.index)),Se(Zv,(n,t)=>are(n,t.graph_id,t.op_name)),Se(gP,(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,Oe.LOADING),r}),Se(_P,(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 s of e.inputs)!s.data||o.graphs.ops[r].set(s.op_name,s.data);for(let s=0;s<e.consumers.length;++s)for(let a of e.consumers[s])!a.data||o.graphs.ops[r].set(a.op_name,a.data);return o.graphs.ops[r].set(e.op_name,{...e,inputs:e.inputs.map(s=>({op_name:s.op_name,output_slot:s.output_slot})),consumers:e.consumers.map(s=>s.map(a=>({op_name:a.op_name,input_slot:a.input_slot})))}),o.graphs.loadingOps[r].set(e.op_name,Oe.LOADED),o}),Se(vP,n=>({...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Oe.LOADING}}})),Se(yP,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Oe.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:Oe.NOT_LOADED,lines:null};return e}),Se(Jv,(n,t)=>{let e=$v(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},s)=>{r===t.file_path&&(i=s,o===t.lineno&&(e=s))}),-1===e)throw new Error(`Stack frame ${JSON.stringify(t)} is not found.`);return e===i}(e,t.stackFrame)),i}),Se(bP,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=Tw(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:Oe.LOADING}),e}),Se(xP,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=Tw(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:Oe.LOADED,lines:t.lines}),e}),Se(Sw,(n,t)=>{if(null===n.activeRunId)return n;let i={...n,stackFrames:{...n.stackFrames,...t.stackFrames},sourceCode:{...n.sourceCode}};return i.sourceCode.focusLineSpec=CP(i),i}));function are(n,t,e,i){let r={...n,graphs:{...n.graphs,focusedOp:{graphId:t,opName:e}},codeLocationFocusType:xs.GRAPH_OP_CREATION,sourceCode:{...n.sourceCode}};return r.sourceCode.focusLineSpec=CP(r),void 0!==i&&(r.graphExecutions={...n.graphExecutions,focusIndex:i}),r}function lre(n,t){return D3e(n,t)}var ls=Mr(Ew),ug=J(ls,n=>n.runs),iU=J(ls,n=>n.runsLoaded),Vs=J(ls,n=>n.activeRunId),cre=J(ls,n=>n.lastDataPollOnsetTimeMs-n.lastNonEmptyPollDataTimeMs),ey=J(ls,n=>n.alerts),rU=J(ey,n=>n.alertsLoaded),ure=J(ey,n=>n.numAlerts),MP=J(ey,n=>n.focusType),dre=J(ey,n=>null===n.focusType?0:n.alertsBreakdown[n.focusType]||0),pre=J(ey,n=>null===n.focusType||void 0===n.alerts[n.focusType]?null:n.alerts[n.focusType]),hre=J(ey,n=>n.alertsBreakdown),dg=J(ls,n=>n.executions),wP=J(dg,n=>n.numExecutionsLoaded),Dw=J(dg,n=>n.executionDigestsLoaded),jh=J(dg,n=>n.executionDigestsLoaded.numExecutions),Aw=J(dg,n=>n.scrollBeginIndex),ty=J(dg,n=>n.pageSize),ny=J(dg,n=>n.displayCount),fre=J(dg,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}),Gh=J(ls,n=>n.graphExecutions),mre=J(Gh,n=>n.numExecutionsLoaded),Iw=J(ls,n=>n.graphExecutions.executionDigestsLoaded.numExecutions),gre=J(Gh,n=>n.scrollBeginIndex),_re=J(Gh,n=>n.displayCount),vre=J(Gh,n=>n.pageSize),yre=J(Gh,n=>n.graphExecutionDataLoadingPages),bre=J(Gh,n=>n.graphExecutionDataPageLoadedSizes),oU=J(Gh,n=>n.graphExecutionData),sU=J(Gh,n=>n.focusIndex),aU=J(ls,n=>n.graphs),lU=J(aU,n=>{let{focusedOp:t,ops:e}=n;return null===t||void 0===e[t.graphId]?null:e[t.graphId].get(t.opName)||null}),cU=J(aU,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 s={...o};return i.has(o.op_name)&&(s.data=i.get(o.op_name)),s})}}),xre=J(sU,oU,cU,(n,t,e)=>{if(null===n||null===e)return null;let i=e.map(a=>!1),r=[];if(0===e.length)return r;let o=t[n].graph_id,s=Math.max(0,n-200);for(let a=n-1;a>=s;--a)if(void 0!==t[a])for(let l=0;l<e.length&&(i[l]||t[a].graph_id!==o||t[a].op_name!==e[l].op_name||t[a].output_slot!==e[l].output_slot||(r.push(a),i[l]=!0,r.length!==e.length));++l);return r}),Cre=J(aU,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(s=>{let a={...s};return i.has(s.op_name)&&(a.data=i.get(s.op_name)),a}))}}),Mre=J(ls,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 s=t;s<e;++s)o.includes(s)&&(i[s-t]=n.alerts.focusType);return i}),SP=J(ls,n=>n.executions),uU=J(SP,n=>n.focusIndex),wre=J(SP,n=>{if(null===n.focusIndex)return null;let{focusIndex:t,scrollBeginIndex:e,displayCount:i}=n;return t<e||t>=e+i?null:t-e}),dU=J(SP,n=>n.executionData),Sre=J(ls,n=>n.graphs.loadingOps),pU=J(ls,n=>n.stackFrames),pg=J(SP,n=>{let{focusIndex:t,executionData:e}=n;return null===t||void 0===e[t]?null:e[t]}),Pw=J(ls,uU,pg,lU,(n,t,e,i)=>{let{codeLocationFocusType:r}=n;return null===r?null:r===xs.EXECUTION?null===t||null===e?null:{codeLocationType:xs.EXECUTION,opType:e.op_type,executionIndex:t}:null===i?null:{codeLocationType:xs.GRAPH_OP_CREATION,opType:i.op_type,opName:i.op_name}}),Ere=J(ls,$v),EP=J(ls,n=>n.sourceCode),Tre=J(EP,n=>n.sourceFileListLoaded),hU=(J(EP,n=>n.sourceFileList),J(EP,n=>{let{sourceFileList:t,focusLineSpec:e}=n;return null===e?-1:Tw(t,e)})),TP=J(EP,hU,(n,t)=>-1===t?null:n.fileContents[t]||null),DP=J(ls,n=>n.sourceCode.focusLineSpec),Dre=J(ls,n=>n.stickToBottommostFrameInFocusedFile),Are=function(n){return[n]};function I3e(n,t){if(1&n){let e=Pe();_(0,"div",7),P("click",function(){let o=oe(e).$implicit;return se(S().onToggleFocusType.emit(o.type))}),_(1,"div",8),A(2),v(),_(3,"div",9),A(4),v(),O(5,"div"),v()}if(2&n){let e=t.$implicit,i=S();y("ngClass",On(4,Are,e.type===i.focusType?"focus":"")),C(2),yt(e.displayName),C(2),Xp(" ",e.displaySymbol,": ",e.count," ")}}var Ire=(()=>{class n{constructor(){this.numAlerts=0,this.alertsBreakdown=[],this.focusType=null,this.onToggleFocusType=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0)(1,"div",1),A(2,"Debugging"),v(),_(3,"div",2)(4,"div",3),A(5,"Alerts"),v(),_(6,"div",4),A(7),v()(),_(8,"div",5),E(9,I3e,6,6,"div",6),v()()),2&e&&(C(6),y("ngClass",On(3,Are,i.numAlerts>0?"non-zero":"")),C(1),je(" ",i.numAlerts," "),C(2),y("ngForOf",i.alertsBreakdown))},dependencies:[Fn,dn],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})(),R3e={[md.FUNCTION_RECOMPILE_ALERT]:{displayName:"Function recompiles",displaySymbol:"C"},[md.INF_NAN_ALERT]:{displayName:"NaN/\u221e",displaySymbol:"\u221e"},[md.TENSOR_SHAPE_ALERT]:{displayName:"Tensor shape",displaySymbol:"\u25a0"}},Pre=(()=>{class n{constructor(e){this.store=e,this.numAlerts$=this.store.pipe(vt(ure)),this.alertsBreakdown$=this.store.pipe(vt(J(hre,i=>{let r=Object.keys(i);return r.sort(),r.map(o=>({type:o,...R3e[o],count:i[o]}))}))),this.focusType$=this.store.pipe(vt(MP))}onToggleFocusType(e){this.store.dispatch(Gv({alertType:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tf-debugger-v2-alerts"]],decls:4,vars:9,consts:[[3,"numAlerts","alertsBreakdown","focusType","onToggleFocusType"]],template:function(e,i){1&e&&(_(0,"alerts-component",0),P("onToggleFocusType",function(o){return i.onToggleFocusType(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("numAlerts",U(1,3,i.numAlerts$))("alertsBreakdown",U(2,5,i.alertsBreakdown$))("focusType",U(3,7,i.focusType$))},dependencies:[Ire,Ge],encapsulation:2,changeDetection:0}),n})(),Rw={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 AP(n){let{tensorDebugMode:t,array:e}=n;switch(t){case as.NO_TENSOR:if(null!==e)throw new Error("Unexpectedly received non-null debug-tensor-value array under NO_TENSOR mode");return{};case as.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 as.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 as.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:Rw[e[1]],rank:i,size:e[3],shape:r}}case as.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:Rw[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 as.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 fU="[_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 k3e(n,t){1&n&&O(0,"div",4)}function F3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",8),A(2,"NaN"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numNaNs,"")}}function N3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",8),A(2,"-\u221e"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numNegativeInfs,"")}}function L3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",8),A(2,"+\u221e"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numPositiveInfs,"")}}function B3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",10),A(2,"-"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numNegativeFinites,"")}}function V3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",10),A(2,"0"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numZeros,"")}}function H3e(n,t){if(1&n&&(_(0,"div",7)(1,"span",10),A(2,"+"),v(),_(3,"span",9),A(4),v()()),2&n){let e=S(2);C(4),je("\xd7",e.numPositiveFinites,"")}}function U3e(n,t){if(1&n&&(_(0,"div",5),E(1,F3e,5,1,"div",6),E(2,N3e,5,1,"div",6),E(3,L3e,5,1,"div",6),E(4,B3e,5,1,"div",6),E(5,V3e,5,1,"div",6),E(6,H3e,5,1,"div",6),v()),2&n){let e=S();C(1),y("ngIf",void 0!==e.numNaNs&&e.numNaNs>0),C(1),y("ngIf",void 0!==e.numNegativeInfs&&e.numNegativeInfs>0),C(1),y("ngIf",void 0!==e.numPositiveInfs&&e.numPositiveInfs>0),C(1),y("ngIf",void 0!==e.numNegativeFinites&&e.numNegativeFinites>0),C(1),y("ngIf",void 0!==e.numZeros&&e.numZeros>0),C(1),y("ngIf",void 0!==e.numPositiveFinites&&e.numPositiveFinites>0)}}var z3e=function(n){return["container",n]};function j3e(n,t){1&n&&O(0,"debug-tensor-dtype",5),2&n&&y("dtype",S().debugTensorValue.dtype)}function G3e(n,t){1&n&&O(0,"debug-tensor-rank",6),2&n&&y("rank",S().debugTensorValue.rank)}function W3e(n,t){1&n&&O(0,"debug-tensor-shape",7),2&n&&y("shape",S().debugTensorValue.shape)}function q3e(n,t){1&n&&O(0,"debug-tensor-has-inf-or-nan",8),2&n&&y("hasInfOrNaN",S().debugTensorValue.hasInfOrNaN)}function Y3e(n,t){if(1&n&&O(0,"debug-tensor-numeric-breakdown",9),2&n){let e=S();Zi("size",e.debugTensorValue.size),y("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 X3e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["debug-tensor-dtype"]],inputs:{dtype:"dtype"},decls:1,vars:1,template:function(e,i){1&e&&A(0),2&e&&je(" ",i.dtype," ")},styles:[fU]}),n})(),Q3e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["debug-tensor-rank"]],inputs:{rank:"rank"},decls:1,vars:1,template:function(e,i){1&e&&A(0),2&e&&je(" ",i.rank,"D ")},styles:[fU]}),n})(),K3e=(()=>{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=R({type:n,selectors:[["debug-tensor-shape"]],inputs:{shape:"shape"},decls:1,vars:1,template:function(e,i){1&e&&A(0),2&e&&je(" shape:",i.shapeString," ")},styles:[fU]}),n})(),Z3e=(()=>{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=R({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&&(_(0,"div",0)(1,"span"),A(2,"size:"),v(),_(3,"span",1),A(4),v()(),E(5,k3e,1,0,"div",2),E(6,U3e,7,6,"div",3)),2&e&&(C(4),yt(i.size),C(1),y("ngIf",i.breakdownExists),C(1),y("ngIf",i.breakdownExists))},dependencies:[Be],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})(),J3e=(()=>{class n{get infoString(){return this.hasInfOrNaN?"Has \u221e/NaN":"No \u221e/NaN"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0),A(1),v()),2&e&&(y("ngClass",On(2,z3e,i.hasInfOrNaN?"has-inf-or-nan":"")),C(1),je(" ",i.infoString," "))},dependencies:[Fn],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})(),IP=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(E(0,j3e,1,1,"debug-tensor-dtype",0),E(1,G3e,1,1,"debug-tensor-rank",1),E(2,W3e,1,1,"debug-tensor-shape",2),E(3,q3e,1,1,"debug-tensor-has-inf-or-nan",3),E(4,Y3e,1,7,"debug-tensor-numeric-breakdown",4)),2&e&&(y("ngIf",void 0!==i.debugTensorValue.dtype),C(1),y("ngIf",void 0!==i.debugTensorValue.rank),C(1),y("ngIf",void 0!==i.debugTensorValue.shape),C(1),y("ngIf",void 0!==i.debugTensorValue.hasInfOrNaN),C(1),y("ngIf",void 0!==i.debugTensorValue.size))},dependencies:[Be,X3e,J3e,Z3e,Q3e,K3e],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 $3e(n,t){1&n&&(_(0,"div",12),A(1,"\u25b6"),v())}var eBe=function(n,t){return{tensorDebugMode:n,array:t}};function tBe(n,t){if(1&n&&O(0,"debug-tensor-value",17),2&n){let e=S(2).$implicit,i=S(2);y("debugTensorValue",i.parseDebugTensorValue(Qr(1,eBe,i.graphExecutionData[e].tensor_debug_mode,i.graphExecutionData[e].debug_tensor_value)))}}function nBe(n,t){if(1&n){let e=Pe();_(0,"div")(1,"div",13)(2,"button",14),P("click",function(){oe(e);let r=S().$implicit,o=S(2);return se(o.onTensorNameClick.emit({index:r,graph_id:o.graphExecutionData[r].graph_id,op_name:o.graphExecutionData[r].op_name}))}),A(3),v(),_(4,"div",15),A(5),v()(),E(6,tBe,1,4,"debug-tensor-value",16),v()}if(2&n){let e=S().$implicit,i=S(2);C(2),Zi("title",i.getTensorName(e)),C(1),je(" ",i.getTensorName(e)," "),C(2),yt(i.graphExecutionData[e].op_type),C(1),y("ngIf",null!==i.graphExecutionData[e].debug_tensor_value)}}function iBe(n,t){1&n&&(_(0,"div",18),A(1," Loading... "),v())}var rBe=function(n){return{"input-of-focus":n}};function oBe(n,t){if(1&n&&(_(0,"div",5)(1,"div",6)(2,"div",7),E(3,$3e,2,0,"div",8),A(4),v(),E(5,nBe,7,4,"div",9),E(6,iBe,2,0,"ng-template",10,11,qt),v()()),2&n){let e=t.$implicit,i=$e(7),r=S(2);C(1),y("ngClass",On(5,rBe,r.isInputOfFocus(e))),C(2),y("ngIf",e===r.focusIndex),C(1),je(" ",e," "),C(1),y("ngIf",r.graphExecutionData[e])("ngIfElse",i)}}function sBe(n,t){if(1&n){let e=Pe();_(0,"cdk-virtual-scroll-viewport",3),P("scrolledIndexChange",function(r){return oe(e),se(S().onScrolledIndexChange.emit(r))}),E(1,oBe,8,7,"div",4),v()}if(2&n){let e=S();C(1),y("cdkVirtualForOf",e.graphExecutionIndices)}}var Ore=(()=>{class n{constructor(){this.onScrolledIndexChange=new G,this.onTensorNameClick=new G,this.parseDebugTensorValue=AP,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),s=Math.max(r-o,0);this.viewPort.scrollToIndex(s,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=R({type:n,selectors:[["graph-executions-component"]],viewQuery:function(e,i){if(1&e&&ot(eg,5),2&e){let r;Ne(r=Le())&&(i.viewPort=r.first)}},inputs:{numGraphExecutions:"numGraphExecutions",graphExecutionData:"graphExecutionData",graphExecutionIndices:"graphExecutionIndices",focusIndex:"focusIndex",focusInputIndices:"focusInputIndices"},outputs:{onScrolledIndexChange:"onScrolledIndexChange",onTensorNameClick:"onTensorNameClick"},features:[Ft],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&&(_(0,"div",0)(1,"div",1),A(2),v(),E(3,sBe,2,1,"cdk-virtual-scroll-viewport",2),v()),2&e&&(C(2),je(" Graph Executions (",i.numGraphExecutions,") "),C(1),y("ngIf",null!==i.numGraphExecutions&&i.numGraphExecutions>0))},dependencies:[Fn,Be,IP,b2,x2,eg],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})(),kre=(()=>{class n{constructor(e){this.store=e,this.numGraphExecutions$=this.store.pipe(vt(Iw)),this.graphExecutionData$=this.store.pipe(vt(oU)),this.graphExecutionIndices$=this.store.pipe(vt(J(Iw,i=>0===i?null:Array.from({length:i}).map((r,o)=>o)))),this.focusIndex$=this.store.pipe(vt(sU)),this.focusInputIndices$=this.store.pipe(vt(xre))}onScrolledIndexChange(e){this.store.dispatch(Qv({index:e}))}onTensorNameClick(e){this.store.dispatch(Kv(e))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"graph-executions-component",0),P("onScrolledIndexChange",function(o){return i.onScrolledIndexChange(o)})("onTensorNameClick",function(o){return i.onTensorNameClick(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),v()),2&e&&y("numGraphExecutions",U(1,5,i.numGraphExecutions$))("graphExecutionData",U(2,7,i.graphExecutionData$))("graphExecutionIndices",U(3,9,i.graphExecutionIndices$))("focusIndex",U(4,11,i.focusIndex$))("focusInputIndices",U(5,13,i.focusInputIndices$))},dependencies:[Ore,Ge],encapsulation:2}),n})();function cBe(n,t){1&n&&(_(0,"span"),A(1," Output "),v())}function uBe(n,t){1&n&&(_(0,"span"),A(1," Input "),v())}function dBe(n,t){if(1&n&&(_(0,"div",6)(1,"span",7),E(2,cBe,2,0,"span",8),E(3,uBe,2,0,"span",8),v(),A(4),v()),2&n){let e=S();C(1),y("ngSwitch",e.kind),C(1),y("ngSwitchCase","input"),C(1),y("ngSwitchCase","consumer"),C(1),je(" slot: ",e.slot," ")}}function pBe(n,t){if(1&n&&(_(0,"div",9),A(1),v()),2&n){let e=S();C(1),je(" ",e.opData.op_type," ")}}function hBe(n,t){1&n&&(_(0,"span",10),A(1," (Op info unavailable.) "),v())}var fBe=function(n){return[n]},Fre=(()=>{class n{constructor(){this.onOpNameClick=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"button",0)(1,"div",1)(2,"button",2),P("click",function(){return i.onOpNameClick.emit({op_name:i.opName})}),_(3,"span"),A(4),v()(),E(5,dBe,5,4,"div",3),v(),E(6,pBe,2,1,"div",4),E(7,hBe,2,0,"ng-template",null,5,qt),v()),2&e){let r=$e(8);C(2),y("ngClass",On(5,fBe,"self"===i.kind?"self-op-name":"")),C(2),yt(i.opName),C(1),y("ngIf","self"!==i.kind),C(1),y("ngIf",void 0!==i.opData)("ngIfElse",r)}},dependencies:[Fn,Be,Cr,Ur],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 gBe(n,t){if(1&n){let e=Pe();_(0,"div",13)(1,"div",14),A(2),v(),_(3,"graph-op",15),P("onOpNameClick",function(r){oe(e);let o=S(3);return se(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),v()()}if(2&n){let e=t.$implicit,i=t.index;C(2),je("Input slot ",i,":"),C(1),y("kind","input")("opName",e.op_name)("slot",e.output_slot)("opData",e.data)}}function _Be(n,t){if(1&n&&(_(0,"div",11)(1,"div"),E(2,gBe,4,5,"div",12),v()()),2&n){let e=S(2);C(2),y("ngForOf",e.inputOps)}}function vBe(n,t){1&n&&(_(0,"div",16),A(1," (This op has no input tensor.) "),v())}function yBe(n,t){if(1&n){let e=Pe();_(0,"div",23)(1,"graph-op",15),P("onOpNameClick",function(r){oe(e);let o=S(4);return se(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),v()()}if(2&n){let e=t.$implicit;C(1),y("kind","consumer")("opName",e.op_name)("slot",e.input_slot)("opData",e.data)}}function bBe(n,t){if(1&n&&(_(0,"div",19)(1,"div",20),A(2),_(3,"span"),AT(4,21),v(),A(5,") "),v(),E(6,yBe,2,4,"div",22),v()),2&n){let e=t.$implicit,i=t.index;C(2),Xp(" Output slot ",i,": (",e.length," "),C(2),Kx(e.length),IT(4),C(2),y("ngForOf",e)}}function xBe(n,t){if(1&n&&(_(0,"div",17)(1,"div"),E(2,bBe,7,4,"div",18),v()()),2&n){let e=S(2);C(2),y("ngForOf",e.consumerOps)}}function CBe(n,t){if(1&n&&(_(0,"div",24),A(1),_(2,"span"),AT(3,25),v(),A(4," and no consumer.) "),v()),2&n){let e=S(2);C(1),je(" (This op has ",e.opInfo.consumers.length," output "),C(2),Kx(e.opInfo.consumers.length),IT(3)}}function MBe(n,t){if(1&n){let e=Pe();_(0,"div"),E(1,_Be,3,1,"div",4),E(2,vBe,2,0,"ng-template",null,5,qt),_(4,"div",6)(5,"div",7),A(6,"Op:"),v(),_(7,"graph-op",8),P("onOpNameClick",function(r){oe(e);let o=S();return se(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),v()(),E(8,xBe,3,1,"div",9),E(9,CBe,5,2,"ng-template",null,10,qt),v()}if(2&n){let e=$e(3),i=$e(10),r=S();C(1),y("ngIf",r.inputOps.length>0)("ngIfElse",e),C(6),y("kind","self")("opName",r.opInfo.op_name)("opData",r.opInfo),C(1),y("ngIf",r.totalNumConsumers>0)("ngIfElse",i)}}function wBe(n,t){1&n&&(_(0,"span",26),A(1," (Op info unavailable.) "),v())}function SBe(n,t){1&n&&(_(0,"div",27),A(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. "),v())}var Nre=(()=>{class n{constructor(){this.onGraphOpNavigate=new G}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=R({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=PT(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=PT(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&&(_(0,"div")(1,"div"),A(2,"Graph Structure"),v(),_(3,"div",0),E(4,MBe,11,7,"div",1),v(),E(5,wBe,2,0,"ng-template",null,2,qt),E(7,SBe,2,0,"ng-template",null,3,qt),v()),2&e){let r=$e(8);C(4),y("ngIf",null!=i.opInfo)("ngIfElse",r)}},dependencies:[dn,Be,Fre],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})(),Lre=(()=>{class n{constructor(e){this.store=e,this.opInfo$=this.store.pipe(vt(lU)),this.inputOps$=this.store.pipe(vt(cU)),this.consumerOps$=this.store.pipe(vt(Cre))}onGraphOpNavigate(e){this.store.dispatch(Zv(e))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tf-debugger-v2-graph"]],decls:4,vars:9,consts:[[3,"opInfo","inputOps","consumerOps","onGraphOpNavigate"]],template:function(e,i){1&e&&(_(0,"graph-component",0),P("onGraphOpNavigate",function(o){return i.onGraphOpNavigate(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("opInfo",U(1,3,i.opInfo$))("inputOps",U(2,5,i.inputOps$))("consumerOps",U(3,7,i.consumerOps$))},dependencies:[Nre,Ge],encapsulation:2}),n})(),Bre=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0)(1,"div",1),A(2,"Debugger V2 is inactive because no data is available."),v(),_(3,"div"),A(4,"To use the debugger,"),v(),_(5,"div")(6,"ol")(7,"li"),A(8," Add the following line to the beginning of your program: "),_(9,"div",2)(10,"span"),A(11,"tf.debugging.experimental.enable_dump_debug_info("),v(),_(12,"span",3),A(13,"logdir"),v(),A(14,", "),_(15,"span",3),A(16,'tensor_debug_mode="FULL_HEALTH"'),v(),A(17,", "),_(18,"span",3),A(19,"circular_buffer_size=-1"),v(),_(20,"span"),A(21,")"),v()()(),_(22,"li"),A(23,"Re-run the program."),v()()(),_(24,"div",4)(25,"div",5)(26,"div",6),O(27,"img",7),v(),_(28,"div",8),A(29,"Auto-alerts for problems found"),v()(),_(30,"div",5)(31,"div",6),O(32,"img",9),v(),_(33,"div",8),A(34," Integrated debugging to trace problems to their causes "),v()(),_(35,"div",5)(36,"div",6),O(37,"img",10),v(),_(38,"div",8),A(39,"Link log to code"),v()()(),_(40,"div",11)(41,"div",12),A(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. "),v(),_(43,"div",12)(44,"div"),A(45," See "),_(46,"a",13),A(47," documentation "),v(),A(48," of the Python API of Debugger V2. "),v(),_(49,"div"),A(50," See "),_(51,"a",14),A(52," here "),v(),A(53," for other TensorFlow debugging APIs. "),v()()()())},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})(),Vre=(()=>{class n{constructor(e){this.store=e}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tf-debugger-v2-inactive"]],decls:1,vars:0,template:function(e,i){1&e&&O(0,"inactive-component")},dependencies:[Bre],encapsulation:2}),n})(),Ure_getWindow=function(){return window};function Hre(n){let t=Ure_getWindow().require;return new Promise(e=>{t(n,e)})}var gU_loadMonaco=async function(){let n=Ure_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 Hre(["vs/editor/editor.main"]),await Hre(["vs/python/python.contribution"])}};function PP(n){return n?"vs-dark":"vs"}var hg=(()=>{class n{constructor(e){this.resizeEventDebouncePeriodInMs=100,this.onResize=new G,this.ngUnsubscribe$=new ke,this.onResize$=new ke;let i=new ResizeObserver(()=>{this.onResize$.next()});i.observe(e.nativeElement),this.ngUnsubscribe$.subscribe(()=>{i.unobserve(e.nativeElement)})}ngOnInit(){this.onResize$.pipe(Za(1),Hr(this.resizeEventDebouncePeriodInMs),st(this.ngUnsubscribe$)).subscribe(()=>{this.onResize.emit()})}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}}return n.\u0275fac=function(e){return new(e||n)(M(Re))},n.\u0275dir=He({type:n,selectors:[["","detectResize",""]],inputs:{resizeEventDebouncePeriodInMs:"resizeEventDebouncePeriodInMs"},outputs:{onResize:"onResize"}}),n})(),OBe=["codeViewerContainer"],Wre=(()=>{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:PP(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(PP(this.useDarkMode))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["source-code-component"]],viewQuery:function(e,i){if(1&e&&ot(OBe,7,Re),2&e){let r;Ne(r=Le())&&(i.codeViewerContainer=r.first)}},inputs:{lines:"lines",focusedLineno:"focusedLineno",monaco:"monaco",useDarkMode:"useDarkMode"},features:[Ft],decls:2,vars:1,consts:[["detectResize","",1,"code-viewer-container",3,"resizeEventDebouncePeriodInMs","onResize"],["codeViewerContainer",""]],template:function(e,i){1&e&&(_(0,"div",0,1),P("onResize",function(){return i.onResize()}),v()),2&e&&y("resizeEventDebouncePeriodInMs",i.RESIZE_DEBOUNCE_INTERVAL_MS)},dependencies:[hg],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})(),qre=(()=>{class n{constructor(){this.lines=null,this.focusedLineno=null,this.useDarkMode=!1,this.monaco$=null}ngOnInit(){this.monaco$=Eo(gU_loadMonaco()).pipe(L(()=>window.monaco))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(O(0,"source-code-component",0),B(1,"async")),2&e&&y("lines",i.lines)("focusedLineno",i.focusedLineno)("monaco",U(1,4,i.monaco$))("useDarkMode",i.useDarkMode)},dependencies:[Wre,Ge],encapsulation:2}),n})();function NBe(n,t){if(1&n&&(_(0,"div",6),A(1),v()),2&n){let e=S();C(1),je(" ",e.focusedSourceLineSpec.file_path," ")}}function LBe(n,t){1&n&&(_(0,"div",7),A(1," No file selected. Click a line number in the Stack Trace section to show the source code. "),v())}function BBe(n,t){if(1&n&&O(0,"source-code",8),2&n){let e=S();y("lines",e.focusedSourceFileContent.lines)("focusedLineno",e.focusedSourceLineSpec.lineno)("useDarkMode",e.useDarkMode)}}var Yre=(()=>{class n{constructor(){this.focusedSourceFileContent=null,this.focusedSourceLineSpec=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0)(1,"div",1)(2,"div",2),A(3,"Source Code"),v(),E(4,NBe,2,1,"div",3),E(5,LBe,2,0,"ng-template",null,4,qt),v(),E(7,BBe,1,3,"source-code",5),v()),2&e){let r=$e(6);C(4),y("ngIf",null!==i.focusedSourceLineSpec)("ngIfElse",r),C(3),y("ngIf",null!==i.focusedSourceFileContent&&null!==i.focusedSourceLineSpec&&null!==i.focusedSourceFileContent.lines)}},dependencies:[Be,qre],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})(),Xre=(()=>{class n{constructor(e){this.store=e,this.focusedSourceFileContent$=this.store.select(TP),this.focusedSourceLineSpec$=this.store.select(DP),this.useDarkMode$=this.store.select(Qu)}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tf-debugger-v2-source-files"]],decls:4,vars:9,consts:[[3,"focusedSourceFileContent","focusedSourceLineSpec","useDarkMode"]],template:function(e,i){1&e&&(O(0,"source-files-component",0),B(1,"async"),B(2,"async"),B(3,"async")),2&e&&y("focusedSourceFileContent",U(1,3,i.focusedSourceFileContent$))("focusedSourceLineSpec",U(2,5,i.focusedSourceLineSpec$))("useDarkMode",U(3,7,i.useDarkMode$))},dependencies:[Yre,Ge],encapsulation:2}),n})(),UBe=["stackFrameArray"];function zBe(n,t){if(1&n&&(_(0,"span",13),A(1),v()),2&n){let e=S(3);C(1),je(" #",e.executionIndex,": ")}}function jBe(n,t){if(1&n&&(_(0,"span",14),A(1),v()),2&n){let e=S(3);C(1),je(" ",e.opType," ")}}function GBe(n,t){if(1&n&&(_(0,"div"),A(1," Eager execution "),E(2,zBe,2,1,"span",11),E(3,jBe,2,1,"span",12),v()),2&n){let e=S(2);C(2),y("ngIf",null!==e.opType),C(1),y("ngIf",null!==e.opType)}}function WBe(n,t){if(1&n&&(_(0,"span",16),A(1),v()),2&n){let e=S(3);C(1),je(' "',e.opName,'" ')}}function qBe(n,t){if(1&n&&(_(0,"span",14),A(1),v()),2&n){let e=S(3);C(1),je(" ",e.opType," ")}}function YBe(n,t){if(1&n&&(_(0,"div"),A(1," Creation of graph op "),E(2,WBe,2,1,"span",15),E(3,qBe,2,1,"span",12),v()),2&n){let e=S(2);C(2),y("ngIf",null!==e.opName),C(1),y("ngIf",null!==e.opType)}}function XBe(n,t){if(1&n&&(_(0,"span",17),A(1),v()),2&n){let e=S(2);C(1),je(" (Host name: ",e.stackFramesForDisplay[0].host_name,") ")}}function QBe(n,t){if(1&n&&(_(0,"div",7)(1,"span")(2,"span",8),E(3,GBe,4,2,"div",9),E(4,YBe,4,2,"div",9),v()(),_(5,"div"),E(6,XBe,2,1,"span",10),v()()),2&n){let e=S();C(2),y("ngSwitch",e.codeLocationType),C(1),y("ngSwitchCase",e.CodeLocationType.EXECUTION),C(1),y("ngSwitchCase",e.CodeLocationType.GRAPH_OP_CREATION),C(2),y("ngIf",null!==e.stackFramesForDisplay&&e.stackFramesForDisplay.length>0)}}function KBe(n,t){1&n&&(_(0,"div",18),A(1," Click an eager execution or graph op to show its original stack trace. "),v())}function ZBe(n,t){1&n&&(_(0,"div",28),A(1," \u2913 "),v())}var JBe=function(n,t){return[n,t]};function $Be(n,t){if(1&n){let e=Pe();_(0,"div",22)(1,"div",23),A(2),v(),_(3,"div",24),E(4,ZBe,2,0,"div",25),_(5,"div",26),P("click",function(){let o=oe(e).$implicit;return se(S(2).onSourceLineClicked.emit(o))}),A(6),v(),_(7,"div",27),A(8),v()()()}if(2&n){let e=t.$implicit,i=S(2);y("ngClass",Qr(6,JBe,e.belongsToFocusedFile?"focused-file":"",e.focused?"focused-stack-frame":"")),C(1),Zi("title",e.file_path),C(1),je(" ",e.concise_file_path," "),C(2),y("ngIf",i.stickToBottommostFrameInFocusedFile&&e.focused),C(2),je(" Line ",e.lineno," "),C(2),je(" ",e.function_name," ")}}function eVe(n,t){if(1&n&&(_(0,"div",19,20),E(2,$Be,9,9,"div",21),v()),2&n){let e=S();C(2),y("ngForOf",e.stackFramesForDisplay)}}function tVe(n,t){}var Qre=(()=>{class n{constructor(){this.stackFramesForDisplay=null,this.onSourceLineClicked=new G,this.CodeLocationType=xs}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=R({type:n,selectors:[["stack-trace-component"]],viewQuery:function(e,i){if(1&e&&ot(UBe,5),2&e){let r;Ne(r=Le())&&(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&&(_(0,"div",0)(1,"div",1)(2,"span",2),A(3," Stack Trace "),v(),E(4,QBe,7,4,"div",3),E(5,KBe,2,0,"ng-template",null,4,qt),v(),E(7,eVe,3,1,"div",5),E(8,tVe,0,0,"ng-template",null,6,qt),v()),2&e){let r=$e(6),o=$e(9);C(4),y("ngIf",null!==i.codeLocationType)("ngIfElse",r),C(3),y("ngIf",null!==i.stackFramesForDisplay)("ngIfElse",o)}},dependencies:[Fn,dn,Be,Cr,Ur],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})(),Kre=(()=>{class n{constructor(e){this.store=e,this.codeLocationType$=this.store.pipe(vt(J(Pw,i=>null===i?null:i.codeLocationType))),this.opType$=this.store.pipe(vt(J(Pw,i=>null===i?null:i.opType))),this.opName$=this.store.pipe(vt(J(Pw,i=>null===i||i.codeLocationType!==xs.GRAPH_OP_CREATION?null:i.opName))),this.executionIndex$=this.store.pipe(vt(J(Pw,i=>null===i||i.codeLocationType!==xs.EXECUTION?null:i.executionIndex))),this.stickToBottommostFrameInFocusedFile$=this.store.pipe(vt(Dre)),this.stackFramesForDisplay$=this.store.pipe(vt(J(Ere,DP,(i,r)=>{if(null===i)return null;let o=[];for(let s of i){let{host_name:a,file_path:l,lineno:c,function_name:u}=s,d=l.split("/"),h=null!==r&&a===r.host_name&&l===r.file_path;o.push({host_name:a,file_path:l,concise_file_path:d[d.length-1],lineno:c,function_name:u,belongsToFocusedFile:h,focused:h&&c===r.lineno})}return o})))}onSourceLineClicked(e){let{host_name:i,file_path:r,lineno:o,function_name:s}=e;this.store.dispatch(Jv({stackFrame:{host_name:i,file_path:r,lineno:o,function_name:s}}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"stack-trace-component",0),P("onSourceLineClicked",function(o){return i.onSourceLineClicked(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),v()),2&e&&y("codeLocationType",U(1,6,i.codeLocationType$))("opType",U(2,8,i.opType$))("opName",U(3,10,i.opName$))("executionIndex",U(4,12,i.executionIndex$))("stickToBottommostFrameInFocusedFile",U(5,14,i.stickToBottommostFrameInFocusedFile$))("stackFramesForDisplay",U(6,16,i.stackFramesForDisplay$))},dependencies:[Qre,Ge],encapsulation:2}),n})(),rVe=function(n,t){return{tensorDebugMode:n,array:t}};function oVe(n,t){if(1&n&&(_(0,"div",12)(1,"div",13),A(2),v(),_(3,"div",14),O(4,"debug-tensor-value",15),v()()),2&n){let e=t.$implicit,i=t.index,r=S(3);C(2),je("Output slot ",i,":"),C(2),y("debugTensorValue",r.parseDebugTensorValue(Qr(2,rVe,r.tensorDebugMode,e)))}}function sVe(n,t){if(1&n&&(_(0,"div",10),E(1,oVe,5,5,"div",11),v()),2&n){let e=S(2);C(1),y("ngForOf",e.debugTensorValues)}}function aVe(n,t){if(1&n&&(_(0,"div")(1,"div")(2,"div",3)(3,"span",4),A(4," Op: "),v(),_(5,"span",5),A(6),v()(),_(7,"div",3)(8,"span",4),A(9," # of input tensors: "),v(),_(10,"span",6),A(11),v()(),_(12,"div",3)(13,"span",4),A(14," # of output tensors: "),v(),_(15,"span",7),A(16),v(),_(17,"span",8),A(18),v()(),E(19,sVe,2,1,"div",9),v()()),2&n){let e=S();C(6),je(" ",e.focusedExecutionData.op_type," "),C(5),je(" ",null==e.focusedExecutionData.input_tensor_ids?0:e.focusedExecutionData.input_tensor_ids.length," "),C(5),je(" ",null==e.focusedExecutionData.output_tensor_ids?0:e.focusedExecutionData.output_tensor_ids.length," "),C(2),je(" (debug mode: ",e.TensorDebugMode[e.tensorDebugMode],") "),C(1),y("ngIf",e.hasDebugTensorValues)}}function lVe(n,t){}var Zre=(()=>{class n{constructor(){this.tensorDebugMode=as.UNSPECIFIED,this.hasDebugTensorValues=!1,this.debugTensorValues=null,this.debugTensorDtypes=null,this.TensorDebugMode=as,this.parseDebugTensorValue=AP}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0)(1,"div")(2,"span"),A(3),v()(),E(4,aVe,20,5,"div",1),E(5,lVe,0,0,"ng-template",null,2,qt),v()),2&e){let r=$e(6);C(3),je(" Python Execution #",i.focusedExecutionIndex," "),C(1),y("ngIf",null!==i.focusedExecutionData)("ngIfElse",r)}},dependencies:[dn,Be,IP],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})(),Jre="Unknown dtype",$re=(()=>{class n{constructor(e){this.store=e,this.focusedExecutionData$=this.store.pipe(vt(pg)),this.tensorDebugMode$=this.store.pipe(vt(J(pg,i=>null===i?as.UNSPECIFIED:i.tensor_debug_mode))),this.hasDebugTensorValues$=this.store.pipe(vt(J(pg,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(vt(J(pg,i=>null===i?null:i.debug_tensor_values))),this.debugTensorDtypes$=this.store.pipe(vt(J(pg,i=>{if(null===i||null===i.debug_tensor_values||i.tensor_debug_mode!==as.FULL_HEALTH&&i.tensor_debug_mode!==as.SHAPE)return null;let r=[];for(let o of i.debug_tensor_values)if(null===o)r.push(Jre);else{let s=String(i.tensor_debug_mode===as.FULL_HEALTH?o[2]:o[1]);r.push(Rw[s]||Jre)}return r})))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(O(0,"execution-data-component",0),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async")),2&e&&y("focusedExecutionIndex",i.focusedExecutionIndex)("focusedExecutionData",U(1,6,i.focusedExecutionData$))("tensorDebugMode",U(2,8,i.tensorDebugMode$))("hasDebugTensorValues",U(3,10,i.hasDebugTensorValues$))("debugTensorValues",U(4,12,i.debugTensorValues$))("debugTensorDtypes",U(5,14,i.debugTensorDtypes$))},dependencies:[Zre,Ge],encapsulation:2}),n})(),hVe=["sliderWrapper"],cc=la({passive:!1}),vVe={provide:No,useExisting:Jn(()=>up),multi:!0},yVe=oc(ko(so(class{constructor(n){this._elementRef=n}}),"accent")),up=(()=>{class n extends yVe{constructor(e,i,r,o,s,a,l,c){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this._dir=o,this._ngZone=a,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new G,this.input=new G,this.valueChange=new G,this.onTouched=()=>{},this._percent=0,this._isSliding=null,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=Sn.EMPTY,this._pointerDown=u=>{this.disabled||this._isSliding||!Ow(u)&&0!==u.button||this._ngZone.run(()=>{this._touchId=Ow(u)?function(n,t){for(let e=0;e<n.touches.length;e++){let i=n.touches[e].target;if(t===i||t.contains(i))return n.touches[e].identifier}}(u,this._elementRef.nativeElement):void 0;let d=toe(u,this._touchId);if(d){let p=this.value;this._isSliding="pointer",this._lastPointerEvent=u,this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(u),this._focusHostElement(),this._updateValueFromPosition(d),this._valueOnSlideStart=p,u.cancelable&&u.preventDefault(),p!=this.value&&this._emitInputEvent()}})},this._pointerMove=u=>{if("pointer"===this._isSliding){let d=toe(u,this._touchId);if(d){u.cancelable&&u.preventDefault();let p=this.value;this._lastPointerEvent=u,this._updateValueFromPosition(d),p!=this.value&&this._emitInputEvent()}}},this._pointerUp=u=>{"pointer"===this._isSliding&&(!Ow(u)||"number"!=typeof this._touchId||vU(u.changedTouches,this._touchId))&&(u.cancelable&&u.preventDefault(),this._removeGlobalEvents(),this._isSliding=null,this._touchId=void 0,this._valueOnSlideStart!=this.value&&!this.disabled&&this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=l,this.tabIndex=parseInt(s)||0,a.runOutsideAngular(()=>{let u=e.nativeElement;u.addEventListener("mousedown",this._pointerDown,cc),u.addEventListener("touchstart",this._pointerDown,cc)})}get invert(){return this._invert}set invert(e){this._invert=Rt(e)}get max(){return this._max}set max(e){this._max=Bi(e,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(e){this._min=Bi(e,this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(e){this._step=Bi(e,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(e){this._thumbLabel=Rt(e)}get tickInterval(){return this._tickInterval}set tickInterval(e){this._tickInterval="auto"===e?"auto":"number"==typeof e||"string"==typeof e?Bi(e,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(e){if(e!==this._value){let i=Bi(e,0);this._roundToDecimal&&i!==this.min&&i!==this.max&&(i=parseFloat(i.toFixed(this._roundToDecimal))),this._value=i,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(e){this._vertical=Rt(e)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(e){this._focusHostElement(e)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){let i=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${i})`}}_getTrackFillStyles(){let e=this.percent,r=this.vertical?`1, ${e}, 1`:`${e}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${r})`,display:0===e?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let e=100*this._tickIntervalPercent,a={backgroundSize:this.vertical?`2px ${e}%`:`${e}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${e/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){let c,l=this._shouldInvertAxis();c=this.vertical?l?"Bottom":"Top":l?"Right":"Left",a[`padding${c}`]=`${this._getThumbGap()}px`}return a}_getThumbContainerStyles(){let e=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?e:!e)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){let e=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?e:!e}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{this._isActive=!!e&&"keyboard"!==e,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("mousedown",this._pointerDown,cc),e.removeEventListener("touchstart",this._pointerDown,cc),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(e){if(this.disabled||kr(e)||this._isSliding&&"keyboard"!==this._isSliding)return;let i=this.value;switch(e.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}i!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding="keyboard",e.preventDefault()}_onKeyup(){"keyboard"===this._isSliding&&(this._isSliding=null)}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(e){let i=this._document,r=Ow(e),s=r?"touchend":"mouseup";i.addEventListener(r?"touchmove":"mousemove",this._pointerMove,cc),i.addEventListener(s,this._pointerUp,cc),r&&i.addEventListener("touchcancel",this._pointerUp,cc);let a=this._getWindow();typeof a<"u"&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){let e=this._document;e.removeEventListener("mousemove",this._pointerMove,cc),e.removeEventListener("mouseup",this._pointerUp,cc),e.removeEventListener("touchmove",this._pointerMove,cc),e.removeEventListener("touchend",this._pointerUp,cc),e.removeEventListener("touchcancel",this._pointerUp,cc);let i=this._getWindow();typeof i<"u"&&i&&i.removeEventListener("blur",this._windowBlur)}_increment(e){let i=this._clamp(this.value||0,this.min,this.max);this.value=this._clamp(i+this.step*e,this.min,this.max)}_updateValueFromPosition(e){if(!this._sliderDimensions)return;let s=this._clamp(((this.vertical?e.y:e.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(s=1-s),0===s)this.value=this.min;else if(1===s)this.value=this.max;else{let a=this._calculateValue(s),l=Math.round((a-this.min)/this.step)*this.step+this.min;this.value=this._clamp(l,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(!this.tickInterval||!this._sliderDimensions)return;let e;if("auto"==this.tickInterval){let i=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width;e=Math.ceil(30/(i*this.step/(this.max-this.min)))*this.step/i}else e=this.tickInterval*this.step/(this.max-this.min);this._tickIntervalPercent=eoe(e)?e:0}_createChangeEvent(e=this.value){let i=new class{};return i.source=this,i.value=e,i}_calculatePercentage(e){let i=((e||0)-this.min)/(this.max-this.min);return eoe(i)?i:0}_calculateValue(e){return this.min+e*(this.max-this.min)}_clamp(e,i=0,r=1){return Math.max(i,Math.min(e,r))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(e){this._elementRef.nativeElement.focus(e)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(e){this.value=e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(Fr),M(nn),M($i,8),vo("tabindex"),M(_t),M(Ht),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-slider"]],viewQuery:function(e,i){if(1&e&&ot(hVe,5),2&e){let r;Ne(r=Le())&&(i._sliderWrapper=r.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(e,i){1&e&&P("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()})("keydown",function(o){return i._onKeydown(o)})("keyup",function(){return i._onKeyup()})("mouseenter",function(){return i._onMouseenter()})("selectstart",function(o){return o.preventDefault()}),2&e&&(_s("tabIndex",i.tabIndex),ze("aria-disabled",i.disabled)("aria-valuemax",i.max)("aria-valuemin",i.min)("aria-valuenow",i.value)("aria-valuetext",null==i.valueText?i.displayValue:i.valueText)("aria-orientation",i.vertical?"vertical":"horizontal"),et("mat-slider-disabled",i.disabled)("mat-slider-has-ticks",i.tickInterval)("mat-slider-horizontal",!i.vertical)("mat-slider-axis-inverted",i._shouldInvertAxis())("mat-slider-invert-mouse-coords",i._shouldInvertMouseCoords())("mat-slider-sliding",i._isSliding)("mat-slider-thumb-label-showing",i.thumbLabel)("mat-slider-vertical",i.vertical)("mat-slider-min-value",i._isMinValue())("mat-slider-hide-last-tick",i.disabled||i._isMinValue()&&i._getThumbGap()&&i._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",value:"value",displayWith:"displayWith",valueText:"valueText",vertical:"vertical"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[$t([vVe]),tt],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(e,i){1&e&&(_(0,"div",0,1)(2,"div",2),O(3,"div",3)(4,"div",4),v(),_(5,"div",5),O(6,"div",6),v(),_(7,"div",7),O(8,"div",8)(9,"div",9),_(10,"div",10)(11,"span",11),A(12),v()()()()),2&e&&(C(3),y("ngStyle",i._getTrackBackgroundStyles()),C(1),y("ngStyle",i._getTrackFillStyles()),C(1),y("ngStyle",i._getTicksContainerStyles()),C(1),y("ngStyle",i._getTicksStyles()),C(1),y("ngStyle",i._getThumbContainerStyles()),C(5),yt(i.displayValue))},dependencies:[zu],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:grabbing}.mat-slider-wrapper{-webkit-print-color-adjust:exact;color-adjust:exact;position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{-webkit-background-clip:content-box;background-clip:content-box;background-repeat:repeat;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid rgba(0,0,0,0);border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}'],encapsulation:2,changeDetection:0}),n})();function eoe(n){return!isNaN(n)&&isFinite(n)}function Ow(n){return"t"===n.type[0]}function toe(n,t){let e;return e=Ow(n)?"number"==typeof t?vU(n.touches,t)||vU(n.changedTouches,t):n.touches[0]||n.changedTouches[0]:n,e?{x:e.clientX,y:e.clientY}:void 0}function vU(n,t){for(let e=0;e<n.length;e++)if(n[e].identifier===t)return n[e]}var Wh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,ln,ln]}),n})();function xVe(n,t){if(1&n){let e=Pe();_(0,"mat-slider",11),P("input",function(r){return oe(e),se(S(2).onSliderChange.emit(r.value))}),v()}if(2&n){let e=S(2);y("min",0)("max",e.scrollBeginIndexUpperLimit)("value",e.scrollBeginIndex)}}function CVe(n,t){if(1&n){let e=Pe();_(0,"div",6)(1,"button",7),P("click",function(){return oe(e),se(S().onNavigateLeft.emit())}),A(2," < "),v(),_(3,"div",8),A(4),v(),_(5,"button",9),P("click",function(){return oe(e),se(S().onNavigateRight.emit())}),A(6," > "),v(),E(7,xVe,1,3,"mat-slider",10),v()}if(2&n){let e=S();C(4),TT(" ",e.scrollBeginIndex," ~ ",e.scrollBeginIndex+e.displayCount-1," of ",e.numExecutions," "),C(3),y("ngIf",e.scrollBeginIndexUpperLimit>0)}}var MVe=function(n,t,e){return[n,t,e]};function wVe(n,t){if(1&n){let e=Pe();_(0,"div",14),P("click",function(){let o=oe(e).index;return se(S(2).onExecutionDigestClicked.emit(o))}),_(1,"div",15),A(2),v()()}if(2&n){let e=t.$implicit,i=t.index,r=S(2);C(1),Zi("title",e.op_type),y("ngClass",Zx(3,MVe,e.is_graph?"func-graph-execution":"",i===r.focusedExecutionDisplayIndex?"focused":"",r.displayFocusedAlertTypes[i]||"")),C(1),je(" ",e.short_op_type," ")}}function SVe(n,t){if(1&n&&(_(0,"div",12),E(1,wVe,3,7,"div",13),v()),2&n){let e=S();C(1),y("ngForOf",e.displayExecutionDigests)}}function EVe(n,t){if(1&n&&(sn(0),O(1,"tf-debugger-v2-execution-data",16),an()),2&n){let e=S();C(1),y("focusedExecutionIndex",e.focusedExecutionIndex)}}var noe=(()=>{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 G,this.onNavigateRight=new G,this.onExecutionDigestClicked=new G,this.onSliderChange=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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","value","input",4,"ngIf"],["step","1",1,"timeline-slider",3,"min","max","value","input"],[1,"execution-timeline"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"execution-digest",3,"ngClass","title"],[3,"focusedExecutionIndex"]],template:function(e,i){1&e&&(_(0,"div")(1,"div",0),A(2," Python Execution Timeline "),_(3,"span",1),A(4),v()(),_(5,"div",2),E(6,CVe,8,4,"div",3),E(7,SVe,2,1,"div",4),E(8,EVe,2,1,"ng-container",5),v()()),2&e&&(C(4),je(" (",i.numExecutions,") "),C(2),y("ngIf",i.numExecutions),C(1),y("ngIf",i.numExecutions),C(1),y("ngIf",null!==i.activeRunId&&null!==i.focusedExecutionIndex))},dependencies:[Fn,dn,Be,$re,_n,up],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}\n\n  .timeline-slider .mat-slider-thumb {\n  border-radius: 5px;\n  right: -40px;\n  width: 80px;\n}\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})(),DVe=["__forward_","__backward_","__inference_"],ioe=(()=>{class n{constructor(e){this.store=e,this.activeRunId$=this.store.pipe(vt(Vs)),this.loadingNumExecutions$=this.store.pipe(vt(J(wP,i=>i.state==Oe.LOADING))),this.scrollBeginIndex$=this.store.pipe(vt(Aw)),this.scrollBeginIndexUpperLimit$=this.store.pipe(vt(J(jh,ny,(i,r)=>Math.max(0,i-r)))),this.pageSize$=this.store.pipe(vt(ty)),this.displayCount$=this.store.pipe(vt(ny)),this.displayExecutionDigests$=this.store.pipe(vt(J(fre,i=>i.map(r=>function(n,t=1){if(!n)return{op_type:"(N/A)",short_op_type:"..",is_graph:!1};let e=DVe.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(vt(Mre)),this.focusedExecutionIndex$=this.store.pipe(vt(uU)),this.focusedExecutionDisplayIndex$=this.store.pipe(vt(wre)),this.numExecutions$=this.store.pipe(vt(jh))}onNavigateLeft(){this.store.dispatch(Wv())}onNavigateRight(){this.store.dispatch(qv())}onExecutionDigestClicked(e){this.store.dispatch(Xv({displayIndex:e}))}onSliderChange(e){this.store.dispatch(Yv({index:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"timeline-component",0),P("onNavigateLeft",function(){return i.onNavigateLeft()})("onNavigateRight",function(){return i.onNavigateRight()})("onExecutionDigestClicked",function(o){return i.onExecutionDigestClicked(o)})("onSliderChange",function(o){return i.onSliderChange(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),B(11,"async"),v()),2&e&&y("activeRunId",U(1,11,i.activeRunId$))("loadingNumExecutions",U(2,13,i.loadingNumExecutions$))("numExecutions",U(3,15,i.numExecutions$))("scrollBeginIndex",U(4,17,i.scrollBeginIndex$))("scrollBeginIndexUpperLimit",U(5,19,i.scrollBeginIndexUpperLimit$))("pageSize",U(6,21,i.pageSize$))("displayCount",U(7,23,i.displayCount$))("displayExecutionDigests",U(8,25,i.displayExecutionDigests$))("displayFocusedAlertTypes",U(9,27,i.displayFocusedAlertTypes$))("focusedExecutionIndex",U(10,29,i.focusedExecutionIndex$))("focusedExecutionDisplayIndex",U(11,31,i.focusedExecutionDisplayIndex$))},dependencies:[noe,Ge],encapsulation:2,changeDetection:0}),n})();function PVe(n,t){1&n&&O(0,"tf-debugger-v2-inactive")}function RVe(n,t){1&n&&(_(0,"div",3),O(1,"tf-debugger-v2-alerts"),_(2,"div",4),O(3,"tf-debugger-v2-timeline")(4,"tf-debugger-v2-graph"),v(),O(5,"tf-debugger-v2-graph-executions"),v(),_(6,"div",5),O(7,"tf-debugger-v2-source-files")(8,"tf-debugger-v2-stack-trace"),v())}var roe=(()=>{class n{constructor(){this.runs={},this.runIds=[],this.activeRunId=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0),E(1,PVe,1,0,"tf-debugger-v2-inactive",1),E(2,RVe,9,0,"ng-template",null,2,qt),v()),2&e){let r=$e(3);C(1),y("ngIf",0===i.runIds.length)("ngIfElse",r)}},dependencies:[Pre,Be,kre,Lre,Vre,Xre,Kre,ioe],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})(),ooe=(()=>{class n{constructor(e){this.store=e,this.runs$=this.store.pipe(vt(ug)),this.runsIds$=this.store.pipe(vt(J(ug,i=>Object.keys(i)))),this.activeRunId$=this.store.pipe(vt(Vs))}ngOnInit(){this.store.dispatch(tP())}ngOnDestroy(){this.store.dispatch(nP())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["tf-debugger-v2"]],decls:4,vars:9,consts:[[3,"runs","runIds","activeRunId"]],template:function(e,i){1&e&&(O(0,"debugger-component",0),B(1,"async"),B(2,"async"),B(3,"async")),2&e&&y("runs",U(1,3,i.runs$))("runIds",U(2,5,i.runsIds$))("activeRunId",U(3,7,i.activeRunId$))},dependencies:[roe,Ge],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"]}),n})(),kP="debugger-v2";function yU(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=[],s=Math.floor(n/e);(!(s in r)||r[s]<e&&s*e+r[s]<i)&&o.push(s);let a=Math.floor((t-1)/e);return a!==s&&(!(a in r)||a*e+r[a]<t&&t<i)&&o.push(a),o}var loe=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.loadData$=cr(()=>{let o=this.loadDebuggerRuns(Jt(this.onDebuggerDataPoll(),this.onCoreReload())).pipe(Ts()),s=this.loadSourceFileList(o),a=this.createNumExecutionLoader(o),l=this.createNumAlertsAndBreakdownLoader(o),c=this.onAlertTypeFocused(),u=this.fetchExecutionDigestsForAlertTypeFocus(c),d=this.createInitialExecutionDetector(a).pipe(Ts()),p=this.createExecutionDigestLoader(Jt(this.onExecutionScroll(),this.createInitialExecutionDigest(d),u)),h=this.createExecutionDataAndStackFramesLoader(Jt(this.onExecutionDigestFocused(),d.pipe(Wt(this.store.select(Vs),this.store.select(dU)),L(([,b,D])=>({activeRunId:b,loadedExecutionData:D,focusIndex:0})))));return Jt(l,p,h,this.createNumGraphExecutionLoader(o),s,this.onSourceFileFocused(),this.loadGraphExecutionPages(this.onGraphExecutionScroll()),this.loadGraphOpStackFrames(this.loadGraphOpInfo())).pipe(L(()=>({})))},{dispatch:!1})}onDebuggerDataPoll(){return this.actions$.pipe(ii(tP),ui(e=>function(n,t,e){return n.pipe(function(n){return en((t,e)=>{let i,o,r=!1,s=!1,a=!1,l=()=>a&&s&&(e.complete(),!0),u=()=>{a=!1,i=t.subscribe(jt(e,void 0,()=>{a=!0,!l()&&(o||(o=new ke,n(o).subscribe(jt(e,()=>{i?u():r=!0},()=>{s=!0,l()}))),o).next()})),r&&(i.unsubscribe(),i=null,r=!1,u())};u()})}(i=>i.pipe(Wt(t),v0(([,r])=>Ka(r)))),st(e),L(()=>{}))}(Xt(e),this.store.select(cre).pipe(L(i=>function(n){return n>6e4?6e4:n>4e3?n:2e3}(i))),this.actions$.pipe(ii(nP)))),kt(()=>this.store.dispatch(Mw())),L(()=>{}))}onCoreReload(){return Jt(this.actions$.pipe(ii(Fa,aa)),this.actions$.pipe(ii(Zu)).pipe(Wt(this.store.select(iU)),Ye(([,e])=>e.state===Oe.NOT_LOADED||e.state===Oe.FAILED&&null===e.lastLoadedTimeInMs))).pipe(Wt(this.store.select(Rs)),Ye(([,e])=>e===kP),kt(()=>this.store.dispatch(Mw())),L(()=>{}))}loadDebuggerRuns(e){return e.pipe(Wt(this.store.select(iU)),Ye(([,{state:i}])=>i!==Oe.LOADING),kt(()=>this.store.dispatch(iP())),xn(()=>this.dataSource.fetchRuns().pipe(kt(i=>{this.store.dispatch(rP({runs:i}))}),L(()=>{}))))}createNumExecutionLoader(e){return e.pipe(Wt(this.store.select(ug),this.store.select(wP)),Ye(([,i,r])=>Object.keys(i).length>0&&r.state!==Oe.LOADING),kt(()=>this.store.dispatch(aP())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchExecutionDigests(r,0,0).pipe(kt(a=>{this.store.dispatch(lP({numExecutions:a.num_digests}))}),L(()=>{}))}))}createNumGraphExecutionLoader(e){return e.pipe(Wt(this.store.select(ug),this.store.select(mre)),Ye(([,i,r])=>Object.keys(i).length>0&&r.state!==Oe.LOADING),kt(()=>this.store.dispatch(pP())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchGraphExecutionDigests(r,0,0).pipe(kt(a=>{this.store.dispatch(hP({numGraphExecutions:a.num_digests}))}),L(()=>{}))}))}createNumAlertsAndBreakdownLoader(e){return e.pipe(Wt(this.store.select(ug),this.store.select(rU)),Ye(([,i,r])=>Object.keys(i).length>0&&r.state!==Oe.LOADING),kt(()=>this.store.dispatch(ww())),xn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchAlerts(r,0,0).pipe(kt(a=>{this.store.dispatch(oP({numAlerts:a.num_alerts,alertsBreakdown:a.alerts_breakdown}))}),L(()=>{}))}))}createInitialExecutionDetector(e){return e.pipe(Wt(this.store.select(jh),this.store.select(Dw)),Ye(([,i,r])=>i>0&&0===Object.keys(r.pageLoadedSizes).length),L(()=>{}))}createInitialExecutionDigest(e){return e.pipe(Wt(this.store.select(jh),this.store.select(Vs),this.store.select(ty)),Ye(([,,i])=>null!==i),L(([,i,r,o])=>({begin:0,end:Math.min(i,o),runId:r})))}onExecutionScroll(){return this.actions$.pipe(ii(Wv,qv,Yv),Wt(this.store.select(Vs),this.store.select(Aw),this.store.select(jh),this.store.select(ny),this.store.select(ty)),Ye(([e])=>null!==e),L(([,e,i,r,o,s])=>({runId:e,begin:i,end:Math.min(r,i+o),pageSize:s})),Wt(this.store.select(Dw)),L(([e,i])=>({props:e,loaded:i,missingPages:yU(e.begin,e.end,e.pageSize,i.numExecutions,i.pageLoadedSizes)})),Ye(({missingPages:e})=>e.length>0),L(({props:e,loaded:i,missingPages:r})=>{let{runId:o,pageSize:s}=e;return{begin:r[0]*s,end:Math.min(i.numExecutions,(r[r.length-1]+1)*s),runId:o}}))}createExecutionDigestLoader(e){return e.pipe(Wt(this.store.select(Dw)),Ye(([{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)),kt(([{begin:i,end:r}])=>{this.store.dispatch(cP({begin:i,end:r}))}),xn(([{runId:i,begin:r,end:o}])=>this.dataSource.fetchExecutionDigests(i,r,o).pipe(kt(s=>{this.store.dispatch(uP(s))}),L(()=>{}))))}onExecutionDigestFocused(){return this.actions$.pipe(ii(Xv),Wt(this.store.select(Vs),this.store.select(dU),this.store.select(Aw)),L(([e,i,r,o])=>({activeRunId:i,loadedExecutionData:r,focusIndex:o+e.displayIndex})))}createExecutionDataAndStackFramesLoader(e){return e.pipe(Ye(({activeRunId:i,loadedExecutionData:r,focusIndex:o})=>null!==i&&null!==o&&void 0===r[o]),xn(({activeRunId:i,focusIndex:r})=>{let o=r,s=o+1;return this.dataSource.fetchExecutionData(i,o,s).pipe(kt(a=>{this.store.dispatch(dP(a))}),L(a=>({executionData:a,begin:o,end:s})))}),L(({executionData:i})=>i.executions[0]),Wt(this.store.select(Vs),this.store.select(pU)),Ye(([i,r,o])=>{if(null===r)return!1;for(let s of i.stack_frame_ids)if(void 0===o[s])return!0;return!1}),xn(([i,r])=>{let o=i.stack_frame_ids;return this.dataSource.fetchStackFrames(r,o).pipe(kt(s=>{let a={};for(let l=0;l<o.length;++l)a[o[l]]=s.stack_frames[l];this.store.dispatch(Sw({stackFrames:a}))}),L(()=>{}))}))}onGraphExecutionScroll(){return this.actions$.pipe(ii(Qv),Hr(100),Wt(this.store.select(Vs),this.store.select(Iw),this.store.select(gre)),Ye(([,e,i])=>null!==e&&i>0),L(([,e,i,r])=>({runId:e,numGraphExecutions:i,scrollBeginIndex:r})),Wt(this.store.select(vre),this.store.select(_re),this.store.select(yre),this.store.select(bre)),L(([{runId:e,numGraphExecutions:i,scrollBeginIndex:r},o,s,a,l])=>{let c=yU(r,Math.min(r+s,i),o,i,l);return c=c.filter(u=>-1===a.indexOf(u)),{runId:e,missingPages:c,pageSize:o,numGraphExecutions:i}}))}loadGraphExecutionPages(e){return e.pipe(Ye(({missingPages:i})=>i.length>0),kt(({missingPages:i})=>{i.forEach(r=>{this.store.dispatch(fP({pageIndex:r}))})}),xn(({runId:i,missingPages:r,pageSize:o,numGraphExecutions:s})=>{let a=r[0]*o,l=Math.min((r[r.length-1]+1)*o,s);return this.dataSource.fetchGraphExecutionData(i,a,l).pipe(kt(c=>{this.store.dispatch(mP(c))}),L(()=>{}))}))}loadGraphOpInfo(){return this.actions$.pipe(ii(Zv,Kv),Wt(this.store.select(Vs),this.store.select(Sre)),Ye(([e,i,r])=>{let{graph_id:o,op_name:s}=e;return!(null===i||void 0!==r[o]&&r[o].has(s)&&(r[o].get(s)===Oe.LOADING||r[o].get(s)===Oe.LOADED))}),kt(([{graph_id:e,op_name:i}])=>this.store.dispatch(gP({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(kt(s=>this.store.dispatch(_P({graphOpInfoResponse:s}))),L(s=>({runId:i,stackFrameIds:s.stack_frame_ids})))}))}loadGraphOpStackFrames(e){return e.pipe(Wt(this.store.select(pU)),L(([{runId:i,stackFrameIds:r},o])=>({runId:i,missingStackFrameIds:r.filter(a=>void 0===o[a])})),Ye(({runId:i,missingStackFrameIds:r})=>null!==i&&r.length>0),xn(({runId:i,missingStackFrameIds:r})=>this.dataSource.fetchStackFrames(i,r).pipe(kt(o=>{let s={};for(let a=0;a<r.length;++a)s[r[a]]=o.stack_frames[a];this.store.dispatch(Sw({stackFrames:s}))}),L(()=>{}))))}onAlertTypeFocused(){return this.actions$.pipe(ii(Gv),Wt(this.store.select(Vs),this.store.select(MP),this.store.select(dre),this.store.select(pre),this.store.select(rU)),Ye(([,e,i,r,o,s])=>null!==e&&null!==i&&r>0&&(null===o||Object.keys(o).length<r)&&s.state!==Oe.LOADING),kt(()=>this.store.dispatch(ww())),xn(([,e,i])=>this.dataSource.fetchAlerts(e,0,-1,i)),kt(({num_alerts:e,alerts_breakdown:i,alert_type:r,begin:o,end:s,alerts:a})=>{this.store.dispatch(sP({numAlerts:e,alertsBreakdown:i,alertType:r,begin:o,end:s,alerts:a}))}))}fetchExecutionDigestsForAlertTypeFocus(e){return e.pipe(Wt(this.store.select(ty),this.store.select(ny),this.store.select(jh),this.store.select(Dw),this.store.select(Vs)),L(([i,r,o,s,a,l])=>{let u=i.alerts[0].execution_index,d=yU(Math.max(0,u-Math.floor(o/2)),Math.min(u+Math.floor(o/2),s),r,s,a.pageLoadedSizes);return 0===d.length?{runId:l,begin:0,end:0}:{runId:l,begin:d[0]*r,end:Math.min(a.numExecutions,(d[d.length-1]+1)*r)}}))}loadSourceFileList(e){return e.pipe(Wt(this.store.select(Vs),this.store.select(Tre)),Ye(([,i,r])=>null!==i&&r.state!==Oe.LOADING),kt(()=>this.store.dispatch(vP())),xn(([,i])=>this.dataSource.fetchSourceFileList(i).pipe(kt(r=>{let o=[];r.forEach(([s,a])=>{o.push({host_name:s,file_path:a})}),this.store.dispatch(yP({sourceFiles:o}))}),L(()=>{}))))}onSourceFileFocused(){return this.actions$.pipe(ii(Jv),Wt(this.store.select(Vs),this.store.select(hU),this.store.select(TP)),L(([e,i,r,o])=>({runId:i,stackFrame:e.stackFrame,fileIndex:r,fileContent:o})),Ye(({runId:e,fileContent:i})=>null!==e&&null!==i&&i.loadState===Oe.NOT_LOADED),kt(({stackFrame:e})=>this.store.dispatch(bP({host_name:e.host_name,file_path:e.file_path}))),xn(({fileIndex:e,runId:i})=>this.dataSource.fetchSourceFile(i,e).pipe(kt(r=>{this.store.dispatch(xP(r))}),L(()=>{}))))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(eP))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),coe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),uoe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),FP=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),doe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,FP,Zc]}),n})(),poe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),qh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),NP=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,qh]}),n})(),hoe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,NP]}),n})(),foe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,NP]}),n})(),moe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,FP]}),n})(),goe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,moe,Pn,Wh]}),n})(),_oe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[coe,Me,ec,doe,uoe,poe,hoe,foe,ire,goe,wr.forFeature(Ew,lre),ro.forFeature([loe]),Bs.forPlugin(kP,ooe)]}),n})(),LP=be("[Metrics] Metrics Settings Pane Closed"),BP=be("[Metrics] Metrics Settings Pane Toggled"),VP=be("[Metrics] Slide out settings menu toggled"),HP=be("[Metrics] Metrics Tag Metadata Requested"),UP=be("[Metrics] Metrics Tag Metadata Loaded",{_as:"props",_p:void 0}),zP=be("[Metrics] Metrics Tag Metadata Failed"),jP=be("[Metrics] Metrics Settings Change Tooltip",{_as:"props",_p:void 0}),GP=(be("[Metrics] Metrics Settings Toggle Show Data Download"),be("[Metrics] Metrics Setting Toggle Ignore Outlier")),WP=be("[Metrics] Metrics Setting Change X Axis Type",{_as:"props",_p:void 0}),qP=be("[Metrics] Metrics Setting Change Card Width",{_as:"props",_p:void 0}),YP=be("[Metrics] Metrics Setting Reset Card Width"),XP=be("[Metrics] Metrics Setting Change Scalar Smoothing",{_as:"props",_p:void 0}),QP=be("[Metrics] Metrics Setting Partition Non Monotonic X Toggled"),KP=be("[Metrics] Metrics Setting Change Image Brightness",{_as:"props",_p:void 0}),ZP=be("[Metrics] Metrics Setting Change Image Contrast",{_as:"props",_p:void 0}),JP=be("[Metrics] Image Brightness Setting Reset"),$P=be("[Metrics] Image Contrast Setting Reset"),eR=be("[Metrics] Metrics Setting Toggle Image Show Actual Size"),tR=be("[Metrics] Metrics Setting Change Histogram Mode",{_as:"props",_p:void 0}),nR=be("[Metrics] Multiple Time Series Requested",{_as:"props",_p:void 0}),iR=be("[Metrics] Fetch Time Series Request Failed",{_as:"props",_p:void 0}),rR=be("[Metrics] Fetch Time Series Response Loaded",{_as:"props",_p:void 0}),iy=be("[Metrics] Card Visibility Changed",{_as:"props",_p:void 0}),oR=be("[Metrics] Card Step Slider Changed",{_as:"props",_p:void 0}),sR=be("[Metrics] Tag Filter Changed",{_as:"props",_p:void 0}),aR=be("[Metrics] Metrics Tag Group Expansion Changed",{_as:"props",_p:void 0}),ry=be("[Metrics] Card Pin State Toggled",{_as:"props",_p:void 0}),lR=be("[Metrics] Toggle Visible Plugin",{_as:"props",_p:void 0}),cR=be("[Metrics] Toggle Show All Plugins"),Yh=be("[Metrics] Time Selection Changed",{_as:"props",_p:void 0}),voe=be("[Metrics] Linked Time Selection Cleared"),uR=be("[Metrics] Linked Time Enable Toggle",{_as:"props",_p:void 0}),yoe=be("[Metrics] Sorting Data Table By Header",{_as:"props",_p:void 0}),dR=be("[Metrics] Data table column dragged",{_as:"props",_p:void 0}),boe=be("[Metrics] Data table columns edited in edit menu",{_as:"props",_p:void 0}),pR=be("[Metrics] Data table column toggled in edit menu",{_as:"props",_p:void 0}),Xh=be("[Metrics] Time Selector Enable Toggle",{_as:"props",_p:void 0}),hR=be("[Metrics] Range Selection Toggled",{_as:"props",_p:void 0});function kw(n,t){let e={};for(let i of Object.keys(n))e[i]=t(n[i],i);return e}var cs=(()=>(function(n){n.NONE="no affordance",n.EXTENDED_LINE="extendedLine",n.FOB="fob",n.FOB_REMOVED="fobRemoved",n.FOB_TEXT="fobText",n.SETTINGS_TEXT="settingsText",n.SETTINGS_SLIDER="settingsSlider",n.CHANGE_TO_SINGLE="changeToSingle",n.HISTOGRAM_CLICK_TO_RANGE="histogramClickToRange",n.FOB_ADDED="fobAdded"}(cs||(cs={})),cs))(),bl=(()=>(function(n){n.NONE="no toggle affordance",n.FOB_DESELECT="fobDeselect",n.CHECK_BOX="checkBox"}(bl||(bl={})),bl))(),pa=(()=>(function(n){n[n.HORIZONTAL=0]="HORIZONTAL",n[n.VERTICAL=1]="VERTICAL"}(pa||(pa={})),pa))();function fR(n){let t=new Map,e=n.slice().sort((i,r)=>Fw(i.tag,r.tag));for(let i of e){let r=BVe(i.tag);t.has(r)||t.set(r,{groupName:r,items:[]}),t.get(r).items.push(i)}return[...t.values()]}function BVe(n){return n.split("/",1)[0]}function Fw(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(fg(n[e])&&fg(t[i])){let r=e,o=i;e=xoe(n,e+1),i=xoe(t,i+1);let s=Number(n.slice(r,e)),a=Number(t.slice(o,i));if(s<a)return-1;if(s>a)return 1}else{if(bU(n[e])){if(!bU(t[i]))return-1}else{if(bU(t[i]))return 1;if(n[e]<t[i])return-1;if(n[e]>t[i])return 1}e++,i++}}}function xoe(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(!fg(n[r]))break}else if(i===e.REAL){if("e"===n[r]||"E"===n[r])i=e.EXPONENT_SIGN;else if(!fg(n[r]))break}else if(i===e.EXPONENT_SIGN){if(!fg(n[r])&&"+"!==n[r]&&"-"!==n[r])break;i=e.EXPONENT}else if(i===e.EXPONENT&&!fg(n[r]))break;return r}function fg(n){return"0"<=n&&n<="9"}function bU(n){return"/"===n||fg(n)}var sy=(()=>(function(n){n[n.ORIGINAL=0]="ORIGINAL",n[n.DERIVED=1]="DERIVED"}(sy||(sy={})),sy))(),Kt=(()=>(function(n){n.COLOR="COLOR",n.RELATIVE_TIME="RELATIVE_TIME",n.RUN="RUN",n.STEP="STEP",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"}(Kt||(Kt={})),Kt))(),gd=(()=>(function(n){n[n.SINGLE=0]="SINGLE",n[n.RANGE=1]="RANGE"}(gd||(gd={})),gd))(),xl=(()=>(function(n){n[n.ASCENDING=0]="ASCENDING",n[n.DESCENDING=1]="DESCENDING"}(xl||(xl={})),xl))();function xU(n,t,e){let{plugin:i,tag:r,runId:o,sample:s}=t[n],a=rp(e,i,r,s);if(a){if(null!==o&&a.runToSeries.hasOwnProperty(o)){let c=a.runToSeries[o].length;return c>0?c-1:null}let l=Object.values(a.runToSeries).map(c=>c.length);if(l.length)return Math.max(...l)-1}return null}function HVe(n,t,e,i){let r={...t};for(let o in n){if(!n.hasOwnProperty(o))continue;let s=xU(o,n,e);if(null===s){t.hasOwnProperty(o)&&(r[o]=null);continue}let a=t.hasOwnProperty(o)?t[o].index:null,l=xU(o,n,i),c=null!==a&&a===l;(null!==a&&a>s||null===a||c)&&(r[o]={index:s,isClosest:!1})}return r}function Coe(n){let t=kw(n.runToLoadState,e=>e===Oe.LOADING?Oe.LOADING:Oe.NOT_LOADED);return{...n,runToLoadState:t}}function Moe(n,t,e,i){return JSON.stringify([n,t,e||"",i])}var{initialState:Soe,reducers:UVe}=zm({tagMetadataLoadState:{state:Oe.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:{},cardStepIndex:{},tagFilter:"",tagGroupExpanded:new Map,linkedTimeSelection:null,linkedTimeEnabled:!1,stepSelectorEnabled:!1,rangeSelectionEnabled:!1,singleSelectionHeaders:[{type:Kt.RUN,enabled:!0},{type:Kt.SMOOTHED,enabled:!0},{type:Kt.VALUE,enabled:!0},{type:Kt.STEP,enabled:!0},{type:Kt.RELATIVE_TIME,enabled:!0}],rangeSelectionHeaders:[{type:Kt.RUN,enabled:!0},{type:Kt.MIN_VALUE,enabled:!0},{type:Kt.MAX_VALUE,enabled:!0},{type:Kt.START_VALUE,enabled:!0},{type:Kt.END_VALUE,enabled:!0},{type:Kt.VALUE_CHANGE,enabled:!0},{type:Kt.PERCENTAGE_CHANGE,enabled:!0},{type:Kt.START_STEP,enabled:!0},{type:Kt.END_STEP,enabled:!0}],filteredPluginTypes:new Set,stepMinMax:{min:1/0,max:-1/0}},{isSettingsPaneOpen:!0,isSlideoutMenuOpen:!1,timeSeriesData:{scalars:{},histograms:{},images:{}},settings:II,settingOverrides:{},visibleCardMap:new Map},(n,t,e)=>Ps(t,e)?n:{...n,tagMetadataLoadState:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},tagMetadata:{scalars:{tagDescriptions:{},tagToRuns:{}},histograms:{tagDescriptions:{},tagToRuns:{}},images:{tagDescriptions:{},tagRunSampledInfo:{}}},cardList:[],cardMetadataMap:{},visibleCardMap:new Map}),CU=Soe,zVe=vr(Soe,Se(K_,(n,{routeKind:t,partialState:e})=>{if(t!==hi.EXPERIMENT&&t!==hi.COMPARE_EXPERIMENT)return n;let i=new Set;for(let u of n.pinnedCardToOriginal.keys()){let{plugin:d,tag:p,runId:h,sample:f}=n.cardMetadataMap[u];i.add(Moe(d,p,h,f))}let r=e,o=[];for(let u of[...n.unresolvedImportedPinnedCards,...r.metrics.pinnedCards]){let d=Moe(u.plugin,u.tag,u.runId,u.sample);i.has(d)||(i.add(d),o.push(u))}let s=K4(o,n.cardList,n.cardMetadataMap,n.cardToPinnedCopy,n.cardToPinnedCopyCache,n.pinnedCardToOriginal,n.cardStepIndex),a=r.metrics.smoothing,l=n.settingOverrides;if(Number.isFinite(a)&&null!==a){let u=Math.max(0,Math.min(.999,Number(a.toPrecision(3))));l={...n.settingOverrides,scalarSmoothing:u}}let c={...n,...s,settingOverrides:l};return null!==r.metrics.tagFilter&&(c.tagFilter=r.metrics.tagFilter),c}),Se(Yc,(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);let i=t.timeSeriesSettingsPaneOpened??n.isSettingsPaneOpen,r=t.stepSelectorEnabled??n.stepSelectorEnabled,o=t.rangeSelectionEnabled??n.rangeSelectionEnabled,s=t.linkedTimeEnabled??n.linkedTimeEnabled;return{...n,isSettingsPaneOpen:i,stepSelectorEnabled:r,rangeSelectionEnabled:o,linkedTimeEnabled:s,settings:{...n.settings,...e}}}),Se(aa,Fa,n=>{let t=n.tagMetadataLoadState.state===Oe.LOADING?Oe.LOADING:Oe.NOT_LOADED,e=kw(n.timeSeriesData,(i,r)=>kw(i,o=>fl(r)?kw(o,s=>Coe(s)):Coe(o)));return{...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:t},timeSeriesData:e}}),Se(HP,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Oe.LOADING}})),Se(zP,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Oe.FAILED}})),Se(UP,(n,{tagMetadata:t})=>{let e={scalars:woe(t,ri.SCALARS),histograms:woe(t,ri.HISTOGRAMS),images:t[ri.IMAGES]},i={},r=function(n){let t=[];for(let e of Object.keys(n)){let r,i=e;if(fl(i)){if(!ml(i))throw new Error("Multi-run, sampled plugin support not yet implemented");{let o=n[i].tagRunSampledInfo;for(let s of Object.keys(o))for(let a of Object.keys(o[s])){let{maxSamplesPerStep:l}=o[s][a];for(let c=0;c<l;c++)t.push({plugin:i,tag:s,runId:a,sample:c,numSample:l})}}}else if(ml(i)){r=n[i].tagToRuns;for(let o of Object.keys(r))for(let s of r[o])t.push({plugin:i,tag:o,runId:s})}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 f=pee(h);i[f]=h,o.push(f)}let s=n.tagGroupExpanded;if(0===n.tagGroupExpanded.size){let f=fR(o.map(m=>({...i[m],cardId:m})).filter(Boolean));s=new Map(n.tagGroupExpanded);for(let m of f.slice(0,2))s.set(m.groupName,!0)}let{nextCardToPinnedCopy:a,nextPinnedCardToOriginal:l,pinnedCardMetadataMap:c}=function(n,t,e){let i=new Map,r=new Map,o={};return n.forEach((s,a)=>{-1!==e.indexOf(a)&&(i.set(a,s),r.set(s,a),o[s]=t[a])}),{nextCardToPinnedCopy:i,nextPinnedCardToOriginal:r,pinnedCardMetadataMap:o}}(n.cardToPinnedCopyCache,i,o),u={...i,...c},d=function(n,t){let e={};return Object.entries(n).forEach(([i,r])=>{t[i]&&(e[i]=r)}),e}(n.cardStepIndex,u),p=K4(n.unresolvedImportedPinnedCards,o,u,a,n.cardToPinnedCopyCache,l,d);return{...n,...p,tagGroupExpanded:s,tagMetadataLoadState:{state:Oe.LOADED,lastLoadedTimeInMs:Date.now()},tagMetadata:e,cardList:o}}),Se(sR,(n,{tagFilter:t})=>({...n,tagFilter:t})),Se(jP,(n,{sort:t})=>({...n,settingOverrides:{...n.settingOverrides,tooltipSort:t}})),Se(GP,n=>{let t=!(n.settingOverrides.ignoreOutliers??n.settings.ignoreOutliers);return{...n,settingOverrides:{...n.settingOverrides,ignoreOutliers:t}}}),Se(WP,(n,{xAxisType:t})=>({...n,settingOverrides:{...n.settingOverrides,xAxisType:t}})),Se(XP,(n,{smoothing:t})=>({...n,settingOverrides:{...n.settingOverrides,scalarSmoothing:t}})),Se(QP,n=>{let t=!(n.settingOverrides.scalarPartitionNonMonotonicX??n.settings.scalarPartitionNonMonotonicX);return{...n,settingOverrides:{...n.settingOverrides,scalarPartitionNonMonotonicX:t}}}),Se(KP,(n,{brightnessInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageBrightnessInMilli:t}})),Se(ZP,(n,{contrastInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageContrastInMilli:t}})),Se(JP,n=>{let{imageBrightnessInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),Se($P,n=>{let{imageContrastInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),Se(eR,n=>{let t=!(n.settingOverrides.imageShowActualSize??n.settings.imageShowActualSize);return{...n,settingOverrides:{...n.settingOverrides,imageShowActualSize:t}}}),Se(tR,(n,{histogramMode:t})=>({...n,settingOverrides:{...n.settingOverrides,histogramMode:t}})),Se(qP,(n,{cardMinWidth:t})=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:t}})),Se(YP,n=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:null}})),Se(nR,(n,{requests:t})=>{if(!t.length)return n;let e={...n.timeSeriesData};for(let i of t){let{plugin:r,tag:o,sample:s}=i;e[r]=EI(e,r,o,s);let a=rp(e,r,o,s),l=z4(i)?[i.runId]:uv(n.tagMetadata,r,o,s);a.runToLoadState=TI(Oe.LOADING,l,a.runToLoadState)}return{...n,timeSeriesData:e}}),Se(iR,(n,{request:t})=>{let e={...n.timeSeriesData},{plugin:i,tag:r,sample:o}=t;e[i]=EI(e,i,r,o);let s=rp(e,i,r,o),a=z4(t)?[t.runId]:uv(n.tagMetadata,i,r,o);return s.runToLoadState=TI(Oe.FAILED,a,s.runToLoadState),{...n,timeSeriesData:e}}),Se(rR,(n,{response:t})=>{let e={...n.stepMinMax},i={...n.timeSeriesData},{plugin:r,tag:o,runId:s,sample:a}=t;i[r]=EI(i,r,o,a);let l=rp(i,r,o,a);if(bI(t)){let u=s?[s]:uv(n.tagMetadata,r,o,a);l.runToLoadState=TI(Oe.FAILED,u,l.runToLoadState)}else{let u=t.runToSeries;l.runToSeries={...l.runToSeries},l.runToLoadState={...l.runToLoadState};for(let d in u)if(u.hasOwnProperty(d)){l.runToSeries[d]=u[d],l.runToLoadState[d]=Oe.LOADED;for(let p of u[d])e.min=Math.min(e.min,p.step),e.max=Math.max(e.max,p.step)}}return{...n,timeSeriesData:i,cardStepIndex:HVe(n.cardMetadataMap,n.cardStepIndex,i,n.timeSeriesData),stepMinMax:e}}),Se(oR,(n,{cardId:t,stepIndex:e})=>{let i=xU(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}}}}),Se(aR,(n,{tagGroup:t})=>{let e=new Map(n.tagGroupExpanded);return e.set(t,!e.get(t)),{...n,tagGroupExpanded:e}}),Se(iy,(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 s=i.get(r)??null;if(null!==s&&s!==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}}),Se(ry,(n,{cardId:t})=>{let e=n.pinnedCardToOriginal.has(t),i=!e&&!n.cardToPinnedCopy.has(t);if(i&&!DI(n))return n;let r=new Map(n.cardToPinnedCopy),o=new Map(n.cardToPinnedCopyCache),s=new Map(n.pinnedCardToOriginal),a={...n.cardMetadataMap},l={...n.cardStepIndex};if(e){let c=n.pinnedCardToOriginal.get(t);r.delete(c),o.delete(c),s.delete(t),delete a[t],delete l[t]}else if(i){let c=Z4(t,r,o,s,l,a);r=c.cardToPinnedCopy,o=c.cardToPinnedCopyCache,s=c.pinnedCardToOriginal,a=c.cardMetadataMap,l=c.cardStepIndex}else{let c=n.cardToPinnedCopy.get(t);r.delete(t),o.delete(t),s.delete(c),delete a[c],delete l[c]}return{...n,cardMetadataMap:a,cardStepIndex:l,cardToPinnedCopy:r,cardToPinnedCopyCache:o,pinnedCardToOriginal:s}}),Se(uR,n=>{let t=!n.linkedTimeEnabled,e={...n.cardStepIndex},i=n.linkedTimeSelection,r=n.stepSelectorEnabled;if(t){let{min:o}=n.stepMinMax,s=o===1/0?0:o;i=n.linkedTimeSelection??{start:{step:s},end:null},e=J4(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,i),r=t}return{...n,cardStepIndex:e,linkedTimeEnabled:t,linkedTimeSelection:i,stepSelectorEnabled:r}}),Se(hR,n=>{let t=!n.rangeSelectionEnabled,e=n.stepSelectorEnabled,i=n.linkedTimeSelection;return t?(e=t,i||(i={start:{step:n.stepMinMax.min},end:{step:n.stepMinMax.max}}),i.end||(i={...i,end:{step:n.stepMinMax.max}})):i&&(i={...i,end:null}),{...n,stepSelectorEnabled:e,rangeSelectionEnabled:t,linkedTimeSelection:i}}),Se(Yh,(n,t)=>{let{timeSelection:e}=t,i=e.start.step,r=e.end?.step,s=n.rangeSelectionEnabled;n.linkedTimeEnabled&&(s=void 0!==r);let a={start:{step:i},end:void 0===r?null:{step:i>r?i:r}},l=J4(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,a);return{...n,linkedTimeSelection:a,cardStepIndex:l,rangeSelectionEnabled:s}}),Se(Xh,(n,{affordance:t})=>{if(!n.linkedTimeEnabled&&t!==bl.CHECK_BOX)return{...n};let e=!n.stepSelectorEnabled,i=e&&n.linkedTimeEnabled,r=e&&n.rangeSelectionEnabled;return{...n,linkedTimeEnabled:i,stepSelectorEnabled:e,rangeSelectionEnabled:r}}),Se(voe,n=>({...n,linkedTimeSelection:null})),Se(dR,(n,{newOrder:t})=>n.rangeSelectionEnabled?{...n,rangeSelectionHeaders:t}:{...n,singleSelectionHeaders:t}),Se(boe,(n,{dataTableMode:t,headers:e})=>{let i=[],r=[];return e.forEach(o=>{o.enabled?i.push(o):r.push(o)}),t===gd.RANGE?{...n,rangeSelectionHeaders:i.concat(r)}:{...n,singleSelectionHeaders:i.concat(r)}}),Se(pR,(n,{dataTableMode:t,headerType:e})=>{let i=t===gd.RANGE?n.rangeSelectionHeaders:n.singleSelectionHeaders,r=i.findIndex(a=>a.type===e),o=function(n){let t=0;return n.forEach(e=>{e.enabled&&t++}),t}(i);i[r].enabled&&o--;let s=function(n,t,e){let i=[...e];return i.splice(n,1),i.splice(t,0,e[n]),i}(r,o,i);return s[o]={type:s[o].type,enabled:!s[o].enabled},t===gd.RANGE?{...n,rangeSelectionHeaders:s}:{...n,singleSelectionHeaders:s}}),Se(lR,(n,{plugin:t})=>{let e=new Set(n.filteredPluginTypes);return e.has(t)?e.delete(t):e.add(t),Object.values(ri).every(i=>e.has(i))&&(e=new Set),{...n,filteredPluginTypes:e}}),Se(cR,n=>({...n,filteredPluginTypes:new Set})),Se(BP,n=>({...n,isSettingsPaneOpen:!n.isSettingsPaneOpen})),Se(LP,n=>({...n,isSettingsPaneOpen:!1})),Se(VP,n=>({...n,isSlideoutMenuOpen:!n.isSlideoutMenuOpen})));function Eoe(n,t){return jm(zVe,UVe)(n,t)}function woe(n,t){return{tagDescriptions:n[t].tagDescriptions,tagToRuns:jVe(n[t].runTagInfo)}}function jVe(n){let t={};for(let e in n)for(let i of n[e])t[i]=[...t[i]||[],e];return t}var qVe=J(bh,tc,(n,t,e)=>t?{...t,loadState:n,id:e}:null),Toe=be("[Metrics Effects] Init"),Doe=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.dashboardShownWithoutData$=this.actions$.pipe(ii(Toe,Zu,Um,Jl),Wt(this.store.select(Rs),this.store.select(UM)),Ye(([,o,s])=>o===BM&&s.state===Oe.NOT_LOADED)),this.reloadRequestedWhileShown$=this.actions$.pipe(ii(aa,Fa),Wt(this.store.select(Rs)),Ye(([,o])=>o===BM)),this.loadTagMetadata$=Jt(this.dashboardShownWithoutData$,this.reloadRequestedWhileShown$).pipe(Wt(this.store.select(UM),this.store.select(Wo)),Ye(([,o,s])=>o.state!==Oe.LOADING&&null!==s),kt(()=>{this.store.dispatch(HP())}),ui(([,,o])=>this.dataSource.fetchTagMetadata(o).pipe(kt(s=>{this.store.dispatch(UP({tagMetadata:s}))}),fo(()=>(this.store.dispatch(zP()),Xt(null)))))),this.visibleCardsWithoutDataChanged$=this.actions$.pipe(ii(iy),Wt(this.getVisibleCardFetchInfos()),L(([,o])=>o.filter(s=>s.loadState===Oe.NOT_LOADED))),this.visibleCardsReloaded$=this.reloadRequestedWhileShown$.pipe(Wt(this.getVisibleCardFetchInfos()),L(([,o])=>o.filter(s=>s.loadState!==Oe.LOADING))),this.loadTimeSeries$=Jt(this.visibleCardsWithoutDataChanged$,this.visibleCardsReloaded$).pipe(Ye(o=>o.length>0),Wt(this.store.select(Wo).pipe(Ye(o=>null!==o))),xn(([o,s])=>this.fetchTimeSeriesForCards(o,s))),this.dataEffects$=cr(()=>Jt(this.loadTagMetadata$,this.loadTimeSeries$),{dispatch:!1})}ngrxOnInitEffects(){return Toe()}getVisibleCardFetchInfos(){return this.store.select(mee).pipe(ui(i=>i.size?lr([...i].map(o=>this.store.select(qVe,o).pipe(Qt(1)))):Xt([])),L(i=>i.filter(Boolean)))}fetchTimeSeries(e){return this.dataSource.fetchTimeSeries([e]).pipe(kt(i=>{let r=i.filter(bI);r.length&&console.error("Time series response contained errors:",r),this.store.dispatch(rR({response:i[0]}))}),fo(()=>(this.store.dispatch(iR({request:e})),Xt(null))))}fetchTimeSeriesForCards(e,i){return Xt(e.map(o=>{let{plugin:s,tag:a,runId:l,sample:c}=o,u=ml(s)?{plugin:s,tag:a,runId:l}:{plugin:s,tag:a,experimentIds:i};return void 0!==c&&(u.sample=c),u})).pipe(kt(o=>{this.store.dispatch(nR({requests:o}))}),xn(o=>Jt(...o.map(a=>this.fetchTimeSeries(a)))))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j($u))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),MU=new pe("Metrics Store Config"),wU=new pe("Metrics Initial Settings Config");function Aoe(n){return n?{initialState:{...CU,settings:n}}:{initialState:CU}}var Cl=(()=>(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"}(Cl||(Cl={})),Cl))(),Ioe=0;function YVe(n,t){if(1&n){let e=Pe();_(0,"button",3),P("click",function(){return oe(e),se(S().expandSidebar())}),O(1,"mat-icon",4),v()}}function XVe(n,t){if(1&n&&(_(0,"nav",5),B(1,"async"),Vn(2,1),v()),2&n){let e=S();Pt("width",U(1,4,e.width$),"%")("min-width",e.MINIMUM_SIDEBAR_WIDTH_IN_PX,"px")}}function QVe(n,t){if(1&n){let e=Pe();_(0,"div",6),P("mousedown",function(){return oe(e),se(S().resizeGrabbed())}),v()}}var KVe=[[["","main",""]],[["","sidebar",""]]],ZVe=["[main]","[sidebar]"],Roe=(()=>{class n{constructor(e,i){this.store=e,this.width$=this.store.select(iI),this.ngUnsubscribe=new ke,this.resizing=!1,this.MINIMUM_SIDEBAR_WIDTH_IN_PX=75,_i(i.nativeElement,"mousemove").pipe(st(this.ngUnsubscribe),Ye(()=>this.resizing)).subscribe(r=>{if((r.buttons&Cl.LEFT)!==Cl.LEFT)return void(this.resizing=!1);r.preventDefault();let{width:o}=i.nativeElement.getBoundingClientRect();this.store.dispatch(nv({widthInPercent:r.clientX<=this.MINIMUM_SIDEBAR_WIDTH_IN_PX?0:r.clientX/o*100}))}),_i(i.nativeElement,"mouseup",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(()=>{this.resizing=!1})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}resizeGrabbed(){this.resizing=!0}expandSidebar(){this.store.dispatch(nv({widthInPercent:20}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(Re))},n.\u0275cmp=R({type:n,selectors:[["tb-dashboard-layout"]],ngContentSelectors:ZVe,decls:7,vars:9,consts:[["class","expand",3,"click",4,"ngIf"],["class","sidebar",3,"width","minWidth",4,"ngIf"],["class","resizer",3,"mousedown",4,"ngIf"],[1,"expand",3,"click"],["svgIcon","expand_more_24px"],[1,"sidebar"],[1,"resizer",3,"mousedown"]],template:function(e,i){1&e&&(xi(KVe),E(0,YVe,2,0,"button",0),B(1,"async"),E(2,XVe,3,6,"nav",1),B(3,"async"),E(4,QVe,1,0,"div",2),B(5,"async"),Vn(6)),2&e&&(y("ngIf",0===U(1,3,i.width$)),C(2),y("ngIf",U(3,5,i.width$)>0),C(2),y("ngIf",U(5,7,i.width$)>0))},dependencies:[Be,Gt,Ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;height:100%;width:100%;position:relative}.sidebar[_ngcontent-%COMP%]{max-width:80vw}.resizer[_ngcontent-%COMP%], .expand[_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[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .expand[_ngcontent-%COMP%]{border-color:#555}.expand[_ngcontent-%COMP%]{width:20px}.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}.expand[_ngcontent-%COMP%]{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[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:center}"],changeDetection:0}),n})(),SU=new WeakMap,Nw=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)}},Ooe=(()=>{class n{constructor(e,i){this.host=e,this.store=i}onCardIntersection(e,i){let r=[...e].map(s=>{let a=SU.get(s);if(!a)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:a.elementId,cardId:a.cardId}}),o=[...i].map(s=>{let a=SU.get(s);if(!a)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:a.elementId,cardId:a.cardId}});this.store.dispatch(iy({enteredCards:r,exitedCards:o}))}ngOnInit(){let e=this.host.nativeElement;SU.set(e,{elementId:(Ioe++,Symbol(Ioe)),cardId:this.cardId}),this.cardObserver||(this.cardObserver=new Nw),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)(M(Re),M(Ce))},n.\u0275dir=He({type:n,selectors:[["","cardLazyLoader",""]],inputs:{cardId:["cardLazyLoader","cardId"],cardObserver:"cardObserver"}}),n})(),e5e=["button"],t5e=["*"],koe=new pe("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),Foe=new pe("MatButtonToggleGroup"),n5e={provide:No,useExisting:Jn(()=>EU),multi:!0},Noe=0,mR=class{constructor(t,e){this.source=t,this.value=e}},EU=(()=>{class n{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-"+Noe++,this.valueChange=new G,this.change=new G,this.appearance=i&&i.appearance?i.appearance:"standard"}get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}get vertical(){return this._vertical}set vertical(e){this._vertical=Rt(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=Rt(e),this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._markButtonsForCheck()}ngOnInit(){this._selectionModel=new Ah(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 mR(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)(M(nn),M(koe,8))},n.\u0275dir=He({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(e,i,r){if(1&e&&Ei(r,r5e,5),2&e){let o;Ne(o=Le())&&(i._buttonToggles=o)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(e,i){2&e&&(ze("aria-disabled",i.disabled),et("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:[$t([n5e,{provide:Foe,useExisting:n}])]}),n})(),i5e=qo(class{}),r5e=(()=>{class n extends i5e{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=i,this._elementRef=r,this._focusMonitor=o,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new G;let l=Number(s);this.tabIndex=l||0===l?l:null,this.buttonToggleGroup=e,this.appearance=a&&a.appearance?a.appearance:"standard"}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=Rt(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=Rt(e)}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||"mat-button-toggle-"+Noe++,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 mR(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)(M(Foe,8),M(nn),M(Re),M(Fr),vo("tabindex"),M(koe,8))},n.\u0275cmp=R({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(e,i){if(1&e&&ot(e5e,5),2&e){let r;Ne(r=Le())&&(i._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(e,i){1&e&&P("focus",function(){return i.focus()}),2&e&&(ze("aria-label",null)("aria-labelledby",null)("id",i.id)("name",null),et("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:[tt],ngContentSelectors:t5e,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&&(xi(),_(0,"button",0,1),P("click",function(){return i._onButtonClick()}),_(2,"span",2),Vn(3),v()(),O(4,"span",3)(5,"span",4)),2&e){let r=$e(1);y("id",i.buttonId)("disabled",i.disabled||null),ze("tabindex",i.disabled?-1:i.tabIndex)("aria-pressed",i.checked)("name",i._getButtonName())("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby),C(5),y("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)}},dependencies:[Yo],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})(),gR=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln,_l,ln]}),n})();function s5e(n,t){if(1&n&&(In(),O(0,"circle",4)),2&n){let e=S(),i=$e(1);Pt("animation-name","mat-progress-spinner-stroke-rotate-"+e._spinnerAnimationLabel)("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),ze("r",e._getCircleRadius())}}function a5e(n,t){if(1&n&&(In(),O(0,"circle",4)),2&n){let e=S(),i=$e(1);Pt("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%")("transform-origin",e._getCircleTransformOrigin(i)),ze("r",e._getCircleRadius())}}var c5e=ko(class{constructor(n){this._elementRef=n}},"primary"),u5e=new pe("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),Bo=class extends c5e{constructor(t,e,i,r,o,s,a,l){super(t),this._document=i,this._diameter=100,this._value=0,this._resizeSubscription=Sn.EMPTY,this.mode="determinate";let c=Bo._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),c.has(i.head)||c.set(i.head,new Set([100])),this._noopAnimations="NoopAnimations"===r&&!!o&&!o._forceAnimations,"mat-spinner"===t.nativeElement.nodeName.toLowerCase()&&(this.mode="indeterminate"),o&&(o.color&&(this.color=this.defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth)),e.isBrowser&&e.SAFARI&&a&&s&&l&&(this._resizeSubscription=a.change(150).subscribe(()=>{"indeterminate"===this.mode&&l.run(()=>s.markForCheck())}))}get diameter(){return this._diameter}set diameter(t){this._diameter=Bi(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=Bi(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Bi(t)))}ngOnInit(){let t=this._elementRef.nativeElement;this._styleRoot=a2(t)||this._document.head,this._attachStyleNode(),t.classList.add("mat-progress-spinner-indeterminate-animation")}ngOnDestroy(){this._resizeSubscription.unsubscribe()}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){let t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_getCircleTransformOrigin(t){let e=50*(t.currentScale??1);return`${e}% ${e}%`}_attachStyleNode(){let t=this._styleRoot,e=this._diameter,i=Bo._diameters,r=i.get(t);if(!r||!r.has(e)){let o=this._document.createElement("style");o.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),o.textContent=this._getAnimationText(),t.appendChild(o),r||(r=new Set,i.set(t,r)),r.add(e)}}_getAnimationText(){let t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n    0%      { stroke-dashoffset: START_VALUE;  transform: rotate(0); }\n    12.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(0); }\n    12.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(72.5deg); }\n    25%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(72.5deg); }\n\n    25.0001%   { stroke-dashoffset: START_VALUE;  transform: rotate(270deg); }\n    37.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(270deg); }\n    37.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(161.5deg); }\n    50%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(161.5deg); }\n\n    50.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(180deg); }\n    62.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(180deg); }\n    62.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(251.5deg); }\n    75%     { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(251.5deg); }\n\n    75.0001%  { stroke-dashoffset: START_VALUE;  transform: rotate(90deg); }\n    87.5%   { stroke-dashoffset: END_VALUE;    transform: rotate(90deg); }\n    87.5001%  { stroke-dashoffset: END_VALUE;    transform: rotateX(180deg) rotate(341.5deg); }\n    100%    { stroke-dashoffset: START_VALUE;  transform: rotateX(180deg) rotate(341.5deg); }\n  }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}};Bo._diameters=new WeakMap,Bo.\u0275fac=function(t){return new(t||Bo)(M(Re),M(oi),M(Ht,8),M(Pi,8),M(u5e),M(nn),M(Va),M(_t))},Bo.\u0275cmp=R({type:Bo,selectors:[["mat-progress-spinner"],["mat-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner","mat-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(ze("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),Pt("width",e.diameter,"px")("height",e.diameter,"px"),et("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",diameter:"diameter",strokeWidth:"strokeWidth",mode:"mode",value:"value"},exportAs:["matProgressSpinner"],features:[tt],decls:4,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["svg",""],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width","transform-origin",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(In(),_(0,"svg",0,1),E(2,s5e,1,11,"circle",2),E(3,a5e,1,9,"circle",3),v()),2&t&&(Pt("width",e.diameter,"px")("height",e.diameter,"px"),y("ngSwitch","indeterminate"===e.mode),ze("viewBox",e._getViewBox()),C(2),y("ngSwitchCase",!0),C(1),y("ngSwitchCase",!1))},dependencies:[Cr,Ur],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}.mat-progress-spinner[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}.mat-progress-spinner._mat-animation-noopable svg,.mat-progress-spinner._mat-animation-noopable circle{animation:none;transition:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"],encapsulation:2,changeDetection:0});var _d=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ln,Me,ln]}),n})();function h5e(n,t){if(1&n&&(_(0,"b"),A(1),v()),2&n){let e=S().$implicit;C(1),je("",e.displayAlias,":")}}function f5e(n,t){if(1&n&&(_(0,"mat-option",2)(1,"span",3),E(2,h5e,2,1,"b",4),A(3),v()()),2&n){let e=t.$implicit;y("value",e.value)("disabled",e.disabled),C(1),ET("title","",e.displayAlias,": ",e.displayText,""),C(1),y("ngIf",e.displayAlias),C(1),je(" ",e.displayText," ")}}var Loe=(()=>{class n{constructor(){this.value="",this.options=[],this.selectionChange=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["tb-dropdown"]],inputs:{value:"value",options:"options"},outputs:{selectionChange:"selectionChange"},decls:2,vars:2,consts:[[3,"value","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"option-content",3,"title"],[4,"ngIf"]],template:function(e,i){1&e&&(_(0,"mat-select",0),P("selectionChange",function(o){return i.selectionChange.emit(o.value)}),E(1,f5e,4,6,"mat-option",1),v()),2&e&&(y("value",i.value),C(1),y("ngForOf",i.options))},dependencies:[dn,Be,Hh,Os],styles:["mat-select[_ngcontent-%COMP%]{border:1px solid #8e98a3;border-radius:3px;box-sizing:border-box;padding:6px}mat-select[_ngcontent-%COMP%]:focus{outline-color:-webkit-focus-ring-color;outline-style:auto}  .mat-select-panel{max-width:70vw}  mat-option.mat-option{height:auto}  .mat-option-text{white-space:normal;word-break:break-all}.option-content[_ngcontent-%COMP%]{white-space:nowrap}"]}),n})();function g5e(n,t){if(1&n){let e=Pe();_(0,"div",32)(1,"mat-checkbox",27),P("change",function(){return oe(e),se(S(2).rangeSelectionToggled.emit())}),A(2,"Enable Range Selection "),v()()}if(2&n){let e=S(2);C(1),y("checked",e.isScalarStepSelectorRangeEnabled)("disabled",!e.isAxisTypeStep())}}function _5e(n,t){if(1&n){let e=Pe();_(0,"div",33)(1,"mat-checkbox",27),P("change",function(){return oe(e),se(S(2).linkedTimeToggled.emit())}),A(2),v()()}if(2&n){let e=S(2);C(1),y("checked",e.isLinkedTimeEnabled)("disabled",!e.isAxisTypeStep()),C(1),je("Link by step ",e.getLinkedTimeSelectionStartStep()," ")}}function v5e(n,t){1&n&&O(0,"mat-icon",37)}function y5e(n,t){1&n&&O(0,"mat-icon",38)}function b5e(n,t){if(1&n){let e=Pe();_(0,"div",34),P("click",function(){return oe(e),se(S(2).onSlideOutToggled.emit())}),E(1,v5e,1,0,"mat-icon",35),E(2,y5e,1,0,"mat-icon",36),A(3," Open Column Edit Control "),v()}if(2&n){let e=S(2);C(1),y("ngIf",!e.isSlideOutMenuOpen),C(1),y("ngIf",e.isSlideOutMenuOpen)}}function x5e(n,t){if(1&n){let e=Pe();_(0,"div",26)(1,"mat-checkbox",27),P("change",function(){return oe(e),se(S().stepSelectorToggled.emit())}),A(2,"Enable step selection and data table "),v(),_(3,"span",28),A(4,"(Scalars only)"),v(),E(5,g5e,3,2,"div",29),E(6,_5e,3,3,"div",30),E(7,b5e,4,2,"div",31),v()}if(2&n){let e=S();y("title",e.isAxisTypeStep()?"":"Only available when Horizontal Axis is set to step"),C(1),y("checked",e.isScalarStepSelectorEnabled)("disabled",!e.isAxisTypeStep()),C(4),y("ngIf",e.isRangeSelectionAllowed),C(1),y("ngIf",e.isLinkedTimeFeatureEnabled),C(1),y("ngIf",e.isScalarColumnCustomizationEnabled)}}function C5e(n,t){if(1&n){let e=Pe();_(0,"section",39)(1,"h3",1),A(2,"Images"),v(),_(3,"div",40)(4,"div",41),A(5,"Brightness"),v(),_(6,"div",8)(7,"mat-slider",42),P("input",function(r){return oe(e),se(S().imageBrightnessSliderChanged$.emit(r.value))}),v(),_(8,"button",43),P("click",function(){return oe(e),se(S().imageBrightnessReset.emit())}),O(9,"mat-icon",11),v()()(),_(10,"div",44)(11,"div",45),A(12,"Contrast"),v(),_(13,"div",8)(14,"mat-slider",46),P("input",function(r){return oe(e),se(S().imageContrastSliderChanged$.emit(r.value))}),v(),_(15,"button",47),P("click",function(){return oe(e),se(S().imageContrastReset.emit())}),O(16,"mat-icon",11),v()()(),_(17,"div",48)(18,"mat-checkbox",20),P("change",function(r){return oe(e),se(S().imageShowActualSizeChanged.emit(r.checked))}),A(19,"Show actual image size"),v()()()}if(2&n){let e=S();C(7),y("max",2e3)("min",0)("step",10)("value",e.imageBrightnessInMilli)("thumbLabel",!0)("displayWith",e.formatMilliToZeroth),C(7),y("max",5e3)("min",0)("step",10)("value",e.imageContrastInMilli)("thumbLabel",!0)("displayWith",e.formatMilliToZeroth),C(4),y("checked",e.imageShowActualSize)}}var Voe=(()=>{class n{constructor(e){this.locale=e,this.linkedTimeToggled=new G,this.linkedTimeSelectionChanged=new G,this.stepSelectorToggled=new G,this.rangeSelectionToggled=new G,this.onSlideOutToggled=new G,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 G,this.ignoreOutliersChanged=new G,this.XAxisType=Ji,this.XAxisTypeDropdownOptions=[{value:Ji.STEP,displayText:"Step"},{value:Ji.RELATIVE,displayText:"Relative"},{value:Ji.WALL_TIME,displayText:"Wall"}],this.xAxisTypeChanged=new G,this.MAX_CARD_WIDTH_SLIDER_VALUE=735,this.MIN_CARD_WIDTH_SLIDER_VALUE=335,this.cardWidthSliderChanged$=new G,this.cardWidthChanged=this.cardWidthSliderChanged$.pipe(bu(250)),this.cardWidthReset=new G,this.HistogramModeDropdownOptions=[{value:zr.OFFSET,displayText:"Offset"},{value:zr.OVERLAY,displayText:"Overlay"}],this.histogramModeChanged=new G,this.MAX_SMOOTHING_VALUE=.999,this.MAX_SMOOTHING_SLIDER_VALUE=.99,this.scalarSmoothingControlChanged$=new G,this.scalarSmoothingChanged=this.scalarSmoothingControlChanged$.pipe(bu(250)),this.scalarPartitionXToggled=new G,this.imageBrightnessSliderChanged$=new G,this.imageBrightnessInMilliChanged=this.imageBrightnessSliderChanged$.pipe(bu(250)),this.imageBrightnessReset=new G,this.imageContrastSliderChanged$=new G,this.imageContrastInMilliChanged=this.imageContrastSliderChanged$.pipe(bu(250)),this.imageContrastReset=new G,this.imageShowActualSizeChanged=new G}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 u5(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===Ji.STEP}}return n.\u0275fac=function(e){return new(e||n)(M(Wd))},n.\u0275cmp=R({type:n,selectors:[["metrics-dashboard-settings-component"]],inputs:{isLinkedTimeFeatureEnabled:"isLinkedTimeFeatureEnabled",isRangeSelectionAllowed:"isRangeSelectionAllowed",isLinkedTimeEnabled:"isLinkedTimeEnabled",isScalarStepSelectorFeatureEnabled:"isScalarStepSelectorFeatureEnabled",isScalarStepSelectorEnabled:"isScalarStepSelectorEnabled",isScalarStepSelectorRangeEnabled:"isScalarStepSelectorRangeEnabled",isScalarColumnCustomizationEnabled:"isScalarColumnCustomizationEnabled",linkedTimeSelection:"linkedTimeSelection",stepMinMax:"stepMinMax",isSlideOutMenuOpen:"isSlideOutMenuOpen",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",linkedTimeSelectionChanged:"linkedTimeSelectionChanged",stepSelectorToggled:"stepSelectorToggled",rangeSelectionToggled:"rangeSelectionToggled",onSlideOutToggled:"onSlideOutToggled",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:43,vars:22,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"],["class","control-row scalars-step-selector",3,"title",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","value","thumbLabel","input"],["mat-icon-button","","aria-label",t,"title","Reset card width",1,"reset-button",3,"click"],["svgIcon","settings_backup_restore_24px"],[1,"scalars"],[1,"control-row","scalars-smoothing"],["id","scalars-smoothing-label",1,"control-name"],["aria-labelledby","scalars-smoothing-label","color","primary",3,"max","min","step","value","thumbLabel","input"],["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"],[1,"control-row","scalars-step-selector",3,"title"],[3,"checked","disabled","change"],[1,"indent"],["class","indent range-selection",4,"ngIf"],["class","control-row linked-time indent",4,"ngIf"],["class","column-edit-menu-toggle",3,"click",4,"ngIf"],[1,"indent","range-selection"],[1,"control-row","linked-time","indent"],[1,"column-edit-menu-toggle",3,"click"],["svgIcon","chevron_left_24px",4,"ngIf"],["svgIcon","chevron_right_24px",4,"ngIf"],["svgIcon","chevron_left_24px"],["svgIcon","chevron_right_24px"],[1,"image"],[1,"control-row","image-brightness"],["id","image-brightness-label",1,"control-name"],["aria-labelledby","image-brightness-label","color","primary",3,"max","min","step","value","thumbLabel","displayWith","input"],["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",3,"max","min","step","value","thumbLabel","displayWith","input"],["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&&(_(0,"section",0)(1,"h3",1),A(2,"General"),v(),_(3,"div",2)(4,"div",3),A(5,"Horizontal Axis"),v(),_(6,"tb-dropdown",4),P("selectionChange",function(o){return i.xAxisTypeChanged.emit(o)}),v()(),E(7,x5e,8,6,"div",5),_(8,"div",6)(9,"div",7),A(10,"Card Width"),v(),_(11,"div",8)(12,"mat-slider",9),P("input",function(o){return i.cardWidthSliderChanged$.emit(o.value)}),v(),_(13,"button",10),P("click",function(){return i.cardWidthReset.emit()}),O(14,"mat-icon",11),v()()()(),_(15,"section",12)(16,"h3",1),A(17,"Scalars"),v(),_(18,"div",13)(19,"div",14),A(20,"Smoothing"),v(),_(21,"div",8)(22,"mat-slider",15),P("input",function(o){return i.scalarSmoothingControlChanged$.emit(o.value)}),v(),_(23,"input",16),P("input",function(o){return i.onScalarSmoothingInput(o)}),v()()(),_(24,"div",17)(25,"div",18),A(26,"Tooltip sorting method"),v(),_(27,"tb-dropdown",4),P("selectionChange",function(o){return i.tooltipSortChanged.emit(o)}),v()(),_(28,"div",19)(29,"mat-checkbox",20),P("change",function(o){return i.ignoreOutliersChanged.emit(o.checked)}),A(30,"Ignore outliers in chart scaling"),v()(),_(31,"div",21)(32,"mat-checkbox",20),P("change",function(){return i.scalarPartitionXToggled.emit()}),A(33,"Partition non-monotonic X axis"),v(),O(34,"mat-icon",22),v()(),_(35,"section",23)(36,"h3",1),A(37,"Histograms"),v(),_(38,"div",24)(39,"div",18),A(40,"Mode"),v(),_(41,"tb-dropdown",4),P("selectionChange",function(o){return i.histogramModeChanged.emit(o)}),v()()(),E(42,C5e,20,13,"section",25)),2&e&&(C(6),y("value",i.xAxisType)("options",i.XAxisTypeDropdownOptions),C(1),y("ngIf",i.isScalarStepSelectorFeatureEnabled),C(5),y("max",i.MAX_CARD_WIDTH_SLIDER_VALUE)("min",i.MIN_CARD_WIDTH_SLIDER_VALUE)("step",50)("value",i.cardMinWidth)("thumbLabel",!1),C(10),y("max",i.MAX_SMOOTHING_SLIDER_VALUE)("min",0)("step",.01)("value",i.scalarSmoothing)("thumbLabel",!0),C(1),y("max",i.MAX_SMOOTHING_VALUE)("value",i.scalarSmoothing),C(4),y("value",i.tooltipSort)("options",i.TooltipSortDropdownOptions),C(2),y("checked",i.ignoreOutliers),C(3),y("checked",i.scalarPartitionX),C(9),y("value",i.histogramMode)("options",i.HistogramModeDropdownOptions),C(1),y("ngIf",i.isImageSupportEnabled))},dependencies:[Be,Loe,_n,yl,Gt,up],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(: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}mat-slider[_ngcontent-%COMP%]{flex:1;margin-left:-8px;margin-right:-8px}.column-edit-menu-toggle[_ngcontent-%COMP%]{align-items:center;display:flex;cursor:pointer}.column-edit-menu-toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:15px;width:15px}tb-dropdown[_ngcontent-%COMP%]{display:block}.linked-time[_ngcontent-%COMP%]{padding:5px 0}.control-row[_ngcontent-%COMP%]   .indent[_ngcontent-%COMP%]{margin-left:25px}"],changeDetection:0}),n})(),T5e=Object.freeze({SLIDER:cs.SETTINGS_SLIDER,TEXT:cs.SETTINGS_TEXT,TEXT_DELETED:cs.CHANGE_TO_SINGLE}),Hoe=(()=>{class n{constructor(e){this.store=e,this.isLinkedTimeFeatureEnabled$=this.store.select(M$),this.isRangeSelectionAllowed$=this.store.select(T$),this.isScalarStepSelectorFeatureEnabled$=this.store.select(S$),this.isScalarStepSelectorEnabled$=this.store.select(fv),this.isScalarStepSelectorRangeEnabled$=this.store.select(mv),this.isLinkedTimeEnabled$=this.store.select(Ym),this.isScalarColumnCustomizationEnabled$=this.store.select(qA),this.linkedTimeSelection$=this.store.select(iH),this.stepMinMax$=this.store.select(nH),this.isSlideOutMenuOpen$=this.store.select(UI),this.isImageSupportEnabled$=this.store.select(gh).pipe(Ye(Boolean),Qt(1),Wt(this.store.select(WA)),L(([,i])=>i)),this.tooltipSort$=this.store.select(pv),this.ignoreOutliers$=this.store.select(hv),this.xAxisType$=this.store.select(td),this.cardMinWidth$=this.store.select(dv),this.histogramMode$=this.store.select(RI),this.scalarSmoothing$=this.store.select(op),this.scalarPartitionX$=this.store.select(OI),this.imageBrightnessInMilli$=this.store.select(kI),this.imageContrastInMilli$=this.store.select(FI),this.imageShowActualSize$=this.store.select(NI)}onTooltipSortChanged(e){this.store.dispatch(jP({sort:e}))}onIgnoreOutliersChanged(){this.store.dispatch(GP())}onXAxisTypeChanged(e){this.store.dispatch(WP({xAxisType:e}))}onCardWidthChanged(e){this.store.dispatch(qP({cardMinWidth:e}))}onCardWidthReset(){this.store.dispatch(YP())}onHistogramModeChanged(e){this.store.dispatch(tR({histogramMode:e}))}onScalarSmoothingChanged(e){this.store.dispatch(XP({smoothing:e}))}onScalarPartitionXToggled(){this.store.dispatch(QP())}onImageBrightnessInMilliChanged(e){this.store.dispatch(KP({brightnessInMilli:e}))}onImageBrightnessReset(){this.store.dispatch(JP())}onImageContrastReset(){this.store.dispatch($P())}onImageContrastInMilliChanged(e){this.store.dispatch(ZP({contrastInMilli:e}))}onImageShowActualSizeChanged(){this.store.dispatch(eR())}onLinkedTimeToggled(){this.store.dispatch(uR({affordance:bl.CHECK_BOX}))}onStepSelectorToggled(){this.store.dispatch(Xh({affordance:bl.CHECK_BOX}))}onRangeSelectionToggled(){this.store.dispatch(hR({affordance:bl.CHECK_BOX}))}onLinkedTimeSelectionChanged({timeSelection:e,source:i}){this.store.dispatch(Yh({timeSelection:e,affordance:T5e[i]}))}onSlideOutToggled(){this.store.dispatch(VP())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-dashboard-settings"]],decls:22,vars:63,consts:[[3,"isImageSupportEnabled","tooltipSort","ignoreOutliers","xAxisType","cardMinWidth","histogramMode","scalarSmoothing","scalarPartitionX","imageBrightnessInMilli","imageContrastInMilli","imageShowActualSize","isLinkedTimeFeatureEnabled","isRangeSelectionAllowed","isScalarStepSelectorFeatureEnabled","isScalarStepSelectorEnabled","isScalarStepSelectorRangeEnabled","isLinkedTimeEnabled","isScalarColumnCustomizationEnabled","linkedTimeSelection","stepMinMax","isSlideOutMenuOpen","tooltipSortChanged","ignoreOutliersChanged","xAxisTypeChanged","cardWidthChanged","cardWidthReset","histogramModeChanged","scalarSmoothingChanged","scalarPartitionXToggled","imageBrightnessInMilliChanged","imageBrightnessReset","imageContrastInMilliChanged","imageContrastReset","imageShowActualSizeChanged","linkedTimeToggled","linkedTimeSelectionChanged","stepSelectorToggled","rangeSelectionToggled","onSlideOutToggled"]],template:function(e,i){1&e&&(_(0,"metrics-dashboard-settings-component",0),P("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()})("linkedTimeSelectionChanged",function(o){return i.onLinkedTimeSelectionChanged(o)})("stepSelectorToggled",function(){return i.onStepSelectorToggled()})("rangeSelectionToggled",function(){return i.onRangeSelectionToggled()})("onSlideOutToggled",function(){return i.onSlideOutToggled()}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),B(11,"async"),B(12,"async"),B(13,"async"),B(14,"async"),B(15,"async"),B(16,"async"),B(17,"async"),B(18,"async"),B(19,"async"),B(20,"async"),B(21,"async"),v()),2&e&&y("isImageSupportEnabled",U(1,21,i.isImageSupportEnabled$))("tooltipSort",U(2,23,i.tooltipSort$))("ignoreOutliers",U(3,25,i.ignoreOutliers$))("xAxisType",U(4,27,i.xAxisType$))("cardMinWidth",U(5,29,i.cardMinWidth$))("histogramMode",U(6,31,i.histogramMode$))("scalarSmoothing",U(7,33,i.scalarSmoothing$))("scalarPartitionX",U(8,35,i.scalarPartitionX$))("imageBrightnessInMilli",U(9,37,i.imageBrightnessInMilli$))("imageContrastInMilli",U(10,39,i.imageContrastInMilli$))("imageShowActualSize",U(11,41,i.imageShowActualSize$))("isLinkedTimeFeatureEnabled",U(12,43,i.isLinkedTimeFeatureEnabled$))("isRangeSelectionAllowed",U(13,45,i.isRangeSelectionAllowed$))("isScalarStepSelectorFeatureEnabled",U(14,47,i.isScalarStepSelectorFeatureEnabled$))("isScalarStepSelectorEnabled",U(15,49,i.isScalarStepSelectorEnabled$))("isScalarStepSelectorRangeEnabled",U(16,51,i.isScalarStepSelectorRangeEnabled$))("isLinkedTimeEnabled",U(17,53,i.isLinkedTimeEnabled$))("isScalarColumnCustomizationEnabled",U(18,55,i.isScalarColumnCustomizationEnabled$))("linkedTimeSelection",U(19,57,i.linkedTimeSelection$))("stepMinMax",U(20,59,i.stepMinMax$))("isSlideOutMenuOpen",U(21,61,i.isSlideOutMenuOpen$))},dependencies:[Voe,Ge],encapsulation:2,changeDetection:0}),n})(),Uoe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metrics-dashboard-right-pane"]],decls:1,vars:0,template:function(e,i){1&e&&O(0,"metrics-dashboard-settings")},dependencies:[Hoe],encapsulation:2,changeDetection:0}),n})();function I5e(n,t){1&n&&O(0,"mat-icon",3)}function P5e(n,t){1&n&&O(0,"mat-icon",3)}function R5e(n,t){1&n&&O(0,"div",4)}var vR=(()=>{class n{constructor(){this.ColumnHeaderType=Kt}getHeaderTextColumn(e){switch(e){case Kt.RUN:return"Run";case Kt.VALUE:return"Value";case Kt.STEP:return"Step";case Kt.TIME:return"Time";case Kt.RELATIVE_TIME:return"Relative";case Kt.SMOOTHED:return"Smoothed";case Kt.VALUE_CHANGE:return"Value";case Kt.START_STEP:return"Start Step";case Kt.END_STEP:return"End Step";case Kt.START_VALUE:return"Start Value";case Kt.END_VALUE:return"End Value";case Kt.MIN_VALUE:return"Min";case Kt.MAX_VALUE:return"Max";case Kt.PERCENTAGE_CHANGE:return"%";default:return""}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["tb-data-table-header"]],inputs:{header:"header"},decls:6,vars:4,consts:[[1,"header-container",3,"ngSwitch"],["svgIcon","change_history_24px",4,"ngSwitchCase"],["class","extra-right-padding",4,"ngSwitchDefault"],["svgIcon","change_history_24px"],[1,"extra-right-padding"]],template:function(e,i){1&e&&(_(0,"div",0),E(1,I5e,1,0,"mat-icon",1),E(2,P5e,1,0,"mat-icon",1),E(3,R5e,1,0,"div",2),_(4,"span"),A(5),v()()),2&e&&(y("ngSwitch",i.header.type),C(1),y("ngSwitchCase",i.ColumnHeaderType.VALUE_CHANGE),C(1),y("ngSwitchCase",i.ColumnHeaderType.PERCENTAGE_CHANGE),C(3),yt(i.getHeaderTextColumn(i.header.type)))},dependencies:[Cr,Ur,ch,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}"],changeDetection:0}),n})();function O5e(n,t){if(1&n){let e=Pe();_(0,"div",6)(1,"mat-checkbox",7),P("change",function(){let o=oe(e).$implicit,s=S().dataTableMode;return se(S().toggleHeader(o,s))}),O(2,"tb-data-table-header",8),v()()}if(2&n){let e=t.$implicit;C(1),y("checked",e.enabled),C(1),y("header",e)}}function k5e(n,t){if(1&n&&(_(0,"div",4),E(1,O5e,3,2,"div",5),v()),2&n){let e=t.headers;C(1),y("ngForOf",e)}}var joe=function(n,t){return{headers:n,dataTableMode:t}},Goe=(()=>{class n{constructor(){this.DataTableMode=gd,this.selectedTab=gd.SINGLE,this.onScalarTableColumnToggled=new G}toggleHeader(e,i){this.onScalarTableColumnToggled.emit({dataTableMode:i,headerType:e.type})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metrics-scalar-column-editor-component"]],inputs:{rangeHeaders:"rangeHeaders",singleHeaders:"singleHeaders"},outputs:{onScalarTableColumnToggled:"onScalarTableColumnToggled"},decls:8,vars:12,consts:[[1,"tab-group"],[3,"label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["headerList",""],[1,"header-list"],["class","header-list-item",4,"ngFor","ngForOf"],[1,"header-list-item"],[3,"checked","change"],[3,"header"]],template:function(e,i){if(1&e&&(_(0,"div")(1,"mat-tab-group",0)(2,"mat-tab",1),O(3,"ngContext",2),v(),_(4,"mat-tab",1),O(5,"ngContext",2),v()()(),E(6,k5e,2,1,"ng-template",null,3,qt)),2&e){let r=$e(7);C(2),y("label","Single"),C(1),y("ngTemplateOutlet",r)("ngTemplateOutletContext",Qr(6,joe,i.singleHeaders,i.DataTableMode.SINGLE)),C(1),y("label","Range"),C(1),y("ngTemplateOutlet",r)("ngTemplateOutletContext",Qr(9,joe,i.rangeHeaders,i.DataTableMode.RANGE))}},dependencies:[dn,os,vR,yl,Z2,xw],styles:["[_nghost-%COMP%]     .mat-tab-label{min-width:0}.tab-group[_ngcontent-%COMP%]{position:relative;z-index:0}.header-list[_ngcontent-%COMP%]{margin-top:5%;margin-left:5%}.header-list-item[_ngcontent-%COMP%]{padding:3px}"],changeDetection:0}),n})(),Woe=(()=>{class n{constructor(e){this.store=e,this.singleHeaders$=this.store.select(BI),this.rangeHeaders$=this.store.select(VI)}onScalarTableColumnToggled({dataTableMode:e,headerType:i}){this.store.dispatch(pR({dataTableMode:e,headerType:i}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-scalar-column-editor"]],decls:3,vars:6,consts:[[3,"singleHeaders","rangeHeaders","onScalarTableColumnToggled"]],template:function(e,i){1&e&&(_(0,"metrics-scalar-column-editor-component",0),P("onScalarTableColumnToggled",function(o){return i.onScalarTableColumnToggled(o)}),B(1,"async"),B(2,"async"),v()),2&e&&y("singleHeaders",U(1,2,i.singleHeaders$))("rangeHeaders",U(2,4,i.rangeHeaders$))},dependencies:[Goe,Ge],encapsulation:2,changeDetection:0}),n})(),L5e=J(PI,oo,(n,t)=>n.filter(e=>!ml(e.plugin)||Boolean(t&&t.get(e.runId)))),mg=J(L5e,n=>n.sort((t,e)=>Fw(t.tag,e.tag))),ay=(()=>{class n{constructor(e,i){this.ref=e,this.cdkScrollable=i,this.onVisibilityChange=new G,this.ngUnsubscribe$=new ke,this.onEvent$=new ke}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(st(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(Qt(1)).subscribe(()=>{e()}))}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(Ih,8))},n.\u0275dir=He({type:n,selectors:[["","observeIntersection",""]],inputs:{intersectionObserverMargin:"intersectionObserverMargin"},outputs:{onVisibilityChange:"onVisibilityChange"}}),n})(),qoe="/scalar_summary";function ly(n,t){let e=n;return t&&n.startsWith(t+"/")&&(e=n.slice(t.length+1)),e.endsWith(qoe)&&(e=e.slice(0,-qoe.length)),e||n}function Yoe(n,t,e){return n<t?t:n>e?e:n}function Qh(n,t,e){let i=Yoe(n.start.step,t,e),r=n.end?Yoe(n.end.step,t,e):null;return{startStep:i,endStep:r,clipped:i!==n.start.step||r!==(n.end?.step??null)}}var V5e=["measurer"],H5e=["input"],Joe=(()=>{class n{constructor(e){this.changeDetector=e,this.placeholder="",this.style="default",this.patternRegex=new RegExp(".*"),this.isValid=!0,this.onValueChange=new G,this.blur=new G,this.focus=new G,this.keydown=new G,this.keyup=new G,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)(M(nn))},n.\u0275cmp=R({type:n,selectors:[["content-wrapping-input"]],viewQuery:function(e,i){if(1&e&&(ot(V5e,7,Re),ot(H5e,7,Re)),2&e){let r;Ne(r=Le())&&(i.measurerElRef=r.first),Ne(r=Le())&&(i.inputElRef=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Da(i.style)},inputs:{value:"value",placeholder:"placeholder",style:"style",pattern:"pattern"},outputs:{onValueChange:"onValueChange",blur:"blur",focus:"focus",keydown:"keydown",keyup:"keyup"},features:[Ft],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&&(_(0,"span")(1,"span",0,1),A(3),v(),_(4,"input",2,3),P("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)}),v()()),2&e&&(et("container",!0)("is-valid",i.isValid),C(3),yt(i.internalValue||i.placeholder),C(1),y("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 z5e(n,t){if(1&n){let e=Pe();_(0,"content-wrapping-input",3),P("onValueChange",function(r){return oe(e),se(S().aliasChanged.emit(r))}),v()}if(2&n){let e=S();jl(e.isAliasNameLegal?"high-contrast":"error"),y("value",e.alias.aliasText)}}function j5e(n,t){if(1&n&&(_(0,"span",4),A(1),v()),2&n){let e=S();et("illegal",!e.isAliasNameLegal),y("title",e.title),C(1),yt(e.alias.aliasText)}}var cy=(()=>{class n{constructor(){this.isAliasNameLegal=!0,this.aliasChanged=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"span",0),A(1),v(),E(2,z5e,1,3,"content-wrapping-input",1),E(3,j5e,2,4,"ng-template",null,2,qt)),2&e){let r=$e(4);C(1),yt(i.alias.aliasNumber),C(1),y("ngIf",i.aliasEditable)("ngIfElse",r)}},dependencies:[Be,Joe],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 G5e(n,t){1&n&&O(0,"tb-experiment-alias",2),2&n&&y("alias",S().experimentAlias)}function W5e(n,t){1&n&&(_(0,"span"),A(1,"/"),v())}var $oe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(E(0,G5e,1,1,"tb-experiment-alias",0),E(1,W5e,2,0,"span",1),_(2,"span"),A(3),v()),2&e&&(y("ngIf",null!=i.experimentAlias),C(1),y("ngIf",null!=i.experimentAlias),C(2),yt(i.name))},dependencies:[Be,cy],styles:["[_nghost-%COMP%]{color:#616161}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),yR=(()=>{class n{constructor(e){this.store=e}ngOnInit(){this.name$=Lt([this.store.select(WI,{runId:this.runId})]).pipe(L(([e])=>function(n,t,e){if(!t)return n;let i=t?.name??"...";return i}(this.runId,e))),this.experimentAlias$=Lt([this.store.select(GI,{runId:this.runId}),this.store.select(Yu)]).pipe(L(([e,i])=>e?i[e]:null))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["card-run-name"]],inputs:{runId:"runId"},decls:4,vars:9,consts:[[3,"name","experimentAlias"]],template:function(e,i){1&e&&(O(0,"card-run-name-component",0),B(1,"async"),B(2,"async"),B(3,"async")),2&e&&(y("name",U(1,3,i.name$))("experimentAlias",U(3,7,i.experimentAlias$)),ze("title",U(2,5,i.name$)))},dependencies:[$oe,Ge],encapsulation:2,changeDetection:0}),n})();function Y5e(n,t){if(1&n&&(_(0,"span",2),A(1),v()),2&n){let e=S();C(1),yt(e.firstTextPart())}}var uy=(()=>{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=R({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&&(E(0,Y5e,2,1,"span",0),_(1,"span",1),A(2),v()),2&e&&(y("ngIf",i.firstTextPart().length>0),C(2),yt(i.secondTextPart()))},dependencies:[Be],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 X5e(n,t){1&n&&O(0,"mat-icon",2)}function Q5e(n,t){1&n&&O(0,"mat-icon",3)}var dy=(()=>{class n{constructor(){this.isClipped=!1,this.isClosestStepHighlighted=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(E(0,X5e,1,0,"mat-icon",0),E(1,Q5e,1,0,"mat-icon",1)),2&e&&(y("ngIf",i.isClipped),C(1),y("ngIf",i.isClosestStepHighlighted))},dependencies:[Be,Gt],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 K5e(n,t){if(1&n&&(_(0,"span",19),A(1),B(2,"number"),v()),2&n){let e=S();C(1),je("Step ",U(2,1,e.steps[e.stepIndex]),"")}}function Z5e(n,t){if(1&n&&(_(0,"span",20),A(1),B(2,"number"),B(3,"number"),v()),2&n){let e=S();C(1),Xp("Sample ",U(2,2,e.sample+1),"/",U(3,4,e.numSample),"")}}function J5e(n,t){1&n&&O(0,"mat-spinner",21)}function $5e(n,t){if(1&n&&(_(0,"span"),O(1,"span",30)(2,"span",31),v()),2&n){let e=S(3);C(2),Pt("left",e.sliderStartPosition)("width",e.sliderTrackWidth)}}function e4e(n,t){if(1&n&&O(0,"div",32),2&n){let e=t.$implicit,i=S(3);Pt("left",i.getLinkedTimeTickLeftStyle(e))("margin-left",i.getLinkedTimeTickMarginLeftStyle(e))}}function t4e(n,t){if(1&n&&(_(0,"div",27),E(1,$5e,3,4,"span",28),E(2,e4e,1,4,"div",29),v()),2&n){let e=S(2);C(1),y("ngIf",null!==e.linkedTimeSelection.endStep),C(1),y("ngForOf",e.selectedSteps)}}var n4e=function(n){return[n]},i4e=function(n){return{filter:n}};function r4e(n,t){if(1&n){let e=Pe();sn(0),_(1,"div",22)(2,"mat-slider",23),P("input",function(r){return oe(e),se(S().onSliderInput(r))}),v(),E(3,t4e,3,2,"div",24),v(),_(4,"div",25),O(5,"img",26),v(),an()}if(2&n){let e=S();C(2),y("ngClass",On(11,n4e,e.linkedTimeSelection&&null!==e.linkedTimeSelection.endStep?"hide-slider":""))("disabled",e.steps.length<=1)("min",0)("max",e.steps.length-1)("step",1)("tickInterval",1)("value",e.stepIndex),C(1),y("ngIf",e.linkedTimeSelection),C(2),Xx("alt","Image at step ",e.steps[e.stepIndex],""),Zi("src",e.imageUrl,zl),y("ngStyle",On(13,i4e,e.cssFilter()))}}function o4e(n,t){1&n&&(_(0,"div",34),A(1," Data failed to load. "),v())}function s4e(n,t){if(1&n&&E(0,o4e,2,0,"div",33),2&n){let e=S();y("ngIf",e.loadState===e.DataLoadState.FAILED)}}var a4e=function(n){return{backgroundColor:n}},tse=(()=>{class n{constructor(){this.DataLoadState=Oe,this.sliderStartPosition="",this.sliderTrackWidth="",this.linkedTimeSelection=null,this.isClosestStepHighlighted=!1,this.onActualSizeToggle=new G,this.stepIndexChange=new G,this.onPinClicked=new G}cssFilter(){return`contrast(${this.contrastInMilli/10}%) brightness(${this.brightnessInMilli/1e3})`}onSliderInput(e){this.stepIndexChange.emit(e.value)}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:s}=this.getTrackStartPositionAndWidth(i,r,e);this.sliderStartPosition=100*o+"%",this.sliderTrackWidth=100*s+"%"}getTrackStartPositionAndWidth(e,i,r){let o=1/r,s=0,a=0,l=0;for(;l<this.steps.length-1;l++){let c=this.steps[l],u=this.steps[l+1];if(c<=e&&e<=u){s+=(e-c)/(u-c);break}}for(s=(s+l)*o;l<this.steps.length-1;l++){let c=this.steps[l],u=this.steps[l+1];if(e>=c&&i<=u){a=(i-e)/(u-c);break}if(e>=c&&i>=u)a+=(u-e)/(u-c);else{if(!(i>=u)){a+=(i-c)/(u-c);break}a+=1}}return a*=o,(s>1||s<0)&&(s=0),{startPosition:s,width:a}}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)*14}px`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["image-card-component"]],hostVars:2,hostBindings:function(e,i){2&e&&et("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:[Ft],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,1,"pin-button",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,"ngClass","disabled","min","max","step","tickInterval","value","input"],["class","linked-time-wrapper",4,"ngIf"],[1,"img-container"],[3,"alt","src","ngStyle"],[1,"linked-time-wrapper"],[4,"ngIf"],["class","linked-time-tick",3,"left","margin-left",4,"ngFor","ngForOf"],[1,"slider-track"],[1,"slider-track-fill"],[1,"linked-time-tick"],["class","empty-message",4,"ngIf"],[1,"empty-message"]]},template:function(e,i){if(1&e&&(_(0,"div",0)(1,"div",1)(2,"span",2),O(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),v(),_(5,"span",5)(6,"button",6),P("click",function(){return i.onPinClicked.emit(!i.isPinned)}),O(7,"mat-icon",7),v(),_(8,"button",8),P("click",function(){return i.onActualSizeToggle.emit()}),O(9,"mat-icon",9),v()()(),_(10,"div",1)(11,"span",10),O(12,"span",11)(13,"card-run-name",12),v(),_(14,"div",13),E(15,K5e,3,3,"span",14),E(16,Z5e,4,6,"span",15),E(17,J5e,1,0,"mat-spinner",16),v()()(),E(18,r4e,6,15,"ng-container",17),E(19,s4e,1,1,"ng-template",null,18,qt)),2&e){let r=$e(20);C(3),Zi("title",i.tag),Zi("value",i.title),C(1),y("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),C(2),ze("title",i.isPinned?"Unpin card":"Pin card"),C(1),y("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),C(1),y("disabled",!i.allowToggleActualSize),C(4),y("ngStyle",On(14,a4e,i.runColorScale(i.runId))),C(1),y("runId",i.runId),C(2),y("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length),C(1),y("ngIf",i.numSample>1),C(1),y("ngIf",i.loadState===i.DataLoadState.LOADING),C(1),y("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length)("ngIfElse",r)}},dependencies:[Fn,dn,Be,zu,_n,Gt,Bo,up,yR,uy,dy,Ql],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}.pin-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:18px}.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}.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:14px;position:absolute;width:14px}body.dark-mode[_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%]{background-color:#212121}.slider-track[_ngcontent-%COMP%], .slider-track-fill[_ngcontent-%COMP%]{height:2px;top:6px;position:absolute}.slider-track[_ngcontent-%COMP%]{background:rgba(0,0,0,.26);left:7px;width:calc(100% - 14px)}body.dark-mode[_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%]{background:rgba(255,255,255,.3)}.slider-track-fill[_ngcontent-%COMP%]{background:#f57c00}body.dark-mode[_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%]{background:#ef6c00}"],changeDetection:0}),n})(),nse=(()=>{class n{constructor(e,i){this.store=e,this.dataSource=i,this.fullWidthChanged=new G,this.pinStateChanged=new G,this.brightnessInMilli$=this.store.select(kI),this.contrastInMilli$=this.store.select(FI),this.actualSizeGlobalSetting$=this.store.select(NI),this.showActualSize=!1,this.actualSizeUiToggled=!1,this.actualSizeUiToggleSubject=new hr(this.actualSizeUiToggled),this.ngUnsubscribe=new ke}onStepIndexChanged(e){this.store.dispatch(oR({cardId:this.cardId,stepIndex:e}))}isImageCardMetadata(e){let{plugin:i}=e;return i===ri.IMAGES}onActualSizeToggle(){this.actualSizeUiToggled=!this.actualSizeUiToggled,this.actualSizeUiToggleSubject.next(this.actualSizeUiToggled)}ngOnInit(){Lt([this.actualSizeGlobalSetting$,this.actualSizeUiToggleSubject]).pipe(st(this.ngUnsubscribe),kt(([l,c])=>{this.showActualSize=l||c,this.fullWidthChanged.emit(this.showActualSize)})).subscribe(()=>{});let i=this.store.select(tc,this.cardId).pipe(st(this.ngUnsubscribe),Ye(l=>!!l&&this.isImageCardMetadata(l)),L(l=>l),Ma(1)),o=Lt([i,this.store.select(xh,this.cardId)]).pipe(st(this.ngUnsubscribe),L(([l,c])=>{let u=l.runId;return c&&c.hasOwnProperty(u)?c[u]:[]}),yi((l,c)=>l.length===c.length&&0===l.length||l===c),Ma(1));this.stepIndex$=this.store.select(tH,this.cardId).pipe(L(l=>l?l.index:null)),this.isClosestStepHighlighted$=this.store.select(tH,this.cardId).pipe(L(l=>!!l&&l.isClosest)),this.loadState$=this.store.select(bh,this.cardId),this.tag$=i.pipe(L(l=>l.tag)),this.title$=this.tag$.pipe(L(l=>ly(l,this.groupName))),this.runId$=i.pipe(L(l=>l.runId)),this.sample$=i.pipe(L(l=>l.sample)),this.numSample$=i.pipe(L(l=>l.numSample)),this.steps$=this.store.select(gee,this.cardId),this.isPinned$=this.store.select(Ch,this.cardId),this.linkedTimeSelection$=this.store.select(Xm).pipe(fr(this.steps$),L(([l,c])=>l?Qh(l,Math.min(...c),Math.max(...c)):null)),this.selectedSteps$=this.linkedTimeSelection$.pipe(fr(this.steps$),L(([l,c])=>l?null===l.endStep?-1!==c.indexOf(l.startStep)?[l.startStep]:[]:c.filter(u=>u>=l.startStep&&u<=l.endStep):[]));let a=Lt([o,this.stepIndex$]).pipe(L(([l,c])=>null!==c&&l[c]?l[c]:null));this.imageUrl$=a.pipe(L(l=>l?this.dataSource.imageUrl(l.imageId):null))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M($u))},n.\u0275cmp=R({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&&(_(0,"image-card-component",0),P("stepIndexChange",function(o){return i.onStepIndexChanged(o)})("onActualSizeToggle",function(){return i.onActualSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),B(11,"async"),B(12,"async"),B(13,"async"),B(14,"async"),B(15,"async"),B(16,"async"),v()),2&e&&y("loadState",U(1,18,i.loadState$))("title",U(2,20,i.title$))("tag",U(3,22,i.tag$))("runId",U(4,24,i.runId$))("sample",U(5,26,i.sample$))("numSample",U(6,28,i.numSample$))("imageUrl",U(7,30,i.imageUrl$))("stepIndex",U(8,32,i.stepIndex$))("steps",U(9,34,i.steps$))("isClosestStepHighlighted",U(10,36,i.isClosestStepHighlighted$))("brightnessInMilli",U(11,38,i.brightnessInMilli$))("contrastInMilli",U(12,40,i.contrastInMilli$))("runColorScale",i.runColorScale)("showActualSize",i.showActualSize)("allowToggleActualSize",!1===U(13,42,i.actualSizeGlobalSetting$))("isPinned",U(14,44,i.isPinned$))("linkedTimeSelection",U(15,46,i.linkedTimeSelection$))("selectedSteps",U(16,48,i.selectedSteps$))},dependencies:[tse,Ge],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})(),dr=(()=>(function(n){n[n.SVG=0]="SVG",n[n.WEBGL=1]="WEBGL"}(dr||(dr={})),dr))(),Nr=(()=>(function(n){n[n.LINEAR=0]="LINEAR",n[n.LOG10=1]="LOG10",n[n.TIME=2]="TIME"}(Nr||(Nr={})),Nr))(),Gr=(()=>(function(n){n.NONE="NONE",n.DRAG_ZOOMING="DRAG_ZOOMING",n.SCROLL_ZOOMING="SCROLL_ZOOMING",n.PANNING="PANNING"}(Gr||(Gr={})),Gr))();function d4e(n,t){1&n&&(_(0,"span"),A(1,"scalar"),v())}function p4e(n,t){1&n&&(_(0,"span"),A(1,"histogram"),v())}function h4e(n,t){1&n&&(_(0,"span"),A(1,"unknown"),v())}function f4e(n,t){if(1&n&&(sn(0,13),E(1,d4e,2,0,"span",14),E(2,p4e,2,0,"span",14),E(3,h4e,2,0,"span",15),an()),2&n){let e=S(2);y("ngSwitch",e.cardMetadata.plugin),C(1),y("ngSwitchCase",e.PluginType.SCALARS),C(1),y("ngSwitchCase",e.PluginType.HISTOGRAMS)}}function m4e(n,t){1&n&&Ni(0)}function g4e(n,t){if(1&n&&(_(0,"option",16),A(1),v()),2&n){let e=t.$implicit;y("value",e.id),C(1),yt(e.name)}}function _4e(n,t){if(1&n){let e=Pe();sn(0),_(1,"h2"),E(2,f4e,4,3,"ng-template",null,2,qt),_(4,"span"),A(5,"Download\xa0"),v(),E(6,m4e,1,0,"ng-container",3),_(7,"span"),A(8,"\xa0data for\xa0"),v(),_(9,"code",4),A(10),v()(),_(11,"mat-dialog-content")(12,"mat-form-field",5)(13,"mat-label"),A(14,"Select a run to download a data for a series"),v(),_(15,"select",6),P("change",function(r){return oe(e),se(S().runSelected.emit(r.target.value))}),_(16,"option",7),A(17,"-"),v(),E(18,g4e,2,2,"option",8),v()(),_(19,"div",9)(20,"span"),A(21,"Download as\u2026"),v(),A(22,"\xa0"),_(23,"a",10),A(24,"JSON"),v(),_(25,"a",10),A(26,"CSV"),v()()(),_(27,"mat-dialog-actions",11)(28,"button",12),A(29,"Close"),v()(),an()}if(2&n){let e=$e(3),i=S();C(6),y("ngTemplateOutlet",e),C(3),y("title",i.cardMetadata.tag),C(1),yt(i.cardMetadata.tag),C(5),y("value",i.selectedRunId||""),C(1),y("value",""),C(2),y("ngForOf",i.runs),C(5),y("disabled",!i.downloadUrlJson)("download",i.getDownloadName("json")),ze("href",i.downloadUrlJson,zl),C(2),y("disabled",!i.downloadUrlCsv)("download",i.getDownloadName("csv")),ze("href",i.downloadUrlCsv,zl)}}function v4e(n,t){1&n&&A(0,"Loading...")}var rse=(()=>{class n{constructor(){this.runSelected=new G,this.PluginType=ri}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=R({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"],["align","end"],["mat-button","","mat-dialog-close",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"NgSwitchDefault"],[3,"value"]],template:function(e,i){if(1&e&&(E(0,_4e,30,12,"ng-container",0),E(1,v4e,1,0,"ng-template",null,1,qt)),2&e){let r=$e(2);y("ngIf",i.cardMetadata)("ngIfElse",r)}},dependencies:[dn,Be,os,Cr,Ur,Dne,Ine,_n,Iv,T2,D2,A2,pd,Nv,Uh],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})(),ose=(()=>{class n{constructor(e,i,r){this.selectedRunId$=new hr(null),this.cardMetadata$=e.select(tc,r.cardId).pipe(Ye(o=>Boolean(o))),this.downloadUrlCsv$=Lt([e.select(tc,r.cardId),this.selectedRunId$]).pipe(L(([o,s])=>o&&s?i.downloadUrl(o.plugin,o.tag,s,"csv"):null),zn(null)),this.downloadUrlJson$=Lt([e.select(tc,r.cardId),this.selectedRunId$]).pipe(L(([o,s])=>o&&s?i.downloadUrl(o.plugin,o.tag,s,"json"):null),zn(null)),this.runs$=Lt([e.select(qI),e.select(xh,r.cardId)]).pipe(L(([o,s])=>s?Object.keys(s).map(a=>o.get(a)).filter(Boolean):[]))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M($u),M(cw))},n.\u0275cmp=R({type:n,selectors:[["data_download_dialog"]],decls:6,vars:15,consts:[[3,"cardMetadata","runs","selectedRunId","downloadUrlCsv","downloadUrlJson","runSelected"]],template:function(e,i){1&e&&(_(0,"data_download_dialog_component",0),P("runSelected",function(o){return i.selectedRunId$.next(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),v()),2&e&&y("cardMetadata",U(1,5,i.cardMetadata$))("runs",U(2,7,i.runs$))("selectedRunId",U(3,9,i.selectedRunId$))("downloadUrlCsv",U(4,11,i.downloadUrlCsv$))("downloadUrlJson",U(5,13,i.downloadUrlJson$))},dependencies:[rse,Ge],encapsulation:2,changeDetection:0}),n})();function uc(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function Bw(n){return 1===n.length&&(n=function(n){return function(t,e){return uc(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 iu=Bw(uc).right;function xR(n,t){var r,o,s,e=n.length,i=-1;if(null==t){for(;++i<e;)if(null!=(r=n[i])&&r>=r)for(o=s=r;++i<e;)null!=(r=n[i])&&(o>r&&(o=r),s<r&&(s=r))}else for(;++i<e;)if(null!=(r=t(n[i],i,n))&&r>=r)for(o=s=r;++i<e;)null!=(r=t(n[i],i,n))&&(o>r&&(o=r),s<r&&(s=r));return[o,s]}var cse=Array.prototype.slice;function Vw(n){return function(){return n}}function use(n){return n}function Kh(n,t,e){n=+n,t=+t,e=(r=arguments.length)<2?(t=n,n=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((t-n)/e)),o=new Array(r);++i<r;)o[i]=n+i*e;return o}var RU=Math.sqrt(50),OU=Math.sqrt(10),kU=Math.sqrt(2);function Hw(n,t,e){var i,o,s,a,r=-1;if(e=+e,(n=+n)==(t=+t)&&e>0)return[n];if((i=t<n)&&(o=n,n=t,t=o),0===(a=py(n,t,e))||!isFinite(a))return[];if(a>0)for(n=Math.ceil(n/a),t=Math.floor(t/a),s=new Array(o=Math.ceil(t-n+1));++r<o;)s[r]=(n+r)*a;else for(n=Math.floor(n*a),t=Math.ceil(t*a),s=new Array(o=Math.ceil(n-t+1));++r<o;)s[r]=(n-r)/a;return i&&s.reverse(),s}function py(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>=RU?10:o>=OU?5:o>=kU?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=RU?10:o>=OU?5:o>=kU?2:1)}function vd(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>=RU?r*=10:o>=OU?r*=5:o>=kU&&(r*=2),t<n?-r:r}function CR(n){return Math.ceil(Math.log(n.length)/Math.LN2)+1}function MR(){var n=use,t=xR,e=CR;function i(r){var o,a,s=r.length,l=new Array(s);for(o=0;o<s;++o)l[o]=n(r[o],o,r);var c=t(l),u=c[0],d=c[1],p=e(l,u,d);Array.isArray(p)||(p=vd(u,d,p),p=Kh(Math.ceil(u/p)*p,d,p));for(var h=p.length;p[0]<=u;)p.shift(),--h;for(;p[h-1]>d;)p.pop(),--h;var m,f=new Array(h+1);for(o=0;o<=h;++o)(m=f[o]=[]).x0=o>0?p[o-1]:u,m.x1=o<h?p[o]:d;for(o=0;o<s;++o)u<=(a=l[o])&&a<=d&&f[iu(p,a,0,h)].push(r[o]);return f}return i.value=function(r){return arguments.length?(n="function"==typeof r?r:Vw(r),i):n},i.domain=function(r){return arguments.length?(t="function"==typeof r?r:Vw([r[0],r[1]]),i):t},i.thresholds=function(r){return arguments.length?(e="function"==typeof r?r:Array.isArray(r)?Vw(cse.call(r)):Vw(r),i):e},i}var wR=Array.prototype.slice;function dse(n){return n}function D4e(n){return"translate("+(n+.5)+",0)"}function A4e(n){return"translate(0,"+(n+.5)+")"}function I4e(n){return function(t){return+n(t)}}function P4e(n){var t=Math.max(0,n.bandwidth()-1)/2;return n.round()&&(t=Math.round(t)),function(e){return+n(e)+t}}function R4e(){return!this.__axis}function BU(n,t){var e=[],i=null,r=null,o=6,s=6,a=3,l=1===n||4===n?-1:1,c=4===n||2===n?"x":"y",u=1===n||3===n?D4e:A4e;function d(p){var h=i??(t.ticks?t.ticks.apply(t,e):t.domain()),f=r??(t.tickFormat?t.tickFormat.apply(t,e):dse),m=Math.max(o,0)+a,x=t.range(),g=+x[0]+.5,b=+x[x.length-1]+.5,D=(t.bandwidth?P4e:I4e)(t.copy()),T=p.selection?p.selection():p,k=T.selectAll(".domain").data([null]),Z=T.selectAll(".tick").data(h,t).order(),z=Z.exit(),fe=Z.enter().append("g").attr("class","tick"),ue=Z.select("line"),he=Z.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Z=Z.merge(fe),ue=ue.merge(fe.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),he=he.merge(fe.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",1===n?"0em":3===n?"0.71em":"0.32em")),p!==T&&(k=k.transition(p),Z=Z.transition(p),ue=ue.transition(p),he=he.transition(p),z=z.transition(p).attr("opacity",1e-6).attr("transform",function(w){return isFinite(w=D(w))?u(w):this.getAttribute("transform")}),fe.attr("opacity",1e-6).attr("transform",function(w){var F=this.parentNode.__axis;return u(F&&isFinite(F=F(w))?F:D(w))})),z.remove(),k.attr("d",4===n||2==n?s?"M"+l*s+","+g+"H0.5V"+b+"H"+l*s:"M0.5,"+g+"V"+b:s?"M"+g+","+l*s+"V0.5H"+b+"V"+l*s:"M"+g+",0.5H"+b),Z.attr("opacity",1).attr("transform",function(w){return u(D(w))}),ue.attr(c+"2",l*o),he.attr(c,l*m).text(f),T.filter(R4e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===n?"start":4===n?"end":"middle"),T.each(function(){this.__axis=D})}return d.scale=function(p){return arguments.length?(t=p,d):t},d.ticks=function(){return e=wR.call(arguments),d},d.tickArguments=function(p){return arguments.length?(e=null==p?[]:wR.call(p),d):e.slice()},d.tickValues=function(p){return arguments.length?(i=null==p?null:wR.call(p),d):i&&i.slice()},d.tickFormat=function(p){return arguments.length?(r=p,d):r},d.tickSize=function(p){return arguments.length?(o=s=+p,d):o},d.tickSizeInner=function(p){return arguments.length?(o=+p,d):o},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(a=+p,d):a},d}function zw(n){return BU(2,n)}function jw(n){return BU(3,n)}var O4e={value:function(){}};function fse(){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 ER(e)}function ER(n){this._=n}function k4e(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}})}function F4e(n,t){for(var r,e=0,i=n.length;e<i;++e)if((r=n[e]).name===t)return r.value}function hse(n,t,e){for(var i=0,r=n.length;i<r;++i)if(n[i].name===t){n[i]=O4e,n=n.slice(0,i).concat(n.slice(i+1));break}return null!=e&&n.push({name:t,value:e}),n}ER.prototype=fse.prototype={constructor:ER,on:function(n,t){var r,e=this._,i=k4e(n+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(r=(n=i[o]).type)e[r]=hse(e[r],n.name,t);else if(null==t)for(r in e)e[r]=hse(e[r],n.name,null);return this}for(;++o<s;)if((r=(n=i[o]).type)&&(r=F4e(e[r],n.name)))return r},copy:function(){var n={},t=this._;for(var e in t)n[e]=t[e].slice();return new ER(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 Gw=fse,TR="http://www.w3.org/1999/xhtml",HU={svg:"http://www.w3.org/2000/svg",xhtml:TR,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dp(n){var t=n+="",e=t.indexOf(":");return e>=0&&"xmlns"!==(t=n.slice(0,e))&&(n=n.slice(e+1)),HU.hasOwnProperty(t)?{space:HU[t],local:n}:n}function N4e(n){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===TR&&t.documentElement.namespaceURI===TR?t.createElement(n):t.createElementNS(e,n)}}function L4e(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function DR(n){var t=dp(n);return(t.local?L4e:N4e)(t)}function B4e(){}function gg(n){return null==n?B4e:function(){return this.querySelector(n)}}function V4e(){return[]}function Ww(n){return null==n?V4e:function(){return this.querySelectorAll(n)}}function qw(n){return function(){return this.matches(n)}}function AR(n){return new Array(n.length)}function Yw(n,t){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=t}function H4e(n,t,e,i,r,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],i[s]=a):e[s]=new Yw(n,o[s]);for(;s<l;++s)(a=t[s])&&(r[s]=a)}function U4e(n,t,e,i,r,o,s){var a,l,h,c={},u=t.length,d=o.length,p=new Array(u);for(a=0;a<u;++a)(l=t[a])&&(p[a]=h="$"+s.call(l,l.__data__,a,t),h in c?r[a]=l:c[h]=l);for(a=0;a<d;++a)(l=c[h="$"+s.call(n,o[a],a,o)])?(i[a]=l,l.__data__=o[a],c[h]=null):e[a]=new Yw(n,o[a]);for(a=0;a<u;++a)(l=t[a])&&c[p[a]]===l&&(r[a]=l)}function z4e(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function j4e(n){return function(){this.removeAttribute(n)}}function G4e(n){return function(){this.removeAttributeNS(n.space,n.local)}}function W4e(n,t){return function(){this.setAttribute(n,t)}}function q4e(n,t){return function(){this.setAttributeNS(n.space,n.local,t)}}function Y4e(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}}function X4e(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 IR(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Q4e(n){return function(){this.style.removeProperty(n)}}function K4e(n,t,e){return function(){this.style.setProperty(n,t,e)}}function Z4e(n,t,e){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(n):this.style.setProperty(n,i,e)}}function Zh(n,t){return n.style.getPropertyValue(t)||IR(n).getComputedStyle(n,null).getPropertyValue(t)}function J4e(n){return function(){delete this[n]}}function $4e(n,t){return function(){this[n]=t}}function eHe(n,t){return function(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}}function Nse(n){return n.trim().split(/^|\s+/)}function UU(n){return n.classList||new Lse(n)}function Lse(n){this._node=n,this._names=Nse(n.getAttribute("class")||"")}function Bse(n,t){for(var e=UU(n),i=-1,r=t.length;++i<r;)e.add(t[i])}function Vse(n,t){for(var e=UU(n),i=-1,r=t.length;++i<r;)e.remove(t[i])}function tHe(n){return function(){Bse(this,n)}}function nHe(n){return function(){Vse(this,n)}}function iHe(n,t){return function(){(t.apply(this,arguments)?Bse:Vse)(this,n)}}function rHe(){this.textContent=""}function oHe(n){return function(){this.textContent=n}}function sHe(n){return function(){var t=n.apply(this,arguments);this.textContent=t??""}}function aHe(){this.innerHTML=""}function lHe(n){return function(){this.innerHTML=n}}function cHe(n){return function(){var t=n.apply(this,arguments);this.innerHTML=t??""}}function uHe(){this.nextSibling&&this.parentNode.appendChild(this)}function dHe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pHe(){return null}function hHe(){var n=this.parentNode;n&&n.removeChild(this)}function fHe(){var n=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function mHe(){var n=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}Yw.prototype={constructor:Yw,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)}},Lse.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 Zse={},si=null;function gHe(n,t,e){return n=Jse(n,t,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&n.call(this,i)}}function Jse(n,t,e){return function(i){var r=si;si=i;try{n.call(this,this.__data__,t,e)}finally{si=r}}}function _He(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}})}function vHe(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 yHe(n,t,e){var i=Zse.hasOwnProperty(n.type)?gHe:Jse;return function(r,o,s){var l,a=this.__on,c=i(t,o,s);if(a)for(var u=0,d=a.length;u<d;++u)if((l=a[u]).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},a?a.push(l):this.__on=[l]}}function eae(n,t,e){var i=IR(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 bHe(n,t){return function(){return eae(this,n,t)}}function xHe(n,t){return function(){return eae(this,n,t.apply(this,arguments))}}typeof document<"u"&&("onmouseenter"in document.documentElement||(Zse={mouseenter:"mouseover",mouseleave:"mouseout"}));var jU=[null];function ao(n,t){this._groups=n,this._parents=t}function nae(){return new ao([[document.documentElement]],jU)}ao.prototype=nae.prototype={constructor:ao,select:function(n){"function"!=typeof n&&(n=gg(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],s=o.length,a=i[r]=new Array(s),u=0;u<s;++u)(l=o[u])&&(c=n.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new ao(i,this._parents)},selectAll:function(n){"function"!=typeof n&&(n=Ww(n));for(var t=this._groups,e=t.length,i=[],r=[],o=0;o<e;++o)for(var l,s=t[o],a=s.length,c=0;c<a;++c)(l=s[c])&&(i.push(n.call(l,l.__data__,c,s)),r.push(l));return new ao(i,r)},filter:function(n){"function"!=typeof n&&(n=qw(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],s=o.length,a=i[r]=[],c=0;c<s;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&a.push(l);return new ao(i,this._parents)},data:function(n,t){if(!n)return h=new Array(this.size()),c=-1,this.each(function(Z){h[++c]=Z}),h;var e=t?U4e:H4e,i=this._parents,r=this._groups;"function"!=typeof n&&(n=function(n){return function(){return n}}(n));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],d=r[c],p=d.length,h=n.call(u,u&&u.__data__,c,i),f=h.length,m=a[c]=new Array(f),x=s[c]=new Array(f);e(u,d,m,x,l[c]=new Array(p),h,t);for(var T,k,b=0,D=0;b<f;++b)if(T=m[b]){for(b>=D&&(D=b+1);!(k=x[D])&&++D<f;);T._next=k||null}}return(s=new ao(s,i))._enter=a,s._exit=l,s},enter:function(){return new ao(this._enter||this._groups.map(AR),this._parents)},exit:function(){return new ao(this._exit||this._groups.map(AR),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),s=new Array(i),a=0;a<o;++a)for(var p,l=t[a],c=e[a],u=l.length,d=s[a]=new Array(u),h=0;h<u;++h)(p=l[h]||c[h])&&(d[h]=p);for(;a<i;++a)s[a]=t[a];return new ao(s,this._parents)},order:function(){for(var n=this._groups,t=-1,e=n.length;++t<e;)for(var s,i=n[t],r=i.length-1,o=i[r];--r>=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function(n){function t(d,p){return d&&p?n(d.__data__,p.__data__):!d-!p}n||(n=z4e);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var c,s=e[o],a=s.length,l=r[o]=new Array(a),u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new ao(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 s=i[r];if(s)return s}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 a,r=t[e],o=0,s=r.length;o<s;++o)(a=r[o])&&n.call(a,a.__data__,o,r);return this},attr:function(n,t){var e=dp(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?G4e:j4e:"function"==typeof t?e.local?X4e:Y4e:e.local?q4e:W4e)(e,t))},style:function(n,t,e){return arguments.length>1?this.each((null==t?Q4e:"function"==typeof t?Z4e:K4e)(n,t,e??"")):Zh(this.node(),n)},property:function(n,t){return arguments.length>1?this.each((null==t?J4e:"function"==typeof t?eHe:$4e)(n,t)):this.node()[n]},classed:function(n,t){var e=Nse(n+"");if(arguments.length<2){for(var i=UU(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof t?iHe:t?tHe:nHe)(e,t))},text:function(n){return arguments.length?this.each(null==n?rHe:("function"==typeof n?sHe:oHe)(n)):this.node().textContent},html:function(n){return arguments.length?this.each(null==n?aHe:("function"==typeof n?cHe:lHe)(n)):this.node().innerHTML},raise:function(){return this.each(uHe)},lower:function(){return this.each(dHe)},append:function(n){var t="function"==typeof n?n:DR(n);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(n,t){var e="function"==typeof n?n:DR(n),i=null==t?pHe:"function"==typeof t?t:gg(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(hHe)},clone:function(n){return this.select(n?mHe:fHe)},datum:function(n){return arguments.length?this.property("__data__",n):this.node().__data__},on:function(n,t,e){var r,s,i=_He(n+""),o=i.length;if(!(arguments.length<2)){for(a=t?yHe:vHe,null==e&&(e=!1),r=0;r<o;++r)this.each(a(i[r],t,e));return this}var a=this.node().__on;if(a)for(var u,l=0,c=a.length;l<c;++l)for(r=0,u=a[l];r<o;++r)if((s=i[r]).type===u.type&&s.name===u.name)return u.value},dispatch:function(n,t){return this.each(("function"==typeof t?xHe:bHe)(n,t))}};var pp=nae;function bo(n){return"string"==typeof n?new ao([[document.querySelector(n)]],[document.documentElement]):new ao([[n]],jU)}function PR(){for(var t,n=si;t=n.sourceEvent;)n=t;return n}function RR(n,t){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(n.getScreenCTM().inverse())).x,i.y]}var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}function GU(n){var t=PR();return t.changedTouches&&(t=t.changedTouches[0]),RR(n,t)}function OR(){si.preventDefault(),si.stopImmediatePropagation()}function qU(n){var t=n.document.documentElement,e=bo(n).on("dragstart.drag",OR,!0);"onselectstart"in t?e.on("selectstart.drag",OR,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function YU(n,t){var e=n.document.documentElement,i=bo(n).on("dragstart.drag",null);t&&(i.on("click.drag",OR,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function _g(n,t,e){n.prototype=t.prototype=e,e.constructor=n}function hy(n,t){var e=Object.create(n.prototype);for(var i in t)e[i]=t[i];return e}function Jh(){}var FR=1/.7,fy="\\s*([+-]?\\d+)\\s*",Qw="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",bd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CHe=/^#([0-9a-f]{3,8})$/,MHe=new RegExp("^rgb\\("+[fy,fy,fy]+"\\)$"),wHe=new RegExp("^rgb\\("+[bd,bd,bd]+"\\)$"),SHe=new RegExp("^rgba\\("+[fy,fy,fy,Qw]+"\\)$"),EHe=new RegExp("^rgba\\("+[bd,bd,bd,Qw]+"\\)$"),THe=new RegExp("^hsl\\("+[Qw,bd,bd]+"\\)$"),DHe=new RegExp("^hsla\\("+[Qw,bd,bd,Qw]+"\\)$"),iae={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 rae(){return this.rgb().formatHex()}function oae(){return this.rgb().formatRgb()}function ru(n){var t,e;return n=(n+"").trim().toLowerCase(),(t=CHe.exec(n))?(e=t[1].length,t=parseInt(t[1],16),6===e?sae(t):3===e?new Hs(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===e?kR(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===e?kR(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=MHe.exec(n))?new Hs(t[1],t[2],t[3],1):(t=wHe.exec(n))?new Hs(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=SHe.exec(n))?kR(t[1],t[2],t[3],t[4]):(t=EHe.exec(n))?kR(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=THe.exec(n))?cae(t[1],t[2]/100,t[3]/100,1):(t=DHe.exec(n))?cae(t[1],t[2]/100,t[3]/100,t[4]):iae.hasOwnProperty(n)?sae(iae[n]):"transparent"===n?new Hs(NaN,NaN,NaN,0):null}function sae(n){return new Hs(n>>16&255,n>>8&255,255&n,1)}function kR(n,t,e,i){return i<=0&&(n=t=e=NaN),new Hs(n,t,e,i)}function KU(n){return n instanceof Jh||(n=ru(n)),n?new Hs((n=n.rgb()).r,n.g,n.b,n.opacity):new Hs}function my(n,t,e,i){return 1===arguments.length?KU(n):new Hs(n,t,e,i??1)}function Hs(n,t,e,i){this.r=+n,this.g=+t,this.b=+e,this.opacity=+i}function aae(){return"#"+XU(this.r)+XU(this.g)+XU(this.b)}function lae(){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 XU(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function cae(n,t,e,i){return i<=0?n=t=e=NaN:e<=0||e>=1?n=t=NaN:t<=0&&(n=NaN),new yd(n,t,e,i)}function uae(n){if(n instanceof yd)return new yd(n.h,n.s,n.l,n.opacity);if(n instanceof Jh||(n=ru(n)),!n)return new yd;if(n instanceof yd)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),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(e-i)/a+6*(e<i):e===o?(i-t)/a+2:(t-e)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new yd(s,a,l,n.opacity)}function vg(n,t,e,i){return 1===arguments.length?uae(n):new yd(n,t,e,i??1)}function yd(n,t,e,i){this.h=+n,this.s=+t,this.l=+e,this.opacity=+i}function QU(n,t,e){return 255*(n<60?t+(e-t)*n/60:n<180?e:n<240?t+(e-t)*(240-n)/60:t)}_g(Jh,ru,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:rae,formatHex:rae,formatHsl:function(){return uae(this).formatHsl()},formatRgb:oae,toString:oae}),_g(Hs,my,hy(Jh,{brighter:function(n){return n=null==n?FR:Math.pow(FR,n),new Hs(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Hs(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:aae,formatHex:aae,formatRgb:lae,toString:lae})),_g(yd,vg,hy(Jh,{brighter:function(n){return n=null==n?FR:Math.pow(FR,n),new yd(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new yd(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 Hs(QU(n>=240?n-240:n+120,r,i),QU(n,r,i),QU(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 dae=Math.PI/180,pae=180/Math.PI,gae=4/29,gy=6/29,_ae=3*gy*gy;function vae(n){if(n instanceof xd)return new xd(n.l,n.a,n.b,n.opacity);if(n instanceof hp)return yae(n);n instanceof Hs||(n=KU(n));var o,s,t=ez(n.r),e=ez(n.g),i=ez(n.b),r=ZU((.2225045*t+.7168786*e+.0606169*i)/1);return t===e&&e===i?o=s=r:(o=ZU((.4360747*t+.3850649*e+.1430804*i)/.96422),s=ZU((.0139322*t+.0971045*e+.7141733*i)/.82521)),new xd(116*r-16,500*(o-r),200*(r-s),n.opacity)}function xd(n,t,e,i){this.l=+n,this.a=+t,this.b=+e,this.opacity=+i}function ZU(n){return n>.008856451679035631?Math.pow(n,1/3):n/_ae+gae}function JU(n){return n>gy?n*n*n:_ae*(n-gae)}function $U(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function ez(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function PHe(n){if(n instanceof hp)return new hp(n.h,n.c,n.l,n.opacity);if(n instanceof xd||(n=vae(n)),0===n.a&&0===n.b)return new hp(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var t=Math.atan2(n.b,n.a)*pae;return new hp(t<0?t+360:t,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}function yg(n,t,e,i){return 1===arguments.length?PHe(n):new hp(n,t,e,i??1)}function hp(n,t,e,i){this.h=+n,this.c=+t,this.l=+e,this.opacity=+i}function yae(n){if(isNaN(n.h))return new xd(n.l,0,0,n.opacity);var t=n.h*dae;return new xd(n.l,Math.cos(t)*n.c,Math.sin(t)*n.c,n.opacity)}function nz(n,t,e,i,r){var o=n*n,s=o*n;return((1-3*n+3*o-s)*t+(4-6*o+3*s)*e+(1+3*n+3*o-3*s)*i+s*r)/6}function _y(n){return function(){return n}}function Cae(n,t){return function(e){return n+e*t}}function LR(n,t){var e=t-n;return e?Cae(n,e>180||e<-180?e-360*Math.round(e/360):e):_y(isNaN(n)?t:n)}function za(n,t){var e=t-n;return e?Cae(n,e):_y(isNaN(n)?t:n)}_g(xd,function(n,t,e,i){return 1===arguments.length?vae(n):new xd(n,t,e,i??1)},hy(Jh,{brighter:function(n){return new xd(this.l+18*(n??1),this.a,this.b,this.opacity)},darker:function(n){return new xd(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 Hs($U(3.1338561*(t=.96422*JU(t))-1.6168667*(n=1*JU(n))-.4906146*(e=.82521*JU(e))),$U(-.9787684*t+1.9161415*n+.033454*e),$U(.0719453*t-.2289914*n+1.4052427*e),this.opacity)}})),_g(hp,yg,hy(Jh,{brighter:function(n){return new hp(this.h,this.c,this.l+18*(n??1),this.opacity)},darker:function(n){return new hp(this.h,this.c,this.l-18*(n??1),this.opacity)},rgb:function(){return yae(this).rgb()}}));var bg=function n(t){var e=function(n){return 1==(n=+n)?za: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):_y(isNaN(t)?e:t)}}(t);function i(r,o){var s=e((r=my(r)).r,(o=my(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=za(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=n,i}(1);function wae(n){return function(t){var s,a,e=t.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s<e;++s)a=my(t[s]),i[s]=a.r||0,r[s]=a.g||0,o[s]=a.b||0;return i=n(i),r=n(r),o=n(o),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=o(l),a+""}}}var iz=wae(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 nz((e-i/t)*t,i>0?n[i-1]:2*r-o,r,o,i<t-1?n[i+2]:2*o-r)}});function Sae(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 Tae(n,t){var s,e=t?t.length:0,i=n?Math.min(e,n.length):0,r=new Array(i),o=new Array(e);for(s=0;s<i;++s)r[s]=fp(n[s],t[s]);for(;s<e;++s)o[s]=t[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Dae(n,t){var e=new Date;return n=+n,t=+t,function(i){return e.setTime(n*(1-i)+t*i),e}}function Cs(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function Aae(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]=fp(n[r],t[r]):i[r]=t[r];return function(o){for(r in e)i[r]=e[r](o);return i}}wae(function(n){var t=n.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*t);return nz((e-i/t)*t,n[(i+t-1)%t],n[i%t],n[(i+1)%t],n[(i+2)%t])}});var oz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rz=new RegExp(oz.source,"g");function Kw(n,t){var i,r,o,e=oz.lastIndex=rz.lastIndex=0,s=-1,a=[],l=[];for(n+="",t+="";(i=oz.exec(n))&&(r=rz.exec(t));)(o=r.index)>e&&(o=t.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Cs(i,r)})),e=rz.lastIndex;return e<t.length&&(o=t.slice(e),a[s]?a[s]+=o:a[++s]=o),a.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 d,u=0;u<t;++u)a[(d=l[u]).i]=d.x(c);return a.join("")})}function fp(n,t){var i,e=typeof t;return null==t||"boolean"===e?_y(t):("number"===e?Cs:"string"===e?(i=ru(t))?(t=i,bg):Kw:t instanceof ru?bg:t instanceof Date?Dae:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(t)?Sae:Array.isArray(t)?Tae:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Aae:Cs)(n,t)}function sz(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}var Zw,lz,Pae,VR,Iae=180/Math.PI,BR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function az(n,t,e,i,r,o){var s,a,l;return(s=Math.sqrt(n*n+t*t))&&(n/=s,t/=s),(l=n*e+t*i)&&(e-=n*l,i-=t*l),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,l/=a),n*i<t*e&&(n=-n,t=-t,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(t,n)*Iae,skewX:Math.atan(l)*Iae,scaleX:s,scaleY:a}}function kae(n,t,e,i){function r(c){return c.length?c.pop()+" ":""}return function(c,u){var d=[],p=[];return c=n(c),u=n(u),function(c,u,d,p,h,f){if(c!==d||u!==p){var m=h.push("translate(",null,t,null,e);f.push({i:m-4,x:Cs(c,d)},{i:m-2,x:Cs(u,p)})}else(d||p)&&h.push("translate("+d+t+p+e)}(c.translateX,c.translateY,u.translateX,u.translateY,d,p),function(c,u,d,p){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),p.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Cs(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,p),function(c,u,d,p){c!==u?p.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Cs(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,p),function(c,u,d,p,h,f){if(c!==d||u!==p){var m=h.push(r(h)+"scale(",null,",",null,")");f.push({i:m-4,x:Cs(c,d)},{i:m-2,x:Cs(u,p)})}else(1!==d||1!==p)&&h.push(r(h)+"scale("+d+","+p+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,p),c=u=null,function(h){for(var x,f=-1,m=p.length;++f<m;)d[(x=p[f]).i]=x.x(h);return d.join("")}}}var cz=kae(function(n){return"none"===n?BR:(Zw||(Zw=document.createElement("DIV"),lz=document.documentElement,Pae=document.defaultView),Zw.style.transform=n,n=Pae.getComputedStyle(lz.appendChild(Zw),null).getPropertyValue("transform"),lz.removeChild(Zw),az(+(n=n.slice(7,-1).split(","))[0],+n[1],+n[2],+n[3],+n[4],+n[5]))},"px, ","px)","deg)"),uz=kae(function(n){return null==n?BR:(VR||(VR=document.createElementNS("http://www.w3.org/2000/svg","g")),VR.setAttribute("transform",n),(n=VR.transform.baseVal.consolidate())?az((n=n.matrix).a,n.b,n.c,n.d,n.e,n.f):BR)},", ",")",")");function Fae(n){return function(t,e){var i=n((t=vg(t)).h,(e=vg(e)).h),r=za(t.s,e.s),o=za(t.l,e.l),s=za(t.opacity,e.opacity);return function(a){return t.h=i(a),t.s=r(a),t.l=o(a),t.opacity=s(a),t+""}}}var dz=Fae(LR);function Nae(n){return function(t,e){var i=n((t=yg(t)).h,(e=yg(e)).h),r=za(t.c,e.c),o=za(t.l,e.l),s=za(t.opacity,e.opacity);return function(a){return t.h=i(a),t.c=r(a),t.l=o(a),t.opacity=s(a),t+""}}}Fae(za);var HR,eS,pz=Nae(LR),vy=(Nae(za),0),$w=0,Jw=0,UR=0,xg=0,zR=0,tS="object"==typeof performance&&performance.now?performance:Date,Vae="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function yy(){return xg||(Vae(BHe),xg=tS.now()+zR)}function BHe(){xg=0}function nS(){this._call=this._time=this._next=null}function jR(n,t,e){var i=new nS;return i.restart(n,t,e),i}function Lae(){xg=(UR=tS.now())+zR,vy=$w=0;try{!function(){yy(),++vy;for(var t,n=HR;n;)(t=xg-n._time)>=0&&n._call.call(null,t),n=n._next;--vy}()}finally{vy=0,function(){for(var n,e,t=HR,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:HR=e);eS=n,hz(i)}(),xg=0}}function VHe(){var n=tS.now(),t=n-UR;t>1e3&&(zR-=t,UR=n)}function hz(n){vy||($w&&($w=clearTimeout($w)),n-xg>24?(n<1/0&&($w=setTimeout(Lae,n-tS.now()-zR)),Jw&&(Jw=clearInterval(Jw))):(Jw||(UR=tS.now(),Jw=setInterval(VHe,1e3)),vy=1,Vae(Lae)))}function GR(n,t,e){var i=new nS;return i.restart(function(r){i.stop(),n(r+t)},t=null==t?0:+t,e),i}nS.prototype=jR.prototype={constructor:nS,restart:function(n,t,e){if("function"!=typeof n)throw new TypeError("callback is not a function");e=(null==e?yy():+e)+(null==t?0:+t),!this._next&&eS!==this&&(eS?eS._next=this:HR=this,eS=this),this._call=n,this._time=e,hz()},stop:function(){this._call&&(this._call=null,this._time=1/0,hz())}};var UHe=Gw("start","end","cancel","interrupt"),zHe=[];function $h(n,t,e,i,r,o){var s=n.__transition;if(s){if(e in s)return}else n.__transition={};!function(n,t,e){var r,i=n.__transition;function s(c){var u,d,p,h;if(1!==e.state)return l();for(u in i)if((h=i[u]).name===e.name){if(3===h.state)return GR(s);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",n,n.__data__,h.index,h.group),delete i[u]):+u<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",n,n.__data__,h.index,h.group),delete i[u])}if(GR(function(){3===e.state&&(e.state=4,e.timer.restart(a,e.delay,e.time),a(c))}),e.state=2,e.on.call("start",n,n.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(p=e.tween.length),u=0,d=-1;u<p;++u)(h=e.tween[u].value.call(n,n.__data__,e.index,e.group))&&(r[++d]=h);r.length=d+1}}function a(c){for(var u=c<e.duration?e.ease.call(null,c/e.duration):(e.timer.restart(l),e.state=5,1),d=-1,p=r.length;++d<p;)r[d].call(n,u);5===e.state&&(e.on.call("end",n,n.__data__,e.index,e.group),l())}function l(){for(var c in e.state=6,e.timer.stop(),delete i[t],i)return;delete n.__transition}i[t]=e,e.timer=jR(function(c){e.state=1,e.timer.restart(s,e.delay,e.time),e.delay<=c&&s(c-e.delay)},0,e.time)}(n,e,{name:t,index:i,group:r,on:UHe,tween:zHe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function rS(n,t){var e=Xo(n,t);if(e.state>0)throw new Error("too late; already scheduled");return e}function ha(n,t){var e=Xo(n,t);if(e.state>3)throw new Error("too late; already running");return e}function Xo(n,t){var e=n.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function Cg(n,t){var i,r,s,e=n.__transition,o=!0;if(e){for(s in t=null==t?null:t+"",e)(i=e[s]).name===t?(r=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(r?"interrupt":"cancel",n,n.__data__,i.index,i.group),delete e[s]):o=!1;o&&delete n.__transition}}function GHe(n,t){var e,i;return function(){var r=ha(this,n),o=r.tween;if(o!==e)for(var s=0,a=(i=e=o).length;s<a;++s)if(i[s].name===t){(i=i.slice()).splice(s,1);break}r.tween=i}}function WHe(n,t,e){var i,r;if("function"!=typeof e)throw new Error;return function(){var o=ha(this,n),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:t,value:e},l=0,c=r.length;l<c;++l)if(r[l].name===t){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function by(n,t,e){var i=n._id;return n.each(function(){var r=ha(this,i);(r.value||(r.value={}))[t]=e.apply(this,arguments)}),function(r){return Xo(r,i).value[t]}}function XR(n,t){var e;return("number"==typeof t?Cs:t instanceof ru?bg:(e=ru(t))?(t=e,bg):Kw)(n,t)}function qHe(n){return function(){this.removeAttribute(n)}}function YHe(n){return function(){this.removeAttributeNS(n.space,n.local)}}function XHe(n,t,e){var i,o,r=e+"";return function(){var s=this.getAttribute(n);return s===r?null:s===i?o:o=t(i=s,e)}}function QHe(n,t,e){var i,o,r=e+"";return function(){var s=this.getAttributeNS(n.space,n.local);return s===r?null:s===i?o:o=t(i=s,e)}}function KHe(n,t,e){var i,r,o;return function(){var s,l,a=e(this);return null==a?void this.removeAttribute(n):(s=this.getAttribute(n))===(l=a+"")?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}function ZHe(n,t,e){var i,r,o;return function(){var s,l,a=e(this);return null==a?void this.removeAttributeNS(n.space,n.local):(s=this.getAttributeNS(n.space,n.local))===(l=a+"")?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}function JHe(n,t){return function(e){this.setAttribute(n,t.call(this,e))}}function $He(n,t){return function(e){this.setAttributeNS(n.space,n.local,t.call(this,e))}}function eUe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&$He(n,o)),e}return r._value=t,r}function tUe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&JHe(n,o)),e}return r._value=t,r}function nUe(n,t){return function(){rS(this,n).delay=+t.apply(this,arguments)}}function iUe(n,t){return t=+t,function(){rS(this,n).delay=t}}function rUe(n,t){return function(){ha(this,n).duration=+t.apply(this,arguments)}}function oUe(n,t){return t=+t,function(){ha(this,n).duration=t}}function sUe(n,t){if("function"!=typeof t)throw new Error;return function(){ha(this,n).ease=t}}function lUe(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)?rS:ha;return function(){var s=o(this,n),a=s.on;a!==i&&(r=(i=a).copy()).on(t,e),s.on=r}}var uUe=pp.prototype.constructor;function ile(n){return function(){this.style.removeProperty(n)}}function mUe(n,t,e){return function(i){this.style.setProperty(n,t.call(this,i),e)}}function gUe(n,t,e){var i,r;function o(){var s=t.apply(this,arguments);return s!==r&&(i=(r=s)&&mUe(n,s,e)),i}return o._value=t,o}function yUe(n){return function(t){this.textContent=n.call(this,t)}}function bUe(n){var t,e;function i(){var r=n.apply(this,arguments);return r!==e&&(t=(e=r)&&yUe(r)),t}return i._value=n,i}var xUe=0;function Us(n,t,e,i){this._groups=n,this._parents=t,this._name=e,this._id=i}function QR(){return++xUe}var xy=pp.prototype;Us.prototype=function(n){return pp().transition(n)}.prototype={constructor:Us,select:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=gg(n));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var u,d,a=i[s],l=a.length,c=o[s]=new Array(l),p=0;p<l;++p)(u=a[p])&&(d=n.call(u,u.__data__,p,a))&&("__data__"in u&&(d.__data__=u.__data__),c[p]=d,$h(c[p],t,e,p,c,Xo(u,e)));return new Us(o,this._parents,t,e)},selectAll:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=Ww(n));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var u,l=i[a],c=l.length,d=0;d<c;++d)if(u=l[d]){for(var h,p=n.call(u,u.__data__,d,l),f=Xo(u,e),m=0,x=p.length;m<x;++m)(h=p[m])&&$h(h,t,e,m,p,f);o.push(p),s.push(u)}return new Us(o,s,t,e)},filter:function(n){"function"!=typeof n&&(n=qw(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],s=o.length,a=i[r]=[],c=0;c<s;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&a.push(l);return new Us(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),s=new Array(i),a=0;a<o;++a)for(var p,l=t[a],c=e[a],u=l.length,d=s[a]=new Array(u),h=0;h<u;++h)(p=l[h]||c[h])&&(d[h]=p);for(;a<i;++a)s[a]=t[a];return new Us(s,this._parents,this._name,this._id)},selection:function(){return new uUe(this._groups,this._parents)},transition:function(){for(var n=this._name,t=this._id,e=QR(),i=this._groups,r=i.length,o=0;o<r;++o)for(var l,s=i[o],a=s.length,c=0;c<a;++c)if(l=s[c]){var u=Xo(l,t);$h(l,n,e,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Us(i,this._parents,n,e)},call:xy.call,nodes:xy.nodes,node:xy.node,size:xy.size,empty:xy.empty,each:xy.each,on:function(n,t){var e=this._id;return arguments.length<2?Xo(this.node(),e).on.on(n):this.each(lUe(e,n,t))},attr:function(n,t){var e=dp(n),i="transform"===e?uz:XR;return this.attrTween(n,"function"==typeof t?(e.local?ZHe:KHe)(e,i,by(this,"attr."+n,t)):null==t?(e.local?YHe:qHe)(e):(e.local?QHe:XHe)(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=dp(n);return this.tween(e,(i.local?eUe:tUe)(i,t))},style:function(n,t,e){var i="transform"==(n+="")?cz:XR;return null==t?this.styleTween(n,function(n,t){var e,i,r;return function(){var o=Zh(this,n),s=(this.style.removeProperty(n),Zh(this,n));return o===s?null:o===e&&s===i?r:r=t(e=o,i=s)}}(n,i)).on("end.style."+n,ile(n)):"function"==typeof t?this.styleTween(n,function(n,t,e){var i,r,o;return function(){var s=Zh(this,n),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(n),l=a=Zh(this,n)),s===l?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}(n,i,by(this,"style."+n,t))).each(function(n,t){var e,i,r,a,o="style."+t,s="end."+o;return function(){var l=ha(this,n),c=l.on,u=null==l.value[o]?a||(a=ile(t)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,n)):this.styleTween(n,function(n,t,e){var i,o,r=e+"";return function(){var s=Zh(this,n);return s===r?null:s===i?o:o=t(i=s,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,gUe(n,t,e??""))},text:function(n){return this.tween("text","function"==typeof n?function(n){return function(){var t=n(this);this.textContent=t??""}}(by(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,bUe(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 s,i=Xo(this.node(),e).tween,r=0,o=i.length;r<o;++r)if((s=i[r]).name===n)return s.value;return null}return this.each((null==t?GHe:WHe)(e,n,t))},delay:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?nUe:iUe)(t,n)):Xo(this.node(),t).delay},duration:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?rUe:oUe)(t,n)):Xo(this.node(),t).duration},ease:function(n){var t=this._id;return arguments.length?this.each(sUe(t,n)):Xo(this.node(),t).ease},end:function(){var n,t,e=this,i=e._id,r=e.size();return new Promise(function(o,s){var a={value:s},l={value:function(){0==--r&&o()}};e.each(function(){var c=ha(this,i),u=c.on;u!==n&&((t=(n=u).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t})})}};var gz={time:null,delay:0,duration:250,ease:function(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}};function CUe(n,t){for(var e;!(e=n.__transition)||!(e=e[t]);)if(!(n=n.parentNode))return gz.time=yy(),gz;return e}function ZR(n){return function(){return n}}function dle(n,t,e){this.target=n,this.type=t,this.selection=e}function _z(){si.stopImmediatePropagation()}function JR(){si.preventDefault(),si.stopImmediatePropagation()}pp.prototype.interrupt=function(n){return this.each(function(){Cg(this,n)})},pp.prototype.transition=function(n){var t,e;n instanceof Us?(t=n._id,n=n._name):(t=QR(),(e=gz).time=yy(),n=null==n?null:n+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var l,s=i[o],a=s.length,c=0;c<a;++c)(l=s[c])&&$h(l,n,t,c,s,e||CUe(l,t));return new Us(i,this._parents,n,t)};var ple={name:"drag"},vz={name:"space"},Cy={name:"handle"},My={name:"center"};function hle(n){return[+n[0],+n[1]]}function xz(n){return[hle(n[0]),hle(n[1])]}function MUe(n){return function(t){return function(n,t,e){arguments.length<3&&(e=t,t=PR().changedTouches);for(var o,i=0,r=t?t.length:0;i<r;++i)if((o=t[i]).identifier===e)return RR(n,o);return null}(t,si.touches,n)}}var yz={name:"x",handles:["w","e"].map(oS),input:function(n,t){return null==n?null:[[+n[0],t[0][1]],[+n[1],t[1][1]]]},output:function(n){return n&&[n[0][0],n[1][0]]}},$R={name:"y",handles:["n","s"].map(oS),input:function(n,t){return null==n?null:[[t[0][0],+n[0]],[t[1][0],+n[1]]]},output:function(n){return n&&[n[0][1],n[1][1]]}},mp=(["n","w","e","s","nw","ne","sw","se"].map(oS),{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"}),fle={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mle={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},wUe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},SUe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function oS(n){return{type:n}}function EUe(){return!si.ctrlKey&&!si.button}function TUe(){var n=this.ownerSVGElement||this;return n.hasAttribute("viewBox")?[[(n=n.viewBox.baseVal).x,n.y],[n.x+n.width,n.y+n.height]]:[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]}function DUe(){return navigator.maxTouchPoints||"ontouchstart"in this}function bz(n){for(;!n.__brush;)if(!(n=n.parentNode))return;return n.__brush}function AUe(n){return n[0][0]===n[1][0]||n[0][1]===n[1][1]}Math;var Mz=Math.PI,wz=2*Mz,Mg=1e-6,kUe=wz-Mg;function Sz(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _le(){return new Sz}Sz.prototype=_le.prototype={constructor:Sz,moveTo:function(n,t){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,t){this._+="L"+(this._x1=+n)+","+(this._y1=+t)},quadraticCurveTo:function(n,t,e,i){this._+="Q"+ +n+","+ +t+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(n,t,e,i,r,o){this._+="C"+ +n+","+ +t+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(n,t,e,i,r){var o=this._x1,s=this._y1,a=(e=+e)-(n=+n),l=(i=+i)-(t=+t),c=o-n,u=s-t,d=c*c+u*u;if((r=+r)<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=n)+","+(this._y1=t);else if(d>Mg)if(Math.abs(u*a-l*c)>Mg&&r){var p=e-o,h=i-s,f=a*a+l*l,m=p*p+h*h,x=Math.sqrt(f),g=Math.sqrt(d),b=r*Math.tan((Mz-Math.acos((f+d-m)/(2*x*g)))/2),D=b/g,T=b/x;Math.abs(D-1)>Mg&&(this._+="L"+(n+D*c)+","+(t+D*u)),this._+="A"+r+","+r+",0,0,"+ +(u*p>c*h)+","+(this._x1=n+T*a)+","+(this._y1=t+T*l)}else this._+="L"+(this._x1=n)+","+(this._y1=t)},arc:function(n,t,e,i,r,o){n=+n,t=+t,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=n+s,c=t+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Mg||Math.abs(this._y1-c)>Mg)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%wz+wz),d>kUe?this._+="A"+e+","+e+",0,1,"+u+","+(n-s)+","+(t-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Mg&&(this._+="A"+e+","+e+",0,"+ +(d>=Mz)+","+u+","+(this._x1=n+e*Math.cos(r))+","+(this._y1=t+e*Math.sin(r))))},rect:function(n,t,e,i){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+t)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var sS=_le,Ml="$";function eO(){}function vle(n,t){var e=new eO;if(n instanceof eO)n.each(function(a,l){e.set(l,a)});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 s in n)e.set(s,n[s]);return e}eO.prototype=vle.prototype={constructor:eO,has:function(n){return Ml+n in this},get:function(n){return this[Ml+n]},set:function(n,t){return this[Ml+n]=t,this},remove:function(n){var t=Ml+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===Ml&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===Ml&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===Ml&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===Ml&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===Ml&&++n;return n},empty:function(){for(var n in this)if(n[0]===Ml)return!1;return!0},each:function(n){for(var t in this)t[0]===Ml&&n(this[t],t.slice(1),this)}};var gp=vle;function tO(){}var wg=gp.prototype;function Sg(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 Cd(n){return(n=Sg(Math.abs(n)))?n[1]:NaN}tO.prototype=function(n,t){var e=new tO;if(n instanceof tO)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:tO,has:wg.has,add:function(n){return this[Ml+(n+="")]=n,this},remove:wg.remove,clear:wg.clear,values:wg.keys,size:wg.size,empty:wg.empty,each:wg.each},Math,Math.sqrt(5);var Ez,VUe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ef(n){if(!(t=VUe.exec(n)))throw new Error("invalid format: "+n);var t;return new nO({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 nO(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 Tz(n,t){var e=Sg(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")}ef.prototype=nO.prototype,nO.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 Dz={"%":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 Tz(100*n,t)},r:Tz,s:function(n,t){var e=Sg(n,t);if(!e)return n+"";var i=e[0],r=e[1],o=r-(Ez=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Sg(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 Az(n){return n}var iO,xo,rO,Ele=Array.prototype.map,Tle=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function dc(){return Math.random()}iO=function(n){var t=void 0===n.grouping||void 0===n.thousands?Az:function(n,t){return function(e,i){for(var r=e.length,o=[],s=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=n[s=(s+1)%n.length];return o.reverse().join(t)}}(Ele.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?Az:function(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}(Ele.call(n.numerals,String)),s=void 0===n.percent?"%":n.percent+"",a=void 0===n.minus?"-":n.minus+"",l=void 0===n.nan?"NaN":n.nan+"";function c(d){var p=(d=ef(d)).fill,h=d.align,f=d.sign,m=d.symbol,x=d.zero,g=d.width,b=d.comma,D=d.precision,T=d.trim,k=d.type;"n"===k?(b=!0,k="g"):Dz[k]||(void 0===D&&(D=12),T=!0,k="g"),(x||"0"===p&&"="===h)&&(x=!0,p="0",h="=");var Z="$"===m?e:"#"===m&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",z="$"===m?i:/[%p]/.test(k)?s:"",fe=Dz[k],ue=/[defgprs%]/.test(k);function he(w){var K,de,Y,F=Z,q=z;if("c"===k)q=fe(w)+q,w="";else{var ae=(w=+w)<0||1/w<0;if(w=isNaN(w)?l:fe(Math.abs(w),D),T&&(w=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}(w)),ae&&0==+w&&"+"!==f&&(ae=!1),F=(ae?"("===f?f:a:"-"===f||"("===f?"":f)+F,q=("s"===k?Tle[8+Ez/3]:"")+q+(ae&&"("===f?")":""),ue)for(K=-1,de=w.length;++K<de;)if(48>(Y=w.charCodeAt(K))||Y>57){q=(46===Y?r+w.slice(K+1):w.slice(K))+q,w=w.slice(0,K);break}}b&&!x&&(w=t(w,1/0));var le=F.length+w.length+q.length,Ie=le<g?new Array(g-le+1).join(p):"";switch(b&&x&&(w=t(Ie+w,Ie.length?g-q.length:1/0),Ie=""),h){case"<":w=F+w+q+Ie;break;case"=":w=F+Ie+w+q;break;case"^":w=Ie.slice(0,le=Ie.length>>1)+F+w+q+Ie.slice(le);break;default:w=Ie+F+w+q}return o(w)}return D=void 0===D?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,D)):Math.max(0,Math.min(20,D)),he.toString=function(){return d+""},he}return{format:c,formatPrefix:function(d,p){var h=c(((d=ef(d)).type="f",d)),f=3*Math.max(-8,Math.min(8,Math.floor(Cd(p)/3))),m=Math.pow(10,-f),x=Tle[8+f/3];return function(g){return h(m*g)+x}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),xo=iO.format,rO=iO.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}(dc);var kz=function n(t){function e(i,r){var o,s;return i=null==i?0:+i,r=null==r?1:+r,function(){var a;if(null!=o)a=o,o=null;else do{o=2*t()-1,a=2*t()-1,s=o*o+a*a}while(!s||s>1);return i+r*a*Math.sqrt(-2*Math.log(s)/s)}}return e.source=n,e}(dc),Fz=(function n(t){function e(){var i=kz.source(t).apply(this,arguments);return function(){return Math.exp(i())}}return e.source=n,e}(dc),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}(dc));function zs(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=Fz.source(t)(i);return function(){return r()/i}}return e.source=n,e})(dc),function n(t){function e(i){return function(){return-Math.log(1-t())/i}}return e.source=n,e}(dc);var Ale=Array.prototype,lS=Ale.map,tf=Ale.slice,Nz={name:"implicit"};function cS(){var n=gp(),t=[],e=[],i=Nz;function r(o){var s=o+"",a=n.get(s);if(!a){if(i!==Nz)return i;n.set(s,a=t.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return t.slice();t=[],n=gp();for(var l,c,s=-1,a=o.length;++s<a;)n.has(c=(l=o[s])+"")||n.set(c,t.push(l));return r},r.range=function(o){return arguments.length?(e=tf.call(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return cS(t,e).unknown(i)},zs.apply(r,arguments),r}function wy(){var r,o,n=cS().unknown(void 0),t=n.domain,e=n.range,i=[0,1],s=!1,a=0,l=0,c=.5;function u(){var d=t().length,p=i[1]<i[0],h=i[p-0],f=i[1-p];r=(f-h)/Math.max(1,d-a+2*l),s&&(r=Math.floor(r)),h+=(f-h-r*(d-a))*c,o=r*(1-a),s&&(h=Math.round(h),o=Math.round(o));var m=Kh(d).map(function(x){return h+r*x});return e(p?m.reverse():m)}return delete n.unknown,n.domain=function(d){return arguments.length?(t(d),u()):t()},n.range=function(d){return arguments.length?(i=[+d[0],+d[1]],u()):i.slice()},n.rangeRound=function(d){return i=[+d[0],+d[1]],s=!0,u()},n.bandwidth=function(){return o},n.step=function(){return r},n.round=function(d){return arguments.length?(s=!!d,u()):s},n.padding=function(d){return arguments.length?(a=Math.min(1,l=+d),u()):a},n.paddingInner=function(d){return arguments.length?(a=Math.min(1,d),u()):a},n.paddingOuter=function(d){return arguments.length?(l=+d,u()):l},n.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),u()):c},n.copy=function(){return wy(t(),i).round(s).paddingInner(a).paddingOuter(l).align(c)},zs.apply(u(),arguments)}function Ile(n){var t=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=function(){return Ile(t())},n}function Sy(){return Ile(wy.apply(null,arguments).paddingInner(1))}function Lz(n){return+n}var Rle=[0,1];function ja(n){return n}function Bz(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:function(n){return function(){return n}}(isNaN(t)?NaN:.5)}function Ole(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 GUe(n,t,e){var i=n[0],r=n[1],o=t[0],s=t[1];return r<i?(i=Bz(r,i),o=e(s,o)):(i=Bz(i,r),o=e(o,s)),function(a){return o(i(a))}}function WUe(n,t,e){var i=Math.min(n.length,t.length)-1,r=new Array(i),o=new Array(i),s=-1;for(n[i]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=Bz(n[s],n[s+1]),o[s]=e(t[s],t[s+1]);return function(a){var l=iu(n,a,1,i)-1;return o[l](r[l](a))}}function nf(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function uS(){var i,r,o,a,l,c,n=Rle,t=Rle,e=fp,s=ja;function u(){return a=Math.min(n.length,t.length)>2?WUe:GUe,l=c=null,d}function d(p){return isNaN(p=+p)?o:(l||(l=a(n.map(i),t,e)))(i(s(p)))}return d.invert=function(p){return s(r((c||(c=a(t,n.map(i),Cs)))(p)))},d.domain=function(p){return arguments.length?(n=lS.call(p,Lz),s===ja||(s=Ole(n)),u()):n.slice()},d.range=function(p){return arguments.length?(t=tf.call(p),u()):t.slice()},d.rangeRound=function(p){return t=tf.call(p),e=sz,u()},d.clamp=function(p){return arguments.length?(s=p?Ole(n):ja,d):s!==ja},d.interpolate=function(p){return arguments.length?(e=p,u()):e},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,h){return i=p,r=h,u()}}function dS(n,t){return uS()(n,t)}function Eg(n){var t=n.domain;return n.ticks=function(e){var i=t();return Hw(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=vd(n,t,e);switch((i=ef(i??",f")).type){case"s":var s=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(Cd(t)/3)))-Cd(Math.abs(n)))}(r,s))&&(i.precision=o),rO(i,s);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,Cd(t)-Cd(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,-Cd(Math.abs(n)))}(r))&&(i.precision=o-2*("%"===i.type))}return xo(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,s=i[r],a=i[o];return a<s&&(l=s,s=a,a=l,l=r,r=o,o=l),(l=py(s,a,e))>0?l=py(s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l,e):l<0&&(l=py(s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l,e)),l>0?(i[r]=Math.floor(s/l)*l,i[o]=Math.ceil(a/l)*l,t(i)):l<0&&(i[r]=Math.ceil(s*l)/l,i[o]=Math.floor(a*l)/l,t(i)),n},n}function Qo(){var n=dS(ja,ja);return n.copy=function(){return nf(n,Qo())},zs.apply(n,arguments),Eg(n)}function oO(n,t){var s,e=0,i=(n=n.slice()).length-1,r=n[e],o=n[i];return o<r&&(s=e,e=i,i=s,s=r,r=o,o=s),n[e]=t.floor(r),n[i]=t.ceil(o),n}function kle(n){return Math.log(n)}function Fle(n){return Math.exp(n)}function qUe(n){return-Math.log(-n)}function YUe(n){return-Math.exp(-n)}function XUe(n){return isFinite(n)?+("1e"+n):n<0?0:n}function Nle(n){return function(t){return-n(-t)}}function Hz(n){var r,o,t=n(kle,Fle),e=t.domain,i=10;function s(){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?XUe:n===Math.E?Math.exp:function(t){return Math.pow(n,t)}}(i),e()[0]<0?(r=Nle(r),o=Nle(o),n(qUe,YUe)):n(kle,Fle),t}return t.base=function(a){return arguments.length?(i=+a,s()):i},t.domain=function(a){return arguments.length?(e(a),s()):e()},t.ticks=function(a){var d,l=e(),c=l[0],u=l[l.length-1];(d=u<c)&&(p=c,c=u,u=p);var f,m,x,p=r(c),h=r(u),g=null==a?10:+a,b=[];if(!(i%1)&&h-p<g){if(p=Math.round(p)-1,h=Math.round(h)+1,c>0){for(;p<h;++p)for(m=1,f=o(p);m<i;++m)if(!((x=f*m)<c)){if(x>u)break;b.push(x)}}else for(;p<h;++p)for(m=i-1,f=o(p);m>=1;--m)if(!((x=f*m)<c)){if(x>u)break;b.push(x)}}else b=Hw(p,h,Math.min(h-p,g)).map(o);return d?b.reverse():b},t.tickFormat=function(a,l){if(null==l&&(l=10===i?".0e":","),"function"!=typeof l&&(l=xo(l)),a===1/0)return l;null==a&&(a=10);var c=Math.max(1,i*a/t.ticks().length);return function(u){var d=u/o(Math.round(r(u)));return d*i<i-.5&&(d*=i),d<=c?l(u):""}},t.nice=function(){return e(oO(e(),{floor:function(a){return o(Math.floor(r(a)))},ceil:function(a){return o(Math.ceil(r(a)))}}))},t}function pS(){var n=Hz(uS()).domain([1,10]);return n.copy=function(){return nf(n,pS()).base(n.base())},zs.apply(n,arguments),n}var Uz=new Date,zz=new Date;function yr(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 s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=function(o,s){return t(o=new Date(+o),null==s?1:Math.floor(s)),o},r.range=function(o,s,a){var c,l=[];if(o=r.ceil(o),a=null==a?1:Math.floor(a),!(o<s&&a>0))return l;do{l.push(c=new Date(+o)),t(o,a),n(o)}while(c<o&&o<s);return l},r.filter=function(o){return yr(function(s){if(s>=s)for(;n(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););})},e&&(r.count=function(o,s){return Uz.setTime(+o),zz.setTime(+s),n(Uz),n(zz),Math.floor(e(Uz,zz))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var sO=yr(function(){},function(n,t){n.setTime(+n+t)},function(n,t){return t-n});sO.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?yr(function(t){t.setTime(Math.floor(t/n)*n)},function(t,e){t.setTime(+t+e*n)},function(t,e){return(e-t)/n}):sO:null};var aO=sO,_p=6e4,cO=6048e5,Ble=yr(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()}),uO=Ble,Hle=yr(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())},function(n,t){n.setTime(+n+t*_p)},function(n,t){return(t-n)/_p},function(n){return n.getMinutes()}),Gz=Hle,Ule=yr(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-n.getMinutes()*_p)},function(n,t){n.setTime(+n+36e5*t)},function(n,t){return(t-n)/36e5},function(n){return n.getHours()}),Wz=Ule,zle=yr(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())*_p)/864e5},function(n){return n.getDate()-1}),Ey=zle;function Dg(n){return yr(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())*_p)/cO})}var Ag=Dg(0),Ty=Dg(1),rf=(Dg(2),Dg(3),Dg(4)),Xle=(Dg(5),Dg(6),yr(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()})),qz=Xle,Yz=yr(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()});Yz.every=function(n){return isFinite(n=Math.floor(n))&&n>0?yr(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 vp=Yz,Qle=yr(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}),dO=Qle;function Ig(n){return yr(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)/cO})}var hS=Ig(0),Dy=Ig(1),of=(Ig(2),Ig(3),Ig(4)),Xz=(Ig(5),Ig(6),yr(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()}));Xz.every=function(n){return isFinite(n=Math.floor(n))&&n>0?yr(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 Pg=Xz;function Qz(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 Kz(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 fS(n,t,e){return{y:n,m:t,d:e,H:0,M:0,S:0,L:0}}var Ay,Iy,tce={"-":"",_:" ",0:"0"},us=/^\s*\d+/,gze=/^%/,_ze=/[\\^$*+?|[\]().{}]/g;function Gi(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 vze(n){return n.replace(_ze,"\\$&")}function mS(n){return new RegExp("^(?:"+n.map(vze).join("|")+")","i")}function gS(n){for(var t={},e=-1,i=n.length;++e<i;)t[n[e].toLowerCase()]=e;return t}function yze(n,t,e){var i=us.exec(t.slice(e,e+1));return i?(n.w=+i[0],e+i[0].length):-1}function bze(n,t,e){var i=us.exec(t.slice(e,e+1));return i?(n.u=+i[0],e+i[0].length):-1}function xze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.U=+i[0],e+i[0].length):-1}function Cze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.V=+i[0],e+i[0].length):-1}function Mze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.W=+i[0],e+i[0].length):-1}function nce(n,t,e){var i=us.exec(t.slice(e,e+4));return i?(n.y=+i[0],e+i[0].length):-1}function ice(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function wze(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 Sze(n,t,e){var i=us.exec(t.slice(e,e+1));return i?(n.q=3*i[0]-3,e+i[0].length):-1}function Eze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.m=i[0]-1,e+i[0].length):-1}function rce(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.d=+i[0],e+i[0].length):-1}function Tze(n,t,e){var i=us.exec(t.slice(e,e+3));return i?(n.m=0,n.d=+i[0],e+i[0].length):-1}function oce(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.H=+i[0],e+i[0].length):-1}function Dze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.M=+i[0],e+i[0].length):-1}function Aze(n,t,e){var i=us.exec(t.slice(e,e+2));return i?(n.S=+i[0],e+i[0].length):-1}function Ize(n,t,e){var i=us.exec(t.slice(e,e+3));return i?(n.L=+i[0],e+i[0].length):-1}function Pze(n,t,e){var i=us.exec(t.slice(e,e+6));return i?(n.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function Rze(n,t,e){var i=gze.exec(t.slice(e,e+1));return i?e+i[0].length:-1}function Oze(n,t,e){var i=us.exec(t.slice(e));return i?(n.Q=+i[0],e+i[0].length):-1}function kze(n,t,e){var i=us.exec(t.slice(e));return i?(n.s=+i[0],e+i[0].length):-1}function sce(n,t){return Gi(n.getDate(),t,2)}function Fze(n,t){return Gi(n.getHours(),t,2)}function Nze(n,t){return Gi(n.getHours()%12||12,t,2)}function Lze(n,t){return Gi(1+Ey.count(vp(n),n),t,3)}function dce(n,t){return Gi(n.getMilliseconds(),t,3)}function Bze(n,t){return dce(n,t)+"000"}function Vze(n,t){return Gi(n.getMonth()+1,t,2)}function Hze(n,t){return Gi(n.getMinutes(),t,2)}function Uze(n,t){return Gi(n.getSeconds(),t,2)}function zze(n){var t=n.getDay();return 0===t?7:t}function jze(n,t){return Gi(Ag.count(vp(n)-1,n),t,2)}function pce(n){var t=n.getDay();return t>=4||0===t?rf(n):rf.ceil(n)}function Gze(n,t){return n=pce(n),Gi(rf.count(vp(n),n)+(4===vp(n).getDay()),t,2)}function Wze(n){return n.getDay()}function qze(n,t){return Gi(Ty.count(vp(n)-1,n),t,2)}function Yze(n,t){return Gi(n.getFullYear()%100,t,2)}function Xze(n,t){return Gi((n=pce(n)).getFullYear()%100,t,2)}function Qze(n,t){return Gi(n.getFullYear()%1e4,t,4)}function Kze(n,t){var e=n.getDay();return Gi((n=e>=4||0===e?rf(n):rf.ceil(n)).getFullYear()%1e4,t,4)}function Zze(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gi(t/60|0,"0",2)+Gi(t%60,"0",2)}function ace(n,t){return Gi(n.getUTCDate(),t,2)}function Jze(n,t){return Gi(n.getUTCHours(),t,2)}function $ze(n,t){return Gi(n.getUTCHours()%12||12,t,2)}function eje(n,t){return Gi(1+dO.count(Pg(n),n),t,3)}function hce(n,t){return Gi(n.getUTCMilliseconds(),t,3)}function tje(n,t){return hce(n,t)+"000"}function nje(n,t){return Gi(n.getUTCMonth()+1,t,2)}function ije(n,t){return Gi(n.getUTCMinutes(),t,2)}function rje(n,t){return Gi(n.getUTCSeconds(),t,2)}function oje(n){var t=n.getUTCDay();return 0===t?7:t}function sje(n,t){return Gi(hS.count(Pg(n)-1,n),t,2)}function fce(n){var t=n.getUTCDay();return t>=4||0===t?of(n):of.ceil(n)}function aje(n,t){return n=fce(n),Gi(of.count(Pg(n),n)+(4===Pg(n).getUTCDay()),t,2)}function lje(n){return n.getUTCDay()}function cje(n,t){return Gi(Dy.count(Pg(n)-1,n),t,2)}function uje(n,t){return Gi(n.getUTCFullYear()%100,t,2)}function dje(n,t){return Gi((n=fce(n)).getUTCFullYear()%100,t,2)}function pje(n,t){return Gi(n.getUTCFullYear()%1e4,t,4)}function hje(n,t){var e=n.getUTCDay();return Gi((n=e>=4||0===e?of(n):of.ceil(n)).getUTCFullYear()%1e4,t,4)}function fje(){return"+0000"}function lce(){return"%"}function cce(n){return+n}function uce(n){return Math.floor(+n/1e3)}Ay=function(n){var t=n.dateTime,e=n.date,i=n.time,r=n.periods,o=n.days,s=n.shortDays,a=n.months,l=n.shortMonths,c=mS(r),u=gS(r),d=mS(o),p=gS(o),h=mS(s),f=gS(s),m=mS(a),x=gS(a),g=mS(l),b=gS(l),D={a:function(Te){return s[Te.getDay()]},A:function(Te){return o[Te.getDay()]},b:function(Te){return l[Te.getMonth()]},B:function(Te){return a[Te.getMonth()]},c:null,d:sce,e:sce,f:Bze,g:Xze,G:Kze,H:Fze,I:Nze,j:Lze,L:dce,m:Vze,M:Hze,p:function(Te){return r[+(Te.getHours()>=12)]},q:function(Te){return 1+~~(Te.getMonth()/3)},Q:cce,s:uce,S:Uze,u:zze,U:jze,V:Gze,w:Wze,W:qze,x:null,X:null,y:Yze,Y:Qze,Z:Zze,"%":lce},T={a:function(Te){return s[Te.getUTCDay()]},A:function(Te){return o[Te.getUTCDay()]},b:function(Te){return l[Te.getUTCMonth()]},B:function(Te){return a[Te.getUTCMonth()]},c:null,d:ace,e:ace,f:tje,g:dje,G:hje,H:Jze,I:$ze,j:eje,L:hce,m:nje,M:ije,p:function(Te){return r[+(Te.getUTCHours()>=12)]},q:function(Te){return 1+~~(Te.getUTCMonth()/3)},Q:cce,s:uce,S:rje,u:oje,U:sje,V:aje,w:lje,W:cje,x:null,X:null,y:uje,Y:pje,Z:fje,"%":lce},k={a:function(Te,xt,mt){var ce=h.exec(xt.slice(mt));return ce?(Te.w=f[ce[0].toLowerCase()],mt+ce[0].length):-1},A:function(Te,xt,mt){var ce=d.exec(xt.slice(mt));return ce?(Te.w=p[ce[0].toLowerCase()],mt+ce[0].length):-1},b:function(Te,xt,mt){var ce=g.exec(xt.slice(mt));return ce?(Te.m=b[ce[0].toLowerCase()],mt+ce[0].length):-1},B:function(Te,xt,mt){var ce=m.exec(xt.slice(mt));return ce?(Te.m=x[ce[0].toLowerCase()],mt+ce[0].length):-1},c:function(Te,xt,mt){return fe(Te,t,xt,mt)},d:rce,e:rce,f:Pze,g:ice,G:nce,H:oce,I:oce,j:Tze,L:Ize,m:Eze,M:Dze,p:function(Te,xt,mt){var ce=c.exec(xt.slice(mt));return ce?(Te.p=u[ce[0].toLowerCase()],mt+ce[0].length):-1},q:Sze,Q:Oze,s:kze,S:Aze,u:bze,U:xze,V:Cze,w:yze,W:Mze,x:function(Te,xt,mt){return fe(Te,e,xt,mt)},X:function(Te,xt,mt){return fe(Te,i,xt,mt)},y:ice,Y:nce,Z:wze,"%":Rze};function Z(Te,xt){return function(mt){var bt,hn,on,ce=[],dt=-1,We=0,Mt=Te.length;for(mt instanceof Date||(mt=new Date(+mt));++dt<Mt;)37===Te.charCodeAt(dt)&&(ce.push(Te.slice(We,dt)),null!=(hn=tce[bt=Te.charAt(++dt)])?bt=Te.charAt(++dt):hn="e"===bt?" ":"0",(on=xt[bt])&&(bt=on(mt,hn)),ce.push(bt),We=dt+1);return ce.push(Te.slice(We,dt)),ce.join("")}}function z(Te,xt){return function(mt){var We,Mt,ce=fS(1900,void 0,1);if(fe(ce,Te,mt+="",0)!=mt.length)return null;if("Q"in ce)return new Date(ce.Q);if("s"in ce)return new Date(1e3*ce.s+("L"in ce?ce.L:0));if(xt&&!("Z"in ce)&&(ce.Z=0),"p"in ce&&(ce.H=ce.H%12+12*ce.p),void 0===ce.m&&(ce.m="q"in ce?ce.q:0),"V"in ce){if(ce.V<1||ce.V>53)return null;"w"in ce||(ce.w=1),"Z"in ce?(Mt=(We=Kz(fS(ce.y,0,1))).getUTCDay(),We=Mt>4||0===Mt?Dy.ceil(We):Dy(We),We=dO.offset(We,7*(ce.V-1)),ce.y=We.getUTCFullYear(),ce.m=We.getUTCMonth(),ce.d=We.getUTCDate()+(ce.w+6)%7):(Mt=(We=Qz(fS(ce.y,0,1))).getDay(),We=Mt>4||0===Mt?Ty.ceil(We):Ty(We),We=Ey.offset(We,7*(ce.V-1)),ce.y=We.getFullYear(),ce.m=We.getMonth(),ce.d=We.getDate()+(ce.w+6)%7)}else("W"in ce||"U"in ce)&&("w"in ce||(ce.w="u"in ce?ce.u%7:"W"in ce?1:0),Mt="Z"in ce?Kz(fS(ce.y,0,1)).getUTCDay():Qz(fS(ce.y,0,1)).getDay(),ce.m=0,ce.d="W"in ce?(ce.w+6)%7+7*ce.W-(Mt+5)%7:ce.w+7*ce.U-(Mt+6)%7);return"Z"in ce?(ce.H+=ce.Z/100|0,ce.M+=ce.Z%100,Kz(ce)):Qz(ce)}}function fe(Te,xt,mt,ce){for(var bt,hn,dt=0,We=xt.length,Mt=mt.length;dt<We;){if(ce>=Mt)return-1;if(37===(bt=xt.charCodeAt(dt++))){if(bt=xt.charAt(dt++),!(hn=k[bt in tce?xt.charAt(dt++):bt])||(ce=hn(Te,mt,ce))<0)return-1}else if(bt!=mt.charCodeAt(ce++))return-1}return ce}return D.x=Z(e,D),D.X=Z(i,D),D.c=Z(t,D),T.x=Z(e,T),T.X=Z(i,T),T.c=Z(t,T),{format:function(Te){var xt=Z(Te+="",D);return xt.toString=function(){return Te},xt},parse:function(Te){var xt=z(Te+="",!1);return xt.toString=function(){return Te},xt},utcFormat:function(Te){var xt=Z(Te+="",T);return xt.toString=function(){return Te},xt},utcParse:function(Te){var xt=z(Te+="",!0);return xt.toString=function(){return Te},xt}}}({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"]}),Iy=Ay.format;var vS=6e4,yS=60*vS,bS=24*yS,$z=365*bS;function gje(n){return new Date(n)}function _je(n){return n instanceof Date?+n:+new Date(+n)}function ej(n,t,e,i,r,o,s,a,l){var c=dS(ja,ja),u=c.invert,d=c.domain,p=l(".%L"),h=l(":%S"),f=l("%I:%M"),m=l("%I %p"),x=l("%a %d"),g=l("%b %d"),b=l("%B"),D=l("%Y"),T=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,vS],[o,5,5*vS],[o,15,15*vS],[o,30,30*vS],[r,1,yS],[r,3,3*yS],[r,6,6*yS],[r,12,12*yS],[i,1,bS],[i,2,2*bS],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[n,1,$z]];function k(z){return(s(z)<z?p:o(z)<z?h:r(z)<z?f:i(z)<z?m:t(z)<z?e(z)<z?x:g:n(z)<z?b:D)(z)}function Z(z,fe,ue,he){if(null==z&&(z=10),"number"==typeof z){var w=Math.abs(ue-fe)/z,F=Bw(function(q){return q[2]}).right(T,w);F===T.length?(he=vd(fe/$z,ue/$z,z),z=n):F?(he=(F=T[w/T[F-1][2]<T[F][2]/w?F-1:F])[1],z=F[0]):(he=Math.max(vd(fe,ue,z),1),z=a)}return null==he?z:z.every(he)}return c.invert=function(z){return new Date(u(z))},c.domain=function(z){return arguments.length?d(lS.call(z,_je)):d().map(gje)},c.ticks=function(z,fe){var q,ue=d(),he=ue[0],w=ue[ue.length-1],F=w<he;return F&&(q=he,he=w,w=q),q=(q=Z(z,he,w,fe))?q.range(he,w+1):[],F?q.reverse():q},c.tickFormat=function(z,fe){return null==fe?k:l(fe)},c.nice=function(z,fe){var ue=d();return(z=Z(z,ue[0],ue[ue.length-1],fe))?d(oO(ue,z)):c},c.copy=function(){return nf(c,ej(n,t,e,i,r,o,s,a,l))},c}function Rg(){return zs.apply(ej(vp,qz,Ag,Ey,Wz,Gz,uO,aO,Iy).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Py(n){for(var t=n.length/6|0,e=new Array(t),i=0;i<t;)e[i]="#"+n.slice(6*i,6*++i);return e}function Ry(n){return iz(n[n.length-1])}var tj=Ry(new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Py)),nj=Ry(new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Py)),ij=Ry(new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Py));function fa(n){return function(){return n}}function wce(n){this._context=n}function pO(n){return new wce(n)}function hO(n){return n[0]}function fO(n){return n[1]}function xS(){var n=hO,t=fO,e=fa(!0),i=null,r=pO,o=null;function s(a){var l,u,p,c=a.length,d=!1;for(null==i&&(o=r(p=sS())),l=0;l<=c;++l)!(l<c&&e(u=a[l],l,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+n(u,l,a),+t(u,l,a));if(p)return o=null,p+""||null}return s.x=function(a){return arguments.length?(n="function"==typeof a?a:fa(+a),s):n},s.y=function(a){return arguments.length?(t="function"==typeof a?a:fa(+a),s):t},s.defined=function(a){return arguments.length?(e="function"==typeof a?a:fa(!!a),s):e},s.curve=function(a){return arguments.length?(r=a,null!=i&&(o=r(i)),s):r},s.context=function(a){return arguments.length?(null==a?i=o=null:o=r(i=a),s):i},s}function Sce(n,t,e){n._context.bezierCurveTo(n._x1+n._k*(n._x2-n._x0),n._y1+n._k*(n._y2-n._y0),n._x2+n._k*(n._x1-t),n._y2+n._k*(n._y1-e),n._x2,n._y2)}function mO(n,t){this._context=n,this._k=(1-t)/6}function Ece(n,t){this._context=n,this._alpha=t}Math,wce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;default:this._context.lineTo(n,t)}}},mO.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:Sce(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){switch(n=+n,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2,this._x1=n,this._y1=t;break;case 2:this._point=3;default:Sce(this,n,t)}this._x0=this._x1,this._x1=this._x2,this._x2=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function n(t){function e(i){return new mO(i,t)}return e.tension=function(i){return n(+i)},e}(0),Ece.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(n,t){if(n=+n,t=+t,this._point){var e=this._x2-n,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(n,t,e){var i=n._x1,r=n._y1,o=n._x2,s=n._y2;if(n._l01_a>1e-12){var a=2*n._l01_2a+3*n._l01_a*n._l12_a+n._l12_2a,l=3*n._l01_a*(n._l01_a+n._l12_a);i=(i*a-n._x0*n._l12_2a+n._x2*n._l01_2a)/l,r=(r*a-n._y0*n._l12_2a+n._y2*n._l01_2a)/l}if(n._l23_a>1e-12){var c=2*n._l23_2a+3*n._l23_a*n._l12_a+n._l12_2a,u=3*n._l23_a*(n._l23_a+n._l12_a);o=(o*c+n._x1*n._l23_2a-t*n._l12_2a)/u,s=(s*c+n._y1*n._l23_2a-e*n._l12_2a)/u}n._context.bezierCurveTo(i,r,o,s,n._x2,n._y2)}(this,n,t)}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=n,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var sj=function n(t){function e(i){return t?new Ece(i,t):new mO(i,0)}return e.alpha=function(i){return n(+i)},e}(.5);function aj(){this._=null}function Oy(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function CS(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 MS(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 Tce(n){for(;n.L;)n=n.L;return n}aj.prototype={constructor:aj,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=Tce(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&&(CS(this,e),e=(n=e).U),e.C=!1,i.C=!0,MS(this,i)):(r=i.L)&&r.C?(e.C=r.C=!1,i.C=!0,n=i):(n===e.L&&(MS(this,e),e=(n=e).U),e.C=!1,i.C=!0,CS(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,s,t=n.U,i=n.L,r=n.R;if(o=i?r?Tce(r):i:r,t?t.L===n?t.L=o:t.R=o:this._=o,i&&r?(s=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)):(s=n.C,n=o),n&&(n.U=t),!s){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,CS(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,MS(this,e),e=t.R),e.C=t.C,t.C=e.R.C=!1,CS(this,t),n=this._;break}}else if((e=t.L).C&&(e.C=!1,t.C=!0,MS(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,CS(this,e),e=t.L),e.C=t.C,t.C=e.L.C=!1,MS(this,t),n=this._;break}e.C=!0,n=t,t=t.U}while(!n.C);n&&(n.C=!1)}}};var lj=aj;function ky(n,t,e,i){var r=[null,null],o=ds.push(r)-1;return r.left=n,r.right=t,e&&wS(r,n,t,e),i&&wS(r,t,n,i),ma[n.index].halfedges.push(o),ma[t.index].halfedges.push(o),r}function Fy(n,t,e){var i=[t,e];return i.left=n,i}function wS(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 xje(n,t,e,i,r){var m,o=n[0],s=n[1],a=o[0],l=o[1],d=0,p=1,h=s[0]-a,f=s[1]-l;if(m=t-a,h||!(m>0)){if(m/=h,h<0){if(m<d)return;m<p&&(p=m)}else if(h>0){if(m>p)return;m>d&&(d=m)}if(m=i-a,h||!(m<0)){if(m/=h,h<0){if(m>p)return;m>d&&(d=m)}else if(h>0){if(m<d)return;m<p&&(p=m)}if(m=e-l,f||!(m>0)){if(m/=f,f<0){if(m<d)return;m<p&&(p=m)}else if(f>0){if(m>p)return;m>d&&(d=m)}if(m=r-l,f||!(m<0)){if(m/=f,f<0){if(m>p)return;m>d&&(d=m)}else if(f>0){if(m<d)return;m<p&&(p=m)}return!(d>0)&&!(p<1)||(d>0&&(n[0]=[a+d*h,l+d*f]),p<1&&(n[1]=[a+p*h,l+p*f])),!0}}}}}function Cje(n,t,e,i,r){var o=n[1];if(o)return!0;var m,x,s=n[0],a=n.left,l=n.right,c=a[0],u=a[1],d=l[0],p=l[1],h=(c+d)/2;if(p===u){if(h<t||h>=i)return;if(c>d){if(s){if(s[1]>=r)return}else s=[h,e];o=[h,r]}else{if(s){if(s[1]<e)return}else s=[h,r];o=[h,e]}}else if(x=(u+p)/2-(m=(c-d)/(p-u))*h,m<-1||m>1)if(c>d){if(s){if(s[1]>=r)return}else s=[(e-x)/m,e];o=[(r-x)/m,r]}else{if(s){if(s[1]<e)return}else s=[(r-x)/m,r];o=[(e-x)/m,e]}else if(u<p){if(s){if(s[0]>=i)return}else s=[t,m*t+x];o=[i,m*i+x]}else{if(s){if(s[0]<t)return}else s=[i,m*i+x];o=[t,m*t+x]}return n[0]=s,n[1]=o,!0}function Mje(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 cj(n,t){return t[+(t.left!==n.site)]}function wje(n,t){return t[+(t.left===n.site)]}var gO,Rce=[];function Sje(){Oy(this),this.x=this.y=this.arc=this.site=this.cy=null}function Og(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 s=r[0],a=r[1],l=i[0]-s,c=i[1]-a,u=o[0]-s,d=o[1]-a,p=2*(l*d-c*u);if(!(p>=-Oce)){var h=l*l+c*c,f=u*u+d*d,m=(d*h-c*f)/p,x=(l*f-u*h)/p,g=Rce.pop()||new Sje;g.arc=n,g.site=r,g.x=m+s,g.y=(g.cy=x+a)+Math.sqrt(m*m+x*x),n.circle=g;for(var b=null,D=Ny._;D;)if(g.y<D.y||g.y===D.y&&g.x<=D.x){if(!D.L){b=D.P;break}D=D.L}else{if(!D.R){b=D;break}D=D.R}Ny.insert(b,g),b||(gO=g)}}}}function kg(n){var t=n.circle;t&&(t.P||(gO=t.N),Ny.remove(t),Rce.push(t),Oy(t),n.circle=null)}var Fce=[];function Eje(){Oy(this),this.edge=this.site=this.circle=null}function kce(n){var t=Fce.pop()||new Eje;return t.site=n,t}function uj(n){kg(n),Fg.remove(n),Fce.push(n),Oy(n)}function Nce(n){var t=n.circle,e=t.x,i=t.cy,r=[e,i],o=n.P,s=n.N,a=[n];uj(n);for(var l=o;l.circle&&Math.abs(e-l.circle.x)<pr&&Math.abs(i-l.circle.cy)<pr;)o=l.P,a.unshift(l),uj(l),l=o;a.unshift(l),kg(l);for(var c=s;c.circle&&Math.abs(e-c.circle.x)<pr&&Math.abs(i-c.circle.cy)<pr;)s=c.N,a.push(c),uj(c),c=s;a.push(c),kg(c);var d,u=a.length;for(d=1;d<u;++d)wS((c=a[d]).edge,(l=a[d-1]).site,c.site,r);(c=a[u-1]).edge=ky((l=a[0]).site,c.site,null,r),Og(l),Og(c)}function Lce(n){for(var i,r,o,s,t=n[0],e=n[1],a=Fg._;a;)if((o=Bce(a,e)-t)>pr)a=a.L;else{if(!((s=t-Tje(a,e))>pr)){o>-pr?(i=a.P,r=a):s>-pr?(i=a,r=a.N):i=r=a;break}if(!a.R){i=a;break}a=a.R}!function(n){ma[n.index]={site:n,halfedges:[]}}(n);var l=kce(n);if(Fg.insert(i,l),i||r){if(i===r)return kg(i),r=kce(i.site),Fg.insert(l,r),l.edge=r.edge=ky(i.site,l.site),Og(i),void Og(r);if(!r)return void(l.edge=ky(i.site,l.site));kg(i),kg(r);var c=i.site,u=c[0],d=c[1],p=n[0]-u,h=n[1]-d,f=r.site,m=f[0]-u,x=f[1]-d,g=2*(p*x-h*m),b=p*p+h*h,D=m*m+x*x,T=[(x*b-h*D)/g+u,(p*D-m*b)/g+d];wS(r.edge,c,f,T),l.edge=ky(c,n,null,T),r.edge=ky(n,f,null,T),Og(i),Og(r)}}function Bce(n,t){var e=n.site,i=e[0],r=e[1],o=r-t;if(!o)return i;var s=n.P;if(!s)return-1/0;var a=(e=s.site)[0],l=e[1],c=l-t;if(!c)return a;var u=a-i,d=1/o-1/c,p=u/c;return d?(-p+Math.sqrt(p*p-2*d*(u*u/(-2*c)-l+c/2+r-o/2)))/d+i:(i+a)/2}function Tje(n,t){var e=n.N;if(e)return Bce(e,t);var i=n.site;return i[1]===t?i[0]:1/0}var Fg,ma,Ny,ds,pr=1e-6,Oce=1e-12;function Dje(n,t,e){return(n[0]-e[0])*(t[1]-n[1])-(n[0]-t[0])*(e[1]-n[1])}function Aje(n,t){return t[1]-n[1]||t[0]-n[0]}function _O(n,t){var i,r,o,e=n.sort(Aje).pop();for(ds=[],ma=new Array(n.length),Fg=new lj,Ny=new lj;;)if(o=gO,e&&(!o||e[1]<o.y||e[1]===o.y&&e[0]<o.x))(e[0]!==i||e[1]!==r)&&(Lce(e),i=e[0],r=e[1]),e=n.pop();else{if(!o)break;Nce(o.arc)}if(function(){for(var e,i,r,o,n=0,t=ma.length;n<t;++n)if((e=ma[n])&&(o=(i=e.halfedges).length)){var s=new Array(o),a=new Array(o);for(r=0;r<o;++r)s[r]=r,a[r]=Mje(e,ds[i[r]]);for(s.sort(function(l,c){return a[c]-a[l]}),r=0;r<o;++r)a[r]=i[s[r]];for(r=0;r<o;++r)i[r]=a[r]}}(),t){var s=+t[0][0],a=+t[0][1],l=+t[1][0],c=+t[1][1];(function(n,t,e,i){for(var o,r=ds.length;r--;)Cje(o=ds[r],n,t,e,i)&&xje(o,n,t,e,i)&&(Math.abs(o[0][0]-o[1][0])>pr||Math.abs(o[0][1]-o[1][1])>pr)||delete ds[r]})(s,a,l,c),function(n,t,e,i){var o,s,a,l,c,u,d,p,h,f,m,x,r=ma.length,g=!0;for(o=0;o<r;++o)if(s=ma[o]){for(a=s.site,l=(c=s.halfedges).length;l--;)ds[c[l]]||c.splice(l,1);for(l=0,u=c.length;l<u;)m=(f=wje(s,ds[c[l]]))[0],x=f[1],p=(d=cj(s,ds[c[++l%u]]))[0],h=d[1],(Math.abs(m-p)>pr||Math.abs(x-h)>pr)&&(c.splice(l,0,ds.push(Fy(a,f,Math.abs(m-n)<pr&&i-x>pr?[n,Math.abs(p-n)<pr?h:i]:Math.abs(x-i)<pr&&e-m>pr?[Math.abs(h-i)<pr?p:e,i]:Math.abs(m-e)<pr&&x-t>pr?[e,Math.abs(p-e)<pr?h:t]:Math.abs(x-t)<pr&&m-n>pr?[Math.abs(h-t)<pr?p:n,t]:null))-1),++u);u&&(g=!1)}if(g){var b,D,T,k=1/0;for(o=0,g=null;o<r;++o)(s=ma[o])&&(T=(b=(a=s.site)[0]-n)*b+(D=a[1]-t)*D)<k&&(k=T,g=s);if(g){var Z=[n,t],z=[n,i],fe=[e,i],ue=[e,t];g.halfedges.push(ds.push(Fy(a=g.site,Z,z))-1,ds.push(Fy(a,z,fe))-1,ds.push(Fy(a,fe,ue))-1,ds.push(Fy(a,ue,Z))-1)}}for(o=0;o<r;++o)(s=ma[o])&&(s.halfedges.length||delete ma[o])}(s,a,l,c)}this.edges=ds,this.cells=ma,Fg=Ny=ds=ma=null}function Ng(n,t,e){this.k=n,this.x=t,this.y=e}_O.prototype={constructor:_O,polygons:function(){var n=this.edges;return this.cells.map(function(t){var e=t.halfedges.map(function(i){return cj(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(a=(o=e.halfedges).length)for(var o,a,l,r=e.site,s=-1,c=t[o[a-1]],u=c.left===r?c.right:c.left;++s<a;)l=u,u=(c=t[o[s]]).left===r?c.right:c.left,l&&u&&i<l.index&&i<u.index&&Dje(r,l,u)<0&&n.push([r.data,l.data,u.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,a,i=this,o=i._found||0,s=i.cells.length;!(a=i.cells[o]);)if(++o>=s)return null;var l=n-a.site[0],c=t-a.site[1],u=l*l+c*c;do{a=i.cells[r=o],o=null,a.halfedges.forEach(function(d){var p=i.edges[d],h=p.left;if(h!==a.site&&h||(h=p.right)){var f=n-h[0],m=t-h[1],x=f*f+m*m;x<u&&(u=x,o=h.index)}})}while(null!==o);return i._found=r,null==e||u<=e*e?a.site:null}},Ng.prototype={constructor:Ng,scale:function(n){return 1===n?this:new Ng(this.k*n,this.x,this.y)},translate:function(n,t){return 0===n&0===t?this:new Ng(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 Ng(1,0,0);var zce=xo(".2~e"),Ije=xo(".4~r"),Vce=xo(",~");function Hce(n){if(0===n)return"0";let t=Math.abs(n);return t>=1e4||t<.001?zce(n):Ije(n)}var yp={formatTick:Hce,formatShort:Hce,formatReadable(n){let t=Math.abs(n);return t>=1e4||t<.001?zce(n):Vce(n)},formatLong:Vce},Pje=new Intl.NumberFormat(void 0,{maximumFractionDigits:3});function vO(n){return Pje.format(n)}var Md={formatTick:vO,formatShort:vO,formatReadable:vO,formatLong:vO},Rje=xo("0.3~s"),Oje=xo(",.3~f");function yO(n){let t=Math.abs(n);return t>=1e4||t<.001?Rje(n):Oje(n)}var jce={formatTick:yO,formatShort:yO,formatReadable:yO,formatLong:yO},gj=36e5,Ly=xo(".4~");function bO(n){if(0===n)return"0";let t=Math.sign(n)>0?"":"-",e=Math.abs(n);return t+=e<1e3?`${Ly(e)} ms`:e<6e4?`${Ly(e/1e3)} sec`:e<gj?`${Ly(e/6e4)} min`:e<864e5?`${Ly(e/gj)} hr`:e<31536e6?`${Ly(e/864e5)} day`:`${Ly(e/31536e6)} yr`,t}var hj,SS={formatTick:bO,formatShort:bO,formatReadable:bO,formatLong:bO},kje=Rg().tickFormat(),Gce={formatTick:n=>kje(new Date(n)),formatShort:n=>new Date(n).toLocaleString(hj,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),formatReadable:n=>new Date(n).toLocaleString(hj,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}),formatLong:n=>new Date(n).toLocaleString(hj,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})};function ou(n){switch(n){case Nr.LINEAR:return new ES;case Nr.LOG10:return new bj;case Nr.TIME:return new TS;default:throw new RangeError(`ScaleType ${n} not supported.`)}}var ES=class{constructor(){this.defaultFormatter=yp}transform(t,e,i){let[r,o]=t,s=o-r,[a,l]=e;return 0===s?a:(l-a)/s*(i-r)+a}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=Qo(),o=.05*(i-e+Number.EPSILON),[s,a]=r.domain([e-o,i+o]).nice().domain();return[s,a]}ticks(t,e){return Qo().domain(t).ticks(e)}isSafeNumber(t){return Number.isFinite(t)}},bj=class{constructor(){this.defaultFormatter=yp}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,[s,a]=e,l=this.transform(r),u=this.transform(o)-l,d=a-s;return i=this.transform(i),d/(u+Number.EPSILON)*(i-l)+s}reverse(t,e,i){let[r,o]=t,[s,a]=e,l=this.transform(r),u=this.transform(o)-l;return this.untransform(u/(a-s+Number.EPSILON)*(i-s)+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=pS().domain([i,r]).ticks(e);return o.length?o:t}isSafeNumber(t){return Number.isFinite(t)&&t>0}},TS=class{constructor(){this.scale=Rg(),this.defaultFormatter=Gce}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)}},xj=!1;if(self.hasOwnProperty("WebGL2RenderingContext")&&self.hasOwnProperty("document")){let n=document.createElement("canvas");n.addEventListener("webglcontextcreationerror",()=>{xj=!1});let t=n.getContext("webgl2");xj=Boolean(t)}var su_convertRectToExtent=function(n){return{x:[n.x,n.x+n.width],y:[n.y,n.y+n.height]}},su_isWebGl2Supported=function(){return xj},su_isOffscreenCanvasSupported=function(){return self.hasOwnProperty("OffscreenCanvas")},su_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},By=class{constructor(){this.xScale=ou(Nr.LINEAR),this.yScale=ou(Nr.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=su_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 xO(n,t,e,i){let{color:r,visible:o,opacity:s}=i,a=n;return a||o?(a=a??t(),a=e(a),a.style.display=o?"":"none",a.style.stroke=r,a.style.opacity=String(s??1),a):null}var El=1001,Zo=1003,Gs=1006,_f=1009,WS=1012,Ug=1015,lb=1016,cb=1020,ga=1023,jg=1026,hb=1027,ob=2400,sb=2401,bf=3e3,Wr=3001,qS=35044,ok=35048,Ep=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,s=r.length;o<s;o++)r[o].call(this,t);t.target=null}}},Ms=[];for(let n=0;n<256;n++)Ms[n]=(n<16?"0":"")+n.toString(16);var Dj=Math.PI/180,h8=180/Math.PI;function du(){let n=4294967295*Math.random()|0,t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(Ms[255&n]+Ms[n>>8&255]+Ms[n>>16&255]+Ms[n>>24&255]+"-"+Ms[255&t]+Ms[t>>8&255]+"-"+Ms[t>>16&15|64]+Ms[t>>24&255]+"-"+Ms[63&e|128]+Ms[e>>8&255]+"-"+Ms[e>>16&255]+Ms[e>>24&255]+Ms[255&i]+Ms[i>>8&255]+Ms[i>>16&255]+Ms[i>>24&255]).toUpperCase()}function Ga(n,t,e){return Math.max(t,Math.min(e,n))}function Aj(n,t,e){return(1-e)*n+e*t}function xue(n){return 0==(n&n-1)&&0!==n}function H8e(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var at=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,s=this.y-t.y;return this.x=o*i-s*r+t.x,this.y=o*r+s*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};at.prototype.isVector2=!0;var Jo=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,s,a,l,c){let u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=o,u[5]=l,u[6]=i,u[7]=s,u[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,s=i[0],a=i[3],l=i[6],c=i[1],u=i[4],d=i[7],p=i[2],h=i[5],f=i[8],m=r[0],x=r[3],g=r[6],b=r[1],D=r[4],T=r[7],k=r[2],Z=r[5],z=r[8];return o[0]=s*m+a*b+l*k,o[3]=s*x+a*D+l*Z,o[6]=s*g+a*T+l*z,o[1]=c*m+u*b+d*k,o[4]=c*x+u*D+d*Z,o[7]=c*g+u*T+d*z,o[2]=p*m+h*b+f*k,o[5]=p*x+h*D+f*Z,o[8]=p*g+h*T+f*z,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],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e*s*u-e*a*c-i*o*u+i*a*l+r*o*c-r*s*l}invert(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=u*s-a*c,p=a*l-u*o,h=c*o-s*l,f=e*d+i*p+r*h;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return t[0]=d*m,t[1]=(r*c-u*i)*m,t[2]=(a*i-r*s)*m,t[3]=p*m,t[4]=(u*e-r*l)*m,t[5]=(r*o-a*e)*m,t[6]=h*m,t[7]=(i*l-c*e)*m,t[8]=(s*e-i*o)*m,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,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+t,-r*c,r*l,-r*(-c*s+l*a)+a+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],s=r[3],a=r[6],l=r[1],c=r[4],u=r[7];return r[0]=e*o+i*l,r[3]=e*s+i*c,r[6]=e*a+i*u,r[1]=-i*o+e*l,r[4]=-i*s+e*c,r[7]=-i*a+e*u,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 Ode(n){for(let t=n.length-1;t>=0;--t)if(n[t]>65535)return!0;return!1}function YS(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}Jo.prototype.isMatrix3=!0;var Cue={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},au={h:0,s:0,l:0},CO={h:0,s:0,l:0};function Ij(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 ub(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function Pj(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}var vn=(()=>{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=Ga(i,0,1),r=Ga(r,0,1),0===i)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+i):r+i-r*i,s=2*r-o;this.r=Ij(s,o,e+1/3),this.g=Ij(s,o,e),this.b=Ij(s,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,a=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(a))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(a))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(a)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,u=parseInt(o[3],10)/100;return i(o[4]),this.setHSL(l,c,u)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(3===s)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===s)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=Cue[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=ub(e.r),this.g=ub(e.g),this.b=ub(e.b),this}copyLinearToSRGB(e){return this.r=Pj(e.r),this.g=Pj(e.g),this.b=Pj(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,s=Math.max(i,r,o),a=Math.min(i,r,o),u=(a+s)/2;if(a===s)l=0,c=0;else{let d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case i:l=(r-o)/d+(r<o?6:0);break;case r:l=(o-i)/d+2;break;case o:l=(i-r)/d+4}l/=6}return e.h=l,e.s=c,e.l=u,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,i,r){return this.getHSL(au),au.h+=e,au.s+=i,au.l+=r,this.setHSL(au.h,au.s,au.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(au),e.getHSL(CO);let r=Aj(au.h,CO.h,i),o=Aj(au.s,CO.s,i),s=Aj(au.l,CO.l,i);return this.setHSL(r,o,s),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=Cue,n})();vn.prototype.isColor=!0,vn.prototype.r=1,vn.prototype.g=1,vn.prototype.b=1;var Vy,Tp=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===Vy&&(Vy=YS("canvas")),Vy.width=t.width,Vy.height=t.height;let i=Vy.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=Vy}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=YS("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 s=0;s<o.length;s++)o[s]=255*ub(o[s]/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*ub(e[i]/255)):ub(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}},U8e=0,Ho=class extends Ep{constructor(t=Ho.DEFAULT_IMAGE,e=Ho.DEFAULT_MAPPING,i=El,r=El,o=Gs,s=1008,a=ga,l=_f,c=1,u=bf){super(),Object.defineProperty(this,"id",{value:U8e++}),this.uuid=du(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=i,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new at(0,0),this.repeat=new at(1,1),this.center=new at(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Jo,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 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=du()),!e&&void 0===t.images[r.uuid]){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)o.push(Rj(r[s].isDataTexture?r[s].image:r[s]))}else o=Rj(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 1e3:t.x=t.x-Math.floor(t.x);break;case El:t.x=t.x<0?0:1;break;case 1002: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 1e3:t.y=t.y-Math.floor(t.y);break;case El:t.y=t.y<0?0:1;break;case 1002: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 Rj(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?Tp.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."),{})}Ho.DEFAULT_IMAGE=void 0,Ho.DEFAULT_MAPPING=300,Ho.prototype.isTexture=!0;var ar=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,s=t.elements;return this.x=s[0]*e+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*e+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*e+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*e+s[7]*i+s[11]*r+s[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],u=l[4],d=l[8],p=l[1],h=l[5],f=l[9],m=l[2],x=l[6],g=l[10];if(Math.abs(u-p)<.01&&Math.abs(d-m)<.01&&Math.abs(f-x)<.01){if(Math.abs(u+p)<.1&&Math.abs(d+m)<.1&&Math.abs(f+x)<.1&&Math.abs(c+h+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let D=(c+1)/2,T=(h+1)/2,k=(g+1)/2,Z=(u+p)/4,z=(d+m)/4,fe=(f+x)/4;return D>T&&D>k?D<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(D),r=Z/i,o=z/i):T>k?T<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(T),i=Z/r,o=fe/r):k<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(k),i=z/o,r=fe/o),this.set(i,r,o,e),this}let b=Math.sqrt((x-f)*(x-f)+(d-m)*(d-m)+(p-u)*(p-u));return Math.abs(b)<.001&&(b=1),this.x=(x-f)/b,this.y=(d-m)/b,this.z=(p-u)/b,this.w=Math.acos((c+h+g-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}};ar.prototype.isVector4=!0;var Wa=class extends Ep{constructor(t,e,i={}){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new ar(0,0,t,e),this.scissorTest=!1,this.viewport=new ar(0,0,t,e),this.texture=new Ho(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:Gs,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"})}};Wa.prototype.isWebGLRenderTarget=!0,class extends Wa{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 XS=class extends Wa{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}};XS.prototype.isWebGLMultisampleRenderTarget=!0;var qs=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,s,a){let l=i[r+0],c=i[r+1],u=i[r+2],d=i[r+3],p=o[s+0],h=o[s+1],f=o[s+2],m=o[s+3];if(0===a)return t[e+0]=l,t[e+1]=c,t[e+2]=u,void(t[e+3]=d);if(1===a)return t[e+0]=p,t[e+1]=h,t[e+2]=f,void(t[e+3]=m);if(d!==m||l!==p||c!==h||u!==f){let x=1-a,g=l*p+c*h+u*f+d*m,b=g>=0?1:-1,D=1-g*g;if(D>Number.EPSILON){let k=Math.sqrt(D),Z=Math.atan2(k,g*b);x=Math.sin(x*Z)/k,a=Math.sin(a*Z)/k}let T=a*b;if(l=l*x+p*T,c=c*x+h*T,u=u*x+f*T,d=d*x+m*T,x===1-a){let k=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=k,c*=k,u*=k,d*=k}}t[e]=l,t[e+1]=c,t[e+2]=u,t[e+3]=d}static multiplyQuaternionsFlat(t,e,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],d=o[s],p=o[s+1],h=o[s+2],f=o[s+3];return t[e]=a*f+u*d+l*h-c*p,t[e+1]=l*f+u*p+c*d-a*h,t[e+2]=c*f+u*h+a*p-l*d,t[e+3]=u*f-a*d-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,s=t._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),d=a(o/2),p=l(i/2),h=l(r/2),f=l(o/2);switch(s){case"XYZ":this._x=p*u*d+c*h*f,this._y=c*h*d-p*u*f,this._z=c*u*f+p*h*d,this._w=c*u*d-p*h*f;break;case"YXZ":this._x=p*u*d+c*h*f,this._y=c*h*d-p*u*f,this._z=c*u*f-p*h*d,this._w=c*u*d+p*h*f;break;case"ZXY":this._x=p*u*d-c*h*f,this._y=c*h*d+p*u*f,this._z=c*u*f+p*h*d,this._w=c*u*d-p*h*f;break;case"ZYX":this._x=p*u*d-c*h*f,this._y=c*h*d+p*u*f,this._z=c*u*f-p*h*d,this._w=c*u*d+p*h*f;break;case"YZX":this._x=p*u*d+c*h*f,this._y=c*h*d+p*u*f,this._z=c*u*f-p*h*d,this._w=c*u*d-p*h*f;break;case"XZY":this._x=p*u*d-c*h*f,this._y=c*h*d-p*u*f,this._z=c*u*f+p*h*d,this._w=c*u*d+p*h*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}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],s=e[1],a=e[5],l=e[9],c=e[2],u=e[6],d=e[10],p=i+a+d;if(p>0){let h=.5/Math.sqrt(p+1);this._w=.25/h,this._x=(u-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(i>a&&i>d){let h=2*Math.sqrt(1+i-a-d);this._w=(u-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>d){let h=2*Math.sqrt(1+a-i-d);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+u)/h}else{let h=2*Math.sqrt(1+d-i-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+u)/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(Ga(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,s=t._w,a=e._x,l=e._y,c=e._z,u=e._w;return this._x=i*u+s*a+r*c-o*l,this._y=r*u+s*l+o*a-i*c,this._z=o*u+s*c+i*l-r*a,this._w=s*u-i*a-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,s=this._w,a=s*t._w+i*t._x+r*t._y+o*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=i,this._y=r,this._z=o,this;let l=1-a*a;if(l<=Number.EPSILON){let h=1-e;return this._w=h*s+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),u=Math.atan2(c,a),d=Math.sin((1-e)*u)/c,p=Math.sin(e*u)/c;return this._w=s*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=o*d+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(){}};qs.prototype.isQuaternion=!0;var ie=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(Mue.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Mue.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,s=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])*s,this.y=(o[1]*e+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*e+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(t){let e=this.x,i=this.y,r=this.z,o=t.x,s=t.y,a=t.z,l=t.w,c=l*e+s*r-a*i,u=l*i+a*e-o*r,d=l*r+o*i-s*e,p=-o*e-s*i-a*r;return this.x=c*l+p*-o+u*-a-d*-s,this.y=u*l+p*-s+d*-o-c*-a,this.z=d*l+p*-a+c*-s-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 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,s=e.x,a=e.y,l=e.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,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 Oj.copy(this).projectOnVector(t),this.sub(Oj)}reflect(t){return this.sub(Oj.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(Ga(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}};ie.prototype.isVector3=!0;var Oj=new ie,Mue=new qs,Tl=class{constructor(t=new ie(1/0,1/0,1/0),e=new ie(-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,s=-1/0,a=-1/0;for(let l=0,c=t.length;l<c;l+=3){let u=t[l],d=t[l+1],p=t[l+2];u<e&&(e=u),d<i&&(i=d),p<r&&(r=p),u>o&&(o=u),d>s&&(s=d),p>a&&(a=p)}return this.min.set(e,i,r),this.max.set(o,s,a),this}setFromBufferAttribute(t){let e=1/0,i=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=t.count;l<c;l++){let u=t.getX(l),d=t.getY(l),p=t.getZ(l);u<e&&(e=u),d<i&&(i=d),p<r&&(r=p),u>o&&(o=u),d>s&&(s=d),p>a&&(a=p)}return this.min.set(e,i,r),this.max.set(o,s,a),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=Lg.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 s=0,a=o.count;s<a;s++)Lg.fromBufferAttribute(o,s).applyMatrix4(t.matrixWorld),this.expandByPoint(Lg)}else null===i.boundingBox&&i.computeBoundingBox(),kj.copy(i.boundingBox),kj.applyMatrix4(t.matrixWorld),this.union(kj);let r=t.children;for(let o=0,s=r.length;o<s;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,Lg),Lg.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(AS),MO.subVectors(this.max,AS),Hy.subVectors(t.a,AS),Uy.subVectors(t.b,AS),zy.subVectors(t.c,AS),af.subVectors(Uy,Hy),lf.subVectors(zy,Uy),Bg.subVectors(Hy,zy);let e=[0,-af.z,af.y,0,-lf.z,lf.y,0,-Bg.z,Bg.y,af.z,0,-af.x,lf.z,0,-lf.x,Bg.z,0,-Bg.x,-af.y,af.x,0,-lf.y,lf.x,0,-Bg.y,Bg.x,0];return!(!Fj(e,Hy,Uy,zy,MO)||(e=[1,0,0,0,1,0,0,0,1],!Fj(e,Hy,Uy,zy,MO)))&&(wO.crossVectors(af,lf),e=[wO.x,wO.y,wO.z],Fj(e,Hy,Uy,zy,MO))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Lg.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(Lg).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()||(bp[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),bp[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),bp[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),bp[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),bp[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),bp[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),bp[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),bp[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(bp)),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)}};Tl.prototype.isBox3=!0;var bp=[new ie,new ie,new ie,new ie,new ie,new ie,new ie,new ie],Lg=new ie,kj=new Tl,Hy=new ie,Uy=new ie,zy=new ie,af=new ie,lf=new ie,Bg=new ie,AS=new ie,MO=new ie,wO=new ie,Vg=new ie;function Fj(n,t,e,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){Vg.fromArray(n,o);let a=r.x*Math.abs(Vg.x)+r.y*Math.abs(Vg.y)+r.z*Math.abs(Vg.z),l=t.dot(Vg),c=e.dot(Vg),u=i.dot(Vg);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}var z8e=new Tl,wue=new ie,SO=new ie,Nj=new ie,xf=class{constructor(t=new ie,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):z8e.setFromPoints(t).getCenter(i);let r=0;for(let o=0,s=t.length;o<s;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){Nj.subVectors(t,this.center);let e=Nj.lengthSq();if(e>this.radius*this.radius){let i=Math.sqrt(e),r=.5*(i-this.radius);this.center.add(Nj.multiplyScalar(r/i)),this.radius+=r}return this}union(t){return!0===this.center.equals(t.center)?SO.set(0,0,1).multiplyScalar(t.radius):SO.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(wue.copy(t.center).add(SO)),this.expandByPoint(wue.copy(t.center).sub(SO)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}},xp=new ie,Lj=new ie,EO=new ie,cf=new ie,Bj=new ie,TO=new ie,Vj=new ie,Cf=class{constructor(t=new ie,e=new ie(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,xp)),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=xp.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(xp.copy(this.direction).multiplyScalar(e).add(this.origin),xp.distanceToSquared(t))}distanceSqToSegment(t,e,i,r){Lj.copy(t).add(e).multiplyScalar(.5),EO.copy(e).sub(t).normalize(),cf.copy(this.origin).sub(Lj);let d,p,h,f,o=.5*t.distanceTo(e),s=-this.direction.dot(EO),a=cf.dot(this.direction),l=-cf.dot(EO),c=cf.lengthSq(),u=Math.abs(1-s*s);if(u>0)if(d=s*l-a,p=s*a-l,f=o*u,d>=0)if(p>=-f)if(p<=f){let m=1/u;d*=m,p*=m,h=d*(d+s*p+2*a)+p*(s*d+p+2*l)+c}else p=o,d=Math.max(0,-(s*p+a)),h=-d*d+p*(p+2*l)+c;else p=-o,d=Math.max(0,-(s*p+a)),h=-d*d+p*(p+2*l)+c;else p<=-f?(d=Math.max(0,-(-s*o+a)),p=d>0?-o:Math.min(Math.max(-o,-l),o),h=-d*d+p*(p+2*l)+c):p<=f?(d=0,p=Math.min(Math.max(-o,-l),o),h=p*(p+2*l)+c):(d=Math.max(0,-(s*o+a)),p=d>0?o:Math.min(Math.max(-o,-l),o),h=-d*d+p*(p+2*l)+c);else p=s>0?-o:o,d=Math.max(0,-(s*p+a)),h=-d*d+p*(p+2*l)+c;return i&&i.copy(this.direction).multiplyScalar(d).add(this.origin),r&&r.copy(EO).multiplyScalar(p).add(Lj),h}intersectSphere(t,e){xp.subVectors(t.center,this.origin);let i=xp.dot(this.direction),r=xp.dot(xp)-i*i,o=t.radius*t.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return a<0&&l<0?null:this.at(a<0?l:a,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,s,a,l,c=1/this.direction.x,u=1/this.direction.y,d=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),u>=0?(o=(t.min.y-p.y)*u,s=(t.max.y-p.y)*u):(o=(t.max.y-p.y)*u,s=(t.min.y-p.y)*u),i>s||o>r||((o>i||i!=i)&&(i=o),(s<r||r!=r)&&(r=s),d>=0?(a=(t.min.z-p.z)*d,l=(t.max.z-p.z)*d):(a=(t.max.z-p.z)*d,l=(t.min.z-p.z)*d),i>l||a>r)||((a>i||i!=i)&&(i=a),(l<r||r!=r)&&(r=l),r<0)?null:this.at(i>=0?i:r,e)}intersectsBox(t){return null!==this.intersectBox(t,xp)}intersectTriangle(t,e,i,r,o){Bj.subVectors(e,t),TO.subVectors(i,t),Vj.crossVectors(Bj,TO);let a,s=this.direction.dot(Vj);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}cf.subVectors(this.origin,t);let l=a*this.direction.dot(TO.crossVectors(cf,TO));if(l<0)return null;let c=a*this.direction.dot(Bj.cross(cf));if(c<0||l+c>s)return null;let u=-a*cf.dot(Vj);return u<0?null:this.at(u/s,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)}},Rn=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,s,a,l,c,u,d,p,h,f,m,x){let g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=r,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=d,g[14]=p,g[3]=h,g[7]=f,g[11]=m,g[15]=x,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 Rn).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/jy.setFromMatrixColumn(t,0).length(),o=1/jy.setFromMatrixColumn(t,1).length(),s=1/jy.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]*s,e[9]=i[9]*s,e[10]=i[10]*s,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,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(o),d=Math.sin(o);if("XYZ"===t.order){let p=s*u,h=s*d,f=a*u,m=a*d;e[0]=l*u,e[4]=-l*d,e[8]=c,e[1]=h+f*c,e[5]=p-m*c,e[9]=-a*l,e[2]=m-p*c,e[6]=f+h*c,e[10]=s*l}else if("YXZ"===t.order){let p=l*u,h=l*d,f=c*u,m=c*d;e[0]=p+m*a,e[4]=f*a-h,e[8]=s*c,e[1]=s*d,e[5]=s*u,e[9]=-a,e[2]=h*a-f,e[6]=m+p*a,e[10]=s*l}else if("ZXY"===t.order){let p=l*u,h=l*d,f=c*u,m=c*d;e[0]=p-m*a,e[4]=-s*d,e[8]=f+h*a,e[1]=h+f*a,e[5]=s*u,e[9]=m-p*a,e[2]=-s*c,e[6]=a,e[10]=s*l}else if("ZYX"===t.order){let p=s*u,h=s*d,f=a*u,m=a*d;e[0]=l*u,e[4]=f*c-h,e[8]=p*c+m,e[1]=l*d,e[5]=m*c+p,e[9]=h*c-f,e[2]=-c,e[6]=a*l,e[10]=s*l}else if("YZX"===t.order){let p=s*l,h=s*c,f=a*l,m=a*c;e[0]=l*u,e[4]=m-p*d,e[8]=f*d+h,e[1]=d,e[5]=s*u,e[9]=-a*u,e[2]=-c*u,e[6]=h*d+f,e[10]=p-m*d}else if("XZY"===t.order){let p=s*l,h=s*c,f=a*l,m=a*c;e[0]=l*u,e[4]=-d,e[8]=c*u,e[1]=p*d+m,e[5]=s*u,e[9]=h*d-f,e[2]=f*d-h,e[6]=a*u,e[10]=m*d+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(j8e,t,G8e)}lookAt(t,e,i){let r=this.elements;return wl.subVectors(t,e),0===wl.lengthSq()&&(wl.z=1),wl.normalize(),uf.crossVectors(i,wl),0===uf.lengthSq()&&(1===Math.abs(i.z)?wl.x+=1e-4:wl.z+=1e-4,wl.normalize(),uf.crossVectors(i,wl)),uf.normalize(),DO.crossVectors(wl,uf),r[0]=uf.x,r[4]=DO.x,r[8]=wl.x,r[1]=uf.y,r[5]=DO.y,r[9]=wl.y,r[2]=uf.z,r[6]=DO.z,r[10]=wl.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,s=i[0],a=i[4],l=i[8],c=i[12],u=i[1],d=i[5],p=i[9],h=i[13],f=i[2],m=i[6],x=i[10],g=i[14],b=i[3],D=i[7],T=i[11],k=i[15],Z=r[0],z=r[4],fe=r[8],ue=r[12],he=r[1],w=r[5],F=r[9],q=r[13],K=r[2],de=r[6],Y=r[10],ae=r[14],le=r[3],Ie=r[7],ve=r[11],De=r[15];return o[0]=s*Z+a*he+l*K+c*le,o[4]=s*z+a*w+l*de+c*Ie,o[8]=s*fe+a*F+l*Y+c*ve,o[12]=s*ue+a*q+l*ae+c*De,o[1]=u*Z+d*he+p*K+h*le,o[5]=u*z+d*w+p*de+h*Ie,o[9]=u*fe+d*F+p*Y+h*ve,o[13]=u*ue+d*q+p*ae+h*De,o[2]=f*Z+m*he+x*K+g*le,o[6]=f*z+m*w+x*de+g*Ie,o[10]=f*fe+m*F+x*Y+g*ve,o[14]=f*ue+m*q+x*ae+g*De,o[3]=b*Z+D*he+T*K+k*le,o[7]=b*z+D*w+T*de+k*Ie,o[11]=b*fe+D*F+T*Y+k*ve,o[15]=b*ue+D*q+T*ae+k*De,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],s=t[1],a=t[5],l=t[9],c=t[13],u=t[2],d=t[6],p=t[10],h=t[14];return t[3]*(+o*l*d-r*c*d-o*a*p+i*c*p+r*a*h-i*l*h)+t[7]*(+e*l*h-e*c*p+o*s*p-r*s*h+r*c*u-o*l*u)+t[11]*(+e*c*d-e*a*h-o*s*d+i*s*h+o*a*u-i*c*u)+t[15]*(-r*a*u-e*l*d+e*a*p+r*s*d-i*s*p+i*l*u)}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],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],d=t[9],p=t[10],h=t[11],f=t[12],m=t[13],x=t[14],g=t[15],b=d*x*c-m*p*c+m*l*h-a*x*h-d*l*g+a*p*g,D=f*p*c-u*x*c-f*l*h+s*x*h+u*l*g-s*p*g,T=u*m*c-f*d*c+f*a*h-s*m*h-u*a*g+s*d*g,k=f*d*l-u*m*l-f*a*p+s*m*p+u*a*x-s*d*x,Z=e*b+i*D+r*T+o*k;if(0===Z)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let z=1/Z;return t[0]=b*z,t[1]=(m*p*o-d*x*o-m*r*h+i*x*h+d*r*g-i*p*g)*z,t[2]=(a*x*o-m*l*o+m*r*c-i*x*c-a*r*g+i*l*g)*z,t[3]=(d*l*o-a*p*o-d*r*c+i*p*c+a*r*h-i*l*h)*z,t[4]=D*z,t[5]=(u*x*o-f*p*o+f*r*h-e*x*h-u*r*g+e*p*g)*z,t[6]=(f*l*o-s*x*o-f*r*c+e*x*c+s*r*g-e*l*g)*z,t[7]=(s*p*o-u*l*o+u*r*c-e*p*c-s*r*h+e*l*h)*z,t[8]=T*z,t[9]=(f*d*o-u*m*o-f*i*h+e*m*h+u*i*g-e*d*g)*z,t[10]=(s*m*o-f*a*o+f*i*c-e*m*c-s*i*g+e*a*g)*z,t[11]=(u*a*o-s*d*o-u*i*c+e*d*c+s*i*h-e*a*h)*z,t[12]=k*z,t[13]=(u*m*r-f*d*r+f*i*p-e*m*p-u*i*x+e*d*x)*z,t[14]=(f*a*r-s*m*r-f*i*l+e*m*l+s*i*x-e*a*x)*z,t[15]=(s*d*r-u*a*r+u*i*l-e*d*l-s*i*p+e*a*p)*z,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,s=t.x,a=t.y,l=t.z,c=o*s,u=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*s,0,c*l-r*a,u*l+r*s,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,s){return this.set(1,i,o,0,t,1,s,0,e,r,1,0,0,0,0,1),this}compose(t,e,i){let r=this.elements,o=e._x,s=e._y,a=e._z,l=e._w,c=o+o,u=s+s,d=a+a,p=o*c,h=o*u,f=o*d,m=s*u,x=s*d,g=a*d,b=l*c,D=l*u,T=l*d,k=i.x,Z=i.y,z=i.z;return r[0]=(1-(m+g))*k,r[1]=(h+T)*k,r[2]=(f-D)*k,r[3]=0,r[4]=(h-T)*Z,r[5]=(1-(p+g))*Z,r[6]=(x+b)*Z,r[7]=0,r[8]=(f+D)*z,r[9]=(x-b)*z,r[10]=(1-(p+m))*z,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=jy.set(r[0],r[1],r[2]).length(),s=jy.set(r[4],r[5],r[6]).length(),a=jy.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],lu.copy(this);let c=1/o,u=1/s,d=1/a;return lu.elements[0]*=c,lu.elements[1]*=c,lu.elements[2]*=c,lu.elements[4]*=u,lu.elements[5]*=u,lu.elements[6]*=u,lu.elements[8]*=d,lu.elements[9]*=d,lu.elements[10]*=d,e.setFromRotationMatrix(lu),i.x=o,i.y=s,i.z=a,this}makePerspective(t,e,i,r,o,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,c=2*o/(i-r),u=(e+t)/(e-t),d=(i+r)/(i-r),p=-(s+o)/(s-o),h=-2*s*o/(s-o);return a[0]=2*o/(e-t),a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,i,r,o,s){let a=this.elements,l=1/(e-t),c=1/(i-r),u=1/(s-o),d=(e+t)*l,p=(i+r)*c,h=(s+o)*u;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[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}};Rn.prototype.isMatrix4=!0;var jy=new ie,lu=new Rn,j8e=new ie(0,0,0),G8e=new ie(1,1,1),uf=new ie,DO=new ie,wl=new ie,Sue=new Rn,Eue=new qs,Mf=class{constructor(t=0,e=0,i=0,r=Mf.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],s=r[4],a=r[8],l=r[1],c=r[5],u=r[9],d=r[2],p=r[6],h=r[10];switch(e){case"XYZ":this._y=Math.asin(Ga(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ga(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ga(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Ga(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,h),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Ga(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Ga(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,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 Sue.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Sue,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Eue.setFromEuler(this),this.setFromQuaternion(Eue,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 ie(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};Mf.prototype.isEuler=!0,Mf.DefaultOrder="XYZ",Mf.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var sk=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))}},W8e=0,Tue=new ie,Gy=new qs,Cp=new Rn,AO=new ie,IS=new ie,q8e=new ie,Y8e=new qs,Due=new ie(1,0,0),Aue=new ie(0,1,0),Iue=new ie(0,0,1),X8e={type:"added"},Pue={type:"removed"},Xi=class extends Ep{constructor(){super(),Object.defineProperty(this,"id",{value:W8e++}),this.uuid=du(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Xi.DefaultUp.clone();let t=new ie,e=new Mf,i=new qs,r=new ie(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 Rn},normalMatrix:{value:new Jo}}),this.matrix=new Rn,this.matrixWorld=new Rn,this.matrixAutoUpdate=Xi.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new sk,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 Gy.setFromAxisAngle(t,e),this.quaternion.multiply(Gy),this}rotateOnWorldAxis(t,e){return Gy.setFromAxisAngle(t,e),this.quaternion.premultiply(Gy),this}rotateX(t){return this.rotateOnAxis(Due,t)}rotateY(t){return this.rotateOnAxis(Aue,t)}rotateZ(t){return this.rotateOnAxis(Iue,t)}translateOnAxis(t,e){return Tue.copy(t).applyQuaternion(this.quaternion),this.position.add(Tue.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Due,t)}translateY(t){return this.translateOnAxis(Aue,t)}translateZ(t){return this.translateOnAxis(Iue,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(Cp.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?AO.copy(t):AO.set(t,e,i);let r=this.parent;this.updateWorldMatrix(!0,!1),IS.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Cp.lookAt(IS,AO,this.up):Cp.lookAt(AO,IS,this.up),this.quaternion.setFromRotationMatrix(Cp),r&&(Cp.extractRotation(r.matrixWorld),Gy.setFromRotationMatrix(Cp),this.quaternion.premultiply(Gy.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(X8e)):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(Pue)),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(Pue)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Cp.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Cp.multiply(t.parent.matrixWorld)),t.applyMatrix4(Cp),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 s=this.children[i].getObjectByProperty(t,e);if(void 0!==s)return s}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(IS,t,q8e),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(IS,Y8e,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,s=r.length;o<s;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(a,l){return void 0===a[l.uuid]&&(a[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 a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){let l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;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 a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(o(t.materials,this.material[l]));r.material=a}else r.material=o(t.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++)r.animations.push(o(t.animations,this.animations[a]))}if(e){let a=s(t.geometries),l=s(t.materials),c=s(t.textures),u=s(t.images),d=s(t.shapes),p=s(t.skeletons),h=s(t.animations);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),h.length>0&&(i.animations=h)}return i.object=r,i;function s(a){let l=[];for(let c in a){let u=a[c];delete u.metadata,l.push(u)}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}};Xi.DefaultUp=new ie(0,1,0),Xi.DefaultMatrixAutoUpdate=!0,Xi.prototype.isObject3D=!0;var cu=new ie,Mp=new ie,Hj=new ie,wp=new ie,Wy=new ie,qy=new ie,Rue=new ie,Uj=new ie,zj=new ie,jj=new ie,lo=class{constructor(t=new ie,e=new ie,i=new ie){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,r){r.subVectors(i,e),cu.subVectors(t,e),r.cross(cu);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){cu.subVectors(r,e),Mp.subVectors(i,e),Hj.subVectors(t,e);let s=cu.dot(cu),a=cu.dot(Mp),l=cu.dot(Hj),c=Mp.dot(Mp),u=Mp.dot(Hj),d=s*c-a*a;if(0===d)return o.set(-2,-1,-1);let p=1/d,h=(c*l-a*u)*p,f=(s*u-a*l)*p;return o.set(1-h-f,f,h)}static containsPoint(t,e,i,r){return this.getBarycoord(t,e,i,r,wp),wp.x>=0&&wp.y>=0&&wp.x+wp.y<=1}static getUV(t,e,i,r,o,s,a,l){return this.getBarycoord(t,e,i,r,wp),l.set(0,0),l.addScaledVector(o,wp.x),l.addScaledVector(s,wp.y),l.addScaledVector(a,wp.z),l}static isFrontFacing(t,e,i,r){return cu.subVectors(i,e),Mp.subVectors(t,e),cu.cross(Mp).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 cu.subVectors(this.c,this.b),Mp.subVectors(this.a,this.b),.5*cu.cross(Mp).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return lo.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return lo.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,i,r,o){return lo.getUV(t,this.a,this.b,this.c,e,i,r,o)}containsPoint(t){return lo.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return lo.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let s,a,i=this.a,r=this.b,o=this.c;Wy.subVectors(r,i),qy.subVectors(o,i),Uj.subVectors(t,i);let l=Wy.dot(Uj),c=qy.dot(Uj);if(l<=0&&c<=0)return e.copy(i);zj.subVectors(t,r);let u=Wy.dot(zj),d=qy.dot(zj);if(u>=0&&d<=u)return e.copy(r);let p=l*d-u*c;if(p<=0&&l>=0&&u<=0)return s=l/(l-u),e.copy(i).addScaledVector(Wy,s);jj.subVectors(t,o);let h=Wy.dot(jj),f=qy.dot(jj);if(f>=0&&h<=f)return e.copy(o);let m=h*c-l*f;if(m<=0&&c>=0&&f<=0)return a=c/(c-f),e.copy(i).addScaledVector(qy,a);let x=u*f-h*d;if(x<=0&&d-u>=0&&h-f>=0)return Rue.subVectors(o,r),a=(d-u)/(d-u+(h-f)),e.copy(r).addScaledVector(Rue,a);let g=1/(x+m+p);return s=m*g,a=p*g,e.copy(i).addScaledVector(Wy,s).addScaledVector(qy,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Q8e=0,hs=class extends Ep{constructor(){super(),Object.defineProperty(this,"id",{value:Q8e++}),this.uuid=du(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,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 s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}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),1!==this.blending&&(i.blending=this.blending),0!==this.side&&(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),s=r(t.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}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++}};hs.prototype.isMaterial=!0;var Gg=class extends hs{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new vn(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=0,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}};Gg.prototype.isMeshBasicMaterial=!0;var Er=new ie,IO=new at,Yr=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=qS,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 s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),s=new vn),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this}copyVector2sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),s=new at),e[i++]=s.x,e[i++]=s.y}return this}copyVector3sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),s=new ie),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this}copyVector4sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),s=new ar),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,i=this.count;e<i;e++)IO.fromBufferAttribute(this,e),IO.applyMatrix3(t),this.setXY(e,IO.x,IO.y);else if(3===this.itemSize)for(let e=0,i=this.count;e<i;e++)Er.fromBufferAttribute(this,e),Er.applyMatrix3(t),this.setXYZ(e,Er.x,Er.y,Er.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)Er.x=this.getX(e),Er.y=this.getY(e),Er.z=this.getZ(e),Er.applyMatrix4(t),this.setXYZ(e,Er.x,Er.y,Er.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Er.x=this.getX(e),Er.y=this.getY(e),Er.z=this.getZ(e),Er.applyNormalMatrix(t),this.setXYZ(e,Er.x,Er.y,Er.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Er.x=this.getX(e),Er.y=this.getY(e),Er.z=this.getZ(e),Er.transformDirection(t),this.setXYZ(e,Er.x,Er.y,Er.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!==qS&&(t.usage=this.usage),(0!==this.updateRange.offset||-1!==this.updateRange.count)&&(t.updateRange=this.updateRange),t}};Yr.prototype.isBufferAttribute=!0;var ak=class extends Yr{constructor(t,e,i){super(new Uint16Array(t),e,i)}},lk=class extends Yr{constructor(t,e,i){super(new Uint32Array(t),e,i)}};(class extends Yr{constructor(t,e,i){super(new Uint16Array(t),e,i)}}).prototype.isFloat16BufferAttribute=!0;var Jr=class extends Yr{constructor(t,e,i){super(new Float32Array(t),e,i)}},K8e=0,pc=new Rn,Gj=new Xi,Yy=new ie,Sl=new Tl,PS=new Tl,ps=new ie,nr=class extends Ep{constructor(){super(),Object.defineProperty(this,"id",{value:K8e++}),this.uuid=du(),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(Ode(t)?lk:ak)(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 Jo).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 pc.makeRotationFromQuaternion(t),this.applyMatrix4(pc),this}rotateX(t){return pc.makeRotationX(t),this.applyMatrix4(pc),this}rotateY(t){return pc.makeRotationY(t),this.applyMatrix4(pc),this}rotateZ(t){return pc.makeRotationZ(t),this.applyMatrix4(pc),this}translate(t,e,i){return pc.makeTranslation(t,e,i),this.applyMatrix4(pc),this}scale(t,e,i){return pc.makeScale(t,e,i),this.applyMatrix4(pc),this}lookAt(t){return Gj.lookAt(t),Gj.updateMatrix(),this.applyMatrix4(Gj.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yy).negate(),this.translate(Yy.x,Yy.y,Yy.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 Jr(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Tl);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 ie(-1/0,-1/0,-1/0),new ie(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++)Sl.setFromBufferAttribute(e[i]),this.morphTargetsRelative?(ps.addVectors(this.boundingBox.min,Sl.min),this.boundingBox.expandByPoint(ps),ps.addVectors(this.boundingBox.max,Sl.max),this.boundingBox.expandByPoint(ps)):(this.boundingBox.expandByPoint(Sl.min),this.boundingBox.expandByPoint(Sl.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 xf);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 ie,1/0);if(t){let i=this.boundingSphere.center;if(Sl.setFromBufferAttribute(t),e)for(let o=0,s=e.length;o<s;o++)PS.setFromBufferAttribute(e[o]),this.morphTargetsRelative?(ps.addVectors(Sl.min,PS.min),Sl.expandByPoint(ps),ps.addVectors(Sl.max,PS.max),Sl.expandByPoint(ps)):(Sl.expandByPoint(PS.min),Sl.expandByPoint(PS.max));Sl.getCenter(i);let r=0;for(let o=0,s=t.count;o<s;o++)ps.fromBufferAttribute(t,o),r=Math.max(r,i.distanceToSquared(ps));if(e)for(let o=0,s=e.length;o<s;o++){let a=e[o],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)ps.fromBufferAttribute(a,c),l&&(Yy.fromBufferAttribute(t,c),ps.add(Yy)),r=Math.max(r,i.distanceToSquared(ps))}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,s=e.uv.array,a=r.length/3;void 0===e.tangent&&this.setAttribute("tangent",new Yr(new Float32Array(4*a),4));let l=e.tangent.array,c=[],u=[];for(let he=0;he<a;he++)c[he]=new ie,u[he]=new ie;let d=new ie,p=new ie,h=new ie,f=new at,m=new at,x=new at,g=new ie,b=new ie;function D(he,w,F){d.fromArray(r,3*he),p.fromArray(r,3*w),h.fromArray(r,3*F),f.fromArray(s,2*he),m.fromArray(s,2*w),x.fromArray(s,2*F),p.sub(d),h.sub(d),m.sub(f),x.sub(f);let q=1/(m.x*x.y-x.x*m.y);!isFinite(q)||(g.copy(p).multiplyScalar(x.y).addScaledVector(h,-m.y).multiplyScalar(q),b.copy(h).multiplyScalar(m.x).addScaledVector(p,-x.x).multiplyScalar(q),c[he].add(g),c[w].add(g),c[F].add(g),u[he].add(b),u[w].add(b),u[F].add(b))}let T=this.groups;0===T.length&&(T=[{start:0,count:i.length}]);for(let he=0,w=T.length;he<w;++he){let F=T[he],q=F.start;for(let de=q,Y=q+F.count;de<Y;de+=3)D(i[de+0],i[de+1],i[de+2])}let k=new ie,Z=new ie,z=new ie,fe=new ie;function ue(he){z.fromArray(o,3*he),fe.copy(z);let w=c[he];k.copy(w),k.sub(z.multiplyScalar(z.dot(w))).normalize(),Z.crossVectors(fe,w);let q=Z.dot(u[he])<0?-1:1;l[4*he]=k.x,l[4*he+1]=k.y,l[4*he+2]=k.z,l[4*he+3]=q}for(let he=0,w=T.length;he<w;++he){let F=T[he],q=F.start;for(let de=q,Y=q+F.count;de<Y;de+=3)ue(i[de+0]),ue(i[de+1]),ue(i[de+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 Yr(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 ie,o=new ie,s=new ie,a=new ie,l=new ie,c=new ie,u=new ie,d=new ie;if(t)for(let p=0,h=t.count;p<h;p+=3){let f=t.getX(p+0),m=t.getX(p+1),x=t.getX(p+2);r.fromBufferAttribute(e,f),o.fromBufferAttribute(e,m),s.fromBufferAttribute(e,x),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),a.fromBufferAttribute(i,f),l.fromBufferAttribute(i,m),c.fromBufferAttribute(i,x),a.add(u),l.add(u),c.add(u),i.setXYZ(f,a.x,a.y,a.z),i.setXYZ(m,l.x,l.y,l.z),i.setXYZ(x,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),s.fromBufferAttribute(e,p+2),u.subVectors(s,o),d.subVectors(r,o),u.cross(d),i.setXYZ(p+0,u.x,u.y,u.z),i.setXYZ(p+1,u.x,u.y,u.z),i.setXYZ(p+2,u.x,u.y,u.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 s=i[r].array,a=t.attributes[r],l=a.array,c=a.itemSize*e,u=Math.min(l.length,s.length-c);for(let d=0,p=c;d<u;d++,p++)s[p]=l[d]}return this}normalizeNormals(){let t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)ps.fromBufferAttribute(t,e),ps.normalize(),t.setXYZ(e,ps.x,ps.y,ps.z)}toNonIndexed(){function t(a,l){let c=a.array,u=a.itemSize,d=a.normalized,p=new c.constructor(l.length*u),h=0,f=0;for(let m=0,x=l.length;m<x;m++){h=a.isInterleavedBufferAttribute?l[m]*a.data.stride+a.offset:l[m]*u;for(let g=0;g<u;g++)p[f++]=c[h++]}return new Yr(p,u,d)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new nr,i=this.index.array,r=this.attributes;for(let a in r){let c=t(r[a],i);e.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let u=0,d=c.length;u<d;u++){let h=t(c[u],i);l.push(h)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];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],u=[];for(let d=0,p=c.length;d<p;d++)u.push(c[d].toJSON(t.data));u.length>0&&(r[l]=u,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.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 u=[],d=o[c];for(let p=0,h=d.length;p<h;p++)u.push(d[p].clone(e));this.morphAttributes[c]=u}this.morphTargetsRelative=t.morphTargetsRelative;let s=t.groups;for(let c=0,u=s.length;c<u;c++){let d=s[c];this.addGroup(d.start,d.count,d.materialIndex)}let a=t.boundingBox;null!==a&&(this.boundingBox=a.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"})}};nr.prototype.isBufferGeometry=!0;var Oue=new Rn,Xy=new Cf,Wj=new xf,df=new ie,pf=new ie,hf=new ie,qj=new ie,Yj=new ie,Xj=new ie,PO=new ie,RO=new ie,OO=new ie,kO=new at,FO=new at,NO=new at,Qj=new ie,LO=new ie,Vo=class extends Xi{constructor(t=new nr,e=new Gg){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,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=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 s,i=this.geometry,r=this.material,o=this.matrixWorld;if(void 0!==r&&(null===i.boundingSphere&&i.computeBoundingSphere(),Wj.copy(i.boundingSphere),Wj.applyMatrix4(o),!1!==t.ray.intersectsSphere(Wj))&&(Oue.copy(o).invert(),Xy.copy(t.ray).applyMatrix4(Oue),null===i.boundingBox||!1!==Xy.intersectsBox(i.boundingBox)))if(i.isBufferGeometry){let a=i.index,l=i.attributes.position,c=i.morphAttributes.position,u=i.morphTargetsRelative,d=i.attributes.uv,p=i.attributes.uv2,h=i.groups,f=i.drawRange;if(null!==a)if(Array.isArray(r))for(let m=0,x=h.length;m<x;m++){let g=h[m],b=r[g.materialIndex];for(let k=Math.max(g.start,f.start),Z=Math.min(a.count,Math.min(g.start+g.count,f.start+f.count));k<Z;k+=3){let z=a.getX(k),fe=a.getX(k+1),ue=a.getX(k+2);s=BO(this,b,t,Xy,l,c,u,d,p,z,fe,ue),s&&(s.faceIndex=Math.floor(k/3),s.face.materialIndex=g.materialIndex,e.push(s))}}else for(let g=Math.max(0,f.start),b=Math.min(a.count,f.start+f.count);g<b;g+=3){let D=a.getX(g),T=a.getX(g+1),k=a.getX(g+2);s=BO(this,r,t,Xy,l,c,u,d,p,D,T,k),s&&(s.faceIndex=Math.floor(g/3),e.push(s))}else if(void 0!==l)if(Array.isArray(r))for(let m=0,x=h.length;m<x;m++){let g=h[m],b=r[g.materialIndex];for(let k=Math.max(g.start,f.start),Z=Math.min(l.count,Math.min(g.start+g.count,f.start+f.count));k<Z;k+=3)s=BO(this,b,t,Xy,l,c,u,d,p,k,k+1,k+2),s&&(s.faceIndex=Math.floor(k/3),s.face.materialIndex=g.materialIndex,e.push(s))}else for(let g=Math.max(0,f.start),b=Math.min(l.count,f.start+f.count);g<b;g+=3)s=BO(this,r,t,Xy,l,c,u,d,p,g,g+1,g+2),s&&(s.faceIndex=Math.floor(g/3),e.push(s))}else i.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}};function BO(n,t,e,i,r,o,s,a,l,c,u,d){df.fromBufferAttribute(r,c),pf.fromBufferAttribute(r,u),hf.fromBufferAttribute(r,d);let p=n.morphTargetInfluences;if(o&&p){PO.set(0,0,0),RO.set(0,0,0),OO.set(0,0,0);for(let f=0,m=o.length;f<m;f++){let x=p[f],g=o[f];0!==x&&(qj.fromBufferAttribute(g,c),Yj.fromBufferAttribute(g,u),Xj.fromBufferAttribute(g,d),s?(PO.addScaledVector(qj,x),RO.addScaledVector(Yj,x),OO.addScaledVector(Xj,x)):(PO.addScaledVector(qj.sub(df),x),RO.addScaledVector(Yj.sub(pf),x),OO.addScaledVector(Xj.sub(hf),x)))}df.add(PO),pf.add(RO),hf.add(OO)}n.isSkinnedMesh&&(n.boneTransform(c,df),n.boneTransform(u,pf),n.boneTransform(d,hf));let h=function(n,t,e,i,r,o,s,a){let l;if(l=1===t.side?i.intersectTriangle(s,o,r,!0,a):i.intersectTriangle(r,o,s,2!==t.side,a),null===l)return null;LO.copy(a),LO.applyMatrix4(n.matrixWorld);let c=e.ray.origin.distanceTo(LO);return c<e.near||c>e.far?null:{distance:c,point:LO.clone(),object:n}}(n,t,e,i,df,pf,hf,Qj);if(h){a&&(kO.fromBufferAttribute(a,c),FO.fromBufferAttribute(a,u),NO.fromBufferAttribute(a,d),h.uv=lo.getUV(Qj,df,pf,hf,kO,FO,NO,new at)),l&&(kO.fromBufferAttribute(l,c),FO.fromBufferAttribute(l,u),NO.fromBufferAttribute(l,d),h.uv2=lo.getUV(Qj,df,pf,hf,kO,FO,NO,new at));let f={a:c,b:u,c:d,normal:new ie,materialIndex:0};lo.getNormal(df,pf,hf,f.normal),h.face=f}return h}Vo.prototype.isMesh=!0;var Wg=class extends nr{constructor(t=1,e=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],u=[],d=[],p=0,h=0;function f(m,x,g,b,D,T,k,Z,z,fe,ue){let he=T/z,w=k/fe,F=T/2,q=k/2,K=Z/2,de=z+1,Y=fe+1,ae=0,le=0,Ie=new ie;for(let ve=0;ve<Y;ve++){let De=ve*w-q;for(let nt=0;nt<de;nt++)Ie[m]=(nt*he-F)*b,Ie[x]=De*D,Ie[g]=K,c.push(Ie.x,Ie.y,Ie.z),Ie[m]=0,Ie[x]=0,Ie[g]=Z>0?1:-1,u.push(Ie.x,Ie.y,Ie.z),d.push(nt/z),d.push(1-ve/fe),ae+=1}for(let ve=0;ve<fe;ve++)for(let De=0;De<z;De++){let gt=p+De+de*(ve+1),Ue=p+(De+1)+de*(ve+1),Ae=p+(De+1)+de*ve;l.push(p+De+de*ve,gt,Ae),l.push(gt,Ue,Ae),le+=6}a.addGroup(h,le,ue),h+=le,p+=ae}f("z","y","x",-1,-1,i,e,t,s,o,0),f("z","y","x",1,-1,i,e,-t,s,o,1),f("x","z","y",1,1,t,i,e,r,s,2),f("x","z","y",1,-1,t,i,-e,r,s,3),f("x","y","z",1,-1,t,e,i,r,o,4),f("x","y","z",-1,-1,t,e,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new Jr(c,3)),this.setAttribute("normal",new Jr(u,3)),this.setAttribute("uv",new Jr(d,2))}static fromJSON(t){return new Wg(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function fb(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 js(n){let t={};for(let e=0;e<n.length;e++){let i=fb(n[e]);for(let r in i)t[r]=i[r]}return t}var J8e={clone:fb,merge:js},Dp=class extends hs{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=fb(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 s=this.uniforms[r].value;e.uniforms[r]=s&&s.isTexture?{type:"t",value:s.toJSON(t).uuid}:s&&s.isColor?{type:"c",value:s.getHex()}:s&&s.isVector2?{type:"v2",value:s.toArray()}:s&&s.isVector3?{type:"v3",value:s.toArray()}:s&&s.isVector4?{type:"v4",value:s.toArray()}:s&&s.isMatrix3?{type:"m3",value:s.toArray()}:s&&s.isMatrix4?{type:"m4",value:s.toArray()}:{value:s}}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}};Dp.prototype.isShaderMaterial=!0;var QS=class extends Xi{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Rn,this.projectionMatrix=new Rn,this.projectionMatrixInverse=new Rn}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)}};QS.prototype.isCamera=!0;var Ws=class extends QS{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*h8*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(.5*Dj*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*h8*Math.atan(Math.tan(.5*Dj*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,s){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=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(.5*Dj*this.fov)/this.zoom,i=2*e,r=this.aspect*i,o=-.5*r,s=this.view;if(null!==this.view&&this.view.enabled){let l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*r/l,e-=s.offsetY*i/c,r*=s.width/l,i*=s.height/c}let a=this.filmOffset;0!==a&&(o+=t*a/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}};Ws.prototype.isPerspectiveCamera=!0;var KS=class extends Xi{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 Ws(90,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new ie(1,0,0)),this.add(r);let o=new Ws(90,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new ie(-1,0,0)),this.add(o);let s=new Ws(90,1,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new ie(0,1,0)),this.add(s);let a=new Ws(90,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new ie(0,-1,0)),this.add(a);let l=new Ws(90,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new ie(0,0,1)),this.add(l);let c=new Ws(90,1,t,e);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new ie(0,0,-1)),this.add(c)}update(t,e){null===this.parent&&this.updateMatrixWorld();let i=this.renderTarget,[r,o,s,a,l,c]=this.children,u=t.xr.enabled,d=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,s),t.setRenderTarget(i,3),t.render(e,a),t.setRenderTarget(i,4),t.render(e,l),i.texture.generateMipmaps=p,t.setRenderTarget(i,5),t.render(e,c),t.setRenderTarget(d),t.xr.enabled=u,i.texture.needsPMREMUpdate=!0}},mb=class extends Ho{constructor(t,e,i,r,o,s,a,l,c,u){super(t=void 0!==t?t:[],e=void 0!==e?e:301,i,r,o,s,a,l,c,u),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};mb.prototype.isCubeTexture=!0;var ck=class extends Wa{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 mb(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:Gs}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=ga,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 Wg(5,5,5),o=new Dp({name:"CubemapFromEquirect",uniforms:fb(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:1,blending:0});o.uniforms.tEquirect.value=e;let s=new Vo(r,o),a=e.minFilter;return 1008===e.minFilter&&(e.minFilter=Gs),new KS(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,i,r){let o=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(e,i,r);t.setRenderTarget(o)}};ck.prototype.isWebGLCubeRenderTarget=!0;var Kj=new ie,tGe=new ie,nGe=new Jo,uu=class{constructor(t=new ie(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=Kj.subVectors(i,e).cross(tGe.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(Kj),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||nGe.getNormalMatrix(t),r=this.coplanarPoint(Kj).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)}};uu.prototype.isPlane=!0;var Zy=new xf,VO=new ie,gb=class{constructor(t=new uu,e=new uu,i=new uu,r=new uu,o=new uu,s=new uu){this.planes=[t,e,i,r,o,s]}set(t,e,i,r,o,s){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(r),a[4].copy(o),a[5].copy(s),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],s=i[2],a=i[3],l=i[4],c=i[5],u=i[6],d=i[7],p=i[8],h=i[9],f=i[10],m=i[11],x=i[12],g=i[13],b=i[14],D=i[15];return e[0].setComponents(a-r,d-l,m-p,D-x).normalize(),e[1].setComponents(a+r,d+l,m+p,D+x).normalize(),e[2].setComponents(a+o,d+c,m+h,D+g).normalize(),e[3].setComponents(a-o,d-c,m-h,D-g).normalize(),e[4].setComponents(a-s,d-u,m-f,D-b).normalize(),e[5].setComponents(a+s,d+u,m+f,D+b).normalize(),this}intersectsObject(t){let e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Zy.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Zy)}intersectsSprite(t){return Zy.center.set(0,0,0),Zy.radius=.7071067811865476,Zy.applyMatrix4(t.matrixWorld),this.intersectsSphere(Zy)}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(VO.x=r.normal.x>0?t.max.x:t.min.x,VO.y=r.normal.y>0?t.max.y:t.min.y,VO.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(VO)<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 kde(){let n=null,t=!1,e=null,i=null;function r(o,s){e(o,s),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 iGe(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 u=i.get(c);u&&(n.deleteBuffer(u.buffer),i.delete(c))},update:function(c,u){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 d=i.get(c);void 0===d?i.set(c,function(c,u){let d=c.array,p=c.usage,h=n.createBuffer();n.bindBuffer(u,h),n.bufferData(u,d,p),c.onUploadCallback();let f=5126;return d instanceof Float32Array?f=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c.isFloat16BufferAttribute?e?f=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):f=5123:d instanceof Int16Array?f=5122:d instanceof Uint32Array?f=5125:d instanceof Int32Array?f=5124:d instanceof Int8Array?f=5120:(d instanceof Uint8Array||d instanceof Uint8ClampedArray)&&(f=5121),{buffer:h,type:f,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version}}(c,u)):d.version<c.version&&(function(c,u,d){let p=u.array,h=u.updateRange;n.bindBuffer(d,c),-1===h.count?n.bufferSubData(d,0,p):(e?n.bufferSubData(d,h.offset*p.BYTES_PER_ELEMENT,p,h.offset,h.count):n.bufferSubData(d,h.offset*p.BYTES_PER_ELEMENT,p.subarray(h.offset,h.offset+h.count)),h.count=-1)}(d.buffer,c,u),d.version=c.version)}}}var ZS=class extends nr{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,s=e/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,d=t/a,p=e/l,h=[],f=[],m=[],x=[];for(let g=0;g<u;g++){let b=g*p-s;for(let D=0;D<c;D++)f.push(D*d-o,-b,0),m.push(0,0,1),x.push(D/a),x.push(1-g/l)}for(let g=0;g<l;g++)for(let b=0;b<a;b++){let T=b+c*(g+1),k=b+1+c*(g+1),Z=b+1+c*g;h.push(b+c*g,T,Z),h.push(T,k,Z)}this.setIndex(h),this.setAttribute("position",new Jr(f,3)),this.setAttribute("normal",new Jr(m,3)),this.setAttribute("uv",new Jr(x,2))}static fromJSON(t){return new ZS(t.width,t.height,t.widthSegments,t.heightSegments)}},Di={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}"},Bt={common:{diffuse:{value:new vn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Jo},uv2Transform:{value:new Jo},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 at(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 vn(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 vn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Jo}},sprite:{diffuse:{value:new vn(16777215)},opacity:{value:1},center:{value:new at(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Jo}}},Sd={basic:{uniforms:js([Bt.common,Bt.specularmap,Bt.envmap,Bt.aomap,Bt.lightmap,Bt.fog]),vertexShader:Di.meshbasic_vert,fragmentShader:Di.meshbasic_frag},lambert:{uniforms:js([Bt.common,Bt.specularmap,Bt.envmap,Bt.aomap,Bt.lightmap,Bt.emissivemap,Bt.fog,Bt.lights,{emissive:{value:new vn(0)}}]),vertexShader:Di.meshlambert_vert,fragmentShader:Di.meshlambert_frag},phong:{uniforms:js([Bt.common,Bt.specularmap,Bt.envmap,Bt.aomap,Bt.lightmap,Bt.emissivemap,Bt.bumpmap,Bt.normalmap,Bt.displacementmap,Bt.fog,Bt.lights,{emissive:{value:new vn(0)},specular:{value:new vn(1118481)},shininess:{value:30}}]),vertexShader:Di.meshphong_vert,fragmentShader:Di.meshphong_frag},standard:{uniforms:js([Bt.common,Bt.envmap,Bt.aomap,Bt.lightmap,Bt.emissivemap,Bt.bumpmap,Bt.normalmap,Bt.displacementmap,Bt.roughnessmap,Bt.metalnessmap,Bt.fog,Bt.lights,{emissive:{value:new vn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Di.meshphysical_vert,fragmentShader:Di.meshphysical_frag},toon:{uniforms:js([Bt.common,Bt.aomap,Bt.lightmap,Bt.emissivemap,Bt.bumpmap,Bt.normalmap,Bt.displacementmap,Bt.gradientmap,Bt.fog,Bt.lights,{emissive:{value:new vn(0)}}]),vertexShader:Di.meshtoon_vert,fragmentShader:Di.meshtoon_frag},matcap:{uniforms:js([Bt.common,Bt.bumpmap,Bt.normalmap,Bt.displacementmap,Bt.fog,{matcap:{value:null}}]),vertexShader:Di.meshmatcap_vert,fragmentShader:Di.meshmatcap_frag},points:{uniforms:js([Bt.points,Bt.fog]),vertexShader:Di.points_vert,fragmentShader:Di.points_frag},dashed:{uniforms:js([Bt.common,Bt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Di.linedashed_vert,fragmentShader:Di.linedashed_frag},depth:{uniforms:js([Bt.common,Bt.displacementmap]),vertexShader:Di.depth_vert,fragmentShader:Di.depth_frag},normal:{uniforms:js([Bt.common,Bt.bumpmap,Bt.normalmap,Bt.displacementmap,{opacity:{value:1}}]),vertexShader:Di.meshnormal_vert,fragmentShader:Di.meshnormal_frag},sprite:{uniforms:js([Bt.sprite,Bt.fog]),vertexShader:Di.sprite_vert,fragmentShader:Di.sprite_frag},background:{uniforms:{uvTransform:{value:new Jo},t2D:{value:null}},vertexShader:Di.background_vert,fragmentShader:Di.background_frag},cube:{uniforms:js([Bt.envmap,{opacity:{value:1}}]),vertexShader:Di.cube_vert,fragmentShader:Di.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Di.equirect_vert,fragmentShader:Di.equirect_frag},distanceRGBA:{uniforms:js([Bt.common,Bt.displacementmap,{referencePosition:{value:new ie},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Di.distanceRGBA_vert,fragmentShader:Di.distanceRGBA_frag},shadow:{uniforms:js([Bt.lights,Bt.fog,{color:{value:new vn(0)},opacity:{value:1}}]),vertexShader:Di.shadow_vert,fragmentShader:Di.shadow_frag}};function IWe(n,t,e,i,r,o){let l,c,s=new vn(0),a=!0===r?0:1,u=null,d=0,p=null;function f(m,x){e.buffers.color.setClear(m.r,m.g,m.b,x,o)}return{getClearColor:function(){return s},setClearColor:function(m,x=1){s.set(m),a=x,f(s,a)},getClearAlpha:function(){return a},setClearAlpha:function(m){a=m,f(s,a)},render:function(m,x){let g=!1,b=!0===x.isScene?x.background:null;b&&b.isTexture&&(b=t.get(b));let D=n.xr,T=D.getSession&&D.getSession();T&&"additive"===T.environmentBlendMode&&(b=null),null===b?f(s,a):b&&b.isColor&&(f(b,1),g=!0),(n.autoClear||g)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),b&&(b.isCubeTexture||306===b.mapping)?(void 0===c&&(c=new Vo(new Wg(1,1,1),new Dp({name:"BackgroundCubeMaterial",uniforms:fb(Sd.cube.uniforms),vertexShader:Sd.cube.vertexShader,fragmentShader:Sd.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(k,Z,z){this.matrixWorld.copyPosition(z.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=b,c.material.uniforms.flipEnvMap.value=b.isCubeTexture&&!1===b.isRenderTargetTexture?-1:1,(u!==b||d!==b.version||p!==n.toneMapping)&&(c.material.needsUpdate=!0,u=b,d=b.version,p=n.toneMapping),m.unshift(c,c.geometry,c.material,0,0,null)):b&&b.isTexture&&(void 0===l&&(l=new Vo(new ZS(2,2),new Dp({name:"BackgroundMaterial",uniforms:fb(Sd.background.uniforms),vertexShader:Sd.background.vertexShader,fragmentShader:Sd.background.fragmentShader,side:0,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=b,!0===b.matrixAutoUpdate&&b.updateMatrix(),l.material.uniforms.uvTransform.value.copy(b.matrix),(u!==b||d!==b.version||p!==n.toneMapping)&&(l.material.needsUpdate=!0,u=b,d=b.version,p=n.toneMapping),m.unshift(l,l.geometry,l.material,0,0,null))}}}function PWe(n,t,e,i){let r=n.getParameter(34921),o=i.isWebGL2?null:t.get("OES_vertex_array_object"),s=i.isWebGL2||null!==o,a={},l=m(null),c=l;function p(q){return i.isWebGL2?n.bindVertexArray(q):o.bindVertexArrayOES(q)}function h(q){return i.isWebGL2?n.deleteVertexArray(q):o.deleteVertexArrayOES(q)}function m(q){let K=[],de=[],Y=[];for(let ae=0;ae<r;ae++)K[ae]=0,de[ae]=0,Y[ae]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:K,enabledAttributes:de,attributeDivisors:Y,object:q,attributes:{},index:null}}function b(){let q=c.newAttributes;for(let K=0,de=q.length;K<de;K++)q[K]=0}function D(q){T(q,0)}function T(q,K){let Y=c.enabledAttributes,ae=c.attributeDivisors;c.newAttributes[q]=1,0===Y[q]&&(n.enableVertexAttribArray(q),Y[q]=1),ae[q]!==K&&((i.isWebGL2?n:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](q,K),ae[q]=K)}function k(){let q=c.newAttributes,K=c.enabledAttributes;for(let de=0,Y=K.length;de<Y;de++)K[de]!==q[de]&&(n.disableVertexAttribArray(de),K[de]=0)}function Z(q,K,de,Y,ae,le){!0!==i.isWebGL2||5124!==de&&5125!==de?n.vertexAttribPointer(q,K,de,Y,ae,le):n.vertexAttribIPointer(q,K,de,ae,le)}function w(){F(),c!==l&&(c=l,p(c.object))}function F(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(q,K,de,Y,ae){let le=!1;if(s){let Ie=function(q,K,de){let Y=!0===de.wireframe,ae=a[q.id];void 0===ae&&(ae={},a[q.id]=ae);let le=ae[K.id];void 0===le&&(le={},ae[K.id]=le);let Ie=le[Y];return void 0===Ie&&(Ie=m(i.isWebGL2?n.createVertexArray():o.createVertexArrayOES()),le[Y]=Ie),Ie}(Y,de,K);c!==Ie&&(c=Ie,p(c.object)),le=function(q,K){let de=c.attributes,Y=q.attributes,ae=0;for(let le in Y){let Ie=de[le],ve=Y[le];if(void 0===Ie||Ie.attribute!==ve||Ie.data!==ve.data)return!0;ae++}return c.attributesNum!==ae||c.index!==K}(Y,ae),le&&function(q,K){let de={},Y=q.attributes,ae=0;for(let le in Y){let Ie=Y[le],ve={};ve.attribute=Ie,Ie.data&&(ve.data=Ie.data),de[le]=ve,ae++}c.attributes=de,c.attributesNum=ae,c.index=K}(Y,ae)}else{let Ie=!0===K.wireframe;(c.geometry!==Y.id||c.program!==de.id||c.wireframe!==Ie)&&(c.geometry=Y.id,c.program=de.id,c.wireframe=Ie,le=!0)}!0===q.isInstancedMesh&&(le=!0),null!==ae&&e.update(ae,34963),le&&(function(q,K,de,Y){if(!1===i.isWebGL2&&(q.isInstancedMesh||Y.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;b();let ae=Y.attributes,le=de.getAttributes(),Ie=K.defaultAttributeValues;for(let ve in le){let De=le[ve];if(De.location>=0){let nt=ae[ve];if(void 0===nt&&("instanceMatrix"===ve&&q.instanceMatrix&&(nt=q.instanceMatrix),"instanceColor"===ve&&q.instanceColor&&(nt=q.instanceColor)),void 0!==nt){let gt=nt.normalized,Ue=nt.itemSize,Ae=e.get(nt);if(void 0===Ae)continue;let tn=Ae.buffer,pt=Ae.type,wt=Ae.bytesPerElement;if(nt.isInterleavedBufferAttribute){let Te=nt.data,xt=Te.stride,mt=nt.offset;if(Te&&Te.isInstancedInterleavedBuffer){for(let ce=0;ce<De.locationSize;ce++)T(De.location+ce,Te.meshPerAttribute);!0!==q.isInstancedMesh&&void 0===Y._maxInstanceCount&&(Y._maxInstanceCount=Te.meshPerAttribute*Te.count)}else for(let ce=0;ce<De.locationSize;ce++)D(De.location+ce);n.bindBuffer(34962,tn);for(let ce=0;ce<De.locationSize;ce++)Z(De.location+ce,Ue/De.locationSize,pt,gt,xt*wt,(mt+Ue/De.locationSize*ce)*wt)}else{if(nt.isInstancedBufferAttribute){for(let Te=0;Te<De.locationSize;Te++)T(De.location+Te,nt.meshPerAttribute);!0!==q.isInstancedMesh&&void 0===Y._maxInstanceCount&&(Y._maxInstanceCount=nt.meshPerAttribute*nt.count)}else for(let Te=0;Te<De.locationSize;Te++)D(De.location+Te);n.bindBuffer(34962,tn);for(let Te=0;Te<De.locationSize;Te++)Z(De.location+Te,Ue/De.locationSize,pt,gt,Ue*wt,Ue/De.locationSize*Te*wt)}}else if(void 0!==Ie){let gt=Ie[ve];if(void 0!==gt)switch(gt.length){case 2:n.vertexAttrib2fv(De.location,gt);break;case 3:n.vertexAttrib3fv(De.location,gt);break;case 4:n.vertexAttrib4fv(De.location,gt);break;default:n.vertexAttrib1fv(De.location,gt)}}}}k()}(q,K,de,Y),null!==ae&&n.bindBuffer(34963,e.get(ae).buffer))},reset:w,resetDefaultState:F,dispose:function(){w();for(let q in a){let K=a[q];for(let de in K){let Y=K[de];for(let ae in Y)h(Y[ae].object),delete Y[ae];delete K[de]}delete a[q]}},releaseStatesOfGeometry:function(q){if(void 0===a[q.id])return;let K=a[q.id];for(let de in K){let Y=K[de];for(let ae in Y)h(Y[ae].object),delete Y[ae];delete K[de]}delete a[q.id]},releaseStatesOfProgram:function(q){for(let K in a){let de=a[K];if(void 0===de[q.id])continue;let Y=de[q.id];for(let ae in Y)h(Y[ae].object),delete Y[ae];delete de[q.id]}},initAttributes:b,enableAttribute:D,disableUnusedAttributes:k}}function RWe(n,t,e,i){let o,r=i.isWebGL2;this.setMode=function(c){o=c},this.render=function(c,u){n.drawArrays(o,c,u),e.update(u,o,1)},this.renderInstances=function(c,u,d){if(0===d)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,u,d),e.update(u,o,d)}}function OWe(n,t,e){let i;function o(z){if("highp"===z){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";z="mediump"}return"mediump"===z&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&n instanceof WebGL2ComputeRenderingContext,a=void 0!==e.precision?e.precision:"highp",l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);let c=s||t.has("WEBGL_draw_buffers"),u=!0===e.logarithmicDepthBuffer,d=n.getParameter(34930),p=n.getParameter(35660),h=n.getParameter(3379),f=n.getParameter(34076),m=n.getParameter(34921),x=n.getParameter(36347),g=n.getParameter(36348),b=n.getParameter(36349),D=p>0,T=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let z=t.get("EXT_texture_filter_anisotropic");i=n.getParameter(z.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:p,maxTextureSize:h,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:x,maxVaryings:g,maxFragmentUniforms:b,vertexTextures:D,floatFragmentTextures:T,floatVertexTextures:D&&T,maxSamples:s?n.getParameter(36183):0}}function kWe(n){let t=this,e=null,i=0,r=!1,o=!1,s=new uu,a=new Jo,l={value:null,needsUpdate:!1};function c(){l.value!==e&&(l.value=e,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function u(d,p,h,f){let m=null!==d?d.length:0,x=null;if(0!==m){if(x=l.value,!0!==f||null===x){let g=h+4*m,b=p.matrixWorldInverse;a.getNormalMatrix(b),(null===x||x.length<g)&&(x=new Float32Array(g));for(let D=0,T=h;D!==m;++D,T+=4)s.copy(d[D]).applyMatrix4(b,a),s.normal.toArray(x,T),x[T+3]=s.constant}l.value=x,l.needsUpdate=!0}return t.numPlanes=m,t.numIntersection=0,x}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p,h){let f=0!==d.length||p||0!==i||r;return r=p,e=u(d,h,0),i=d.length,f},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(d,p,h){let f=d.clippingPlanes,m=d.clipIntersection,x=d.clipShadows,g=n.get(d);if(!r||null===f||0===f.length||o&&!x)o?u(null):c();else{let b=o?0:i,D=4*b,T=g.clippingState||null;l.value=T,T=u(f,p,D,h);for(let k=0;k!==D;++k)T[k]=e[k];g.clippingState=T,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=b}}}function FWe(n){let t=new WeakMap;function e(s,a){return 303===a?s.mapping=301:304===a&&(s.mapping=302),s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let l=t.get(a);void 0!==l&&(t.delete(a),l.dispose())}return{get:function(s){if(s&&s.isTexture&&!1===s.isRenderTargetTexture){let a=s.mapping;if(303===a||304===a){if(t.has(s))return e(t.get(s).texture,s.mapping);{let l=s.image;if(l&&l.height>0){let c=new ck(l.height/2);return c.fromEquirectangularTexture(n,s),t.set(s,c),s.addEventListener("dispose",r),e(c.texture,s.mapping)}return null}}}return s},dispose:function(){t=new WeakMap}}}Sd.physical={uniforms:js([Sd.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new at(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new vn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new at},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new vn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new vn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Di.meshphysical_vert,fragmentShader:Di.meshphysical_frag};var qg=class extends QS{constructor(t=-1,e=1,i=1,r=-1,o=.1,s=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=s,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,s){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=s,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,s=i+t,a=r+e,l=r-e;if(null!==this.view&&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,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,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}};qg.prototype.isOrthographicCamera=!0;var _b=class extends Dp{constructor(t){super(t),this.type="RawShaderMaterial"}};_b.prototype.isRawShaderMaterial=!0;var wd=Math.pow(2,8),Fde=[.125,.215,.35,.446,.526,.582],Nde=5+Fde.length,Zj=new qg,{_lodPlanes:RS,_sizeLods:kue,_sigmas:HO}=NWe(),Fue=new vn,Jj=null,Hg=(1+Math.sqrt(5))/2,$y=1/Hg,Nue=[new ie(1,1,1),new ie(-1,1,1),new ie(1,1,-1),new ie(-1,1,-1),new ie(0,Hg,$y),new ie(0,Hg,-$y),new ie($y,0,Hg),new ie(-$y,0,Hg),new ie(Hg,$y,0),new ie(-Hg,$y,0)],uk=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=function(n){let t=new Float32Array(20),e=new ie(0,1,0);return new _b({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:0,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,i=.1,r=100){Jj=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=Vue(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=Bue(),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<RS.length;t++)RS[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(Jj),t.scissorTest=!1,UO(t,0,0,t.width,t.height)}_fromTexture(t,e){Jj=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:Gs,minFilter:Gs,generateMipmaps:!1,type:lb,format:ga,encoding:bf,depthBuffer:!1},i=Lue(e);return i.depthBuffer=!t,null===this._pingPongRenderTarget&&(this._pingPongRenderTarget=Lue(e)),i}_compileMaterial(t){let e=new Vo(RS[0],t);this._renderer.compile(e,Zj)}_sceneToCubeUV(t,e,i,r){let a=new Ws(90,1,e,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,d=u.autoClear,p=u.toneMapping;u.getClearColor(Fue),u.toneMapping=0,u.autoClear=!1;let h=new Gg({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),f=new Vo(new Wg,h),m=!1,x=t.background;x?x.isColor&&(h.color.copy(x),t.background=null,m=!0):(h.color.copy(Fue),m=!0);for(let g=0;g<6;g++){let b=g%3;0===b?(a.up.set(0,l[g],0),a.lookAt(c[g],0,0)):1===b?(a.up.set(0,0,l[g]),a.lookAt(0,c[g],0)):(a.up.set(0,l[g],0),a.lookAt(0,0,c[g])),UO(r,b*wd,g>2?wd:0,wd,wd),u.setRenderTarget(r),m&&u.render(f,a),u.render(t,a)}f.geometry.dispose(),f.material.dispose(),u.toneMapping=p,u.autoClear=d,t.background=x}_textureToCubeUV(t,e){let i=this._renderer,r=301===t.mapping||302===t.mapping;r?(null===this._cubemapShader&&(this._cubemapShader=Vue()),this._cubemapShader.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectShader&&(this._equirectShader=Bue());let o=r?this._cubemapShader:this._equirectShader,s=new Vo(RS[0],o),a=o.uniforms;a.envMap.value=t,r||a.texelSize.value.set(1/t.image.width,1/t.image.height),UO(e,0,0,3*wd,2*wd),i.setRenderTarget(e),i.render(s,Zj)}_applyPMREM(t){let e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let r=1;r<Nde;r++){let o=Math.sqrt(HO[r]*HO[r]-HO[r-1]*HO[r-1]);this._blur(t,r-1,r,o,Nue[(r-1)%Nue.length])}e.autoClear=i}_blur(t,e,i,r,o){let s=this._pingPongRenderTarget;this._halfBlur(t,s,e,i,r,"latitudinal",o),this._halfBlur(s,t,i,i,r,"longitudinal",o)}_halfBlur(t,e,i,r,o,s,a){let l=this._renderer,c=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&console.error("blur direction must be either latitudinal or longitudinal!");let d=new Vo(RS[r],c),p=c.uniforms,h=kue[i]-1,f=isFinite(o)?Math.PI/(2*h):2*Math.PI/39,m=o/f,x=isFinite(o)?1+Math.floor(3*m):20;x>20&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${x} samples when the maximum is set to 20`);let g=[],b=0;for(let Z=0;Z<20;++Z){let z=Z/m,fe=Math.exp(-z*z/2);g.push(fe),0===Z?b+=fe:Z<x&&(b+=2*fe)}for(let Z=0;Z<g.length;Z++)g[Z]=g[Z]/b;p.envMap.value=t.texture,p.samples.value=x,p.weights.value=g,p.latitudinal.value="latitudinal"===s,a&&(p.poleAxis.value=a),p.dTheta.value=f,p.mipInt.value=8-i;let D=kue[r];UO(e,3*Math.max(0,wd-2*D),(0===r?0:2*wd)+2*D*(r>4?r-8+4:0),3*D,2*D),l.setRenderTarget(e),l.render(d,Zj)}};function NWe(){let n=[],t=[],e=[],i=8;for(let r=0;r<Nde;r++){let o=Math.pow(2,i);t.push(o);let s=1/o;r>4?s=Fde[r-8+4-1]:0===r&&(s=0),e.push(s);let a=1/(o-1),l=-a/2,c=1+a/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],d=6,p=6,h=3,f=2,m=1,x=new Float32Array(h*p*d),g=new Float32Array(f*p*d),b=new Float32Array(m*p*d);for(let T=0;T<d;T++){let k=T%3*2/3-1,Z=T>2?0:-1;x.set([k,Z,0,k+2/3,Z,0,k+2/3,Z+1,0,k,Z,0,k+2/3,Z+1,0,k,Z+1,0],h*p*T),g.set(u,f*p*T),b.set([T,T,T,T,T,T],m*p*T)}let D=new nr;D.setAttribute("position",new Yr(x,h)),D.setAttribute("uv",new Yr(g,f)),D.setAttribute("faceIndex",new Yr(b,m)),n.push(D),i>4&&i--}return{_lodPlanes:n,_sizeLods:t,_sigmas:e}}function Lue(n){let t=new Wa(3*wd,3*wd,n);return t.texture.mapping=306,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function UO(n,t,e,i,r){n.viewport.set(t,e,i,r),n.scissor.set(t,e,i,r)}function Bue(){let n=new at(1,1);return new _b({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:0,depthTest:!1,depthWrite:!1})}function Vue(){return new _b({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:0,depthTest:!1,depthWrite:!1})}function BWe(n){let t=new WeakMap,e=null;function o(a){let l=a.target;l.removeEventListener("dispose",o);let c=t.get(l);void 0!==c&&(t.delete(l),c.dispose())}return{get:function(a){if(a&&a.isTexture){let l=a.mapping,c=303===l||304===l,u=301===l||302===l;if(c||u){if(a.isRenderTargetTexture&&!0===a.needsPMREMUpdate){a.needsPMREMUpdate=!1;let d=t.get(a);return null===e&&(e=new uk(n)),d=c?e.fromEquirectangular(a,d):e.fromCubemap(a,d),t.set(a,d),d.texture}if(t.has(a))return t.get(a).texture;{let d=a.image;if(c&&d&&d.height>0||u&&d&&function(a){let l=0;for(let u=0;u<6;u++)void 0!==a[u]&&l++;return 6===l}(d)){null===e&&(e=new uk(n));let p=c?e.fromEquirectangular(a):e.fromCubemap(a);return t.set(a,p),a.addEventListener("dispose",o),p.texture}return null}}}return a},dispose:function(){t=new WeakMap,null!==e&&(e.dispose(),e=null)}}}function VWe(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 HWe(n,t,e,i){let r={},o=new WeakMap;function s(d){let p=d.target;null!==p.index&&t.remove(p.index);for(let f in p.attributes)t.remove(p.attributes[f]);p.removeEventListener("dispose",s),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(d){let p=[],h=d.index,f=d.attributes.position,m=0;if(null!==h){let b=h.array;m=h.version;for(let D=0,T=b.length;D<T;D+=3){let k=b[D+0],Z=b[D+1],z=b[D+2];p.push(k,Z,Z,z,z,k)}}else{m=f.version;for(let D=0,T=f.array.length/3-1;D<T;D+=3){let k=D+0,Z=D+1,z=D+2;p.push(k,Z,Z,z,z,k)}}let x=new(Ode(p)?lk:ak)(p,1);x.version=m;let g=o.get(d);g&&t.remove(g),o.set(d,x)}return{get:function(d,p){return!0===r[p.id]||(p.addEventListener("dispose",s),r[p.id]=!0,e.memory.geometries++),p},update:function(d){let p=d.attributes;for(let f in p)t.update(p[f],34962);let h=d.morphAttributes;for(let f in h){let m=h[f];for(let x=0,g=m.length;x<g;x++)t.update(m[x],34962)}},getWireframeAttribute:function(d){let p=o.get(d);if(p){let h=d.index;null!==h&&p.version<h.version&&c(d)}else c(d);return o.get(d)}}}function UWe(n,t,e,i){let o,a,l,r=i.isWebGL2;this.setMode=function(p){o=p},this.setIndex=function(p){a=p.type,l=p.bytesPerElement},this.render=function(p,h){n.drawElements(o,h,a,p*l),e.update(h,o,1)},this.renderInstances=function(p,h,f){if(0===f)return;let m,x;if(r)m=n,x="drawElementsInstanced";else if(m=t.get("ANGLE_instanced_arrays"),x="drawElementsInstancedANGLE",null===m)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");m[x](o,h,a,p*l,f),e.update(h,o,f)}}function zWe(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,s,a){switch(e.calls++,s){case 4:e.triangles+=a*(o/3);break;case 1:e.lines+=a*(o/2);break;case 3:e.lines+=a*(o-1);break;case 2:e.lines+=a*o;break;case 0:e.points+=a*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",s)}}}}var JS=class extends Ho{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=Zo,this.minFilter=Zo,this.wrapR=El,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};function jWe(n,t){return n[0]-t[0]}function GWe(n,t){return Math.abs(t[1])-Math.abs(n[1])}function Hue(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 WWe(n,t,e){let i={},r=new Float32Array(8),o=new WeakMap,s=new ie,a=[];for(let c=0;c<8;c++)a[c]=[c,0];return{update:function(c,u,d,p){let h=c.morphTargetInfluences;if(!0===t.isWebGL2){let f=u.morphAttributes.position.length,m=o.get(u);if(void 0===m||m.count!==f){let F=function(){he.dispose(),o.delete(u),u.removeEventListener("dispose",F)};void 0!==m&&m.texture.dispose();let b=void 0!==u.morphAttributes.normal,D=u.morphAttributes.position,T=u.morphAttributes.normal||[],Z=!0===b?2:1,z=u.attributes.position.count*Z,fe=1;z>t.maxTextureSize&&(fe=Math.ceil(z/t.maxTextureSize),z=t.maxTextureSize);let ue=new Float32Array(z*fe*4*f),he=new JS(ue,z,fe,f);he.format=ga,he.type=Ug,he.needsUpdate=!0;let w=4*Z;for(let q=0;q<f;q++){let K=D[q],de=T[q],Y=z*fe*4*q;for(let ae=0;ae<K.count;ae++){s.fromBufferAttribute(K,ae),!0===K.normalized&&Hue(s,K);let le=ae*w;ue[Y+le+0]=s.x,ue[Y+le+1]=s.y,ue[Y+le+2]=s.z,ue[Y+le+3]=0,!0===b&&(s.fromBufferAttribute(de,ae),!0===de.normalized&&Hue(s,de),ue[Y+le+4]=s.x,ue[Y+le+5]=s.y,ue[Y+le+6]=s.z,ue[Y+le+7]=0)}}m={count:f,texture:he,size:new at(z,fe)},o.set(u,m),u.addEventListener("dispose",F)}let x=0;for(let b=0;b<h.length;b++)x+=h[b];let g=u.morphTargetsRelative?1:1-x;p.getUniforms().setValue(n,"morphTargetBaseInfluence",g),p.getUniforms().setValue(n,"morphTargetInfluences",h),p.getUniforms().setValue(n,"morphTargetsTexture",m.texture,e),p.getUniforms().setValue(n,"morphTargetsTextureSize",m.size)}else{let f=void 0===h?0:h.length,m=i[u.id];if(void 0===m||m.length!==f){m=[];for(let T=0;T<f;T++)m[T]=[T,0];i[u.id]=m}for(let T=0;T<f;T++){let k=m[T];k[0]=T,k[1]=h[T]}m.sort(GWe);for(let T=0;T<8;T++)T<f&&m[T][1]?(a[T][0]=m[T][0],a[T][1]=m[T][1]):(a[T][0]=Number.MAX_SAFE_INTEGER,a[T][1]=0);a.sort(jWe);let x=u.morphAttributes.position,g=u.morphAttributes.normal,b=0;for(let T=0;T<8;T++){let k=a[T],Z=k[0],z=k[1];Z!==Number.MAX_SAFE_INTEGER&&z?(x&&u.getAttribute("morphTarget"+T)!==x[Z]&&u.setAttribute("morphTarget"+T,x[Z]),g&&u.getAttribute("morphNormal"+T)!==g[Z]&&u.setAttribute("morphNormal"+T,g[Z]),r[T]=z,b+=z):(x&&!0===u.hasAttribute("morphTarget"+T)&&u.deleteAttribute("morphTarget"+T),g&&!0===u.hasAttribute("morphNormal"+T)&&u.deleteAttribute("morphNormal"+T),r[T]=0)}let D=u.morphTargetsRelative?1:1-b;p.getUniforms().setValue(n,"morphTargetBaseInfluence",D),p.getUniforms().setValue(n,"morphTargetInfluences",r)}}}}function qWe(n,t,e,i){let r=new WeakMap;function a(l){let c=l.target;c.removeEventListener("dispose",a),e.remove(c.instanceMatrix),null!==c.instanceColor&&e.remove(c.instanceColor)}return{update:function(l){let c=i.render.frame,d=t.get(l,l.geometry);return r.get(d)!==c&&(t.update(d),r.set(d,c)),l.isInstancedMesh&&(!1===l.hasEventListener("dispose",a)&&l.addEventListener("dispose",a),e.update(l.instanceMatrix,34962),null!==l.instanceColor&&e.update(l.instanceColor,34962)),d},dispose:function(){r=new WeakMap}}}JS.prototype.isDataTexture2DArray=!0;var dk=class extends Ho{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=Zo,this.minFilter=Zo,this.wrapR=El,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};dk.prototype.isDataTexture3D=!0;var Lde=new Ho,Bde=new JS,Vde=new dk,Hde=new mb,Uue=[],zue=[],jue=new Float32Array(16),Gue=new Float32Array(9),Wue=new Float32Array(4);function Eb(n,t,e){let i=n[0];if(i<=0||i>0)return n;let r=t*e,o=Uue[r];if(void 0===o&&(o=new Float32Array(r),Uue[r]=o),0!==t){i.toArray(o,0);for(let s=1,a=0;s!==t;++s)a+=e,n[s].toArray(o,a)}return o}function _a(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 Ys(n,t){for(let e=0,i=t.length;e<i;e++)n[e]=t[e]}function kk(n,t){let e=zue[t];void 0===e&&(e=new Int32Array(t),zue[t]=e);for(let i=0;i!==t;++i)e[i]=n.allocateTextureUnit();return e}function YWe(n,t){let e=this.cache;e[0]!==t&&(n.uniform1f(this.addr,t),e[0]=t)}function XWe(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(_a(e,t))return;n.uniform2fv(this.addr,t),Ys(e,t)}}function QWe(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(_a(e,t))return;n.uniform3fv(this.addr,t),Ys(e,t)}}function KWe(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(_a(e,t))return;n.uniform4fv(this.addr,t),Ys(e,t)}}function ZWe(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_a(e,t))return;n.uniformMatrix2fv(this.addr,!1,t),Ys(e,t)}else{if(_a(e,i))return;Wue.set(i),n.uniformMatrix2fv(this.addr,!1,Wue),Ys(e,i)}}function JWe(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_a(e,t))return;n.uniformMatrix3fv(this.addr,!1,t),Ys(e,t)}else{if(_a(e,i))return;Gue.set(i),n.uniformMatrix3fv(this.addr,!1,Gue),Ys(e,i)}}function $We(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_a(e,t))return;n.uniformMatrix4fv(this.addr,!1,t),Ys(e,t)}else{if(_a(e,i))return;jue.set(i),n.uniformMatrix4fv(this.addr,!1,jue),Ys(e,i)}}function e7e(n,t){let e=this.cache;e[0]!==t&&(n.uniform1i(this.addr,t),e[0]=t)}function t7e(n,t){let e=this.cache;_a(e,t)||(n.uniform2iv(this.addr,t),Ys(e,t))}function n7e(n,t){let e=this.cache;_a(e,t)||(n.uniform3iv(this.addr,t),Ys(e,t))}function i7e(n,t){let e=this.cache;_a(e,t)||(n.uniform4iv(this.addr,t),Ys(e,t))}function r7e(n,t){let e=this.cache;e[0]!==t&&(n.uniform1ui(this.addr,t),e[0]=t)}function o7e(n,t){let e=this.cache;_a(e,t)||(n.uniform2uiv(this.addr,t),Ys(e,t))}function s7e(n,t){let e=this.cache;_a(e,t)||(n.uniform3uiv(this.addr,t),Ys(e,t))}function a7e(n,t){let e=this.cache;_a(e,t)||(n.uniform4uiv(this.addr,t),Ys(e,t))}function l7e(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTexture2D(t||Lde,r)}function c7e(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture3D(t||Vde,r)}function u7e(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTextureCube(t||Hde,r)}function d7e(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture2DArray(t||Bde,r)}function h7e(n,t){n.uniform1fv(this.addr,t)}function f7e(n,t){let e=Eb(t,this.size,2);n.uniform2fv(this.addr,e)}function m7e(n,t){let e=Eb(t,this.size,3);n.uniform3fv(this.addr,e)}function g7e(n,t){let e=Eb(t,this.size,4);n.uniform4fv(this.addr,e)}function _7e(n,t){let e=Eb(t,this.size,4);n.uniformMatrix2fv(this.addr,!1,e)}function v7e(n,t){let e=Eb(t,this.size,9);n.uniformMatrix3fv(this.addr,!1,e)}function y7e(n,t){let e=Eb(t,this.size,16);n.uniformMatrix4fv(this.addr,!1,e)}function b7e(n,t){n.uniform1iv(this.addr,t)}function x7e(n,t){n.uniform2iv(this.addr,t)}function C7e(n,t){n.uniform3iv(this.addr,t)}function M7e(n,t){n.uniform4iv(this.addr,t)}function w7e(n,t){n.uniform1uiv(this.addr,t)}function S7e(n,t){n.uniform2uiv(this.addr,t)}function E7e(n,t){n.uniform3uiv(this.addr,t)}function T7e(n,t){n.uniform4uiv(this.addr,t)}function D7e(n,t,e){let i=t.length,r=kk(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTexture2D(t[o]||Lde,r[o])}function A7e(n,t,e){let i=t.length,r=kk(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture3D(t[o]||Vde,r[o])}function I7e(n,t,e){let i=t.length,r=kk(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTextureCube(t[o]||Hde,r[o])}function P7e(n,t,e){let i=t.length,r=kk(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture2DArray(t[o]||Bde,r[o])}function O7e(n,t,e){this.id=n,this.addr=e,this.cache=[],this.setValue=function(n){switch(n){case 5126:return YWe;case 35664:return XWe;case 35665:return QWe;case 35666:return KWe;case 35674:return ZWe;case 35675:return JWe;case 35676:return $We;case 5124:case 35670:return e7e;case 35667:case 35671:return t7e;case 35668:case 35672:return n7e;case 35669:case 35673:return i7e;case 5125:return r7e;case 36294:return o7e;case 36295:return s7e;case 36296:return a7e;case 35678:case 36198:case 36298:case 36306:case 35682:return l7e;case 35679:case 36299:case 36307:return c7e;case 35680:case 36300:case 36308:case 36293:return u7e;case 36289:case 36303:case 36311:case 36292:return d7e}}(t.type)}function Ude(n,t,e){this.id=n,this.addr=e,this.cache=[],this.size=t.size,this.setValue=function(n){switch(n){case 5126:return h7e;case 35664:return f7e;case 35665:return m7e;case 35666:return g7e;case 35674:return _7e;case 35675:return v7e;case 35676:return y7e;case 5124:case 35670:return b7e;case 35667:case 35671:return x7e;case 35668:case 35672:return C7e;case 35669:case 35673:return M7e;case 5125:return w7e;case 36294:return S7e;case 36295:return E7e;case 36296:return T7e;case 35678:case 36198:case 36298:case 36306:case 35682:return D7e;case 35679:case 36299:case 36307:return A7e;case 35680:case 36300:case 36308:case 36293:return I7e;case 36289:case 36303:case 36311:case 36292:return P7e}}(t.type)}function zde(n){this.id=n,this.seq=[],this.map={}}Ude.prototype.updateCache=function(n){let t=this.cache;n instanceof Float32Array&&t.length!==n.length&&(this.cache=new Float32Array(n.length)),Ys(t,n)},zde.prototype.setValue=function(n,t,e){let i=this.seq;for(let r=0,o=i.length;r!==o;++r){let s=i[r];s.setValue(n,t[s.id],e)}};var $j=/(\w+)(\])?(\[|\.)?/g;function que(n,t){n.seq.push(t),n.map[t.id]=t}function k7e(n,t,e){let i=n.name,r=i.length;for($j.lastIndex=0;;){let o=$j.exec(i),s=$j.lastIndex,a=o[1],c=o[3];if("]"===o[2]&&(a|=0),void 0===c||"["===c&&s+2===r){que(e,void 0===c?new O7e(a,n,t):new Ude(a,n,t));break}{let d=e.map[a];void 0===d&&(d=new zde(a),que(e,d)),e=d}}}function yf(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);k7e(r,n.getUniformLocation(t,r.name),this)}}function Yue(n,t,e){let i=n.createShader(t);return n.shaderSource(i,e),n.compileShader(i),i}yf.prototype.setValue=function(n,t,e,i){let r=this.map[t];void 0!==r&&r.setValue(n,e,i)},yf.prototype.setOptional=function(n,t,e){let i=t[e];void 0!==i&&this.setValue(n,e,i)},yf.upload=function(n,t,e,i){for(let r=0,o=t.length;r!==o;++r){let s=t[r],a=e[s.id];!1!==a.needsUpdate&&s.setValue(n,a.value,i)}},yf.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 F7e=0;function Xue(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 B7e(n,t){let e=function(n){switch(n){case bf:return["Linear","( value )"];case Wr: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 V7e(n,t){let e;switch(t){case 1:e="Linear";break;case 2:e="Reinhard";break;case 3:e="OptimizedCineon";break;case 4:e="ACESFilmic";break;case 5:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+n+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function VS(n){return""!==n}function Que(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 Kue(n,t){return n.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var j7e=/^[ \t]*#include +<([\w\d./]+)>/gm;function g8(n){return n.replace(j7e,G7e)}function G7e(n,t){let e=Di[t];if(void 0===e)throw new Error("Can not resolve #include <"+t+">");return g8(e)}var W7e=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,q7e=/#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 Zue(n){return n.replace(q7e,jde).replace(W7e,Y7e)}function Y7e(n,t,e,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jde(0,t,e,i)}function jde(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 Jue(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 J7e(n,t,e,i){let m,x,r=n.getContext(),o=e.defines,s=e.vertexShader,a=e.fragmentShader,l=function(n){let t="SHADOWMAP_TYPE_BASIC";return 1===n.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===n.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===n.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(e),c=function(n){let t="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(e),u=function(n){let t="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(e),d=function(n){let t="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2: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(VS).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),f=r.createProgram(),g=e.glslVersion?"#version "+e.glslVersion+"\n":"";e.isRawShaderMaterial?(m=[h].filter(VS).join("\n"),m.length>0&&(m+="\n"),x=[p,h].filter(VS).join("\n"),x.length>0&&(x+="\n")):(m=[Jue(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 "+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.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(VS).join("\n"),x=[p,Jue(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 "+u:"",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.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;",0!==e.toneMapping?"#define TONE_MAPPING":"",0!==e.toneMapping?Di.tonemapping_pars_fragment:"",0!==e.toneMapping?V7e("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.alphaWrite?"":"#define OPAQUE",Di.encodings_pars_fragment,B7e("linearToOutputTexel",e.outputEncoding),e.depthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(VS).join("\n")),s=g8(s),s=Que(s,e),s=Kue(s,e),a=g8(a),a=Que(a,e),a=Kue(a,e),s=Zue(s),a=Zue(a),e.isWebGL2&&!0!==e.isRawShaderMaterial&&(g="#version 300 es\n",m=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+m,x=["#define varying in","300 es"===e.glslVersion?"":"layout(location = 0) out highp vec4 pc_fragColor;","300 es"===e.glslVersion?"":"#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"+x);let Z,z,D=g+x+a,T=Yue(r,35633,g+m+s),k=Yue(r,35632,D);if(r.attachShader(f,T),r.attachShader(f,k),void 0!==e.index0AttributeName?r.bindAttribLocation(f,0,e.index0AttributeName):!0===e.morphTargets&&r.bindAttribLocation(f,0,"position"),r.linkProgram(f),n.debug.checkShaderErrors){let fe=r.getProgramInfoLog(f).trim(),ue=r.getShaderInfoLog(T).trim(),he=r.getShaderInfoLog(k).trim(),w=!0,F=!0;if(!1===r.getProgramParameter(f,35714)){w=!1;let q=Xue(r,T,"vertex"),K=Xue(r,k,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(f,35715)+"\n\nProgram Info Log: "+fe+"\n"+q+"\n"+K)}else""!==fe?console.warn("THREE.WebGLProgram: Program Info Log:",fe):(""===ue||""===he)&&(F=!1);F&&(this.diagnostics={runnable:w,programLog:fe,vertexShader:{log:ue,prefix:m},fragmentShader:{log:he,prefix:x}})}return r.deleteShader(T),r.deleteShader(k),this.getUniforms=function(){return void 0===Z&&(Z=new yf(r,f)),Z},this.getAttributes=function(){return void 0===z&&(z=function(n,t){let e={},i=n.getProgramParameter(t,35721);for(let r=0;r<i;r++){let o=n.getActiveAttrib(t,r),s=o.name,a=1;35674===o.type&&(a=2),35675===o.type&&(a=3),35676===o.type&&(a=4),e[s]={type:o.type,location:n.getAttribLocation(t,s),locationSize:a}}return e}(r,f)),z},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(f),this.program=void 0},this.name=e.shaderName,this.id=F7e++,this.cacheKey=t,this.usedTimes=1,this.program=f,this.vertexShader=T,this.fragmentShader=k,this}var $7e=0;function e9e(n,t,e,i,r,o,s){let a=new sk,l=new 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),s=this._getShaderCacheForMaterial(t);return!1===s.has(r)&&(s.add(r),r.usedTimes++),!1===s.has(o)&&(s.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 class{constructor(){this.id=$7e++,this.usedTimes=0}};e.set(t,i)}return e.get(t)}},c=[],u=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.floatVertexTextures,h=r.maxVertexUniforms,f=r.vertexTextures,m=r.precision,x={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(w,F,q,K,de){let De,nt,gt,Ue,Y=K.fog,le=(w.isMeshStandardMaterial?e:t).get(w.envMap||(w.isMeshStandardMaterial?K.environment:null)),Ie=x[w.type],ve=de.isSkinnedMesh?function(w){let q=w.skeleton.bones;if(p)return 1024;{let de=Math.floor((h-20)/4),Y=Math.min(de,q.length);return Y<q.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+q.length+" bones. This GPU supports "+Y+"."),0):Y}}(de):0;if(null!==w.precision&&(m=r.getMaxPrecision(w.precision),m!==w.precision&&console.warn("THREE.WebGLProgram.getParameters:",w.precision,"not supported, using",m,"instead.")),Ie){let Te=Sd[Ie];De=Te.vertexShader,nt=Te.fragmentShader}else De=w.vertexShader,nt=w.fragmentShader,l.update(w),gt=l.getVertexShaderID(w),Ue=l.getFragmentShaderID(w);let Ae=n.getRenderTarget(),pt=w.clearcoat>0;return{isWebGL2:u,shaderID:Ie,shaderName:w.type,vertexShader:De,fragmentShader:nt,defines:w.defines,customVertexShaderID:gt,customFragmentShaderID:Ue,isRawShaderMaterial:!0===w.isRawShaderMaterial,glslVersion:w.glslVersion,precision:m,instancing:!0===de.isInstancedMesh,instancingColor:!0===de.isInstancedMesh&&null!==de.instanceColor,supportsVertexTextures:f,outputEncoding:null===Ae?n.outputEncoding:!0===Ae.isXRRenderTarget?Ae.texture.encoding:bf,map:!!w.map,matcap:!!w.matcap,envMap:!!le,envMapMode:le&&le.mapping,envMapCubeUV:!!le&&(306===le.mapping||307===le.mapping),lightMap:!!w.lightMap,aoMap:!!w.aoMap,emissiveMap:!!w.emissiveMap,bumpMap:!!w.bumpMap,normalMap:!!w.normalMap,objectSpaceNormalMap:1===w.normalMapType,tangentSpaceNormalMap:0===w.normalMapType,decodeVideoTexture:!!w.map&&!0===w.map.isVideoTexture&&w.map.encoding===Wr,clearcoat:pt,clearcoatMap:pt&&!!w.clearcoatMap,clearcoatRoughnessMap:pt&&!!w.clearcoatRoughnessMap,clearcoatNormalMap:pt&&!!w.clearcoatNormalMap,displacementMap:!!w.displacementMap,roughnessMap:!!w.roughnessMap,metalnessMap:!!w.metalnessMap,specularMap:!!w.specularMap,specularIntensityMap:!!w.specularIntensityMap,specularColorMap:!!w.specularColorMap,alphaMap:!!w.alphaMap,alphaTest:w.alphaTest>0,alphaWrite:w.alphaWrite||w.transparent,gradientMap:!!w.gradientMap,sheen:w.sheen>0,sheenColorMap:!!w.sheenColorMap,sheenRoughnessMap:!!w.sheenRoughnessMap,transmission:w.transmission>0,transmissionMap:!!w.transmissionMap,thicknessMap:!!w.thicknessMap,combine:w.combine,vertexTangents:!!w.normalMap&&!!de.geometry&&!!de.geometry.attributes.tangent,vertexColors:w.vertexColors,vertexAlphas:!0===w.vertexColors&&!!de.geometry&&!!de.geometry.attributes.color&&4===de.geometry.attributes.color.itemSize,vertexUvs:!!(w.map||w.bumpMap||w.normalMap||w.specularMap||w.alphaMap||w.emissiveMap||w.roughnessMap||w.metalnessMap||w.clearcoatMap||w.clearcoatRoughnessMap||w.clearcoatNormalMap||w.displacementMap||w.transmissionMap||w.thicknessMap||w.specularIntensityMap||w.specularColorMap||w.sheenColorMap||w.sheenRoughnessMap),uvsVertexOnly:!(w.map||w.bumpMap||w.normalMap||w.specularMap||w.alphaMap||w.emissiveMap||w.roughnessMap||w.metalnessMap||w.clearcoatNormalMap||w.transmission>0||w.transmissionMap||w.thicknessMap||w.specularIntensityMap||w.specularColorMap||w.sheen>0||w.sheenColorMap||w.sheenRoughnessMap||!w.displacementMap),fog:!!Y,useFog:w.fog,fogExp2:Y&&Y.isFogExp2,flatShading:!!w.flatShading,sizeAttenuation:w.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===de.isSkinnedMesh&&ve>0,maxBones:ve,useVertexTexture:p,morphTargets:!!de.geometry&&!!de.geometry.morphAttributes.position,morphNormals:!!de.geometry&&!!de.geometry.morphAttributes.normal,morphTargetsCount:de.geometry&&de.geometry.morphAttributes.position?de.geometry.morphAttributes.position.length:0,numDirLights:F.directional.length,numPointLights:F.point.length,numSpotLights:F.spot.length,numRectAreaLights:F.rectArea.length,numHemiLights:F.hemi.length,numDirLightShadows:F.directionalShadowMap.length,numPointLightShadows:F.pointShadowMap.length,numSpotLightShadows:F.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:w.dithering,shadowMapEnabled:n.shadowMap.enabled&&q.length>0,shadowMapType:n.shadowMap.type,toneMapping:w.toneMapped?n.toneMapping:0,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:w.premultipliedAlpha,doubleSided:2===w.side,flipSided:1===w.side,depthPacking:void 0!==w.depthPacking&&w.depthPacking,index0AttributeName:w.index0AttributeName,extensionDerivatives:w.extensions&&w.extensions.derivatives,extensionFragDepth:w.extensions&&w.extensions.fragDepth,extensionDrawBuffers:w.extensions&&w.extensions.drawBuffers,extensionShaderTextureLOD:w.extensions&&w.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:w.customProgramCacheKey()}},getProgramCacheKey:function(w){let F=[];if(w.shaderID?F.push(w.shaderID):(F.push(w.customVertexShaderID),F.push(w.customFragmentShaderID)),void 0!==w.defines)for(let q in w.defines)F.push(q),F.push(w.defines[q]);return!1===w.isRawShaderMaterial&&(function(w,F){w.push(F.precision),w.push(F.outputEncoding),w.push(F.envMapMode),w.push(F.combine),w.push(F.vertexUvs),w.push(F.fogExp2),w.push(F.sizeAttenuation),w.push(F.maxBones),w.push(F.morphTargetsCount),w.push(F.numDirLights),w.push(F.numPointLights),w.push(F.numSpotLights),w.push(F.numHemiLights),w.push(F.numRectAreaLights),w.push(F.numDirLightShadows),w.push(F.numPointLightShadows),w.push(F.numSpotLightShadows),w.push(F.shadowMapType),w.push(F.toneMapping),w.push(F.numClippingPlanes),w.push(F.numClipIntersection),w.push(F.alphaWrite)}(F,w),function(w,F){a.disableAll(),F.isWebGL2&&a.enable(0),F.supportsVertexTextures&&a.enable(1),F.instancing&&a.enable(2),F.instancingColor&&a.enable(3),F.map&&a.enable(4),F.matcap&&a.enable(5),F.envMap&&a.enable(6),F.envMapCubeUV&&a.enable(7),F.lightMap&&a.enable(8),F.aoMap&&a.enable(9),F.emissiveMap&&a.enable(10),F.bumpMap&&a.enable(11),F.normalMap&&a.enable(12),F.objectSpaceNormalMap&&a.enable(13),F.tangentSpaceNormalMap&&a.enable(14),F.clearcoat&&a.enable(15),F.clearcoatMap&&a.enable(16),F.clearcoatRoughnessMap&&a.enable(17),F.clearcoatNormalMap&&a.enable(18),F.displacementMap&&a.enable(19),F.specularMap&&a.enable(20),F.roughnessMap&&a.enable(21),F.metalnessMap&&a.enable(22),F.gradientMap&&a.enable(23),F.alphaMap&&a.enable(24),F.alphaTest&&a.enable(25),F.vertexColors&&a.enable(26),F.vertexAlphas&&a.enable(27),F.vertexUvs&&a.enable(28),F.vertexTangents&&a.enable(29),F.uvsVertexOnly&&a.enable(30),F.fog&&a.enable(31),w.push(a.mask),a.disableAll(),F.useFog&&a.enable(0),F.flatShading&&a.enable(1),F.logarithmicDepthBuffer&&a.enable(2),F.skinning&&a.enable(3),F.useVertexTexture&&a.enable(4),F.morphTargets&&a.enable(5),F.morphNormals&&a.enable(6),F.premultipliedAlpha&&a.enable(7),F.shadowMapEnabled&&a.enable(8),F.physicallyCorrectLights&&a.enable(9),F.doubleSided&&a.enable(10),F.flipSided&&a.enable(11),F.depthPacking&&a.enable(12),F.dithering&&a.enable(13),F.specularIntensityMap&&a.enable(14),F.specularColorMap&&a.enable(15),F.transmission&&a.enable(16),F.transmissionMap&&a.enable(17),F.thicknessMap&&a.enable(18),F.sheen&&a.enable(19),F.sheenColorMap&&a.enable(20),F.sheenRoughnessMap&&a.enable(21),F.decodeVideoTexture&&a.enable(22),w.push(a.mask)}(F,w),F.push(n.outputEncoding)),F.push(w.customProgramCacheKey),F.join()},getUniforms:function(w){let q,F=x[w.type];return q=F?J8e.clone(Sd[F].uniforms):w.uniforms,q},acquireProgram:function(w,F){let q;for(let K=0,de=c.length;K<de;K++){let Y=c[K];if(Y.cacheKey===F){q=Y,++q.usedTimes;break}}return void 0===q&&(q=new J7e(n,F,w,o),c.push(q)),q},releaseProgram:function(w){if(0==--w.usedTimes){let F=c.indexOf(w);c[F]=c[c.length-1],c.pop(),w.destroy()}},releaseShaderCache:function(w){l.remove(w)},programs:c,dispose:function(){l.dispose()}}}function t9e(){let n=new WeakMap;return{get:function(o){let s=n.get(o);return void 0===s&&(s={},n.set(o,s)),s},remove:function(o){n.delete(o)},update:function(o,s,a){n.get(o)[s]=a},dispose:function(){n=new WeakMap}}}function n9e(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 $ue(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 ede(){let n=[],t=0,e=[],i=[],r=[];function s(d,p,h,f,m,x){let g=n[t];return void 0===g?(g={id:d.id,object:d,geometry:p,material:h,groupOrder:f,renderOrder:d.renderOrder,z:m,group:x},n[t]=g):(g.id=d.id,g.object=d,g.geometry=p,g.material=h,g.groupOrder=f,g.renderOrder=d.renderOrder,g.z=m,g.group=x),t++,g}return{opaque:e,transmissive:i,transparent:r,init:function(){t=0,e.length=0,i.length=0,r.length=0},push:function(d,p,h,f,m,x){let g=s(d,p,h,f,m,x);h.transmission>0?i.push(g):!0===h.transparent?r.push(g):e.push(g)},unshift:function(d,p,h,f,m,x){let g=s(d,p,h,f,m,x);h.transmission>0?i.unshift(g):!0===h.transparent?r.unshift(g):e.unshift(g)},finish:function(){for(let d=t,p=n.length;d<p;d++){let h=n[d];if(null===h.id)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}},sort:function(d,p){e.length>1&&e.sort(d||n9e),i.length>1&&i.sort(p||$ue),r.length>1&&r.sort(p||$ue)}}}function i9e(){let n=new WeakMap;return{get:function(i,r){let o;return!1===n.has(i)?(o=new ede,n.set(i,[o])):r>=n.get(i).length?(o=new ede,n.get(i).push(o)):o=n.get(i)[r],o},dispose:function(){n=new WeakMap}}}function r9e(){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 ie,color:new vn};break;case"SpotLight":e={position:new ie,direction:new ie,color:new vn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new ie,color:new vn,distance:0,decay:0};break;case"HemisphereLight":e={direction:new ie,skyColor:new vn,groundColor:new vn};break;case"RectAreaLight":e={color:new vn,position:new ie,halfWidth:new ie,halfHeight:new ie}}return n[t.id]=e,e}}}var s9e=0;function a9e(n,t){return(t.castShadow?1:0)-(n.castShadow?1:0)}function l9e(n,t){let e=new r9e,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 at};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new at,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 u=0;u<9;u++)r.probe.push(new ie);let o=new ie,s=new Rn,a=new Rn;return{setup:function(u,d){let p=0,h=0,f=0;for(let ue=0;ue<9;ue++)r.probe[ue].set(0,0,0);let m=0,x=0,g=0,b=0,D=0,T=0,k=0,Z=0;u.sort(a9e);let z=!0!==d?Math.PI:1;for(let ue=0,he=u.length;ue<he;ue++){let w=u[ue],F=w.color,q=w.intensity,K=w.distance,de=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)p+=F.r*q*z,h+=F.g*q*z,f+=F.b*q*z;else if(w.isLightProbe)for(let Y=0;Y<9;Y++)r.probe[Y].addScaledVector(w.sh.coefficients[Y],q);else if(w.isDirectionalLight){let Y=e.get(w);if(Y.color.copy(w.color).multiplyScalar(w.intensity*z),w.castShadow){let ae=w.shadow,le=i.get(w);le.shadowBias=ae.bias,le.shadowNormalBias=ae.normalBias,le.shadowRadius=ae.radius,le.shadowMapSize=ae.mapSize,r.directionalShadow[m]=le,r.directionalShadowMap[m]=de,r.directionalShadowMatrix[m]=w.shadow.matrix,T++}r.directional[m]=Y,m++}else if(w.isSpotLight){let Y=e.get(w);if(Y.position.setFromMatrixPosition(w.matrixWorld),Y.color.copy(F).multiplyScalar(q*z),Y.distance=K,Y.coneCos=Math.cos(w.angle),Y.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),Y.decay=w.decay,w.castShadow){let ae=w.shadow,le=i.get(w);le.shadowBias=ae.bias,le.shadowNormalBias=ae.normalBias,le.shadowRadius=ae.radius,le.shadowMapSize=ae.mapSize,r.spotShadow[g]=le,r.spotShadowMap[g]=de,r.spotShadowMatrix[g]=w.shadow.matrix,Z++}r.spot[g]=Y,g++}else if(w.isRectAreaLight){let Y=e.get(w);Y.color.copy(F).multiplyScalar(q),Y.halfWidth.set(.5*w.width,0,0),Y.halfHeight.set(0,.5*w.height,0),r.rectArea[b]=Y,b++}else if(w.isPointLight){let Y=e.get(w);if(Y.color.copy(w.color).multiplyScalar(w.intensity*z),Y.distance=w.distance,Y.decay=w.decay,w.castShadow){let ae=w.shadow,le=i.get(w);le.shadowBias=ae.bias,le.shadowNormalBias=ae.normalBias,le.shadowRadius=ae.radius,le.shadowMapSize=ae.mapSize,le.shadowCameraNear=ae.camera.near,le.shadowCameraFar=ae.camera.far,r.pointShadow[x]=le,r.pointShadowMap[x]=de,r.pointShadowMatrix[x]=w.shadow.matrix,k++}r.point[x]=Y,x++}else if(w.isHemisphereLight){let Y=e.get(w);Y.skyColor.copy(w.color).multiplyScalar(q*z),Y.groundColor.copy(w.groundColor).multiplyScalar(q*z),r.hemi[D]=Y,D++}}b>0&&(t.isWebGL2||!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=Bt.LTC_FLOAT_1,r.rectAreaLTC2=Bt.LTC_FLOAT_2):!0===n.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Bt.LTC_HALF_1,r.rectAreaLTC2=Bt.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]=f;let fe=r.hash;(fe.directionalLength!==m||fe.pointLength!==x||fe.spotLength!==g||fe.rectAreaLength!==b||fe.hemiLength!==D||fe.numDirectionalShadows!==T||fe.numPointShadows!==k||fe.numSpotShadows!==Z)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=b,r.point.length=x,r.hemi.length=D,r.directionalShadow.length=T,r.directionalShadowMap.length=T,r.pointShadow.length=k,r.pointShadowMap.length=k,r.spotShadow.length=Z,r.spotShadowMap.length=Z,r.directionalShadowMatrix.length=T,r.pointShadowMatrix.length=k,r.spotShadowMatrix.length=Z,fe.directionalLength=m,fe.pointLength=x,fe.spotLength=g,fe.rectAreaLength=b,fe.hemiLength=D,fe.numDirectionalShadows=T,fe.numPointShadows=k,fe.numSpotShadows=Z,r.version=s9e++)},setupView:function(u,d){let p=0,h=0,f=0,m=0,x=0,g=d.matrixWorldInverse;for(let b=0,D=u.length;b<D;b++){let T=u[b];if(T.isDirectionalLight){let k=r.directional[p];k.direction.setFromMatrixPosition(T.matrixWorld),o.setFromMatrixPosition(T.target.matrixWorld),k.direction.sub(o),k.direction.transformDirection(g),p++}else if(T.isSpotLight){let k=r.spot[f];k.position.setFromMatrixPosition(T.matrixWorld),k.position.applyMatrix4(g),k.direction.setFromMatrixPosition(T.matrixWorld),o.setFromMatrixPosition(T.target.matrixWorld),k.direction.sub(o),k.direction.transformDirection(g),f++}else if(T.isRectAreaLight){let k=r.rectArea[m];k.position.setFromMatrixPosition(T.matrixWorld),k.position.applyMatrix4(g),a.identity(),s.copy(T.matrixWorld),s.premultiply(g),a.extractRotation(s),k.halfWidth.set(.5*T.width,0,0),k.halfHeight.set(0,.5*T.height,0),k.halfWidth.applyMatrix4(a),k.halfHeight.applyMatrix4(a),m++}else if(T.isPointLight){let k=r.point[h];k.position.setFromMatrixPosition(T.matrixWorld),k.position.applyMatrix4(g),h++}else if(T.isHemisphereLight){let k=r.hemi[x];k.direction.setFromMatrixPosition(T.matrixWorld),k.direction.transformDirection(g),k.direction.normalize(),x++}}},state:r}}function tde(n,t){let e=new l9e(n,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:e},setupLights:function(d){e.setup(i,d)},setupLightsView:function(d){e.setupView(i,d)},pushLight:function(d){i.push(d)},pushShadow:function(d){r.push(d)}}}function c9e(n,t){let e=new WeakMap;return{get:function(o,s=0){let a;return!1===e.has(o)?(a=new tde(n,t),e.set(o,[a])):s>=e.get(o).length?(a=new tde(n,t),e.get(o).push(a)):a=e.get(o)[s],a},dispose:function(){e=new WeakMap}}}var pk=class extends hs{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}};pk.prototype.isMeshDepthMaterial=!0;var hk=class extends hs{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new ie,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}};function Gde(n,t,e){let i=new gb,r=new at,o=new at,s=new ar,a=new pk({depthPacking:3201}),l=new hk,c={},u=e.maxTextureSize,d={0:1,1:0,2:2},p=new Dp({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new at},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"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}"}),h=p.clone();h.defines.HORIZONTAL_PASS=1;let f=new nr;f.setAttribute("position",new Yr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new Vo(f,p),x=this;function g(T,k){let Z=t.update(m);p.defines.VSM_SAMPLES!==T.blurSamples&&(p.defines.VSM_SAMPLES=T.blurSamples,h.defines.VSM_SAMPLES=T.blurSamples,p.needsUpdate=!0,h.needsUpdate=!0),p.uniforms.shadow_pass.value=T.map.texture,p.uniforms.resolution.value=T.mapSize,p.uniforms.radius.value=T.radius,n.setRenderTarget(T.mapPass),n.clear(),n.renderBufferDirect(k,null,Z,p,m,null),h.uniforms.shadow_pass.value=T.mapPass.texture,h.uniforms.resolution.value=T.mapSize,h.uniforms.radius.value=T.radius,n.setRenderTarget(T.map),n.clear(),n.renderBufferDirect(k,null,Z,h,m,null)}function b(T,k,Z,z,fe,ue,he){let w=null,F=!0===z.isPointLight?T.customDistanceMaterial:T.customDepthMaterial;if(w=void 0!==F?F:!0===z.isPointLight?l:a,n.localClippingEnabled&&!0===Z.clipShadows&&0!==Z.clippingPlanes.length||Z.displacementMap&&0!==Z.displacementScale||Z.alphaMap&&Z.alphaTest>0){let q=w.uuid,K=Z.uuid,de=c[q];void 0===de&&(de={},c[q]=de);let Y=de[K];void 0===Y&&(Y=w.clone(),de[K]=Y),w=Y}return w.visible=Z.visible,w.wireframe=Z.wireframe,w.side=3===he?null!==Z.shadowSide?Z.shadowSide:Z.side:null!==Z.shadowSide?Z.shadowSide:d[Z.side],w.alphaMap=Z.alphaMap,w.alphaTest=Z.alphaTest,w.clipShadows=Z.clipShadows,w.clippingPlanes=Z.clippingPlanes,w.clipIntersection=Z.clipIntersection,w.displacementMap=Z.displacementMap,w.displacementScale=Z.displacementScale,w.displacementBias=Z.displacementBias,w.wireframeLinewidth=Z.wireframeLinewidth,w.linewidth=Z.linewidth,!0===z.isPointLight&&!0===w.isMeshDistanceMaterial&&(w.referencePosition.setFromMatrixPosition(z.matrixWorld),w.nearDistance=fe,w.farDistance=ue),w}function D(T,k,Z,z,fe){if(!1===T.visible)return;if(T.layers.test(k.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&3===fe)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(Z.matrixWorldInverse,T.matrixWorld);let w=t.update(T),F=T.material;if(Array.isArray(F)){let q=w.groups;for(let K=0,de=q.length;K<de;K++){let Y=q[K],ae=F[Y.materialIndex];if(ae&&ae.visible){let le=b(T,0,ae,z,Z.near,Z.far,fe);n.renderBufferDirect(Z,null,w,le,T,Y)}}}else if(F.visible){let q=b(T,0,F,z,Z.near,Z.far,fe);n.renderBufferDirect(Z,null,w,q,T,null)}}let he=T.children;for(let w=0,F=he.length;w<F;w++)D(he[w],k,Z,z,fe)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(T,k,Z){if(!1===x.enabled||!1===x.autoUpdate&&!1===x.needsUpdate||0===T.length)return;let z=n.getRenderTarget(),fe=n.getActiveCubeFace(),ue=n.getActiveMipmapLevel(),he=n.state;he.setBlending(0),he.buffers.color.setClear(1,1,1,1),he.buffers.depth.setTest(!0),he.setScissorTest(!1);for(let w=0,F=T.length;w<F;w++){let q=T[w],K=q.shadow;if(void 0===K){console.warn("THREE.WebGLShadowMap:",q,"has no shadow.");continue}if(!1===K.autoUpdate&&!1===K.needsUpdate)continue;r.copy(K.mapSize);let de=K.getFrameExtents();if(r.multiply(de),o.copy(K.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(o.x=Math.floor(u/de.x),r.x=o.x*de.x,K.mapSize.x=o.x),r.y>u&&(o.y=Math.floor(u/de.y),r.y=o.y*de.y,K.mapSize.y=o.y)),null===K.map&&!K.isPointLightShadow&&3===this.type){let ae={minFilter:Gs,magFilter:Gs,format:ga};K.map=new Wa(r.x,r.y,ae),K.map.texture.name=q.name+".shadowMap",K.mapPass=new Wa(r.x,r.y,ae),K.camera.updateProjectionMatrix()}null===K.map&&(K.map=new Wa(r.x,r.y,{minFilter:Zo,magFilter:Zo,format:ga}),K.map.texture.name=q.name+".shadowMap",K.camera.updateProjectionMatrix()),n.setRenderTarget(K.map),n.clear();let Y=K.getViewportCount();for(let ae=0;ae<Y;ae++){let le=K.getViewport(ae);s.set(o.x*le.x,o.y*le.y,o.x*le.z,o.y*le.w),he.viewport(s),K.updateMatrices(q,ae),i=K.getFrustum(),D(k,Z,K.camera,q,this.type)}!K.isPointLightShadow&&3===this.type&&g(K,Z),K.needsUpdate=!1}x.needsUpdate=!1,n.setRenderTarget(z,fe,ue)}}function p9e(n,t,e){let i=e.isWebGL2,a=new function(){let ge=!1,fn=new ar,Zt=null,Nn=new ar(0,0,0,0);return{setMask:function(Ze){Zt!==Ze&&!ge&&(n.colorMask(Ze,Ze,Ze,Ze),Zt=Ze)},setLocked:function(Ze){ge=Ze},setClear:function(Ze,Dn,Mi,Tr,Es){!0===Es&&(Ze*=Tr,Dn*=Tr,Mi*=Tr),fn.set(Ze,Dn,Mi,Tr),!1===Nn.equals(fn)&&(n.clearColor(Ze,Dn,Mi,Tr),Nn.copy(fn))},reset:function(){ge=!1,Zt=null,Nn.set(-1,0,0,0)}}},l=new function(){let ge=!1,fn=null,Zt=null,Nn=null;return{setTest:function(Ze){Ze?Ae(2929):tn(2929)},setMask:function(Ze){fn!==Ze&&!ge&&(n.depthMask(Ze),fn=Ze)},setFunc:function(Ze){if(Zt!==Ze){if(Ze)switch(Ze){case 0:n.depthFunc(512);break;case 1:n.depthFunc(519);break;case 2:n.depthFunc(513);break;case 3:default:n.depthFunc(515);break;case 4:n.depthFunc(514);break;case 5:n.depthFunc(518);break;case 6:n.depthFunc(516);break;case 7:n.depthFunc(517)}else n.depthFunc(515);Zt=Ze}},setLocked:function(Ze){ge=Ze},setClear:function(Ze){Nn!==Ze&&(n.clearDepth(Ze),Nn=Ze)},reset:function(){ge=!1,fn=null,Zt=null,Nn=null}}},c=new function(){let ge=!1,fn=null,Zt=null,Nn=null,Ze=null,Dn=null,Mi=null,Tr=null,Es=null;return{setTest:function(Br){ge||(Br?Ae(2960):tn(2960))},setMask:function(Br){fn!==Br&&!ge&&(n.stencilMask(Br),fn=Br)},setFunc:function(Br,Pl,ba){(Zt!==Br||Nn!==Pl||Ze!==ba)&&(n.stencilFunc(Br,Pl,ba),Zt=Br,Nn=Pl,Ze=ba)},setOp:function(Br,Pl,ba){(Dn!==Br||Mi!==Pl||Tr!==ba)&&(n.stencilOp(Br,Pl,ba),Dn=Br,Mi=Pl,Tr=ba)},setLocked:function(Br){ge=Br},setClear:function(Br){Es!==Br&&(n.clearStencil(Br),Es=Br)},reset:function(){ge=!1,fn=null,Zt=null,Nn=null,Ze=null,Dn=null,Mi=null,Tr=null,Es=null}}},u={},d={},p=new WeakMap,h=[],f=null,m=!1,x=null,g=null,b=null,D=null,T=null,k=null,Z=null,z=!1,fe=null,ue=null,he=null,w=null,F=null,q=n.getParameter(35661),K=!1,de=0,Y=n.getParameter(7938);-1!==Y.indexOf("WebGL")?(de=parseFloat(/^WebGL (\d)/.exec(Y)[1]),K=de>=1):-1!==Y.indexOf("OpenGL ES")&&(de=parseFloat(/^OpenGL ES (\d)/.exec(Y)[1]),K=de>=2);let ae=null,le={},Ie=n.getParameter(3088),ve=n.getParameter(2978),De=(new ar).fromArray(Ie),nt=(new ar).fromArray(ve);function gt(ge,fn,Zt){let Nn=new Uint8Array(4),Ze=n.createTexture();n.bindTexture(ge,Ze),n.texParameteri(ge,10241,9728),n.texParameteri(ge,10240,9728);for(let Dn=0;Dn<Zt;Dn++)n.texImage2D(fn+Dn,0,6408,1,1,0,6408,5121,Nn);return Ze}let Ue={};function Ae(ge){!0!==u[ge]&&(n.enable(ge),u[ge]=!0)}function tn(ge){!1!==u[ge]&&(n.disable(ge),u[ge]=!1)}Ue[3553]=gt(3553,3553,1),Ue[34067]=gt(34067,34069,6),a.setClear(0,0,0,1),l.setClear(1),c.setClear(0),Ae(2929),l.setFunc(3),We(!1),Mt(1),Ae(2884),ce(0);let xt={100:32774,101:32778,102:32779};if(i)xt[103]=32775,xt[104]=32776;else{let ge=t.get("EXT_blend_minmax");null!==ge&&(xt[103]=ge.MIN_EXT,xt[104]=ge.MAX_EXT)}let mt={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function ce(ge,fn,Zt,Nn,Ze,Dn,Mi,Tr){if(0!==ge){if(!1===m&&(Ae(3042),m=!0),5===ge)Ze=Ze||fn,Dn=Dn||Zt,Mi=Mi||Nn,(fn!==g||Ze!==T)&&(n.blendEquationSeparate(xt[fn],xt[Ze]),g=fn,T=Ze),(Zt!==b||Nn!==D||Dn!==k||Mi!==Z)&&(n.blendFuncSeparate(mt[Zt],mt[Nn],mt[Dn],mt[Mi]),b=Zt,D=Nn,k=Dn,Z=Mi),x=ge,z=null;else if(ge!==x||Tr!==z){if((100!==g||100!==T)&&(n.blendEquation(32774),g=100,T=100),Tr)switch(ge){case 1:n.blendFuncSeparate(1,771,1,771);break;case 2:n.blendFunc(1,1);break;case 3:n.blendFuncSeparate(0,769,0,1);break;case 4:n.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",ge)}else switch(ge){case 1:n.blendFuncSeparate(770,771,1,771);break;case 2:n.blendFunc(770,1);break;case 3:n.blendFuncSeparate(0,769,0,1);break;case 4:n.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",ge)}b=null,D=null,k=null,Z=null,x=ge,z=Tr}}else!0===m&&(tn(3042),m=!1)}function We(ge){fe!==ge&&(n.frontFace(ge?2304:2305),fe=ge)}function Mt(ge){0!==ge?(Ae(2884),ge!==ue&&n.cullFace(1===ge?1029:2===ge?1028:1032)):tn(2884),ue=ge}function hn(ge,fn,Zt){ge?(Ae(32823),(w!==fn||F!==Zt)&&(n.polygonOffset(fn,Zt),w=fn,F=Zt)):tn(32823)}function fi(ge){void 0===ge&&(ge=33984+q-1),ae!==ge&&(n.activeTexture(ge),ae=ge)}return{buffers:{color:a,depth:l,stencil:c},enable:Ae,disable:tn,bindFramebuffer:function(ge,fn){return d[ge]!==fn&&(n.bindFramebuffer(ge,fn),d[ge]=fn,i&&(36009===ge&&(d[36160]=fn),36160===ge&&(d[36009]=fn)),!0)},drawBuffers:function(ge,fn){let Zt=h,Nn=!1;if(ge)if(Zt=p.get(fn),void 0===Zt&&(Zt=[],p.set(fn,Zt)),ge.isWebGLMultipleRenderTargets){let Ze=ge.texture;if(Zt.length!==Ze.length||36064!==Zt[0]){for(let Dn=0,Mi=Ze.length;Dn<Mi;Dn++)Zt[Dn]=36064+Dn;Zt.length=Ze.length,Nn=!0}}else 36064!==Zt[0]&&(Zt[0]=36064,Nn=!0);else 1029!==Zt[0]&&(Zt[0]=1029,Nn=!0);Nn&&(e.isWebGL2?n.drawBuffers(Zt):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(Zt))},useProgram:function(ge){return f!==ge&&(n.useProgram(ge),f=ge,!0)},setBlending:ce,setMaterial:function(ge,fn){2===ge.side?tn(2884):Ae(2884);let Zt=1===ge.side;fn&&(Zt=!Zt),We(Zt),1===ge.blending&&!1===ge.transparent?ce(0):ce(ge.blending,ge.blendEquation,ge.blendSrc,ge.blendDst,ge.blendEquationAlpha,ge.blendSrcAlpha,ge.blendDstAlpha,ge.premultipliedAlpha),l.setFunc(ge.depthFunc),l.setTest(ge.depthTest),l.setMask(ge.depthWrite),a.setMask(ge.colorWrite);let Nn=ge.stencilWrite;c.setTest(Nn),Nn&&(c.setMask(ge.stencilWriteMask),c.setFunc(ge.stencilFunc,ge.stencilRef,ge.stencilFuncMask),c.setOp(ge.stencilFail,ge.stencilZFail,ge.stencilZPass)),hn(ge.polygonOffset,ge.polygonOffsetFactor,ge.polygonOffsetUnits),!0===ge.alphaToCoverage?Ae(32926):tn(32926)},setFlipSided:We,setCullFace:Mt,setLineWidth:function(ge){ge!==he&&(K&&n.lineWidth(ge),he=ge)},setPolygonOffset:hn,setScissorTest:function(ge){ge?Ae(3089):tn(3089)},activeTexture:fi,bindTexture:function(ge,fn){null===ae&&fi();let Zt=le[ae];void 0===Zt&&(Zt={type:void 0,texture:void 0},le[ae]=Zt),(Zt.type!==ge||Zt.texture!==fn)&&(n.bindTexture(ge,fn||Ue[ge]),Zt.type=ge,Zt.texture=fn)},unbindTexture:function(){let ge=le[ae];void 0!==ge&&void 0!==ge.type&&(n.bindTexture(ge.type,null),ge.type=void 0,ge.texture=void 0)},compressedTexImage2D:function(){try{n.compressedTexImage2D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texImage2D:function(){try{n.texImage2D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texImage3D:function(){try{n.texImage3D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texStorage2D:function(){try{n.texStorage2D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texStorage3D:function(){try{n.texStorage3D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texSubImage2D:function(){try{n.texSubImage2D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},texSubImage3D:function(){try{n.texSubImage3D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},compressedTexSubImage2D:function(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(ge){console.error("THREE.WebGLState:",ge)}},scissor:function(ge){!1===De.equals(ge)&&(n.scissor(ge.x,ge.y,ge.z,ge.w),De.copy(ge))},viewport:function(ge){!1===nt.equals(ge)&&(n.viewport(ge.x,ge.y,ge.z,ge.w),nt.copy(ge))},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),u={},ae=null,le={},d={},p=new WeakMap,h=[],f=null,m=!1,x=null,g=null,b=null,D=null,T=null,k=null,Z=null,z=!1,fe=null,ue=null,he=null,w=null,F=null,De.set(0,0,n.canvas.width,n.canvas.height),nt.set(0,0,n.canvas.width,n.canvas.height),a.reset(),l.reset(),c.reset()}}}function h9e(n,t,e,i,r,o,s){let m,a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,u=r.maxTextureSize,d=r.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,f=new WeakMap,x=!1;try{x=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function g(ee,W){return x?new OffscreenCanvas(ee,W):YS("canvas")}function b(ee,W,Xe,Tt){let mn=1;if((ee.width>Tt||ee.height>Tt)&&(mn=Tt/Math.max(ee.width,ee.height)),mn<1||!0===W){if(typeof HTMLImageElement<"u"&&ee instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ee instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ee instanceof ImageBitmap){let qe=W?H8e:Math.floor,wn=qe(mn*ee.width),yn=qe(mn*ee.height);void 0===m&&(m=g(wn,yn));let zt=Xe?g(wn,yn):m;return zt.width=wn,zt.height=yn,zt.getContext("2d").drawImage(ee,0,0,wn,yn),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ee.width+"x"+ee.height+") to ("+wn+"x"+yn+")."),zt}return"data"in ee&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ee.width+"x"+ee.height+")."),ee}return ee}function D(ee){return xue(ee.width)&&xue(ee.height)}function k(ee,W){return ee.generateMipmaps&&W&&ee.minFilter!==Zo&&ee.minFilter!==Gs}function Z(ee){n.generateMipmap(ee)}function z(ee,W,Xe,Tt,mn=!1){if(!1===a)return W;if(null!==ee){if(void 0!==n[ee])return n[ee];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ee+"'")}let qe=W;return 6403===W&&(5126===Xe&&(qe=33326),5131===Xe&&(qe=33325),5121===Xe&&(qe=33321)),33319===W&&(5126===Xe&&(qe=33328),5131===Xe&&(qe=33327),5121===Xe&&(qe=33323)),6408===W&&(5126===Xe&&(qe=34836),5131===Xe&&(qe=34842),5121===Xe&&(qe=Tt===Wr&&!1===mn?35907:32856),32819===Xe&&(qe=32854),32820===Xe&&(qe=32855)),(33325===qe||33326===qe||33327===qe||33328===qe||34842===qe||34836===qe)&&t.get("EXT_color_buffer_float"),qe}function fe(ee,W,Xe){return!0===k(ee,Xe)||ee.isFramebufferTexture&&ee.minFilter!==Zo&&ee.minFilter!==Gs?Math.log2(Math.max(W.width,W.height))+1:void 0!==ee.mipmaps&&ee.mipmaps.length>0?ee.mipmaps.length:ee.isCompressedTexture&&Array.isArray(ee.image)?W.mipmaps.length:1}function ue(ee){return ee===Zo||1004===ee||1005===ee?9728:9729}function he(ee){let W=ee.target;W.removeEventListener("dispose",he),function(ee){let W=i.get(ee);void 0!==W.__webglInit&&(n.deleteTexture(W.__webglTexture),i.remove(ee))}(W),W.isVideoTexture&&f.delete(W),s.memory.textures--}function w(ee){let W=ee.target;W.removeEventListener("dispose",w),function(ee){let W=ee.texture,Xe=i.get(ee),Tt=i.get(W);if(ee){if(void 0!==Tt.__webglTexture&&(n.deleteTexture(Tt.__webglTexture),s.memory.textures--),ee.depthTexture&&ee.depthTexture.dispose(),ee.isWebGLCubeRenderTarget)for(let mn=0;mn<6;mn++)n.deleteFramebuffer(Xe.__webglFramebuffer[mn]),Xe.__webglDepthbuffer&&n.deleteRenderbuffer(Xe.__webglDepthbuffer[mn]);else n.deleteFramebuffer(Xe.__webglFramebuffer),Xe.__webglDepthbuffer&&n.deleteRenderbuffer(Xe.__webglDepthbuffer),Xe.__webglMultisampledFramebuffer&&n.deleteFramebuffer(Xe.__webglMultisampledFramebuffer),Xe.__webglColorRenderbuffer&&n.deleteRenderbuffer(Xe.__webglColorRenderbuffer),Xe.__webglDepthRenderbuffer&&n.deleteRenderbuffer(Xe.__webglDepthRenderbuffer);if(ee.isWebGLMultipleRenderTargets)for(let mn=0,qe=W.length;mn<qe;mn++){let wn=i.get(W[mn]);wn.__webglTexture&&(n.deleteTexture(wn.__webglTexture),s.memory.textures--),i.remove(W[mn])}i.remove(W),i.remove(ee)}}(W)}let K=0;function ae(ee,W){let Xe=i.get(ee);if(ee.isVideoTexture&&function(ee){let W=s.render.frame;f.get(ee)!==W&&(f.set(ee,W),ee.update())}(ee),ee.version>0&&Xe.__version!==ee.version){let Tt=ee.image;if(void 0===Tt)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==Tt.complete)return void Ae(Xe,ee,W);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.activeTexture(33984+W),e.bindTexture(3553,Xe.__webglTexture)}function ve(ee,W){let Xe=i.get(ee);ee.version>0&&Xe.__version!==ee.version?function(ee,W,Xe){if(6!==W.image.length)return;Ue(ee,W),e.activeTexture(33984+Xe),e.bindTexture(34067,ee.__webglTexture),n.pixelStorei(37440,W.flipY),n.pixelStorei(37441,W.premultiplyAlpha),n.pixelStorei(3317,W.unpackAlignment),n.pixelStorei(37443,0);let Tt=W&&(W.isCompressedTexture||W.image[0].isCompressedTexture),mn=W.image[0]&&W.image[0].isDataTexture,qe=[];for(let Ze=0;Ze<6;Ze++)qe[Ze]=Tt||mn?mn?W.image[Ze].image:W.image[Ze]:b(W.image[Ze],!1,!0,c),qe[Ze]=hn(W,qe[Ze]);let Nn,wn=qe[0],yn=D(wn)||a,zt=o.convert(W.format,W.encoding),Ut=o.convert(W.type),Wn=z(W.internalFormat,zt,Ut,W.encoding),ge=a&&!0!==W.isVideoTexture,fn=void 0===ee.__version,Zt=fe(W,wn,yn);if(gt(34067,W,yn),Tt){ge&&fn&&e.texStorage2D(34067,Zt,Wn,wn.width,wn.height);for(let Ze=0;Ze<6;Ze++){Nn=qe[Ze].mipmaps;for(let Dn=0;Dn<Nn.length;Dn++){let Mi=Nn[Dn];W.format!==ga?null!==zt?ge?e.compressedTexSubImage2D(34069+Ze,Dn,0,0,Mi.width,Mi.height,zt,Mi.data):e.compressedTexImage2D(34069+Ze,Dn,Wn,Mi.width,Mi.height,0,Mi.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ge?e.texSubImage2D(34069+Ze,Dn,0,0,Mi.width,Mi.height,zt,Ut,Mi.data):e.texImage2D(34069+Ze,Dn,Wn,Mi.width,Mi.height,0,zt,Ut,Mi.data)}}}else{Nn=W.mipmaps,ge&&fn&&(Nn.length>0&&Zt++,e.texStorage2D(34067,Zt,Wn,qe[0].width,qe[0].height));for(let Ze=0;Ze<6;Ze++)if(mn){ge?e.texSubImage2D(34069+Ze,0,0,0,qe[Ze].width,qe[Ze].height,zt,Ut,qe[Ze].data):e.texImage2D(34069+Ze,0,Wn,qe[Ze].width,qe[Ze].height,0,zt,Ut,qe[Ze].data);for(let Dn=0;Dn<Nn.length;Dn++){let Tr=Nn[Dn].image[Ze].image;ge?e.texSubImage2D(34069+Ze,Dn+1,0,0,Tr.width,Tr.height,zt,Ut,Tr.data):e.texImage2D(34069+Ze,Dn+1,Wn,Tr.width,Tr.height,0,zt,Ut,Tr.data)}}else{ge?e.texSubImage2D(34069+Ze,0,0,0,zt,Ut,qe[Ze]):e.texImage2D(34069+Ze,0,Wn,zt,Ut,qe[Ze]);for(let Dn=0;Dn<Nn.length;Dn++){let Mi=Nn[Dn];ge?e.texSubImage2D(34069+Ze,Dn+1,0,0,zt,Ut,Mi.image[Ze]):e.texImage2D(34069+Ze,Dn+1,Wn,zt,Ut,Mi.image[Ze])}}}k(W,yn)&&Z(34067),ee.__version=W.version,W.onUpdate&&W.onUpdate(W)}(Xe,ee,W):(e.activeTexture(33984+W),e.bindTexture(34067,Xe.__webglTexture))}let De={1e3:10497,[El]:33071,1002:33648},nt={[Zo]:9728,1004:9984,1005:9986,[Gs]:9729,1007:9985,1008:9987};function gt(ee,W,Xe){if(Xe?(n.texParameteri(ee,10242,De[W.wrapS]),n.texParameteri(ee,10243,De[W.wrapT]),(32879===ee||35866===ee)&&n.texParameteri(ee,32882,De[W.wrapR]),n.texParameteri(ee,10240,nt[W.magFilter]),n.texParameteri(ee,10241,nt[W.minFilter])):(n.texParameteri(ee,10242,33071),n.texParameteri(ee,10243,33071),(32879===ee||35866===ee)&&n.texParameteri(ee,32882,33071),(W.wrapS!==El||W.wrapT!==El)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(ee,10240,ue(W.magFilter)),n.texParameteri(ee,10241,ue(W.minFilter)),W.minFilter!==Zo&&W.minFilter!==Gs&&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 Tt=t.get("EXT_texture_filter_anisotropic");if(W.type===Ug&&!1===t.has("OES_texture_float_linear")||!1===a&&W.type===lb&&!1===t.has("OES_texture_half_float_linear"))return;(W.anisotropy>1||i.get(W).__currentAnisotropy)&&(n.texParameterf(ee,Tt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(W.anisotropy,r.getMaxAnisotropy())),i.get(W).__currentAnisotropy=W.anisotropy)}}function Ue(ee,W){void 0===ee.__webglInit&&(ee.__webglInit=!0,W.addEventListener("dispose",he),ee.__webglTexture=n.createTexture(),s.memory.textures++)}function Ae(ee,W,Xe){let Tt=3553;W.isDataTexture2DArray&&(Tt=35866),W.isDataTexture3D&&(Tt=32879),Ue(ee,W),e.activeTexture(33984+Xe),e.bindTexture(Tt,ee.__webglTexture),n.pixelStorei(37440,W.flipY),n.pixelStorei(37441,W.premultiplyAlpha),n.pixelStorei(3317,W.unpackAlignment),n.pixelStorei(37443,0);let mn=function(ee){return!a&&(ee.wrapS!==El||ee.wrapT!==El||ee.minFilter!==Zo&&ee.minFilter!==Gs)}(W)&&!1===D(W.image),qe=b(W.image,mn,!1,u);qe=hn(W,qe);let wn=D(qe)||a,yn=o.convert(W.format,W.encoding),zt=o.convert(W.type),Ut=z(W.internalFormat,yn,zt,W.encoding,W.isVideoTexture);gt(Tt,W,wn);let Wn,ge=W.mipmaps,fn=a&&!0!==W.isVideoTexture,Zt=void 0===ee.__version,Nn=fe(W,qe,wn);if(W.isDepthTexture)Ut=6402,a?Ut=W.type===Ug?36012:1014===W.type?33190:W.type===cb?35056:33189:W.type===Ug&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),W.format===jg&&6402===Ut&&W.type!==WS&&1014!==W.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),W.type=WS,zt=o.convert(W.type)),W.format===hb&&6402===Ut&&(Ut=34041,W.type!==cb&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),W.type=cb,zt=o.convert(W.type))),fn&&Zt?e.texStorage2D(3553,1,Ut,qe.width,qe.height):e.texImage2D(3553,0,Ut,qe.width,qe.height,0,yn,zt,null);else if(W.isDataTexture)if(ge.length>0&&wn){fn&&Zt&&e.texStorage2D(3553,Nn,Ut,ge[0].width,ge[0].height);for(let Ze=0,Dn=ge.length;Ze<Dn;Ze++)Wn=ge[Ze],fn?e.texSubImage2D(3553,0,0,0,Wn.width,Wn.height,yn,zt,Wn.data):e.texImage2D(3553,Ze,Ut,Wn.width,Wn.height,0,yn,zt,Wn.data);W.generateMipmaps=!1}else fn?(Zt&&e.texStorage2D(3553,Nn,Ut,qe.width,qe.height),e.texSubImage2D(3553,0,0,0,qe.width,qe.height,yn,zt,qe.data)):e.texImage2D(3553,0,Ut,qe.width,qe.height,0,yn,zt,qe.data);else if(W.isCompressedTexture){fn&&Zt&&e.texStorage2D(3553,Nn,Ut,ge[0].width,ge[0].height);for(let Ze=0,Dn=ge.length;Ze<Dn;Ze++)Wn=ge[Ze],W.format!==ga?null!==yn?fn?e.compressedTexSubImage2D(3553,Ze,0,0,Wn.width,Wn.height,yn,Wn.data):e.compressedTexImage2D(3553,Ze,Ut,Wn.width,Wn.height,0,Wn.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):fn?e.texSubImage2D(3553,Ze,0,0,Wn.width,Wn.height,yn,zt,Wn.data):e.texImage2D(3553,Ze,Ut,Wn.width,Wn.height,0,yn,zt,Wn.data)}else if(W.isDataTexture2DArray)fn?(Zt&&e.texStorage3D(35866,Nn,Ut,qe.width,qe.height,qe.depth),e.texSubImage3D(35866,0,0,0,0,qe.width,qe.height,qe.depth,yn,zt,qe.data)):e.texImage3D(35866,0,Ut,qe.width,qe.height,qe.depth,0,yn,zt,qe.data);else if(W.isDataTexture3D)fn?(Zt&&e.texStorage3D(32879,Nn,Ut,qe.width,qe.height,qe.depth),e.texSubImage3D(32879,0,0,0,0,qe.width,qe.height,qe.depth,yn,zt,qe.data)):e.texImage3D(32879,0,Ut,qe.width,qe.height,qe.depth,0,yn,zt,qe.data);else if(W.isFramebufferTexture)fn&&Zt?e.texStorage2D(3553,Nn,Ut,qe.width,qe.height):e.texImage2D(3553,0,Ut,qe.width,qe.height,0,yn,zt,null);else if(ge.length>0&&wn){fn&&Zt&&e.texStorage2D(3553,Nn,Ut,ge[0].width,ge[0].height);for(let Ze=0,Dn=ge.length;Ze<Dn;Ze++)Wn=ge[Ze],fn?e.texSubImage2D(3553,Ze,0,0,yn,zt,Wn):e.texImage2D(3553,Ze,Ut,yn,zt,Wn);W.generateMipmaps=!1}else fn?(Zt&&e.texStorage2D(3553,Nn,Ut,qe.width,qe.height),e.texSubImage2D(3553,0,0,0,yn,zt,qe)):e.texImage2D(3553,0,Ut,yn,zt,qe);k(W,wn)&&Z(Tt),ee.__version=W.version,W.onUpdate&&W.onUpdate(W)}function pt(ee,W,Xe,Tt,mn){let qe=o.convert(Xe.format,Xe.encoding),wn=o.convert(Xe.type),yn=z(Xe.internalFormat,qe,wn,Xe.encoding);i.get(W).__hasExternalTextures||(32879===mn||35866===mn?e.texImage3D(mn,0,yn,W.width,W.height,W.depth,0,qe,wn,null):e.texImage2D(mn,0,yn,W.width,W.height,0,qe,wn,null)),e.bindFramebuffer(36160,ee),W.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,Tt,mn,i.get(Xe).__webglTexture,0,Mt(W)):n.framebufferTexture2D(36160,Tt,mn,i.get(Xe).__webglTexture,0),e.bindFramebuffer(36160,null)}function wt(ee,W,Xe){if(n.bindRenderbuffer(36161,ee),W.depthBuffer&&!W.stencilBuffer){let Tt=33189;if(Xe||W.useRenderToTexture){let mn=W.depthTexture;mn&&mn.isDepthTexture&&(mn.type===Ug?Tt=36012:1014===mn.type&&(Tt=33190));let qe=Mt(W);W.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,qe,Tt,W.width,W.height):n.renderbufferStorageMultisample(36161,qe,Tt,W.width,W.height)}else n.renderbufferStorage(36161,Tt,W.width,W.height);n.framebufferRenderbuffer(36160,36096,36161,ee)}else if(W.depthBuffer&&W.stencilBuffer){let Tt=Mt(W);Xe&&W.useRenderbuffer?n.renderbufferStorageMultisample(36161,Tt,35056,W.width,W.height):W.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,Tt,35056,W.width,W.height):n.renderbufferStorage(36161,34041,W.width,W.height),n.framebufferRenderbuffer(36160,33306,36161,ee)}else{let Tt=!0===W.isWebGLMultipleRenderTargets?W.texture[0]:W.texture,mn=o.convert(Tt.format,Tt.encoding),qe=o.convert(Tt.type),wn=z(Tt.internalFormat,mn,qe,Tt.encoding),yn=Mt(W);Xe&&W.useRenderbuffer?n.renderbufferStorageMultisample(36161,yn,wn,W.width,W.height):W.useRenderToTexture?h.renderbufferStorageMultisampleEXT(36161,yn,wn,W.width,W.height):n.renderbufferStorage(36161,wn,W.width,W.height)}n.bindRenderbuffer(36161,null)}function xt(ee){let W=i.get(ee),Xe=!0===ee.isWebGLCubeRenderTarget;if(ee.depthTexture&&!W.__autoAllocateDepthBuffer){if(Xe)throw new Error("target.depthTexture not supported in Cube render targets");!function(ee,W){if(W&&W.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,ee),!W.depthTexture||!W.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(W.depthTexture).__webglTexture||W.depthTexture.image.width!==W.width||W.depthTexture.image.height!==W.height)&&(W.depthTexture.image.width=W.width,W.depthTexture.image.height=W.height,W.depthTexture.needsUpdate=!0),ae(W.depthTexture,0);let Tt=i.get(W.depthTexture).__webglTexture,mn=Mt(W);if(W.depthTexture.format===jg)W.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,36096,3553,Tt,0,mn):n.framebufferTexture2D(36160,36096,3553,Tt,0);else{if(W.depthTexture.format!==hb)throw new Error("Unknown depthTexture format");W.useRenderToTexture?h.framebufferTexture2DMultisampleEXT(36160,33306,3553,Tt,0,mn):n.framebufferTexture2D(36160,33306,3553,Tt,0)}}(W.__webglFramebuffer,ee)}else if(Xe){W.__webglDepthbuffer=[];for(let Tt=0;Tt<6;Tt++)e.bindFramebuffer(36160,W.__webglFramebuffer[Tt]),W.__webglDepthbuffer[Tt]=n.createRenderbuffer(),wt(W.__webglDepthbuffer[Tt],ee,!1)}else e.bindFramebuffer(36160,W.__webglFramebuffer),W.__webglDepthbuffer=n.createRenderbuffer(),wt(W.__webglDepthbuffer,ee,!1);e.bindFramebuffer(36160,null)}function Mt(ee){return a&&(ee.useRenderbuffer||ee.useRenderToTexture)?Math.min(d,ee.samples):0}function hn(ee,W){let Xe=ee.encoding,Tt=ee.format,mn=ee.type;return!0===ee.isCompressedTexture||!0===ee.isVideoTexture||1035===ee.format||Xe!==bf&&(Xe===Wr?!1===a?!0===t.has("EXT_sRGB")&&Tt===ga?(ee.format=1035,ee.minFilter=Gs,ee.generateMipmaps=!1):W=Tp.sRGBToLinear(W):(Tt!==ga||mn!==_f)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",Xe)),W}let on=!1,fi=!1;this.allocateTextureUnit=function(){let ee=K;return ee>=l&&console.warn("THREE.WebGLTextures: Trying to use "+ee+" texture units while this GPU supports only "+l),K+=1,ee},this.resetTextureUnits=function(){K=0},this.setTexture2D=ae,this.setTexture2DArray=function(ee,W){let Xe=i.get(ee);ee.version>0&&Xe.__version!==ee.version?Ae(Xe,ee,W):(e.activeTexture(33984+W),e.bindTexture(35866,Xe.__webglTexture))},this.setTexture3D=function(ee,W){let Xe=i.get(ee);ee.version>0&&Xe.__version!==ee.version?Ae(Xe,ee,W):(e.activeTexture(33984+W),e.bindTexture(32879,Xe.__webglTexture))},this.setTextureCube=ve,this.rebindTextures=function(ee,W,Xe){let Tt=i.get(ee);void 0!==W&&pt(Tt.__webglFramebuffer,ee,ee.texture,36064,3553),void 0!==Xe&&xt(ee)},this.setupRenderTarget=function(ee){let W=ee.texture,Xe=i.get(ee),Tt=i.get(W);ee.addEventListener("dispose",w),!0!==ee.isWebGLMultipleRenderTargets&&(void 0===Tt.__webglTexture&&(Tt.__webglTexture=n.createTexture()),Tt.__version=W.version,s.memory.textures++);let mn=!0===ee.isWebGLCubeRenderTarget,qe=!0===ee.isWebGLMultipleRenderTargets,wn=W.isDataTexture3D||W.isDataTexture2DArray,yn=D(ee)||a;if(mn){Xe.__webglFramebuffer=[];for(let zt=0;zt<6;zt++)Xe.__webglFramebuffer[zt]=n.createFramebuffer()}else if(Xe.__webglFramebuffer=n.createFramebuffer(),qe)if(r.drawBuffers){let zt=ee.texture;for(let Ut=0,Wn=zt.length;Ut<Wn;Ut++){let ge=i.get(zt[Ut]);void 0===ge.__webglTexture&&(ge.__webglTexture=n.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(ee.useRenderbuffer)if(a){Xe.__webglMultisampledFramebuffer=n.createFramebuffer(),Xe.__webglColorRenderbuffer=n.createRenderbuffer(),n.bindRenderbuffer(36161,Xe.__webglColorRenderbuffer);let zt=o.convert(W.format,W.encoding),Ut=o.convert(W.type),Wn=z(W.internalFormat,zt,Ut,W.encoding),ge=Mt(ee);n.renderbufferStorageMultisample(36161,ge,Wn,ee.width,ee.height),e.bindFramebuffer(36160,Xe.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(36160,36064,36161,Xe.__webglColorRenderbuffer),n.bindRenderbuffer(36161,null),ee.depthBuffer&&(Xe.__webglDepthRenderbuffer=n.createRenderbuffer(),wt(Xe.__webglDepthRenderbuffer,ee,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(mn){e.bindTexture(34067,Tt.__webglTexture),gt(34067,W,yn);for(let zt=0;zt<6;zt++)pt(Xe.__webglFramebuffer[zt],ee,W,36064,34069+zt);k(W,yn)&&Z(34067),e.unbindTexture()}else if(qe){let zt=ee.texture;for(let Ut=0,Wn=zt.length;Ut<Wn;Ut++){let ge=zt[Ut],fn=i.get(ge);e.bindTexture(3553,fn.__webglTexture),gt(3553,ge,yn),pt(Xe.__webglFramebuffer,ee,ge,36064+Ut,3553),k(ge,yn)&&Z(3553)}e.unbindTexture()}else{let zt=3553;wn&&(a?zt=W.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),e.bindTexture(zt,Tt.__webglTexture),gt(zt,W,yn),pt(Xe.__webglFramebuffer,ee,W,36064,zt),k(W,yn)&&Z(zt),e.unbindTexture()}ee.depthBuffer&&xt(ee)},this.updateRenderTargetMipmap=function(ee){let W=D(ee)||a,Xe=!0===ee.isWebGLMultipleRenderTargets?ee.texture:[ee.texture];for(let Tt=0,mn=Xe.length;Tt<mn;Tt++){let qe=Xe[Tt];if(k(qe,W)){let wn=ee.isWebGLCubeRenderTarget?34067:3553,yn=i.get(qe).__webglTexture;e.bindTexture(wn,yn),Z(wn),e.unbindTexture()}}},this.updateMultisampleRenderTarget=function(ee){if(ee.useRenderbuffer)if(a){let W=ee.width,Xe=ee.height,Tt=16384,mn=[36064],qe=ee.stencilBuffer?33306:36096;ee.depthBuffer&&mn.push(qe),ee.ignoreDepthForMultisampleCopy||(ee.depthBuffer&&(Tt|=256),ee.stencilBuffer&&(Tt|=1024));let wn=i.get(ee);e.bindFramebuffer(36008,wn.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,wn.__webglFramebuffer),ee.ignoreDepthForMultisampleCopy&&(n.invalidateFramebuffer(36008,[qe]),n.invalidateFramebuffer(36009,[qe])),n.blitFramebuffer(0,0,W,Xe,0,0,W,Xe,Tt,9728),n.invalidateFramebuffer(36008,mn),e.bindFramebuffer(36008,null),e.bindFramebuffer(36009,wn.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.setupDepthRenderbuffer=xt,this.setupFrameBufferTexture=pt,this.safeSetTexture2D=function(ee,W){ee&&ee.isWebGLRenderTarget&&(!1===on&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),on=!0),ee=ee.texture),ae(ee,W)},this.safeSetTextureCube=function(ee,W){ee&&ee.isWebGLCubeRenderTarget&&(!1===fi&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),fi=!0),ee=ee.texture),ve(ee,W)}}function f9e(n,t,e){let i=e.isWebGL2;return{convert:function(o,s=null){let a;if(o===_f)return 5121;if(1017===o)return 32819;if(1018===o)return 32820;if(1010===o)return 5120;if(1011===o)return 5122;if(o===WS)return 5123;if(1013===o)return 5124;if(1014===o)return 5125;if(o===Ug)return 5126;if(o===lb)return i?5131:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(1021===o)return 6406;if(o===ga)return 6408;if(1024===o)return 6409;if(1025===o)return 6410;if(o===jg)return 6402;if(o===hb)return 34041;if(1028===o)return 6403;if(1035===o)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(1029===o)return 36244;if(1030===o)return 33319;if(1031===o)return 33320;if(1033===o)return 36249;if(33776===o||33777===o||33778===o||33779===o)if(s===Wr){if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===a)return null;if(33776===o)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===o)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===o)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===o)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(a=t.get("WEBGL_compressed_texture_s3tc"),null===a)return null;if(33776===o)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===o)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===o)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===o)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===o||35841===o||35842===o||35843===o){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(35840===o)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===o)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===o)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===o)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===o)return a=t.get("WEBGL_compressed_texture_etc1"),null!==a?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===o||37496===o){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(37492===o)return s===Wr?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(37496===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(37808===o||37809===o||37810===o||37811===o||37812===o||37813===o||37814===o||37815===o||37816===o||37817===o||37818===o||37819===o||37820===o||37821===o){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(37808===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===o)return s===Wr?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===o){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(36492===o)return s===Wr?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}return o===cb?i?34042:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}hk.prototype.isMeshDistanceMaterial=!0;var fk=class extends Ws{constructor(t=[]){super(),this.cameras=t}};fk.prototype.isArrayCamera=!0;var zg=class extends Xi{constructor(){super(),this.type="Group"}};zg.prototype.isGroup=!0;var m9e={type:"move"},US=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new zg,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 zg,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ie,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ie),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new zg,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ie,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ie),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,s=null,a=this._targetRay,l=this._grip,c=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState)if(null!==a&&(r=e.getPose(t.targetRaySpace,i),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(m9e))),c&&t.hand){s=!0;for(let m of t.hand.values()){let x=e.getJointPose(m,i);if(void 0===c.joints[m.jointName]){let b=new zg;b.matrixAutoUpdate=!1,b.visible=!1,c.joints[m.jointName]=b,c.add(b)}let g=c.joints[m.jointName];null!==x&&(g.matrix.fromArray(x.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.jointRadius=x.radius),g.visible=null!==x}let p=c.joints["index-finger-tip"].position.distanceTo(c.joints["thumb-tip"].position),h=.02,f=.005;c.inputState.pinching&&p>h+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&p<=h-f&&(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!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==o),null!==c&&(c.visible=null!==s),this}},$S=class extends Ho{constructor(t,e,i,r,o,s,a,l,c,u){if((u=void 0!==u?u:jg)!==jg&&u!==hb)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&u===jg&&(i=WS),void 0===i&&u===hb&&(i=cb),super(null,r,o,s,a,l,u,i,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:Zo,this.minFilter=void 0!==l?l:Zo,this.flipY=!1,this.generateMipmaps=!1}};$S.prototype.isDepthTexture=!0;var y8=class extends Ep{constructor(t,e){super();let i=this,r=null,o=1,s=null,a="local-floor",l=t.extensions.has("WEBGL_multisampled_render_to_texture"),c=null,u=null,d=null,p=null,h=!1,f=null,m=e.getContextAttributes(),x=null,g=null,b=[],D=new Map,T=new Ws;T.layers.enable(1),T.viewport=new ar;let k=new Ws;k.layers.enable(2),k.viewport=new ar;let Z=[T,k],z=new fk;z.layers.enable(1),z.layers.enable(2);let fe=null,ue=null;function he(ve){let De=D.get(ve.inputSource);De&&De.dispatchEvent({type:ve.type,data:ve.inputSource})}function w(){D.forEach(function(ve,De){ve.disconnect(De)}),D.clear(),fe=null,ue=null,t.setRenderTarget(x),p=null,d=null,u=null,r=null,g=null,Ie.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}function F(ve){let De=r.inputSources;for(let nt=0;nt<b.length;nt++)D.set(De[nt],b[nt]);for(let nt=0;nt<ve.removed.length;nt++){let gt=ve.removed[nt],Ue=D.get(gt);Ue&&(Ue.dispatchEvent({type:"disconnected",data:gt}),D.delete(gt))}for(let nt=0;nt<ve.added.length;nt++){let gt=ve.added[nt],Ue=D.get(gt);Ue&&Ue.dispatchEvent({type:"connected",data:gt})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ve){let De=b[ve];return void 0===De&&(De=new US,b[ve]=De),De.getTargetRaySpace()},this.getControllerGrip=function(ve){let De=b[ve];return void 0===De&&(De=new US,b[ve]=De),De.getGripSpace()},this.getHand=function(ve){let De=b[ve];return void 0===De&&(De=new US,b[ve]=De),De.getHandSpace()},this.setFramebufferScaleFactor=function(ve){o=ve,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ve){a=ve,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return null!==d?d:p},this.getBinding=function(){return u},this.getFrame=function(){return f},this.getSession=function(){return r},this.setSession=async function(ve){if(r=ve,null!==r){if(x=t.getRenderTarget(),r.addEventListener("select",he),r.addEventListener("selectstart",he),r.addEventListener("selectend",he),r.addEventListener("squeeze",he),r.addEventListener("squeezestart",he),r.addEventListener("squeezeend",he),r.addEventListener("end",w),r.addEventListener("inputsourceschange",F),!0!==m.xrCompatible&&await e.makeXRCompatible(),void 0===r.renderState.layers||!1===t.capabilities.isWebGL2)p=new XRWebGLLayer(r,e,{antialias:void 0!==r.renderState.layers||m.antialias,alpha:m.alpha,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:o}),r.updateRenderState({baseLayer:p}),g=new Wa(p.framebufferWidth,p.framebufferHeight,{format:ga,type:_f,encoding:t.outputEncoding});else{h=m.antialias;let De=null,nt=null,gt=null;m.depth&&(gt=m.stencil?35056:33190,De=m.stencil?hb:jg,nt=m.stencil?cb:WS);let Ue={colorFormat:t.outputEncoding===Wr?35907:32856,depthFormat:gt,scaleFactor:o};u=new XRWebGLBinding(r,e),d=u.createProjectionLayer(Ue),r.updateRenderState({layers:[d]}),g=h?new XS(d.textureWidth,d.textureHeight,{format:ga,type:_f,depthTexture:new $S(d.textureWidth,d.textureHeight,nt,void 0,void 0,void 0,void 0,void 0,void 0,De),stencilBuffer:m.stencil,ignoreDepth:d.ignoreDepthValues,useRenderToTexture:l,encoding:t.outputEncoding}):new Wa(d.textureWidth,d.textureHeight,{format:ga,type:_f,depthTexture:new $S(d.textureWidth,d.textureHeight,nt,void 0,void 0,void 0,void 0,void 0,void 0,De),stencilBuffer:m.stencil,ignoreDepth:d.ignoreDepthValues,encoding:t.outputEncoding})}g.isXRRenderTarget=!0,this.setFoveation(1),s=await r.requestReferenceSpace(a),Ie.setContext(r),Ie.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};let q=new ie,K=new ie;function Y(ve,De){null===De?ve.matrixWorld.copy(ve.matrix):ve.matrixWorld.multiplyMatrices(De.matrixWorld,ve.matrix),ve.matrixWorldInverse.copy(ve.matrixWorld).invert()}this.updateCamera=function(ve){if(null===r)return;z.near=k.near=T.near=ve.near,z.far=k.far=T.far=ve.far,(fe!==z.near||ue!==z.far)&&(r.updateRenderState({depthNear:z.near,depthFar:z.far}),fe=z.near,ue=z.far);let De=ve.parent,nt=z.cameras;Y(z,De);for(let Ue=0;Ue<nt.length;Ue++)Y(nt[Ue],De);z.matrixWorld.decompose(z.position,z.quaternion,z.scale),ve.position.copy(z.position),ve.quaternion.copy(z.quaternion),ve.scale.copy(z.scale),ve.matrix.copy(z.matrix),ve.matrixWorld.copy(z.matrixWorld);let gt=ve.children;for(let Ue=0,Ae=gt.length;Ue<Ae;Ue++)gt[Ue].updateMatrixWorld(!0);2===nt.length?function(ve,De,nt){q.setFromMatrixPosition(De.matrixWorld),K.setFromMatrixPosition(nt.matrixWorld);let gt=q.distanceTo(K),Ue=De.projectionMatrix.elements,Ae=nt.projectionMatrix.elements,tn=Ue[14]/(Ue[10]-1),pt=Ue[14]/(Ue[10]+1),wt=(Ue[9]+1)/Ue[5],Te=(Ue[9]-1)/Ue[5],xt=(Ue[8]-1)/Ue[0],mt=(Ae[8]+1)/Ae[0],ce=tn*xt,dt=tn*mt,We=gt/(-xt+mt),Mt=We*-xt;De.matrixWorld.decompose(ve.position,ve.quaternion,ve.scale),ve.translateX(Mt),ve.translateZ(We),ve.matrixWorld.compose(ve.position,ve.quaternion,ve.scale),ve.matrixWorldInverse.copy(ve.matrixWorld).invert();let bt=tn+We,hn=pt+We;ve.projectionMatrix.makePerspective(ce-Mt,dt+(gt-Mt),wt*pt/hn*bt,Te*pt/hn*bt,bt,hn)}(z,T,k):z.projectionMatrix.copy(T.projectionMatrix)},this.getCamera=function(){return z},this.getFoveation=function(){return null!==d?d.fixedFoveation:null!==p?p.fixedFoveation:void 0},this.setFoveation=function(ve){null!==d&&(d.fixedFoveation=ve),null!==p&&void 0!==p.fixedFoveation&&(p.fixedFoveation=ve)};let ae=null,Ie=new kde;Ie.setAnimationLoop(function(ve,De){if(c=De.getViewerPose(s),f=De,null!==c){let gt=c.views;null!==p&&(t.setRenderTargetFramebuffer(g,p.framebuffer),t.setRenderTarget(g));let Ue=!1;gt.length!==z.cameras.length&&(z.cameras.length=0,Ue=!0);for(let Ae=0;Ae<gt.length;Ae++){let tn=gt[Ae],pt=null;if(null!==p)pt=p.getViewport(tn);else{let Te=u.getViewSubImage(d,tn);pt=Te.viewport,0===Ae&&(t.setRenderTargetTextures(g,Te.colorTexture,d.ignoreDepthValues?void 0:Te.depthStencilTexture),t.setRenderTarget(g))}let wt=Z[Ae];wt.matrix.fromArray(tn.transform.matrix),wt.projectionMatrix.fromArray(tn.projectionMatrix),wt.viewport.set(pt.x,pt.y,pt.width,pt.height),0===Ae&&z.matrix.copy(wt.matrix),!0===Ue&&z.cameras.push(wt)}}let nt=r.inputSources;for(let gt=0;gt<b.length;gt++)b[gt].update(nt[gt],De,s);ae&&ae(ve,De),f=null}),this.setAnimationLoop=function(ve){ae=ve},this.dispose=function(){}}};function g9e(n){function i(g,b){g.opacity.value=b.opacity,b.color&&g.diffuse.value.copy(b.color),b.emissive&&g.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity),b.map&&(g.map.value=b.map),b.alphaMap&&(g.alphaMap.value=b.alphaMap),b.specularMap&&(g.specularMap.value=b.specularMap),b.alphaTest>0&&(g.alphaTest.value=b.alphaTest);let T,k,D=n.get(b).envMap;D&&(g.envMap.value=D,g.flipEnvMap.value=D.isCubeTexture&&!1===D.isRenderTargetTexture?-1:1,g.reflectivity.value=b.reflectivity,g.ior.value=b.ior,g.refractionRatio.value=b.refractionRatio),b.lightMap&&(g.lightMap.value=b.lightMap,g.lightMapIntensity.value=b.lightMapIntensity),b.aoMap&&(g.aoMap.value=b.aoMap,g.aoMapIntensity.value=b.aoMapIntensity),b.map?T=b.map:b.specularMap?T=b.specularMap:b.displacementMap?T=b.displacementMap:b.normalMap?T=b.normalMap:b.bumpMap?T=b.bumpMap:b.roughnessMap?T=b.roughnessMap:b.metalnessMap?T=b.metalnessMap:b.alphaMap?T=b.alphaMap:b.emissiveMap?T=b.emissiveMap:b.clearcoatMap?T=b.clearcoatMap:b.clearcoatNormalMap?T=b.clearcoatNormalMap:b.clearcoatRoughnessMap?T=b.clearcoatRoughnessMap:b.specularIntensityMap?T=b.specularIntensityMap:b.specularColorMap?T=b.specularColorMap:b.transmissionMap?T=b.transmissionMap:b.thicknessMap?T=b.thicknessMap:b.sheenColorMap?T=b.sheenColorMap:b.sheenRoughnessMap&&(T=b.sheenRoughnessMap),void 0!==T&&(T.isWebGLRenderTarget&&(T=T.texture),!0===T.matrixAutoUpdate&&T.updateMatrix(),g.uvTransform.value.copy(T.matrix)),b.aoMap?k=b.aoMap:b.lightMap&&(k=b.lightMap),void 0!==k&&(k.isWebGLRenderTarget&&(k=k.texture),!0===k.matrixAutoUpdate&&k.updateMatrix(),g.uv2Transform.value.copy(k.matrix))}function d(g,b){g.roughness.value=b.roughness,g.metalness.value=b.metalness,b.roughnessMap&&(g.roughnessMap.value=b.roughnessMap),b.metalnessMap&&(g.metalnessMap.value=b.metalnessMap),b.emissiveMap&&(g.emissiveMap.value=b.emissiveMap),b.bumpMap&&(g.bumpMap.value=b.bumpMap,g.bumpScale.value=b.bumpScale,1===b.side&&(g.bumpScale.value*=-1)),b.normalMap&&(g.normalMap.value=b.normalMap,g.normalScale.value.copy(b.normalScale),1===b.side&&g.normalScale.value.negate()),b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias),n.get(b).envMap&&(g.envMapIntensity.value=b.envMapIntensity)}return{refreshFogUniforms:function(g,b){g.fogColor.value.copy(b.color),b.isFog?(g.fogNear.value=b.near,g.fogFar.value=b.far):b.isFogExp2&&(g.fogDensity.value=b.density)},refreshMaterialUniforms:function(g,b,D,T,k){b.isMeshBasicMaterial?i(g,b):b.isMeshLambertMaterial?(i(g,b),function(g,b){b.emissiveMap&&(g.emissiveMap.value=b.emissiveMap)}(g,b)):b.isMeshToonMaterial?(i(g,b),function(g,b){b.gradientMap&&(g.gradientMap.value=b.gradientMap),b.emissiveMap&&(g.emissiveMap.value=b.emissiveMap),b.bumpMap&&(g.bumpMap.value=b.bumpMap,g.bumpScale.value=b.bumpScale,1===b.side&&(g.bumpScale.value*=-1)),b.normalMap&&(g.normalMap.value=b.normalMap,g.normalScale.value.copy(b.normalScale),1===b.side&&g.normalScale.value.negate()),b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias)}(g,b)):b.isMeshPhongMaterial?(i(g,b),function(g,b){g.specular.value.copy(b.specular),g.shininess.value=Math.max(b.shininess,1e-4),b.emissiveMap&&(g.emissiveMap.value=b.emissiveMap),b.bumpMap&&(g.bumpMap.value=b.bumpMap,g.bumpScale.value=b.bumpScale,1===b.side&&(g.bumpScale.value*=-1)),b.normalMap&&(g.normalMap.value=b.normalMap,g.normalScale.value.copy(b.normalScale),1===b.side&&g.normalScale.value.negate()),b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias)}(g,b)):b.isMeshStandardMaterial?(i(g,b),b.isMeshPhysicalMaterial?function(g,b,D){d(g,b),g.ior.value=b.ior,b.sheen>0&&(g.sheenColor.value.copy(b.sheenColor).multiplyScalar(b.sheen),g.sheenRoughness.value=b.sheenRoughness,b.sheenColorMap&&(g.sheenColorMap.value=b.sheenColorMap),b.sheenRoughnessMap&&(g.sheenRoughnessMap.value=b.sheenRoughnessMap)),b.clearcoat>0&&(g.clearcoat.value=b.clearcoat,g.clearcoatRoughness.value=b.clearcoatRoughness,b.clearcoatMap&&(g.clearcoatMap.value=b.clearcoatMap),b.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=b.clearcoatRoughnessMap),b.clearcoatNormalMap&&(g.clearcoatNormalScale.value.copy(b.clearcoatNormalScale),g.clearcoatNormalMap.value=b.clearcoatNormalMap,1===b.side&&g.clearcoatNormalScale.value.negate())),b.transmission>0&&(g.transmission.value=b.transmission,g.transmissionSamplerMap.value=D.texture,g.transmissionSamplerSize.value.set(D.width,D.height),b.transmissionMap&&(g.transmissionMap.value=b.transmissionMap),g.thickness.value=b.thickness,b.thicknessMap&&(g.thicknessMap.value=b.thicknessMap),g.attenuationDistance.value=b.attenuationDistance,g.attenuationColor.value.copy(b.attenuationColor)),g.specularIntensity.value=b.specularIntensity,g.specularColor.value.copy(b.specularColor),b.specularIntensityMap&&(g.specularIntensityMap.value=b.specularIntensityMap),b.specularColorMap&&(g.specularColorMap.value=b.specularColorMap)}(g,b,k):d(g,b)):b.isMeshMatcapMaterial?(i(g,b),function(g,b){b.matcap&&(g.matcap.value=b.matcap),b.bumpMap&&(g.bumpMap.value=b.bumpMap,g.bumpScale.value=b.bumpScale,1===b.side&&(g.bumpScale.value*=-1)),b.normalMap&&(g.normalMap.value=b.normalMap,g.normalScale.value.copy(b.normalScale),1===b.side&&g.normalScale.value.negate()),b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias)}(g,b)):b.isMeshDepthMaterial?(i(g,b),function(g,b){b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias)}(g,b)):b.isMeshDistanceMaterial?(i(g,b),function(g,b){b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias),g.referencePosition.value.copy(b.referencePosition),g.nearDistance.value=b.nearDistance,g.farDistance.value=b.farDistance}(g,b)):b.isMeshNormalMaterial?(i(g,b),function(g,b){b.bumpMap&&(g.bumpMap.value=b.bumpMap,g.bumpScale.value=b.bumpScale,1===b.side&&(g.bumpScale.value*=-1)),b.normalMap&&(g.normalMap.value=b.normalMap,g.normalScale.value.copy(b.normalScale),1===b.side&&g.normalScale.value.negate()),b.displacementMap&&(g.displacementMap.value=b.displacementMap,g.displacementScale.value=b.displacementScale,g.displacementBias.value=b.displacementBias)}(g,b)):b.isLineBasicMaterial?(function(g,b){g.diffuse.value.copy(b.color),g.opacity.value=b.opacity}(g,b),b.isLineDashedMaterial&&function(g,b){g.dashSize.value=b.dashSize,g.totalSize.value=b.dashSize+b.gapSize,g.scale.value=b.scale}(g,b)):b.isPointsMaterial?function(g,b,D,T){let k;g.diffuse.value.copy(b.color),g.opacity.value=b.opacity,g.size.value=b.size*D,g.scale.value=.5*T,b.map&&(g.map.value=b.map),b.alphaMap&&(g.alphaMap.value=b.alphaMap),b.alphaTest>0&&(g.alphaTest.value=b.alphaTest),b.map?k=b.map:b.alphaMap&&(k=b.alphaMap),void 0!==k&&(!0===k.matrixAutoUpdate&&k.updateMatrix(),g.uvTransform.value.copy(k.matrix))}(g,b,D,T):b.isSpriteMaterial?function(g,b){let D;g.diffuse.value.copy(b.color),g.opacity.value=b.opacity,g.rotation.value=b.rotation,b.map&&(g.map.value=b.map),b.alphaMap&&(g.alphaMap.value=b.alphaMap),b.alphaTest>0&&(g.alphaTest.value=b.alphaTest),b.map?D=b.map:b.alphaMap&&(D=b.alphaMap),void 0!==D&&(!0===D.matrixAutoUpdate&&D.updateMatrix(),g.uvTransform.value.copy(D.matrix))}(g,b):b.isShadowMaterial?(g.color.value.copy(b.color),g.opacity.value=b.opacity):b.isShaderMaterial&&(b.uniformsNeedUpdate=!1)}}}function ir(n={}){let t=void 0!==n.canvas?n.canvas:function(){let n=YS("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,s=void 0!==n.antialias&&n.antialias,a=void 0===n.premultipliedAlpha||n.premultipliedAlpha,l=void 0!==n.preserveDrawingBuffer&&n.preserveDrawingBuffer,c=void 0!==n.powerPreference?n.powerPreference:"default",u=void 0!==n.failIfMajorPerformanceCaveat&&n.failIfMajorPerformanceCaveat,d=null,p=null,h=[],f=[];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=bf,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;let m=this,x=!1,g=0,b=0,D=null,T=-1,k=null,Z=new ar,z=new ar,fe=null,ue=t.width,he=t.height,w=1,F=null,q=null,K=new ar(0,0,ue,he),de=new ar(0,0,ue,he),Y=!1,ae=new gb,le=!1,Ie=!1,ve=null,De=new Rn,nt=new ie,gt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Ue(){return null===D?w:1}let pt,wt,Te,xt,mt,ce,dt,We,Mt,bt,hn,on,fi,Wi,qi,ee,W,Xe,Tt,mn,qe,wn,yn,Ae=e;function tn(I,X){for(let $=0;$<I.length;$++){let me=t.getContext(I[$],X);if(null!==me)return me}return null}try{let I={alpha:!0,depth:r,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r137"),t.addEventListener("webglcontextlost",Wn,!1),t.addEventListener("webglcontextrestored",ge,!1),null===Ae){let X=["webgl2","webgl","experimental-webgl"];if(!0===m.isWebGL1Renderer&&X.shift(),Ae=tn(X,I),null===Ae)throw tn(X)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===Ae.getShaderPrecisionFormat&&(Ae.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(I){throw console.error("THREE.WebGLRenderer: "+I.message),I}function zt(){pt=new VWe(Ae),wt=new OWe(Ae,pt,n),pt.init(wt),wn=new f9e(Ae,pt,wt),Te=new p9e(Ae,pt,wt),xt=new zWe(Ae),mt=new t9e,ce=new h9e(Ae,pt,Te,mt,wt,wn,xt),dt=new FWe(m),We=new BWe(m),Mt=new iGe(Ae,wt),yn=new PWe(Ae,pt,Mt,wt),bt=new HWe(Ae,Mt,xt,yn),hn=new qWe(Ae,bt,Mt,xt),Tt=new WWe(Ae,wt,ce),ee=new kWe(mt),on=new e9e(m,dt,We,pt,wt,yn,ee),fi=new g9e(mt),Wi=new i9e,qi=new c9e(pt,wt),Xe=new IWe(m,dt,Te,hn,i,a),W=new Gde(m,hn,wt),mn=new RWe(Ae,pt,xt,wt),qe=new UWe(Ae,pt,xt,wt),xt.programs=on.programs,m.capabilities=wt,m.extensions=pt,m.properties=mt,m.renderLists=Wi,m.shadowMap=W,m.state=Te,m.info=xt}zt();let Ut=new y8(m,Ae);function Wn(I){I.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function ge(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;let I=xt.autoReset,X=W.enabled,$=W.autoUpdate,ne=W.needsUpdate,me=W.type;zt(),xt.autoReset=I,W.enabled=X,W.autoUpdate=$,W.needsUpdate=ne,W.type=me}function fn(I){let X=I.target;X.removeEventListener("dispose",fn),function(I){(function(I){let X=mt.get(I).programs;void 0!==X&&(X.forEach(function($){on.releaseProgram($)}),I.isShaderMaterial&&on.releaseShaderCache(I))})(I),mt.remove(I)}(X)}this.xr=Ut,this.getContext=function(){return Ae},this.getContextAttributes=function(){return Ae.getContextAttributes()},this.forceContextLoss=function(){let I=pt.get("WEBGL_lose_context");I&&I.loseContext()},this.forceContextRestore=function(){let I=pt.get("WEBGL_lose_context");I&&I.restoreContext()},this.getPixelRatio=function(){return w},this.setPixelRatio=function(I){void 0!==I&&(w=I,this.setSize(ue,he,!1))},this.getSize=function(I){return I.set(ue,he)},this.setSize=function(I,X,$){Ut.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(ue=I,he=X,t.width=Math.floor(I*w),t.height=Math.floor(X*w),!1!==$&&(t.style.width=I+"px",t.style.height=X+"px"),this.setViewport(0,0,I,X))},this.getDrawingBufferSize=function(I){return I.set(ue*w,he*w).floor()},this.setDrawingBufferSize=function(I,X,$){ue=I,he=X,w=$,t.width=Math.floor(I*$),t.height=Math.floor(X*$),this.setViewport(0,0,I,X)},this.getCurrentViewport=function(I){return I.copy(Z)},this.getViewport=function(I){return I.copy(K)},this.setViewport=function(I,X,$,ne){I.isVector4?K.set(I.x,I.y,I.z,I.w):K.set(I,X,$,ne),Te.viewport(Z.copy(K).multiplyScalar(w).floor())},this.getScissor=function(I){return I.copy(de)},this.setScissor=function(I,X,$,ne){I.isVector4?de.set(I.x,I.y,I.z,I.w):de.set(I,X,$,ne),Te.scissor(z.copy(de).multiplyScalar(w).floor())},this.getScissorTest=function(){return Y},this.setScissorTest=function(I){Te.setScissorTest(Y=I)},this.setOpaqueSort=function(I){F=I},this.setTransparentSort=function(I){q=I},this.getClearColor=function(I){return I.copy(Xe.getClearColor())},this.setClearColor=function(){Xe.setClearColor.apply(Xe,arguments)},this.getClearAlpha=function(){return Xe.getClearAlpha()},this.setClearAlpha=function(){Xe.setClearAlpha.apply(Xe,arguments)},this.clear=function(I,X,$){let ne=0;(void 0===I||I)&&(ne|=16384),(void 0===X||X)&&(ne|=256),(void 0===$||$)&&(ne|=1024),Ae.clear(ne)},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",Wn,!1),t.removeEventListener("webglcontextrestored",ge,!1),Wi.dispose(),qi.dispose(),mt.dispose(),dt.dispose(),We.dispose(),hn.dispose(),yn.dispose(),on.dispose(),Ut.dispose(),Ut.removeEventListener("sessionstart",Mi),Ut.removeEventListener("sessionend",Tr),ve&&(ve.dispose(),ve=null),Es.stop()},this.renderBufferDirect=function(I,X,$,ne,me,Ke){null===X&&(X=gt);let lt=me.isMesh&&me.matrixWorld.determinant()<0,Je=function(I,X,$,ne,me){!0!==X.isScene&&(X=gt),ce.resetTextureUnits();let Ke=X.fog,Je=null===D?m.outputEncoding:!0===D.isXRRenderTarget?D.texture.encoding:bf,ft=(ne.isMeshStandardMaterial?We:dt).get(ne.envMap||(ne.isMeshStandardMaterial?X.environment:null)),Ct=!0===ne.vertexColors&&!!$.attributes.color&&4===$.attributes.color.itemSize,It=!!ne.normalMap&&!!$.attributes.tangent,Nt=!!$.morphAttributes.position,bn=!!$.morphAttributes.normal,rr=$.morphAttributes.position?$.morphAttributes.position.length:0,Ai=ne.toneMapped?m.toneMapping:0,Mn=mt.get(ne),Hn=p.state.lights;!0!==le||!0!==Ie&&I===k||ee.setState(ne,I,I===k&&ne.id===T);let Ot=!1;ne.version===Mn.__version?(Mn.needsLights&&Mn.lightsStateVersion!==Hn.state.version||Mn.outputEncoding!==Je||me.isInstancedMesh&&!1===Mn.instancing||!me.isInstancedMesh&&!0===Mn.instancing||me.isSkinnedMesh&&!1===Mn.skinning||!me.isSkinnedMesh&&!0===Mn.skinning||Mn.envMap!==ft||ne.fog&&Mn.fog!==Ke||void 0!==Mn.numClippingPlanes&&(Mn.numClippingPlanes!==ee.numPlanes||Mn.numIntersection!==ee.numIntersection)||Mn.vertexAlphas!==Ct||Mn.vertexTangents!==It||Mn.morphTargets!==Nt||Mn.morphNormals!==bn||Mn.toneMapping!==Ai||!0===wt.isWebGL2&&Mn.morphTargetsCount!==rr)&&(Ot=!0):(Ot=!0,Mn.__version=ne.version);let wi=Mn.currentProgram;!0===Ot&&(wi=ex(ne,X,me));let ai=!1,Yn=!1,$n=!1,Yt=wi.getUniforms(),Yi=Mn.uniforms;if(Te.useProgram(wi.program)&&(ai=!0,Yn=!0,$n=!0),ne.id!==T&&(T=ne.id,Yn=!0),ai||k!==I){if(Yt.setValue(Ae,"projectionMatrix",I.projectionMatrix),wt.logarithmicDepthBuffer&&Yt.setValue(Ae,"logDepthBufFC",2/(Math.log(I.far+1)/Math.LN2)),k!==I&&(k=I,Yn=!0,$n=!0),ne.isShaderMaterial||ne.isMeshPhongMaterial||ne.isMeshToonMaterial||ne.isMeshStandardMaterial||ne.envMap){let An=Yt.map.cameraPosition;void 0!==An&&An.setValue(Ae,nt.setFromMatrixPosition(I.matrixWorld))}(ne.isMeshPhongMaterial||ne.isMeshToonMaterial||ne.isMeshLambertMaterial||ne.isMeshBasicMaterial||ne.isMeshStandardMaterial||ne.isShaderMaterial)&&Yt.setValue(Ae,"isOrthographic",!0===I.isOrthographicCamera),(ne.isMeshPhongMaterial||ne.isMeshToonMaterial||ne.isMeshLambertMaterial||ne.isMeshBasicMaterial||ne.isMeshStandardMaterial||ne.isShaderMaterial||ne.isShadowMaterial||me.isSkinnedMesh)&&Yt.setValue(Ae,"viewMatrix",I.matrixWorldInverse)}if(me.isSkinnedMesh){Yt.setOptional(Ae,me,"bindMatrix"),Yt.setOptional(Ae,me,"bindMatrixInverse");let An=me.skeleton;An&&(wt.floatVertexTextures?(null===An.boneTexture&&An.computeBoneTexture(),Yt.setValue(Ae,"boneTexture",An.boneTexture,ce),Yt.setValue(Ae,"boneTextureSize",An.boneTextureSize)):Yt.setOptional(Ae,An,"boneMatrices"))}return!!$&&(void 0!==$.morphAttributes.position||void 0!==$.morphAttributes.normal)&&Tt.update(me,$,ne,wi),(Yn||Mn.receiveShadow!==me.receiveShadow)&&(Mn.receiveShadow=me.receiveShadow,Yt.setValue(Ae,"receiveShadow",me.receiveShadow)),Yn&&(Yt.setValue(Ae,"toneMappingExposure",m.toneMappingExposure),Mn.needsLights&&function(I,X){I.ambientLightColor.needsUpdate=X,I.lightProbe.needsUpdate=X,I.directionalLights.needsUpdate=X,I.directionalLightShadows.needsUpdate=X,I.pointLights.needsUpdate=X,I.pointLightShadows.needsUpdate=X,I.spotLights.needsUpdate=X,I.spotLightShadows.needsUpdate=X,I.rectAreaLights.needsUpdate=X,I.hemisphereLights.needsUpdate=X}(Yi,$n),Ke&&ne.fog&&fi.refreshFogUniforms(Yi,Ke),fi.refreshMaterialUniforms(Yi,ne,w,he,ve),yf.upload(Ae,Mn.uniformsList,Yi,ce)),ne.isShaderMaterial&&!0===ne.uniformsNeedUpdate&&(yf.upload(Ae,Mn.uniformsList,Yi,ce),ne.uniformsNeedUpdate=!1),ne.isSpriteMaterial&&Yt.setValue(Ae,"center",me.center),Yt.setValue(Ae,"modelViewMatrix",me.modelViewMatrix),Yt.setValue(Ae,"normalMatrix",me.normalMatrix),Yt.setValue(Ae,"modelMatrix",me.matrixWorld),wi}(I,X,$,ne,me);Te.setMaterial(ne,lt);let ft=$.index,Ct=$.attributes.position;if(null===ft){if(void 0===Ct||0===Ct.count)return}else if(0===ft.count)return;let It=1;!0===ne.wireframe&&(ft=bt.getWireframeAttribute($),It=2),yn.setup(me,ne,Je,$,ft);let Nt,bn=mn;null!==ft&&(Nt=Mt.get(ft),bn=qe,bn.setIndex(Nt));let rr=null!==ft?ft.count:Ct.count,Ai=$.drawRange.start*It,Mn=$.drawRange.count*It,Hn=null!==Ke?Ke.start*It:0,Ot=null!==Ke?Ke.count*It:1/0,wi=Math.max(Ai,Hn),ai=Math.min(rr,Ai+Mn,Hn+Ot)-1,Yn=Math.max(0,ai-wi+1);if(0!==Yn){if(me.isMesh)!0===ne.wireframe?(Te.setLineWidth(ne.wireframeLinewidth*Ue()),bn.setMode(1)):bn.setMode(4);else if(me.isLine){let $n=ne.linewidth;void 0===$n&&($n=1),Te.setLineWidth($n*Ue()),bn.setMode(me.isLineSegments?1:me.isLineLoop?2:3)}else me.isPoints?bn.setMode(0):me.isSprite&&bn.setMode(4);if(me.isInstancedMesh)bn.renderInstances(wi,Yn,me.count);else if($.isInstancedBufferGeometry){let $n=Math.min($.instanceCount,$._maxInstanceCount);bn.renderInstances(wi,Yn,$n)}else bn.render(wi,Yn)}},this.compile=function(I,X){p=qi.get(I),p.init(),f.push(p),I.traverseVisible(function($){$.isLight&&$.layers.test(X.layers)&&(p.pushLight($),$.castShadow&&p.pushShadow($))}),p.setupLights(m.physicallyCorrectLights),I.traverse(function($){let ne=$.material;if(ne)if(Array.isArray(ne))for(let me=0;me<ne.length;me++)ex(ne[me],I,$);else ex(ne,I,$)}),f.pop(),p=null};let Ze=null;function Mi(){Es.stop()}function Tr(){Es.start()}let Es=new kde;function Br(I,X,$,ne){if(!1===I.visible)return;if(I.layers.test(X.layers))if(I.isGroup)$=I.renderOrder;else if(I.isLOD)!0===I.autoUpdate&&I.update(X);else if(I.isLight)p.pushLight(I),I.castShadow&&p.pushShadow(I);else if(I.isSprite){if(!I.frustumCulled||ae.intersectsSprite(I)){ne&&nt.setFromMatrixPosition(I.matrixWorld).applyMatrix4(De);let lt=hn.update(I),Je=I.material;Je.visible&&d.push(I,lt,Je,$,nt.z,null)}}else if((I.isMesh||I.isLine||I.isPoints)&&(I.isSkinnedMesh&&I.skeleton.frame!==xt.render.frame&&(I.skeleton.update(),I.skeleton.frame=xt.render.frame),!I.frustumCulled||ae.intersectsObject(I))){ne&&nt.setFromMatrixPosition(I.matrixWorld).applyMatrix4(De);let lt=hn.update(I),Je=I.material;if(Array.isArray(Je)){let ft=lt.groups;for(let Ct=0,It=ft.length;Ct<It;Ct++){let Nt=ft[Ct],bn=Je[Nt.materialIndex];bn&&bn.visible&&d.push(I,lt,bn,$,nt.z,Nt)}}else Je.visible&&d.push(I,lt,Je,$,nt.z,null)}let Ke=I.children;for(let lt=0,Je=Ke.length;lt<Je;lt++)Br(Ke[lt],X,$,ne)}function Pl(I,X,$,ne){let me=I.opaque,Ke=I.transmissive,lt=I.transparent;p.setupLightsView($),Ke.length>0&&function(I,X,$){null===ve&&(ve=new(!0===s&&!0===wt.isWebGL2?XS:Wa)(1024,1024,{generateMipmaps:!0,type:null!==wn.convert(lb)?lb:_f,minFilter:1008,magFilter:Zo,wrapS:El,wrapT:El,useRenderToTexture:pt.has("WEBGL_multisampled_render_to_texture")}));let ne=m.getRenderTarget();m.setRenderTarget(ve),m.clear();let me=m.toneMapping;m.toneMapping=0,bc(I,X,$),m.toneMapping=me,ce.updateMultisampleRenderTarget(ve),ce.updateRenderTargetMipmap(ve),m.setRenderTarget(ne)}(me,X,$),ne&&Te.viewport(Z.copy(ne)),me.length>0&&bc(me,X,$),Ke.length>0&&bc(Ke,X,$),lt.length>0&&bc(lt,X,$)}function bc(I,X,$){let ne=!0===X.isScene?X.overrideMaterial:null;for(let me=0,Ke=I.length;me<Ke;me++){let lt=I[me],Je=lt.object,ft=lt.geometry,Ct=null===ne?lt.material:ne,It=lt.group;Je.layers.test($.layers)&&iN(Je,X,$,ft,Ct,It)}}function iN(I,X,$,ne,me,Ke){I.onBeforeRender(m,X,$,ne,me,Ke),I.modelViewMatrix.multiplyMatrices($.matrixWorldInverse,I.matrixWorld),I.normalMatrix.getNormalMatrix(I.modelViewMatrix),me.onBeforeRender(m,X,$,ne,I,Ke),!0===me.transparent&&2===me.side?(me.side=1,me.needsUpdate=!0,m.renderBufferDirect($,X,ne,me,I,Ke),me.side=0,me.needsUpdate=!0,m.renderBufferDirect($,X,ne,me,I,Ke),me.side=2):m.renderBufferDirect($,X,ne,me,I,Ke),I.onAfterRender(m,X,$,ne,me,Ke)}function ex(I,X,$){!0!==X.isScene&&(X=gt);let ne=mt.get(I),me=p.state.lights,lt=me.state.version,Je=on.getParameters(I,me.state,p.state.shadowsArray,X,$),ft=on.getProgramCacheKey(Je),Ct=ne.programs;ne.environment=I.isMeshStandardMaterial?X.environment:null,ne.fog=X.fog,ne.envMap=(I.isMeshStandardMaterial?We:dt).get(I.envMap||ne.environment),void 0===Ct&&(I.addEventListener("dispose",fn),Ct=new Map,ne.programs=Ct);let It=Ct.get(ft);if(void 0!==It){if(ne.currentProgram===It&&ne.lightsStateVersion===lt)return FE(I,Je),It}else Je.uniforms=on.getUniforms(I),I.onBuild($,Je,m),I.onBeforeCompile(Je,m),It=on.acquireProgram(Je,ft),Ct.set(ft,It),ne.uniforms=Je.uniforms;let Nt=ne.uniforms;(!I.isShaderMaterial&&!I.isRawShaderMaterial||!0===I.clipping)&&(Nt.clippingPlanes=ee.uniform),FE(I,Je),ne.needsLights=function(I){return I.isMeshLambertMaterial||I.isMeshToonMaterial||I.isMeshPhongMaterial||I.isMeshStandardMaterial||I.isShadowMaterial||I.isShaderMaterial&&!0===I.lights}(I),ne.lightsStateVersion=lt,ne.needsLights&&(Nt.ambientLightColor.value=me.state.ambient,Nt.lightProbe.value=me.state.probe,Nt.directionalLights.value=me.state.directional,Nt.directionalLightShadows.value=me.state.directionalShadow,Nt.spotLights.value=me.state.spot,Nt.spotLightShadows.value=me.state.spotShadow,Nt.rectAreaLights.value=me.state.rectArea,Nt.ltc_1.value=me.state.rectAreaLTC1,Nt.ltc_2.value=me.state.rectAreaLTC2,Nt.pointLights.value=me.state.point,Nt.pointLightShadows.value=me.state.pointShadow,Nt.hemisphereLights.value=me.state.hemi,Nt.directionalShadowMap.value=me.state.directionalShadowMap,Nt.directionalShadowMatrix.value=me.state.directionalShadowMatrix,Nt.spotShadowMap.value=me.state.spotShadowMap,Nt.spotShadowMatrix.value=me.state.spotShadowMatrix,Nt.pointShadowMap.value=me.state.pointShadowMap,Nt.pointShadowMatrix.value=me.state.pointShadowMatrix);let bn=It.getUniforms(),rr=yf.seqWithValue(bn.seq,Nt);return ne.currentProgram=It,ne.uniformsList=rr,It}function FE(I,X){let $=mt.get(I);$.outputEncoding=X.outputEncoding,$.instancing=X.instancing,$.skinning=X.skinning,$.morphTargets=X.morphTargets,$.morphNormals=X.morphNormals,$.morphTargetsCount=X.morphTargetsCount,$.numClippingPlanes=X.numClippingPlanes,$.numIntersection=X.numClipIntersection,$.vertexAlphas=X.vertexAlphas,$.vertexTangents=X.vertexTangents,$.toneMapping=X.toneMapping}Es.setAnimationLoop(function(I){Ze&&Ze(I)}),typeof window<"u"&&Es.setContext(window),this.setAnimationLoop=function(I){Ze=I,Ut.setAnimationLoop(I),null===I?Es.stop():Es.start()},Ut.addEventListener("sessionstart",Mi),Ut.addEventListener("sessionend",Tr),this.render=function(I,X){if(void 0===X||!0===X.isCamera){if(!0!==x){if(!0===I.autoUpdate&&I.updateMatrixWorld(),null===X.parent&&X.updateMatrixWorld(),!0===Ut.enabled&&!0===Ut.isPresenting&&(!0===Ut.cameraAutoUpdate&&Ut.updateCamera(X),X=Ut.getCamera()),!0===I.isScene&&I.onBeforeRender(m,I,X,D),p=qi.get(I,f.length),p.init(),f.push(p),De.multiplyMatrices(X.projectionMatrix,X.matrixWorldInverse),ae.setFromProjectionMatrix(De),Ie=this.localClippingEnabled,le=ee.init(this.clippingPlanes,Ie,X),d=Wi.get(I,h.length),d.init(),h.push(d),Br(I,X,0,m.sortObjects),d.finish(),!0===m.sortObjects&&d.sort(F,q),!0===le&&ee.beginShadows(),W.render(p.state.shadowsArray,I,X),!0===le&&ee.endShadows(),!0===this.info.autoReset&&this.info.reset(),Xe.render(d,I),p.setupLights(m.physicallyCorrectLights),X.isArrayCamera){let ne=X.cameras;for(let me=0,Ke=ne.length;me<Ke;me++){let lt=ne[me];Pl(d,I,lt,lt.viewport)}}else Pl(d,I,X);null!==D&&(ce.updateMultisampleRenderTarget(D),ce.updateRenderTargetMipmap(D)),!0===I.isScene&&I.onAfterRender(m,I,X),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1),yn.resetDefaultState(),T=-1,k=null,f.pop(),p=f.length>0?f[f.length-1]:null,h.pop(),d=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 g},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return D},this.setRenderTargetTextures=function(I,X,$){mt.get(I.texture).__webglTexture=X,mt.get(I.depthTexture).__webglTexture=$;let ne=mt.get(I);ne.__hasExternalTextures=!0,ne.__hasExternalTextures&&(ne.__autoAllocateDepthBuffer=void 0===$,ne.__autoAllocateDepthBuffer||I.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),I.useRenderToTexture=!1,I.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(I,X){let $=mt.get(I);$.__webglFramebuffer=X,$.__useDefaultFramebuffer=void 0===X},this.setRenderTarget=function(I,X=0,$=0){D=I,g=X,b=$;let ne=!0;if(I){let ft=mt.get(I);void 0!==ft.__useDefaultFramebuffer?(Te.bindFramebuffer(36160,null),ne=!1):void 0===ft.__webglFramebuffer?ce.setupRenderTarget(I):ft.__hasExternalTextures&&ce.rebindTextures(I,mt.get(I.texture).__webglTexture,mt.get(I.depthTexture).__webglTexture)}let me=null,Ke=!1,lt=!1;if(I){let ft=I.texture;(ft.isDataTexture3D||ft.isDataTexture2DArray)&&(lt=!0);let Ct=mt.get(I).__webglFramebuffer;I.isWebGLCubeRenderTarget?(me=Ct[X],Ke=!0):me=I.useRenderbuffer?mt.get(I).__webglMultisampledFramebuffer:Ct,Z.copy(I.viewport),z.copy(I.scissor),fe=I.scissorTest}else Z.copy(K).multiplyScalar(w).floor(),z.copy(de).multiplyScalar(w).floor(),fe=Y;if(Te.bindFramebuffer(36160,me)&&wt.drawBuffers&&ne&&Te.drawBuffers(I,me),Te.viewport(Z),Te.scissor(z),Te.setScissorTest(fe),Ke){let ft=mt.get(I.texture);Ae.framebufferTexture2D(36160,36064,34069+X,ft.__webglTexture,$)}else if(lt){let ft=mt.get(I.texture);Ae.framebufferTextureLayer(36160,36064,ft.__webglTexture,$||0,X||0)}T=-1},this.readRenderTargetPixels=function(I,X,$,ne,me,Ke,lt){if(!I||!I.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Je=mt.get(I).__webglFramebuffer;if(I.isWebGLCubeRenderTarget&&void 0!==lt&&(Je=Je[lt]),Je){Te.bindFramebuffer(36160,Je);try{let ft=I.texture,Ct=ft.format,It=ft.type;if(Ct!==ga&&wn.convert(Ct)!==Ae.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");let Nt=It===lb&&(pt.has("EXT_color_buffer_half_float")||wt.isWebGL2&&pt.has("EXT_color_buffer_float"));if(!(It===_f||wn.convert(It)===Ae.getParameter(35738)||It===Ug&&(wt.isWebGL2||pt.has("OES_texture_float")||pt.has("WEBGL_color_buffer_float"))||Nt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===Ae.checkFramebufferStatus(36160)?X>=0&&X<=I.width-ne&&$>=0&&$<=I.height-me&&Ae.readPixels(X,$,ne,me,wn.convert(Ct),wn.convert(It),Ke):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let ft=null!==D?mt.get(D).__webglFramebuffer:null;Te.bindFramebuffer(36160,ft)}}},this.copyFramebufferToTexture=function(I,X,$=0){if(!0!==X.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");let ne=Math.pow(2,-$),me=Math.floor(X.image.width*ne),Ke=Math.floor(X.image.height*ne);ce.setTexture2D(X,0),Ae.copyTexSubImage2D(3553,$,0,0,I.x,I.y,me,Ke),Te.unbindTexture()},this.copyTextureToTexture=function(I,X,$,ne=0){let me=X.image.width,Ke=X.image.height,lt=wn.convert($.format),Je=wn.convert($.type);ce.setTexture2D($,0),Ae.pixelStorei(37440,$.flipY),Ae.pixelStorei(37441,$.premultiplyAlpha),Ae.pixelStorei(3317,$.unpackAlignment),X.isDataTexture?Ae.texSubImage2D(3553,ne,I.x,I.y,me,Ke,lt,Je,X.image.data):X.isCompressedTexture?Ae.compressedTexSubImage2D(3553,ne,I.x,I.y,X.mipmaps[0].width,X.mipmaps[0].height,lt,X.mipmaps[0].data):Ae.texSubImage2D(3553,ne,I.x,I.y,lt,Je,X.image),0===ne&&$.generateMipmaps&&Ae.generateMipmap(3553),Te.unbindTexture()},this.copyTextureToTexture3D=function(I,X,$,ne,me=0){if(m.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");let It,Ke=I.max.x-I.min.x+1,lt=I.max.y-I.min.y+1,Je=I.max.z-I.min.z+1,ft=wn.convert(ne.format),Ct=wn.convert(ne.type);if(ne.isDataTexture3D)ce.setTexture3D(ne,0),It=32879;else{if(!ne.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ce.setTexture2DArray(ne,0),It=35866}Ae.pixelStorei(37440,ne.flipY),Ae.pixelStorei(37441,ne.premultiplyAlpha),Ae.pixelStorei(3317,ne.unpackAlignment);let Nt=Ae.getParameter(3314),bn=Ae.getParameter(32878),rr=Ae.getParameter(3316),Ai=Ae.getParameter(3315),Mn=Ae.getParameter(32877),Hn=$.isCompressedTexture?$.mipmaps[0]:$.image;Ae.pixelStorei(3314,Hn.width),Ae.pixelStorei(32878,Hn.height),Ae.pixelStorei(3316,I.min.x),Ae.pixelStorei(3315,I.min.y),Ae.pixelStorei(32877,I.min.z),$.isDataTexture||$.isDataTexture3D?Ae.texSubImage3D(It,me,X.x,X.y,X.z,Ke,lt,Je,ft,Ct,Hn.data):$.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Ae.compressedTexSubImage3D(It,me,X.x,X.y,X.z,Ke,lt,Je,ft,Hn.data)):Ae.texSubImage3D(It,me,X.x,X.y,X.z,Ke,lt,Je,ft,Ct,Hn),Ae.pixelStorei(3314,Nt),Ae.pixelStorei(32878,bn),Ae.pixelStorei(3316,rr),Ae.pixelStorei(3315,Ai),Ae.pixelStorei(32877,Mn),0===me&&ne.generateMipmaps&&Ae.generateMipmap(It),Te.unbindTexture()},this.initTexture=function(I){ce.setTexture2D(I,0),Te.unbindTexture()},this.resetState=function(){g=0,b=0,D=null,Te.reset(),yn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}ir.prototype.isWebGLRenderer=!0,class extends ir{}.prototype.isWebGL1Renderer=!0;var eE=class{constructor(t,e=25e-5){this.name="",this.color=new vn(t),this.density=e}clone(){return new eE(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};eE.prototype.isFogExp2=!0;var tE=class{constructor(t,e=1,i=1e3){this.name="",this.color=new vn(t),this.near=e,this.far=i}clone(){return new tE(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};tE.prototype.isFog=!0;var vb=class extends Xi{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}};vb.prototype.isScene=!0;var Yg=class{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=qS,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=du()}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=du()),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=du()),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}}};Yg.prototype.isInterleavedBuffer=!0;var Co=new ie,Xg=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++)Co.x=this.getX(e),Co.y=this.getY(e),Co.z=this.getZ(e),Co.applyMatrix4(t),this.setXYZ(e,Co.x,Co.y,Co.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Co.x=this.getX(e),Co.y=this.getY(e),Co.z=this.getZ(e),Co.applyNormalMatrix(t),this.setXYZ(e,Co.x,Co.y,Co.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Co.x=this.getX(e),Co.y=this.getY(e),Co.z=this.getZ(e),Co.transformDirection(t),this.setXYZ(e,Co.x,Co.y,Co.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 Yr(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 Xg(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}}};Xg.prototype.isInterleavedBufferAttribute=!0;var mk=class extends hs{constructor(t){super(),this.type="SpriteMaterial",this.color=new vn(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}};mk.prototype.isSpriteMaterial=!0;var eb,OS=new ie,tb=new ie,nb=new ie,ib=new at,kS=new at,Wde=new Rn,zO=new ie,FS=new ie,jO=new ie,nde=new at,e8=new at,ide=new at;function GO(n,t,e,i,r,o){ib.subVectors(n,e).addScalar(.5).multiply(i),void 0!==r?(kS.x=o*ib.x-r*ib.y,kS.y=r*ib.x+o*ib.y):kS.copy(ib),n.copy(t),n.x+=kS.x,n.y+=kS.y,n.applyMatrix4(Wde)}(class extends Xi{constructor(t){if(super(),this.type="Sprite",void 0===eb){eb=new nr;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 Yg(e,5);eb.setIndex([0,1,2,0,2,3]),eb.setAttribute("position",new Xg(i,3,0,!1)),eb.setAttribute("uv",new Xg(i,2,3,!1))}this.geometry=eb,this.material=void 0!==t?t:new mk,this.center=new at(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),tb.setFromMatrixScale(this.matrixWorld),Wde.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),nb.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&tb.multiplyScalar(-nb.z);let r,o,i=this.material.rotation;0!==i&&(o=Math.cos(i),r=Math.sin(i));let s=this.center;GO(zO.set(-.5,-.5,0),nb,s,tb,r,o),GO(FS.set(.5,-.5,0),nb,s,tb,r,o),GO(jO.set(.5,.5,0),nb,s,tb,r,o),nde.set(0,0),e8.set(1,0),ide.set(1,1);let a=t.ray.intersectTriangle(zO,FS,jO,!1,OS);if(null===a&&(GO(FS.set(-.5,.5,0),nb,s,tb,r,o),e8.set(0,1),a=t.ray.intersectTriangle(zO,jO,FS,!1,OS),null===a))return;let l=t.ray.origin.distanceTo(OS);l<t.near||l>t.far||e.push({distance:l,point:OS.clone(),uv:lo.getUV(OS,zO,FS,jO,nde,e8,ide,new at),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 rde=new ie,ode=new ar,sde=new ar,v9e=new ie,ade=new Rn,gk=class extends Vo{constructor(t,e){super(t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Rn,this.bindMatrixInverse=new Rn}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 ar,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;ode.fromBufferAttribute(r.attributes.skinIndex,t),sde.fromBufferAttribute(r.attributes.skinWeight,t),rde.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let o=0;o<4;o++){let s=sde.getComponent(o);if(0!==s){let a=ode.getComponent(o);ade.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),e.addScaledVector(v9e.copy(rde).applyMatrix4(ade),s)}}return e.applyMatrix4(this.bindMatrixInverse)}};gk.prototype.isSkinnedMesh=!0,class extends Xi{constructor(){super(),this.type="Bone"}}.prototype.isBone=!0,class extends Ho{constructor(t=null,e=1,i=1,r,o,s,a,l,c=Zo,u=Zo,d,p){super(null,s,a,l,c,u,r,o,d,p),this.image={data:t,width:e,height:i},this.magFilter=c,this.minFilter=u,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}.prototype.isDataTexture=!0;var nE=class extends Yr{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}};nE.prototype.isInstancedBufferAttribute=!0;var lde=new Rn,cde=new Rn,WO=[],NS=new Vo;(class extends Vo{constructor(t,e,i){super(t,e),this.instanceMatrix=new nE(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(NS.geometry=this.geometry,NS.material=this.material,void 0!==NS.material)for(let o=0;o<r;o++){this.getMatrixAt(o,lde),cde.multiplyMatrices(i,lde),NS.matrixWorld=cde,NS.raycast(t,WO);for(let s=0,a=WO.length;s<a;s++){let l=WO[s];l.instanceId=o,l.object=this,e.push(l)}WO.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new nE(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 Ap=class extends hs{constructor(t){super(),this.type="LineBasicMaterial",this.color=new vn(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}};Ap.prototype.isLineBasicMaterial=!0;var ude=new ie,dde=new ie,pde=new Rn,t8=new Cf,qO=new xf,iE=class extends Xi{constructor(t=new nr,e=new Ap){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++)ude.fromBufferAttribute(e,r-1),dde.fromBufferAttribute(e,r),i[r]=i[r-1],i[r]+=ude.distanceTo(dde);t.setAttribute("lineDistance",new Jr(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,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),qO.copy(i.boundingSphere),qO.applyMatrix4(r),qO.radius+=o,!1===t.ray.intersectsSphere(qO))return;pde.copy(r).invert(),t8.copy(t.ray).applyMatrix4(pde);let a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=new ie,u=new ie,d=new ie,p=new ie,h=this.isLineSegments?2:1;if(i.isBufferGeometry){let f=i.index,x=i.attributes.position;if(null!==f)for(let D=Math.max(0,s.start),T=Math.min(f.count,s.start+s.count)-1;D<T;D+=h){let k=f.getX(D),Z=f.getX(D+1);if(c.fromBufferAttribute(x,k),u.fromBufferAttribute(x,Z),t8.distanceSqToSegment(c,u,p,d)>l)continue;p.applyMatrix4(this.matrixWorld);let fe=t.ray.origin.distanceTo(p);fe<t.near||fe>t.far||e.push({distance:fe,point:d.clone().applyMatrix4(this.matrixWorld),index:D,face:null,faceIndex:null,object:this})}else for(let D=Math.max(0,s.start),T=Math.min(x.count,s.start+s.count)-1;D<T;D+=h){if(c.fromBufferAttribute(x,D),u.fromBufferAttribute(x,D+1),t8.distanceSqToSegment(c,u,p,d)>l)continue;p.applyMatrix4(this.matrixWorld);let Z=t.ray.origin.distanceTo(p);Z<t.near||Z>t.far||e.push({distance:Z,point:d.clone().applyMatrix4(this.matrixWorld),index:D,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,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=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.")}}};iE.prototype.isLine=!0;var hde=new ie,fde=new ie,rE=class extends iE{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)hde.fromBufferAttribute(e,r),fde.fromBufferAttribute(e,r+1),i[r]=0===r?0:i[r-1],i[r+1]=i[r]+hde.distanceTo(fde);t.setAttribute("lineDistance",new Jr(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}};rE.prototype.isLineSegments=!0,class extends iE{constructor(t,e){super(t,e),this.type="LineLoop"}}.prototype.isLineLoop=!0;var _k=class extends hs{constructor(t){super(),this.type="PointsMaterial",this.color=new vn(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}};_k.prototype.isPointsMaterial=!0;var mde=new Rn,E8=new Cf,YO=new xf,XO=new ie;function gde(n,t,e,i,r,o,s){let a=E8.distanceSqToPoint(n);if(a<e){let l=new ie;E8.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(a),point:l,index:t,face:null,object:s})}}(class extends Xi{constructor(t=new nr,e=new _k){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,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),YO.copy(i.boundingSphere),YO.applyMatrix4(r),YO.radius+=o,!1===t.ray.intersectsSphere(YO))return;mde.copy(r).invert(),E8.copy(t.ray).applyMatrix4(mde);let a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a;if(i.isBufferGeometry){let c=i.index,d=i.attributes.position;if(null!==c)for(let f=Math.max(0,s.start),m=Math.min(c.count,s.start+s.count);f<m;f++){let x=c.getX(f);XO.fromBufferAttribute(d,x),gde(XO,x,l,r,t,e,this)}else for(let f=Math.max(0,s.start),m=Math.min(d.count,s.start+s.count);f<m;f++)XO.fromBufferAttribute(d,f),gde(XO,f,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,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=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 Ho{constructor(t,e,i,r,o,s,a,l,c){super(t,e,i,r,o,s,a,l,c),this.minFilter=void 0!==s?s:Gs,this.magFilter=void 0!==o?o:Gs,this.generateMipmaps=!1;let u=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function d(){u.needsUpdate=!0,t.requestVideoFrameCallback(d)})}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 Ho{constructor(t,e,i){super({width:t,height:e}),this.format=i,this.magFilter=Zo,this.minFilter=Zo,this.generateMipmaps=!1,this.needsUpdate=!0}}.prototype.isFramebufferTexture=!0,class extends Ho{constructor(t,e,i,r,o,s,a,l,c,u,d,p){super(null,s,a,l,c,u,r,o,d,p),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}.prototype.isCompressedTexture=!0,class extends Ho{constructor(t,e,i,r,o,s,a,l,c){super(t,e,i,r,o,s,a,l,c),this.needsUpdate=!0}}.prototype.isCanvasTexture=!0;var yb=class extends nr{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=[],s=[],a=[],l=[],c=new ie,u=new at;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,p=3;d<=e;d++,p+=3){let h=i+d/e*r;c.x=t*Math.cos(h),c.y=t*Math.sin(h),s.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(s[p]/t+1)/2,u.y=(s[p+1]/t+1)/2,l.push(u.x,u.y)}for(let d=1;d<=e;d++)o.push(d,d+1,0);this.setIndex(o),this.setAttribute("position",new Jr(s,3)),this.setAttribute("normal",new Jr(a,3)),this.setAttribute("uv",new Jr(l,2))}static fromJSON(t){return new yb(t.radius,t.segments,t.thetaStart,t.thetaLength)}},qa=(new ie,new ie,new ie,new lo,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 s=1;s<=t;s++)i=this.getPoint(s/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 s,i=this.getLengths(),r=0,o=i.length;s=e||t*i[o-1];let c,a=0,l=o-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-s,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===s)return r/(o-1);let u=i[r];return(r+(s-u)/(i[r+1]-u))/(o-1)}getTangent(t,e){let r=t-1e-4,o=t+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),l=e||(s.isVector2?new at:new ie);return l.copy(a).sub(s).normalize(),l}getTangentAt(t,e){let i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e){let i=new ie,r=[],o=[],s=[],a=new ie,l=new Rn;for(let h=0;h<=t;h++)r[h]=this.getTangentAt(h/t,new ie);o[0]=new ie,s[0]=new ie;let c=Number.MAX_VALUE,u=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),d<=c&&(c=d,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let h=1;h<=t;h++){if(o[h]=o[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(r[h-1],r[h]),a.length()>Number.EPSILON){a.normalize();let f=Math.acos(Ga(r[h-1].dot(r[h]),-1,1));o[h].applyMatrix4(l.makeRotationAxis(a,f))}s[h].crossVectors(r[h],o[h])}if(!0===e){let h=Math.acos(Ga(o[0].dot(o[t]),-1,1));h/=t,r[0].dot(a.crossVectors(o[0],o[t]))>0&&(h=-h);for(let f=1;f<=t;f++)o[f].applyMatrix4(l.makeRotationAxis(r[f],h*f)),s[f].crossVectors(r[f],o[f])}return{tangents:r,normals:o,binormals:s}}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}}),bb=class extends qa{constructor(t=0,e=0,i=1,r=1,o=0,s=2*Math.PI,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(t,e){let i=e||new at,r=2*Math.PI,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=r;for(;o>r;)o-=r;o<Number.EPSILON&&(o=s?0:r),!0===this.aClockwise&&!s&&(o===r?o=-r:o-=r);let a=this.aStartAngle+t*o,l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){let u=Math.cos(this.aRotation),d=Math.sin(this.aRotation),p=l-this.aX,h=c-this.aY;l=p*u-h*d+this.aX,c=p*d+h*u+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}};bb.prototype.isEllipseCurve=!0;var vk=class extends bb{constructor(t,e,i,r,o,s){super(t,e,i,i,r,o,s),this.type="ArcCurve"}};function SG(){let n=0,t=0,e=0,i=0;function r(o,s,a,l){n=o,t=a,e=-3*o+3*s-2*a-l,i=2*o-2*s+a+l}return{initCatmullRom:function(o,s,a,l,c){r(s,a,c*(a-o),c*(l-s))},initNonuniformCatmullRom:function(o,s,a,l,c,u,d){let p=(s-o)/c-(a-o)/(c+u)+(a-s)/u,h=(a-s)/u-(l-s)/(u+d)+(l-a)/d;p*=u,h*=u,r(s,a,p,h)},calc:function(o){let s=o*o;return n+t*o+e*s+i*(s*o)}}}vk.prototype.isArcCurve=!0;var QO=new ie,n8=new SG,i8=new SG,r8=new SG,yk=class extends qa{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 ie){let c,u,i=e,r=this.points,o=r.length,s=(o-(this.closed?0:1))*t,a=Math.floor(s),l=s-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/o)+1)*o:0===l&&a===o-1&&(a=o-2,l=1),this.closed||a>0?c=r[(a-1)%o]:(QO.subVectors(r[0],r[1]).add(r[0]),c=QO);let d=r[a%o],p=r[(a+1)%o];if(this.closed||a+2<o?u=r[(a+2)%o]:(QO.subVectors(r[o-1],r[o-2]).add(r[o-1]),u=QO),"centripetal"===this.curveType||"chordal"===this.curveType){let h="chordal"===this.curveType?.5:.25,f=Math.pow(c.distanceToSquared(d),h),m=Math.pow(d.distanceToSquared(p),h),x=Math.pow(p.distanceToSquared(u),h);m<1e-4&&(m=1),f<1e-4&&(f=m),x<1e-4&&(x=m),n8.initNonuniformCatmullRom(c.x,d.x,p.x,u.x,f,m,x),i8.initNonuniformCatmullRom(c.y,d.y,p.y,u.y,f,m,x),r8.initNonuniformCatmullRom(c.z,d.z,p.z,u.z,f,m,x)}else"catmullrom"===this.curveType&&(n8.initCatmullRom(c.x,d.x,p.x,u.x,this.tension),i8.initCatmullRom(c.y,d.y,p.y,u.y,this.tension),r8.initCatmullRom(c.z,d.z,p.z,u.z,this.tension));return i.set(n8.calc(l),i8.calc(l),r8.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 ie).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}};function _de(n,t,e,i,r){let o=.5*(i-t),s=.5*(r-e),a=n*n;return(2*e-2*i+o+s)*(n*a)+(-3*e+3*i-2*o-s)*a+o*n+e}function zS(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 jS(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)}yk.prototype.isCatmullRomCurve3=!0;var oE=class extends qa{constructor(t=new at,e=new at,i=new at,r=new at){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new at){let i=e,r=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(jS(t,r.x,o.x,s.x,a.x),jS(t,r.y,o.y,s.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.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}};oE.prototype.isCubicBezierCurve=!0;var bk=class extends qa{constructor(t=new ie,e=new ie,i=new ie,r=new ie){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new ie){let i=e,r=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(jS(t,r.x,o.x,s.x,a.x),jS(t,r.y,o.y,s.y,a.y),jS(t,r.z,o.z,s.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.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}};bk.prototype.isCubicBezierCurve3=!0;var xb=class extends qa{constructor(t=new at,e=new at){super(),this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new at){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 at;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}};xb.prototype.isLineCurve=!0;var sE=class extends qa{constructor(t=new at,e=new at,i=new at){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new at){let i=e,r=this.v0,o=this.v1,s=this.v2;return i.set(zS(t,r.x,o.x,s.x),zS(t,r.y,o.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}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}};sE.prototype.isQuadraticBezierCurve=!0;var xk=class extends qa{constructor(t=new ie,e=new ie,i=new ie){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new ie){let i=e,r=this.v0,o=this.v1,s=this.v2;return i.set(zS(t,r.x,o.x,s.x),zS(t,r.y,o.y,s.y),zS(t,r.z,o.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}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}};xk.prototype.isQuadraticBezierCurve3=!0;var aE=class extends qa{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,e=new at){let i=e,r=this.points,o=(r.length-1)*t,s=Math.floor(o),a=o-s,l=r[0===s?s:s-1],c=r[s],u=r[s>r.length-2?r.length-1:s+1],d=r[s>r.length-3?r.length-1:s+2];return i.set(_de(a,l.x,c.x,u.x,d.x),_de(a,l.y,c.y,u.y,d.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 at).fromArray(r))}return this}};aE.prototype.isSplineCurve=!0;var qde=Object.freeze({__proto__:null,ArcCurve:vk,CatmullRomCurve3:yk,CubicBezierCurve:oE,CubicBezierCurve3:bk,EllipseCurve:bb,LineCurve:xb,LineCurve3:class extends qa{constructor(t=new ie,e=new ie){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=e}getPoint(t,e=new ie){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:sE,QuadraticBezierCurve3:xk,SplineCurve:aE}),O8=class extends qa{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 xb(e,t))}getPoint(t,e){let i=t*this.getLength(),r=this.getCurveLengths(),o=0;for(;o<r.length;){if(r[o]>=i){let s=r[o]-i,a=this.curves[o],l=a.getLength();return a.getPointAt(0===l?0:1-s/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 s=o[r],l=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(let c=0;c<l.length;c++){let u=l[c];i&&i.equals(u)||(e.push(u),i=u)}}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 qde[r.type]).fromJSON(r))}return this}},lE=class extends O8{constructor(t){super(),this.type="Path",this.currentPoint=new at,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 xb(this.currentPoint.clone(),new at(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,i,r){let o=new sE(this.currentPoint.clone(),new at(t,e),new at(i,r));return this.curves.push(o),this.currentPoint.set(i,r),this}bezierCurveTo(t,e,i,r,o,s){let a=new oE(this.currentPoint.clone(),new at(t,e),new at(i,r),new at(o,s));return this.curves.push(a),this.currentPoint.set(o,s),this}splineThru(t){let e=[this.currentPoint.clone()].concat(t),i=new aE(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,i,r,o,s){return this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,s),this}absarc(t,e,i,r,o,s){return this.absellipse(t,e,i,i,r,o,s),this}ellipse(t,e,i,r,o,s,a,l){return this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,s,a,l),this}absellipse(t,e,i,r,o,s,a,l){let c=new bb(t,e,i,r,o,s,a,l);if(this.curves.length>0){let d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.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}},Ip=class extends lE{constructor(t){super(t),this.uuid=du(),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 lE).fromJSON(r))}return this}};function Yde(n,t,e,i,r){let o,s;if(r===function(n,t,e,i){let r=0;for(let o=t,s=e-i;o<e;o+=i)r+=(n[s]-n[o])*(n[o+1]+n[s+1]),s=o;return r}(n,t,e,i)>0)for(o=t;o<e;o+=i)s=vde(o,n[o],n[o+1],s);else for(o=e-i;o>=t;o-=i)s=vde(o,n[o],n[o+1],s);return s&&Fk(s,s.next)&&(dE(s),s=s.next),s}function wf(n,t){if(!n)return n;t||(t=n);let i,e=n;do{if(i=!1,e.steiner||!Fk(e,e.next)&&0!==Zr(e.prev,e,e.next))e=e.next;else{if(dE(e),e=t=e.prev,e===e.next)break;i=!0}}while(i||e!==t);return t}function cE(n,t,e,i,r,o,s){if(!n)return;!s&&o&&function(n,t,e,i){let r=n;do{null===r.z&&(r.z=k8(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,s,a,l,c=1;do{for(e=n,n=null,o=null,s=0;e;){for(s++,i=e,a=0,t=0;t<c&&(a++,i=i.nextZ,i);t++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||e.z<=i.z)?(r=e,e=e.nextZ,a--):(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(s>1)}(r)}(n,i,r,o);let l,c,a=n;for(;n.prev!==n.next;)if(l=n.prev,c=n.next,o?D9e(n,i,r,o):T9e(n))t.push(l.i/e),t.push(n.i/e),t.push(c.i/e),dE(n),n=c.next,a=c.next;else if((n=c)===a){s?1===s?cE(n=A9e(wf(n),t,e),t,e,i,r,o,2):2===s&&I9e(n,t,e,i,r,o):cE(wf(n),t,e,i,r,o,1);break}}function T9e(n){let t=n.prev,e=n,i=n.next;if(Zr(t,e,i)>=0)return!1;let r=n.next.next;for(;r!==n.prev;){if(ab(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y)&&Zr(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function D9e(n,t,e,i){let r=n.prev,o=n,s=n.next;if(Zr(r,o,s)>=0)return!1;let c=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,u=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,d=k8(r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,t,e,i),p=k8(c,u,t,e,i),h=n.prevZ,f=n.nextZ;for(;h&&h.z>=d&&f&&f.z<=p;){if(h!==n.prev&&h!==n.next&&ab(r.x,r.y,o.x,o.y,s.x,s.y,h.x,h.y)&&Zr(h.prev,h,h.next)>=0||(h=h.prevZ,f!==n.prev&&f!==n.next&&ab(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Zr(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;h&&h.z>=d;){if(h!==n.prev&&h!==n.next&&ab(r.x,r.y,o.x,o.y,s.x,s.y,h.x,h.y)&&Zr(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=p;){if(f!==n.prev&&f!==n.next&&ab(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Zr(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function A9e(n,t,e){let i=n;do{let r=i.prev,o=i.next.next;!Fk(r,o)&&Xde(r,i,i.next,o)&&uE(r,o)&&uE(o,r)&&(t.push(r.i/e),t.push(i.i/e),t.push(o.i/e),dE(i),dE(i.next),i=n=o),i=i.next}while(i!==n);return wf(i)}function I9e(n,t,e,i,r,o){let s=n;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&V9e(s,a)){let l=Qde(s,a);return s=wf(s,s.next),l=wf(l,l.next),cE(s,t,e,i,r,o),void cE(l,t,e,i,r,o)}a=a.next}s=s.next}while(s!==n)}function R9e(n,t){return n.x-t.x}function O9e(n,t){if(t=function(n,t){let s,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}s=e.x<e.next.x?e:e.next}}e=e.next}while(e!==t);if(!s)return null;if(i===o)return s;let d,a=s,l=s.x,c=s.y,u=1/0;e=s;do{i>=e.x&&e.x>=l&&i!==e.x&&ab(r<c?i:o,r,l,c,r<c?o:i,r,e.x,e.y)&&(d=Math.abs(r-e.y)/(i-e.x),uE(e,n)&&(d<u||d===u&&(e.x>s.x||e.x===s.x&&F9e(s,e)))&&(s=e,u=d)),e=e.next}while(e!==a);return s}(n,t),t){let e=Qde(t,n);wf(t,t.next),wf(e,e.next)}}function F9e(n,t){return Zr(n.prev,n,t.prev)<0&&Zr(t.next,n,n.next)<0}function k8(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 B9e(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 ab(n,t,e,i,r,o,s,a){return(r-s)*(t-a)-(n-s)*(o-a)>=0&&(n-s)*(i-a)-(e-s)*(t-a)>=0&&(e-s)*(o-a)-(r-s)*(i-a)>=0}function V9e(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&&Xde(e,e.next,n,t))return!0;e=e.next}while(e!==n);return!1}(n,t)&&(uE(n,t)&&uE(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)&&(Zr(n.prev,n,t.prev)||Zr(n,t.prev,t))||Fk(n,t)&&Zr(n.prev,n,n.next)>0&&Zr(t.prev,t,t.next)>0)}function Zr(n,t,e){return(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y)}function Fk(n,t){return n.x===t.x&&n.y===t.y}function Xde(n,t,e,i){let r=ZO(Zr(n,t,e)),o=ZO(Zr(n,t,i)),s=ZO(Zr(e,i,n)),a=ZO(Zr(e,i,t));return!!(r!==o&&s!==a||0===r&&KO(n,e,t)||0===o&&KO(n,i,t)||0===s&&KO(e,n,i)||0===a&&KO(e,t,i))}function KO(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 ZO(n){return n>0?1:n<0?-1:0}function uE(n,t){return Zr(n.prev,n,n.next)<0?Zr(n,t,n.next)>=0&&Zr(n,n.prev,t)>=0:Zr(n,t,n.prev)<0||Zr(n,n.next,t)<0}function Qde(n,t){let e=new F8(n.i,n.x,n.y),i=new F8(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 vde(n,t,e,i){let r=new F8(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 dE(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 F8(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 Ed=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 Ed.area(t)<0}static triangulateShape(t,e){let i=[],r=[],o=[];yde(t),bde(i,t);let s=t.length;e.forEach(yde);for(let l=0;l<e.length;l++)r.push(s),s+=e[l].length,bde(i,e[l]);let a=function(n,t,e=2){let a,l,c,u,d,p,h,i=t&&t.length,r=i?t[0]*e:n.length,o=Yde(n,0,r,e,!0),s=[];if(!o||o.next===o.prev)return s;if(i&&(o=function(n,t,e,i){let o,s,a,l,c,r=[];for(o=0,s=t.length;o<s;o++)a=t[o]*i,l=o<s-1?t[o+1]*i:n.length,c=Yde(n,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(B9e(c));for(r.sort(R9e),o=0;o<r.length;o++)O9e(r[o],e),e=wf(e,e.next);return e}(n,t,o,e)),n.length>80*e){a=c=n[0],l=u=n[1];for(let f=e;f<r;f+=e)d=n[f],p=n[f+1],d<a&&(a=d),p<l&&(l=p),d>c&&(c=d),p>u&&(u=p);h=Math.max(c-a,u-l),h=0!==h?1/h:0}return cE(o,s,e,a,l,h),s}(i,r);for(let l=0;l<a.length;l+=3)o.push(a.slice(l,l+3));return o}};function yde(n){let t=n.length;t>2&&n[t-1].equals(n[0])&&n.pop()}function bde(n,t){for(let e=0;e<t.length;e++)n.push(t[e].x),n.push(t[e].y)}var Sf=class extends nr{constructor(t=new Ip([new at(.5,.5),new at(-.5,.5),new at(-.5,-.5),new at(.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 a=0,l=t.length;a<l;a++)s(t[a]);function s(a){let l=[],c=void 0!==e.curveSegments?e.curveSegments:12,u=void 0!==e.steps?e.steps:1,d=void 0!==e.depth?e.depth:1,p=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:.2,f=void 0!==e.bevelSize?e.bevelSize:h-.1,m=void 0!==e.bevelOffset?e.bevelOffset:0,x=void 0!==e.bevelSegments?e.bevelSegments:3,g=e.extrudePath,b=void 0!==e.UVGenerator?e.UVGenerator:j9e;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),d=e.amount);let D,k,Z,z,fe,T=!1;g&&(D=g.getSpacedPoints(u),T=!0,p=!1,k=g.computeFrenetFrames(u,!1),Z=new ie,z=new ie,fe=new ie),p||(x=0,h=0,f=0,m=0);let ue=a.extractPoints(c),he=ue.shape,w=ue.holes;if(!Ed.isClockWise(he)){he=he.reverse();for(let ce=0,dt=w.length;ce<dt;ce++){let We=w[ce];Ed.isClockWise(We)&&(w[ce]=We.reverse())}}let q=Ed.triangulateShape(he,w),K=he;for(let ce=0,dt=w.length;ce<dt;ce++)he=he.concat(w[ce]);function de(ce,dt,We){return dt||console.error("THREE.ExtrudeGeometry: vec does not exist"),dt.clone().multiplyScalar(We).add(ce)}let Y=he.length,ae=q.length;function le(ce,dt,We){let Mt,bt,hn,on=ce.x-dt.x,fi=ce.y-dt.y,Wi=We.x-ce.x,qi=We.y-ce.y,ee=on*on+fi*fi;if(Math.abs(on*qi-fi*Wi)>Number.EPSILON){let Xe=Math.sqrt(ee),Tt=Math.sqrt(Wi*Wi+qi*qi),mn=dt.x-fi/Xe,qe=dt.y+on/Xe,zt=((We.x-qi/Tt-mn)*qi-(We.y+Wi/Tt-qe)*Wi)/(on*qi-fi*Wi);Mt=mn+on*zt-ce.x,bt=qe+fi*zt-ce.y;let Ut=Mt*Mt+bt*bt;if(Ut<=2)return new at(Mt,bt);hn=Math.sqrt(Ut/2)}else{let Xe=!1;on>Number.EPSILON?Wi>Number.EPSILON&&(Xe=!0):on<-Number.EPSILON?Wi<-Number.EPSILON&&(Xe=!0):Math.sign(fi)===Math.sign(qi)&&(Xe=!0),Xe?(Mt=-fi,bt=on,hn=Math.sqrt(ee)):(Mt=on,bt=fi,hn=Math.sqrt(ee/2))}return new at(Mt/hn,bt/hn)}let Ie=[];for(let ce=0,dt=K.length,We=dt-1,Mt=ce+1;ce<dt;ce++,We++,Mt++)We===dt&&(We=0),Mt===dt&&(Mt=0),Ie[ce]=le(K[ce],K[We],K[Mt]);let De,ve=[],nt=Ie.concat();for(let ce=0,dt=w.length;ce<dt;ce++){let We=w[ce];De=[];for(let Mt=0,bt=We.length,hn=bt-1,on=Mt+1;Mt<bt;Mt++,hn++,on++)hn===bt&&(hn=0),on===bt&&(on=0),De[Mt]=le(We[Mt],We[hn],We[on]);ve.push(De),nt=nt.concat(De)}for(let ce=0;ce<x;ce++){let dt=ce/x,We=h*Math.cos(dt*Math.PI/2),Mt=f*Math.sin(dt*Math.PI/2)+m;for(let bt=0,hn=K.length;bt<hn;bt++){let on=de(K[bt],Ie[bt],Mt);pt(on.x,on.y,-We)}for(let bt=0,hn=w.length;bt<hn;bt++){let on=w[bt];De=ve[bt];for(let fi=0,Wi=on.length;fi<Wi;fi++){let qi=de(on[fi],De[fi],Mt);pt(qi.x,qi.y,-We)}}}let gt=f+m;for(let ce=0;ce<Y;ce++){let dt=p?de(he[ce],nt[ce],gt):he[ce];T?(z.copy(k.normals[0]).multiplyScalar(dt.x),Z.copy(k.binormals[0]).multiplyScalar(dt.y),fe.copy(D[0]).add(z).add(Z),pt(fe.x,fe.y,fe.z)):pt(dt.x,dt.y,0)}for(let ce=1;ce<=u;ce++)for(let dt=0;dt<Y;dt++){let We=p?de(he[dt],nt[dt],gt):he[dt];T?(z.copy(k.normals[ce]).multiplyScalar(We.x),Z.copy(k.binormals[ce]).multiplyScalar(We.y),fe.copy(D[ce]).add(z).add(Z),pt(fe.x,fe.y,fe.z)):pt(We.x,We.y,d/u*ce)}for(let ce=x-1;ce>=0;ce--){let dt=ce/x,We=h*Math.cos(dt*Math.PI/2),Mt=f*Math.sin(dt*Math.PI/2)+m;for(let bt=0,hn=K.length;bt<hn;bt++){let on=de(K[bt],Ie[bt],Mt);pt(on.x,on.y,d+We)}for(let bt=0,hn=w.length;bt<hn;bt++){let on=w[bt];De=ve[bt];for(let fi=0,Wi=on.length;fi<Wi;fi++){let qi=de(on[fi],De[fi],Mt);T?pt(qi.x,qi.y+D[u-1].y,D[u-1].x+We):pt(qi.x,qi.y,d+We)}}}function tn(ce,dt){let We=ce.length;for(;--We>=0;){let Mt=We,bt=We-1;bt<0&&(bt=ce.length-1);for(let hn=0,on=u+2*x;hn<on;hn++){let fi=Y*hn,Wi=Y*(hn+1);Te(dt+Mt+fi,dt+bt+fi,dt+bt+Wi,dt+Mt+Wi)}}}function pt(ce,dt,We){l.push(ce),l.push(dt),l.push(We)}function wt(ce,dt,We){xt(ce),xt(dt),xt(We);let Mt=r.length/3,bt=b.generateTopUV(i,r,Mt-3,Mt-2,Mt-1);mt(bt[0]),mt(bt[1]),mt(bt[2])}function Te(ce,dt,We,Mt){xt(ce),xt(dt),xt(Mt),xt(dt),xt(We),xt(Mt);let bt=r.length/3,hn=b.generateSideWallUV(i,r,bt-6,bt-3,bt-2,bt-1);mt(hn[0]),mt(hn[1]),mt(hn[3]),mt(hn[1]),mt(hn[2]),mt(hn[3])}function xt(ce){r.push(l[3*ce+0]),r.push(l[3*ce+1]),r.push(l[3*ce+2])}function mt(ce){o.push(ce.x),o.push(ce.y)}(function(){let ce=r.length/3;if(p){let dt=0,We=Y*dt;for(let Mt=0;Mt<ae;Mt++){let bt=q[Mt];wt(bt[2]+We,bt[1]+We,bt[0]+We)}dt=u+2*x,We=Y*dt;for(let Mt=0;Mt<ae;Mt++){let bt=q[Mt];wt(bt[0]+We,bt[1]+We,bt[2]+We)}}else{for(let dt=0;dt<ae;dt++){let We=q[dt];wt(We[2],We[1],We[0])}for(let dt=0;dt<ae;dt++){let We=q[dt];wt(We[0]+Y*u,We[1]+Y*u,We[2]+Y*u)}}i.addGroup(ce,r.length/3-ce,0)})(),function(){let ce=r.length/3,dt=0;tn(K,dt),dt+=K.length;for(let We=0,Mt=w.length;We<Mt;We++){let bt=w[We];tn(bt,dt),dt+=bt.length}i.addGroup(ce,r.length/3-ce,1)}()}this.setAttribute("position",new Jr(r,3)),this.setAttribute("uv",new Jr(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,s=t.shapes.length;o<s;o++)i.push(e[t.shapes[o]]);let r=t.options.extrudePath;return void 0!==r&&(t.options.extrudePath=(new qde[r.type]).fromJSON(r)),new Sf(i,t.options)}},j9e={generateTopUV:function(n,t,e,i,r){let a=t[3*i],l=t[3*i+1],c=t[3*r],u=t[3*r+1];return[new at(t[3*e],t[3*e+1]),new at(a,l),new at(c,u)]},generateSideWallUV:function(n,t,e,i,r,o){let s=t[3*e],a=t[3*e+1],l=t[3*e+2],c=t[3*i],u=t[3*i+1],d=t[3*i+2],p=t[3*r],h=t[3*r+1],f=t[3*r+2],m=t[3*o],x=t[3*o+1],g=t[3*o+2];return Math.abs(a-u)<Math.abs(s-c)?[new at(s,1-l),new at(c,1-d),new at(p,1-f),new at(m,1-g)]:[new at(a,1-l),new at(u,1-d),new at(h,1-f),new at(x,1-g)]}},Qg=class extends nr{constructor(t=new Ip([new at(0,.5),new at(-.5,-.5),new at(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};let i=[],r=[],o=[],s=[],a=0,l=0;if(!1===Array.isArray(t))c(t);else for(let u=0;u<t.length;u++)c(t[u]),this.addGroup(a,l,u),a+=l,l=0;function c(u){let d=r.length/3,p=u.extractPoints(e),h=p.shape,f=p.holes;!1===Ed.isClockWise(h)&&(h=h.reverse());for(let x=0,g=f.length;x<g;x++){let b=f[x];!0===Ed.isClockWise(b)&&(f[x]=b.reverse())}let m=Ed.triangulateShape(h,f);for(let x=0,g=f.length;x<g;x++)h=h.concat(f[x]);for(let x=0,g=h.length;x<g;x++){let b=h[x];r.push(b.x,b.y,0),o.push(0,0,1),s.push(b.x,b.y)}for(let x=0,g=m.length;x<g;x++){let b=m[x];i.push(b[0]+d,b[1]+d,b[2]+d),l+=3}}this.setIndex(i),this.setAttribute("position",new Jr(r,3)),this.setAttribute("normal",new Jr(o,3)),this.setAttribute("uv",new Jr(s,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 Qg(i,t.curveSegments)}};(class extends hs{constructor(t){super(),this.type="ShadowMaterial",this.color=new vn(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}}).prototype.isShadowMaterial=!0;var Ck=class extends hs{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new vn(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 vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new at(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}};Ck.prototype.isMeshStandardMaterial=!0,class extends Ck{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new at(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ga(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new vn(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 vn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new vn(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 hs{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new vn(16777215),this.specular=new vn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new at(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,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 hs{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new vn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new at(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 hs{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new at(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 hs{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new vn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,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 hs{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new vn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new at(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 Ap{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 qr={arraySlice:function(n,t,e){return qr.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,s=0;s!==i;++o){let a=e[o]*t;for(let l=0;l!==t;++l)r[s++]=n[a+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 s=o[i];if(void 0!==s)if(Array.isArray(s))do{s=o[i],void 0!==s&&(t.push(o.time),e.push.apply(e,s)),o=n[r++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[i],void 0!==s&&(t.push(o.time),s.toArray(e,e.length)),o=n[r++]}while(void 0!==o);else do{s=o[i],void 0!==s&&(t.push(o.time),e.push(s)),o=n[r++]}while(void 0!==o)},subclip:function(n,t,e,i,r=30){let o=n.clone();o.name=t;let s=[];for(let l=0;l<o.tracks.length;++l){let c=o.tracks[l],u=c.getValueSize(),d=[],p=[];for(let h=0;h<c.times.length;++h){let f=c.times[h]*r;if(!(f<e||f>=i)){d.push(c.times[h]);for(let m=0;m<u;++m)p.push(c.values[h*u+m])}}0!==d.length&&(c.times=qr.convertArray(d,c.times.constructor),c.values=qr.convertArray(p,c.values.constructor),s.push(c))}o.tracks=s;let a=1/0;for(let l=0;l<o.tracks.length;++l)a>o.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*a);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 s=0;s<r;++s){let a=e.tracks[s],l=a.ValueTypeName;if("bool"===l||"string"===l)continue;let c=n.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(void 0===c)continue;let u=0,d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=d/3);let p=0,h=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=h/3);let m,f=a.times.length-1;if(o<=a.times[0])m=qr.arraySlice(a.values,u,d-u);else if(o>=a.times[f]){let g=f*d+u;m=qr.arraySlice(a.values,g,g+d-u)}else{let g=a.createInterpolant(),b=u,D=d-u;g.evaluate(o),m=qr.arraySlice(g.resultBuffer,b,D)}"quaternion"===l&&(new qs).fromArray(m).normalize().conjugate().toArray(m);let x=c.times.length;for(let g=0;g<x;++g){let b=g*h+p;if("quaternion"===l)qs.multiplyQuaternionsFlat(c.values,b,m,0,c.values,b);else{let D=h-2*p;for(let T=0;T<D;++T)c.values[b+T]-=m[T]}}}return n.blendMode=2501,n}},Td=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 s;n:{i:if(!(t<r)){for(let a=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===a)break;if(o=r,r=e[++i],t<r)break t}s=e.length;break n}if(t>=o)break e;{let a=e[1];t<a&&(i=2,o=a);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}s=i,i=0}}for(;i<s;){let a=i+s>>>1;t<e[a]?s=a:i=a+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 s=0;s!==r;++s)e[s]=i[o+s];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};Td.prototype.beforeStart_=Td.prototype.copySampleValue_,Td.prototype.afterEnd_=Td.prototype.copySampleValue_;var G8=class extends Td{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:ob,endingEnd:ob}}intervalChanged_(t,e,i){let r=this.parameterPositions,o=t-2,s=t+1,a=r[o],l=r[s];if(void 0===a)switch(this.getSettings_().endingStart){case sb:o=t,a=2*e-i;break;case 2402:o=r.length-2,a=e+r[o]-r[o+1];break;default:o=t,a=i}if(void 0===l)switch(this.getSettings_().endingEnd){case sb:s=t,l=2*i-e;break;case 2402:s=1,l=i+r[1]-r[0];break;default:s=t-1,l=e}let c=.5*(i-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-i),this._offsetPrev=o*u,this._offsetNext=s*u}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=this._offsetPrev,d=this._offsetNext,p=this._weightPrev,h=this._weightNext,f=(i-e)/(r-e),m=f*f,x=m*f,g=-p*x+2*p*m-p*f,b=(1+p)*x+(-1.5-2*p)*m+(-.5+p)*f+1,D=(-1-h)*x+(1.5+h)*m+.5*f,T=h*x-h*m;for(let k=0;k!==a;++k)o[k]=g*s[u+k]+b*s[c+k]+D*s[l+k]+T*s[d+k];return o}},Mk=class extends Td{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=(i-e)/(r-e),d=1-u;for(let p=0;p!==a;++p)o[p]=s[c+p]*d+s[l+p]*u;return o}},W8=class extends Td{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t){return this.copySampleValue_(t-1)}},hc=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=qr.convertArray(e,this.TimeBufferType),this.values=qr.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:qr.convertArray(t.times,Array),values:qr.convertArray(t.values,Array)};let r=t.getInterpolation();r!==t.DefaultInterpolation&&(i.interpolation=r)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new W8(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Mk(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new G8(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,s=r-1;for(;o!==r&&i[o]<t;)++o;for(;-1!==s&&i[s]>e;)--s;if(++s,0!==o||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=qr.arraySlice(i,o,s),this.values=qr.arraySlice(this.values,o*a,s*a)}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 s=null;for(let a=0;a!==o;a++){let l=i[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(null!==s&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),t=!1;break}s=l}if(void 0!==r&&qr.isTypedArray(r))for(let a=0,l=r.length;a!==l;++a){let c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=qr.arraySlice(this.times),e=qr.arraySlice(this.values),i=this.getValueSize(),r=2302===this.getInterpolation(),o=t.length-1,s=1;for(let a=1;a<o;++a){let l=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==t[0]))if(r)l=!0;else{let d=a*i,p=d-i,h=d+i;for(let f=0;f!==i;++f){let m=e[d+f];if(m!==e[p+f]||m!==e[h+f]){l=!0;break}}}if(l){if(a!==s){t[s]=t[a];let d=a*i,p=s*i;for(let h=0;h!==i;++h)e[p+h]=e[d+h]}++s}}if(o>0){t[s]=t[o];for(let a=o*i,l=s*i,c=0;c!==i;++c)e[l+c]=e[a+c];++s}return s!==t.length?(this.times=qr.arraySlice(t,0,s),this.values=qr.arraySlice(e,0,s*i)):(this.times=t,this.values=e),this}clone(){let t=qr.arraySlice(this.times,0),e=qr.arraySlice(this.values,0),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}};hc.prototype.TimeBufferType=Float32Array,hc.prototype.ValueBufferType=Float32Array,hc.prototype.DefaultInterpolation=2301;var Ef=class extends hc{};Ef.prototype.ValueTypeName="bool",Ef.prototype.ValueBufferType=Array,Ef.prototype.DefaultInterpolation=2300,Ef.prototype.InterpolantFactoryMethodLinear=void 0,Ef.prototype.InterpolantFactoryMethodSmooth=void 0;var wk=class extends hc{};wk.prototype.ValueTypeName="color";var Cb=class extends hc{};Cb.prototype.ValueTypeName="number";var q8=class extends Td{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(i-e)/(r-e),c=t*a;for(let u=c+a;c!==u;c+=4)qs.slerpFlat(o,0,s,c-a,s,c,l);return o}},Kg=class extends hc{InterpolantFactoryMethodLinear(t){return new q8(this.times,this.values,this.getValueSize(),t)}};Kg.prototype.ValueTypeName="quaternion",Kg.prototype.DefaultInterpolation=2301,Kg.prototype.InterpolantFactoryMethodSmooth=void 0;var Tf=class extends hc{};Tf.prototype.ValueTypeName="string",Tf.prototype.ValueBufferType=Array,Tf.prototype.DefaultInterpolation=2300,Tf.prototype.InterpolantFactoryMethodLinear=void 0,Tf.prototype.InterpolantFactoryMethodSmooth=void 0;var Mb=class extends hc{};Mb.prototype.ValueTypeName="vector";var Sk=class{constructor(t,e=-1,i,r=2500){this.name=t,this.tracks=i,this.duration=e,this.blendMode=r,this.uuid=du(),this.duration<0&&this.resetDuration()}static parse(t){let e=[],i=t.tracks,r=1/(t.fps||1);for(let s=0,a=i.length;s!==a;++s)e.push(Y9e(i[s]).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,s=i.length;o!==s;++o)e.push(hc.toJSON(i[o]));return r}static CreateFromMorphTargetSequence(t,e,i,r){let o=e.length,s=[];for(let a=0;a<o;a++){let l=[],c=[];l.push((a+o-1)%o,a,(a+1)%o),c.push(0,1,0);let u=qr.getKeyframeOrder(l);l=qr.sortedArray(l,1,u),c=qr.sortedArray(c,1,u),!r&&0===l[0]&&(l.push(o),c.push(c[0])),s.push(new Cb(".morphTargetInfluences["+e[a].name+"]",l,c).scale(1/i))}return new this(t,-1,s)}static findByName(t,e){let i=t;if(!Array.isArray(t)){let r=t;i=r.geometry&&r.geometry.animations||r.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 a=0,l=t.length;a<l;a++){let c=t[a],u=c.name.match(o);if(u&&u.length>1){let d=u[1],p=r[d];p||(r[d]=p=[]),p.push(c)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],e,i));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(d,p,h,f,m){if(0!==h.length){let x=[],g=[];qr.flattenJSON(h,x,g,f),0!==x.length&&m.push(new d(p,x,g))}},r=[],o=t.name||"default",s=t.fps||30,a=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let d=0;d<c.length;d++){let p=c[d].keys;if(p&&0!==p.length)if(p[0].morphTargets){let f,h={};for(f=0;f<p.length;f++)if(p[f].morphTargets)for(let m=0;m<p[f].morphTargets.length;m++)h[p[f].morphTargets[m]]=-1;for(let m in h){let x=[],g=[];for(let b=0;b!==p[f].morphTargets.length;++b){let D=p[f];x.push(D.time),g.push(D.morphTarget===m?1:0)}r.push(new Cb(".morphTargetInfluence["+m+"]",x,g))}l=h.length*(s||1)}else{let h=".bones["+e[d].name+"]";i(Mb,h+".position",p,"pos",r),i(Kg,h+".quaternion",p,"rot",r),i(Mb,h+".scale",p,"scl",r)}}return 0===r.length?null:new this(o,l,r,a)}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 Y9e(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 Cb;case"vector":case"vector2":case"vector3":case"vector4":return Mb;case"color":return wk;case"quaternion":return Kg;case"bool":case"boolean":return Ef;case"string":return Tf}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}(n.type);if(void 0===n.times){let e=[],i=[];qr.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 wb={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={}}},X9e=new class{constructor(t,e,i){let l,r=this,o=!1,s=0,a=0,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(u){a++,!1===o&&void 0!==r.onStart&&r.onStart(u,s,a),o=!0},this.itemEnd=function(u){s++,void 0!==r.onProgress&&r.onProgress(u,s,a),s===a&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(u){void 0!==r.onError&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,d){return c.push(u,d),this},this.removeHandler=function(u){let d=c.indexOf(u);return-1!==d&&c.splice(d,2),this},this.getHandler=function(u){for(let d=0,p=c.length;d<p;d+=2){let h=c[d],f=c[d+1];if(h.global&&(h.lastIndex=0),h.test(u))return f}return null}}},Dd=class{constructor(t){this.manager=void 0!==t?t:X9e,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}},Sp={},X8=class extends Dd{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=wb.get(t);if(void 0!==o)return this.manager.itemStart(t),setTimeout(()=>{e&&e(o),this.manager.itemEnd(t)},0),o;if(void 0!==Sp[t])return void Sp[t].push({onLoad:e,onProgress:i,onError:r});Sp[t]=[],Sp[t].push({onLoad:e,onProgress:i,onError:r});let s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).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 u=Sp[t],d=c.body.getReader(),p=c.headers.get("Content-Length"),h=p?parseInt(p):0,f=0!==h,m=0,x=new ReadableStream({start(g){!function b(){d.read().then(({done:D,value:T})=>{if(D)g.close();else{m+=T.byteLength;let k=new ProgressEvent("progress",{lengthComputable:f,loaded:m,total:h});for(let Z=0,z=u.length;Z<z;Z++){let fe=u[Z];fe.onProgress&&fe.onProgress(k)}g.enqueue(T),b()}})}()}});return new Response(x)}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,a));case"json":return c.json();default:if(void 0===a)return c.text();{let d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,h=new TextDecoder(p);return c.arrayBuffer().then(f=>h.decode(f))}}}).then(c=>{wb.add(t,c);let u=Sp[t];delete Sp[t];for(let d=0,p=u.length;d<p;d++){let h=u[d];h.onLoad&&h.onLoad(c)}}).catch(c=>{let u=Sp[t];if(void 0===u)throw this.manager.itemError(t),c;delete Sp[t];for(let d=0,p=u.length;d<p;d++){let h=u[d];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}},Ek=class extends Dd{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,s=wb.get(t);if(void 0!==s)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;let a=YS("img");function l(){u(),wb.add(t,this),e&&e(this),o.manager.itemEnd(t)}function c(d){u(),r&&r(d),o.manager.itemError(t),o.manager.itemEnd(t)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(t),a.src=t,a}},Q8=class extends Dd{constructor(t){super(t)}load(t,e,i,r){let o=new mb,s=new Ek(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let a=0;function l(c){s.load(t[c],function(u){o.images[c]=u,a++,6===a&&(o.needsUpdate=!0,e&&e(o))},void 0,r)}for(let c=0;c<t.length;++c)l(c);return o}},K8=class extends Dd{constructor(t){super(t)}load(t,e,i,r){let o=new Ho,s=new Ek(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(a){o.image=a,o.needsUpdate=!0,void 0!==e&&e(o)},i,r),o}},fc=class extends Xi{constructor(t,e=1){super(),this.type="Light",this.color=new vn(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}};fc.prototype.isLight=!0,class extends fc{constructor(t,e,i){super(t,i),this.type="HemisphereLight",this.position.copy(Xi.DefaultUp),this.updateMatrix(),this.groundColor=new vn(e)}copy(t){return fc.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}.prototype.isHemisphereLight=!0;var xde=new Rn,Cde=new ie,Mde=new ie,pE=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new at(512,512),this.map=null,this.mapPass=null,this.matrix=new Rn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new gb,this._frameExtents=new at(1,1),this._viewportCount=1,this._viewports=[new ar(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,i=this.matrix;Cde.setFromMatrixPosition(t.matrixWorld),e.position.copy(Cde),Mde.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Mde),e.updateMatrixWorld(),xde.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(xde),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}},Tk=class extends pE{constructor(){super(new Ws(50,1,.5,500)),this.focus=1}updateMatrices(t){let e=this.camera,i=2*h8*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}};Tk.prototype.isSpotLightShadow=!0,class extends fc{constructor(t,e,i=0,r=Math.PI/3,o=0,s=1){super(t,e),this.type="SpotLight",this.position.copy(Xi.DefaultUp),this.updateMatrix(),this.target=new Xi,this.distance=i,this.angle=r,this.penumbra=o,this.decay=s,this.shadow=new Tk}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 wde=new Rn,LS=new ie,o8=new ie,Dk=class extends pE{constructor(){super(new Ws(90,1,.5,500)),this._frameExtents=new at(4,2),this._viewportCount=6,this._viewports=[new ar(2,1,1,1),new ar(0,1,1,1),new ar(3,1,1,1),new ar(1,1,1,1),new ar(3,0,1,1),new ar(1,0,1,1)],this._cubeDirections=[new ie(1,0,0),new ie(-1,0,0),new ie(0,0,1),new ie(0,0,-1),new ie(0,1,0),new ie(0,-1,0)],this._cubeUps=[new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,0,1),new ie(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()),LS.setFromMatrixPosition(t.matrixWorld),i.position.copy(LS),o8.copy(i.position),o8.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(o8),i.updateMatrixWorld(),r.makeTranslation(-LS.x,-LS.y,-LS.z),wde.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(wde)}};Dk.prototype.isPointLightShadow=!0,class extends fc{constructor(t,e,i=0,r=1){super(t,e),this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new Dk}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 Ak=class extends pE{constructor(){super(new qg(-5,5,5,-5,.5,500))}};Ak.prototype.isDirectionalLightShadow=!0,class extends fc{constructor(t,e){super(t,e),this.type="DirectionalLight",this.position.copy(Xi.DefaultUp),this.updateMatrix(),this.target=new Xi,this.shadow=new Ak}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 fc{constructor(t,e){super(t,e),this.type="AmbientLight"}}.prototype.isAmbientLight=!0,class extends fc{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 Ik=class{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new ie)}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,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*r),e.addScaledVector(s[2],.488603*o),e.addScaledVector(s[3],.488603*i),e.addScaledVector(s[4],i*r*1.092548),e.addScaledVector(s[5],r*o*1.092548),e.addScaledVector(s[6],.315392*(3*o*o-1)),e.addScaledVector(s[7],i*o*1.092548),e.addScaledVector(s[8],.546274*(i*i-r*r)),e}getIrradianceAt(t,e){let i=t.x,r=t.y,o=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*r),e.addScaledVector(s[2],1.023328*o),e.addScaledVector(s[3],1.023328*i),e.addScaledVector(s[4],.858086*i*r),e.addScaledVector(s[5],.858086*r*o),e.addScaledVector(s[6],.743125*o*o-.247708),e.addScaledVector(s[7],.858086*i*o),e.addScaledVector(s[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)}};Ik.prototype.isSphericalHarmonics3=!0;var hE=class extends fc{constructor(t=new Ik,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}};hE.prototype.isLightProbe=!0;var iG=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 nr{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 Dd{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,s=wb.get(t);if(void 0!==s)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;let a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(t,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){wb.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 JO,sG=class extends Dd{constructor(t){super(t)}load(t,e,i,r){let o=this,s=new X8(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(a){try{let l=a.slice(0);(void 0===JO&&(JO=new(window.AudioContext||window.webkitAudioContext)),JO).decodeAudioData(l,function(u){e(u)})}catch(l){r?r(l):console.error(l),o.manager.itemError(t)}},i,r)}};(class extends hE{constructor(t,e,i=1){super(void 0,i);let r=(new vn).set(t),o=(new vn).set(e),s=new ie(r.r,r.g,r.b),a=new ie(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}}).prototype.isHemisphereLightProbe=!0,class extends hE{constructor(t,e=1){super(void 0,e);let i=(new vn).set(t);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}.prototype.isAmbientLightProbe=!0;var dG=class{constructor(t,e,i){let r,o,s;switch(this.binding=t,this.valueSize=i,e){case"quaternion":r=this._slerp,o=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":r=this._select,o=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*i);break;default:r=this._lerp,o=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=o,this._setIdentity=s,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,s=this.cumulativeWeight;if(0===s){for(let a=0;a!==r;++a)i[o+a]=i[a];s=e}else s+=e,this._mixBufferRegion(i,o,0,e/s,r);this.cumulativeWeight=s}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,s=this.cumulativeWeightAdditive,a=this.binding;this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1&&this._mixBufferRegion(i,r,e*this._origIndex,1-o,e),s>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]){a.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,s=r;o!==s;++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 s=0;s!==o;++s)t[e+s]=t[i+s]}_slerp(t,e,i,r){qs.slerpFlat(t,e,t,e,t,i,r)}_slerpAdditive(t,e,i,r,o){let s=this._workIndex*o;qs.multiplyQuaternionsFlat(t,s,t,e,t,i),qs.slerpFlat(t,e,t,e,t,s,r)}_lerp(t,e,i,r,o){let s=1-r;for(let a=0;a!==o;++a){let l=e+a;t[l]=t[l]*s+t[i+a]*r}}_lerpAdditive(t,e,i,r,o){for(let s=0;s!==o;++s){let a=e+s;t[a]=t[a]+t[i+s]*r}}},EG="\\[\\]\\.:\\/",K9e=new RegExp("["+EG+"]","g"),TG="[^"+EG+"]",Z9e="[^"+EG.replace("\\.","")+"]",J9e=/((?:WC+[\/:])*)/.source.replace("WC",TG),$9e=/(WCOD+)?/.source.replace("WCOD",Z9e),eqe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",TG),tqe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",TG),nqe=new RegExp("^"+J9e+$9e+eqe+tqe+"$"),iqe=["material","materials","bones"],pG=class{constructor(t,e,i){let r=i||Lr.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()}},Lr=(()=>{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(K9e,"")}static parseTrackName(e){let i=nqe.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 s=r.nodeName.substring(o+1);-1!==iqe.indexOf(s)&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}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(s){for(let a=0;a<s.length;a++){let l=s[a];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,s=r.length;o!==s;++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,s=r.length;o!==s;++o)r[o]=e[i++]}_setValue_array_setNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++o)r[o]=e[i++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++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,s=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 u=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 d=0;d<e.length;d++)if(e[d].name===u){u=d;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!==u){if(void 0===e[u])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[u]}}let a=e[o];if(void 0===a)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!==s){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[s]&&(s=e.morphTargetDictionary[s])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=s}else void 0!==a.fromArray&&void 0!==a.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):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=pG,n})();Lr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Lr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Lr.prototype.GetterByBindingType=[Lr.prototype._getValue_direct,Lr.prototype._getValue_array,Lr.prototype._getValue_arrayElement,Lr.prototype._getValue_toArray],Lr.prototype.SetterByBindingTypeAndVersioning=[[Lr.prototype._setValue_direct,Lr.prototype._setValue_direct_setNeedsUpdate,Lr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Lr.prototype._setValue_array,Lr.prototype._setValue_array_setNeedsUpdate,Lr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Lr.prototype._setValue_arrayElement,Lr.prototype._setValue_arrayElement_setNeedsUpdate,Lr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Lr.prototype._setValue_fromArray,Lr.prototype._setValue_fromArray_setNeedsUpdate,Lr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],class extends Ep{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,s=t._propertyBindings,a=t._interpolants,l=i.uuid,c=this._bindingsByRootAndName,u=c[l];void 0===u&&(u={},c[l]=u);for(let d=0;d!==o;++d){let p=r[d],h=p.name,f=u[h];if(void 0!==f)++f.referenceCount,s[d]=f;else{if(f=s[d],void 0!==f){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,l,h));continue}f=new dG(Lr.create(i,h,e&&e._propertyBindings[d].binding.parsedPath),p.ValueTypeName,p.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,h),s[d]=f}a[d].resultBuffer=f.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,s=o[e];if(void 0===s)s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s;else{let a=s.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),s.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,s=this._actionsByClip,a=s[o],l=a.knownActions,c=l[l.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===l.length&&delete s[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,s=r[e];void 0===s&&(s={},r[e]=s),s[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,s=this._bindingsByRootAndName,a=s[r],l=e[e.length-1],c=t._cacheIndex;l._cacheIndex=c,e[c]=l,e.pop(),delete a[o],0===Object.keys(a).length&&delete s[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 Mk(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,s="string"==typeof t?Sk.findByName(r,t):t,a=null!==s?s.uuid:t,l=this._actionsByClip[a],c=null;if(void 0===i&&(i=null!==s?s.blendMode:2500),void 0!==l){let d=l.actionByRoot[o];if(void 0!==d&&d.blendMode===i)return d;c=l.knownActions[0],null===s&&(s=c._clip)}if(null===s)return null;let u=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,s=o.length,a=new Array(s),l={endingStart:ob,endingEnd:ob};for(let c=0;c!==s;++c){let u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),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,a=r/o;t.warp(1,o/r,e),this.warp(a,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,s=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+i,c[0]=t/s,c[1]=e/s,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 s=this._updateTime(e),a=this._updateWeight(t);if(a>0){let l=this._interpolants,c=this._propertyBindings;if(2501===this.blendMode)for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);else for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulate(r,a)}}_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,s=2202===i;if(0===t)return-1===o?r:s&&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,s)):this._setEndings(0===this.repetitions,!0,s)),r>=e||r<0){let a=Math.floor(r/e);r-=e*a,o+=Math.abs(a);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,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&1==(1&o))return e-r}return r}_setEndings(t,e,i){let r=this._interpolantSettings;i?(r.endingStart=sb,r.endingEnd=sb):(r.endingStart=t?this.zeroSlopeAtStart?sb:ob:2402,r.endingEnd=e?this.zeroSlopeAtEnd?sb:ob:2402)}_scheduleFading(t,e,i){let r=this._mixer,o=r.time,s=this._weightInterpolant;null===s&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=e,a[1]=o+t,l[1]=i,this}}(this,s,e,i);return this._bindAction(u,c),this._addInactiveAction(u,a,o),u}existingAction(t,e){let i=e||this._root,r=i.uuid,o="string"==typeof t?Sk.findByName(i,t):t,a=this._actionsByClip[o?o.uuid:t];return void 0!==a&&a.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),s=this._accuIndex^=1;for(let c=0;c!==i;++c)e[c]._update(r,t,o,s);let a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);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 s=o.knownActions;for(let a=0,l=s.length;a!==l;++a){let c=s[a];this._deactivateAction(c);let u=c._cacheIndex,d=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,d._cacheIndex=u,e[u]=d,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(t){let e=t.uuid,i=this._actionsByClip;for(let s in i){let l=i[s].actionByRoot[e];void 0!==l&&(this._deactivateAction(l),this._removeInactiveAction(l))}let o=this._bindingsByRootAndName[e];if(void 0!==o)for(let s in o){let a=o[s];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(t,e){let i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var fE=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 fE(void 0===this.value.clone?this.value:this.value.clone())}};(class extends Yg{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 Sde=new at,Zg=class{constructor(t=new at(1/0,1/0),e=new at(-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=Sde.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 Sde.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)}};Zg.prototype.isBox2=!0;var ff=new ie,ek=new Rn,s8=new Rn;function Kde(n){let t=[];n&&n.isBone&&t.push(n);for(let e=0;e<n.children.length;e++)t.push.apply(t,Kde(n.children[e]));return t}var rqe=new Float32Array(1);function DG(n,t,e){if(1===e)return new vn(t);let i=vg(t);if(!i)throw new Error(`d3 failed to recognize the color: ${t}`);return new vn(dz(i,n)(1-e))}new Int32Array(rqe.buffer),qa.create=function(n,t){return console.log("THREE.Curve.create() has been deprecated"),n.prototype=Object.create(qa.prototype),n.prototype.constructor=n,n.prototype.getPoint=t,n},lE.prototype.fromPoints=function(n){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(n)},class extends rE{constructor(t=10,e=10,i=4473924,r=8947848){i=new vn(i),r=new vn(r);let o=e/2,s=t/e,a=t/2,l=[],c=[];for(let p=0,h=0,f=-a;p<=e;p++,f+=s){l.push(-a,0,f,a,0,f),l.push(f,0,-a,f,0,a);let m=p===o?i:r;m.toArray(c,h),h+=3,m.toArray(c,h),h+=3,m.toArray(c,h),h+=3,m.toArray(c,h),h+=3}let u=new nr;u.setAttribute("position",new Jr(l,3)),u.setAttribute("color",new Jr(c,3)),super(u,new Ap({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 rE{constructor(t){let e=Kde(t),i=new nr,r=[],o=[],s=new vn(0,0,1),a=new vn(0,1,0);for(let c=0;c<e.length;c++){let u=e[c];u.parent&&u.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),o.push(s.r,s.g,s.b),o.push(a.r,a.g,a.b))}i.setAttribute("position",new Jr(r,3)),i.setAttribute("color",new Jr(o,3)),super(i,new Ap({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");s8.copy(this.root.matrixWorld).invert();for(let o=0,s=0;o<e.length;o++){let a=e[o];a.parent&&a.parent.isBone&&(ek.multiplyMatrices(s8,a.matrixWorld),ff.setFromMatrixPosition(ek),r.setXYZ(s,ff.x,ff.y,ff.z),ek.multiplyMatrices(s8,a.parent.matrixWorld),ff.setFromMatrixPosition(ek),r.setXYZ(s+1,ff.x,ff.y,ff.z),s+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Dd.prototype.extractUrlBase=function(n){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),iG.extractUrlBase(n)},Dd.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.")}},Zg.prototype.center=function(n){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(n)},Zg.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Zg.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Zg.prototype.size=function(n){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(n)},Tl.prototype.center=function(n){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(n)},Tl.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Tl.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Tl.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},Tl.prototype.size=function(n){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(n)},xf.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},gb.prototype.setFromMatrix=function(n){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(n)},Jo.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},Jo.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},Jo.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Jo.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},Jo.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Jo.prototype.getInverse=function(n){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},Rn.prototype.extractPosition=function(n){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(n)},Rn.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},Rn.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new ie).setFromMatrixColumn(this,3)},Rn.prototype.setRotationFromQuaternion=function(n){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(n)},Rn.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Rn.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},Rn.prototype.multiplyVector4=function(n){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},Rn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Rn.prototype.rotateAxis=function(n){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),n.transformDirection(this)},Rn.prototype.crossVector=function(n){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},Rn.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Rn.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Rn.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Rn.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Rn.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Rn.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},Rn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Rn.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)},Rn.prototype.getInverse=function(n){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},uu.prototype.isIntersectionLine=function(n){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(n)},qs.prototype.multiplyVector3=function(n){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),n.applyQuaternion(this)},qs.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Cf.prototype.isIntersectionBox=function(n){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},Cf.prototype.isIntersectionPlane=function(n){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(n)},Cf.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},lo.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},lo.prototype.barycoordFromPoint=function(n,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(n,t)},lo.prototype.midpoint=function(n){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(n)},lo.prototypenormal=function(n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(n)},lo.prototype.plane=function(n){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(n)},lo.barycoordFromPoint=function(n,t,e,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),lo.getBarycoord(n,t,e,i,r)},lo.normal=function(n,t,e,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),lo.getNormal(n,t,e,i)},Ip.prototype.extractAllPoints=function(n){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(n)},Ip.prototype.extrude=function(n){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Sf(this,n)},Ip.prototype.makeGeometry=function(n){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Qg(this,n)},at.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},at.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},at.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ie.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},ie.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},ie.prototype.getPositionFromMatrix=function(n){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(n)},ie.prototype.getScaleFromMatrix=function(n){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(n)},ie.prototype.getColumnFromMatrix=function(n,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,n)},ie.prototype.applyProjection=function(n){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(n)},ie.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},ie.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},ie.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},ar.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},ar.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Xi.prototype.getChildByName=function(n){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(n)},Xi.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Xi.prototype.translate=function(n,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,n)},Xi.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Xi.prototype.applyMatrix=function(n){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(Xi.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.")}}}),Vo.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(Vo.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.")}}}),gk.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Ws.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(fc.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(Yr.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===ok},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(ok)}}}),Yr.prototype.setDynamic=function(n){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?ok:qS),this},Yr.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Yr.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},nr.prototype.addIndex=function(n){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(n)},nr.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 Yr(arguments[1],arguments[2])))},nr.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)},nr.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},nr.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},nr.prototype.removeAttribute=function(n){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(n)},nr.prototype.applyMatrix=function(n){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(nr.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}}}),Yg.prototype.setDynamic=function(n){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?ok:qS),this},Yg.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Sf.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Sf.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Sf.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},vb.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},fE.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(hs.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 vn}},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(Dp.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}}}),ir.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)},ir.prototype.animate=function(n){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(n)},ir.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},ir.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},ir.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},ir.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},ir.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},ir.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},ir.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},ir.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},ir.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},ir.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},ir.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},ir.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},ir.prototype.enableScissorTest=function(n){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(n)},ir.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},ir.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},ir.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},ir.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},ir.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},ir.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},ir.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},ir.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},ir.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},ir.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(ir.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?Wr:bf}},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(Gde.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(Wa.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 Xi{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 sG).load(n,function(i){t.setBuffer(i)}),this},KS.prototype.updateCubeMap=function(n,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(n,t)},KS.prototype.clear=function(n,t,e,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(n,t,e,i)},Tp.crossOrigin=void 0,Tp.loadTexture=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new K8;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},Tp.loadTextureCube=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new Q8;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},Tp.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Tp.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:"137"}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="137");var pu=(()=>(function(n){n[n.CIRCLE=0]="CIRCLE",n[n.LINE=1]="LINE",n[n.TRIANGLE=2]="TRIANGLE",n[n.TRAPEZOID=3]="TRAPEZOID"}(pu||(pu={})),pu))();function Jde(n,t){let e=t.length/2,i=n.attributes.position;(!i||i.count!==3*e)&&(i=new Yr(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 $de(n,t,e){let i=Math.max(t.length/2-1,0),r=2*i*3,o=3*r,s=n.attributes.position;(!s||s.count!==r)&&(s=new Yr(new Float32Array(o),3),n.setAttribute("position",s));let a=s.array;for(let l=0;l<i;l++){let[c,u,d,p]=[t[2*l],t[2*l+1],t[2*l+2],t[2*l+3]],h=new at(c,u),f=new at(d,p),m=new at(d-c,p-u),x=new at(-m.y,m.x).setLength(e/2),g=h.clone().add(x),b=h.clone().sub(x),D=f.clone().add(x),T=f.clone().sub(x),k=[g.x,g.y,0,b.x,b.y,0,D.x,D.y,0,D.x,D.y,0,b.x,b.y,0,T.x,T.y,0];a.set(k,l*k.length)}s.needsUpdate=!0,n.setDrawRange(0,o),n.computeBoundingSphere()}function Nk(n,t,e,i){let{visible:r,color:o,opacity:s}=i;if(Array.isArray(t.material))throw new Error("Invariant error: only expect one material on an object");let a=t.material;if(a.visible!==r&&(a.visible=r,a.needsUpdate=!0),!r)return!1;let l=DG(n,o,s??1),c=e(t.geometry);return t.geometry!==c&&(t.geometry=c),a.color.equals(l)||(a.color.set(l),a.needsUpdate=!0),!0}var Bk=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,s]=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]=s}}this.coordinateIdentifier=this.coordinator.getUpdateIdentifier(),this.markAsPaintDirty()}},Tb=(()=>(function(n){n[n.NUMBER=0]="NUMBER",n[n.NAN=1]="NAN"}(Tb||(Tb={})),Tb))(),Vk=class extends Bk{recordPartition(t,e,i){return t?{type:Tb.NUMBER,polyline:e}:{type:Tb.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]),s={x:o[0],y:o[1]},a=null;for(let l=0;l<t.length;l+=2){let c=t[l],u=t[l+1],d=isNaN(c)||isNaN(u);d!==r&&i!==l&&(e.push(this.recordPartition(!r,t.slice(i,l),null===a?{x:c,y:u}:a)),i=l),d||(a={x:c,y:u}),r=d}return i!==t.length-1&&e.push(this.recordPartition(!r,t.slice(i,t.length),a??s)),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:s,polyline:a}]of r.entries())if(s===Tb.NUMBER)2===a.length?this.paintBrush.setCircle(JSON.stringify(["circle",t.id,o]),{x:a[0],y:a[1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,radius:4}):this.paintBrush.setLine(JSON.stringify(["line",t.id,o]),a,{color:i.color,visible:i.visible,opacity:i.opacity??1,width:2});else if(!i.aux)for(let l=0;l<a.length;l+=2)this.paintBrush.setTriangle(JSON.stringify(["NaN",t.id,a[l],a[l+1]]),{x:a[l],y:a[l+1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,size:12})}}},Hk=class extends By{constructor(){super(...arguments),this.camera=new qg(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}},Uk=class{constructor(t){switch(this.metadataMap={},this.shouldRepaint=!1,this.callbacks=t.callbacks,t.type){case dr.SVG:this.coordinator=new By,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=xO(t?.dom,()=>{let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.style.fill="none";let s=this.createPathDString(e);return o.setAttribute("d",s),this.svg.appendChild(o),o},o=>{if(!t?.data||!su_arePolylinesEqual(e,t?.data)){let s=this.createPathDString(e);o.setAttribute("d",s)}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,s=r*Math.sqrt(3)/2,a=new Float32Array([e.x-r/2,e.y+s/3,e.x+r/2,e.y+s/3,e.x,e.y-2*s/3]),l=xO(t?.dom,()=>{let c=document.createElementNS("http://www.w3.org/2000/svg","path");c.classList.add("triangle"),c.style.fill="none";let u=this.createPathDString(a);return c.setAttribute("d",u+"Z"),this.svg.appendChild(c),c},c=>{let u=this.createPathDString(a);return c.setAttribute("d",u+"Z"),c},i);return null===l?null:(l.style.fill=o,{dom:l,data:a})}createOrUpdateCircleObject(t,e,i){let{color:r,radius:o}=i,s=xO(t?.dom,()=>{let a=document.createElementNS("http://www.w3.org/2000/svg","circle");return a.style.fill=r,a.setAttribute("cx",String(e.x)),a.setAttribute("cy",String(e.y)),a.setAttribute("r",String(o)),this.svg.appendChild(a),a},a=>(a.style.fill=r,a.setAttribute("cx",String(e.x)),a.setAttribute("cy",String(e.y)),a.setAttribute("r",String(o)),a),i);return null===s?null:{dom:s,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:s}=r,a=2/Math.sqrt(3)*o,l=new Float32Array([e.x-a/2,e.y+o/2,e.x,e.y-o/2,i.x,i.y-o/2,i.x+a/2,i.y+o/2]),c=xO(t?.dom,()=>{let u=document.createElementNS("http://www.w3.org/2000/svg","path");u.classList.add("trapezoid"),u.style.fill="none";let d=this.createPathDString(l);return u.setAttribute("d",d+"Z"),this.svg.appendChild(u),u},u=>{let d=this.createPathDString(l);return u.setAttribute("d",d+"Z"),u},r);return null===c?null:(c.style.fill=s,{dom:c,data:l})}dispose(){}}(t.container);break;case dr.WEBGL:{let e=new Hk;this.coordinator=e,this.renderer=new class{constructor(t,e,i,r){this.coordinator=e,this.scene=new vb,this.backgroundColor="#fff",su_isOffscreenCanvasSupported()&&t instanceof OffscreenCanvas&&(t.style=t.style||{}),r&&t.addEventListener("webglcontextlost",r),this.renderer=new ir({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 Vo){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 u=DG(this.backgroundColor,i.color,i.opacity??1),d=new nr,p=new Ap({color:u}),h=new Vo(d,p);return p.visible=r,$de(d,e,o),this.scene.add(h),{type:pu.LINE,data:e,obj3d:h,width:o}}let{data:s,obj3d:a,width:l}=t;return Nk(this.backgroundColor,a,u=>((o!==l||!s||!su_arePolylinesEqual(s,e))&&$de(u,e,o),u),i)?{type:pu.LINE,data:e,obj3d:a,width:o}:t}createMesh(t,e){if(!e.visible)return null;let{visible:i,color:r,opacity:o}=e,s=DG(this.backgroundColor,r,o??1),a=new Gg({color:s,visible:i});return new Vo(t,a)}createOrUpdateTriangleObject(t,e,i){let{size:r}=i,o=r*Math.sqrt(3)/2,s=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 nr;Jde(l,s);let c=this.createMesh(l,i);return null===c?null:(this.scene.add(c),{type:pu.TRIANGLE,data:e,obj3d:c})}return Nk(this.backgroundColor,t.obj3d,l=>(Jde(l,s),l),i)?{type:pu.TRIANGLE,data:e,obj3d:t.obj3d}:t}createOrUpdateCircleObject(t,e,i){let{radius:r}=i,o=new yb(i.radius);if(!t){let a=this.createMesh(o,i);return null===a?null:(a.position.set(e.x,e.y,0),this.scene.add(a),{type:pu.CIRCLE,data:{loc:e,radius:r},obj3d:a})}return Nk(this.backgroundColor,t.obj3d,()=>o,i)?(t.obj3d.position.set(e.x,e.y,0),{type:pu.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,s=2/Math.sqrt(3)*o,a=new Ip([new at(e.x-s/2,e.y-o/2),new at(e.x,e.y+o/2),new at(i.x,i.y+o/2),new at(i.x+s/2,i.y-o/2)]);a.autoClose=!0;let l=new Qg(a);if(!t){let u=this.createMesh(l,r);return null===u?null:(this.scene.add(u),{type:pu.TRAPEZOID,data:[e,i],obj3d:u})}return Nk(this.backgroundColor,t.obj3d,()=>l,r)?{type:pu.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 Vk({renderer:this.renderer,coordinator:this.coordinator,getMetadataMap:()=>this.metadataMap}),this.resize(t.domDimension)}dispose(){}setXScaleType(t){this.coordinator.setXScale(ou(t)),this.scheduleRepaint()}setYScaleType(t){this.coordinator.setYScale(ou(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()}},Dl=(()=>(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"}(Dl||(Dl={})),Dl))(),Db=(()=>(function(n){n[n.ON_REDRAW_END=0]="ON_REDRAW_END",n[n.ON_CONTEXT_LOST=1]="ON_CONTEXT_LOST"}(Db||(Db={})),Db))();function tpe(n){if(n.includes("/"))throw new RangeError("Worker factory only allows file name and no resource path.");return new Worker(n)}var Jg=class{constructor(t){if(this.callbacks=t.callbacks,t.type!==dr.WEBGL)throw new RangeError(`Cannot use non WEBGL renderer for the offscreen line chart. Received ${dr[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=Jg.workerPool.getNext();let r={type:Dl.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:Dl.DISPOSED}),this.workerInstance.free(),this.txMessagePort.close()}setXScaleType(t){this.sendMessage({type:Dl.SCALE_UPDATED,axis:"x",scaleType:t})}setYScaleType(t){this.sendMessage({type:Dl.SCALE_UPDATED,axis:"y",scaleType:t})}resize(t){this.sendMessage({type:Dl.DOM_RESIZED,dim:t})}setMetadata(t){this.sendMessage({type:Dl.SERIES_METADATA_CHANGED,metadata:t})}setViewBox(t){this.sendMessage({type:Dl.VIEW_BOX_UPDATED,extent:t})}setData(t){let e=function(n){let t=n.reduce((o,s)=>o+s.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 s=0;s<o.points.length;s++)i[e++]=o.points[s].x,i[e++]=o.points[s].y}return{idsAndLengths:r,flattenedSeries:i.buffer}}(t);this.sendMessage({type:Dl.SERIES_DATA_UPDATED,compactDataSeries:e},[e.flattenedSeries])}setUseDarkMode(t){this.sendMessage({type:Dl.DARK_MODE_UPDATED,useDarkMode:t})}sendMessage(t,e){e?this.txMessagePort.postMessage(t,e):this.txMessagePort.postMessage(t)}onMessageFromWorker(t){switch(t.type){case Db.ON_REDRAW_END:this.callbacks.onDrawEnd();break;case Db.ON_CONTEXT_LOST:this.callbacks.onContextLost()}}};function Ad(n,t){return"x"===t?[0,n.width]:[n.height,0]}function vE(n,t){let e=Math.floor(n/50);return Math.min(e,t)}function PG(n,t,e,i){return{major:[],minor:n.ticks(i,e).map(o=>({value:o,tickFormattedString:t.formatTick(o)}))}}Jg.workerPool=new class{constructor(t,e=10,i=tpe){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=c4417681");var IG=document.createElement("canvas").getContext("2d"),yE={getStandardTicks:PG,getTicksForTemporalScale:function(n,t,e,i){let[r,o]=i,s=n.ticks(i,2);if(o-r>=864e5||s.length>2)return PG(n,t,e,i);let a=n.ticks(i,e);return{major:s.map(l=>({start:l,tickFormattedString:t.formatShort(l)})),minor:a.map(l=>({value:l,tickFormattedString:t.formatTick(l)}))}},getTicksForLinearScale:function(n,t,e,i){let[r,o]=i,s=Math.abs(o-r);if(s>.001)return PG(n,t,e,i);let a=n.ticks([r,o],e),l=n.ticks([r,o],2),c=[],u=function(n){let t=n.toExponential().split("e-",2);return 2===t.length?Number(t[1])-1:0}(s);s<1&&l.every(h=>{let f=Math.abs(h);return f>=0&&f<1})&&(u+=1);let d=new Map;for(let h of l){let[f,m=""]=String(h).split(".",2),x=Number(f+"."+m.slice(0,u));d.set(x,{start:x,tickFormattedString:0===x?"\u2014":t.formatReadable(x)})}let p=10*Math.pow(10,-u);for(let h of a)for(let f of[...d.keys()].reverse()){let m=h-f;if(m>=0&&m<p){if(0===f)c.push({value:h,tickFormattedString:t.formatTick(h)});else{let x=String(h).slice(String(f).length);c.push({value:h,tickFormattedString:`\u2026${x||"0"}`})}break}}return{major:Array.from(d.values()),minor:c}},filterTicksByVisibility:function(n,t,e,i,r=5){if(!n.length||!IG)return n;let o="x"===e?1:-1,s=null;return n.filter(a=>{let l=t(a);IG.font=i;let c=IG.measureText(a.tickFormattedString),u="x"===e?c.width:c.actualBoundingBoxAscent-c.actualBoundingBoxDescent;return null===s?!(l+o*u<0||(s=l+o*u,0)):!(o*(s+o*r-l)>0||(s=l+o*u,0))})}};function dqe(n,t){if(1&n&&(In(),_(0,"g",17)(1,"text"),A(2),v(),_(3,"title"),A(4),v()()),2&n){let e=t.$implicit,i=S();C(1),Pt("font",i.axisFont),ze("x",i.textXPosition(e.value))("y",i.textYPosition(e.value)),C(1),je(" ",e.tickFormattedString," "),C(2),yt(i.getFormatter().formatLong(e.value))}}function pqe(n,t){if(1&n&&(_(0,"span",20)(1,"span"),A(2),v()()),2&n){let e=t.$implicit,i=t.index,r=t.last,o=S(2);Pt("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),et("major-label",!0)("last",r),y("title",o.getFormatter().formatLong(e.start)),C(2),yt(e.tickFormattedString)}}function hqe(n,t){if(1&n&&(_(0,"div",18),E(1,pqe,3,16,"span",19),v()),2&n){let e=S();C(1),y("ngForOf",e.majorTicks)("ngForTrackBy",e.trackByMajorTick)}}var ope=(()=>{class n{constructor(){this.onViewExtentChange=new G,this.editMenuOpened=!1,this.majorTicks=[],this.minorTicks=[]}ngOnChanges(){let e=null,r=vE("x"===this.axis?this.domDim.width:this.domDim.height,this.gridCount);e=this.scale instanceof ES?yE.getTicksForLinearScale(this.scale,this.getFormatter(),r,this.axisExtent):this.scale instanceof TS?yE.getTicksForTemporalScale(this.scale,this.getFormatter(),r,this.axisExtent):yE.getStandardTicks(this.scale,this.getFormatter(),r,this.axisExtent),this.majorTicks=e.major,this.minorTicks=yE.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,Ad(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 s=r;r=o,o=s}!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=R({type:n,selectors:[["line-chart-axis"]],inputs:{axisExtent:"axisExtent",axis:"axis",scale:"scale",gridCount:"gridCount",domDim:"domDim",customFormatter:"customFormatter"},outputs:{onViewExtentChange:"onViewExtentChange"},features:[Ft],decls:26,vars:13,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",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=Pe();_(0,"div"),O(1,"div",0),_(2,"div",1),In(),_(3,"svg",2),E(4,dqe,5,6,"g",3),v(),Js(),_(5,"button",4,5),P("menuOpened",function(){oe(r);let s=$e(15),a=$e(20);return i.onAxisUpdateMenuOpen(s,a,i.axisExtent),se(i.setEditMenuOpened(!0))})("menuClosed",function(){return i.setEditMenuOpened(!1)}),O(7,"mat-icon",6),v()(),E(8,hqe,2,2,"div",7),v(),_(9,"mat-menu",8,9)(11,"div",10),P("click",function(s){return s.stopPropagation()})("keydown",function(s){return i.keydownPreventClose(s)}),_(12,"label"),A(13,"min"),v(),O(14,"input",11,12),v(),_(16,"div",10),P("click",function(s){return s.stopPropagation()})("keydown",function(s){return i.keydownPreventClose(s)}),_(17,"label"),A(18,"max"),v(),O(19,"input",11,13),v(),_(21,"div",14),P("keydown",function(s){return i.keydownPreventClose(s)}),_(22,"button",15),P("click",function(){oe(r);let s=$e(15),a=$e(20),l=$e(6);return i.extentChanged(s.value,a.value),se(l.closeMenu())}),A(23," Change "),v(),_(24,"button",16),P("click",function(){return oe(r),se($e(6).closeMenu())}),A(25," Cancel "),v()()()}if(2&e){let r=$e(10);Da(i.axis+"-axis axis"),C(4),y("ngForOf",i.minorTicks)("ngForTrackBy",i.trackByMinorTick),C(1),et("extent-edit-button",!0)("extent-edit-menu-opened",i.editMenuOpened),y("matMenuTriggerFor",r),C(3),y("ngIf",i.majorTicks.length),C(1),y("yPosition","y"===i.axis?"above":"below"),C(5),y("value",i.axisExtent[0]),C(5),y("value",i.axisExtent[1])}},dependencies:[dn,Be,_n,Gt,hd,fd],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%}.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-button[_ngcontent-%COMP%]{background-color:#eee;font-size:0;height:24px;line-height:24px;position:absolute;right:5px;top:5px;visibility:hidden;width:24px}.extent-edit-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:16px;width:16px;line-height:16px}.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 bE(n,t){let e=Math.min(iu(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 spe(n,t,e,i,r,o){let s;switch(n.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:s=1;break;case WheelEvent.DOM_DELTA_LINE:s=8;break;case WheelEvent.DOM_DELTA_PAGE:s=20;break;default:s=1,console.warn(`Unknown WheelEvent deltaMode: ${n.deltaMode}.`)}let a=n.deltaY*s,l=a<0?Math.max(a*i,-.95):a*i,{width:c,height:u}=e,d=[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,[u,0],-n.offsetY*l),o.reverse(t.y,[u,0],u+(u-n.offsetY)*l)];return{x:d[1]<d[0]?[d[1],d[0]]:d,y:p[1]<p[0]?[p[1],p[0]]:p}}var gqe=["dots"];function _qe(n,t){if(1&n&&(In(),O(0,"circle",12)),2&n){let e=S().$implicit,i=S(2);ze("cx",i.getDomX(e.dataPoint.x))("cy",i.getDomY(e.dataPoint.y))("fill",e.metadata.color)}}function vqe(n,t){if(1&n&&(In(),sn(0),E(1,_qe,1,3,"circle",11),an()),2&n){let e=t.$implicit,i=S(2);C(1),y("ngIf",i.shouldRenderTooltipPoint(e.dataPoint))}}function yqe(n,t){if(1&n&&(In(),sn(0),E(1,vqe,2,1,"ng-container",10),an()),2&n){let e=S();C(1),y("ngForOf",e.cursoredData)("ngForTrackBy",e.trackBySeriesName)}}function bqe(n,t){if(1&n&&(In(),O(0,"rect",13)),2&n){let e=S();ze("x",e.zoomBoxInUiCoordinate.x)("width",e.zoomBoxInUiCoordinate.width)("y",e.zoomBoxInUiCoordinate.y)("height",e.zoomBoxInUiCoordinate.height)}}var xqe=function(n,t,e){return{data:n,cursorLocationInDataCoord:t,cursorLocation:e}};function Cqe(n,t){if(1&n&&(_(0,"div",14),Ni(1,15),v()),2&n){let e=S(),i=$e(11);C(1),y("ngTemplateOutlet",e.tooltipTemplate?e.tooltipTemplate:i)("ngTemplateOutletContext",Zx(2,xqe,e.cursoredData,e.cursorLocationInDataCoord,e.cursorLocation))}}function Mqe(n,t){if(1&n&&(sn(0),_(1,"tr",17)(2,"td",18),O(3,"span"),v(),_(4,"td",19),A(5),v(),_(6,"td"),A(7),v(),_(8,"td"),A(9),v()(),an()),2&n){let e=t.$implicit;C(3),Pt("background-color",e.metadata.color),C(2),yt(e.metadata.displayName),C(2),yt(e.dataPoint.y),C(2),yt(e.dataPoint.x)}}function wqe(n,t){if(1&n&&(_(0,"table")(1,"thead")(2,"tr"),O(3,"th",16),_(4,"th"),A(5,"Name"),v(),_(6,"th"),A(7,"Y"),v(),_(8,"th"),A(9,"X"),v()()(),_(10,"tbody"),E(11,Mqe,10,5,"ng-container",10),v()()),2&n){let e=t.data,i=S();C(11),y("ngForOf",e)("ngForTrackBy",i.trackBySeriesName)}}function Eqe(n){return n.scrollStrategies.reposition()}var ape=(()=>{class n{constructor(e,i){this.changeDetector=e,this.scrollStrategy=i,this.onViewExtentChange=new G,this.onViewExtentReset=new G,this.onInteractionStateChange=new G,this.InteractionState=Gr,this.state=new hr(Gr.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 ke,this.subscriptions=[]}ngAfterViewInit(){this.subscriptions.push(this.state.subscribe(e=>{this.onInteractionStateChange.emit(e)})),this.ngUnsubscribe.pipe(L(()=>{this.subscriptions.forEach(e=>e.unsubscribe())})),_i(this.dotsContainer.nativeElement,"dblclick",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(()=>{this.onViewExtentReset.emit(),this.state.next(Gr.NONE),this.changeDetector.markForCheck()}),_i(window,"keydown",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),_i(window,"keyup",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),_i(this.dotsContainer.nativeElement,"mousedown",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{let i=this.state.getValue(),r=this.shouldPan(e)?Gr.PANNING:Gr.DRAG_ZOOMING;i===Gr.NONE&&r===Gr.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())}),_i(this.dotsContainer.nativeElement,"mouseup",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{let i=(e.buttons&Cl.LEFT)===Cl.LEFT;this.dragStartCoord=null;let r=this.zoomBoxInUiCoordinate;if(!i&&this.state.getValue()===Gr.DRAG_ZOOMING&&r.width>0&&r.height>0){let o=this.getDataX(r.x),s=this.getDataX(r.x+r.width),a=this.getDataY(r.y+r.height),l=this.getDataY(r.y);this.onViewExtentChange.emit({dataExtent:{x:[o,s],y:[a,l]}})}this.state.getValue()!==Gr.NONE&&(this.state.next(Gr.NONE),this.changeDetector.markForCheck())}),_i(this.dotsContainer.nativeElement,"mouseenter",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{this.isCursorInside=!0,this.updateTooltip(e),this.changeDetector.markForCheck()}),_i(this.dotsContainer.nativeElement,"mouseleave",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{this.dragStartCoord=null,this.isCursorInside=!1,this.updateTooltip(e),this.state.next(Gr.NONE),this.changeDetector.markForCheck()}),_i(this.dotsContainer.nativeElement,"mousemove",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{switch(this.state.getValue()){case Gr.SCROLL_ZOOMING:this.state.next(Gr.NONE),this.updateTooltip(e),this.changeDetector.markForCheck();break;case Gr.NONE:this.updateTooltip(e),this.changeDetector.markForCheck();break;case Gr.PANNING:{let i=-e.movementX,r=-e.movementY,{width:o,height:s}=this.domDim,a=this.getDataX(i),l=this.getDataX(o+i),c=this.getDataY(s+r),u=this.getDataY(r);this.onViewExtentChange.emit({dataExtent:{x:[a,l],y:[c,u]}});break}case Gr.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()}}),_i(this.dotsContainer.nativeElement,"wheel",{passive:!1}).pipe(st(this.ngUnsubscribe),ui(e=>{let i=!e.ctrlKey&&!e.shiftKey&&e.altKey;return this.showZoomInstruction=!i,this.changeDetector.markForCheck(),i?(e.preventDefault(),Xt(e)):Ka(3e3).pipe(kt(()=>{this.showZoomInstruction=!1,this.changeDetector.markForCheck()}),L(()=>null))}),Ye(e=>Boolean(e))).subscribe(e=>{this.onViewExtentChange.emit({dataExtent:spe(e,this.viewExtent,this.domDim,.01,this.xScale,this.yScale)}),this.state.getValue()!==Gr.SCROLL_ZOOMING&&(this.state.next(Gr.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&Cl.LEFT)===Cl.LEFT,o=(e.buttons&Cl.MIDDLE)===Cl.MIDDLE;return!(!r&&!o)&&(o&&!r||i)}trackBySeriesName(e,i){return i.id}getDomX(e){return this.xScale.forward(this.viewExtent.x,Ad(this.domDim,"x"),e)}getDataX(e){return this.xScale.reverse(this.viewExtent.x,Ad(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Ad(this.domDim,"y"),e)}getDataY(e){return this.yScale.reverse(this.viewExtent.y,Ad(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=bE(i.points,e.x),s=i.points[o];return{id:i.id,closestPointIndex:o,dataPoint:s,domPoint:{x:this.getDomX(s.x),y:this.getDomY(s.y)},metadata:r}}).filter(i=>i):[],this.tooltipDisplayAttached=Boolean(this.cursoredData.length)}}return n.\u0275fac=function(e){return new(e||n)(M(nn),M(ng))},n.\u0275cmp=R({type:n,selectors:[["line-chart-interactive-view"]],viewQuery:function(e,i){if(1&e&&(ot(gqe,7,Re),ot(Rh,5)),2&e){let r;Ne(r=Le())&&(i.dotsContainer=r.first),Ne(r=Le())&&(i.overlay=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&et("show-zoom-instruction",i.showZoomInstruction)},inputs:{seriesData:"seriesData",seriesMetadataMap:"seriesMetadataMap",viewExtent:"viewExtent",xScale:"xScale",yScale:"yScale",domDim:"domDim",tooltipOriginEl:"tooltipOriginEl",tooltipTemplate:"tooltipTemplate"},outputs:{onViewExtentChange:"onViewExtentChange",onViewExtentReset:"onViewExtentReset",onInteractionStateChange:"onInteractionStateChange"},features:[$t([{provide:ng,useFactory:Eqe,deps:[tr]}]),Ft],decls:12,vars:15,consts:[[1,"dots"],["dots",""],[4,"ngIf"],["class","zoom-box",4,"ngIf"],[1,"zoom-instruction"],[1,"instruction-content"],["cdkOverlayOrigin","",1,"tooltip-origin"],["tooltipOrigin","cdkOverlayOrigin"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayLockPosition","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayGrowAfterOpen","detach"],["defaultTooltip",""],[4,"ngFor","ngForOf","ngForTrackBy"],["r","4",4,"ngIf"],["r","4"],[1,"zoom-box"],[1,"tooltip-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"circle-header"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[1,"name"]],template:function(e,i){1&e&&(In(),_(0,"svg",0,1),E(2,yqe,2,2,"ng-container",2),E(3,bqe,1,4,"rect",3),v(),Js(),_(4,"div",4)(5,"span",5),A(6,"Alt + Scroll to Zoom"),v()(),O(7,"div",6,7),E(9,Cqe,2,6,"ng-template",8),P("detach",function(){return i.onTooltipDisplayDetached()}),E(10,wqe,12,2,"ng-template",null,9,qt)),2&e&&(et("pannable",i.specialKeyPressed)("draggable",i.state.getValue()===i.InteractionState.NONE||i.state.getValue()===i.InteractionState.DRAG_ZOOMING)("panning",i.state.getValue()===i.InteractionState.PANNING),C(2),y("ngIf",i.state.getValue()===i.InteractionState.NONE),C(1),y("ngIf",i.state.getValue()===i.InteractionState.DRAG_ZOOMING),C(6),y("cdkConnectedOverlayOrigin",i.tooltipOriginEl)("cdkConnectedOverlayOpen",i.tooltipDisplayAttached&&i.state.getValue()===i.InteractionState.NONE)("cdkConnectedOverlayPositions",i.tooltipPositions)("cdkConnectedOverlayScrollStrategy",i.scrollStrategy)("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayGrowAfterOpen",!0))},dependencies:[dn,Be,os,Rh,ig],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 Dqe(n,t){if(1&n&&(In(),O(0,"line",2)),2&n){let e=t.$implicit,i=S();et("zero",0===e),ze("x1",i.getDomX(e))("x2",i.getDomX(e))("y2",i.domDim.height)}}function Aqe(n,t){if(1&n&&(In(),O(0,"line",3)),2&n){let e=t.$implicit,i=S();et("zero",0===e),ze("y1",i.getDomY(e))("x2",i.domDim.width)("y2",i.getDomY(e))}}var lpe=(()=>{class n{getDomX(e){return this.xScale.forward(this.viewExtent.x,Ad(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Ad(this.domDim,"y"),e)}getXTicks(){return this.xScale.ticks(this.viewExtent.x,vE(this.domDim.width,this.xGridCount))}getYTicks(){return this.yScale.ticks(this.viewExtent.y,vE(this.domDim.height,this.yGridCount))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(In(),_(0,"svg"),E(1,Dqe,1,5,"line",0),E(2,Aqe,1,5,"line",1),v()),2&e&&(C(1),y("ngForOf",i.getXTicks()),C(1),y("ngForOf",i.getYTicks()))},dependencies:[dn],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})(),Pqe=["seriesView"],Rqe=["xAxis"],Oqe=["yAxis"],kqe=["chartEl"];function Fqe(n,t){if(1&n&&O(0,"line-chart-grid-view",16),2&n){let e=S();y("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("xGridCount",e.X_GRID_COUNT)("yGridCount",e.Y_GRID_COUNT)("domDim",e.domDimensions.main)}}function Nqe(n,t){1&n&&(In(),O(0,"svg",null,17))}function Lqe(n,t){1&n&&O(0,"canvas",null,17)}function Bqe(n,t){if(1&n&&(sn(0),E(1,Nqe,2,0,"svg",5),E(2,Lqe,2,0,"canvas",5),an()),2&n){let e=S();C(1),y("ngIf",e.getRendererType()===e.RendererType.SVG),C(1),y("ngIf",e.getRendererType()===e.RendererType.WEBGL)}}function Vqe(n,t){if(1&n){let e=Pe();_(0,"line-chart-interactive-view",18),P("onViewExtentChange",function(r){return oe(e),se(S().onViewBoxChanged(r))})("onViewExtentReset",function(){return oe(e),se(S().viewBoxReset())})("onInteractionStateChange",function(r){return oe(e),se(S().onInteractionStateChange(r))}),v()}if(2&n){let e=S(),i=$e(1);y("seriesData",e.seriesData)("seriesMetadataMap",e.seriesMetadataMap)("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("tooltipOriginEl",i)("domDim",e.domDimensions.main)("tooltipTemplate",e.tooltipTemplate)}}var Hqe=function(n,t,e,i){return{xScale:n,yScale:t,domDimension:e,viewExtent:i}};function Uqe(n,t){if(1&n&&(_(0,"div",19),Ni(1,20),v()),2&n){let e=S();C(1),y("ngTemplateOutlet",e.customVisTemplate)("ngTemplateOutletContext",K3(2,Hqe,e.xScale,e.yScale,e.domDimensions.main,e.viewBox))}}function zqe(n,t){if(1&n){let e=Pe();_(0,"line-chart-axis",21),P("onViewExtentChange",function(r){return oe(e),se(S().onViewBoxChangedFromAxis(r,"y"))}),v()}if(2&n){let e=S();y("axisExtent",e.viewBox.y)("customFormatter",e.customYFormatter)("domDim",e.domDimensions.yAxis)("gridCount",e.Y_GRID_COUNT)("scale",e.yScale)}}function jqe(n,t){if(1&n){let e=Pe();_(0,"line-chart-axis",22),P("onViewExtentChange",function(r){return oe(e),se(S().onViewBoxChangedFromAxis(r,"x"))}),v()}if(2&n){let e=S();y("axisExtent",e.viewBox.x)("customFormatter",e.customXFormatter)("domDim",e.domDimensions.xAxis)("gridCount",e.X_GRID_COUNT)("scale",e.xScale)}}function Gqe(n,t){1&n&&(_(0,"div",23),O(1,"span",24),v())}var Wqe=function(n,t,e,i,r){return{xScale:n,yScale:t,domDimension:e,viewExtent:i,interactionState:r}};function qqe(n,t){if(1&n&&(_(0,"div",25,26),Ni(2,20),v()),2&n){let e=S();C(2),y("ngTemplateOutlet",e.customChartOverlayTemplate)("ngTemplateOutletContext",Z3(2,Wqe,e.xScale,e.yScale,e.domDimensions.main,e.viewBox,e.interactionState))}}var Yqe=function(n,t){return{container:!0,"dark-mode":n,"line-only-mode":t,"line-chart":!0}},RG={x:[0,1],y:[0,1]},jk=(()=>{class n{constructor(e){this.changeDetector=e,this.RendererType=dr,this.useDarkMode=!1,this.preferredRendererType=dr.WEBGL,this.xScaleType=Nr.LINEAR,this.yScaleType=Nr.LINEAR,this.lineOnly=!1,this.viewBoxChanged=new G,this.onViewBoxOverridden=new Lf(1),this.ignoreYOutliers=!1,this.Y_GRID_COUNT=6,this.X_GRID_COUNT=10,this.xScale=ou(this.xScaleType),this.yScale=ou(this.xScaleType),this.viewBox=RG,this.domDimensions={main:{width:0,height:0},xAxis:{width:0,height:0},yAxis:{width:0,height:0}},this.showChartRendererElement=!0,this.interactionState=Gr.NONE,this.lineChart=null,this.isDataUpdated=!1,this.isMetadataUpdated=!1,this.isFixedViewBoxUpdated=!1,this.isViewBoxOverridden=!1,this.useDarkModeUpdated=!1,this.isViewBoxChanged=!0,this.scaleUpdated=!0,this.isRenderingContextLost=!1}ngOnInit(){this.onViewBoxOverridden.next(this.isViewBoxOverridden)}ngOnChanges(e){e.xScaleType&&(this.xScale=ou(this.xScaleType),this.scaleUpdated=!0),e.yScaleType&&(this.yScale=ou(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),this.scaleUpdated&&this.setIsViewBoxOverridden(!1),this.isViewBoxChanged=this.isViewBoxChanged||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[s,a]of Object.entries(this.seriesMetadataMap)){let l=o&&o[s];if(!l||a.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 dr.SVG:r={type:dr.SVG,container:this.chartEl.nativeElement,callbacks:i,domDimension:this.domDimensions.main,useDarkMode:this.useDarkMode};break;case dr.WEBGL:r={type:dr.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 s=e!==dr.SVG&&su_isOffscreenCanvasSupported()?Jg:Uk;this.lineChart=new s(r)}ngOnDestroy(){this.lineChart&&this.lineChart.dispose()}getRendererType(){return function(n){switch(n){case dr.SVG:return dr.SVG;case dr.WEBGL:return su_isWebGl2Supported()?dr.WEBGL:dr.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.isViewBoxOverridden&&this.fixedViewBox)this.viewBox=this.fixedViewBox;else if(!this.isViewBoxOverridden&&this.isViewBoxChanged){let i=function(n,t,e,i,r){let o=null,s=null,a=[];for(let{id:d,points:p}of n){let h=t[d];if(h&&!h.aux&&h.visible)for(let f=0;f<p.length;f++){let{x:m,y:x}=p[f];i(m)&&(o=null===o||m<o?m:o,s=null===s||m>s?m:s),r(x)&&a.push(x)}}a.sort(uc);let c=a[0],u=a[a.length-1];return e&&a.length>2&&(c=a[Math.ceil(.05*(a.length-1))],u=a[Math.floor(.95*(a.length-1))]),{x:null!==o&&null!==s?[o,s]:void 0,y:void 0!==c&&void 0!==u?[c,u]:void 0}}(this.seriesData,this.seriesMetadataMap,this.ignoreYOutliers,this.xScale.isSafeNumber,this.yScale.isSafeNumber);this.viewBox={x:this.xScale.niceDomain(i.x??RG.x),y:this.yScale.niceDomain(i.y??RG.y)}}(this.isFixedViewBoxUpdated||this.isViewBoxChanged)&&(this.isFixedViewBoxUpdated=!1,this.isViewBoxChanged=!1,this.lineChart.setViewBox(this.viewBox),this.changeDetector.detectChanges())}}onViewBoxChanged({dataExtent:e}){this.setIsViewBoxOverridden(!0),this.isViewBoxChanged=!0,this.viewBox=e,this.updateLineChart(),this.viewBoxChanged.emit(e)}viewBoxReset(){this.setIsViewBoxOverridden(!1),this.isViewBoxChanged=!0,this.updateLineChart(),this.viewBoxChanged.emit(this.viewBox)}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)(M(nn))},n.\u0275cmp=R({type:n,selectors:[["line-chart"]],viewQuery:function(e,i){if(1&e&&(ot(Pqe,7,Re),ot(Rqe,7,Re),ot(Oqe,7,Re),ot(kqe,5,Re)),2&e){let r;Ne(r=Le())&&(i.seriesView=r.first),Ne(r=Le())&&(i.xAxis=r.first),Ne(r=Le())&&(i.yAxis=r.first),Ne(r=Le())&&(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",lineOnly:"lineOnly",disableUpdate:"disableUpdate",ignoreYOutliers:"ignoreYOutliers"},outputs:{viewBoxChanged:"viewBoxChanged"},features:[Ft],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","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","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&&(_(0,"div",0,1),P("onResize",function(){return i.onViewResize()}),_(2,"div",2,3),E(4,Fqe,1,6,"line-chart-grid-view",4),E(5,Bqe,3,2,"ng-container",5),E(6,Vqe,1,8,"line-chart-interactive-view",6),E(7,Uqe,2,7,"div",7),v(),_(8,"div",8,9),E(10,zqe,1,5,"line-chart-axis",10),v(),_(11,"div",11,12),E(13,jqe,1,5,"line-chart-axis",13),v(),E(14,Gqe,2,0,"div",14),E(15,qqe,3,8,"div",15),v()),2&e&&(y("ngClass",Qr(10,Yqe,i.useDarkMode,i.lineOnly))("resizeEventDebouncePeriodInMs",0),C(4),y("ngIf",!i.lineOnly),C(1),y("ngIf",i.showChartRendererElement),C(1),y("ngIf",!i.lineOnly),C(1),y("ngIf",i.customVisTemplate),C(3),y("ngIf",!i.lineOnly),C(3),y("ngIf",!i.lineOnly),C(1),y("ngIf",!i.lineOnly),C(1),y("ngIf",i.customChartOverlayTemplate))},dependencies:[Fn,Be,os,ig,ope,ape,lpe,hg],styles:['[_nghost-%COMP%]{contain:strict;display:inline-block}[_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;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 Qqe(n,t){if(1&n&&O(0,"mat-icon",10),2&n){let e=S(2).$implicit,i=S();y("ngClass",e.type===i.sortingInfo.header?"show":"show-on-hover")}}function Kqe(n,t){if(1&n&&O(0,"mat-icon",11),2&n){let e=S(2).$implicit,i=S();y("ngClass",e.type===i.sortingInfo.header?"show":"show-on-hover")}}function Zqe(n,t){if(1&n){let e=Pe();_(0,"th",4),P("click",function(){oe(e);let r=S().$implicit;return se(S().headerClicked(r.type))}),_(1,"div",5),P("dragstart",function(){oe(e);let r=S().$implicit;return se(S().dragStart(r))})("dragend",function(){return oe(e),se(S(2).dragEnd())})("dragenter",function(){oe(e);let r=S().$implicit;return se(S().dragEnter(r))}),O(2,"tb-data-table-header",6),_(3,"div",7),E(4,Qqe,1,1,"mat-icon",8),E(5,Kqe,1,1,"mat-icon",9),v()()()}if(2&n){let e=S().$implicit,i=S();C(1),y("draggable",i.columnCustomizationEnabled)("ngClass",i.getHeaderHighlightStyle(e.type)),C(1),y("header",e),C(2),y("ngIf",i.sortingInfo.order===i.SortingOrder.ASCENDING||e.type!==i.sortingInfo.header),C(1),y("ngIf",i.sortingInfo.order===i.SortingOrder.DESCENDING&&e.type===i.sortingInfo.header)}}function Jqe(n,t){if(1&n&&(sn(0),E(1,Zqe,6,5,"th",3),an()),2&n){let e=t.$implicit,i=S();C(1),y("ngIf",i.showColumn(e))}}function $qe(n,t){1&n&&Ni(0)}var cpe=function(n){return{$implicit:n}};function eYe(n,t){if(1&n&&(_(0,"div",18),E(1,$qe,1,0,"ng-container",19),A(2),v()),2&n){let e=S(2).$implicit,i=S().$implicit,r=S(),o=$e(9);C(1),y("ngTemplateOutlet",o)("ngTemplateOutletContext",On(3,cpe,i.VALUE_CHANGE)),C(1),je(" ",r.getFormattedDataForColumn(e.type,i)," ")}}function tYe(n,t){1&n&&Ni(0)}function nYe(n,t){if(1&n&&(_(0,"div",18),E(1,tYe,1,0,"ng-container",19),A(2),v()),2&n){let e=S(2).$implicit,i=S().$implicit,r=S(),o=$e(9);C(1),y("ngTemplateOutlet",o)("ngTemplateOutletContext",On(3,cpe,i.PERCENTAGE_CHANGE)),C(1),je(" ",r.getFormattedDataForColumn(e.type,i)," ")}}function iYe(n,t){if(1&n&&(_(0,"div",20),A(1),v()),2&n){let e=S(2).$implicit,i=S().$implicit,r=S();C(1),je(" ",r.getFormattedDataForColumn(e.type,i)," ")}}function rYe(n,t){if(1&n&&(_(0,"td",15),E(1,eYe,3,5,"div",16),E(2,nYe,3,5,"div",16),E(3,iYe,2,1,"div",17),v()),2&n){let e=S().$implicit,i=S(2);y("ngSwitch",e.type),C(1),y("ngSwitchCase",i.ColumnHeaders.VALUE_CHANGE),C(1),y("ngSwitchCase",i.ColumnHeaders.PERCENTAGE_CHANGE)}}function oYe(n,t){if(1&n&&(sn(0),E(1,rYe,4,3,"td",14),an()),2&n){let e=t.$implicit,i=S(2);C(1),y("ngIf",i.showColumn(e))}}function sYe(n,t){if(1&n&&(sn(0),_(1,"tr",12)(2,"td",13),O(3,"span"),v(),E(4,oYe,2,1,"ng-container",1),v(),an()),2&n){let e=t.$implicit,i=S();C(3),Pt("background-color",e.COLOR),C(1),y("ngForOf",i.headers)}}function aYe(n,t){1&n&&O(0,"mat-icon",23)}function lYe(n,t){1&n&&O(0,"mat-icon",24)}function cYe(n,t){if(1&n&&(E(0,aYe,1,0,"mat-icon",21),E(1,lYe,1,0,"mat-icon",22)),2&n){let e=t.$implicit;y("ngIf",e>=0),C(1),y("ngIf",e<0)}}var Pp=(()=>(function(n){n[n.RIGHT=0]="RIGHT",n[n.LEFT=1]="LEFT"}(Pp||(Pp={})),Pp))(),OG=function(n){n.preventDefault()},upe=(()=>{class n{constructor(){this.sortDataBy=new G,this.orderColumns=new G,this.ColumnHeaders=Kt,this.SortingOrder=xl,this.Side=Pp,this.highlightSide=Pp.RIGHT}ngOnDestroy(){document.removeEventListener("dragover",OG)}getFormattedDataForColumn(e,i){switch(e){case Kt.RUN:return void 0===i.RUN?"":i.RUN;case Kt.VALUE:return void 0===i.VALUE?"":yp.formatShort(i.VALUE);case Kt.STEP:return void 0===i.STEP?"":Md.formatShort(i.STEP);case Kt.TIME:return void 0===i.TIME?"":new Date(i.TIME).toISOString();case Kt.RELATIVE_TIME:return void 0===i.RELATIVE_TIME?"":SS.formatReadable(i.RELATIVE_TIME);case Kt.SMOOTHED:return void 0===i.SMOOTHED?"":yp.formatShort(i.SMOOTHED);case Kt.VALUE_CHANGE:return void 0===i.VALUE_CHANGE?"":yp.formatShort(Math.abs(i.VALUE_CHANGE));case Kt.START_STEP:return void 0===i.START_STEP?"":Md.formatShort(i.START_STEP);case Kt.END_STEP:return void 0===i.END_STEP?"":Md.formatShort(i.END_STEP);case Kt.START_VALUE:return void 0===i.START_VALUE?"":Md.formatShort(i.START_VALUE);case Kt.END_VALUE:return void 0===i.END_VALUE?"":Md.formatShort(i.END_VALUE);case Kt.MIN_VALUE:return void 0===i.MIN_VALUE?"":Md.formatShort(i.MIN_VALUE);case Kt.MAX_VALUE:return void 0===i.MAX_VALUE?"":Md.formatShort(i.MAX_VALUE);case Kt.PERCENTAGE_CHANGE:return void 0===i.PERCENTAGE_CHANGE?"":Math.round(100*i.PERCENTAGE_CHANGE).toString()+"%";default:return""}}headerClicked(e){this.sortDataBy.emit(this.sortingInfo.header!==e||this.sortingInfo.order!==xl.ASCENDING?{header:e,order:xl.ASCENDING}:{header:e,order:xl.DESCENDING})}dragStart(e){this.draggingHeaderType=e.type,document.addEventListener("dragover",OG)}dragEnd(){!this.draggingHeaderType||!this.highlightedColumnType||(this.orderColumns.emit(this.moveHeader(this.getIndexOfHeaderWithType(this.draggingHeaderType),this.getIndexOfHeaderWithType(this.highlightedColumnType))),this.draggingHeaderType=void 0,this.highlightedColumnType=void 0,document.removeEventListener("dragover",OG))}dragEnter(e){!this.draggingHeaderType||(this.highlightSide=this.getIndexOfHeaderWithType(e.type)<this.getIndexOfHeaderWithType(this.draggingHeaderType)?Pp.LEFT:Pp.RIGHT,this.highlightedColumnType=e.type)}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.highlightedColumnType?{}:{highlight:!0,"highlight-border-right":this.highlightSide===Pp.RIGHT,"highlight-border-left":this.highlightSide===Pp.LEFT}}showColumn(e){return e.enabled&&(this.smoothingEnabled||e.type!==Kt.SMOOTHED)}getIndexOfHeaderWithType(e){return this.headers.findIndex(i=>e===i.type)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["tb-data-table"]],inputs:{headers:"headers",data:"data",sortingInfo:"sortingInfo",columnCustomizationEnabled:"columnCustomizationEnabled",smoothingEnabled:"smoothingEnabled"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns"},decls:10,vars:2,consts:[[1,"data-table"],[4,"ngFor","ngForOf"],["arrow",""],[3,"click",4,"ngIf"],[3,"click"],[1,"cell",3,"draggable","ngClass","dragstart","dragend","dragenter"],[3,"header"],[1,"sorting-icon-container"],["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"],[1,"row"],[1,"row-circle"],[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],["class","cell",4,"ngSwitchCase"],["class","cell extra-right-padding",4,"ngSwitchDefault"],[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&&(_(0,"div")(1,"table",0)(2,"thead")(3,"tr"),O(4,"th"),E(5,Jqe,2,1,"ng-container",1),v()(),_(6,"tbody"),E(7,sYe,5,3,"ng-container",1),v()()(),E(8,cYe,2,2,"ng-template",null,2,qt)),2&e&&(C(5),y("ngForOf",i.headers),C(2),y("ngForOf",i.data))},dependencies:[Fn,dn,Be,os,Cr,Ur,ch,Gt,vR],styles:[".data-table[_ngcontent-%COMP%]{border-spacing:4px;font-size:13px}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background-color:#fff;position:sticky;text-align:left;top:0;vertical-align:bottom}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:hover{cursor:pointer}body.dark-mode[_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background-color:#303030}.data-table[_ngcontent-%COMP%]   .cell[_ngcontent-%COMP%]{align-items:center;display:flex}.data-table[_ngcontent-%COMP%]   .extra-right-padding[_ngcontent-%COMP%]{padding-right:1px}.data-table[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{white-space:nowrap}.data-table[_ngcontent-%COMP%]   .row-circle[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:12px;width:12px}.data-table[_ngcontent-%COMP%]   .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}.data-table[_ngcontent-%COMP%]   .cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:12px;width:12px}.data-table[_ngcontent-%COMP%]   .sorting-icon-container[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:5px}.data-table[_ngcontent-%COMP%]   .show[_ngcontent-%COMP%]{opacity:1}.data-table[_ngcontent-%COMP%]   .show-on-hover[_ngcontent-%COMP%]{opacity:0}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:hover   .show-on-hover[_ngcontent-%COMP%]{opacity:.3}.data-table[_ngcontent-%COMP%]   .highlight[_ngcontent-%COMP%]{background-color:#eee}.data-table[_ngcontent-%COMP%]   .highlight-border-right[_ngcontent-%COMP%]{border-right:2px solid #ff9800}.data-table[_ngcontent-%COMP%]   .highlight-border-left[_ngcontent-%COMP%]{border-left:2px solid #ff9800}"],changeDetection:0}),n})(),ppe=(()=>{class n{constructor(){this.sortDataBy=new G,this.orderColumns=new G}getMinValueInRange(e,i,r,o=!1){let s=this.maybeSmoothedValue(e[i],o);for(let a=i;a<=r;a++)s>this.maybeSmoothedValue(e[a],o)&&(s=this.maybeSmoothedValue(e[a],o));return s}getMaxValueInRange(e,i,r,o=!1){let s=this.maybeSmoothedValue(e[i],o);for(let a=i;a<=r;a++)s<this.maybeSmoothedValue(e[a],o)&&(s=this.maybeSmoothedValue(e[a],o));return s}maybeSmoothedValue(e,i){return i?e.y:e.value}getTimeSelectionTableData(){if(null===this.stepOrLinkedTimeSelection)return[];let e=this.stepOrLinkedTimeSelection.start.step,i=this.stepOrLinkedTimeSelection.end?.step,r=this.dataSeries.filter(o=>{let s=this.chartMetadataMap[o.id];return s&&s.visible&&!Boolean(s.aux)}).map(o=>{let s=this.chartMetadataMap[o.id],a=bE(o.points,e),l=o.points[a],c=null,u=null;null!=i&&(u=bE(o.points,i),c=o.points[u]);let d={id:o.id};d.COLOR=s.color;for(let p of this.columnHeaders)switch(p.type){case Kt.RUN:let h="";s.alias&&(h=`${s.alias.aliasNumber} ${s.alias.aliasText}/`),d.RUN=`${h}${s.displayName}`;continue;case Kt.STEP:d.STEP=l.step;continue;case Kt.VALUE:d.VALUE=l.value;continue;case Kt.RELATIVE_TIME:d.RELATIVE_TIME=l.relativeTimeInMs;continue;case Kt.SMOOTHED:d.SMOOTHED=l.y;continue;case Kt.VALUE_CHANGE:if(!c)continue;d.VALUE_CHANGE=c.y-l.y;continue;case Kt.START_STEP:d.START_STEP=l.step;continue;case Kt.END_STEP:if(!c)continue;d.END_STEP=c.step;continue;case Kt.START_VALUE:d.START_VALUE=l.y;continue;case Kt.END_VALUE:if(!c)continue;d.END_VALUE=c.y;continue;case Kt.MIN_VALUE:if(!u)continue;d.MIN_VALUE=this.getMinValueInRange(o.points,a,u,!0);continue;case Kt.MAX_VALUE:if(!u)continue;d.MAX_VALUE=this.getMaxValueInRange(o.points,a,u,!0);continue;case Kt.PERCENTAGE_CHANGE:if(!c)continue;d.PERCENTAGE_CHANGE=(c.y-l.y)/l.y;continue;default:continue}return d});return r.sort((o,s)=>{let a=this.getSortableValue(o,this.sortingInfo.header),l=this.getSortableValue(s,this.sortingInfo.header);return a<l?this.sortingInfo.order===xl.ASCENDING?-1:1:a>l?this.sortingInfo.order===xl.ASCENDING?1:-1:0}),r}getSortableValue(e,i){return function(n){return Number.isNaN(n)||"NaN"===n||null==n?-1/0:n}(i===Kt.RUN?this.chartMetadataMap[e.id].displayName:e[i])}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["scalar-card-data-table"]],inputs:{chartMetadataMap:"chartMetadataMap",dataSeries:"dataSeries",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",columnHeaders:"columnHeaders",sortingInfo:"sortingInfo",columnCustomizationEnabled:"columnCustomizationEnabled",smoothingEnabled:"smoothingEnabled"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns"},decls:1,vars:5,consts:[[3,"headers","data","sortingInfo","columnCustomizationEnabled","smoothingEnabled","sortDataBy","orderColumns"]],template:function(e,i){1&e&&(_(0,"tb-data-table",0),P("sortDataBy",function(o){return i.sortDataBy.emit(o)})("orderColumns",function(o){return i.orderColumns.emit(o)}),v()),2&e&&y("headers",i.columnHeaders)("data",i.getTimeSelectionTableData())("sortingInfo",i.sortingInfo)("columnCustomizationEnabled",i.columnCustomizationEnabled)("smoothingEnabled",i.smoothingEnabled)},dependencies:[upe],encapsulation:2,changeDetection:0}),n})();var pYe=["stepSpan"];function hYe(n,t){if(1&n){let e=Pe();_(0,"button",4),P("click",function(){return oe(e),se(S().fobRemoved.emit())}),O(1,"mat-icon",5),v()}}function fYe(n,t){if(1&n){let e=Pe();_(0,"button",4),P("click",function(){return oe(e),se(S().fobRemoved.emit())}),O(1,"mat-icon",6),v()}}var mYe=function(n,t){return{fob:!0,unremovable:n,prospective:t}},hpe=(()=>{class n{constructor(){this.allowRemoval=!0,this.isProspective=!1,this.stepChanged=new G,this.fobRemoved=new G}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=R({type:n,selectors:[["card-fob"]],viewQuery:function(e,i){if(1&e&&ot(pYe,7,Re),2&e){let r;Ne(r=Le())&&(i.stepSpan=r.first)}},inputs:{step:"step",allowRemoval:"allowRemoval",isProspective:"isProspective"},outputs:{stepChanged:"stepChanged",fobRemoved:"fobRemoved"},features:[Ft],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&&(_(0,"div",0)(1,"span",1,2),P("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()}),v(),E(3,hYe,2,0,"button",3),E(4,fYe,2,0,"button",3),v()),2&e&&(y("ngClass",Qr(4,mYe,!i.allowRemoval,i.isProspective)),C(1),y("innerHTML",i.step,A3),C(2),y("ngIf",i.allowRemoval),C(1),y("ngIf",i.isProspective))},dependencies:[Fn,Be,Gt],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})(),_Ye=["startFobWrapper"],vYe=["endFobWrapper"],yYe=["prospectiveFobWrapper"];function bYe(n,t){1&n&&O(0,"div",7)}function xYe(n,t){if(1&n&&(_(0,"div",3,4),E(2,bYe,1,0,"div",5),O(3,"card-fob",6),v()),2&n){let e=S(2);Pt("transform",e.getCssTranslatePxForProspectiveFob()),C(2),y("ngIf",e.showExtendedLine),C(1),y("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("allowRemoval",!1)("isProspective",!0)("step",e.prospectiveStep)}}function CYe(n,t){if(1&n){let e=Pe();sn(0),E(1,xYe,4,7,"div",1),_(2,"div",2),P("mousemove",function(r){return oe(e),se(S().mouseOverProspectiveFobArea(r))})("click",function(r){return oe(e),se(S().prospectiveFobClicked(r))})("mouseleave",function(){return oe(e),se(S().onProspectiveAreaMouseLeave())}),v(),an()}if(2&n){let e=S();C(1),y("ngIf",null!==e.prospectiveStep),C(1),y("ngClass",e.isVertical()?"vertical-prospective-area":"horizontal-prospective-area")}}function MYe(n,t){if(1&n){let e=Pe();_(0,"div",11),P("mousedown",function(r){oe(e);let o=S(2);return se(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),v()}}function wYe(n,t){if(1&n){let e=Pe();_(0,"div",3,8),E(2,MYe,1,0,"div",9),_(3,"card-fob",10),P("mousedown",function(r){oe(e);let o=S();return se(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){oe(e);let o=S();return se(o.stepTyped(o.Fob.START,r))})("fobRemoved",function(){oe(e);let r=S();return se(r.onFobRemoved(r.Fob.START))}),v()()}if(2&n){let e=S();Pt("transform",e.getCssTranslatePxForStartFob()),C(2),y("ngIf",e.showExtendedLine),C(1),y("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.start.step)}}function SYe(n,t){if(1&n){let e=Pe();_(0,"div",11),P("mousedown",function(r){oe(e);let o=S(2);return se(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),v()}}function EYe(n,t){if(1&n){let e=Pe();_(0,"div",3,12),E(2,SYe,1,0,"div",9),_(3,"card-fob",13),P("mousedown",function(r){oe(e);let o=S();return se(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){oe(e);let o=S();return se(o.stepTyped(o.Fob.END,r))})("fobRemoved",function(){oe(e);let r=S();return se(r.onFobRemoved(r.Fob.END))}),v()()}if(2&n){let e=S();Pt("transform",e.getCssTranslatePxForEndFob()),C(2),y("ngIf",e.showExtendedLine),C(1),y("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.end.step)}}var Xr=(()=>(function(n){n[n.NONE=0]="NONE",n[n.START=1]="START",n[n.END=2]="END"}(Xr||(Xr={})),Xr))(),TYe={start:Xr.START,end:Xr.END},Gk=(()=>{class n{constructor(e){this.root=e,this.showExtendedLine=!1,this.isProspectiveFobFeatureEnabled=!1,this.prospectiveStep=null,this.prospectiveStepAxisPosition=null,this.onTimeSelectionChanged=new G,this.onTimeSelectionToggled=new G,this.onProspectiveStepChanged=new G,this.hasFobMoved=!1,this.currentDraggingFob=Xr.NONE,this.affordance=cs.NONE,this.mouseListener=this.mouseMove.bind(this),this.stopListener=this.stopDrag.bind(this),this.Fob=Xr,this.TimeSelectionAffordance=cs}getCssTranslatePxForStartFob(){return this.axisDirection===pa.VERTICAL?`translate(0px, ${this.startStepAxisPosition}px)`:`translate(${this.startStepAxisPosition}px, 0px)`}getCssTranslatePxForEndFob(){return null===this.endStepAxisPosition?"":this.axisDirection===pa.VERTICAL?`translate(0px, ${this.endStepAxisPosition}px)`:`translate(${this.endStepAxisPosition}px, 0px)`}getCssTranslatePxForProspectiveFob(){return null===this.prospectiveStep?"":this.axisDirection===pa.VERTICAL?`translate(0px, ${this.prospectiveStepAxisPosition}px)`:`translate(${this.prospectiveStepAxisPosition}px, 0px)`}stopEventPropagation(e){e.stopPropagation(),e.preventDefault()}startDrag(e,i,r){i!==cs.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=Xr.NONE,this.hasFobMoved&&this.timeSelection&&this.onTimeSelectionChanged.emit({timeSelection:this.timeSelection,affordance:this.affordance}),this.affordance=cs.NONE,this.hasFobMoved=!1}isVertical(){return this.axisDirection===pa.VERTICAL}shouldSwapFobs(e){return!(!this.timeSelection||!this.timeSelection.end)&&(this.currentDraggingFob===Xr.END?e<this.timeSelection.start.step:this.currentDraggingFob===Xr.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,s]=this.currentDraggingFob===Xr.END?["end","start"]:["start","end"];return this.currentDraggingFob=TYe[s],r[o]=this.timeSelection[s],r[s]={step:e},r}return this.currentDraggingFob===Xr.END?(r.end={step:e},r):(r.start={step:e},r)}getNewStepFromMouseEvent(e){let i=null,r=this.getMousePositionFromEvent(e),o=this.axisDirection===pa.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===Xr.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===Xr.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===Xr.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===pa.VERTICAL?i-this.root.nativeElement.getBoundingClientRect().top:r-this.root.nativeElement.getBoundingClientRect().left}getCurrentFob(){switch(this.currentDraggingFob){case Xr.START:return this.startFobWrapper;case Xr.END:return this.endFobWrapper;case Xr.NONE:return this.prospectiveFobWrapper}}getCurrentFobStep(){switch(this.currentDraggingFob){case Xr.START:return this.timeSelection?.start.step;case Xr.END:return this.timeSelection?.end?.step;case Xr.NONE:return this.prospectiveStep??void 0}}getMousePositionFromEvent(e){return this.axisDirection===pa.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===Xr.START?r.start={step:i}:e===Xr.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:cs.FOB_TEXT})}prospectiveFobClicked(e){e.stopPropagation();let i=this.getProspectiveTimeSelection();!i||(this.onTimeSelectionChanged.emit({affordance:cs.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!==Xr.END?null===this.timeSelection.end?this.onTimeSelectionToggled.emit():this.onTimeSelectionChanged.emit({affordance:cs.FOB_REMOVED,timeSelection:{start:this.timeSelection.end,end:null}}):this.onTimeSelectionChanged.emit({affordance:cs.FOB_REMOVED,timeSelection:{...this.timeSelection,end:null}})}onProspectiveAreaMouseLeave(){this.onProspectiveStepChanged.emit(null)}}return n.\u0275fac=function(e){return new(e||n)(M(Re))},n.\u0275cmp=R({type:n,selectors:[["card-fob-controller"]],viewQuery:function(e,i){if(1&e&&(ot(_Ye,5),ot(vYe,5),ot(yYe,5)),2&e){let r;Ne(r=Le())&&(i.startFobWrapper=r.first),Ne(r=Le())&&(i.endFobWrapper=r.first),Ne(r=Le())&&(i.prospectiveFobWrapper=r.first)}},inputs:{axisDirection:"axisDirection",timeSelection:"timeSelection",cardFobHelper:"cardFobHelper",startStepAxisPosition:"startStepAxisPosition",endStepAxisPosition:"endStepAxisPosition",highestStep:"highestStep",lowestStep:"lowestStep",showExtendedLine:"showExtendedLine",isProspectiveFobFeatureEnabled:"isProspectiveFobFeatureEnabled",prospectiveStep:"prospectiveStep",prospectiveStepAxisPosition:"prospectiveStepAxisPosition"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled",onProspectiveStepChanged:"onProspectiveStepChanged"},decls:4,vars:3,consts:[[4,"ngIf"],["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,"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&&(_(0,"div"),E(1,CYe,3,2,"ng-container",0),E(2,wYe,4,5,"div",1),E(3,EYe,4,5,"div",1),v()),2&e&&(C(1),y("ngIf",i.isProspectiveFobFeatureEnabled),C(1),y("ngIf",i.timeSelection),C(1),y("ngIf",i.timeSelection&&i.timeSelection.end))},dependencies:[Fn,Be,hpe],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})(),mpe=(()=>{class n{constructor(){this.isProspectiveFobFeatureEnabled=!1,this.disableInteraction=!1,this.onTimeSelectionChanged=new G,this.onTimeSelectionToggled=new G,this.axisDirection=pa.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=R({type:n,selectors:[["scalar-card-fob-controller"]],inputs:{timeSelection:"timeSelection",scale:"scale",minMaxHorizontalViewExtend:"minMaxHorizontalViewExtend",minMaxStep:"minMaxStep",axisSize:"axisSize",isProspectiveFobFeatureEnabled:"isProspectiveFobFeatureEnabled",disableInteraction:"disableInteraction"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled"},decls:1,vars:13,consts:[[3,"axisDirection","timeSelection","startStepAxisPosition","endStepAxisPosition","prospectiveStepAxisPosition","highestStep","lowestStep","prospectiveStep","isProspectiveFobFeatureEnabled","cardFobHelper","showExtendedLine","onProspectiveStepChanged","onTimeSelectionChanged","onTimeSelectionToggled"]],template:function(e,i){1&e&&(_(0,"card-fob-controller",0),P("onProspectiveStepChanged",function(o){return i.onProspectiveStepChanged(o)})("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(o){return i.onTimeSelectionToggled.emit(o)}),v()),2&e&&(Pt("pointer-events",i.disableInteraction?"none":"all"),y("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("prospectiveStepAxisPosition",i.getAxisPositionFromProspectiveStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("prospectiveStep",i.prospectiveStep)("isProspectiveFobFeatureEnabled",i.isProspectiveFobFeatureEnabled)("cardFobHelper",i.cardFobHelper)("showExtendedLine",!0))},dependencies:[Gk],styles:["scalar-card-fob-controller .time-fob-wrapper{height:100%}"],changeDetection:0}),n})();function AYe(n,t){1&n&&O(0,"mat-spinner",25)}function IYe(n,t){1&n&&(_(0,"th"),A(1,"Smoothed"),v())}function PYe(n,t){if(1&n&&(sn(0),O(1,"tb-experiment-alias",31),A(2,"/"),an()),2&n){let e=S().$implicit;C(1),y("alias",e.metadata.alias)}}function RYe(n,t){if(1&n&&(_(0,"td"),A(1),v()),2&n){let e=S().$implicit,i=S(2);C(1),je(" ",i.valueFormatter.formatShort(e.dataPoint.y)," ")}}function OYe(n,t){if(1&n&&(sn(0),_(1,"tr",29)(2,"td",30),O(3,"span"),v(),_(4,"td",2),E(5,PYe,3,1,"ng-container",22),A(6),v(),E(7,RYe,2,1,"td",22),_(8,"td"),A(9),v(),_(10,"td"),A(11),v(),_(12,"td"),A(13),B(14,"date"),v(),_(15,"td"),A(16),v()(),an()),2&n){let e=t.$implicit,i=S(2);C(1),et("closest",e.metadata.closest),C(2),Pt("background-color",e.metadata.color),C(2),y("ngIf",e.metadata.alias),C(1),je("",e.metadata.displayName," "),C(1),y("ngIf",i.smoothingEnabled),C(2),yt(i.valueFormatter.formatShort(e.dataPoint.value)),C(2),yt(i.stepFormatter.formatShort(e.dataPoint.step)),C(2),yt(Jf(14,11,e.dataPoint.wallTime,"short")),C(3),je(" ",i.relativeXFormatter.formatReadable(e.dataPoint.relativeTimeInMs)," ")}}function kYe(n,t){if(1&n&&(_(0,"table",26)(1,"thead")(2,"tr"),O(3,"th",27),_(4,"th"),A(5,"Run"),v(),E(6,IYe,2,0,"th",22),_(7,"th"),A(8,"Value"),v(),_(9,"th"),A(10,"Step"),v(),_(11,"th"),A(12,"Time"),v(),_(13,"th"),A(14,"Relative"),v()()(),_(15,"tbody"),E(16,OYe,17,14,"ng-container",28),v()()),2&n){let e=t.data,i=t.cursorLocationInDataCoord,r=t.cursorLocation,o=S();C(6),y("ngIf",o.smoothingEnabled),C(10),y("ngForOf",o.getCursorAwareTooltipData(e,i,r))("ngForTrackBy",o.trackByTooltipDatum)}}function FYe(n,t){if(1&n){let e=Pe();sn(0),_(1,"div",32)(2,"scalar-card-data-table",33),P("sortDataBy",function(r){return oe(e),se(S().sortDataBy(r))})("orderColumns",function(r){return oe(e),se(S().reorderColumnHeaders.emit(r))}),v()(),an()}if(2&n){let e=S();C(2),y("chartMetadataMap",e.chartMetadataMap)("dataSeries",e.dataSeries)("stepOrLinkedTimeSelection",e.stepOrLinkedTimeSelection)("columnHeaders",e.columnHeaders)("sortingInfo",e.sortingInfo)("columnCustomizationEnabled",e.columnCustomizationEnabled)("smoothingEnabled",e.smoothingEnabled)}}var NYe=function(n){return[0,n]},LYe=function(){return{"out-of-selected-time":!0,end:!0,range:!0}};function BYe(n,t){if(1&n&&O(0,"div",34),2&n){let e=S(2),i=e.viewExtent,r=e.domDimension,o=e.xScale,s=S();Pt("left",o.forward(i.x,On(3,NYe,r.width),null==s.stepOrLinkedTimeSelection.end?null:s.stepOrLinkedTimeSelection.end.step)+"px"),y("ngClass",Qp(5,LYe))}}var VYe=function(n){return[n,0]},HYe=function(n){return{"out-of-selected-time":!0,start:!0,range:n}};function UYe(n,t){if(1&n&&(sn(0),O(1,"div",34),E(2,BYe,1,6,"div",35),an()),2&n){let e=S(),i=e.viewExtent,r=e.domDimension,o=e.xScale,s=S();C(1),Pt("right",o.forward(i.x,On(4,VYe,r.width),s.stepOrLinkedTimeSelection.start.step)+"px"),y("ngClass",On(6,HYe,!(null==s.stepOrLinkedTimeSelection.end||!s.stepOrLinkedTimeSelection.end.step))),C(1),y("ngIf",null==s.stepOrLinkedTimeSelection.end?null:s.stepOrLinkedTimeSelection.end.step)}}function zYe(n,t){1&n&&E(0,UYe,3,8,"ng-container",22),2&n&&y("ngIf",S().stepOrLinkedTimeSelection)}function jYe(n,t){if(1&n){let e=Pe();sn(0),_(1,"scalar-card-fob-controller",36),P("onTimeSelectionChanged",function(r){return oe(e),se(S(2).onTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return oe(e),se(S(2).onFobRemoved())}),v(),an()}if(2&n){let e=S(),i=e.interactionState,r=e.xScale,o=e.viewExtent,s=e.domDimension,a=S();C(1),y("disableInteraction","NONE"!==i)("timeSelection",a.stepOrLinkedTimeSelection)("scale",r)("minMaxHorizontalViewExtend",o.x)("minMaxStep",a.minMaxStep)("axisSize",s.width)("isProspectiveFobFeatureEnabled",a.isProspectiveFobFeatureEnabled)}}function GYe(n,t){1&n&&E(0,jYe,2,7,"ng-container",22),2&n&&y("ngIf",S().showFobController())}var gpe=(()=>{class n{constructor(e,i){this.ref=e,this.dialog=i,this.DataLoadState=Oe,this.RendererType=dr,this.ScaleType=Nr,this.isProspectiveFobFeatureEnabled=!1,this.onFullSizeToggle=new G,this.onPinClicked=new G,this.onTimeSelectionChanged=new G,this.onStepSelectorToggled=new G,this.onDataTableSorting=new G,this.reorderColumnHeaders=new G,this.onLineChartZoom=new G,this.sortingInfo={header:Kt.RUN,order:xl.ASCENDING},this.yScaleType=Nr.LINEAR,this.isViewBoxOverridden=!1,this.relativeXFormatter=SS,this.valueFormatter=yp,this.stepFormatter=Md}toggleYScaleType(){this.yScaleType=this.yScaleType===Nr.LINEAR?Nr.LOG10:Nr.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 Ji.RELATIVE:return SS;case Ji.STEP:return jce;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}})),s=1/0,a=0;for(let l=0;l<o.length;l++)s>o[l].metadata.distToCursorPixels&&(s=o[l].metadata.distToCursorPixels,a=l);switch(o.length&&(o[a].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(bl.FOB_DESELECT)}showDataTable(){return this.xAxisType===Ji.STEP&&null!==this.stepOrLinkedTimeSelection}showFobController(){return this.xAxisType===Ji.STEP&&(null!==this.stepOrLinkedTimeSelection||this.isProspectiveFobFeatureEnabled)}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(vl))},n.\u0275cmp=R({type:n,selectors:[["scalar-card-component"]],viewQuery:function(e,i){if(1&e&&ot(jk,5),2&e){let r;Ne(r=Le())&&(i.lineChart=r.first)}},inputs:{cardId:"cardId",chartMetadataMap:"chartMetadataMap",DataDownloadComponent:"DataDownloadComponent",dataSeries:"dataSeries",ignoreOutliers:"ignoreOutliers",isCardVisible:"isCardVisible",isPinned:"isPinned",loadState:"loadState",showFullSize:"showFullSize",smoothingEnabled:"smoothingEnabled",tag:"tag",title:"title",tooltipSort:"tooltipSort",xAxisType:"xAxisType",xScaleType:"xScaleType",useDarkMode:"useDarkMode",forceSvg:"forceSvg",columnCustomizationEnabled:"columnCustomizationEnabled",linkedTimeSelection:"linkedTimeSelection",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",isProspectiveFobFeatureEnabled:"isProspectiveFobFeatureEnabled",minMaxStep:"minMaxStep",columnHeaders:"columnHeaders"},outputs:{onFullSizeToggle:"onFullSizeToggle",onPinClicked:"onPinClicked",onTimeSelectionChanged:"onTimeSelectionChanged",onStepSelectorToggled:"onStepSelectorToggled",onDataTableSorting:"onDataTableSorting",reorderColumnHeaders:"reorderColumnHeaders",onLineChartZoom:"onLineChartZoom"},decls:36,vars:27,consts:function(){let t,e,i,r,o;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`,[[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,1,"pin-button",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"],[1,"chart-container"],["diameter","18",4,"ngIf"],[3,"disableUpdate","preferredRendererType","seriesData","seriesMetadataMap","xScaleType","yScaleType","customXFormatter","ignoreYOutliers","tooltipTemplate","useDarkMode","customVisTemplate","customChartOverlayTemplate","onViewBoxOverridden","viewBoxChanged"],["tooltip",""],[4,"ngIf"],["lineChartCustomVis",""],["lineChartCustomXAxisVis",""],["diameter","18"],[1,"tooltip"],[1,"circle-header"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[3,"alias"],[1,"data-table-container"],[3,"chartMetadataMap","dataSeries","stepOrLinkedTimeSelection","columnHeaders","sortingInfo","columnCustomizationEnabled","smoothingEnabled","sortDataBy","orderColumns"],[3,"ngClass"],[3,"ngClass","left",4,"ngIf"],[3,"disableInteraction","timeSelection","scale","minMaxHorizontalViewExtend","minMaxStep","axisSize","isProspectiveFobFeatureEnabled","onTimeSelectionChanged","onTimeSelectionToggled"]]},template:function(e,i){if(1&e&&(_(0,"div",0)(1,"div",1)(2,"span",2),O(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),v(),_(5,"span",5)(6,"button",6),P("click",function(){return i.resetDomain()}),B(7,"async"),B(8,"async"),O(9,"mat-icon",7),v(),_(10,"button",8),P("click",function(){return i.onPinClicked.emit(!i.isPinned)}),O(11,"mat-icon",9),v(),_(12,"button",10),P("click",function(){return i.onFullSizeToggle.emit()}),O(13,"mat-icon",9),v(),_(14,"button",11),O(15,"mat-icon",12),v(),_(16,"mat-menu",null,13)(18,"button",14),P("click",function(){return i.toggleYScaleType()}),O(19,"mat-icon",15),_(20,"span"),A(21,"Toggle Y-axis log scale"),v()(),_(22,"button",16),P("click",function(){return i.openDataDownloadDialog()}),O(23,"mat-icon",17),_(24,"span"),A(25,"Download data"),v()()()()(),_(26,"div",18),E(27,AYe,1,0,"mat-spinner",19),_(28,"line-chart",20),P("onViewBoxOverridden",function(o){return i.isViewBoxOverridden=o})("viewBoxChanged",function(o){return i.onLineChartZoom.emit(o)}),v(),E(29,kYe,17,3,"ng-template",null,21,qt),v()(),E(31,FYe,3,7,"ng-container",22),E(32,zYe,1,1,"ng-template",null,23,qt),E(34,GYe,1,1,"ng-template",null,24,qt)),2&e){let r=$e(17),o=$e(30),s=$e(33),a=$e(35);C(3),Zi("title",i.tag),Zi("value",i.title),C(1),y("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped),C(2),y("disabled",!i.lineChart||!U(7,23,i.lineChart.getIsViewBoxOverridden()))("title",i.lineChart&&U(8,25,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"),C(4),ze("title",i.isPinned?"Unpin card":"Pin card"),C(1),y("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),C(2),y("svgIcon",i.showFullSize?"fullscreen_exit_24px":"fullscreen_24px"),C(1),y("matMenuTriggerFor",r),C(13),y("ngIf",i.loadState===i.DataLoadState.LOADING),C(1),y("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)("customVisTemplate",s)("customChartOverlayTemplate",a),C(3),y("ngIf",i.showDataTable())}},dependencies:[Fn,dn,Be,cy,jk,_n,Gt,hd,nu,fd,Bo,uy,dy,ppe,mpe,Ge,U_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;height:100%;overflow:auto;padding:16px;padding-top:4px}.always-visible[_ngcontent-%COMP%]{display:flex;flex-basis:298px;flex-direction:column;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}.pin-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:18px}.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%]{flex-grow:1}.chart-container[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{position:absolute;right:11px;top:11px}.chart-container[_ngcontent-%COMP%]   line-chart[_ngcontent-%COMP%]{display:block;height:100%}.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%]{width:100%;height:100px;overflow:auto}"],changeDetection:0}),n})(),kG=-1/0,FG=1/0;function qYe(n,t){return n.length===t.length&&n.every((e,i)=>{let r=t[i],o=e.points,s=r.points;return e.runId===r.runId&&o.length===s.length&&o.every((a,l)=>{let c=s[l];return a.x===c.x&&a.y===c.y})})}var _pe=(()=>{class n{constructor(e){this.store=e,this.DataDownloadComponent=ose,this.fullWidthChanged=new G,this.fullHeightChanged=new G,this.pinStateChanged=new G,this.isVisible=!1,this.isProspectiveFobFeatureEnabled$=this.store.select(D$),this.minMaxSteps$=new hr({minStep:kG,maxStep:FG}),this.lineChartZoom$=new hr({minStep:kG,maxStep:FG}),this.stepSelectorTimeSelection$=new hr(null),this.useDarkMode$=this.store.select(Qu),this.ignoreOutliers$=this.store.select(hv),this.tooltipSort$=this.store.select(pv),this.xAxisType$=this.store.select(td),this.forceSvg$=this.store.select(w$),this.columnCustomizationEnabled$=this.store.select(qA),this.xScaleType$=this.store.select(td).pipe(L(i=>{switch(i){case Ji.STEP:case Ji.RELATIVE:return Nr.LINEAR;case Ji.WALL_TIME:return Nr.TIME;default:throw new Error(`Invalid xAxisType for line chart. ${i}`)}})),this.scalarSmoothing$=this.store.select(op),this.smoothingEnabled$=this.store.select(op).pipe(L(i=>i>0)),this.showFullSize=!1,this.ngUnsubscribe=new ke}onVisibilityChange({visible:e}){this.isVisible=e}isScalarCardMetadata(e){let{plugin:i}=e;return i===ri.SCALARS}onFullSizeToggle(){this.showFullSize=!this.showFullSize,this.fullWidthChanged.emit(this.showFullSize),this.fullHeightChanged.emit(this.showFullSize)}ngOnInit(){let i=this.store.select(tc,this.cardId).pipe(Ye(l=>!!l&&this.isScalarCardMetadata(l)),L(l=>l));function s(l){return JSON.stringify(["smoothed",l])}let a=this.store.select(xh,this.cardId).pipe(st(this.ngUnsubscribe),Ye(l=>Boolean(l)),L(l=>l),Ma(1)).pipe(fr(this.store.select(td)),L(([l,c])=>Object.keys(l).map(p=>({runId:p,points:this.stepSeriesToLineSeries(l[p],c)}))),yi(qYe)).pipe(fr(this.store.select(OI)),st(this.ngUnsubscribe),L(([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 s of e.points)Number.isFinite(s.x)?(s.x<r&&(i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o}),o=[]),o.push(s),r=s.x):o.push(s);i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o});for(let s=0;s<i.length;s++)t.push({...i[s],partitionIndex:s,partitionSize:i.length})}return t}(l):l.map(u=>({...u,seriesId:u.runId,partitionIndex:0,partitionSize:1}))),L(l=>l.map(c=>{let u=c.points[0]?.wallTime;return{...c,points:c.points.map(d=>({...d,relativeTimeInMs:d.wallTime-u}))}})),fr(this.store.select(td)),L(([l,c])=>l.map(u=>({...u,points:u.points.map(d=>{let p;switch(c){case Ji.RELATIVE:p=d.relativeTimeInMs;break;case Ji.WALL_TIME:p=d.wallTime;break;default:p=d.step}return{...d,x:p}})}))),Ma(1));Lt([a,this.lineChartZoom$]).subscribe(([l,c])=>{let u=l.map(({points:m})=>m.map(({x:x})=>x)).flat(),d=0===u.length?kG:Math.min(...u),p=0===u.length?FG:Math.max(...u),h=Math.max(d,c.minStep),f=Math.min(p,c.maxStep);this.minMaxSteps$.next({minStep:h,maxStep:f})}),this.dataSeries$=a.pipe(fr(this.store.select(op)),ui(([l,c])=>{let u=l.map(({seriesId:d,points:p})=>({id:d,points:p}));return c<=0?Xt(u):Eo(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 s=i.points.length>0?0:NaN,a=0,l=i.points.map(c=>{let u=c.y;if(Number.isFinite(u)){s=s*t+(1-t)*u,a++;let d=1===t?1:1-Math.pow(t,a);return{x:c.x,y:s/d}}return{x:c.x,y:u}});e.push({id:i.id,points:l})}return e}(u,c)).pipe(L(d=>{let p=u.map((h,f)=>({id:s(h.id),points:d[f].points.map(({y:m},x)=>({...h.points[x],y:m}))}));return[...u,...p]}))}),zn([])),this.linkedTimeSelection$=Lt([this.minMaxSteps$,this.store.select(Ym),this.store.select(Xm),this.store.select(td)]).pipe(L(([{minStep:l,maxStep:c},u,d,p])=>u&&p===Ji.STEP&&d?Qh(d,l,c):null)),this.stepOrLinkedTimeSelection$=Lt([this.stepSelectorTimeSelection$,this.linkedTimeSelection$,this.store.select(Ym)]).pipe(L(([l,c,u])=>u&&c?{start:{step:c.startStep},end:null===c.endStep?null:{step:c.endStep}}:l)),this.columnHeaders$=Lt([this.stepOrLinkedTimeSelection$,this.store.select(BI),this.store.select(VI)]).pipe(L(([l,c,u])=>null===l||null===l.end?c:u)),this.chartMetadataMap$=a.pipe(ui(l=>Lt(l.map(c=>this.getRunDisplayNameAndAlias(c.runId).pipe(L(u=>({...c,...u})))))),fr(this.store.select(oo),this.store.select(nc),this.store.select(op)),Hr(0),L(([l,c,u,d])=>{let p={},h=d>0;for(let f of l){let{seriesId:m,runId:x,displayName:g,alias:b,partitionIndex:D,partitionSize:T}=f;p[m]={type:sy.ORIGINAL,id:m,alias:b,displayName:T>1?`${g}: ${D}`:g,visible:Boolean(c&&c.get(x)),color:u[x]??"#fff",aux:!1,opacity:1}}if(!h)return p;for(let[f,m]of Object.entries(p)){let x=s(f);p[x]={...m,id:x,type:sy.DERIVED,aux:!1,originalSeriesId:f},m.aux=!0,m.opacity=.25}return p}),zn({})),this.loadState$=this.store.select(bh,this.cardId),this.tag$=i.pipe(L(l=>l.tag)),this.title$=this.tag$.pipe(L(l=>ly(l,this.groupName))),this.isPinned$=this.store.select(Ch,this.cardId),this.store.select(fv).pipe(Wt(this.minMaxSteps$),st(this.ngUnsubscribe)).subscribe(([l,c])=>{l?null!==this.stepSelectorTimeSelection$.getValue()||this.stepSelectorTimeSelection$.next({start:{step:c.minStep},end:null}):this.stepSelectorTimeSelection$.next(null)}),this.store.select(mv).pipe(Wt(this.minMaxSteps$),st(this.ngUnsubscribe)).subscribe(([l,c])=>{let u=this.stepSelectorTimeSelection$.getValue();null!==u?l||null===u.end?l&&null===u.end&&this.stepSelectorTimeSelection$.next({start:u.start,end:{step:c.maxStep}}):this.stepSelectorTimeSelection$.next({start:u.start,end:null}):l&&this.stepSelectorTimeSelection$.next({start:{step:c.minStep},end:l?{step:c.maxStep}:null})}),this.minMaxSteps$.pipe(st(this.ngUnsubscribe)).subscribe(({minStep:l,maxStep:c})=>{if(!this.stepSelectorTimeSelection$.getValue())return;let u=this.stepSelectorTimeSelection$.getValue()?.start.step,d=this.stepSelectorTimeSelection$.getValue()?.end?.step,p=function(n,t,e){let i=Qh(n,t,e);return{start:{step:i.startStep},end:null===i.endStep?null:{step:i.endStep}}}({start:{step:u??l},end:this.stepSelectorTimeSelection$.getValue()?.end?{step:d??c}:null},l,c);this.stepSelectorTimeSelection$.next(p)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}getRunDisplayNameAndAlias(e){return Lt([this.store.select(GI,{runId:e}),this.store.select(Yu),this.store.select(WI,{runId:e})]).pipe(L(([i,r,o])=>{let s=null!==i?r[i]??null:null;return{displayName:o||s?o?.name??"...":e,alias:s}}))}stepSeriesToLineSeries(e,i){let r=i===Ji.STEP;return e.map(o=>{let s=1e3*o.wallTime;return{...o,x:r?o.step:s,y:o.value,wallTime:s,relativeTimeInMs:0}})}onDataTableSorting(e){this.store.dispatch(yoe(e))}onTimeSelectionChanged(e){let{minStep:i,maxStep:r}=this.minMaxSteps$.getValue(),{startStep:o,endStep:s}=Qh(e.timeSelection,i,r),a={start:{step:o},end:s?{step:s}:null};this.store.dispatch(Yh(e)),this.stepSelectorTimeSelection$.next(a)}onStepSelectorToggled(e){this.stepSelectorTimeSelection$.getValue()&&this.stepSelectorTimeSelection$.next(null),this.store.dispatch(Xh({affordance:e}))}onLineChartZoom(e){let i=e.x,r={minStep:Math.ceil(Math.min(...i)),maxStep:Math.floor(Math.max(...i))};this.lineChartZoom$.next(r)}reorderColumnHeaders(e){this.store.dispatch(dR({newOrder:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["scalar-card"]],inputs:{DataDownloadComponent:"DataDownloadComponent",cardId:"cardId",groupName:"groupName"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged",pinStateChanged:"pinStateChanged"},decls:20,vars:61,consts:[["observeIntersection","",3,"cardId","chartMetadataMap","DataDownloadComponent","dataSeries","ignoreOutliers","isCardVisible","isPinned","loadState","showFullSize","smoothingEnabled","tag","title","tooltipSort","xAxisType","xScaleType","useDarkMode","linkedTimeSelection","stepOrLinkedTimeSelection","isProspectiveFobFeatureEnabled","forceSvg","columnCustomizationEnabled","minMaxStep","columnHeaders","onFullSizeToggle","onPinClicked","onVisibilityChange","onTimeSelectionChanged","onStepSelectorToggled","onDataTableSorting","onLineChartZoom","reorderColumnHeaders"]],template:function(e,i){1&e&&(_(0,"scalar-card-component",0),P("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)})("reorderColumnHeaders",function(o){return i.reorderColumnHeaders(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),B(11,"async"),B(12,"async"),B(13,"async"),B(14,"async"),B(15,"async"),B(16,"async"),B(17,"async"),B(18,"async"),B(19,"async"),v()),2&e&&y("cardId",i.cardId)("chartMetadataMap",U(1,23,i.chartMetadataMap$))("DataDownloadComponent",i.DataDownloadComponent)("dataSeries",U(2,25,i.dataSeries$))("ignoreOutliers",U(3,27,i.ignoreOutliers$))("isCardVisible",i.isVisible)("isPinned",U(4,29,i.isPinned$))("loadState",U(5,31,i.loadState$))("showFullSize",i.showFullSize)("smoothingEnabled",U(6,33,i.smoothingEnabled$))("tag",U(7,35,i.tag$))("title",U(8,37,i.title$))("tooltipSort",U(9,39,i.tooltipSort$))("xAxisType",U(10,41,i.xAxisType$))("xScaleType",U(11,43,i.xScaleType$))("useDarkMode",U(12,45,i.useDarkMode$))("linkedTimeSelection",U(13,47,i.linkedTimeSelection$))("stepOrLinkedTimeSelection",U(14,49,i.stepOrLinkedTimeSelection$))("isProspectiveFobFeatureEnabled",U(15,51,i.isProspectiveFobFeatureEnabled$))("forceSvg",U(16,53,i.forceSvg$))("columnCustomizationEnabled",U(17,55,i.columnCustomizationEnabled$))("minMaxStep",U(18,57,i.minMaxSteps$))("columnHeaders",U(19,59,i.columnHeaders$))},dependencies:[ay,gpe,Ge],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"],changeDetection:0}),n})();function QYe(n,t,e){let i=[],{left:r,right:o}=t,s=(o-r)/e,a=0,l=0;for(let c=0;c<e;c++){let u=r+c*s,d=u+s,p=c===e-1,h=l;for(l=0;a<n.length;){let f=n[a],m=KYe(f,u,d,!p);if(h+=m.curr,l+=m.next,f.x+f.dx>d)break;a++}i.push({x:u,dx:s,y:h})}return i}function KYe(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 s=Math.min(o,e)-Math.max(r,t);return{curr:n.y*s/n.dx,next:0}}var $Ye=xo(".2~s"),eXe=xo(".4~r"),tXe=xo(".2~e");function ype(n){if(0===n)return"0";let t=Math.abs(n);return t>=1e4?$Ye(n):t<.001?tXe(n):eXe(n)}var nXe=["main"],iXe=["xAxis"],rXe=["yAxis"],oXe=["content"],sXe=["histograms"];function aXe(n,t){if(1&n&&(In(),_(0,"g")(1,"text"),A(2),v()()),2&n){let e=S();Pt("transform",e.getCssTranslatePx(e.tooltipData.xAxis.position,9)),C(2),yt(e.tooltipData.xAxis.label)}}function lXe(n,t){if(1&n&&(In(),_(0,"g")(1,"text"),A(2),v()()),2&n){let e=S();Pt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),C(1),ze("y",e.tooltipData.yAxis.position),C(1),je(" ",e.tooltipData.yAxis.label," ")}}function cXe(n,t){if(1&n){let e=Pe();In(),Js(),sn(0),_(1,"histogram-card-fob-controller",16),P("onTimeSelectionChanged",function(r){return oe(e),se(S().onLinkedTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return oe(e),se(S().onLinkedTimeToggled.emit())}),v(),an()}if(2&n){let e=S();C(1),y("timeSelection",e.timeSelection)("steps",e.getSteps())("temporalScale",e.scales.temporalScale)}}function uXe(n,t){if(1&n&&(In(),_(0,"g"),O(1,"line",17),v()),2&n){let e=t.$implicit;Pt("transform",S().getCssTranslatePx(0,e))}}function dXe(n,t){1&n&&(In(),O(0,"line",21))}function pXe(n,t){if(1&n&&(In(),O(0,"circle",22)),2&n){let e=S().$implicit,i=S();Pt("transform",i.getCssTranslatePx(i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).x,i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).y))}}function hXe(n,t){if(1&n){let e=Pe();In(),_(0,"g",18),P("mouseenter",function(r){let s=oe(e).$implicit;return se(S().updateColorOnHover(r,s,!0))})("mouseleave",function(r){let s=oe(e).$implicit;return se(S().updateColorOnHover(r,s,!1))})("click",function(){let o=oe(e).$implicit;return se(S().onLinkedTimeRangeChanged(o))}),E(1,dXe,1,0,"line",19),O(2,"path"),E(3,pXe,1,2,"circle",20),v()}if(2&n){let e=t.$implicit,i=S();Pt("transform",i.getGroupTransform(e))("color",i.getHistogramFill(e)),et("histogram",!0)("no-color",!i.isDatumInTimeSelectionRange(e)),C(1),y("ngIf",i.mode===i.HistogramMode.OFFSET),C(1),ze("d",i.getHistogramPath(e)),C(1),y("ngIf",i.tooltipData)}}function fXe(n,t){if(1&n&&(In(),O(0,"circle",22)),2&n){let e=S(2);ze("cx",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).x)("cy",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).y)}}function mXe(n,t){if(1&n&&(In(),_(0,"g",4)(1,"g"),O(2,"path"),E(3,fXe,1,2,"circle",23),v(),_(4,"g",24)(5,"text",25),A(6),v()()()),2&n){let e=S();C(1),Pt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),C(1),ze("d",e.getHistogramPath(e.tooltipData.closestDatum)),C(1),y("ngIf",e.tooltipData.closestBin),C(1),Pt("transform",e.getCssTranslatePx(e.tooltipData.value.position.x,e.tooltipData.value.position.y)),C(2),yt(e.tooltipData.value.label)}}var Wk=(()=>{class n{constructor(e){this.changeDetector=e,this.mode=zr.OFFSET,this.timeProperty=Ro.STEP,this.timeSelection=null,this.onLinkedTimeSelectionChanged=new G,this.onLinkedTimeToggled=new G,this.HistogramMode=zr,this.TimeProperty=Ro,this.tooltipData=null,this.ngUnsubscribe=new ke,this.layout={histogramHeight:0,contentClientRect:{height:0,width:0}},this.scales=null,this.formatters={binNumber:ype,count:xo(".3n"),wallTime:Iy("%m/%d %X"),step:xo(".0f"),relative:i=>xo(".1r")(i/36e5)+"h"},this.domVisible=!1}ngOnChanges(){this.updateChartIfVisible()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngAfterViewInit(){_i(this.main.nativeElement,"mousemove",{passive:!0}).pipe(st(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(a=>a.x<=i&&i<a.x+a.dx)}getUiCoordFromBinForContent(e){return this.scales?{x:this.scales.binScale(xE(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],s=e.bins.slice(-1)[0],a=[`M${i(xE(o))},${r(0)}`];for(let l of e.bins)a.push(`L${i(xE(l))},${r(l.y)}`);return a.push(`L${i(xE(s))},${r(0)}`),a.join("")}trackByWallTime(e){return e.wallTime}getGroupTransform(e){return this.scales&&this.mode!==zr.OVERLAY?this.getCssTranslatePx(0,this.scales.temporalScale(this.getTimeValue(e))):""}getSteps(){return this.data.map(e=>e.step)}isTimeSelectionEnabled(e){return Boolean(this.mode===zr.OFFSET&&this.timeProperty===Ro.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===zr.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,s=r;s=void 0===s?e.step>i?e.step:i:e.step>s?e.step:s,(o!==i||s!==r)&&o!==s&&this.onLinkedTimeSelectionChanged.emit({timeSelection:{start:{step:o},end:{step:s}},affordance:cs.HISTOGRAM_CLICK_TO_RANGE})}getTimeValue(e){switch(this.timeProperty){case Ro.WALL_TIME:return e.wallTime;case Ro.STEP:return e.step;case Ro.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:s}=bpe(e,g=>function(n,t){return n.reduce((e,i)=>Math.min(e,i.x),1/0)}(g.bins),g=>NG(g.bins,({x:b,dx:D})=>b+D)),a=NG(e,g=>NG(g.bins,({y:b})=>b)),l=Qo().domain([o,s]).nice(),c=this.mode!==zr.OVERLAY&&this.timeProperty==Ro.WALL_TIME?Rg():Qo(),u=e.map(g=>this.getTimeValue(g)),{min:d,max:p}=bpe(u,g=>g),h=[d,p];c.domain(h);let f=Qo();f.domain([0,a]);let m=yg(this.color||"#000"),x=Qo();return x.domain(h),l.range([0,i]),x.range([m.brighter(),m.darker()]),x.interpolate(pz),this.mode===zr.OVERLAY?(c.range([r,r]),f.range([r,0])):(c.range([r-(this.mode===zr.OFFSET?r-this.layout.histogramHeight:0),r]),f.range([0,-this.layout.histogramHeight])),{binScale:l,d3ColorScale:x,countScale:f,temporalScale:c}}renderXAxis(){if(!this.scales)return;let{width:e}=this.layout.contentClientRect,i=jw(this.scales.binScale).ticks(Math.max(2,e/20));i.tickFormat(this.formatters.binNumber),i(bo(this.xAxis.nativeElement))}getYAxisFormatter(){if(this.mode===zr.OVERLAY)return this.formatters.count;switch(this.timeProperty){case Ro.WALL_TIME:return this.formatters.wallTime;case Ro.STEP:return this.formatters.step;case Ro.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===Ro.STEP){let[o,s]=e.domain(),a=Math.max(s-o+1,1);return Math.min(a,r)}return r}renderYAxis(){if(!this.scales)return;let e=this.mode===zr.OVERLAY?this.scales.countScale:this.scales.temporalScale,i=this.getMaxTicks(e),r=zw(e).ticks(Math.max(2,i));r.tickFormat(this.getYAxisFormatter()),r(bo(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 s=this.scales.binScale.invert(i),a=this.data[o],l=this.getClosestBinFromBinCoordinate(a,s);this.tooltipData={value:{position:{x:i,y:r},label:this.mode===zr.OFFSET?this.formatters.count(l.y):`Step: ${this.formatters.step(a.step)}`},xAxis:{position:this.getUiCoordFromBinForContent(l).x,label:this.formatters.binNumber(xE(l))},yAxis:{position:this.scales.countScale(this.mode===zr.OFFSET?0:l.y),label:this.mode===zr.OFFSET?this.getYAxisFormatter()(this.getTimeValue(a)):this.formatters.binNumber(l.y)},xPositionInBinCoord:s,closestDatum:a,closestBin:l},this.changeDetector.detectChanges()}}return n.\u0275fac=function(e){return new(e||n)(M(nn))},n.\u0275cmp=R({type:n,selectors:[["tb-histogram"]],viewQuery:function(e,i){if(1&e&&(ot(nXe,5),ot(iXe,5),ot(rXe,5),ot(oXe,5),ot(sXe,5)),2&e){let r;Ne(r=Le())&&(i.main=r.first),Ne(r=Le())&&(i.xAxis=r.first),Ne(r=Le())&&(i.yAxis=r.first),Ne(r=Le())&&(i.content=r.first),Ne(r=Le())&&(i.histograms=r.first)}},inputs:{mode:"mode",timeProperty:"timeProperty",color:"color",data:"data",timeSelection:"timeSelection"},outputs:{onLinkedTimeSelectionChanged:"onLinkedTimeSelectionChanged",onLinkedTimeToggled:"onLinkedTimeToggled"},features:[Ft],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&&(_(0,"div",0,1),P("onResize",function(){return i.onResize()})("onVisibilityChange",function(o){return i.onVisibilityChange(o)}),In(),_(2,"svg",2),O(3,"g",null,3),_(5,"g",4),E(6,aXe,3,3,"g",5),v()(),Js(),_(7,"div",6),In(),_(8,"svg"),O(9,"g",null,7),_(11,"g",4),E(12,lXe,3,4,"g",5),v()(),E(13,cXe,2,3,"ng-container",8),v(),_(14,"svg",9,10)(16,"g",11),E(17,uXe,2,2,"g",12),v(),_(18,"g",null,13),E(20,hXe,4,11,"g",14),v(),E(21,mXe,7,7,"g",15),v()()),2&e&&(Da("main "+i.mode+" "+i.timeProperty),C(6),y("ngIf",i.tooltipData),C(5),Pt("transform",i.getCssTranslatePx(9,0)),C(1),y("ngIf",i.tooltipData),C(1),y("ngIf",i.isTimeSelectionEnabled(i.timeSelection)),C(4),y("ngForOf",i.getGridTickYLocs()),C(1),et("histograms",!0)("linked-time-single-step",i.timeSelection&&!i.timeSelection.end),C(2),y("ngForOf",i.data)("ngForTrackBy",i.trackByWallTime),C(1),y("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 NG(n,t){return n.reduce((e,i)=>Math.max(e,t(i)),-1/0)}function bpe(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 xE(n){return n.x+.5*n.dx}function vXe(n,t){1&n&&(_(0,"span",14),O(1,"mat-spinner",15),v())}function yXe(n,t){if(1&n){let e=Pe();_(0,"tb-histogram",16),P("onLinkedTimeSelectionChanged",function(r){return oe(e),se(S().onLinkedTimeSelectionChanged.emit(r))})("onLinkedTimeToggled",function(){return oe(e),se(S().onLinkedTimeToggled.emit())}),v()}if(2&n){let e=S();y("data",e.data)("mode",e.mode)("timeProperty",e.timeProperty(e.xAxisType))("color",e.runColorScale(e.runId))("timeSelection",e.convertToTimeSelection(e.linkedTimeSelection))}}function bXe(n,t){1&n&&(_(0,"div",18),A(1," Data failed to load. "),v())}function xXe(n,t){if(1&n&&E(0,bXe,2,0,"div",17),2&n){let e=S();y("ngIf",e.loadState===e.DataLoadState.FAILED)}}var CXe=function(n){return{backgroundColor:n}},xpe=(()=>{class n{constructor(){this.DataLoadState=Oe,this.onFullSizeToggle=new G,this.onPinClicked=new G,this.onLinkedTimeSelectionChanged=new G,this.onLinkedTimeToggled=new G}timeProperty(e){switch(e){case Ji.STEP:return Ro.STEP;case Ji.WALL_TIME:return Ro.WALL_TIME;case Ji.RELATIVE:return Ro.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=R({type:n,selectors:[["histogram-card-component"]],inputs:{loadState:"loadState",title:"title",tag:"tag",runId:"runId",data:"data",mode:"mode",xAxisType:"xAxisType",runColorScale:"runColorScale",showFullSize:"showFullSize",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,1,"pin-button",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&&(_(0,"div",0)(1,"div",1),O(2,"tb-truncated-path",2)(3,"vis-linked-time-selection-warning",3),v(),_(4,"div",4),O(5,"span",5)(6,"card-run-name",6),v(),_(7,"span",7)(8,"button",8),P("click",function(){return i.onPinClicked.emit(!i.isPinned)}),O(9,"mat-icon",9),v(),_(10,"button",10),P("click",function(){return i.onFullSizeToggle.emit()}),O(11,"mat-icon",9),v()(),E(12,vXe,2,0,"span",11),v(),E(13,yXe,1,5,"tb-histogram",12),E(14,xXe,1,1,"ng-template",null,13,qt)),2&e){let r=$e(15);C(2),y("title",i.tag)("value",i.title),C(1),y("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),C(2),y("ngStyle",On(12,CXe,i.runColorScale(i.runId))),C(1),y("runId",i.runId),C(2),ze("title",i.isPinned?"Unpin card":"Pin card"),C(1),y("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),C(2),y("svgIcon",i.showFullSize?"fullscreen_exit_24px":"fullscreen_24px"),C(1),y("ngIf",i.loadState===i.DataLoadState.LOADING),C(1),y("ngIf",i.data&&i.data.length)("ngIfElse",r)}},dependencies:[Be,zu,Wk,_n,Gt,Bo,yR,uy,dy],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}.pin-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:18px}.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})(),Cpe=(()=>{class n{constructor(e){this.store=e,this.fullWidthChanged=new G,this.fullHeightChanged=new G,this.pinStateChanged=new G,this.mode$=this.store.select(RI),this.xAxisType$=this.store.select(td),this.showFullSize=!1}isHistogramCardMetadata(e){let{plugin:i}=e;return i===ri.HISTOGRAMS}onFullSizeToggle(){this.showFullSize=!this.showFullSize,this.fullWidthChanged.emit(this.showFullSize),this.fullHeightChanged.emit(this.showFullSize)}ngOnInit(){let i=this.store.select(tc,this.cardId).pipe(Ye(o=>!!o&&this.isHistogramCardMetadata(o)),L(o=>o)),r=Lt([i,this.store.select(xh,this.cardId)]);this.data$=r.pipe(L(([o,s])=>{let a=o.runId;return s&&s.hasOwnProperty(a)?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,s=r.x+r.dx;(null===t||o<t)&&(t=o),(null===e||s>e)&&(e=s)}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?QYe(i.bins,e,t):[]}))}(s[a].map(u=>{let{wallTime:d,step:p}=u;return{wallTime:d,step:p,bins:u.bins.map(f=>({x:f.min,dx:f.max-f.min,y:f.count}))}})):[]})),this.steps$=this.data$.pipe(L(o=>o.map(s=>s.step))),this.linkedTimeSelection$=Lt([this.store.select(Xm),this.steps$]).pipe(L(([o,s])=>{if(!o)return null;let a=1/0,l=-1/0;for(let u of s)a=Math.min(u,a),l=Math.max(u,l);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}(Qh(o,a,l),s)})),this.isClosestStepHighlighted$=Lt([this.store.select(Xm),this.linkedTimeSelection$]).pipe(L(([o,s])=>o&&s&&!s.clipped&&null===o.end&&o.start.step!==s.startStep)),this.loadState$=this.store.select(bh,this.cardId),this.tag$=i.pipe(L(o=>o.tag)),this.title$=this.tag$.pipe(L(o=>ly(o,this.groupName))),this.runId$=i.pipe(L(o=>o.runId)),this.isPinned$=this.store.select(Ch,this.cardId)}onLinkedTimeSelectionChanged(e){this.store.dispatch(Yh(e))}onLinkedTimeToggled(){this.store.dispatch(Xh({affordance:bl.FOB_DESELECT}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["histogram-card"]],inputs:{cardId:"cardId",groupName:"groupName",runColorScale:"runColorScale"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged",pinStateChanged:"pinStateChanged"},decls:11,vars:32,consts:[[3,"loadState","title","tag","runId","data","mode","xAxisType","runColorScale","showFullSize","isPinned","isClosestStepHighlighted","linkedTimeSelection","onFullSizeToggle","onPinClicked","onLinkedTimeSelectionChanged","onLinkedTimeToggled"]],template:function(e,i){1&e&&(_(0,"histogram-card-component",0),P("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()}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),v()),2&e&&y("loadState",U(1,12,i.loadState$))("title",U(2,14,i.title$))("tag",U(3,16,i.tag$))("runId",U(4,18,i.runId$))("data",U(5,20,i.data$))("mode",U(6,22,i.mode$))("xAxisType",U(7,24,i.xAxisType$))("runColorScale",i.runColorScale)("showFullSize",i.showFullSize)("isPinned",U(8,26,i.isPinned$))("isClosestStepHighlighted",U(9,28,i.isClosestStepHighlighted$))("linkedTimeSelection",U(10,30,i.linkedTimeSelection$))},dependencies:[xpe,Ge],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})();function SXe(n,t){if(1&n){let e=Pe();_(0,"image-card",6),P("fullWidthChanged",function(r){return oe(e),se(S(2).onFullWidthChanged(r))})("pinStateChanged",function(){return oe(e),se(S(2).onPinStateChanged())}),v()}if(2&n){let e=S(2);y("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function EXe(n,t){if(1&n){let e=Pe();_(0,"scalar-card",7),P("fullWidthChanged",function(r){return oe(e),se(S(2).onFullWidthChanged(r))})("fullHeightChanged",function(r){return oe(e),se(S(2).onFullHeightChanged(r))})("pinStateChanged",function(){return oe(e),se(S(2).onPinStateChanged())}),v()}if(2&n){let e=S(2);y("cardId",e.cardId)("groupName",e.groupName)}}function TXe(n,t){if(1&n){let e=Pe();_(0,"histogram-card",8),P("fullWidthChanged",function(r){return oe(e),se(S(2).onFullWidthChanged(r))})("fullHeightChanged",function(r){return oe(e),se(S(2).onFullHeightChanged(r))})("pinStateChanged",function(){return oe(e),se(S(2).onPinStateChanged())}),v()}if(2&n){let e=S(2);y("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function DXe(n,t){if(1&n&&(_(0,"div"),A(1),v()),2&n){let e=S(2);C(1),je("Placeholder error for: ",e.cardId,"")}}function AXe(n,t){if(1&n&&(sn(0,1),E(1,SXe,1,3,"image-card",2),E(2,EXe,1,2,"scalar-card",3),E(3,TXe,1,3,"histogram-card",4),E(4,DXe,2,1,"div",5),an()),2&n){let e=S();y("ngSwitch",e.pluginType),C(1),y("ngSwitchCase",e.PluginType.IMAGES),C(1),y("ngSwitchCase",e.PluginType.SCALARS),C(1),y("ngSwitchCase",e.PluginType.HISTOGRAMS)}}var Mpe=(()=>{class n{constructor(){this.PluginType=ri,this.fullWidthChanged=new G,this.fullHeightChanged=new G,this.pinStateChanged=new G}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=R({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","fullWidthChanged","fullHeightChanged","pinStateChanged",4,"ngSwitchCase"],[3,"cardId","groupName","runColorScale","fullWidthChanged","fullHeightChanged","pinStateChanged",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"cardId","groupName","runColorScale","fullWidthChanged","pinStateChanged"],[3,"cardId","groupName","fullWidthChanged","fullHeightChanged","pinStateChanged"],[3,"cardId","groupName","runColorScale","fullWidthChanged","fullHeightChanged","pinStateChanged"]],template:function(e,i){1&e&&E(0,AXe,5,4,"ng-container",0),2&e&&y("ngIf",i.isEverVisible)},dependencies:[Be,Cr,Ur,ch,nse,_pe,Cpe],encapsulation:2,changeDetection:0}),n})(),wpe=(()=>{class n{constructor(e){this.store=e,this.isEverVisible=!1,this.fullWidthChanged=new G,this.fullHeightChanged=new G,this.runColorScale$=this.store.select(nc).pipe(b0(350,void 0,{leading:!0,trailing:!0}),L(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(Ch,this.cardId).pipe(Qt(1),Wt(this.store.select(yee))).subscribe(([e,i])=>{this.store.dispatch(ry({cardId:this.cardId,canCreateNewPins:i,wasPinned:e}))})}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"card-view-component",0),P("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)}),B(1,"async"),v()),2&e&&y("isEverVisible",i.isEverVisible)("cardId",i.cardId)("groupName",i.groupName)("pluginType",i.pluginType)("runColorScale",U(1,5,i.runColorScale$))},dependencies:[ay,Mpe,Ge],styles:["[_nghost-%COMP%]{background-color:#fff}body.dark-mode   [_nghost-%COMP%]{background-color:#303030}"],changeDetection:0}),n})();function OXe(n,t){1&n&&Ni(0)}var kXe=function(n,t){return{"full-width":n,"full-height":t}};function FXe(n,t){if(1&n){let e=Pe();_(0,"div",5)(1,"card-view",6),P("fullWidthChanged",function(r){let s=oe(e).$implicit;return se(S(2).onFullWidthChanged(s.cardId,r))})("fullHeightChanged",function(r){let s=oe(e).$implicit;return se(S(2).onFullHeightChanged(s.cardId,r))}),v()()}if(2&n){let e=t.$implicit,i=S(2);y("ngClass",Qr(6,kXe,i.cardsAtFullWidth.has(e.cardId),i.cardsAtFullHeight.has(e.cardId))),C(1),y("cardId",e.cardId)("groupName",i.groupName)("pluginType",e.plugin)("cardObserver",i.cardObserver)("cardLazyLoader",e.cardId)}}function NXe(n,t){1&n&&Ni(0)}var LXe=function(){return{isBottomControl:!1}},BXe=function(){return{isBottomControl:!0}};function VXe(n,t){if(1&n&&(_(0,"div"),E(1,OXe,1,0,"ng-container",2),_(2,"div",3),E(3,FXe,2,9,"div",4),v(),E(4,NXe,1,0,"ng-container",2),v()),2&n){let e=S(),i=$e(2);C(1),y("ngTemplateOutlet",i)("ngTemplateOutletContext",Qp(8,LXe)),C(1),Pt("grid-template-columns",e.gridTemplateColumn),C(1),y("ngForOf",e.cardIdsWithMetadata)("ngForTrackBy",e.trackByCards),C(1),y("ngTemplateOutlet",i)("ngTemplateOutletContext",Qp(9,BXe))}}function HXe(n,t){if(1&n){let e=Pe();_(0,"button",12),P("click",function(r){oe(e);let o=S(3);return se(o.handlePageChange(o.pageIndex-1,r.target))}),A(1," Previous "),v()}2&n&&y("disabled",0===S(3).pageIndex)}function UXe(n,t){if(1&n){let e=Pe();_(0,"span",15)(1,"input",16),P("input",function(r){return oe(e),se(S(4).onPaginationInputChange(r))})("change",function(r){return oe(e),se(S(4).onPaginationInputChange(r))}),v(),A(2),v()}if(2&n){let e=S(4);C(1),y("value",e.pageIndex+1)("max",e.numPages),C(1),je(" of ",e.numPages,"")}}function zXe(n,t){if(1&n){let e=Pe();_(0,"span"),E(1,UXe,3,3,"span",13),_(2,"button",14),P("click",function(r){oe(e);let o=S(3);return se(o.handlePageChange(o.pageIndex+1,r.target))}),A(3," Next "),v()()}if(2&n){let e=S(2).isBottomControl,i=S();C(1),y("ngIf",i.showPaginationInput(e)),C(1),y("disabled",i.pageIndex+1>=i.numPages)}}function jXe(n,t){if(1&n&&(_(0,"div",8)(1,"span",9),E(2,HXe,2,1,"button",10),v(),_(3,"span",11),E(4,zXe,4,2,"span",0),v()()),2&n){let e=S(2);C(2),y("ngIf",e.showPaginationControls),C(2),y("ngIf",e.showPaginationControls)}}function GXe(n,t){1&n&&E(0,jXe,5,2,"div",7),2&n&&y("ngIf",S().showPaginationControls)}var Spe=(()=>{class n{constructor(e){this.cdkScrollable=e,this.PluginType=ri,this.gridTemplateColumn="",this.cardsAtFullWidth=new Set,this.cardsAtFullHeight=new Set,this.pageIndexChanged=new G}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)(M(Ih,8))},n.\u0275cmp=R({type:n,selectors:[["metrics-card-grid-component"]],inputs:{isGroupExpanded:"isGroupExpanded",pageIndex:"pageIndex",numPages:"numPages",cardIdsWithMetadata:"cardIdsWithMetadata",cardMinWidth:"cardMinWidth",cardObserver:"cardObserver",showPaginationControls:"showPaginationControls"},outputs:{pageIndexChanged:"pageIndexChanged"},features:[Ft],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&&(E(0,VXe,5,10,"div",0),E(1,GXe,1,1,"ng-template",null,1,qt)),2&e&&y("ngIf",i.isGroupExpanded)},dependencies:[Ooe,wpe,Fn,dn,Be,os,_n],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%]{color:#616161;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.pagination-button[_ngcontent-%COMP%]:disabled{color:#757575}body.dark-mode[_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%]:disabled, body.dark-mode   [_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%]:disabled{color:#616161}"],changeDetection:0}),n})(),Ab=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.groupName$=new hr(null),this.pageIndex$=new hr(0),this.items$=new hr([]),this.ngUnsubscribe=new ke,this.numPages$=Lt([this.items$,this.store.select(Na.getPageSize)]).pipe(L(([i,r])=>Math.ceil(i.length/r))),this.isGroupExpanded$=this.groupName$.pipe(ui(i=>null!==i?this.store.select(LI,i):Xt(!0))),this.showPaginationControls$=this.numPages$.pipe(L(i=>i>1)),this.normalizedPageIndex$=Lt([this.pageIndex$,this.numPages$]).pipe(st(this.ngUnsubscribe),kt(([i,r])=>{0!==r&&(i>=r?this.pageIndex$.next(r-1):i<0&&this.pageIndex$.next(0))}),L(([i,r])=>Math.min(Math.max(i,0),r-1)),Ma(1)),this.pagedItems$=Lt([this.items$,this.store.select(Na.getPageSize),this.normalizedPageIndex$,this.isGroupExpanded$]).pipe(L(([i,r,o,s])=>i.slice(r*o,r*o+(s?r:0)))),this.cardMinWidth$=this.store.select(dv)}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)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-card-grid"]],inputs:{groupName:"groupName",cardIdsWithMetadata:"cardIdsWithMetadata",cardObserver:"cardObserver"},features:[Ft],decls:7,vars:19,consts:[[3,"isGroupExpanded","pageIndex","numPages","showPaginationControls","cardIdsWithMetadata","cardMinWidth","cardObserver","pageIndexChanged"]],template:function(e,i){1&e&&(_(0,"metrics-card-grid-component",0),P("pageIndexChanged",function(o){return i.onPageIndexChanged(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),v()),2&e&&y("isGroupExpanded",U(1,7,i.isGroupExpanded$))("pageIndex",U(2,9,i.normalizedPageIndex$))("numPages",U(3,11,i.numPages$))("showPaginationControls",U(4,13,i.showPaginationControls$))("cardIdsWithMetadata",U(5,15,i.pagedItems$))("cardMinWidth",U(6,17,i.cardMinWidth$))("cardObserver",i.cardObserver)},dependencies:[Spe,Ge],encapsulation:2,changeDetection:0}),n})();function XXe(n,t){if(1&n&&(_(0,"span",7),A(1),B(2,"number"),v()),2&n){let e=S();C(1),je("",U(2,1,e.numberOfCards)," cards")}}function QXe(n,t){1&n&&O(0,"mat-icon",8)}function KXe(n,t){1&n&&O(0,"mat-icon",9)}var Epe=(()=>{class n{constructor(){this.groupExpansionToggled=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"button",0),P("click",function(){return i.groupExpansionToggled.emit()}),_(1,"span",1)(2,"span",2),A(3),v(),E(4,XXe,3,3,"span",3),v(),_(5,"span",4),E(6,QXe,1,0,"mat-icon",5),E(7,KXe,1,0,"ng-template",null,6,qt),v()()),2&e){let r=$e(8);C(2),Zi("title",i.groupName),C(1),yt(i.groupName),C(1),y("ngIf",i.numberOfCards>1),C(2),y("ngIf",i.isGroupExpanded)("ngIfElse",r)}},dependencies:[Be,Gt,Ql],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})(),Tpe=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.isGroupExpanded$=Xt(!1)}ngOnInit(){this.isGroupExpanded$=null!==this.groupName?this.store.select(LI,this.groupName):Xt(!1)}onGroupExpansionToggled(){if(null===this.groupName)throw new RangeError("Invariant error: expansion cannot be toggled when groupName is null");this.store.dispatch(aR({tagGroup:this.groupName}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"metrics-card-group-toolbar-component",0),P("groupExpansionToggled",function(){return i.onGroupExpansionToggled()}),B(1,"async"),v()),2&e&&y("numberOfCards",i.numberOfCards)("isGroupExpanded",U(1,3,i.isGroupExpanded$))("groupName",i.groupName)},dependencies:[Epe,Ge],encapsulation:2,changeDetection:0}),n})();function $Xe(n,t){if(1&n&&(_(0,"div",1),O(1,"metrics-card-group-toolbar",2)(2,"metrics-card-grid",3),v()),2&n){let e=t.$implicit,i=S();C(1),y("numberOfCards",e.items.length)("groupName",e.groupName),C(1),y("cardIdsWithMetadata",e.items)("cardObserver",i.cardObserver)("groupName",e.groupName)}}var Dpe=(()=>{class n{constructor(){this.PluginType=ri}trackByGroup(e,i){return i.groupName}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&E(0,$Xe,3,5,"div",0),2&e&&y("ngForOf",i.cardGroups)("ngForTrackBy",i.trackByGroup)},dependencies:[dn,Ab,Tpe],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})(),Ape=(()=>{class n{constructor(e){this.store=e,this.cardGroups$=this.store.select(mg).pipe(fr(this.store.select(nd)),L(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),L(i=>fR(i)))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-card-groups"]],inputs:{cardObserver:"cardObserver"},decls:2,vars:4,consts:[[3,"cardGroups","cardObserver"]],template:function(e,i){1&e&&(O(0,"metrics-card-groups-component",0),B(1,"async")),2&e&&y("cardGroups",U(1,2,i.cardGroups$))("cardObserver",i.cardObserver)},dependencies:[Dpe,Ge],encapsulation:2,changeDetection:0}),n})();function nQe(n,t){if(1&n&&(_(0,"span"),A(1),v()),2&n){let e=S();C(1),je(" and ",e.getPluginTypeFilterString(e.pluginTypes)," visualization filter")}}var Ipe=(()=>{class n{constructor(){this.PluginType=ri,this.listFormatter=new Intl.ListFormat(void 0,{style:"long",type:"disjunction"})}getPluginTypeFilterString(e){let i=[...e].map(r=>{switch(r){case ri.SCALARS:return"scalar";case ri.IMAGES:return"image";case ri.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=R({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&&(A(0,"No matches for tag filter "),_(1,"code"),A(2),v(),E(3,nQe,2,1,"span",0),A(4),B(5,"number")),2&e&&(C(2),je("/",i.tagFilterRegex,"/"),C(1),y("ngIf",i.pluginTypes.size),C(1),je(" out of ",U(5,3,i.tagCounts)," tags."))},dependencies:[Be,Ql],encapsulation:2,changeDetection:0}),n})(),Ppe=(()=>{class n{constructor(e){this.store=e,this.pluginTypes$=this.store.select(nd),this.tagFilterRegex$=this.store.select(Xc),this.tagCounts$=this.store.select(mg).pipe(L(i=>new Set(i.map(({tag:r})=>r)).size))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-empty-tag-match"]],decls:4,vars:9,consts:[[3,"pluginTypes","tagFilterRegex","tagCounts"]],template:function(e,i){1&e&&(O(0,"metrics-empty-tag-match-component",0),B(1,"async"),B(2,"async"),B(3,"async")),2&e&&y("pluginTypes",U(1,3,i.pluginTypes$))("tagFilterRegex",U(2,5,i.tagFilterRegex$))("tagCounts",U(3,7,i.tagCounts$))},dependencies:[Ipe,Ge],encapsulation:2,changeDetection:0}),n})();function oQe(n,t){if(1&n&&(_(0,"span",6),A(1),B(2,"number"),v()),2&n){let e=S();C(1),je("",U(2,1,e.cardIdsWithMetadata.length)," cards")}}function sQe(n,t){1&n&&O(0,"metrics-empty-tag-match",7)}var Rpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({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&&(_(0,"div",0)(1,"span",1)(2,"span",2),A(3,"Tags matching filter"),v(),E(4,oQe,3,3,"span",3),v()(),E(5,sQe,1,0,"metrics-empty-tag-match",4),O(6,"metrics-card-grid",5)),2&e&&(C(4),y("ngIf",i.cardIdsWithMetadata.length>1),C(1),y("ngIf",i.isEmptyMatch),C(1),y("cardIdsWithMetadata",i.cardIdsWithMetadata)("cardObserver",i.cardObserver))},dependencies:[Be,Ab,Ppe,Ql],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})(),Ope=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(mg).pipe(fr(this.store.select(nd)),L(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),fr(this.store.select(Xc)),Hr(200),L(([i,r])=>{try{return{cardList:i,regex:new RegExp(r,"i")}}catch{return{cardList:i,regex:null}}}),Ye(({regex:i})=>null!==i),L(({cardList:i,regex:r})=>i.filter(({tag:o})=>r.test(o))),yi((i,r)=>i.length===r.length&&i.every((o,s)=>o.cardId===r[s].cardId)),Ts(),zn([])),this.isEmptyMatch$=this.cardIdsWithMetadata$.pipe(fr(this.store.select(mg)),L(([i,r])=>Boolean(r.length)&&0===i.length))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-filtered-view"]],inputs:{cardObserver:"cardObserver"},decls:3,vars:7,consts:[[3,"isEmptyMatch","cardIdsWithMetadata","cardObserver"]],template:function(e,i){1&e&&(O(0,"metrics-filtered-view-component",0),B(1,"async"),B(2,"async")),2&e&&y("isEmptyMatch",U(1,3,i.isEmptyMatch$))("cardIdsWithMetadata",U(2,5,i.cardIdsWithMetadata$))("cardObserver",i.cardObserver)},dependencies:[Rpe,Ge],encapsulation:2,changeDetection:0}),n})(),uQe=["panel"];function dQe(n,t){if(1&n&&(_(0,"div",0,1),Vn(2),v()),2&n){let e=t.id,i=S();y("id",i.id)("ngClass",i._classList),ze("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var pQe=["*"],hQe=0,fQe=qo(class{}),kpe=new pe("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1}}}),gQe=(()=>{class n extends fQe{constructor(e,i,r,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._activeOptionChanges=Sn.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new G,this.opened=new G,this.closed=new G,this.optionActivated=new G,this._classList={},this.id="mat-autocomplete-"+hQe++,this.inertGroups=o?.SAFARI||!1,this._autoActiveFirstOption=!!r.autoActiveFirstOption,this._autoSelectActiveOption=!!r.autoSelectActiveOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=Rt(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=Rt(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._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new wv(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._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}}return n.\u0275fac=function(e){return new(e||n)(M(nn),M(Re),M(kpe),M(oi))},n.\u0275dir=He({type:n,viewQuery:function(e,i){if(1&e&&(ot(Vi,7),ot(uQe,5)),2&e){let r;Ne(r=Le())&&(i.template=r.first),Ne(r=Le())&&(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:[tt]}),n})(),qk=(()=>{class n extends gQe{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275cmp=R({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(e,i,r){if(1&e&&(Ei(r,rw,5),Ei(r,Os,5)),2&e){let o;Ne(o=Le())&&(i.optionGroups=o),Ne(o=Le())&&(i.options=o)}},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[$t([{provide:iw,useExisting:n}]),tt],ngContentSelectors:pQe,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(e,i){1&e&&(xi(),E(0,dQe,3,4,"ng-template"))},dependencies:[Fn],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}"],encapsulation:2,changeDetection:0}),n})(),Fpe=new pe("mat-autocomplete-scroll-strategy"),vQe={provide:Fpe,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},yQe={provide:No,useExisting:Jn(()=>$g),multi:!0},bQe=(()=>{class n{constructor(e,i,r,o,s,a,l,c,u,d,p){this._element=e,this._overlay=i,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=l,this._formField=c,this._document=u,this._viewportRuler=d,this._defaults=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Sn.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new ke,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=Qa(()=>{let h=this.autocomplete?this.autocomplete.options:null;return h?h.changes.pipe(zn(h),ui(()=>Jt(...h.map(f=>f.onSelectionChange)))):this._zone.onStable.pipe(Qt(1),ui(()=>this.optionSelections))}),this._scrollStrategy=a}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=Rt(e)}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 Jt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ye(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ye(()=>this._overlayAttached)):Xt()).pipe(L(e=>e instanceof nw?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Jt(_i(this._document,"click"),_i(this._document,"auxclick"),_i(this._document,"touchend")).pipe(Ye(e=>{let i=Qc(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=kr(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,s=38===i||40===i;9===i||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this.openPanel(),(s||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.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return Jt(this._zone.onStable.pipe(Qt(1)),this.autocomplete.options.changes.pipe(kt(()=>this._positionStrategy.reapplyLastPosition()),Ol(0))).pipe(ui(()=>(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)),Qt(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 ks(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.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new sc({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,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 s,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}];s="above"===this.position?o:"below"===this.position?i:[...i,...o],e.withPositions(s)}_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=ow(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 s=o._getHostElement(),a=_2(s.offsetTop,s.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(a)}}}_handleOverlayEvents(e){e.keydownEvents().subscribe(i=>{(27===i.keyCode&&!kr(i)||38===i.keyCode&&kr(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)(M(Re),M(tr),M(Oi),M(_t),M(nn),M(Fpe),M($i,8),M(sg,9),M(Ht,8),M(Va),M(kpe,8))},n.\u0275dir=He({type:n,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[Ft]}),n})(),$g=(()=>{class n extends bQe{constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(e,i){1&e&&P("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&&ze("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:[$t([yQe]),tt]}),n})(),Ib=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[vQe],imports:[ss,Av,ln,Me,ud,Av,ln]}),n})(),Yk=(()=>{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=R({type:n,selectors:[["tb-filter-input"]],viewQuery:function(e,i){if(1&e&&ot($g,5),2&e){let r;Ne(r=Le())&&(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&&(O(0,"mat-icon",0),_(1,"input",1),P("keyup",function(o){return i.onInputKeyUp(o)}),v()),2&e&&(C(1),y("placeholder",i.placeholder)("matAutocomplete",i.matAutocomplete)("matAutocompleteDisabled",!i.matAutocomplete)("value",i.value))},dependencies:[$g,Gt],styles:["[_nghost-%COMP%]{display:flex;font-size:13px}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})();function xQe(n,t){1&n&&O(0,"mat-icon",7)}function CQe(n,t){if(1&n&&(_(0,"mat-option",8),A(1),v()),2&n){let e=t.$implicit;y("value",e),ze("title",e),C(1),yt(e)}}function MQe(n,t){if(1&n&&(_(0,"div",9)(1,"em"),A(2),B(3,"number"),v()()),2&n){let e=S();C(2),je("and ",U(3,1,e.completions.length-25)," more tags matched")}}var Lpe=(()=>{class n{constructor(){this.onRegexFilterValueChange=new G}onCompletionAccepted(e){this.onRegexFilterValueChange.emit(function(n){return n.replace(OOe,"\\$&")}(e))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metrics-tag-filter-component"]],hostVars:2,hostBindings:function(e,i){2&e&&et("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&&(_(0,"div",0)(1,"tb-filter-input",1),P("input",function(o){return i.onRegexFilterValueChange.emit(o.target.value)}),v(),E(2,xQe,1,0,"mat-icon",2),v(),_(3,"mat-autocomplete",3,4),P("optionSelected",function(o){return i.onCompletionAccepted(o.option.value)}),E(5,CQe,2,3,"mat-option",5),E(6,MQe,4,3,"div",6),v()),2&e){let r=$e(4);C(1),y("value",i.regexFilterValue)("matAutocomplete",r),C(1),y("ngIf",!i.isRegexFilterValid),C(3),y("ngForOf",null==i.completions?null:i.completions.slice(0,25)),C(1),y("ngIf",(null==i.completions?null:i.completions.length)>25)}},dependencies:[dn,Be,Yk,qk,Os,Gt,Ql],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})(),Bpe=(()=>{class n{constructor(e){this.store=e,this.tagFilter$=this.store.select(Xc),this.isTagFilterRegexValid$=this.tagFilter$.pipe(L(i=>{try{return new RegExp(i),!0}catch{return!1}})),this.completions$=this.store.select(PI).pipe(fr(this.store.select(nd)),L(([i,r])=>i.filter(({plugin:o})=>!r.size||r.has(o)).map(({tag:o})=>o)),L(i=>[...new Set(i)]),L(i=>i.sort(Fw)),fr(this.store.select(Xc)),L(([i,r])=>{try{return[i,new RegExp(r,"i")]}catch{return[i,null]}}),Ye(([,i])=>null!==i),L(([i,r])=>i.filter(o=>r.test(o))))}onTagFilterChange(e){this.store.dispatch(sR({tagFilter:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-tag-filter"]],decls:4,vars:9,consts:[[3,"regexFilterValue","isRegexFilterValid","completions","onRegexFilterValueChange"]],template:function(e,i){1&e&&(_(0,"metrics-tag-filter-component",0),P("onRegexFilterValueChange",function(o){return i.onTagFilterChange(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("regexFilterValue",U(1,3,i.tagFilter$))("isRegexFilterValid",U(2,5,i.isTagFilterRegexValid$))("completions",U(3,7,i.completions$))},dependencies:[Lpe,Ge],encapsulation:2,changeDetection:0}),n})();function EQe(n,t){if(1&n&&(_(0,"span",8),A(1),v()),2&n){let e=S();C(1),je("",e.cardIdsWithMetadata.length," cards")}}function TQe(n,t){1&n&&(_(0,"span",9),A(1,"New card pinned"),v()),2&n&&ze("data-id",t.$implicit)}function DQe(n,t){if(1&n&&O(0,"metrics-card-grid",10),2&n){let e=S();y("cardIdsWithMetadata",e.cardIdsWithMetadata)("cardObserver",e.cardObserver)}}function AQe(n,t){1&n&&(_(0,"div",11),A(1,"Pin cards for a quick view and comparison"),v())}var Vpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metrics-pinned-view-component"]],inputs:{cardObserver:"cardObserver",cardIdsWithMetadata:"cardIdsWithMetadata",newCardPinnedIds:"newCardPinnedIds"},decls:10,vars:4,consts:[[1,"group-toolbar"],["svgIcon","keep_24px"],[1,"group-text"],["aria-role","heading","aria-level","3",1,"group-title"],["class","group-card-count",4,"ngIf"],["class","new-card-pinned",4,"ngFor","ngForOf"],[3,"cardIdsWithMetadata","cardObserver",4,"ngIf","ngIfElse"],["emptyPinnedView",""],[1,"group-card-count"],[1,"new-card-pinned"],[3,"cardIdsWithMetadata","cardObserver"],[1,"empty-message"]],template:function(e,i){if(1&e&&(_(0,"div",0),O(1,"mat-icon",1),_(2,"span",2)(3,"span",3),A(4,"Pinned"),v(),E(5,EQe,2,1,"span",4),E(6,TQe,2,1,"span",5),v()(),E(7,DQe,1,2,"metrics-card-grid",6),E(8,AQe,2,0,"ng-template",null,7,qt)),2&e){let r=$e(9);C(5),y("ngIf",i.cardIdsWithMetadata.length>1),C(1),y("ngForOf",i.newCardPinnedIds),C(1),y("ngIf",i.cardIdsWithMetadata.length)("ngIfElse",r)}},dependencies:[dn,Be,Gt,Ab],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-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: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 pinned-view-fade-out{from{opacity:1}66%{opacity:.99}to{opacity:0}}"],changeDetection:0}),n})(),Hpe=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(zM).pipe(zn([])),this.newCardPinnedIds$=this.store.select(zM).pipe(Za(1),L(i=>i.map(r=>r.cardId)),y0(),L(([i,r])=>{let o=new Set(i),s=new Set(r);for(let a of s)if(!o.has(a))return Date.now();return null}),zn(null),y0(),L(([i,r])=>null===i&&null===r?null:null===r?[i]:[r]),Ye(i=>null!==i),L(i=>[i[0]]))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["metrics-pinned-view"]],inputs:{cardObserver:"cardObserver"},decls:3,vars:7,consts:[[3,"cardIdsWithMetadata","newCardPinnedIds","cardObserver"]],template:function(e,i){1&e&&(O(0,"metrics-pinned-view-component",0),B(1,"async"),B(2,"async")),2&e&&y("cardIdsWithMetadata",U(1,3,i.cardIdsWithMetadata$))("newCardPinnedIds",U(2,5,i.newCardPinnedIds$))("cardObserver",i.cardObserver)},dependencies:[Vpe,Ge],encapsulation:2,changeDetection:0}),n})();function RQe(n,t){1&n&&O(0,"metrics-filtered-view",12),2&n&&y("cardObserver",S().cardObserver)}function OQe(n,t){1&n&&(_(0,"div",16),O(1,"mat-spinner",17),v())}var kQe=function(n){return{"slide-out-menu-expanded":n}};function FQe(n,t){if(1&n&&(_(0,"div",18),O(1,"metrics-scalar-column-editor"),v()),2&n){let e=S();y("ngClass",On(1,kQe,e.slideOutMenuOpen))}}function NQe(n,t){if(1&n){let e=Pe();_(0,"div",19)(1,"div",20)(2,"h2",21),A(3,"Settings"),v(),_(4,"button",22),P("click",function(){return oe(e),se(S().onCloseSidepaneButtonClicked.emit())}),O(5,"mat-icon",23),v()(),O(6,"metrics-dashboard-right-pane"),v()}}var LQe=function(n){return{checked:n,"settings-button":!0}},Upe=(()=>{class n{constructor(e){this.host=e,this.onSettingsButtonClicked=new G,this.onCloseSidepaneButtonClicked=new G,this.onPluginTypeToggled=new G,this.onPluginTypeAllToggled=new G,this.PluginType=ri,this.cardObserver=new Nw(this.host.nativeElement,"600px 0px 600px 0px")}}return n.\u0275fac=function(e){return new(e||n)(M(Re))},n.\u0275cmp=R({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:23,vars:22,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"],[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&&(_(0,"div",0),O(1,"metrics-tag-filter"),_(2,"mat-button-toggle-group",1)(3,"button",2),P("click",function(){return i.onPluginTypeAllToggled.emit()}),A(4," All "),v(),_(5,"button",3),P("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.SCALARS)}),A(6," Scalars "),v(),_(7,"button",4),P("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.IMAGES)}),A(8," Image "),v(),_(9,"button",5),P("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.HISTOGRAMS)}),A(10," Histogram "),v()(),_(11,"div",6)(12,"button",7),P("click",function(){return i.onSettingsButtonClicked.emit()}),O(13,"mat-icon",8),A(14," Settings "),v()()(),_(15,"div",9)(16,"div",10),E(17,RQe,1,1,"metrics-filtered-view",11),O(18,"metrics-pinned-view",12),E(19,OQe,2,0,"div",13),O(20,"metrics-card-groups",12),v(),E(21,FQe,2,3,"div",14),E(22,NQe,7,0,"div",15),v()),2&e&&(C(3),ze("aria-checked",0===i.filteredPluginTypes.size),C(2),ze("aria-checked",i.filteredPluginTypes.has(i.PluginType.SCALARS)),C(2),ze("aria-checked",i.filteredPluginTypes.has(i.PluginType.IMAGES)),C(2),ze("aria-checked",i.filteredPluginTypes.has(i.PluginType.HISTOGRAMS)),C(3),y("ngClass",On(20,LQe,i.isSidepaneOpen)),ze("aria-pressed",i.isSidepaneOpen),C(4),et("main",!0)("filter-view",i.showFilteredView),C(1),y("ngIf",i.showFilteredView),C(1),Pt("display",i.showFilteredView?"none":""),y("cardObserver",i.cardObserver),C(1),y("ngIf",i.initialTagsLoading),C(1),Pt("display",i.showFilteredView?"none":""),y("cardObserver",i.cardObserver),C(1),y("ngIf",i.isSidepaneOpen),C(1),y("ngIf",i.isSidepaneOpen))},dependencies:[Fn,Be,Ih,_n,EU,Gt,Bo,Uoe,Woe,Ape,Ope,Bpe,Hpe],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}.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:100%;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})(),zpe=(()=>{class n{constructor(e){this.store=e,this.isSidepaneOpen$=this.store.select(HI),this.initialTagsLoading$=this.store.select(UM).pipe(cx(i=>null===i.lastLoadedTimeInMs,!0),L(i=>i.state===Oe.LOADING&&null===i.lastLoadedTimeInMs)),this.showFilteredView$=this.store.select(Xc).pipe(L(i=>i.length>0)),this.filteredPluginTypes$=this.store.select(nd),this.isSlideoutMenuOpen$=this.store.select(UI)}onSettingsButtonClicked(){this.store.dispatch(BP())}onCloseSidepaneButtonClicked(){this.store.dispatch(LP())}onPluginVisibilityToggled(e){this.store.dispatch(lR({plugin:e}))}onShowAllPlugins(){this.store.dispatch(cR())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(_(0,"metrics-main-view-component",0),P("onSettingsButtonClicked",function(){return i.onSettingsButtonClicked()})("onCloseSidepaneButtonClicked",function(){return i.onCloseSidepaneButtonClicked()})("onPluginTypeToggled",function(o){return i.onPluginVisibilityToggled(o)})("onPluginTypeAllToggled",function(){return i.onShowAllPlugins()}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),v()),2&e&&y("showFilteredView",U(1,5,i.showFilteredView$))("isSidepaneOpen",U(2,7,i.isSidepaneOpen$))("initialTagsLoading",U(3,9,i.initialTagsLoading$))("filteredPluginTypes",U(4,11,i.filteredPluginTypes$))("slideOutMenuOpen",U(5,13,i.isSlideoutMenuOpen$))},dependencies:[Upe,Ge],encapsulation:2,changeDetection:0}),n})(),va=(()=>(function(n){n.CHECKBOX="checkbox",n.RUN_NAME="run_name",n.EXPERIMENT_NAME="experiment_name",n.RUN_COLOR="run_color"}(va||(va={})),va))(),Df={};BE(Df,{getExperimentsHparamsAndMetricsSpecs:()=>GQe,getHparamFilterMap:()=>UQe,getMetricFilterMap:()=>jQe});var CE=Mr(fI),HQe=J(CE,(n,t)=>{let e=[];for(let i of t)!n.specs[i]||e.push(n.specs[i].hparam.defaultFilters);return LM(e)}),UQe=J(HQe,CE,(n,t,e)=>{let i=Wm(e);return new Map([...n,...t.filters[i]?.hparams??[]])}),zQe=J(CE,(n,t)=>{let e=[];for(let i of t)!n.specs[i]||e.push(n.specs[i].metric.defaultFilters);return hI(e)}),jQe=J(zQe,CE,(n,t,e)=>{let i=Wm(e);return new Map([...n,...t.filters[i]?.metrics??[]])}),GQe=J(CE,(n,t)=>function(...n){let t=new Map,e=new Map,i=new Map,r=new Map,o=[];for(let s of n){for(let a of s.hparams)if(e.has(a.name)||e.set(a.name,new Set),e.get(a.name).add(a.displayName),t.has(a.name)){let l=t.get(a.name),c=a;if(l.type!==c.type&&o.push(`Hparam, ${c.name}, types have to match. Got: ${l.type} vs. ${c.type}`),l.domain.type===Ci.INTERVAL&&c.domain.type===Ci.INTERVAL)(l.domain.minValue!==c.domain.minValue||l.domain.maxValue!==c.domain.maxValue)&&o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`);else if(l.domain.type===Ci.DISCRETE&&c.domain.type===Ci.DISCRETE){let u=new Set([...l.domain.values,...c.domain.values]);(l.domain.values.length!==c.domain.values.length||l.domain.values.length!==u.size)&&o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`)}else o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`)}else t.set(a.name,{...a});for(let a of s.metrics)if(r.has(a.tag)||r.set(a.tag,new Set),r.get(a.tag).add(a.displayName),i.has(a.tag)){let l=i.get(a.tag),c=a;l.datasetType!==c.datasetType&&o.push(`Metric, ${c.tag}, datasetTypes have to match. Got: ${l.datasetType} vs. ${c.datasetType}`)}else i.set(a.tag,{...a})}if(o.length)throw new Error(`Validation error:\n${o.join("\n")}`);return{hparams:[...t].map(([s,a])=>({...a,displayName:[...e.get(s)].join(" or ")})),metrics:[...i].map(([s,a])=>({...a,displayName:[...r.get(s)].join(" or ")}))}}(...t.experimentIds.map(e=>{let i=n.specs[e];return i?{hparams:i.hparam.specs,metrics:i.metric.specs}:null}).filter(Boolean))),WQe=["tooltip"],Gpe="tooltip-panel",Wpe=la({passive:!0}),qpe=new pe("mat-tooltip-scroll-strategy"),QQe={provide:qpe,deps:[tr],useFactory:function(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},KQe=new pe("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),JQe=(()=>{class n{constructor(e,i,r,o,s,a,l,c,u,d,p,h){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=o,this._ngZone=s,this._platform=a,this._ariaDescriber=l,this._focusMonitor=c,this._dir=d,this._defaultOptions=p,this._position="below",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 ke,this._scrollStrategy=u,this._document=h,p&&(p.position&&(this.position=p.position),p.touchGestures&&(this.touchGestures=p.touchGestures)),d.change.pipe(st(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}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 disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Bi(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Bi(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)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(st(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,Wpe)}),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){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();let i=this._createOverlay();this._detach(),this._portal=this._portal||new $c(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(st(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;let e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),i=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(e);return i.positionChanges.pipe(st(this._destroyed)).subscribe(r=>{this._updateCurrentPositionClass(r.connectionPair),this._tooltipInstance&&r.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:i,panelClass:`${this._cssClassPrefix}-${Gpe}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(st(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(st(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(st(this._destroyed)).subscribe(r=>{this._isTooltipVisible()&&27===r.keyCode&&!kr(r)&&(r.preventDefault(),r.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:s}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:s}}}_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:s}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Qt(1),st(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 s,{overlayY:i,originX:r,originY:o}=e;if(s="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===o?"above":"below",s!==this._currentPosition){let a=this._overlayRef;if(a){let l=`${this._cssClassPrefix}-${Gpe}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),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,Wpe)})}_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){nl()},n.\u0275dir=He({type:n,inputs:{position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),Xk=(()=>{class n extends JQe{constructor(e,i,r,o,s,a,l,c,u,d,p,h){super(e,i,r,o,s,a,l,c,u,d,p,h),this._tooltipComponent=eKe}}return n.\u0275fac=function(e){return new(e||n)(M(tr),M(Re),M($m),M(Oi),M(_t),M(oi),M(f2),M(Fr),M(qpe),M($i,8),M(KQe,8),M(Ht))},n.\u0275dir=He({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],exportAs:["matTooltip"],features:[tt]}),n})(),$Qe=(()=>{class n{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new ke,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 s=getComputedStyle(i);("0s"===s.getPropertyValue("animation-duration")||"none"===s.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)(M(nn),M(Pi,8))},n.\u0275dir=He({type:n}),n})(),eKe=(()=>{class n extends $Qe{constructor(e,i,r){super(e,r),this._breakpointObserver=i,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)"),this._showAnimation="mat-tooltip-show",this._hideAnimation="mat-tooltip-hide"}}return n.\u0275fac=function(e){return new(e||n)(M(nn),M(Jm),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&ot(WQe,7),2&e){let r;Ne(r=Le())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&P("mouseleave",function(o){return i._handleMouseLeave(o)}),2&e&&Pt("zoom",i.isVisible()?1:null)},features:[tt],decls:4,vars:6,consts:[[1,"mat-tooltip",3,"ngClass","animationend"],["tooltip",""]],template:function(e,i){if(1&e&&(_(0,"div",0,1),P("animationend",function(o){return i._handleAnimationEnd(o)}),B(2,"async"),A(3),v()),2&e){let r;et("mat-tooltip-handset",null==(r=U(2,4,i._isHandset))?null:r.matches),y("ngClass",i.tooltipClass),C(3),yt(i.message)}},dependencies:[Fn,Ge],styles:[".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}"],encapsulation:2,changeDetection:0}),n})(),Qk=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[QQe],imports:[Ev,Me,ss,ln,ln,ud]}),n})();function tKe(n,t){if(1&n&&(_(0,"mat-option",19),A(1),v()),2&n){let e=t.$implicit;y("value",e),C(1),je(" ",e," ")}}function nKe(n,t){if(1&n){let e=Pe();_(0,"mat-form-field",16)(1,"mat-select",17),P("selectionChange",function(r){return oe(e),se(S(2)._changePageSize(r.value))}),E(2,tKe,2,2,"mat-option",18),v()()}if(2&n){let e=S(2);y("appearance",e._formFieldAppearance)("color",e.color),C(1),y("value",e.pageSize)("disabled",e.disabled)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering)("aria-label",e._intl.itemsPerPageLabel),C(1),y("ngForOf",e._displayedPageSizeOptions)}}function iKe(n,t){if(1&n&&(_(0,"div",20),A(1),v()),2&n){let e=S(2);C(1),yt(e.pageSize)}}function rKe(n,t){if(1&n&&(_(0,"div",12)(1,"div",13),A(2),v(),E(3,nKe,3,8,"mat-form-field",14),E(4,iKe,2,1,"div",15),v()),2&n){let e=S();C(2),je(" ",e._intl.itemsPerPageLabel," "),C(1),y("ngIf",e._displayedPageSizeOptions.length>1),C(1),y("ngIf",e._displayedPageSizeOptions.length<=1)}}function oKe(n,t){if(1&n){let e=Pe();_(0,"button",21),P("click",function(){return oe(e),se(S().firstPage())}),In(),_(1,"svg",7),O(2,"path",22),v()()}if(2&n){let e=S();y("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),ze("aria-label",e._intl.firstPageLabel)}}function sKe(n,t){if(1&n){let e=Pe();In(),Js(),_(0,"button",23),P("click",function(){return oe(e),se(S().lastPage())}),In(),_(1,"svg",7),O(2,"path",24),v()()}if(2&n){let e=S();y("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),ze("aria-label",e._intl.lastPageLabel)}}Kr("state",[ki("initial, void, hidden",gn({opacity:0,transform:"scale(0)"})),ki("visible",gn({transform:"scale(1)"})),Li("* => visible",ji("200ms cubic-bezier(0, 0, 0.2, 1)",Dm([gn({opacity:0,transform:"scale(0)",offset:0}),gn({opacity:.5,transform:"scale(0.99)",offset:.5}),gn({opacity:1,transform:"scale(1)",offset:1})]))),Li("* => hidden",ji("100ms cubic-bezier(0, 0, 0.2, 1)",gn({opacity:0})))]);var e0=(()=>{class n{constructor(){this.changes=new ke,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=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lKe={provide:e0,deps:[[new ns,new tl,e0]],useFactory:function(n){return n||new e0}},uKe=new pe("MAT_PAGINATOR_DEFAULT_OPTIONS"),dKe=so(m2(class{})),pKe=(()=>{class n extends dKe{constructor(e,i,r){if(super(),this._intl=e,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new G,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){let{pageSize:o,pageSizeOptions:s,hidePageSize:a,showFirstLastButtons:l}=r;null!=o&&(this._pageSize=o),null!=s&&(this._pageSizeOptions=s),null!=a&&(this._hidePageSize=a),null!=l&&(this._showFirstLastButtons=l)}}get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(Bi(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=Bi(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(Bi(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>Bi(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=Rt(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=Rt(e)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){let r=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/e)||0,this.pageSize=e,this._emitPageEvent(r)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){!this._initialized||(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,i)=>e-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return n.\u0275fac=function(e){nl()},n.\u0275dir=He({type:n,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[tt]}),n})(),Kk=(()=>{class n extends pKe{constructor(e,i,r){super(e,i,r),r&&null!=r.formFieldAppearance&&(this._formFieldAppearance=r.formFieldAppearance)}}return n.\u0275fac=function(e){return new(e||n)(M(e0),M(nn),M(uKe,8))},n.\u0275cmp=R({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[tt],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","panelClass","disableOptionCentering","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1),E(2,rKe,5,3,"div",2),_(3,"div",3)(4,"div",4),A(5),v(),E(6,oKe,3,5,"button",5),_(7,"button",6),P("click",function(){return i.previousPage()}),In(),_(8,"svg",7),O(9,"path",8),v()(),Js(),_(10,"button",9),P("click",function(){return i.nextPage()}),In(),_(11,"svg",7),O(12,"path",10),v()(),E(13,sKe,3,5,"button",11),v()()()),2&e&&(C(2),y("ngIf",!i.hidePageSize),C(3),je(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),C(1),y("ngIf",i.showFirstLastButtons),C(1),y("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),ze("aria-label",i._intl.previousPageLabel),C(3),y("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),ze("aria-label",i._intl.nextPageLabel),C(3),y("ngIf",i.showFirstLastButtons))},dependencies:[dn,Be,_n,pd,Hh,Os,Xk],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{display:inline-block;width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-paginator-icon{fill:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),Xpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[lKe],imports:[Me,Pn,lc,Qk,ln]}),n})(),fKe=["mat-sort-header",""];function mKe(n,t){if(1&n){let e=Pe();_(0,"div",3),P("@arrowPosition.start",function(){return oe(e),se(S()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return oe(e),se(S()._disableViewStateAnimation=!1)}),O(1,"div",4),_(2,"div",5),O(3,"div",6)(4,"div",7)(5,"div",8),v()()}if(2&n){let e=S();y("@arrowOpacity",e._getArrowViewState())("@arrowPosition",e._getArrowViewState())("@allowChildren",e._getArrowDirectionState()),C(2),y("@indicator",e._getArrowDirectionState()),C(1),y("@leftPointer",e._getArrowDirectionState()),C(1),y("@rightPointer",e._getArrowDirectionState())}}var gKe=["*"],Qpe=new pe("MAT_SORT_DEFAULT_OPTIONS"),_Ke=m2(so(class{})),ME=(()=>{class n extends _Ke{constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new ke,this.start="asc",this._direction="",this.sortChange=new G}get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Rt(e)}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=function(n,t){let e=["asc","desc"];return"desc"==n&&e.reverse(),t||e.push(""),e}(e.start||this.start,e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),o=r.indexOf(this.direction)+1;return o>=r.length&&(o=0),r[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(M(Qpe,8))},n.\u0275dir=He({type:n,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[tt,Ft]}),n})(),Af=ate.ENTERING+" "+ste.STANDARD_CURVE,Pb={indicator:Kr("indicator",[ki("active-asc, asc",gn({transform:"translateY(0px)"})),ki("active-desc, desc",gn({transform:"translateY(10px)"})),Li("active-asc <=> active-desc",ji(Af))]),leftPointer:Kr("leftPointer",[ki("active-asc, asc",gn({transform:"rotate(-45deg)"})),ki("active-desc, desc",gn({transform:"rotate(45deg)"})),Li("active-asc <=> active-desc",ji(Af))]),rightPointer:Kr("rightPointer",[ki("active-asc, asc",gn({transform:"rotate(45deg)"})),ki("active-desc, desc",gn({transform:"rotate(-45deg)"})),Li("active-asc <=> active-desc",ji(Af))]),arrowOpacity:Kr("arrowOpacity",[ki("desc-to-active, asc-to-active, active",gn({opacity:1})),ki("desc-to-hint, asc-to-hint, hint",gn({opacity:.54})),ki("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",gn({opacity:0})),Li("* => asc, * => desc, * => active, * => hint, * => void",ji("0ms")),Li("* <=> *",ji(Af))]),arrowPosition:Kr("arrowPosition",[Li("* => desc-to-hint, * => desc-to-active",ji(Af,Dm([gn({transform:"translateY(-25%)"}),gn({transform:"translateY(0)"})]))),Li("* => hint-to-desc, * => active-to-desc",ji(Af,Dm([gn({transform:"translateY(0)"}),gn({transform:"translateY(25%)"})]))),Li("* => asc-to-hint, * => asc-to-active",ji(Af,Dm([gn({transform:"translateY(25%)"}),gn({transform:"translateY(0)"})]))),Li("* => hint-to-asc, * => active-to-asc",ji(Af,Dm([gn({transform:"translateY(0)"}),gn({transform:"translateY(-25%)"})]))),ki("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",gn({transform:"translateY(0)"})),ki("hint-to-desc, active-to-desc, desc",gn({transform:"translateY(-25%)"})),ki("hint-to-asc, active-to-asc, asc",gn({transform:"translateY(25%)"}))]),allowChildren:Kr("allowChildren",[Li("* <=> *",[Im("@*",Am(),{optional:!0})])])},Zk=(()=>{class n{constructor(){this.changes=new ke}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bKe={provide:Zk,deps:[[new ns,new tl,Zk]],useFactory:function(n){return n||new Zk}},xKe=so(class{}),Kpe=(()=>{class n extends xKe{constructor(e,i,r,o,s,a,l,c){super(),this._intl=e,this._changeDetectorRef=i,this._sort=r,this._columnDef=o,this._focusMonitor=s,this._elementRef=a,this._ariaDescriber=l,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",c?.arrowPosition&&(this.arrowPosition=c?.arrowPosition),this._handleStateChanges()}get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Rt(e)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=!!e;i!==this._showIndicatorHint&&(this._setIndicatorHintVisible(i),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){let e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=Jt(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(M(Zk),M(nn),M(ME,8),M("MAT_SORT_HEADER_COLUMN_DEF",8),M(Fr),M(Re),M(f2,8),M(Qpe,8))},n.\u0275cmp=R({type:n,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(e,i){1&e&&P("click",function(){return i._handleClick()})("keydown",function(o){return i._handleKeydown(o)})("mouseenter",function(){return i._setIndicatorHintVisible(!0)})("mouseleave",function(){return i._setIndicatorHintVisible(!1)}),2&e&&(ze("aria-sort",i._getAriaSortAttribute()),et("mat-sort-header-disabled",i._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[tt],attrs:fKe,ngContentSelectors:gKe,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(e,i){1&e&&(xi(),_(0,"div",0)(1,"div",1),Vn(2),v(),E(3,mKe,6,6,"div",2),v()),2&e&&(et("mat-sort-header-sorted",i._isSorted())("mat-sort-header-position-before","before"===i.arrowPosition),ze("tabindex",i._isDisabled()?null:0)("role",i._isDisabled()?null:"button"),C(3),y("ngIf",i._renderArrow()))},dependencies:[Be],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[Pb.indicator,Pb.leftPointer,Pb.rightPointer,Pb.arrowOpacity,Pb.arrowPosition,Pb.allowChildren]},changeDetection:0}),n})(),Zpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[bKe],imports:[Me,ln]}),n})();function jG(n){return class extends n{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){let e=this._sticky;this._sticky=Rt(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){let t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}var GG=new pe("CDK_TABLE"),Jpe=(new pe("text-column-options"),jG(class{}),new pe("_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 $pe?e.headerCell.template:this instanceof ehe?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(M(Vi),M(kc))},n.\u0275dir=He({type:n,features:[Ft]}),n})()),wKe=jG(class extends Jpe{}),$pe=(()=>{class n extends wKe{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(M(Vi),M(kc),M(GG,8))},n.\u0275dir=He({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[tt,Ft]}),n})(),SKe=jG(class extends Jpe{}),ehe=(()=>{class n extends SKe{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(M(Vi),M(kc),M(GG,8))},n.\u0275dir=He({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[tt,Ft]}),n})(),the=(new pe("CDK_SPL"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Zc]}),n})()),nhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[the,ln,ln]}),n})(),WG=class extends Pv{constructor(t=[]){super(),this._renderData=new hr([]),this._filter=new hr(""),this._internalPageChanges=new ke,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,i)=>{let r=e[i];if(hH(r)){let o=Number(r);return o<9007199254740991?o:r}return r},this.sortData=(e,i)=>{let r=i.active,o=i.direction;return r&&""!=o?e.sort((s,a)=>{let l=this.sortingDataAccessor(s,r),c=this.sortingDataAccessor(a,r),u=typeof l,d=typeof c;u!==d&&("number"===u&&(l+=""),"number"===d&&(c+=""));let p=0;return null!=l&&null!=c?l>c?p=1:l<c&&(p=-1):null!=l?p=1:null!=c&&(p=-1),p*("asc"==o?1:-1)}):e},this.filterPredicate=(e,i)=>{let r=Object.keys(e).reduce((s,a)=>s+e[a]+"\u25ec","").toLowerCase(),o=i.trim().toLowerCase();return-1!=r.indexOf(o)},this._data=new hr(t),this._updateChangeSubscription()}get data(){return this._data.value}set data(t){t=Array.isArray(t)?t:[],this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}_updateChangeSubscription(){let t=this._sort?Jt(this._sort.sortChange,this._sort.initialized):Xt(null),e=this._paginator?Jt(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Xt(null),r=Lt([this._data,this._filter]).pipe(L(([a])=>this._filterData(a))),o=Lt([r,t]).pipe(L(([a])=>this._orderData(a))),s=Lt([o,e]).pipe(L(([a])=>this._pageData(a)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(a=>this._renderData.next(a))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;let e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){let i=Math.ceil(e.length/e.pageSize)-1||0,r=Math.min(e.pageIndex,i);r!==e.pageIndex&&(e.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}},Jk=class extends WG{},DKe=["dialogPopup"],AKe=["hueSlider"],IKe=["alphaSlider"];function PKe(n,t){if(1&n&&O(0,"div"),2&n){let e=S();Qx("arrow arrow-",e.cpUsePosition,""),Pt("top",e.arrowTop,"px")}}function RKe(n,t){if(1&n){let e=Pe();_(0,"div",28),P("newValue",function(r){return oe(e),se(S().onColorChange(r))})("dragStart",function(){return oe(e),se(S().onDragStart("saturation-lightness"))})("dragEnd",function(){return oe(e),se(S().onDragEnd("saturation-lightness"))}),O(1,"div",14),v()}if(2&n){let e=S();Pt("background-color",e.hueSliderColor),y("rgX",1)("rgY",1),C(1),Pt("top",null==e.slider?null:e.slider.v,"px")("left",null==e.slider?null:e.slider.s,"px")}}function OKe(n,t){1&n&&(In(),_(0,"svg",29),O(1,"path",30)(2,"path",31),v())}function kKe(n,t){if(1&n){let e=Pe();_(0,"button",32),P("click",function(r){oe(e);let o=S();return se(o.onAddPresetColor(r,o.selectedColor))}),A(1),v()}if(2&n){let e=S();Da(e.cpAddColorButtonClass),y("disabled",e.cpPresetColors&&e.cpPresetColors.length>=e.cpMaxPresetColorsLength),C(1),je(" ",e.cpAddColorButtonText," ")}}function FKe(n,t){1&n&&O(0,"div",33)}function NKe(n,t){if(1&n){let e=Pe();_(0,"input",39),P("keyup.enter",function(r){return oe(e),se(S(2).onAcceptColor(r))})("newValue",function(r){return oe(e),se(S(2).onAlphaInput(r))}),v()}if(2&n){let e=S(2);y("rg",1)("value",null==e.cmykText?null:e.cmykText.a)}}function LKe(n,t){1&n&&(_(0,"div"),A(1,"A"),v())}function BKe(n,t){if(1&n){let e=Pe();_(0,"div",34)(1,"div",35)(2,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onCyanInput(r))}),v(),_(3,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onMagentaInput(r))}),v(),_(4,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onYellowInput(r))}),v(),_(5,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onBlackInput(r))}),v(),E(6,NKe,1,2,"input",37),v(),_(7,"div",35)(8,"div"),A(9,"C"),v(),_(10,"div"),A(11,"M"),v(),_(12,"div"),A(13,"Y"),v(),_(14,"div"),A(15,"K"),v(),E(16,LKe,2,0,"div",38),v()()}if(2&n){let e=S();Pt("display",3!==e.format?"none":"block"),C(2),y("rg",100)("value",null==e.cmykText?null:e.cmykText.c),C(1),y("rg",100)("value",null==e.cmykText?null:e.cmykText.m),C(1),y("rg",100)("value",null==e.cmykText?null:e.cmykText.y),C(1),y("rg",100)("value",null==e.cmykText?null:e.cmykText.k),C(1),y("ngIf","disabled"!==e.cpAlphaChannel),C(10),y("ngIf","disabled"!==e.cpAlphaChannel)}}function VKe(n,t){if(1&n){let e=Pe();_(0,"input",39),P("keyup.enter",function(r){return oe(e),se(S(2).onAcceptColor(r))})("newValue",function(r){return oe(e),se(S(2).onAlphaInput(r))}),v()}if(2&n){let e=S(2);y("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function HKe(n,t){1&n&&(_(0,"div"),A(1,"A"),v())}function UKe(n,t){if(1&n){let e=Pe();_(0,"div",40)(1,"div",35)(2,"input",41),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onHueInput(r))}),v(),_(3,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onSaturationInput(r))}),v(),_(4,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onLightnessInput(r))}),v(),E(5,VKe,1,2,"input",37),v(),_(6,"div",35)(7,"div"),A(8,"H"),v(),_(9,"div"),A(10,"S"),v(),_(11,"div"),A(12,"L"),v(),E(13,HKe,2,0,"div",38),v()()}if(2&n){let e=S();Pt("display",2!==e.format?"none":"block"),C(2),y("rg",360)("value",null==e.hslaText?null:e.hslaText.h),C(1),y("rg",100)("value",null==e.hslaText?null:e.hslaText.s),C(1),y("rg",100)("value",null==e.hslaText?null:e.hslaText.l),C(1),y("ngIf","disabled"!==e.cpAlphaChannel),C(8),y("ngIf","disabled"!==e.cpAlphaChannel)}}function zKe(n,t){if(1&n){let e=Pe();_(0,"input",39),P("keyup.enter",function(r){return oe(e),se(S(2).onAcceptColor(r))})("newValue",function(r){return oe(e),se(S(2).onAlphaInput(r))}),v()}if(2&n){let e=S(2);y("rg",1)("value",null==e.rgbaText?null:e.rgbaText.a)}}function jKe(n,t){1&n&&(_(0,"div"),A(1,"A"),v())}function GKe(n,t){if(1&n){let e=Pe();_(0,"div",42)(1,"div",35)(2,"input",43),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onRedInput(r))}),v(),_(3,"input",43),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onGreenInput(r))}),v(),_(4,"input",43),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onBlueInput(r))}),v(),E(5,zKe,1,2,"input",37),v(),_(6,"div",35)(7,"div"),A(8,"R"),v(),_(9,"div"),A(10,"G"),v(),_(11,"div"),A(12,"B"),v(),E(13,jKe,2,0,"div",38),v()()}if(2&n){let e=S();Pt("display",1!==e.format?"none":"block"),C(2),y("rg",255)("value",null==e.rgbaText?null:e.rgbaText.r),C(1),y("rg",255)("value",null==e.rgbaText?null:e.rgbaText.g),C(1),y("rg",255)("value",null==e.rgbaText?null:e.rgbaText.b),C(1),y("ngIf","disabled"!==e.cpAlphaChannel),C(8),y("ngIf","disabled"!==e.cpAlphaChannel)}}function WKe(n,t){if(1&n){let e=Pe();_(0,"input",39),P("keyup.enter",function(r){return oe(e),se(S(2).onAcceptColor(r))})("newValue",function(r){return oe(e),se(S(2).onAlphaInput(r))}),v()}if(2&n){let e=S(2);y("rg",1)("value",e.hexAlpha)}}function qKe(n,t){1&n&&(_(0,"div"),A(1,"A"),v())}function YKe(n,t){if(1&n){let e=Pe();_(0,"div",44)(1,"div",35)(2,"input",45),P("blur",function(){return oe(e),se(S().onHexInput(null))})("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onHexInput(r))}),v(),E(3,WKe,1,2,"input",37),v(),_(4,"div",35)(5,"div"),A(6,"Hex"),v(),E(7,qKe,2,0,"div",38),v()()}if(2&n){let e=S();Pt("display",0!==e.format?"none":"block"),et("hex-alpha","forced"===e.cpAlphaChannel),C(2),y("value",e.hexText),C(1),y("ngIf","forced"===e.cpAlphaChannel),C(4),y("ngIf","forced"===e.cpAlphaChannel)}}function XKe(n,t){if(1&n){let e=Pe();_(0,"input",39),P("keyup.enter",function(r){return oe(e),se(S(2).onAcceptColor(r))})("newValue",function(r){return oe(e),se(S(2).onAlphaInput(r))}),v()}if(2&n){let e=S(2);y("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function QKe(n,t){if(1&n){let e=Pe();_(0,"div",46)(1,"div",35)(2,"input",36),P("keyup.enter",function(r){return oe(e),se(S().onAcceptColor(r))})("newValue",function(r){return oe(e),se(S().onValueInput(r))}),v(),E(3,XKe,1,2,"input",37),v(),_(4,"div",35)(5,"div"),A(6,"V"),v(),_(7,"div"),A(8,"A"),v()()()}if(2&n){let e=S();C(2),y("rg",100)("value",null==e.hslaText?null:e.hslaText.l),C(1),y("ngIf","disabled"!==e.cpAlphaChannel)}}function KKe(n,t){if(1&n){let e=Pe();_(0,"div",47)(1,"span",48),P("click",function(){return oe(e),se(S().onFormatToggle(-1))}),v(),_(2,"span",48),P("click",function(){return oe(e),se(S().onFormatToggle(1))}),v()()}}function ZKe(n,t){if(1&n){let e=Pe();_(0,"span",55),P("click",function(r){oe(e);let o=S().$implicit;return se(S(3).onRemovePresetColor(r,o))}),v()}2&n&&Da(S(4).cpRemoveColorButtonClass)}function JKe(n,t){if(1&n){let e=Pe();_(0,"div",53),P("click",function(){let o=oe(e).$implicit;return se(S(3).setColorFromString(o))}),E(1,ZKe,1,3,"span",54),v()}if(2&n){let e=t.$implicit,i=S(3);Pt("background-color",e),C(1),y("ngIf",i.cpAddColorButton)}}function $Ke(n,t){if(1&n&&(_(0,"div"),E(1,JKe,2,3,"div",52),v()),2&n){let e=S(2);Da(e.cpPresetColorsClass),C(1),y("ngForOf",e.cpPresetColors)}}function eZe(n,t){if(1&n&&(_(0,"div"),A(1),v()),2&n){let e=S(2);Da(e.cpPresetEmptyMessageClass),C(1),yt(e.cpPresetEmptyMessage)}}function tZe(n,t){if(1&n&&(_(0,"div",49),O(1,"hr"),_(2,"div",50),A(3),v(),E(4,$Ke,2,4,"div",51),E(5,eZe,2,4,"div",51),v()),2&n){let e=S();C(3),yt(e.cpPresetLabel),C(1),y("ngIf",null==e.cpPresetColors?null:e.cpPresetColors.length),C(1),y("ngIf",!(null!=e.cpPresetColors&&e.cpPresetColors.length)&&e.cpAddColorButton)}}function nZe(n,t){if(1&n){let e=Pe();_(0,"button",58),P("click",function(r){return oe(e),se(S(2).onCancelColor(r))}),A(1),v()}if(2&n){let e=S(2);Da(e.cpCancelButtonClass),C(1),yt(e.cpCancelButtonText)}}function iZe(n,t){if(1&n){let e=Pe();_(0,"button",58),P("click",function(r){return oe(e),se(S(2).onAcceptColor(r))}),A(1),v()}if(2&n){let e=S(2);Da(e.cpOKButtonClass),C(1),yt(e.cpOKButtonText)}}function rZe(n,t){if(1&n&&(_(0,"div",56),E(1,nZe,2,4,"button",57),E(2,iZe,2,4,"button",57),v()),2&n){let e=S();C(1),y("ngIf",e.cpCancelButton),C(1),y("ngIf",e.cpOKButton)}}function oZe(n,t){1&n&&Ni(0)}function sZe(n,t){if(1&n&&(_(0,"div",59),E(1,oZe,1,0,"ng-container",60),v()),2&n){let e=S();C(1),y("ngTemplateOutlet",e.cpExtraTemplate)}}var ws=(()=>(function(n){n[n.HEX=0]="HEX",n[n.RGBA=1]="RGBA",n[n.HSLA=2]="HSLA",n[n.CMYK=3]="CMYK"}(ws||(ws={})),ws))(),hu=class{constructor(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}},Rb=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},Rp=class{constructor(t,e,i,r){this.h=t,this.s=e,this.l=i,this.a=r}},t0=class{constructor(t,e,i,r,o=1){this.c=t,this.m=e,this.y=i,this.k=r,this.a=o}},cZe=(()=>{class n{constructor(){this.newValue=new G}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=He({type:n,selectors:[["","text",""]],hostBindings:function(e,i){1&e&&P("input",function(o){return i.inputChange(o)})},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),n})(),uZe=(()=>{class n{constructor(e){this.elRef=e,this.dragEnd=new G,this.dragStart=new G,this.newValue=new G,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)),s=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-s/r,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:s/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)(M(Re))},n.\u0275dir=He({type:n,selectors:[["","slider",""]],hostBindings:function(e,i){1&e&&P("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})(),$k=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},eF=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},qG=(()=>{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,s=e.a;if(0===o)return new Rp(i,0,0,s);if(0===r&&1===o)return new Rp(i,1,1,s);{let a=o*(2-r)/2;return new Rp(i,o*r/(1-Math.abs(2*a-1)),a,s)}}hsla2hsva(e){let i=Math.min(e.h,1),r=Math.min(e.s,1),o=Math.min(e.l,1),s=Math.min(e.a,1);if(0===o)return new Rb(i,0,0,s);{let a=o+r*(1-Math.abs(2*o-1))/2;return new Rb(i,2*(a-o)/a,a,s)}}hsvaToRgba(e){let i,r,o,s=e.h,a=e.s,l=e.v,c=e.a,u=Math.floor(6*s),d=6*s-u,p=l*(1-a),h=l*(1-d*a),f=l*(1-(1-d)*a);switch(u%6){case 0:i=l,r=f,o=p;break;case 1:i=h,r=l,o=p;break;case 2:i=p,r=l,o=f;break;case 3:i=p,r=h,o=l;break;case 4:i=f,r=p,o=l;break;case 5:i=l,r=p,o=h;break;default:i=0,r=0,o=0}return new hu(i,r,o,c)}cmykToRgb(e){return new hu((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 t0(0,0,0,1,e.a):new t0((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),s=Math.min(e.g,1),a=Math.min(e.b,1),l=Math.min(e.a,1),c=Math.max(o,s,a),u=Math.min(o,s,a),d=c,p=c-u;if(r=0===c?0:p/c,c===u)i=0;else{switch(c){case o:i=(s-a)/p+(s<a?6:0);break;case s:i=(a-o)/p+2;break;case a:i=(o-s)/p+4;break;default:i=0}i/=6}return new Rb(i,r,d,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 t0(e.c/100,e.m/100,e.y/100,e.k/100,e.a)}denormalizeCMYK(e){return new t0(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 hu(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(s){return new hu(parseInt(s[2],10)/255,parseInt(s[3],10)/255,parseInt(s[4],10)/255,isNaN(parseFloat(s[5]))?1:parseFloat(s[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(s){return new Rp(parseInt(s[2],10)/360,parseInt(s[3],10)/100,parseInt(s[4],10)/100,isNaN(parseFloat(s[5]))?1:parseFloat(s[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(s){return new hu(parseInt(s[1],16)/255,parseInt(s[2],16)/255,parseInt(s[3],16)/255,parseInt(s[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(s){return new hu(parseInt(s[1],16)/255,parseInt(s[2],16)/255,parseInt(s[3],16)/255,1)}}),o.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(s){return new hu(parseInt(s[1]+s[1],16)/255,parseInt(s[2]+s[2],16)/255,parseInt(s[3]+s[3],16)/255,1)}});for(let s in o)if(o.hasOwnProperty(s)){let a=o[s],l=a.re.exec(e),c=l&&a.parse(l);if(c)return c instanceof hu?r=this.rgbaToHsva(c):c instanceof Rp&&(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),s=new Rp(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("+s.h+","+s.s+"%,"+s.l+"%,"+s.a+")":"hsl("+s.h+","+s.s+"%,"+s.l+"%)";case"rgba":let a=this.denormalizeRGBA(this.hsvaToRgba(e));return e.a<1||"always"===r?"rgba("+a.r+","+a.g+","+a.b+","+Math.round(100*a.a)/100+")":"rgb("+a.r+","+a.g+","+a.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=ye({token:n,factory:n.\u0275fac}),n})(),ihe=typeof window<"u"&&"ontouchstart"in window,dZe=(()=>{class n{constructor(e,i,r,o,s,a){this.ngZone=e,this.elRef=i,this.cdRef=r,this.document=o,this.platformId=s,this.service=a,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[ws.HEX,ws.RGBA,ws.HSLA,ws.CMYK],this.useRootViewContainer=!1,this.eyeDropperSupported=XD(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 $k(0,0,0,0),this.sliderDimMax=new eF(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?ws.CMYK:"rgba"===this.cpOutputFormat?ws.RGBA:"hsla"===this.cpOutputFormat?ws.HSLA:ws.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 eF(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,s,a,l,c,u,d,p,h,f,m,x,g,b,D,T,k,Z,z,fe,ue,he,w,F,q,K,de,Y,ae,le,Ie,ve,De,nt,gt){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=u,this.cpAlphaChannel=d,this.cpOutputFormat=p,this.cpDialogDisplay=a,this.cpIgnoredElements=f,this.cpSaveClickOutside=m,this.cpCloseClickOutside=x,this.useRootViewContainer=g,this.width=this.cpWidth=parseInt(o,10),this.height=this.cpHeight=parseInt(s,10),this.cpPosition=b,this.cpPositionOffset=parseInt(D,10),this.cpOKButton=w,this.cpOKButtonText=q,this.cpOKButtonClass=F,this.cpCancelButton=K,this.cpCancelButtonText=Y,this.cpCancelButtonClass=de,this.cpEyeDropper=De,this.fallbackColor=l||"#fff",this.setPresetConfig(k,Z),this.cpPresetColorsClass=z,this.cpMaxPresetColorsLength=fe,this.cpPresetEmptyMessage=ue,this.cpPresetEmptyMessageClass=he,this.cpAddColorButton=ae,this.cpAddColorButtonText=Ie,this.cpAddColorButtonClass=le,this.cpRemoveColorButtonClass=ve,this.cpTriggerElement=nt,this.cpExtraTemplate=gt,T||(this.dialogArrowOffset=0),"inline"===a&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===p&&"always"!==d&&"forced"!==d&&(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(()=>{ihe?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||(ihe?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,s,a,l=this.outputColor;if(s=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(r?(a=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(a)):(a=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(a))),a=this.service.denormalizeRGBA(a),this.sliderH=this.hsva.h):a=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),o=this.service.denormalizeRGBA(this.service.hsvaToRgba(new Rb(this.sliderH||this.hsva.h,1,1,1))),i&&(this.hslaText=new Rp(Math.round(360*s.h),Math.round(100*s.s),Math.round(100*s.l),Math.round(100*s.a)/100),this.rgbaText=new hu(a.r,a.g,a.b,Math.round(100*a.a)/100),this.cpCmykEnabled&&(this.cmykText=new t0(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(a,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==ws.RGBA&&this.format!==ws.CMYK&&this.format!==ws.HSLA&&this.hsva.a<1&&(this.format=this.hsva.a<1?ws.RGBA:ws.HEX),this.hueSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.alphaSliderColor="rgb("+a.r+","+a.g+","+a.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==ws.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 $k((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,s=null,a=this.directiveElementRef.nativeElement.parentNode,l=this.dialogElement.nativeElement.offsetHeight;for(;null!==a&&"HTML"!==a.tagName;){if(r=window.getComputedStyle(a),e=r.getPropertyValue("position"),i=r.getPropertyValue("transform"),"static"!==e&&null===o&&(o=a),i&&"none"!==i&&null===s&&(s=a),"fixed"===e){o=s;break}a=a.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=a);let d=this.createDialogBox(o,"fixed"!==e);this.top=c.top-d.top,this.left=c.left-d.left}"fixed"===e&&(this.position="fixed");let u=this.cpPosition;"auto"===this.cpPosition&&(u=function(n,t){let e="right",i="bottom",{height:r,width:o}=n,{top:s,left:a}=t,l=s+t.height,c=a+t.width,u=s-r<0,d=l+r>(window.innerHeight||document.documentElement.clientHeight),p=a-o<0,h=c+o>(window.innerWidth||document.documentElement.clientWidth);return d&&(i="top"),u&&(i="bottom"),p&&(e="right"),h&&(e="left"),u&&d&&p&&h?["left","right","top","bottom"].reduce((x,g)=>n[x]>n[g]?x:g):p&&h?u?"bottom":d||s>l?"top":"bottom":u&&d?p?"right":h||a>c?"left":"right":`${i}-${e}`}(this.dialogElement.nativeElement.getBoundingClientRect(),this.cpTriggerElement.nativeElement.getBoundingClientRect())),"top"===u?(this.arrowTop=l-1,this.top-=l+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"bottom"===u?(this.top+=c.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"top-left"===u||"left-top"===u?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===u||"right-top"===u?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left+=c.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===u||"bottom-left"===u||"left-bottom"===u?(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=u}}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)(M(_t),M(Re),M(nn),M(Ht),M(Gd),M(qG))},n.\u0275cmp=R({type:n,selectors:[["color-picker"]],viewQuery:function(e,i){if(1&e&&(ot(DKe,7),ot(AKe,7),ot(IKe,7)),2&e){let r;Ne(r=Le())&&(i.dialogElement=r.first),Ne(r=Le())&&(i.hueSlider=r.first),Ne(r=Le())&&(i.alphaSlider=r.first)}},hostBindings:function(e,i){1&e&&P("keyup.esc",function(o){return i.handleEsc(o)},0,_T)("keyup.enter",function(o){return i.handleEnter(o)},!1,_T)},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&&(_(0,"div",0,1),P("click",function(o){return o.stopPropagation()}),E(2,PKe,1,5,"div",2),E(3,RKe,2,8,"div",3),_(4,"div",4)(5,"div",5),O(6,"div",6),_(7,"div",7),P("click",function(){return i.eyeDropperSupported&&i.cpEyeDropper&&i.onEyeDropper()}),E(8,OKe,3,0,"svg",8),v(),E(9,kKe,2,5,"button",9),v(),_(10,"div",10),E(11,FKe,1,0,"div",11),_(12,"div",12,13),P("newValue",function(o){return i.onHueChange(o)})("dragStart",function(){return i.onDragStart("hue")})("dragEnd",function(){return i.onDragEnd("hue")}),O(14,"div",14),v(),_(15,"div",15,16),P("newValue",function(o){return i.onValueChange(o)})("dragStart",function(){return i.onDragStart("value")})("dragEnd",function(){return i.onDragEnd("value")}),O(17,"div",14),v(),_(18,"div",17,18),P("newValue",function(o){return i.onAlphaChange(o)})("dragStart",function(){return i.onDragStart("alpha")})("dragEnd",function(){return i.onDragEnd("alpha")}),O(20,"div",14),v()()(),E(21,BKe,17,12,"div",19),E(22,UKe,14,10,"div",20),E(23,GKe,14,10,"div",21),E(24,YKe,8,7,"div",22),E(25,QKe,9,3,"div",23),E(26,KKe,3,0,"div",24),E(27,tZe,6,3,"div",25),E(28,rZe,3,2,"div",26),E(29,sZe,2,1,"div",27),v()),2&e&&(Pt("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"),et("open",i.show),C(2),y("ngIf","popup"===i.cpDialogDisplay),C(1),y("ngIf",1===(i.cpColorMode||1)),C(4),Pt("background-color",i.selectedColor)("cursor",i.eyeDropperSupported&&i.cpEyeDropper?"pointer":null),C(1),y("ngIf",i.eyeDropperSupported&&i.cpEyeDropper),C(1),y("ngIf",i.cpAddColorButton),C(2),y("ngIf","disabled"===i.cpAlphaChannel),C(1),Pt("display",1===(i.cpColorMode||1)?"block":"none"),y("rgX",1),C(2),Pt("left",null==i.slider?null:i.slider.h,"px"),C(1),Pt("display",2===(i.cpColorMode||1)?"block":"none"),y("rgX",1),C(2),Pt("right",null==i.slider?null:i.slider.v,"px"),C(1),Pt("display","disabled"===i.cpAlphaChannel?"none":"block")("background-color",i.alphaSliderColor),y("rgX",1),C(2),Pt("left",null==i.slider?null:i.slider.a,"px"),C(1),y("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),C(1),y("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),C(1),y("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),C(1),y("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),C(1),y("ngIf",!i.cpDisableInput&&2===(i.cpColorMode||1)),C(1),y("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),C(1),y("ngIf",(null==i.cpPresetColors?null:i.cpPresetColors.length)||i.cpAddColorButton),C(1),y("ngIf",i.cpOKButton||i.cpCancelButton),C(1),y("ngIf",i.cpExtraTemplate))},dependencies:[dn,Be,os,cZe,uZe],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})(),rhe=(()=>{class n{constructor(e,i,r,o,s,a){this.injector=e,this.cfr=i,this.appRef=r,this.vcRef=o,this.elRef=s,this._service=a,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 G(!0),this.cpToggleChange=new G(!0),this.cpSliderChange=new G(!0),this.cpSliderDragEnd=new G(!0),this.cpSliderDragStart=new G(!0),this.colorPickerOpen=new G(!0),this.colorPickerClose=new G(!0),this.colorPickerCancel=new G(!0),this.colorPickerSelect=new G(!0),this.colorPickerChange=new G(!1),this.cpCmykColorChange=new G(!0),this.cpPresetColorsChange=new G(!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],Xn.NULL);o!==Xn.NULL?e=o.vcRef||o.viewContainerRef||this.vcRef:this.viewAttachedToAppRef=!0}let i=this.cfr.resolveComponentFactory(dZe);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=Xn.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)(M(Xn),M(gs),M(Iu),M(Oi),M(Re),M(qG))},n.\u0275dir=He({type:n,selectors:[["","colorPicker",""]],hostBindings:function(e,i){1&e&&P("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:[Ft]}),n})(),ohe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[qG],imports:[Me]}),n})(),fZe=["container"];function mZe(n,t){if(1&n){let e=Pe();_(0,"mat-slider",4),P("input",function(r){return oe(e),se(S().handleSingleSliderChange(r.value))}),v()}if(2&n){let e=S();y("disabled",!e.enabled)("min",e.min)("max",e.max)("step",1)("value",e.lowerValue)}}function gZe(n,t){if(1&n){let e=Pe();_(0,"span",5,6),O(2,"span",7)(3,"span",8),_(4,"span",9),P("mousedown",function(r){oe(e);let o=S();return se(o.handleMouseDown(r,o.Position.LEFT))}),v(),_(5,"span",9),P("mousedown",function(r){oe(e);let o=S();return se(o.handleMouseDown(r,o.Position.RIGHT))}),v()()}if(2&n){let e=S();C(3),Pt("left",e.getThumbPosition(e.lowerValue))("width",e.getTrackWidth()),C(1),Pt("left",e.getThumbPosition(e.lowerValue)),et("active",e.isThumbActive(e.Position.LEFT)),C(1),Pt("left",e.getThumbPosition(e.upperValue)),et("active",e.isThumbActive(e.Position.RIGHT))}}var mc=(()=>(function(n){n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT"}(mc||(mc={})),mc))(),she=(()=>{class n{constructor(e){this.changeDetector=e,this.tickCount=20,this.enabled=!0,this.returnIntegers=!1,this.rangeValuesChanged=new G,this.singleValueChanged=new G,this.Position=mc,this.activeThumb=mc.NONE,this.offsetXFromOriginOfActiveThumb=0,this.ngUnsubscribe=new ke}getThumbPosition(e){let i=this.getClippedValue(e),r=this.max-this.min;return r<=0?"50%":(i-this.min)/r*100+"%"}getTrackWidth(){if(null===this.upperValue)return"0%";let e=this.max-this.min;return e<=0?"0%":(this.getClippedValue(this.upperValue)-this.getClippedValue(this.lowerValue))/e*100+"%"}getClippedValue(e){return Math.min(Math.max(e,this.min),this.max)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnInit(){_i(document,"mousemove",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{this.handleMouseMove(e)}),_i(document,"mouseup",{passive:!0}).pipe(st(this.ngUnsubscribe)).subscribe(e=>{this.handleMouseOut(e)})}handleMouseDown(e,i){e.stopPropagation(),e.preventDefault(),this.activeThumb=i,this.offsetXFromOriginOfActiveThumb=6-e.offsetX}calculateValueFromMouseEvent(e){let a,{left:i,right:r}=this.container.nativeElement.getBoundingClientRect(),s=e.clientX-i+this.offsetXFromOriginOfActiveThumb;if(null!==this.tickCount&&this.tickCount>0){let c=(r-i)/this.tickCount;a=Math.round(s/c)*c/(r-i)}else a=s/(r-i);let l=this.getClippedValue(this.min+(this.max-this.min)*a);return this.returnIntegers?Math.round(l):Number(l.toFixed(10))}handleMouseMove(e){if(this.activeThumb===mc.NONE||null===this.upperValue)return;let i=this.calculateValueFromMouseEvent(e),r=[this.lowerValue,this.upperValue];this.activeThumb===mc.LEFT?(i>this.upperValue&&(this.activeThumb=mc.RIGHT),r=[i,this.upperValue]):(i<this.lowerValue&&(this.activeThumb=mc.LEFT),r=[this.lowerValue,i]),this.maybeNotifyNextRangeValues(r,"SLIDER"),this.changeDetector.markForCheck()}maybeNotifyNextRangeValues(e,i){let[r,o]=e.sort((s,a)=>s-a);(this.lowerValue!==r||this.upperValue!==o)&&this.rangeValuesChanged.emit({lowerValue:r,upperValue:o,source:i})}handleMouseOut(e){this.activeThumb!==mc.NONE&&(this.activeThumb=mc.NONE,this.changeDetector.markForCheck())}handleSingleSliderChange(e){this.singleValueChanged.emit({value:e,source:"SLIDER"})}handleInputChange(e,i){let r=e.target,o=this.getClippedValue(Number(r.value));isNaN(o)||(i===mc.LEFT?null===this.upperValue?this.singleValueChanged.emit({value:o,source:"TEXT"}):this.maybeNotifyNextRangeValues([o,this.upperValue],"TEXT"):""===r.value?this.singleValueChanged.emit({value:this.lowerValue,source:"TEXT_DELETED"}):this.maybeNotifyNextRangeValues([this.lowerValue,o],"TEXT"))}isThumbActive(e){return this.activeThumb===e}}return n.\u0275fac=function(e){return new(e||n)(M(nn))},n.\u0275cmp=R({type:n,selectors:[["tb-range-input"]],viewQuery:function(e,i){if(1&e&&ot(fZe,5,Re),2&e){let r;Ne(r=Le())&&(i.container=r.first)}},inputs:{min:"min",max:"max",lowerValue:"lowerValue",upperValue:"upperValue",tickCount:"tickCount",enabled:"enabled",returnIntegers:"returnIntegers"},outputs:{rangeValuesChanged:"rangeValuesChanged",singleValueChanged:"singleValueChanged"},decls:5,vars:6,consts:[["type","number",1,"lower-input",3,"disabled","value","change"],["type","number",1,"upper-input",3,"disabled","value","change"],["class","single-slider","color","primary",3,"disabled","min","max","step","value","input",4,"ngIf","ngIfElse"],["range",""],["color","primary",1,"single-slider",3,"disabled","min","max","step","value","input"],[1,"container"],["container",""],[1,"slider-track"],[1,"slider-track-fill"],[1,"thumb",3,"mousedown"]],template:function(e,i){if(1&e&&(_(0,"input",0),P("change",function(o){return i.handleInputChange(o,i.Position.LEFT)}),v(),_(1,"input",1),P("change",function(o){return i.handleInputChange(o,i.Position.RIGHT)}),v(),E(2,mZe,1,5,"mat-slider",2),E(3,gZe,6,12,"ng-template",null,3,qt)),2&e){let r=$e(4);y("disabled",!i.enabled)("value",i.lowerValue),C(1),y("disabled",!i.enabled)("value",null!==i.upperValue?i.upperValue:""),C(1),y("ngIf",null===i.upperValue)("ngIfElse",r)}},dependencies:[Be,up],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;padding:6px}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}.single-slider[_ngcontent-%COMP%]{grid-area:slider;padding:0px}.single-slider[_ngcontent-%COMP%]     .mat-slider-wrapper{top:5px;left:0px;right:0px}  .single-slider.mat-slider-horizontal{height:12px}.container[_ngcontent-%COMP%]{grid-area:slider;align-items:center;box-sizing:border-box;display:inline-flex;height:12px;justify-content:center;position:relative;width:100%}.slider-track[_ngcontent-%COMP%]{background:rgba(0,0,0,.26);height:2px;width:100%}body.dark-mode[_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%]{background:rgba(255,255,255,.3)}.slider-track-fill[_ngcontent-%COMP%]{position:absolute;height:2px}.thumb[_ngcontent-%COMP%]{box-sadhow:0 0 0 1px rgba(0,0,0,.26);border-radius:100%;display:inline-block;height:12px;margin-left:-6px;position:absolute;top:0;transform-origin:center;transition:transform .3s ease;width:12px;will-change:transform}body.dark-mode[_nghost-%COMP%]   .thumb[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .thumb[_ngcontent-%COMP%]{box-sadhow:0 0 0 1px rgba(255,255,255,.3)}.thumb[_ngcontent-%COMP%]:hover{cursor:grab}.thumb[_ngcontent-%COMP%]:active{cursor:grabbing}.thumb.active[_ngcontent-%COMP%]{transform:scale(1.2)}.slider-track-fill[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]{background:#f57c00}body.dark-mode[_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%]{background:#ef6c00}body.dark-mode[_nghost-%COMP%]   .thumb[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .thumb[_ngcontent-%COMP%]{background:#ef6c00}'],changeDetection:0}),n})(),yZe=["regexStringInput"];function bZe(n,t){if(1&n&&(sn(0),_(1,"li",22),A(2),v(),an()),2&n){let e=t.$implicit;C(1),y("title",e.name),C(1),yt(e.name)}}function xZe(n,t){if(1&n&&(_(0,"li",23)(1,"em"),A(2),B(3,"number"),v()()),2&n){let e=S().$implicit;C(2),je("and ",U(3,1,e.runs.length-5)," more")}}function CZe(n,t){1&n&&(_(0,"li",24)(1,"em"),A(2,"No runs are in the group"),v()())}var MZe=function(n){return{borderColor:n}},wZe=function(n){return{backgroundColor:n}};function SZe(n,t){if(1&n&&(_(0,"ul",16)(1,"li")(2,"label"),O(3,"span",17),_(4,"code",18),A(5),v()(),_(6,"ul"),E(7,bZe,3,2,"ng-container",19),B(8,"slice"),E(9,xZe,4,3,"li",20),E(10,CZe,3,0,"li",21),v()()()),2&n){let e=t.$implicit;y("ngStyle",On(11,MZe,e.color)),C(3),y("ngStyle",On(13,wZe,e.color)),C(1),y("title",e.groupId),C(1),yt(e.groupId),C(2),y("ngForOf",J3(8,7,e.runs,0,5)),C(2),y("ngIf",e.runs.length>5),C(1),y("ngIf",0===e.runs.length)}}function EZe(n,t){if(1&n&&(_(0,"div",14),E(1,SZe,11,15,"ul",15),v()),2&n){let e=S(2);C(1),y("ngForOf",e.colorRunPairList)}}function TZe(n,t){if(1&n&&(_(0,"div",25),A(1," There are no runs matching the regex, "),_(2,"code"),A(3),v(),A(4,". Please check if your regex string is correct. "),v()),2&n){let e=S(2);C(3),je("/",e.regexString,"/")}}function DZe(n,t){if(1&n&&(_(0,"div",10)(1,"h4"),A(2,"Color group preview"),v(),_(3,"div",11),E(4,EZe,2,1,"div",12),E(5,TZe,5,1,"ng-template",null,13,qt),v()()),2&n){let e=$e(6),i=S();C(4),y("ngIf",i.colorRunPairList.length)("ngIfElse",e)}}var ahe=(()=>{class n{constructor(e,i){this.dialogRef=e,this.hostElRef=i,this.onSave=new G,this.regexInputOnChange=new G,this.timeOutId=0}resetFocus(){this.hostElRef.nativeElement.contains(document.activeElement)||this.regexStringInput.nativeElement.focus()}onEnter(e){this.onSaveClick(e),this.dialogRef.close()}onSaveClick(e){this.onSave.emit(e)}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)}}return n.\u0275fac=function(e){return new(e||n)(M(tu),M(Re))},n.\u0275cmp=R({type:n,selectors:[["regex-edit-dialog-component"]],viewQuery:function(e,i){if(1&e&&ot(yZe,7),2&e){let r;Ne(r=Le())&&(i.regexStringInput=r.first)}},inputs:{regexString:"regexString",colorRunPairList:"colorRunPairList"},outputs:{onSave:"onSave",regexInputOnChange:"regexInputOnChange"},decls:30,vars:2,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",""],["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","",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){if(1&e){let r=Pe();_(0,"div",0),P("focusout",function(){return i.handleFocusOut()}),_(1,"h1",1),A(2,"Color runs by regex"),v(),_(3,"mat-dialog-content")(4,"p"),A(5,"Enter a regex with capturing groups to match against run names:"),v(),_(6,"mat-form-field")(7,"input",2,3),P("keydown.enter",function(s){return i.onEnter(s.target.value)})("input",function(s){return i.regexInputChange(s.target.value)}),v()()(),_(9,"div",4)(10,"p"),A(11,' Each matching run will be assigned a color based on the "key" formed by its matches to the capturing groups. '),O(12,"br"),_(13,"button",5),P("click",function(){return i.fillExample("(train|eval)")}),A(14," Try "),_(15,"code"),A(16,"(train|eval)"),v()(),A(17," to assign all runs containing "),_(18,"code"),A(19,"train"),v(),A(20," to one color and all runs containing "),_(21,"code"),A(22,"eval"),v(),A(23," to another color. "),v()(),E(24,DZe,7,2,"div",6),_(25,"div",7)(26,"button",8),A(27,"Cancel"),v(),_(28,"button",9),P("click",function(){oe(r);let s=$e(8);return se(i.onSaveClick(s.value))}),A(29," Save "),v()()()}2&e&&(C(7),Zi("value",i.regexString),C(17),y("ngIf",i.regexString))},dependencies:[dn,Be,zu,pd,_n,T2,Fte,D2,A2,Uh,nZ,Ql],styles:[".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:10px 0}.group-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:10px}.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:20px}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:10px}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:5px 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:5px}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})(),lhe=(()=>{class n{constructor(e,i,r){this.store=e,this.dialogRef=i,this.tentativeRegexString$=new ke,this.groupByRegexString$=Qa(()=>Jt(this.store.select(YI).pipe(Qt(1)),this.tentativeRegexString$)).pipe(zn("")),this.colorRunPairList$=Qa(()=>this.groupByRegexString$.pipe(Hr(500),Ye(o=>{try{let s=new RegExp(o);return Boolean(s)}catch{return!1}}),fr(this.allRuns$,this.runIdToEid$,this.store.select(Na.getColorPalette),this.store.select(Qu)),L(([o,s,a,l,c])=>{let d=GM({key:sr.REGEX,regexString:o},s,a),p=new Map,h=[];for(let[f,m]of Object.entries(d.matches)){let x=p.get(f);if(!x){let g=l.colors[p.size%l.colors.length];x=c?g.darkHex:g.lightHex,p.set(f,x)}h.push({groupId:f,color:x,runs:m})}return h}))).pipe(zn([])),this.experimentIds=r.experimentIds,this.runIdToEid$=Lt(this.experimentIds.map(o=>this.store.select(See,{experimentId:o}).pipe(L(s=>({experimentId:o,runIds:s}))))).pipe(L(o=>{let s={};for(let{runIds:a,experimentId:l}of o)for(let c of a)s[c]=l;return s})),this.allRuns$=Lt(this.experimentIds.map(o=>this.store.select(rd,{experimentId:o}))).pipe(L(o=>o.flat()))}onRegexInputOnChange(e){this.tentativeRegexString$.next(e)}onSave(e){this.store.dispatch(av({experimentIds:this.experimentIds,groupBy:{key:sr.REGEX,regexString:e}}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce),M(tu),M(cw))},n.\u0275cmp=R({type:n,selectors:[["regex-edit-dialog"]],decls:3,vars:6,consts:[[3,"regexString","colorRunPairList","onSave","regexInputOnChange"]],template:function(e,i){1&e&&(_(0,"regex-edit-dialog-component",0),P("onSave",function(o){return i.onSave(o)})("regexInputOnChange",function(o){return i.onRegexInputOnChange(o)}),B(1,"async"),B(2,"async"),v()),2&e&&y("regexString",U(1,2,i.groupByRegexString$))("colorRunPairList",U(2,4,i.colorRunPairList$))},dependencies:[ahe,Ge],styles:["[_nghost-%COMP%], regex-edit-dialog-component[_ngcontent-%COMP%] {\n        display: block;\n        height: 100%;\n        width: 100%;\n      }"]}),n})();function PZe(n,t){1&n&&O(0,"mat-icon",14)}function RZe(n,t){if(1&n){let e=Pe();_(0,"button",13),P("click",function(){oe(e);let r=S();return se(r.onGroupByChange.emit({key:r.GroupByKey.EXPERIMENT}))}),_(1,"span"),E(2,PZe,1,0,"mat-icon",7),v(),_(3,"label"),A(4,"Experiment"),v()()}if(2&n){let e=S();ze("aria-checked",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT),C(2),y("ngIf",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT)}}function OZe(n,t){1&n&&O(0,"mat-icon",14)}function kZe(n,t){1&n&&O(0,"mat-icon",14)}function FZe(n,t){if(1&n&&(_(0,"label"),A(1),v()),2&n){let e=S();C(1),yt(e.regexString)}}function NZe(n,t){1&n&&(_(0,"label",15),A(1,"(none set)"),v())}var che=(()=>{class n{constructor(e){this.dialog=e,this.GroupByKey=sr,this.onGroupByChange=new G}onRegexStringEdit(){this.dialog.open(lhe,{maxHeight:"95vh",maxWidth:"80vw",data:{experimentIds:this.experimentIds}})}onGroupByRegexClick(){this.regexString?this.onGroupByChange.emit({key:sr.REGEX,regexString:this.regexString}):this.onRegexStringEdit()}}return n.\u0275fac=function(e){return new(e||n)(M(vl))},n.\u0275cmp=R({type:n,selectors:[["runs-group-menu-button-component"]],inputs:{showExperimentsGroupBy:"showExperimentsGroupBy",experimentIds:"experimentIds",regexString:"regexString",selectedGroupBy:"selectedGroupBy"},outputs:{onGroupByChange:"onGroupByChange"},decls:22,vars:8,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"],["mat-menu-item","","role","menuitem","data-value","regex-edit",1,"display-regex-string",3,"click"],["svgIcon","edit_24px"],[4,"ngIf"],["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&&(_(0,"button",0),O(1,"mat-icon",1),v(),_(2,"mat-menu",2,3)(4,"div",4),A(5,"Color runs by"),v(),E(6,RZe,5,2,"button",5),_(7,"button",6),P("click",function(){return i.onGroupByChange.emit({key:i.GroupByKey.RUN})}),_(8,"span"),E(9,OZe,1,0,"mat-icon",7),v(),_(10,"label"),A(11,"Run"),v()(),_(12,"button",8),P("click",function(){return i.onGroupByRegexClick()}),_(13,"span"),E(14,kZe,1,0,"mat-icon",7),v(),_(15,"label"),A(16,"Regex"),v()(),_(17,"button",9),P("click",function(){return i.onRegexStringEdit()}),_(18,"span"),O(19,"mat-icon",10),v(),E(20,FZe,2,1,"label",11),E(21,NZe,2,0,"label",12),v()()),2&e&&(y("matMenuTriggerFor",$e(3)),C(6),y("ngIf",i.showExperimentsGroupBy),C(1),ze("aria-checked",i.selectedGroupBy.key===i.GroupByKey.RUN),C(2),y("ngIf",i.selectedGroupBy.key===i.GroupByKey.RUN),C(3),ze("aria-checked",i.selectedGroupBy.key===i.GroupByKey.REGEX),C(2),y("ngIf",i.selectedGroupBy.key===i.GroupByKey.REGEX),C(6),y("ngIf",i.regexString),C(1),y("ngIf",!i.regexString))},dependencies:[Be,_n,Gt,hd,nu,fd],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 button{display:grid;gap:2px 10px;grid-template-columns:20px auto}  .run-table-color-group-by mat-icon{height:20px;width: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})(),uhe=(()=>{class n{constructor(e){this.store=e,this.showExperimentsGroupBy$=this.store.select(e$).pipe(L(i=>i.has(hi.COMPARE_EXPERIMENT))),this.selectedGroupBy$=this.store.select(Eee),this.groupByRegexString$=this.store.select(YI)}onGroupByChange(e){this.store.dispatch(av({experimentIds:this.experimentIds,groupBy:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["runs-group-menu-button"]],inputs:{experimentIds:"experimentIds"},decls:4,vars:10,consts:[[3,"regexString","selectedGroupBy","showExperimentsGroupBy","experimentIds","onGroupByChange"]],template:function(e,i){1&e&&(_(0,"runs-group-menu-button-component",0),P("onGroupByChange",function(o){return i.onGroupByChange(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("regexString",U(1,4,i.groupByRegexString$))("selectedGroupBy",U(2,6,i.selectedGroupBy$))("showExperimentsGroupBy",U(3,8,i.showExperimentsGroupBy$))("experimentIds",i.experimentIds)},dependencies:[che,Ge],encapsulation:2,changeDetection:0}),n})(),VZe=["filter"];function HZe(n,t){1&n&&Ni(0)}function UZe(n,t){1&n&&Ni(0)}var zZe=function(n){return{item:n}};function jZe(n,t){if(1&n&&(sn(0),E(1,UZe,1,0,"ng-container",12),an()),2&n){let e=t.$implicit;S();let i=$e(14);C(1),y("ngTemplateOutlet",i)("ngTemplateOutletContext",On(2,zZe,e))}}function GZe(n,t){1&n&&(_(0,"div",13),O(1,"mat-spinner",14),v())}function WZe(n,t){1&n&&(_(0,"div",15),A(1,"No Runs"),v())}function qZe(n,t){if(1&n&&(_(0,"div",15)(1,"span"),A(2,'No runs match "'),_(3,"code"),A(4),v(),A(5,'"'),v()()),2&n){let e=S();C(4),yt(e.regexFilter)}}var YZe=function(){return[5,10,20]};function XZe(n,t){if(1&n){let e=Pe();_(0,"mat-paginator",16),P("page",function(r){return oe(e),se(S().onPaginationChange.emit(r))}),v()}if(2&n){let e=S();y("pageSizeOptions",Qp(4,YZe))("pageIndex",e.paginationOption.pageIndex)("pageSize",e.paginationOption.pageSize)("length",e.filteredItemsLength)}}function QZe(n,t){if(1&n){let e=Pe();_(0,"mat-checkbox",26),P("change",function(){return oe(e),se(S(3).handlePageToggle())}),v()}if(2&n){let e=S(3);y("checked",e.allPageItemsSelected())("indeterminate",!e.allPageItemsSelected()&&e.somePageItemsSelected())}}var dhe=function(n){return{type:n}};function KZe(n,t){if(1&n&&(_(0,"span",27),A(1,"Experiment"),v()),2&n){let e=S(3);y("mat-sort-header",On(1,dhe,e.SortType.EXPERIMENT_NAME))}}function ZZe(n,t){if(1&n&&(_(0,"span",27),A(1,"Run"),v()),2&n){let e=S(3);y("mat-sort-header",On(1,dhe,e.SortType.RUN_NAME))}}function JZe(n,t){if(1&n&&(_(0,"span"),O(1,"runs-group-menu-button",28),v()),2&n){let e=S(3);C(1),y("experimentIds",e.experimentIds)}}var phe=function(n){return["column",n]};function $Ze(n,t){if(1&n&&(_(0,"span",21),sn(1,22),E(2,QZe,1,2,"mat-checkbox",23),E(3,KZe,2,3,"span",24),E(4,ZZe,2,3,"span",24),E(5,JZe,2,1,"span",25),an(),v()),2&n){let e=t.$implicit,i=S(2);y("ngClass",On(6,phe,"tb-column-"+e)),C(1),y("ngSwitch",e),C(1),y("ngSwitchCase",i.RunsTableColumn.CHECKBOX),C(1),y("ngSwitchCase",i.RunsTableColumn.EXPERIMENT_NAME),C(1),y("ngSwitchCase",i.RunsTableColumn.RUN_NAME),C(1),y("ngSwitchCase",i.RunsTableColumn.RUN_COLOR)}}function eJe(n,t){if(1&n){let e=Pe();sn(0),_(1,"div",37),P("click",function(r){return r.stopPropagation()}),_(2,"tb-range-input",38),P("rangeValuesChanged",function(r){oe(e);let o=S(2).$implicit;return se(S(2).handleHparamIntervalChanged(o,r))}),v()(),an()}if(2&n){let e=S(2).$implicit;C(2),y("min",e.filter.minValue)("max",e.filter.maxValue)("lowerValue",e.filter.filterLowerValue)("upperValue",e.filter.filterUpperValue)}}function tJe(n,t){if(1&n){let e=Pe();_(0,"div",40),P("click",function(r){return r.stopPropagation()}),_(1,"mat-checkbox",36),P("change",function(){let o=oe(e).$implicit,s=S(3).$implicit;return se(S(2).handleHparamDiscreteChanged(s,o))}),_(2,"span"),A(3),v()()()}if(2&n){let e=t.$implicit,i=S(3).$implicit;C(1),y("checked",i.filter.filterValues.includes(e)),C(2),yt(e)}}function nJe(n,t){if(1&n&&(sn(0),E(1,tJe,4,2,"div",39),an()),2&n){let e=S(2).$implicit;C(1),y("ngForOf",e.filter.possibleValues)}}function iJe(n,t){if(1&n){let e=Pe();sn(0),_(1,"button",32),P("click",function(r){return r.stopPropagation()}),O(2,"mat-icon",33),v(),_(3,"mat-menu",null,34)(5,"div",35),P("click",function(r){return r.stopPropagation()}),_(6,"mat-checkbox",36),P("change",function(){oe(e);let r=S().$implicit;return se(S(2).handleHparamIncludeUndefinedToggled(r))}),_(7,"span"),A(8,"(show empty value)"),v()()(),E(9,eJe,3,4,"ng-container",31),E(10,nJe,2,1,"ng-container",31),v(),an()}if(2&n){let e=$e(4),i=S().$implicit,r=S(2);C(1),y("matMenuTriggerFor",e),ze("aria-label","Filter hparam "+(i.displayName||i.name)),C(5),y("checked",i.filter.includeUndefined),C(3),y("ngIf",i.filter.type===r.DomainType.INTERVAL),C(1),y("ngIf",i.filter.type===r.DomainType.DISCRETE)}}var rJe=function(n,t){return{type:n,name:t}};function oJe(n,t){if(1&n&&(_(0,"span",29)(1,"span",30),A(2),v(),E(3,iJe,11,5,"ng-container",31),v()),2&n){let e=t.$implicit,i=S(2);y("mat-sort-header",Qr(3,rJe,i.SortType.HPARAM,e.name)),C(2),yt(e.displayName||e.name),C(1),y("ngIf",e.filter)}}function sJe(n,t){if(1&n){let e=Pe();sn(0),_(1,"button",32),P("click",function(r){return r.stopPropagation()}),O(2,"mat-icon",33),v(),_(3,"mat-menu",null,34)(5,"div",35),P("click",function(r){return r.stopPropagation()}),_(6,"mat-checkbox",36),P("change",function(){oe(e);let r=S().$implicit;return se(S(2).handleMetricIncludeUndefinedChanged(r))}),_(7,"span"),A(8,"(show empty value)"),v()()(),_(9,"div",37),P("click",function(r){return r.stopPropagation()}),_(10,"tb-range-input",38),P("rangeValuesChanged",function(r){oe(e);let o=S().$implicit;return se(S(2).handleMetricFilterChanged(o,r))}),v()()(),an()}if(2&n){let e=$e(4),i=S().$implicit;C(1),y("matMenuTriggerFor",e),ze("aria-label","Filter metric "+(i.displayName||i.tag)),C(5),y("checked",i.filter.includeUndefined),C(4),y("min",i.filter.minValue)("max",i.filter.maxValue)("lowerValue",i.filter.filterLowerValue)("upperValue",i.filter.filterUpperValue)}}var aJe=function(n,t){return{type:n,tag:t}};function lJe(n,t){if(1&n&&(_(0,"span",29)(1,"span",30),A(2),v(),E(3,sJe,11,7,"ng-container",31),v()),2&n){let e=t.$implicit,i=S(2);y("mat-sort-header",Qr(3,aJe,i.SortType.METRIC,e.tag)),C(2),yt(e.displayName||e.tag),C(1),y("ngIf",e.filter)}}function cJe(n,t){if(1&n){let e=Pe();_(0,"div",17)(1,"div",18),P("matSortChange",function(r){return oe(e),se(S().handleSortChange(r))}),E(2,$Ze,6,8,"span",19),E(3,oJe,4,6,"span",20),E(4,lJe,4,6,"span",20),v()()}if(2&n){let e=S();C(1),y("matSortActive",e.sortOption.column),C(1),y("ngForOf",e.columns),C(1),y("ngForOf",e.hparamColumns)("ngForTrackBy",e.trackByHparamColumn),C(1),y("ngForOf",e.metricColumns)("ngForTrackBy",e.trackByMetricColumn)}}function uJe(n,t){if(1&n){let e=Pe();_(0,"span")(1,"mat-checkbox",47),P("change",function(){oe(e);let r=S(2).item;return se(S().onSelectionToggle.emit(r))})("dblclick",function(){oe(e);let r=S(2).item;return se(S().onSelectionDblClick.emit(r))}),v()()}if(2&n){let e=S(2).item;C(1),y("checked",e.selected)}}function dJe(n,t){if(1&n&&O(0,"tb-experiment-alias",48),2&n){let e=S(2).item;y("alias",e.experimentAlias)("title",e.experimentName)}}function pJe(n,t){if(1&n&&(_(0,"span",30),A(1),v()),2&n){let e=S(2).item;C(1),yt(e.run.name)}}var hJe=function(n){return{"run-color-swatch":!0,"no-color":n}};function fJe(n,t){if(1&n){let e=Pe();_(0,"span")(1,"button",49),P("colorPickerChange",function(r){oe(e);let o=S(2).item;return se(S().onRunColorChange.emit({runId:o.run.id,newColor:r}))}),v()()}if(2&n){let e=S(2).item;C(1),Pt("background",e.runColor),y("ngClass",On(8,hJe,!e.runColor))("colorPicker",e.runColor)("cpDialogDisplay","popup")("cpPositionOffset",-20)("cpUseRootViewContainer",!0)("cpOutputFormat","hex")}}function mJe(n,t){if(1&n&&(_(0,"span",44),sn(1,22),E(2,uJe,2,1,"span",25),E(3,dJe,1,2,"tb-experiment-alias",45),E(4,pJe,2,1,"span",46),E(5,fJe,2,10,"span",25),an(),v()),2&n){let e=t.$implicit,i=S(2);y("ngClass",On(6,phe,"tb-column-"+e)),C(1),y("ngSwitch",e),C(1),y("ngSwitchCase",i.RunsTableColumn.CHECKBOX),C(1),y("ngSwitchCase",i.RunsTableColumn.EXPERIMENT_NAME),C(1),y("ngSwitchCase",i.RunsTableColumn.RUN_NAME),C(1),y("ngSwitchCase",i.RunsTableColumn.RUN_COLOR)}}function gJe(n,t){if(1&n&&(_(0,"span",50),A(1),v()),2&n){let e=t.$implicit,i=S().item;C(1),yt(i.hparams.get(e.name))}}function _Je(n,t){if(1&n&&(_(0,"span",50),A(1),v()),2&n){let e=t.$implicit,i=S().item;C(1),yt(i.metrics.get(e.tag))}}function vJe(n,t){if(1&n&&(_(0,"div",41),E(1,mJe,6,8,"span",42),E(2,gJe,2,1,"span",43),E(3,_Je,2,1,"span",43),v()),2&n){let e=t.item,i=S();ze("data-id",e.run.id),C(1),y("ngForOf",i.columns),C(1),y("ngForOf",i.hparamColumns),C(1),y("ngForOf",i.metricColumns)}}var yJe=(()=>{class n extends e0{constructor(){super(...arguments),this.itemsPerPageLabel="Show runs:"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),hhe=(()=>{class n{constructor(){this.dataSource=new Jk,this.DomainType=Ci,this.RunsTableColumn=va,this.SortType=id,this.onRegexFilterChange=new G,this.onSelectionToggle=new G,this.onSelectionDblClick=new G,this.onPageSelectionToggle=new G,this.onPaginationChange=new G,this.onSortChange=new G,this.onRunColorChange=new G,this.onHparamDiscreteFilterChanged=new G,this.onHparamIntervalFilterChanged=new G,this.onMetricFilterChanged=new G}ngOnChanges(){this.dataSource.data=this.pageItems}getHparamColumnId(e){return`h:${e.name}`}getMetricColumnId(e){return`m:${e.tag}`}getColumnIds(){return[...this.columns,...this.hparamColumns.map(this.getHparamColumnId),...this.metricColumns.map(this.getMetricColumnId)]}allPageItemsSelected(){return Boolean(this.pageItems.length)&&this.pageItems.every(e=>e.selected)}somePageItemsSelected(){return this.pageItems.some(e=>e.selected)}handlePageToggle(){this.onPageSelectionToggle.emit({items:this.pageItems})}handleSortChange(e){let i;switch(e.direction){case"asc":i=ic.ASC;break;case"desc":i=ic.DESC;break;default:i=ic.UNSET}this.onSortChange.emit({key:e.active,direction:i})}onFilterKeyUp(e){this.onRegexFilterChange.emit(e.target.value)}tableTrackBy(e,i){return i.run.id}handleHparamIncludeUndefinedToggled(e){let{name:i,filter:r}=e;if(!r)throw new RangeError("Invariant error: require filter to exist for it to change");r.type===Ci.DISCRETE?this.onHparamDiscreteFilterChanged.emit({hparamName:i,includeUndefined:!r.includeUndefined,filterValues:r.filterValues}):this.onHparamIntervalFilterChanged.emit({name:i,includeUndefined:!r.includeUndefined,filterLowerValue:r.filterLowerValue,filterUpperValue:r.filterUpperValue})}handleHparamIntervalChanged(e,i){let{name:r,filter:o}=e;if(!o)throw new RangeError("Invariant error: require filter to exist for it to change");this.onHparamIntervalFilterChanged.emit({name:r,includeUndefined:o.includeUndefined,filterLowerValue:i.lowerValue,filterUpperValue:i.upperValue})}handleHparamDiscreteChanged(e,i){let{name:r,filter:o}=e;if(!o)throw new RangeError("Invariant error: require filter to exist for it to change");if(o.type!==Ci.DISCRETE)throw new RangeError(`Invariant error: expected discrete domain for ${r}`);let s=new Set([...o.filterValues]);s.has(i)?s.delete(i):s.add(i),this.onHparamDiscreteFilterChanged.emit({hparamName:r,includeUndefined:o.includeUndefined,filterValues:[...s]})}handleMetricIncludeUndefinedChanged(e){if(!e.filter)throw new RangeError("Invariant error: require filter to exist for it to change");this.onMetricFilterChanged.emit({name:e.tag,includeUndefined:!e.filter.includeUndefined,filterLowerValue:e.filter.filterLowerValue,filterUpperValue:e.filter.filterUpperValue})}handleMetricFilterChanged(e,i){if(!e.filter)throw new RangeError("Invariant error: require filter to exist for it to change");this.onMetricFilterChanged.emit({name:e.tag,includeUndefined:e.filter.includeUndefined,filterLowerValue:i.lowerValue,filterUpperValue:i.upperValue})}trackByHparamColumn(e){return e.name}trackByMetricColumn(e){return e.tag}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["runs-table-component"]],viewQuery:function(e,i){if(1&e&&(ot(VZe,7,Re),ot(Kk,7),ot(ME,7)),2&e){let r;Ne(r=Le())&&(i.filter=r.first),Ne(r=Le())&&(i.paginator=r.first),Ne(r=Le())&&(i.sort=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&et("flex-layout",i.useFlexibleLayout)},inputs:{experimentIds:"experimentIds",showExperimentName:"showExperimentName",columns:"columns",hparamColumns:"hparamColumns",metricColumns:"metricColumns",allItemsLength:"allItemsLength",filteredItemsLength:"filteredItemsLength",useFlexibleLayout:"useFlexibleLayout",usePagination:"usePagination",pageItems:"pageItems",loading:"loading",numSelectedItems:"numSelectedItems",sortOption:"sortOption",paginationOption:"paginationOption",regexFilter:"regexFilter"},outputs:{onRegexFilterChange:"onRegexFilterChange",onSelectionToggle:"onSelectionToggle",onSelectionDblClick:"onSelectionDblClick",onPageSelectionToggle:"onPageSelectionToggle",onPaginationChange:"onPaginationChange",onSortChange:"onSortChange",onRunColorChange:"onRunColorChange",onHparamDiscreteFilterChanged:"onHparamDiscreteFilterChanged",onHparamIntervalFilterChanged:"onHparamIntervalFilterChanged",onMetricFilterChanged:"onMetricFilterChanged"},features:[$t([{provide:e0,useClass:yJe}]),Ft],decls:15,vars:8,consts:[[1,"filter-row"],["placeholder","Filter runs (regex)",1,"run-filter",3,"value","keyup"],[1,"table-container"],["role","table"],[4,"ngTemplateOutlet"],["role","rowgroup",1,"rows"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","loading",4,"ngIf"],["class","no-runs",4,"ngIf"],["showFirstLastButtons","",3,"pageSizeOptions","pageIndex","pageSize","length","page",4,"ngIf"],["header",""],["row",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"loading"],["mode","indeterminate","diameter","28"],[1,"no-runs"],["showFirstLastButtons","",3,"pageSizeOptions","pageIndex","pageSize","length","page"],["role","rowgroup",1,"header"],["matSort","","role","row",3,"matSortActive","matSortChange"],["role","columnheader",3,"ngClass",4,"ngFor","ngForOf"],["role","columnheader","class","column",3,"mat-sort-header",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader",3,"ngClass"],[3,"ngSwitch"],[3,"checked","indeterminate","change",4,"ngSwitchCase"],[3,"mat-sort-header",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"checked","indeterminate","change"],[3,"mat-sort-header"],[3,"experimentIds"],["role","columnheader",1,"column",3,"mat-sort-header"],[1,"name"],[4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor","click"],["svgIcon","filter_alt_24px"],["filterMenu","matMenu"],["mat-menu-item","","role","menuitemcheckbox","disableRipple","",1,"filter-menu-checkbox-row",3,"click"],[3,"checked","change"],["disableRipple","","mat-menu-item","",1,"range-input-container",3,"click"],[3,"min","max","lowerValue","upperValue","rangeValuesChanged"],["mat-menu-item","","class","filter-menu-checkbox-row","role","menuitemcheckbox",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","role","menuitemcheckbox",1,"filter-menu-checkbox-row",3,"click"],["role","row"],["role","cell",3,"ngClass",4,"ngFor","ngForOf"],["role","cell","class","column",4,"ngFor","ngForOf"],["role","cell",3,"ngClass"],[3,"alias","title",4,"ngSwitchCase"],["class","name",4,"ngSwitchCase"],["title","Click to toggle run selection or double click to select only this run.",3,"checked","change","dblclick"],[3,"alias","title"],[3,"ngClass","colorPicker","cpDialogDisplay","cpPositionOffset","cpUseRootViewContainer","cpOutputFormat","colorPickerChange"],["role","cell",1,"column"]],template:function(e,i){if(1&e&&(_(0,"div",0)(1,"tb-filter-input",1),P("keyup",function(o){return i.onFilterKeyUp(o)}),v()(),_(2,"div",2)(3,"div",3),E(4,HZe,1,0,"ng-container",4),_(5,"div",5),E(6,jZe,2,4,"ng-container",6),v()(),E(7,GZe,2,0,"div",7),E(8,WZe,2,0,"div",8),E(9,qZe,6,1,"div",8),v(),E(10,XZe,1,5,"mat-paginator",9),E(11,cJe,5,6,"ng-template",null,10,qt),E(13,vJe,4,4,"ng-template",null,11,qt)),2&e){let r=$e(12);C(1),Zi("value",i.regexFilter),C(3),y("ngTemplateOutlet",r),C(2),y("ngForOf",i.pageItems)("ngForTrackBy",i.tableTrackBy),C(1),y("ngIf",i.loading),C(1),y("ngIf",!i.loading&&0===i.allItemsLength),C(1),y("ngIf",!i.loading&&i.allItemsLength>0&&0===i.filteredItemsLength),C(1),y("ngIf",i.usePagination)}},dependencies:[rhe,Fn,dn,Be,os,Cr,Ur,cy,Yk,_n,yl,Gt,hd,nu,fd,Kk,Bo,ME,Kpe,she,uhe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-size:13px;overflow:hidden}.filter-row[_ngcontent-%COMP%]{flex:none}.table-container[_ngcontent-%COMP%]{contain:layout paint;flex-grow:1;max-width:100%;overflow-x:auto;overflow-y:auto;will-change:transform,scroll-position}.flex-layout[_nghost-%COMP%]   .name[_ngcontent-%COMP%]{word-break:break-word;overflow-wrap:break-word}.flex-layout[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;padding-bottom:12px}body.dark-mode   .flex-layout[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #555}[role=table][_ngcontent-%COMP%]{display:table;width:100%}[role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{white-space:nowrap}[role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%]{background-color:#fff;position:sticky;top:0;z-index:1}body.dark-mode[_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%]{background-color:#303030}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]{contain:strict;display:table-row;height:43px}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:table-cell;padding:5px;vertical-align:middle}body.dark-mode[_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]{border-bottom:1px solid #555}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{padding-left:24px}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:last-child{padding-right:24px}[role=rowgroup][_ngcontent-%COMP%]{display:table-row-group}[role=rowgroup].header[_ngcontent-%COMP%]{display:table-header-group}.loading[_ngcontent-%COMP%], .no-runs[_ngcontent-%COMP%]{align-items:center;border:0;border-bottom:1px solid #ebebeb;display:flex;height:48px;padding:0 24px}body.dark-mode[_nghost-%COMP%]   .loading[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .loading[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   .no-runs[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .no-runs[_ngcontent-%COMP%]{border-bottom:1px solid #555}.loading[_ngcontent-%COMP%]{justify-content:center}.select-all[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding-bottom:12px;padding-top:12px}.select-all-content[_ngcontent-%COMP%], .select-all-content[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:400;line-height:1.6;text-align:left}.select-all-content[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:500;padding:0 4px}.filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;align-items:center;height:48px;padding:0 16px 0 21px}body.dark-mode[_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #555}.filter-row[_ngcontent-%COMP%]   tb-filter-input[_ngcontent-%COMP%]{flex-grow:1}.tb-column-checkbox[_ngcontent-%COMP%], .tb-column-run_color[_ngcontent-%COMP%]{width:20px}.tb-column-run_color[_ngcontent-%COMP%]{text-align:center}.run-color-swatch[_ngcontent-%COMP%]{border-radius:100%;border:1px solid #ebebeb;height:20px;width:20px;outline:none}.run-color-swatch.no-color[_ngcontent-%COMP%]{border-color:#c6cad1;border-width:2px}.range-input-container[_ngcontent-%COMP%]{height:auto}[_nghost-%COMP%]     mat-paginator mat-form-field{margin:0}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label{display:flex;height:100%;align-items:center}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label .mat-checkbox-inner-container{margin-left:0}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label .mat-checkbox-label{overflow:hidden;text-overflow:ellipsis}body.dark-mode[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{background-color:#303030}"],changeDetection:0}),n})(),xJe=J(WM,n=>n.state===Oe.LOADING);function fhe(n,t){switch(t.type){case id.EXPERIMENT_NAME:return[n.experimentAlias,n.run.name,n.run.id];case id.RUN_NAME:return[n.run.name,n.experimentAlias,n.run.id];case id.HPARAM:return[n.hparams.get(t.name),n.run.name,n.experimentAlias,n.run.id];case id.METRIC:return[n.metrics.get(t.tag),n.run.name,n.experimentAlias,n.run.id];default:throw new Error(`Not yet implemented: ${t}`)}}function mhe(n,t){return void 0===t?n.includeUndefined:n.type===Ci.DISCRETE?n.filterValues.includes(t):n.type===Ci.INTERVAL&&n.filterLowerValue<=t&&t<=n.filterUpperValue}var ghe=(()=>{class n{constructor(e){this.store=e,this.loading$=null,this.hparamColumns$=Xt([]),this.metricColumns$=Xt([]),this.useFlexibleLayout=!1,this.usePagination=!1,this.columns=[va.RUN_NAME],this.showHparamsAndMetrics=!1,this.sortOption$=this.store.select(aH),this.paginationOption$=this.store.select(sH),this.regexFilter$=this.store.select(Qm),this.ngUnsubscribe=new ke}isExperimentNameVisible(){return this.columns.some(e=>e===va.EXPERIMENT_NAME)}ngOnInit(){let i=Lt(this.experimentIds.map(s=>this.getRunTableItemsForExperiment(s))).pipe(L(s=>[].concat(...s)));this.allUnsortedRunTableItems$=i.pipe(st(this.ngUnsubscribe),Ma(1)),this.allItemsLength$=this.allUnsortedRunTableItems$.pipe(L(s=>s.length));let r=this.getFilteredItems$(this.allUnsortedRunTableItems$).pipe(st(this.ngUnsubscribe),Ma(1));this.filteredItemsLength$=r.pipe(L(s=>s.length)),this.pageItems$=this.sortedAndSlicedItems$(r),this.numSelectedItems$=this.allUnsortedRunTableItems$.pipe(L(s=>s.reduce((a,l)=>a+Number(l.selected),0)));let o=this.experimentIds.map(s=>this.store.select(xJe,{experimentId:s}));if(this.loading$=Lt(o).pipe(L(s=>s.some(a=>a))),this.showHparamsAndMetrics){let s=this.store.select(Df.getExperimentsHparamsAndMetricsSpecs,{experimentIds:this.experimentIds});this.hparamColumns$=Lt([this.store.select(Df.getHparamFilterMap,this.experimentIds),s]).pipe(L(([a,{hparams:l}])=>l.map(({name:c,displayName:u})=>{let p=a.get(c);if(!p)throw new RangeError(`Invariant error: a filter for ${c} must exist when the hparam exists`);return{displayName:u,name:c,filter:p}}))),this.metricColumns$=Lt([this.store.select(Df.getMetricFilterMap,this.experimentIds),s]).pipe(L(([a,{metrics:l}])=>l.map(({tag:c,displayName:u})=>{let d=a.get(c);if(!d)throw new RangeError(`Invariant error: a filter for ${c} must exist when the metric exists`);return{displayName:u,tag:c,filter:d}})))}this.columns.includes(va.CHECKBOX)&&this.store.select(Ra).pipe(st(this.ngUnsubscribe),yi((a,l)=>Ps(a,l)),ui(()=>i.pipe(Ye(a=>a.length>500),Qt(1)))).subscribe(()=>{this.store.dispatch(vv({localizedMessage:"The number of runs exceeds 500. New runs are unselected for performance reasons."}))}),this.store.dispatch(dI({experimentIds:this.experimentIds}))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}getFilteredItems$(e){return Lt([e,this.store.select(Qm)]).pipe(L(([i,r])=>{if(!r)return i;let o=this.columns.includes(va.EXPERIMENT_NAME);return i.filter(s=>JI({runName:s.run.name,experimentAlias:s.experimentAlias},r,o))}),ui(i=>this.showHparamsAndMetrics?Lt(this.store.select(Df.getHparamFilterMap,this.experimentIds),this.store.select(Df.getMetricFilterMap,this.experimentIds)).pipe(L(([r,o])=>i.filter(({hparams:s,metrics:a})=>[...r.entries()].every(([c,u])=>mhe(u,s.get(c)))&&[...o.entries()].every(([c,u])=>mhe(u,a.get(c)))))):Xt(i)))}sortedAndSlicedItems$(e){let i=Lt([e,this.store.select(aH)]).pipe(L(([o,s])=>function(n,t){let e=t.key,i=[...n];return null===e||t.direction===ic.UNSET||i.sort((r,o)=>{let s=fhe(r,e),a=fhe(o,e);if(s.length!==a.length)throw new Error(`Invariant error: a given sort should result in same number of items: ${t}`);for(let l=0;l<s.length;l++){let c=s[l],u=a[l];if(c!==u){if(void 0===c||void 0===u)return void 0===u?-1:1;if(typeof c!=typeof u)throw new Error(`Cannot compare values of different types: ${typeof c} vs. ${typeof u}`);return c<u==(t.direction===ic.ASC)?-1:1}}return 0}),i}(o,s)));return Lt([i,this.store.select(sH)]).pipe(L(([o,s])=>{if(!this.usePagination)return o.slice();let{pageSize:a,pageIndex:l}=s;return o.slice(l*a,(l+1)*a)}),zn([]))}getRunTableItemsForExperiment(e){return Lt([this.store.select(rd,{experimentId:e}),this.store.select(vI,{experimentId:e}),this.store.select(oo),this.store.select(nc),this.store.select(Yu)]).pipe(L(([i,r,o,s,a])=>i.map(l=>{let c=new Map;(l.hparams||[]).forEach(d=>{c.set(d.name,d.value)});let u=new Map;return(l.metrics||[]).forEach(d=>{u.set(d.tag,d.value)}),{run:l,experimentName:r?.name||"",experimentAlias:a[e],selected:Boolean(o&&o.get(l.id)),runColor:s[l.id],hparams:c,metrics:u}})))}onRunSelectionToggle(e){this.store.dispatch(oI({runId:e.run.id}))}onRunSelectionDblClick(e){this.store.dispatch(sI({runId:e.run.id}))}onPageSelectionToggle(e){let{items:i}=e,r=i.map(({run:o})=>o.id);this.store.dispatch(aI({runIds:r}))}onPaginationChange(e){if(!this.usePagination)throw new Error("Pagination events cannot be dispatched when pagination is disabled");let{pageIndex:i,pageSize:r}=e;this.store.dispatch(lI({pageIndex:i,pageSize:r}))}onSortChange(e){this.store.dispatch(cI(e))}onRegexFilterChange(e){this.store.dispatch(NM({regexString:e}))}onRunColorChange({runId:e,newColor:i}){this.store.dispatch(uI({runId:e,newColor:i}))}onHparamDiscreteFilterChanged(e){let{hparamName:i,filterValues:r,includeUndefined:o}=e;this.store.dispatch(Gm.hparamsDiscreteHparamFilterChanged({experimentIds:this.experimentIds,hparamName:i,filterValues:r,includeUndefined:o}))}onHparamIntervalFilterChanged(e){let{name:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=e;this.store.dispatch(Gm.hparamsIntervalHparamFilterChanged({experimentIds:this.experimentIds,hparamName:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}))}onMetricFilterChanged(e){let{name:i,includeUndefined:r,filterLowerValue:o,filterUpperValue:s}=e;this.store.dispatch(Gm.hparamsMetricFilterChanged({experimentIds:this.experimentIds,metricTag:i,includeUndefined:r,filterLowerValue:o,filterUpperValue:s}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["runs-table"]],hostVars:2,hostBindings:function(e,i){2&e&&et("flex-layout",i.useFlexibleLayout)},inputs:{useFlexibleLayout:"useFlexibleLayout",usePagination:"usePagination",columns:"columns",experimentIds:"experimentIds",showHparamsAndMetrics:"showHparamsAndMetrics"},decls:11,vars:35,consts:[[3,"experimentIds","useFlexibleLayout","numSelectedItems","columns","hparamColumns","metricColumns","showExperimentName","pageItems","filteredItemsLength","allItemsLength","loading","paginationOption","regexFilter","sortOption","usePagination","onSelectionToggle","onSelectionDblClick","onPageSelectionToggle","onPaginationChange","onRegexFilterChange","onSortChange","onRunColorChange","onHparamIntervalFilterChanged","onHparamDiscreteFilterChanged","onMetricFilterChanged"]],template:function(e,i){1&e&&(_(0,"runs-table-component",0),P("onSelectionToggle",function(o){return i.onRunSelectionToggle(o)})("onSelectionDblClick",function(o){return i.onRunSelectionDblClick(o)})("onPageSelectionToggle",function(o){return i.onPageSelectionToggle(o)})("onPaginationChange",function(o){return i.onPaginationChange(o)})("onRegexFilterChange",function(o){return i.onRegexFilterChange(o)})("onSortChange",function(o){return i.onSortChange(o)})("onRunColorChange",function(o){return i.onRunColorChange(o)})("onHparamIntervalFilterChanged",function(o){return i.onHparamIntervalFilterChanged(o)})("onHparamDiscreteFilterChanged",function(o){return i.onHparamDiscreteFilterChanged(o)})("onMetricFilterChanged",function(o){return i.onMetricFilterChanged(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),B(10,"async"),v()),2&e&&y("experimentIds",i.experimentIds)("useFlexibleLayout",i.useFlexibleLayout)("numSelectedItems",U(1,15,i.numSelectedItems$))("columns",i.columns)("hparamColumns",U(2,17,i.hparamColumns$))("metricColumns",U(3,19,i.metricColumns$))("showExperimentName",i.isExperimentNameVisible())("pageItems",U(4,21,i.pageItems$))("filteredItemsLength",U(5,23,i.filteredItemsLength$))("allItemsLength",U(6,25,i.allItemsLength$))("loading",U(7,27,i.loading$))("paginationOption",U(8,29,i.paginationOption$))("regexFilter",U(9,31,i.regexFilter$))("sortOption",U(10,33,i.sortOption$))("usePagination",i.usePagination)},dependencies:[hhe,Ge],styles:[".flex-layout[_nghost-%COMP%] {\n        display: flex;\n      }\n\n      .flex-layout[_nghost-%COMP%]    > runs-table-component[_ngcontent-%COMP%] {\n        width: 100%;\n      }"],changeDetection:0}),n})(),_he=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["runs-selector-component"]],inputs:{experimentIds:"experimentIds",showHparamsAndMetrics:"showHparamsAndMetrics",columns:"columns"},decls:1,vars:4,consts:[[3,"useFlexibleLayout","columns","experimentIds","showHparamsAndMetrics"]],template:function(e,i){1&e&&O(0,"runs-table",0),2&e&&y("useFlexibleLayout",!0)("columns",i.columns)("experimentIds",i.experimentIds)("showHparamsAndMetrics",i.showHparamsAndMetrics)},dependencies:[ghe],styles:["runs-table[_ngcontent-%COMP%] {\n        height: 100%;\n      }"],changeDetection:0}),n})(),Ob=(()=>{class n{constructor(e){this.store=e,this.experimentIds$=this.store.select(Wo).pipe(L(i=>i??[])),this.columns$=this.store.select(Wo).pipe(L(i=>[va.CHECKBOX,va.RUN_NAME,i&&i.length>1?va.EXPERIMENT_NAME:null,va.RUN_COLOR].filter(r=>null!==r)))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["runs-selector"]],inputs:{showHparamsAndMetrics:"showHparamsAndMetrics"},decls:3,vars:7,consts:[[3,"experimentIds","columns","showHparamsAndMetrics"]],template:function(e,i){1&e&&(O(0,"runs-selector-component",0),B(1,"async"),B(2,"async")),2&e&&y("experimentIds",U(1,3,i.experimentIds$))("columns",U(2,5,i.columns$))("showHparamsAndMetrics",i.showHparamsAndMetrics)},dependencies:[_he,Ge],encapsulation:2,changeDetection:0}),n})(),vhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metrics-dashboard"]],decls:3,vars:0,consts:[["sidebar",""],["main",""]],template:function(e,i){1&e&&(_(0,"tb-dashboard-layout"),O(1,"runs-selector",0)(2,"metrics-main-view",1),v())},dependencies:[Roe,zpe,Ob],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})(),XG=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn,Pn]}),n})(),yhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),bhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),kb=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,bhe]}),n})(),tF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Ib,pn]}),n})(),nF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Wh]}),n})(),xhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ohe,Me,kb,tF,ag,Pn,Ls,Oh,Ha,pn,zh,Xpe,_d,Zpe,nhe,nF,E2]}),n})(),Fb=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,xhe]}),n})(),Nb=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),iF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn]}),n})(),Che=(()=>{class n{constructor(){this.onTimeSelectionChanged=new G,this.onTimeSelectionToggled=new G,this.axisDirection=pa.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=R({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&&(_(0,"card-fob-controller",0),P("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(){return i.onTimeSelectionToggled.emit()}),v()),2&e&&y("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("cardFobHelper",i.cardFobHelper)},dependencies:[Gk],encapsulation:2,changeDetection:0}),n})(),Mhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[iF,Me,qh,Nb]}),n})();Nx(Wk,[dn,Be,hg,ay,Che],[]);var Lb=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),rF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,kb]}),n})(),Bb=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn]}),n})(),whe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Mhe,Pn,pn,_d,rF,Lb,Bb]}),n})(),She=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Pn,pn,_d,Wh,rF,Lb,Bb]}),n})(),oF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn]}),n})(),Ehe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn,oF]}),n})(),The=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,ss,Pn,pn,Ha,zh]}),n})(),Dhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,ss,The,qh]}),n})(),Ahe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Pn,Oh,Ha,lc,SI]}),n})(),Ihe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[iF,Me,Ahe,Ehe,kb,Nb,Dhe,Pn,pn,zh,_d,qh,Lb,Bb]}),n})(),Phe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,She,Ihe,whe,Nb]}),n})(),Rhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,lc]}),n})(),sF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Rhe,Pn,gR,Ls,pn,lc,Wh,cv,nF]}),n})(),Ohe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,oF,Ls,J2]}),n})(),khe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Phe,Me,tF,Ib,Pn,gR,pn,Ha,_d,sF,Ohe,Zc]}),n})(),Fhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,yhe,XG,khe,pn,sF,Fb]}),n})();function EJe(){return[{actionCreator:ry,alertFromAction:n=>{let{wasPinned:t,canCreateNewPins:e}=n;return t||e?null:{localizedMessage:"Max pin limit exceeded. Remove existing pins before adding more. See https://github.com/tensorflow/tensorboard/issues/4242"}}}]}function TJe(){return J(op,n=>({scalarSmoothing:n}))}function DJe(){return J(hv,n=>({ignoreOutliers:n}))}function AJe(){return J(pv,n=>({tooltipSort:String(n)}))}function IJe(){return J(HI,n=>({timeSeriesSettingsPaneOpened:n}))}function PJe(){return J(dv,n=>({timeSeriesCardMinWidth:n}))}function RJe(){return J(fv,n=>({stepSelectorEnabled:n}))}function OJe(){return J(mv,n=>({rangeSelectionEnabled:n}))}function kJe(){return J(Ym,n=>({linkedTimeEnabled:n}))}var Nhe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:MU,useFactory:Aoe,deps:[wU]},{provide:wU,useValue:II}],imports:[Me,J_,ec,Bs.forPlugin(BM,vhe),SI,Fhe,wr.forFeature(AI,Eoe,MU),ro.forFeature([Doe]),Ju.registerAlertActions(EJe),Sr.defineGlobalSetting(TJe),Sr.defineGlobalSetting(DJe),Sr.defineGlobalSetting(AJe),Sr.defineGlobalSetting(IJe),Sr.defineGlobalSetting(PJe),Sr.defineGlobalSetting(RJe),Sr.defineGlobalSetting(OJe),Sr.defineGlobalSetting(kJe)]}),n})();function Lhe(n){return n.startsWith("count@")}function aF(n){return n.startsWith("nPMI@")||n.startsWith("nPMI_diff@")}function Vb(n){return n.startsWith("nPMI@")}function Ss(n){return n.split("@",2)[1]}function q$e(n){let e,i,t=n.length;for(;t;)i=Math.floor(Math.random()*t--),e=n[t],n[t]=n[i],n[i]=e;return n}function Y$e(n){return[...new Array(n)].map((t,e)=>e)}function vF(n,t){return`${t}/${n}`}oN($fe(),1);var yF=(()=>{class n{constructor(e){this.http=e,this.httpPathPrefix="data/plugin/npmi"}fetchData(e){return lr(this.fetchAnnotations(e),this.fetchMetrics(e),this.fetchValues(e),this.fetchEmbeddings(e)).pipe(L(([i,r,o,s])=>{let c,a={},l={},u=0;for(let d of Object.keys(i))for(let p in i[d]){let h=i[d][p];Object.keys(s).length&&!l[h]&&s[d][p]&&s[d][p].some(x=>0!==x)&&(l[h]={vector:s[d][p],index:u,name:h},u+=1);let f=new Map;for(let x in r[d]){let g=r[d][x],b=Ss(g),D=f.get(b);D||(D={nPMIValue:null,countValue:null,annotation:h,metric:b,run:d},f.set(b,D)),Lhe(g)?D.countValue=o[d][p][x]:aF(g)&&(D.nPMIValue=o[d][p][x])}a[h]=[...a[h]?a[h]:[],...f.values()]}return Object.keys(l).length&&(c=function(n){let t=Object.keys(n);return{points:n,pointKeys:t,shuffledDataIndices:q$e(Y$e(t.length)),hasUmapRun:!1}}(l)),{annotationData:a,metrics:r,embeddingDataSet:c}}),fo(i=>i instanceof np&&400<=i.status&&i.status<500?Xt({annotationData:{},metrics:{},embeddingDataSet:void 0}):wc(i)))}fetchAnnotations(e){let i=e.map(r=>this.http.get(`/experiment/${r}/${this.httpPathPrefix}/annotations`).pipe(L(s=>function(n,t){return Object.fromEntries(Object.entries(n).map(([e,i])=>[vF(e,t),i]))}(s,r))));return lr(i).pipe(L(r=>{let o={};for(let s of r)o={...o,...s};return o}))}fetchMetrics(e){let i=e.map(r=>this.http.get(`/experiment/${r}/${this.httpPathPrefix}/metrics`).pipe(L(s=>function(n,t){return Object.fromEntries(Object.entries(n).map(([e,i])=>[vF(e,t),i]))}(s,r))));return lr(i).pipe(L(r=>{let o={};for(let s of r)o={...o,...s};return o}))}fetchValues(e){let i=e.map(r=>this.http.get(`/experiment/${r}/${this.httpPathPrefix}/values`).pipe(L(s=>function(n,t){return Object.fromEntries(Object.entries(n).map(([e,i])=>[vF(e,t),i]))}(s,r))));return lr(i).pipe(L(r=>{let o={};for(let s of r)o={...o,...s};return o}))}fetchEmbeddings(e){let i=e.map(r=>this.http.get(`/experiment/${r}/${this.httpPathPrefix}/embeddings`).pipe(L(s=>function(n,t){return Object.fromEntries(Object.entries(n).map(([e,i])=>[vF(e,t),i]))}(s,r))));return lr(i).pipe(L(r=>{let o={};for(let s of r)o={...o,...s};return o}))}}return n.\u0275fac=function(e){return new(e||n)(j(ka))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),tme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[yF],imports:[Ku]}),n})(),bF=be("[NPMI] nPMI Loaded"),xF=be("[NPMI] nPMI Plugin Data Requested"),CF=be("[NPMI] nPMI Plugin Data Loaded",{_as:"props",_p:void 0}),MF=be("[NPMI] nPMI Plugin Data Request Failed"),wF=be("[NPMI] Adding/Removing Annotations to/from Selected",{_as:"props",_p:void 0}),RE=be("[NPMI] Annotations Set",{_as:"props",_p:void 0}),SF=be("[NPMI] Clearing the Annotation Selection"),EF=be("[NPMI] Adding/Removing Annotations to/from Flagged",{_as:"props",_p:void 0}),TF=be("[NPMI] Adding/Removing Annotations to/from Hidden",{_as:"props",_p:void 0}),jb=be("[NPMI] Annotations Regex Changed",{_as:"props",_p:void 0}),OE=be("[NPMI] Metrics Regex Changed",{_as:"props",_p:void 0}),DF=be("[NPMI] Metric Filter Added",{_as:"props",_p:void 0}),Gb=be("[NPMI] Metric Filter Removed",{_as:"props",_p:void 0}),Wb=be("[NPMI] Metric Filter Changed",{_as:"props",_p:void 0}),AF=be("[NPMI] Annotation Sort Changed",{_as:"props",_p:void 0}),IF=be("[NPMI] Similarity Sort Changed",{_as:"props",_p:void 0}),PF=be("[NPMI] Toggle PC Expanded"),RF=be("[NPMI] Toggle Annotations Expanded"),qb=be("[NPMI] Toggle Sidebar Expanded"),OF=be("[NPMI] Show Counts Toggled"),kF=be("[NPMI] Show Hidden Annotations Toggled"),FF=be("[NPMI] Embeddings View Toggled",{_as:"props",_p:void 0}),NF=be("[NPMI] Sidebar Width Changed",{_as:"props",_p:void 0}),LF=be("[NPMI] Embeddings Sidebar Width Changed",{_as:"props",_p:void 0}),Yb=be("[NPMI] Embeddings Sidebar Expanded Toggled"),nme=be("[NPMI] Change Embedding DataSet",{_as:"props",_p:void 0}),s0=(()=>(function(n){n[n.AND=0]="AND"}(s0||(s0={})),s0))(),mu=(()=>(function(n){n[n.METRIC=0]="METRIC",n[n.OPERATOR=1]="OPERATOR"}(mu||(mu={})),mu))(),kp=(()=>(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.EMBEDDINGS=1]="EMBEDDINGS"}(kp||(kp={})),kp))(),$r=(()=>(function(n){n[n.DESCENDING=0]="DESCENDING",n[n.ASCENDNG=1]="ASCENDNG",n[n.SIMILAR=2]="SIMILAR",n[n.DISSIMILAR=3]="DISSIMILAR"}($r||($r={})),$r))(),uo=Mr("npmi"),ime=J(uo,n=>n.pluginDataLoaded.state),Pf=J(uo,n=>n.annotationData),Rf=J(uo,n=>n.runToMetrics),BF=J(uo,n=>n.embeddingDataSet),vc=J(uo,n=>n.selectedAnnotations),VF=J(uo,n=>n.flaggedAnnotations),Xb=J(uo,n=>n.hiddenAnnotations),Qb=J(uo,n=>n.annotationsRegex),rme=J(uo,n=>n.metricsRegex),HF=J(uo,n=>n.metricArithmetic),Il=J(uo,n=>n.metricFilters),Kb=J(uo,n=>n.sort),ome=J(uo,n=>n.pcExpanded),UF=J(uo,n=>n.annotationsExpanded),zF=J(uo,n=>n.sidebarExpanded),jF=J(uo,n=>n.showCounts),Zb=J(uo,n=>n.showHiddenAnnotations),sme=J(uo,n=>n.viewActive),Of=J(uo,n=>n.sidebarWidth),ame=J(uo,n=>n.embeddingsMetric),lme=J(uo,n=>n.embeddingsSidebarWidth),GF=J(uo,n=>n.embeddingsSidebarExpanded),cme=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.loadData$=cr(()=>Jt(this.loadPluginData()).pipe(L(()=>({}))),{dispatch:!1})}loadPluginData(){return this.actions$.pipe(ii(bF),Wt(this.store.select(ime),this.store.select(Wo)),Ye(([,e,i])=>e!==Oe.LOADING&&null!==i),kt(()=>this.store.dispatch(xF())),xn(([,,e])=>this.dataSource.fetchData(e).pipe(kt(i=>{this.store.dispatch(CF(i))}),L(()=>{}),fo(()=>(this.store.dispatch(MF()),eo)))))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(yF))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),ume=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-inactive-view"]],decls:6,vars:0,consts:[[1,"container"],[1,"title"]],template:function(e,i){1&e&&(_(0,"div")(1,"div",0)(2,"div",1),A(3,"nPMI is inactive because no data is available."),v(),_(4,"div"),A(5," To use the nPMI, calculate nPMI values, and log them using the summary writer. "),v()()())},styles:[".container[_ngcontent-%COMP%] {\n  height: 100%;\n  font-family: Roboto;\n  font-size: 15px;\n  padding: 50px;\n}\n\n.title[_ngcontent-%COMP%] {\n  font-size: 135%;\n  font-weight: bold;\n  margin-bottom: 25px;\n}"]}),n})(),tet=vr({pluginDataLoaded:{state:Oe.NOT_LOADED,lastLoadedTimeInMs:null},annotationData:{},embeddingDataSet:void 0,runToMetrics:{},selectedAnnotations:[],flaggedAnnotations:[],hiddenAnnotations:[],annotationsRegex:"",metricsRegex:"",metricArithmetic:[],metricFilters:{},sort:{metric:"",order:$r.DESCENDING},pcExpanded:!0,annotationsExpanded:!0,sidebarExpanded:!0,showCounts:!0,showHiddenAnnotations:!1,sidebarWidth:300,viewActive:kp.DEFAULT,embeddingsMetric:"",embeddingsSidebarWidth:500,embeddingsSidebarExpanded:!0},Se(xF,n=>({...n,pluginDataLoaded:{...n.pluginDataLoaded,state:Oe.LOADING}})),Se(MF,n=>({...n,pluginDataLoaded:{...n.pluginDataLoaded,state:Oe.FAILED}})),Se(CF,(n,{annotationData:t,metrics:e,embeddingDataSet:i})=>{let r={};for(let o in e){r[o]=[];for(let s of e[o])aF(s)&&r[o].push(s)}return{...n,runToMetrics:r,annotationData:t,embeddingDataSet:i,pluginDataLoaded:{state:Oe.LOADED,lastLoadedTimeInMs:Date.now()}}}),Se(wF,(n,{annotations:t})=>{let e=new Set([...n.selectedAnnotations,...t]);if(e.size===n.selectedAnnotations.length)for(let i of t)e.delete(i);return{...n,selectedAnnotations:[...e]}}),Se(RE,(n,{annotations:t})=>({...n,selectedAnnotations:t})),Se(SF,n=>({...n,selectedAnnotations:[]})),Se(EF,(n,{annotations:t})=>{let e=new Set([...n.flaggedAnnotations,...t]);if(e.size===n.flaggedAnnotations.length)for(let i of t)e.delete(i);return{...n,flaggedAnnotations:[...e],selectedAnnotations:[]}}),Se(TF,(n,{annotations:t})=>{let e=new Set([...n.hiddenAnnotations,...t]);if(e.size===n.hiddenAnnotations.length)for(let i of t)e.delete(i);return{...n,hiddenAnnotations:[...e],selectedAnnotations:[]}}),Se(jb,(n,{regex:t})=>({...n,annotationsRegex:t})),Se(OE,(n,{regex:t})=>({...n,metricsRegex:t})),Se(DF,(n,{metric:t})=>{if(n.metricFilters[t])return n;let e=[];return 0!==n.metricArithmetic.length&&e.push({kind:mu.OPERATOR,operator:s0.AND}),e.push({kind:mu.METRIC,metric:t}),{...n,metricArithmetic:[...n.metricArithmetic,...e],metricFilters:{...n.metricFilters,[t]:{max:1,min:-1,includeNaN:!1}},sort:{metric:t,order:$r.DESCENDING}}}),Se(Gb,(n,{metric:t})=>{if(!n.metricFilters[t])return n;let e=0,i=0,r=2,{[t]:o,...s}=n.metricFilters;for(let a in n.metricArithmetic){let l=n.metricArithmetic[a];l.kind===mu.METRIC&&l.metric===t&&(e=parseInt(a))}return 0!==e&&(i=e-1,r=e+1),{...n,metricArithmetic:[...n.metricArithmetic.slice(0,i),...n.metricArithmetic.slice(r)],metricFilters:s}}),Se(Wb,(n,{metric:t,max:e,min:i,includeNaN:r})=>n.metricFilters[t]?{...n,metricFilters:{...n.metricFilters,[t]:{max:e,min:i,includeNaN:r}}}:n),Se(AF,(n,{metric:t})=>{let e={metric:t,order:$r.DESCENDING};return n.sort.metric===t&&n.sort.order===$r.DESCENDING&&(e.order=$r.ASCENDNG),{...n,sort:e}}),Se(IF,(n,{annotation:t})=>{let e={metric:t,order:$r.SIMILAR};return n.sort.metric===t&&n.sort.order===$r.SIMILAR&&(e.order=$r.DISSIMILAR),{...n,sort:e}}),Se(PF,n=>({...n,pcExpanded:!n.pcExpanded})),Se(RF,n=>({...n,annotationsExpanded:!n.annotationsExpanded})),Se(qb,n=>({...n,sidebarExpanded:!n.sidebarExpanded})),Se(OF,n=>({...n,showCounts:!n.showCounts})),Se(kF,n=>({...n,showHiddenAnnotations:!n.showHiddenAnnotations})),Se(FF,(n,{metric:t})=>{let e=kp.EMBEDDINGS,i=t;return t===n.embeddingsMetric&&(e=kp.DEFAULT,i=""),{...n,viewActive:e,embeddingsMetric:i}}),Se(NF,(n,{sidebarWidth:t})=>({...n,sidebarWidth:t})),Se(LF,(n,{sidebarWidth:t})=>({...n,embeddingsSidebarWidth:t})),Se(Yb,n=>({...n,embeddingsSidebarExpanded:!n.embeddingsSidebarExpanded})),Se(nme,(n,{dataSet:t})=>({...n,embeddingDataSet:t})));function dme(n,t){return tet(n,t)}function net(n,t){1&n&&O(0,"mat-icon",7)}function iet(n,t){if(1&n&&(_(0,"mat-option",8),A(1),v()),2&n){let e=t.$implicit;y("value",e),C(1),yt(e)}}var pme=(()=>{class n{constructor(){this.onRegexFilterValueChange=new G,this.onAddFilter=new G}onOptionSelected(e,i){this.onAddFilter.emit(e.option.value),i.value=""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metric-search-component"]],hostVars:2,hostBindings:function(e,i){2&e&&et("valid",i.isRegexFilterValid)},inputs:{completions:"completions",regexFilterValue:"regexFilterValue",isRegexFilterValid:"isRegexFilterValid"},outputs:{onRegexFilterValueChange:"onRegexFilterValueChange",onAddFilter:"onAddFilter"},decls:7,vars:4,consts:[["svgIcon","search_24px"],["matInput","","autocomplete","off","placeholder","Add Metric Filter",3,"value","matAutocomplete","input"],["matInput",""],["svgIcon","error_24px","class","error-icon","matTooltip","Invalid regex filter. The result may be stale.",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["filterMatches","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["svgIcon","error_24px","matTooltip","Invalid regex filter. The result may be stale.",1,"error-icon"],[3,"value"]],template:function(e,i){if(1&e){let r=Pe();O(0,"mat-icon",0),_(1,"input",1,2),P("input",function(s){return i.onRegexFilterValueChange.emit(s.target.value)}),v(),E(3,net,1,0,"mat-icon",3),_(4,"mat-autocomplete",4,5),P("optionSelected",function(s){oe(r);let a=$e(2);return se(i.onOptionSelected(s,a))}),E(6,iet,2,2,"mat-option",6),v()}if(2&e){let r=$e(5);C(1),y("value",i.regexFilterValue)("matAutocomplete",r),C(2),y("ngIf",!i.isRegexFilterValid),C(3),y("ngForOf",i.completions)}},dependencies:[dn,Be,Gt,Uh,qk,$g,Os],styles:["mat-icon[_ngcontent-%COMP%]{flex:none;margin-right:5px}[_nghost-%COMP%]{display:flex;padding:0 10px;position:relative;font-size:.9em}[_nghost-%COMP%]:not(.valid){color:#c62828}[_nghost-%COMP%]:not(.valid)   input[_ngcontent-%COMP%]{caret-color:currentColor}"],changeDetection:0}),n})(),hme=(()=>{class n{constructor(e){this.store=e,this.metricsRegex$=this.store.select(rme),this.activeRuns$=this.store.pipe(vt(oo)).pipe(L(i=>i?Array.from(i.entries()).filter(r=>r[1]).map(r=>r[0]):[])),this.metricsForActiveRuns$=Lt(this.activeRuns$,this.store.select(Rf)).pipe(L(([i,r])=>{let o=new Set;for(let s of i)if(r[s])for(let a of r[s])o.add(a);return[...o]})),this.isMetricsFilterValid$=this.metricsRegex$.pipe(L(i=>{try{return Boolean(new RegExp(i))}catch{return!1}})),this.metricFilterKeys$=this.store.pipe(vt(Il)).pipe(L(i=>Object.keys(i))),this.completions$=Lt(this.metricsForActiveRuns$,this.metricsRegex$,this.metricFilterKeys$).pipe(L(([i,r,o])=>{let s=i.filter(a=>!o.includes(a));try{let a=new RegExp(r,"i");return s.filter(l=>a.test(l)).sort()}catch{return[]}}))}onFilterChange(e){this.store.dispatch(OE({regex:e}))}onAddFilter(e){this.store.dispatch(DF({metric:e})),this.store.dispatch(OE({regex:""}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-metric-search"]],decls:4,vars:9,consts:[[3,"regexFilterValue","completions","isRegexFilterValid","onRegexFilterValueChange","onAddFilter"]],template:function(e,i){1&e&&(_(0,"metric-search-component",0),P("onRegexFilterValueChange",function(o){return i.onFilterChange(o)})("onAddFilter",function(o){return i.onAddFilter(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("regexFilterValue",U(1,3,i.metricsRegex$))("completions",U(2,5,i.completions$))("isRegexFilterValid",U(3,7,i.isMetricsFilterValid$))},dependencies:[pme,Ge],encapsulation:2,changeDetection:0}),n})(),set=["*"],fme=new pe("MatChipRemove"),aet=new pe("MatChipAvatar"),cet=new pe("MatChipTrailingIcon"),uet=oc(ko(qo(class{constructor(t){this._elementRef=t}}),"primary"),-1),Jb=(()=>{class n extends uet{constructor(e,i,r,o,s,a,l,c){super(e),this._ngZone=i,this._changeDetectorRef=s,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this.role="option",this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new ke,this._onBlur=new ke,this.selectionChange=new G,this.destroyed=new G,this.removed=new G,this._addHostClassName(),this._chipRippleTarget=a.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new Tv(this,i,this._chipRippleTarget,r),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=o||{},this._animationsDisabled="NoopAnimations"===l,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){let i=Rt(e);i!==this._selected&&(this._selected=i,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=Rt(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=Rt(e)}get removable(){return this._removable}set removable(e){this._removable=Rt(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){let e="mat-basic-chip",i=this._elementRef.nativeElement;i.hasAttribute(e)||i.tagName.toLowerCase()===e?i.classList.add(e):i.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled&&e.preventDefault()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case 46:case 8:this.remove(),e.preventDefault();break;case 32:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe(Qt(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(_t),M(oi),M(g2,8),M(nn),M(Ht),M(Pi,8),vo("tabindex"))},n.\u0275dir=He({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,i,r){if(1&e&&(Ei(r,aet,5),Ei(r,cet,5),Ei(r,fme,5)),2&e){let o;Ne(o=Le())&&(i.avatar=o.first),Ne(o=Le())&&(i.trailingIcon=o.first),Ne(o=Le())&&(i.removeIcon=o.first)}},hostAttrs:[1,"mat-chip","mat-focus-indicator"],hostVars:15,hostBindings:function(e,i){1&e&&P("click",function(o){return i._handleClick(o)})("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i.focus()})("blur",function(){return i._blur()}),2&e&&(ze("tabindex",i.disabled?null:i.tabIndex)("role",i.role)("disabled",i.disabled||null)("aria-disabled",i.disabled.toString())("aria-selected",i.ariaSelected),et("mat-chip-selected",i.selected)("mat-chip-with-avatar",i.avatar)("mat-chip-with-trailing-icon",i.trailingIcon||i.removeIcon)("mat-chip-disabled",i.disabled)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[tt]}),n})(),mme=(()=>{class n{constructor(e,i){this._parentChip=e,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}_handleClick(e){let i=this._parentChip;i.removable&&!i.disabled&&i.remove(),e.stopPropagation(),e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(M(Jb),M(Re))},n.\u0275dir=He({type:n,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,i){1&e&&P("click",function(o){return i._handleClick(o)})},features:[$t([{provide:fme,useExisting:n}])]}),n})(),det=new pe("mat-chips-default-options"),pet=Dv(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new ke}}),het=0,gme=(()=>{class n extends pet{constructor(e,i,r,o,s,a,l){super(a,o,s,l),this._elementRef=e,this._changeDetectorRef=i,this._dir=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new ke,this._uid="mat-chip-list-"+het++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(c,u)=>c===u,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new G,this.valueChange=new G,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get role(){return this._explicitRole?this._explicitRole:this.empty?null:"listbox"}set role(e){this._explicitRole=e}get multiple(){return this._multiple}set multiple(e){this._multiple=Rt(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(Fo.required)??!1}set required(e){this._required=Rt(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=Rt(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=Rt(e),this._syncChipsState()}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return Jt(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return Jt(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return Jt(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return Jt(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new Sh(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(st(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe(st(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(zn(null),st(this._destroyed)).subscribe(()=>{(this.disabled||!this.selectable)&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new Ah(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){let i=e.target;i&&i.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){let e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_setSelectionByValue(e,i=!0){if(this._clearSelection(),this.chips.forEach(r=>r.deselect()),Array.isArray(e))e.forEach(r=>this._selectValue(r,i)),this._sortValues();else{let r=this._selectValue(e,i);r&&i&&this._keyManager.setActiveItem(r)}}_selectValue(e,i=!0){let r=this.chips.find(o=>null!=o.value&&this._compareWith(o.value,e));return r&&(i?r.selectViaInteraction():r.select(),this._selectionModel.select(r)),r}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(i=>{i!==e&&i.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let i=null;i=Array.isArray(this.selected)?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.change.emit(new class{constructor(t,e){this.source=t,this.value=e}}(this,i)),this.valueChange.emit(i),this._onChange(i),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(i=>{!this._selectionModel.isSelected(i)&&i.selected&&i.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&this._keyManager.updateActiveItem(i),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{let i=e.chip,r=this.chips.toArray().indexOf(e.chip);this._isValidIndex(r)&&i._hasFocus&&(this._lastDestroyedChipIndex=r)})}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-chip"))return!0;i=i.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple,e.chipListSelectable=this._selectable})}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(nn),M($i,8),M(Lh,8),M(Vh,8),M(cd),M(Ns,10))},n.\u0275cmp=R({type:n,selectors:[["mat-chip-list"]],contentQueries:function(e,i,r){if(1&e&&Ei(r,Jb,5),2&e){let o;Ne(o=Le())&&(i.chips=o)}},hostAttrs:[1,"mat-chip-list"],hostVars:14,hostBindings:function(e,i){1&e&&P("focus",function(){return i.focus()})("blur",function(){return i._blur()})("keydown",function(o){return i._keydown(o)}),2&e&&(_s("id",i._uid),ze("tabindex",i.disabled?null:i._tabIndex)("aria-required",i.role?i.required:null)("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-multiselectable",i.multiple)("role",i.role)("aria-orientation",i.ariaOrientation),et("mat-chip-list-disabled",i.disabled)("mat-chip-list-invalid",i.errorState)("mat-chip-list-required",i.required))},inputs:{role:"role",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],errorStateMatcher:"errorStateMatcher",multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",ariaOrientation:["aria-orientation","ariaOrientation"],selectable:"selectable",tabIndex:"tabIndex"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[$t([{provide:kh,useExisting:n}]),tt],ngContentSelectors:set,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,i){1&e&&(xi(),_(0,"div",0),Vn(1),v())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-chip::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}.mat-standard-chip._mat-animation-noopable{transition:none !important;animation:none !important}.mat-standard-chip .mat-chip-remove{border:none;-webkit-appearance:none;-moz-appearance:none;padding:0;background:none}.mat-standard-chip .mat-chip-remove.mat-icon,.mat-standard-chip .mat-chip-remove .mat-icon{width:18px;height:18px;font-size:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip.mat-chip-selected{outline-width:3px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden;transform:translateZ(0)}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}'],encapsulation:2,changeDetection:0}),n})(),$b=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[cd,{provide:det,useValue:{separatorKeyCodes:[13]}}],imports:[ln]}),n})(),fet=function(n,t){return{"embedding-selected":n,"embedding-unselected":t}};function met(n,t){if(1&n){let e=Pe();_(0,"mat-icon",5),P("click",function(){oe(e);let r=S();return se(r.onSelect.emit(r.metric))}),v()}if(2&n){let e=S();y("ngClass",Qr(1,fet,e.embeddingsMetric===e.metric,e.embeddingsMetric!==e.metric))}}var _me=function(n){return{width:n}},vme=function(n){return{"value-invalid":n}},yme=(()=>{class n{constructor(){this.onRemove=new G,this.onSelect=new G,this.onFilterChange=new G,this.focusMin=!1,this.focusMax=!1,this.ngUnsubscribe=new ke}ngOnInit(){this.minFormControl=new Bh(this.filterValues.min,[Fo.required,Fo.min(-1),Fo.max(1),this.minValueValidator.bind(this)]),this.maxFormControl=new Bh(this.filterValues.max,[Fo.required,Fo.min(-1),Fo.max(1),this.maxValueValidator.bind(this)]),this.minFormControl.valueChanges.pipe(st(this.ngUnsubscribe)).subscribe(()=>{this.minFormControl.valid&&this.maxFormControl.valid&&this.onFilterChange.emit({min:parseFloat(this.minFormControl.value),max:parseFloat(this.maxFormControl.value)})}),this.maxFormControl.valueChanges.pipe(st(this.ngUnsubscribe)).subscribe(()=>{this.minFormControl.valid&&this.maxFormControl.valid&&this.onFilterChange.emit({min:parseFloat(this.minFormControl.value),max:parseFloat(this.maxFormControl.value)})})}ngOnChanges(e){this.minFormControl&&this.maxFormControl&&(this.minFormControl.setValue(this.filterValues.min,{emitEvent:!1}),this.maxFormControl.setValue(this.filterValues.max,{emitEvent:!1}))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}minValueValidator(e){return this.maxFormControl&&"NaN"!==e.value?isNaN(parseFloat(e.value))?{value:"the string you entered is neither NaN nor a number"}:parseFloat(e.value)>parseFloat(this.maxFormControl.value)?{value:"the number you entered is larger than the max value"}:null:null}maxValueValidator(e){return this.minFormControl?"NaN"===this.minFormControl.value&&"NaN"===e.value?null:isNaN(parseFloat(e.value))?{value:"the string you entered is neither NaN nor a number"}:e.value<this.minFormControl.value?{value:"the number you entered is smaller than the min value"}:null:null}getErrorDescription(e){if(e){let i=Object.keys(e)[0];return"required"===i?"you did not enter anything":"min"===i?"the number must be at least -1.0":"max"===i?"the number is bigger than 1.0":e[i]}return""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metric-arithmetic-element-component"]],inputs:{metric:"metric",filterValues:"filterValues",hasEmbeddingsData:"hasEmbeddingsData",embeddingsMetric:"embeddingsMetric"},outputs:{onRemove:"onRemove",onSelect:"onSelect",onFilterChange:"onFilterChange"},features:[Ft],decls:10,vars:22,consts:[[1,"filter-chip",3,"removed"],["class","embeddings-button","svgIcon","group_work_24px",3,"ngClass","click",4,"ngIf"],[1,"metric-arithmetic-element-range",3,"keydown"],["matInput","",1,"input-field",3,"value","matTooltip","matTooltipDisabled","ngStyle","ngClass","formControl","focus","focusout"],["matChipRemove","","svgIcon","cancel_24px"],["svgIcon","group_work_24px",1,"embeddings-button",3,"ngClass","click"]],template:function(e,i){1&e&&(_(0,"mat-chip",0),P("removed",function(){return i.onRemove.emit(i.metric)}),E(1,met,1,4,"mat-icon",1),A(2),_(3,"div",2),P("keydown",function(o){return o.stopPropagation()}),A(4," [ "),_(5,"input",3),P("focus",function(){return i.focusMin=!0})("focusout",function(){return i.focusMin=!1}),v(),A(6," ; "),_(7,"input",3),P("focus",function(){return i.focusMax=!0})("focusout",function(){return i.focusMax=!1}),v(),A(8," ] "),v(),O(9,"mat-icon",4),v()),2&e&&(C(1),y("ngIf",i.hasEmbeddingsData),C(1),je(" ",i.metric," "),C(3),y("value",i.filterValues.min)("matTooltip",i.getErrorDescription(i.minFormControl.errors))("matTooltipDisabled",!i.minFormControl.invalid)("ngStyle",On(14,_me,i.focusMin?"100px":i.minFormControl.value.toString().length+"ch"))("ngClass",On(16,vme,!i.minFormControl.valid))("formControl",i.minFormControl),C(2),y("value",i.filterValues.max)("matTooltip",i.getErrorDescription(i.maxFormControl.errors))("matTooltipDisabled",!i.maxFormControl.invalid)("ngStyle",On(18,_me,i.focusMax?"100px":i.maxFormControl.value.toString().length+"ch"))("ngClass",On(20,vme,!i.maxFormControl.valid))("formControl",i.maxFormControl))},dependencies:[Fn,Be,zu,Bv,V2,mw,Gt,Jb,mme,Xk],styles:[".filter-chip[_ngcontent-%COMP%]{align-items:center;display:flex;margin-left:5px}.metric-arithmetic-element-range[_ngcontent-%COMP%]{align-items:center;background-color:#fff;font-size:.8em;height:30px;justify-content:center;line-height:30px;padding:0 5px;margin-left:5px}.input-field[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0);border:none;font-family:monospace;font-size:1.1em;transition:width 1s}.input-field[_ngcontent-%COMP%]:focus{background-color:rgba(0,0,0,.12);border:none;outline:none}.value-invalid[_ngcontent-%COMP%]{color:#f44336}.embedding-selected[_ngcontent-%COMP%]{color:#f57c00;opacity:1}.embedding-unselected[_ngcontent-%COMP%]{opacity:.4}.embeddings-button[_ngcontent-%COMP%]{width:18px;height:18px;margin-right:8px;cursor:pointer}"],changeDetection:0}),n})(),bme=(()=>{class n{constructor(e){this.store=e,this.filterValues$=this.store.pipe(vt(Il)).pipe(L(i=>{let r=i[this.metric];return r?{min:r.includeNaN?"NaN":this.roundToThreeDecimalPoints(r.min),max:r.max<r.min?"NaN":this.roundToThreeDecimalPoints(r.max)}:{min:-1,max:1}})),this.hasEmbeddingsData$=this.store.pipe(vt(BF)).pipe(L(i=>void 0!==i)),this.embeddingsMetric$=this.store.pipe(vt(ame))}remove(e){this.store.dispatch(Gb({metric:e}))}select(e){this.store.dispatch(FF({metric:e}))}filterChange(e){let i=isNaN(e.min)?-1:e.min,r=isNaN(e.max)?-2:e.max,o=isNaN(e.min);this.store.dispatch(Wb({metric:this.metric,max:r,min:i,includeNaN:o}))}roundToThreeDecimalPoints(e){return Math.round(1e3*(e+Number.EPSILON))/1e3}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-metric-arithmetic-element"]],inputs:{metric:"metric"},decls:4,vars:10,consts:[[3,"metric","filterValues","hasEmbeddingsData","embeddingsMetric","onRemove","onSelect","onFilterChange"]],template:function(e,i){1&e&&(_(0,"metric-arithmetic-element-component",0),P("onRemove",function(o){return i.remove(o)})("onSelect",function(o){return i.select(o)})("onFilterChange",function(o){return i.filterChange(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("metric",i.metric)("filterValues",U(1,4,i.filterValues$))("hasEmbeddingsData",U(2,6,i.hasEmbeddingsData$))("embeddingsMetric",U(3,8,i.embeddingsMetric$))},dependencies:[yme,Ge],encapsulation:2,changeDetection:0}),n})(),xme=(()=>{class n{constructor(){this.Operator=s0}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-metric-arithmetic-operator"]],inputs:{operator:"operator"},decls:2,vars:1,template:function(e,i){1&e&&(_(0,"mat-chip"),A(1),v()),2&e&&(C(1),je(" ",i.operator===i.Operator.AND?"&":""," "))},dependencies:[Jb],encapsulation:2,changeDetection:0}),n})();function yet(n,t){1&n&&O(0,"npmi-metric-arithmetic-element",4),2&n&&y("metric",S().$implicit.metric)}function bet(n,t){1&n&&O(0,"npmi-metric-arithmetic-operator",5),2&n&&y("operator",S().$implicit.operator)}function xet(n,t){if(1&n&&(_(0,"div"),E(1,yet,1,1,"npmi-metric-arithmetic-element",2),E(2,bet,1,1,"npmi-metric-arithmetic-operator",3),v()),2&n){let e=t.$implicit,i=S();C(1),y("ngIf",e.kind===i.ArithmeticKind.METRIC),C(1),y("ngIf",e.kind===i.ArithmeticKind.OPERATOR)}}var Cme=(()=>{class n{constructor(){this.ArithmeticKind=mu}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["metric-arithmetic-component"]],inputs:{metricArithmetic:"metricArithmetic"},decls:2,vars:2,consts:[[3,"selectable"],[4,"ngFor","ngForOf"],[3,"metric",4,"ngIf"],[3,"operator",4,"ngIf"],[3,"metric"],[3,"operator"]],template:function(e,i){1&e&&(_(0,"mat-chip-list",0),E(1,xet,3,2,"div",1),v()),2&e&&(y("selectable",!1),C(1),y("ngForOf",i.metricArithmetic))},dependencies:[dn,Be,gme,bme,xme],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap}"],changeDetection:0}),n})(),Mme=(()=>{class n{constructor(e){this.store=e,this.metricArithmetic$=this.store.pipe(vt(HF))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-metric-arithmetic"]],decls:2,vars:3,consts:[[3,"metricArithmetic"]],template:function(e,i){1&e&&(O(0,"metric-arithmetic-component",0),B(1,"async")),2&e&&y("metricArithmetic",U(1,1,i.metricArithmetic$))},dependencies:[Cme,Ge],encapsulation:2,changeDetection:0}),n})();function wme(n,t,e){let i=[[t,...e]];if(!e.length||!n.length)return"data:text/csv;charset=utf-8,"+i.map(a=>a.join(",")).join("\n");let r=e.map(s=>Ss(s));for(let[s,a]of n){let l=a.filter(c=>c.run===t);if(l.length){let c=[s];for(let u of r){let d=l.find(p=>p.metric===u);c.push(void 0===d?"null":`${d.nPMIValue}`)}i.push(c)}}return"data:text/csv;charset=utf-8,"+i.map(s=>s.join(",")).join("\n")}var wet=function(n){return{"active-button":n}},Sme=(()=>{class n{downloadResults(){for(let e of this.runs){let i=wme(this.flaggedData,e,this.metrics),r=document.createElement("a");r.setAttribute("href",i),r.setAttribute("download",`report_${e}.csv`),r.click()}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["results-download-component"]],inputs:{numFlaggedAnnotations:"numFlaggedAnnotations",runs:"runs",flaggedData:"flaggedData",metrics:"metrics"},decls:4,vars:5,consts:[["mat-stroked-button","","title","Export CSV reports of all flagged annotations. Will generate one CSV per active run.",3,"disabled","ngClass","click"],[1,"button-contents"],["svgIcon","get_app_24px"]],template:function(e,i){1&e&&(_(0,"button",0),P("click",function(){return i.downloadResults()}),_(1,"span",1),O(2,"mat-icon",2),A(3),v()()),2&e&&(y("disabled",0===i.numFlaggedAnnotations)("ngClass",On(3,wet,i.numFlaggedAnnotations>0)),C(3),je(" Flagged Rows (",i.numFlaggedAnnotations,") "))},dependencies:[Fn,Gt,_n],styles:[".active-button[_ngcontent-%COMP%]{background-color:#ff9800;border:1px solid #ebebeb;color:#fff}.button-contents[_ngcontent-%COMP%]{align-items:center;display:flex;text-transform:uppercase}mat-icon[_ngcontent-%COMP%]{margin-right:6px}"],changeDetection:0}),n})(),Eme=(()=>{class n{constructor(e){this.store=e,this.flaggedAnnotations$=this.store.select(VF),this.numFlaggedAnnotations$=this.flaggedAnnotations$.pipe(L(i=>i.length)),this.activeRuns$=this.store.select(oo).pipe(L(i=>i?Array.from(i.entries()).filter(r=>r[1]).map(r=>r[0]):[])),this.flaggedData$=Lt([this.store.select(Pf),this.flaggedAnnotations$]).pipe(L(([i,r])=>{let o=new Set(r);return Object.entries(i).filter(a=>o.has(a[0]))})),this.metrics$=Lt([this.store.select(Rf),this.activeRuns$,this.store.select(Il)]).pipe(L(([i,r,o])=>{let s=Object.keys(o);for(let a of r)i[a]&&(s=s.concat(i[a].filter(l=>Vb(l))));return s=[...new Set(s)],s}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-results-download"]],decls:5,vars:12,consts:[[3,"numFlaggedAnnotations","runs","flaggedData","metrics"]],template:function(e,i){1&e&&(O(0,"results-download-component",0),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async")),2&e&&y("numFlaggedAnnotations",U(1,4,i.numFlaggedAnnotations$))("runs",U(2,6,i.activeRuns$))("flaggedData",U(3,8,i.flaggedData$))("metrics",U(4,10,i.metrics$))},dependencies:[Sme,Ge],encapsulation:2,changeDetection:0}),n})(),WF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-data-selection"]],decls:4,vars:0,consts:[[1,"data-selection"],[1,"metrics-selector"]],template:function(e,i){1&e&&(_(0,"div",0),O(1,"npmi-metric-search",1)(2,"npmi-results-download"),v(),O(3,"npmi-metric-arithmetic"))},dependencies:[hme,Mme,Eme],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background-color:#fff;border:1px solid #ebebeb;padding:10px 20px}.data-selection[_ngcontent-%COMP%]{display:flex;align-items:center}.metrics-selector[_ngcontent-%COMP%]{flex:1 1}"],changeDetection:0}),n})();function qF(n,t,e){if(e)return n;let i={...n};return t.forEach(r=>delete i[r]),i}var Aet=["chart"],Ime=(()=>{class n{constructor(){this.onRemove=new G,this.onUpdateFilter=new G,this.height=300,this.chartWidth=0,this.chartHeight=0,this.drawHeight=0,this.drawWidth=0,this.margin={top:20,right:10,bottom:20,left:10},this.drawMargin={top:0,right:0,bottom:20,left:20},this.brush=function(n){var a,t=TUe,e=EUe,i=DUe,r=!0,o=Gw("start","brush","end"),s=6;function l(x){var g=x.property("__brush",m).selectAll(".overlay").data([oS("overlay")]);g.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",mp.overlay).merge(g).each(function(){var D=bz(this).extent;bo(this).attr("x",D[0][0]).attr("y",D[0][1]).attr("width",D[1][0]-D[0][0]).attr("height",D[1][1]-D[0][1])}),x.selectAll(".selection").data([oS("selection")]).enter().append("rect").attr("class","selection").attr("cursor",mp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var b=x.selectAll(".handle").data(n.handles,function(D){return D.type});b.exit().remove(),b.enter().append("rect").attr("class",function(D){return"handle handle--"+D.type}).attr("cursor",function(D){return mp[D.type]}),x.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",p).filter(i).on("touchstart.brush",p).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var x=bo(this),g=bz(this).selection;g?(x.selectAll(".selection").style("display",null).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]),x.selectAll(".handle").style("display",null).attr("x",function(b){return"e"===b.type[b.type.length-1]?g[1][0]-s/2:g[0][0]-s/2}).attr("y",function(b){return"s"===b.type[0]?g[1][1]-s/2:g[0][1]-s/2}).attr("width",function(b){return"n"===b.type||"s"===b.type?g[1][0]-g[0][0]+s:s}).attr("height",function(b){return"e"===b.type||"w"===b.type?g[1][1]-g[0][1]+s:s})):x.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(x,g,b){var D=x.__brush.emitter;return!D||b&&D.clean?new d(x,g,b):D}function d(x,g,b){this.that=x,this.args=g,this.state=x.__brush,this.active=0,this.clean=b}function p(){if((!a||si.touches)&&e.apply(this,arguments)){var ue,he,F,q,de,Y,le,Ie,nt,Ue,Ae,x=this,g=si.target.__data__.type,b="selection"===(r&&si.metaKey?g="overlay":g)?ple:r&&si.altKey?My:Cy,D=n===$R?null:wUe[g],T=n===yz?null:SUe[g],k=bz(x),Z=k.extent,z=k.selection,fe=Z[0][0],w=Z[0][1],K=Z[1][0],ae=Z[1][1],ve=0,De=0,gt=D&&T&&r&&si.shiftKey,tn=si.touches?MUe(si.changedTouches[0].identifier):GU,pt=tn(x),wt=pt,Te=u(x,arguments,!0).beforestart();"overlay"===g?(z&&(nt=!0),k.selection=z=[[ue=n===$R?fe:pt[0],F=n===yz?w:pt[1]],[de=n===$R?K:ue,le=n===yz?ae:F]]):(ue=z[0][0],F=z[0][1],de=z[1][0],le=z[1][1]),he=ue,q=F,Y=de,Ie=le;var xt=bo(x).attr("pointer-events","none"),mt=xt.selectAll(".overlay").attr("cursor",mp[g]);if(si.touches)Te.moved=dt,Te.ended=Mt;else{var ce=bo(si.view).on("mousemove.brush",dt,!0).on("mouseup.brush",Mt,!0);r&&ce.on("keydown.brush",bt,!0).on("keyup.brush",hn,!0),qU(si.view)}_z(),Cg(x),c.call(x),Te.start()}function dt(){var on=tn(x);gt&&!Ue&&!Ae&&(Math.abs(on[0]-wt[0])>Math.abs(on[1]-wt[1])?Ae=!0:Ue=!0),wt=on,nt=!0,JR(),We()}function We(){var on;switch(ve=wt[0]-pt[0],De=wt[1]-pt[1],b){case vz:case ple:D&&(ve=Math.max(fe-ue,Math.min(K-de,ve)),he=ue+ve,Y=de+ve),T&&(De=Math.max(w-F,Math.min(ae-le,De)),q=F+De,Ie=le+De);break;case Cy:D<0?(ve=Math.max(fe-ue,Math.min(K-ue,ve)),he=ue+ve,Y=de):D>0&&(ve=Math.max(fe-de,Math.min(K-de,ve)),he=ue,Y=de+ve),T<0?(De=Math.max(w-F,Math.min(ae-F,De)),q=F+De,Ie=le):T>0&&(De=Math.max(w-le,Math.min(ae-le,De)),q=F,Ie=le+De);break;case My:D&&(he=Math.max(fe,Math.min(K,ue-ve*D)),Y=Math.max(fe,Math.min(K,de+ve*D))),T&&(q=Math.max(w,Math.min(ae,F-De*T)),Ie=Math.max(w,Math.min(ae,le+De*T)))}Y<he&&(D*=-1,on=ue,ue=de,de=on,on=he,he=Y,Y=on,g in fle&&mt.attr("cursor",mp[g=fle[g]])),Ie<q&&(T*=-1,on=F,F=le,le=on,on=q,q=Ie,Ie=on,g in mle&&mt.attr("cursor",mp[g=mle[g]])),k.selection&&(z=k.selection),Ue&&(he=z[0][0],Y=z[1][0]),Ae&&(q=z[0][1],Ie=z[1][1]),(z[0][0]!==he||z[0][1]!==q||z[1][0]!==Y||z[1][1]!==Ie)&&(k.selection=[[he,q],[Y,Ie]],c.call(x),Te.brush())}function Mt(){if(_z(),si.touches){if(si.touches.length)return;a&&clearTimeout(a),a=setTimeout(function(){a=null},500)}else YU(si.view,nt),ce.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);xt.attr("pointer-events","all"),mt.attr("cursor",mp.overlay),k.selection&&(z=k.selection),AUe(z)&&(k.selection=null,c.call(x)),Te.end()}function bt(){switch(si.keyCode){case 16:gt=D&&T;break;case 18:b===Cy&&(D&&(de=Y-ve*D,ue=he+ve*D),T&&(le=Ie-De*T,F=q+De*T),b=My,We());break;case 32:(b===Cy||b===My)&&(D<0?de=Y-ve:D>0&&(ue=he-ve),T<0?le=Ie-De:T>0&&(F=q-De),b=vz,mt.attr("cursor",mp.selection),We());break;default:return}JR()}function hn(){switch(si.keyCode){case 16:gt&&(Ue=Ae=gt=!1,We());break;case 18:b===My&&(D<0?de=Y:D>0&&(ue=he),T<0?le=Ie:T>0&&(F=q),b=Cy,We());break;case 32:b===vz&&(si.altKey?(D&&(de=Y-ve*D,ue=he+ve*D),T&&(le=Ie-De*T,F=q+De*T),b=My):(D<0?de=Y:D>0&&(ue=he),T<0?le=Ie:T>0&&(F=q),b=Cy),mt.attr("cursor",mp[g]),We());break;default:return}JR()}}function h(){u(this,arguments).moved()}function f(){u(this,arguments).ended()}function m(){var x=this.__brush||{selection:null};return x.extent=xz(t.apply(this,arguments)),x.dim=n,x}return l.move=function(x,g){x.selection?x.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var b=this,D=b.__brush,T=u(b,arguments),k=D.selection,Z=n.input("function"==typeof g?g.apply(this,arguments):g,D.extent),z=fp(k,Z);function fe(ue){D.selection=1===ue&&null===Z?null:z(ue),c.call(b),T.brush()}return null!==k&&null!==Z?fe:fe(1)}):x.each(function(){var b=this,D=arguments,T=b.__brush,k=n.input("function"==typeof g?g.apply(b,D):g,T.extent),Z=u(b,D).beforestart();Cg(b),T.selection=null===k?null:k,c.call(b),Z.start().brush().end()})},l.clear=function(x){l.move(x,null)},d.prototype={beforestart:function(){return 1==++this.active&&(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 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(x){!function(n,t,e,i){var r=si;n.sourceEvent=si,si=n;try{t.apply(e,i)}finally{si=r}}(new dle(l,x,n.output(this.state.selection)),o.apply,o,[x,this.that,this.args])}},l.extent=function(x){return arguments.length?(t="function"==typeof x?x:ZR(xz(x)),l):t},l.filter=function(x){return arguments.length?(e="function"==typeof x?x:ZR(!!x),l):e},l.touchable=function(x){return arguments.length?(i="function"==typeof x?x:ZR(!!x),l):i},l.handleSize=function(x){return arguments.length?(s=+x,l):s},l.keyModifiers=function(x){return arguments.length?(r=!!x,l):r},l.on=function(){var x=o.on.apply(o,arguments);return x===o?l:x},l}($R),this.maxBinSize=0,this.area=function(){var n=hO,t=null,e=fa(0),i=fO,r=fa(!0),o=null,s=pO,a=null;function l(u){var d,p,h,m,g,f=u.length,x=!1,b=new Array(f),D=new Array(f);for(null==o&&(a=s(g=sS())),d=0;d<=f;++d){if(!(d<f&&r(m=u[d],d,u))===x)if(x=!x)p=d,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=d-1;h>=p;--h)a.point(b[h],D[h]);a.lineEnd(),a.areaEnd()}x&&(b[d]=+n(m,d,u),D[d]=+e(m,d,u),a.point(t?+t(m,d,u):b[d],i?+i(m,d,u):D[d]))}if(g)return a=null,g+""||null}function c(){return xS().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(n="function"==typeof u?u:fa(+u),t=null,l):n},l.x0=function(u){return arguments.length?(n="function"==typeof u?u:fa(+u),l):n},l.x1=function(u){return arguments.length?(t=null==u?null:"function"==typeof u?u:fa(+u),l):t},l.y=function(u){return arguments.length?(e="function"==typeof u?u:fa(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:fa(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:fa(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(n).y(e)},l.lineY1=function(){return c().x(n).y(i)},l.lineX1=function(){return c().x(t).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:fa(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}().x0(function(e){return this.xScaleNum(-e.length)}.bind(this)).x1(function(e){return this.xScaleNum(e.length)}.bind(this)).y(function(e){return e.x0===-1/0?this.chartHeight-this.drawMargin.top:this.yScale((e.x1+e.x0)/2)}.bind(this)).curve(sj)}ngAfterViewInit(){this.updateDimensions(),this.svg=bo(this.chartContainer.nativeElement).select("svg"),this.mainContainer=this.svg.append("g").attr("transform",`translate(${this.margin.left}, ${this.margin.top})`),this.drawContainer=this.mainContainer.append("g").attr("transform",`translate(${this.drawMargin.left}, ${this.drawMargin.top})`),this.dotsGroup=this.drawContainer.append("g").attr("class","dotsGroup"),this.yAxisGroup=this.mainContainer.append("g").attr("class","axis axis--y"),this.xAxisGroup=this.mainContainer.append("g").attr("class","axis axis--x"),this.miscGroup=this.drawContainer.append("g"),this.xScale=wy().padding(.05),this.xAxis=jw(this.xScale),this.yScale=Qo().range([this.drawHeight,0]),this.yAxis=function(n){return BU(4,n)}(this.yScale),this.xScaleNum=Qo(),this.initializeBrush(),this.drawMisc(),this.redraw()}ngOnChanges(e){this.svg&&this.redraw()}redraw(){this.updateDimensions(),this.setMaxBinSize(),this.updateAxes(),this.draw()}updateDimensions(){this.chartWidth=this.width-this.margin.left-this.margin.right,this.drawWidth=this.chartWidth-this.drawMargin.left-this.drawMargin.right,this.chartHeight=this.height-this.margin.top-this.margin.bottom,this.drawHeight=this.chartHeight-this.drawMargin.top-this.drawMargin.bottom}setMaxBinSize(){Object.values(this.chartData.violinData).forEach(e=>{let i=e.map(o=>o.length),r=Math.max(...i);this.maxBinSize=Math.max(r,this.maxBinSize)})}updateAxes(){this.xScale.range([0,this.drawWidth]).domain(Object.keys(this.chartData.violinData)),this.yScale.domain([this.chartData.extremes.min,this.chartData.extremes.max]),this.xScaleNum.range([0,this.xScale.bandwidth()]).domain([-this.maxBinSize,this.maxBinSize])}initializeBrush(){this.brush.on("end",this.brushMoved.bind(this))}draw(){this.drawAxes(),this.drawPlot(),this.refreshMisc(),this.refreshBrush()}drawAxes(){this.yAxisGroup.attr("transform",`translate(${this.drawMargin.left},\n      ${this.drawMargin.top})`).call(this.yAxis),this.xAxisGroup.attr("transform",`translate(${this.drawMargin.left},\n      ${this.drawMargin.top+this.chartHeight})`).call(this.xAxis)}drawPlot(){let e=this.dotsGroup.selectAll(".violin-plot").data(Object.entries(this.chartData.violinData));e.enter().append("path").attr("class","violin-plot").style("stroke",function(i){return this.colorScale(i[0])}.bind(this)).style("fill",function(i){return`${this.colorScale(i[0])}33`}.bind(this)).attr("transform",function(i){return`translate(${this.xScale(i[0])}, 0)`}.bind(this)).datum(function(i){return i[1]}).attr("d",this.area),e.attr("transform",function(i){return`translate(${this.xScale(i[0])}, 0)`}.bind(this)).datum(function(i){return i[1]}).attr("d",this.area),e.exit().remove()}drawMisc(){this.zeroLine=this.miscGroup.append("line").style("stroke","black").attr("x1",0).attr("y1",this.yScale(0)).attr("x2",this.drawWidth).attr("y2",this.yScale(0)),this.nanText=this.miscGroup.append("text").style("fill","black").text("NaN").attr("font-size","10px").attr("text-anchor","end").attr("alignment-baseline","middle").attr("x",-5).attr("y",this.chartHeight-this.drawMargin.top),this.nanLine=this.miscGroup.append("line").style("stroke","grey").style("stroke-dasharray","3, 3").attr("x1",0).attr("y1",this.chartHeight-this.drawMargin.top).attr("x2",this.drawWidth).attr("y2",this.chartHeight-this.drawMargin.top)}refreshMisc(){this.zeroLine.attr("y1",this.yScale(0)).attr("x2",this.drawWidth).attr("y2",this.yScale(0)),this.nanText.attr("y",this.chartHeight-this.drawMargin.top),this.nanLine.attr("y1",this.drawHeight+this.drawMargin.top).attr("x2",this.drawWidth).attr("y2",this.drawHeight+this.drawMargin.top)}refreshBrush(){this.brush.extent([[0,0],[this.drawWidth,this.drawHeight+this.margin.top]]);let e=[0,this.drawHeight+this.margin.top];if(this.filter.max<this.filter.min)e[0]=this.filter.includeNaN?this.yScale(this.chartData.extremes.min):e[1];else{if(!this.filter.includeNaN){let r=Math.max(this.chartData.extremes.min,this.filter.min);e[1]=this.yScale(r)}let i=Math.min(this.chartData.extremes.max,this.filter.max);e[0]=this.yScale(i)}this.drawContainer.call(this.brush).call(this.brush.move,e)}brushMoved(){if(!si||!si.sourceEvent)return;let e=si.selection;if(e){let i=!1,r=-2,o=this.chartData.extremes.min;e[0]<=this.drawHeight+this.margin.top&&e[1]>=this.drawHeight&&(i=!0),e[0]<this.drawHeight&&(r=this.yScale.invert(e[0])),e[1]<this.drawHeight&&(o=this.yScale.invert(e[1])),this.onUpdateFilter.emit({max:r,min:o,includeNaN:i})}else this.onUpdateFilter.emit({max:1,min:-1,includeNaN:!0})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["violin-filter-component"]],viewQuery:function(e,i){if(1&e&&ot(Aet,7,Re),2&e){let r;Ne(r=Le())&&(i.chartContainer=r.first)}},inputs:{metricName:"metricName",filter:"filter",chartData:"chartData",width:"width",colorScale:"colorScale"},outputs:{onRemove:"onRemove",onUpdateFilter:"onUpdateFilter"},features:[Ft],decls:9,vars:1,consts:function(){let t;return t=$localize`:Label for a button that removes a metric filter.␟a6bfad58bb363d5c891d0a5474b1d77ef90a34da␟8454961797762907624:Remove Filter`,[[1,"chart-container"],["title","Shows the nPMI value distribution per run. Ranges of selected values can be manipulated by modifying the grey box.",1,"chart-head"],[1,"chart-heading"],["mat-icon-button","","aria-label",t,3,"click"],["svgIcon","clear_24px"],[1,"chart"],["chart",""],[1,"draw-area"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1)(2,"div",2),A(3),v(),_(4,"button",3),P("click",function(){return i.onRemove.emit()}),O(5,"mat-icon",4),v()(),_(6,"div",5,6),In(),O(8,"svg",7),v()()),2&e&&(C(3),yt(i.metricName))},dependencies:[_n,Gt],styles:[".chart-container[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;display:flex;flex-direction:column;overflow:hidden}.chart[_ngcontent-%COMP%]{height:300px;width:100%}.chart-head[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.chart-heading[_ngcontent-%COMP%]{font-size:13px;padding-left:10px;padding-top:10px}.draw-area[_ngcontent-%COMP%]{height:100%;width:100%}.stroked-line[_ngcontent-%COMP%]{stroke:rgba(0,0,0,.12);stroke-dasharray:3 3}"],changeDetection:0}),n})(),Pme=(()=>{class n{constructor(e){this.store=e,this.activeRuns$=this.store.pipe(vt(oo)).pipe(L(i=>i?Array.from(i.entries()).filter(r=>r[1]).map(r=>r[0]):[])),this.visibleAnnotations$=Lt([this.store.select(Pf),this.store.select(Xb),this.store.select(Zb)]).pipe(L(([i,r,o])=>qF(i,r,o))),this.chartWidth$=this.store.pipe(vt(Of)).pipe(L(i=>Math.max(150,i))),this.runColorScale$=this.store.select(nc).pipe(L(i=>r=>{if(!i.hasOwnProperty(r))throw new Error(`[Color scale] unknown runId: ${r}.`);return i[r]}))}ngOnInit(){this.chartData$=Lt([this.visibleAnnotations$,this.activeRuns$]).pipe(L(([e,i])=>function(n,t,e){let i={},r={},o=new Set(t),s=Ss(e),a={max:-1,min:1};Object.values(n).forEach(d=>{d.forEach(p=>{let h=p.run;if(o.has(h)&&p.metric===s)if(null===p.nPMIValue)r[h]?r[h].push(null):r[h]=[null];else{let f=p.nPMIValue;a.max=a.max<f?f:a.max,a.min=a.min>f?f:a.min,i[p.run]?i[h].push(f):i[h]=[f]}})});let l={},c=MR().domain([a.min,a.max]).value(d=>d),u=MR().domain([-1/0,1/0]).thresholds(0).value(d=>d);for(let d of o)if(l[d]=c(i[d]),r[d]){let p=u(r[d]);l[d].unshift(p[0])}return{violinData:l,extremes:a}}(e,i,this.metricName)))}removeMetric(){this.store.dispatch(Gb({metric:this.metricName}))}updateFilter(e){this.store.dispatch(Wb({metric:this.metricName,...e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-violin-filter"]],inputs:{metricName:"metricName",filter:"filter"},decls:4,vars:11,consts:[[3,"metricName","filter","chartData","width","colorScale","onRemove","onUpdateFilter"]],template:function(e,i){1&e&&(_(0,"violin-filter-component",0),P("onRemove",function(){return i.removeMetric()})("onUpdateFilter",function(o){return i.updateFilter(o)}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("metricName",i.metricName)("filter",i.filter)("chartData",U(1,5,i.chartData$))("width",U(2,7,i.chartWidth$))("colorScale",U(3,9,i.runColorScale$))},dependencies:[Ime,Ge],encapsulation:2,changeDetection:0}),n})();function Ret(n,t){if(1&n&&O(0,"npmi-violin-filter",8),2&n){let e=t.$implicit;y("metricName",e[0])("filter",e[1])}}function Oet(n,t){1&n&&(_(0,"div",9)(1,"span",10),A(2," You can add more filters at the top. "),v()())}var Rme=(()=>{class n{constructor(){this.toggleSidebarExpanded=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["violin-filters-component"]],inputs:{sidebarExpanded:"sidebarExpanded",metricFilters:"metricFilters"},outputs:{toggleSidebarExpanded:"toggleSidebarExpanded"},decls:9,vars:2,consts:function(){let t;return t=$localize`:Label for a button that expands/hides the sidebar.␟48c29903ce881ab61088f8d49d827203716aaed4␟4658602991970260215:Expand/Hide Sidebar`,[[1,"filters-toolbar"],[1,"filters-title"],[1,"side-toggle"],["mat-icon-button","","aria-label",t,3,"click"],["svgIcon","chevron_left_24px"],[1,"filters"],[3,"metricName","filter",4,"ngFor","ngForOf"],["class","filters-hint",4,"ngIf"],[3,"metricName","filter"],[1,"filters-hint"],[1,"filters-hint-text"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"h3",1),A(2,"Active Filters"),v(),_(3,"div",2)(4,"button",3),P("click",function(){return i.toggleSidebarExpanded.emit()}),O(5,"mat-icon",4),v()()(),_(6,"div",5),E(7,Ret,1,2,"npmi-violin-filter",6),v(),E(8,Oet,3,0,"div",7)),2&e&&(C(7),y("ngForOf",i.metricFilters),C(1),y("ngIf",0===i.metricFilters.length))},dependencies:[dn,Be,Gt,_n,Pme],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.filters-toolbar[_ngcontent-%COMP%]{align-items:center;border-bottom:1px solid #ebebeb;display:flex;height:42px;justify-content:space-between;padding:0 10px}.filters-title[_ngcontent-%COMP%]{display:inline;font-size:14px;font-weight:500}.side-toggle[_ngcontent-%COMP%]{align-items:center;background-color:#fff;border-radius:3px;border:1px solid #ebebeb;display:flex;height:30px;justify-content:center;width:30px}.filters[_ngcontent-%COMP%]{overflow-y:auto}.filters-hint[_ngcontent-%COMP%]{align-items:center;display:flex;height:42px;padding:0 16px}.filters-hint-text[_ngcontent-%COMP%]{color:rgba(0,0,0,.38)}"],changeDetection:0}),n})(),Ome=(()=>{class n{constructor(e){this.store=e,this.sidebarExpanded$=this.store.select(zF),this.metricFilters$=this.store.select(Il).pipe(L(i=>Object.entries(i)))}onToggleSidebarExpanded(){this.store.dispatch(qb())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-violin-filters"]],decls:3,vars:6,consts:[[3,"sidebarExpanded","metricFilters","toggleSidebarExpanded"]],template:function(e,i){1&e&&(_(0,"violin-filters-component",0),P("toggleSidebarExpanded",function(){return i.onToggleSidebarExpanded()}),B(1,"async"),B(2,"async"),v()),2&e&&y("sidebarExpanded",U(1,2,i.sidebarExpanded$))("metricFilters",U(2,4,i.metricFilters$))},dependencies:[Rme,Ge],encapsulation:2,changeDetection:0}),n})();function Vet(n,t,e){return n.length!=t.length?e:t.map((o,s)=>o-n[s]).map(o=>Math.pow(o,2)).reduce((o,s)=>o+s,0)}var Het=["input"],Uet=function(n){return{enterDuration:n}},zet=["*"],jet=new pe("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})}),Get=0,Wet={provide:No,useExisting:Jn(()=>_6),multi:!0},qet=oc(ko(qo(so(class{constructor(n){this._elementRef=n}})))),Yet=(()=>{class n extends qet{constructor(e,i,r,o,s,a,l){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this.defaults=s,this._onChange=c=>{},this._onTouched=()=>{},this._required=!1,this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new G,this.toggleChange=new G,this.tabIndex=parseInt(o)||0,this.color=this.defaultColor=s.color||"accent",this._noopAnimations="NoopAnimations"===a,this.id=this._uniqueId=`${l}${++Get}`}get required(){return this._required}set required(e){this._required=Rt(e)}get checked(){return this._checked}set checked(e){this._checked=Rt(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?this._focused=!0:e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}}return n.\u0275fac=function(e){nl()},n.\u0275dir=He({type:n,inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},features:[tt]}),n})(),_6=(()=>{class n extends Yet{constructor(e,i,r,o,s,a){super(e,i,r,o,s,a,"mat-slide-toggle-")}_createChangeEvent(e){return new class{constructor(t,e){this.source=t,this.checked=e}}(this,e)}_onChangeEvent(e){e.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(e){e.stopPropagation()}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return n.\u0275fac=function(e){return new(e||n)(M(Re),M(Fr),M(nn),vo("tabindex"),M(jet),M(Pi,8))},n.\u0275cmp=R({type:n,selectors:[["mat-slide-toggle"]],viewQuery:function(e,i){if(1&e&&ot(Het,5),2&e){let r;Ne(r=Le())&&(i._inputElement=r.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:13,hostBindings:function(e,i){2&e&&(_s("id",i.id),ze("tabindex",null)("aria-label",null)("aria-labelledby",null)("name",null),et("mat-checked",i.checked)("mat-disabled",i.disabled)("mat-slide-toggle-label-before","before"==i.labelPosition)("_mat-animation-noopable",i._noopAnimations))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matSlideToggle"],features:[$t([Wet]),tt],ngContentSelectors:zet,decls:14,vars:20,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(e,i){if(1&e&&(xi(),_(0,"label",0,1)(2,"span",2)(3,"input",3,4),P("change",function(o){return i._onChangeEvent(o)})("click",function(o){return i._onInputClick(o)}),v(),_(5,"span",5),O(6,"span",6),_(7,"span",7),O(8,"span",8),v()()(),_(9,"span",9,10),P("cdkObserveContent",function(){return i._onLabelTextChange()}),_(11,"span",11),A(12,"\xa0"),v(),Vn(13),v()()),2&e){let r=$e(1),o=$e(10);ze("for",i.inputId),C(2),et("mat-slide-toggle-bar-no-side-margin",!o.textContent||!o.textContent.trim()),C(1),y("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex)("checked",i.checked)("disabled",i.disabled),ze("name",i.name)("aria-checked",i.checked)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby),C(4),y("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",On(18,Uet,i._noopAnimations?0:150))}},dependencies:[Yo,wh],styles:['.mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}'],encapsulation:2,changeDetection:0}),n})(),Xet={provide:Lo,useExisting:Jn(()=>Qet),multi:!0},Qet=(()=>{class n extends gw{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=pi(n)))(i||n)}}(),n.\u0275dir=He({type:n,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[$t([Xet]),tt]}),n})(),Fme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Nme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Fme,_l,ln,od,Fme,ln]}),n})();function Zet(n,t){1&n&&O(0,"mat-icon",3)}var Lme=(()=>{class n{constructor(){this.onRegexFilterValueChange=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-search-component"]],hostVars:2,hostBindings:function(e,i){2&e&&et("valid",i.isRegexFilterValid)},inputs:{regexFilterValue:"regexFilterValue",isRegexFilterValid:"isRegexFilterValid"},outputs:{onRegexFilterValueChange:"onRegexFilterValueChange"},decls:3,vars:2,consts:[["svgIcon","search_24px"],["autocomplete","off","placeholder","Filter Annotations",3,"value","input"],["svgIcon","error_24px","class","error-icon","matTooltip","Invalid regex filter. The result may be stale.",4,"ngIf"],["svgIcon","error_24px","matTooltip","Invalid regex filter. The result may be stale.",1,"error-icon"]],template:function(e,i){1&e&&(O(0,"mat-icon",0),_(1,"input",1),P("input",function(o){return i.onRegexFilterValueChange.emit(o.target.value)}),v(),E(2,Zet,1,0,"mat-icon",2)),2&e&&(C(1),y("value",i.regexFilterValue),C(1),y("ngIf",!i.isRegexFilterValid))},dependencies:[Be,Gt],styles:["[_nghost-%COMP%]{display:flex;position:relative}[_nghost-%COMP%]:not(.valid){color:#c62828}[_nghost-%COMP%]:not(.valid)   input[_ngcontent-%COMP%]{caret-color:currentColor}[_nghost-%COMP%]:not(.valid)   .error-icon[_ngcontent-%COMP%]{color:#c62828;position:absolute;right:0}"],changeDetection:0}),n})(),Bme=(()=>{class n{constructor(e){this.store=e,this.annotationsFilter$=this.store.select(Qb),this.isAnnotationsFilterValid$=this.annotationsFilter$.pipe(L(i=>{try{return new RegExp(i),!0}catch{return!1}}))}filterChange(e){this.store.dispatch(jb({regex:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-search"]],decls:3,vars:6,consts:[[3,"regexFilterValue","isRegexFilterValid","onRegexFilterValueChange"]],template:function(e,i){1&e&&(_(0,"npmi-annotations-search-component",0),P("onRegexFilterValueChange",function(o){return i.filterChange(o)}),B(1,"async"),B(2,"async"),v()),2&e&&y("regexFilterValue",U(1,2,i.annotationsFilter$))("isRegexFilterValid",U(2,4,i.isAnnotationsFilterValid$))},dependencies:[Lme,Ge],encapsulation:2,changeDetection:0}),n})();function ett(n,t){if(1&n){let e=Pe();sn(0),_(1,"button",5),P("click",function(){oe(e);let r=S();return se(r.onFlagAnnotations.emit(r.selectedAnnotations))}),O(2,"mat-icon",6),v(),_(3,"button",7),P("click",function(){oe(e);let r=S();return se(r.onHideAnnotations.emit(r.selectedAnnotations))}),O(4,"mat-icon",8),v(),an()}if(2&n){let e=S();C(1),y("disabled",0===e.selectedAnnotations.length),C(2),y("disabled",0===e.selectedAnnotations.length)}}function ttt(n,t){if(1&n){let e=Pe();sn(0),_(1,"mat-slide-toggle",9),P("change",function(){return oe(e),se(S().onToggleShowCounts.emit())}),A(2," Sample Count "),v(),_(3,"mat-slide-toggle",10),P("change",function(){return oe(e),se(S().onToggleShowHidden.emit())}),A(4," Show Hidden "),v(),O(5,"npmi-annotations-search"),an()}if(2&n){let e=S();C(1),y("checked",e.showCounts),C(2),y("checked",e.showHidden)}}var Vme=(()=>{class n{constructor(){this.onFlagAnnotations=new G,this.onHideAnnotations=new G,this.onToggleExpanded=new G,this.onToggleShowCounts=new G,this.onToggleShowHidden=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list-toolbar-component"]],inputs:{numAnnotations:"numAnnotations",expanded:"expanded",selectedAnnotations:"selectedAnnotations",annotationsExpanded:"annotationsExpanded",showCounts:"showCounts",showHidden:"showHidden"},outputs:{onFlagAnnotations:"onFlagAnnotations",onHideAnnotations:"onHideAnnotations",onToggleExpanded:"onToggleExpanded",onToggleShowCounts:"onToggleShowCounts",onToggleShowHidden:"onToggleShowHidden"},decls:7,vars:4,consts:function(){let t,e,i;return t=$localize`:Label for a button that hides/shows the annotations list.␟b3603ba33e5308dd8c5e805e508b2f7233df89d4␟7336374413056342492:Hides/Shows the Annotations List`,e=$localize`:Label for a button that flags selected annotations.␟5692ad8831038a90c5863a1e9adf9748cac3cad8␟2244099891313336595:Flag Selected Annotations`,i=$localize`:Label for a button that hides selected annotations.␟0342cdb3358fa8e3fa27220a8258a7287430b70f␟5462832391092087485:Hide Selected Annotations`,[[1,"annotations-title-container"],[1,"annotations-title"],[4,"ngIf"],["mat-icon-button","","aria-label",t,1,"expand-button",3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",e,"title","Flagging annotations adds them to your investigation results, which can later be exported.",3,"disabled","click"],["svgIcon","flag_24px"],["mat-icon-button","","aria-label",i,"title","Removing non-critical annotations unclutters the view. Removed annotations are removed from all visualizations.",3,"disabled","click"],["svgIcon","visibility_off_24px"],["title","Hides and shows the sample count where applicable (how many samples belong to a category).",1,"show-toggle",3,"checked","change"],["title","Hides and shows hidden annotations in all visualizations.",1,"show-toggle",3,"checked","change"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"h3",1),A(2),v(),E(3,ett,5,2,"ng-container",2),v(),E(4,ttt,6,2,"ng-container",2),_(5,"button",3),P("click",function(){return i.onToggleExpanded.emit()}),O(6,"mat-icon",4),v()),2&e&&(C(2),je("Annotations (",i.numAnnotations,")"),C(1),y("ngIf",i.expanded),C(1),y("ngIf",i.expanded),C(2),y("svgIcon",i.expanded?"expand_less_24px":"expand_more_24px"))},dependencies:[Be,Gt,_n,_6,Bme],styles:["[_nghost-%COMP%]{align-items:center;box-sizing:border-box;display:flex;flex-direction:row;padding:0 16px;width:100%}.annotations-title[_ngcontent-%COMP%]{display:inline;font-size:.9em;font-weight:500;padding-right:10px}.annotations-title-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:nowrap;flex:1 1;height:42px}.show-toggle[_ngcontent-%COMP%]{font-size:.9em;margin-right:.8em}"],changeDetection:0}),n})(),Hme=(()=>{class n{constructor(e){this.store=e,this.selectedAnnotations$=this.store.select(vc),this.annotationsExpanded$=this.store.select(UF),this.showCounts$=this.store.select(jF),this.showHidden$=this.store.select(Zb),this.annotationsFilter$=this.store.select(Qb),this.isAnnotationsFilterValid$=this.annotationsFilter$.pipe(L(i=>{try{return Boolean(new RegExp(i))}catch{return!1}}))}filterChange(e){this.store.dispatch(jb({regex:e}))}flagAnnotations(e){this.store.dispatch(EF({annotations:e}))}hideAnnotations(e){this.store.dispatch(TF({annotations:e}))}toggleExpanded(){this.store.dispatch(RF())}toggleShowCounts(){this.store.dispatch(OF())}toggleShowHidden(){this.store.dispatch(kF())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list-toolbar"]],inputs:{numAnnotations:"numAnnotations",expanded:"expanded"},decls:5,vars:14,consts:[[3,"numAnnotations","expanded","selectedAnnotations","annotationsExpanded","showCounts","showHidden","onFlagAnnotations","onHideAnnotations","onToggleExpanded","onToggleShowCounts","onToggleShowHidden"]],template:function(e,i){1&e&&(_(0,"npmi-annotations-list-toolbar-component",0),P("onFlagAnnotations",function(o){return i.flagAnnotations(o)})("onHideAnnotations",function(o){return i.hideAnnotations(o)})("onToggleExpanded",function(){return i.toggleExpanded()})("onToggleShowCounts",function(){return i.toggleShowCounts()})("onToggleShowHidden",function(){return i.toggleShowHidden()}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),v()),2&e&&y("numAnnotations",i.numAnnotations)("expanded",i.expanded)("selectedAnnotations",U(1,6,i.selectedAnnotations$))("annotationsExpanded",U(2,8,i.annotationsExpanded$))("showCounts",U(3,10,i.showCounts$))("showHidden",U(4,12,i.showHidden$))},dependencies:[Vme,Ge],encapsulation:2,changeDetection:0}),n})();function rtt(n,t){if(1&n&&O(0,"mat-icon",8),2&n){let e=S(2);y("svgIcon",e.sort.order===e.SortOrder.DESCENDING?"arrow_downward_24px":"arrow_upward_24px")("ngClass",e.sort.order===e.SortOrder.DESCENDING?"down-icon":"up-icon")}}function ott(n,t){if(1&n){let e=Pe();_(0,"div",4)(1,"div",5)(2,"div",6),P("click",function(){let o=oe(e).$implicit;return se(S().onChangeSort.emit(o))}),A(3),E(4,rtt,1,2,"mat-icon",7),v()()()}if(2&n){let e=t.$implicit,i=S();C(3),je(" ",i.stripMetric(e)," "),C(1),y("ngIf",e===i.sort.metric)}}var Ume=(()=>{class n{constructor(){this.onChangeSort=new G,this.onAllAnnotationsToggled=new G,this.SortOrder=$r}stripMetric(e){return Ss(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list-header-component"]],inputs:{numAnnotations:"numAnnotations",selectedAnnotations:"selectedAnnotations",activeMetrics:"activeMetrics",sort:"sort"},outputs:{onChangeSort:"onChangeSort",onAllAnnotationsToggled:"onAllAnnotationsToggled"},decls:4,vars:2,consts:[[1,"toggle-all-container"],[3,"checked","change"],[1,"annotations-header-containers"],["class","header-column",4,"ngFor","ngForOf"],[1,"header-column"],[1,"header-container"],["tabindex","0","role","button","title","Change the sort by clicking any of the metrics.",1,"header-clickable",3,"click"],["class","sort-icon",3,"svgIcon","ngClass",4,"ngIf"],[1,"sort-icon",3,"svgIcon","ngClass"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"mat-checkbox",1),P("change",function(o){return i.onAllAnnotationsToggled.emit(o.checked)}),v()(),_(2,"div",2),E(3,ott,5,2,"div",3),v()),2&e&&(C(1),y("checked",i.selectedAnnotations.length===i.numAnnotations),C(2),y("ngForOf",i.activeMetrics))},dependencies:[Fn,dn,Be,yl,Gt],styles:["[_nghost-%COMP%]{border-bottom:2px solid #ebebeb;display:flex;height:28px;align-items:flex-end;margin-top:8px}.annotations-header-containers[_ngcontent-%COMP%]{display:flex;font-size:.9em;font-weight:500;flex-grow:1}.header-column[_ngcontent-%COMP%]{flex:1 1}.header-container[_ngcontent-%COMP%]{display:inline-block}.header-clickable[_ngcontent-%COMP%]{cursor:pointer;display:flex;outline:none}.toggle-all-container[_ngcontent-%COMP%]{margin-left:10px;width:90px}.sort-icon[_ngcontent-%COMP%]{height:16px}"],changeDetection:0}),n})(),zme=(()=>{class n{constructor(e){this.store=e,this.selectedAnnotations$=this.store.select(vc),this.annotationSort$=this.store.select(Kb)}changeSort(e){this.store.dispatch(AF({metric:e}))}allAnnotationsToggled(e){this.store.dispatch(RE(e?{annotations:Object.keys(this.annotations)}:{annotations:[]}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list-header"]],inputs:{numAnnotations:"numAnnotations",annotations:"annotations",activeMetrics:"activeMetrics"},decls:3,vars:8,consts:[[3,"numAnnotations","selectedAnnotations","sort","activeMetrics","onChangeSort","onAllAnnotationsToggled"]],template:function(e,i){1&e&&(_(0,"npmi-annotations-list-header-component",0),P("onChangeSort",function(o){return i.changeSort(o)})("onAllAnnotationsToggled",function(o){return i.allAnnotationsToggled(o)}),B(1,"async"),B(2,"async"),v()),2&e&&y("numAnnotations",i.numAnnotations)("selectedAnnotations",U(1,4,i.selectedAnnotations$))("sort",U(2,6,i.annotationSort$))("activeMetrics",i.activeMetrics)},dependencies:[Ume,Ge],encapsulation:2,changeDetection:0}),n})(),ltt=["glyph"],jme=(()=>{class n{ngAfterViewInit(){this.svg=bo(this.glyphSVG.nativeElement),this.mainContainer=this.svg.append("g"),this.draw()}draw(){"circle"==this.shape?this.mainContainer.append("circle").attr("fill",this.color).attr("stroke","black").attr("cx",5).attr("cy",5).attr("r",5):"bar"==this.shape?this.mainContainer.append("rect").attr("fill",this.color).attr("x",0).attr("y",0).attr("width",10).attr("height",10):"runIndicator"==this.shape&&this.mainContainer.append("g").append("path").attr("fill",this.color).attr("stroke","black").attr("d","M 2 0 L 10 0 L 7 5 L 10 10 L 2 10 Z")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-legend-element"]],viewQuery:function(e,i){if(1&e&&ot(ltt,7,Re),2&e){let r;Ne(r=Le())&&(i.glyphSVG=r.first)}},inputs:{text:"text",color:"color",shape:"shape"},decls:4,vars:1,consts:[[1,"glyph"],["glyph",""],[1,"legend-element-title"]],template:function(e,i){1&e&&(In(),O(0,"svg",0,1),Js(),_(2,"div",2),A(3),v()),2&e&&(C(3),yt(i.text))},styles:["[_nghost-%COMP%]{align-items:center;display:flex;padding-right:10px}.legend-element-title[_ngcontent-%COMP%]{font-size:.8em;padding-left:5px}.glyph[_ngcontent-%COMP%]{width:10px;height:10px}"],changeDetection:0}),n})(),Gme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list-legend"]],decls:4,vars:0,consts:[["text","run indicator","color","rgb(0,0,0)","shape","runIndicator"],["text","positive correlation","color","rgb(109, 174, 213)","shape","bar"],["text","negative correlation","color","rgb(249, 105, 76)","shape","bar"],["text","sample count","color","rgb(151, 151, 151)","shape","circle"]],template:function(e,i){1&e&&O(0,"npmi-legend-element",0)(1,"npmi-legend-element",1)(2,"npmi-legend-element",2)(3,"npmi-legend-element",3)},dependencies:[jme],styles:["[_nghost-%COMP%]{display:flex;padding:0 16px}"]}),n})(),dtt=["chart"],ptt=["hintClip"];function htt(n,t){1&n&&O(0,"mat-icon",12)}function ftt(n,t){1&n&&O(0,"mat-icon",13)}function mtt(n,t){if(1&n&&O(0,"mat-icon",14),2&n){let e=S();y("svgIcon",e.sort.order===e.SortOrder.SIMILAR?"arrow_downward_24px":"arrow_upward_24px")("ngClass",e.sort.order===e.SortOrder.SIMILAR?"down-icon":"up-icon")}}var Wme=(()=>{class n{constructor(){this.selected=!1,this.onShowSimilarAnnotations=new G,this.SortOrder=$r,this.width=10,this.chartWidth=10,this.chartHeight=10,this.maxDotRadius=10,this.countDotOffset=70,this.countTextPadding=2,this.margin={top:0,right:0,bottom:0,left:100},this.strokeColor="#fff",this.textClass="default-text",this.runs=[]}onResize(e){this.redraw()}ngAfterViewInit(){this.svg=bo(this.annotationContainer.nativeElement).select("svg"),this.xScale=Sy().padding(0),this.yScale=Sy().padding(0),this.sizeScale=Qo().domain([0,1]),this.countSizeScale=Qo().range([2,this.maxDotRadius]),this.mainContainer=this.svg.append("g").attr("transform",`translate(${this.margin.left}, ${this.margin.top})`),this.barsGroup=this.mainContainer.append("g"),this.countDotsGroup=this.mainContainer.append("g"),this.textsGroup=this.mainContainer.append("g"),this.countTextsGroup=this.mainContainer.append("g"),this.runHintGroup=this.svg.append("g"),this.redraw()}ngOnChanges(e){this.svg&&this.redraw()}redraw(){this.selected=this.selectedAnnotations.includes(this.annotation),this.updateDimensions(),this.setTextClass(),this.updateAxes(),this.draw()}updateDimensions(){let e=new Set;this.data.forEach(i=>{e.add(i.run)}),this.runs=[...e],this.svg.style("height",this.numActiveRuns*this.runHeight+"px"),this.chartHeight=this.runs.length*this.runHeight-this.margin.top-this.margin.bottom,this.width=this.annotationContainer.nativeElement.clientWidth||10,this.chartWidth=this.width-this.margin.left-this.margin.right}setTextClass(){this.textClass="default-text",this.flaggedAnnotations.includes(this.annotation)?this.textClass="flag-text":this.hiddenAnnotations.includes(this.annotation)&&(this.textClass="hidden-text")}updateAxes(){this.xScale.rangeRound([0,this.chartWidth-this.chartWidth/this.activeMetrics.length]).domain(this.activeMetrics.map(e=>Ss(e))),this.yScale.rangeRound([0,this.chartHeight-this.runHeight]).domain(this.runs),this.sizeScale.range([0,this.chartWidth/this.activeMetrics.length]),this.countSizeScale.domain([0,this.maxCount])}draw(){this.drawRunIndicators(),this.drawRunHintTexts(),this.drawBars(),this.drawTexts(),this.showCounts?(this.drawCountDots(),this.drawCountTexts()):(this.countDotsGroup.selectAll(".count-dot").remove(),this.countTextsGroup.selectAll(".count-background-text").remove(),this.countTextsGroup.selectAll(".count-text").remove())}drawRunIndicators(){bo(this.clipPathElement.nativeElement).select("rect").attr("width",this.margin.left-30).attr("height",this.chartHeight);let e=this.runHintGroup.selectAll(".hint").data(this.runs),i=e.enter().append("g").attr("class","hint");i.append("path").attr("d","M 0 0 L 15 0 L 10 10 L 15 20 L 0 20 Z"),i.merge(e).attr("transform",function(r){return`translate(10, ${this.yScale(r)+5})`}.bind(this)).attr("fill",function(r){return this.colorScale(r)}.bind(this)),e.exit().remove()}drawRunHintTexts(){let e=this.runHintGroup.selectAll(".hint-text").data(this.runs);e.enter().append("text").attr("x",25).attr("font-size","10px").attr("alignment-baseline","middle").attr("clip-path","url(#hint-clip)").merge(e).attr("y",function(r){return this.yScale(r)+15}.bind(this)).attr("class",`hint-text ${this.textClass}`).text(r=>this.runIdToRuns.get(r)?.name||""),e.exit().remove()}drawBars(){let e=this.barsGroup.selectAll(".bar").data(this.data);e.enter().append("rect").attr("class","bar").attr("height",20).merge(e).attr("fill",r=>null===r.nPMIValue?"":r.nPMIValue>=0?tj(r.nPMIValue):ij(-1*r.nPMIValue)).attr("x",function(r){return this.xScale(r.metric)}.bind(this)).attr("y",function(r){return this.yScale(r.run)+5}.bind(this)).attr("width",function(r){return null===r.nPMIValue?0:this.sizeScale(Math.abs(r.nPMIValue))}.bind(this)),e.exit().remove()}drawCountDots(){let e=this.countDotsGroup.selectAll(".count-dot").data(this.data);e.enter().append("circle").attr("class","count-dot").attr("stroke","black").merge(e).attr("fill",function(r){return null===r.countValue?"":nj(r.countValue/this.maxCount)}.bind(this)).attr("cx",function(r){return this.xScale(r.metric)+this.countDotOffset}.bind(this)).attr("cy",function(r){return this.yScale(r.run)+this.runHeight/2}.bind(this)).attr("r",function(r){return null===r.countValue?0:this.countSizeScale(r.countValue)}.bind(this)),e.exit().remove()}drawTexts(){let e=this.textsGroup.selectAll(".npmi-background-text").data(this.data);e.enter().append("text").attr("class","npmi-background-text").attr("stroke-width",3).attr("stroke-linejoin","round").attr("stroke",this.strokeColor).attr("font-size","13px").attr("alignment-baseline","middle").merge(e).attr("x",function(s){return this.xScale(s.metric)+5}.bind(this)).attr("y",function(s){return this.yScale(s.run)+this.runHeight/2}.bind(this)).text(s=>null===s.nPMIValue?"null":Math.round(1e3*(s.nPMIValue+Number.EPSILON))/1e3),e.exit().remove();let r=this.textsGroup.selectAll(".npmi-text").data(this.data);r.enter().append("text").attr("class","npmi-text").attr("font-size","13px").attr("alignment-baseline","middle").merge(r).attr("x",function(s){return this.xScale(s.metric)+5}.bind(this)).attr("y",function(s){return this.yScale(s.run)+this.runHeight/2}.bind(this)).text(s=>null===s.nPMIValue?"null":Math.round(1e3*(s.nPMIValue+Number.EPSILON))/1e3),r.exit().remove()}drawCountTexts(){let e=this.countTextsGroup.selectAll(".count-background-text").data(this.data);e.enter().append("text").attr("class","count-background-text").attr("stroke-width",3).attr("stroke-linejoin","round").attr("stroke",this.strokeColor).attr("font-size","10px").attr("alignment-baseline","middle").merge(e).attr("x",function(s){return this.xScale(s.metric)+this.countDotOffset+this.countTextPadding+this.maxDotRadius}.bind(this)).attr("y",function(s){return this.yScale(s.run)+this.runHeight/2}.bind(this)).text(s=>null===s.countValue?"":Intl.NumberFormat().format(s.countValue)),e.exit().remove();let r=this.countTextsGroup.selectAll(".count-text").data(this.data);r.enter().append("text").attr("class","count-text").attr("font-size","10px").attr("alignment-baseline","middle").merge(r).attr("x",function(s){return this.xScale(s.metric)+this.countDotOffset+this.countTextPadding+this.maxDotRadius}.bind(this)).attr("y",function(s){return this.yScale(s.run)+this.runHeight/2}.bind(this)).text(s=>null===s.countValue?"":Intl.NumberFormat().format(s.countValue)),r.exit().remove()}similaritySort(e){this.hasEmbedding&&(e.stopPropagation(),this.onShowSimilarAnnotations.emit())}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["annotation-component"]],viewQuery:function(e,i){if(1&e&&(ot(dtt,7,Re),ot(ptt,7,Re)),2&e){let r;Ne(r=Le())&&(i.annotationContainer=r.first),Ne(r=Le())&&(i.clipPathElement=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&P("resize",function(){return i.onResize()},0,Wx),2&e&&et("selected-row",i.selected)},inputs:{data:"data",maxCount:"maxCount",selectedAnnotations:"selectedAnnotations",flaggedAnnotations:"flaggedAnnotations",hiddenAnnotations:"hiddenAnnotations",activeMetrics:"activeMetrics",numActiveRuns:"numActiveRuns",showCounts:"showCounts",annotation:"annotation",runHeight:"runHeight",hasEmbedding:"hasEmbedding",sort:"sort",sidebarWidth:"sidebarWidth",colorScale:"colorScale",runIdToRuns:"runIdToRuns"},outputs:{onShowSimilarAnnotations:"onShowSimilarAnnotations"},features:[Ft],decls:14,vars:10,consts:[[1,"annotation-title"],[1,"annotation-checkbox",3,"checked","click"],[1,"annotation-button",3,"ngClass","click"],["class","flagged-icon","svgIcon","flag_24px",4,"ngIf"],["class","hidden-icon","svgIcon","visibility_off_24px",4,"ngIf"],["class","annotation-icon",3,"svgIcon","ngClass",4,"ngIf"],[1,"chart-div"],["chart",""],[1,"chart-svg"],["id","hint-clip"],["hintClip",""],["x","0","y","0"],["svgIcon","flag_24px",1,"flagged-icon"],["svgIcon","visibility_off_24px",1,"hidden-icon"],[1,"annotation-icon",3,"svgIcon","ngClass"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"mat-checkbox",1),P("click",function(o){return o.preventDefault()}),v(),_(2,"button",2),P("click",function(o){return i.similaritySort(o)}),A(3),v(),E(4,htt,1,0,"mat-icon",3),E(5,ftt,1,0,"mat-icon",4),E(6,mtt,1,2,"mat-icon",5),v(),_(7,"div",6,7),In(),_(9,"svg",8)(10,"defs")(11,"clipPath",9,10),O(13,"rect",11),v()()()()),2&e&&(et("flagged-annotation",i.flaggedAnnotations.includes(i.annotation))("hidden-annotation",i.hiddenAnnotations.includes(i.annotation)&&!i.flaggedAnnotations.includes(i.annotation)),C(1),y("checked",i.selectedAnnotations.includes(i.annotation)),C(1),y("ngClass",i.hasEmbedding?"clickable-annotation":""),C(1),je(" ",i.annotation," "),C(1),y("ngIf",i.flaggedAnnotations.includes(i.annotation)),C(1),y("ngIf",i.hiddenAnnotations.includes(i.annotation)),C(1),y("ngIf",i.annotation===i.sort.metric))},dependencies:[Fn,Be,yl,Gt],styles:[":host{padding-top:5px}.annotation-title{align-items:center;display:flex;font-size:13px;height:20px;padding:0 10px;user-select:none}.selected-row{background-color:#e0e0e0;display:block}.flagged-annotation{color:#f57c00}.hidden-annotation{color:#757575}.annotation-checkbox{padding-right:5px}.flagged-icon{transform:scale(0.6)}.hidden-icon{transform:scale(0.6)}.annotation-icon{transform:scale(0.6)}.chart-div{border-bottom:1px solid #ebebeb}.chart-svg{width:100%;user-select:none}.default-text{fill:#000}.flag-text{fill:#f57c00}.hidden-text{fill:#757575}.clickable-annotation{cursor:pointer}button{all:unset}\n"],encapsulation:2,changeDetection:0}),n})(),qme=(()=>{class n{constructor(e){this.store=e,this.sort$=this.store.select(Kb),this.flaggedAnnotations$=this.store.select(VF),this.hiddenAnnotations$=this.store.select(Xb),this.selectedAnnotations$=this.store.select(vc),this.showCounts$=this.store.select(jF),this.sidebarWidth$=this.store.select(Of),this.runColorScale$=this.store.select(nc).pipe(L(i=>r=>{if(!i.hasOwnProperty(r))throw new Error(`[Color scale] unknown runId: ${r}.`);return i[r]})),this.runIdToRuns$=this.store.select(qI)}showSimilarAnnotations(){this.store.dispatch(IF({annotation:this.annotation}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-annotation"]],inputs:{data:"data",maxCount:"maxCount",activeMetrics:"activeMetrics",numActiveRuns:"numActiveRuns",annotation:"annotation",runHeight:"runHeight",hasEmbedding:"hasEmbedding"},decls:9,vars:31,consts:[[3,"data","maxCount","activeMetrics","numActiveRuns","annotation","runHeight","hasEmbedding","sort","selectedAnnotations","flaggedAnnotations","hiddenAnnotations","showCounts","sidebarWidth","colorScale","runIdToRuns","onShowSimilarAnnotations"]],template:function(e,i){1&e&&(_(0,"annotation-component",0),P("onShowSimilarAnnotations",function(){return i.showSimilarAnnotations()}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),v()),2&e&&y("data",i.data)("maxCount",i.maxCount)("activeMetrics",i.activeMetrics)("numActiveRuns",i.numActiveRuns)("annotation",i.annotation)("runHeight",i.runHeight)("hasEmbedding",i.hasEmbedding)("sort",U(1,15,i.sort$))("selectedAnnotations",U(2,17,i.selectedAnnotations$))("flaggedAnnotations",U(3,19,i.flaggedAnnotations$))("hiddenAnnotations",U(4,21,i.hiddenAnnotations$))("showCounts",U(5,23,i.showCounts$))("sidebarWidth",U(6,25,i.sidebarWidth$))("colorScale",U(7,27,i.runColorScale$))("runIdToRuns",U(8,29,i.runIdToRuns$))},dependencies:[Wme,Ge],encapsulation:2,changeDetection:0}),n})();function vtt(n,t){if(1&n){let e=Pe();_(0,"npmi-annotation",5),P("click",function(r){let s=oe(e).$implicit;return se(S(2).rowClicked(r,s))}),v()}if(2&n){let e=t.$implicit,i=S(2);y("data",i.annotations[e])("activeMetrics",i.activeMetrics)("numActiveRuns",i.numActiveRuns)("maxCount",i.maxCount)("annotation",e)("runHeight",i.runHeight)("hasEmbedding",i.embeddingData&&void 0!==i.embeddingData[e])}}function ytt(n,t){if(1&n&&(sn(0),O(1,"npmi-annotations-list-legend")(2,"npmi-annotations-list-header",2),_(3,"cdk-virtual-scroll-viewport",3),E(4,vtt,1,7,"npmi-annotation",4),v(),an()),2&n){let e=S();C(2),y("annotations",e.annotations)("numAnnotations",e.numAnnotations)("activeMetrics",e.activeMetrics),C(1),Zi("itemSize",e.numActiveRuns*e.runHeight+25),C(1),y("cdkVirtualForOf",e.sortedAnnotations)}}var Yme=(()=>{class n{constructor(){this.onRowClick=new G,this.runHeight=30}rowClicked(e,i){if(e.shiftKey){let r=this.sortedAnnotations.indexOf(i);if(0===this.selectedAnnotations.length)this.onRowClick.emit(this.sortedAnnotations.slice(0,r+1));else{let s=this.sortedAnnotations.indexOf(this.selectedAnnotations[this.selectedAnnotations.length-1]);this.onRowClick.emit(s<r?this.sortedAnnotations.slice(s,r+1):this.sortedAnnotations.slice(r,s+1))}}else this.onRowClick.emit([i])}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["annotations-list-component"]],inputs:{annotations:"annotations",embeddingData:"embeddingData",annotationsExpanded:"annotationsExpanded",numAnnotations:"numAnnotations",annotationSort:"annotationSort",activeMetrics:"activeMetrics",numActiveRuns:"numActiveRuns",sortedAnnotations:"sortedAnnotations",selectedAnnotations:"selectedAnnotations",maxCount:"maxCount"},outputs:{onRowClick:"onRowClick"},decls:2,vars:3,consts:[[3,"numAnnotations","expanded"],[4,"ngIf"],[3,"annotations","numAnnotations","activeMetrics"],["minBufferPx","300","maxBufferPx","600",1,"annotation-rows",3,"itemSize"],[3,"data","activeMetrics","numActiveRuns","maxCount","annotation","runHeight","hasEmbedding","click",4,"cdkVirtualFor","cdkVirtualForOf"],[3,"data","activeMetrics","numActiveRuns","maxCount","annotation","runHeight","hasEmbedding","click"]],template:function(e,i){1&e&&(O(0,"npmi-annotations-list-toolbar",0),E(1,ytt,5,5,"ng-container",1)),2&e&&(y("numAnnotations",i.numAnnotations)("expanded",i.annotationsExpanded),C(1),y("ngIf",i.annotationsExpanded))},dependencies:[Be,Hme,zme,Gme,b2,x2,eg,qme],styles:["[_nghost-%COMP%]{background-color:#fff;border:1px solid #ebebeb;display:flex;flex-direction:column;height:calc(100% - 2px);width:calc(100% - 2px)}.annotation-rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1;overflow-y:auto}"],changeDetection:0}),n})(),YF=(()=>{class n{constructor(e){this.store=e,this.annotationsExpanded$=this.store.pipe(vt(UF)),this.activeRuns$=this.store.pipe(vt(oo)).pipe(L(i=>i?Array.from(i.entries()).filter(r=>r[1]).map(r=>r[0]):[])),this.embeddingData$=this.store.pipe(vt(BF)),this.numActiveRuns$=this.activeRuns$.pipe(L(i=>i.length)),this.activeMetrics$=Lt([this.store.select(Rf),this.activeRuns$,this.store.select(Il)]).pipe(L(([i,r,o])=>{let s=[];for(let a of r)i[a]&&(s=s.concat(i[a].filter(l=>Vb(l))));return s=[...new Set([...Object.keys(o),...s])],s})),this.visibleAnnotations$=Lt([this.store.select(Pf),this.store.select(Xb),this.store.select(Zb)]).pipe(L(([i,r,o])=>qF(i,r,o))),this.filteredAnnotations$=Lt([this.visibleAnnotations$,this.store.select(HF),this.store.select(Il),this.activeRuns$,this.activeMetrics$,this.store.select(Qb)]).pipe(L(([i,r,o,s,a,l])=>function(n,t,e,i,r,o){let s={},a=new Set(t),l=new Set(r.map(u=>Ss(u))),c=new RegExp(o,"i");return Object.entries(n).forEach(u=>{if(!c.test(u[0]))return;let d=u[1];d=d.filter(p=>a.has(p.run)&&l.has(p.metric)),function(n,t,e){return n.every(i=>{if(i.kind===mu.OPERATOR)return!0;let r=t[i.metric];return void 0===r||e.some(o=>o.metric===Ss(i.metric)&&(null===o.nPMIValue?r.includeNaN:o.nPMIValue<=r.max&&o.nPMIValue>=r.min))})}(e,i,d)&&0!==d.length&&(s[u[0]]=d)}),s}(i,s,r,o,a,l))).pipe(Ts()),this.numAnnotations$=this.filteredAnnotations$.pipe(L(i=>Object.keys(i).length)),this.sortedAnnotations$=Lt([this.filteredAnnotations$,this.store.pipe(vt(Kb)),this.embeddingData$]).pipe(L(([i,r,o])=>function(n,t,e){let i=Object.keys(n),r=t.order===$r.DISSIMILAR||t.order===$r.SIMILAR;if(""===t.metric||(void 0===e||void 0===e.points[t.metric])&&r)return i;let o=r?function(n,t,e){let i={},r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;e.order===$r.SIMILAR&&(r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY);for(let s of n)i[s]=s===e.metric?r:void 0===t.points[s]?o:t.points[s].vector?Vet(t.points[e.metric].vector,t.points[s].vector,o):o;return i}(i,e,t):function(n,t,e){let i=Ss(e.metric),r={};if(e.order===$r.DESCENDING)for(let o of n)r[o]=Math.max(...t[o].filter(s=>s.metric===i).map(s=>null===s.nPMIValue?-1/0:s.nPMIValue));else for(let o of n)r[o]=Math.min(...t[o].filter(s=>s.metric===i).map(s=>null===s.nPMIValue?1/0:s.nPMIValue));return r}(i,n,t);return function(n,t,e){return n.sort(e?(i,r)=>t[i]-t[r]:(i,r)=>t[r]-t[i])}(i,o,t.order===$r.ASCENDNG||t.order===$r.SIMILAR)}(i,r,o))),this.selectedAnnotations$=this.store.pipe(vt(vc)),this.maxCount$=this.filteredAnnotations$.pipe(L(i=>{let r=0;return Object.values(i).forEach(o=>{o.forEach(s=>{s.countValue&&(r=Math.max(r,s.countValue))})}),r}))}rowClicked(e){this.store.dispatch(wF({annotations:e}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-annotations-list"]],decls:10,vars:27,consts:[[3,"annotations","embeddingData","annotationsExpanded","numAnnotations","activeMetrics","numActiveRuns","sortedAnnotations","selectedAnnotations","maxCount","onRowClick"]],template:function(e,i){1&e&&(_(0,"annotations-list-component",0),P("onRowClick",function(o){return i.rowClicked(o)}),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async"),B(9,"async"),v()),2&e&&y("annotations",U(1,9,i.filteredAnnotations$))("embeddingData",U(2,11,i.embeddingData$))("annotationsExpanded",U(3,13,i.annotationsExpanded$))("numAnnotations",U(4,15,i.numAnnotations$))("activeMetrics",U(5,17,i.activeMetrics$))("numActiveRuns",U(6,19,i.numActiveRuns$))("sortedAnnotations",U(7,21,i.sortedAnnotations$))("selectedAnnotations",U(8,23,i.selectedAnnotations$))("maxCount",U(9,25,i.maxCount$))},dependencies:[Yme,Ge],encapsulation:2,changeDetection:0}),n})(),xtt=["chart"],Kme=(()=>{class n{constructor(){this.width=0,this.chartWidth=0,this.height=300,this.margin={top:20,right:40,bottom:20,left:40},this.chartHeight=this.height-this.margin.top-this.margin.bottom}onResize(e){this.redraw()}ngAfterViewInit(){this.svg=bo(this.svgElement.nativeElement),this.mainContainer=this.svg.append("g").attr("transform",`translate(${this.margin.left}, ${this.margin.top})`),this.coordinatesGroup=this.mainContainer.append("g"),this.labelsGroup=this.mainContainer.append("g"),this.axisGroup=this.mainContainer.append("g"),this.xScale=Sy().padding(.1),this.yScale=Qo().range([this.chartHeight,0]),this.yAxis=zw(this.yScale),this.redraw()}ngOnChanges(e){this.svg&&this.redraw()}redraw(){this.updateDimensions(),this.updateAxes(),this.draw()}updateDimensions(){this.width=this.svgElement.nativeElement.clientWidth||10,this.chartWidth=this.width-this.margin.left-this.margin.right}updateAxes(){this.xScale.rangeRound([0,this.chartWidth]).domain(this.activeMetrics),this.yScale.domain([this.coordinateData.extremes.min,this.coordinateData.extremes.max])}draw(){this.drawAxes(),this.drawAxisLabels(),this.drawCoordinates(),this.drawLabels()}drawAxes(){let e=this.axisGroup.selectAll(".axis-y").data(this.activeMetrics);e.enter().append("g").attr("class","axis-y").merge(e).attr("transform",function(r){return`translate(${this.xScale(r)}, 0)`}.bind(this)).call(this.yAxis),e.exit().remove()}drawAxisLabels(){let e=this.axisGroup.selectAll(".axis-bg-text").data(this.activeMetrics);e.enter().append("text").attr("class","axis-bg-text").attr("font-size","13px").attr("stroke-width",2).attr("stroke-linejoin","round").attr("stroke","white").merge(e).text(s=>s).attr("transform",function(s){return`translate(${this.xScale(s)-5}, ${this.yScale(this.coordinateData.extremes.min)}) rotate(-90)`}.bind(this)),e.exit().remove();let r=this.axisGroup.selectAll(".axis-text").data(this.activeMetrics);r.enter().append("text").attr("font-size","13px").attr("class","axis-text").merge(r).text(s=>s).attr("transform",function(s){return`translate(${this.xScale(s)-5}, ${this.yScale(this.coordinateData.extremes.min)}) rotate(-90)`}.bind(this)),r.exit().remove()}drawCoordinates(){let e=this.coordinatesGroup.selectAll(".coord").data(this.coordinateData.coordinates);e.enter().append("path").attr("class","coord").attr("fill","none").merge(e).attr("d",this.path.bind(this)).attr("stroke",function(s){return this.colorScale(s.runId)}.bind(this)),e.exit().remove();let r=this.coordinatesGroup.selectAll(".hiddenCoord").data(this.coordinateData.coordinates);r.enter().append("path").attr("class","hiddenCoord").attr("stroke-width","10px").attr("fill","none").attr("stroke","rgba(0, 0, 0, 0.0)").on("mouseover",this.handleCoordinateMouseOver.bind(this)).on("mouseout",this.handleCoordinateMouseOut.bind(this)).merge(r).attr("d",this.path.bind(this)),r.exit().remove()}path(e){return e.values.sort((r,o)=>this.activeMetrics.indexOf(r.metric)-this.activeMetrics.indexOf(o.metric)),xS()(e.values.map(function(r){let o=this.yScale(r.nPMIValue);return[this.xScale(r.metric),o]}.bind(this)))}handleCoordinateMouseOver(e,i){this.labelsGroup.selectAll(".coordinate-label").filter(function(r){return r.annotation!==e.annotation}).style("opacity",.1),this.coordinatesGroup.selectAll(".coord").filter(function(r){return r.annotation!==e.annotation}).style("opacity",.1)}handleCoordinateMouseOut(){this.labelsGroup.selectAll(".coordinate-label").style("opacity",1),this.coordinatesGroup.selectAll(".coord").style("opacity",1)}drawLabels(){let e=30/this.xScale.step(),i=this.coordinateData.coordinates.length<30?this.coordinateData.coordinates:[],r=this.labelsGroup.selectAll(".coordinate-label").data(i);r.enter().append("text").attr("class","coordinate-label").attr("font-size","10px").merge(r).text(function(s){return s.annotation}).attr("x",this.xScale(this.activeMetrics[0])+30).attr("y",function(s){let a=this.yScale(s.values[0].nPMIValue?s.values[0].nPMIValue:0),l=this.yScale(s.values[1].nPMIValue?s.values[1].nPMIValue:0);return(1-e)*a+e*l}.bind(this)),r.exit().remove()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["parallel-coordinates-component"]],viewQuery:function(e,i){if(1&e&&ot(xtt,7,Re),2&e){let r;Ne(r=Le())&&(i.svgElement=r.first)}},hostBindings:function(e,i){1&e&&P("resize",function(o){return i.onResize(o)},0,Wx)},inputs:{activeMetrics:"activeMetrics",coordinateData:"coordinateData",sidebarWidth:"sidebarWidth",colorScale:"colorScale"},features:[Ft],decls:2,vars:0,consts:[[1,"pc-chart"],["chart",""]],template:function(e,i){1&e&&(In(),O(0,"svg",0,1))},styles:[".pc-chart[_ngcontent-%COMP%]{height:300px;width:100%}"],changeDetection:0}),n})(),Zme=(()=>{class n{constructor(e){this.store=e,this.activeRuns$=this.store.pipe(vt(oo)).pipe(L(i=>i?Array.from(i.entries()).filter(r=>r[1]).map(r=>r[0]):[])),this.activeMetrics$=Lt(this.store.select(Rf),this.activeRuns$,this.store.select(Il)).pipe(L(([i,r,o])=>{let s=[];for(let a of r)i[a]&&(s=s.concat(i[a].filter(l=>Vb(l))));return s=[...new Set([...Object.keys(o),...s])],s.map(a=>Ss(a))})),this.coordinateData$=Lt([this.store.select(Pf),this.store.select(vc),this.activeRuns$,this.activeMetrics$]).pipe(L(([i,r,o,s])=>function(n,t,e,i){let r=[],o={max:-1,min:1},s=new Set(e),a=new Set(i);return 0===s.size||0===a.size||0===Object.keys(n).length?{coordinates:[],extremes:{min:-1,max:1}}:(t.forEach(l=>{let u={};n[l].forEach(d=>{!s.has(d.run)||!a.has(d.metric)||(u[d.run]?u[d.run].push(d):u[d.run]=[d],null!==d.nPMIValue?(o.max=Math.max(o.max,d.nPMIValue),o.min=Math.min(o.min,d.nPMIValue)):(o.max=Math.max(o.max,0),o.min=Math.min(o.min,0)))});for(let d of Object.keys(u))r.push({annotation:l,runId:d,values:u[d]})}),o.max<o.min&&(o.max=1,o.min=-1),{coordinates:r,extremes:o})}(i,r,o,s))),this.sidebarWidth$=this.store.select(Of),this.runColorScale$=this.store.select(nc).pipe(L(i=>r=>{if(!i.hasOwnProperty(r))throw new Error(`[Color scale] unknown runId: ${r}.`);return i[r]}))}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-parallel-coordinates"]],decls:5,vars:12,consts:[[3,"activeMetrics","coordinateData","sidebarWidth","colorScale"]],template:function(e,i){1&e&&(O(0,"parallel-coordinates-component",0),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async")),2&e&&y("activeMetrics",U(1,4,i.activeMetrics$))("coordinateData",U(2,6,i.coordinateData$))("sidebarWidth",U(3,8,i.sidebarWidth$))("colorScale",U(4,10,i.runColorScale$))},dependencies:[Kme,Ge],encapsulation:2,changeDetection:0}),n})();function wtt(n,t){1&n&&O(0,"mat-icon",9)}function Stt(n,t){1&n&&O(0,"mat-icon",10)}function Ett(n,t){1&n&&O(0,"npmi-parallel-coordinates")}var Jme=(()=>{class n{constructor(){this.onClearSelectedAnnotations=new G,this.onToggleExpanded=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["selected-annotations-component"]],inputs:{pcExpanded:"pcExpanded",selectedAnnotations:"selectedAnnotations"},outputs:{onClearSelectedAnnotations:"onClearSelectedAnnotations",onToggleExpanded:"onToggleExpanded"},decls:11,vars:4,consts:function(){let t,e;return t=$localize`:Label for a button that clears the annotation selection.␟2b52289f2c4b7f5b182ed23c9154722ecd46a2d4␟2494660520341308830:Clear Annotation Selection`,e=$localize`:Label for a button that expands or hides selected annotations.␟8f4ad305c19e3655f3189e3e264e83fb76f7bb95␟5670797784070952095:Expand/Hide Selected Annotations`,[[1,"pc-container"],[1,"pc-toolbar"],[1,"pc-title"],["mat-icon-button","","aria-label",t,"title","Deselects all selected annotations.",1,"clear-button",3,"disabled","click"],["svgIcon","clear_24px"],["mat-icon-button","","aria-label",e,1,"expand-button",3,"click"],["svgIcon","expand_less_24px","class","expand-less-icon",4,"ngIf","ngIfElse"],["notExpanded",""],[4,"ngIf"],["svgIcon","expand_less_24px",1,"expand-less-icon"],["svgIcon","expand_more_24px",1,"expand-icon"]]},template:function(e,i){if(1&e&&(_(0,"div",0)(1,"div",1)(2,"h3",2),A(3,"Selected Annotations"),v(),_(4,"button",3),P("click",function(){return i.onClearSelectedAnnotations.emit()}),O(5,"mat-icon",4),v(),_(6,"button",5),P("click",function(){return i.onToggleExpanded.emit()}),E(7,wtt,1,0,"mat-icon",6),E(8,Stt,1,0,"ng-template",null,7,qt),v()(),E(10,Ett,1,0,"npmi-parallel-coordinates",8),v()),2&e){let r=$e(9);C(4),y("disabled",0===i.selectedAnnotations.length),C(3),y("ngIf",i.pcExpanded)("ngIfElse",r),C(3),y("ngIf",i.pcExpanded)}},dependencies:[Be,Gt,_n,Zme],styles:[".pc-container[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #ebebeb}.pc-toolbar[_ngcontent-%COMP%]{align-items:center;border-bottom:1px solid #ebebeb;display:flex;height:42px;padding:0 16px}.pc-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;display:inline;flex:1 1}"],changeDetection:0}),n})(),XF=(()=>{class n{constructor(e){this.store=e,this.pcExpanded$=this.store.pipe(vt(ome)),this.selectedAnnotations$=this.store.select(vc)}clearSelectedAnnotations(){this.store.dispatch(SF())}toggleExpanded(){this.store.dispatch(PF())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-selected-annotations"]],decls:3,vars:6,consts:[[3,"pcExpanded","selectedAnnotations","onClearSelectedAnnotations","onToggleExpanded"]],template:function(e,i){1&e&&(_(0,"selected-annotations-component",0),P("onClearSelectedAnnotations",function(){return i.clearSelectedAnnotations()})("onToggleExpanded",function(){return i.toggleExpanded()}),B(1,"async"),B(2,"async"),v()),2&e&&y("pcExpanded",U(1,2,i.pcExpanded$))("selectedAnnotations",U(2,4,i.selectedAnnotations$))},dependencies:[Jme,Ge],encapsulation:2,changeDetection:0}),n})();function Dtt(n,t){1&n&&(_(0,"div",6)(1,"div",7),O(2,"npmi-violin-filters",8),_(3,"div",9),O(4,"runs-selector"),v()()()),2&n&&Pt("width",S().sidebarWidth,"px")}function Att(n,t){if(1&n){let e=Pe();_(0,"div",10),P("mousedown",function(){return oe(e),se(S().resizeGrabbed.emit())}),v()}}function Itt(n,t){1&n&&(_(0,"div",11),O(1,"npmi-annotations-list",12)(2,"npmi-selected-annotations"),v())}function Ptt(n,t){1&n&&(_(0,"div",13),A(1,"You need to select at least one run."),v())}function Rtt(n,t){if(1&n){let e=Pe();_(0,"div",14)(1,"button",15),P("click",function(){return oe(e),se(S().toggleSidebarExpanded.emit())}),O(2,"mat-icon",16),v()()}}var ege=(()=>{class n{constructor(){this.toggleSidebarExpanded=new G,this.resizeTriggered=new G,this.resizeGrabbed=new G,this.resizeReleased=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["main-component"]],inputs:{runActive:"runActive",sidebarExpanded:"sidebarExpanded",sidebarWidth:"sidebarWidth"},outputs:{toggleSidebarExpanded:"toggleSidebarExpanded",resizeTriggered:"resizeTriggered",resizeGrabbed:"resizeGrabbed",resizeReleased:"resizeReleased"},decls:8,vars:5,consts:function(){let t;return t=$localize`:Label for a button that toggles the sidebar.␟f63b57932d179cca62ac9fcae63dd7f5e6fa389f␟4485009347444704878:Toggle Sidebar`,[[1,"content",3,"mouseup","mousemove"],["class","sidebar-container",3,"width",4,"ngIf"],["class","grabber",3,"mousedown",4,"ngIf"],["class","analysis-container",4,"ngIf","ngIfElse"],["noRun",""],["class","side-toggle",4,"ngIf"],[1,"sidebar-container"],[1,"sidebar-contents"],[1,"violin-filters"],[1,"run-selector"],[1,"grabber",3,"mousedown"],[1,"analysis-container"],[1,"annotations-list"],[1,"noRun"],[1,"side-toggle"],["mat-icon-button","","aria-label",t,3,"click"],["svgIcon","chevron_right_24px"]]},template:function(e,i){if(1&e&&(O(0,"npmi-data-selection"),_(1,"div",0),P("mouseup",function(){return i.resizeReleased.emit()})("mousemove",function(o){return i.resizeTriggered.emit(o)}),E(2,Dtt,5,2,"div",1),E(3,Att,1,0,"div",2),E(4,Itt,3,0,"div",3),E(5,Ptt,2,0,"ng-template",null,4,qt),v(),E(7,Rtt,3,0,"div",5)),2&e){let r=$e(6);C(2),y("ngIf",i.sidebarExpanded),C(1),y("ngIf",i.sidebarExpanded),C(1),y("ngIf",!0===i.runActive)("ngIfElse",r),C(3),y("ngIf",!i.sidebarExpanded)}},dependencies:[Be,Gt,Ob,WF,_n,Ome,YF,XF],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.content[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0px;width:100%}.sidebar-container[_ngcontent-%COMP%]{height:100%;overflow:hidden}.sidebar-contents[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;min-width:150px}.analysis-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;flex:1 1}.run-selector[_ngcontent-%COMP%]{max-height:100%;width:100%}.violin-filters[_ngcontent-%COMP%]{width:100%}.side-toggle[_ngcontent-%COMP%]{width:30px;height:30px;position:absolute;left:10px;bottom:10px;border:1px solid #ebebeb;border-radius:3px;display:flex;align-items:center;justify-content:center}.grabber[_ngcontent-%COMP%]{content:"";cursor:ew-resize;height:100%;width:3px;overflow:hidden;background-color:rgba(0,0,0,.12)}.annotations-list[_ngcontent-%COMP%]{width:100%;min-height:0px;flex:1 1}'],changeDetection:0}),n})(),tge=(()=>{class n{constructor(e){this.store=e,this.runActive$=this.store.pipe(vt(oo)).pipe(L(i=>!!i&&[...i.values()].includes(!0))),this.sidebarExpanded$=this.store.pipe(vt(zF)),this.sidebarWidth$=this.store.pipe(vt(Of)),this.resizing=!1}onToggleSidebarExpanded(){this.store.dispatch(qb())}onResizeTriggered(e){this.resizing&&this.store.dispatch(NF({sidebarWidth:e.clientX}))}onResizeGrabbed(){this.resizing=!0}onResizeReleased(){this.resizing=!1}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-main"]],decls:4,vars:9,consts:[[3,"runActive","sidebarExpanded","sidebarWidth","toggleSidebarExpanded","resizeTriggered","resizeGrabbed","resizeReleased"]],template:function(e,i){1&e&&(_(0,"main-component",0),P("toggleSidebarExpanded",function(){return i.onToggleSidebarExpanded()})("resizeTriggered",function(o){return i.onResizeTriggered(o)})("resizeGrabbed",function(){return i.onResizeGrabbed()})("resizeReleased",function(){return i.onResizeReleased()}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("runActive",U(1,3,i.runActive$))("sidebarExpanded",U(2,5,i.sidebarExpanded$))("sidebarWidth",U(3,7,i.sidebarWidth$))},dependencies:[ege,Ge],encapsulation:2,changeDetection:0}),n})(),nge=(()=>{class n{constructor(){this.toggleSidebarExpanded=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["embedding-projection-component"]],inputs:{sidebarExpanded:"sidebarExpanded"},outputs:{toggleSidebarExpanded:"toggleSidebarExpanded"},decls:7,vars:0,consts:function(){let t;return t=$localize`:Label for a button that expands/hides the sidebar.␟48c29903ce881ab61088f8d49d827203716aaed4␟4658602991970260215:Expand/Hide Sidebar`,[[1,"embedding-projection-toolbar"],[1,"embedding-projection-title"],[1,"side-toggle"],["mat-icon-button","","aria-label",t,3,"click"],["svgIcon","chevron_left_24px"],[1,"projection"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"h3",1),A(2,"Embeddings Projected"),v(),_(3,"div",2)(4,"button",3),P("click",function(){return i.toggleSidebarExpanded.emit()}),O(5,"mat-icon",4),v()()(),O(6,"div",5))},dependencies:[Gt,_n],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.embedding-projection-toolbar[_ngcontent-%COMP%]{align-items:center;border-bottom:1px solid #ebebeb;display:flex;height:42px;justify-content:space-between;padding:0 10px}.embedding-projection-title[_ngcontent-%COMP%]{display:inline;font-size:14px;font-weight:500}.projection[_ngcontent-%COMP%]{overflow-y:auto}.side-toggle[_ngcontent-%COMP%]{align-items:center;background-color:#fff;border-radius:3px;border:1px solid #ebebeb;display:flex;height:30px;justify-content:center;width:30px}"],changeDetection:0}),n})(),ige=(()=>{class n{constructor(e){this.store=e,this.sidebarExpanded$=this.store.select(GF)}onToggleSidebarExpanded(){this.store.dispatch(Yb())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-embedding-projection"]],decls:2,vars:3,consts:[[3,"sidebarExpanded","toggleSidebarExpanded"]],template:function(e,i){1&e&&(_(0,"embedding-projection-component",0),P("toggleSidebarExpanded",function(){return i.onToggleSidebarExpanded()}),B(1,"async"),v()),2&e&&y("sidebarExpanded",U(1,1,i.sidebarExpanded$))},dependencies:[nge,Ge],encapsulation:2,changeDetection:0}),n})();function Ltt(n,t){1&n&&(_(0,"div",6)(1,"div",7),O(2,"npmi-embedding-projection",8)(3,"div",9),_(4,"div",10),O(5,"runs-selector"),v()()()),2&n&&Pt("width",S().sidebarWidth,"px")}function Btt(n,t){if(1&n){let e=Pe();_(0,"div",11),P("mousedown",function(){return oe(e),se(S().resizeGrabbed.emit())}),v()}}function Vtt(n,t){1&n&&(_(0,"div",12),O(1,"npmi-annotations-list",13)(2,"npmi-selected-annotations"),v())}function Htt(n,t){1&n&&(_(0,"div",14),A(1,"You need to select at least one run."),v())}function Utt(n,t){if(1&n){let e=Pe();_(0,"div",15)(1,"button",16),P("click",function(){return oe(e),se(S().toggleSidebarExpanded.emit())}),O(2,"mat-icon",17),v()()}}var rge=(()=>{class n{constructor(){this.toggleSidebarExpanded=new G,this.resizeTriggered=new G,this.resizeGrabbed=new G,this.resizeReleased=new G}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["embeddings-component"]],inputs:{runActive:"runActive",sidebarExpanded:"sidebarExpanded",sidebarWidth:"sidebarWidth"},outputs:{toggleSidebarExpanded:"toggleSidebarExpanded",resizeTriggered:"resizeTriggered",resizeGrabbed:"resizeGrabbed",resizeReleased:"resizeReleased"},decls:8,vars:5,consts:function(){let t;return t=$localize`:Label for a button that toggles the sidebar.␟f63b57932d179cca62ac9fcae63dd7f5e6fa389f␟4485009347444704878:Toggle Sidebar`,[[1,"content",3,"mouseup","mousemove"],["class","sidebar-container",3,"width",4,"ngIf"],["class","grabber",3,"mousedown",4,"ngIf"],["class","analysis-container",4,"ngIf","ngIfElse"],["noRun",""],["class","side-toggle",4,"ngIf"],[1,"sidebar-container"],[1,"sidebar-contents"],[1,"embedding-projection"],[1,"run-divider"],[1,"run-selector"],[1,"grabber",3,"mousedown"],[1,"analysis-container"],[1,"annotations-list"],[1,"noRun"],[1,"side-toggle"],["mat-icon-button","","aria-label",t,3,"click"],["svgIcon","chevron_right_24px"]]},template:function(e,i){if(1&e&&(O(0,"npmi-data-selection"),_(1,"div",0),P("mouseup",function(){return i.resizeReleased.emit()})("mousemove",function(o){return i.resizeTriggered.emit(o)}),E(2,Ltt,6,2,"div",1),E(3,Btt,1,0,"div",2),E(4,Vtt,3,0,"div",3),E(5,Htt,2,0,"ng-template",null,4,qt),v(),E(7,Utt,3,0,"div",5)),2&e){let r=$e(6);C(2),y("ngIf",i.sidebarExpanded),C(1),y("ngIf",i.sidebarExpanded),C(1),y("ngIf",!0===i.runActive)("ngIfElse",r),C(3),y("ngIf",!i.sidebarExpanded)}},dependencies:[Be,Gt,Ob,WF,_n,YF,XF,ige],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.content[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0px;width:100%}.sidebar-container[_ngcontent-%COMP%]{height:100%;overflow:hidden}.sidebar-contents[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-width:150px}.analysis-container[_ngcontent-%COMP%]{display:flex;flex:1 1;flex-direction:column;height:100%}.run-selector[_ngcontent-%COMP%]{max-height:100%;width:100%}.embedding-projection[_ngcontent-%COMP%]{min-height:0px;width:100%}.side-toggle[_ngcontent-%COMP%]{align-items:center;border:1px solid #ebebeb;border-radius:3px;bottom:10px;display:flex;height:30px;justify-content:center;left:10px;position:absolute;width:30px}.run-divider[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.12);content:"";height:1px;overflow:hidden}.grabber[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.12);content:"";cursor:ew-resize;height:100%;overflow:hidden;width:3px}.annotations-list[_ngcontent-%COMP%]{flex:1 1;min-height:0px;width:100%}'],changeDetection:0}),n})(),oge=(()=>{class n{constructor(e){this.store=e,this.runActive$=this.store.pipe(vt(oo)).pipe(L(i=>!!i&&[...i.values()].includes(!0))),this.sidebarExpanded$=this.store.pipe(vt(GF)),this.sidebarWidth$=this.store.pipe(vt(lme)),this.resizing=!1}onToggleSidebarExpanded(){this.store.dispatch(Yb())}onResizeTriggered(e){this.resizing&&this.store.dispatch(LF({sidebarWidth:e.clientX}))}onResizeGrabbed(){this.resizing=!0}onResizeReleased(){this.resizing=!1}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi-embeddings"]],decls:4,vars:9,consts:[[3,"runActive","sidebarExpanded","sidebarWidth","toggleSidebarExpanded","resizeTriggered","resizeGrabbed","resizeReleased"]],template:function(e,i){1&e&&(_(0,"embeddings-component",0),P("toggleSidebarExpanded",function(){return i.onToggleSidebarExpanded()})("resizeTriggered",function(o){return i.onResizeTriggered(o)})("resizeGrabbed",function(){return i.onResizeGrabbed()})("resizeReleased",function(){return i.onResizeReleased()}),B(1,"async"),B(2,"async"),B(3,"async"),v()),2&e&&y("runActive",U(1,3,i.runActive$))("sidebarExpanded",U(2,5,i.sidebarExpanded$))("sidebarWidth",U(3,7,i.sidebarWidth$))},dependencies:[rge,Ge],encapsulation:2,changeDetection:0}),n})();function Gtt(n,t){1&n&&O(0,"npmi-inactive-view")}function Wtt(n,t){1&n&&O(0,"npmi-main")}function qtt(n,t){1&n&&O(0,"npmi-embeddings")}function Ytt(n,t){if(1&n&&(E(0,Wtt,1,0,"npmi-main",3),E(1,qtt,1,0,"npmi-embeddings",3)),2&n){let e=S();y("ngIf",e.activeView===e.ViewActive.DEFAULT),C(1),y("ngIf",e.activeView===e.ViewActive.EMBEDDINGS)}}var sge=(()=>{class n{constructor(){this.ViewActive=kp}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["npmi-component"]],inputs:{runs:"runs",activeView:"activeView"},decls:4,vars:2,consts:[[1,"npmi-container"],[4,"ngIf","ngIfElse"],["dataAvailable",""],[4,"ngIf"]],template:function(e,i){if(1&e&&(_(0,"div",0),E(1,Gtt,1,0,"npmi-inactive-view",1),E(2,Ytt,2,2,"ng-template",null,2,qt),v()),2&e){let r=$e(3);C(1),y("ngIf",0===i.runs.size)("ngIfElse",r)}},dependencies:[Be,ume,tge,oge],styles:["[_nghost-%COMP%]{display:flex;height:100%}.npmi-container[_ngcontent-%COMP%]{flex:1 1}"],changeDetection:0}),n})(),age=(()=>{class n{constructor(e){this.store=e,this.runs$=this.store.pipe(vt(oo)),this.activeView$=this.store.pipe(vt(sme))}ngOnInit(){this.store.dispatch(bF())}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({type:n,selectors:[["npmi"]],decls:3,vars:6,consts:[[3,"runs","activeView"]],template:function(e,i){1&e&&(O(0,"npmi-component",0),B(1,"async"),B(2,"async")),2&e&&y("runs",U(1,2,i.runs$))("activeView",U(2,4,i.activeView$))},dependencies:[sge,Ge],encapsulation:2}),n})(),lge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Ls,pn,Pn]}),n})(),cge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,pn,Ha]}),n})(),uge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,pn,Pn,Nme,cge]}),n})(),dge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Ls,pn]}),n})(),pge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),hge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[pge]}),n})(),QF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,uge,dge,hge,Zc,lge]}),n})(),fge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,pn,Pn]}),n})(),mge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,z2,pn,$b,Qk]}),n})(),gge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,$b]}),n})(),_ge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,$b,mge,gge]}),n})(),vge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn,Ha,Ib]}),n})(),yge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn,Pn]}),n})(),KF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,vge,_ge,yge]}),n})(),bge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me]}),n})(),ZF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,pn,Pn,bge]}),n})(),xge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Ls,pn,Fb,KF,Pn,QF,ZF,fge]}),n})(),Cge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Mge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Pn,pn]}),n})(),wge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,pn,Pn,Mge]}),n})(),Sge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,jr,Ls,pn,Fb,KF,Pn,wge,QF,ZF]}),n})(),Ege=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Cge,Sge,xge,tme,wr.forFeature("npmi",dme),ro.forFeature([cme]),Bs.forPlugin("npmi",age)]}),n})(),JF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),v6=(()=>{class n{constructor(e){this.http=e,this.httpPathPrefix="data/plugin/text_v2"}fetchRunToTag(){return this.http.get(this.httpPathPrefix+"/tags").pipe(L(e=>{let i=new Map;return Object.entries(e).forEach(([r,o])=>{i.set(r,o)}),i}))}fetchTextData(e,i){let r=new URLSearchParams({run:e,tag:i});return this.http.get(this.httpPathPrefix+`/text?${r.toString()}`).pipe(L(o=>o.map(s=>({originalShape:s.original_shape,step:s.step,stringArray:s.string_array,wallTimeInMs:1e3*s.wall_time,truncated:s.truncated}))))}}return n.\u0275fac=function(e){return new(e||n)(j(ka))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),Tge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[v6,{provide:JF,useExisting:v6}],imports:[Ku]}),n})(),Dge=be("[Text] Text Plugin Loaded"),Age=be("[Text] Runs To Tag Loaded",{_as:"props",_p:void 0}),Ige=be("[Text] Tag Group Visibility Changed",{_as:"props",_p:void 0}),Pge=be("[Text] Text Data Loaded Loaded",{_as:"props",_p:void 0}),y6=Mr("text"),Rge=(J(y6,n=>n.runToTags),J(y6,n=>{let t=new Set,e=new Set;for(let i of n.visibleRunTags.values())for(let r of i){let o=JSON.stringify(r);t.has(o)||(t.add(o),e.add(r))}return[...e]})),Oge=J(y6,(n,t)=>{let e=n.data.get(t.run);return e&&e.get(t.tag)||null}),kge=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.loadRunToTags$=cr(()=>this.actions$.pipe(ii(Dge),ui(()=>this.dataSource.fetchRunToTag().pipe(kt(o=>{this.store.dispatch(Age({runToTags:o}))}),L(()=>{})))),{dispatch:!1}),this.loadData$=cr(()=>{let o=this.actions$.pipe(ii(Ige),ui(({visibleTextCards:a})=>{let l=a.map(({run:c,tag:u})=>this.store.select(Oge,{run:c,tag:u}).pipe(function(n,t){let e=arguments.length>=2;return i=>i.pipe(n?Ye((r,o)=>n(r,o,i)):ms,PW(1),e?_1(t):v1(()=>new _0))}(),L(d=>({run:c,tag:u,textData:d}))));return lr(l).pipe(L(c=>c.filter(({textData:u})=>null===u).map(({run:u,tag:d})=>({run:u,tag:d}))))}));return Jt(o,this.actions$.pipe(ii(Fa,aa),Wt(this.store.select(Rge)),L(([,a])=>a))).pipe(xn(a=>lr(a.map(l=>this.fetchTextData(l)))))},{dispatch:!1})}fetchTextData(e){let{run:i,tag:r}=e;return this.dataSource.fetchTextData(i,r).pipe(kt(o=>{this.store.dispatch(Pge({run:i,tag:r,stepData:o}))}),L(()=>{}))}}return n.\u0275fac=function(e){return new(e||n)(j(Po),j(Ce),j(JF))},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),$tt=vr({runToTags:new Map([["run1",["a/b","a/c"]],["run2",["a/b","a/d"]],["run3",["c","a/b"]]]),data:new Map([["run1",new Map([["a/b",[{originalShape:[3],step:0,stringArray:[["foo","bar","baz"]],wallTimeInMs:15778656e5,truncated:!1},{originalShape:[3],step:1,stringArray:[["foo","baz"]],wallTimeInMs:1577865601e3,truncated:!1}]],["a/c",[{originalShape:[3],step:0,stringArray:[["We conducted an experiment and found the following data:\n\nPounds of chocolate | Happiness\n---|---\n0 | 1\n1 | 4\n2 | 9\n3 | 16\n4 | 25\n5 | 36\n6 | 49\n7 | 64\n8 | 81\n9 | 100\n10 | 121"]],wallTimeInMs:15778656e5,truncated:!1},{originalShape:[3],step:1,stringArray:[["\xd7","**0**","**1**","**2**","**3**","**4**","**5**"],["**0**","0","0","0","0","0","0"],["**1**","0","1","2","3","4","5"],["**2**","0","2","4","6","8","10"],["**3**","0","3","6","9","12","15"],["**4**","0","4","8","12","16","20"],["**5**","0","5","10","15","20","25"]],wallTimeInMs:1577865601e3,truncated:!1}]]])]]),visibleRunTags:new Map});function Fge(n,t){return $tt(n,t)}var Nge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["text-dashboard"]],decls:1,vars:0,template:function(e,i){1&e&&A(0," This is the text dashboard ")},encapsulation:2,changeDetection:0}),n})(),Lge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Bge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,Lge,Bs.forPlugin("text_v2",Nge),Tge,wr.forFeature("text",Fge),ro.forFeature([kge])]}),n})(),Vge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[_oe,Nhe,Ege,Bge]}),n})(),Fp=(()=>(function(n){n.CUSTOM_ELEMENT="CUSTOM_ELEMENT",n.IFRAME="IFRAME",n.NG_COMPONENT="NG_COMPONENT",n.NONE="NONE"}(Fp||(Fp={})),Fp))(),ent=["pluginContainer"],tnt=["ngPluginContainer"];function nnt(n,t){1&n&&Ni(0)}function int(n,t){if(1&n&&(sn(0),E(1,nnt,1,0,"ng-container",9),an()),2&n){let e=S(2),i=$e(6);C(1),y("ngTemplateOutlet",e.environmentFailureNotFoundTemplate?e.environmentFailureNotFoundTemplate:i)}}function rnt(n,t){1&n&&Ni(0)}function ont(n,t){if(1&n&&(sn(0),E(1,rnt,1,0,"ng-container",9),an()),2&n){let e=S(2),i=$e(6);C(1),y("ngTemplateOutlet",e.environmentFailurePermissionDeniedTemplate?e.environmentFailurePermissionDeniedTemplate:i)}}function snt(n,t){1&n&&Ni(0)}function ant(n,t){if(1&n&&(sn(0),E(1,snt,1,0,"ng-container",9),an()),2&n){let e=S(2),i=$e(6);C(1),y("ngTemplateOutlet",e.environmentFailureUnknownTemplate?e.environmentFailureUnknownTemplate:i)}}function lnt(n,t){if(1&n&&(sn(0),_(1,"h3",10),A(2," There\u2019s no dashboard by the name of \u201c"),_(3,"code"),A(4),v(),A(5,"\u201d. "),v(),_(6,"p"),A(7,"You can select a dashboard from the list above."),v(),_(8,"p"),Ni(9,11),v(),an()),2&n){let e=S(2),i=$e(8);C(4),yt(e.activePluginId),C(5),y("ngTemplateOutlet",i)}}function cnt(n,t){if(1&n&&(sn(0),_(1,"h3",12),A(2," No dashboards are active for the current data set. "),v(),_(3,"p"),A(4,"Probable causes:"),v(),_(5,"ul")(6,"li"),A(7,"You haven\u2019t written any data to your event files."),v(),_(8,"li"),A(9,"TensorBoard can\u2019t find your event files."),v()(),A(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 "),_(11,"a",13),A(12,"README"),v(),A(13," and perhaps the "),_(14,"a",14),A(15,"TensorBoard tutorial"),v(),A(16,". "),_(17,"p"),A(18," If you think TensorBoard is configured properly, please see "),_(19,"a",15),A(20,"the section of the README devoted to missing data problems"),v(),A(21," and consider filing an issue on GitHub. "),v(),_(22,"p"),Ni(23,11),v(),an()),2&n){S(2);let e=$e(8);C(23),y("ngTemplateOutlet",e)}}function unt(n,t){if(1&n&&(_(0,"div",6)(1,"div",7),E(2,int,2,1,"ng-container",8),E(3,ont,2,1,"ng-container",8),E(4,ant,2,1,"ng-container",8),E(5,lnt,10,2,"ng-container",8),E(6,cnt,24,1,"ng-container",8),v()()),2&n){let e=S();y("ngSwitch",e.pluginLoadState),C(2),y("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_NOT_FOUND),C(1),y("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_PERMISSION_DENIED),C(1),y("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_UNKNOWN),C(1),y("ngSwitchCase",e.PluginLoadState.UNKNOWN_PLUGIN_ID),C(1),y("ngSwitchCase",e.PluginLoadState.NO_ENABLED_PLUGINS)}}function dnt(n,t){if(1&n&&(_(0,"h3",16),A(1,"Data could not be loaded."),v(),_(2,"p"),A(3,"The TensorBoard server may be down or inaccessible."),v(),_(4,"p"),Ni(5,11),v()),2&n){S();let e=$e(8);C(5),y("ngTemplateOutlet",e)}}function pnt(n,t){if(1&n&&(_(0,"p",19)(1,"i"),A(2,"Log directory: "),_(3,"span"),A(4),v()()()),2&n){let e=S(2);C(4),yt(e.dataLocation)}}function hnt(n,t){if(1&n&&(_(0,"span",17),A(1),B(2,"date"),v(),E(3,pnt,5,1,"p",18)),2&n){let e=S();C(1),je("Last reload: ",Jf(2,2,e.lastUpdated,"medium"),""),C(2),y("ngIf",e.dataLocation)}}var fnt=function(n){return{plugins:!0,"is-first-party-plugin":n}},yc=(()=>(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"}(yc||(yc={})),yc))(),Hge=(()=>{class n{constructor(e,i,r){this.componentFactoryResolver=e,this.pluginRegistry=i,this.pluginApiHost=r,this.PluginLoadState=yc,this.LoadingMechanismType=Fp,this.pluginInstances=new Map}ngOnChanges(e){if(!this.isFeatureFlagsLoaded||!this.activeKnownPlugin||this.settingsLoadState===Oe.NOT_LOADED||this.settingsLoadState===Oe.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 Fp.CUSTOM_ELEMENT:i=document.createElement(e.loading_mechanism.element_name),i.reloadOnReady=!1,i.featureFlags=this.featureFlags,this.pluginsContainer.nativeElement.appendChild(i);break;case Fp.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 Fp.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 Fp.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)(M(gs),M(Bs),M(r2,8))},n.\u0275cmp=R({type:n,selectors:[["plugins-component"]],viewQuery:function(e,i){if(1&e&&(ot(ent,7,Re),ot(tnt,7,Oi)),2&e){let r;Ne(r=Le())&&(i.pluginsContainer=r.first),Ne(r=Le())&&(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:[Ft],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&&(_(0,"div",0,1),Ni(2,null,2),v(),E(4,unt,7,6,"div",3),E(5,dnt,6,1,"ng-template",null,4,qt),E(7,hnt,4,5,"ng-template",null,5,qt)),2&e&&(y("ngClass",On(2,fnt,(null==i.activeKnownPlugin?null:i.activeKnownPlugin.loading_mechanism.type)!==i.LoadingMechanismType.IFRAME)),C(4),y("ngIf",i.pluginLoadState!==i.PluginLoadState.LOADED&&i.pluginLoadState!==i.PluginLoadState.LOADING))},dependencies:[Fn,Be,os,Cr,Ur,U_],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})(),mnt=J(rv,Rs,(n,t)=>t&&n[t]?Object.assign({id:t},n[t]):null),eN=(()=>{class n{constructor(e){this.store=e,this.activeKnownPlugin$=this.store.select(mnt),this.activePluginId$=this.store.select(Rs),this.pluginLoadState$=Lt(this.activeKnownPlugin$,this.activePluginId$,this.store.select(nI)).pipe(L(([i,r,o])=>null!==o.failureCode?o.failureCode===$l.NOT_FOUND?yc.ENVIRONMENT_FAILURE_NOT_FOUND:o.failureCode===$l.PERMISSION_DENIED?yc.ENVIRONMENT_FAILURE_PERMISSION_DENIED:yc.ENVIRONMENT_FAILURE_UNKNOWN:null!==i?yc.LOADED:null===o.lastLoadedTimeInMs&&o.state===Oe.LOADING?yc.LOADING:r?yc.UNKNOWN_PLUGIN_ID:yc.NO_ENABLED_PLUGINS)),this.lastLoadedTimeInMs$=this.store.select(iv),this.dataLocation$=this.store.select(ov).pipe(L(i=>i.data_location)),this.isFeatureFlagsLoaded$=this.store.select(gh),this.featureFlags$=this.store.select(bs),this.settingsLoadState$=this.store.select(Na.getSettingsLoadState)}}return n.\u0275fac=function(e){return new(e||n)(M(Ce))},n.\u0275cmp=R({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&&(O(0,"plugins-component",0),B(1,"async"),B(2,"async"),B(3,"async"),B(4,"async"),B(5,"async"),B(6,"async"),B(7,"async"),B(8,"async")),2&e&&y("activeKnownPlugin",U(1,11,i.activeKnownPlugin$))("activePluginId",U(2,13,i.activePluginId$))("dataLocation",U(3,15,i.dataLocation$))("lastUpdated",U(4,17,i.lastLoadedTimeInMs$))("pluginLoadState",U(5,19,i.pluginLoadState$))("isFeatureFlagsLoaded",U(6,21,i.isFeatureFlagsLoaded$))("settingsLoadState",U(7,23,i.settingsLoadState$))("featureFlags",U(8,25,i.featureFlags$))("environmentFailureNotFoundTemplate",i.environmentFailureNotFoundTemplate)("environmentFailurePermissionDeniedTemplate",i.environmentFailurePermissionDeniedTemplate)("environmentFailureUnknownTemplate",i.environmentFailureUnknownTemplate)},styles:["plugins-component[_ngcontent-%COMP%] { height: 100%; }"],changeDetection:0}),n})(),tN=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[ec,Me,Bs]}),n})();Nx(eN,[Hge],[Ge]);var Uge=(()=>{class n{constructor(e,i){this.store=e,this.document=i,this.onVisibilityChange=this.onVisibilityChangeImpl.bind(this),this.reloadEnabled$=this.store.pipe(vt(Na.getReloadEnabled)),this.reloadPeriodInMs$=this.store.pipe(vt(Na.getReloadPeriodInMs)),this.reloadTimerId=null,this.missedAutoReload=!1,this.ngUnsubscribe=new ke}ngOnInit(){this.document.addEventListener("visibilitychange",this.onVisibilityChange),Lt(this.reloadEnabled$.pipe(yi()),this.reloadPeriodInMs$.pipe(yi())).pipe(st(this.ngUnsubscribe)).subscribe(([e,i])=>{this.cancelLoad(),e&&this.load(i)})}onVisibilityChangeImpl(){"visible"===this.document.visibilityState&&this.missedAutoReload&&(this.missedAutoReload=!1,this.store.dispatch(aa()))}load(e){this.reloadTimerId=setTimeout(()=>{"visible"===this.document.visibilityState?this.store.dispatch(aa()):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)(M(Ce),M(Ht))},n.\u0275cmp=R({type:n,selectors:[["reloader"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),zge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=R({type:n,selectors:[["tensorboard-wrapper-component"]],decls:2,vars:0,consts:[[1,"plugins"]],template:function(e,i){1&e&&O(0,"plugins",0)(1,"reloader")},dependencies:[eN,Uge],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})(),jge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ye({token:n,factory:n.\u0275fac}),n})(),b6="smoothing",x6="runColorGroup",C6="tagFilter",M6="runFilter",w6="regex:",nN=class extends jge{getMetricsPinnedCards(t){return Lt([t.select(zM),t.select(vee)]).pipe(L(([e,i])=>{if(!e.length&&!i.length)return[];let o=[...e.map(({plugin:s,tag:a,sample:l,runId:c})=>{let u={plugin:s,tag:a};return ml(s)&&(u.runId=c),fl(s)&&(u.sample=l),u}),...i];return[{key:"pinnedCards",value:JSON.stringify(o)}]}))}serializeStateToQueryParams(t){return Lt([this.getMetricsPinnedCards(t),t.select(Xc).pipe(L(e=>e?[{key:C6,value:e}]:[])),Lt([t.select(zA),t.select(Hm)]).pipe(L(([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(bee).pipe(L(e=>Number.isFinite(e.scalarSmoothing)?[{key:b6,value:String(e.scalarSmoothing)}]:[])),t.select(rH).pipe(L(e=>{if(!e)return[];let i;switch(e.key){case sr.EXPERIMENT:i="experiment";break;case sr.RUN:i="run";break;case sr.REGEX:i=`${w6}${e.regexString}`;break;default:throw new RangeError("Serialization not implemented")}return[{key:x6,value:i}]})),t.select(Qm).pipe(L(e=>e?[{key:M6,value:e}]:[]))]).pipe(L(e=>e.flat()))}deserializeQueryParams(t){let e=null,i=null,r=null,o=null,s=null;for(let{key:a,value:l}of t)switch(a){case"pinnedCards":e=vnt(l);break;case b6:i=Number(l);break;case x6:switch(l){case"experiment":o={key:sr.EXPERIMENT};break;case"run":o={key:sr.RUN}}if(l.startsWith(w6)){let c=l.slice(w6.length);o={key:sr.REGEX,regexString:c}}break;case C6:r=l;break;case M6:s=l}return{metrics:{pinnedCards:e||[],smoothing:i,tagFilter:r},runs:{groupBy:o,regexFilter:s}}}};function vnt(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,s="number"==typeof i.sample,a="string"==typeof i.tag,l=o||typeof i.runId>"u",c=s||typeof i.sample>"u";if(!("string"==typeof i.plugin&&a&&l&&c&&X$(i.plugin)&&i.tag))continue;if(ml(i.plugin)){if(!i.runId)continue}else if(i.runId)continue;if(s&&(!fl(i.plugin)||!Number.isInteger(i.sample)||i.sample<0))continue;let u={plugin:i.plugin,tag:i.tag};o&&(u.runId=i.runId),s&&(u.sample=i.sample),e.push(u)}return e}function Wge(){return[{routeKind:hi.EXPERIMENT,path:"/",ngComponent:zge,defaultRoute:!0,deepLinkProvider:new nN},{routeKind:hi.FLAGS,path:"/flags/",ngComponent:W2}]}function ynt(n){return(t,e)=>{let i=n(t,e);return console.groupCollapsed(e.type),console.log("prev state",t),console.log("action",e),console.log("next state",i),console.groupEnd(),i}}function qge(){return tC()?ynt:n=>(t,e)=>n(t,e)}nN=pW([rq()],nN);var Yge=new pe("Root reducers token",{factory:()=>({})}),Xge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({providers:[{provide:W_,useFactory:qge,multi:!0}],imports:[wr.forRoot(Yge,{runtimeChecks:{strictStateImmutability:!0,strictActionImmutability:!0,strictActionSerializability:!1,strictStateSerializability:!1}}),ro.forRoot([])]}),n})(),Qge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({}),n})(),Kge=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n}),n.\u0275inj=V({imports:[Me,tN,Qge]}),n})(),S6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=H({type:n,bootstrap:[Uie]}),n.\u0275inj=V({imports:[cv,Zie,tA,eJ,J_,zie,qc.registerRoutes(Wge),E2,S2,jie,Kge,ec,Qie,Wie,ere,mI,tre,qie,T4,r2,tN,$I,$2,Xge,Vge]}),n})();"loading"!==document.readyState?y5().bootstrapModule(S6):window.addEventListener("DOMContentLoaded",()=>{y5().bootstrapModule(S6)}),function(){if(aX)throw new Error("Cannot enable prod mode after platform setup.");sX=!1}()})();
/** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.3.6 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.6',
        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;

    //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)) {
                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)));

