代码拉取完成,页面将自动刷新
"use strict";(self.webpackChunkintroduce=self.webpackChunkintroduce||[]).push([[877],{7877:(cu,$r,O)=>{O.r($r),O.d($r,{MainModule:()=>lu});var me=O(6895),Wn=O(9541),c=O(6682),Bt=O(9011),Ht=O(6497),W=O(9749),Ut=O(2549);function Xr(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}var be,Zn,He,Ct,Mt,si,Qr,zt,xi,qr,gt,Je,Jr=function(){return be||typeof window<"u"&&(be=window.gsap)&&be.registerPlugin&&be},eo=1,ai=[],k=[],st=[],Ai=Date.now,Kn=function(t,e){return e},wt=function(t,e){return~st.indexOf(t)&&st[st.indexOf(t)+1][e]},Ti=function(t){return!!~qr.indexOf(t)},Le=function(t,e,i,r,o){return t.addEventListener(e,i,{passive:!r,capture:!!o})},Te=function(t,e,i,r){return t.removeEventListener(e,i,!!r)},rn="scrollLeft",on="scrollTop",$n=function(){return gt&>.isPressed||k.cache++},sn=function(t,e){var i=function r(o){if(o||0===o){eo&&(He.history.scrollRestoration="manual");var a=gt&>.isPressed;o=r.v=Math.round(o)||(gt&>.iOS?1:0),t(o),r.cacheID=k.cache,a&&Kn("ss",o)}else(e||k.cache!==r.cacheID||Kn("ref"))&&(r.cacheID=k.cache,r.v=t());return r.v+r.offset};return i.offset=0,t&&i},De={s:rn,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:sn(function(n){return arguments.length?He.scrollTo(n,ce.sc()):He.pageXOffset||Ct[rn]||Mt[rn]||si[rn]||0})},ce={s:on,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:De,sc:sn(function(n){return arguments.length?He.scrollTo(De.sc(),n):He.pageYOffset||Ct[on]||Mt[on]||si[on]||0})},Be=function(t){return be.utils.toArray(t)[0]||("string"==typeof t&&!1!==be.config().nullTargetWarn?console.warn("Element not found:",t):null)},Et=function(t,e){var i=e.s,r=e.sc;Ti(t)&&(t=Ct.scrollingElement||Mt);var o=k.indexOf(t),a=r===ce.sc?1:2;!~o&&(o=k.push(t)-1),k[o+a]||t.addEventListener("scroll",$n);var l=k[o+a],d=l||(k[o+a]=sn(wt(t,i),!0)||(Ti(t)?r:sn(function(g){return arguments.length?t[i]=g:t[i]})));return d.target=t,l||(d.smooth="smooth"===be.getProperty(t,"scrollBehavior")),d},Xn=function(t,e,i){var r=t,o=t,a=Ai(),l=a,d=e||50,g=Math.max(500,3*d),p=function(y,L){var U=Ai();L||U-a>d?(o=r,r=y,l=a,a=U):i?r+=y:r=o+(y-o)/(U-l)*(a-l)};return{update:p,reset:function(){o=r=i?0:r,l=a=0},getVelocity:function(y){var L=l,U=o,T=Ai();return(y||0===y)&&y!==r&&p(y),a===l||T-l>g?0:(r+(i?U:-U))/((i?T:a)-L)*1e3}}},Di=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},to=function(t){var e=Math.max.apply(Math,t),i=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(i)?e:i},io=function(){var t,e,i,r;(xi=be.core.globals().ScrollTrigger)&&xi.core&&(e=(t=xi.core).bridge||{},r=t._proxies,(i=t._scrollers).push.apply(i,k),r.push.apply(r,st),k=i,st=r,Kn=function(a,l){return e[a](l)})},no=function(t){return(be=t||Jr())&&typeof document<"u"&&document.body&&(He=window,Ct=document,qr=[He,Ct,Mt=Ct.documentElement,si=Ct.body],zt="onpointerenter"in si?"pointer":"mouse",Qr=oe.isTouch=He.matchMedia&&He.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in He||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Je=oe.eventTypes=("ontouchstart"in Mt?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Mt?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return eo=0},500),io(),Zn=1),Zn};De.op=ce,k.cache=0;var oe=function(){function n(e){this.init(e)}return n.prototype.init=function(i){Zn||no(be)||console.warn("Please gsap.registerPlugin(Observer)"),xi||io();var r=i.tolerance,o=i.dragMinimum,a=i.type,l=i.target,d=i.lineHeight,g=i.debounce,p=i.preventDefault,v=i.onStop,_=i.onStopDelay,m=i.ignore,y=i.wheelSpeed,L=i.event,U=i.onDragStart,T=i.onDragEnd,se=i.onDrag,ne=i.onPress,I=i.onRelease,Fe=i.onRight,X=i.onLeft,D=i.onUp,Ge=i.onDown,nt=i.onChangeX,S=i.onChangeY,z=i.onChange,N=i.onToggleX,dt=i.onToggleY,ve=i.onHover,ye=i.onHoverEnd,B=i.onMove,Pe=i.ignoreCheck,j=i.isNormalizer,de=i.onGestureStart,u=i.onGestureEnd,Qe=i.onWheel,St=i.onEnable,kt=i.onDisable,Ft=i.onClick,Pt=i.scrollSpeed,Y=i.capture,Ee=i.allowClicks,Ie=i.lockAxis,$i=i.onLockAxis;this.target=l=Be(l)||Mt,this.vars=i,m&&(m=be.utils.toArray(m)),r=r||1e-9,o=o||0,y=y||1,Pt=Pt||1,a=a||"wheel,touch,pointer",g=!1!==g,d||(d=parseFloat(He.getComputedStyle(si).lineHeight)||22);var je,qe,V,xe,Ye,ut,Ne,h=this,vt=0,K=0,It=Et(l,De),Nt=Et(l,ce),Ci=It(),Re=Nt(),Xi=~a.indexOf("touch")&&!~a.indexOf("pointer")&&"pointerdown"===Je[0],Rt=Ti(l),re=l.ownerDocument||Ct,We=[0,0,0],Ae=[0,0,0],Qi=0,Ve=function(){return Qi=Ai()},ht=function(f,b){return(h.event=f)&&m&&~m.indexOf(f.target)||b&&Xi&&"touch"!==f.pointerType||Pe&&Pe(f,b)},Vt=function(){var f=h.deltaX=to(We),b=h.deltaY=to(Ae),C=Math.abs(f)>=r,w=Math.abs(b)>=r;z&&(C||w)&&z(h,f,b,We,Ae),C&&(Fe&&h.deltaX>0&&Fe(h),X&&h.deltaX<0&&X(h),nt&&nt(h),N&&h.deltaX<0!=vt<0&&N(h),vt=h.deltaX,We[0]=We[1]=We[2]=0),w&&(Ge&&h.deltaY>0&&Ge(h),D&&h.deltaY<0&&D(h),S&&S(h),dt&&h.deltaY<0!=K<0&&dt(h),K=h.deltaY,Ae[0]=Ae[1]=Ae[2]=0),(xe||V)&&(B&&B(h),V&&(se(h),V=!1),xe=!1),ut&&!(ut=!1)&&$i&&$i(h),Ye&&(Qe(h),Ye=!1),je=0},ni=function(f,b,C){We[C]+=f,Ae[C]+=b,h._vx.update(f),h._vy.update(b),g?je||(je=requestAnimationFrame(Vt)):Vt()},Mi=function(f,b){Ie&&!Ne&&(h.axis=Ne=Math.abs(f)>Math.abs(b)?"x":"y",ut=!0),"y"!==Ne&&(We[2]+=f,h._vx.update(f,!0)),"x"!==Ne&&(Ae[2]+=b,h._vy.update(b,!0)),g?je||(je=requestAnimationFrame(Vt)):Vt()},H=function(f){if(!ht(f,1)){var b=(f=Di(f,p)).clientX,C=f.clientY,w=b-h.x,ue=C-h.y,E=h.isDragging;h.x=b,h.y=C,(E||Math.abs(h.startX-b)>=o||Math.abs(h.startY-C)>=o)&&(se&&(V=!0),E||(h.isDragging=!0),Mi(w,ue),E||U&&U(h))}},Lt=h.onPress=function(R){ht(R,1)||(h.axis=Ne=null,qe.pause(),h.isPressed=!0,R=Di(R),vt=K=0,h.startX=h.x=R.clientX,h.startY=h.y=R.clientY,h._vx.reset(),h._vy.reset(),Le(j?l:re,Je[1],H,p,!0),h.deltaX=h.deltaY=0,ne&&ne(h))},Ze=function(f){if(!ht(f,1)){Te(j?l:re,Je[1],H,!0);var b=h.isDragging&&(Math.abs(h.x-h.startX)>3||Math.abs(h.y-h.startY)>3),C=Di(f);b||(h._vx.reset(),h._vy.reset(),p&&Ee&&be.delayedCall(.08,function(){if(Ai()-Qi>300&&!f.defaultPrevented)if(f.target.click)f.target.click();else if(re.createEvent){var w=re.createEvent("MouseEvents");w.initMouseEvent("click",!0,!0,He,1,C.screenX,C.screenY,C.clientX,C.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(w)}})),h.isDragging=h.isGesturing=h.isPressed=!1,v&&!j&&qe.restart(!0),T&&b&&T(h),I&&I(h,b)}},rt=function(f){return f.touches&&f.touches.length>1&&(h.isGesturing=!0)&&de(f,h.isDragging)},ft=function(){return(h.isGesturing=!1)||u(h)},pt=function(f){if(!ht(f)){var b=It(),C=Nt();ni((b-Ci)*Pt,(C-Re)*Pt,1),Ci=b,Re=C,v&&qe.restart(!0)}},ri=function(f){if(!ht(f)){f=Di(f,p),Qe&&(Ye=!0);var b=(1===f.deltaMode?d:2===f.deltaMode?He.innerHeight:1)*y;ni(f.deltaX*b,f.deltaY*b,0),v&&!j&&qe.restart(!0)}},wi=function(f){if(!ht(f)){var b=f.clientX,C=f.clientY,w=b-h.x,ue=C-h.y;h.x=b,h.y=C,xe=!0,(w||ue)&&Mi(w,ue)}},yt=function(f){h.event=f,ve(h)},Ji=function(f){h.event=f,ye(h)},en=function(f){return ht(f)||Di(f,p)&&Ft(h)};qe=h._dc=be.delayedCall(_||.25,function(){h._vx.reset(),h._vy.reset(),qe.pause(),v&&v(h)}).pause(),h.deltaX=h.deltaY=0,h._vx=Xn(0,50,!0),h._vy=Xn(0,50,!0),h.scrollX=It,h.scrollY=Nt,h.isDragging=h.isGesturing=h.isPressed=!1,h.enable=function(R){return h.isEnabled||(Le(Rt?re:l,"scroll",$n),a.indexOf("scroll")>=0&&Le(Rt?re:l,"scroll",pt,p,Y),a.indexOf("wheel")>=0&&Le(l,"wheel",ri,p,Y),(a.indexOf("touch")>=0&&Qr||a.indexOf("pointer")>=0)&&(Le(l,Je[0],Lt,p,Y),Le(re,Je[2],Ze),Le(re,Je[3],Ze),Ee&&Le(l,"click",Ve,!1,!0),Ft&&Le(l,"click",en),de&&Le(re,"gesturestart",rt),u&&Le(re,"gestureend",ft),ve&&Le(l,zt+"enter",yt),ye&&Le(l,zt+"leave",Ji),B&&Le(l,zt+"move",wi)),h.isEnabled=!0,R&&R.type&&Lt(R),St&&St(h)),h},h.disable=function(){h.isEnabled&&(ai.filter(function(R){return R!==h&&Ti(R.target)}).length||Te(Rt?re:l,"scroll",$n),h.isPressed&&(h._vx.reset(),h._vy.reset(),Te(j?l:re,Je[1],H,!0)),Te(Rt?re:l,"scroll",pt,Y),Te(l,"wheel",ri,Y),Te(l,Je[0],Lt,Y),Te(re,Je[2],Ze),Te(re,Je[3],Ze),Te(l,"click",Ve,!0),Te(l,"click",en),Te(re,"gesturestart",rt),Te(re,"gestureend",ft),Te(l,zt+"enter",yt),Te(l,zt+"leave",Ji),Te(l,zt+"move",wi),h.isEnabled=h.isPressed=h.isDragging=!1,kt&&kt(h))},h.kill=function(){h.disable();var R=ai.indexOf(h);R>=0&&ai.splice(R,1),gt===h&&(gt=0)},ai.push(h),j&&Ti(l)&&(gt=h),h.enable(L)},function Ca(n,t,e){t&&Xr(n.prototype,t),e&&Xr(n,e)}(n,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),n}();oe.version="3.11.3",oe.create=function(n){return new oe(n)},oe.register=no,oe.getAll=function(){return ai.slice()},oe.getById=function(n){return ai.filter(function(t){return t.vars.id===n})[0]},Jr()&&be.registerPlugin(oe);var M,li,F,$,at,Q,ro,an,ln,ci,cn,dn,Ce,un,Qn,Oe,oo,so,di,ao,qn,lo,Ue,co,uo,ho,xt,Jn,er,tr,Ri,tt,To,Xt,hn=1,Se=Date.now,ir=Se(),Ke=0,fn=0,fo=function(){return un=1},po=function(){return un=0},lt=function(t){return t},Oi=function(t){return Math.round(1e5*t)/1e5||0},mo=function(){return typeof window<"u"},go=function(){return M||mo()&&(M=window.gsap)&&M.registerPlugin&&M},Gt=function(t){return!!~ro.indexOf(t)},_o=function(t){return wt(t,"getBoundingClientRect")||(Gt(t)?function(){return Tn.width=F.innerWidth,Tn.height=F.innerHeight,Tn}:function(){return _t(t)})},At=function(t,e){var i,r=e.d2,o=e.d,a=e.a;return(i="scroll"+r)&&(a=wt(t,i))?a()-_o(t)()[o]:Gt(t)?(at[i]||Q[i])-(F["inner"+r]||at["client"+r]||Q["client"+r]):t[i]-t["offset"+r]},pn=function(t,e){for(var i=0;i<di.length;i+=3)(!e||~e.indexOf(di[i+1]))&&t(di[i],di[i+1],di[i+2])},et=function(t){return"string"==typeof t},Me=function(t){return"function"==typeof t},Si=function(t){return"number"==typeof t},mn=function(t){return"object"==typeof t},ki=function(t,e,i){return t&&t.progress(e?0:1)&&i&&t.pause()},nr=function(t,e){if(t.enabled){var i=e(t);i&&i.totalTime&&(t.callbackAnimation=i)}},ui=Math.abs,rr="right",or="bottom",jt="width",Yt="height",Fi="Right",Pi="Left",Ii="Top",Ni="Bottom",ie="padding",$e="margin",hi="Width",ge="px",ct=function(t){return F.getComputedStyle(t)},bo=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},_t=function(t,e){var i=e&&"matrix(1, 0, 0, 1, 0, 0)"!==ct(t)[Qn]&&M.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=t.getBoundingClientRect();return i&&i.progress(0).kill(),r},ar=function(t,e){var i=e.d2;return t["offset"+i]||t["client"+i]||0},Co=function(t){var o,e=[],i=t.labels,r=t.duration();for(o in i)e.push(i[o]/r);return e},lr=function(t){var e=M.utils.snap(t),i=Array.isArray(t)&&t.slice(0).sort(function(r,o){return r-o});return i?function(r,o,a){var l;if(void 0===a&&(a=.001),!o)return e(r);if(o>0){for(r-=a,l=0;l<i.length;l++)if(i[l]>=r)return i[l];return i[l-1]}for(l=i.length,r+=a;l--;)if(i[l]<=r)return i[l];return i[0]}:function(r,o,a){void 0===a&&(a=.001);var l=e(r);return!o||Math.abs(l-r)<a||l-r<0==o<0?l:e(o<0?r-t:r+t)}},_n=function(t,e,i,r){return i.split(",").forEach(function(o){return t(e,o,r)})},_e=function(t,e,i,r,o){return t.addEventListener(e,i,{passive:!r,capture:!!o})},fe=function(t,e,i,r){return t.removeEventListener(e,i,!!r)},vn=function(t,e,i){return i&&i.wheelHandler&&t(e,"wheel",i)},Mo={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},yn={toggleActions:"play",anticipatePin:0},bn={top:0,left:0,center:.5,bottom:1,right:1},Cn=function(t,e){if(et(t)){var i=t.indexOf("="),r=~i?+(t.charAt(i-1)+1)*parseFloat(t.substr(i+1)):0;~i&&(t.indexOf("%")>i&&(r*=e/100),t=t.substr(0,i-1)),t=r+(t in bn?bn[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Mn=function(t,e,i,r,o,a,l,d){var g=o.startColor,p=o.endColor,v=o.fontSize,_=o.indent,m=o.fontWeight,y=$.createElement("div"),L=Gt(i)||"fixed"===wt(i,"pinType"),U=-1!==t.indexOf("scroller"),T=L?Q:i,se=-1!==t.indexOf("start"),ne=se?g:p,I="border-color:"+ne+";font-size:"+v+";color:"+ne+";font-weight:"+m+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return I+="position:"+((U||d)&&L?"fixed;":"absolute;"),(U||d||!L)&&(I+=(r===ce?rr:or)+":"+(a+parseFloat(_))+"px;"),l&&(I+="box-sizing:border-box;text-align:left;width:"+l.offsetWidth+"px;"),y._isStart=se,y.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),y.style.cssText=I,y.innerText=e||0===e?t+"-"+e:t,T.children[0]?T.insertBefore(y,T.children[0]):T.appendChild(y),y._offset=y["offset"+r.op.d2],wn(y,0,r,se),y},wn=function(t,e,i,r){var o={display:"block"},a=i[r?"os2":"p2"],l=i[r?"p2":"os2"];t._isFlipped=r,o[i.a+"Percent"]=r?-100:0,o[i.a]=r?"1px":0,o["border"+a+hi]=1,o["border"+l+hi]=0,o[i.p]=e+"px",M.set(t,o)},x=[],cr={},wo=function(){return Se()-Ke>34&&(Ri||(Ri=requestAnimationFrame(Qt)))},fi=function(){(!Ue||!Ue.isPressed||Ue.startX>Q.clientWidth)&&(k.cache++,Ue?Ri||(Ri=requestAnimationFrame(Qt)):Qt(),Ke||Zt("scrollStart"),Ke=Se())},dr=function(){ho=F.innerWidth,uo=F.innerHeight},Vi=function(){k.cache++,!Ce&&!lo&&!$.fullscreenElement&&!$.webkitFullscreenElement&&(!co||ho!==F.innerWidth||Math.abs(F.innerHeight-uo)>.25*F.innerHeight)&&an.restart(!0)},Wt={},Oa=[],Eo=function n(){return fe(P,"scrollEnd",n)||$t(!0)},Zt=function(t){return Wt[t]&&Wt[t].map(function(e){return e()})||Oa},ze=[],xo=function(t){for(var e=0;e<ze.length;e+=5)(!t||ze[e+4]&&ze[e+4].query===t)&&(ze[e].style.cssText=ze[e+1],ze[e].getBBox&&ze[e].setAttribute("transform",ze[e+2]||""),ze[e+3].uncache=1)},ur=function(t,e){var i;for(Oe=0;Oe<x.length;Oe++)(i=x[Oe])&&(!e||i._ctx===e)&&(t?i.kill(1):i.revert(!0,!0));e&&xo(e),e||Zt("revert")},Ao=function(t,e){k.cache++,(e||!tt)&&k.forEach(function(i){return Me(i)&&i.cacheID++&&(i.rec=0)}),et(t)&&(F.history.scrollRestoration=er=t)},Kt=0,$t=function(t,e){if(!Ke||t){tt=P.isRefreshing=!0,k.forEach(function(r){return Me(r)&&r.cacheID++&&(r.rec=r())});var i=Zt("refreshInit");ao&&P.sort(),e||ur(),k.forEach(function(r){Me(r)&&(r.smooth&&(r.target.style.scrollBehavior="auto"),r(0))}),x.slice(0).forEach(function(r){return r.refresh()}),x.forEach(function(r,o){if(r._subPinOffset&&r.pin){var a=r.vars.horizontal?"offsetWidth":"offsetHeight",l=r.pin[a];r.revert(!0,1),r.adjustPinSpacing(r.pin[a]-l),r.revert(!1,1)}}),x.forEach(function(r){return"max"===r.vars.end&&r.setPositions(r.start,Math.max(r.start+1,At(r.scroller,r._dir)))}),i.forEach(function(r){return r&&r.render&&r.render(-1)}),k.forEach(function(r){Me(r)&&(r.smooth&&requestAnimationFrame(function(){return r.target.style.scrollBehavior="smooth"}),r.rec&&r(r.rec))}),Ao(er,1),an.pause(),Kt++,Qt(2),x.forEach(function(r){return Me(r.vars.onRefresh)&&r.vars.onRefresh(r)}),tt=P.isRefreshing=!1,Zt("refresh")}else _e(P,"scrollEnd",Eo)},Do=0,En=1,Qt=function(t){if(!tt||2===t){P.isUpdating=!0,Xt&&Xt.update(0);var e=x.length,i=Se(),r=i-ir>=50,o=e&&x[0].scroll();if(En=Do>o?-1:1,Do=o,r&&(Ke&&!un&&i-Ke>200&&(Ke=0,Zt("scrollEnd")),cn=ir,ir=i),En<0){for(Oe=e;Oe-- >0;)x[Oe]&&x[Oe].update(0,r);En=1}else for(Oe=0;Oe<e;Oe++)x[Oe]&&x[Oe].update(0,r);P.isUpdating=!1}Ri=0},hr=["left","top",or,rr,$e+Ni,$e+Fi,$e+Ii,$e+Pi,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],xn=hr.concat([jt,Yt,"boxSizing","max"+hi,"maxHeight","position",$e,ie,ie+Ii,ie+Fi,ie+Ni,ie+Pi]),fr=function(t,e,i,r){if(!t._gsap.swappedIn){for(var d,o=hr.length,a=e.style,l=t.style;o--;)a[d=hr[o]]=i[d];a.position="absolute"===i.position?"absolute":"relative","inline"===i.display&&(a.display="inline-block"),l[or]=l[rr]="auto",a.flexBasis=i.flexBasis||"auto",a.overflow="visible",a.boxSizing="border-box",a[jt]=ar(t,De)+ge,a[Yt]=ar(t,ce)+ge,a[ie]=l[$e]=l.top=l.left="0",pi(r),l[jt]=l.maxWidth=i[jt],l[Yt]=l.maxHeight=i[Yt],l[ie]=i[ie],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Fa=/([A-Z])/g,pi=function(t){if(t){var o,a,e=t.t.style,i=t.length,r=0;for((t.t._gsap||M.core.getCache(t.t)).uncache=1;r<i;r+=2)o=t[r],(a=t[r+1])?e[o]=a:e[o]&&e.removeProperty(o.replace(Fa,"-$1").toLowerCase())}},An=function(t){for(var e=xn.length,i=t.style,r=[],o=0;o<e;o++)r.push(xn[o],i[xn[o]]);return r.t=t,r},Tn={left:0,top:0},Oo=function(t,e,i,r,o,a,l,d,g,p,v,_,m){Me(t)&&(t=t(d)),et(t)&&"max"===t.substr(0,3)&&(t=_+("="===t.charAt(4)?Cn("0"+t.substr(3),i):0));var L,U,T,y=m?m.time():0;if(m&&m.seek(0),Si(t))l&&wn(l,i,r,!0);else{Me(e)&&(e=e(d));var ne,I,Fe,X,se=(t||"0").split(" ");T=Be(e)||Q,(!(ne=_t(T)||{})||!ne.left&&!ne.top)&&"none"===ct(T).display&&(X=T.style.display,T.style.display="block",ne=_t(T),X?T.style.display=X:T.style.removeProperty("display")),I=Cn(se[0],ne[r.d]),Fe=Cn(se[1]||"0",i),t=ne[r.p]-g[r.p]-p+I+o-Fe,l&&wn(l,Fe,r,i-Fe<20||l._isStart&&Fe>20),i-=i-Fe}if(a){var D=t+i,Ge=a._isStart;L="scroll"+r.d2,wn(a,D,r,Ge&&D>20||!Ge&&(v?Math.max(Q[L],at[L]):a.parentNode[L])<=D+1),v&&(g=_t(l),v&&(a.style[r.op.p]=g[r.op.p]-r.op.m-a._offset+ge))}return m&&T&&(L=_t(T),m.seek(_),U=_t(T),m._caScrollDist=L[r.p]-U[r.p],t=t/m._caScrollDist*_),m&&m.seek(y),m?t:Math.round(t)},Ia=/(webkit|moz|length|cssText|inset)/i,So=function(t,e,i,r){if(t.parentNode!==e){var a,l,o=t.style;if(e===Q){for(a in t._stOrig=o.cssText,l=ct(t))!+a&&!Ia.test(a)&&l[a]&&"string"==typeof o[a]&&"0"!==a&&(o[a]=l[a]);o.top=i,o.left=r}else o.cssText=t._stOrig;M.core.getCache(t).uncache=1,e.appendChild(t)}},ko=function(t,e){var o,a,i=Et(t,e),r="_scroll"+e.p2,l=function d(g,p,v,_,m){var y=d.tween,L=p.onComplete,U={};return v=v||i(),m=_&&m||0,_=_||g-v,y&&y.kill(),o=Math.round(v),p[r]=g,p.modifiers=U,U[r]=function(T){return(T=Math.round(i()))!==o&&T!==a&&Math.abs(T-o)>3&&Math.abs(T-a)>3?(y.kill(),d.tween=0):T=v+_*y.ratio+m*y.ratio*y.ratio,a=o,o=Math.round(T)},p.onComplete=function(){d.tween=0,L&&L.call(y)},y=d.tween=M.to(t,p)};return t[r]=i,i.wheelHandler=function(){return l.tween&&l.tween.kill()&&(l.tween=0)},_e(t,"wheel",i.wheelHandler),l},P=function(){function n(e,i){li||n.register(M)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,i)}return n.prototype.init=function(i,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),fn){var Ee,Ie,$i,je,qe,V,xe,Ye,ut,Ne,h,vt,K,It,Nt,Ci,Re,Xi,Rt,re,We,Ae,Qi,Ve,ht,qi,Vt,ni,Mi,H,Lt,Ze,rt,ft,pt,ri,wi,yt,a=(i=bo(et(i)||Si(i)||i.nodeType?{trigger:i}:i,yn)).onUpdate,l=i.toggleClass,d=i.id,g=i.onToggle,p=i.onRefresh,v=i.scrub,_=i.trigger,m=i.pin,y=i.pinSpacing,L=i.invalidateOnRefresh,U=i.anticipatePin,T=i.onScrubComplete,se=i.onSnapComplete,ne=i.once,I=i.snap,Fe=i.pinReparent,X=i.pinSpacer,D=i.containerAnimation,Ge=i.fastScrollEnd,nt=i.preventOverlaps,S=i.horizontal||i.containerAnimation&&!1!==i.horizontal?De:ce,z=!v&&0!==v,N=Be(i.scroller||F),dt=M.core.getCache(N),ve=Gt(N),ye="fixed"===("pinType"in i?i.pinType:wt(N,"pinType")||ve&&"fixed"),B=[i.onEnter,i.onLeave,i.onEnterBack,i.onLeaveBack],Pe=z&&i.toggleActions.split(" "),j="markers"in i?i.markers:yn.markers,de=ve?0:parseFloat(ct(N)["border"+S.p2+hi])||0,u=this,Qe=i.onRefreshInit&&function(){return i.onRefreshInit(u)},St=function(t,e,i){var r=i.d,o=i.d2,a=i.a;return(a=wt(t,"getBoundingClientRect"))?function(){return a()[r]}:function(){return(e?F["inner"+o]:t["client"+o])||0}}(N,ve,S),kt=(t=N,!ve||~st.indexOf(t)?_o(t):function(){return Tn}),Ft=0,Pt=0,Y=Et(N,S);if(Jn(u),u._dir=S,U*=45,u.scroller=N,u.scroll=D?D.time.bind(D):Y,je=Y(),u.vars=i,r=r||i.animation,"refreshPriority"in i&&(ao=1,-9999===i.refreshPriority&&(Xt=u)),dt.tweenScroll=dt.tweenScroll||{top:ko(N,ce),left:ko(N,De)},u.tweenTo=Ee=dt.tweenScroll[S.p],u.scrubDuration=function(f){(Lt=Si(f)&&f)?H?H.duration(f):H=M.to(r,{ease:"expo",totalProgress:"+=0.001",duration:Lt,paused:!0,onComplete:function(){return T&&T(u)}}):(H&&H.progress(1).kill(),H=0)},r&&(r.vars.lazy=!1,r._initted||!1!==r.vars.immediateRender&&!1!==i.immediateRender&&r.duration()&&r.render(0,!0,!0),u.animation=r.pause(),r.scrollTrigger=u,u.scrubDuration(v),ni=0,d||(d=r.vars.id)),x.push(u),I&&((!mn(I)||I.push)&&(I={snapTo:I}),"scrollBehavior"in Q.style&&M.set(ve?[Q,at]:N,{scrollBehavior:"auto"}),k.forEach(function(f){return Me(f)&&f.target===(ve?$.scrollingElement||at:N)&&(f.smooth=!1)}),$i=Me(I.snapTo)?I.snapTo:"labels"===I.snapTo?function(t){return function(e){return M.utils.snap(Co(t),e)}}(r):"labelsDirectional"===I.snapTo?function(t){return function(e,i){return lr(Co(t))(e,i.direction)}}(r):!1!==I.directional?function(f,b){return lr(I.snapTo)(f,Se()-Pt<500?0:b.direction)}:M.utils.snap(I.snapTo),Ze=mn(Ze=I.duration||{min:.1,max:2})?ci(Ze.min,Ze.max):ci(Ze,Ze),rt=M.delayedCall(I.delay||Lt/2||.1,function(){var f=Y(),b=Se()-Pt<500,C=Ee.tween;if(!(b||Math.abs(u.getVelocity())<10)||C||un||Ft===f)u.isActive&&Ft!==f&&rt.restart(!0);else{var w=(f-V)/K,ue=r&&!z?r.totalProgress():w,E=b?0:(ue-Mi)/(Se()-cn)*1e3||0,ae=M.utils.clamp(-w,1-w,ui(E/2)*E/.185),q=w+(!1===I.inertia?0:ae),mt=ci(0,1,$i(q,u)),G=Math.round(V+mt*K),ot=I.onStart,J=I.onInterrupt,ee=I.onComplete;if(f<=xe&&f>=V&&G!==f){if(C&&!C._initted&&C.data<=ui(G-f))return;!1===I.inertia&&(ae=mt-w),Ee(G,{duration:Ze(ui(.185*Math.max(ui(q-ue),ui(mt-ue))/E/.05||0)),ease:I.ease||"power3",data:ui(G-f),onInterrupt:function(){return rt.restart(!0)&&J&&J(u)},onComplete:function(){u.update(),Ft=Y(),ni=Mi=r&&!z?r.totalProgress():u.progress,se&&se(u),ee&&ee(u)}},f,ae*K,G-f-ae*K),ot&&ot(u,Ee.tween)}}}).pause()),d&&(cr[d]=u),(yt=(_=u.trigger=Be(_||m))&&_._gsap&&_._gsap.stRevert)&&(yt=yt(u)),m=!0===m?_:Be(m),et(l)&&(l={targets:_,className:l}),m&&(!1===y||y===$e||(y=!(!y&&m.parentNode&&m.parentNode.style&&"flex"===ct(m.parentNode).display)&&ie),u.pin=m,(Ie=M.core.getCache(m)).spacer?It=Ie.pinState:(X&&((X=Be(X))&&!X.nodeType&&(X=X.current||X.nativeElement),Ie.spacerIsNative=!!X,X&&(Ie.spacerState=An(X))),Ie.spacer=Re=X||$.createElement("div"),Re.classList.add("pin-spacer"),d&&Re.classList.add("pin-spacer-"+d),Ie.pinState=It=An(m)),!1!==i.force3D&&M.set(m,{force3D:!0}),u.spacer=Re=Ie.spacer,Vt=ct(m),Qi=Vt[y+S.os2],Rt=M.getProperty(m),re=M.quickSetter(m,S.a,ge),fr(m,Re,Vt),Ci=An(m)),j){vt=mn(j)?bo(j,Mo):Mo,Ne=Mn("scroller-start",d,N,S,vt,0),h=Mn("scroller-end",d,N,S,vt,0,Ne),Xi=Ne["offset"+S.op.d2];var Ji=Be(wt(N,"content")||N);Ye=this.markerStart=Mn("start",d,Ji,S,vt,Xi,0,D),ut=this.markerEnd=Mn("end",d,Ji,S,vt,Xi,0,D),D&&(wi=M.quickSetter([Ye,ut],S.a,ge)),!ye&&(!st.length||!0!==wt(N,"fixedMarkers"))&&(function(t){var e=ct(t).position;t.style.position="absolute"===e||"fixed"===e?e:"relative"}(ve?Q:N),M.set([Ne,h],{force3D:!0}),ht=M.quickSetter(Ne,S.a,ge),qi=M.quickSetter(h,S.a,ge))}if(D){var en=D.vars.onUpdate,R=D.vars.onUpdateParams;D.eventCallback("onUpdate",function(){u.update(0,0,1),en&&en.apply(R||[])})}u.previous=function(){return x[x.indexOf(u)-1]},u.next=function(){return x[x.indexOf(u)+1]},u.revert=function(f,b){if(!b)return u.kill(!0);var C=!1!==f||!u.enabled,w=Ce;C!==u.isReverted&&(C&&(pt=Math.max(Y(),u.scroll.rec||0),ft=u.progress,ri=r&&r.progress()),Ye&&[Ye,ut,Ne,h].forEach(function(ue){return ue.style.display=C?"none":"block"}),C&&(Ce=1,u.update(C)),m&&(C?function(t,e,i){pi(i);var r=t._gsap;if(r.spacerIsNative)pi(r.spacerState);else if(t._gsap.swappedIn){var o=e.parentNode;o&&(o.insertBefore(t,e),o.removeChild(e))}t._gsap.swappedIn=!1}(m,Re,It):(!Fe||!u.isActive)&&fr(m,Re,ct(m),Ve)),C||u.update(C),Ce=w,u.isReverted=C)},u.refresh=function(f,b){if(!Ce&&u.enabled||b){if(m&&f&&Ke)return void _e(n,"scrollEnd",Eo);!tt&&Qe&&Qe(u),Ce=1,Pt=Se(),Ee.tween&&(Ee.tween.kill(),Ee.tween=0),H&&H.pause(),L&&r&&r.revert({kill:!1}).invalidate(),u.isReverted||u.revert(!0,!0),u._subPinOffset=!1;for(var ee,le,Ei,oi,he,te,bt,Kr,ba,tn,C=St(),w=kt(),ue=D?D.duration():At(N,S),E=0,ae=0,q=i.end,mt=i.endTrigger||_,G=i.start||(0!==i.start&&_?m?"0 0":"0 100%":0),pe=u.pinnedContainer=i.pinnedContainer&&Be(i.pinnedContainer),ot=_&&Math.max(0,x.indexOf(u))||0,J=ot;J--;)(te=x[J]).end||te.refresh(0,1)||(Ce=1),(bt=te.pin)&&(bt===_||bt===m)&&!te.isReverted&&(tn||(tn=[]),tn.unshift(te),te.revert(!0,!0)),te!==x[J]&&(ot--,J--);for(Me(G)&&(G=G(u)),V=Oo(G,_,C,S,Y(),Ye,Ne,u,w,de,ye,ue,D)||(m?-.001:0),Me(q)&&(q=q(u)),et(q)&&!q.indexOf("+=")&&(~q.indexOf(" ")?q=(et(G)?G.split(" ")[0]:"")+q:(E=Cn(q.substr(2),C),q=et(G)?G:V+E,mt=_)),xe=Math.max(V,Oo(q||(mt?"100% 0":ue),mt,C,S,Y()+E,ut,h,u,w,de,ye,ue,D))||-.001,K=xe-V||(V-=.01)&&.001,E=0,J=ot;J--;)(bt=(te=x[J]).pin)&&te.start-te._pinPush<=V&&!D&&te.end>0&&(ee=te.end-te.start,(bt===_&&te.start-te._pinPush<V||bt===pe)&&!Si(G)&&(E+=ee*(1-te.progress)),bt===m&&(ae+=ee));if(V+=E,xe+=E,u._pinPush=ae,Ye&&E&&((ee={})[S.a]="+="+E,pe&&(ee[S.p]="-="+Y()),M.set([Ye,ut],ee)),m)ee=ct(m),oi=S===ce,Ei=Y(),We=parseFloat(Rt(S.a))+ae,!ue&&xe>1&&((ve?Q:N).style["overflow-"+S.a]="scroll"),fr(m,Re,ee),Ci=An(m),le=_t(m,!0),Kr=ye&&Et(N,oi?De:ce)(),y&&((Ve=[y+S.os2,K+ae+ge]).t=Re,(J=y===ie?ar(m,S)+K+ae:0)&&Ve.push(S.d,J+ge),pi(Ve),pe&&x.forEach(function(nn){nn.pin===pe&&!1!==nn.vars.pinSpacing&&(nn._subPinOffset=!0)}),ye&&Y(pt)),ye&&((he={top:le.top+(oi?Ei-V:Kr)+ge,left:le.left+(oi?Kr:Ei-V)+ge,boxSizing:"border-box",position:"fixed"})[jt]=he.maxWidth=Math.ceil(le.width)+ge,he[Yt]=he.maxHeight=Math.ceil(le.height)+ge,he[$e]=he[$e+Ii]=he[$e+Fi]=he[$e+Ni]=he[$e+Pi]="0",he[ie]=ee[ie],he[ie+Ii]=ee[ie+Ii],he[ie+Fi]=ee[ie+Fi],he[ie+Ni]=ee[ie+Ni],he[ie+Pi]=ee[ie+Pi],Nt=function(t,e,i){for(var l,r=[],o=t.length,a=i?8:0;a<o;a+=2)r.push(l=t[a],l in e?e[l]:t[a+1]);return r.t=t.t,r}(It,he,Fe),tt&&Y(0)),r?(ba=r._initted,qn(1),r.render(r.duration(),!0,!0),Ae=Rt(S.a)-We+K+ae,K!==Ae&&ye&&Nt.splice(Nt.length-2,2),r.render(0,!0,!0),ba||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),qn(0)):Ae=K;else if(_&&Y()&&!D)for(le=_.parentNode;le&&le!==Q;)le._pinOffset&&(V-=le._pinOffset,xe-=le._pinOffset),le=le.parentNode;tn&&tn.forEach(function(nn){return nn.revert(!1,!0)}),u.start=V,u.end=xe,je=qe=tt?pt:Y(),!D&&!tt&&(je<pt&&Y(pt),u.scroll.rec=0),u.revert(!1,!0),rt&&(Ft=-1,u.isActive&&Y(V+K*ft),rt.restart(!0)),Ce=0,r&&z&&(r._initted||ri)&&r.progress()!==ri&&r.progress(ri,!0).render(r.time(),!0,!0),(ft!==u.progress||D)&&(r&&!z&&r.totalProgress(ft,!0),u.progress=(je-V)/K===ft?0:ft),m&&y&&(Re._pinOffset=Math.round(u.progress*Ae)),p&&!tt&&p(u)}},u.getVelocity=function(){return(Y()-qe)/(Se()-cn)*1e3||0},u.endAnimation=function(){ki(u.callbackAnimation),r&&(H?H.progress(1):r.paused()?z||ki(r,u.direction<0,1):ki(r,r.reversed()))},u.labelToScroll=function(f){return r&&r.labels&&(V||u.refresh()||V)+r.labels[f]/r.duration()*K||0},u.getTrailing=function(f){var b=x.indexOf(u),C=u.direction>0?x.slice(0,b).reverse():x.slice(b+1);return(et(f)?C.filter(function(w){return w.vars.preventOverlaps===f}):C).filter(function(w){return u.direction>0?w.end<=V:w.start>=xe})},u.update=function(f,b,C){if(!D||C||f){var q,G,pe,ot,J,ee,le,w=tt?pt:u.scroll(),ue=f?0:(w-V)/K,E=ue<0?0:ue>1?1:ue||0,ae=u.progress;if(b&&(qe=je,je=D?Y():w,I&&(Mi=ni,ni=r&&!z?r.totalProgress():E)),U&&!E&&m&&!Ce&&!hn&&Ke&&V<w+(w-qe)/(Se()-cn)*U&&(E=1e-4),E!==ae&&u.enabled){if(ot=(J=(q=u.isActive=!!E&&E<1)!=(!!ae&&ae<1))||!!E!=!!ae,u.direction=E>ae?1:-1,u.progress=E,ot&&!Ce&&(G=E&&!ae?0:1===E?1:1===ae?2:3,z&&(pe=!J&&"none"!==Pe[G+1]&&Pe[G+1]||Pe[G],le=r&&("complete"===pe||"reset"===pe||pe in r))),nt&&(J||le)&&(le||v||!r)&&(Me(nt)?nt(u):u.getTrailing(nt).forEach(function(te){return te.endAnimation()})),z||(!H||Ce||hn?r&&r.totalProgress(E,!!Ce):((D||Xt&&Xt!==u)&&H.render(H._dp._time-H._start),H.resetTo?H.resetTo("totalProgress",E,r._tTime/r._tDur):(H.vars.totalProgress=E,H.invalidate().restart()))),m)if(f&&y&&(Re.style[y+S.os2]=Qi),ye){if(ot){if(ee=!f&&E>ae&&xe+1>w&&w+1>=At(N,S),Fe)if(f||!q&&!ee)So(m,Re);else{var Ei=_t(m,!0),oi=w-V;So(m,Q,Ei.top+(S===ce?oi:0)+ge,Ei.left+(S===ce?0:oi)+ge)}pi(q||ee?Nt:Ci),Ae!==K&&E<1&&q||re(We+(1!==E||ee?0:Ae))}}else re(Oi(We+Ae*E));I&&!Ee.tween&&!Ce&&!hn&&rt.restart(!0),l&&(J||ne&&E&&(E<1||!tr))&&ln(l.targets).forEach(function(te){return te.classList[q||ne?"add":"remove"](l.className)}),a&&!z&&!f&&a(u),ot&&!Ce?(z&&(le&&("complete"===pe?r.pause().totalProgress(1):"reset"===pe?r.restart(!0).pause():"restart"===pe?r.restart(!0):r[pe]()),a&&a(u)),(J||!tr)&&(g&&J&&nr(u,g),B[G]&&nr(u,B[G]),ne&&(1===E?u.kill(!1,1):B[G]=0),J||B[G=1===E?1:3]&&nr(u,B[G])),Ge&&!q&&Math.abs(u.getVelocity())>(Si(Ge)?Ge:2500)&&(ki(u.callbackAnimation),H?H.progress(1):ki(r,"reverse"===pe?1:!E,1))):z&&a&&!Ce&&a(u)}if(qi){var he=D?w/D.duration()*(D._caScrollDist||0):w;ht(he+(Ne._isFlipped?1:0)),qi(he)}wi&&wi(-w/D.duration()*(D._caScrollDist||0))}},u.enable=function(f,b){u.enabled||(u.enabled=!0,_e(N,"resize",Vi),_e(ve?$:N,"scroll",fi),Qe&&_e(n,"refreshInit",Qe),!1!==f&&(u.progress=ft=0,je=qe=Ft=Y()),!1!==b&&u.refresh())},u.getTween=function(f){return f&&Ee?Ee.tween:H},u.setPositions=function(f,b){m&&(We+=f-V,Ae+=b-f-K,y===ie&&u.adjustPinSpacing(b-f-K)),u.start=V=f,u.end=xe=b,K=b-f,u.update()},u.adjustPinSpacing=function(f){if(Ve){var b=Ve.indexOf(S.d)+1;Ve[b]=parseFloat(Ve[b])+f+ge,Ve[1]=parseFloat(Ve[1])+f+ge,pi(Ve)}},u.disable=function(f,b){if(u.enabled&&(!1!==f&&u.revert(!0,!0),u.enabled=u.isActive=!1,b||H&&H.pause(),pt=0,Ie&&(Ie.uncache=1),Qe&&fe(n,"refreshInit",Qe),rt&&(rt.pause(),Ee.tween&&Ee.tween.kill()&&(Ee.tween=0)),!ve)){for(var C=x.length;C--;)if(x[C].scroller===N&&x[C]!==u)return;fe(N,"resize",Vi),fe(N,"scroll",fi)}},u.kill=function(f,b){u.disable(f,b),H&&!b&&H.kill(),d&&delete cr[d];var C=x.indexOf(u);C>=0&&x.splice(C,1),C===Oe&&En>0&&Oe--,C=0,x.forEach(function(w){return w.scroller===u.scroller&&(C=1)}),C||tt||(u.scroll.rec=0),r&&(r.scrollTrigger=null,f&&r.revert({kill:!1}),b||r.kill()),Ye&&[Ye,ut,Ne,h].forEach(function(w){return w.parentNode&&w.parentNode.removeChild(w)}),Xt===u&&(Xt=0),m&&(Ie&&(Ie.uncache=1),C=0,x.forEach(function(w){return w.pin===m&&C++}),C||(Ie.spacer=0)),i.onKill&&i.onKill(u)},u.enable(!1,!1),yt&&yt(u),r&&r.add&&!K?M.delayedCall(.01,function(){return V||xe||u.refresh()})&&(K=.01)&&(V=xe=0):u.refresh(),m&&function(){if(To!==Kt){var t=To=Kt;requestAnimationFrame(function(){return t===Kt&&$t(!0)})}}()}else this.update=this.refresh=this.kill=lt;var t},n.register=function(i){return li||(M=i||go(),mo()&&window.document&&n.enable(),li=fn),li},n.defaults=function(i){if(i)for(var r in i)yn[r]=i[r];return yn},n.disable=function(i,r){fn=0,x.forEach(function(a){return a[r?"kill":"disable"](i)}),fe(F,"wheel",fi),fe($,"scroll",fi),clearInterval(dn),fe($,"touchcancel",lt),fe(Q,"touchstart",lt),_n(fe,$,"pointerdown,touchstart,mousedown",fo),_n(fe,$,"pointerup,touchend,mouseup",po),an.kill(),pn(fe);for(var o=0;o<k.length;o+=3)vn(fe,k[o],k[o+1]),vn(fe,k[o],k[o+2])},n.enable=function(){if(F=window,$=document,at=$.documentElement,Q=$.body,M&&(ln=M.utils.toArray,ci=M.utils.clamp,Jn=M.core.context||lt,qn=M.core.suppressOverwrites||lt,er=F.history.scrollRestoration||"auto",M.core.globals("ScrollTrigger",n),Q)){fn=1,oe.register(M),n.isTouch=oe.isTouch,xt=oe.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),_e(F,"wheel",fi),ro=[F,$,at,Q],M.matchMedia?(n.matchMedia=function(d){var p,g=M.matchMedia();for(p in d)g.add(p,d[p]);return g},M.addEventListener("matchMediaInit",function(){return ur()}),M.addEventListener("matchMediaRevert",function(){return xo()}),M.addEventListener("matchMedia",function(){$t(0,1),Zt("matchMedia")}),M.matchMedia("(orientation: portrait)",function(){return dr(),dr})):console.warn("Requires GSAP 3.11.0 or later"),dr(),_e($,"scroll",fi);var a,l,i=Q.style,r=i.borderTopStyle,o=M.core.Animation.prototype;for(o.revert||Object.defineProperty(o,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",a=_t(Q),ce.m=Math.round(a.top+ce.sc())||0,De.m=Math.round(a.left+De.sc())||0,r?i.borderTopStyle=r:i.removeProperty("border-top-style"),dn=setInterval(wo,250),M.delayedCall(.5,function(){return hn=0}),_e($,"touchcancel",lt),_e(Q,"touchstart",lt),_n(_e,$,"pointerdown,touchstart,mousedown",fo),_n(_e,$,"pointerup,touchend,mouseup",po),Qn=M.utils.checkPrefix("transform"),xn.push(Qn),li=Se(),an=M.delayedCall(.2,$t).pause(),di=[$,"visibilitychange",function(){var d=F.innerWidth,g=F.innerHeight;$.hidden?(oo=d,so=g):(oo!==d||so!==g)&&Vi()},$,"DOMContentLoaded",$t,F,"load",$t,F,"resize",Vi],pn(_e),x.forEach(function(d){return d.enable(0,1)}),l=0;l<k.length;l+=3)vn(fe,k[l],k[l+1]),vn(fe,k[l],k[l+2])}},n.config=function(i){"limitCallbacks"in i&&(tr=!!i.limitCallbacks);var r=i.syncInterval;r&&clearInterval(dn)||(dn=r)&&setInterval(wo,r),"ignoreMobileResize"in i&&(co=1===n.isTouch&&i.ignoreMobileResize),"autoRefreshEvents"in i&&(pn(fe)||pn(_e,i.autoRefreshEvents||"none"),lo=-1===(i.autoRefreshEvents+"").indexOf("resize"))},n.scrollerProxy=function(i,r){var o=Be(i),a=k.indexOf(o),l=Gt(o);~a&&k.splice(a,l?6:2),r&&(l?st.unshift(F,r,Q,r,at,r):st.unshift(o,r))},n.clearMatchMedia=function(i){x.forEach(function(r){return r._ctx&&r._ctx.query===i&&r._ctx.kill(!0,!0)})},n.isInViewport=function(i,r,o){var a=(et(i)?Be(i):i).getBoundingClientRect(),l=a[o?jt:Yt]*r||0;return o?a.right-l>0&&a.left+l<F.innerWidth:a.bottom-l>0&&a.top+l<F.innerHeight},n.positionInViewport=function(i,r,o){et(i)&&(i=Be(i));var a=i.getBoundingClientRect(),l=a[o?jt:Yt],d=null==r?l/2:r in bn?bn[r]*l:~r.indexOf("%")?parseFloat(r)*l/100:parseFloat(r)||0;return o?(a.left+d)/F.innerWidth:(a.top+d)/F.innerHeight},n.killAll=function(i){if(x.forEach(function(o){return"ScrollSmoother"!==o.vars.id&&o.kill()}),!0!==i){var r=Wt.killAll||[];Wt={},r.forEach(function(o){return o()})}},n}();P.version="3.11.3",P.saveStyles=function(n){return n?ln(n).forEach(function(t){if(t&&t.style){var e=ze.indexOf(t);e>=0&&ze.splice(e,5),ze.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),M.core.getCache(t),Jn())}}):ze},P.revert=function(n,t){return ur(!n,t)},P.create=function(n,t){return new P(n,t)},P.refresh=function(n){return n?Vi():(li||P.register())&&$t(!0)},P.update=Qt,P.clearScrollMemory=Ao,P.maxScroll=function(n,t){return At(n,t?De:ce)},P.getScrollFunc=function(n,t){return Et(Be(n),t?De:ce)},P.getById=function(n){return cr[n]},P.getAll=function(){return x.filter(function(n){return"ScrollSmoother"!==n.vars.id})},P.isScrolling=function(){return!!Ke},P.snapDirectional=lr,P.addEventListener=function(n,t){var e=Wt[n]||(Wt[n]=[]);~e.indexOf(t)||e.push(t)},P.removeEventListener=function(n,t){var e=Wt[n],i=e&&e.indexOf(t);i>=0&&e.splice(i,1)},P.batch=function(n,t){var l,e=[],i={},r=t.interval||.016,o=t.batchMax||1e9,a=function(g,p){var v=[],_=[],m=M.delayedCall(r,function(){p(v,_),v=[],_=[]}).pause();return function(y){v.length||m.restart(!0),v.push(y.trigger),_.push(y),o<=v.length&&m.progress(1)}};for(l in t)i[l]="on"===l.substr(0,2)&&Me(t[l])&&"onRefreshInit"!==l?a(0,t[l]):t[l];return Me(o)&&(o=o(),_e(P,"refresh",function(){return o=t.batchMax()})),ln(n).forEach(function(d){var g={};for(l in i)g[l]=i[l];g.trigger=d,e.push(P.create(g))}),e};var No,Fo=function(t,e,i,r){return e>r?t(r):e<0&&t(0),i>r?(r-e)/(i-e):i<0?e/(e-i):1},pr=function n(t,e){!0===e?t.style.removeProperty("touch-action"):t.style.touchAction=!0===e?"auto":e?"pan-"+e+(oe.isTouch?" pinch-zoom":""):"none",t===at&&n(Q,e)},Po={auto:1,scroll:1},Na=function(t){var d,e=t.event,i=t.target,r=t.axis,o=(e.changedTouches?e.changedTouches[0]:e).target,a=o._gsap||M.core.getCache(o),l=Se();if(!a._isScrollT||l-a._isScrollT>2e3){for(;o&&o.scrollHeight<=o.clientHeight;)o=o.parentNode;a._isScroll=o&&!Gt(o)&&o!==i&&(Po[(d=ct(o)).overflowY]||Po[d.overflowX]),a._isScrollT=l}(a._isScroll||"x"===r)&&(e.stopPropagation(),e._gsapAllow=!0)},Io=function(t,e,i,r){return oe.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:r=r&&Na,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return i&&_e($,oe.eventTypes[0],Ro,!1,!0)},onDisable:function(){return fe($,oe.eventTypes[0],Ro,!0)}})},Ra=/(input|label|select|textarea)/i,Ro=function(t){var e=Ra.test(t.target.tagName);(e||No)&&(t._gsapAllow=!0,No=e)};P.sort=function(n){return x.sort(n||function(t,e){return-1e6*(t.vars.refreshPriority||0)+t.start-(e.start+-1e6*(e.vars.refreshPriority||0))})},P.observe=function(n){return new oe(n)},P.normalizeScroll=function(n){if(typeof n>"u")return Ue;if(!0===n&&Ue)return Ue.enable();if(!1===n)return Ue&&Ue.kill();var t=n instanceof oe?n:function(t){mn(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var a,l,se,ne,z,N,dt,ve,i=t.normalizeScrollX,r=t.momentum,o=t.allowNestedScroll,d=Be(t.target)||at,g=M.core.globals().ScrollSmoother,p=g&&g.get(),v=xt&&(t.content&&Be(t.content)||p&&!1!==t.content&&!p.smooth()&&p.content()),_=Et(d,ce),m=Et(d,De),y=1,L=(oe.isTouch&&F.visualViewport?F.visualViewport.scale*F.visualViewport.width:F.outerWidth)/F.innerWidth,U=0,T=Me(r)?function(){return r(a)}:function(){return r||2.8},I=Io(d,t.type,!0,o),Fe=function(){return ne=!1},X=lt,D=lt,Ge=function(){l=At(d,ce),D=ci(xt?1:0,l),i&&(X=ci(0,At(d,De))),se=Kt},nt=function(){v._gsap.y=Oi(parseFloat(v._gsap.y)+_.offset)+"px",v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(v._gsap.y)+", 0, 1)",_.offset=_.cacheID=0},ye=function(){Ge(),z.isActive()&&z.vars.scrollY>l&&(_()>l?z.progress(1)&&_(l):z.resetTo("scrollY",l))};return v&&M.set(v,{y:"+=0"}),t.ignoreCheck=function(B){return xt&&"touchmove"===B.type&&function(){if(ne){requestAnimationFrame(Fe);var Pe=Oi(a.deltaY/2),j=D(_.v-Pe);if(v&&j!==_.v+_.offset){_.offset=j-_.v;var de=Oi((parseFloat(v&&v._gsap.y)||0)-_.offset);v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+de+", 0, 1)",v._gsap.y=de+"px",_.cacheID=k.cache,Qt()}return!0}_.offset&&nt(),ne=!0}()||y>1.05&&"touchstart"!==B.type||a.isGesturing||B.touches&&B.touches.length>1},t.onPress=function(){var B=y;y=Oi((F.visualViewport&&F.visualViewport.scale||1)/L),z.pause(),B!==y&&pr(d,y>1.01||!i&&"x"),N=m(),dt=_(),Ge(),se=Kt},t.onRelease=t.onGestureStart=function(B,Pe){if(_.offset&&nt(),Pe){k.cache++;var de,u,j=T();i&&(de=m(),j*=Fo(m,de,u=de+.05*j*-B.velocityX/.227,At(d,De)),z.vars.scrollX=X(u)),de=_(),j*=Fo(_,de,u=de+.05*j*-B.velocityY/.227,At(d,ce)),z.vars.scrollY=D(u),z.invalidate().duration(j).play(.01),(xt&&z.vars.scrollY>=l||de>=l-1)&&M.to({},{onUpdate:ye,duration:j})}else ve.restart(!0)},t.onWheel=function(){z._ts&&z.pause(),Se()-U>1e3&&(se=0,U=Se())},t.onChange=function(B,Pe,j,de,u){if(Kt!==se&&Ge(),Pe&&i&&m(X(de[2]===Pe?N+(B.startX-B.x):m()+Pe-de[1])),j){_.offset&&nt();var Qe=u[2]===j,St=Qe?dt+B.startY-B.y:_()+j-u[1],kt=D(St);Qe&&St!==kt&&(dt+=kt-St),_(kt)}(j||Pe)&&Qt()},t.onEnable=function(){pr(d,!i&&"x"),P.addEventListener("refresh",ye),_e(F,"resize",ye),_.smooth&&(_.target.style.scrollBehavior="auto",_.smooth=m.smooth=!1),I.enable()},t.onDisable=function(){pr(d,!0),fe(F,"resize",ye),P.removeEventListener("refresh",ye),I.kill()},t.lockAxis=!1!==t.lockAxis,(a=new oe(t)).iOS=xt,xt&&!_()&&_(1),xt&&M.ticker.add(lt),z=M.to(a,{ease:"power4",paused:!0,scrollX:i?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:(ve=a._dc).vars.onComplete}),a}(n);return Ue&&Ue.target===t.target&&Ue.kill(),Gt(t.target)&&(Ue=t),t},P.core={_getVelocityProp:Xn,_inputObserver:Io,_scrollers:k,_proxies:st,bridge:{ss:function(){Ke||Zt("scrollStart"),Ke=Se()},ref:function(){return Ce}}},go()&&M.registerPlugin(P);var s=O(8256);const La=["container"],Ba=function(n){return{active:n}};function Ha(n,t){if(1&n&&(s.TgZ(0,"li",4),s._uU(1),s.qZA()),2&n){const e=t.$implicit,i=s.oxw();s.MGl("routerLink","../",e[0],""),s.Q6J("ngClass",s.VKq(3,Ba,i.path===e[0])),s.xp6(1),s.Oqu(e[1])}}let qt=(()=>{class n{constructor(e){this.renderer2=e,this.path="01",this.data=[["01","ScrollTrigger"],["02","SCIFI"],["03","Baked"],["04","Hall"],["05","HallHighLight"],["07","DynamicShadow"],["08","DreamForest"]]}ngOnInit(){}toggle(){this.container.nativeElement.classList.contains("close")?this.renderer2.removeClass(this.container.nativeElement,"close"):this.renderer2.addClass(this.container.nativeElement,"close")}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["w-nav"]],viewQuery:function(e,i){if(1&e&&s.Gf(La,5),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first)}},inputs:{path:"path"},decls:7,vars:1,consts:[[1,"container"],["container",""],[3,"ngClass","routerLink",4,"ngFor","ngForOf"],[1,"anchor",3,"click"],[3,"ngClass","routerLink"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1)(2,"h3"),s._uU(3,"Introduce"),s.qZA(),s.TgZ(4,"ul"),s.YNc(5,Ha,2,5,"li",2),s.qZA(),s.TgZ(6,"div",3),s.NdJ("click",function(){return i.toggle()}),s.qZA()()),2&e&&(s.xp6(5),s.Q6J("ngForOf",i.data))},dependencies:[me.mk,me.sg,Wn.rH],styles:[".container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:200px;padding:5px;display:flex;flex-direction:column;z-index:10;background:#00000033;color:#fff;transition:.5s}.container.close[_ngcontent-%COMP%]{left:-200px}.container[_ngcontent-%COMP%] div.anchor[_ngcontent-%COMP%]{width:15px;height:30px;background:#000000AA;position:absolute;right:-15px;top:0;border-radius:0 5px 5px 0;cursor:pointer;border:1px solid #ffffff}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{border-bottom:2px solid #FFFFFF}.container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none}.container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:5px;letter-spacing:2px;cursor:pointer;transition:background .5s;border-radius:5px}.container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#FFFFFFAA;color:#000}.container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:deepskyblue;color:#ff1493;text-shadow:2px 2px 2px green}"]}),n})();const Ua=["container"],za=["switcher"],Ga=["canvas"],ja=["welcomeInfo"],Ya=["pages"];let Wa=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.radius=0,this.frustum=10,this.params={render:{toneMapping:0,toneMappingExposure:1},lights:{directional:{intensity:3,color:16777215,helper:!0,bias:-.002594,position:{x:-1.1,y:2.4,z:3.6}},ambient:{intensity:1,color:16777215},hemisphereLight:{top:16777215,bottom:3159317,intensity:0,helper:!0,height:1},lamp:{intensity:0,color:16777215,distance:15,decay:.5}}},this.animate=()=>{this.controls&&this.controls.enabled&&this.controls.update(),this.renderer.render(this.scene,this.camera)},this.onetimeScrollEventListener=i=>{i.deltaY>0&&(this.removeOnetimeScrollListener(),this.playOpenBoxAnimation())},this.touchPosition=0,this.onetimeTouchStart=i=>{this.touchPosition=i.touches[0].clientY},this.onetimeTouchMove=i=>{this.touchPosition-i.touches[0].clientY>0&&(this.removeOnetimeTouchListener(),this.playOpenBoxAnimation())},window.model=this}ngOnDestroy(){this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){W.ZP.registerPlugin(P),this.prepareWelcomeInfo(),this.initScene(),this.addLight(),this.loadModel(),this.initGUI()}prepareWelcomeInfo(){const e=this.welcomeInfo.nativeElement.textContent;this.welcomeInfo.nativeElement.textContent="";for(let i=0;i<e.length;i++){const r=this.renderer2.createElement("span");r.textContent=e[i],this.renderer2.addClass(r,"character"),this.renderer2.appendChild(this.welcomeInfo.nativeElement,r)}}initScene(){const e=this.width=this.container.nativeElement.offsetWidth,i=this.height=this.container.nativeElement.offsetHeight,r=e/i;this.scene=new c.xsS,this.perspectiveCamera=new c.cPb(50,r,1,1e3),this.perspectiveCamera.position.set(0,2,5),this.orthographicCamera=new c.iKG(this.frustum*r/-2,this.frustum*r/2,this.frustum/2,this.frustum/-2,.1,100),this.orthographicCamera.position.set(0,10,20),this.orthographicCamera.lookAt(new c.Pa4(0,0,0)),this.camera=this.orthographicCamera;const l=this.renderer=new c.CP7({canvas:this.canvas.nativeElement,antialias:!0,alpha:!0});l.setSize(e,i),l.setPixelRatio(Math.min(devicePixelRatio,2)),l.outputColorSpace=c.KI_,l.shadowMap.enabled=!0,l.shadowMap.type=c.ntZ,this.renderer2.appendChild(this.container.nativeElement,l.domElement),l.setAnimationLoop(this.animate)}addLight(){{const e=this.directionalLight=new c.Ox3(this.params.lights.directional.color,this.params.lights.directional.intensity);e.castShadow=!0,e.position.set(this.params.lights.directional.position.x,this.params.lights.directional.position.y,this.params.lights.directional.position.z),e.shadow.bias=this.params.lights.directional.bias,e.shadow.mapSize.width=2048,e.shadow.mapSize.height=2048,this.scene.add(e)}{const e=this.ambientLight=new c.Mig(this.params.lights.ambient.color,this.params.lights.ambient.intensity);this.scene.add(e)}}loadModel(){const e=new Bt._;e.setDecoderPath("assets/lib/draco/"),(new Ht.E).setDRACOLoader(e).load("assets/model/Introduce.glb",i=>{this.models=i.scene,this.models.rotation.y=Math.PI/4,i.scene.traverse(d=>{d.isMesh&&(d.receiveShadow=d.castShadow=!0)});let r=(new c.ZzF).setFromObject(i.scene);const o=this.size=r.getSize(new c.Pa4);this.radius=o.length(),this.reConfigLight(),this.models.scale.setScalar(.08),this.hideMesh();{const d=this.models.getObjectByName("\u53f0\u706f");if(!d)return;this.lamp=new c.cek(this.params.lights.lamp.color,this.params.lights.lamp.intensity,this.params.lights.lamp.distance,this.params.lights.lamp.decay),d.add(this.lamp)}this.scene.add(i.scene);const a=new c._12(10,10);a.rotateX(-Math.PI/2);const l=new c.Tn7;l.opacity=.2,this.ground=new c.Kj0(a,l),this.ground.receiveShadow=!0,this.ground.position.y=.1*-o.y/2,this.scene.add(this.ground),this.afterModelLoaded()})}reConfigLight(){this.directionalLight.shadow.camera.near=1,this.directionalLight.shadow.camera.far=3*this.radius,this.directionalLight.shadow.camera.left=-this.radius/2,this.directionalLight.shadow.camera.right=this.radius/2,this.directionalLight.shadow.camera.top=this.radius/2,this.directionalLight.shadow.camera.bottom=-this.radius/2,this.directionalLight.shadow.camera.updateProjectionMatrix()}hideMesh(){["\u529e\u516c\u684c","\u7535\u8111","\u684c\u5b50","\u5e8a","\u8863\u67dc","\u529e\u516c\u6905","\u5730\u6bef","\u76d2\u5b50","\u5783\u573e\u6876","\u6302\u4ef61","\u6302\u4ef62","\u53f0\u706f","\u676f\u5b50","\u4e66\u67b61","\u4e66\u67b62","\u7acb\u65b9\u4f53","Book1","Book2","\u7a97\u6237","\u82b1\u74f6","\u82b1\u76c6"].forEach(e=>{const i=this.models.getObjectByName(e);if(i)if(i.scale.setScalar(0),"\u7a97\u6237"===e)["\u7a97\u6237\u906e\u76d61","\u7a97\u6237\u906e\u76d62","\u7a97\u6237\u906e\u76d63","\u7a97\u6237\u906e\u76d64"].forEach(r=>{const o=this.models.getObjectByName(r);!o||o.scale.setScalar(1)});else if("\u529e\u516c\u6905"===e){let r=i.children.find(o=>"\u529e\u516c\u6905\u5934"===o.name);if(!r)return;r.rotation.y=0}})}showMesh(){return new Promise(e=>{const i=W.ZP.timeline();["\u529e\u516c\u684c","\u684c\u5b50","\u5e8a","\u8863\u67dc","\u5783\u573e\u6876","\u5730\u6bef","\u76d2\u5b50","\u7535\u8111","\u676f\u5b50","\u529e\u516c\u6905","\u53f0\u706f","\u6302\u4ef61","\u6302\u4ef62","\u4e66\u67b61","\u4e66\u67b62","\u7acb\u65b9\u4f53","Book1","Book2","\u7a97\u6237","\u82b1\u74f6","\u82b1\u76c6"].forEach(r=>{const o=this.models.getObjectByName(r);if(o)if(i.to(o.scale,{duration:.5,x:1,y:1,z:1,delay:-.3,ease:"back.out(1.5)"}),"\u7a97\u6237"===r)["\u7a97\u6237\u906e\u76d61","\u7a97\u6237\u906e\u76d62","\u7a97\u6237\u906e\u76d63","\u7a97\u6237\u906e\u76d64"].forEach(a=>{const l=this.models.getObjectByName(a);!l||i.to(l.scale,{duration:.5,x:0,y:0,z:0,delay:-.5})});else if("\u529e\u516c\u6905"===r){let a=o.children.find(l=>"\u529e\u516c\u6905\u5934"===l.name);if(!a)return;i.to(a.rotation,{duration:1,y:2.2*Math.PI,delay:-.5})}}),i.to({tmp:0},{tmp:1,duration:0,onComplete:()=>{e("done")}})})}moveLeft(){W.ZP.timeline().to(this.models.position,{duration:1,x:-1.8}).to(".welcome-info .character",{yPercent:-100,stagger:.1,ease:"back.out(2)"}).to(".expand-more",{opacity:1,onComplete:()=>{document.querySelector(".page1 .expand-more").style.animation="bounce .5s ease-in alternate infinite",this.addOnetimeScrollListener()}})}openBox(){return new Promise(e=>{const i=this.models.getObjectByName("Cover");i&&W.ZP.timeline().to(this.models.position,{duration:1,x:0}).to(this.models.scale,{duration:1,x:1,y:1,z:1,delay:-1}).to(this.models.rotation,{duration:1,y:2*Math.PI+Math.PI/4,delay:-1}).to(this.ground.position,{duration:1,y:(()=>-this.size.y/2)(),delay:-1}).to(i.scale,{duration:.5,x:0,y:0,z:0,onComplete:()=>{e("done")}})})}initGUI(){const e=this.gui=new Ut.XS;e.hide(),(i=>{i.open(),i.add({Hide:()=>this.hideMesh()},"Hide"),i.add({Show:()=>this.showMesh()},"Show"),i.add({Left:()=>this.moveLeft()},"Left"),i.add({OpenBox:()=>this.openBox()},"OpenBox"),i.add({Cover:()=>{const r=this.models.getObjectByName("Cover");r&&(r.visible=!1)}},"Cover")})(e.addFolder("Test"))}switchTheme(){if(this.switcher.nativeElement.classList.contains("light"))this.renderer2.removeClass(this.switcher.nativeElement,"light"),this.renderer2.addClass(this.switcher.nativeElement,"dark"),W.ZP.to(this.directionalLight.color,{r:.1,g:.2,b:.6}),W.ZP.to(this.ambientLight.color,{r:.1,g:.2,b:.6}),W.ZP.to(this.directionalLight,{intensity:.78}),W.ZP.to(this.ambientLight,{intensity:.78}),this.renderer2.setStyle(this.container.nativeElement,"background","#8395CDB5"),W.ZP.to(this.lamp,{duration:1,intensity:1,delay:.5});else{this.renderer2.removeClass(this.switcher.nativeElement,"dark"),this.renderer2.addClass(this.switcher.nativeElement,"light");const e=new c.Ilk(this.params.lights.directional.color);W.ZP.to(this.directionalLight.color,{r:e.r,g:e.g,b:e.b}),W.ZP.to(this.ambientLight.color,{r:1,g:1,b:1}),W.ZP.to(this.directionalLight,{intensity:this.params.lights.directional.intensity}),W.ZP.to(this.ambientLight,{intensity:this.params.lights.ambient.intensity}),this.renderer2.setStyle(this.container.nativeElement,"background","#EEEEC5B5"),W.ZP.to(this.lamp,{duration:1,intensity:0,delay:.5})}}afterModelLoaded(){W.ZP.to(this.models.scale,{duration:.5,x:.1,y:.1,z:.1,ease:"back.out(1.5)",onComplete:()=>{this.moveLeft()}})}addOnetimeScrollListener(){this.pages.nativeElement.addEventListener("wheel",this.onetimeScrollEventListener),this.pages.nativeElement.addEventListener("touchstart",this.onetimeTouchStart),this.pages.nativeElement.addEventListener("touchmove",this.onetimeTouchMove)}removeOnetimeScrollListener(){this.pages.nativeElement.removeEventListener("wheel",this.onetimeScrollEventListener)}removeOnetimeTouchListener(){this.pages.nativeElement.removeEventListener("touchstart",this.onetimeTouchStart),this.pages.nativeElement.removeEventListener("touchmove",this.onetimeTouchMove)}playOpenBoxAnimation(){W.ZP.to(".welcome-info .character",{yPercent:100,stagger:.1,ease:"back.in(2)",onComplete:()=>{this.renderer2.setStyle(this.welcomeInfo.nativeElement,"display","none"),this.openBox().then(()=>{this.showMesh().then(()=>{this.renderer2.removeStyle(this.pages.nativeElement,"overflow"),this.renderer2.setStyle(this.pages.nativeElement,"overflow-x","hidden"),this.renderer2.setStyle(this.pages.nativeElement,"overflow-y","auto"),this.addCircles(),this.prepareScrollTrigger()})})}})}addCircles(){{const e=new c.zf8(30,64);e.rotateX(-Math.PI/2);const i=this.wave1=new c.Kj0(e,new c.Wid({color:9982588}));i.receiveShadow=!0,i.position.y=-this.size.y/2,i.scale.set(0,1,0),this.models.add(i)}{const e=new c.zf8(60,64);e.rotateX(-Math.PI/2);const i=this.wave2=new c.Kj0(e,new c.Wid({color:3552941}));i.receiveShadow=!0,i.position.y=-this.size.y/2+.01,i.scale.set(0,1,0),this.models.add(i)}}prepareScrollTrigger(){W.ZP.timeline().to(this.models.position,{x:2.5,scrollTrigger:{scroller:".pages",trigger:".page2",start:"top top",end:"bottom top",markers:!1,scrub:!0}}).to(this.wave1.scale,{x:1,z:1,scrollTrigger:{scroller:".pages",trigger:".page2",start:"top top",end:"bottom top",markers:!1,scrub:!0}}).to(this.orthographicCamera,{zoom:3,scrollTrigger:{scroller:".pages",trigger:".page3",start:"top top",end:"bottom top",markers:!1,scrub:!0},onUpdate:()=>{this.orthographicCamera.updateProjectionMatrix()}}).to(this.models.position,{y:1,scrollTrigger:{scroller:".pages",trigger:".page3",start:"top top",end:"bottom top",markers:!1,scrub:!0}});const i={zoom:3,x:2.5,y:1};W.ZP.timeline().to(i,{zoom:.5,scrollTrigger:{scroller:".pages",trigger:".page4",start:"top top",end:"bottom top",markers:!1,scrub:!0},onUpdate:()=>{this.orthographicCamera.zoom=i.zoom,this.orthographicCamera.updateProjectionMatrix()}}).to(i,{x:0,y:0,scrollTrigger:{scroller:".pages",trigger:".page4",start:"top top",end:"bottom top",markers:!1,scrub:!0},onUpdate:()=>{this.models.position.x=i.x,this.models.position.y=i.y}});const r={zoom:.5,x:0,y:0};W.ZP.timeline().to(r,{zoom:6,scrollTrigger:{scroller:".pages",trigger:".page5",start:"top top",end:"bottom top",markers:!1,scrub:!0},onUpdate:()=>{this.orthographicCamera.zoom=r.zoom,this.orthographicCamera.updateProjectionMatrix()}}).to(r,{x:.91,y:-.7,scrollTrigger:{scroller:".pages",trigger:".page5",start:"top top",end:"bottom top",markers:!1,scrub:!0},onUpdate:()=>{this.models.position.x=r.x,this.models.position.y=r.y}}).to(this.wave2.scale,{x:1,z:1,scrollTrigger:{scroller:".pages",trigger:".page5",start:"top top",end:"bottom top",markers:!1,scrub:!0}})}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-lowpoly"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Ua,5),s.Gf(za,5),s.Gf(Ga,5),s.Gf(ja,5),s.Gf(Ya,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.switcher=r.first),s.iGM(r=s.CRH())&&(i.canvas=r.first),s.iGM(r=s.CRH())&&(i.welcomeInfo=r.first),s.iGM(r=s.CRH())&&(i.pages=r.first)}},decls:29,vars:1,consts:[[1,"container"],["container",""],[1,"webgl"],["canvas",""],[1,"theme-switcher"],[1,"material-icons"],[1,"btn","light",3,"click"],["switcher",""],[1,"switch"],[1,"pages"],["pages",""],[1,"page1"],[1,"welcome-info"],["welcomeInfo",""],[1,"material-icons","expand-more"],[1,"page2"],[1,"page3"],[1,"page4"],[1,"page5"],[1,"page6"],[1,"end"],[3,"path"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"canvas",2,3),s.TgZ(4,"div",4)(5,"span",5),s._uU(6,"light_mode"),s.qZA(),s.TgZ(7,"div",6,7),s.NdJ("click",function(){return i.switchTheme()}),s._UZ(9,"span",8),s.qZA(),s.TgZ(10,"span",5),s._uU(11,"dark_mode"),s.qZA()(),s.TgZ(12,"div",9,10)(14,"section",11)(15,"div",12,13),s._uU(17,"\u4f60\u597d\uff01\u6b22\u8fce\u5149\u4e34\u3002"),s.qZA(),s.TgZ(18,"span",14),s._uU(19,"expand_more"),s.qZA()(),s._UZ(20,"section",15)(21,"section",16)(22,"section",17)(23,"section",18),s.TgZ(24,"section",19)(25,"div",20)(26,"h3"),s._uU(27,"\u8c22\u8c22\u89c2\u8d4f\uff01"),s.qZA()()()(),s._UZ(28,"w-nav",21),s.qZA()),2&e&&(s.xp6(28),s.Q6J("path","01"))},dependencies:[qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;background:#EEEEC5B5}.container[_ngcontent-%COMP%] .webgl[_ngcontent-%COMP%]{position:fixed;left:0;top:0}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%]{position:absolute;right:10px;top:10px;display:flex;justify-content:center;align-items:center;z-index:2}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:40px;height:20px;background:#ECAAB1FF;border-radius:20px;padding:0 5px;cursor:pointer;position:relative}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);width:16px;height:16px;border-radius:16px;background:white;transition:all .2s}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn.light[_ngcontent-%COMP%]{background:#ECAAB1FF}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn.light[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{transform:translateY(-50%)}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn.dark[_ngcontent-%COMP%]{background:#8395CDB5}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn.dark[_ngcontent-%COMP%] .switch[_ngcontent-%COMP%]{transform:translate(calc(30px - 100%),-50%)}.container[_ngcontent-%COMP%] .theme-switcher[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover .switch[_ngcontent-%COMP%]{width:15px;height:15px}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100vw;height:100vh;overflow:hidden;z-index:1;scroll-behavior:smooth}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page1[_ngcontent-%COMP%] .welcome-info[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;display:flex;justify-content:center;align-items:center}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page1[_ngcontent-%COMP%] .welcome-info[_ngcontent-%COMP%] .character[_ngcontent-%COMP%]{width:25px;font-size:1.2rem;display:inline-block;transform:translateY(100%)}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page1[_ngcontent-%COMP%] .expand-more[_ngcontent-%COMP%]{position:fixed;left:50%;bottom:10px;transform:translate(-50%);opacity:0}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page5[_ngcontent-%COMP%]{height:200vh}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page6[_ngcontent-%COMP%]{position:relative}.container[_ngcontent-%COMP%] .pages[_ngcontent-%COMP%] .page6[_ngcontent-%COMP%] .end[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:20%;transform:translate(-50%)}@keyframes bounce{0%{left:50%;transform:translate(-50%)}to{left:50%;transform:translate(-50%,8px)}}"]}),n})();var mi=O(7152);class Li{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Za=new c.iKG(-1,1,1,-1,0,1),mr=new c.u9r;mr.setAttribute("position",new c.a$l([-1,3,0,-1,-1,0,3,-1,0],3)),mr.setAttribute("uv",new c.a$l([0,2,0,0,2,0],2));class Vo{constructor(t){this._mesh=new c.Kj0(mr,t)}dispose(){this._mesh.geometry.dispose()}render(t){t.render(this._mesh,Za)}get material(){return this._mesh.material}set material(t){this._mesh.material=t}}class Lo extends Li{constructor(t,e,i=null,r=null,o=null){super(),this.scene=t,this.camera=e,this.overrideMaterial=i,this.clearColor=r,this.clearAlpha=o,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new c.Ilk}render(t,e,i){const r=t.autoClear;let o,a;t.autoClear=!1,null!==this.overrideMaterial&&(a=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),null!==this.clearColor&&(t.getClearColor(this._oldClearColor),t.setClearColor(this.clearColor)),null!==this.clearAlpha&&(o=t.getClearAlpha(),t.setClearAlpha(this.clearAlpha)),1==this.clearDepth&&t.clearDepth(),t.setRenderTarget(this.renderToScreen?null:i),!0===this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),t.render(this.scene,this.camera),null!==this.clearColor&&t.setClearColor(this._oldClearColor),null!==this.clearAlpha&&t.setClearAlpha(o),null!==this.overrideMaterial&&(this.scene.overrideMaterial=a),t.autoClear=r}}const Bo={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class Bi extends Li{constructor(t,e){super(),this.textureID=void 0!==e?e:"tDiffuse",t instanceof c.jyz?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=c.rDY.clone(t.uniforms),this.material=new c.jyz({name:void 0!==t.name?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new Vo(this.material)}render(t,e,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Ho extends Li{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,i){const r=t.getContext(),o=t.state;let a,l;o.buffers.color.setMask(!1),o.buffers.depth.setMask(!1),o.buffers.color.setLocked(!0),o.buffers.depth.setLocked(!0),this.inverse?(a=0,l=1):(a=1,l=0),o.buffers.stencil.setTest(!0),o.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.buffers.stencil.setFunc(r.ALWAYS,a,4294967295),o.buffers.stencil.setClear(l),o.buffers.stencil.setLocked(!0),t.setRenderTarget(i),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),o.buffers.color.setLocked(!1),o.buffers.depth.setLocked(!1),o.buffers.color.setMask(!0),o.buffers.depth.setMask(!0),o.buffers.stencil.setLocked(!1),o.buffers.stencil.setFunc(r.EQUAL,1,4294967295),o.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.buffers.stencil.setLocked(!0)}}class Ka extends Li{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class Dn{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),void 0===e){const i=t.getSize(new c.FM8);this._width=i.width,this._height=i.height,(e=new c.dd2(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:c.cLu})).texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Bi(Bo),this.copyPass.material.blending=c.jFi,this.clock=new c.SUY}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);-1!==e&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e<this.passes.length;e++)if(this.passes[e].enabled)return!1;return!0}render(t){void 0===t&&(t=this.clock.getDelta());const e=this.renderer.getRenderTarget();let i=!1;for(let r=0,o=this.passes.length;r<o;r++){const a=this.passes[r];if(!1!==a.enabled){if(a.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),a.render(this.renderer,this.writeBuffer,this.readBuffer,t,i),a.needsSwap){if(i){const l=this.renderer.getContext(),d=this.renderer.state.buffers.stencil;d.setFunc(l.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,t),d.setFunc(l.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==Ho&&(a instanceof Ho?i=!0:a instanceof Ka&&(i=!1))}}this.renderer.setRenderTarget(e)}reset(t){if(void 0===t){const e=this.renderer.getSize(new c.FM8);this._pixelRatio=this.renderer.getPixelRatio(),this._width=e.width,this._height=e.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(t,e){this._width=t,this._height=e;const i=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(i,r),this.renderTarget2.setSize(i,r);for(let o=0;o<this.passes.length;o++)this.passes[o].setSize(i,r)}setPixelRatio(t){this._pixelRatio=t,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}const $a={shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new c.Ilk(0)},defaultOpacity:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec3 defaultColor;\n\t\tuniform float defaultOpacity;\n\t\tuniform float luminosityThreshold;\n\t\tuniform float smoothWidth;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\n\t\t\tvec3 luma = vec3( 0.299, 0.587, 0.114 );\n\n\t\t\tfloat v = dot( texel.xyz, luma );\n\n\t\t\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );\n\n\t\t\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );\n\n\t\t\tgl_FragColor = mix( outputColor, texel, alpha );\n\n\t\t}"};class Jt extends Li{constructor(t,e,i,r){super(),this.strength=void 0!==e?e:1,this.radius=i,this.threshold=r,this.resolution=void 0!==t?new c.FM8(t.x,t.y):new c.FM8(256,256),this.clearColor=new c.Ilk(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let o=Math.round(this.resolution.x/2),a=Math.round(this.resolution.y/2);this.renderTargetBright=new c.dd2(o,a,{type:c.cLu}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let v=0;v<this.nMips;v++){const _=new c.dd2(o,a,{type:c.cLu});_.texture.name="UnrealBloomPass.h"+v,_.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(_);const m=new c.dd2(o,a,{type:c.cLu});m.texture.name="UnrealBloomPass.v"+v,m.texture.generateMipmaps=!1,this.renderTargetsVertical.push(m),o=Math.round(o/2),a=Math.round(a/2)}const l=$a;this.highPassUniforms=c.rDY.clone(l.uniforms),this.highPassUniforms.luminosityThreshold.value=r,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new c.jyz({uniforms:this.highPassUniforms,vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}),this.separableBlurMaterials=[];const d=[3,5,7,9,11];o=Math.round(this.resolution.x/2),a=Math.round(this.resolution.y/2);for(let v=0;v<this.nMips;v++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(d[v])),this.separableBlurMaterials[v].uniforms.invSize.value=new c.FM8(1/o,1/a),o=Math.round(o/2),a=Math.round(a/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=e,this.compositeMaterial.uniforms.bloomRadius.value=.1,this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new c.Pa4(1,1,1),new c.Pa4(1,1,1),new c.Pa4(1,1,1),new c.Pa4(1,1,1),new c.Pa4(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors;const p=Bo;this.copyUniforms=c.rDY.clone(p.uniforms),this.blendMaterial=new c.jyz({uniforms:this.copyUniforms,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,blending:c.WMw,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new c.Ilk,this.oldClearAlpha=1,this.basic=new c.vBJ,this.fsQuad=new Vo(null)}dispose(){for(let t=0;t<this.renderTargetsHorizontal.length;t++)this.renderTargetsHorizontal[t].dispose();for(let t=0;t<this.renderTargetsVertical.length;t++)this.renderTargetsVertical[t].dispose();this.renderTargetBright.dispose();for(let t=0;t<this.separableBlurMaterials.length;t++)this.separableBlurMaterials[t].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this.basic.dispose(),this.fsQuad.dispose()}setSize(t,e){let i=Math.round(t/2),r=Math.round(e/2);this.renderTargetBright.setSize(i,r);for(let o=0;o<this.nMips;o++)this.renderTargetsHorizontal[o].setSize(i,r),this.renderTargetsVertical[o].setSize(i,r),this.separableBlurMaterials[o].uniforms.invSize.value=new c.FM8(1/i,1/r),i=Math.round(i/2),r=Math.round(r/2)}render(t,e,i,r,o){t.getClearColor(this._oldClearColor),this.oldClearAlpha=t.getClearAlpha();const a=t.autoClear;t.autoClear=!1,t.setClearColor(this.clearColor,0),o&&t.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=i.texture,t.setRenderTarget(null),t.clear(),this.fsQuad.render(t)),this.highPassUniforms.tDiffuse.value=i.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,t.setRenderTarget(this.renderTargetBright),t.clear(),this.fsQuad.render(t);let l=this.renderTargetBright;for(let d=0;d<this.nMips;d++)this.fsQuad.material=this.separableBlurMaterials[d],this.separableBlurMaterials[d].uniforms.colorTexture.value=l.texture,this.separableBlurMaterials[d].uniforms.direction.value=Jt.BlurDirectionX,t.setRenderTarget(this.renderTargetsHorizontal[d]),t.clear(),this.fsQuad.render(t),this.separableBlurMaterials[d].uniforms.colorTexture.value=this.renderTargetsHorizontal[d].texture,this.separableBlurMaterials[d].uniforms.direction.value=Jt.BlurDirectionY,t.setRenderTarget(this.renderTargetsVertical[d]),t.clear(),this.fsQuad.render(t),l=this.renderTargetsVertical[d];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,t.setRenderTarget(this.renderTargetsHorizontal[0]),t.clear(),this.fsQuad.render(t),this.fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,o&&t.state.buffers.stencil.setTest(!0),this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(i),this.fsQuad.render(t)),t.setClearColor(this._oldClearColor,this.oldClearAlpha),t.autoClear=a}getSeperableBlurMaterial(t){const e=[];for(let i=0;i<t;i++)e.push(.39894*Math.exp(-.5*i*i/(t*t))/t);return new c.jyz({defines:{KERNEL_RADIUS:t},uniforms:{colorTexture:{value:null},invSize:{value:new c.FM8(.5,.5)},direction:{value:new c.FM8(.5,.5)},gaussianCoefficients:{value:e}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 invSize;\n\t\t\t\tuniform vec2 direction;\n\t\t\t\tuniform float gaussianCoefficients[KERNEL_RADIUS];\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tfloat weightSum = gaussianCoefficients[0];\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianCoefficients[i];\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})}getCompositeMaterial(t){return new c.jyz({defines:{NUM_MIPS:t},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}}Jt.BlurDirectionX=new c.FM8(1,0),Jt.BlurDirectionY=new c.FM8(0,1);const Uo={uniforms:{tDiffuse:{value:null},resolution:{value:new c.FM8(1/1024,1/512)}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\tprecision highp float;\n\n\tuniform sampler2D tDiffuse;\n\n\tuniform vec2 resolution;\n\n\tvarying vec2 vUv;\n\n\t// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro ([email protected])\n\n\t//----------------------------------------------------------------------------------\n\t// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag\n\t// SDK Version: v3.00\n\t// Email: [email protected]\n\t// Site: http://developer.nvidia.com/\n\t//\n\t// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n\t//\n\t// Redistribution and use in source and binary forms, with or without\n\t// modification, are permitted provided that the following conditions\n\t// are met:\n\t// * Redistributions of source code must retain the above copyright\n\t// notice, this list of conditions and the following disclaimer.\n\t// * Redistributions in binary form must reproduce the above copyright\n\t// notice, this list of conditions and the following disclaimer in the\n\t// documentation and/or other materials provided with the distribution.\n\t// * Neither the name of NVIDIA CORPORATION nor the names of its\n\t// contributors may be used to endorse or promote products derived\n\t// from this software without specific prior written permission.\n\t//\n\t// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY\n\t// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n\t// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n\t// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n\t// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n\t// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n\t// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n\t// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t//\n\t//----------------------------------------------------------------------------------\n\n\t#ifndef FXAA_DISCARD\n\t\t\t//\n\t\t\t// Only valid for PC OpenGL currently.\n\t\t\t// Probably will not work when FXAA_GREEN_AS_LUMA = 1.\n\t\t\t//\n\t\t\t// 1 = Use discard on pixels which don't need AA.\n\t\t\t// For APIs which enable concurrent TEX+ROP from same surface.\n\t\t\t// 0 = Return unchanged color on pixels which don't need AA.\n\t\t\t//\n\t\t\t#define FXAA_DISCARD 0\n\t#endif\n\n\t/*--------------------------------------------------------------------------*/\n\t#define FxaaTexTop(t, p) texture2D(t, p, -100.0)\n\t#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), -100.0)\n\t/*--------------------------------------------------------------------------*/\n\n\t#define NUM_SAMPLES 5\n\n\t// assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha\n\tfloat contrast( vec4 a, vec4 b ) {\n\t\t\tvec4 diff = abs( a - b );\n\t\t\treturn max( max( max( diff.r, diff.g ), diff.b ), diff.a );\n\t}\n\n\t/*============================================================================\n\n\t\t\t\t\t\t\t\t\tFXAA3 QUALITY - PC\n\n\t============================================================================*/\n\n\t/*--------------------------------------------------------------------------*/\n\tvec4 FxaaPixelShader(\n\t\t\tvec2 posM,\n\t\t\tsampler2D tex,\n\t\t\tvec2 fxaaQualityRcpFrame,\n\t\t\tfloat fxaaQualityEdgeThreshold,\n\t\t\tfloat fxaaQualityinvEdgeThreshold\n\t) {\n\t\t\tvec4 rgbaM = FxaaTexTop(tex, posM);\n\t\t\tvec4 rgbaS = FxaaTexOff(tex, posM, vec2( 0.0, 1.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaE = FxaaTexOff(tex, posM, vec2( 1.0, 0.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaN = FxaaTexOff(tex, posM, vec2( 0.0,-1.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaW = FxaaTexOff(tex, posM, vec2(-1.0, 0.0), fxaaQualityRcpFrame.xy);\n\t\t\t// . S .\n\t\t\t// W M E\n\t\t\t// . N .\n\n\t\t\tbool earlyExit = max( max( max(\n\t\t\t\t\tcontrast( rgbaM, rgbaN ),\n\t\t\t\t\tcontrast( rgbaM, rgbaS ) ),\n\t\t\t\t\tcontrast( rgbaM, rgbaE ) ),\n\t\t\t\t\tcontrast( rgbaM, rgbaW ) )\n\t\t\t\t\t< fxaaQualityEdgeThreshold;\n\t\t\t// . 0 .\n\t\t\t// 0 0 0\n\t\t\t// . 0 .\n\n\t\t\t#if (FXAA_DISCARD == 1)\n\t\t\t\t\tif(earlyExit) FxaaDiscard;\n\t\t\t#else\n\t\t\t\t\tif(earlyExit) return rgbaM;\n\t\t\t#endif\n\n\t\t\tfloat contrastN = contrast( rgbaM, rgbaN );\n\t\t\tfloat contrastS = contrast( rgbaM, rgbaS );\n\t\t\tfloat contrastE = contrast( rgbaM, rgbaE );\n\t\t\tfloat contrastW = contrast( rgbaM, rgbaW );\n\n\t\t\tfloat relativeVContrast = ( contrastN + contrastS ) - ( contrastE + contrastW );\n\t\t\trelativeVContrast *= fxaaQualityinvEdgeThreshold;\n\n\t\t\tbool horzSpan = relativeVContrast > 0.;\n\t\t\t// . 1 .\n\t\t\t// 0 0 0\n\t\t\t// . 1 .\n\n\t\t\t// 45 deg edge detection and corners of objects, aka V/H contrast is too similar\n\t\t\tif( abs( relativeVContrast ) < .3 ) {\n\t\t\t\t\t// locate the edge\n\t\t\t\t\tvec2 dirToEdge;\n\t\t\t\t\tdirToEdge.x = contrastE > contrastW ? 1. : -1.;\n\t\t\t\t\tdirToEdge.y = contrastS > contrastN ? 1. : -1.;\n\t\t\t\t\t// . 2 . . 1 .\n\t\t\t\t\t// 1 0 2 ~= 0 0 1\n\t\t\t\t\t// . 1 . . 0 .\n\n\t\t\t\t\t// tap 2 pixels and see which ones are \"outside\" the edge, to\n\t\t\t\t\t// determine if the edge is vertical or horizontal\n\n\t\t\t\t\tvec4 rgbaAlongH = FxaaTexOff(tex, posM, vec2( dirToEdge.x, -dirToEdge.y ), fxaaQualityRcpFrame.xy);\n\t\t\t\t\tfloat matchAlongH = contrast( rgbaM, rgbaAlongH );\n\t\t\t\t\t// . 1 .\n\t\t\t\t\t// 0 0 1\n\t\t\t\t\t// . 0 H\n\n\t\t\t\t\tvec4 rgbaAlongV = FxaaTexOff(tex, posM, vec2( -dirToEdge.x, dirToEdge.y ), fxaaQualityRcpFrame.xy);\n\t\t\t\t\tfloat matchAlongV = contrast( rgbaM, rgbaAlongV );\n\t\t\t\t\t// V 1 .\n\t\t\t\t\t// 0 0 1\n\t\t\t\t\t// . 0 .\n\n\t\t\t\t\trelativeVContrast = matchAlongV - matchAlongH;\n\t\t\t\t\trelativeVContrast *= fxaaQualityinvEdgeThreshold;\n\n\t\t\t\t\tif( abs( relativeVContrast ) < .3 ) { // 45 deg edge\n\t\t\t\t\t\t\t// 1 1 .\n\t\t\t\t\t\t\t// 0 0 1\n\t\t\t\t\t\t\t// . 0 1\n\n\t\t\t\t\t\t\t// do a simple blur\n\t\t\t\t\t\t\treturn mix(\n\t\t\t\t\t\t\t\t\trgbaM,\n\t\t\t\t\t\t\t\t\t(rgbaN + rgbaS + rgbaE + rgbaW) * .25,\n\t\t\t\t\t\t\t\t\t.4\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\thorzSpan = relativeVContrast > 0.;\n\t\t\t}\n\n\t\t\tif(!horzSpan) rgbaN = rgbaW;\n\t\t\tif(!horzSpan) rgbaS = rgbaE;\n\t\t\t// . 0 . 1\n\t\t\t// 1 0 1 -> 0\n\t\t\t// . 0 . 1\n\n\t\t\tbool pairN = contrast( rgbaM, rgbaN ) > contrast( rgbaM, rgbaS );\n\t\t\tif(!pairN) rgbaN = rgbaS;\n\n\t\t\tvec2 offNP;\n\t\t\toffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n\t\t\toffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n\n\t\t\tbool doneN = false;\n\t\t\tbool doneP = false;\n\n\t\t\tfloat nDist = 0.;\n\t\t\tfloat pDist = 0.;\n\n\t\t\tvec2 posN = posM;\n\t\t\tvec2 posP = posM;\n\n\t\t\tint iterationsUsed = 0;\n\t\t\tint iterationsUsedN = 0;\n\t\t\tint iterationsUsedP = 0;\n\t\t\tfor( int i = 0; i < NUM_SAMPLES; i++ ) {\n\t\t\t\t\titerationsUsed = i;\n\n\t\t\t\t\tfloat increment = float(i + 1);\n\n\t\t\t\t\tif(!doneN) {\n\t\t\t\t\t\t\tnDist += increment;\n\t\t\t\t\t\t\tposN = posM + offNP * nDist;\n\t\t\t\t\t\t\tvec4 rgbaEndN = FxaaTexTop(tex, posN.xy);\n\t\t\t\t\t\t\tdoneN = contrast( rgbaEndN, rgbaM ) > contrast( rgbaEndN, rgbaN );\n\t\t\t\t\t\t\titerationsUsedN = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!doneP) {\n\t\t\t\t\t\t\tpDist += increment;\n\t\t\t\t\t\t\tposP = posM - offNP * pDist;\n\t\t\t\t\t\t\tvec4 rgbaEndP = FxaaTexTop(tex, posP.xy);\n\t\t\t\t\t\t\tdoneP = contrast( rgbaEndP, rgbaM ) > contrast( rgbaEndP, rgbaN );\n\t\t\t\t\t\t\titerationsUsedP = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(doneN || doneP) break;\n\t\t\t}\n\n\n\t\t\tif ( !doneP && !doneN ) return rgbaM; // failed to find end of edge\n\n\t\t\tfloat dist = min(\n\t\t\t\t\tdoneN ? float( iterationsUsedN ) / float( NUM_SAMPLES - 1 ) : 1.,\n\t\t\t\t\tdoneP ? float( iterationsUsedP ) / float( NUM_SAMPLES - 1 ) : 1.\n\t\t\t);\n\n\t\t\t// hacky way of reduces blurriness of mostly diagonal edges\n\t\t\t// but reduces AA quality\n\t\t\tdist = pow(dist, .5);\n\n\t\t\tdist = 1. - dist;\n\n\t\t\treturn mix(\n\t\t\t\t\trgbaM,\n\t\t\t\t\trgbaN,\n\t\t\t\t\tdist * .5\n\t\t\t);\n\t}\n\n\tvoid main() {\n\t\t\tconst float edgeDetectionQuality = .2;\n\t\t\tconst float invEdgeDetectionQuality = 1. / edgeDetectionQuality;\n\n\t\t\tgl_FragColor = FxaaPixelShader(\n\t\t\t\t\tvUv,\n\t\t\t\t\ttDiffuse,\n\t\t\t\t\tresolution,\n\t\t\t\t\tedgeDetectionQuality, // [0,1] contrast needed, otherwise early discard\n\t\t\t\t\tinvEdgeDetectionQuality\n\t\t\t);\n\n\t}\n\t"},Xa=["container"];let Qa=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.params={strength:1.456,radius:.5,threshold:0,render:{toneMapping:0,toneMappingExposure:1},lights:{directional:{intensity:1,color:16777215,helper:!0,bias:-.002594,position:{x:-1.1,y:2.4,z:3.6}},ambient:{intensity:1,color:16777215},hemisphereLight:{top:16777215,bottom:3159317,intensity:0,helper:!0,height:1},lamp:{intensity:0,color:16777215,distance:15,decay:.5}}},this.radius=0,this.DARK_MATERIAL=new c.vBJ({color:0}),this.materials={},this.BLOOM_LAYER=1,this.bloomLayer=new c.S9g,this.animate=()=>{this.controls&&this.controls.enabled&&this.controls.update(),this.scene.traverse(this.darkNonBloomMaterial),this.bloomComposer.render(),this.scene.traverse(this.restoreMaterial),this.finalComposer.render()},this.darkNonBloomMaterial=i=>{i.isMesh&&!1===this.bloomLayer.test(i.layers)&&(this.materials[i.uuid]=i.material,i.material=this.DARK_MATERIAL)},this.restoreMaterial=i=>{this.materials[i.uuid]&&(i.material=this.materials[i.uuid],delete this.materials[i.uuid])}}ngOnDestroy(){this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){this.initScene(),this.addLight(),this.loadModel(),this.initGUI()}initScene(){const e=this.width=this.container.nativeElement.offsetWidth,i=this.height=this.container.nativeElement.offsetHeight,r=this.scene=new c.xsS,o=this.camera=new c.cPb(70,e/i,.1,100);o.position.set(0,2,5);const a=this.renderer=new c.CP7({antialias:!0,alpha:!1});a.setSize(e,i),a.setPixelRatio(devicePixelRatio),a.outputColorSpace=c.KI_,this.renderer2.appendChild(this.container.nativeElement,a.domElement),this.bloomLayer.set(this.BLOOM_LAYER);{const l=this.bloomComposer=new Dn(this.renderer);l.renderToScreen=!1,l.setSize(e,i),l.setPixelRatio(4*devicePixelRatio);const d=new Lo(r,o);l.addPass(d);const g=this.bloomPass=new Jt(new c.FM8(e,i),this.params.strength,this.params.radius,this.params.threshold);l.addPass(g);const p=this.finalComposer=new Dn(this.renderer);p.setSize(e,i),p.setPixelRatio(devicePixelRatio),p.addPass(d);const v=new Bi(Uo),_=a.getPixelRatio();v.material.uniforms.resolution.value.x=1/(e*_),v.material.uniforms.resolution.value.y=1/(i*_),v.renderToScreen=!1,p.addPass(v);const m=new Bi(new c.jyz({uniforms:{baseTexture:{value:null},bloomTexture:{value:l.renderTarget2.texture}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",fragmentShader:"\n uniform sampler2D baseTexture;\n uniform sampler2D bloomTexture;\n\n varying vec2 vUv;\n\n void main() {\n gl_FragColor = ( texture2D( baseTexture, vUv ) + vec4( 1.0 ) * texture2D( bloomTexture, vUv ) );\n }\n "}),"baseTexture");p.addPass(m)}this.controls=new mi.z(o,a.domElement),a.setAnimationLoop(this.animate)}addLight(){{const e=this.directionalLight=new c.Ox3(this.params.lights.directional.color,this.params.lights.directional.intensity);e.position.set(this.params.lights.directional.position.x,this.params.lights.directional.position.y,this.params.lights.directional.position.z),this.scene.add(e)}{const e=this.ambientLight=new c.Mig(this.params.lights.ambient.color,this.params.lights.ambient.intensity);this.scene.add(e)}}loadModel(){const e=new Bt._;e.setDecoderPath("assets/lib/draco/"),(new Ht.E).setDRACOLoader(e).load("assets/model/Introduce-SCIFI.glb",i=>{this.models=i.scene,this.models.rotation.y=Math.PI/4;let r=(new c.ZzF).setFromObject(i.scene);const o=this.size=r.getSize(new c.Pa4);this.radius=o.length();const a=r.getCenter(new c.Pa4);this.camera.position.copy(a),this.controls&&(this.controls.target=a.clone()),this.camera.position.y+=this.radius/3,this.camera.position.z+=this.radius/1.5,i.scene.traverse(l=>{l.isMesh&&l.material&&l.material.name.startsWith("SCIFI")&&l.layers.enable(this.BLOOM_LAYER)}),this.scene.add(i.scene)})}initGUI(){const e=this.gui=new Ut.XS;e.hide(),(i=>{i.open(),i.add(this.params,"strength",0,5).step(.001).onChange(r=>this.bloomPass.strength=r),i.add(this.params,"radius",0,10).step(.001).onChange(r=>this.bloomPass.radius=r),i.add(this.params,"threshold",0,1).step(.001).onChange(r=>this.bloomPass.threshold=r)})(e.addFolder("Bloom"))}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-scifi"]],viewQuery:function(e,i){if(1&e&&s.Gf(Xa,5),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first)}},decls:3,vars:1,consts:[[1,"container"],["container",""],[3,"path"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"w-nav",2),s.qZA()),2&e&&(s.xp6(2),s.Q6J("path","02"))},dependencies:[qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh}"]}),n})();const qa=["container"];let Ja=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.animate=()=>{this.controls&&this.controls.enabled&&this.controls.update(),this.renderer.render(this.scene,this.camera)}}ngOnDestroy(){this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){this.initScene(),this.loadModel(),this.initGUI()}initScene(){const e=this.width=this.container.nativeElement.offsetWidth,i=this.height=this.container.nativeElement.offsetHeight,o=(this.scene=new c.xsS,this.camera=new c.cPb(50,e/i,.1,100));o.position.set(0,2,5);const a=this.renderer=new c.CP7({antialias:!0,alpha:!0});a.setSize(e,i),a.setPixelRatio(devicePixelRatio),a.outputColorSpace=c.KI_,this.renderer2.appendChild(this.container.nativeElement,a.domElement),this.controls=new mi.z(o,a.domElement),a.setAnimationLoop(this.animate)}loadModel(){const e=(new c.dpR).load("assets/model/Bake-light.jpg");e.flipY=!1,e.encoding=c.knz,this.materialLight=new c.vBJ({map:e}),e.dispose();const i=(new c.dpR).load("assets/model/Bake-dark.jpg");i.flipY=!1,i.encoding=c.knz,i.dispose(),this.materialDark=new c.vBJ({map:i});const r=(new c.dpR).load("assets/model/AO.jpg");r.flipY=!1,r.encoding=c.knz,this.materialAO=new c.vBJ({aoMap:r}),r.dispose();const o=new Bt._;o.setDecoderPath("assets/lib/draco/"),(new Ht.E).setDRACOLoader(o).load("assets/model/Introduce-Bake.glb",a=>{this.model=a.scene,a.scene.rotation.y=Math.PI/4,a.scene.traverse(l=>{l.isMesh&&l.material&&(l.material=this.materialLight)}),this.scene.add(a.scene)})}initGUI(){const e=this.gui=new Ut.XS;e.add({Light:()=>{this.model.traverse(i=>{i.isMesh&&i.material&&(i.material=this.materialLight)})}},"Light"),e.add({Dark:()=>{this.model.traverse(i=>{i.isMesh&&i.material&&(i.material=this.materialDark)})}},"Dark"),e.add({AO:()=>{this.model.traverse(i=>{i.isMesh&&i.material&&(i.geometry.getAttribute("uv2")||i.geometry.setAttribute("uv2",i.geometry.getAttribute("uv")),i.material=this.materialAO)})}},"AO")}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-baked"]],viewQuery:function(e,i){if(1&e&&s.Gf(qa,5),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first)}},decls:3,vars:1,consts:[[1,"container"],["container",""],[3,"path"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"w-nav",2),s.qZA()),2&e&&(s.xp6(2),s.Q6J("path","03"))},dependencies:[qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh}"]}),n})();var gr=O(3025),el=O(2076),zo=O(9751),tl=O(4742),Go=O(8421),il=O(7669),On=O(5403),nl=O(3268),rl=O(1810),_r=O(4004);let jo=(()=>{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)(s.Y36(s.Qsj),s.Y36(s.SBq))},n.\u0275dir=s.lG2({type:n}),n})(),ei=(()=>{class n extends jo{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=s.n5z(n)))(i||n)}}(),n.\u0275dir=s.lG2({type:n,features:[s.qOj]}),n})();const it=new s.OlP("NgValueAccessor"),sl={provide:it,useExisting:(0,s.Gpc)(()=>vr),multi:!0};let vr=(()=>{class n extends ei{writeValue(e){this.setProperty("checked",e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=s.n5z(n)))(i||n)}}(),n.\u0275dir=s.lG2({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&s.NdJ("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[s._Bn([sl]),s.qOj]}),n})();const al={provide:it,useExisting:(0,s.Gpc)(()=>yr),multi:!0},cl=new s.OlP("CompositionEventMode");let yr=(()=>{class n extends jo{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ll(){const n=(0,me.q)()?(0,me.q)().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)(s.Y36(s.Qsj),s.Y36(s.SBq),s.Y36(cl,8))},n.\u0275dir=s.lG2({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&&s.NdJ("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:[s._Bn([al]),s.qOj]}),n})();const we=new s.OlP("NgValidators"),Dt=new s.OlP("NgAsyncValidators");function es(n){return null!=n}function ts(n){return(0,s.QGY)(n)?(0,el.D)(n):n}function is(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function ns(n,t){return t.map(e=>e(n))}function rs(n){return n.map(t=>function hl(n){return!n.validate}(t)?t:e=>t.validate(e))}function br(n){return null!=n?function os(n){if(!n)return null;const t=n.filter(es);return 0==t.length?null:function(e){return is(ns(e,t))}}(rs(n)):null}function Cr(n){return null!=n?function ss(n){if(!n)return null;const t=n.filter(es);return 0==t.length?null:function(e){return function ol(...n){const t=(0,il.jO)(n),{args:e,keys:i}=(0,tl.D)(n),r=new zo.y(o=>{const{length:a}=e;if(!a)return void o.complete();const l=new Array(a);let d=a,g=a;for(let p=0;p<a;p++){let v=!1;(0,Go.Xf)(e[p]).subscribe((0,On.x)(o,_=>{v||(v=!0,g--),l[p]=_},()=>d--,void 0,()=>{(!d||!v)&&(g||o.next(i?(0,rl.n)(i,l):l),o.complete())}))}});return t?r.pipe((0,nl.Z)(t)):r}(ns(e,t).map(ts)).pipe((0,_r.U)(is))}}(rs(n)):null}function as(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Mr(n){return n?Array.isArray(n)?n:[n]:[]}function kn(n,t){return Array.isArray(n)?n.includes(t):n===t}function ds(n,t){const e=Mr(t);return Mr(n).forEach(r=>{kn(e,r)||e.push(r)}),e}function us(n,t){return Mr(t).filter(e=>!kn(n,e))}class hs{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=br(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Cr(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}}class ke extends hs{get formDirective(){return null}get path(){return null}}class Ot extends hs{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}let wr=(()=>{class n extends class fs{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}}{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(Ot,2))},n.\u0275dir=s.lG2({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&s.ekj("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:[s.qOj]}),n})();const Hi="VALID",Pn="INVALID",gi="PENDING",Ui="DISABLED";function ms(n){return Array.isArray(n)?br(n):n||null}function gs(n){return Array.isArray(n)?Cr(n):n||null}function In(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function zi(n,t){(function Sr(n,t){const e=function ls(n){return n._rawValidators}(n);null!==t.validator?n.setValidators(as(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=function cs(n){return n._rawAsyncValidators}(n);null!==t.asyncValidator?n.setAsyncValidators(as(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Vn(t._rawValidators,r),Vn(t._rawAsyncValidators,r)})(n,t),t.valueAccessor.writeValue(n.value),n.disabled&&t.valueAccessor.setDisabledState?.(!0),function Ml(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&bs(n,t)})}(n,t),function El(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function wl(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&bs(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function Cl(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Vn(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function bs(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Es(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function xs(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Fl={provide:Ot,useExisting:(0,s.Gpc)(()=>Bn)},Os=(()=>Promise.resolve())();let Hr,Bn=(()=>{class n extends Ot{constructor(e,i,r,o,a){super(),this._changeDetectorRef=a,this.control=new class extends class ys{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=ms(this._rawValidators),this._composedAsyncValidatorFn=gs(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===Hi}get invalid(){return this.status===Pn}get pending(){return this.status==gi}get disabled(){return this.status===Ui}get enabled(){return this.status!==Ui}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=ms(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=gs(t)}addValidators(t){this.setValidators(ds(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(ds(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(us(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(us(t,this._rawAsyncValidators))}hasValidator(t){return kn(this._rawValidators,t)}hasAsyncValidator(t){return kn(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=gi,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Ui,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={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Hi,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===Hi||this.status===gi)&&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()?Ui:Hi}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=gi,this._hasOwnPendingAsyncValidator=!0;const e=ts(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){const 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 s.vpe,this.statusChanges=new s.vpe}_calculateStatus(){return this._allControlsDisabled()?Ui:this.errors?Pn:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(gi)?gi:this._anyControlsHaveStatus(Pn)?Pn:Hi}_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){In(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}}{constructor(t=null,e,i){super(function Tr(n){return(In(n)?n.validators:n)||null}(e),function Dr(n,t){return(In(t)?t.asyncValidators:n)||null}(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}),In(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=xs(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){Es(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Es(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){xs(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}},this._registered=!1,this.update=new s.vpe,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function Fr(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===yr?e=o:function Tl(n){return Object.getPrototypeOf(n.constructor)===ei}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function kr(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}(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(){zi(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){Os.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&(0,s.D6c)(i);Os.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function Nn(n,t){return[...t.path,n]}(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(ke,9),s.Y36(we,10),s.Y36(Dt,10),s.Y36(it,10),s.Y36(s.sBO,8))},n.\u0275dir=s.lG2({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:[s._Bn([Fl]),s.qOj,s.TTD]}),n})(),ks=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({}),n})(),nc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[ks]}),n})(),rc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[nc]}),n})();try{Hr=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Hr=!1}let ji,Ur,Hn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?(0,me.NF)(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&&!Hr)&&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)(s.LFG(s.Lbi))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Un(n){return function sc(){if(null==ji&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ji=!0}))}finally{ji=ji||!1}return ji}()?n:!!n.capture}function Yi(n){return n.composedPath?n.composedPath()[0]:n.target}var dc=O(1135),zr=O(7579),uc=O(9646),Ac=O(9300);function Xs(n){return(0,Ac.h)((t,e)=>n<=e)}var Tc=O(4671),Gr=O(4482);function Oc(n,t){return n===t}var Sc=O(5032);function Qs(n){return(0,Gr.e)((t,e)=>{(0,Go.Xf)(n).subscribe((0,On.x)(e,()=>e.complete(),Sc.Z)),!e.closed&&t.subscribe(e)})}function Gn(n){return null!=n&&"false"!=`${n}`}function vi(n,t=0){return function kc(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}(n)?Number(n):t}function qs(n){return Array.isArray(n)?n:[n]}function jr(n){return n instanceof s.SBq?n.nativeElement:n}var Fc=O(9841),Pc=O(7272),Ic=O(5698),Js=O(727);class Nc extends Js.w0{constructor(t,e){super()}schedule(t,e=0){return this}}const jn={setInterval(n,t,...e){const{delegate:i}=jn;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){const{delegate:t}=jn;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var Rc=O(8737);const ea={now:()=>(ea.delegate||Date).now(),delegate:void 0};class Wi{constructor(t,e=Wi.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}Wi.now=ea.now;const Bc=new class Lc extends Wi{constructor(t,e=Wi.now){super(t,e),this.actions=[],this._active=!1}flush(t){const{actions:e}=this;if(this._active)return void e.push(t);let i;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}}}(class Vc extends Nc{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;const 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 jn.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&&jn.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const 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){const{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,(0,Rc.P)(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}});var Uc=O(8675);const ta=new Set;let yi,zc=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):jc}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function Gc(n){if(!ta.has(n))try{yi||(yi=document.createElement("style"),yi.setAttribute("type","text/css"),document.head.appendChild(yi)),yi.sheet&&(yi.sheet.insertRule(`@media ${n} {body{ }}`,0),ta.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(Hn))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function jc(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}let Yc=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new zr.x}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return ia(qs(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){const r=ia(qs(e)).map(a=>this._registerQuery(a).observable);let o=(0,Fc.a)(r);return o=(0,Pc.z)(o.pipe((0,Ic.q)(1)),o.pipe(Xs(1),function Hc(n,t=Bc){return(0,Gr.e)((e,i)=>{let r=null,o=null,a=null;const l=()=>{if(r){r.unsubscribe(),r=null;const g=o;o=null,i.next(g)}};function d(){const g=a+n,p=t.now();if(p<g)return r=this.schedule(void 0,g-p),void i.add(r);l()}e.subscribe((0,On.x)(i,g=>{o=g,a=t.now(),r||(r=t.schedule(d,n),i.add(r))},()=>{l(),i.complete()},void 0,()=>{o=r=null}))})}(0))),o.pipe((0,_r.U)(a=>{const l={matches:!1,breakpoints:{}};return a.forEach(({matches:d,query:g})=>{l.matches=l.matches||d,l.breakpoints[g]=d}),l}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);const i=this._mediaMatcher.matchMedia(e),o={observable:new zo.y(a=>{const l=d=>this._zone.run(()=>a.next(d));return i.addListener(l),()=>{i.removeListener(l)}}).pipe((0,Uc.O)(i),(0,_r.U)(({matches:a})=>({query:e,matches:a})),Qs(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(zc),s.LFG(s.R0b))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function ia(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}const td=new s.OlP("cdk-input-modality-detector-options"),id={ignoreKeys:[18,17,224,91,16]},bi=Un({passive:!0,capture:!0});let nd=(()=>{class n{constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new dc.X(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(l=>l===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Yi(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs<650||(this._modality.next(function Jc(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(a)?"keyboard":"mouse"),this._mostRecentTarget=Yi(a))},this._onTouchstart=a=>{!function ed(n){const 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)}(a)?(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Yi(a)):this._modality.next("keyboard")},this._options={...id,...o},this.modalityDetected=this._modality.pipe(Xs(1)),this.modalityChanged=this.modalityDetected.pipe(function Dc(n,t=Tc.y){return n=n??Oc,(0,Gr.e)((e,i)=>{let r,o=!0;e.subscribe((0,On.x)(i,a=>{const l=t(a);(o||!n(r,l))&&(o=!1,r=l,i.next(a))}))})}()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,bi),r.addEventListener("mousedown",this._onMousedown,bi),r.addEventListener("touchstart",this._onTouchstart,bi)})}get mostRecentModality(){return this._modality.value}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,bi),document.removeEventListener("mousedown",this._onMousedown,bi),document.removeEventListener("touchstart",this._onTouchstart,bi))}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(Hn),s.LFG(s.R0b),s.LFG(me.K0),s.LFG(td,8))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const od=new s.OlP("cdk-focus-monitor-default-options"),Yn=Un({passive:!0,capture:!0});let sd=(()=>{class n{constructor(e,i,r,o,a){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new zr.x,this._rootNodeFocusAndBlurListener=l=>{for(let g=Yi(l);g;g=g.parentElement)"focus"===l.type?this._onFocus(l,g):this._onBlur(l,g)},this._document=o,this._detectionMode=a?.detectionMode||0}monitor(e,i=!1){const r=jr(e);if(!this._platform.isBrowser||1!==r.nodeType)return(0,uc.of)(null);const o=function lc(n){if(function ac(){if(null==Ur){const n=typeof document<"u"?document.head:null;Ur=!(!n||!n.createShadowRoot&&!n.attachShadow)}return Ur}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(r)||this._getDocument(),a=this._elementInfo.get(r);if(a)return i&&(a.checkChildren=!0),a.subject;const l={checkChildren:i,subject:new zr.x,rootNode:o};return this._elementInfo.set(r,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(e){const i=jr(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){const o=jr(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([l,d])=>this._originChanged(l,i,d)):(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){const r=this._elementInfo.get(i),o=Yi(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){const 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;const i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,Yn),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,Yn)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Qs(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){const i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Yn),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Yn),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){const i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;const o=e.labels;if(o)for(let a=0;a<o.length;a++)if(o[a].contains(i))return!0;return!1}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(s.R0b),s.LFG(Hn),s.LFG(nd),s.LFG(me.K0,8),s.LFG(od,8))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const aa="cdk-high-contrast-black-on-white",la="cdk-high-contrast-white-on-black",Yr="cdk-high-contrast-active";let ad=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=(0,s.f3M)(Yc).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);const 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){const e=this._document.body.classList;e.remove(Yr,aa,la),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();1===i?e.add(Yr,aa):2===i&&e.add(Yr,la)}}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(Hn),s.LFG(me.K0))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const ld=new s.OlP("cdk-dir-doc",{providedIn:"root",factory:function cd(){return(0,s.f3M)(me.K0)}}),dd=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let hd=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new s.vpe,e){const r=e.documentElement?e.documentElement.dir:null;this.value=function ud(n){const t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?dd.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)(s.LFG(ld,8))},n.\u0275prov=s.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ca=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({}),n})();const pd=new s.OlP("mat-sanity-checks",{providedIn:"root",factory:function fd(){return!0}});let ha=(()=>{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!function cc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(s.LFG(ad),s.LFG(pd,8),s.LFG(me.K0))},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[ca,ca]}),n})();function md(n){return class extends n{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Gn(t)}}}function gd(n,t){return class extends n{constructor(...e){super(...e),this.defaultColor=t,this.color=t}get color(){return this._color}set color(e){const 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 _d(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?vi(e):this.defaultTabIndex}}}const Md=["sliderWrapper"],Xe=Un({passive:!1}),Td={provide:it,useExisting:(0,s.Gpc)(()=>ga),multi:!0};class Dd{}const Od=_d(gd(md(class{constructor(n){this._elementRef=n}}),"accent"));let ga=(()=>{class n extends Od{constructor(e,i,r,o,a,l,d,g){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this._dir=o,this._ngZone=l,this._animationMode=g,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 s.vpe,this.input=new s.vpe,this.valueChange=new s.vpe,this.onTouched=()=>{},this._percent=0,this._isSliding=null,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=Js.w0.EMPTY,this._pointerDown=p=>{this.disabled||this._isSliding||!Ki(p)&&0!==p.button||this._ngZone.run(()=>{this._touchId=Ki(p)?function Sd(n,t){for(let e=0;e<n.touches.length;e++){const i=n.touches[e].target;if(t===i||t.contains(i))return n.touches[e].identifier}}(p,this._elementRef.nativeElement):void 0;const v=va(p,this._touchId);if(v){const _=this.value;this._isSliding="pointer",this._lastPointerEvent=p,this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(p),this._focusHostElement(),this._updateValueFromPosition(v),this._valueOnSlideStart=_,p.cancelable&&p.preventDefault(),_!=this.value&&this._emitInputEvent()}})},this._pointerMove=p=>{if("pointer"===this._isSliding){const v=va(p,this._touchId);if(v){p.cancelable&&p.preventDefault();const _=this.value;this._lastPointerEvent=p,this._updateValueFromPosition(v),_!=this.value&&this._emitInputEvent()}}},this._pointerUp=p=>{"pointer"===this._isSliding&&(!Ki(p)||"number"!=typeof this._touchId||Zr(p.changedTouches,this._touchId))&&(p.cancelable&&p.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=d,this.tabIndex=parseInt(a)||0,l.runOutsideAngular(()=>{const p=e.nativeElement;p.addEventListener("mousedown",this._pointerDown,Xe),p.addEventListener("touchstart",this._pointerDown,Xe)})}get invert(){return this._invert}set invert(e){this._invert=Gn(e)}get max(){return this._max}set max(e){this._max=vi(e,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(e){this._min=vi(e,this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(e){this._step=vi(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=Gn(e)}get tickInterval(){return this._tickInterval}set tickInterval(e){this._tickInterval="auto"===e?"auto":"number"==typeof e||"string"==typeof e?vi(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=vi(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=Gn(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(){const 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(){const 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,l={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()){const d=this._shouldInvertAxis();let g;g=this.vertical?d?"Bottom":"Top":d?"Right":"Left",l[`padding${g}`]=`${this._getThumbGap()}px`}return l}_getThumbContainerStyles(){const e=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?e:!e)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const 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(){const e=this._elementRef.nativeElement;e.removeEventListener("mousedown",this._pointerDown,Xe),e.removeEventListener("touchstart",this._pointerDown,Xe),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||function xc(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e)||this._isSliding&&"keyboard"!==this._isSliding)return;const 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){const i=this._document,r=Ki(e),a=r?"touchend":"mouseup";i.addEventListener(r?"touchmove":"mousemove",this._pointerMove,Xe),i.addEventListener(a,this._pointerUp,Xe),r&&i.addEventListener("touchcancel",this._pointerUp,Xe);const l=this._getWindow();typeof l<"u"&&l&&l.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const e=this._document;e.removeEventListener("mousemove",this._pointerMove,Xe),e.removeEventListener("mouseup",this._pointerUp,Xe),e.removeEventListener("touchmove",this._pointerMove,Xe),e.removeEventListener("touchend",this._pointerUp,Xe),e.removeEventListener("touchcancel",this._pointerUp,Xe);const i=this._getWindow();typeof i<"u"&&i&&i.removeEventListener("blur",this._windowBlur)}_increment(e){const 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 a=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()&&(a=1-a),0===a)this.value=this.min;else if(1===a)this.value=this.max;else{const l=this._calculateValue(a),d=Math.round((l-this.min)/this.step)*this.step+this.min;this.value=this._clamp(d,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=_a(e)?e:0}_createChangeEvent(e=this.value){let i=new Dd;return i.source=this,i.value=e,i}_calculatePercentage(e){const i=((e||0)-this.min)/(this.max-this.min);return _a(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)(s.Y36(s.SBq),s.Y36(sd),s.Y36(s.sBO),s.Y36(hd,8),s.$8M("tabindex"),s.Y36(s.R0b),s.Y36(me.K0),s.Y36(s.QbO,8))},n.\u0275cmp=s.Xpm({type:n,selectors:[["mat-slider"]],viewQuery:function(e,i){if(1&e&&s.Gf(Md,5),2&e){let r;s.iGM(r=s.CRH())&&(i._sliderWrapper=r.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(e,i){1&e&&s.NdJ("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.Ikx("tabIndex",i.tabIndex),s.uIk("aria-disabled",i.disabled)("aria-valuemax",i.max)("aria-valuemin",i.min)("aria-valuenow",i.value)("aria-valuetext",i.valueText??i.displayValue)("aria-orientation",i.vertical?"vertical":"horizontal"),s.ekj("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:[s._Bn([Td]),s.qOj],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&&(s.TgZ(0,"div",0,1)(2,"div",2),s._UZ(3,"div",3)(4,"div",4),s.qZA(),s.TgZ(5,"div",5),s._UZ(6,"div",6),s.qZA(),s.TgZ(7,"div",7),s._UZ(8,"div",8)(9,"div",9),s.TgZ(10,"div",10)(11,"span",11),s._uU(12),s.qZA()()()()),2&e&&(s.xp6(3),s.Q6J("ngStyle",i._getTrackBackgroundStyles()),s.xp6(1),s.Q6J("ngStyle",i._getTrackFillStyles()),s.xp6(1),s.Q6J("ngStyle",i._getTicksContainerStyles()),s.xp6(1),s.Q6J("ngStyle",i._getTicksStyles()),s.xp6(1),s.Q6J("ngStyle",i._getThumbContainerStyles()),s.xp6(5),s.Oqu(i.displayValue))},dependencies:[me.PC],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 _a(n){return!isNaN(n)&&isFinite(n)}function Ki(n){return"t"===n.type[0]}function va(n,t){let e;return e=Ki(n)?"number"==typeof t?Zr(n.touches,t)||Zr(n.changedTouches,t):n.touches[0]||n.changedTouches[0]:n,e?{x:e.clientX,y:e.clientY}:void 0}function Zr(n,t){for(let e=0;e<n.length;e++)if(n[e].identifier===t)return n[e]}let kd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[me.ez,ha,ha]}),n})();const Fd=["container"],Pd=["canvas"],Id=["progress"],Nd=["rightToolbar"];function Rd(n,t){if(1&n){const e=s.EpF();s.TgZ(0,"section")(1,"div",12),s.NdJ("click",function(){const o=s.CHM(e).$implicit,a=s.oxw();return s.KtG(a.g.seek(o).play())}),s._uU(2),s.qZA()()}if(2&n){const e=t.$implicit;s.xp6(2),s.Oqu(e)}}let Vd=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.lightTargetDistance=0,this.params={light:{direction:{intensity:2.245,color:16777215,bias:-.001447,phi:41,theta:-42},ambient:{intensity:0,color:16777215}},helper:{light:!1,grid:!1,axis:!1}},this.labels=["a","b"],this.render=()=>{this.controls&&this.controls.enabled&&this.controls.update(),this.renderer.render(this.scene,this.camera)},this.afterModelLoad=()=>{const i=this.g=W.p8.timeline({onUpdate:this.updateSlider,paused:!0});(r=>{{const o=this.model.getObjectByName("\u697c\u677f");if(!o)return;o.scale.y=.1,o.visible=!0,i.from(o.scale,{duration:.5,x:0,z:0}),i.to(o.scale,{duration:.5,y:1,ease:"back.out(5.5)"})}{const o=this.model.getObjectByName("\u9636\u6cbf\u77f3");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.2,y:10})})}{const o=this.model.getObjectByName("\u78c9\u77f3");if(!o)return;i.add("\u78c9\u77f3"),o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach((a,l)=>{i.to(a.scale,{duration:.2,x:1,z:1,delay:-.2})}),o.children.forEach((a,l)=>{i.to(a.scale,{duration:.5,y:1,delay:-.5},"\u78c9\u77f3+=.7")})}{const o=this.model.getObjectByName("\u65b9\u7816");if(!o)return;i.add("\u65b9\u7816"),o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.sort((a,l)=>{const d=o.position.distanceTo(a.position);return o.position.distanceTo(l.position)-d}),o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.2,y:10,delay:-.18})})}{const o=this.model.getObjectByName("\u53f0\u9636");if(!o)return;o.scale.setScalar(0),o.visible=!0,i.to(o.scale,{duration:.2,y:1,z:1}).to(o.scale,{duration:.5,x:1,ease:"back.out(2.5)"})}{const o=this.model.getObjectByName("\u9f13\u8e6c");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.1})})}{const o=this.model.getObjectByName("\u6728\u67f1");if(!o)return;i.add("\u6728\u67f1"),o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(1.5)"})})}{const o=this.model.getObjectByName("\u95e8\u5f53\u6237\u5bf9");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,i.add("\u95e8\u5f53\u6237\u5bf9"),o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.2,ease:"back.out(1.5)"},"\u95e8\u5f53\u6237\u5bf9+=.2")})}{const o=this.model.getObjectByName("\u95e8\u5385\u6302\u843d");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,ease:"back.out(5)"})})}{const o=this.model.getObjectByName("\u95e8\u6963");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.sort((a,l)=>a.position.y-l.position.y),o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10})})}{const o=this.model.getObjectByName("\u57ab\u62f1\u677f");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>Number.parseInt(a.name)-Number.parseInt(l.name)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.2})})}{const o=this.model.getObjectByName("\u6597\u62f1");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,i.add("\u6597\u62f1"),o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.2,ease:"back.out(1.5)"},"\u6597\u62f1+=.2")})}{const o=this.model.getObjectByName("\u5c0f\u6241\u6881");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,i.add("\u5c0f\u6241\u6881"),o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.2,ease:"back.out(1.5)"},"\u5c0f\u6241\u6881+=.2")})}{const o=this.model.getObjectByName("\u5927\u6241\u6881");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,i.add("\u5927\u6241\u6881"),o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.2,ease:"back.out(1.5)"},"\u5927\u6241\u6881+=.2")})}{const o=this.model.getObjectByName("\u6881");if(!o)return;i.add("\u6881"),o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.2})})}{const o=this.model.getObjectByName("\u7ae5\u67f1");if(!o)return;i.add("\u7ae5\u67f1"),o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.2,ease:"back.out(4)"})})}{const o=this.model.getObjectByName("\u9876\u6881");if(!o)return;o.scale.setScalar(0),o.visible=!0,i.to(o.scale,{duration:.01,x:1,y:1,z:1}).from(o.position,{duration:.3,y:10,delay:-.2})}{const o=this.model.getObjectByName("\u9e45\u9888\u8f69\u693d");if(!o)return;i.add("\u9e45\u9888\u8f69\u693d"),o.scale.setScalar(0),o.visible=!0,i.to(o.scale,{duration:.01,x:1,y:1,z:1}).from(o.position,{duration:.3,y:10})}{const o=this.model.getObjectByName("\u83f1\u89d2\u8f69\u693d");if(!o)return;i.add("\u83f1\u89d2\u8f69\u693d"),o.scale.setScalar(0),o.visible=!0,i.to(o.scale,{duration:.01,x:1,y:1,z:1}).from(o.position,{duration:.3,y:10})}{const o=this.model.getObjectByName("\u98de\u693d");if(!o)return;i.add("\u98de\u693d"),o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.25})})}{const o=this.model.getObjectByName("\u52d2\u671b");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.1})})}{const o=this.model.getObjectByName("\u91cc\u53e3\u6728");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.1})})}{const o=this.model.getObjectByName("\u74e6\u53e3\u677f");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.1})})}{const o=this.model.getObjectByName("\u9762\u6cbf");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1}).from(a.position,{duration:.3,y:10,delay:-.1})})}{const o=this.model.getObjectByName("\u671b\u7816");if(!o)return;i.add("\u671b\u7816"),o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.001,x:1,y:1,z:1,delay:-4e-4})})}{const o=this.model.getObjectByName("\u74e6\u6cbf");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.19})})}{const o=this.model.getObjectByName("\u5e95\u74e6");if(!o)return;i.add("\u5e95\u74e6"),o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.001,x:1,y:1,z:1,delay:-4e-4})})}{const o=this.model.getObjectByName("\u76d6\u74e6");if(!o)return;i.add("\u76d6\u74e6"),o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.001,x:1,y:1,z:1,delay:-4e-4})})}{const o=this.model.getObjectByName("\u82b1\u8fb9\u74e6");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.1,x:1,y:1,z:1,delay:-.08})})}{const o=this.model.getObjectByName("\u6c34\u6ef4\u74e6");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.children.sort((a,l)=>o.position.distanceTo(a.position)-o.position.distanceTo(l.position)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.1,x:1,y:1,z:1,delay:-.08})})}{const o=this.model.getObjectByName("\u5899");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.15,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u95e8\u5385\u56f4\u5899");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.15,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u666f\u7a97");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u82b1\u6728\u7a97");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u7816\u7ec6\u8d34\u9762");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u5927\u95e8");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u5c0f\u95e8");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u6241\u6258");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u724c\u533e");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.2,x:1,y:1,z:1,delay:-.1,ease:"back.out(2)"})})}{const o=this.model.getObjectByName("\u9876");if(!o)return;o.children.forEach(a=>a.scale.setScalar(0)),o.visible=!0,o.children.forEach(a=>{i.to(a.scale,{duration:.01,x:1,y:1,z:1,delay:-.008,ease:"back.out(2)"}).from(a.position,{duration:.2,y:10,delay:-.1})})}{const o=this.model.getObjectByName("Ground");if(!o)return;o.scale.set(0,0,0),o.visible=!0,i.to(o.scale,{duration:.5,x:1,y:1,z:1})}})(),i.totalDuration()>1&&(this.renderer2.setStyle(this.progress.nativeElement,"bottom","0"),this.renderer2.setStyle(this.progress.nativeElement,"opacity","1"),this.labels=Object.keys(i.labels),setTimeout(()=>{W.p8.to(".label",{left:0,stagger:.1,ease:"back.out(2)",onComplete:()=>{this.g.play(),this.renderer2.addClass(this.rightToolbar.nativeElement,"show")}})},1e3))},this.updateSlider=()=>{this.sliderVal=this.g.totalProgress()},this.sliderVal=0,window.model=this}ngOnDestroy(){this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){this.initScene(),this.addEnvironmentLight(),this.addLight(),this.loadModel(this.afterModelLoad),this.initGUI()}initScene(){const e=this.width=this.container.nativeElement.offsetWidth,i=this.height=this.container.nativeElement.offsetHeight,r=this.scene=new c.xsS,o=this.perspectiveCamera=new c.cPb(70,e/i,.1,100);o.position.set(0,2,5),this.camera=o;const a=this.renderer=new c.CP7({canvas:this.canvas.nativeElement,antialias:!0,alpha:!0});a.setSize(e,i),a.setPixelRatio(Math.min(devicePixelRatio,2)),a.outputColorSpace=c.KI_,a.shadowMap.enabled=!0,a.shadowMap.type=c.ntZ,this.renderer2.appendChild(this.container.nativeElement,a.domElement),this.controls=new mi.z(this.camera,a.domElement);const l=this.gridHelper=new c.VLJ(20,20);l.visible=this.params.helper.grid,r.add(l);const d=this.axisHelper=new c.y8_(10);d.visible=this.params.helper.axis,r.add(d),a.setAnimationLoop(this.render)}addEnvironmentLight(){(new gr.x).load("assets/texture/cannon_1k.hdr",e=>{const i=new c.anP(this.renderer);i.compileEquirectangularShader(),this.scene.environment=i.fromEquirectangular(e).texture,e.dispose(),i.dispose()})}addLight(){this.directionalLight=new c.Ox3(this.params.light.direction.color,this.params.light.direction.intensity),this.directionalLight.position.set(-10,10,10),this.directionalLight.shadow.bias=this.params.light.direction.bias,this.directionalLight.castShadow=!0,this.directionalLight.shadow.mapSize.width=2048,this.directionalLight.shadow.mapSize.height=2048,this.lightTarget=new c.Tme,this.scene.add(this.lightTarget),this.directionalLight.target=this.lightTarget,this.scene.add(this.directionalLight),this.lightHelper=new c.Rki(this.directionalLight.shadow.camera),this.lightHelper.visible=this.params.helper.light,this.scene.add(this.lightHelper),this.ambientLight=new c.Mig(this.params.light.ambient.color,this.params.light.ambient.intensity),this.scene.add(this.ambientLight)}loadModel(e){const i=new Bt._;i.setDecoderPath("assets/lib/draco/"),(new Ht.E).setDRACOLoader(i).load("assets/model/Hall.glb",r=>{let o=(new c.ZzF).setFromObject(r.scene),a=this.center=o.getCenter(new c.Pa4),l=this.radius=o.getSize(new c.Pa4).length();this.lightTarget.position.copy(a),this.camera.position.copy(a),this.camera.position.y+=l/4,this.camera.position.z+=l/2,this.controls.target=a,r.scene.traverse(d=>{d.isMesh&&d.material&&(d.castShadow=d.receiveShadow=!0)}),this.model=r.scene,this.repositionLight(),this.presetModel(),this.scene.add(r.scene),e&&e()})}repositionLight(){!this.directionalLight||(this.directionalLight.position.copy(this.center),this.directionalLight.position.x-=this.radius/2,this.directionalLight.position.y+=this.radius/2,this.directionalLight.position.z+=this.radius/2,this.lightTargetDistance=this.directionalLight.position.distanceTo(this.lightTarget.position),this.transformLight(this.params.light.direction.phi,this.params.light.direction.theta),this.directionalLight.shadow.camera.near=1,this.directionalLight.shadow.camera.far=2*this.radius,this.directionalLight.shadow.camera.left=-this.radius/2,this.directionalLight.shadow.camera.right=this.radius/2,this.directionalLight.shadow.camera.top=this.radius/2,this.directionalLight.shadow.camera.bottom=-this.radius/2,this.directionalLight.shadow.camera.updateProjectionMatrix(),this.lightHelper.update(),this.renderer.shadowMap.needsUpdate=!0)}initGUI(){const e=this.gui=new Ut.XS;e.hide(),(i=>{i.open(),(r=>{r.open(),r.addColor(this.params.light.direction,"color").onChange(o=>this.directionalLight.color.set(o)),r.add(this.params.light.direction,"intensity",0,10).step(.001).onChange(o=>this.directionalLight.intensity=o),r.add(this.params.light.direction,"bias",-.1,.1).step(1e-6).onChange(o=>this.directionalLight.shadow.bias=o),r.add(this.params.light.direction,"phi",-90,90).step(1).onChange(o=>this.transformLight(o,this.params.light.direction.theta)),r.add(this.params.light.direction,"theta",-180,180).step(1).onChange(o=>this.transformLight(this.params.light.direction.phi,o))})(i.addFolder("Direction")),(r=>{r.open(),r.addColor(this.params.light.ambient,"color").onChange(o=>this.ambientLight.color.set(o)),r.add(this.params.light.ambient,"intensity",0,10).step(.001).onChange(o=>this.ambientLight.intensity=o)})(i.addFolder("Ambient"))})(e.addFolder("Light")),(i=>{i.open(),i.add(this.params.helper,"light",!0,!1).onChange(r=>this.lightHelper.visible=r),i.add(this.params.helper,"grid",!0,!1).onChange(r=>this.gridHelper.visible=r),i.add(this.params.helper,"axis",!0,!1).onChange(r=>this.axisHelper.visible=r)})(e.addFolder("Helper")),(i=>{i.open(),i.add({restart:()=>this.g.restart()},"restart"),i.add({reverse:()=>this.g.reverse()},"reverse"),i.add({play:()=>this.g.play()},"play")})(e.addFolder("GSAP")),e.add({test:()=>{const i=[];this.model.children.forEach(r=>{i.push(r.name)}),console.log(i)}},"test")}transformLight(e,i){e=c.M8C.degToRad(e),i=c.M8C.degToRad(i);const r=this.lightTargetDistance*Math.cos(e),o=this.lightTargetDistance*Math.sin(e),a=o*Math.sin(i),l=o*Math.cos(i);this.directionalLight.position.set(a+this.lightTarget.position.x,r+this.lightTarget.position.y,l+this.lightTarget.position.z),this.renderer.shadowMap.needsUpdate=!0,this.lightHelper.update()}onResize(){this.width=this.container.nativeElement.offsetWidth,this.height=this.container.nativeElement.offsetHeight,this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(devicePixelRatio,2)),this.perspectiveCamera.aspect=this.width/this.height,this.perspectiveCamera.updateProjectionMatrix()}presetModel(){this.model.children.forEach(e=>e.visible=!1)}sliderChange(e){this.g.pause(),this.g.totalProgress(Number.parseFloat(e.value))}play(){1===this.g.totalProgress()&&this.g.totalProgress(0),this.g.play()}pause(){this.g.pause()}stop(){this.g.pause().totalProgress(1)}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-hall"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Fd,5),s.Gf(Pd,5),s.Gf(Id,5),s.Gf(Nd,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.canvas=r.first),s.iGM(r=s.CRH())&&(i.progress=r.first),s.iGM(r=s.CRH())&&(i.rightToolbar=r.first)}},hostBindings:function(e,i){1&e&&s.NdJ("resize",function(){return i.onResize()},!1,s.Jf7)},decls:18,vars:3,consts:[[1,"container"],["container",""],["canvas",""],[1,"progress"],["progress",""],[1,"material-icons",3,"click"],["min","0","max","1","step",".00001",3,"ngModel","input","ngModelChange"],[1,"right-toolbar"],["rightToolbar",""],[1,"right"],[4,"ngFor","ngForOf"],[3,"path"],[1,"label",3,"click"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"canvas",null,2),s.TgZ(4,"div",3,4)(6,"span",5),s.NdJ("click",function(){return i.play()}),s._uU(7,"play_circle"),s.qZA(),s.TgZ(8,"span",5),s.NdJ("click",function(){return i.pause()}),s._uU(9,"pause_circle"),s.qZA(),s.TgZ(10,"span",5),s.NdJ("click",function(){return i.stop()}),s._uU(11,"stop_circle"),s.qZA(),s.TgZ(12,"mat-slider",6),s.NdJ("input",function(o){return i.sliderChange(o)})("ngModelChange",function(o){return i.sliderVal=o}),s.qZA()(),s.TgZ(13,"div",7,8)(15,"div",9),s.YNc(16,Rd,3,1,"section",10),s.qZA()(),s._UZ(17,"w-nav",11),s.qZA()),2&e&&(s.xp6(12),s.Q6J("ngModel",i.sliderVal),s.xp6(4),s.Q6J("ngForOf",i.labels),s.xp6(1),s.Q6J("path","04"))},dependencies:[me.sg,wr,Bn,ga,qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;background:#EEEEC5B5}.container[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{width:100vw;height:100vh}.container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{position:fixed;width:100vw;height:10vh;bottom:-10vh;background:#000000AA;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;padding:0 20px;opacity:0;transition:all 1s}.container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] mat-slider[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%]{position:absolute;width:100px;height:50vh;top:50%;right:0;transform:translateY(-50%);color:#fff;padding:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow-y:auto;border-radius:10px;transition:all 1s}.container[_ngcontent-%COMP%] .right-toolbar.show[_ngcontent-%COMP%]{background:#ffffff33;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{height:100%}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{position:relative;padding:2px;width:60px;height:60px}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{padding:0;background:#000000AA;position:absolute;width:60px;height:60px;border-radius:50%;border:1px solid #ffffff33;font-size:.5rem;text-align:center;line-height:60px;text-shadow:0 0 10px #ffffff;right:-100px;cursor:pointer;-webkit-user-select:none;user-select:none}"]}),n})();const Ld=["container"],Bd=["canvas"],Hd=["rightToolbar"];function Ud(n,t){if(1&n){const e=s.EpF();s.TgZ(0,"section")(1,"input",8),s.NdJ("change",function(){s.CHM(e);const r=s.oxw();return s.KtG(r.highlightModel())})("ngModelChange",function(r){const a=s.CHM(e).$implicit;return s.KtG(a.enable=r)}),s.qZA(),s.TgZ(2,"label",9),s._uU(3),s.qZA()()}if(2&n){const e=t.$implicit;s.xp6(1),s.MGl("id","chk-",e.name,""),s.Q6J("ngModel",e.enable),s.xp6(1),s.MGl("for","chk-",e.name,""),s.xp6(1),s.Oqu(e.name)}}let zd=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.params={enable:!1,strength:0,radius:.5,threshold:0},this.categories=[],this.labels=["\u78c9\u77f3","\u65b9\u7816","\u6728\u67f1","\u95e8\u5f53\u6237\u5bf9","\u6597\u62f1","\u5c0f\u6241\u6881","\u5927\u6241\u6881","\u6881","\u7ae5\u67f1","\u9e45\u9888\u8f69\u693d","\u83f1\u89d2\u8f69\u693d","\u98de\u693d","\u671b\u7816","\u5e95\u74e6","\u76d6\u74e6"],this.render=()=>{this.controls&&this.controls.enabled&&this.controls.update(),this.params.enable?(this.camera.layers.set(10),this.bloomPass.strength=this.params.strength,this.bloomComposer.render(),this.camera.layers.enable(1),this.finalComposer.render()):(this.camera.layers.enable(1),this.renderer.render(this.scene,this.camera))},window.model=this}ngOnDestroy(){this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){this.initScene(),this.addEnvironmentLight(),this.loadModel(()=>{this.initGUI()}),this.setBlink()}initScene(){const e=this.width=this.container.nativeElement.offsetWidth,i=this.height=this.container.nativeElement.offsetHeight,r=this.scene=new c.xsS,o=this.camera=new c.cPb(70,e/i,.1,100);o.position.set(0,2,5);const a=this.renderer=new c.CP7({antialias:!0,canvas:this.canvas.nativeElement});a.setSize(e,i),a.setPixelRatio(Math.min(devicePixelRatio,2)),a.outputColorSpace=c.KI_,this.renderer2.appendChild(this.container.nativeElement,a.domElement);{const l=this.bloomComposer=new Dn(this.renderer);l.renderToScreen=!1,l.setSize(e,i),l.setPixelRatio(Math.min(devicePixelRatio,2));const d=new Lo(r,o);l.addPass(d);const g=this.bloomPass=new Jt(new c.FM8(e,i),this.params.strength,this.params.radius,this.params.threshold);l.addPass(g);const p=this.finalComposer=new Dn(this.renderer);p.addPass(d);const v=new Bi(Uo);v.material.uniforms.resolution.value.x=1/(e*devicePixelRatio),v.material.uniforms.resolution.value.y=1/(i*devicePixelRatio),this.finalComposer.addPass(v);const _=new Bi(new c.jyz({uniforms:{baseTexture:{value:null},bloomTexture:{value:l.renderTarget2.texture}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",fragmentShader:"\n uniform sampler2D baseTexture;\n uniform sampler2D bloomTexture;\n\n varying vec2 vUv;\n\n void main() {\n gl_FragColor = ( texture2D( baseTexture, vUv ) + vec4( 1.0 ) * texture2D( bloomTexture, vUv ) );\n }\n "}),"baseTexture");p.addPass(_)}this.controls=new mi.z(o,a.domElement),a.setAnimationLoop(this.render)}addEnvironmentLight(){(new gr.x).load("assets/texture/cannon_1k.hdr",e=>{const i=new c.anP(this.renderer);i.compileEquirectangularShader(),this.scene.environment=i.fromEquirectangular(e).texture,e.dispose(),i.dispose()})}loadModel(e){const i=new Bt._;i.setDecoderPath("assets/lib/draco/"),(new Ht.E).setDRACOLoader(i).load("assets/model/Hall.glb",r=>{this.model=r.scene;let o=(new c.ZzF).setFromObject(r.scene),a=o.getCenter(new c.Pa4),l=o.getSize(new c.Pa4).length();this.camera.position.copy(a),this.camera.position.y+=l/4,this.camera.position.z+=l/2,this.controls.target=a,this.model.traverse(d=>{d.isMesh&&d.layers.set(1)}),this.labels.forEach(d=>{const g=this.model.getObjectByName(d);!g||this.categories.push({name:d,enable:!1,model:g})}),this.scene.add(this.model),setTimeout(()=>{W.p8.to(".label",{left:0,stagger:.1,ease:"back.out(2)",onComplete:()=>{this.renderer2.addClass(this.rightToolbar.nativeElement,"show")}})},1e3),e&&e()})}initGUI(){}setBlink(){const e=W.p8.timeline();e.to(this.params,{duration:.6,strength:.8}),e.yoyo(!0).repeat(-1)}highlightModel(){this.categories.forEach(i=>{i.model.traverse(i.enable?r=>{r.isMesh&&r.layers.set(10)}:r=>{r.isMesh&&r.layers.set(1)})});const e=this.categories.find(i=>!0===i.enable);this.params.enable=!!e}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-hall-high-light"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Ld,5),s.Gf(Bd,5),s.Gf(Hd,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.canvas=r.first),s.iGM(r=s.CRH())&&(i.rightToolbar=r.first)}},decls:9,vars:2,consts:[[1,"container"],["container",""],["canvas",""],[1,"right-toolbar"],["rightToolbar",""],[1,"right"],[4,"ngFor","ngForOf"],[3,"path"],["type","checkbox",2,"display","none",3,"id","ngModel","change","ngModelChange"],[1,"label",3,"for"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"canvas",null,2),s.TgZ(4,"div",3,4)(6,"div",5),s.YNc(7,Ud,4,4,"section",6),s.qZA()(),s._UZ(8,"w-nav",7),s.qZA()),2&e&&(s.xp6(7),s.Q6J("ngForOf",i.categories),s.xp6(1),s.Q6J("path","05"))},dependencies:[me.sg,vr,wr,Bn,qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh}.container[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{width:100vw;height:100vh}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%]{position:absolute;width:100px;height:50vh;top:50%;right:0;transform:translateY(-50%);color:#fff;padding:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow-y:auto;border-radius:10px;transition:all 1s}.container[_ngcontent-%COMP%] .right-toolbar.show[_ngcontent-%COMP%]{background:#ffffff33;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{height:100%}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{position:relative;padding:2px;width:60px;height:60px}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] section[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .label[_ngcontent-%COMP%]{color:#ff1493}.container[_ngcontent-%COMP%] .right-toolbar[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{padding:0;background:#000000AA;position:absolute;width:60px;height:60px;border-radius:50%;border:1px solid #ffffff33;font-size:.5rem;text-align:center;line-height:60px;text-shadow:0 0 10px #ffffff;right:-100px;-webkit-user-select:none;user-select:none;cursor:pointer}"]}),n})();const Gd=["container"],jd=["videoElement"],Yd=["canvasSwapElement"],Wd=["canvasTargetElement"];let Zd=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.params={core:-.125,kernel:[-.125,-.125,-.125,-.125,1,-.125,-.125,-.125,-.125],weight:1},this.render=()=>{requestAnimationFrame(this.render),this.drawCamera()},window.model=this}ngOnDestroy(){}ngAfterViewInit(){this.ctxSwap=this.canvasSwapElement.nativeElement.getContext("2d"),this.ctxSwap&&(this.ctxTarget=this.canvasTargetElement.nativeElement.getContext("2d"),this.ctxTarget&&(navigator.mediaDevices.getUserMedia({video:!0}).then(e=>{this.videoElement.nativeElement.srcObject=e;const{width:i,height:r}=e.getTracks()[0].getSettings();this.width=i||0,this.height=r||0,this.videoElement.nativeElement.width=i,this.videoElement.nativeElement.height=r,this.canvasSwapElement.nativeElement.width=i,this.canvasSwapElement.nativeElement.height=r,this.canvasTargetElement.nativeElement.width=i,this.canvasTargetElement.nativeElement.height=r,this.render()}).catch(e=>{alert("\u83b7\u53d6\u76f8\u673a\u9519\u8bef")}),this.initGUI()))}drawCamera(){this.ctxSwap.drawImage(this.videoElement.nativeElement,0,0);let e=this.ctxSwap.getImageData(0,0,this.width,this.height);for(let i=0;i<this.height;i++)for(let r=0;r<this.width;r++)this.detectCoords(e,r,i);this.ctxTarget.putImageData(e,0,0)}detectCoords(e,i,r){const o=[];o.push(this.getPixelByCoords(e,i-1,r-1)),o.push(this.getPixelByCoords(e,i,r-1)),o.push(this.getPixelByCoords(e,i+1,r-1)),o.push(this.getPixelByCoords(e,i-1,r)),o.push(this.getPixelByCoords(e,i,r)),o.push(this.getPixelByCoords(e,i+1,r)),o.push(this.getPixelByCoords(e,i-1,r+1)),o.push(this.getPixelByCoords(e,i,r+1)),o.push(this.getPixelByCoords(e,i+1,r+1));for(let l=0;l<o.length;l++)o[l][0]*=this.params.kernel[l],o[l][1]*=this.params.kernel[l],o[l][2]*=this.params.kernel[l];const a=[0,0,0];for(let l=0;l<o.length;l++)a[0]+=o[l][0],a[1]+=o[l][1],a[2]+=o[l][2];a[0]/=this.params.weight,a[1]/=this.params.weight,a[2]/=this.params.weight,this.putPixelByCoords(e,i,r,a)}getPixelByCoords(e,i,r){const o=4*e.width*r+4*i;return[Number(e.data[o]),Number(e.data[o+1]),Number(e.data[o+2])]}putPixelByCoords(e,i,r,o){const a=4*e.width*r+4*i;e.data[a]=o[0],e.data[a+1]=o[1],e.data[a+2]=o[2]}computeKernelWeight(e){const i=e.reduce((r,o)=>r+o);return i<=0?1:i}initGUI(){this.gui=new Ut.XS,this.gui.add(this.params,"core",-1,1).step(1e-4).onChange(e=>{this.params.kernel[0]=e,this.params.kernel[1]=e,this.params.kernel[2]=e,this.params.kernel[3]=e,this.params.kernel[5]=e,this.params.kernel[6]=e,this.params.kernel[7]=e,this.params.kernel[8]=e,this.params.weight=this.computeKernelWeight(this.params.kernel)})}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-edge-detecter"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Gd,5),s.Gf(jd,5),s.Gf(Yd,5),s.Gf(Wd,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.videoElement=r.first),s.iGM(r=s.CRH())&&(i.canvasSwapElement=r.first),s.iGM(r=s.CRH())&&(i.canvasTargetElement=r.first)}},decls:8,vars:0,consts:[[1,"container"],["container",""],["autoplay","","muted","","playsinline",""],["videoElement",""],[1,"swap"],["canvasSwapElement",""],[1,"target"],["canvasTargetElement",""]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"video",2,3)(4,"canvas",4,5)(6,"canvas",6,7),s.qZA())},styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;display:flex;justify-content:center;align-items:center}.container[_ngcontent-%COMP%] video[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .swap[_ngcontent-%COMP%]{display:none}"]}),n})();var Kd=O(5861),ya=O(3738),$d=O(2648);const Xd=["container"],Qd=["canvasElement"];let qd=(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.animate=()=>{this.stats.update(),this.controls.enabled&&this.controls.update(),this.dynamicShadow&&this.dynamicShadow.update(),this.lightHelper&&this.lightHelper.update(),this.renderer.render(this.scene,this.camera)},this.color=new c.Ilk,this.moveMonkey=()=>{W.ZP.to(this.monkey.position,{duration:.2,z:8*Math.random()-4,onComplete:()=>{this.dynamicShadow&&this.dynamicShadow.refresh()}})},window.model=this}ngOnDestroy(){this.interval&&clearInterval(this.interval),this.renderer.dispose(),this.renderer.forceContextLoss(),this.gui&&this.gui.destroy&&this.gui.destroy(),this.controls&&this.controls.dispose(),this.destroyObject(this.scene)}destroyObject(e){if(e){if(e.children&&e.children.forEach(i=>{this.destroyObject(i)}),e.isMesh){e.geometry&&e.geometry.dispose();const i=e.materials;i&&(Array.isArray(i)?i.forEach(r=>r.dispose()):i.dispose())}e.removeFromParent()}}ngAfterViewInit(){var e=this;return(0,Kd.Z)(function*(){e.width=e.container.nativeElement.offsetWidth,e.height=e.container.nativeElement.offsetHeight,e.initScene(),yield e.addEnvironmentLight().then(),e.initGUI(),yield e.initModels().then(),e.initDynamicShadow(),e.interval=setInterval(e.moveMonkey,2e3)})()}initScene(){this.scene=new c.xsS;const i=this.camera=new c.cPb(70,this.width/this.height,.1,4e3);i.position.set(-5.358143041931132,3.362222339506227,1.3911899154651617);const r=this.renderer=new c.CP7({canvas:this.canvasElement.nativeElement,antialias:!0});r.setSize(this.width,this.height),r.setPixelRatio(devicePixelRatio),r.outputColorSpace=c.KI_,r.toneMapping=c.LY2,r.shadowMap.enabled=!0,this.renderer2.appendChild(this.container.nativeElement,r.domElement),this.controls=new mi.z(i,r.domElement),this.controls.maxDistance=2e3,this.controls.enableDamping=!0,this.stats=new ya,this.group=new c.ZAu,this.scene.add(this.group),r.setAnimationLoop(this.animate)}addEnvironmentLight(){return new Promise(e=>{(new gr.x).load("assets/texture/cannon_1k.hdr",i=>{const r=new c.anP(this.renderer);r.compileEquirectangularShader(),this.scene.environment=this.scene.background=r.fromEquirectangular(i).texture,this.scene.backgroundBlurriness=1,i.dispose(),r.dispose();const o=this.light=new c.Ox3(16777215,.3);o.castShadow=!0,o.shadow.mapSize.width=o.shadow.mapSize.height=1024,o.shadow.camera.near=.1,o.shadow.camera.far=100,o.position.set(20,20,20),o.shadow.bias=11e-5,o.shadow.normalBias=-.0058,this.scene.add(o),this.lightHelper=new c.Rki(o.shadow.camera),e("")})})}initModels(){const e=new Bt._;return e.setDecoderPath("assets/lib/draco/"),new Promise(i=>{(new Ht.E).setDRACOLoader(e).load("assets/model/dev/monkey.glb",r=>{r.scene.traverse(d=>{d.isMesh&&(d.receiveShadow=d.castShadow=!0,this.monkey=d)}),this.group.add(r.scene);const o=new c.Kj0(new c.xo$(.5).translate(0,.5,0),new c.Wid({color:this.getRandomColor(),roughness:1}));o.position.set(2,0,0),o.castShadow=o.receiveShadow=!0,this.group.add(o);const a=new c.Kj0(new c.DvJ(1,1,1).translate(0,.5,0),new c.Wid({color:this.getRandomColor(),roughness:1}));a.castShadow=a.receiveShadow=!0,a.position.set(-2,0,0),this.group.add(a);const l=new c.Kj0(new c._12(10,10).rotateX(.5*-Math.PI),new c.Wid({color:16777215,roughness:1,envMapIntensity:0}));l.receiveShadow=l.castShadow=!0,this.group.add(l);{const d=new c.Kj0(new c.DvJ(.5,.5,.5).translate(0,.25,0),new c.Wid({color:this.getRandomColor(),roughness:1}));d.castShadow=d.receiveShadow=!0,d.position.set(-3,0,-2),this.group.add(d)}{const d=new c.Kj0(new c.DvJ(.5,2,.5).translate(0,1,0),new c.Wid({color:this.getRandomColor(),roughness:1}));d.castShadow=d.receiveShadow=!0,d.position.set(-2,0,-1.2),this.group.add(d)}this.group.traverse(d=>{}),i("")})})}getRandomColor(){return"#"+this.color.setHSL(Math.random(),.5,.5).getHexString()}initDynamicShadow(){this.gui||(this.gui=new Ut.XS),this.dynamicShadow=new $d.C(this.camera,this.renderer,this.group,{},this.gui)}initGUI(){const e=this.gui=new Ut.XS;e.hide(),(i=>{i.open(),i.add(this.light,"intensity",0,10).step(.001),i.add(this.light.shadow,"bias",-1,1).step(1e-5),i.add(this.light.shadow,"normalBias",-1,1).step(1e-4)})(e.addFolder("Light"))}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-shadow-light-map"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Xd,5),s.Gf(Qd,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.canvasElement=r.first)}},decls:5,vars:1,consts:[[1,"container"],["container",""],[3,"path"],[1,"webgl"],["canvasElement",""]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"w-nav",2)(3,"canvas",3,4),s.qZA()),2&e&&(s.xp6(2),s.Q6J("path","07"))},dependencies:[qt],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;background:#d4d7e2}.container[_ngcontent-%COMP%] .webgl[_ngcontent-%COMP%]{width:100vw;height:100vh}"]}),n})();const Jd=["container"],eu=["stick"];let tu=(()=>{class n{constructor(e){this.renderer2=e,this.onChange=new s.vpe,this.offset={x:0,y:0},this.radius=0,this.dragging=!1,this.x=0,this.y=0,window.joystick=this}ngOnDestroy(){}ngAfterViewInit(){this.onResize()}onResize(){this.radius=.5*this.stickElement.nativeElement.offsetWidth,this.offset.x=this.stickElement.nativeElement.getBoundingClientRect().left+this.radius,this.offset.y=this.stickElement.nativeElement.getBoundingClientRect().top+this.radius}onMousedown(e){this.dragging=!0,e instanceof MouseEvent?(this.x=e.clientX,this.y=e.clientY):e instanceof TouchEvent&&(this.x=e.touches[0].clientX,this.y=e.touches[0].clientY),this.makeStickFollow(e)}onMouseup(e){this.dragging=!1,this.renderer2.setStyle(this.stickElement.nativeElement,"transform","translate(0, 0)"),this.onChange.emit({x:0,y:0})}mousemove(e){!this.dragging||this.makeStickFollow(e)}makeStickFollow(e){let i=0,r=0;e instanceof MouseEvent?(i=e.clientX-this.offset.x,r=e.clientY-this.offset.y):e instanceof TouchEvent&&(i=e.touches[0].clientX-this.offset.x,r=e.touches[0].clientY-this.offset.y);const o=Math.sqrt(i*i+r*r);o>this.radius&&(i=i/o*this.radius,r=r/o*this.radius),this.renderer2.setStyle(this.stickElement.nativeElement,"transform",`translate(${i}px, ${r}px)`),this.onChange.emit({x:i,y:r})}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["s-joystick"]],viewQuery:function(e,i){if(1&e&&(s.Gf(Jd,5),s.Gf(eu,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.stickElement=r.first)}},hostBindings:function(e,i){1&e&&s.NdJ("resize",function(){return i.onResize()},!1,s.Jf7)("touchstart",function(o){return i.onMousedown(o)})("mousedown",function(o){return i.onMousedown(o)})("touchend",function(o){return i.onMouseup(o)},!1,s.Jf7)("mouseup",function(o){return i.onMouseup(o)},!1,s.Jf7)("touchmove",function(o){return i.mousemove(o)},!1,s.Jf7)("mousemove",function(o){return i.mousemove(o)},!1,s.Jf7)},outputs:{onChange:"onChange"},decls:5,vars:0,consts:[[1,"container"],["container",""],[1,"stick"],["stick",""],[1,"press"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1)(2,"div",2,3),s._UZ(4,"div",4),s.qZA()())},styles:[".container[_ngcontent-%COMP%]{width:100%;height:100%;background:transparent;border:2px solid gray;border-radius:50%;display:flex;justify-content:center;align-items:center}.container[_ngcontent-%COMP%] .stick[_ngcontent-%COMP%]{width:70%;height:70%;background:gray;border-radius:50%;display:flex;justify-content:center;align-items:center}.container[_ngcontent-%COMP%] .stick[_ngcontent-%COMP%] .press[_ngcontent-%COMP%]{width:80%;height:80%;background:darkgray;border-radius:50%}"]}),n})();const iu=["container"],nu=["canvasElement"],ru=function(n){return{display:n}},ou=function(n){return{top:n}},su=[{path:"",redirectTo:"01",pathMatch:"full"},{path:"01",component:Wa},{path:"02",component:Qa},{path:"03",component:Ja},{path:"04",component:Vd},{path:"05",component:zd},{path:"06",component:Zd},{path:"07",component:qd},{path:"08",component:(()=>{class n{constructor(e){this.renderer2=e,this.width=0,this.height=0,this.animate=()=>{this.stats.update(),this.walk(),this.flyAnimate(),this.controls.enabled&&this.controls.update(),this.renderer.render(this.scene,this.camera)},this.keys={},this.direction=new c.Pa4(0,0,0),this.panSpeed=.2,this.percent=0,this.time=0,window.model=this}ngOnDestroy(){this.gui&&this.gui.destroy()}ngAfterViewInit(){this.width=this.container.nativeElement.offsetWidth,this.height=this.container.nativeElement.offsetHeight,this.initScene(),this.generateMaterials(),this.addFly(),this.loadModel()}initScene(){this.scene=new c.xsS;const i=this.camera=new c.cPb(70,this.width/this.height,.1,4e3);i.position.set(0,0,0);const r=this.renderer=new c.CP7({canvas:this.canvasElement.nativeElement,antialias:!0});r.setSize(this.width,this.height),r.setPixelRatio(devicePixelRatio),r.outputColorSpace=c.KI_,this.renderer2.appendChild(this.container.nativeElement,r.domElement),this.controls=new mi.z(i,r.domElement),this.controls.maxDistance=2e3,this.controls.target.set(0,0,-1),this.controls.enableDamping=!0,this.controls.dampingFactor=.08,this.stats=new ya,r.setAnimationLoop(this.animate)}onResize(){this.width=this.container.nativeElement.offsetWidth,this.height=this.container.nativeElement.offsetHeight,this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(devicePixelRatio),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix()}onKeydown(e){this.keys[e.key]=!0,this.calcKeyboardDirection()}onKeyup(e){this.keys[e.key]=!1,this.calcKeyboardDirection()}walk(){if(this.direction.length()<.5)return;const e=this.camera.getWorldDirection(new c.Pa4);e.y=0,e.normalize();const i=Math.atan2(-this.direction.z,this.direction.x);e.applyAxisAngle(new c.Pa4(0,1,0),i-Math.PI/2),e.normalize();const r=e.multiplyScalar(this.panSpeed);this.camera.position.add(r),this.controls.target.add(r)}calcKeyboardDirection(){const e=new c.Pa4(0,0,0);this.keys.a&&(e.x-=1),this.keys.d&&(e.x+=1),this.keys.w&&(e.z-=1),this.keys.s&&(e.z+=1),this.direction.copy(e.normalize())}joystickChange(e){this.direction.x=e.x,this.direction.z=e.y}generateMaterials(){const e=(new c.dpR).load("assets/model/forest.jpg");e.colorSpace=c.KI_,e.flipY=!1,this.material=new c.jyz({side:c.ehD,transparent:!0,depthTest:!1,depthWrite:!1,uniforms:{uTexture:{value:e}},vertexShader:"\n varying vec2 vUv;\n attribute float random;\n\n void main() {\n vUv = uv;\n\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.);\n\n gl_PointSize = (200. + 1000. * random) * (1. / - mvPosition.z) * .5;\n\n gl_Position = projectionMatrix * mvPosition;\n }\n ",fragmentShader:"\n varying vec2 vUv;\n uniform sampler2D uTexture;\n\n void main() {\n vec4 color = texture2D(uTexture, vUv);\n float dist = length(gl_PointCoord.xy - vec2(0.5));\n float alpha = smoothstep(0.49, 0.3, dist);\n gl_FragColor = vec4(color.rgb * 1., alpha / 2.);\n }\n "})}loadModel(){const e=(new Bt._).setDecoderPath("assets/lib/draco/");(new Ht.E).setDRACOLoader(e).load("assets/model/forest.glb",i=>{const r=i.scene.getObjectByName("Mesh");if(!r)return;const o=r.geometry;if(!o)return;const a=o.attributes.position.count,l=[];for(let g=0;g<a;g++)l.push(Math.random());o.setAttribute("random",new c.TlE(new Float32Array(l),1));const d=new c.woe(o,this.material);this.scene.add(d)},i=>{this.percent=Math.floor(i.loaded/(i.total||1358744)*100)})}generateFlyMaterial(){return this.flyMaterial=new c.jyz({side:c.ehD,transparent:!0,depthTest:!1,depthWrite:!1,uniforms:{uTime:{value:0}},vertexShader:"\n varying vec2 vUv;\n uniform float uTime;\n attribute float offset;\n attribute float size;\n\n void main() {\n\n vUv = uv;\n\n float life = mod(uTime / 10. + offset * 3., 3.);\n\n float sizeKoef = smoothstep(3., 2., life);\n sizeKoef *= smoothstep(0., 1., life);\n\n float gsize = (100. + 1000. * size) * 2.;\n gsize *= sizeKoef;\n vec3 newpos = position;\n\n newpos.y += life * 10.;\n newpos.x += sin(life * 10. + offset);\n vec4 mvPosition = modelViewMatrix * vec4(newpos, 1.);\n\n gl_PointSize = gsize * ( 1. / - mvPosition.z );\n gl_Position = projectionMatrix * mvPosition;\n }\n ",fragmentShader:"\n void main() {\n float dist = length(gl_PointCoord.xy - vec2(0.5));\n float alpha = smoothstep(0.49, 0.3, dist);\n gl_FragColor = vec4(0.791, 0.728, 0.681, alpha / 2.);\n }\n "}),this.flyMaterial}addFly(){const i=new c.u9r,r=[],o=[],a=[];for(let d=0;d<1e3;d++)r.push(300*(Math.random()-.5),100*(Math.random()-.5),1e3*(Math.random()-.5)-150),o.push(Math.random()),a.push(Math.random());i.setAttribute("position",new c.TlE(new Float32Array(r),3)),i.setAttribute("offset",new c.TlE(new Float32Array(o),1)),i.setAttribute("size",new c.TlE(new Float32Array(a),1));const l=new c.woe(i,this.generateFlyMaterial());this.scene.add(l)}flyAnimate(){!this.flyMaterial||(this.time+=.05,this.flyMaterial.uniforms.uTime.value=this.time)}}return n.\u0275fac=function(e){return new(e||n)(s.Y36(s.Qsj))},n.\u0275cmp=s.Xpm({type:n,selectors:[["app-three-template"]],viewQuery:function(e,i){if(1&e&&(s.Gf(iu,5),s.Gf(nu,5)),2&e){let r;s.iGM(r=s.CRH())&&(i.container=r.first),s.iGM(r=s.CRH())&&(i.canvasElement=r.first)}},hostBindings:function(e,i){1&e&&s.NdJ("resize",function(){return i.onResize()},!1,s.Jf7)("keydown",function(o){return i.onKeydown(o)},!1,s.Jf7)("keyup",function(o){return i.onKeyup(o)},!1,s.Jf7)},decls:12,vars:8,consts:[[1,"container"],["container",""],[3,"path"],[1,"webgl"],["canvasElement",""],[1,"loading",3,"ngStyle"],[1,"bg",3,"ngStyle"],[3,"onChange"],[1,"info"]],template:function(e,i){1&e&&(s.TgZ(0,"div",0,1),s._UZ(2,"w-nav",2)(3,"canvas",3,4),s.TgZ(5,"div",5)(6,"span"),s._uU(7),s.qZA(),s._UZ(8,"div",6),s.qZA(),s.TgZ(9,"s-joystick",7),s.NdJ("onChange",function(o){return i.joystickChange(o)}),s.qZA(),s.TgZ(10,"div",8),s._uU(11,"\u952e\u76d8\u79fb\u52a8\uff1a w s a d"),s.qZA()()),2&e&&(s.xp6(2),s.Q6J("path","08"),s.xp6(3),s.Q6J("ngStyle",s.VKq(4,ru,100===i.percent?"none":"")),s.xp6(2),s.hij("",i.percent,"%"),s.xp6(1),s.Q6J("ngStyle",s.VKq(6,ou,100-i.percent+"%")))},dependencies:[me.PC,qt,tu],styles:[".container[_ngcontent-%COMP%]{width:100vw;height:100vh;background:#d4d7e2}.container[_ngcontent-%COMP%] .webgl[_ngcontent-%COMP%]{width:100vw;height:100vh}.container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100px;height:100px;border-radius:50%;background:#000000AA;border:4px solid darkgoldenrod;display:flex;justify-content:center;align-items:center;overflow:hidden}.container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff;letter-spacing:2px;text-align:center;line-height:100px;font-size:16px;z-index:10}.container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{width:100px;height:100px;background:goldenrod;position:absolute;left:0;top:100%}.container[_ngcontent-%COMP%] s-joystick[_ngcontent-%COMP%]{width:40px;height:40px;position:absolute;left:50%;bottom:30px;transform:translate(-50%)}.container[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{position:absolute;bottom:0;left:50%;transform:translate(-50%);background:#000000AA;color:#00bfff;-webkit-user-select:none;user-select:none}"]}),n})()}];let au=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[Wn.Bz.forChild(su),Wn.Bz]}),n})(),lu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=s.oAB({type:n}),n.\u0275inj=s.cJS({imports:[me.ez,au,rc,kd]}),n})()}}]);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。