1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[960],{97960:(t,e,i)=>{i.r(e),i.d(e,{AbstractButton3D:()=>j.c,AdvancedDynamicTexture:()=>R.v,AdvancedDynamicTextureInstrumentation:()=>F,BaseGradient:()=>I,BaseSlider:()=>E.j,Button:()=>a.$,Button3D:()=>J.a,Checkbox:()=>s.S,CheckboxGroup:()=>f.$Q,ColorPicker:()=>r.s,Container:()=>n.m,Container3D:()=>tt.B,Control:()=>l.E,Control3D:()=>te.T,CornerHandle:()=>tU.Eo,CylinderPanel:()=>ti.b,DisplayGrid:()=>w.b,Ellipse:()=>o.P,FluentBackplateMaterial:()=>tD.P,FluentButtonMaterial:()=>tR.y,FluentMaterial:()=>tN.E,FluentMaterialDefines:()=>tN.K,FocusableButton:()=>h.f,FrameGraphGUITask:()=>X,GUI3DManager:()=>tX.q,GizmoHandle:()=>tU.vU,Grid:()=>d.x,HandMenu:()=>ta.d,HandleMaterial:()=>tF.q,HandleState:()=>tU.GQ,HolographicBackplate:()=>ts.u,HolographicButton:()=>tr.l,HolographicSlate:()=>tn.S,Image:()=>u._,ImageBasedSlider:()=>C.a,ImageScrollBar:()=>B.C,InputPassword:()=>p.c,InputText:()=>_.S,InputTextArea:()=>c.l,KeyPropertySet:()=>T.p,Line:()=>m.N,LinearGradient:()=>A,MRDLBackplateMaterial:()=>tE.e,MRDLSliderBarMaterial:()=>tQ.p,MRDLSliderThumbMaterial:()=>tz.o,MathTools:()=>Q.M_,Matrix2D:()=>Q.cA,Measure:()=>z.t,MeshButton3D:()=>tl.D,MultiLine:()=>g.m,MultiLinePoint:()=>H.I,NearMenu:()=>to._,NodeRenderGraphGUIBlock:()=>$,PlanePanel:()=>th.X,RadialGradient:()=>N,RadioButton:()=>b.a,RadioGroup:()=>f.z6,Rectangle:()=>y.M,ScatterPanel:()=>td.b,ScrollBar:()=>S.$,ScrollViewer:()=>x.o,SelectionPanel:()=>f.tc,SelectorGroup:()=>f.N5,SideHandle:()=>tU.Oq,SlateGizmo:()=>tH.E,Slider:()=>O.A,Slider3D:()=>tu.P,SliderGroup:()=>f.hP,SpherePanel:()=>t_.a,StackPanel:()=>M.P,StackPanel3D:()=>tc.M,Style:()=>q.O,TextBlock:()=>v.V,TextWrapper:()=>P.$,TextWrapping:()=>v.q,ToggleButton:()=>k.f,TouchButton3D:()=>tp.B,TouchHolographicButton:()=>tg.W,TouchHolographicButtonV3:()=>tA,TouchHolographicMenu:()=>tb.t,TouchMeshButton3D:()=>tm._,ValueAndUnit:()=>K.T,Vector2WithInfo:()=>Q.wr,Vector3WithInfo:()=>tV.p,VirtualKeyboard:()=>T.$,VolumeBasedPanel:()=>tM.s,XmlLoader:()=>Z,name:()=>G});var a=i(6939),s=i(40578),r=i(83476),n=i(39394),l=i(35904),o=i(6315),h=i(75289),d=i(27571),u=i(76300),_=i(59662),c=i(29263),p=i(18820),m=i(28401),g=i(67706),b=i(25914),M=i(75833),f=i(54222),x=i(16533),v=i(21357),P=i(43019),k=i(30024),T=i(80019),y=i(93512),w=i(22411),E=i(91788),O=i(44786),C=i(29277),S=i(19442),B=i(23925);let G="Statics";l.E.AddHeader=function(t,e,i,a){let s=new M.P("panel"),r=!a||a.isHorizontal,n=!a||a.controlFirst;s.isVertical=!r;let o=new v.V("header");return o.text=e,o.textHorizontalAlignment=l.E.HORIZONTAL_ALIGNMENT_LEFT,r?o.width=i:o.height=i,n?(s.addControl(t),s.addControl(o),o.paddingLeft="5px"):(s.addControl(o),s.addControl(t),o.paddingRight="5px"),o.shadowBlur=t.shadowBlur,o.shadowColor=t.shadowColor,o.shadowOffsetX=t.shadowOffsetX,o.shadowOffsetY=t.shadowOffsetY,s};class I{constructor(){this._colorStops=[],this._gradientDirty=!0}_addColorStopsToCanvasGradient(){for(let t of this._colorStops)this._canvasGradient.addColorStop(t.offset,t.color)}getCanvasGradient(t){return(this._gradientDirty||this._context!==t)&&(this._context=t,this._canvasGradient=this._createCanvasGradient(t),this._addColorStopsToCanvasGradient(),this._gradientDirty=!1),this._canvasGradient}addColorStop(t,e){this._colorStops.push({offset:t,color:e}),this._gradientDirty=!0}removeColorStop(t){this._colorStops=this._colorStops.filter(e=>e.offset!==t),this._gradientDirty=!0}clearColorStops(){this._colorStops=[],this._gradientDirty=!0}get colorStops(){return this._colorStops}getClassName(){return"BaseGradient"}serialize(t){t.colorStops=this._colorStops,t.className=this.getClassName()}parse(t){this._colorStops=t.colorStops}}var L=i(12549);class A extends I{constructor(t,e,i,a){super(),this._x0=t??0,this._y0=e??0,this._x1=i??0,this._y1=a??0}_createCanvasGradient(t){return t.createLinearGradient(this._x0,this._y0,this._x1,this._y1)}get x0(){return this._x0}get x1(){return this._x1}get y0(){return this._y0}get y1(){return this._y1}getClassName(){return"LinearGradient"}serialize(t){super.serialize(t),t.x0=this._x0,t.y0=this._y0,t.x1=this._x1,t.y1=this._y1}parse(t){super.parse(t),this._x0=t.x0,this._y0=t.y0,this._x1=t.x1,this._y1=t.y1}}(0,L.Y5)("BABYLON.GUI.LinearGradient",A);class N extends I{constructor(t,e,i,a,s,r){super(),this._x0=t??0,this._y0=e??0,this._r0=i??0,this._x1=a??0,this._y1=s??0,this._r1=r??0}_createCanvasGradient(t){return t.createRadialGradient(this._x0,this._y0,this._r0,this._x1,this._y1,this._r1)}get x0(){return this._x0}get x1(){return this._x1}get y0(){return this._y0}get y1(){return this._y1}get r0(){return this._r0}get r1(){return this._r1}getClassName(){return"RadialGradient"}serialize(t){super.serialize(t),t.x0=this._x0,t.y0=this._y0,t.r0=this._r0,t.x1=this._x1,t.y1=this._y1,t.r1=this._r1}parse(t){super.parse(t),this._x0=t.x0,this._y0=t.y0,this._r0=t.r0,this._x1=t.x1,this._y1=t.y1,this._r1=t.r1}}(0,L.Y5)("BABYLON.GUI.RadialGradient",N);var R=i(37758),D=i(89957);class F{get renderTimeCounter(){return this._renderTime}get layoutTimeCounter(){return this._layoutTime}
1get captureRenderTime(){return this._captureRenderTime}set captureRenderTime(t){t!==this._captureRenderTime&&(this._captureRenderTime=t,t?(this._onBeginRenderObserver=this.texture.onBeginRenderObservable.add(()=>{this._renderTime.beginMonitoring()}),this._onEndRenderObserver=this.texture.onEndRenderObservable.add(()=>{this._renderTime.endMonitoring(!0)})):(this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null))}get captureLayoutTime(){return this._captureLayoutTime}set captureLayoutTime(t){t!==this._captureLayoutTime&&(this._captureLayoutTime=t,t?(this._onBeginLayoutObserver=this.texture.onBeginLayoutObservable.add(()=>{this._layoutTime.beginMonitoring()}),this._onEndLayoutObserver=this.texture.onEndLayoutObservable.add(()=>{this._layoutTime.endMonitoring(!0)})):(this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null))}constructor(t){this.texture=t,this._captureRenderTime=!1,this._renderTime=new D.A,this._captureLayoutTime=!1,this._layoutTime=new D.A,this._onBeginRenderObserver=null,this._onEndRenderObserver=null,this._onBeginLayoutObserver=null,this._onEndLayoutObserver=null}dispose(){this.texture.onBeginRenderObservable.remove(this._onBeginRenderObserver),this._onBeginRenderObserver=null,this.texture.onEndRenderObservable.remove(this._onEndRenderObserver),this._onEndRenderObserver=null,this.texture.onBeginLayoutObservable.remove(this._onBeginLayoutObserver),this._onBeginLayoutObserver=null,this.texture.onEndLayoutObservable.remove(this._onEndLayoutObserver),this._onEndLayoutObserver=null,this.texture=null}}var Q=i(52812),z=i(16732),H=i(49427),U=i(98283);class X extends U.L{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._adt.disablePicking=t}get gui(){return this._adt}constructor(t,e,i){if(super(t,e),i){if(!i.useStandalone)throw Error(`AdvancedDynamicTexture "${t}": the texture must have been created with the useStandalone property set to true`)}else i=R.v.CreateFullscreenUI(t,void 0,{useStandalone:!0});this._adt=i,this.outputTexture=this._frameGraph.textureManager.createDanglingHandle()}isReady(){return this._adt.guiIsReady()&&this._adt._layerToDispose.isReady()}record(){if(void 0===this.targetTexture)throw Error("FrameGraphGUITask: targetTexture is required");this._frameGraph.textureManager.resolveDanglingHandle(this.outputTexture,this.targetTexture);let t=this._frameGraph.addRenderPass(this.name);t.setRenderTarget(this.outputTexture),t.setExecuteFunc(t=>{this._adt._checkUpdate(null),t.render(this._adt._layerToDispose)});let e=this._frameGraph.addRenderPass(this.name+"_disabled",!0);e.setRenderTarget(this.outputTexture),e.setExecuteFunc(t=>{})}dispose(){this._adt.dispose(),super.dispose()}}var V=i(55679),W=i(91713);class $ extends V.E{get task(){return this._frameGraphTask}get gui(){return this._frameGraphTask.gui}constructor(t,e,i){super(t,e,i),this.registerInput("target",W.tp.Texture),this._addDependenciesInput(),this.registerOutput("output",W.tp.BasedOnInput),this.target.addAcceptedConnectionPointTypes(W.tp.TextureAll),this.output._t
1ypeConnectionSource=this.target,this._gui=R.v.CreateFullscreenUI(this.name,void 0,{useStandalone:!0}),this._frameGraphTask=new X(this.name,e,this._gui)}getClassName(){return"GUI.NodeRenderGraphGUIBlock"}get target(){return this._inputs[0]}get output(){return this._outputs[0]}_buildBlock(t){super._buildBlock(t),this.output.value=this._frameGraphTask.outputTexture,this._frameGraphTask.targetTexture=this.target.connectedPoint?.value}}(0,L.Y5)("BABYLON.GUI.NodeRenderGraphGUIBlock",$);var q=i(73701),K=i(61088);let Y="XmlLoader Exception : XML file is malformed or corrupted.";class Z{constructor(t=null){this._nodes={},this._nodeTypes={element:1,attribute:2,text:3},this._isLoaded=!1,this._objectAttributes={textHorizontalAlignment:1,textVerticalAlignment:2,horizontalAlignment:3,verticalAlignment:4,stretch:5},t&&(this._parentClass=t)}_getChainElement(t){let e=window;this._parentClass&&(e=this._parentClass);let i=t;i=i.split(".");for(let t=0;t<i.length;t++)e=e[i[t]];return e}_getClassAttribute(t){let e=t.split(".");return(0,L.n9)("BABYLON.GUI."+e[0])[e[1]]}_createGuiElement(t,e,i=!0){try{let a=new((0,L.n9)("BABYLON.GUI."+t.nodeName));e&&i&&e.addControl(a);for(let e=0;e<t.attributes.length;e++)if(!t.attributes[e].name.toLowerCase().includes("datasource"))if(t.attributes[e].name.toLowerCase().includes("observable")){let i=this._getChainElement(t.attributes[e].value);a[t.attributes[e].name].add(i);continue}else if("linkWithMesh"==t.attributes[e].name)this._parentClass?a.linkWithMesh(this._parentClass[t.attributes[e].value]):a.linkWithMesh(window[t.attributes[e].value]);else if(t.attributes[e].value.match(/{{.*}}/)){let i=t.attributes[e].value.match(/{{(.*)}}/),s=this._getChainElement(i[1]);t.attributes[e].value.startsWith("{{")&&t.attributes[e].value.endsWith("}}")||(s=t.attributes[e].value.replace(/{{.*}}/,`${s}`)),a[t.attributes[e].name]=s}else this._objectAttributes[t.attributes[e].name]?a[t.attributes[e].name]=this._getClassAttribute(t.attributes[e].value):"true"==t.attributes[e].value||"false"==t.attributes[e].value?a[t.attributes[e].name]="true"==t.attributes[e].value:a[t.attributes[e].name]=isNaN(Number(t.attributes[e].value))?t.attributes[e].value:Number(t.attributes[e].value);if(!t.attributes.getNamedItem("id"))return this._nodes[t.nodeName+Object.keys(this._nodes).length+"_gen"]=a,a;let s=t.attributes.getNamedItem("id").value;if(s.startsWith("{{")&&s.endsWith("}}")&&(s=this._getChainElement(s.substring(2,s.length-2))),this._nodes[s])throw"XmlLoader Exception : Duplicate ID, every element should have an unique ID attribute";return this._nodes[s]=a,a}catch(e){throw"XmlLoader Exception : Error parsing Control "+t.nodeName+","+e+"."}}_parseGrid(t,e,i){let a,s,r,n,l,o=t.children,h=!1,d=-1,u=-1,_=0;for(let t=0;t<o.length;t++)if(o[t].nodeType==this._nodeTypes.element){if("Row"!=o[t].nodeName)throw"XmlLoader Exception : Expecting Row node, received "+o[t].nodeName;if(d+=1,r=o[t].children,!o[t].attributes.getNamedItem("height"))throw"XmlLoader Exception : Height must be defined for grid rows";s=Number(o[t].attributes.getNamedItem("height").nodeValue),h=!!o[t].attributes.getNamedItem("isPixel")&&JSON.parse(o[t].attributes.getNamedItem("isPixel").nodeValue),e.addRowDefinition(s,h);for(let t=0;t<r.length;t++)if(r[t].nodeType==this._nodeTypes.element){if("Column"!=r[t].nodeName)throw"XmlLoader Exception : Expecting Column node, received "+r[t].nodeName;if(u+=1,d>0&&u>_)throw"XmlLoader Exception : In the Grid element, the number of columns is defined in the first row, do not add more columns in the subsequent rows.";if(0==d){if(!r[t].attributes.getNamedItem("width"))throw"XmlLoader Exception : Width must be defined for all the grid columns in the first row";a=Number(r[t].attributes.getNamedItem("width").nodeValue),h=!!r[t].attributes.getNamedItem("isPixel")&&JSON.parse(r[t].attributes.getNamedItem("isPixel").nodeValue),e.addColumnDefinition(a,h)}n=r[t].children;for(let t=0;t<n.length;t++)n[t].nodeType==this._nodeTypes.element&&(l=this._createGuiElement(n[t],e,!1),e.addControl(l,d,u),n[t].firstChild&&this._parseXml(n[t].firstChild,l))}0==d&&(_=u),u=-1}t.nextSibling&&this._parseXml(t.nextSibling,i)}_parseElement(t,e,i){t.firstChild&&this._parseXml(t.firstChild,e),t.nextSibling&&this._parseXml(t.nextSibling,i)}_prepareSourceElement(t,e,i,a,s){this._parentClass?this._parentClass[i]=a[s]:window[i]=a[s],t.firstChild&&this._parseXml(t.firstChild,e,!0)}_parseElementsFromSource(t,e,i){let a=t.attributes.getNamedItem("dataSource").value;if(a.includes(" in ")){let s=!0,r=a.split(" in ");if(r.length<2)throw"XmlLoader Exception : Malformed XML, Data Source must have an iterator and a source";let n=r[1];if(n.startsWith("{")&&n.endsWith("}")&&(s=!1),(!s||n.startsWith("[")&&n.endsWith("]"))&&(n=n.substring(1,n.length-1)),n=this._parentClass?this._parentClass[n]:window[n],s)for(let i=0;i<n.length;i++)this._prepareSourceElement(t,e,r[0],n,i);else for(let i in n)this._prepareSourceElement(t,e,r[0],n,i);t.nextSibling&&this._parseXml(t.nextSibling,i)}else throw"XmlLoader Exception : Malformed XML, Data Source must include an in"}
1_parseXml(t,e,i=!1){if(t.nodeType!=this._nodeTypes.element){t.nextSibling&&this._parseXml(t.nextSibling,e,i);return}i&&t.setAttribute("id",e.id+(e._children.length+1));let a=this._createGuiElement(t,e);this._rootNode||(this._rootNode=a),"Grid"==t.nodeName?this._parseGrid(t,a,e):t.attributes.getNamedItem("dataSource")?this._parseElementsFromSource(t,a,e):this._parseElement(t,a,e)}isLoaded(){return this._isLoaded}getNodeById(t){return this._nodes[t]}getNodes(){return this._nodes}dispose(){this._rootNode&&(this._rootNode.dispose(),this._rootNode=null,this._nodes={})}loadLayout(t,e,i=null,a=null){let s=new XMLHttpRequest;s.onload=()=>{if(4===s.readyState&&200===s.status){if(!s.responseXML)if(a)return void a(Y);else throw Y;let t=s.responseXML.documentElement;this._parseXml(t.firstChild,e),this._isLoaded=!0,i&&i()}},s.onerror=function(){a&&a("an error occurred during loading the layout")},s.open("GET",t,!0),s.send()}async loadLayoutAsync(t,e){return new Promise((i,a)=>{this.loadLayout(t,e,i,a)})}}var j=i(6047),J=i(19361),tt=i(87854),te=i(81744),ti=i(18242),ta=i(35940),ts=i(89739),tr=i(26338),tn=i(84323),tl=i(2932),to=i(93395),th=i(5446),td=i(47906),tu=i(82176),t_=i(91603),tc=i(76783),tp=i(67454),tm=i(35395),tg=i(86947),tb=i(16532),tM=i(16591),tf=i(30169),tx=i(98912),tv=i(63296),tP=i(61261),tk=i(28032),tT=i(64823),ty=i(74532),tw=i(53497),tE=i(76723),tO=i(6136),tC=i(13672),tS=i(32746),tB=i(30604),tG=i(72221),tI=i(58630),tL=i(68887);class tA extends tp.B{_disposeTooltip(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)}set renderingGroupId(t){this._backPlate.renderingGroupId=t,this._textPlate.renderingGroupId=t,this._frontPlate.renderingGroupId=t,this._backGlow.renderingGroupId=t,this._innerQuad.renderingGroupId=t,this._tooltipMesh&&(this._tooltipMesh.renderingGroupId=t)}get renderingGroupId(){return this._backPlate.renderingGroupId}get mesh(){return this._backPlate}set tooltipText(t){if(!t)return void this._disposeTooltip();if(!this._tooltipFade){let t=this._backPlate._scene.useRightHandedSystem;this._tooltipMesh=(0,tP.x)("",{size:1},this._backPlate._scene),this._tooltipMesh.position=tI.Pq.Down().scale(.7).add(tI.Pq.Forward(t).scale(-.15)),this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._frontPlateCollisionMesh,this._tooltipTexture=R.v.CreateForMesh(this._tooltipMesh);let e=new y.M;e.height=.25,e.width=.8,e.cornerRadius=25,e.color="#ffffff",e.thickness=20,e.background="#060668",this._tooltipTexture.addControl(e),this._tooltipTextBlock=new v.V,this._tooltipTextBlock.color="white",this._tooltipTextBlock.fontSize=100,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new ty._,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add(()=>{this._tooltipFade&&this._tooltipFade.fadeIn(!0)}),this._tooltipOutObserver=this.onPointerOutObservable.add(()=>{this._tooltipFade&&this._tooltipFade.fadeIn(!1)})}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}get tooltipText(){return this._tooltipTextBlock?.text||null}get text(){return this._text}set text(t){this._text!==t&&(this._text=t,this._rebuildContent())}get subtext(){return this._subtext}set subtext(t){this._subtext!==t&&(this._subtext=t,this._rebuildContent())}get imageUrl(){return this._imageUrl}set imageUrl(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())}get backMaterial(){return this._backMaterial}get frontMaterial(){return this._frontMaterial}get backGlowMaterial(){return this._backGlowMaterial}get innerQuadMaterial(){return this._innerQuadMaterial}get plateMaterial(){return this._plateMaterial}get shareMaterials(){return this._shareMaterials}set isBackplateVisible(t){this.mesh&&this._backMaterial&&(t&&!this._isBackplateVisible?this._backPlate.visibility=1:!t&&this._isBackplateVisible&&(this._backPlate.visibility=0)),this._isBackplateVisible=t}constructor(t,e=!0){super(t),this.width=1,this.height=1,this.radius=.14,this.textSizeInPixels=18,this.imageSizeInPixels=40,this.plateMaterialColor=new tv.v9(.4,.4,.4),this.frontPlateDepth=.2,this.backPlateDepth=.04,this.backGlowOffset=.1,this.flatPlaneDepth=.001,this.innerQuadRadius=this.radius-.04,this.innerQuadColor=new tv.ov(0,0,0,0),this.innerQuadToggledColor=new tv.ov(.5197843,.6485234,.9607843,.6),this.innerQuadHoverColor=new tv.ov(1,1,1,.05),this.innerQuadToggledHoverColor=new tv.ov(.5197843,.6485234,.9607843,1),this._isBackplateVisible=!0,this._shareMaterials=!0,this._shareMaterials=e,this.pointerEnterAnimation=()=>{this._frontPlate&&this._textPlate&&!this.isToggleButton&&this._performEnterExitAnimation(1),this.isToggleButton&&this._innerQuadMaterial&&(this.isToggled?this._innerQuadMaterial.color=this.innerQuadToggledHoverColor:this._innerQuadMaterial.color=this.innerQuadHoverColor)},this.pointerOutAnimation=()=>{this._frontPlate&&this._textPlate&&!this.isToggleButton&&this._performEnterExitAnimation(-.8),this.isToggleButton&&this._innerQuadMaterial&&this._onToggle(this.isToggled)},this.pointerDownAnimation=()=>{},this.pointerUpAnimation=()=>{},this._pointerClickObserver=this.onPointerClickObservable.add(()=>{this._frontPlate&&this._backGlow&&!this.isActiveNearInteraction&&this._performClickAnimation(),this.isToggleButton&&this._innerQuadMaterial&&this._onToggle(this.isToggled)}),this._pointerEnterObserver=this.onPointerEnterObservable.add(()=>{this.pointerEnterAnimation()}),this._pointerOutObserver=this.onPointerOutObservable.add(()=>{this.pointerOutAnimation()}),this._toggleObserver=this.onToggleObservable.add(t=>{t?this._innerQuadMaterial.color=this.innerQuadToggledColor:this._innerQuadMaterial.color=this.innerQuadColor})}_getTypeName(){return"TouchHolographicButton"}_rebuildContent(){let t;t=1>=this._getAspectRatio()?this._alignContentVertically():this._alignContentHorizontally(),this.content=t}_getAspectRatio(){return this.width/this.height}_alignContentVertically(){let t=new M.P;if(t.isVertical=!0,(0,tT.Nf)()&&document.createElement&&this._imageUrl){let e=new u._;e.source=this._imageUrl,e.heightInPixels=180,e.widthInPixels=100,e.paddingTopInPixels=40,e.paddingBottomInPixels=40,t.addControl(e)}if(this._text){let e=new v.V;e.text=this._text,e.color="white",e.heightInPixels=30,e.fontSize=24,t.addControl(e)}return t}_alignContentHorizontally(){let t=240,e=new y.M;e.widthInPixels=t,e.heightInPixels=t,e.color="transparent",e.setPaddingInPixels(15,15,15,15),t-=30;let i=new M.P;if(i.isVertical=!1,i.scaleY=this._getAspectRatio(),(0,tT.Nf)()&&document.createElement&&this._imageUrl){let e=new y.M(`${this.name}_image`);e.widthInPixels=this.imageSizeInPixels,e.heightInPixels=this.imageSizeInPixels,e.color="transparent",t-=this.imageSizeInPixels;let a=new u._;a.source=this._imageUrl,e.addControl(a),i.addControl(e)}if(this._text){let e=new v.V(`${this.name}_text`);if(e.text=this._text,e.color="white",e.fontSize=this.textSizeInPixels,e.widthInPixels=t,this._imageUrl&&(e.textHorizontalAlignment=l.E.HORIZONTAL_ALIGNMENT_LEFT,e.paddingLeftInPi
1xels=15),this._subtext){let a=new d.x;a.addColumnDefinition(1),a.addRowDefinition(.5),a.addRowDefinition(.5),a.widthInPixels=t,a.heightInPixels=45;let s=new v.V(`${this.name}_subtext`);s.text=this._subtext,s.color="#EEEEEEAB",s.fontSize=.75*this.textSizeInPixels,s.fontWeight="600",this._imageUrl&&(s.textHorizontalAlignment=l.E.HORIZONTAL_ALIGNMENT_LEFT,s.paddingLeftInPixels=15),a.addControl(e,0),a.addControl(s,1),i.addControl(a)}else i.addControl(e)}return e.addControl(i),e}_createNode(t){this.name=this.name??"TouchHolographicButton";let e=this._createBackPlate(t),i=this._createFrontPlate(t),a=this._createInnerQuad(t),s=this._createBackGlow(t);this._frontPlateCollisionMesh=i,this._textPlate=super._createNode(t),this._textPlate.name=`${this.name}_textPlate`,this._textPlate.isPickable=!1,this._textPlate.scaling.x=this.width,this._textPlate.parent=i,this._backPlate=e,this._backPlate.position=tI.Pq.Forward(t.useRightHandedSystem).scale(this.backPlateDepth/2),this._backPlate.isPickable=!1,this._backPlate.addChild(i),this._backPlate.addChild(a),s&&this._backPlate.addChild(s);let r=new tG.V(`${this.name}_root`,t);return this._backPlate.setParent(r),this.collisionMesh=i,this.collidableFrontDirection=this._backPlate.forward.negate(),r}_createBackPlate(t){let e=(0,tk.an)(`${this.name}_backPlate`,{},t);e.isPickable=!1,e.visibility=0,e.scaling.z=.2;let i=tL.S0.GetAssetUrl(tA.MRTK_ASSET_BASE_URL);return tS.cn.ImportMeshAsync(void 0,i,tA.BACKPLATE_MODEL_FILENAME,t).then(t=>{let i=t.meshes[1];i.visibility=0,this._isBackplateVisible&&(i.visibility=1,i.name=`${this.name}_backPlate`,i.isPickable=!1,i.scaling.x=this.width,i.scaling.y=this.height,i.parent=e),this._backMaterial&&(i.material=this._backMaterial),this._backPlate=i}),e}_createFrontPlate(t){let e=(0,tk.an)(`${this.name}_frontPlate`,{width:this.width,height:this.height,depth:this.frontPlateDepth},t);e.isPickable=!0,e.isNearPickable=!0,e.visibility=0,e.position=tI.Pq.Forward(t.useRightHandedSystem).scale((this.backPlateDepth-this.frontPlateDepth)/2);let i=tL.S0.GetAssetUrl(tA.MRTK_ASSET_BASE_URL);return tS.cn.ImportMeshAsync(void 0,i,tA.FRONTPLATE_MODEL_FILENAME,t).then(i=>{let a=(0,tk.an)(`${this.name}_collisionPlate`,{width:this.width,height:this.height},t);a.isPickable=!1,a.scaling.z=this.frontPlateDepth,a.visibility=0,a.parent=e,this._collisionPlate=a;let s=i.meshes[1];s.name=`${this.name}_frontPlate`,s.isPickable=!1,s.scaling.x=this.width-this.backGlowOffset,s.scaling.y=this.height-this.backGlowOffset,s.position=tI.Pq.Forward(t.useRightHandedSystem).scale(-.5),s.parent=a,this.isToggleButton&&(s.visibility=0),this._frontMaterial&&(s.material=this._frontMaterial),this._textPlate.scaling.x=1,this._textPlate.parent=s,this._frontPlate=s}),e}_createInnerQuad(t){let e=(0,tk.an)(`${this.name}_innerQuad`,{},t);e.isPickable=!1,e.visibility=0,e.scaling.z=this.flatPlaneDepth,e.position.z+=this.backPlateDepth/2-this.flatPlaneDepth;let i=tL.S0.GetAssetUrl(tA.MRTK_ASSET_BASE_URL);return tS.cn.ImportMeshAsync(void 0,i,tA.INNERQUAD_MODEL_FILENAME,t).then(t=>{let i=t.meshes[1];i.name=`${this.name}_innerQuad`,i.isPickable=!1,i.scaling.x=this.width-this.backGlowOffset,i.scaling.y=this.height-this.backGlowOffset,i.parent=e,this._innerQuadMaterial&&(i.material=this._innerQuadMaterial),this._innerQuad=i}),e}_createBackGlow(t){if(this.isToggleButton)return;let e=(0,tk.an)(`${this.name}_backGlow`,{},t);e.isPickable=!1,e.visibility=0,e.scaling.z=this.flatPlaneDepth,e.position.z+=this.backPlateDepth/2-2*this.flatPlaneDepth;let i=tL.S0.GetAssetUrl(tA.MRTK_ASSET_BASE_URL);return tS.cn.ImportMeshAsync(void 0,i,tA.BACKGLOW_MODEL_FILENAME,t).then(t=>{let i=t.meshes[1];i.name=`${this.name}_backGlow`,i.isPickable=!1,i.scaling.x=this.width-this.backGlowOffset,i.scaling.y=this.height-this.backGlowOffset,i.parent=e,this._backGlowMaterial&&(i.material=this._backGlowMaterial),this._backGlow=i}),e}_applyFacade(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t,this._plateMaterial.diffuseColor=this.plateMaterialColor}_performClickAnimation(){let t=new tx.AnimationGroup("Click Animation Group");for(let e of[{name:"backGlowMotion",mesh:this._backGlow,property:"material.motion",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[1,.0144,.0144]},{frame:40,values:[.0027713229489760476,0,0]},{frame:45,values:[.0027713229489760476]}]},{name:"_collisionPlateZSlide",mesh:this._collisionPlate,property:"position.z",keys:[{frame:0,values:[0,0,0]},{frame:20,values:[tI.Pq.Forward(this._collisionPlate._scene.useRightHandedSystem).scale(this.frontPlateDepth/2).z,0,0]},{frame:40,values:[0,.005403332496794331]},{frame:45,values:[0]}]},{name:"_collisionPlateZScale",mesh:this._collisionPlate,property:"scaling.z",keys:[{frame:0,values:[this.frontPlateDepth,0,0]},{frame:20,values:[this.backPlateDepth,0,0]},{frame:40,values:[this.frontPlateDepth,.0054]},{frame:45,values:[this.frontPlateDepth]}]}]){let i=new tf.X5(e.name,e.property,60,tf.X5.ANIMATIONTYPE_FLOAT,tf.X5.ANIMATIONLOOPMODE_CYCLE),a=[];for(let t of e.keys)a.push({frame:t.frame,value:t.values[0],inTangent:t.values[1],outTangent:t.values[2],interpolation:t.values[3]});i.setKeys(a),e.mesh&&t.addTargetedAnimation(i,e.mesh)}
1t.normalize(0,45),t.speedRatio=1,t.play()}_performEnterExitAnimation(t){let e=new tx.AnimationGroup("Enter Exit Animation Group");for(let t of[{name:"frontPlateFadeOut",mesh:this._frontPlate,property:"material.fadeOut",keys:[{frame:0,values:[0,0,.025045314830017686,0]},{frame:40,values:[1.00205599570012,.025045314830017686,0,0]}]},{name:"textPlateZSlide",mesh:this._textPlate,property:"position.z",keys:[{frame:0,values:[0,0,0]},{frame:40,values:[tI.Pq.Forward(this._textPlate._scene.useRightHandedSystem).scale(-.15).z,0,0]}]}]){let i=new tf.X5(t.name,t.property,60,tf.X5.ANIMATIONTYPE_FLOAT,tf.X5.ANIMATIONLOOPMODE_CYCLE),a=[];for(let e of t.keys)a.push({frame:e.frame,value:e.values[0],inTangent:e.values[1],outTangent:e.values[2],interpolation:e.values[3]});i.setKeys(a),t.mesh&&e.addTargetedAnimation(i,t.mesh)}e.normalize(0,45),e.speedRatio=t,e.play()}_createBackMaterial(t){this._backMaterial=this._backMaterial??new tE.e(this.name+"backPlateMaterial",t.getScene()),this._backMaterial.absoluteSizes=!0,this._backMaterial.radius=this.radius,this._backMaterial.lineWidth=.02}_createFrontMaterial(t){this._frontMaterial=this._frontMaterial??new tO.U(this.name+"Front Material",t.getScene()),this.frontMaterial.radius=this.innerQuadRadius,this.frontMaterial.fadeOut=0}_createBackGlowMaterial(t){let e=this.radius+.04;this._backGlowMaterial=this._backGlowMaterial??new tw.V(this.name+"Back Glow Material",t.getScene()),this._backGlowMaterial.bevelRadius=e,this._backGlowMaterial.lineWidth=e,this._backGlowMaterial.motion=0}_createInnerQuadMaterial(t){this._innerQuadMaterial=this._innerQuadMaterial??new tC.I("inner_quad",t.getScene()),this._innerQuadMaterial.radius=this.innerQuadRadius,this.isToggleButton&&(this._innerQuadMaterial.color=this.innerQuadColor)}_createPlateMaterial(t){this._plateMaterial=this._plateMaterial??new tB.F(this.name+"Plate Material",t.getScene()),this._plateMaterial.specularColor=tv.v9.Black()}_onToggle(t){super._onToggle(t)}_affectMaterial(t){this._shareMaterials?(this._host._touchSharedMaterials.mrdlBackplateMaterial?this._backMaterial=this._host._touchSharedMaterials.mrdlBackplateMaterial:(this._createBackMaterial(t),this._host._touchSharedMaterials.mrdlBackplateMaterial=this._backMaterial),this._host._touchSharedMaterials.mrdlFrontplateMaterial?this._frontMaterial=this._host._touchSharedMaterials.mrdlFrontplateMaterial:(this._createFrontMaterial(t),this._host._touchSharedMaterials.mrdlFrontplateMaterial=this._frontMaterial),this._host._touchSharedMaterials.mrdlBackglowMaterial?this._backGlowMaterial=this._host._touchSharedMaterials.mrdlBackglowMaterial:(this._createBackGlowMaterial(t),this._host._touchSharedMaterials.mrdlBackglowMaterial=this._backGlowMaterial),this._host._touchSharedMaterials.mrdlInnerQuadMaterial?this._innerQuadMaterial=this._host._touchSharedMaterials.mrdlInnerQuadMaterial:(this._createInnerQuadMaterial(t),this._host._touchSharedMaterials.mrdlInnerQuadMaterial=this._innerQuadMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t),this._createBackGlowMaterial(t),this._createInnerQuadMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._textPlate.material=this._plateMaterial,this._isBackplateVisible||(this._backPlate.visibility=0),this._frontPlate&&(this._frontPlate.material=this._frontMaterial),this._backGlow&&(this._backGlow.material=this._backGlowMaterial),this._innerQuad&&(this._innerQuad.material=this._innerQuadMaterial),this._rebuildContent()}dispose(){super.dispose(),this._disposeTooltip(),this.onPointerClickObservable.remove(this._pointerClickObserver),this.onPointerEnterObservable.remove(this._pointerEnterObserver),this.onPointerOutObservable.remove(this._pointerOutObserver),this.onToggleObservable.remove(this._toggleObserver),
1!this.shareMaterials&&(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._backGlowMaterial.dispose(),this._innerQuadMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))}}tA.MRTK_ASSET_BASE_URL="https://assets.babylonjs.com/core/MRTK/",tA.FRONTPLATE_MODEL_FILENAME="mrtk-fluent-frontplate.glb",tA.BACKPLATE_MODEL_FILENAME="mrtk-fluent-backplate.glb",tA.BACKGLOW_MODEL_FILENAME="mrtk-fluent-button.glb",tA.INNERQUAD_MODEL_FILENAME="SlateProximity.glb";var tN=i(92809),tR=i(71393),tD=i(11425),tF=i(90915),tQ=i(2019),tz=i(2850),tH=i(70836),tU=i(68247),tX=i(69780),tV=i(16933)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.